From 82491bc6229c736d866e843184b83fa422af24b6 Mon Sep 17 00:00:00 2001 From: taolx0 Date: Thu, 16 May 2024 14:22:54 +0800 Subject: [PATCH 1/2] chore:audit record retention configuration --- sqle/api/controller/v1/configuration.go | 2 ++ sqle/docs/docs.go | 7 +++++++ sqle/docs/swagger.json | 7 +++++++ sqle/docs/swagger.yaml | 5 +++++ 4 files changed, 21 insertions(+) diff --git a/sqle/api/controller/v1/configuration.go b/sqle/api/controller/v1/configuration.go index 7391b2614..7f57979d9 100644 --- a/sqle/api/controller/v1/configuration.go +++ b/sqle/api/controller/v1/configuration.go @@ -82,6 +82,7 @@ type UpdateSystemVariablesReqV1 struct { WorkflowExpiredHours *int `json:"workflow_expired_hours" form:"workflow_expired_hours" example:"720"` Url *string `json:"url" form:"url" example:"http://10.186.61.32:8080" validate:"url"` OperationRecordExpiredHours *int `json:"operation_record_expired_hours" form:"operation_record_expired_hours" example:"2160"` + AuditLogsExpiredHours *int `json:"audit_logs_expired_hours" form:"audit_logs_expired_hours" example:"2160"` } // @Summary 修改系统变量 @@ -139,6 +140,7 @@ type SystemVariablesResV1 struct { WorkflowExpiredHours int `json:"workflow_expired_hours"` Url string `json:"url"` OperationRecordExpiredHours int `json:"operation_record_expired_hours"` + AuditLogsExpiredHours int `json:"audit_logs_expired_hours"` } // @Summary 获取系统变量 diff --git a/sqle/docs/docs.go b/sqle/docs/docs.go index f9deefe01..3848cec7d 100644 --- a/sqle/docs/docs.go +++ b/sqle/docs/docs.go @@ -12423,6 +12423,9 @@ var doc = `{ "v1.SystemVariablesResV1": { "type": "object", "properties": { + "audit_logs_expired_hours": { + "type": "integer" + }, "operation_record_expired_hours": { "type": "integer" }, @@ -12908,6 +12911,10 @@ var doc = `{ "v1.UpdateSystemVariablesReqV1": { "type": "object", "properties": { + "audit_logs_expired_hours": { + "type": "integer", + "example": 2160 + }, "operation_record_expired_hours": { "type": "integer", "example": 2160 diff --git a/sqle/docs/swagger.json b/sqle/docs/swagger.json index 7b7d8d1fd..df02ed495 100644 --- a/sqle/docs/swagger.json +++ b/sqle/docs/swagger.json @@ -12407,6 +12407,9 @@ "v1.SystemVariablesResV1": { "type": "object", "properties": { + "audit_logs_expired_hours": { + "type": "integer" + }, "operation_record_expired_hours": { "type": "integer" }, @@ -12892,6 +12895,10 @@ "v1.UpdateSystemVariablesReqV1": { "type": "object", "properties": { + "audit_logs_expired_hours": { + "type": "integer", + "example": 2160 + }, "operation_record_expired_hours": { "type": "integer", "example": 2160 diff --git a/sqle/docs/swagger.yaml b/sqle/docs/swagger.yaml index 4515988cb..100a22a60 100644 --- a/sqle/docs/swagger.yaml +++ b/sqle/docs/swagger.yaml @@ -2820,6 +2820,8 @@ definitions: type: object v1.SystemVariablesResV1: properties: + audit_logs_expired_hours: + type: integer operation_record_expired_hours: type: integer url: @@ -3147,6 +3149,9 @@ definitions: type: object v1.UpdateSystemVariablesReqV1: properties: + audit_logs_expired_hours: + example: 2160 + type: integer operation_record_expired_hours: example: 2160 type: integer From dd0179d9db2bb27fe939979b0fdf31aef535851e Mon Sep 17 00:00:00 2001 From: taolx0 Date: Thu, 16 May 2024 14:54:43 +0800 Subject: [PATCH 2/2] chore:audit record retention configuration --- sqle/api/controller/v1/configuration.go | 4 ++-- sqle/docs/docs.go | 4 ++-- sqle/docs/swagger.json | 4 ++-- sqle/docs/swagger.yaml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sqle/api/controller/v1/configuration.go b/sqle/api/controller/v1/configuration.go index 7f57979d9..75383e0f2 100644 --- a/sqle/api/controller/v1/configuration.go +++ b/sqle/api/controller/v1/configuration.go @@ -82,7 +82,7 @@ type UpdateSystemVariablesReqV1 struct { WorkflowExpiredHours *int `json:"workflow_expired_hours" form:"workflow_expired_hours" example:"720"` Url *string `json:"url" form:"url" example:"http://10.186.61.32:8080" validate:"url"` OperationRecordExpiredHours *int `json:"operation_record_expired_hours" form:"operation_record_expired_hours" example:"2160"` - AuditLogsExpiredHours *int `json:"audit_logs_expired_hours" form:"audit_logs_expired_hours" example:"2160"` + CbOperationLogsExpiredHours *int `json:"cb_operation_logs_expired_hours" form:"cb_operation_logs_expired_hours" example:"2160"` } // @Summary 修改系统变量 @@ -140,7 +140,7 @@ type SystemVariablesResV1 struct { WorkflowExpiredHours int `json:"workflow_expired_hours"` Url string `json:"url"` OperationRecordExpiredHours int `json:"operation_record_expired_hours"` - AuditLogsExpiredHours int `json:"audit_logs_expired_hours"` + CbOperationLogsExpiredHours int `json:"cb_operation_logs_expired_hours"` } // @Summary 获取系统变量 diff --git a/sqle/docs/docs.go b/sqle/docs/docs.go index 3848cec7d..c32804d6b 100644 --- a/sqle/docs/docs.go +++ b/sqle/docs/docs.go @@ -12423,7 +12423,7 @@ var doc = `{ "v1.SystemVariablesResV1": { "type": "object", "properties": { - "audit_logs_expired_hours": { + "cb_operation_logs_expired_hours": { "type": "integer" }, "operation_record_expired_hours": { @@ -12911,7 +12911,7 @@ var doc = `{ "v1.UpdateSystemVariablesReqV1": { "type": "object", "properties": { - "audit_logs_expired_hours": { + "cb_operation_logs_expired_hours": { "type": "integer", "example": 2160 }, diff --git a/sqle/docs/swagger.json b/sqle/docs/swagger.json index df02ed495..3bb658640 100644 --- a/sqle/docs/swagger.json +++ b/sqle/docs/swagger.json @@ -12407,7 +12407,7 @@ "v1.SystemVariablesResV1": { "type": "object", "properties": { - "audit_logs_expired_hours": { + "cb_operation_logs_expired_hours": { "type": "integer" }, "operation_record_expired_hours": { @@ -12895,7 +12895,7 @@ "v1.UpdateSystemVariablesReqV1": { "type": "object", "properties": { - "audit_logs_expired_hours": { + "cb_operation_logs_expired_hours": { "type": "integer", "example": 2160 }, diff --git a/sqle/docs/swagger.yaml b/sqle/docs/swagger.yaml index 100a22a60..610d7dc8e 100644 --- a/sqle/docs/swagger.yaml +++ b/sqle/docs/swagger.yaml @@ -2820,7 +2820,7 @@ definitions: type: object v1.SystemVariablesResV1: properties: - audit_logs_expired_hours: + cb_operation_logs_expired_hours: type: integer operation_record_expired_hours: type: integer @@ -3149,7 +3149,7 @@ definitions: type: object v1.UpdateSystemVariablesReqV1: properties: - audit_logs_expired_hours: + cb_operation_logs_expired_hours: example: 2160 type: integer operation_record_expired_hours: