diff --git a/agent/app/api/v2/container.go b/agent/app/api/v2/container.go index d9c7d1ba6..9e28912bd 100644 --- a/agent/app/api/v2/container.go +++ b/agent/app/api/v2/container.go @@ -314,7 +314,7 @@ func (b *BaseApi) ContainerCreateByCommand(c *gin.Context) { // @Security ApiKeyAuth // @Security Timestamp // @Router /containers/upgrade [post] -// @x-panel-log {"bodyKeys":["name","image"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"更新容器镜像 [name][image]","formatEN":"upgrade container image [name][image]"} +// @x-panel-log {"bodyKeys":["names","image"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"更新容器镜像 [names][image]","formatEN":"upgrade container image [names][image]"} func (b *BaseApi) ContainerUpgrade(c *gin.Context) { var req dto.ContainerUpgrade if err := helper.CheckBindAndValidate(&req, c); err != nil { diff --git a/agent/app/api/v2/cronjob.go b/agent/app/api/v2/cronjob.go index f9f7969af..45e2a481f 100644 --- a/agent/app/api/v2/cronjob.go +++ b/agent/app/api/v2/cronjob.go @@ -211,7 +211,7 @@ func (b *BaseApi) LoadRecordLog(c *gin.Context) { // @Security ApiKeyAuth // @Security Timestamp // @Router /cronjobs/records/clean [post] -// @x-panel-log {"bodyKeys":["id"],"paramKeys":[],"BeforeFunctions":[{"input_column":"id","input_value":"id","isList":false,"db":"cronjobs","output_column":"name","output_value":"name"}],"formatZH":"清空计划任务记录 [name]","formatEN":"clean cronjob [name] records"} +// @x-panel-log {"bodyKeys":["cronjobID"],"paramKeys":[],"BeforeFunctions":[{"input_column":"id","input_value":"cronjobID","isList":false,"db":"cronjobs","output_column":"name","output_value":"name"}],"formatZH":"清空计划任务记录 [name]","formatEN":"clean cronjob [name] records"} func (b *BaseApi) CleanRecord(c *gin.Context) { var req dto.CronjobClean if err := helper.CheckBindAndValidate(&req, c); err != nil { diff --git a/agent/app/api/v2/firewall.go b/agent/app/api/v2/firewall.go index 8c917f6a9..fda0bcebb 100644 --- a/agent/app/api/v2/firewall.go +++ b/agent/app/api/v2/firewall.go @@ -102,14 +102,14 @@ func (b *BaseApi) OperatePortRule(c *gin.Context) { // OperateForwardRule // @Tags Firewall -// @Summary Create group +// @Summary Operate forward rule // @Accept json // @Param request body dto.ForwardRuleOperate true "request" // @Success 200 // @Security ApiKeyAuth // @Security Timestamp // @Router /hosts/firewall/forward [post] -// @x-panel-log {"bodyKeys":["source_port"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"更新端口转发规则 [source_port]","formatEN":"update port forward rules [source_port]"} +// @x-panel-log {"bodyKeys":[],"paramKeys":[],"BeforeFunctions":[],"formatZH":"更新端口转发规则","formatEN":"update port forward rules"} func (b *BaseApi) OperateForwardRule(c *gin.Context) { var req dto.ForwardRuleOperate if err := helper.CheckBindAndValidate(&req, c); err != nil { @@ -124,7 +124,7 @@ func (b *BaseApi) OperateForwardRule(c *gin.Context) { } // @Tags Firewall -// @Summary Create group +// @Summary Operate Ip rule // @Accept json // @Param request body dto.AddrRuleOperate true "request" // @Success 200 @@ -146,7 +146,7 @@ func (b *BaseApi) OperateIPRule(c *gin.Context) { } // @Tags Firewall -// @Summary Create group +// @Summary Batch operate rule // @Accept json // @Param request body dto.BatchRuleOperate true "request" // @Success 200 @@ -188,7 +188,7 @@ func (b *BaseApi) UpdateFirewallDescription(c *gin.Context) { } // @Tags Firewall -// @Summary Create group +// @Summary Update port rule // @Accept json // @Param request body dto.PortRuleUpdate true "request" // @Success 200 @@ -209,7 +209,7 @@ func (b *BaseApi) UpdatePortRule(c *gin.Context) { } // @Tags Firewall -// @Summary Create group +// @Summary Update Ip rule // @Accept json // @Param request body dto.AddrRuleUpdate true "request" // @Success 200 diff --git a/core/cmd/server/docs/docs.go b/core/cmd/server/docs/docs.go index 9251149ab..4e223772c 100644 --- a/core/cmd/server/docs/docs.go +++ b/core/cmd/server/docs/docs.go @@ -4871,11 +4871,11 @@ const docTemplate = `{ "x-panel-log": { "BeforeFunctions": [], "bodyKeys": [ - "name", + "names", "image" ], - "formatEN": "upgrade container image [name][image]", - "formatZH": "更新容器镜像 [name][image]", + "formatEN": "upgrade container image [names][image]", + "formatZH": "更新容器镜像 [names][image]", "paramKeys": [] } } @@ -8075,14 +8075,14 @@ const docTemplate = `{ { "db": "cronjobs", "input_column": "id", - "input_value": "id", + "input_value": "cronjobID", "isList": false, "output_column": "name", "output_value": "name" } ], "bodyKeys": [ - "id" + "cronjobID" ], "formatEN": "clean cronjob [name] records", "formatZH": "清空计划任务记录 [name]", @@ -12322,7 +12322,21 @@ const docTemplate = `{ } }, "/hosts/firewall/base": { - "get": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperationWithName" + } + } + ], "responses": { "200": { "description": "OK", @@ -12374,7 +12388,204 @@ const docTemplate = `{ "Timestamp": [] } ], - "summary": "Create group", + "summary": "Batch operate rule", + "tags": [ + "Firewall" + ] + } + }, + "/hosts/firewall/filter/chain/status": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperationWithName" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "load chain status with name", + "tags": [ + "Firewall" + ] + } + }, + "/hosts/firewall/filter/operate": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.IptablesOp" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Apply/Unload/Init iptables filter", + "tags": [ + "Firewall" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "operate" + ], + "formatEN": "[operate] iptables filter firewall", + "formatZH": "[operate] iptables filter 防火墙", + "paramKeys": [] + } + } + }, + "/hosts/firewall/filter/rule/batch": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.IptablesBatchOperate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Batch operate iptables filter rules", + "tags": [ + "Firewall" + ] + } + }, + "/hosts/firewall/filter/rule/operate": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.IptablesRuleOp" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Operate iptables filter rule", + "tags": [ + "Firewall" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "operation", + "chain" + ], + "formatEN": "[operation] filter rule to [chain]", + "formatZH": "[operation] filter规则到 [chain]", + "paramKeys": [] + } + } + }, + "/hosts/firewall/filter/search": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SearchPageWithType" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "search iptables filter rules", "tags": [ "Firewall" ] @@ -12409,17 +12620,15 @@ const docTemplate = `{ "Timestamp": [] } ], - "summary": "Create group", + "summary": "Operate forward rule", "tags": [ "Firewall" ], "x-panel-log": { "BeforeFunctions": [], - "bodyKeys": [ - "source_port" - ], - "formatEN": "update port forward rules [source_port]", - "formatZH": "更新端口转发规则 [source_port]", + "bodyKeys": [], + "formatEN": "update port forward rules", + "formatZH": "更新端口转发规则", "paramKeys": [] } } @@ -12453,7 +12662,7 @@ const docTemplate = `{ "Timestamp": [] } ], - "summary": "Create group", + "summary": "Operate Ip rule", "tags": [ "Firewall" ], @@ -12625,7 +12834,7 @@ const docTemplate = `{ "Timestamp": [] } ], - "summary": "Create group", + "summary": "Update Ip rule", "tags": [ "Firewall" ] @@ -12695,7 +12904,7 @@ const docTemplate = `{ "Timestamp": [] } ], - "summary": "Create group", + "summary": "Update port rule", "tags": [ "Firewall" ] @@ -21197,6 +21406,9 @@ const docTemplate = `{ "description": { "type": "string" }, + "id": { + "type": "integer" + }, "operation": { "enum": [ "add", @@ -22511,6 +22723,9 @@ const docTemplate = `{ "remove" ], "type": "string" + }, + "taskID": { + "type": "string" } }, "required": [ @@ -22600,7 +22815,10 @@ const docTemplate = `{ }, "dto.ContainerStatus": { "properties": { - "all": { + "buildCacheReclaimable": { + "type": "integer" + }, + "buildCacheUsage": { "type": "integer" }, "composeCount": { @@ -22612,6 +22830,12 @@ const docTemplate = `{ "containerCount": { "type": "integer" }, + "containerReclaimable": { + "type": "integer" + }, + "containerUsage": { + "type": "integer" + }, "created": { "type": "integer" }, @@ -22624,7 +22848,10 @@ const docTemplate = `{ "imageCount": { "type": "integer" }, - "imageSize": { + "imageReclaimable": { + "type": "integer" + }, + "imageUsage": { "type": "integer" }, "networkCount": { @@ -22647,6 +22874,12 @@ const docTemplate = `{ }, "volumeCount": { "type": "integer" + }, + "volumeReclaimable": { + "type": "integer" + }, + "volumeUsage": { + "type": "integer" } }, "type": "object" @@ -22784,6 +23017,12 @@ const docTemplate = `{ "minimum": 0, "type": "integer" }, + "scopes": { + "items": { + "type": "string" + }, + "type": "array" + }, "script": { "type": "string" }, @@ -23239,6 +23478,18 @@ const docTemplate = `{ "timeSinceUptime": { "type": "string" }, + "topCPUItems": { + "items": { + "$ref": "#/definitions/dto.Process" + }, + "type": "array" + }, + "topMemItems": { + "items": { + "$ref": "#/definitions/dto.Process" + }, + "type": "array" + }, "uptime": { "type": "integer" }, @@ -23770,9 +24021,15 @@ const docTemplate = `{ "isActive": { "type": "boolean" }, + "isBind": { + "type": "boolean" + }, "isExist": { "type": "boolean" }, + "isInit": { + "type": "boolean" + }, "name": { "type": "string" }, @@ -24281,6 +24538,9 @@ const docTemplate = `{ "properties": { "path": { "type": "string" + }, + "taskID": { + "type": "string" } }, "required": [ @@ -24391,6 +24651,9 @@ const docTemplate = `{ }, "tagName": { "type": "string" + }, + "taskID": { + "type": "string" } }, "required": [ @@ -24433,6 +24696,99 @@ const docTemplate = `{ ], "type": "object" }, + "dto.IptablesBatchOperate": { + "properties": { + "rules": { + "items": { + "$ref": "#/definitions/dto.IptablesRuleOp" + }, + "type": "array" + } + }, + "type": "object" + }, + "dto.IptablesOp": { + "properties": { + "name": { + "enum": [ + "1PANEL_INPUT", + "1PANEL_OUTPUT", + "1PANEL_BASIC" + ], + "type": "string" + }, + "operate": { + "enum": [ + "init-base", + "init-forward", + "init-advance", + "bind-base", + "unbind-base", + "bind", + "unbind" + ], + "type": "string" + } + }, + "required": [ + "name", + "operate" + ], + "type": "object" + }, + "dto.IptablesRuleOp": { + "properties": { + "chain": { + "enum": [ + "1PANEL_INPUT", + "1PANEL_OUTPUT" + ], + "type": "string" + }, + "description": { + "type": "string" + }, + "dstIP": { + "type": "string" + }, + "dstPort": { + "type": "integer" + }, + "id": { + "type": "integer" + }, + "operation": { + "enum": [ + "add", + "remove" + ], + "type": "string" + }, + "protocol": { + "type": "string" + }, + "srcIP": { + "type": "string" + }, + "srcPort": { + "type": "integer" + }, + "strategy": { + "enum": [ + "ACCEPT", + "DROP", + "REJECT" + ], + "type": "string" + } + }, + "required": [ + "chain", + "operation", + "strategy" + ], + "type": "object" + }, "dto.LoadRedisStatus": { "properties": { "name": { @@ -24605,7 +24961,10 @@ const docTemplate = `{ "endTime": { "type": "string" }, - "info": { + "io": { + "type": "string" + }, + "network": { "type": "string" }, "param": { @@ -25681,6 +26040,9 @@ const docTemplate = `{ "description": { "type": "string" }, + "id": { + "type": "integer" + }, "operation": { "enum": [ "add", @@ -25923,6 +26285,29 @@ const docTemplate = `{ ], "type": "object" }, + "dto.Process": { + "properties": { + "cmd": { + "type": "string" + }, + "memory": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "percent": { + "type": "number" + }, + "pid": { + "type": "integer" + }, + "user": { + "type": "string" + } + }, + "type": "object" + }, "dto.ProxyUpdate": { "properties": { "proxyDocker": { @@ -31642,6 +32027,9 @@ const docTemplate = `{ "pullImage": { "type": "boolean" }, + "rawCompose": { + "type": "string" + }, "restartPolicy": { "enum": [ "always", diff --git a/core/cmd/server/docs/swagger.json b/core/cmd/server/docs/swagger.json index 4afc11970..054f4b617 100644 --- a/core/cmd/server/docs/swagger.json +++ b/core/cmd/server/docs/swagger.json @@ -4867,11 +4867,11 @@ "x-panel-log": { "BeforeFunctions": [], "bodyKeys": [ - "name", + "names", "image" ], - "formatEN": "upgrade container image [name][image]", - "formatZH": "更新容器镜像 [name][image]", + "formatEN": "upgrade container image [names][image]", + "formatZH": "更新容器镜像 [names][image]", "paramKeys": [] } } @@ -8071,14 +8071,14 @@ { "db": "cronjobs", "input_column": "id", - "input_value": "id", + "input_value": "cronjobID", "isList": false, "output_column": "name", "output_value": "name" } ], "bodyKeys": [ - "id" + "cronjobID" ], "formatEN": "clean cronjob [name] records", "formatZH": "清空计划任务记录 [name]", @@ -12318,7 +12318,21 @@ } }, "/hosts/firewall/base": { - "get": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperationWithName" + } + } + ], "responses": { "200": { "description": "OK", @@ -12370,7 +12384,204 @@ "Timestamp": [] } ], - "summary": "Create group", + "summary": "Batch operate rule", + "tags": [ + "Firewall" + ] + } + }, + "/hosts/firewall/filter/chain/status": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperationWithName" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "load chain status with name", + "tags": [ + "Firewall" + ] + } + }, + "/hosts/firewall/filter/operate": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.IptablesOp" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Apply/Unload/Init iptables filter", + "tags": [ + "Firewall" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "operate" + ], + "formatEN": "[operate] iptables filter firewall", + "formatZH": "[operate] iptables filter 防火墙", + "paramKeys": [] + } + } + }, + "/hosts/firewall/filter/rule/batch": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.IptablesBatchOperate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Batch operate iptables filter rules", + "tags": [ + "Firewall" + ] + } + }, + "/hosts/firewall/filter/rule/operate": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.IptablesRuleOp" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Operate iptables filter rule", + "tags": [ + "Firewall" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "operation", + "chain" + ], + "formatEN": "[operation] filter rule to [chain]", + "formatZH": "[operation] filter规则到 [chain]", + "paramKeys": [] + } + } + }, + "/hosts/firewall/filter/search": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SearchPageWithType" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "search iptables filter rules", "tags": [ "Firewall" ] @@ -12405,17 +12616,15 @@ "Timestamp": [] } ], - "summary": "Create group", + "summary": "Operate forward rule", "tags": [ "Firewall" ], "x-panel-log": { "BeforeFunctions": [], - "bodyKeys": [ - "source_port" - ], - "formatEN": "update port forward rules [source_port]", - "formatZH": "更新端口转发规则 [source_port]", + "bodyKeys": [], + "formatEN": "update port forward rules", + "formatZH": "更新端口转发规则", "paramKeys": [] } } @@ -12449,7 +12658,7 @@ "Timestamp": [] } ], - "summary": "Create group", + "summary": "Operate Ip rule", "tags": [ "Firewall" ], @@ -12621,7 +12830,7 @@ "Timestamp": [] } ], - "summary": "Create group", + "summary": "Update Ip rule", "tags": [ "Firewall" ] @@ -12691,7 +12900,7 @@ "Timestamp": [] } ], - "summary": "Create group", + "summary": "Update port rule", "tags": [ "Firewall" ] @@ -21193,6 +21402,9 @@ "description": { "type": "string" }, + "id": { + "type": "integer" + }, "operation": { "enum": [ "add", @@ -22507,6 +22719,9 @@ "remove" ], "type": "string" + }, + "taskID": { + "type": "string" } }, "required": [ @@ -22596,7 +22811,10 @@ }, "dto.ContainerStatus": { "properties": { - "all": { + "buildCacheReclaimable": { + "type": "integer" + }, + "buildCacheUsage": { "type": "integer" }, "composeCount": { @@ -22608,6 +22826,12 @@ "containerCount": { "type": "integer" }, + "containerReclaimable": { + "type": "integer" + }, + "containerUsage": { + "type": "integer" + }, "created": { "type": "integer" }, @@ -22620,7 +22844,10 @@ "imageCount": { "type": "integer" }, - "imageSize": { + "imageReclaimable": { + "type": "integer" + }, + "imageUsage": { "type": "integer" }, "networkCount": { @@ -22643,6 +22870,12 @@ }, "volumeCount": { "type": "integer" + }, + "volumeReclaimable": { + "type": "integer" + }, + "volumeUsage": { + "type": "integer" } }, "type": "object" @@ -22780,6 +23013,12 @@ "minimum": 0, "type": "integer" }, + "scopes": { + "items": { + "type": "string" + }, + "type": "array" + }, "script": { "type": "string" }, @@ -23235,6 +23474,18 @@ "timeSinceUptime": { "type": "string" }, + "topCPUItems": { + "items": { + "$ref": "#/definitions/dto.Process" + }, + "type": "array" + }, + "topMemItems": { + "items": { + "$ref": "#/definitions/dto.Process" + }, + "type": "array" + }, "uptime": { "type": "integer" }, @@ -23766,9 +24017,15 @@ "isActive": { "type": "boolean" }, + "isBind": { + "type": "boolean" + }, "isExist": { "type": "boolean" }, + "isInit": { + "type": "boolean" + }, "name": { "type": "string" }, @@ -24277,6 +24534,9 @@ "properties": { "path": { "type": "string" + }, + "taskID": { + "type": "string" } }, "required": [ @@ -24387,6 +24647,9 @@ }, "tagName": { "type": "string" + }, + "taskID": { + "type": "string" } }, "required": [ @@ -24429,6 +24692,99 @@ ], "type": "object" }, + "dto.IptablesBatchOperate": { + "properties": { + "rules": { + "items": { + "$ref": "#/definitions/dto.IptablesRuleOp" + }, + "type": "array" + } + }, + "type": "object" + }, + "dto.IptablesOp": { + "properties": { + "name": { + "enum": [ + "1PANEL_INPUT", + "1PANEL_OUTPUT", + "1PANEL_BASIC" + ], + "type": "string" + }, + "operate": { + "enum": [ + "init-base", + "init-forward", + "init-advance", + "bind-base", + "unbind-base", + "bind", + "unbind" + ], + "type": "string" + } + }, + "required": [ + "name", + "operate" + ], + "type": "object" + }, + "dto.IptablesRuleOp": { + "properties": { + "chain": { + "enum": [ + "1PANEL_INPUT", + "1PANEL_OUTPUT" + ], + "type": "string" + }, + "description": { + "type": "string" + }, + "dstIP": { + "type": "string" + }, + "dstPort": { + "type": "integer" + }, + "id": { + "type": "integer" + }, + "operation": { + "enum": [ + "add", + "remove" + ], + "type": "string" + }, + "protocol": { + "type": "string" + }, + "srcIP": { + "type": "string" + }, + "srcPort": { + "type": "integer" + }, + "strategy": { + "enum": [ + "ACCEPT", + "DROP", + "REJECT" + ], + "type": "string" + } + }, + "required": [ + "chain", + "operation", + "strategy" + ], + "type": "object" + }, "dto.LoadRedisStatus": { "properties": { "name": { @@ -24601,7 +24957,10 @@ "endTime": { "type": "string" }, - "info": { + "io": { + "type": "string" + }, + "network": { "type": "string" }, "param": { @@ -25677,6 +26036,9 @@ "description": { "type": "string" }, + "id": { + "type": "integer" + }, "operation": { "enum": [ "add", @@ -25919,6 +26281,29 @@ ], "type": "object" }, + "dto.Process": { + "properties": { + "cmd": { + "type": "string" + }, + "memory": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "percent": { + "type": "number" + }, + "pid": { + "type": "integer" + }, + "user": { + "type": "string" + } + }, + "type": "object" + }, "dto.ProxyUpdate": { "properties": { "proxyDocker": { @@ -31638,6 +32023,9 @@ "pullImage": { "type": "boolean" }, + "rawCompose": { + "type": "string" + }, "restartPolicy": { "enum": [ "always", diff --git a/core/cmd/server/docs/x-log.json b/core/cmd/server/docs/x-log.json index 0ec143f0c..f96634380 100644 --- a/core/cmd/server/docs/x-log.json +++ b/core/cmd/server/docs/x-log.json @@ -616,13 +616,13 @@ }, "/containers/upgrade": { "bodyKeys": [ - "name", + "names", "image" ], "paramKeys": [], "beforeFunctions": [], - "formatZH": "更新容器镜像[name][image]", - "formatEN": "upgradecontainerimage[name][image]" + "formatZH": "更新容器镜像[names][image]", + "formatEN": "upgradecontainerimage[names][image]" }, "/containers/volume": { "bodyKeys": [ @@ -1326,13 +1326,13 @@ }, "/cronjobs/records/clean": { "bodyKeys": [ - "id" + "cronjobID" ], "paramKeys": [], "beforeFunctions": [ { "input_column": "id", - "input_value": "id", + "input_value": "cronjobID", "isList": false, "db": "cronjobs", "output_column": "name", @@ -1941,14 +1941,31 @@ "formatZH": "卸载磁盘[device]从[mountPoint]", "formatEN": "Unmountdisk[device]from[mountPoint]" }, - "/hosts/firewall/forward": { + "/hosts/firewall/filter/operate": { "bodyKeys": [ - "source_port" + "operate" ], "paramKeys": [], "beforeFunctions": [], - "formatZH": "更新端口转发规则[source_port]", - "formatEN": "updateportforwardrules[source_port]" + "formatZH": "[operate]iptablesfilter防火墙", + "formatEN": "[operate]iptablesfilterfirewall" + }, + "/hosts/firewall/filter/rule/operate": { + "bodyKeys": [ + "operation", + "chain" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "[operation]filter规则到[chain]", + "formatEN": "[operation]filterruleto[chain]" + }, + "/hosts/firewall/forward": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新端口转发规则", + "formatEN": "updateportforwardrules" }, "/hosts/firewall/ip": { "bodyKeys": [