diff --git a/agent/app/api/v2/process.go b/agent/app/api/v2/process.go index a57de853a..d7190b717 100644 --- a/agent/app/api/v2/process.go +++ b/agent/app/api/v2/process.go @@ -40,7 +40,7 @@ func (b *BaseApi) StopProcess(c *gin.Context) { // @Tags Process // @Summary Get Process Info By PID // @Param pid path int true "PID" -// @Success 200 {object} websocket.PsProcessData +// @Success 200 // @Security ApiKeyAuth // @Security Timestamp // @Router /process/{pid} [get] diff --git a/agent/app/api/v2/ssh.go b/agent/app/api/v2/ssh.go index e0bfcb78b..a9c5bb5f5 100644 --- a/agent/app/api/v2/ssh.go +++ b/agent/app/api/v2/ssh.go @@ -53,7 +53,7 @@ func (b *BaseApi) OperateSSH(c *gin.Context) { // @Security ApiKeyAuth // @Security Timestamp // @Router /hosts/ssh/update [post] -// @x-panel-log {"bodyKeys":["key","value"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"修改 SSH 配置 [key] => [value]","formatEN":"update SSH setting [key] => [value]"} +// @x-panel-log {"bodyKeys":["key","newValue"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"修改 SSH 配置 [key] => [newValue]","formatEN":"update SSH setting [key] => [newValue]"} func (b *BaseApi) UpdateSSH(c *gin.Context) { var req dto.SSHUpdate if err := helper.CheckBindAndValidate(&req, c); err != nil { diff --git a/agent/app/api/v2/website.go b/agent/app/api/v2/website.go index 60cb593a6..f1a517199 100644 --- a/agent/app/api/v2/website.go +++ b/agent/app/api/v2/website.go @@ -1145,7 +1145,7 @@ func (b *BaseApi) ExecComposer(c *gin.Context) { // @Tags Website // @Summary Batch operate websites // @Accept json -// @Param request body request.BatchOpWebsite true "request" +// @Param request body request.BatchWebsiteOp true "request" // @Success 200 // @Security ApiKeyAuth // @Security Timestamp @@ -1165,7 +1165,7 @@ func (b *BaseApi) BatchOpWebsites(c *gin.Context) { // @Tags Website // @Summary Batch set website group // @Accept json -// @Param request body request.BatchSetGroupReq true "request" +// @Param request body request.BatchWebsiteGroup true "request" // @Success 200 // @Security ApiKeyAuth // @Security Timestamp diff --git a/core/cmd/server/docs/docs.go b/core/cmd/server/docs/docs.go index e6e6edeb5..9251149ab 100644 --- a/core/cmd/server/docs/docs.go +++ b/core/cmd/server/docs/docs.go @@ -4601,6 +4601,48 @@ const docTemplate = `{ } } }, + "/containers/template/batch": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ComposeTemplateBatch" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Bacth compose template", + "tags": [ + "Container Compose-template" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "batch import compose templates", + "formatZH": "批量导入编排模版", + "paramKeys": [] + } + } + }, "/containers/template/del": { "post": { "consumes": [ @@ -5539,6 +5581,68 @@ const docTemplate = `{ } } }, + "/core/commands/export": { + "post": { + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Export command", + "tags": [ + "Command" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "export quick commands", + "formatZH": "导出快速命令", + "paramKeys": [] + } + } + }, + "/core/commands/import": { + "post": { + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Import command", + "tags": [ + "Command" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "import quick commands", + "formatZH": "导入快速命令", + "paramKeys": [] + } + } + }, "/core/commands/search": { "post": { "consumes": [ @@ -6780,6 +6884,30 @@ const docTemplate = `{ } } }, + "/core/settings/by": { + "post": { + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Load system setting by key", + "tags": [ + "System Setting" + ] + } + }, "/core/settings/expired/handle": { "post": { "consumes": [ @@ -6852,6 +6980,37 @@ const docTemplate = `{ ] } }, + "/core/settings/menu/default": { + "post": { + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Default menu", + "tags": [ + "Menu Setting" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "Init menu.", + "formatZH": "初始化菜单", + "paramKeys": [] + } + } + }, "/core/settings/menu/update": { "post": { "consumes": [ @@ -8126,6 +8285,41 @@ const docTemplate = `{ } } }, + "/cronjobs/stop": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByID" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Handle stop job", + "tags": [ + "Cronjob" + ] + } + }, "/cronjobs/update": { "post": { "consumes": [ @@ -10646,6 +10840,76 @@ const docTemplate = `{ } } }, + "/files/convert": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileConvert" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Convert file", + "tags": [ + "File" + ] + } + }, + "/files/convert/log": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PageInfo" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Convert file", + "tags": [ + "File" + ] + } + }, "/files/decompress": { "post": { "consumes": [ @@ -12581,7 +12845,7 @@ const docTemplate = `{ "name": "request", "required": true, "schema": { - "$ref": "#/definitions/dto.CreateRootCert" + "$ref": "#/definitions/dto.RootCertOperate" } } ], @@ -12719,8 +12983,64 @@ const docTemplate = `{ } } }, - "/hosts/ssh/conf": { - "get": { + "/hosts/ssh/cert/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.RootCertOperate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update host SSH secret", + "tags": [ + "SSH" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "generate SSH secret", + "formatZH": "生成 SSH 密钥 ", + "paramKeys": [] + } + } + }, + "/hosts/ssh/file": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperationWithName" + } + } + ], "responses": { "200": { "description": "OK", @@ -12743,7 +13063,7 @@ const docTemplate = `{ ] } }, - "/hosts/ssh/conffile/update": { + "/hosts/ssh/file/update": { "post": { "consumes": [ "application/json" @@ -12778,9 +13098,11 @@ const docTemplate = `{ ], "x-panel-log": { "BeforeFunctions": [], - "bodyKeys": [], - "formatEN": "update SSH conf", - "formatZH": "修改 SSH 配置文件", + "bodyKeys": [ + "key" + ], + "formatEN": "update SSH conf [key]", + "formatZH": "修改 SSH 配置文件 [key]", "paramKeys": [] } } @@ -12966,10 +13288,10 @@ const docTemplate = `{ "BeforeFunctions": [], "bodyKeys": [ "key", - "value" + "newValue" ], - "formatEN": "update SSH setting [key] =\u003e [value]", - "formatZH": "修改 SSH 配置 [key] =\u003e [value]", + "formatEN": "update SSH setting [key] =\u003e [newValue]", + "formatZH": "修改 SSH 配置 [key] =\u003e [newValue]", "paramKeys": [] } } @@ -13103,44 +13425,6 @@ const docTemplate = `{ } } }, - "/hosts/tool/log": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.HostToolLogReq" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Get tool logs", - "tags": [ - "Host tool" - ] - } - }, "/hosts/tool/operate": { "post": { "consumes": [ @@ -13533,7 +13817,7 @@ const docTemplate = `{ "name": "request", "required": true, "schema": { - "$ref": "#/definitions/request.NginxOperateReq" + "$ref": "#/definitions/request.NginxDefaultHTTPSUpdate" } } ], @@ -13794,10 +14078,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/websocket.PsProcessData" - } + "description": "OK" } }, "security": [ @@ -17676,6 +17957,76 @@ const docTemplate = `{ ] } }, + "/websites/batch/group": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.BatchWebsiteGroup" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Batch set website group", + "tags": [ + "Website" + ] + } + }, + "/websites/batch/operate": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.BatchWebsiteOp" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Batch operate websites", + "tags": [ + "Website" + ] + } + }, "/websites/ca": { "post": { "consumes": [ @@ -18141,6 +18492,77 @@ const docTemplate = `{ } } }, + "/websites/cors/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.CorsConfigReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update CORS Config", + "tags": [ + "Website" + ] + } + }, + "/websites/cors/{id}": { + "get": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "id", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/request.CorsConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get CORS Config", + "tags": [ + "Website" + ] + } + }, "/websites/crosssite": { "post": { "consumes": [ @@ -20617,6 +21039,74 @@ const docTemplate = `{ } } }, + "/websites/ssl/upload/file": { + "post": { + "consumes": [ + "multipart/form-data" + ], + "parameters": [ + { + "description": "type", + "in": "formData", + "name": "type", + "required": true, + "type": "string" + }, + { + "description": "description", + "in": "formData", + "name": "description", + "type": "string" + }, + { + "description": "sslID", + "in": "formData", + "name": "sslID", + "type": "string" + }, + { + "description": "privateKeyFile", + "in": "formData", + "name": "privateKeyFile", + "required": true, + "type": "file" + }, + { + "description": "certificateFile", + "in": "formData", + "name": "certificateFile", + "required": true, + "type": "file" + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Upload SSL file", + "tags": [ + "Website SSL" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "type" + ], + "formatEN": "Upload ssl file [type]", + "formatZH": "上传 ssl 文件 [type]", + "paramKeys": [] + } + } + }, "/websites/ssl/website/:websiteId": { "get": { "consumes": [ @@ -21312,6 +21802,9 @@ const docTemplate = `{ }, "status": { "type": "string" + }, + "timeout": { + "type": "integer" } }, "type": "object" @@ -21405,6 +21898,9 @@ const docTemplate = `{ }, "spec": { "type": "string" + }, + "timeout": { + "type": "integer" } }, "type": "object" @@ -21719,6 +22215,20 @@ const docTemplate = `{ ], "type": "object" }, + "dto.ComposeTemplateBatch": { + "properties": { + "templates": { + "items": { + "$ref": "#/definitions/dto.ComposeTemplateCreate" + }, + "type": "array" + } + }, + "required": [ + "templates" + ], + "type": "object" + }, "dto.ComposeTemplateCreate": { "properties": { "content": { @@ -21878,9 +22388,6 @@ const docTemplate = `{ }, "type": "array" }, - "containerID": { - "type": "string" - }, "cpuShares": { "type": "integer" }, @@ -22168,41 +22675,6 @@ const docTemplate = `{ ], "type": "object" }, - "dto.CreateRootCert": { - "properties": { - "description": { - "type": "string" - }, - "encryptionMode": { - "enum": [ - "rsa", - "ed25519", - "ecdsa", - "dsa" - ], - "type": "string" - }, - "mode": { - "type": "string" - }, - "name": { - "type": "string" - }, - "passPhrase": { - "type": "string" - }, - "privateKey": { - "type": "string" - }, - "publicKey": { - "type": "string" - } - }, - "required": [ - "encryptionMode" - ], - "type": "object" - }, "dto.CronjobBatchDelete": { "properties": { "cleanData": { @@ -23378,6 +23850,9 @@ const docTemplate = `{ "rules": { "items": { "properties": { + "interface": { + "type": "string" + }, "num": { "type": "string" }, @@ -23816,7 +24291,10 @@ const docTemplate = `{ "dto.ImagePull": { "properties": { "imageName": { - "type": "string" + "items": { + "type": "string" + }, + "type": "array" }, "repoID": { "type": "integer" @@ -23927,13 +24405,16 @@ const docTemplate = `{ "sourceID": { "type": "string" }, - "targetName": { - "type": "string" + "tags": { + "items": { + "type": "string" + }, + "type": "array" } }, "required": [ "sourceID", - "targetName" + "tags" ], "type": "object" }, @@ -23972,6 +24453,9 @@ const docTemplate = `{ "en": { "type": "string" }, + "es-es": { + "type": "string" + }, "ja": { "type": "string" }, @@ -24031,7 +24515,8 @@ const docTemplate = `{ "ru", "ms", "pt-BR", - "tr" + "tr", + "es-ES" ], "type": "string" }, @@ -24145,6 +24630,9 @@ const docTemplate = `{ }, "dto.MonitorSetting": { "properties": { + "defaultIO": { + "type": "string" + }, "defaultNetwork": { "type": "string" }, @@ -24167,7 +24655,8 @@ const docTemplate = `{ "MonitorStatus", "MonitorStoreDays", "MonitorInterval", - "DefaultNetwork" + "DefaultNetwork", + "DefaultIO" ], "type": "string" }, @@ -24689,6 +25178,9 @@ const docTemplate = `{ "dto.NginxUpstreamServer": { "properties": { "failTimeout": { + "type": "integer" + }, + "failTimeoutUnit": { "type": "string" }, "flag": { @@ -24859,6 +25351,9 @@ const docTemplate = `{ "type": "integer" } }, + "required": [ + "id" + ], "type": "object" }, "dto.OperateByIDs": { @@ -25459,6 +25954,9 @@ const docTemplate = `{ }, "dto.QuickJump": { "properties": { + "alias": { + "type": "string" + }, "detail": { "type": "string" }, @@ -25741,6 +26239,44 @@ const docTemplate = `{ }, "type": "object" }, + "dto.RootCertOperate": { + "properties": { + "description": { + "type": "string" + }, + "encryptionMode": { + "enum": [ + "rsa", + "ed25519", + "ecdsa", + "dsa" + ], + "type": "string" + }, + "id": { + "type": "integer" + }, + "mode": { + "type": "string" + }, + "name": { + "type": "string" + }, + "passPhrase": { + "type": "string" + }, + "privateKey": { + "type": "string" + }, + "publicKey": { + "type": "string" + } + }, + "required": [ + "encryptionMode" + ], + "type": "object" + }, "dto.RuleSearch": { "properties": { "info": { @@ -25789,6 +26325,9 @@ const docTemplate = `{ ], "type": "string" }, + "localSSHConnShow": { + "type": "string" + }, "passPhrase": { "type": "string" }, @@ -26238,18 +26777,6 @@ const docTemplate = `{ }, "dto.SettingInfo": { "properties": { - "allowIPs": { - "type": "string" - }, - "apiInterfaceStatus": { - "type": "string" - }, - "apiKey": { - "type": "string" - }, - "apiKeyValidityTime": { - "type": "string" - }, "appStoreLastModified": { "type": "string" }, @@ -26259,97 +26786,49 @@ const docTemplate = `{ "appStoreVersion": { "type": "string" }, - "bindAddress": { + "defaultIO": { "type": "string" }, - "bindDomain": { + "defaultNetwork": { "type": "string" }, - "complexityVerification": { + "dockerSockPath": { "type": "string" }, - "developerMode": { + "fileRecycleBin": { "type": "string" }, - "expirationDays": { + "lastCleanData": { "type": "string" }, - "expirationTime": { + "lastCleanSize": { "type": "string" }, - "hideMenu": { + "lastCleanTime": { "type": "string" }, - "ipWhiteList": { + "localTime": { "type": "string" }, - "ipv6": { + "monitorInterval": { "type": "string" }, - "language": { + "monitorStatus": { "type": "string" }, - "menuTabs": { + "monitorStoreDays": { "type": "string" }, - "mfaInterval": { + "ntpSite": { "type": "string" }, - "mfaSecret": { - "type": "string" - }, - "mfaStatus": { - "type": "string" - }, - "noAuthSetting": { - "type": "string" - }, - "panelName": { - "type": "string" - }, - "port": { - "type": "string" - }, - "proxyPasswd": { - "type": "string" - }, - "proxyPasswdKeep": { - "type": "string" - }, - "proxyPort": { - "type": "string" - }, - "proxyType": { - "type": "string" - }, - "proxyUrl": { - "type": "string" - }, - "proxyUser": { - "type": "string" - }, - "securityEntrance": { - "type": "string" - }, - "serverPort": { - "type": "string" - }, - "sessionTimeout": { - "type": "string" - }, - "ssl": { - "type": "string" - }, - "sslType": { + "systemIP": { "type": "string" }, "systemVersion": { "type": "string" }, - "theme": { - "type": "string" - }, - "userName": { + "timeZone": { "type": "string" } }, @@ -26592,6 +27071,9 @@ const docTemplate = `{ "size": { "type": "integer" }, + "taskID": { + "type": "string" + }, "used": { "type": "string" } @@ -26832,6 +27314,9 @@ const docTemplate = `{ "mode": { "type": "string" }, + "shared": { + "type": "string" + }, "sourceDir": { "type": "string" }, @@ -27419,6 +27904,9 @@ const docTemplate = `{ "caId": { "type": "integer" }, + "certPath": { + "type": "string" + }, "certURL": { "type": "string" }, @@ -27482,6 +27970,9 @@ const docTemplate = `{ "privateKey": { "type": "string" }, + "privateKeyPath": { + "type": "string" + }, "provider": { "type": "string" }, @@ -27837,6 +28328,46 @@ const docTemplate = `{ ], "type": "object" }, + "request.BatchWebsiteGroup": { + "properties": { + "groupID": { + "type": "integer" + }, + "ids": { + "items": { + "type": "integer" + }, + "type": "array" + } + }, + "required": [ + "groupID", + "ids" + ], + "type": "object" + }, + "request.BatchWebsiteOp": { + "properties": { + "ids": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "operate": { + "type": "string" + }, + "taskID": { + "type": "string" + } + }, + "required": [ + "ids", + "operate", + "taskID" + ], + "type": "object" + }, "request.ChangeDatabase": { "properties": { "databaseID": { @@ -27854,6 +28385,58 @@ const docTemplate = `{ ], "type": "object" }, + "request.CorsConfig": { + "properties": { + "allowCredentials": { + "type": "boolean" + }, + "allowHeaders": { + "type": "string" + }, + "allowMethods": { + "type": "string" + }, + "allowOrigins": { + "type": "string" + }, + "cors": { + "type": "boolean" + }, + "preflight": { + "type": "boolean" + } + }, + "type": "object" + }, + "request.CorsConfigReq": { + "properties": { + "allowCredentials": { + "type": "boolean" + }, + "allowHeaders": { + "type": "string" + }, + "allowMethods": { + "type": "string" + }, + "allowOrigins": { + "type": "string" + }, + "cors": { + "type": "boolean" + }, + "preflight": { + "type": "boolean" + }, + "websiteID": { + "type": "integer" + } + }, + "required": [ + "websiteID" + ], + "type": "object" + }, "request.CrossSiteAccessOp": { "properties": { "operation": { @@ -28030,6 +28613,17 @@ const docTemplate = `{ }, "type": "object" }, + "request.ExtraHost": { + "properties": { + "hostname": { + "type": "string" + }, + "ip": { + "type": "string" + } + }, + "type": "object" + }, "request.FPMConfig": { "properties": { "id": { @@ -28131,6 +28725,36 @@ const docTemplate = `{ ], "type": "object" }, + "request.FileConvert": { + "properties": { + "extension": { + "type": "string" + }, + "inputFile": { + "type": "string" + }, + "outputFormat": { + "type": "string" + }, + "path": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "extension", + "inputFile", + "outputFormat", + "path", + "type" + ], + "type": "object" + }, "request.FileCreate": { "properties": { "content": { @@ -28510,20 +29134,6 @@ const docTemplate = `{ ], "type": "object" }, - "request.HostToolLogReq": { - "properties": { - "type": { - "enum": [ - "supervisord" - ], - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object" - }, "request.HostToolReq": { "properties": { "operate": { @@ -28948,6 +29558,24 @@ const docTemplate = `{ ], "type": "object" }, + "request.NginxDefaultHTTPSUpdate": { + "properties": { + "operate": { + "enum": [ + "enable", + "disable" + ], + "type": "string" + }, + "sslRejectHandshake": { + "type": "boolean" + } + }, + "required": [ + "operate" + ], + "type": "object" + }, "request.NginxModuleUpdate": { "properties": { "enable": { @@ -28980,21 +29608,6 @@ const docTemplate = `{ ], "type": "object" }, - "request.NginxOperateReq": { - "properties": { - "operate": { - "enum": [ - "enable", - "disable" - ], - "type": "string" - } - }, - "required": [ - "operate" - ], - "type": "object" - }, "request.NginxPathAuthUpdate": { "properties": { "name": { @@ -29227,6 +29840,9 @@ const docTemplate = `{ "id": { "type": "integer" }, + "maxExecutionTime": { + "type": "string" + }, "params": { "additionalProperties": { "type": "string" @@ -29263,6 +29879,12 @@ const docTemplate = `{ }, "type": "array" }, + "extraHosts": { + "items": { + "$ref": "#/definitions/request.ExtraHost" + }, + "type": "array" + }, "id": { "type": "integer" }, @@ -29403,6 +30025,9 @@ const docTemplate = `{ "dir": { "type": "string" }, + "environment": { + "type": "string" + }, "id": { "type": "integer" }, @@ -29537,6 +30162,12 @@ const docTemplate = `{ }, "type": "array" }, + "extraHosts": { + "items": { + "$ref": "#/definitions/request.ExtraHost" + }, + "type": "array" + }, "image": { "type": "string" }, @@ -29654,6 +30285,12 @@ const docTemplate = `{ }, "type": "array" }, + "extraHosts": { + "items": { + "$ref": "#/definitions/request.ExtraHost" + }, + "type": "array" + }, "id": { "type": "integer" }, @@ -29724,6 +30361,9 @@ const docTemplate = `{ "dir": { "type": "string" }, + "environment": { + "type": "string" + }, "name": { "type": "string" }, @@ -30114,6 +30754,9 @@ const docTemplate = `{ "deleteBackup": { "type": "boolean" }, + "deleteDB": { + "type": "boolean" + }, "forceDelete": { "type": "boolean" }, @@ -30484,6 +31127,18 @@ const docTemplate = `{ }, "request.WebsiteProxyConfig": { "properties": { + "allowCredentials": { + "type": "boolean" + }, + "allowHeaders": { + "type": "string" + }, + "allowMethods": { + "type": "string" + }, + "allowOrigins": { + "type": "string" + }, "cache": { "type": "boolean" }, @@ -30496,6 +31151,9 @@ const docTemplate = `{ "content": { "type": "string" }, + "cors": { + "type": "boolean" + }, "enable": { "type": "boolean" }, @@ -30517,6 +31175,9 @@ const docTemplate = `{ "operate": { "type": "string" }, + "preflight": { + "type": "boolean" + }, "proxyHost": { "type": "string" }, @@ -30698,6 +31359,20 @@ const docTemplate = `{ "domain": { "type": "string" }, + "order": { + "enum": [ + "null", + "ascending", + "descending" + ], + "type": "string" + }, + "orderBy": { + "enum": [ + "expire_date" + ], + "type": "string" + }, "page": { "type": "integer" }, @@ -30706,6 +31381,8 @@ const docTemplate = `{ } }, "required": [ + "order", + "orderBy", "page", "pageSize" ], @@ -31890,6 +32567,9 @@ const docTemplate = `{ "properties": { "https": { "type": "boolean" + }, + "sslRejectHandshake": { + "type": "boolean" } }, "type": "object" @@ -32082,6 +32762,9 @@ const docTemplate = `{ }, "type": "array" }, + "maxExecutionTime": { + "type": "string" + }, "params": { "additionalProperties": { "type": "string" @@ -32195,6 +32878,12 @@ const docTemplate = `{ }, "type": "array" }, + "extraHosts": { + "items": { + "$ref": "#/definitions/request.ExtraHost" + }, + "type": "array" + }, "id": { "type": "integer" }, @@ -32258,6 +32947,9 @@ const docTemplate = `{ "dir": { "type": "string" }, + "environment": { + "type": "string" + }, "msg": { "type": "string" }, @@ -32739,6 +33431,9 @@ const docTemplate = `{ "caId": { "type": "integer" }, + "certPath": { + "type": "string" + }, "certURL": { "type": "string" }, @@ -32805,6 +33500,9 @@ const docTemplate = `{ "privateKey": { "type": "string" }, + "privateKeyPath": { + "type": "string" + }, "provider": { "type": "string" }, @@ -32840,115 +33538,6 @@ const docTemplate = `{ } }, "type": "object" - }, - "websocket.ProcessConnect": { - "properties": { - "PID": { - "type": "integer" - }, - "localaddr": { - "type": "object" - }, - "name": { - "type": "string" - }, - "remoteaddr": { - "type": "object" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "websocket.PsProcessData": { - "properties": { - "PID": { - "type": "integer" - }, - "PPID": { - "type": "integer" - }, - "cmdLine": { - "type": "string" - }, - "connects": { - "items": { - "$ref": "#/definitions/websocket.ProcessConnect" - }, - "type": "array" - }, - "cpuPercent": { - "type": "string" - }, - "cpuValue": { - "type": "number" - }, - "data": { - "type": "string" - }, - "diskRead": { - "type": "string" - }, - "diskWrite": { - "type": "string" - }, - "envs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "hwm": { - "type": "string" - }, - "locked": { - "type": "string" - }, - "name": { - "type": "string" - }, - "numConnections": { - "type": "integer" - }, - "numThreads": { - "type": "integer" - }, - "openFiles": { - "items": { - "type": "object" - }, - "type": "array" - }, - "rss": { - "type": "string" - }, - "rssValue": { - "type": "integer" - }, - "stack": { - "type": "string" - }, - "startTime": { - "type": "string" - }, - "status": { - "type": "string" - }, - "swap": { - "type": "string" - }, - "username": { - "type": "string" - }, - "vms": { - "type": "string" - } - }, - "type": "object" } } }` @@ -32968,4 +33557,4 @@ var SwaggerInfo = &swag.Spec{ func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) -} +} \ No newline at end of file diff --git a/core/cmd/server/docs/swagger.json b/core/cmd/server/docs/swagger.json index 2801522b3..4afc11970 100644 --- a/core/cmd/server/docs/swagger.json +++ b/core/cmd/server/docs/swagger.json @@ -4597,6 +4597,48 @@ } } }, + "/containers/template/batch": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ComposeTemplateBatch" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Bacth compose template", + "tags": [ + "Container Compose-template" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "batch import compose templates", + "formatZH": "批量导入编排模版", + "paramKeys": [] + } + } + }, "/containers/template/del": { "post": { "consumes": [ @@ -5535,6 +5577,68 @@ } } }, + "/core/commands/export": { + "post": { + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Export command", + "tags": [ + "Command" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "export quick commands", + "formatZH": "导出快速命令", + "paramKeys": [] + } + } + }, + "/core/commands/import": { + "post": { + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Import command", + "tags": [ + "Command" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "import quick commands", + "formatZH": "导入快速命令", + "paramKeys": [] + } + } + }, "/core/commands/search": { "post": { "consumes": [ @@ -6776,6 +6880,30 @@ } } }, + "/core/settings/by": { + "post": { + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Load system setting by key", + "tags": [ + "System Setting" + ] + } + }, "/core/settings/expired/handle": { "post": { "consumes": [ @@ -6848,6 +6976,37 @@ ] } }, + "/core/settings/menu/default": { + "post": { + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Default menu", + "tags": [ + "Menu Setting" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "Init menu.", + "formatZH": "初始化菜单", + "paramKeys": [] + } + } + }, "/core/settings/menu/update": { "post": { "consumes": [ @@ -8122,6 +8281,41 @@ } } }, + "/cronjobs/stop": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByID" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Handle stop job", + "tags": [ + "Cronjob" + ] + } + }, "/cronjobs/update": { "post": { "consumes": [ @@ -10642,6 +10836,76 @@ } } }, + "/files/convert": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileConvert" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Convert file", + "tags": [ + "File" + ] + } + }, + "/files/convert/log": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PageInfo" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Convert file", + "tags": [ + "File" + ] + } + }, "/files/decompress": { "post": { "consumes": [ @@ -12577,7 +12841,7 @@ "name": "request", "required": true, "schema": { - "$ref": "#/definitions/dto.CreateRootCert" + "$ref": "#/definitions/dto.RootCertOperate" } } ], @@ -12715,8 +12979,64 @@ } } }, - "/hosts/ssh/conf": { - "get": { + "/hosts/ssh/cert/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.RootCertOperate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update host SSH secret", + "tags": [ + "SSH" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "generate SSH secret", + "formatZH": "生成 SSH 密钥 ", + "paramKeys": [] + } + } + }, + "/hosts/ssh/file": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperationWithName" + } + } + ], "responses": { "200": { "description": "OK", @@ -12739,7 +13059,7 @@ ] } }, - "/hosts/ssh/conffile/update": { + "/hosts/ssh/file/update": { "post": { "consumes": [ "application/json" @@ -12774,9 +13094,11 @@ ], "x-panel-log": { "BeforeFunctions": [], - "bodyKeys": [], - "formatEN": "update SSH conf", - "formatZH": "修改 SSH 配置文件", + "bodyKeys": [ + "key" + ], + "formatEN": "update SSH conf [key]", + "formatZH": "修改 SSH 配置文件 [key]", "paramKeys": [] } } @@ -12962,10 +13284,10 @@ "BeforeFunctions": [], "bodyKeys": [ "key", - "value" + "newValue" ], - "formatEN": "update SSH setting [key] =\u003e [value]", - "formatZH": "修改 SSH 配置 [key] =\u003e [value]", + "formatEN": "update SSH setting [key] =\u003e [newValue]", + "formatZH": "修改 SSH 配置 [key] =\u003e [newValue]", "paramKeys": [] } } @@ -13099,44 +13421,6 @@ } } }, - "/hosts/tool/log": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.HostToolLogReq" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Get tool logs", - "tags": [ - "Host tool" - ] - } - }, "/hosts/tool/operate": { "post": { "consumes": [ @@ -13529,7 +13813,7 @@ "name": "request", "required": true, "schema": { - "$ref": "#/definitions/request.NginxOperateReq" + "$ref": "#/definitions/request.NginxDefaultHTTPSUpdate" } } ], @@ -13790,10 +14074,7 @@ ], "responses": { "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/websocket.PsProcessData" - } + "description": "OK" } }, "security": [ @@ -17672,6 +17953,76 @@ ] } }, + "/websites/batch/group": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.BatchWebsiteGroup" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Batch set website group", + "tags": [ + "Website" + ] + } + }, + "/websites/batch/operate": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.BatchWebsiteOp" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Batch operate websites", + "tags": [ + "Website" + ] + } + }, "/websites/ca": { "post": { "consumes": [ @@ -18137,6 +18488,77 @@ } } }, + "/websites/cors/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.CorsConfigReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update CORS Config", + "tags": [ + "Website" + ] + } + }, + "/websites/cors/{id}": { + "get": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "id", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/request.CorsConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get CORS Config", + "tags": [ + "Website" + ] + } + }, "/websites/crosssite": { "post": { "consumes": [ @@ -20613,6 +21035,74 @@ } } }, + "/websites/ssl/upload/file": { + "post": { + "consumes": [ + "multipart/form-data" + ], + "parameters": [ + { + "description": "type", + "in": "formData", + "name": "type", + "required": true, + "type": "string" + }, + { + "description": "description", + "in": "formData", + "name": "description", + "type": "string" + }, + { + "description": "sslID", + "in": "formData", + "name": "sslID", + "type": "string" + }, + { + "description": "privateKeyFile", + "in": "formData", + "name": "privateKeyFile", + "required": true, + "type": "file" + }, + { + "description": "certificateFile", + "in": "formData", + "name": "certificateFile", + "required": true, + "type": "file" + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Upload SSL file", + "tags": [ + "Website SSL" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "type" + ], + "formatEN": "Upload ssl file [type]", + "formatZH": "上传 ssl 文件 [type]", + "paramKeys": [] + } + } + }, "/websites/ssl/website/:websiteId": { "get": { "consumes": [ @@ -21308,6 +21798,9 @@ }, "status": { "type": "string" + }, + "timeout": { + "type": "integer" } }, "type": "object" @@ -21401,6 +21894,9 @@ }, "spec": { "type": "string" + }, + "timeout": { + "type": "integer" } }, "type": "object" @@ -21715,6 +22211,20 @@ ], "type": "object" }, + "dto.ComposeTemplateBatch": { + "properties": { + "templates": { + "items": { + "$ref": "#/definitions/dto.ComposeTemplateCreate" + }, + "type": "array" + } + }, + "required": [ + "templates" + ], + "type": "object" + }, "dto.ComposeTemplateCreate": { "properties": { "content": { @@ -21874,9 +22384,6 @@ }, "type": "array" }, - "containerID": { - "type": "string" - }, "cpuShares": { "type": "integer" }, @@ -22164,41 +22671,6 @@ ], "type": "object" }, - "dto.CreateRootCert": { - "properties": { - "description": { - "type": "string" - }, - "encryptionMode": { - "enum": [ - "rsa", - "ed25519", - "ecdsa", - "dsa" - ], - "type": "string" - }, - "mode": { - "type": "string" - }, - "name": { - "type": "string" - }, - "passPhrase": { - "type": "string" - }, - "privateKey": { - "type": "string" - }, - "publicKey": { - "type": "string" - } - }, - "required": [ - "encryptionMode" - ], - "type": "object" - }, "dto.CronjobBatchDelete": { "properties": { "cleanData": { @@ -23374,6 +23846,9 @@ "rules": { "items": { "properties": { + "interface": { + "type": "string" + }, "num": { "type": "string" }, @@ -23812,7 +24287,10 @@ "dto.ImagePull": { "properties": { "imageName": { - "type": "string" + "items": { + "type": "string" + }, + "type": "array" }, "repoID": { "type": "integer" @@ -23923,13 +24401,16 @@ "sourceID": { "type": "string" }, - "targetName": { - "type": "string" + "tags": { + "items": { + "type": "string" + }, + "type": "array" } }, "required": [ "sourceID", - "targetName" + "tags" ], "type": "object" }, @@ -23968,6 +24449,9 @@ "en": { "type": "string" }, + "es-es": { + "type": "string" + }, "ja": { "type": "string" }, @@ -24027,7 +24511,8 @@ "ru", "ms", "pt-BR", - "tr" + "tr", + "es-ES" ], "type": "string" }, @@ -24141,6 +24626,9 @@ }, "dto.MonitorSetting": { "properties": { + "defaultIO": { + "type": "string" + }, "defaultNetwork": { "type": "string" }, @@ -24163,7 +24651,8 @@ "MonitorStatus", "MonitorStoreDays", "MonitorInterval", - "DefaultNetwork" + "DefaultNetwork", + "DefaultIO" ], "type": "string" }, @@ -24685,6 +25174,9 @@ "dto.NginxUpstreamServer": { "properties": { "failTimeout": { + "type": "integer" + }, + "failTimeoutUnit": { "type": "string" }, "flag": { @@ -24855,6 +25347,9 @@ "type": "integer" } }, + "required": [ + "id" + ], "type": "object" }, "dto.OperateByIDs": { @@ -25455,6 +25950,9 @@ }, "dto.QuickJump": { "properties": { + "alias": { + "type": "string" + }, "detail": { "type": "string" }, @@ -25737,6 +26235,44 @@ }, "type": "object" }, + "dto.RootCertOperate": { + "properties": { + "description": { + "type": "string" + }, + "encryptionMode": { + "enum": [ + "rsa", + "ed25519", + "ecdsa", + "dsa" + ], + "type": "string" + }, + "id": { + "type": "integer" + }, + "mode": { + "type": "string" + }, + "name": { + "type": "string" + }, + "passPhrase": { + "type": "string" + }, + "privateKey": { + "type": "string" + }, + "publicKey": { + "type": "string" + } + }, + "required": [ + "encryptionMode" + ], + "type": "object" + }, "dto.RuleSearch": { "properties": { "info": { @@ -25785,6 +26321,9 @@ ], "type": "string" }, + "localSSHConnShow": { + "type": "string" + }, "passPhrase": { "type": "string" }, @@ -26234,18 +26773,6 @@ }, "dto.SettingInfo": { "properties": { - "allowIPs": { - "type": "string" - }, - "apiInterfaceStatus": { - "type": "string" - }, - "apiKey": { - "type": "string" - }, - "apiKeyValidityTime": { - "type": "string" - }, "appStoreLastModified": { "type": "string" }, @@ -26255,97 +26782,49 @@ "appStoreVersion": { "type": "string" }, - "bindAddress": { + "defaultIO": { "type": "string" }, - "bindDomain": { + "defaultNetwork": { "type": "string" }, - "complexityVerification": { + "dockerSockPath": { "type": "string" }, - "developerMode": { + "fileRecycleBin": { "type": "string" }, - "expirationDays": { + "lastCleanData": { "type": "string" }, - "expirationTime": { + "lastCleanSize": { "type": "string" }, - "hideMenu": { + "lastCleanTime": { "type": "string" }, - "ipWhiteList": { + "localTime": { "type": "string" }, - "ipv6": { + "monitorInterval": { "type": "string" }, - "language": { + "monitorStatus": { "type": "string" }, - "menuTabs": { + "monitorStoreDays": { "type": "string" }, - "mfaInterval": { + "ntpSite": { "type": "string" }, - "mfaSecret": { - "type": "string" - }, - "mfaStatus": { - "type": "string" - }, - "noAuthSetting": { - "type": "string" - }, - "panelName": { - "type": "string" - }, - "port": { - "type": "string" - }, - "proxyPasswd": { - "type": "string" - }, - "proxyPasswdKeep": { - "type": "string" - }, - "proxyPort": { - "type": "string" - }, - "proxyType": { - "type": "string" - }, - "proxyUrl": { - "type": "string" - }, - "proxyUser": { - "type": "string" - }, - "securityEntrance": { - "type": "string" - }, - "serverPort": { - "type": "string" - }, - "sessionTimeout": { - "type": "string" - }, - "ssl": { - "type": "string" - }, - "sslType": { + "systemIP": { "type": "string" }, "systemVersion": { "type": "string" }, - "theme": { - "type": "string" - }, - "userName": { + "timeZone": { "type": "string" } }, @@ -26588,6 +27067,9 @@ "size": { "type": "integer" }, + "taskID": { + "type": "string" + }, "used": { "type": "string" } @@ -26828,6 +27310,9 @@ "mode": { "type": "string" }, + "shared": { + "type": "string" + }, "sourceDir": { "type": "string" }, @@ -27415,6 +27900,9 @@ "caId": { "type": "integer" }, + "certPath": { + "type": "string" + }, "certURL": { "type": "string" }, @@ -27478,6 +27966,9 @@ "privateKey": { "type": "string" }, + "privateKeyPath": { + "type": "string" + }, "provider": { "type": "string" }, @@ -27833,6 +28324,46 @@ ], "type": "object" }, + "request.BatchWebsiteGroup": { + "properties": { + "groupID": { + "type": "integer" + }, + "ids": { + "items": { + "type": "integer" + }, + "type": "array" + } + }, + "required": [ + "groupID", + "ids" + ], + "type": "object" + }, + "request.BatchWebsiteOp": { + "properties": { + "ids": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "operate": { + "type": "string" + }, + "taskID": { + "type": "string" + } + }, + "required": [ + "ids", + "operate", + "taskID" + ], + "type": "object" + }, "request.ChangeDatabase": { "properties": { "databaseID": { @@ -27850,6 +28381,58 @@ ], "type": "object" }, + "request.CorsConfig": { + "properties": { + "allowCredentials": { + "type": "boolean" + }, + "allowHeaders": { + "type": "string" + }, + "allowMethods": { + "type": "string" + }, + "allowOrigins": { + "type": "string" + }, + "cors": { + "type": "boolean" + }, + "preflight": { + "type": "boolean" + } + }, + "type": "object" + }, + "request.CorsConfigReq": { + "properties": { + "allowCredentials": { + "type": "boolean" + }, + "allowHeaders": { + "type": "string" + }, + "allowMethods": { + "type": "string" + }, + "allowOrigins": { + "type": "string" + }, + "cors": { + "type": "boolean" + }, + "preflight": { + "type": "boolean" + }, + "websiteID": { + "type": "integer" + } + }, + "required": [ + "websiteID" + ], + "type": "object" + }, "request.CrossSiteAccessOp": { "properties": { "operation": { @@ -28026,6 +28609,17 @@ }, "type": "object" }, + "request.ExtraHost": { + "properties": { + "hostname": { + "type": "string" + }, + "ip": { + "type": "string" + } + }, + "type": "object" + }, "request.FPMConfig": { "properties": { "id": { @@ -28127,6 +28721,36 @@ ], "type": "object" }, + "request.FileConvert": { + "properties": { + "extension": { + "type": "string" + }, + "inputFile": { + "type": "string" + }, + "outputFormat": { + "type": "string" + }, + "path": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "extension", + "inputFile", + "outputFormat", + "path", + "type" + ], + "type": "object" + }, "request.FileCreate": { "properties": { "content": { @@ -28506,20 +29130,6 @@ ], "type": "object" }, - "request.HostToolLogReq": { - "properties": { - "type": { - "enum": [ - "supervisord" - ], - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object" - }, "request.HostToolReq": { "properties": { "operate": { @@ -28944,6 +29554,24 @@ ], "type": "object" }, + "request.NginxDefaultHTTPSUpdate": { + "properties": { + "operate": { + "enum": [ + "enable", + "disable" + ], + "type": "string" + }, + "sslRejectHandshake": { + "type": "boolean" + } + }, + "required": [ + "operate" + ], + "type": "object" + }, "request.NginxModuleUpdate": { "properties": { "enable": { @@ -28976,21 +29604,6 @@ ], "type": "object" }, - "request.NginxOperateReq": { - "properties": { - "operate": { - "enum": [ - "enable", - "disable" - ], - "type": "string" - } - }, - "required": [ - "operate" - ], - "type": "object" - }, "request.NginxPathAuthUpdate": { "properties": { "name": { @@ -29223,6 +29836,9 @@ "id": { "type": "integer" }, + "maxExecutionTime": { + "type": "string" + }, "params": { "additionalProperties": { "type": "string" @@ -29259,6 +29875,12 @@ }, "type": "array" }, + "extraHosts": { + "items": { + "$ref": "#/definitions/request.ExtraHost" + }, + "type": "array" + }, "id": { "type": "integer" }, @@ -29399,6 +30021,9 @@ "dir": { "type": "string" }, + "environment": { + "type": "string" + }, "id": { "type": "integer" }, @@ -29533,6 +30158,12 @@ }, "type": "array" }, + "extraHosts": { + "items": { + "$ref": "#/definitions/request.ExtraHost" + }, + "type": "array" + }, "image": { "type": "string" }, @@ -29650,6 +30281,12 @@ }, "type": "array" }, + "extraHosts": { + "items": { + "$ref": "#/definitions/request.ExtraHost" + }, + "type": "array" + }, "id": { "type": "integer" }, @@ -29720,6 +30357,9 @@ "dir": { "type": "string" }, + "environment": { + "type": "string" + }, "name": { "type": "string" }, @@ -30110,6 +30750,9 @@ "deleteBackup": { "type": "boolean" }, + "deleteDB": { + "type": "boolean" + }, "forceDelete": { "type": "boolean" }, @@ -30480,6 +31123,18 @@ }, "request.WebsiteProxyConfig": { "properties": { + "allowCredentials": { + "type": "boolean" + }, + "allowHeaders": { + "type": "string" + }, + "allowMethods": { + "type": "string" + }, + "allowOrigins": { + "type": "string" + }, "cache": { "type": "boolean" }, @@ -30492,6 +31147,9 @@ "content": { "type": "string" }, + "cors": { + "type": "boolean" + }, "enable": { "type": "boolean" }, @@ -30513,6 +31171,9 @@ "operate": { "type": "string" }, + "preflight": { + "type": "boolean" + }, "proxyHost": { "type": "string" }, @@ -30694,6 +31355,20 @@ "domain": { "type": "string" }, + "order": { + "enum": [ + "null", + "ascending", + "descending" + ], + "type": "string" + }, + "orderBy": { + "enum": [ + "expire_date" + ], + "type": "string" + }, "page": { "type": "integer" }, @@ -30702,6 +31377,8 @@ } }, "required": [ + "order", + "orderBy", "page", "pageSize" ], @@ -31886,6 +32563,9 @@ "properties": { "https": { "type": "boolean" + }, + "sslRejectHandshake": { + "type": "boolean" } }, "type": "object" @@ -32078,6 +32758,9 @@ }, "type": "array" }, + "maxExecutionTime": { + "type": "string" + }, "params": { "additionalProperties": { "type": "string" @@ -32191,6 +32874,12 @@ }, "type": "array" }, + "extraHosts": { + "items": { + "$ref": "#/definitions/request.ExtraHost" + }, + "type": "array" + }, "id": { "type": "integer" }, @@ -32254,6 +32943,9 @@ "dir": { "type": "string" }, + "environment": { + "type": "string" + }, "msg": { "type": "string" }, @@ -32735,6 +33427,9 @@ "caId": { "type": "integer" }, + "certPath": { + "type": "string" + }, "certURL": { "type": "string" }, @@ -32801,6 +33496,9 @@ "privateKey": { "type": "string" }, + "privateKeyPath": { + "type": "string" + }, "provider": { "type": "string" }, @@ -32836,115 +33534,6 @@ } }, "type": "object" - }, - "websocket.ProcessConnect": { - "properties": { - "PID": { - "type": "integer" - }, - "localaddr": { - "type": "object" - }, - "name": { - "type": "string" - }, - "remoteaddr": { - "type": "object" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "websocket.PsProcessData": { - "properties": { - "PID": { - "type": "integer" - }, - "PPID": { - "type": "integer" - }, - "cmdLine": { - "type": "string" - }, - "connects": { - "items": { - "$ref": "#/definitions/websocket.ProcessConnect" - }, - "type": "array" - }, - "cpuPercent": { - "type": "string" - }, - "cpuValue": { - "type": "number" - }, - "data": { - "type": "string" - }, - "diskRead": { - "type": "string" - }, - "diskWrite": { - "type": "string" - }, - "envs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "hwm": { - "type": "string" - }, - "locked": { - "type": "string" - }, - "name": { - "type": "string" - }, - "numConnections": { - "type": "integer" - }, - "numThreads": { - "type": "integer" - }, - "openFiles": { - "items": { - "type": "object" - }, - "type": "array" - }, - "rss": { - "type": "string" - }, - "rssValue": { - "type": "integer" - }, - "stack": { - "type": "string" - }, - "startTime": { - "type": "string" - }, - "status": { - "type": "string" - }, - "swap": { - "type": "string" - }, - "username": { - "type": "string" - }, - "vms": { - "type": "string" - } - }, - "type": "object" } } } \ No newline at end of file diff --git a/core/cmd/server/docs/swagger_test.go b/core/cmd/server/docs/swagger_test.go index 8e16e15d7..9f9225421 100644 --- a/core/cmd/server/docs/swagger_test.go +++ b/core/cmd/server/docs/swagger_test.go @@ -14,7 +14,7 @@ import ( ) func TestGenerateXlog(t *testing.T) { - workDir := "/usr/songliu/1Panel" + workDir := "/usr/songliu/dev-v2/1Panel" fset := token.NewFileSet() apiDirs := []string{workDir + "/agent/app/api/v2", workDir + "/core/app/api/v2", workDir + "/agent/xpack/app/api/v2", workDir + "/core/xpack/app/api/v2"} @@ -67,7 +67,7 @@ func TestGenerateXlog(t *testing.T) { } func TestGenerateSwaggerDoc(t *testing.T) { - workDir := "/usr/songliu/1Panel" + workDir := "/usr/songliu/dev-v2/1Panel" swagBin := "/root/go/bin/swag" cmd1 := exec.Command(swagBin, "init", "-o", workDir+"/core/cmd/server/docs/docs_agent", "-d", workDir+"/agent", "-g", "../agent/cmd/server/main.go") @@ -119,16 +119,14 @@ func TestGenerateSwaggerDoc(t *testing.T) { } for key, val := range coreSwagger.Paths { - if _, ok := newSwagger.Paths[key]; ok { - fmt.Printf("duplicate interfaces were found: %s \n", key) + if _, ok := newSwagger.Paths[key]; !ok { + newSwagger.Paths[key] = val } - newSwagger.Paths[key] = val } for key, val := range coreSwagger.Definitions { - if _, ok := newSwagger.Definitions[key]; ok { - fmt.Printf("duplicate definitions were found: %s \n", key) + if _, ok := newSwagger.Definitions[key]; !ok { + newSwagger.Definitions[key] = val } - newSwagger.Definitions[key] = val } newJson, err := json.MarshalIndent(newSwagger, "", "\t") diff --git a/core/cmd/server/docs/x-log.json b/core/cmd/server/docs/x-log.json index 28c75e5c3..0ec143f0c 100644 --- a/core/cmd/server/docs/x-log.json +++ b/core/cmd/server/docs/x-log.json @@ -1,49 +1,12 @@ { - "/agent/groups": { + "/ai/ollama/close": { "bodyKeys": [ - "name", - "type" + "name" ], "paramKeys": [], "beforeFunctions": [], - "formatZH": "创建组[name][type]", - "formatEN": "creategroup[name][type]" - }, - "/agent/groups/del": { - "bodyKeys": [ - "id" - ], - "paramKeys": [], - "beforeFunctions": [ - { - "input_column": "id", - "input_value": "id", - "isList": false, - "db": "groups", - "output_column": "name", - "output_value": "name" - }, - { - "input_column": "id", - "input_value": "id", - "isList": false, - "db": "groups", - "output_column": "type", - "output_value": "type" - } - ], - "formatZH": "删除组[type][name]", - "formatEN": "deletegroup[type][name]" - }, - "/agent/groups/update": { - "bodyKeys": [ - "name", - "type" - ], - "paramKeys": [], - "beforeFunctions": [], - "formatZH": "更新组[name][type]", - "formatEN": "updategroup[name][type]" + "formatZH": "关闭Ollama模型连接[name]", + "formatEN": "closeconnforOllamamodel[name]" }, "/ai/ollama/model": { "bodyKeys": [ @@ -54,15 +17,6 @@ "formatZH": "添加Ollama模型[name]", "formatEN": "addOllamamodel[name]" }, - "/ai/ollama/model/close": { - "bodyKeys": [ - "name" - ], - "paramKeys": [], - "beforeFunctions": [], - "formatZH": "关闭Ollama模型连接[name]", - "formatEN": "closeconnforOllamamodel[name]" - }, "/ai/ollama/model/del": { "bodyKeys": [ "ids" @@ -206,16 +160,6 @@ "formatZH": "应用商店同步", "formatEN": "Appstoresynchronization" }, - "/backup/record/download": { - "bodyKeys": [ - "source", - "fileName" - ], - "paramKeys": [], - "beforeFunctions": [], - "formatZH": "下载备份记录[source][fileName]", - "formatEN": "downloadbackuprecords[source][fileName]" - }, "/backups": { "bodyKeys": [ "type" @@ -254,6 +198,34 @@ "formatZH": "删除备份账号[types]", "formatEN": "deletebackupaccount[types]" }, + "/backups/record/del": { + "bodyKeys": [ + "ids" + ], + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "ids", + "isList": true, + "db": "backup_records", + "output_column": "file_name", + "output_value": "files" + } + ], + "formatZH": "删除备份记录[files]", + "formatEN": "deletebackuprecords[files]" + }, + "/backups/record/download": { + "bodyKeys": [ + "source", + "fileName" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "下载备份记录[source][fileName]", + "formatEN": "downloadbackuprecords[source][fileName]" + }, "/backups/recover": { "bodyKeys": [ "type", @@ -287,6 +259,15 @@ "formatZH": "更新备份账号[types]", "formatEN": "updatebackupaccount[types]" }, + "/backups/upload": { + "bodyKeys": [ + "filePath" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "上传备份文件[filePath]", + "formatEN": "uploadbackupfile[filePath]" + }, "/containers": { "bodyKeys": [ "name", @@ -537,21 +518,21 @@ }, "/containers/repo/del": { "bodyKeys": [ - "ids" + "id" ], "paramKeys": [], "beforeFunctions": [ { "input_column": "id", - "input_value": "ids", - "isList": true, + "input_value": "id", + "isList": false, "db": "image_repos", "output_column": "name", - "output_value": "names" + "output_value": "name" } ], - "formatZH": "删除镜像仓库[names]", - "formatEN": "deleteimagerepo[names]" + "formatZH": "删除镜像仓库[name]", + "formatEN": "deleteimagerepo[name]" }, "/containers/repo/update": { "bodyKeys": [ @@ -580,6 +561,13 @@ "formatZH": "创建compose模版[name]", "formatEN": "createcomposetemplate[name]" }, + "/containers/template/batch": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "批量导入编排模版", + "formatEN": "batchimportcomposetemplates" + }, "/containers/template/del": { "bodyKeys": [ "ids" @@ -709,6 +697,20 @@ "formatZH": "删除快捷命令[names]", "formatEN": "deletequickcommand[names]" }, + "/core/commands/export": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "导出快速命令", + "formatEN": "exportquickcommands" + }, + "/core/commands/import": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "导入快速命令", + "formatEN": "importquickcommands" + }, "/core/commands/update": { "bodyKeys": [ "name" @@ -879,6 +881,74 @@ "formatZH": "清空[logType]日志信息", "formatEN": "Cleanthe[logType]loginformation" }, + "/core/script": { + "bodyKeys": [ + "name" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "添加脚本库脚本[name]", + "formatEN": "addscript[name]" + }, + "/core/script/del": { + "bodyKeys": [ + "ids" + ], + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "ids", + "isList": true, + "db": "script_librarys", + "output_column": "name", + "output_value": "names" + } + ], + "formatZH": "删除脚本库脚本[names]", + "formatEN": "deletescript[names]" + }, + "/core/script/sync": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "同步脚本库脚本", + "formatEN": "syncscripts" + }, + "/core/script/update": { + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "id", + "isList": false, + "db": "cronjobs", + "output_column": "name", + "output_value": "name" + } + ], + "formatZH": "更新脚本库脚本[name]", + "formatEN": "updatescript[name]" + }, + "/core/settings/api/config/generate/key": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "生成API接口密钥", + "formatEN": "generateapikey" + }, + "/core/settings/api/config/update": { + "bodyKeys": [ + "ipWhiteList" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新API接口配置=\u003eIP白名单:[ipWhiteList]", + "formatEN": "updateapiconfig=\u003eIPWhiteList:[ipWhiteList]" + }, "/core/settings/bind/update": { "bodyKeys": [ "ipv6", @@ -896,6 +966,13 @@ "formatZH": "重置过期密码", "formatEN": "resetanexpiredPassword" }, + "/core/settings/menu/default": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "初始化菜单", + "formatEN": "Initmenu." + }, "/core/settings/menu/update": { "bodyKeys": [], "paramKeys": [], @@ -998,6 +1075,20 @@ "formatZH": "添加节点[name]", "formatEN": "addnode[name]" }, + "/core/xpack/nodes/backup": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "备份主节点数据", + "formatEN": "backupmasterdata" + }, + "/core/xpack/nodes/backup/update": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改主节点备份设置", + "formatEN": "updatemasterbackupsetting" + }, "/core/xpack/nodes/del": { "bodyKeys": [ "ids" @@ -1052,6 +1143,51 @@ "formatZH": "回滚节点[name]", "formatEN": "rollbacknode[name]" }, + "/core/xpack/nodes/simple": { + "bodyKeys": [ + "name" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "添加节点[name]", + "formatEN": "addnode[name]" + }, + "/core/xpack/nodes/simple/del": { + "bodyKeys": [ + "ids" + ], + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "ids", + "isList": true, + "db": "simple_nodes", + "output_column": "name", + "output_value": "names" + } + ], + "formatZH": "删除节点[names]", + "formatEN": "deletenode[names]" + }, + "/core/xpack/nodes/simple/update": { + "bodyKeys": [ + "name" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新[name]", + "formatEN": "updatenode[name]" + }, + "/core/xpack/nodes/simple/update/base": { + "bodyKeys": [ + "name" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新[name]基础信息", + "formatEN": "updatebaseinfofornode[name]" + }, "/core/xpack/nodes/sync": { "bodyKeys": [ "id" @@ -1079,6 +1215,15 @@ "formatZH": "更新[name]", "formatEN": "updatenode[name]" }, + "/core/xpack/nodes/update/base": { + "bodyKeys": [ + "name" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新[name]基础信息", + "formatEN": "updatebaseinfofornode[name]" + }, "/core/xpack/nodes/upgrade": { "bodyKeys": [ "id" @@ -1143,23 +1288,23 @@ "formatZH": "删除计划任务[names]", "formatEN": "deletecronjob[names]" }, - "/cronjobs/download": { + "/cronjobs/group/update": { "bodyKeys": [ - "recordID" + "id" ], "paramKeys": [], "beforeFunctions": [ { "input_column": "id", - "input_value": "recordID", + "input_value": "id", "isList": false, - "db": "job_records", - "output_column": "file", - "output_value": "file" + "db": "cronjobs", + "output_column": "name", + "output_value": "name" } ], - "formatZH": "下载计划任务记录[file]", - "formatEN": "downloadthecronjobrecord[file]" + "formatZH": "更新计划任务分组[name]", + "formatEN": "updatecronjobgroup[name]" }, "/cronjobs/handle": { "bodyKeys": [ @@ -1244,6 +1389,13 @@ "formatZH": "首页应用[key]=\u003e显示:[value]", "formatEN": "applauncher[key]=\u003eshow:[value]" }, + "/dashboard/quick/change": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "切换快速跳转", + "formatEN": "changequickjump" + }, "/databases": { "bodyKeys": [ "name" @@ -1712,12 +1864,82 @@ "formatZH": "下载url=\u003e[path]/[name]", "formatEN": "Downloadurl=\u003e[path]/[name]" }, - "/hosts/conffile/update": { - "bodyKeys": [], + "/groups": { + "bodyKeys": [ + "name", + "type" + ], "paramKeys": [], "beforeFunctions": [], - "formatZH": "修改SSH配置文件", - "formatEN": "updateSSHconf" + "formatZH": "创建组[name][type]", + "formatEN": "creategroup[name][type]" + }, + "/groups/del": { + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "id", + "isList": false, + "db": "groups", + "output_column": "name", + "output_value": "name" + }, + { + "input_column": "id", + "input_value": "id", + "isList": false, + "db": "groups", + "output_column": "type", + "output_value": "type" + } + ], + "formatZH": "删除组[type][name]", + "formatEN": "deletegroup[type][name]" + }, + "/groups/update": { + "bodyKeys": [ + "name", + "type" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新组[name][type]", + "formatEN": "updategroup[name][type]" + }, + "/hosts/disks/mount": { + "bodyKeys": [ + "device", + "mountPoint" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "挂载磁盘[device]到[mountPoint]", + "formatEN": "Mountdisk[device]to[mountPoint]" + }, + "/hosts/disks/partition": { + "bodyKeys": [ + "device", + "filesystem", + "mountPoint" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "对磁盘[device]进行分区,文件系统[filesystem],挂载点[mountPoint]", + "formatEN": "Partitiondisk[device]withfilesystem[filesystem],mountpoint[mountPoint]" + }, + "/hosts/disks/unmount": { + "bodyKeys": [ + "device", + "mountPoint" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "卸载磁盘[device]从[mountPoint]", + "formatEN": "Unmountdisk[device]from[mountPoint]" }, "/hosts/firewall/forward": { "bodyKeys": [ @@ -1774,13 +1996,43 @@ "formatZH": "修改默认监控网卡[name]-[value]", "formatEN": "updatedefaultmonitor[name]-[value]" }, - "/hosts/ssh/generate": { + "/hosts/ssh/cert": { "bodyKeys": [], "paramKeys": [], "beforeFunctions": [], "formatZH": "生成SSH密钥", "formatEN": "generateSSHsecret" }, + "/hosts/ssh/cert/delete": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "删除SSH密钥", + "formatEN": "deleteSSHsecret" + }, + "/hosts/ssh/cert/sync": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "同步SSH密钥", + "formatEN": "syncSSHsecret" + }, + "/hosts/ssh/cert/update": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "生成SSH密钥", + "formatEN": "generateSSHsecret" + }, + "/hosts/ssh/file/update": { + "bodyKeys": [ + "key" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改SSH配置文件[key]", + "formatEN": "updateSSHconf[key]" + }, "/hosts/ssh/operate": { "bodyKeys": [ "operation" @@ -1793,12 +2045,12 @@ "/hosts/ssh/update": { "bodyKeys": [ "key", - "value" + "newValue" ], "paramKeys": [], "beforeFunctions": [], - "formatZH": "修改SSH配置[key]=\u003e[value]", - "formatEN": "updateSSHsetting[key]=\u003e[value]" + "formatZH": "修改SSH配置[key]=\u003e[newValue]", + "formatEN": "updateSSHsetting[key]=\u003e[newValue]" }, "/hosts/tool/config": { "bodyKeys": [ @@ -1809,7 +2061,7 @@ "formatZH": "[operate]主机工具配置文件", "formatEN": "[operate]toolconfig" }, - "/hosts/tool/create": { + "/hosts/tool/init": { "bodyKeys": [ "type" ], @@ -1860,7 +2112,7 @@ "formatZH": "更新nginx配置", "formatEN": "Updatenginxconf" }, - "/openresty/module/update": { + "/openresty/modules/update": { "bodyKeys": [], "paramKeys": [], "beforeFunctions": [], @@ -1894,24 +2146,6 @@ "formatZH": "结束进程[PID]", "formatEN": "结束进程[PID]" }, - "/record/del": { - "bodyKeys": [ - "ids" - ], - "paramKeys": [], - "beforeFunctions": [ - { - "input_column": "id", - "input_value": "ids", - "isList": true, - "db": "backup_records", - "output_column": "file_name", - "output_value": "files" - } - ], - "formatZH": "删除备份记录[files]", - "formatEN": "deletebackuprecords[files]" - }, "/runtimes": { "bodyKeys": [ "name" @@ -1984,74 +2218,6 @@ "formatZH": "更新运行环境[name]", "formatEN": "Updateruntime[name]" }, - "/script": { - "bodyKeys": [ - "name" - ], - "paramKeys": [], - "beforeFunctions": [], - "formatZH": "添加脚本库脚本[name]", - "formatEN": "addscript[name]" - }, - "/script/del": { - "bodyKeys": [ - "ids" - ], - "paramKeys": [], - "beforeFunctions": [ - { - "input_column": "id", - "input_value": "ids", - "isList": true, - "db": "script_librarys", - "output_column": "name", - "output_value": "names" - } - ], - "formatZH": "删除脚本库脚本[names]", - "formatEN": "deletescript[names]" - }, - "/script/sync": { - "bodyKeys": [], - "paramKeys": [], - "beforeFunctions": [], - "formatZH": "同步脚本库脚本", - "formatEN": "syncscripts" - }, - "/script/update": { - "bodyKeys": [ - "id" - ], - "paramKeys": [], - "beforeFunctions": [ - { - "input_column": "id", - "input_value": "id", - "isList": false, - "db": "cronjobs", - "output_column": "name", - "output_value": "name" - } - ], - "formatZH": "更新脚本库脚本[name]", - "formatEN": "updatescript[name]" - }, - "/settings/api/config/generate/key": { - "bodyKeys": [], - "paramKeys": [], - "beforeFunctions": [], - "formatZH": "生成API接口密钥", - "formatEN": "generateapikey" - }, - "/settings/api/config/update": { - "bodyKeys": [ - "ipWhiteList" - ], - "paramKeys": [], - "beforeFunctions": [], - "formatZH": "更新API接口配置=\u003eIP白名单:[ipWhiteList]", - "formatEN": "updateapiconfig=\u003eIPWhiteList:[ipWhiteList]" - }, "/settings/snapshot": { "bodyKeys": [ "from", @@ -2127,7 +2293,7 @@ "formatZH": "从系统快照[name]恢复", "formatEN": "Recoverfromsystembackup[name]" }, - "/settings/snapshot/recrete": { + "/settings/snapshot/recreate": { "bodyKeys": [ "id" ], @@ -2800,6 +2966,24 @@ "formatZH": "php版本变更[domain]", "formatEN": "phpversionupdate[domain]" }, + "/websites/proxies/file": { + "bodyKeys": [ + "websiteID" + ], + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "websiteID", + "isList": false, + "db": "websites", + "output_column": "primary_domain", + "output_value": "domain" + } + ], + "formatZH": "更新反向代理文件[domain]", + "formatEN": "Nginxconfproxyfileupdate[domain]" + }, "/websites/proxies/update": { "bodyKeys": [ "id" @@ -2825,25 +3009,7 @@ "formatZH": "清理Openresty代理缓存", "formatEN": "Clearnginxproxycache" }, - "/websites/proxy/file": { - "bodyKeys": [ - "websiteID" - ], - "paramKeys": [], - "beforeFunctions": [ - { - "input_column": "id", - "input_value": "websiteID", - "isList": false, - "db": "websites", - "output_column": "primary_domain", - "output_value": "domain" - } - ], - "formatZH": "更新反向代理文件[domain]", - "formatEN": "Nginxconfproxyfileupdate[domain]" - }, - "/websites/realip": { + "/websites/realip/config": { "bodyKeys": [ "websiteID" ], @@ -3005,6 +3171,15 @@ "formatZH": "上传ssl[type]", "formatEN": "Uploadssl[type]" }, + "/websites/ssl/upload/file": { + "bodyKeys": [ + "type" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "上传ssl文件[type]", + "formatEN": "Uploadsslfile[type]" + }, "/websites/update": { "bodyKeys": [ "primaryDomain" @@ -3235,6 +3410,24 @@ "formatZH": "删除规则[scope]", "formatEN": "deleterule[scope]" }, + "/xpack/waf/rule/common/export": { + "bodyKeys": [ + "scope" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "导出规则[scope]", + "formatEN": "exportrule[scope]" + }, + "/xpack/waf/rule/common/import": { + "bodyKeys": [ + "scope" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "导入规则[scope]", + "formatEN": "importrule[scope]" + }, "/xpack/waf/rule/common/update": { "bodyKeys": [ "scope" @@ -3329,15 +3522,5 @@ "beforeFunctions": [], "formatZH": "更新网站地区访问限制", "formatEN": "updategeorestrict" - }, - "/xpack/xsetting/update/item": { - "bodyKeys": [ - "key", - "value" - ], - "paramKeys": [], - "beforeFunctions": [], - "formatZH": "更新界面设置[key]=\u003e[value]", - "formatEN": "updatesetting[key]=\u003e[value]" } } \ No newline at end of file