diff --git a/agent/app/api/v2/runtime.go b/agent/app/api/v2/runtime.go index a1ccda3b1..2b6d8468e 100644 --- a/agent/app/api/v2/runtime.go +++ b/agent/app/api/v2/runtime.go @@ -352,7 +352,7 @@ func (b *BaseApi) UpdatePHPConfig(c *gin.Context) { // @Summary Update php conf file // @Description 更新 php 配置文件 // @Accept json -// @Param request body request.WebsitePHPFileUpdate true "request" +// @Param request body request.PHPFileUpdate true "request" // @Success 200 // @Security ApiKeyAuth // @Router /runtimes/php/update [post] @@ -415,7 +415,7 @@ func (b *BaseApi) UpdateFPMConfig(c *gin.Context) { // @Description 获取 fpm 配置 // @Accept json // @Param id path integer true "request" -// @Success 200 {object} response.FPMConfig +// @Success 200 {object} request.FPMConfig // @Security ApiKeyAuth // @Router /runtimes/php/fpm/config/:id [get] func (b *BaseApi) GetFPMConfig(c *gin.Context) { @@ -437,7 +437,7 @@ func (b *BaseApi) GetFPMConfig(c *gin.Context) { // @Description 获取 supervisor 进程 // @Accept json // @Param id path integer true "request" -// @Success 200 {object} response.SupervisorProcess +// @Success 200 {object} response.SupervisorProcessConfig // @Security ApiKeyAuth // @Router /runtimes/supervisor/process/:id [get] func (b *BaseApi) GetSupervisorProcess(c *gin.Context) { diff --git a/agent/app/api/v2/snapshot.go b/agent/app/api/v2/snapshot.go index 1520cfffd..0ec84daaf 100644 --- a/agent/app/api/v2/snapshot.go +++ b/agent/app/api/v2/snapshot.go @@ -52,7 +52,7 @@ func (b *BaseApi) CreateSnapshot(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Router /settings/snapshot/recrete [post] -// @x-panel-log {"bodyKeys":["id"],"paramKeys":[],"BeforeFunctions":[{"input_column":"id","input_value":"id","isList":false,"db":"snapshots","output_column":"name","output_value":"name"}],"formatZH":"重试创建快照 [name]","formatEN":recrete the snapshot [name]"} +// @x-panel-log {"bodyKeys":["id"],"paramKeys":[],"BeforeFunctions":[{"input_column":"id","input_value":"id","isList":false,"db":"snapshots","output_column":"name","output_value":"name"}],"formatZH":"重试创建快照 [name]","formatEN":"recrete the snapshot [name]"} func (b *BaseApi) RecreateSnapshot(c *gin.Context) { var req dto.OperateByID 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 91cad041d..8960542e2 100644 --- a/agent/app/api/v2/website.go +++ b/agent/app/api/v2/website.go @@ -995,7 +995,7 @@ func (b *BaseApi) GetRealIPConfig(c *gin.Context) { // @Description 获取网站资源 // @Accept json // @Param id path int true "id" -// @Success 200 {object} response.WebsiteResource +// @Success 200 {object} response.Resource // @Security ApiKeyAuth // @Router /websites/resource/{id} [get] func (b *BaseApi) GetWebsiteResource(c *gin.Context) { @@ -1016,7 +1016,7 @@ func (b *BaseApi) GetWebsiteResource(c *gin.Context) { // @Summary Get databases // @Description 获取数据库列表 // @Accept json -// @Success 200 {object} response.WebsiteDatabase +// @Success 200 {object} response.Database // @Security ApiKeyAuth // @Router /websites/databases [get] func (b *BaseApi) GetWebsiteDatabase(c *gin.Context) { diff --git a/agent/app/service/cronjob_helper.go b/agent/app/service/cronjob_helper.go index c3a5183c0..bbb1a664c 100644 --- a/agent/app/service/cronjob_helper.go +++ b/agent/app/service/cronjob_helper.go @@ -100,6 +100,9 @@ func (u *CronjobService) handleShell(cronjob model.Cronjob, logPath string) erro scriptFile, _ := os.ReadFile(cronjob.Script) return cmd.ExecShell(logPath, 24*time.Hour, "docker", "exec", cronjob.ContainerName, command, "-c", strings.ReplaceAll(string(scriptFile), "\"", "\\\"")) } + if len(cronjob.Executor) == 0 { + cronjob.Executor = "bash" + } if cronjob.ScriptMode == "input" { fileItem := path.Join(global.CONF.System.BaseDir, "1panel", "task", "shell", cronjob.Name, cronjob.Name+".sh") _ = os.MkdirAll(path.Dir(fileItem), os.ModePerm) @@ -111,8 +114,14 @@ func (u *CronjobService) handleShell(cronjob model.Cronjob, logPath string) erro if _, err := shellFile.WriteString(cronjob.Script); err != nil { return err } + if len(cronjob.User) == 0 { + return cmd.ExecShell(logPath, 24*time.Hour, cronjob.Executor, fileItem) + } return cmd.ExecShell(logPath, 24*time.Hour, "sudo", "-u", cronjob.User, cronjob.Executor, fileItem) } + if len(cronjob.User) == 0 { + return cmd.ExecShell(logPath, 24*time.Hour, cronjob.Executor, cronjob.Script) + } return cmd.ExecShell(logPath, 24*time.Hour, "sudo", "-u", cronjob.User, cronjob.Executor, cronjob.Script) } diff --git a/cmd/server/docs/docs.go b/cmd/server/docs/docs.go index 6b8db46ef..858a4dfbd 100644 --- a/cmd/server/docs/docs.go +++ b/cmd/server/docs/docs.go @@ -311,6 +311,49 @@ const docTemplate = `{ ] } }, + "/apps/installed/config/update": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新应用配置", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.AppConfigUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update app config", + "tags": [ + "App" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "installID", + "webUI" + ], + "formatEN": "Application config update [installID]", + "formatZH": "应用配置更新 [installID]", + "paramKeys": [] + } + } + }, "/apps/installed/conninfo/:key": { "get": { "consumes": [ @@ -844,9 +887,45 @@ const docTemplate = `{ ] } }, - "/apps/sync": { + "/apps/store/config": { + "get": { + "description": "获取应用商店配置", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.AppstoreConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get appstore config", + "tags": [ + "App" + ] + } + }, + "/apps/store/update": { "post": { - "description": "同步应用列表", + "consumes": [ + "application/json" + ], + "description": "更新应用商店配置", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.AppstoreUpdate" + } + } + ], "responses": { "200": { "description": "OK" @@ -857,7 +936,26 @@ const docTemplate = `{ "ApiKeyAuth": [] } ], - "summary": "Sync app list", + "summary": "Update appstore config", + "tags": [ + "App" + ] + } + }, + "/apps/sync/local": { + "post": { + "description": "同步本地应用列表", + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Sync local app list", "tags": [ "App" ], @@ -870,6 +968,314 @@ const docTemplate = `{ } } }, + "/apps/sync/remote": { + "post": { + "description": "同步远程应用列表", + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Sync remote app list", + "tags": [ + "App" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "App store synchronization", + "formatZH": "应用商店同步", + "paramKeys": [] + } + } + }, + "/backup/backup": { + "post": { + "consumes": [ + "application/json" + ], + "description": "备份系统数据", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CommonBackup" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Backup system data", + "tags": [ + "Backup Account" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "type", + "name", + "detailName" + ], + "formatEN": "backup [type] data [name][detailName]", + "formatZH": "备份 [type] 数据 [name][detailName]", + "paramKeys": [] + } + } + }, + "/backup/record/download": { + "post": { + "consumes": [ + "application/json" + ], + "description": "下载备份记录", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.DownloadRecord" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Download backup record", + "tags": [ + "Backup Account" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "source", + "fileName" + ], + "formatEN": "download backup records [source][fileName]", + "formatZH": "下载备份记录 [source][fileName]", + "paramKeys": [] + } + } + }, + "/backup/record/search": { + "post": { + "consumes": [ + "application/json" + ], + "description": "获取备份记录列表分页", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.RecordSearch" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Page backup records", + "tags": [ + "Backup Account" + ] + } + }, + "/backup/record/search/bycronjob": { + "post": { + "consumes": [ + "application/json" + ], + "description": "通过计划任务获取备份记录列表分页", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.RecordSearchByCronjob" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Page backup records by cronjob", + "tags": [ + "Backup Account" + ] + } + }, + "/backup/recover": { + "post": { + "consumes": [ + "application/json" + ], + "description": "恢复系统数据", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CommonRecover" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Recover system data", + "tags": [ + "Backup Account" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "type", + "name", + "detailName", + "file" + ], + "formatEN": "recover [type] data [name][detailName] from [file]", + "formatZH": "从 [file] 恢复 [type] 数据 [name][detailName]", + "paramKeys": [] + } + } + }, + "/backup/recover/byupload": { + "post": { + "consumes": [ + "application/json" + ], + "description": "从上传恢复系统数据", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CommonRecover" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Recover system data by upload", + "tags": [ + "Backup Account" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "type", + "name", + "detailName", + "file" + ], + "formatEN": "recover [type] data [name][detailName] from [file]", + "formatZH": "从 [file] 恢复 [type] 数据 [name][detailName]", + "paramKeys": [] + } + } + }, + "/backup/search/files": { + "post": { + "consumes": [ + "application/json" + ], + "description": "获取备份账号内文件列表", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByID" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List files from backup accounts", + "tags": [ + "Backup Account" + ] + } + }, "/containers": { "post": { "consumes": [ @@ -955,6 +1361,39 @@ const docTemplate = `{ } } }, + "/containers/command": { + "post": { + "consumes": [ + "application/json" + ], + "description": "命令创建容器", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ContainerCreateByCommand" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Create container by command", + "tags": [ + "Container" + ] + } + }, "/containers/commit": { "post": { "consumes": [ @@ -2765,6 +3204,31 @@ const docTemplate = `{ ] } }, + "/containers/status": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取容器状态", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Load containers status", + "tags": [ + "Container" + ] + } + }, "/containers/template": { "get": { "description": "获取容器编排模版列表", @@ -3458,6 +3922,25 @@ const docTemplate = `{ } } }, + "/core/backup/local": { + "get": { + "description": "获取本地备份目录", + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "get local backup dir", + "tags": [ + "Backup Account" + ] + } + }, "/core/backup/onedrive": { "get": { "consumes": [ @@ -3483,6 +3966,34 @@ const docTemplate = `{ ] } }, + "/core/backup/options": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取备份账号选项", + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.BackupOption" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Load backup account options", + "tags": [ + "Backup Account" + ] + } + }, "/core/backup/refresh/onedrive": { "post": { "description": "刷新 OneDrive token", @@ -3503,7 +4014,7 @@ const docTemplate = `{ } }, "/core/backup/search": { - "get": { + "post": { "consumes": [ "application/json" ], @@ -3533,43 +4044,6 @@ const docTemplate = `{ "tags": [ "Backup Account" ] - }, - "post": { - "consumes": [ - "application/json" - ], - "description": "获取 bucket 列表", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.ForBuckets" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "List buckets", - "tags": [ - "Backup Account" - ] } }, "/core/backup/update": { @@ -3614,6 +4088,768 @@ const docTemplate = `{ } } }, + "/core/commands": { + "post": { + "consumes": [ + "application/json" + ], + "description": "创建快速命令", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CommandOperate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Create command", + "tags": [ + "Command" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "name", + "command" + ], + "formatEN": "create quick command [name][command]", + "formatZH": "创建快捷命令 [name][command]", + "paramKeys": [] + } + } + }, + "/core/commands/command": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取快速命令列表", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByType" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.CommandInfo" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List commands", + "tags": [ + "Command" + ] + } + }, + "/core/commands/del": { + "post": { + "consumes": [ + "application/json" + ], + "description": "删除快速命令", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByIDs" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Delete command", + "tags": [ + "Command" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "commands", + "input_column": "id", + "input_value": "ids", + "isList": true, + "output_column": "name", + "output_value": "names" + } + ], + "bodyKeys": [ + "ids" + ], + "formatEN": "delete quick command [names]", + "formatZH": "删除快捷命令 [names]", + "paramKeys": [] + } + } + }, + "/core/commands/search": { + "post": { + "consumes": [ + "application/json" + ], + "description": "获取快速命令列表分页", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SearchWithPage" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Page commands", + "tags": [ + "Command" + ] + } + }, + "/core/commands/tree": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取快速命令树", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByType" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "Array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Tree commands", + "tags": [ + "Command" + ] + } + }, + "/core/commands/update": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新快速命令", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CommandOperate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update command", + "tags": [ + "Command" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "update quick command [name]", + "formatZH": "更新快捷命令 [name]", + "paramKeys": [] + } + } + }, + "/core/groups": { + "post": { + "consumes": [ + "application/json" + ], + "description": "创建系统组", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.GroupCreate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Create group", + "tags": [ + "System Group" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "name", + "type" + ], + "formatEN": "create group [name][type]", + "formatZH": "创建组 [name][type]", + "paramKeys": [] + } + } + }, + "/core/groups/del": { + "post": { + "consumes": [ + "application/json" + ], + "description": "删除系统组", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByID" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Delete group", + "tags": [ + "System Group" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "groups", + "input_column": "id", + "input_value": "id", + "isList": false, + "output_column": "name", + "output_value": "name" + }, + { + "db": "groups", + "input_column": "id", + "input_value": "id", + "isList": false, + "output_column": "type", + "output_value": "type" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "delete group [type][name]", + "formatZH": "删除组 [type][name]", + "paramKeys": [] + } + } + }, + "/core/groups/search": { + "post": { + "consumes": [ + "application/json" + ], + "description": "查询系统组", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.GroupSearch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.OperateByType" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List groups", + "tags": [ + "System Group" + ] + } + }, + "/core/groups/update": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新系统组", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.GroupUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update group", + "tags": [ + "System Group" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "name", + "type" + ], + "formatEN": "update group [name][type]", + "formatZH": "更新组 [name][type]", + "paramKeys": [] + } + } + }, + "/core/hosts": { + "post": { + "consumes": [ + "application/json" + ], + "description": "创建主机", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.HostOperate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Create host", + "tags": [ + "Host" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "name", + "addr" + ], + "formatEN": "create host [name][addr]", + "formatZH": "创建主机 [name][addr]", + "paramKeys": [] + } + } + }, + "/core/hosts/del": { + "post": { + "consumes": [ + "application/json" + ], + "description": "删除主机", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByIDs" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Delete host", + "tags": [ + "Host" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "hosts", + "input_column": "id", + "input_value": "ids", + "isList": true, + "output_column": "addr", + "output_value": "addrs" + } + ], + "bodyKeys": [ + "ids" + ], + "formatEN": "delete host [addrs]", + "formatZH": "删除主机 [addrs]", + "paramKeys": [] + } + } + }, + "/core/hosts/search": { + "post": { + "consumes": [ + "application/json" + ], + "description": "获取主机列表分页", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SearchHostWithPage" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.HostTree" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Page host", + "tags": [ + "Host" + ] + } + }, + "/core/hosts/test/byid/:id": { + "post": { + "consumes": [ + "application/json" + ], + "description": "测试主机连接", + "parameters": [ + { + "description": "request", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "boolean" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Test host conn by host id", + "tags": [ + "Host" + ] + } + }, + "/core/hosts/test/byinfo": { + "post": { + "consumes": [ + "application/json" + ], + "description": "测试主机连接", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.HostConnTest" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Test host conn by info", + "tags": [ + "Host" + ] + } + }, + "/core/hosts/tree": { + "post": { + "consumes": [ + "application/json" + ], + "description": "加载主机树", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SearchForTree" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.HostTree" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Load host tree", + "tags": [ + "Host" + ] + } + }, + "/core/hosts/update": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新主机", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.HostOperate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update host", + "tags": [ + "Host" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "name", + "addr" + ], + "formatEN": "update host [name][addr]", + "formatZH": "更新主机信息 [name][addr]", + "paramKeys": [] + } + } + }, + "/core/hosts/update/group": { + "post": { + "consumes": [ + "application/json" + ], + "description": "切换分组", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ChangeHostGroup" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update host group", + "tags": [ + "Host" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "hosts", + "input_column": "id", + "input_value": "id", + "isList": false, + "output_column": "addr", + "output_value": "addr" + } + ], + "bodyKeys": [ + "id", + "group" + ], + "formatEN": "change host [addr] group =\u003e [group]", + "formatZH": "切换主机[addr]分组 =\u003e [group]", + "paramKeys": [] + } + } + }, "/core/logs/clean": { "post": { "consumes": [ @@ -4201,6 +5437,68 @@ const docTemplate = `{ } } }, + "/core/settings/terminal/search": { + "post": { + "description": "加载系统终端配置信息", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.TerminalInfo" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Load system terminal setting info", + "tags": [ + "System Setting" + ] + } + }, + "/core/settings/terminal/update": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新系统终端配置", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.TerminalInfo" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update system terminal setting", + "tags": [ + "System Setting" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "update system terminal setting", + "formatZH": "修改系统终端配置", + "paramKeys": [] + } + } + }, "/core/settings/update": { "post": { "consumes": [ @@ -4513,6 +5811,39 @@ const docTemplate = `{ } } }, + "/cronjobs/next": { + "post": { + "consumes": [ + "application/json" + ], + "description": "预览最近五次执行时间", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CronjobSpec" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Load cronjob spec time", + "tags": [ + "Cronjob" + ] + } + }, "/cronjobs/records/clean": { "post": { "consumes": [ @@ -4879,6 +6210,28 @@ const docTemplate = `{ ] } }, + "/dashboard/current/node": { + "get": { + "description": "获取节点实时数据", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.NodeCurrent" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Load dashboard current info for node", + "tags": [ + "Dashboard" + ] + } + }, "/dashboard/system/restart/:operation": { "post": { "consumes": [ @@ -7721,190 +9074,6 @@ const docTemplate = `{ } } }, - "/groups": { - "post": { - "consumes": [ - "application/json" - ], - "description": "创建系统组", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.GroupCreate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Create group", - "tags": [ - "System Group" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "type" - ], - "formatEN": "create group [name][type]", - "formatZH": "创建组 [name][type]", - "paramKeys": [] - } - } - }, - "/groups/del": { - "post": { - "consumes": [ - "application/json" - ], - "description": "删除系统组", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.OperateByID" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Delete group", - "tags": [ - "System Group" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "groups", - "input_column": "id", - "input_value": "id", - "isList": false, - "output_column": "name", - "output_value": "name" - }, - { - "db": "groups", - "input_column": "id", - "input_value": "id", - "isList": false, - "output_column": "type", - "output_value": "type" - } - ], - "bodyKeys": [ - "id" - ], - "formatEN": "delete group [type][name]", - "formatZH": "删除组 [type][name]", - "paramKeys": [] - } - } - }, - "/groups/search": { - "post": { - "consumes": [ - "application/json" - ], - "description": "查询系统组", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.GroupSearch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/dto.GroupInfo" - }, - "type": "array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "List groups", - "tags": [ - "System Group" - ] - } - }, - "/groups/update": { - "post": { - "consumes": [ - "application/json" - ], - "description": "更新系统组", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.GroupUpdate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Update group", - "tags": [ - "System Group" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "type" - ], - "formatEN": "update group [name][type]", - "formatZH": "更新组 [name][type]", - "paramKeys": [] - } - } - }, "/host/conffile/update": { "post": { "consumes": [ @@ -8473,467 +9642,6 @@ const docTemplate = `{ } } }, - "/hosts": { - "post": { - "consumes": [ - "application/json" - ], - "description": "创建主机", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.HostOperate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Create host", - "tags": [ - "Host" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "addr" - ], - "formatEN": "create host [name][addr]", - "formatZH": "创建主机 [name][addr]", - "paramKeys": [] - } - } - }, - "/hosts/command": { - "get": { - "description": "获取快速命令列表", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.CommandInfo" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "List commands", - "tags": [ - "Command" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "description": "创建快速命令", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.CommandOperate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Create command", - "tags": [ - "Command" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "command" - ], - "formatEN": "create quick command [name][command]", - "formatZH": "创建快捷命令 [name][command]", - "paramKeys": [] - } - } - }, - "/hosts/command/del": { - "post": { - "consumes": [ - "application/json" - ], - "description": "删除快速命令", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.BatchDeleteReq" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Delete command", - "tags": [ - "Command" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "commands", - "input_column": "id", - "input_value": "ids", - "isList": true, - "output_column": "name", - "output_value": "names" - } - ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete quick command [names]", - "formatZH": "删除快捷命令 [names]", - "paramKeys": [] - } - } - }, - "/hosts/command/redis": { - "get": { - "description": "获取 redis 快速命令列表", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "Array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "List redis commands", - "tags": [ - "Redis Command" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "description": "保存 Redis 快速命令", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.RedisCommand" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Save redis command", - "tags": [ - "Redis Command" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "command" - ], - "formatEN": "save quick command for redis [name][command]", - "formatZH": "保存 redis 快捷命令 [name][command]", - "paramKeys": [] - } - } - }, - "/hosts/command/redis/del": { - "post": { - "consumes": [ - "application/json" - ], - "description": "删除 redis 快速命令", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.BatchDeleteReq" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Delete redis command", - "tags": [ - "Redis Command" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "redis_commands", - "input_column": "id", - "input_value": "ids", - "isList": true, - "output_column": "name", - "output_value": "names" - } - ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete quick command of redis [names]", - "formatZH": "删除 redis 快捷命令 [names]", - "paramKeys": [] - } - } - }, - "/hosts/command/redis/search": { - "post": { - "consumes": [ - "application/json" - ], - "description": "获取 redis 快速命令列表分页", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SearchWithPage" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.PageResult" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Page redis commands", - "tags": [ - "Redis Command" - ] - } - }, - "/hosts/command/search": { - "post": { - "consumes": [ - "application/json" - ], - "description": "获取快速命令列表分页", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SearchWithPage" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.PageResult" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Page commands", - "tags": [ - "Command" - ] - } - }, - "/hosts/command/tree": { - "get": { - "consumes": [ - "application/json" - ], - "description": "获取快速命令树", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "Array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Tree commands", - "tags": [ - "Command" - ] - } - }, - "/hosts/command/update": { - "post": { - "consumes": [ - "application/json" - ], - "description": "更新快速命令", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.CommandOperate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Update command", - "tags": [ - "Command" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name" - ], - "formatEN": "update quick command [name]", - "formatZH": "更新快捷命令 [name]", - "paramKeys": [] - } - } - }, - "/hosts/del": { - "post": { - "consumes": [ - "application/json" - ], - "description": "删除主机", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.BatchDeleteReq" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Delete host", - "tags": [ - "Host" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "hosts", - "input_column": "id", - "input_value": "ids", - "isList": true, - "output_column": "addr", - "output_value": "addrs" - } - ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete host [addrs]", - "formatZH": "删除主机 [addrs]", - "paramKeys": [] - } - } - }, "/hosts/firewall/base": { "get": { "description": "获取防火墙基础信息", @@ -9412,96 +10120,12 @@ const docTemplate = `{ } } }, - "/hosts/search": { - "post": { + "/installed/delete/check/:id": { + "get": { "consumes": [ "application/json" ], - "description": "获取主机列表分页", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SearchHostWithPage" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/dto.HostTree" - }, - "type": "array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Page host", - "tags": [ - "Host" - ] - } - }, - "/hosts/test/byid/:id": { - "post": { - "consumes": [ - "application/json" - ], - "description": "测试主机连接", - "parameters": [ - { - "description": "request", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "boolean" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Test host conn by host id", - "tags": [ - "Host" - ] - } - }, - "/hosts/test/byinfo": { - "post": { - "consumes": [ - "application/json" - ], - "description": "测试主机连接", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.HostConnTest" - } - } - ], + "description": "删除运行环境校验", "responses": { "200": { "description": "OK" @@ -9512,146 +10136,12 @@ const docTemplate = `{ "ApiKeyAuth": [] } ], - "summary": "Test host conn by info", + "summary": "Delete runtime", "tags": [ - "Host" + "Website" ] } }, - "/hosts/tree": { - "post": { - "consumes": [ - "application/json" - ], - "description": "加载主机树", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SearchForTree" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/dto.HostTree" - }, - "type": "array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Load host tree", - "tags": [ - "Host" - ] - } - }, - "/hosts/update": { - "post": { - "consumes": [ - "application/json" - ], - "description": "更新主机", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.HostOperate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Update host", - "tags": [ - "Host" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "addr" - ], - "formatEN": "update host [name][addr]", - "formatZH": "更新主机信息 [name][addr]", - "paramKeys": [] - } - } - }, - "/hosts/update/group": { - "post": { - "consumes": [ - "application/json" - ], - "description": "切换分组", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.ChangeHostGroup" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Update host group", - "tags": [ - "Host" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "hosts", - "input_column": "id", - "input_value": "id", - "isList": false, - "output_column": "addr", - "output_value": "addr" - } - ], - "bodyKeys": [ - "id", - "group" - ], - "formatEN": "change host [addr] group =\u003e [group]", - "formatZH": "切换主机[addr]分组 =\u003e [group]", - "paramKeys": [] - } - } - }, "/logs/system": { "post": { "description": "获取系统日志", @@ -9748,6 +10238,46 @@ const docTemplate = `{ ] } }, + "/openresty/build": { + "post": { + "consumes": [ + "application/json" + ], + "description": "构建 OpenResty", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxBuildReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Build OpenResty", + "tags": [ + "OpenResty" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "Build OpenResty", + "formatZH": "构建 OpenResty", + "paramKeys": [] + } + } + }, "/openresty/clear": { "post": { "description": "清理 OpenResty 代理缓存", @@ -9814,6 +10344,71 @@ const docTemplate = `{ } } }, + "/openresty/module/update": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新 OpenResty 模块", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxModuleUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update OpenResty module", + "tags": [ + "OpenResty" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "Update OpenResty module", + "formatZH": "更新 OpenResty 模块", + "paramKeys": [] + } + } + }, + "/openresty/modules": { + "get": { + "description": "获取 OpenResty 模块", + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/response.NginxModule" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get OpenResty modules", + "tags": [ + "OpenResty" + ] + } + }, "/openresty/scope": { "post": { "consumes": [ @@ -9965,6 +10560,57 @@ const docTemplate = `{ } } }, + "/record/del": { + "post": { + "consumes": [ + "application/json" + ], + "description": "删除备份记录", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.BatchDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Delete backup record", + "tags": [ + "Backup Account" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "backup_records", + "input_column": "id", + "input_value": "ids", + "isList": true, + "output_column": "file_name", + "output_value": "files" + } + ], + "bodyKeys": [ + "ids" + ], + "formatEN": "delete backup records [files]", + "formatZH": "删除备份记录 [files]", + "paramKeys": [] + } + } + }, "/runtimes": { "post": { "consumes": [ @@ -10221,6 +10867,122 @@ const docTemplate = `{ } } }, + "/runtimes/php/:id/extensions": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取 PHP 运行环境扩展", + "parameters": [ + { + "description": "request", + "in": "path", + "name": "id", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get php runtime extension", + "tags": [ + "Runtime" + ] + } + }, + "/runtimes/php/config": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新运行环境 PHP 配置", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.PHPConfigUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update runtime php conf", + "tags": [ + "Runtime" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "websites", + "input_column": "id", + "input_value": "id", + "isList": false, + "output_column": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "[domain] PHP conf update", + "formatZH": "[domain] PHP 配置修改", + "paramKeys": [] + } + } + }, + "/runtimes/php/config/:id": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取 php 运行环境配置", + "parameters": [ + { + "description": "request", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.PHPConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Load php runtime conf", + "tags": [ + "Runtime" + ] + } + }, "/runtimes/php/extensions": { "post": { "consumes": [ @@ -10287,6 +11049,39 @@ const docTemplate = `{ ] } }, + "/runtimes/php/extensions/install": { + "post": { + "consumes": [ + "application/json" + ], + "description": "安装 PHP 扩展", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.PHPExtensionInstallReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Install php extension", + "tags": [ + "Runtime" + ] + } + }, "/runtimes/php/extensions/search": { "post": { "consumes": [ @@ -10326,6 +11121,39 @@ const docTemplate = `{ ] } }, + "/runtimes/php/extensions/uninstall": { + "post": { + "consumes": [ + "application/json" + ], + "description": "卸载 PHP 扩展", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.PHPExtensionInstallReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "UnInstall php extension", + "tags": [ + "Runtime" + ] + } + }, "/runtimes/php/extensions/update": { "post": { "consumes": [ @@ -10359,6 +11187,157 @@ const docTemplate = `{ ] } }, + "/runtimes/php/file": { + "post": { + "consumes": [ + "application/json" + ], + "description": "获取 php 配置文件", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.PHPFileReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get php conf file", + "tags": [ + "Runtime" + ] + } + }, + "/runtimes/php/fpm/config": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新 fpm 配置", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.FPMConfig" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update fpm config", + "tags": [ + "Runtime" + ] + } + }, + "/runtimes/php/fpm/config/:id": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取 fpm 配置", + "parameters": [ + { + "description": "request", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/request.FPMConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get fpm config", + "tags": [ + "Runtime" + ] + } + }, + "/runtimes/php/update": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新 php 配置文件", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.PHPFileUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update php conf file", + "tags": [ + "Runtime" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "websites", + "input_column": "id", + "input_value": "websiteId", + "isList": false, + "output_column": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "websiteId" + ], + "formatEN": "Nginx conf update [domain]", + "formatZH": "php 配置修改 [domain]", + "paramKeys": [] + } + } + }, "/runtimes/search": { "post": { "consumes": [ @@ -10392,6 +11371,106 @@ const docTemplate = `{ ] } }, + "/runtimes/supervisor/process/:id": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取 supervisor 进程", + "parameters": [ + { + "description": "request", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.SupervisorProcessConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get supervisor process", + "tags": [ + "Runtime" + ] + } + }, + "/runtimes/supervisor/process/file/operate": { + "post": { + "consumes": [ + "application/json" + ], + "description": "操作 supervisor 进程文件", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.PHPSupervisorProcessFileReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Operate supervisor process file", + "tags": [ + "Runtime" + ] + } + }, + "/runtimes/supervisor/process/operate": { + "post": { + "consumes": [ + "application/json" + ], + "description": "操作 supervisor 进程", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.PHPSupervisorProcessConfig" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Operate supervisor process", + "tags": [ + "Runtime" + ] + } + }, "/runtimes/sync": { "post": { "consumes": [ @@ -10456,339 +11535,6 @@ const docTemplate = `{ } } }, - "/settings/backup/backup": { - "post": { - "consumes": [ - "application/json" - ], - "description": "备份系统数据", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.CommonBackup" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Backup system data", - "tags": [ - "Backup Account" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "type", - "name", - "detailName" - ], - "formatEN": "backup [type] data [name][detailName]", - "formatZH": "备份 [type] 数据 [name][detailName]", - "paramKeys": [] - } - } - }, - "/settings/backup/record/del": { - "post": { - "consumes": [ - "application/json" - ], - "description": "删除备份记录", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.BatchDeleteReq" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Delete backup record", - "tags": [ - "Backup Account" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "backup_records", - "input_column": "id", - "input_value": "ids", - "isList": true, - "output_column": "file_name", - "output_value": "files" - } - ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete backup records [files]", - "formatZH": "删除备份记录 [files]", - "paramKeys": [] - } - } - }, - "/settings/backup/record/download": { - "post": { - "consumes": [ - "application/json" - ], - "description": "下载备份记录", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.DownloadRecord" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Download backup record", - "tags": [ - "Backup Account" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "source", - "fileName" - ], - "formatEN": "download backup records [source][fileName]", - "formatZH": "下载备份记录 [source][fileName]", - "paramKeys": [] - } - } - }, - "/settings/backup/record/search": { - "post": { - "consumes": [ - "application/json" - ], - "description": "获取备份记录列表分页", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.RecordSearch" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Page backup records", - "tags": [ - "Backup Account" - ] - } - }, - "/settings/backup/record/search/bycronjob": { - "post": { - "consumes": [ - "application/json" - ], - "description": "通过计划任务获取备份记录列表分页", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.RecordSearchByCronjob" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Page backup records by cronjob", - "tags": [ - "Backup Account" - ] - } - }, - "/settings/backup/recover": { - "post": { - "consumes": [ - "application/json" - ], - "description": "恢复系统数据", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.CommonRecover" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Recover system data", - "tags": [ - "Backup Account" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "type", - "name", - "detailName", - "file" - ], - "formatEN": "recover [type] data [name][detailName] from [file]", - "formatZH": "从 [file] 恢复 [type] 数据 [name][detailName]", - "paramKeys": [] - } - } - }, - "/settings/backup/recover/byupload": { - "post": { - "consumes": [ - "application/json" - ], - "description": "从上传恢复系统数据", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.CommonRecover" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Recover system data by upload", - "tags": [ - "Backup Account" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "type", - "name", - "detailName", - "file" - ], - "formatEN": "recover [type] data [name][detailName] from [file]", - "formatZH": "从 [file] 恢复 [type] 数据 [name][detailName]", - "paramKeys": [] - } - } - }, - "/settings/backup/search/files": { - "post": { - "consumes": [ - "application/json" - ], - "description": "获取备份账号内文件列表", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.BackupSearchFile" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "List files from backup accounts", - "tags": [ - "Backup Account" - ] - } - }, "/settings/basedir": { "get": { "description": "获取安装根目录", @@ -11041,6 +11787,25 @@ const docTemplate = `{ } } }, + "/settings/snapshot/load": { + "get": { + "description": "获取系统快照数据", + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Load system snapshot data", + "tags": [ + "System Setting" + ] + } + }, "/settings/snapshot/recover": { "post": { "consumes": [ @@ -11092,6 +11857,57 @@ const docTemplate = `{ } } }, + "/settings/snapshot/recrete": { + "post": { + "consumes": [ + "application/json" + ], + "description": "创建系统快照重试", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByID" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Recreate system snapshot", + "tags": [ + "System Setting" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "snapshots", + "input_column": "id", + "input_value": "id", + "isList": false, + "output_column": "name", + "output_value": "name" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "recrete the snapshot [name]", + "formatZH": "重试创建快照 [name]", + "paramKeys": [] + } + } + }, "/settings/snapshot/rollback": { "post": { "consumes": [ @@ -11179,12 +11995,12 @@ const docTemplate = `{ ] } }, - "/settings/snapshot/status": { + "/settings/snapshot/size": { "post": { "consumes": [ "application/json" ], - "description": "获取快照状态", + "description": "获取系统快照文件大小", "parameters": [ { "description": "request", @@ -11192,7 +12008,7 @@ const docTemplate = `{ "name": "request", "required": true, "schema": { - "$ref": "#/definitions/dto.OperateByID" + "$ref": "#/definitions/dto.SearchWithPage" } } ], @@ -11206,7 +12022,7 @@ const docTemplate = `{ "ApiKeyAuth": [] } ], - "summary": "Load Snapshot status", + "summary": "Load system snapshot size", "tags": [ "System Setting" ] @@ -12091,6 +12907,25 @@ const docTemplate = `{ } } }, + "/toolbox/device/users": { + "get": { + "description": "获取服务器用户列表", + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Load user list", + "tags": [ + "Device" + ] + } + }, "/toolbox/device/zone/options": { "get": { "consumes": [ @@ -13579,6 +14414,62 @@ const docTemplate = `{ } } }, + "/websites/databases": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取数据库列表", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Database" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get databases", + "tags": [ + "Website" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "description": "切换网站数据库", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.ChangeDatabase" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Change website database", + "tags": [ + "Website" + ] + } + }, "/websites/default/html/:type": { "get": { "consumes": [ @@ -14239,6 +15130,171 @@ const docTemplate = `{ } } }, + "/websites/lbs": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取网站 upstreams", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteCommonReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get website upstreams", + "tags": [ + "Website" + ] + } + }, + "/websites/lbs/create": { + "post": { + "consumes": [ + "application/json" + ], + "description": "创建网站 upstream", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteLBCreate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Create website upstream", + "tags": [ + "Website" + ] + } + }, + "/websites/lbs/delete": { + "post": { + "consumes": [ + "application/json" + ], + "description": "删除网站 upstream", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteLBDelete" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Delete website upstream", + "tags": [ + "Website" + ] + } + }, + "/websites/lbs/file": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新网站 upstream 文件", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteLBUpdateFile" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update website upstream file", + "tags": [ + "Website" + ] + } + }, + "/websites/lbs/update": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新网站 upstream", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteLBUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update website upstream", + "tags": [ + "Website" + ] + } + }, "/websites/leech": { "post": { "consumes": [ @@ -14489,7 +15545,7 @@ const docTemplate = `{ } }, "/websites/options": { - "get": { + "post": { "description": "获取网站列表", "responses": { "200": { @@ -14513,142 +15569,6 @@ const docTemplate = `{ ] } }, - "/websites/php/config": { - "post": { - "consumes": [ - "application/json" - ], - "description": "更新 网站 PHP 配置", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.WebsitePHPConfigUpdate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Update website php conf", - "tags": [ - "Website PHP" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "websites", - "input_column": "id", - "input_value": "id", - "isList": false, - "output_column": "primary_domain", - "output_value": "domain" - } - ], - "bodyKeys": [ - "id" - ], - "formatEN": "[domain] PHP conf update", - "formatZH": "[domain] PHP 配置修改", - "paramKeys": [] - } - } - }, - "/websites/php/config/:id": { - "get": { - "consumes": [ - "application/json" - ], - "description": "获取网站 php 配置", - "parameters": [ - { - "description": "request", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/response.PHPConfig" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Load website php conf", - "tags": [ - "Website" - ] - } - }, - "/websites/php/update": { - "post": { - "consumes": [ - "application/json" - ], - "description": "更新 php 配置文件", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.WebsitePHPFileUpdate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Update php conf", - "tags": [ - "Website PHP" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "websites", - "input_column": "id", - "input_value": "websiteId", - "isList": false, - "output_column": "primary_domain", - "output_value": "domain" - } - ], - "bodyKeys": [ - "websiteId" - ], - "formatEN": "Nginx conf update [domain]", - "formatZH": "php 配置修改 [domain]", - "paramKeys": [] - } - } - }, "/websites/php/version": { "post": { "consumes": [ @@ -14784,6 +15704,70 @@ const docTemplate = `{ } } }, + "/websites/proxy/config": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新网站反代缓存配置", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxProxyCacheUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "update website proxy cache config", + "tags": [ + "Website" + ] + } + }, + "/websites/proxy/config/{id}": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取网站反代缓存配置", + "parameters": [ + { + "description": "id", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.NginxProxyCache" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get website proxy cache config" + } + }, "/websites/proxy/file": { "post": { "consumes": [ @@ -14835,6 +15819,91 @@ const docTemplate = `{ } } }, + "/websites/realip": { + "post": { + "consumes": [ + "application/json" + ], + "description": "设置真实IP", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteRealIP" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Set Real IP", + "tags": [ + "Website" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "websites", + "input_column": "id", + "input_value": "websiteID", + "isList": false, + "output_column": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "websiteID" + ], + "formatEN": "Modify the real IP configuration of [domain] website", + "formatZH": "修改 [domain] 网站真实IP配置 ", + "paramKeys": [] + } + } + }, + "/websites/realip/config/{id}": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取真实 IP 配置", + "parameters": [ + { + "description": "id", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.WebsiteRealIP" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get Real IP Config", + "tags": [ + "Website" + ] + } + }, "/websites/redirect": { "post": { "consumes": [ @@ -14970,6 +16039,40 @@ const docTemplate = `{ } } }, + "/websites/resource/{id}": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取网站资源", + "parameters": [ + { + "description": "id", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Resource" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get website resource", + "tags": [ + "Website" + ] + } + }, "/websites/rewrite": { "post": { "consumes": [ @@ -15003,6 +16106,65 @@ const docTemplate = `{ ] } }, + "/websites/rewrite/custom": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取自定义重写模版列表", + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List custom rewrite", + "tags": [ + "Website" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "description": "编辑自定义重写模版", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.CustomRewriteOperate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Operate custom rewrite", + "tags": [ + "Website" + ] + } + }, "/websites/rewrite/update": { "post": { "consumes": [ @@ -15639,17 +16801,6 @@ const docTemplate = `{ }, "type": "object" }, - "dto.BackupSearchFile": { - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object" - }, "dto.BatchDelete": { "properties": { "force": { @@ -15760,21 +16911,6 @@ const docTemplate = `{ ], "type": "object" }, - "dto.ChangeHostGroup": { - "properties": { - "groupID": { - "type": "integer" - }, - "id": { - "type": "integer" - } - }, - "required": [ - "groupID", - "id" - ], - "type": "object" - }, "dto.ChangePasswd": { "properties": { "passwd": { @@ -15972,50 +17108,6 @@ const docTemplate = `{ }, "type": "object" }, - "dto.CommandInfo": { - "properties": { - "command": { - "type": "string" - }, - "groupBelong": { - "type": "string" - }, - "groupID": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "dto.CommandOperate": { - "properties": { - "command": { - "type": "string" - }, - "groupBelong": { - "type": "string" - }, - "groupID": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "name": { - "type": "string" - } - }, - "required": [ - "command", - "name" - ], - "type": "object" - }, "dto.CommonBackup": { "properties": { "detailName": { @@ -16027,6 +17119,9 @@ const docTemplate = `{ "secret": { "type": "string" }, + "taskID": { + "type": "string" + }, "type": { "enum": [ "app", @@ -16046,9 +17141,15 @@ const docTemplate = `{ }, "dto.CommonRecover": { "properties": { + "backupRecordID": { + "type": "integer" + }, "detailName": { "type": "string" }, + "downloadAccountID": { + "type": "integer" + }, "file": { "type": "string" }, @@ -16058,18 +17159,7 @@ const docTemplate = `{ "secret": { "type": "string" }, - "source": { - "enum": [ - "OSS", - "S3", - "SFTP", - "MINIO", - "LOCAL", - "COS", - "KODO", - "OneDrive", - "WebDAV" - ], + "taskID": { "type": "string" }, "type": { @@ -16085,7 +17175,7 @@ const docTemplate = `{ } }, "required": [ - "source", + "downloadAccountID", "type" ], "type": "object" @@ -16109,6 +17199,9 @@ const docTemplate = `{ "path": { "type": "string" }, + "taskID": { + "type": "string" + }, "template": { "type": "integer" } @@ -16241,6 +17334,17 @@ const docTemplate = `{ ], "type": "object" }, + "dto.ContainerCreateByCommand": { + "properties": { + "command": { + "type": "string" + }, + "taskID": { + "type": "string" + } + }, + "type": "object" + }, "dto.ContainerListStats": { "properties": { "containerID": { @@ -16290,6 +17394,15 @@ const docTemplate = `{ "cpuShares": { "type": "integer" }, + "dns": { + "items": { + "type": "string" + }, + "type": "array" + }, + "domainName": { + "type": "string" + }, "entrypoint": { "items": { "type": "string" @@ -16311,6 +17424,9 @@ const docTemplate = `{ "forcePull": { "type": "boolean" }, + "hostname": { + "type": "string" + }, "image": { "type": "string" }, @@ -16326,6 +17442,9 @@ const docTemplate = `{ }, "type": "array" }, + "macAddr": { + "type": "string" + }, "memory": { "type": "number" }, @@ -16350,14 +17469,23 @@ const docTemplate = `{ "restartPolicy": { "type": "string" }, + "taskID": { + "type": "string" + }, "tty": { "type": "boolean" }, + "user": { + "type": "string" + }, "volumes": { "items": { "$ref": "#/definitions/dto.VolumeHelper" }, "type": "array" + }, + "workingDir": { + "type": "string" } }, "required": [ @@ -16526,9 +17654,6 @@ const docTemplate = `{ "appID": { "type": "string" }, - "backupAccounts": { - "type": "string" - }, "command": { "type": "string" }, @@ -16541,12 +17666,18 @@ const docTemplate = `{ "dbType": { "type": "string" }, - "defaultDownload": { - "type": "string" + "downloadAccountID": { + "type": "integer" }, "exclusionRules": { "type": "string" }, + "executor": { + "type": "string" + }, + "isDir": { + "type": "boolean" + }, "name": { "type": "string" }, @@ -16557,21 +17688,33 @@ const docTemplate = `{ "script": { "type": "string" }, + "scriptMode": { + "type": "string" + }, "secret": { "type": "string" }, + "sourceAccountIDs": { + "type": "string" + }, "sourceDir": { "type": "string" }, "spec": { "type": "string" }, + "specCustom": { + "type": "boolean" + }, "type": { "type": "string" }, "url": { "type": "string" }, + "user": { + "type": "string" + }, "website": { "type": "string" } @@ -16598,14 +17741,22 @@ const docTemplate = `{ ], "type": "object" }, + "dto.CronjobSpec": { + "properties": { + "spec": { + "type": "string" + } + }, + "required": [ + "spec" + ], + "type": "object" + }, "dto.CronjobUpdate": { "properties": { "appID": { "type": "string" }, - "backupAccounts": { - "type": "string" - }, "command": { "type": "string" }, @@ -16618,15 +17769,21 @@ const docTemplate = `{ "dbType": { "type": "string" }, - "defaultDownload": { - "type": "string" + "downloadAccountID": { + "type": "integer" }, "exclusionRules": { "type": "string" }, + "executor": { + "type": "string" + }, "id": { "type": "integer" }, + "isDir": { + "type": "boolean" + }, "name": { "type": "string" }, @@ -16637,18 +17794,30 @@ const docTemplate = `{ "script": { "type": "string" }, + "scriptMode": { + "type": "string" + }, "secret": { "type": "string" }, + "sourceAccountIDs": { + "type": "string" + }, "sourceDir": { "type": "string" }, "spec": { "type": "string" }, + "specCustom": { + "type": "boolean" + }, "url": { "type": "string" }, + "user": { + "type": "string" + }, "website": { "type": "string" } @@ -16928,6 +18097,44 @@ const docTemplate = `{ }, "type": "object" }, + "dto.DataTree": { + "properties": { + "children": { + "items": { + "$ref": "#/definitions/dto.DataTree" + }, + "type": "array" + }, + "id": { + "type": "string" + }, + "isCheck": { + "type": "boolean" + }, + "isDisable": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "label": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "relationItemID": { + "type": "string" + }, + "size": { + "type": "integer" + } + }, + "type": "object" + }, "dto.DatabaseCreate": { "properties": { "address": { @@ -17291,31 +18498,20 @@ const docTemplate = `{ }, "dto.DownloadRecord": { "properties": { + "downloadAccountID": { + "type": "integer" + }, "fileDir": { "type": "string" }, "fileName": { "type": "string" - }, - "source": { - "enum": [ - "OSS", - "S3", - "SFTP", - "MINIO", - "LOCAL", - "COS", - "KODO", - "OneDrive", - "WebDAV" - ], - "type": "string" } }, "required": [ + "downloadAccountID", "fileDir", - "fileName", - "source" + "fileName" ], "type": "object" }, @@ -17629,109 +18825,6 @@ const docTemplate = `{ ], "type": "object" }, - "dto.GroupCreate": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "name", - "type" - ], - "type": "object" - }, - "dto.GroupInfo": { - "properties": { - "id": { - "type": "integer" - }, - "isDefault": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "dto.GroupSearch": { - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object" - }, - "dto.GroupUpdate": { - "properties": { - "id": { - "type": "integer" - }, - "isDefault": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object" - }, - "dto.HostConnTest": { - "properties": { - "addr": { - "type": "string" - }, - "authMode": { - "enum": [ - "password", - "key" - ], - "type": "string" - }, - "passPhrase": { - "type": "string" - }, - "password": { - "type": "string" - }, - "port": { - "maximum": 65535, - "minimum": 1, - "type": "integer" - }, - "privateKey": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "required": [ - "addr", - "port", - "user" - ], - "type": "object" - }, "dto.HostHelper": { "properties": { "host": { @@ -17743,75 +18836,6 @@ const docTemplate = `{ }, "type": "object" }, - "dto.HostOperate": { - "properties": { - "addr": { - "type": "string" - }, - "authMode": { - "enum": [ - "password", - "key" - ], - "type": "string" - }, - "description": { - "type": "string" - }, - "groupID": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "passPhrase": { - "type": "string" - }, - "password": { - "type": "string" - }, - "port": { - "maximum": 65535, - "minimum": 1, - "type": "integer" - }, - "privateKey": { - "type": "string" - }, - "rememberPassword": { - "type": "boolean" - }, - "user": { - "type": "string" - } - }, - "required": [ - "addr", - "port", - "user" - ], - "type": "object" - }, - "dto.HostTree": { - "properties": { - "children": { - "items": { - "$ref": "#/definitions/dto.TreeChild" - }, - "type": "array" - }, - "id": { - "type": "integer" - }, - "label": { - "type": "string" - } - }, - "type": "object" - }, "dto.ImageBuild": { "properties": { "dockerfile": { @@ -17828,6 +18852,9 @@ const docTemplate = `{ "type": "string" }, "type": "array" + }, + "taskID": { + "type": "string" } }, "required": [ @@ -17878,6 +18905,9 @@ const docTemplate = `{ }, "repoID": { "type": "integer" + }, + "taskID": { + "type": "string" } }, "required": [ @@ -17895,6 +18925,9 @@ const docTemplate = `{ }, "tagName": { "type": "string" + }, + "taskID": { + "type": "string" } }, "required": [ @@ -18536,6 +19569,79 @@ const docTemplate = `{ "ProxyCache" ] }, + "dto.NginxUpstreamServer": { + "properties": { + "failTimeout": { + "type": "string" + }, + "flag": { + "type": "string" + }, + "maxConns": { + "type": "integer" + }, + "maxFails": { + "type": "integer" + }, + "server": { + "type": "string" + }, + "weight": { + "type": "integer" + } + }, + "type": "object" + }, + "dto.NodeCurrent": { + "properties": { + "cpuTotal": { + "type": "integer" + }, + "cpuUsed": { + "type": "number" + }, + "cpuUsedPercent": { + "type": "number" + }, + "load1": { + "type": "number" + }, + "load15": { + "type": "number" + }, + "load5": { + "type": "number" + }, + "loadUsagePercent": { + "type": "number" + }, + "memoryAvailable": { + "type": "integer" + }, + "memoryTotal": { + "type": "integer" + }, + "memoryUsed": { + "type": "integer" + }, + "memoryUsedPercent": { + "type": "number" + }, + "swapMemoryAvailable": { + "type": "integer" + }, + "swapMemoryTotal": { + "type": "integer" + }, + "swapMemoryUsed": { + "type": "integer" + }, + "swapMemoryUsedPercent": { + "type": "number" + } + }, + "type": "object" + }, "dto.Operate": { "properties": { "operation": { @@ -18636,7 +19742,6 @@ const docTemplate = `{ "orderBy": { "enum": [ "name", - "state", "created_at" ], "type": "string" @@ -19025,20 +20130,6 @@ const docTemplate = `{ ], "type": "object" }, - "dto.RedisCommand": { - "properties": { - "command": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, "dto.RedisConf": { "properties": { "containerName": { @@ -19373,35 +20464,6 @@ const docTemplate = `{ ], "type": "object" }, - "dto.SearchForTree": { - "properties": { - "info": { - "type": "string" - } - }, - "type": "object" - }, - "dto.SearchHostWithPage": { - "properties": { - "groupID": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "page": { - "type": "integer" - }, - "pageSize": { - "type": "integer" - } - }, - "required": [ - "page", - "pageSize" - ], - "type": "object" - }, "dto.SearchRecord": { "properties": { "cronjobID": { @@ -19587,38 +20649,80 @@ const docTemplate = `{ }, "dto.SnapshotCreate": { "properties": { - "defaultDownload": { - "type": "string" + "appData": { + "items": { + "$ref": "#/definitions/dto.DataTree" + }, + "type": "array" + }, + "backupData": { + "items": { + "$ref": "#/definitions/dto.DataTree" + }, + "type": "array" }, "description": { "maxLength": 256, "type": "string" }, - "from": { - "type": "string" + "downloadAccountID": { + "type": "integer" }, "id": { "type": "integer" }, + "interruptStep": { + "type": "string" + }, + "name": { + "type": "string" + }, + "panelData": { + "items": { + "$ref": "#/definitions/dto.DataTree" + }, + "type": "array" + }, "secret": { "type": "string" + }, + "sourceAccountIDs": { + "type": "string" + }, + "taskID": { + "type": "string" + }, + "withLoginLog": { + "type": "boolean" + }, + "withMonitorData": { + "type": "boolean" + }, + "withOperationLog": { + "type": "boolean" + }, + "withSystemLog": { + "type": "boolean" + }, + "withTaskLog": { + "type": "boolean" } }, "required": [ - "defaultDownload", - "from" + "downloadAccountID", + "sourceAccountIDs" ], "type": "object" }, "dto.SnapshotImport": { "properties": { + "backupAccountID": { + "type": "integer" + }, "description": { "maxLength": 256, "type": "string" }, - "from": { - "type": "string" - }, "names": { "items": { "type": "string" @@ -19641,6 +20745,9 @@ const docTemplate = `{ }, "secret": { "type": "string" + }, + "taskID": { + "type": "string" } }, "required": [ @@ -19668,17 +20775,6 @@ const docTemplate = `{ ], "type": "object" }, - "dto.TreeChild": { - "properties": { - "id": { - "type": "integer" - }, - "label": { - "type": "string" - } - }, - "type": "object" - }, "dto.UpdateByFile": { "properties": { "file": { @@ -19863,6 +20959,9 @@ const docTemplate = `{ }, "model.App": { "properties": { + "architectures": { + "type": "string" + }, "createdAt": { "type": "string" }, @@ -19875,6 +20974,9 @@ const docTemplate = `{ "github": { "type": "string" }, + "gpuSupport": { + "type": "boolean" + }, "icon": { "type": "string" }, @@ -19890,6 +20992,9 @@ const docTemplate = `{ "limit": { "type": "integer" }, + "memoryRequired": { + "type": "integer" + }, "name": { "type": "string" }, @@ -19902,6 +21007,9 @@ const docTemplate = `{ "required": { "type": "string" }, + "requiredPanelVersion": { + "type": "number" + }, "resource": { "type": "string" }, @@ -19987,6 +21095,9 @@ const docTemplate = `{ }, "version": { "type": "string" + }, + "webUI": { + "type": "string" } }, "type": "object" @@ -20064,6 +21175,9 @@ const docTemplate = `{ "id": { "type": "integer" }, + "parentWebsiteID": { + "type": "integer" + }, "primaryDomain": { "type": "string" }, @@ -20294,6 +21408,20 @@ const docTemplate = `{ }, "type": "object" }, + "request.AppConfigUpdate": { + "properties": { + "installID": { + "type": "integer" + }, + "webUI": { + "type": "string" + } + }, + "required": [ + "installID" + ], + "type": "object" + }, "request.AppInstallCreate": { "properties": { "advanced": { @@ -20317,6 +21445,9 @@ const docTemplate = `{ "editCompose": { "type": "boolean" }, + "gpuConfig": { + "type": "boolean" + }, "hostMode": { "type": "boolean" }, @@ -20344,6 +21475,12 @@ const docTemplate = `{ }, "taskID": { "type": "string" + }, + "type": { + "type": "string" + }, + "webUI": { + "type": "string" } }, "required": [ @@ -20489,6 +21626,9 @@ const docTemplate = `{ "editCompose": { "type": "boolean" }, + "gpuConfig": { + "type": "boolean" + }, "hostMode": { "type": "boolean" }, @@ -20507,6 +21647,12 @@ const docTemplate = `{ }, "pullImage": { "type": "boolean" + }, + "type": { + "type": "string" + }, + "webUI": { + "type": "string" } }, "required": [ @@ -20532,6 +21678,9 @@ const docTemplate = `{ "resource": { "type": "string" }, + "showCurrentArch": { + "type": "boolean" + }, "tags": { "items": { "type": "string" @@ -20548,6 +21697,54 @@ const docTemplate = `{ ], "type": "object" }, + "request.AppstoreUpdate": { + "properties": { + "defaultDomain": { + "type": "string" + } + }, + "type": "object" + }, + "request.ChangeDatabase": { + "properties": { + "databaseID": { + "type": "integer" + }, + "databaseType": { + "type": "string" + }, + "websiteID": { + "type": "integer" + } + }, + "required": [ + "databaseID", + "databaseType", + "websiteID" + ], + "type": "object" + }, + "request.CustomRewriteOperate": { + "properties": { + "content": { + "type": "string" + }, + "name": { + "type": "string" + }, + "operate": { + "enum": [ + "create", + "delete" + ], + "type": "string" + } + }, + "required": [ + "operate" + ], + "type": "object" + }, "request.DirSizeReq": { "properties": { "path": { @@ -20559,6 +21756,17 @@ const docTemplate = `{ ], "type": "object" }, + "request.Environment": { + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, "request.ExposedPort": { "properties": { "containerPort": { @@ -20570,6 +21778,22 @@ const docTemplate = `{ }, "type": "object" }, + "request.FPMConfig": { + "properties": { + "id": { + "type": "integer" + }, + "params": { + "additionalProperties": true, + "type": "object" + } + }, + "required": [ + "id", + "params" + ], + "type": "object" + }, "request.FavoriteCreate": { "properties": { "path": { @@ -21068,6 +22292,9 @@ const docTemplate = `{ "editCompose": { "type": "boolean" }, + "gpuConfig": { + "type": "boolean" + }, "hostMode": { "type": "boolean" }, @@ -21086,6 +22313,12 @@ const docTemplate = `{ }, "pullImage": { "type": "boolean" + }, + "type": { + "type": "string" + }, + "webUI": { + "type": "string" } }, "type": "object" @@ -21171,6 +22404,21 @@ const docTemplate = `{ ], "type": "object" }, + "request.NginxBuildReq": { + "properties": { + "mirror": { + "type": "string" + }, + "taskID": { + "type": "string" + } + }, + "required": [ + "mirror", + "taskID" + ], + "type": "object" + }, "request.NginxCommonReq": { "properties": { "websiteID": { @@ -21219,6 +22467,38 @@ const docTemplate = `{ ], "type": "object" }, + "request.NginxModuleUpdate": { + "properties": { + "enable": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "operate": { + "enum": [ + "create", + "delete", + "update" + ], + "type": "string" + }, + "packages": { + "type": "string" + }, + "params": { + "type": "string" + }, + "script": { + "type": "string" + } + }, + "required": [ + "name", + "operate" + ], + "type": "object" + }, "request.NginxPathAuthUpdate": { "properties": { "name": { @@ -21249,6 +22529,44 @@ const docTemplate = `{ ], "type": "object" }, + "request.NginxProxyCacheUpdate": { + "properties": { + "cacheExpire": { + "type": "integer" + }, + "cacheExpireUnit": { + "type": "string" + }, + "cacheLimit": { + "type": "integer" + }, + "cacheLimitUnit": { + "type": "string" + }, + "open": { + "type": "boolean" + }, + "shareCache": { + "type": "integer" + }, + "shareCacheUnit": { + "type": "string" + }, + "websiteID": { + "type": "integer" + } + }, + "required": [ + "cacheExpire", + "cacheExpireUnit", + "cacheLimit", + "cacheLimitUnit", + "shareCache", + "shareCacheUnit", + "websiteID" + ], + "type": "object" + }, "request.NginxProxyUpdate": { "properties": { "content": { @@ -21402,6 +22720,54 @@ const docTemplate = `{ }, "type": "object" }, + "request.PHPConfigUpdate": { + "properties": { + "disableFunctions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "type": "integer" + }, + "params": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "scope": { + "type": "string" + }, + "uploadMaxSize": { + "type": "string" + } + }, + "required": [ + "id", + "scope" + ], + "type": "object" + }, + "request.PHPExtensionInstallReq": { + "properties": { + "ID": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "taskID": { + "type": "string" + } + }, + "required": [ + "ID", + "name" + ], + "type": "object" + }, "request.PHPExtensionsCreate": { "properties": { "extensions": { @@ -21461,6 +22827,105 @@ const docTemplate = `{ ], "type": "object" }, + "request.PHPFileReq": { + "properties": { + "id": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "required": [ + "id", + "type" + ], + "type": "object" + }, + "request.PHPFileUpdate": { + "properties": { + "content": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "required": [ + "content", + "id", + "type" + ], + "type": "object" + }, + "request.PHPSupervisorProcessConfig": { + "properties": { + "command": { + "type": "string" + }, + "dir": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "numprocs": { + "type": "string" + }, + "operate": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "request.PHPSupervisorProcessFileReq": { + "properties": { + "content": { + "type": "string" + }, + "file": { + "enum": [ + "out.log", + "err.log", + "config" + ], + "type": "string" + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "operate": { + "enum": [ + "get", + "clear", + "update" + ], + "type": "string" + } + }, + "required": [ + "file", + "id", + "name", + "operate" + ], + "type": "object" + }, "request.PortUpdate": { "properties": { "key": { @@ -21515,6 +22980,12 @@ const docTemplate = `{ "codeDir": { "type": "string" }, + "environments": { + "items": { + "$ref": "#/definitions/request.Environment" + }, + "type": "array" + }, "exposedPorts": { "items": { "$ref": "#/definitions/request.ExposedPort" @@ -21548,6 +23019,12 @@ const docTemplate = `{ }, "version": { "type": "string" + }, + "volumes": { + "items": { + "$ref": "#/definitions/request.Volume" + }, + "type": "array" } }, "type": "object" @@ -21606,6 +23083,12 @@ const docTemplate = `{ "codeDir": { "type": "string" }, + "environments": { + "items": { + "$ref": "#/definitions/request.Environment" + }, + "type": "array" + }, "exposedPorts": { "items": { "$ref": "#/definitions/request.ExposedPort" @@ -21639,6 +23122,12 @@ const docTemplate = `{ }, "version": { "type": "string" + }, + "volumes": { + "items": { + "$ref": "#/definitions/request.Volume" + }, + "type": "array" } }, "type": "object" @@ -21717,6 +23206,17 @@ const docTemplate = `{ ], "type": "object" }, + "request.Volume": { + "properties": { + "source": { + "type": "string" + }, + "target": { + "type": "string" + } + }, + "type": "object" + }, "request.WebsiteAcmeAccountCreate": { "properties": { "eabHmacKey": { @@ -21956,6 +23456,9 @@ const docTemplate = `{ "ftpUser": { "type": "string" }, + "parentWebsiteID": { + "type": "integer" + }, "port": { "type": "integer" }, @@ -22168,6 +23671,9 @@ const docTemplate = `{ "hsts": { "type": "boolean" }, + "http3": { + "type": "boolean" + }, "httpConfig": { "enum": [ "HTTPSOnly", @@ -22237,6 +23743,88 @@ const docTemplate = `{ }, "type": "object" }, + "request.WebsiteLBCreate": { + "properties": { + "algorithm": { + "type": "string" + }, + "name": { + "type": "string" + }, + "servers": { + "items": { + "$ref": "#/definitions/dto.NginxUpstreamServer" + }, + "type": "array" + }, + "websiteID": { + "type": "integer" + } + }, + "required": [ + "name", + "websiteID" + ], + "type": "object" + }, + "request.WebsiteLBDelete": { + "properties": { + "name": { + "type": "string" + }, + "websiteID": { + "type": "integer" + } + }, + "required": [ + "name", + "websiteID" + ], + "type": "object" + }, + "request.WebsiteLBUpdate": { + "properties": { + "algorithm": { + "type": "string" + }, + "name": { + "type": "string" + }, + "servers": { + "items": { + "$ref": "#/definitions/dto.NginxUpstreamServer" + }, + "type": "array" + }, + "websiteID": { + "type": "integer" + } + }, + "required": [ + "name", + "websiteID" + ], + "type": "object" + }, + "request.WebsiteLBUpdateFile": { + "properties": { + "content": { + "type": "string" + }, + "name": { + "type": "string" + }, + "websiteID": { + "type": "integer" + } + }, + "required": [ + "content", + "name", + "websiteID" + ], + "type": "object" + }, "request.WebsiteLogReq": { "properties": { "id": { @@ -22291,60 +23879,8 @@ const docTemplate = `{ ], "type": "object" }, - "request.WebsitePHPConfigUpdate": { - "properties": { - "disableFunctions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "integer" - }, - "params": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "scope": { - "type": "string" - }, - "uploadMaxSize": { - "type": "string" - } - }, - "required": [ - "id", - "scope" - ], - "type": "object" - }, - "request.WebsitePHPFileUpdate": { - "properties": { - "content": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "required": [ - "content", - "id", - "type" - ], - "type": "object" - }, "request.WebsitePHPVersionReq": { "properties": { - "retainConfig": { - "type": "boolean" - }, "runtimeID": { "type": "integer" }, @@ -22353,7 +23889,6 @@ const docTemplate = `{ } }, "required": [ - "runtimeID", "websiteID" ], "type": "object" @@ -22430,6 +23965,29 @@ const docTemplate = `{ ], "type": "object" }, + "request.WebsiteRealIP": { + "properties": { + "ipFrom": { + "type": "string" + }, + "ipHeader": { + "type": "string" + }, + "ipOther": { + "type": "string" + }, + "open": { + "type": "boolean" + }, + "websiteID": { + "type": "integer" + } + }, + "required": [ + "websiteID" + ], + "type": "object" + }, "request.WebsiteResourceReq": { "properties": { "id": { @@ -22744,6 +24302,9 @@ const docTemplate = `{ }, "response.AppDTO": { "properties": { + "architectures": { + "type": "string" + }, "createdAt": { "type": "string" }, @@ -22756,6 +24317,9 @@ const docTemplate = `{ "github": { "type": "string" }, + "gpuSupport": { + "type": "boolean" + }, "icon": { "type": "string" }, @@ -22774,6 +24338,9 @@ const docTemplate = `{ "limit": { "type": "integer" }, + "memoryRequired": { + "type": "integer" + }, "name": { "type": "string" }, @@ -22786,6 +24353,9 @@ const docTemplate = `{ "required": { "type": "string" }, + "requiredPanelVersion": { + "type": "number" + }, "resource": { "type": "string" }, @@ -22827,6 +24397,9 @@ const docTemplate = `{ "appId": { "type": "integer" }, + "architectures": { + "type": "string" + }, "createdAt": { "type": "string" }, @@ -22842,6 +24415,9 @@ const docTemplate = `{ "enable": { "type": "boolean" }, + "gpuSupport": { + "type": "boolean" + }, "hostMode": { "type": "boolean" }, @@ -22860,6 +24436,9 @@ const docTemplate = `{ "lastVersion": { "type": "string" }, + "memoryRequired": { + "type": "integer" + }, "params": {}, "status": { "type": "string" @@ -22966,6 +24545,28 @@ const docTemplate = `{ }, "type": "object" }, + "response.AppstoreConfig": { + "properties": { + "defaultDomain": { + "type": "string" + } + }, + "type": "object" + }, + "response.Database": { + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, "response.FileInfo": { "properties": { "content": { @@ -23083,6 +24684,26 @@ const docTemplate = `{ }, "type": "object" }, + "response.NginxModule": { + "properties": { + "enable": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "packages": { + "type": "string" + }, + "params": { + "type": "string" + }, + "script": { + "type": "string" + } + }, + "type": "object" + }, "response.NginxParam": { "properties": { "name": { @@ -23097,6 +24718,32 @@ const docTemplate = `{ }, "type": "object" }, + "response.NginxProxyCache": { + "properties": { + "cacheExpire": { + "type": "integer" + }, + "cacheExpireUnit": { + "type": "string" + }, + "cacheLimit": { + "type": "number" + }, + "cacheLimitUnit": { + "type": "string" + }, + "open": { + "type": "boolean" + }, + "shareCache": { + "type": "integer" + }, + "shareCacheUnit": { + "type": "string" + } + }, + "type": "object" + }, "response.NginxStatus": { "properties": { "accepts": { @@ -23163,6 +24810,70 @@ const docTemplate = `{ }, "type": "object" }, + "response.ProcessStatus": { + "properties": { + "PID": { + "type": "string" + }, + "msg": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string" + }, + "uptime": { + "type": "string" + } + }, + "type": "object" + }, + "response.Resource": { + "properties": { + "detail": {}, + "name": { + "type": "string" + }, + "resourceID": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "response.SupervisorProcessConfig": { + "properties": { + "command": { + "type": "string" + }, + "dir": { + "type": "string" + }, + "msg": { + "type": "string" + }, + "name": { + "type": "string" + }, + "numprocs": { + "type": "string" + }, + "status": { + "items": { + "$ref": "#/definitions/response.ProcessStatus" + }, + "type": "array" + }, + "user": { + "type": "string" + } + }, + "type": "object" + }, "response.WebsiteAcmeAccountDTO": { "properties": { "createdAt": { @@ -23315,6 +25026,9 @@ const docTemplate = `{ "id": { "type": "integer" }, + "parentWebsiteID": { + "type": "integer" + }, "primaryDomain": { "type": "string" }, @@ -23339,6 +25053,9 @@ const docTemplate = `{ "runtimeName": { "type": "string" }, + "runtimeType": { + "type": "string" + }, "siteDir": { "type": "string" }, @@ -23389,6 +25106,9 @@ const docTemplate = `{ "hsts": { "type": "boolean" }, + "http3": { + "type": "boolean" + }, "httpConfig": { "type": "string" }, @@ -23451,6 +25171,29 @@ const docTemplate = `{ } }, "type": "object" + }, + "response.WebsiteRealIP": { + "properties": { + "ipFrom": { + "type": "string" + }, + "ipHeader": { + "type": "string" + }, + "ipOther": { + "type": "string" + }, + "open": { + "type": "boolean" + }, + "websiteID": { + "type": "integer" + } + }, + "required": [ + "websiteID" + ], + "type": "object" } } }` diff --git a/cmd/server/docs/swagger.json b/cmd/server/docs/swagger.json index 80d8f7d4d..1a17d69b5 100644 --- a/cmd/server/docs/swagger.json +++ b/cmd/server/docs/swagger.json @@ -307,6 +307,49 @@ ] } }, + "/apps/installed/config/update": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新应用配置", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.AppConfigUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update app config", + "tags": [ + "App" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "installID", + "webUI" + ], + "formatEN": "Application config update [installID]", + "formatZH": "应用配置更新 [installID]", + "paramKeys": [] + } + } + }, "/apps/installed/conninfo/:key": { "get": { "consumes": [ @@ -840,9 +883,45 @@ ] } }, - "/apps/sync": { + "/apps/store/config": { + "get": { + "description": "获取应用商店配置", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.AppstoreConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get appstore config", + "tags": [ + "App" + ] + } + }, + "/apps/store/update": { "post": { - "description": "同步应用列表", + "consumes": [ + "application/json" + ], + "description": "更新应用商店配置", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.AppstoreUpdate" + } + } + ], "responses": { "200": { "description": "OK" @@ -853,7 +932,26 @@ "ApiKeyAuth": [] } ], - "summary": "Sync app list", + "summary": "Update appstore config", + "tags": [ + "App" + ] + } + }, + "/apps/sync/local": { + "post": { + "description": "同步本地应用列表", + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Sync local app list", "tags": [ "App" ], @@ -866,6 +964,314 @@ } } }, + "/apps/sync/remote": { + "post": { + "description": "同步远程应用列表", + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Sync remote app list", + "tags": [ + "App" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "App store synchronization", + "formatZH": "应用商店同步", + "paramKeys": [] + } + } + }, + "/backup/backup": { + "post": { + "consumes": [ + "application/json" + ], + "description": "备份系统数据", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CommonBackup" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Backup system data", + "tags": [ + "Backup Account" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "type", + "name", + "detailName" + ], + "formatEN": "backup [type] data [name][detailName]", + "formatZH": "备份 [type] 数据 [name][detailName]", + "paramKeys": [] + } + } + }, + "/backup/record/download": { + "post": { + "consumes": [ + "application/json" + ], + "description": "下载备份记录", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.DownloadRecord" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Download backup record", + "tags": [ + "Backup Account" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "source", + "fileName" + ], + "formatEN": "download backup records [source][fileName]", + "formatZH": "下载备份记录 [source][fileName]", + "paramKeys": [] + } + } + }, + "/backup/record/search": { + "post": { + "consumes": [ + "application/json" + ], + "description": "获取备份记录列表分页", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.RecordSearch" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Page backup records", + "tags": [ + "Backup Account" + ] + } + }, + "/backup/record/search/bycronjob": { + "post": { + "consumes": [ + "application/json" + ], + "description": "通过计划任务获取备份记录列表分页", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.RecordSearchByCronjob" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Page backup records by cronjob", + "tags": [ + "Backup Account" + ] + } + }, + "/backup/recover": { + "post": { + "consumes": [ + "application/json" + ], + "description": "恢复系统数据", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CommonRecover" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Recover system data", + "tags": [ + "Backup Account" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "type", + "name", + "detailName", + "file" + ], + "formatEN": "recover [type] data [name][detailName] from [file]", + "formatZH": "从 [file] 恢复 [type] 数据 [name][detailName]", + "paramKeys": [] + } + } + }, + "/backup/recover/byupload": { + "post": { + "consumes": [ + "application/json" + ], + "description": "从上传恢复系统数据", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CommonRecover" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Recover system data by upload", + "tags": [ + "Backup Account" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "type", + "name", + "detailName", + "file" + ], + "formatEN": "recover [type] data [name][detailName] from [file]", + "formatZH": "从 [file] 恢复 [type] 数据 [name][detailName]", + "paramKeys": [] + } + } + }, + "/backup/search/files": { + "post": { + "consumes": [ + "application/json" + ], + "description": "获取备份账号内文件列表", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByID" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List files from backup accounts", + "tags": [ + "Backup Account" + ] + } + }, "/containers": { "post": { "consumes": [ @@ -951,6 +1357,39 @@ } } }, + "/containers/command": { + "post": { + "consumes": [ + "application/json" + ], + "description": "命令创建容器", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ContainerCreateByCommand" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Create container by command", + "tags": [ + "Container" + ] + } + }, "/containers/commit": { "post": { "consumes": [ @@ -2761,6 +3200,31 @@ ] } }, + "/containers/status": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取容器状态", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Load containers status", + "tags": [ + "Container" + ] + } + }, "/containers/template": { "get": { "description": "获取容器编排模版列表", @@ -3454,6 +3918,25 @@ } } }, + "/core/backup/local": { + "get": { + "description": "获取本地备份目录", + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "get local backup dir", + "tags": [ + "Backup Account" + ] + } + }, "/core/backup/onedrive": { "get": { "consumes": [ @@ -3479,6 +3962,34 @@ ] } }, + "/core/backup/options": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取备份账号选项", + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.BackupOption" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Load backup account options", + "tags": [ + "Backup Account" + ] + } + }, "/core/backup/refresh/onedrive": { "post": { "description": "刷新 OneDrive token", @@ -3499,7 +4010,7 @@ } }, "/core/backup/search": { - "get": { + "post": { "consumes": [ "application/json" ], @@ -3529,43 +4040,6 @@ "tags": [ "Backup Account" ] - }, - "post": { - "consumes": [ - "application/json" - ], - "description": "获取 bucket 列表", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.ForBuckets" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "List buckets", - "tags": [ - "Backup Account" - ] } }, "/core/backup/update": { @@ -3610,6 +4084,768 @@ } } }, + "/core/commands": { + "post": { + "consumes": [ + "application/json" + ], + "description": "创建快速命令", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CommandOperate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Create command", + "tags": [ + "Command" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "name", + "command" + ], + "formatEN": "create quick command [name][command]", + "formatZH": "创建快捷命令 [name][command]", + "paramKeys": [] + } + } + }, + "/core/commands/command": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取快速命令列表", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByType" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.CommandInfo" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List commands", + "tags": [ + "Command" + ] + } + }, + "/core/commands/del": { + "post": { + "consumes": [ + "application/json" + ], + "description": "删除快速命令", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByIDs" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Delete command", + "tags": [ + "Command" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "commands", + "input_column": "id", + "input_value": "ids", + "isList": true, + "output_column": "name", + "output_value": "names" + } + ], + "bodyKeys": [ + "ids" + ], + "formatEN": "delete quick command [names]", + "formatZH": "删除快捷命令 [names]", + "paramKeys": [] + } + } + }, + "/core/commands/search": { + "post": { + "consumes": [ + "application/json" + ], + "description": "获取快速命令列表分页", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SearchWithPage" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.PageResult" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Page commands", + "tags": [ + "Command" + ] + } + }, + "/core/commands/tree": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取快速命令树", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByType" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "Array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Tree commands", + "tags": [ + "Command" + ] + } + }, + "/core/commands/update": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新快速命令", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CommandOperate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update command", + "tags": [ + "Command" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "update quick command [name]", + "formatZH": "更新快捷命令 [name]", + "paramKeys": [] + } + } + }, + "/core/groups": { + "post": { + "consumes": [ + "application/json" + ], + "description": "创建系统组", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.GroupCreate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Create group", + "tags": [ + "System Group" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "name", + "type" + ], + "formatEN": "create group [name][type]", + "formatZH": "创建组 [name][type]", + "paramKeys": [] + } + } + }, + "/core/groups/del": { + "post": { + "consumes": [ + "application/json" + ], + "description": "删除系统组", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByID" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Delete group", + "tags": [ + "System Group" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "groups", + "input_column": "id", + "input_value": "id", + "isList": false, + "output_column": "name", + "output_value": "name" + }, + { + "db": "groups", + "input_column": "id", + "input_value": "id", + "isList": false, + "output_column": "type", + "output_value": "type" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "delete group [type][name]", + "formatZH": "删除组 [type][name]", + "paramKeys": [] + } + } + }, + "/core/groups/search": { + "post": { + "consumes": [ + "application/json" + ], + "description": "查询系统组", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.GroupSearch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.OperateByType" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List groups", + "tags": [ + "System Group" + ] + } + }, + "/core/groups/update": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新系统组", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.GroupUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update group", + "tags": [ + "System Group" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "name", + "type" + ], + "formatEN": "update group [name][type]", + "formatZH": "更新组 [name][type]", + "paramKeys": [] + } + } + }, + "/core/hosts": { + "post": { + "consumes": [ + "application/json" + ], + "description": "创建主机", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.HostOperate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Create host", + "tags": [ + "Host" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "name", + "addr" + ], + "formatEN": "create host [name][addr]", + "formatZH": "创建主机 [name][addr]", + "paramKeys": [] + } + } + }, + "/core/hosts/del": { + "post": { + "consumes": [ + "application/json" + ], + "description": "删除主机", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByIDs" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Delete host", + "tags": [ + "Host" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "hosts", + "input_column": "id", + "input_value": "ids", + "isList": true, + "output_column": "addr", + "output_value": "addrs" + } + ], + "bodyKeys": [ + "ids" + ], + "formatEN": "delete host [addrs]", + "formatZH": "删除主机 [addrs]", + "paramKeys": [] + } + } + }, + "/core/hosts/search": { + "post": { + "consumes": [ + "application/json" + ], + "description": "获取主机列表分页", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SearchHostWithPage" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.HostTree" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Page host", + "tags": [ + "Host" + ] + } + }, + "/core/hosts/test/byid/:id": { + "post": { + "consumes": [ + "application/json" + ], + "description": "测试主机连接", + "parameters": [ + { + "description": "request", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "boolean" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Test host conn by host id", + "tags": [ + "Host" + ] + } + }, + "/core/hosts/test/byinfo": { + "post": { + "consumes": [ + "application/json" + ], + "description": "测试主机连接", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.HostConnTest" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Test host conn by info", + "tags": [ + "Host" + ] + } + }, + "/core/hosts/tree": { + "post": { + "consumes": [ + "application/json" + ], + "description": "加载主机树", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SearchForTree" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.HostTree" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Load host tree", + "tags": [ + "Host" + ] + } + }, + "/core/hosts/update": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新主机", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.HostOperate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update host", + "tags": [ + "Host" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "name", + "addr" + ], + "formatEN": "update host [name][addr]", + "formatZH": "更新主机信息 [name][addr]", + "paramKeys": [] + } + } + }, + "/core/hosts/update/group": { + "post": { + "consumes": [ + "application/json" + ], + "description": "切换分组", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ChangeHostGroup" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update host group", + "tags": [ + "Host" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "hosts", + "input_column": "id", + "input_value": "id", + "isList": false, + "output_column": "addr", + "output_value": "addr" + } + ], + "bodyKeys": [ + "id", + "group" + ], + "formatEN": "change host [addr] group =\u003e [group]", + "formatZH": "切换主机[addr]分组 =\u003e [group]", + "paramKeys": [] + } + } + }, "/core/logs/clean": { "post": { "consumes": [ @@ -4197,6 +5433,68 @@ } } }, + "/core/settings/terminal/search": { + "post": { + "description": "加载系统终端配置信息", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.TerminalInfo" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Load system terminal setting info", + "tags": [ + "System Setting" + ] + } + }, + "/core/settings/terminal/update": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新系统终端配置", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.TerminalInfo" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update system terminal setting", + "tags": [ + "System Setting" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "update system terminal setting", + "formatZH": "修改系统终端配置", + "paramKeys": [] + } + } + }, "/core/settings/update": { "post": { "consumes": [ @@ -4509,6 +5807,39 @@ } } }, + "/cronjobs/next": { + "post": { + "consumes": [ + "application/json" + ], + "description": "预览最近五次执行时间", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CronjobSpec" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Load cronjob spec time", + "tags": [ + "Cronjob" + ] + } + }, "/cronjobs/records/clean": { "post": { "consumes": [ @@ -4875,6 +6206,28 @@ ] } }, + "/dashboard/current/node": { + "get": { + "description": "获取节点实时数据", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.NodeCurrent" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Load dashboard current info for node", + "tags": [ + "Dashboard" + ] + } + }, "/dashboard/system/restart/:operation": { "post": { "consumes": [ @@ -7717,190 +9070,6 @@ } } }, - "/groups": { - "post": { - "consumes": [ - "application/json" - ], - "description": "创建系统组", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.GroupCreate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Create group", - "tags": [ - "System Group" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "type" - ], - "formatEN": "create group [name][type]", - "formatZH": "创建组 [name][type]", - "paramKeys": [] - } - } - }, - "/groups/del": { - "post": { - "consumes": [ - "application/json" - ], - "description": "删除系统组", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.OperateByID" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Delete group", - "tags": [ - "System Group" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "groups", - "input_column": "id", - "input_value": "id", - "isList": false, - "output_column": "name", - "output_value": "name" - }, - { - "db": "groups", - "input_column": "id", - "input_value": "id", - "isList": false, - "output_column": "type", - "output_value": "type" - } - ], - "bodyKeys": [ - "id" - ], - "formatEN": "delete group [type][name]", - "formatZH": "删除组 [type][name]", - "paramKeys": [] - } - } - }, - "/groups/search": { - "post": { - "consumes": [ - "application/json" - ], - "description": "查询系统组", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.GroupSearch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/dto.GroupInfo" - }, - "type": "array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "List groups", - "tags": [ - "System Group" - ] - } - }, - "/groups/update": { - "post": { - "consumes": [ - "application/json" - ], - "description": "更新系统组", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.GroupUpdate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Update group", - "tags": [ - "System Group" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "type" - ], - "formatEN": "update group [name][type]", - "formatZH": "更新组 [name][type]", - "paramKeys": [] - } - } - }, "/host/conffile/update": { "post": { "consumes": [ @@ -8469,467 +9638,6 @@ } } }, - "/hosts": { - "post": { - "consumes": [ - "application/json" - ], - "description": "创建主机", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.HostOperate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Create host", - "tags": [ - "Host" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "addr" - ], - "formatEN": "create host [name][addr]", - "formatZH": "创建主机 [name][addr]", - "paramKeys": [] - } - } - }, - "/hosts/command": { - "get": { - "description": "获取快速命令列表", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.CommandInfo" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "List commands", - "tags": [ - "Command" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "description": "创建快速命令", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.CommandOperate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Create command", - "tags": [ - "Command" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "command" - ], - "formatEN": "create quick command [name][command]", - "formatZH": "创建快捷命令 [name][command]", - "paramKeys": [] - } - } - }, - "/hosts/command/del": { - "post": { - "consumes": [ - "application/json" - ], - "description": "删除快速命令", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.BatchDeleteReq" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Delete command", - "tags": [ - "Command" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "commands", - "input_column": "id", - "input_value": "ids", - "isList": true, - "output_column": "name", - "output_value": "names" - } - ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete quick command [names]", - "formatZH": "删除快捷命令 [names]", - "paramKeys": [] - } - } - }, - "/hosts/command/redis": { - "get": { - "description": "获取 redis 快速命令列表", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "Array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "List redis commands", - "tags": [ - "Redis Command" - ] - }, - "post": { - "consumes": [ - "application/json" - ], - "description": "保存 Redis 快速命令", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.RedisCommand" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Save redis command", - "tags": [ - "Redis Command" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "command" - ], - "formatEN": "save quick command for redis [name][command]", - "formatZH": "保存 redis 快捷命令 [name][command]", - "paramKeys": [] - } - } - }, - "/hosts/command/redis/del": { - "post": { - "consumes": [ - "application/json" - ], - "description": "删除 redis 快速命令", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.BatchDeleteReq" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Delete redis command", - "tags": [ - "Redis Command" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "redis_commands", - "input_column": "id", - "input_value": "ids", - "isList": true, - "output_column": "name", - "output_value": "names" - } - ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete quick command of redis [names]", - "formatZH": "删除 redis 快捷命令 [names]", - "paramKeys": [] - } - } - }, - "/hosts/command/redis/search": { - "post": { - "consumes": [ - "application/json" - ], - "description": "获取 redis 快速命令列表分页", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SearchWithPage" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.PageResult" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Page redis commands", - "tags": [ - "Redis Command" - ] - } - }, - "/hosts/command/search": { - "post": { - "consumes": [ - "application/json" - ], - "description": "获取快速命令列表分页", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SearchWithPage" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.PageResult" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Page commands", - "tags": [ - "Command" - ] - } - }, - "/hosts/command/tree": { - "get": { - "consumes": [ - "application/json" - ], - "description": "获取快速命令树", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "Array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Tree commands", - "tags": [ - "Command" - ] - } - }, - "/hosts/command/update": { - "post": { - "consumes": [ - "application/json" - ], - "description": "更新快速命令", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.CommandOperate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Update command", - "tags": [ - "Command" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name" - ], - "formatEN": "update quick command [name]", - "formatZH": "更新快捷命令 [name]", - "paramKeys": [] - } - } - }, - "/hosts/del": { - "post": { - "consumes": [ - "application/json" - ], - "description": "删除主机", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.BatchDeleteReq" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Delete host", - "tags": [ - "Host" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "hosts", - "input_column": "id", - "input_value": "ids", - "isList": true, - "output_column": "addr", - "output_value": "addrs" - } - ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete host [addrs]", - "formatZH": "删除主机 [addrs]", - "paramKeys": [] - } - } - }, "/hosts/firewall/base": { "get": { "description": "获取防火墙基础信息", @@ -9408,96 +10116,12 @@ } } }, - "/hosts/search": { - "post": { + "/installed/delete/check/:id": { + "get": { "consumes": [ "application/json" ], - "description": "获取主机列表分页", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SearchHostWithPage" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/dto.HostTree" - }, - "type": "array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Page host", - "tags": [ - "Host" - ] - } - }, - "/hosts/test/byid/:id": { - "post": { - "consumes": [ - "application/json" - ], - "description": "测试主机连接", - "parameters": [ - { - "description": "request", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "boolean" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Test host conn by host id", - "tags": [ - "Host" - ] - } - }, - "/hosts/test/byinfo": { - "post": { - "consumes": [ - "application/json" - ], - "description": "测试主机连接", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.HostConnTest" - } - } - ], + "description": "删除运行环境校验", "responses": { "200": { "description": "OK" @@ -9508,146 +10132,12 @@ "ApiKeyAuth": [] } ], - "summary": "Test host conn by info", + "summary": "Delete runtime", "tags": [ - "Host" + "Website" ] } }, - "/hosts/tree": { - "post": { - "consumes": [ - "application/json" - ], - "description": "加载主机树", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SearchForTree" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/dto.HostTree" - }, - "type": "array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Load host tree", - "tags": [ - "Host" - ] - } - }, - "/hosts/update": { - "post": { - "consumes": [ - "application/json" - ], - "description": "更新主机", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.HostOperate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Update host", - "tags": [ - "Host" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "addr" - ], - "formatEN": "update host [name][addr]", - "formatZH": "更新主机信息 [name][addr]", - "paramKeys": [] - } - } - }, - "/hosts/update/group": { - "post": { - "consumes": [ - "application/json" - ], - "description": "切换分组", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.ChangeHostGroup" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Update host group", - "tags": [ - "Host" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "hosts", - "input_column": "id", - "input_value": "id", - "isList": false, - "output_column": "addr", - "output_value": "addr" - } - ], - "bodyKeys": [ - "id", - "group" - ], - "formatEN": "change host [addr] group =\u003e [group]", - "formatZH": "切换主机[addr]分组 =\u003e [group]", - "paramKeys": [] - } - } - }, "/logs/system": { "post": { "description": "获取系统日志", @@ -9744,6 +10234,46 @@ ] } }, + "/openresty/build": { + "post": { + "consumes": [ + "application/json" + ], + "description": "构建 OpenResty", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxBuildReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Build OpenResty", + "tags": [ + "OpenResty" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "Build OpenResty", + "formatZH": "构建 OpenResty", + "paramKeys": [] + } + } + }, "/openresty/clear": { "post": { "description": "清理 OpenResty 代理缓存", @@ -9810,6 +10340,71 @@ } } }, + "/openresty/module/update": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新 OpenResty 模块", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxModuleUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update OpenResty module", + "tags": [ + "OpenResty" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "Update OpenResty module", + "formatZH": "更新 OpenResty 模块", + "paramKeys": [] + } + } + }, + "/openresty/modules": { + "get": { + "description": "获取 OpenResty 模块", + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/response.NginxModule" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get OpenResty modules", + "tags": [ + "OpenResty" + ] + } + }, "/openresty/scope": { "post": { "consumes": [ @@ -9961,6 +10556,57 @@ } } }, + "/record/del": { + "post": { + "consumes": [ + "application/json" + ], + "description": "删除备份记录", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.BatchDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Delete backup record", + "tags": [ + "Backup Account" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "backup_records", + "input_column": "id", + "input_value": "ids", + "isList": true, + "output_column": "file_name", + "output_value": "files" + } + ], + "bodyKeys": [ + "ids" + ], + "formatEN": "delete backup records [files]", + "formatZH": "删除备份记录 [files]", + "paramKeys": [] + } + } + }, "/runtimes": { "post": { "consumes": [ @@ -10217,6 +10863,122 @@ } } }, + "/runtimes/php/:id/extensions": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取 PHP 运行环境扩展", + "parameters": [ + { + "description": "request", + "in": "path", + "name": "id", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get php runtime extension", + "tags": [ + "Runtime" + ] + } + }, + "/runtimes/php/config": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新运行环境 PHP 配置", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.PHPConfigUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update runtime php conf", + "tags": [ + "Runtime" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "websites", + "input_column": "id", + "input_value": "id", + "isList": false, + "output_column": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "[domain] PHP conf update", + "formatZH": "[domain] PHP 配置修改", + "paramKeys": [] + } + } + }, + "/runtimes/php/config/:id": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取 php 运行环境配置", + "parameters": [ + { + "description": "request", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.PHPConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Load php runtime conf", + "tags": [ + "Runtime" + ] + } + }, "/runtimes/php/extensions": { "post": { "consumes": [ @@ -10283,6 +11045,39 @@ ] } }, + "/runtimes/php/extensions/install": { + "post": { + "consumes": [ + "application/json" + ], + "description": "安装 PHP 扩展", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.PHPExtensionInstallReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Install php extension", + "tags": [ + "Runtime" + ] + } + }, "/runtimes/php/extensions/search": { "post": { "consumes": [ @@ -10322,6 +11117,39 @@ ] } }, + "/runtimes/php/extensions/uninstall": { + "post": { + "consumes": [ + "application/json" + ], + "description": "卸载 PHP 扩展", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.PHPExtensionInstallReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "UnInstall php extension", + "tags": [ + "Runtime" + ] + } + }, "/runtimes/php/extensions/update": { "post": { "consumes": [ @@ -10355,6 +11183,157 @@ ] } }, + "/runtimes/php/file": { + "post": { + "consumes": [ + "application/json" + ], + "description": "获取 php 配置文件", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.PHPFileReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get php conf file", + "tags": [ + "Runtime" + ] + } + }, + "/runtimes/php/fpm/config": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新 fpm 配置", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.FPMConfig" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update fpm config", + "tags": [ + "Runtime" + ] + } + }, + "/runtimes/php/fpm/config/:id": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取 fpm 配置", + "parameters": [ + { + "description": "request", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/request.FPMConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get fpm config", + "tags": [ + "Runtime" + ] + } + }, + "/runtimes/php/update": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新 php 配置文件", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.PHPFileUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update php conf file", + "tags": [ + "Runtime" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "websites", + "input_column": "id", + "input_value": "websiteId", + "isList": false, + "output_column": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "websiteId" + ], + "formatEN": "Nginx conf update [domain]", + "formatZH": "php 配置修改 [domain]", + "paramKeys": [] + } + } + }, "/runtimes/search": { "post": { "consumes": [ @@ -10388,6 +11367,106 @@ ] } }, + "/runtimes/supervisor/process/:id": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取 supervisor 进程", + "parameters": [ + { + "description": "request", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.SupervisorProcessConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get supervisor process", + "tags": [ + "Runtime" + ] + } + }, + "/runtimes/supervisor/process/file/operate": { + "post": { + "consumes": [ + "application/json" + ], + "description": "操作 supervisor 进程文件", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.PHPSupervisorProcessFileReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Operate supervisor process file", + "tags": [ + "Runtime" + ] + } + }, + "/runtimes/supervisor/process/operate": { + "post": { + "consumes": [ + "application/json" + ], + "description": "操作 supervisor 进程", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.PHPSupervisorProcessConfig" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Operate supervisor process", + "tags": [ + "Runtime" + ] + } + }, "/runtimes/sync": { "post": { "consumes": [ @@ -10452,339 +11531,6 @@ } } }, - "/settings/backup/backup": { - "post": { - "consumes": [ - "application/json" - ], - "description": "备份系统数据", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.CommonBackup" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Backup system data", - "tags": [ - "Backup Account" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "type", - "name", - "detailName" - ], - "formatEN": "backup [type] data [name][detailName]", - "formatZH": "备份 [type] 数据 [name][detailName]", - "paramKeys": [] - } - } - }, - "/settings/backup/record/del": { - "post": { - "consumes": [ - "application/json" - ], - "description": "删除备份记录", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.BatchDeleteReq" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Delete backup record", - "tags": [ - "Backup Account" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "backup_records", - "input_column": "id", - "input_value": "ids", - "isList": true, - "output_column": "file_name", - "output_value": "files" - } - ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete backup records [files]", - "formatZH": "删除备份记录 [files]", - "paramKeys": [] - } - } - }, - "/settings/backup/record/download": { - "post": { - "consumes": [ - "application/json" - ], - "description": "下载备份记录", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.DownloadRecord" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Download backup record", - "tags": [ - "Backup Account" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "source", - "fileName" - ], - "formatEN": "download backup records [source][fileName]", - "formatZH": "下载备份记录 [source][fileName]", - "paramKeys": [] - } - } - }, - "/settings/backup/record/search": { - "post": { - "consumes": [ - "application/json" - ], - "description": "获取备份记录列表分页", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.RecordSearch" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Page backup records", - "tags": [ - "Backup Account" - ] - } - }, - "/settings/backup/record/search/bycronjob": { - "post": { - "consumes": [ - "application/json" - ], - "description": "通过计划任务获取备份记录列表分页", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.RecordSearchByCronjob" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Page backup records by cronjob", - "tags": [ - "Backup Account" - ] - } - }, - "/settings/backup/recover": { - "post": { - "consumes": [ - "application/json" - ], - "description": "恢复系统数据", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.CommonRecover" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Recover system data", - "tags": [ - "Backup Account" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "type", - "name", - "detailName", - "file" - ], - "formatEN": "recover [type] data [name][detailName] from [file]", - "formatZH": "从 [file] 恢复 [type] 数据 [name][detailName]", - "paramKeys": [] - } - } - }, - "/settings/backup/recover/byupload": { - "post": { - "consumes": [ - "application/json" - ], - "description": "从上传恢复系统数据", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.CommonRecover" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Recover system data by upload", - "tags": [ - "Backup Account" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "type", - "name", - "detailName", - "file" - ], - "formatEN": "recover [type] data [name][detailName] from [file]", - "formatZH": "从 [file] 恢复 [type] 数据 [name][detailName]", - "paramKeys": [] - } - } - }, - "/settings/backup/search/files": { - "post": { - "consumes": [ - "application/json" - ], - "description": "获取备份账号内文件列表", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.BackupSearchFile" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "List files from backup accounts", - "tags": [ - "Backup Account" - ] - } - }, "/settings/basedir": { "get": { "description": "获取安装根目录", @@ -11037,6 +11783,25 @@ } } }, + "/settings/snapshot/load": { + "get": { + "description": "获取系统快照数据", + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Load system snapshot data", + "tags": [ + "System Setting" + ] + } + }, "/settings/snapshot/recover": { "post": { "consumes": [ @@ -11088,6 +11853,57 @@ } } }, + "/settings/snapshot/recrete": { + "post": { + "consumes": [ + "application/json" + ], + "description": "创建系统快照重试", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByID" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Recreate system snapshot", + "tags": [ + "System Setting" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "snapshots", + "input_column": "id", + "input_value": "id", + "isList": false, + "output_column": "name", + "output_value": "name" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "recrete the snapshot [name]", + "formatZH": "重试创建快照 [name]", + "paramKeys": [] + } + } + }, "/settings/snapshot/rollback": { "post": { "consumes": [ @@ -11175,12 +11991,12 @@ ] } }, - "/settings/snapshot/status": { + "/settings/snapshot/size": { "post": { "consumes": [ "application/json" ], - "description": "获取快照状态", + "description": "获取系统快照文件大小", "parameters": [ { "description": "request", @@ -11188,7 +12004,7 @@ "name": "request", "required": true, "schema": { - "$ref": "#/definitions/dto.OperateByID" + "$ref": "#/definitions/dto.SearchWithPage" } } ], @@ -11202,7 +12018,7 @@ "ApiKeyAuth": [] } ], - "summary": "Load Snapshot status", + "summary": "Load system snapshot size", "tags": [ "System Setting" ] @@ -12087,6 +12903,25 @@ } } }, + "/toolbox/device/users": { + "get": { + "description": "获取服务器用户列表", + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Load user list", + "tags": [ + "Device" + ] + } + }, "/toolbox/device/zone/options": { "get": { "consumes": [ @@ -13575,6 +14410,62 @@ } } }, + "/websites/databases": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取数据库列表", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Database" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get databases", + "tags": [ + "Website" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "description": "切换网站数据库", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.ChangeDatabase" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Change website database", + "tags": [ + "Website" + ] + } + }, "/websites/default/html/:type": { "get": { "consumes": [ @@ -14235,6 +15126,171 @@ } } }, + "/websites/lbs": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取网站 upstreams", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteCommonReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get website upstreams", + "tags": [ + "Website" + ] + } + }, + "/websites/lbs/create": { + "post": { + "consumes": [ + "application/json" + ], + "description": "创建网站 upstream", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteLBCreate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Create website upstream", + "tags": [ + "Website" + ] + } + }, + "/websites/lbs/delete": { + "post": { + "consumes": [ + "application/json" + ], + "description": "删除网站 upstream", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteLBDelete" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Delete website upstream", + "tags": [ + "Website" + ] + } + }, + "/websites/lbs/file": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新网站 upstream 文件", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteLBUpdateFile" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update website upstream file", + "tags": [ + "Website" + ] + } + }, + "/websites/lbs/update": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新网站 upstream", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteLBUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Update website upstream", + "tags": [ + "Website" + ] + } + }, "/websites/leech": { "post": { "consumes": [ @@ -14485,7 +15541,7 @@ } }, "/websites/options": { - "get": { + "post": { "description": "获取网站列表", "responses": { "200": { @@ -14509,142 +15565,6 @@ ] } }, - "/websites/php/config": { - "post": { - "consumes": [ - "application/json" - ], - "description": "更新 网站 PHP 配置", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.WebsitePHPConfigUpdate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Update website php conf", - "tags": [ - "Website PHP" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "websites", - "input_column": "id", - "input_value": "id", - "isList": false, - "output_column": "primary_domain", - "output_value": "domain" - } - ], - "bodyKeys": [ - "id" - ], - "formatEN": "[domain] PHP conf update", - "formatZH": "[domain] PHP 配置修改", - "paramKeys": [] - } - } - }, - "/websites/php/config/:id": { - "get": { - "consumes": [ - "application/json" - ], - "description": "获取网站 php 配置", - "parameters": [ - { - "description": "request", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/response.PHPConfig" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Load website php conf", - "tags": [ - "Website" - ] - } - }, - "/websites/php/update": { - "post": { - "consumes": [ - "application/json" - ], - "description": "更新 php 配置文件", - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.WebsitePHPFileUpdate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - } - ], - "summary": "Update php conf", - "tags": [ - "Website PHP" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "websites", - "input_column": "id", - "input_value": "websiteId", - "isList": false, - "output_column": "primary_domain", - "output_value": "domain" - } - ], - "bodyKeys": [ - "websiteId" - ], - "formatEN": "Nginx conf update [domain]", - "formatZH": "php 配置修改 [domain]", - "paramKeys": [] - } - } - }, "/websites/php/version": { "post": { "consumes": [ @@ -14780,6 +15700,70 @@ } } }, + "/websites/proxy/config": { + "post": { + "consumes": [ + "application/json" + ], + "description": "更新网站反代缓存配置", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxProxyCacheUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "update website proxy cache config", + "tags": [ + "Website" + ] + } + }, + "/websites/proxy/config/{id}": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取网站反代缓存配置", + "parameters": [ + { + "description": "id", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.NginxProxyCache" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get website proxy cache config" + } + }, "/websites/proxy/file": { "post": { "consumes": [ @@ -14831,6 +15815,91 @@ } } }, + "/websites/realip": { + "post": { + "consumes": [ + "application/json" + ], + "description": "设置真实IP", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.WebsiteRealIP" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Set Real IP", + "tags": [ + "Website" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "websites", + "input_column": "id", + "input_value": "websiteID", + "isList": false, + "output_column": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "websiteID" + ], + "formatEN": "Modify the real IP configuration of [domain] website", + "formatZH": "修改 [domain] 网站真实IP配置 ", + "paramKeys": [] + } + } + }, + "/websites/realip/config/{id}": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取真实 IP 配置", + "parameters": [ + { + "description": "id", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.WebsiteRealIP" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get Real IP Config", + "tags": [ + "Website" + ] + } + }, "/websites/redirect": { "post": { "consumes": [ @@ -14966,6 +16035,40 @@ } } }, + "/websites/resource/{id}": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取网站资源", + "parameters": [ + { + "description": "id", + "in": "path", + "name": "id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Resource" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get website resource", + "tags": [ + "Website" + ] + } + }, "/websites/rewrite": { "post": { "consumes": [ @@ -14999,6 +16102,65 @@ ] } }, + "/websites/rewrite/custom": { + "get": { + "consumes": [ + "application/json" + ], + "description": "获取自定义重写模版列表", + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List custom rewrite", + "tags": [ + "Website" + ] + }, + "post": { + "consumes": [ + "application/json" + ], + "description": "编辑自定义重写模版", + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.CustomRewriteOperate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Operate custom rewrite", + "tags": [ + "Website" + ] + } + }, "/websites/rewrite/update": { "post": { "consumes": [ @@ -15635,17 +16797,6 @@ }, "type": "object" }, - "dto.BackupSearchFile": { - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object" - }, "dto.BatchDelete": { "properties": { "force": { @@ -15756,21 +16907,6 @@ ], "type": "object" }, - "dto.ChangeHostGroup": { - "properties": { - "groupID": { - "type": "integer" - }, - "id": { - "type": "integer" - } - }, - "required": [ - "groupID", - "id" - ], - "type": "object" - }, "dto.ChangePasswd": { "properties": { "passwd": { @@ -15968,50 +17104,6 @@ }, "type": "object" }, - "dto.CommandInfo": { - "properties": { - "command": { - "type": "string" - }, - "groupBelong": { - "type": "string" - }, - "groupID": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "dto.CommandOperate": { - "properties": { - "command": { - "type": "string" - }, - "groupBelong": { - "type": "string" - }, - "groupID": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "name": { - "type": "string" - } - }, - "required": [ - "command", - "name" - ], - "type": "object" - }, "dto.CommonBackup": { "properties": { "detailName": { @@ -16023,6 +17115,9 @@ "secret": { "type": "string" }, + "taskID": { + "type": "string" + }, "type": { "enum": [ "app", @@ -16042,9 +17137,15 @@ }, "dto.CommonRecover": { "properties": { + "backupRecordID": { + "type": "integer" + }, "detailName": { "type": "string" }, + "downloadAccountID": { + "type": "integer" + }, "file": { "type": "string" }, @@ -16054,18 +17155,7 @@ "secret": { "type": "string" }, - "source": { - "enum": [ - "OSS", - "S3", - "SFTP", - "MINIO", - "LOCAL", - "COS", - "KODO", - "OneDrive", - "WebDAV" - ], + "taskID": { "type": "string" }, "type": { @@ -16081,7 +17171,7 @@ } }, "required": [ - "source", + "downloadAccountID", "type" ], "type": "object" @@ -16105,6 +17195,9 @@ "path": { "type": "string" }, + "taskID": { + "type": "string" + }, "template": { "type": "integer" } @@ -16237,6 +17330,17 @@ ], "type": "object" }, + "dto.ContainerCreateByCommand": { + "properties": { + "command": { + "type": "string" + }, + "taskID": { + "type": "string" + } + }, + "type": "object" + }, "dto.ContainerListStats": { "properties": { "containerID": { @@ -16286,6 +17390,15 @@ "cpuShares": { "type": "integer" }, + "dns": { + "items": { + "type": "string" + }, + "type": "array" + }, + "domainName": { + "type": "string" + }, "entrypoint": { "items": { "type": "string" @@ -16307,6 +17420,9 @@ "forcePull": { "type": "boolean" }, + "hostname": { + "type": "string" + }, "image": { "type": "string" }, @@ -16322,6 +17438,9 @@ }, "type": "array" }, + "macAddr": { + "type": "string" + }, "memory": { "type": "number" }, @@ -16346,14 +17465,23 @@ "restartPolicy": { "type": "string" }, + "taskID": { + "type": "string" + }, "tty": { "type": "boolean" }, + "user": { + "type": "string" + }, "volumes": { "items": { "$ref": "#/definitions/dto.VolumeHelper" }, "type": "array" + }, + "workingDir": { + "type": "string" } }, "required": [ @@ -16522,9 +17650,6 @@ "appID": { "type": "string" }, - "backupAccounts": { - "type": "string" - }, "command": { "type": "string" }, @@ -16537,12 +17662,18 @@ "dbType": { "type": "string" }, - "defaultDownload": { - "type": "string" + "downloadAccountID": { + "type": "integer" }, "exclusionRules": { "type": "string" }, + "executor": { + "type": "string" + }, + "isDir": { + "type": "boolean" + }, "name": { "type": "string" }, @@ -16553,21 +17684,33 @@ "script": { "type": "string" }, + "scriptMode": { + "type": "string" + }, "secret": { "type": "string" }, + "sourceAccountIDs": { + "type": "string" + }, "sourceDir": { "type": "string" }, "spec": { "type": "string" }, + "specCustom": { + "type": "boolean" + }, "type": { "type": "string" }, "url": { "type": "string" }, + "user": { + "type": "string" + }, "website": { "type": "string" } @@ -16594,14 +17737,22 @@ ], "type": "object" }, + "dto.CronjobSpec": { + "properties": { + "spec": { + "type": "string" + } + }, + "required": [ + "spec" + ], + "type": "object" + }, "dto.CronjobUpdate": { "properties": { "appID": { "type": "string" }, - "backupAccounts": { - "type": "string" - }, "command": { "type": "string" }, @@ -16614,15 +17765,21 @@ "dbType": { "type": "string" }, - "defaultDownload": { - "type": "string" + "downloadAccountID": { + "type": "integer" }, "exclusionRules": { "type": "string" }, + "executor": { + "type": "string" + }, "id": { "type": "integer" }, + "isDir": { + "type": "boolean" + }, "name": { "type": "string" }, @@ -16633,18 +17790,30 @@ "script": { "type": "string" }, + "scriptMode": { + "type": "string" + }, "secret": { "type": "string" }, + "sourceAccountIDs": { + "type": "string" + }, "sourceDir": { "type": "string" }, "spec": { "type": "string" }, + "specCustom": { + "type": "boolean" + }, "url": { "type": "string" }, + "user": { + "type": "string" + }, "website": { "type": "string" } @@ -16924,6 +18093,44 @@ }, "type": "object" }, + "dto.DataTree": { + "properties": { + "children": { + "items": { + "$ref": "#/definitions/dto.DataTree" + }, + "type": "array" + }, + "id": { + "type": "string" + }, + "isCheck": { + "type": "boolean" + }, + "isDisable": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "label": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "relationItemID": { + "type": "string" + }, + "size": { + "type": "integer" + } + }, + "type": "object" + }, "dto.DatabaseCreate": { "properties": { "address": { @@ -17287,31 +18494,20 @@ }, "dto.DownloadRecord": { "properties": { + "downloadAccountID": { + "type": "integer" + }, "fileDir": { "type": "string" }, "fileName": { "type": "string" - }, - "source": { - "enum": [ - "OSS", - "S3", - "SFTP", - "MINIO", - "LOCAL", - "COS", - "KODO", - "OneDrive", - "WebDAV" - ], - "type": "string" } }, "required": [ + "downloadAccountID", "fileDir", - "fileName", - "source" + "fileName" ], "type": "object" }, @@ -17625,109 +18821,6 @@ ], "type": "object" }, - "dto.GroupCreate": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "name", - "type" - ], - "type": "object" - }, - "dto.GroupInfo": { - "properties": { - "id": { - "type": "integer" - }, - "isDefault": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "dto.GroupSearch": { - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object" - }, - "dto.GroupUpdate": { - "properties": { - "id": { - "type": "integer" - }, - "isDefault": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object" - }, - "dto.HostConnTest": { - "properties": { - "addr": { - "type": "string" - }, - "authMode": { - "enum": [ - "password", - "key" - ], - "type": "string" - }, - "passPhrase": { - "type": "string" - }, - "password": { - "type": "string" - }, - "port": { - "maximum": 65535, - "minimum": 1, - "type": "integer" - }, - "privateKey": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "required": [ - "addr", - "port", - "user" - ], - "type": "object" - }, "dto.HostHelper": { "properties": { "host": { @@ -17739,75 +18832,6 @@ }, "type": "object" }, - "dto.HostOperate": { - "properties": { - "addr": { - "type": "string" - }, - "authMode": { - "enum": [ - "password", - "key" - ], - "type": "string" - }, - "description": { - "type": "string" - }, - "groupID": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "passPhrase": { - "type": "string" - }, - "password": { - "type": "string" - }, - "port": { - "maximum": 65535, - "minimum": 1, - "type": "integer" - }, - "privateKey": { - "type": "string" - }, - "rememberPassword": { - "type": "boolean" - }, - "user": { - "type": "string" - } - }, - "required": [ - "addr", - "port", - "user" - ], - "type": "object" - }, - "dto.HostTree": { - "properties": { - "children": { - "items": { - "$ref": "#/definitions/dto.TreeChild" - }, - "type": "array" - }, - "id": { - "type": "integer" - }, - "label": { - "type": "string" - } - }, - "type": "object" - }, "dto.ImageBuild": { "properties": { "dockerfile": { @@ -17824,6 +18848,9 @@ "type": "string" }, "type": "array" + }, + "taskID": { + "type": "string" } }, "required": [ @@ -17874,6 +18901,9 @@ }, "repoID": { "type": "integer" + }, + "taskID": { + "type": "string" } }, "required": [ @@ -17891,6 +18921,9 @@ }, "tagName": { "type": "string" + }, + "taskID": { + "type": "string" } }, "required": [ @@ -18532,6 +19565,79 @@ "ProxyCache" ] }, + "dto.NginxUpstreamServer": { + "properties": { + "failTimeout": { + "type": "string" + }, + "flag": { + "type": "string" + }, + "maxConns": { + "type": "integer" + }, + "maxFails": { + "type": "integer" + }, + "server": { + "type": "string" + }, + "weight": { + "type": "integer" + } + }, + "type": "object" + }, + "dto.NodeCurrent": { + "properties": { + "cpuTotal": { + "type": "integer" + }, + "cpuUsed": { + "type": "number" + }, + "cpuUsedPercent": { + "type": "number" + }, + "load1": { + "type": "number" + }, + "load15": { + "type": "number" + }, + "load5": { + "type": "number" + }, + "loadUsagePercent": { + "type": "number" + }, + "memoryAvailable": { + "type": "integer" + }, + "memoryTotal": { + "type": "integer" + }, + "memoryUsed": { + "type": "integer" + }, + "memoryUsedPercent": { + "type": "number" + }, + "swapMemoryAvailable": { + "type": "integer" + }, + "swapMemoryTotal": { + "type": "integer" + }, + "swapMemoryUsed": { + "type": "integer" + }, + "swapMemoryUsedPercent": { + "type": "number" + } + }, + "type": "object" + }, "dto.Operate": { "properties": { "operation": { @@ -18632,7 +19738,6 @@ "orderBy": { "enum": [ "name", - "state", "created_at" ], "type": "string" @@ -19021,20 +20126,6 @@ ], "type": "object" }, - "dto.RedisCommand": { - "properties": { - "command": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, "dto.RedisConf": { "properties": { "containerName": { @@ -19369,35 +20460,6 @@ ], "type": "object" }, - "dto.SearchForTree": { - "properties": { - "info": { - "type": "string" - } - }, - "type": "object" - }, - "dto.SearchHostWithPage": { - "properties": { - "groupID": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "page": { - "type": "integer" - }, - "pageSize": { - "type": "integer" - } - }, - "required": [ - "page", - "pageSize" - ], - "type": "object" - }, "dto.SearchRecord": { "properties": { "cronjobID": { @@ -19583,38 +20645,80 @@ }, "dto.SnapshotCreate": { "properties": { - "defaultDownload": { - "type": "string" + "appData": { + "items": { + "$ref": "#/definitions/dto.DataTree" + }, + "type": "array" + }, + "backupData": { + "items": { + "$ref": "#/definitions/dto.DataTree" + }, + "type": "array" }, "description": { "maxLength": 256, "type": "string" }, - "from": { - "type": "string" + "downloadAccountID": { + "type": "integer" }, "id": { "type": "integer" }, + "interruptStep": { + "type": "string" + }, + "name": { + "type": "string" + }, + "panelData": { + "items": { + "$ref": "#/definitions/dto.DataTree" + }, + "type": "array" + }, "secret": { "type": "string" + }, + "sourceAccountIDs": { + "type": "string" + }, + "taskID": { + "type": "string" + }, + "withLoginLog": { + "type": "boolean" + }, + "withMonitorData": { + "type": "boolean" + }, + "withOperationLog": { + "type": "boolean" + }, + "withSystemLog": { + "type": "boolean" + }, + "withTaskLog": { + "type": "boolean" } }, "required": [ - "defaultDownload", - "from" + "downloadAccountID", + "sourceAccountIDs" ], "type": "object" }, "dto.SnapshotImport": { "properties": { + "backupAccountID": { + "type": "integer" + }, "description": { "maxLength": 256, "type": "string" }, - "from": { - "type": "string" - }, "names": { "items": { "type": "string" @@ -19637,6 +20741,9 @@ }, "secret": { "type": "string" + }, + "taskID": { + "type": "string" } }, "required": [ @@ -19664,17 +20771,6 @@ ], "type": "object" }, - "dto.TreeChild": { - "properties": { - "id": { - "type": "integer" - }, - "label": { - "type": "string" - } - }, - "type": "object" - }, "dto.UpdateByFile": { "properties": { "file": { @@ -19859,6 +20955,9 @@ }, "model.App": { "properties": { + "architectures": { + "type": "string" + }, "createdAt": { "type": "string" }, @@ -19871,6 +20970,9 @@ "github": { "type": "string" }, + "gpuSupport": { + "type": "boolean" + }, "icon": { "type": "string" }, @@ -19886,6 +20988,9 @@ "limit": { "type": "integer" }, + "memoryRequired": { + "type": "integer" + }, "name": { "type": "string" }, @@ -19898,6 +21003,9 @@ "required": { "type": "string" }, + "requiredPanelVersion": { + "type": "number" + }, "resource": { "type": "string" }, @@ -19983,6 +21091,9 @@ }, "version": { "type": "string" + }, + "webUI": { + "type": "string" } }, "type": "object" @@ -20060,6 +21171,9 @@ "id": { "type": "integer" }, + "parentWebsiteID": { + "type": "integer" + }, "primaryDomain": { "type": "string" }, @@ -20290,6 +21404,20 @@ }, "type": "object" }, + "request.AppConfigUpdate": { + "properties": { + "installID": { + "type": "integer" + }, + "webUI": { + "type": "string" + } + }, + "required": [ + "installID" + ], + "type": "object" + }, "request.AppInstallCreate": { "properties": { "advanced": { @@ -20313,6 +21441,9 @@ "editCompose": { "type": "boolean" }, + "gpuConfig": { + "type": "boolean" + }, "hostMode": { "type": "boolean" }, @@ -20340,6 +21471,12 @@ }, "taskID": { "type": "string" + }, + "type": { + "type": "string" + }, + "webUI": { + "type": "string" } }, "required": [ @@ -20485,6 +21622,9 @@ "editCompose": { "type": "boolean" }, + "gpuConfig": { + "type": "boolean" + }, "hostMode": { "type": "boolean" }, @@ -20503,6 +21643,12 @@ }, "pullImage": { "type": "boolean" + }, + "type": { + "type": "string" + }, + "webUI": { + "type": "string" } }, "required": [ @@ -20528,6 +21674,9 @@ "resource": { "type": "string" }, + "showCurrentArch": { + "type": "boolean" + }, "tags": { "items": { "type": "string" @@ -20544,6 +21693,54 @@ ], "type": "object" }, + "request.AppstoreUpdate": { + "properties": { + "defaultDomain": { + "type": "string" + } + }, + "type": "object" + }, + "request.ChangeDatabase": { + "properties": { + "databaseID": { + "type": "integer" + }, + "databaseType": { + "type": "string" + }, + "websiteID": { + "type": "integer" + } + }, + "required": [ + "databaseID", + "databaseType", + "websiteID" + ], + "type": "object" + }, + "request.CustomRewriteOperate": { + "properties": { + "content": { + "type": "string" + }, + "name": { + "type": "string" + }, + "operate": { + "enum": [ + "create", + "delete" + ], + "type": "string" + } + }, + "required": [ + "operate" + ], + "type": "object" + }, "request.DirSizeReq": { "properties": { "path": { @@ -20555,6 +21752,17 @@ ], "type": "object" }, + "request.Environment": { + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, "request.ExposedPort": { "properties": { "containerPort": { @@ -20566,6 +21774,22 @@ }, "type": "object" }, + "request.FPMConfig": { + "properties": { + "id": { + "type": "integer" + }, + "params": { + "additionalProperties": true, + "type": "object" + } + }, + "required": [ + "id", + "params" + ], + "type": "object" + }, "request.FavoriteCreate": { "properties": { "path": { @@ -21064,6 +22288,9 @@ "editCompose": { "type": "boolean" }, + "gpuConfig": { + "type": "boolean" + }, "hostMode": { "type": "boolean" }, @@ -21082,6 +22309,12 @@ }, "pullImage": { "type": "boolean" + }, + "type": { + "type": "string" + }, + "webUI": { + "type": "string" } }, "type": "object" @@ -21167,6 +22400,21 @@ ], "type": "object" }, + "request.NginxBuildReq": { + "properties": { + "mirror": { + "type": "string" + }, + "taskID": { + "type": "string" + } + }, + "required": [ + "mirror", + "taskID" + ], + "type": "object" + }, "request.NginxCommonReq": { "properties": { "websiteID": { @@ -21215,6 +22463,38 @@ ], "type": "object" }, + "request.NginxModuleUpdate": { + "properties": { + "enable": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "operate": { + "enum": [ + "create", + "delete", + "update" + ], + "type": "string" + }, + "packages": { + "type": "string" + }, + "params": { + "type": "string" + }, + "script": { + "type": "string" + } + }, + "required": [ + "name", + "operate" + ], + "type": "object" + }, "request.NginxPathAuthUpdate": { "properties": { "name": { @@ -21245,6 +22525,44 @@ ], "type": "object" }, + "request.NginxProxyCacheUpdate": { + "properties": { + "cacheExpire": { + "type": "integer" + }, + "cacheExpireUnit": { + "type": "string" + }, + "cacheLimit": { + "type": "integer" + }, + "cacheLimitUnit": { + "type": "string" + }, + "open": { + "type": "boolean" + }, + "shareCache": { + "type": "integer" + }, + "shareCacheUnit": { + "type": "string" + }, + "websiteID": { + "type": "integer" + } + }, + "required": [ + "cacheExpire", + "cacheExpireUnit", + "cacheLimit", + "cacheLimitUnit", + "shareCache", + "shareCacheUnit", + "websiteID" + ], + "type": "object" + }, "request.NginxProxyUpdate": { "properties": { "content": { @@ -21398,6 +22716,54 @@ }, "type": "object" }, + "request.PHPConfigUpdate": { + "properties": { + "disableFunctions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "type": "integer" + }, + "params": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "scope": { + "type": "string" + }, + "uploadMaxSize": { + "type": "string" + } + }, + "required": [ + "id", + "scope" + ], + "type": "object" + }, + "request.PHPExtensionInstallReq": { + "properties": { + "ID": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "taskID": { + "type": "string" + } + }, + "required": [ + "ID", + "name" + ], + "type": "object" + }, "request.PHPExtensionsCreate": { "properties": { "extensions": { @@ -21457,6 +22823,105 @@ ], "type": "object" }, + "request.PHPFileReq": { + "properties": { + "id": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "required": [ + "id", + "type" + ], + "type": "object" + }, + "request.PHPFileUpdate": { + "properties": { + "content": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "required": [ + "content", + "id", + "type" + ], + "type": "object" + }, + "request.PHPSupervisorProcessConfig": { + "properties": { + "command": { + "type": "string" + }, + "dir": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "numprocs": { + "type": "string" + }, + "operate": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "request.PHPSupervisorProcessFileReq": { + "properties": { + "content": { + "type": "string" + }, + "file": { + "enum": [ + "out.log", + "err.log", + "config" + ], + "type": "string" + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "operate": { + "enum": [ + "get", + "clear", + "update" + ], + "type": "string" + } + }, + "required": [ + "file", + "id", + "name", + "operate" + ], + "type": "object" + }, "request.PortUpdate": { "properties": { "key": { @@ -21511,6 +22976,12 @@ "codeDir": { "type": "string" }, + "environments": { + "items": { + "$ref": "#/definitions/request.Environment" + }, + "type": "array" + }, "exposedPorts": { "items": { "$ref": "#/definitions/request.ExposedPort" @@ -21544,6 +23015,12 @@ }, "version": { "type": "string" + }, + "volumes": { + "items": { + "$ref": "#/definitions/request.Volume" + }, + "type": "array" } }, "type": "object" @@ -21602,6 +23079,12 @@ "codeDir": { "type": "string" }, + "environments": { + "items": { + "$ref": "#/definitions/request.Environment" + }, + "type": "array" + }, "exposedPorts": { "items": { "$ref": "#/definitions/request.ExposedPort" @@ -21635,6 +23118,12 @@ }, "version": { "type": "string" + }, + "volumes": { + "items": { + "$ref": "#/definitions/request.Volume" + }, + "type": "array" } }, "type": "object" @@ -21713,6 +23202,17 @@ ], "type": "object" }, + "request.Volume": { + "properties": { + "source": { + "type": "string" + }, + "target": { + "type": "string" + } + }, + "type": "object" + }, "request.WebsiteAcmeAccountCreate": { "properties": { "eabHmacKey": { @@ -21952,6 +23452,9 @@ "ftpUser": { "type": "string" }, + "parentWebsiteID": { + "type": "integer" + }, "port": { "type": "integer" }, @@ -22164,6 +23667,9 @@ "hsts": { "type": "boolean" }, + "http3": { + "type": "boolean" + }, "httpConfig": { "enum": [ "HTTPSOnly", @@ -22233,6 +23739,88 @@ }, "type": "object" }, + "request.WebsiteLBCreate": { + "properties": { + "algorithm": { + "type": "string" + }, + "name": { + "type": "string" + }, + "servers": { + "items": { + "$ref": "#/definitions/dto.NginxUpstreamServer" + }, + "type": "array" + }, + "websiteID": { + "type": "integer" + } + }, + "required": [ + "name", + "websiteID" + ], + "type": "object" + }, + "request.WebsiteLBDelete": { + "properties": { + "name": { + "type": "string" + }, + "websiteID": { + "type": "integer" + } + }, + "required": [ + "name", + "websiteID" + ], + "type": "object" + }, + "request.WebsiteLBUpdate": { + "properties": { + "algorithm": { + "type": "string" + }, + "name": { + "type": "string" + }, + "servers": { + "items": { + "$ref": "#/definitions/dto.NginxUpstreamServer" + }, + "type": "array" + }, + "websiteID": { + "type": "integer" + } + }, + "required": [ + "name", + "websiteID" + ], + "type": "object" + }, + "request.WebsiteLBUpdateFile": { + "properties": { + "content": { + "type": "string" + }, + "name": { + "type": "string" + }, + "websiteID": { + "type": "integer" + } + }, + "required": [ + "content", + "name", + "websiteID" + ], + "type": "object" + }, "request.WebsiteLogReq": { "properties": { "id": { @@ -22287,60 +23875,8 @@ ], "type": "object" }, - "request.WebsitePHPConfigUpdate": { - "properties": { - "disableFunctions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "integer" - }, - "params": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "scope": { - "type": "string" - }, - "uploadMaxSize": { - "type": "string" - } - }, - "required": [ - "id", - "scope" - ], - "type": "object" - }, - "request.WebsitePHPFileUpdate": { - "properties": { - "content": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "required": [ - "content", - "id", - "type" - ], - "type": "object" - }, "request.WebsitePHPVersionReq": { "properties": { - "retainConfig": { - "type": "boolean" - }, "runtimeID": { "type": "integer" }, @@ -22349,7 +23885,6 @@ } }, "required": [ - "runtimeID", "websiteID" ], "type": "object" @@ -22426,6 +23961,29 @@ ], "type": "object" }, + "request.WebsiteRealIP": { + "properties": { + "ipFrom": { + "type": "string" + }, + "ipHeader": { + "type": "string" + }, + "ipOther": { + "type": "string" + }, + "open": { + "type": "boolean" + }, + "websiteID": { + "type": "integer" + } + }, + "required": [ + "websiteID" + ], + "type": "object" + }, "request.WebsiteResourceReq": { "properties": { "id": { @@ -22740,6 +24298,9 @@ }, "response.AppDTO": { "properties": { + "architectures": { + "type": "string" + }, "createdAt": { "type": "string" }, @@ -22752,6 +24313,9 @@ "github": { "type": "string" }, + "gpuSupport": { + "type": "boolean" + }, "icon": { "type": "string" }, @@ -22770,6 +24334,9 @@ "limit": { "type": "integer" }, + "memoryRequired": { + "type": "integer" + }, "name": { "type": "string" }, @@ -22782,6 +24349,9 @@ "required": { "type": "string" }, + "requiredPanelVersion": { + "type": "number" + }, "resource": { "type": "string" }, @@ -22823,6 +24393,9 @@ "appId": { "type": "integer" }, + "architectures": { + "type": "string" + }, "createdAt": { "type": "string" }, @@ -22838,6 +24411,9 @@ "enable": { "type": "boolean" }, + "gpuSupport": { + "type": "boolean" + }, "hostMode": { "type": "boolean" }, @@ -22856,6 +24432,9 @@ "lastVersion": { "type": "string" }, + "memoryRequired": { + "type": "integer" + }, "params": {}, "status": { "type": "string" @@ -22962,6 +24541,28 @@ }, "type": "object" }, + "response.AppstoreConfig": { + "properties": { + "defaultDomain": { + "type": "string" + } + }, + "type": "object" + }, + "response.Database": { + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, "response.FileInfo": { "properties": { "content": { @@ -23079,6 +24680,26 @@ }, "type": "object" }, + "response.NginxModule": { + "properties": { + "enable": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "packages": { + "type": "string" + }, + "params": { + "type": "string" + }, + "script": { + "type": "string" + } + }, + "type": "object" + }, "response.NginxParam": { "properties": { "name": { @@ -23093,6 +24714,32 @@ }, "type": "object" }, + "response.NginxProxyCache": { + "properties": { + "cacheExpire": { + "type": "integer" + }, + "cacheExpireUnit": { + "type": "string" + }, + "cacheLimit": { + "type": "number" + }, + "cacheLimitUnit": { + "type": "string" + }, + "open": { + "type": "boolean" + }, + "shareCache": { + "type": "integer" + }, + "shareCacheUnit": { + "type": "string" + } + }, + "type": "object" + }, "response.NginxStatus": { "properties": { "accepts": { @@ -23159,6 +24806,70 @@ }, "type": "object" }, + "response.ProcessStatus": { + "properties": { + "PID": { + "type": "string" + }, + "msg": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string" + }, + "uptime": { + "type": "string" + } + }, + "type": "object" + }, + "response.Resource": { + "properties": { + "detail": {}, + "name": { + "type": "string" + }, + "resourceID": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "response.SupervisorProcessConfig": { + "properties": { + "command": { + "type": "string" + }, + "dir": { + "type": "string" + }, + "msg": { + "type": "string" + }, + "name": { + "type": "string" + }, + "numprocs": { + "type": "string" + }, + "status": { + "items": { + "$ref": "#/definitions/response.ProcessStatus" + }, + "type": "array" + }, + "user": { + "type": "string" + } + }, + "type": "object" + }, "response.WebsiteAcmeAccountDTO": { "properties": { "createdAt": { @@ -23311,6 +25022,9 @@ "id": { "type": "integer" }, + "parentWebsiteID": { + "type": "integer" + }, "primaryDomain": { "type": "string" }, @@ -23335,6 +25049,9 @@ "runtimeName": { "type": "string" }, + "runtimeType": { + "type": "string" + }, "siteDir": { "type": "string" }, @@ -23385,6 +25102,9 @@ "hsts": { "type": "boolean" }, + "http3": { + "type": "boolean" + }, "httpConfig": { "type": "string" }, @@ -23447,6 +25167,29 @@ } }, "type": "object" + }, + "response.WebsiteRealIP": { + "properties": { + "ipFrom": { + "type": "string" + }, + "ipHeader": { + "type": "string" + }, + "ipOther": { + "type": "string" + }, + "open": { + "type": "boolean" + }, + "websiteID": { + "type": "integer" + } + }, + "required": [ + "websiteID" + ], + "type": "object" } } } \ No newline at end of file diff --git a/cmd/server/docs/swagger_test.go b/cmd/server/docs/swagger_test.go index 316548b76..b152a78ea 100644 --- a/cmd/server/docs/swagger_test.go +++ b/cmd/server/docs/swagger_test.go @@ -3,15 +3,76 @@ package docs import ( "encoding/json" "fmt" + "go/ast" + "go/parser" + "go/token" "os" "os/exec" + "path/filepath" "strings" "testing" ) +func TestGenerateXlog(t *testing.T) { + fset := token.NewFileSet() + + apiDirs := []string{"../../../agent/app/api/v2", "../../../core/app/api/v2", "../../../agent/xpack/app/api/v2", "../../../core/xpack/app/api/v2"} + + xlogMap := make(map[string]operationJson) + for _, dir := range apiDirs { + if err := filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + if info.IsDir() { + return nil + } + fileItem, err := parser.ParseFile(fset, path, nil, parser.ParseComments) + if err != nil { + return err + } + for _, decl := range fileItem.Decls { + switch d := decl.(type) { + case *ast.FuncDecl: + if d.Doc != nil { + routerContent := "" + logContent := "" + for _, comment := range d.Doc.List { + if strings.HasPrefix(comment.Text, "// @Router") { + routerContent = replaceStr(comment.Text, "// @Router", "[post]", "[get]", " ") + } + if strings.HasPrefix(comment.Text, "// @x-panel-log") { + logContent = replaceStr(comment.Text, "// @x-panel-log", " ") + } + } + if len(routerContent) != 0 && len(logContent) != 0 { + var item operationJson + if err := json.Unmarshal([]byte(logContent), &item); err != nil { + panic(fmt.Sprintf("json unamrshal failed, err: %v", err)) + } + xlogMap[routerContent] = item + } + } + } + } + return nil + }); err != nil { + panic(err) + } + } + + newJson, err := json.MarshalIndent(xlogMap, "", "\t") + if err != nil { + panic(fmt.Sprintf("json marshal for new file failed, err: %v", err)) + } + if err := os.WriteFile("x-log.json", newJson, 0640); err != nil { + panic(fmt.Sprintf("write new swagger.json failed, err: %v", err)) + } +} + func TestGenerateSwaggerDoc(t *testing.T) { - workDir := "/Users/slooop/Documents/mycode/1Panel" - swagBin := "/Users/slooop/.gvm/pkgsets/go1.22.4/global/bin/swag" + workDir := "/usr/songliu/1Panel" + swagBin := "/root/go/bin/swag" cmd1 := exec.Command(swagBin, "init", "-o", workDir+"/cmd/server/docs/docs_agent", "-d", workDir+"/agent", "-g", "./cmd/server/main.go") cmd1.Dir = workDir @@ -68,26 +129,6 @@ func TestGenerateSwaggerDoc(t *testing.T) { newSwagger.Paths[key] = val } - newXLog := make(map[string]interface{}) - for key, val := range newSwagger.Paths { - methodMap, isMethodMap := val.(map[string]interface{}) - if !isMethodMap { - continue - } - dataMap, hasPost := methodMap["post"] - if !hasPost { - continue - } - data, isDataMap := dataMap.(map[string]interface{}) - if !isDataMap { - continue - } - xLog, hasXLog := data["x-panel-log"] - if !hasXLog { - continue - } - newXLog[key] = xLog - } newJson, err := json.MarshalIndent(newSwagger, "", "\t") if err != nil { fmt.Printf("json marshal for new file failed, err: %v", err) @@ -103,16 +144,6 @@ func TestGenerateSwaggerDoc(t *testing.T) { return } - newXLogFile, err := json.MarshalIndent(newXLog, "", "\t") - if err != nil { - fmt.Printf("json marshal for new x-log file failed, err: %v", err) - return - } - if err := os.WriteFile("x-log.json", newXLogFile, 0640); err != nil { - fmt.Printf("write new x-log.json failed, err: %v", err) - return - } - _ = os.RemoveAll(workDir + "/cmd/server/docs/docs_agent") _ = os.RemoveAll(workDir + "/cmd/server/docs/docs_core") } @@ -150,3 +181,26 @@ func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }` } + +func replaceStr(val string, rep ...string) string { + for _, item := range rep { + val = strings.ReplaceAll(val, item, "") + } + return val +} + +type operationJson struct { + BodyKeys []string `json:"bodyKeys"` + ParamKeys []string `json:"paramKeys"` + BeforeFunctions []functionInfo `json:"beforeFunctions"` + FormatZH string `json:"formatZH"` + FormatEN string `json:"formatEN"` +} +type functionInfo struct { + InputColumn string `json:"input_column"` + InputValue string `json:"input_value"` + IsList bool `json:"isList"` + DB string `json:"db"` + OutputColumn string `json:"output_column"` + OutputValue string `json:"output_value"` +} diff --git a/cmd/server/docs/x-log.json b/cmd/server/docs/x-log.json index 4e89177a9..c0fdac9fe 100644 --- a/cmd/server/docs/x-log.json +++ b/cmd/server/docs/x-log.json @@ -1,2558 +1,2706 @@ { "/apps/install": { - "BeforeFunctions": [ - { - "db": "app_installs", - "input_column": "name", - "input_value": "name", - "isList": false, - "output_column": "app_id", - "output_value": "appId" - }, - { - "db": "apps", - "info": "appId", - "isList": false, - "output_column": "key", - "output_value": "appKey" - } - ], "bodyKeys": [ "name" ], - "formatEN": "Install app [appKey]-[name]", - "formatZH": "安装应用 [appKey]-[name]", - "paramKeys": [] - }, - "/apps/installed/ignore": { - "BeforeFunctions": [], - "bodyKeys": [ - "installId" - ], - "formatEN": "Application param update [installId]", - "formatZH": "忽略应用 [installId] 版本升级", - "paramKeys": [] - }, - "/apps/installed/op": { - "BeforeFunctions": [ + "paramKeys": [], + "beforeFunctions": [ { - "db": "app_installs", - "input_column": "id", - "input_value": "installId", + "input_column": "name", + "input_value": "name", "isList": false, + "db": "app_installs", "output_column": "app_id", "output_value": "appId" }, { - "db": "app_installs", - "input_column": "id", - "input_value": "installId", + "input_column": "", + "input_value": "", "isList": false, - "output_column": "name", - "output_value": "appName" - }, - { "db": "apps", - "input_column": "id", - "input_value": "appId", - "isList": false, "output_column": "key", "output_value": "appKey" } ], + "formatZH": "安装应用[appKey]-[name]", + "formatEN": "Installapp[appKey]-[name]" + }, + "/apps/installed/config/update": { + "bodyKeys": [ + "installID", + "webUI" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "应用配置更新[installID]", + "formatEN": "Applicationconfigupdate[installID]" + }, + "/apps/installed/ignore": { + "bodyKeys": [ + "installId" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "忽略应用[installId]版本升级", + "formatEN": "Applicationparamupdate[installId]" + }, + "/apps/installed/op": { "bodyKeys": [ "installId", "operate" ], - "formatEN": "[operate] App [appKey][appName]", - "formatZH": "[operate] 应用 [appKey][appName]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "installId", + "isList": false, + "db": "app_installs", + "output_column": "app_id", + "output_value": "appId" + }, + { + "input_column": "id", + "input_value": "installId", + "isList": false, + "db": "app_installs", + "output_column": "name", + "output_value": "appName" + }, + { + "input_column": "id", + "input_value": "appId", + "isList": false, + "db": "apps", + "output_column": "key", + "output_value": "appKey" + } + ], + "formatZH": "[operate]应用[appKey][appName]", + "formatEN": "[operate]App[appKey][appName]" }, "/apps/installed/params/update": { - "BeforeFunctions": [], "bodyKeys": [ "installId" ], - "formatEN": "Application param update [installId]", - "formatZH": "应用参数修改 [installId]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "应用参数修改[installId]", + "formatEN": "Applicationparamupdate[installId]" }, "/apps/installed/port/change": { - "BeforeFunctions": [], "bodyKeys": [ "key", "name", "port" ], - "formatEN": "Application port update [key]-[name] =\u003e [port]", - "formatZH": "应用端口修改 [key]-[name] =\u003e [port]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "应用端口修改[key]-[name]=\u003e[port]", + "formatEN": "Applicationportupdate[key]-[name]=\u003e[port]" }, "/apps/installed/sync": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "Sync the list of installed apps", + "paramKeys": [], + "beforeFunctions": [], "formatZH": "同步已安装应用列表", - "paramKeys": [] + "formatEN": "Syncthelistofinstalledapps" }, - "/apps/sync": { - "BeforeFunctions": [], + "/apps/sync/local": { "bodyKeys": [], - "formatEN": "App store synchronization", + "paramKeys": [], + "beforeFunctions": [], "formatZH": "应用商店同步", - "paramKeys": [] + "formatEN": "Appstoresynchronization" + }, + "/apps/sync/remote": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "应用商店同步", + "formatEN": "Appstoresynchronization" + }, + "/backup/backup": { + "bodyKeys": [ + "type", + "name", + "detailName" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "备份[type]数据[name][detailName]", + "formatEN": "backup[type]data[name][detailName]" + }, + "/backup/record/download": { + "bodyKeys": [ + "source", + "fileName" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "下载备份记录[source][fileName]", + "formatEN": "downloadbackuprecords[source][fileName]" + }, + "/backup/recover": { + "bodyKeys": [ + "type", + "name", + "detailName", + "file" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "从[file]恢复[type]数据[name][detailName]", + "formatEN": "recover[type]data[name][detailName]from[file]" + }, + "/backup/recover/byupload": { + "bodyKeys": [ + "type", + "name", + "detailName", + "file" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "从[file]恢复[type]数据[name][detailName]", + "formatEN": "recover[type]data[name][detailName]from[file]" }, "/containers": { - "BeforeFunctions": [], "bodyKeys": [ "name", "image" ], - "formatEN": "create container [name][image]", - "formatZH": "创建容器 [name][image]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建容器[name][image]", + "formatEN": "createcontainer[name][image]" }, "/containers/clean/log": { - "BeforeFunctions": [], "bodyKeys": [ "name" ], - "formatEN": "clean container [name] logs", - "formatZH": "清理容器 [name] 日志", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "清理容器[name]日志", + "formatEN": "cleancontainer[name]logs" }, "/containers/compose": { - "BeforeFunctions": [], "bodyKeys": [ "name" ], - "formatEN": "create compose [name]", - "formatZH": "创建 compose [name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建compose[name]", + "formatEN": "createcompose[name]" }, "/containers/compose/operate": { - "BeforeFunctions": [], "bodyKeys": [ "name", "operation" ], - "formatEN": "compose [operation] [name]", - "formatZH": "compose [operation] [name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "compose[operation][name]", + "formatEN": "compose[operation][name]" }, "/containers/compose/test": { - "BeforeFunctions": [], "bodyKeys": [ "name" ], - "formatEN": "check compose [name]", - "formatZH": "检测 compose [name] 格式", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "检测compose[name]格式", + "formatEN": "checkcompose[name]" }, "/containers/compose/update": { - "BeforeFunctions": [], "bodyKeys": [ "name" ], - "formatEN": "update compose information [name]", - "formatZH": "更新 compose [name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新compose[name]", + "formatEN": "updatecomposeinformation[name]" }, "/containers/daemonjson/update": { - "BeforeFunctions": [], "bodyKeys": [ "key", "value" ], - "formatEN": "Updated configuration [key]", - "formatZH": "更新配置 [key]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新配置[key]", + "formatEN": "Updatedconfiguration[key]" }, "/containers/daemonjson/update/byfile": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "Updated configuration file", + "paramKeys": [], + "beforeFunctions": [], "formatZH": "更新配置文件", - "paramKeys": [] + "formatEN": "Updatedconfigurationfile" }, "/containers/docker/operate": { - "BeforeFunctions": [], "bodyKeys": [ "operation" ], - "formatEN": "[operation] docker service", - "formatZH": "docker 服务 [operation]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "docker服务[operation]", + "formatEN": "[operation]dockerservice" }, "/containers/image/build": { - "BeforeFunctions": [], "bodyKeys": [ "name" ], - "formatEN": "build image [name]", - "formatZH": "构建镜像 [name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "构建镜像[name]", + "formatEN": "buildimage[name]" }, "/containers/image/load": { - "BeforeFunctions": [], "bodyKeys": [ "path" ], - "formatEN": "load image from [path]", - "formatZH": "从 [path] 加载镜像", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "从[path]加载镜像", + "formatEN": "loadimagefrom[path]" }, "/containers/image/pull": { - "BeforeFunctions": [ - { - "db": "image_repos", - "input_column": "id", - "input_value": "repoID", - "isList": false, - "output_column": "name", - "output_value": "reponame" - } - ], "bodyKeys": [ "repoID", "imageName" ], - "formatEN": "image pull [reponame][imageName]", - "formatZH": "镜像拉取 [reponame][imageName]", - "paramKeys": [] - }, - "/containers/image/push": { - "BeforeFunctions": [ + "paramKeys": [], + "beforeFunctions": [ { - "db": "image_repos", "input_column": "id", "input_value": "repoID", "isList": false, + "db": "image_repos", "output_column": "name", "output_value": "reponame" } ], + "formatZH": "镜像拉取[reponame][imageName]", + "formatEN": "imagepull[reponame][imageName]" + }, + "/containers/image/push": { "bodyKeys": [ "repoID", "tagName", "name" ], - "formatEN": "push [tagName] to [reponame][name]", - "formatZH": "[tagName] 推送到 [reponame][name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "repoID", + "isList": false, + "db": "image_repos", + "output_column": "name", + "output_value": "reponame" + } + ], + "formatZH": "[tagName]推送到[reponame][name]", + "formatEN": "push[tagName]to[reponame][name]" }, "/containers/image/remove": { - "BeforeFunctions": [], "bodyKeys": [ "names" ], - "formatEN": "remove image [names]", - "formatZH": "移除镜像 [names]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "移除镜像[names]", + "formatEN": "removeimage[names]" }, "/containers/image/save": { - "BeforeFunctions": [], "bodyKeys": [ "tagName", "path", "name" ], - "formatEN": "save [tagName] as [path]/[name]", - "formatZH": "保留 [tagName] 为 [path]/[name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "保留[tagName]为[path]/[name]", + "formatEN": "save[tagName]as[path]/[name]" }, "/containers/image/tag": { - "BeforeFunctions": [ - { - "db": "image_repos", - "input_column": "id", - "input_value": "repoID", - "isList": false, - "output_column": "name", - "output_value": "reponame" - } - ], "bodyKeys": [ "repoID", "targetName" ], - "formatEN": "tag image [reponame][targetName]", - "formatZH": "tag 镜像 [reponame][targetName]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "repoID", + "isList": false, + "db": "image_repos", + "output_column": "name", + "output_value": "reponame" + } + ], + "formatZH": "tag镜像[reponame][targetName]", + "formatEN": "tagimage[reponame][targetName]" }, "/containers/ipv6option/update": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "Updated the ipv6 option", - "formatZH": "更新 ipv6 配置", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新ipv6配置", + "formatEN": "Updatedtheipv6option" }, "/containers/logoption/update": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "Updated the log option", + "paramKeys": [], + "beforeFunctions": [], "formatZH": "更新日志配置", - "paramKeys": [] + "formatEN": "Updatedthelogoption" }, "/containers/network": { - "BeforeFunctions": [], "bodyKeys": [ "name" ], - "formatEN": "create container network [name]", - "formatZH": "创建容器网络 name", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建容器网络name", + "formatEN": "createcontainernetwork[name]" }, "/containers/network/del": { - "BeforeFunctions": [], "bodyKeys": [ "names" ], - "formatEN": "delete container network [names]", - "formatZH": "删除容器网络 [names]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "删除容器网络[names]", + "formatEN": "deletecontainernetwork[names]" }, "/containers/operate": { - "BeforeFunctions": [], "bodyKeys": [ "names", "operation" ], - "formatEN": "container [operation] [names]", - "formatZH": "容器 [names] 执行 [operation]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "容器[names]执行[operation]", + "formatEN": "container[operation][names]" }, "/containers/prune": { - "BeforeFunctions": [], "bodyKeys": [ "pruneType" ], - "formatEN": "clean container [pruneType]", - "formatZH": "清理容器 [pruneType]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "清理容器[pruneType]", + "formatEN": "cleancontainer[pruneType]" }, "/containers/rename": { - "BeforeFunctions": [], "bodyKeys": [ "name", "newName" ], - "formatEN": "rename container [name] =\u003e [newName]", - "formatZH": "容器重命名 [name] =\u003e [newName]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "容器重命名[name]=\u003e[newName]", + "formatEN": "renamecontainer[name]=\u003e[newName]" }, "/containers/repo": { - "BeforeFunctions": [], "bodyKeys": [ "name" ], - "formatEN": "create image repo [name]", - "formatZH": "创建镜像仓库 [name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建镜像仓库[name]", + "formatEN": "createimagerepo[name]" }, "/containers/repo/del": { - "BeforeFunctions": [ + "bodyKeys": [ + "ids" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "image_repos", "input_column": "id", "input_value": "ids", "isList": true, + "db": "image_repos", "output_column": "name", "output_value": "names" } ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete image repo [names]", - "formatZH": "删除镜像仓库 [names]", - "paramKeys": [] + "formatZH": "删除镜像仓库[names]", + "formatEN": "deleteimagerepo[names]" }, "/containers/repo/update": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "image_repos", "input_column": "id", "input_value": "id", "isList": false, + "db": "image_repos", "output_column": "name", "output_value": "name" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "update image repo information [name]", - "formatZH": "更新镜像仓库 [name]", - "paramKeys": [] + "formatZH": "更新镜像仓库[name]", + "formatEN": "updateimagerepoinformation[name]" }, "/containers/template": { - "BeforeFunctions": [], "bodyKeys": [ "name" ], - "formatEN": "create compose template [name]", - "formatZH": "创建 compose 模版 [name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建compose模版[name]", + "formatEN": "createcomposetemplate[name]" }, "/containers/template/del": { - "BeforeFunctions": [ + "bodyKeys": [ + "ids" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "compose_templates", "input_column": "id", "input_value": "ids", "isList": true, + "db": "compose_templates", "output_column": "name", "output_value": "names" } ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete compose template [names]", - "formatZH": "删除 compose 模版 [names]", - "paramKeys": [] + "formatZH": "删除compose模版[names]", + "formatEN": "deletecomposetemplate[names]" }, "/containers/template/update": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "compose_templates", "input_column": "id", "input_value": "id", "isList": false, + "db": "compose_templates", "output_column": "name", "output_value": "name" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "update compose template information [name]", - "formatZH": "更新 compose 模版 [name]", - "paramKeys": [] + "formatZH": "更新compose模版[name]", + "formatEN": "updatecomposetemplateinformation[name]" }, "/containers/update": { - "BeforeFunctions": [], "bodyKeys": [ "name", "image" ], - "formatEN": "update container [name][image]", - "formatZH": "更新容器 [name][image]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新容器[name][image]", + "formatEN": "updatecontainer[name][image]" }, "/containers/upgrade": { - "BeforeFunctions": [], "bodyKeys": [ "name", "image" ], - "formatEN": "upgrade container image [name][image]", - "formatZH": "更新容器镜像 [name][image]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新容器镜像[name][image]", + "formatEN": "upgradecontainerimage[name][image]" }, "/containers/volume": { - "BeforeFunctions": [], "bodyKeys": [ "name" ], - "formatEN": "create container volume [name]", - "formatZH": "创建容器存储卷 [name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建容器存储卷[name]", + "formatEN": "createcontainervolume[name]" }, "/containers/volume/del": { - "BeforeFunctions": [], "bodyKeys": [ "names" ], - "formatEN": "delete container volume [names]", - "formatZH": "删除容器存储卷 [names]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "删除容器存储卷[names]", + "formatEN": "deletecontainervolume[names]" }, "/core/backup": { - "BeforeFunctions": [], "bodyKeys": [ "type" ], - "formatEN": "create backup account [type]", - "formatZH": "创建备份账号 [type]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建备份账号[type]", + "formatEN": "createbackupaccount[type]" }, "/core/backup/del": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "backup_accounts", "input_column": "id", "input_value": "id", "isList": false, + "db": "backup_accounts", "output_column": "type", "output_value": "types" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "delete backup account [types]", - "formatZH": "删除备份账号 [types]", - "paramKeys": [] + "formatZH": "删除备份账号[types]", + "formatEN": "deletebackupaccount[types]" }, "/core/backup/update": { - "BeforeFunctions": [], "bodyKeys": [ "type" ], - "formatEN": "update backup account [types]", - "formatZH": "更新备份账号 [types]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新备份账号[types]", + "formatEN": "updatebackupaccount[types]" + }, + "/core/commands": { + "bodyKeys": [ + "name", + "command" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建快捷命令[name][command]", + "formatEN": "createquickcommand[name][command]" + }, + "/core/commands/del": { + "bodyKeys": [ + "ids" + ], + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "ids", + "isList": true, + "db": "commands", + "output_column": "name", + "output_value": "names" + } + ], + "formatZH": "删除快捷命令[names]", + "formatEN": "deletequickcommand[names]" + }, + "/core/commands/update": { + "bodyKeys": [ + "name" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新快捷命令[name]", + "formatEN": "updatequickcommand[name]" + }, + "/core/groups": { + "bodyKeys": [ + "name", + "type" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建组[name][type]", + "formatEN": "creategroup[name][type]" + }, + "/core/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]" + }, + "/core/groups/update": { + "bodyKeys": [ + "name", + "type" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新组[name][type]", + "formatEN": "updategroup[name][type]" + }, + "/core/hosts": { + "bodyKeys": [ + "name", + "addr" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建主机[name][addr]", + "formatEN": "createhost[name][addr]" + }, + "/core/hosts/del": { + "bodyKeys": [ + "ids" + ], + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "ids", + "isList": true, + "db": "hosts", + "output_column": "addr", + "output_value": "addrs" + } + ], + "formatZH": "删除主机[addrs]", + "formatEN": "deletehost[addrs]" + }, + "/core/hosts/update": { + "bodyKeys": [ + "name", + "addr" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新主机信息[name][addr]", + "formatEN": "updatehost[name][addr]" + }, + "/core/hosts/update/group": { + "bodyKeys": [ + "id", + "group" + ], + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "id", + "isList": false, + "db": "hosts", + "output_column": "addr", + "output_value": "addr" + } + ], + "formatZH": "切换主机[addr]分组=\u003e[group]", + "formatEN": "changehost[addr]group=\u003e[group]" }, "/core/logs/clean": { - "BeforeFunctions": [], "bodyKeys": [ "logType" ], - "formatEN": "Clean the [logType] log information", - "formatZH": "清空 [logType] 日志信息", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "清空[logType]日志信息", + "formatEN": "Cleanthe[logType]loginformation" }, "/core/settings/bind/update": { - "BeforeFunctions": [], "bodyKeys": [ "ipv6", "bindAddress" ], - "formatEN": "update system bind info =\u003e ipv6: [ipv6], 监听 IP: [bindAddress]", - "formatZH": "修改系统监听信息 =\u003e ipv6: [ipv6], 监听 IP: [bindAddress]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改系统监听信息=\u003eipv6:[ipv6],监听IP:[bindAddress]", + "formatEN": "updatesystembindinfo=\u003eipv6:[ipv6],监听IP:[bindAddress]" }, "/core/settings/expired/handle": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "reset an expired Password", + "paramKeys": [], + "beforeFunctions": [], "formatZH": "重置过期密码", - "paramKeys": [] + "formatEN": "resetanexpiredPassword" }, "/core/settings/menu/update": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "Hide advanced feature menu.", + "paramKeys": [], + "beforeFunctions": [], "formatZH": "隐藏高级功能菜单", - "paramKeys": [] + "formatEN": "Hideadvancedfeaturemenu." }, "/core/settings/mfa/bind": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "bind mfa", - "formatZH": "mfa 绑定", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "mfa绑定", + "formatEN": "bindmfa" }, "/core/settings/password/update": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "update system password", + "paramKeys": [], + "beforeFunctions": [], "formatZH": "修改系统密码", - "paramKeys": [] + "formatEN": "updatesystempassword" }, "/core/settings/port/update": { - "BeforeFunctions": [], "bodyKeys": [ "serverPort" ], - "formatEN": "update system port =\u003e [serverPort]", - "formatZH": "修改系统端口 =\u003e [serverPort]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改系统端口=\u003e[serverPort]", + "formatEN": "updatesystemport=\u003e[serverPort]" }, "/core/settings/proxy/update": { - "BeforeFunctions": [], "bodyKeys": [ "proxyUrl", "proxyPort" ], - "formatEN": "set proxy [proxyPort]:[proxyPort].", - "formatZH": "服务器代理配置 [proxyPort]:[proxyPort]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "服务器代理配置[proxyPort]:[proxyPort]", + "formatEN": "setproxy[proxyPort]:[proxyPort]." }, "/core/settings/ssl/update": { - "BeforeFunctions": [], "bodyKeys": [ "ssl" ], - "formatEN": "update system ssl =\u003e [ssl]", - "formatZH": "修改系统 ssl =\u003e [ssl]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改系统ssl=\u003e[ssl]", + "formatEN": "updatesystemssl=\u003e[ssl]" + }, + "/core/settings/terminal/update": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改系统终端配置", + "formatEN": "updatesystemterminalsetting" }, "/core/settings/update": { - "BeforeFunctions": [], "bodyKeys": [ "key", "value" ], - "formatEN": "update system setting [key] =\u003e [value]", - "formatZH": "修改系统配置 [key] =\u003e [value]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改系统配置[key]=\u003e[value]", + "formatEN": "updatesystemsetting[key]=\u003e[value]" }, "/core/settings/upgrade": { - "BeforeFunctions": [], "bodyKeys": [ "version" ], - "formatEN": "upgrade system =\u003e [version]", - "formatZH": "更新系统 =\u003e [version]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新系统=\u003e[version]", + "formatEN": "upgradesystem=\u003e[version]" }, "/cronjobs": { - "BeforeFunctions": [], "bodyKeys": [ "type", "name" ], - "formatEN": "create cronjob [type][name]", - "formatZH": "创建计划任务 [type][name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建计划任务[type][name]", + "formatEN": "createcronjob[type][name]" }, "/cronjobs/del": { - "BeforeFunctions": [ + "bodyKeys": [ + "ids" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "cronjobs", "input_column": "id", "input_value": "ids", "isList": true, + "db": "cronjobs", "output_column": "name", "output_value": "names" } ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete cronjob [names]", - "formatZH": "删除计划任务 [names]", - "paramKeys": [] + "formatZH": "删除计划任务[names]", + "formatEN": "deletecronjob[names]" }, "/cronjobs/download": { - "BeforeFunctions": [ + "bodyKeys": [ + "recordID" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "job_records", "input_column": "id", "input_value": "recordID", "isList": false, + "db": "job_records", "output_column": "file", "output_value": "file" } ], - "bodyKeys": [ - "recordID" - ], - "formatEN": "download the cronjob record [file]", - "formatZH": "下载计划任务记录 [file]", - "paramKeys": [] + "formatZH": "下载计划任务记录[file]", + "formatEN": "downloadthecronjobrecord[file]" }, "/cronjobs/handle": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "cronjobs", "input_column": "id", "input_value": "id", "isList": false, + "db": "cronjobs", "output_column": "name", "output_value": "name" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "manually execute the cronjob [name]", - "formatZH": "手动执行计划任务 [name]", - "paramKeys": [] + "formatZH": "手动执行计划任务[name]", + "formatEN": "manuallyexecutethecronjob[name]" }, "/cronjobs/records/clean": { - "BeforeFunctions": [ - { - "db": "cronjobs", - "input_column": "id", - "input_value": "id", - "isList": false, - "output_column": "name", - "output_value": "name" - } - ], "bodyKeys": [ "id" ], - "formatEN": "clean cronjob [name] records", - "formatZH": "清空计划任务记录 [name]", - "paramKeys": [] - }, - "/cronjobs/status": { - "BeforeFunctions": [ + "paramKeys": [], + "beforeFunctions": [ { - "db": "cronjobs", "input_column": "id", "input_value": "id", "isList": false, + "db": "cronjobs", "output_column": "name", "output_value": "name" } ], + "formatZH": "清空计划任务记录[name]", + "formatEN": "cleancronjob[name]records" + }, + "/cronjobs/status": { "bodyKeys": [ "id", "status" ], - "formatEN": "change the status of cronjob [name] to [status].", - "formatZH": "修改计划任务 [name] 状态为 [status]", - "paramKeys": [] - }, - "/cronjobs/update": { - "BeforeFunctions": [ + "paramKeys": [], + "beforeFunctions": [ { - "db": "cronjobs", "input_column": "id", "input_value": "id", "isList": false, + "db": "cronjobs", "output_column": "name", "output_value": "name" } ], + "formatZH": "修改计划任务[name]状态为[status]", + "formatEN": "changethestatusofcronjob[name]to[status]." + }, + "/cronjobs/update": { "bodyKeys": [ "id" ], - "formatEN": "update cronjob [name]", - "formatZH": "更新计划任务 [name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "id", + "isList": false, + "db": "cronjobs", + "output_column": "name", + "output_value": "name" + } + ], + "formatZH": "更新计划任务[name]", + "formatEN": "updatecronjob[name]" }, "/databases": { - "BeforeFunctions": [], "bodyKeys": [ "name" ], - "formatEN": "create mysql database [name]", - "formatZH": "创建 mysql 数据库 [name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建mysql数据库[name]", + "formatEN": "createmysqldatabase[name]" }, "/databases/bind": { - "BeforeFunctions": [], "bodyKeys": [ "database", "username" ], - "formatEN": "bind mysql database [database] [username]", - "formatZH": "绑定 mysql 数据库名 [database] [username]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "绑定mysql数据库名[database][username]", + "formatEN": "bindmysqldatabase[database][username]" }, "/databases/change/access": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "database_mysqls", "input_column": "id", "input_value": "id", "isList": false, + "db": "database_mysqls", "output_column": "name", "output_value": "name" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "Update database [name] access", - "formatZH": "更新数据库 [name] 访问权限", - "paramKeys": [] + "formatZH": "更新数据库[name]访问权限", + "formatEN": "Updatedatabase[name]access" }, "/databases/change/password": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "database_mysqls", "input_column": "id", "input_value": "id", "isList": false, + "db": "database_mysqls", "output_column": "name", "output_value": "name" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "Update database [name] password", - "formatZH": "更新数据库 [name] 密码", - "paramKeys": [] + "formatZH": "更新数据库[name]密码", + "formatEN": "Updatedatabase[name]password" }, "/databases/common/update/conf": { - "BeforeFunctions": [], "bodyKeys": [ "type", "database" ], - "formatEN": "update the [type] [database] database configuration information", - "formatZH": "更新 [type] 数据库 [database] 配置信息", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新[type]数据库[database]配置信息", + "formatEN": "updatethe[type][database]databaseconfigurationinformation" }, "/databases/db": { - "BeforeFunctions": [], "bodyKeys": [ "name", "type" ], - "formatEN": "create database [name][type]", - "formatZH": "创建远程数据库 [name][type]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建远程数据库[name][type]", + "formatEN": "createdatabase[name][type]" }, "/databases/db/check": { - "BeforeFunctions": [], "bodyKeys": [ "name", "type" ], - "formatEN": "check if database [name][type] is connectable", - "formatZH": "检测远程数据库 [name][type] 连接性", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "检测远程数据库[name][type]连接性", + "formatEN": "checkifdatabase[name][type]isconnectable" }, "/databases/db/del": { - "BeforeFunctions": [ + "bodyKeys": [ + "ids" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "databases", "input_column": "id", "input_value": "ids", "isList": true, + "db": "databases", "output_column": "name", "output_value": "names" } ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete database [names]", - "formatZH": "删除远程数据库 [names]", - "paramKeys": [] + "formatZH": "删除远程数据库[names]", + "formatEN": "deletedatabase[names]" }, "/databases/db/update": { - "BeforeFunctions": [], "bodyKeys": [ "name" ], - "formatEN": "update database [name]", - "formatZH": "更新远程数据库 [name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新远程数据库[name]", + "formatEN": "updatedatabase[name]" }, "/databases/del": { - "BeforeFunctions": [ - { - "db": "database_mysqls", - "input_column": "id", - "input_value": "id", - "isList": false, - "output_column": "name", - "output_value": "name" - } - ], "bodyKeys": [ "id" ], - "formatEN": "delete mysql database [name]", - "formatZH": "删除 mysql 数据库 [name]", - "paramKeys": [] - }, - "/databases/description/update": { - "BeforeFunctions": [ + "paramKeys": [], + "beforeFunctions": [ { - "db": "database_mysqls", "input_column": "id", "input_value": "id", "isList": false, + "db": "database_mysqls", "output_column": "name", "output_value": "name" } ], + "formatZH": "删除mysql数据库[name]", + "formatEN": "deletemysqldatabase[name]" + }, + "/databases/description/update": { "bodyKeys": [ "id", "description" ], - "formatEN": "The description of the mysql database [name] is modified =\u003e [description]", - "formatZH": "mysql 数据库 [name] 描述信息修改 [description]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "id", + "isList": false, + "db": "database_mysqls", + "output_column": "name", + "output_value": "name" + } + ], + "formatZH": "mysql数据库[name]描述信息修改[description]", + "formatEN": "Thedescriptionofthemysqldatabase[name]ismodified=\u003e[description]" }, "/databases/pg": { - "BeforeFunctions": [], "bodyKeys": [ "name" ], - "formatEN": "create postgresql database [name]", - "formatZH": "创建 postgresql 数据库 [name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建postgresql数据库[name]", + "formatEN": "createpostgresqldatabase[name]" }, "/databases/pg/bind": { - "BeforeFunctions": [], "bodyKeys": [ "name", "username" ], - "formatEN": "bind postgresql database [name] user [username]", - "formatZH": "绑定 postgresql 数据库 [name] 用户 [username]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "绑定postgresql数据库[name]用户[username]", + "formatEN": "bindpostgresqldatabase[name]user[username]" }, "/databases/pg/del": { - "BeforeFunctions": [ - { - "db": "database_postgresqls", - "input_column": "id", - "input_value": "id", - "isList": false, - "output_column": "name", - "output_value": "name" - } - ], "bodyKeys": [ "id" ], - "formatEN": "delete postgresql database [name]", - "formatZH": "删除 postgresql 数据库 [name]", - "paramKeys": [] - }, - "/databases/pg/description": { - "BeforeFunctions": [ + "paramKeys": [], + "beforeFunctions": [ { - "db": "database_postgresqls", "input_column": "id", "input_value": "id", "isList": false, + "db": "database_postgresqls", "output_column": "name", "output_value": "name" } ], + "formatZH": "删除postgresql数据库[name]", + "formatEN": "deletepostgresqldatabase[name]" + }, + "/databases/pg/description": { "bodyKeys": [ "id", "description" ], - "formatEN": "The description of the postgresql database [name] is modified =\u003e [description]", - "formatZH": "postgresql 数据库 [name] 描述信息修改 [description]", - "paramKeys": [] - }, - "/databases/pg/password": { - "BeforeFunctions": [ + "paramKeys": [], + "beforeFunctions": [ { - "db": "database_postgresqls", "input_column": "id", "input_value": "id", "isList": false, + "db": "database_postgresqls", "output_column": "name", "output_value": "name" } ], + "formatZH": "postgresql数据库[name]描述信息修改[description]", + "formatEN": "Thedescriptionofthepostgresqldatabase[name]ismodified=\u003e[description]" + }, + "/databases/pg/password": { "bodyKeys": [ "id" ], - "formatEN": "Update database [name] password", - "formatZH": "更新数据库 [name] 密码", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "id", + "isList": false, + "db": "database_postgresqls", + "output_column": "name", + "output_value": "name" + } + ], + "formatZH": "更新数据库[name]密码", + "formatEN": "Updatedatabase[name]password" }, "/databases/pg/privileges": { - "BeforeFunctions": [], "bodyKeys": [ "database", "username" ], - "formatEN": "Update [user] privileges of database [database]", - "formatZH": "更新数据库 [database] 用户 [username] 权限", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新数据库[database]用户[username]权限", + "formatEN": "Update[user]privilegesofdatabase[database]" }, "/databases/redis/conf/update": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "update the redis database configuration information", - "formatZH": "更新 redis 数据库配置信息", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新redis数据库配置信息", + "formatEN": "updatetheredisdatabaseconfigurationinformation" }, "/databases/redis/password": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "change the password of the redis database", - "formatZH": "修改 redis 数据库密码", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改redis数据库密码", + "formatEN": "changethepasswordoftheredisdatabase" }, "/databases/redis/persistence/update": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "redis database persistence configuration update", - "formatZH": "redis 数据库持久化配置更新", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "redis数据库持久化配置更新", + "formatEN": "redisdatabasepersistenceconfigurationupdate" }, "/databases/variables/update": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "adjust mysql database performance parameters", - "formatZH": "调整 mysql 数据库性能参数", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "调整mysql数据库性能参数", + "formatEN": "adjustmysqldatabaseperformanceparameters" }, "/files": { - "BeforeFunctions": [], "bodyKeys": [ "path" ], - "formatEN": "Create dir or file [path]", - "formatZH": "创建文件/文件夹 [path]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建文件/文件夹[path]", + "formatEN": "Createdirorfile[path]" }, "/files/batch/del": { - "BeforeFunctions": [], "bodyKeys": [ "paths" ], - "formatEN": "Batch delete dir or file [paths]", - "formatZH": "批量删除文件/文件夹 [paths]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "批量删除文件/文件夹[paths]", + "formatEN": "Batchdeletedirorfile[paths]" }, "/files/batch/role": { - "BeforeFunctions": [], "bodyKeys": [ "paths", "mode", "user", "group" ], - "formatEN": "Batch change file mode and owner [paths] =\u003e [mode]/[user]/[group]", - "formatZH": "批量修改文件权限和用户/组 [paths] =\u003e [mode]/[user]/[group]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "批量修改文件权限和用户/组[paths]=\u003e[mode]/[user]/[group]", + "formatEN": "Batchchangefilemodeandowner[paths]=\u003e[mode]/[user]/[group]" }, "/files/chunkdownload": { - "BeforeFunctions": [], "bodyKeys": [ "name" ], - "formatEN": "Download file [name]", - "formatZH": "下载文件 [name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "下载文件[name]", + "formatEN": "Downloadfile[name]" }, "/files/compress": { - "BeforeFunctions": [], "bodyKeys": [ "name" ], - "formatEN": "Compress file [name]", - "formatZH": "压缩文件 [name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "压缩文件[name]", + "formatEN": "Compressfile[name]" }, "/files/content": { - "BeforeFunctions": [], "bodyKeys": [ "path" ], - "formatEN": "Load file content [path]", - "formatZH": "获取文件内容 [path]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "获取文件内容[path]", + "formatEN": "Loadfilecontent[path]" }, "/files/decompress": { - "BeforeFunctions": [], "bodyKeys": [ "path" ], - "formatEN": "Decompress file [path]", - "formatZH": "解压 [path]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "解压[path]", + "formatEN": "Decompressfile[path]" }, "/files/del": { - "BeforeFunctions": [], "bodyKeys": [ "path" ], - "formatEN": "Delete dir or file [path]", - "formatZH": "删除文件/文件夹 [path]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "删除文件/文件夹[path]", + "formatEN": "Deletedirorfile[path]" }, "/files/favorite": { - "BeforeFunctions": [], "bodyKeys": [ "path" ], - "formatEN": "收藏文件/文件夹 [path]", - "formatZH": "收藏文件/文件夹 [path]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "收藏文件/文件夹[path]", + "formatEN": "收藏文件/文件夹[path]" }, "/files/favorite/del": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "favorites", "input_column": "id", "input_value": "id", "isList": false, + "db": "favorites", "output_column": "path", "output_value": "path" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "delete avorite [path]", - "formatZH": "删除收藏 [path]", - "paramKeys": [] + "formatZH": "删除收藏[path]", + "formatEN": "deleteavorite[path]" }, "/files/mode": { - "BeforeFunctions": [], "bodyKeys": [ "path", "mode" ], - "formatEN": "Change mode [paths] =\u003e [mode]", - "formatZH": "修改权限 [paths] =\u003e [mode]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改权限[paths]=\u003e[mode]", + "formatEN": "Changemode[paths]=\u003e[mode]" }, "/files/move": { - "BeforeFunctions": [], "bodyKeys": [ "oldPaths", "newPath" ], - "formatEN": "Move [oldPaths] =\u003e [newPath]", - "formatZH": "移动文件 [oldPaths] =\u003e [newPath]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "移动文件[oldPaths]=\u003e[newPath]", + "formatEN": "Move[oldPaths]=\u003e[newPath]" }, "/files/owner": { - "BeforeFunctions": [], "bodyKeys": [ "path", "user", "group" ], - "formatEN": "Change owner [paths] =\u003e [user]/[group]", - "formatZH": "修改用户/组 [paths] =\u003e [user]/[group]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改用户/组[paths]=\u003e[user]/[group]", + "formatEN": "Changeowner[paths]=\u003e[user]/[group]" }, "/files/recycle/clear": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "清空回收站", + "paramKeys": [], + "beforeFunctions": [], "formatZH": "清空回收站", - "paramKeys": [] + "formatEN": "清空回收站" }, "/files/recycle/reduce": { - "BeforeFunctions": [], "bodyKeys": [ "name" ], - "formatEN": "Reduce RecycleBin file [name]", - "formatZH": "还原回收站文件 [name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "还原回收站文件[name]", + "formatEN": "ReduceRecycleBinfile[name]" }, "/files/rename": { - "BeforeFunctions": [], "bodyKeys": [ "oldName", "newName" ], - "formatEN": "Rename [oldName] =\u003e [newName]", - "formatZH": "重命名 [oldName] =\u003e [newName]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "重命名[oldName]=\u003e[newName]", + "formatEN": "Rename[oldName]=\u003e[newName]" }, "/files/save": { - "BeforeFunctions": [], "bodyKeys": [ "path" ], - "formatEN": "Update file content [path]", - "formatZH": "更新文件内容 [path]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新文件内容[path]", + "formatEN": "Updatefilecontent[path]" }, "/files/size": { - "BeforeFunctions": [], "bodyKeys": [ "path" ], - "formatEN": "Load file size [path]", - "formatZH": "获取文件夹大小 [path]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "获取文件夹大小[path]", + "formatEN": "Loadfilesize[path]" }, "/files/upload": { - "BeforeFunctions": [], "bodyKeys": [ "path" ], - "formatEN": "Upload file [path]", - "formatZH": "上传文件 [path]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "上传文件[path]", + "formatEN": "Uploadfile[path]" }, "/files/wget": { - "BeforeFunctions": [], "bodyKeys": [ "url", "path", "name" ], - "formatEN": "Download url =\u003e [path]/[name]", - "formatZH": "下载 url =\u003e [path]/[name]", - "paramKeys": [] - }, - "/groups": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "type" - ], - "formatEN": "create group [name][type]", - "formatZH": "创建组 [name][type]", - "paramKeys": [] - }, - "/groups/del": { - "BeforeFunctions": [ - { - "db": "groups", - "input_column": "id", - "input_value": "id", - "isList": false, - "output_column": "name", - "output_value": "name" - }, - { - "db": "groups", - "input_column": "id", - "input_value": "id", - "isList": false, - "output_column": "type", - "output_value": "type" - } - ], - "bodyKeys": [ - "id" - ], - "formatEN": "delete group [type][name]", - "formatZH": "删除组 [type][name]", - "paramKeys": [] - }, - "/groups/update": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "type" - ], - "formatEN": "update group [name][type]", - "formatZH": "更新组 [name][type]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "下载url=\u003e[path]/[name]", + "formatEN": "Downloadurl=\u003e[path]/[name]" }, "/host/conffile/update": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "update SSH conf", - "formatZH": "修改 SSH 配置文件", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改SSH配置文件", + "formatEN": "updateSSHconf" }, "/host/ssh/generate": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "generate SSH secret", - "formatZH": "生成 SSH 密钥 ", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "生成SSH密钥", + "formatEN": "generateSSHsecret" }, "/host/ssh/operate": { - "BeforeFunctions": [], "bodyKeys": [ "operation" ], - "formatEN": "[operation] SSH", - "formatZH": "[operation] SSH ", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "[operation]SSH", + "formatEN": "[operation]SSH" }, "/host/ssh/update": { - "BeforeFunctions": [], "bodyKeys": [ "key", "value" ], - "formatEN": "update SSH setting [key] =\u003e [value]", - "formatZH": "修改 SSH 配置 [key] =\u003e [value]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改SSH配置[key]=\u003e[value]", + "formatEN": "updateSSHsetting[key]=\u003e[value]" }, "/host/tool/config": { - "BeforeFunctions": [], "bodyKeys": [ "operate" ], - "formatEN": "[operate] tool config", - "formatZH": "[operate] 主机工具配置文件 ", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "[operate]主机工具配置文件", + "formatEN": "[operate]toolconfig" }, "/host/tool/create": { - "BeforeFunctions": [], "bodyKeys": [ "type" ], - "formatEN": "create [type] config", - "formatZH": "创建 [type] 配置", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建[type]配置", + "formatEN": "create[type]config" }, "/host/tool/operate": { - "BeforeFunctions": [], "bodyKeys": [ "operate", "type" ], - "formatEN": "[operate] [type]", - "formatZH": "[operate] [type] ", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "[operate][type]", + "formatEN": "[operate][type]" }, "/host/tool/supervisor/process": { - "BeforeFunctions": [], "bodyKeys": [ "operate" ], - "formatEN": "[operate] process", - "formatZH": "[operate] 守护进程 ", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "[operate]守护进程", + "formatEN": "[operate]process" }, "/host/tool/supervisor/process/file": { - "BeforeFunctions": [], "bodyKeys": [ "operate" ], - "formatEN": "[operate] Supervisor Process Config file", - "formatZH": "[operate] Supervisor 进程文件 ", - "paramKeys": [] - }, - "/hosts": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "addr" - ], - "formatEN": "create host [name][addr]", - "formatZH": "创建主机 [name][addr]", - "paramKeys": [] - }, - "/hosts/command": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "command" - ], - "formatEN": "create quick command [name][command]", - "formatZH": "创建快捷命令 [name][command]", - "paramKeys": [] - }, - "/hosts/command/del": { - "BeforeFunctions": [ - { - "db": "commands", - "input_column": "id", - "input_value": "ids", - "isList": true, - "output_column": "name", - "output_value": "names" - } - ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete quick command [names]", - "formatZH": "删除快捷命令 [names]", - "paramKeys": [] - }, - "/hosts/command/redis": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "command" - ], - "formatEN": "save quick command for redis [name][command]", - "formatZH": "保存 redis 快捷命令 [name][command]", - "paramKeys": [] - }, - "/hosts/command/redis/del": { - "BeforeFunctions": [ - { - "db": "redis_commands", - "input_column": "id", - "input_value": "ids", - "isList": true, - "output_column": "name", - "output_value": "names" - } - ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete quick command of redis [names]", - "formatZH": "删除 redis 快捷命令 [names]", - "paramKeys": [] - }, - "/hosts/command/update": { - "BeforeFunctions": [], - "bodyKeys": [ - "name" - ], - "formatEN": "update quick command [name]", - "formatZH": "更新快捷命令 [name]", - "paramKeys": [] - }, - "/hosts/del": { - "BeforeFunctions": [ - { - "db": "hosts", - "input_column": "id", - "input_value": "ids", - "isList": true, - "output_column": "addr", - "output_value": "addrs" - } - ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete host [addrs]", - "formatZH": "删除主机 [addrs]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "[operate]Supervisor进程文件", + "formatEN": "[operate]SupervisorProcessConfigfile" }, "/hosts/firewall/forward": { - "BeforeFunctions": [], "bodyKeys": [ "source_port" ], - "formatEN": "update port forward rules [source_port]", - "formatZH": "更新端口转发规则 [source_port]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新端口转发规则[source_port]", + "formatEN": "updateportforwardrules[source_port]" }, "/hosts/firewall/ip": { - "BeforeFunctions": [], "bodyKeys": [ "strategy", "address" ], - "formatEN": "create address rules [strategy][address]", - "formatZH": "添加 ip 规则 [strategy] [address]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "添加ip规则[strategy][address]", + "formatEN": "createaddressrules[strategy][address]" }, "/hosts/firewall/operate": { - "BeforeFunctions": [], "bodyKeys": [ "operation" ], - "formatEN": "[operation] firewall", - "formatZH": "[operation] 防火墙", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "[operation]防火墙", + "formatEN": "[operation]firewall" }, "/hosts/firewall/port": { - "BeforeFunctions": [], "bodyKeys": [ "port", "strategy" ], - "formatEN": "create port rules [strategy][port]", - "formatZH": "添加端口规则 [strategy] [port]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "添加端口规则[strategy][port]", + "formatEN": "createportrules[strategy][port]" }, "/hosts/monitor/clean": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "clean monitor datas", + "paramKeys": [], + "beforeFunctions": [], "formatZH": "清空监控数据", - "paramKeys": [] + "formatEN": "cleanmonitordatas" }, "/hosts/monitor/setting/update": { - "BeforeFunctions": [], "bodyKeys": [ "key", "value" ], - "formatEN": "update default monitor [name]-[value]", - "formatZH": "修改默认监控网卡 [name]-[value]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改默认监控网卡[name]-[value]", + "formatEN": "updatedefaultmonitor[name]-[value]" }, - "/hosts/update": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "addr" - ], - "formatEN": "update host [name][addr]", - "formatZH": "更新主机信息 [name][addr]", - "paramKeys": [] - }, - "/hosts/update/group": { - "BeforeFunctions": [ - { - "db": "hosts", - "input_column": "id", - "input_value": "id", - "isList": false, - "output_column": "addr", - "output_value": "addr" - } - ], - "bodyKeys": [ - "id", - "group" - ], - "formatEN": "change host [addr] group =\u003e [group]", - "formatZH": "切换主机[addr]分组 =\u003e [group]", - "paramKeys": [] + "/openresty/build": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "构建OpenResty", + "formatEN": "BuildOpenResty" }, "/openresty/clear": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "Clear nginx proxy cache", - "formatZH": "清理 Openresty 代理缓存", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "清理Openresty代理缓存", + "formatEN": "Clearnginxproxycache" }, "/openresty/file": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "Update nginx conf", - "formatZH": "更新 nginx 配置", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新nginx配置", + "formatEN": "Updatenginxconf" + }, + "/openresty/module/update": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新OpenResty模块", + "formatEN": "UpdateOpenRestymodule" }, "/openresty/update": { - "BeforeFunctions": [ + "bodyKeys": [ + "websiteId" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "websites", "input_column": "id", "input_value": "websiteId", "isList": false, + "db": "websites", "output_column": "primary_domain", "output_value": "domain" } ], - "bodyKeys": [ - "websiteId" - ], - "formatEN": "Update nginx conf [domain]", - "formatZH": "更新 nginx 配置 [domain]", - "paramKeys": [] + "formatZH": "更新nginx配置[domain]", + "formatEN": "Updatenginxconf[domain]" }, "/process/stop": { - "BeforeFunctions": [], "bodyKeys": [ "PID" ], - "formatEN": "结束进程 [PID]", - "formatZH": "结束进程 [PID]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "结束进程[PID]", + "formatEN": "结束进程[PID]" }, - "/runtimes": { - "BeforeFunctions": [], + "/record/del": { "bodyKeys": [ - "name" + "ids" ], - "formatEN": "Create runtime [name]", - "formatZH": "创建运行环境 [name]", - "paramKeys": [] - }, - "/runtimes/del": { - "BeforeFunctions": [], - "bodyKeys": [ - "id" - ], - "formatEN": "Delete website [name]", - "formatZH": "删除网站 [name]", - "paramKeys": [] - }, - "/runtimes/operate": { - "BeforeFunctions": [], - "bodyKeys": [ - "id" - ], - "formatEN": "Operate runtime [name]", - "formatZH": "操作运行环境 [name]", - "paramKeys": [] - }, - "/runtimes/update": { - "BeforeFunctions": [], - "bodyKeys": [ - "name" - ], - "formatEN": "Update runtime [name]", - "formatZH": "更新运行环境 [name]", - "paramKeys": [] - }, - "/settings/backup/backup": { - "BeforeFunctions": [], - "bodyKeys": [ - "type", - "name", - "detailName" - ], - "formatEN": "backup [type] data [name][detailName]", - "formatZH": "备份 [type] 数据 [name][detailName]", - "paramKeys": [] - }, - "/settings/backup/record/del": { - "BeforeFunctions": [ + "paramKeys": [], + "beforeFunctions": [ { - "db": "backup_records", "input_column": "id", "input_value": "ids", "isList": true, + "db": "backup_records", "output_column": "file_name", "output_value": "files" } ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete backup records [files]", - "formatZH": "删除备份记录 [files]", - "paramKeys": [] + "formatZH": "删除备份记录[files]", + "formatEN": "deletebackuprecords[files]" }, - "/settings/backup/record/download": { - "BeforeFunctions": [], + "/runtimes": { "bodyKeys": [ - "source", - "fileName" + "name" ], - "formatEN": "download backup records [source][fileName]", - "formatZH": "下载备份记录 [source][fileName]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建运行环境[name]", + "formatEN": "Createruntime[name]" }, - "/settings/backup/recover": { - "BeforeFunctions": [], + "/runtimes/del": { "bodyKeys": [ - "type", - "name", - "detailName", - "file" + "id" ], - "formatEN": "recover [type] data [name][detailName] from [file]", - "formatZH": "从 [file] 恢复 [type] 数据 [name][detailName]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "删除网站[name]", + "formatEN": "Deletewebsite[name]" }, - "/settings/backup/recover/byupload": { - "BeforeFunctions": [], + "/runtimes/operate": { "bodyKeys": [ - "type", - "name", - "detailName", - "file" + "id" ], - "formatEN": "recover [type] data [name][detailName] from [file]", - "formatZH": "从 [file] 恢复 [type] 数据 [name][detailName]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "操作运行环境[name]", + "formatEN": "Operateruntime[name]" + }, + "/runtimes/php/config": { + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "id", + "isList": false, + "db": "websites", + "output_column": "primary_domain", + "output_value": "domain" + } + ], + "formatZH": "[domain]PHP配置修改", + "formatEN": "[domain]PHPconfupdate" + }, + "/runtimes/php/update": { + "bodyKeys": [ + "websiteId" + ], + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "websiteId", + "isList": false, + "db": "websites", + "output_column": "primary_domain", + "output_value": "domain" + } + ], + "formatZH": "php配置修改[domain]", + "formatEN": "Nginxconfupdate[domain]" + }, + "/runtimes/update": { + "bodyKeys": [ + "name" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新运行环境[name]", + "formatEN": "Updateruntime[name]" }, "/settings/snapshot": { - "BeforeFunctions": [], "bodyKeys": [ "from", "description" ], - "formatEN": "Create system backup [description] to [from]", - "formatZH": "创建系统快照 [description] 到 [from]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建系统快照[description]到[from]", + "formatEN": "Createsystembackup[description]to[from]" }, "/settings/snapshot/del": { - "BeforeFunctions": [ - { - "db": "snapshots", - "input_column": "id", - "input_value": "ids", - "isList": true, - "output_column": "name", - "output_value": "name" - } - ], "bodyKeys": [ "ids" ], - "formatEN": "Delete system backup [name]", - "formatZH": "删除系统快照 [name]", - "paramKeys": [] - }, - "/settings/snapshot/description/update": { - "BeforeFunctions": [ + "paramKeys": [], + "beforeFunctions": [ { - "db": "snapshots", "input_column": "id", - "input_value": "id", - "isList": false, + "input_value": "ids", + "isList": true, + "db": "snapshots", "output_column": "name", "output_value": "name" } ], + "formatZH": "删除系统快照[name]", + "formatEN": "Deletesystembackup[name]" + }, + "/settings/snapshot/description/update": { "bodyKeys": [ "id", "description" ], - "formatEN": "The description of the snapshot [name] is modified =\u003e [description]", - "formatZH": "快照 [name] 描述信息修改 [description]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "id", + "isList": false, + "db": "snapshots", + "output_column": "name", + "output_value": "name" + } + ], + "formatZH": "快照[name]描述信息修改[description]", + "formatEN": "Thedescriptionofthesnapshot[name]ismodified=\u003e[description]" }, "/settings/snapshot/import": { - "BeforeFunctions": [], "bodyKeys": [ "from", "names" ], - "formatEN": "Sync system snapshots [names] from [from]", - "formatZH": "从 [from] 同步系统快照 [names]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "从[from]同步系统快照[names]", + "formatEN": "Syncsystemsnapshots[names]from[from]" }, "/settings/snapshot/recover": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "snapshots", "input_column": "id", "input_value": "id", "isList": false, + "db": "snapshots", "output_column": "name", "output_value": "name" } ], + "formatZH": "从系统快照[name]恢复", + "formatEN": "Recoverfromsystembackup[name]" + }, + "/settings/snapshot/recrete": { "bodyKeys": [ "id" ], - "formatEN": "Recover from system backup [name]", - "formatZH": "从系统快照 [name] 恢复", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "id", + "isList": false, + "db": "snapshots", + "output_column": "name", + "output_value": "name" + } + ], + "formatZH": "重试创建快照[name]", + "formatEN": "recretethesnapshot[name]" }, "/settings/snapshot/rollback": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "snapshots", "input_column": "id", "input_value": "id", "isList": false, + "db": "snapshots", "output_column": "name", "output_value": "name" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "Rollback from system backup [name]", - "formatZH": "从系统快照 [name] 回滚", - "paramKeys": [] + "formatZH": "从系统快照[name]回滚", + "formatEN": "Rollbackfromsystembackup[name]" }, "/settings/update": { - "BeforeFunctions": [], "bodyKeys": [ "key", "value" ], - "formatEN": "update system setting [key] =\u003e [value]", - "formatZH": "修改系统配置 [key] =\u003e [value]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改系统配置[key]=\u003e[value]", + "formatEN": "updatesystemsetting[key]=\u003e[value]" }, "/toolbox/clam": { - "BeforeFunctions": [], "bodyKeys": [ "name", "path" ], - "formatEN": "create clam [name][path]", - "formatZH": "创建扫描规则 [name][path]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建扫描规则[name][path]", + "formatEN": "createclam[name][path]" }, "/toolbox/clam/del": { - "BeforeFunctions": [ + "bodyKeys": [ + "ids" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "clams", "input_column": "id", "input_value": "ids", "isList": true, + "db": "clams", "output_column": "name", "output_value": "names" } ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete clam [names]", - "formatZH": "删除扫描规则 [names]", - "paramKeys": [] + "formatZH": "删除扫描规则[names]", + "formatEN": "deleteclam[names]" }, "/toolbox/clam/handle": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "clams", "input_column": "id", "input_value": "id", "isList": true, + "db": "clams", "output_column": "name", "output_value": "name" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "handle clam scan [name]", - "formatZH": "执行病毒扫描 [name]", - "paramKeys": [] + "formatZH": "执行病毒扫描[name]", + "formatEN": "handleclamscan[name]" }, "/toolbox/clam/operate": { - "BeforeFunctions": [], "bodyKeys": [ "operation" ], - "formatEN": "[operation] FTP", - "formatZH": "[operation] Clam", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "[operation]Clam", + "formatEN": "[operation]FTP" }, "/toolbox/clam/record/clean": { - "BeforeFunctions": [ - { - "db": "clams", - "input_column": "id", - "input_value": "id", - "isList": true, - "output_column": "name", - "output_value": "name" - } - ], "bodyKeys": [ "id" ], - "formatEN": "clean clam record [name]", - "formatZH": "清空扫描报告 [name]", - "paramKeys": [] - }, - "/toolbox/clam/status/update": { - "BeforeFunctions": [ + "paramKeys": [], + "beforeFunctions": [ { - "db": "clams", "input_column": "id", "input_value": "id", - "isList": false, + "isList": true, + "db": "clams", "output_column": "name", "output_value": "name" } ], + "formatZH": "清空扫描报告[name]", + "formatEN": "cleanclamrecord[name]" + }, + "/toolbox/clam/status/update": { "bodyKeys": [ "id", "status" ], - "formatEN": "change the status of clam [name] to [status].", - "formatZH": "修改扫描规则 [name] 状态为 [status]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "id", + "isList": false, + "db": "clams", + "output_column": "name", + "output_value": "name" + } + ], + "formatZH": "修改扫描规则[name]状态为[status]", + "formatEN": "changethestatusofclam[name]to[status]." }, "/toolbox/clam/update": { - "BeforeFunctions": [], "bodyKeys": [ "name", "path" ], - "formatEN": "update clam [name][path]", - "formatZH": "修改扫描规则 [name][path]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改扫描规则[name][path]", + "formatEN": "updateclam[name][path]" }, "/toolbox/clean": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "Clean system junk files", + "paramKeys": [], + "beforeFunctions": [], "formatZH": "清理系统垃圾文件", - "paramKeys": [] + "formatEN": "Cleansystemjunkfiles" }, "/toolbox/device/update/conf": { - "BeforeFunctions": [], "bodyKeys": [ "key", "value" ], - "formatEN": "update device conf [key] =\u003e [value]", - "formatZH": "修改主机参数 [key] =\u003e [value]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改主机参数[key]=\u003e[value]", + "formatEN": "updatedeviceconf[key]=\u003e[value]" }, "/toolbox/device/update/host": { - "BeforeFunctions": [], "bodyKeys": [ "key", "value" ], - "formatEN": "update device host [key] =\u003e [value]", - "formatZH": "修改主机 Host [key] =\u003e [value]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改主机Host[key]=\u003e[value]", + "formatEN": "updatedevicehost[key]=\u003e[value]" }, "/toolbox/device/update/swap": { - "BeforeFunctions": [], "bodyKeys": [ "operate", "path" ], - "formatEN": "[operate] device swap [path]", - "formatZH": "[operate] 主机 swap [path]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "[operate]主机swap[path]", + "formatEN": "[operate]deviceswap[path]" }, "/toolbox/fail2ban/operate": { - "BeforeFunctions": [], "bodyKeys": [ "operation" ], - "formatEN": "[operation] Fail2ban", - "formatZH": "[operation] Fail2ban", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "[operation]Fail2ban", + "formatEN": "[operation]Fail2ban" }, "/toolbox/fail2ban/update": { - "BeforeFunctions": [], "bodyKeys": [ "key", "value" ], - "formatEN": "update fail2ban conf [key] =\u003e [value]", - "formatZH": "修改 Fail2ban 配置 [key] =\u003e [value]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改Fail2ban配置[key]=\u003e[value]", + "formatEN": "updatefail2banconf[key]=\u003e[value]" }, "/toolbox/ftp": { - "BeforeFunctions": [], "bodyKeys": [ "user", "path" ], - "formatEN": "create FTP [user][path]", - "formatZH": "创建 FTP 账户 [user][path]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建FTP账户[user][path]", + "formatEN": "createFTP[user][path]" }, "/toolbox/ftp/del": { - "BeforeFunctions": [ + "bodyKeys": [ + "ids" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "ftps", "input_column": "id", "input_value": "ids", "isList": true, + "db": "ftps", "output_column": "user", "output_value": "users" } ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete FTP users [users]", - "formatZH": "删除 FTP 账户 [users]", - "paramKeys": [] + "formatZH": "删除FTP账户[users]", + "formatEN": "deleteFTPusers[users]" }, "/toolbox/ftp/operate": { - "BeforeFunctions": [], "bodyKeys": [ "operation" ], - "formatEN": "[operation] FTP", - "formatZH": "[operation] FTP", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "[operation]FTP", + "formatEN": "[operation]FTP" }, "/toolbox/ftp/sync": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "sync FTP users", - "formatZH": "同步 FTP 账户", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "同步FTP账户", + "formatEN": "syncFTPusers" }, "/toolbox/ftp/update": { - "BeforeFunctions": [], "bodyKeys": [ "user", "path" ], - "formatEN": "update FTP [user][path]", - "formatZH": "修改 FTP 账户 [user][path]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "修改FTP账户[user][path]", + "formatEN": "updateFTP[user][path]" }, "/toolbox/scan": { - "BeforeFunctions": [], "bodyKeys": [], - "formatEN": "scan System Junk Files", + "paramKeys": [], + "beforeFunctions": [], "formatZH": "扫描系统垃圾文件", - "paramKeys": [] + "formatEN": "scanSystemJunkFiles" }, "/websites": { - "BeforeFunctions": [], "bodyKeys": [ "primaryDomain" ], - "formatEN": "Create website [primaryDomain]", - "formatZH": "创建网站 [primaryDomain]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建网站[primaryDomain]", + "formatEN": "Createwebsite[primaryDomain]" }, "/websites/:id/https": { - "BeforeFunctions": [ + "bodyKeys": [ + "websiteId" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "websites", "input_column": "id", "input_value": "websiteId", "isList": false, + "db": "websites", "output_column": "primary_domain", "output_value": "domain" } ], - "bodyKeys": [ - "websiteId" - ], - "formatEN": "Update website https [domain] conf", - "formatZH": "更新网站 [domain] https 配置", - "paramKeys": [] + "formatZH": "更新网站[domain]https配置", + "formatEN": "Updatewebsitehttps[domain]conf" }, "/websites/acme": { - "BeforeFunctions": [], "bodyKeys": [ "email" ], - "formatEN": "Create website acme [email]", - "formatZH": "创建网站 acme [email]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建网站acme[email]", + "formatEN": "Createwebsiteacme[email]" }, "/websites/acme/del": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "website_acme_accounts", "input_column": "id", "input_value": "id", "isList": false, + "db": "website_acme_accounts", "output_column": "email", "output_value": "email" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "Delete website acme [email]", - "formatZH": "删除网站 acme [email]", - "paramKeys": [] + "formatZH": "删除网站acme[email]", + "formatEN": "Deletewebsiteacme[email]" }, "/websites/ca": { - "BeforeFunctions": [], "bodyKeys": [ "name" ], - "formatEN": "Create website ca [name]", - "formatZH": "创建网站 ca [name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建网站ca[name]", + "formatEN": "Createwebsiteca[name]" }, "/websites/ca/del": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "website_cas", "input_column": "id", "input_value": "id", "isList": false, + "db": "website_cas", "output_column": "name", "output_value": "name" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "Delete website ca [name]", - "formatZH": "删除网站 ca [name]", - "paramKeys": [] + "formatZH": "删除网站ca[name]", + "formatEN": "Deletewebsiteca[name]" }, "/websites/ca/download": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "website_cas", "input_column": "id", "input_value": "id", "isList": false, + "db": "website_cas", "output_column": "name", "output_value": "name" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "download ca file [name]", - "formatZH": "下载 CA 证书文件 [name]", - "paramKeys": [] + "formatZH": "下载CA证书文件[name]", + "formatEN": "downloadcafile[name]" }, "/websites/ca/obtain": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "website_cas", "input_column": "id", "input_value": "id", "isList": false, + "db": "website_cas", "output_column": "name", "output_value": "name" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "Obtain SSL [name]", - "formatZH": "自签 SSL 证书 [name]", - "paramKeys": [] + "formatZH": "自签SSL证书[name]", + "formatEN": "ObtainSSL[name]" }, "/websites/ca/renew": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "website_cas", "input_column": "id", "input_value": "id", "isList": false, + "db": "website_cas", "output_column": "name", "output_value": "name" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "Obtain SSL [name]", - "formatZH": "自签 SSL 证书 [name]", - "paramKeys": [] + "formatZH": "自签SSL证书[name]", + "formatEN": "ObtainSSL[name]" }, "/websites/config/update": { - "BeforeFunctions": [ - { - "db": "websites", - "input_column": "id", - "input_value": "websiteId", - "isList": false, - "output_column": "primary_domain", - "output_value": "domain" - } - ], "bodyKeys": [ "websiteId" ], - "formatEN": "Nginx conf update [domain]", - "formatZH": "nginx 配置修改 [domain]", - "paramKeys": [] - }, - "/websites/default/html/update": { - "BeforeFunctions": [], - "bodyKeys": [ - "type" - ], - "formatEN": "Update default html", - "formatZH": "更新默认 html", - "paramKeys": [] - }, - "/websites/default/server": { - "BeforeFunctions": [ + "paramKeys": [], + "beforeFunctions": [ { - "db": "websites", "input_column": "id", - "input_value": "id", + "input_value": "websiteId", "isList": false, + "db": "websites", "output_column": "primary_domain", "output_value": "domain" } ], + "formatZH": "nginx配置修改[domain]", + "formatEN": "Nginxconfupdate[domain]" + }, + "/websites/default/html/update": { + "bodyKeys": [ + "type" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新默认html", + "formatEN": "Updatedefaulthtml" + }, + "/websites/default/server": { "bodyKeys": [ "id", "operate" ], - "formatEN": "Change default server =\u003e [domain]", - "formatZH": "修改默认 server =\u003e [domain]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "id", + "isList": false, + "db": "websites", + "output_column": "primary_domain", + "output_value": "domain" + } + ], + "formatZH": "修改默认server=\u003e[domain]", + "formatEN": "Changedefaultserver=\u003e[domain]" }, "/websites/del": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "websites", "input_column": "id", "input_value": "id", "isList": false, + "db": "websites", "output_column": "primary_domain", "output_value": "domain" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "Delete website [domain]", - "formatZH": "删除网站 [domain]", - "paramKeys": [] + "formatZH": "删除网站[domain]", + "formatEN": "Deletewebsite[domain]" }, "/websites/dir/permission": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "websites", "input_column": "id", "input_value": "id", "isList": false, + "db": "websites", "output_column": "primary_domain", "output_value": "domain" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "Update domain [domain] dir permission", - "formatZH": "更新网站 [domain] 目录权限", - "paramKeys": [] + "formatZH": "更新网站[domain]目录权限", + "formatEN": "Updatedomain[domain]dirpermission" }, "/websites/dir/update": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "websites", "input_column": "id", "input_value": "id", "isList": false, + "db": "websites", "output_column": "primary_domain", "output_value": "domain" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "Update domain [domain] dir", - "formatZH": "更新网站 [domain] 目录", - "paramKeys": [] + "formatZH": "更新网站[domain]目录", + "formatEN": "Updatedomain[domain]dir" }, "/websites/dns": { - "BeforeFunctions": [], "bodyKeys": [ "name" ], - "formatEN": "Create website dns [name]", - "formatZH": "创建网站 dns [name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建网站dns[name]", + "formatEN": "Createwebsitedns[name]" }, "/websites/dns/del": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "website_dns_accounts", "input_column": "id", "input_value": "id", "isList": false, + "db": "website_dns_accounts", "output_column": "name", "output_value": "name" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "Delete website dns [name]", - "formatZH": "删除网站 dns [name]", - "paramKeys": [] + "formatZH": "删除网站dns[name]", + "formatEN": "Deletewebsitedns[name]" }, "/websites/dns/update": { - "BeforeFunctions": [], "bodyKeys": [ "name" ], - "formatEN": "Update website dns [name]", - "formatZH": "更新网站 dns [name]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新网站dns[name]", + "formatEN": "Updatewebsitedns[name]" }, "/websites/domains": { - "BeforeFunctions": [], "bodyKeys": [ "domain" ], - "formatEN": "Create domain [domain]", - "formatZH": "创建域名 [domain]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建域名[domain]", + "formatEN": "Createdomain[domain]" }, "/websites/domains/del": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "website_domains", "input_column": "id", "input_value": "id", "isList": false, + "db": "website_domains", "output_column": "domain", "output_value": "domain" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "Delete domain [domain]", - "formatZH": "删除域名 [domain]", - "paramKeys": [] + "formatZH": "删除域名[domain]", + "formatEN": "Deletedomain[domain]" }, "/websites/domains/update": { - "BeforeFunctions": [ + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "website_domains", "input_column": "id", "input_value": "id", "isList": false, + "db": "website_domains", "output_column": "domain", "output_value": "domain" } ], - "bodyKeys": [ - "id" - ], - "formatEN": "Update domain [domain]", - "formatZH": "更新域名 [domain]", - "paramKeys": [] + "formatZH": "更新域名[domain]", + "formatEN": "Updatedomain[domain]" }, "/websites/log": { - "BeforeFunctions": [ - { - "db": "websites", - "input_column": "id", - "input_value": "id", - "isList": false, - "output_column": "primary_domain", - "output_value": "domain" - } - ], "bodyKeys": [ "id", "operate" ], - "formatEN": "[domain][operate] logs", - "formatZH": "[domain][operate] 日志", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "id", + "isList": false, + "db": "websites", + "output_column": "primary_domain", + "output_value": "domain" + } + ], + "formatZH": "[domain][operate]日志", + "formatEN": "[domain][operate]logs" }, "/websites/nginx/update": { - "BeforeFunctions": [ - { - "db": "websites", - "input_column": "id", - "input_value": "id", - "isList": false, - "output_column": "primary_domain", - "output_value": "domain" - } - ], "bodyKeys": [ "id" ], - "formatEN": "[domain] Nginx conf update", - "formatZH": "[domain] Nginx 配置修改", - "paramKeys": [] - }, - "/websites/operate": { - "BeforeFunctions": [ + "paramKeys": [], + "beforeFunctions": [ { - "db": "websites", "input_column": "id", "input_value": "id", "isList": false, + "db": "websites", "output_column": "primary_domain", "output_value": "domain" } ], + "formatZH": "[domain]Nginx配置修改", + "formatEN": "[domain]Nginxconfupdate" + }, + "/websites/operate": { "bodyKeys": [ "id", "operate" ], - "formatEN": "[operate] website [domain]", - "formatZH": "[operate] 网站 [domain]", - "paramKeys": [] - }, - "/websites/php/config": { - "BeforeFunctions": [ + "paramKeys": [], + "beforeFunctions": [ { - "db": "websites", "input_column": "id", "input_value": "id", "isList": false, - "output_column": "primary_domain", - "output_value": "domain" - } - ], - "bodyKeys": [ - "id" - ], - "formatEN": "[domain] PHP conf update", - "formatZH": "[domain] PHP 配置修改", - "paramKeys": [] - }, - "/websites/php/update": { - "BeforeFunctions": [ - { "db": "websites", - "input_column": "id", - "input_value": "websiteId", - "isList": false, "output_column": "primary_domain", "output_value": "domain" } ], - "bodyKeys": [ - "websiteId" - ], - "formatEN": "Nginx conf update [domain]", - "formatZH": "php 配置修改 [domain]", - "paramKeys": [] + "formatZH": "[operate]网站[domain]", + "formatEN": "[operate]website[domain]" }, "/websites/php/version": { - "BeforeFunctions": [ - { - "db": "websites", - "input_column": "id", - "input_value": "websiteId", - "isList": false, - "output_column": "primary_domain", - "output_value": "domain" - } - ], "bodyKeys": [ "websiteId" ], - "formatEN": "php version update [domain]", - "formatZH": "php 版本变更 [domain]", - "paramKeys": [] - }, - "/websites/proxies/update": { - "BeforeFunctions": [ + "paramKeys": [], + "beforeFunctions": [ { - "db": "websites", "input_column": "id", - "input_value": "id", + "input_value": "websiteId", "isList": false, + "db": "websites", "output_column": "primary_domain", "output_value": "domain" } ], + "formatZH": "php版本变更[domain]", + "formatEN": "phpversionupdate[domain]" + }, + "/websites/proxies/update": { "bodyKeys": [ "id" ], - "formatEN": "Update domain [domain] proxy config", - "formatZH": "修改网站 [domain] 反向代理配置 ", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "id", + "isList": false, + "db": "websites", + "output_column": "primary_domain", + "output_value": "domain" + } + ], + "formatZH": "修改网站[domain]反向代理配置", + "formatEN": "Updatedomain[domain]proxyconfig" }, "/websites/proxy/file": { - "BeforeFunctions": [ + "bodyKeys": [ + "websiteID" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "websites", "input_column": "id", "input_value": "websiteID", "isList": false, + "db": "websites", "output_column": "primary_domain", "output_value": "domain" } ], + "formatZH": "更新反向代理文件[domain]", + "formatEN": "Nginxconfproxyfileupdate[domain]" + }, + "/websites/realip": { "bodyKeys": [ "websiteID" ], - "formatEN": "Nginx conf proxy file update [domain]", - "formatZH": "更新反向代理文件 [domain]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "websiteID", + "isList": false, + "db": "websites", + "output_column": "primary_domain", + "output_value": "domain" + } + ], + "formatZH": "修改[domain]网站真实IP配置", + "formatEN": "ModifytherealIPconfigurationof[domain]website" }, "/websites/redirect/file": { - "BeforeFunctions": [ + "bodyKeys": [ + "websiteID" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "websites", "input_column": "id", "input_value": "websiteID", "isList": false, + "db": "websites", "output_column": "primary_domain", "output_value": "domain" } ], - "bodyKeys": [ - "websiteID" - ], - "formatEN": "Nginx conf redirect file update [domain]", - "formatZH": "更新重定向文件 [domain]", - "paramKeys": [] + "formatZH": "更新重定向文件[domain]", + "formatEN": "Nginxconfredirectfileupdate[domain]" }, "/websites/redirect/update": { - "BeforeFunctions": [ + "bodyKeys": [ + "websiteID" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "websites", "input_column": "id", "input_value": "websiteID", "isList": false, + "db": "websites", "output_column": "primary_domain", "output_value": "domain" } ], - "bodyKeys": [ - "websiteID" - ], - "formatEN": "Update domain [domain] redirect config", - "formatZH": "修改网站 [domain] 重定向理配置 ", - "paramKeys": [] + "formatZH": "修改网站[domain]重定向理配置", + "formatEN": "Updatedomain[domain]redirectconfig" }, "/websites/rewrite/update": { - "BeforeFunctions": [ + "bodyKeys": [ + "websiteID" + ], + "paramKeys": [], + "beforeFunctions": [ { - "db": "websites", "input_column": "id", "input_value": "websiteID", "isList": false, + "db": "websites", "output_column": "primary_domain", "output_value": "domain" } ], - "bodyKeys": [ - "websiteID" - ], - "formatEN": "Nginx conf rewrite update [domain]", - "formatZH": "伪静态配置修改 [domain]", - "paramKeys": [] + "formatZH": "伪静态配置修改[domain]", + "formatEN": "Nginxconfrewriteupdate[domain]" }, "/websites/ssl": { - "BeforeFunctions": [], "bodyKeys": [ "primaryDomain" ], - "formatEN": "Create website ssl [primaryDomain]", - "formatZH": "创建网站 ssl [primaryDomain]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "创建网站ssl[primaryDomain]", + "formatEN": "Createwebsitessl[primaryDomain]" }, "/websites/ssl/del": { - "BeforeFunctions": [ - { - "db": "website_ssls", - "input_column": "id", - "input_value": "ids", - "isList": true, - "output_column": "primary_domain", - "output_value": "domain" - } - ], "bodyKeys": [ "ids" ], - "formatEN": "Delete ssl [domain]", - "formatZH": "删除 ssl [domain]", - "paramKeys": [] - }, - "/websites/ssl/download": { - "BeforeFunctions": [ + "paramKeys": [], + "beforeFunctions": [ { - "db": "website_ssls", "input_column": "id", - "input_value": "id", - "isList": false, + "input_value": "ids", + "isList": true, + "db": "website_ssls", "output_column": "primary_domain", "output_value": "domain" } ], + "formatZH": "删除ssl[domain]", + "formatEN": "Deletessl[domain]" + }, + "/websites/ssl/download": { "bodyKeys": [ "id" ], - "formatEN": "download ssl file [domain]", - "formatZH": "下载证书文件 [domain]", - "paramKeys": [] - }, - "/websites/ssl/obtain": { - "BeforeFunctions": [ + "paramKeys": [], + "beforeFunctions": [ { - "db": "website_ssls", "input_column": "id", - "input_value": "ID", + "input_value": "id", "isList": false, + "db": "website_ssls", "output_column": "primary_domain", "output_value": "domain" } ], + "formatZH": "下载证书文件[domain]", + "formatEN": "downloadsslfile[domain]" + }, + "/websites/ssl/obtain": { "bodyKeys": [ "ID" ], - "formatEN": "apply ssl [domain]", - "formatZH": "申请证书 [domain]", - "paramKeys": [] - }, - "/websites/ssl/update": { - "BeforeFunctions": [ + "paramKeys": [], + "beforeFunctions": [ { - "db": "website_ssls", "input_column": "id", - "input_value": "id", + "input_value": "ID", "isList": false, + "db": "website_ssls", "output_column": "primary_domain", "output_value": "domain" } ], + "formatZH": "申请证书[domain]", + "formatEN": "applyssl[domain]" + }, + "/websites/ssl/update": { "bodyKeys": [ "id" ], - "formatEN": "Update ssl config [domain]", - "formatZH": "更新证书设置 [domain]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "id", + "isList": false, + "db": "website_ssls", + "output_column": "primary_domain", + "output_value": "domain" + } + ], + "formatZH": "更新证书设置[domain]", + "formatEN": "Updatesslconfig[domain]" }, "/websites/ssl/upload": { - "BeforeFunctions": [], "bodyKeys": [ "type" ], - "formatEN": "Upload ssl [type]", - "formatZH": "上传 ssl [type]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "上传ssl[type]", + "formatEN": "Uploadssl[type]" }, "/websites/update": { - "BeforeFunctions": [], "bodyKeys": [ "primaryDomain" ], - "formatEN": "Update website [primaryDomain]", - "formatZH": "更新网站 [primaryDomain]", - "paramKeys": [] + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新网站[primaryDomain]", + "formatEN": "Updatewebsite[primaryDomain]" + }, + "/xpack/licenses/sync": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "同步许可证信息", + "formatEN": "synclicenseinfo" + }, + "/xpack/licenses/unbind": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "解绑许可证", + "formatEN": "unbindlicense" + }, + "/xpack/licenses/upload": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "导入许可证", + "formatEN": "importlicense" + }, + "/xpack/tampers/batch/update": { + "bodyKeys": [ + "ids", + "status" + ], + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "ids", + "isList": true, + "db": "tampers", + "output_column": "website", + "output_value": "website" + } + ], + "formatZH": "批量修改防篡改状态[website]=\u003e[status]", + "formatEN": "batchupdatetamperinfo[website]=\u003e[status]" + }, + "/xpack/tampers/template": { + "bodyKeys": [ + "name", + "content" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "保存防篡改模版[name]-[content]", + "formatEN": "savetampertemplateinfo[name]-[content]" + }, + "/xpack/tampers/template/del": { + "bodyKeys": [ + "id" + ], + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "id", + "isList": false, + "db": "tampers", + "output_column": "name", + "output_value": "name" + } + ], + "formatZH": "删除防篡改模版[name]", + "formatEN": "deletetampertemplate[name]" + }, + "/xpack/tampers/update": { + "bodyKeys": [ + "website" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新防篡改信息[website]", + "formatEN": "updatetamperinfo[website]" + }, + "/xpack/xsetting/reset": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "重置界面设置", + "formatEN": "resetsetting" + }, + "/xpack/xsetting/update": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新界面设置", + "formatEN": "updatesetting" + }, + "/xpack/xsetting/update/item": { + "bodyKeys": [ + "key", + "value" + ], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "更新界面设置[key]=\u003e[value]", + "formatEN": "updatesetting[key]=\u003e[value]" } } \ No newline at end of file diff --git a/core/app/api/v2/host.go b/core/app/api/v2/host.go index 0d4c0bd0a..f5ed73055 100644 --- a/core/app/api/v2/host.go +++ b/core/app/api/v2/host.go @@ -138,7 +138,7 @@ func (b *BaseApi) SearchHost(c *gin.Context) { // @Summary Delete host // @Description 删除主机 // @Accept json -// @Param request body dto.BatchDeleteReq true "request" +// @Param request body dto.OperateByIDs true "request" // @Success 200 // @Security ApiKeyAuth // @Router /core/hosts/del [post] diff --git a/core/middleware/operation.go b/core/middleware/operation.go index bf96e63fe..dc46580e2 100644 --- a/core/middleware/operation.go +++ b/core/middleware/operation.go @@ -7,6 +7,7 @@ import ( "fmt" "io" "net/http" + "path" "strings" "time" @@ -15,8 +16,9 @@ import ( "github.com/1Panel-dev/1Panel/core/app/service" "github.com/1Panel-dev/1Panel/core/constant" "github.com/1Panel-dev/1Panel/core/global" - "github.com/1Panel-dev/1Panel/core/utils/copier" "github.com/gin-gonic/gin" + "github.com/glebarez/sqlite" + "gorm.io/gorm" ) func OperationLog() gin.HandlerFunc { @@ -36,43 +38,16 @@ func OperationLog() gin.HandlerFunc { Path: pathItem, UserAgent: c.Request.UserAgent(), } - var ( - swagger swaggerJson - operationDic operationJson - ) + swagger := make(map[string]operationJson) if err := json.Unmarshal(docs.XLogJson, &swagger); err != nil { c.Next() return } - path, hasPath := swagger.Paths[record.Path] + operationDic, hasPath := swagger[record.Path] if !hasPath { c.Next() return } - methodMap, isMethodMap := path.(map[string]interface{}) - if !isMethodMap { - c.Next() - return - } - dataMap, hasPost := methodMap["post"] - if !hasPost { - c.Next() - return - } - data, isDataMap := dataMap.(map[string]interface{}) - if !isDataMap { - c.Next() - return - } - xlog, hasXlog := data["x-panel-log"] - if !hasXlog { - c.Next() - return - } - if err := copier.Copy(&operationDic, xlog); err != nil { - c.Next() - return - } if len(operationDic.FormatZH) == 0 { c.Next() return @@ -93,21 +68,27 @@ func OperationLog() gin.HandlerFunc { } } if len(operationDic.BeforeFunctions) != 0 { + dbItem, err := newDB(record.Path) + if err != nil { + c.Next() + return + } for _, funcs := range operationDic.BeforeFunctions { for key, value := range formatMap { if funcs.InputValue == key { var names []string if funcs.IsList { sql := fmt.Sprintf("SELECT %s FROM %s where %s in (?);", funcs.OutputColumn, funcs.DB, funcs.InputColumn) - _ = global.DB.Raw(sql, value).Scan(&names) + _ = dbItem.Raw(sql, value).Scan(&names) } else { - _ = global.DB.Raw(fmt.Sprintf("select %s from %s where %s = ?;", funcs.OutputColumn, funcs.DB, funcs.InputColumn), value).Scan(&names) + _ = dbItem.Raw(fmt.Sprintf("select %s from %s where %s = ?;", funcs.OutputColumn, funcs.DB, funcs.InputColumn), value).Scan(&names) } formatMap[funcs.OutputValue] = strings.Join(names, ",") break } } } + closeDB(dbItem) } for key, value := range formatMap { if strings.Contains(operationDic.FormatEN, "["+key+"]") { @@ -168,10 +149,6 @@ func OperationLog() gin.HandlerFunc { } } -type swaggerJson struct { - Paths map[string]interface{} `json:"paths"` -} - type operationJson struct { API string `json:"api"` Method string `json:"method"` @@ -206,7 +183,7 @@ func (r responseBodyWriter) Write(b []byte) (int, error) { } func loadLogInfo(path string) string { - path = strings.ReplaceAll(path, "/api/v2", "") + path = replaceStr(path, "/api/v2", "/core", "/xpack") if !strings.Contains(path, "/") { return "" } @@ -216,3 +193,42 @@ func loadLogInfo(path string) string { } return pathArrays[1] } + +func newDB(pathItem string) (*gorm.DB, error) { + dbFile := "" + switch { + case strings.HasPrefix(pathItem, "/core"): + dbFile = path.Join(global.CONF.System.BaseDir, "1panel/db/core.db") + case strings.HasPrefix(pathItem, "/xpack"): + dbFile = path.Join(global.CONF.System.BaseDir, "1panel/db/xpack/xpack.db") + default: + dbFile = path.Join(global.CONF.System.BaseDir, "1panel/db/agent.db") + } + + db, _ := gorm.Open(sqlite.Open(dbFile), &gorm.Config{ + DisableForeignKeyConstraintWhenMigrating: true, + }) + sqlDB, err := db.DB() + if err != nil { + return nil, err + } + sqlDB.SetConnMaxIdleTime(10) + sqlDB.SetMaxOpenConns(100) + sqlDB.SetConnMaxLifetime(time.Hour) + return db, nil +} + +func closeDB(db *gorm.DB) { + sqlDB, err := db.DB() + if err != nil { + return + } + _ = sqlDB.Close() +} + +func replaceStr(val string, rep ...string) string { + for _, item := range rep { + val = strings.ReplaceAll(val, item, "") + } + return val +} diff --git a/frontend/src/api/modules/log.ts b/frontend/src/api/modules/log.ts index 6dd8c2cba..ca849b998 100644 --- a/frontend/src/api/modules/log.ts +++ b/frontend/src/api/modules/log.ts @@ -18,7 +18,7 @@ export const getSystemLogs = (name: string) => { }; export const cleanLogs = (param: Log.CleanLog) => { - return http.post(`/logs/clean`, param); + return http.post(`/core/logs/clean`, param); }; export const searchTasks = (req: Log.SearchTaskReq) => { diff --git a/frontend/src/api/modules/setting.ts b/frontend/src/api/modules/setting.ts index aa0e0d33f..d59e17ba6 100644 --- a/frontend/src/api/modules/setting.ts +++ b/frontend/src/api/modules/setting.ts @@ -6,19 +6,19 @@ import { Setting } from '../interface/setting'; // license export const UploadFileData = (params: FormData) => { - return http.upload('/licenses/upload', params); + return http.upload('/xpack/licenses/upload', params); }; export const getLicense = () => { - return http.get(`/licenses/get`); + return http.get(`/xpack/licenses/get`); }; export const getLicenseStatus = () => { - return http.get(`/licenses/get/status`); + return http.get(`/xpack/licenses/get/status`); }; export const syncLicense = () => { - return http.post(`/licenses/sync`); + return http.post(`/xpack/licenses/sync`); }; export const unbindLicense = () => { - return http.post(`/licenses/unbind`); + return http.post(`/xpack/licenses/unbind`); }; // agent diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index d1be40911..c2e7ac593 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -1180,6 +1180,8 @@ const message = { runtimes: 'Runtime', process: 'Process', toolbox: 'Toolbox', + tampers: 'Tamper', + xsetting: 'Interface Settings', logs: 'Panel Logs', settings: 'Panel Setting', cronjobs: 'Cronjob', diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index 664c6904f..73ccf193f 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -1118,6 +1118,8 @@ const message = { runtimes: '運行環境', process: '進程管理', toolbox: '工具箱', + tampers: '防篡改', + xsetting: '界面設定', logs: '日誌審計', settings: '面板設置', cronjobs: '計劃任務', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index a6be06872..ee6194a97 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1120,6 +1120,8 @@ const message = { runtimes: '运行环境', process: '进程管理', toolbox: '工具箱', + tampers: '防篡改', + xsetting: '界面设置', logs: '日志审计', settings: '面板设置', cronjobs: '计划任务', diff --git a/frontend/src/views/cronjob/operate/index.vue b/frontend/src/views/cronjob/operate/index.vue index e45fa8ed0..551d228a1 100644 --- a/frontend/src/views/cronjob/operate/index.vue +++ b/frontend/src/views/cronjob/operate/index.vue @@ -237,11 +237,7 @@ - +
@@ -250,11 +246,7 @@ - + {{ $t('container.custom') }} diff --git a/frontend/src/views/log/operation/index.vue b/frontend/src/views/log/operation/index.vue index 805a39b39..a162f06f3 100644 --- a/frontend/src/views/log/operation/index.vue +++ b/frontend/src/views/log/operation/index.vue @@ -150,9 +150,15 @@ const loadDetail = (log: string) => { if (log.indexOf('[enable]') !== -1) { log = log.replace('[enable]', '[' + i18n.global.t('commons.button.enable') + ']'); } + if (log.indexOf('[Enable]') !== -1) { + log = log.replace('[Enable]', '[' + i18n.global.t('commons.button.enable') + ']'); + } if (log.indexOf('[disable]') !== -1) { log = log.replace('[disable]', '[' + i18n.global.t('commons.button.disable') + ']'); } + if (log.indexOf('[Disable]') !== -1) { + log = log.replace('[Disable]', '[' + i18n.global.t('commons.button.disable') + ']'); + } if (log.indexOf('[light]') !== -1) { log = log.replace('[light]', '[' + i18n.global.t('setting.light') + ']'); }