fix: Update swagger API documentation (#10822)

Refs #10816
This commit is contained in:
ssongliu 2025-10-30 16:50:18 +08:00 committed by GitHub
parent 9a73095a8f
commit 75837c87b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 2190 additions and 831 deletions

View file

@ -40,7 +40,7 @@ func (b *BaseApi) StopProcess(c *gin.Context) {
// @Tags Process // @Tags Process
// @Summary Get Process Info By PID // @Summary Get Process Info By PID
// @Param pid path int true "PID" // @Param pid path int true "PID"
// @Success 200 {object} websocket.PsProcessData // @Success 200
// @Security ApiKeyAuth // @Security ApiKeyAuth
// @Security Timestamp // @Security Timestamp
// @Router /process/{pid} [get] // @Router /process/{pid} [get]

View file

@ -53,7 +53,7 @@ func (b *BaseApi) OperateSSH(c *gin.Context) {
// @Security ApiKeyAuth // @Security ApiKeyAuth
// @Security Timestamp // @Security Timestamp
// @Router /hosts/ssh/update [post] // @Router /hosts/ssh/update [post]
// @x-panel-log {"bodyKeys":["key","value"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"修改 SSH 配置 [key] => [value]","formatEN":"update SSH setting [key] => [value]"} // @x-panel-log {"bodyKeys":["key","newValue"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"修改 SSH 配置 [key] => [newValue]","formatEN":"update SSH setting [key] => [newValue]"}
func (b *BaseApi) UpdateSSH(c *gin.Context) { func (b *BaseApi) UpdateSSH(c *gin.Context) {
var req dto.SSHUpdate var req dto.SSHUpdate
if err := helper.CheckBindAndValidate(&req, c); err != nil { if err := helper.CheckBindAndValidate(&req, c); err != nil {

View file

@ -1145,7 +1145,7 @@ func (b *BaseApi) ExecComposer(c *gin.Context) {
// @Tags Website // @Tags Website
// @Summary Batch operate websites // @Summary Batch operate websites
// @Accept json // @Accept json
// @Param request body request.BatchOpWebsite true "request" // @Param request body request.BatchWebsiteOp true "request"
// @Success 200 // @Success 200
// @Security ApiKeyAuth // @Security ApiKeyAuth
// @Security Timestamp // @Security Timestamp
@ -1165,7 +1165,7 @@ func (b *BaseApi) BatchOpWebsites(c *gin.Context) {
// @Tags Website // @Tags Website
// @Summary Batch set website group // @Summary Batch set website group
// @Accept json // @Accept json
// @Param request body request.BatchSetGroupReq true "request" // @Param request body request.BatchWebsiteGroup true "request"
// @Success 200 // @Success 200
// @Security ApiKeyAuth // @Security ApiKeyAuth
// @Security Timestamp // @Security Timestamp

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -14,7 +14,7 @@ import (
) )
func TestGenerateXlog(t *testing.T) { func TestGenerateXlog(t *testing.T) {
workDir := "/usr/songliu/1Panel" workDir := "/usr/songliu/dev-v2/1Panel"
fset := token.NewFileSet() fset := token.NewFileSet()
apiDirs := []string{workDir + "/agent/app/api/v2", workDir + "/core/app/api/v2", workDir + "/agent/xpack/app/api/v2", workDir + "/core/xpack/app/api/v2"} apiDirs := []string{workDir + "/agent/app/api/v2", workDir + "/core/app/api/v2", workDir + "/agent/xpack/app/api/v2", workDir + "/core/xpack/app/api/v2"}
@ -67,7 +67,7 @@ func TestGenerateXlog(t *testing.T) {
} }
func TestGenerateSwaggerDoc(t *testing.T) { func TestGenerateSwaggerDoc(t *testing.T) {
workDir := "/usr/songliu/1Panel" workDir := "/usr/songliu/dev-v2/1Panel"
swagBin := "/root/go/bin/swag" swagBin := "/root/go/bin/swag"
cmd1 := exec.Command(swagBin, "init", "-o", workDir+"/core/cmd/server/docs/docs_agent", "-d", workDir+"/agent", "-g", "../agent/cmd/server/main.go") cmd1 := exec.Command(swagBin, "init", "-o", workDir+"/core/cmd/server/docs/docs_agent", "-d", workDir+"/agent", "-g", "../agent/cmd/server/main.go")
@ -119,16 +119,14 @@ func TestGenerateSwaggerDoc(t *testing.T) {
} }
for key, val := range coreSwagger.Paths { for key, val := range coreSwagger.Paths {
if _, ok := newSwagger.Paths[key]; ok { if _, ok := newSwagger.Paths[key]; !ok {
fmt.Printf("duplicate interfaces were found: %s \n", key) newSwagger.Paths[key] = val
} }
newSwagger.Paths[key] = val
} }
for key, val := range coreSwagger.Definitions { for key, val := range coreSwagger.Definitions {
if _, ok := newSwagger.Definitions[key]; ok { if _, ok := newSwagger.Definitions[key]; !ok {
fmt.Printf("duplicate definitions were found: %s \n", key) newSwagger.Definitions[key] = val
} }
newSwagger.Definitions[key] = val
} }
newJson, err := json.MarshalIndent(newSwagger, "", "\t") newJson, err := json.MarshalIndent(newSwagger, "", "\t")

View file

@ -1,49 +1,12 @@
{ {
"/agent/groups": { "/ai/ollama/close": {
"bodyKeys": [ "bodyKeys": [
"name", "name"
"type"
], ],
"paramKeys": [], "paramKeys": [],
"beforeFunctions": [], "beforeFunctions": [],
"formatZH": "创建组[name][type]", "formatZH": "关闭Ollama模型连接[name]",
"formatEN": "creategroup[name][type]" "formatEN": "closeconnforOllamamodel[name]"
},
"/agent/groups/del": {
"bodyKeys": [
"id"
],
"paramKeys": [],
"beforeFunctions": [
{
"input_column": "id",
"input_value": "id",
"isList": false,
"db": "groups",
"output_column": "name",
"output_value": "name"
},
{
"input_column": "id",
"input_value": "id",
"isList": false,
"db": "groups",
"output_column": "type",
"output_value": "type"
}
],
"formatZH": "删除组[type][name]",
"formatEN": "deletegroup[type][name]"
},
"/agent/groups/update": {
"bodyKeys": [
"name",
"type"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "更新组[name][type]",
"formatEN": "updategroup[name][type]"
}, },
"/ai/ollama/model": { "/ai/ollama/model": {
"bodyKeys": [ "bodyKeys": [
@ -54,15 +17,6 @@
"formatZH": "添加Ollama模型[name]", "formatZH": "添加Ollama模型[name]",
"formatEN": "addOllamamodel[name]" "formatEN": "addOllamamodel[name]"
}, },
"/ai/ollama/model/close": {
"bodyKeys": [
"name"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "关闭Ollama模型连接[name]",
"formatEN": "closeconnforOllamamodel[name]"
},
"/ai/ollama/model/del": { "/ai/ollama/model/del": {
"bodyKeys": [ "bodyKeys": [
"ids" "ids"
@ -206,16 +160,6 @@
"formatZH": "应用商店同步", "formatZH": "应用商店同步",
"formatEN": "Appstoresynchronization" "formatEN": "Appstoresynchronization"
}, },
"/backup/record/download": {
"bodyKeys": [
"source",
"fileName"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "下载备份记录[source][fileName]",
"formatEN": "downloadbackuprecords[source][fileName]"
},
"/backups": { "/backups": {
"bodyKeys": [ "bodyKeys": [
"type" "type"
@ -254,6 +198,34 @@
"formatZH": "删除备份账号[types]", "formatZH": "删除备份账号[types]",
"formatEN": "deletebackupaccount[types]" "formatEN": "deletebackupaccount[types]"
}, },
"/backups/record/del": {
"bodyKeys": [
"ids"
],
"paramKeys": [],
"beforeFunctions": [
{
"input_column": "id",
"input_value": "ids",
"isList": true,
"db": "backup_records",
"output_column": "file_name",
"output_value": "files"
}
],
"formatZH": "删除备份记录[files]",
"formatEN": "deletebackuprecords[files]"
},
"/backups/record/download": {
"bodyKeys": [
"source",
"fileName"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "下载备份记录[source][fileName]",
"formatEN": "downloadbackuprecords[source][fileName]"
},
"/backups/recover": { "/backups/recover": {
"bodyKeys": [ "bodyKeys": [
"type", "type",
@ -287,6 +259,15 @@
"formatZH": "更新备份账号[types]", "formatZH": "更新备份账号[types]",
"formatEN": "updatebackupaccount[types]" "formatEN": "updatebackupaccount[types]"
}, },
"/backups/upload": {
"bodyKeys": [
"filePath"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "上传备份文件[filePath]",
"formatEN": "uploadbackupfile[filePath]"
},
"/containers": { "/containers": {
"bodyKeys": [ "bodyKeys": [
"name", "name",
@ -537,21 +518,21 @@
}, },
"/containers/repo/del": { "/containers/repo/del": {
"bodyKeys": [ "bodyKeys": [
"ids" "id"
], ],
"paramKeys": [], "paramKeys": [],
"beforeFunctions": [ "beforeFunctions": [
{ {
"input_column": "id", "input_column": "id",
"input_value": "ids", "input_value": "id",
"isList": true, "isList": false,
"db": "image_repos", "db": "image_repos",
"output_column": "name", "output_column": "name",
"output_value": "names" "output_value": "name"
} }
], ],
"formatZH": "删除镜像仓库[names]", "formatZH": "删除镜像仓库[name]",
"formatEN": "deleteimagerepo[names]" "formatEN": "deleteimagerepo[name]"
}, },
"/containers/repo/update": { "/containers/repo/update": {
"bodyKeys": [ "bodyKeys": [
@ -580,6 +561,13 @@
"formatZH": "创建compose模版[name]", "formatZH": "创建compose模版[name]",
"formatEN": "createcomposetemplate[name]" "formatEN": "createcomposetemplate[name]"
}, },
"/containers/template/batch": {
"bodyKeys": [],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "批量导入编排模版",
"formatEN": "batchimportcomposetemplates"
},
"/containers/template/del": { "/containers/template/del": {
"bodyKeys": [ "bodyKeys": [
"ids" "ids"
@ -709,6 +697,20 @@
"formatZH": "删除快捷命令[names]", "formatZH": "删除快捷命令[names]",
"formatEN": "deletequickcommand[names]" "formatEN": "deletequickcommand[names]"
}, },
"/core/commands/export": {
"bodyKeys": [],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "导出快速命令",
"formatEN": "exportquickcommands"
},
"/core/commands/import": {
"bodyKeys": [],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "导入快速命令",
"formatEN": "importquickcommands"
},
"/core/commands/update": { "/core/commands/update": {
"bodyKeys": [ "bodyKeys": [
"name" "name"
@ -879,6 +881,74 @@
"formatZH": "清空[logType]日志信息", "formatZH": "清空[logType]日志信息",
"formatEN": "Cleanthe[logType]loginformation" "formatEN": "Cleanthe[logType]loginformation"
}, },
"/core/script": {
"bodyKeys": [
"name"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "添加脚本库脚本[name]",
"formatEN": "addscript[name]"
},
"/core/script/del": {
"bodyKeys": [
"ids"
],
"paramKeys": [],
"beforeFunctions": [
{
"input_column": "id",
"input_value": "ids",
"isList": true,
"db": "script_librarys",
"output_column": "name",
"output_value": "names"
}
],
"formatZH": "删除脚本库脚本[names]",
"formatEN": "deletescript[names]"
},
"/core/script/sync": {
"bodyKeys": [],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "同步脚本库脚本",
"formatEN": "syncscripts"
},
"/core/script/update": {
"bodyKeys": [
"id"
],
"paramKeys": [],
"beforeFunctions": [
{
"input_column": "id",
"input_value": "id",
"isList": false,
"db": "cronjobs",
"output_column": "name",
"output_value": "name"
}
],
"formatZH": "更新脚本库脚本[name]",
"formatEN": "updatescript[name]"
},
"/core/settings/api/config/generate/key": {
"bodyKeys": [],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "生成API接口密钥",
"formatEN": "generateapikey"
},
"/core/settings/api/config/update": {
"bodyKeys": [
"ipWhiteList"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "更新API接口配置=\u003eIP白名单:[ipWhiteList]",
"formatEN": "updateapiconfig=\u003eIPWhiteList:[ipWhiteList]"
},
"/core/settings/bind/update": { "/core/settings/bind/update": {
"bodyKeys": [ "bodyKeys": [
"ipv6", "ipv6",
@ -896,6 +966,13 @@
"formatZH": "重置过期密码", "formatZH": "重置过期密码",
"formatEN": "resetanexpiredPassword" "formatEN": "resetanexpiredPassword"
}, },
"/core/settings/menu/default": {
"bodyKeys": [],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "初始化菜单",
"formatEN": "Initmenu."
},
"/core/settings/menu/update": { "/core/settings/menu/update": {
"bodyKeys": [], "bodyKeys": [],
"paramKeys": [], "paramKeys": [],
@ -998,6 +1075,20 @@
"formatZH": "添加节点[name]", "formatZH": "添加节点[name]",
"formatEN": "addnode[name]" "formatEN": "addnode[name]"
}, },
"/core/xpack/nodes/backup": {
"bodyKeys": [],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "备份主节点数据",
"formatEN": "backupmasterdata"
},
"/core/xpack/nodes/backup/update": {
"bodyKeys": [],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "修改主节点备份设置",
"formatEN": "updatemasterbackupsetting"
},
"/core/xpack/nodes/del": { "/core/xpack/nodes/del": {
"bodyKeys": [ "bodyKeys": [
"ids" "ids"
@ -1052,6 +1143,51 @@
"formatZH": "回滚节点[name]", "formatZH": "回滚节点[name]",
"formatEN": "rollbacknode[name]" "formatEN": "rollbacknode[name]"
}, },
"/core/xpack/nodes/simple": {
"bodyKeys": [
"name"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "添加节点[name]",
"formatEN": "addnode[name]"
},
"/core/xpack/nodes/simple/del": {
"bodyKeys": [
"ids"
],
"paramKeys": [],
"beforeFunctions": [
{
"input_column": "id",
"input_value": "ids",
"isList": true,
"db": "simple_nodes",
"output_column": "name",
"output_value": "names"
}
],
"formatZH": "删除节点[names]",
"formatEN": "deletenode[names]"
},
"/core/xpack/nodes/simple/update": {
"bodyKeys": [
"name"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "更新[name]",
"formatEN": "updatenode[name]"
},
"/core/xpack/nodes/simple/update/base": {
"bodyKeys": [
"name"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "更新[name]基础信息",
"formatEN": "updatebaseinfofornode[name]"
},
"/core/xpack/nodes/sync": { "/core/xpack/nodes/sync": {
"bodyKeys": [ "bodyKeys": [
"id" "id"
@ -1079,6 +1215,15 @@
"formatZH": "更新[name]", "formatZH": "更新[name]",
"formatEN": "updatenode[name]" "formatEN": "updatenode[name]"
}, },
"/core/xpack/nodes/update/base": {
"bodyKeys": [
"name"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "更新[name]基础信息",
"formatEN": "updatebaseinfofornode[name]"
},
"/core/xpack/nodes/upgrade": { "/core/xpack/nodes/upgrade": {
"bodyKeys": [ "bodyKeys": [
"id" "id"
@ -1143,23 +1288,23 @@
"formatZH": "删除计划任务[names]", "formatZH": "删除计划任务[names]",
"formatEN": "deletecronjob[names]" "formatEN": "deletecronjob[names]"
}, },
"/cronjobs/download": { "/cronjobs/group/update": {
"bodyKeys": [ "bodyKeys": [
"recordID" "id"
], ],
"paramKeys": [], "paramKeys": [],
"beforeFunctions": [ "beforeFunctions": [
{ {
"input_column": "id", "input_column": "id",
"input_value": "recordID", "input_value": "id",
"isList": false, "isList": false,
"db": "job_records", "db": "cronjobs",
"output_column": "file", "output_column": "name",
"output_value": "file" "output_value": "name"
} }
], ],
"formatZH": "下载计划任务记录[file]", "formatZH": "更新计划任务分组[name]",
"formatEN": "downloadthecronjobrecord[file]" "formatEN": "updatecronjobgroup[name]"
}, },
"/cronjobs/handle": { "/cronjobs/handle": {
"bodyKeys": [ "bodyKeys": [
@ -1244,6 +1389,13 @@
"formatZH": "首页应用[key]=\u003e显示[value]", "formatZH": "首页应用[key]=\u003e显示[value]",
"formatEN": "applauncher[key]=\u003eshow:[value]" "formatEN": "applauncher[key]=\u003eshow:[value]"
}, },
"/dashboard/quick/change": {
"bodyKeys": [],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "切换快速跳转",
"formatEN": "changequickjump"
},
"/databases": { "/databases": {
"bodyKeys": [ "bodyKeys": [
"name" "name"
@ -1712,12 +1864,82 @@
"formatZH": "下载url=\u003e[path]/[name]", "formatZH": "下载url=\u003e[path]/[name]",
"formatEN": "Downloadurl=\u003e[path]/[name]" "formatEN": "Downloadurl=\u003e[path]/[name]"
}, },
"/hosts/conffile/update": { "/groups": {
"bodyKeys": [], "bodyKeys": [
"name",
"type"
],
"paramKeys": [], "paramKeys": [],
"beforeFunctions": [], "beforeFunctions": [],
"formatZH": "修改SSH配置文件", "formatZH": "创建组[name][type]",
"formatEN": "updateSSHconf" "formatEN": "creategroup[name][type]"
},
"/groups/del": {
"bodyKeys": [
"id"
],
"paramKeys": [],
"beforeFunctions": [
{
"input_column": "id",
"input_value": "id",
"isList": false,
"db": "groups",
"output_column": "name",
"output_value": "name"
},
{
"input_column": "id",
"input_value": "id",
"isList": false,
"db": "groups",
"output_column": "type",
"output_value": "type"
}
],
"formatZH": "删除组[type][name]",
"formatEN": "deletegroup[type][name]"
},
"/groups/update": {
"bodyKeys": [
"name",
"type"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "更新组[name][type]",
"formatEN": "updategroup[name][type]"
},
"/hosts/disks/mount": {
"bodyKeys": [
"device",
"mountPoint"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "挂载磁盘[device]到[mountPoint]",
"formatEN": "Mountdisk[device]to[mountPoint]"
},
"/hosts/disks/partition": {
"bodyKeys": [
"device",
"filesystem",
"mountPoint"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "对磁盘[device]进行分区,文件系统[filesystem],挂载点[mountPoint]",
"formatEN": "Partitiondisk[device]withfilesystem[filesystem],mountpoint[mountPoint]"
},
"/hosts/disks/unmount": {
"bodyKeys": [
"device",
"mountPoint"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "卸载磁盘[device]从[mountPoint]",
"formatEN": "Unmountdisk[device]from[mountPoint]"
}, },
"/hosts/firewall/forward": { "/hosts/firewall/forward": {
"bodyKeys": [ "bodyKeys": [
@ -1774,13 +1996,43 @@
"formatZH": "修改默认监控网卡[name]-[value]", "formatZH": "修改默认监控网卡[name]-[value]",
"formatEN": "updatedefaultmonitor[name]-[value]" "formatEN": "updatedefaultmonitor[name]-[value]"
}, },
"/hosts/ssh/generate": { "/hosts/ssh/cert": {
"bodyKeys": [], "bodyKeys": [],
"paramKeys": [], "paramKeys": [],
"beforeFunctions": [], "beforeFunctions": [],
"formatZH": "生成SSH密钥", "formatZH": "生成SSH密钥",
"formatEN": "generateSSHsecret" "formatEN": "generateSSHsecret"
}, },
"/hosts/ssh/cert/delete": {
"bodyKeys": [],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "删除SSH密钥",
"formatEN": "deleteSSHsecret"
},
"/hosts/ssh/cert/sync": {
"bodyKeys": [],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "同步SSH密钥",
"formatEN": "syncSSHsecret"
},
"/hosts/ssh/cert/update": {
"bodyKeys": [],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "生成SSH密钥",
"formatEN": "generateSSHsecret"
},
"/hosts/ssh/file/update": {
"bodyKeys": [
"key"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "修改SSH配置文件[key]",
"formatEN": "updateSSHconf[key]"
},
"/hosts/ssh/operate": { "/hosts/ssh/operate": {
"bodyKeys": [ "bodyKeys": [
"operation" "operation"
@ -1793,12 +2045,12 @@
"/hosts/ssh/update": { "/hosts/ssh/update": {
"bodyKeys": [ "bodyKeys": [
"key", "key",
"value" "newValue"
], ],
"paramKeys": [], "paramKeys": [],
"beforeFunctions": [], "beforeFunctions": [],
"formatZH": "修改SSH配置[key]=\u003e[value]", "formatZH": "修改SSH配置[key]=\u003e[newValue]",
"formatEN": "updateSSHsetting[key]=\u003e[value]" "formatEN": "updateSSHsetting[key]=\u003e[newValue]"
}, },
"/hosts/tool/config": { "/hosts/tool/config": {
"bodyKeys": [ "bodyKeys": [
@ -1809,7 +2061,7 @@
"formatZH": "[operate]主机工具配置文件", "formatZH": "[operate]主机工具配置文件",
"formatEN": "[operate]toolconfig" "formatEN": "[operate]toolconfig"
}, },
"/hosts/tool/create": { "/hosts/tool/init": {
"bodyKeys": [ "bodyKeys": [
"type" "type"
], ],
@ -1860,7 +2112,7 @@
"formatZH": "更新nginx配置", "formatZH": "更新nginx配置",
"formatEN": "Updatenginxconf" "formatEN": "Updatenginxconf"
}, },
"/openresty/module/update": { "/openresty/modules/update": {
"bodyKeys": [], "bodyKeys": [],
"paramKeys": [], "paramKeys": [],
"beforeFunctions": [], "beforeFunctions": [],
@ -1894,24 +2146,6 @@
"formatZH": "结束进程[PID]", "formatZH": "结束进程[PID]",
"formatEN": "结束进程[PID]" "formatEN": "结束进程[PID]"
}, },
"/record/del": {
"bodyKeys": [
"ids"
],
"paramKeys": [],
"beforeFunctions": [
{
"input_column": "id",
"input_value": "ids",
"isList": true,
"db": "backup_records",
"output_column": "file_name",
"output_value": "files"
}
],
"formatZH": "删除备份记录[files]",
"formatEN": "deletebackuprecords[files]"
},
"/runtimes": { "/runtimes": {
"bodyKeys": [ "bodyKeys": [
"name" "name"
@ -1984,74 +2218,6 @@
"formatZH": "更新运行环境[name]", "formatZH": "更新运行环境[name]",
"formatEN": "Updateruntime[name]" "formatEN": "Updateruntime[name]"
}, },
"/script": {
"bodyKeys": [
"name"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "添加脚本库脚本[name]",
"formatEN": "addscript[name]"
},
"/script/del": {
"bodyKeys": [
"ids"
],
"paramKeys": [],
"beforeFunctions": [
{
"input_column": "id",
"input_value": "ids",
"isList": true,
"db": "script_librarys",
"output_column": "name",
"output_value": "names"
}
],
"formatZH": "删除脚本库脚本[names]",
"formatEN": "deletescript[names]"
},
"/script/sync": {
"bodyKeys": [],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "同步脚本库脚本",
"formatEN": "syncscripts"
},
"/script/update": {
"bodyKeys": [
"id"
],
"paramKeys": [],
"beforeFunctions": [
{
"input_column": "id",
"input_value": "id",
"isList": false,
"db": "cronjobs",
"output_column": "name",
"output_value": "name"
}
],
"formatZH": "更新脚本库脚本[name]",
"formatEN": "updatescript[name]"
},
"/settings/api/config/generate/key": {
"bodyKeys": [],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "生成API接口密钥",
"formatEN": "generateapikey"
},
"/settings/api/config/update": {
"bodyKeys": [
"ipWhiteList"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "更新API接口配置=\u003eIP白名单:[ipWhiteList]",
"formatEN": "updateapiconfig=\u003eIPWhiteList:[ipWhiteList]"
},
"/settings/snapshot": { "/settings/snapshot": {
"bodyKeys": [ "bodyKeys": [
"from", "from",
@ -2127,7 +2293,7 @@
"formatZH": "从系统快照[name]恢复", "formatZH": "从系统快照[name]恢复",
"formatEN": "Recoverfromsystembackup[name]" "formatEN": "Recoverfromsystembackup[name]"
}, },
"/settings/snapshot/recrete": { "/settings/snapshot/recreate": {
"bodyKeys": [ "bodyKeys": [
"id" "id"
], ],
@ -2800,6 +2966,24 @@
"formatZH": "php版本变更[domain]", "formatZH": "php版本变更[domain]",
"formatEN": "phpversionupdate[domain]" "formatEN": "phpversionupdate[domain]"
}, },
"/websites/proxies/file": {
"bodyKeys": [
"websiteID"
],
"paramKeys": [],
"beforeFunctions": [
{
"input_column": "id",
"input_value": "websiteID",
"isList": false,
"db": "websites",
"output_column": "primary_domain",
"output_value": "domain"
}
],
"formatZH": "更新反向代理文件[domain]",
"formatEN": "Nginxconfproxyfileupdate[domain]"
},
"/websites/proxies/update": { "/websites/proxies/update": {
"bodyKeys": [ "bodyKeys": [
"id" "id"
@ -2825,25 +3009,7 @@
"formatZH": "清理Openresty代理缓存", "formatZH": "清理Openresty代理缓存",
"formatEN": "Clearnginxproxycache" "formatEN": "Clearnginxproxycache"
}, },
"/websites/proxy/file": { "/websites/realip/config": {
"bodyKeys": [
"websiteID"
],
"paramKeys": [],
"beforeFunctions": [
{
"input_column": "id",
"input_value": "websiteID",
"isList": false,
"db": "websites",
"output_column": "primary_domain",
"output_value": "domain"
}
],
"formatZH": "更新反向代理文件[domain]",
"formatEN": "Nginxconfproxyfileupdate[domain]"
},
"/websites/realip": {
"bodyKeys": [ "bodyKeys": [
"websiteID" "websiteID"
], ],
@ -3005,6 +3171,15 @@
"formatZH": "上传ssl[type]", "formatZH": "上传ssl[type]",
"formatEN": "Uploadssl[type]" "formatEN": "Uploadssl[type]"
}, },
"/websites/ssl/upload/file": {
"bodyKeys": [
"type"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "上传ssl文件[type]",
"formatEN": "Uploadsslfile[type]"
},
"/websites/update": { "/websites/update": {
"bodyKeys": [ "bodyKeys": [
"primaryDomain" "primaryDomain"
@ -3235,6 +3410,24 @@
"formatZH": "删除规则[scope]", "formatZH": "删除规则[scope]",
"formatEN": "deleterule[scope]" "formatEN": "deleterule[scope]"
}, },
"/xpack/waf/rule/common/export": {
"bodyKeys": [
"scope"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "导出规则[scope]",
"formatEN": "exportrule[scope]"
},
"/xpack/waf/rule/common/import": {
"bodyKeys": [
"scope"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "导入规则[scope]",
"formatEN": "importrule[scope]"
},
"/xpack/waf/rule/common/update": { "/xpack/waf/rule/common/update": {
"bodyKeys": [ "bodyKeys": [
"scope" "scope"
@ -3329,15 +3522,5 @@
"beforeFunctions": [], "beforeFunctions": [],
"formatZH": "更新网站地区访问限制", "formatZH": "更新网站地区访问限制",
"formatEN": "updategeorestrict" "formatEN": "updategeorestrict"
},
"/xpack/xsetting/update/item": {
"bodyKeys": [
"key",
"value"
],
"paramKeys": [],
"beforeFunctions": [],
"formatZH": "更新界面设置[key]=\u003e[value]",
"formatEN": "updatesetting[key]=\u003e[value]"
} }
} }