From fb62ac17e596546d460f2fc4b4c7f949e616eeba Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Fri, 7 Apr 2023 17:46:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=8C=E5=96=84=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=20(#536)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/api/v1/firewall.go | 4 +- backend/app/api/v1/group.go | 8 +- backend/app/api/v1/host.go | 2 +- cmd/server/docs/docs.go | 409 ++++++++++++++++++-------------- cmd/server/docs/swagger.json | 409 ++++++++++++++++++-------------- cmd/server/docs/swagger.yaml | 266 +++++++++++---------- frontend/src/lang/modules/en.ts | 1 + frontend/src/lang/modules/zh.ts | 1 + 8 files changed, 608 insertions(+), 492 deletions(-) diff --git a/backend/app/api/v1/firewall.go b/backend/app/api/v1/firewall.go index ed148ed58..6606df675 100644 --- a/backend/app/api/v1/firewall.go +++ b/backend/app/api/v1/firewall.go @@ -87,7 +87,7 @@ func (b *BaseApi) OperateFirewall(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Router /hosts/firewall/port [post] -// @x-panel-log {"bodyKeys":["port","strategy"],"paramKeys":[],"BeforeFuntions":[],"formatZH":"添加端口规则 {[strategy] [port]}","formatEN":"create port rules {[strategy][port]}"} +// @x-panel-log {"bodyKeys":["port","strategy"],"paramKeys":[],"BeforeFuntions":[],"formatZH":"添加端口规则 [strategy] [port]","formatEN":"create port rules [strategy][port]"} func (b *BaseApi) OperatePortRule(c *gin.Context) { var req dto.PortRuleOperate if err := c.ShouldBindJSON(&req); err != nil { @@ -113,7 +113,7 @@ func (b *BaseApi) OperatePortRule(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Router /hosts/firewall/ip [post] -// @x-panel-log {"bodyKeys":["strategy","address"],"paramKeys":[],"BeforeFuntions":[],"formatZH":"添加 ip 规则 {[strategy] [address]}","formatEN":"create address rules {[strategy][address]}"} +// @x-panel-log {"bodyKeys":["strategy","address"],"paramKeys":[],"BeforeFuntions":[],"formatZH":"添加 ip 规则 [strategy] [address]","formatEN":"create address rules [strategy][address]"} func (b *BaseApi) OperateIPRule(c *gin.Context) { var req dto.AddrRuleOperate if err := c.ShouldBindJSON(&req); err != nil { diff --git a/backend/app/api/v1/group.go b/backend/app/api/v1/group.go index d8027fe11..42a89135c 100644 --- a/backend/app/api/v1/group.go +++ b/backend/app/api/v1/group.go @@ -15,7 +15,7 @@ import ( // @Param request body dto.GroupCreate true "request" // @Success 200 // @Security ApiKeyAuth -// @Router /hosts/group [post] +// @Router /groups [post] // @x-panel-log {"bodyKeys":["name","type"],"paramKeys":[],"BeforeFuntions":[],"formatZH":"创建组 [name][type]","formatEN":"create group [name][type]"} func (b *BaseApi) CreateGroup(c *gin.Context) { var req dto.GroupCreate @@ -41,7 +41,7 @@ func (b *BaseApi) CreateGroup(c *gin.Context) { // @Param request body dto.OperateByID true "request" // @Success 200 // @Security ApiKeyAuth -// @Router /hosts/group/del [post] +// @Router /groups/del [post] // @x-panel-log {"bodyKeys":["id"],"paramKeys":[],"BeforeFuntions":[{"input_colume":"id","input_value":"id","isList":false,"db":"groups","output_colume":"name","output_value":"name"},{"input_colume":"id","input_value":"id","isList":false,"db":"groups","output_colume":"type","output_value":"type"}],"formatZH":"删除组 [type][name]","formatEN":"delete group [type][name]"} func (b *BaseApi) DeleteGroup(c *gin.Context) { var req dto.OperateByID @@ -68,7 +68,7 @@ func (b *BaseApi) DeleteGroup(c *gin.Context) { // @Param request body dto.GroupUpdate true "request" // @Success 200 // @Security ApiKeyAuth -// @Router /hosts/group/update [post] +// @Router /groups/update [post] // @x-panel-log {"bodyKeys":["name","type"],"paramKeys":[],"BeforeFuntions":[],"formatZH":"更新组 [name][type]","formatEN":"update group [name][type]"} func (b *BaseApi) UpdateGroup(c *gin.Context) { var req dto.GroupUpdate @@ -94,7 +94,7 @@ func (b *BaseApi) UpdateGroup(c *gin.Context) { // @Param request body dto.GroupSearch true "request" // @Success 200 {anrry} dto.GroupInfo // @Security ApiKeyAuth -// @Router /hosts/group/search [post] +// @Router /groups/search [post] func (b *BaseApi) ListGroup(c *gin.Context) { var req dto.GroupSearch if err := c.ShouldBindJSON(&req); err != nil { diff --git a/backend/app/api/v1/host.go b/backend/app/api/v1/host.go index bae25a3fc..4755bade9 100644 --- a/backend/app/api/v1/host.go +++ b/backend/app/api/v1/host.go @@ -291,7 +291,7 @@ func (b *BaseApi) UpdateHost(c *gin.Context) { // @Param request body dto.ChangeHostGroup true "request" // @Success 200 // @Security ApiKeyAuth -// @Router /hosts/update [post] +// @Router /hosts/update/group [post] // @x-panel-log {"bodyKeys":["id","group"],"paramKeys":[],"BeforeFuntions":[{"input_colume":"id","input_value":"id","isList":false,"db":"hosts","output_colume":"addr","output_value":"addr"}],"formatZH":"切换主机[addr]分组 => [group]","formatEN":"change host [addr] group => [group]"} func (b *BaseApi) UpdateHostGroup(c *gin.Context) { var req dto.ChangeHostGroup diff --git a/cmd/server/docs/docs.go b/cmd/server/docs/docs.go index 15a433741..8bfc6553b 100644 --- a/cmd/server/docs/docs.go +++ b/cmd/server/docs/docs.go @@ -4838,6 +4838,187 @@ var doc = `{ } } }, + "/groups": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建系统组", + "consumes": [ + "application/json" + ], + "tags": [ + "System Group" + ], + "summary": "Create group", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.GroupCreate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name", + "type" + ], + "formatEN": "create group [name][type]", + "formatZH": "创建组 [name][type]", + "paramKeys": [] + } + } + }, + "/groups/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除系统组", + "consumes": [ + "application/json" + ], + "tags": [ + "System Group" + ], + "summary": "Delete group", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByID" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "groups", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "name", + "output_value": "name" + }, + { + "db": "groups", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "type", + "output_value": "type" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "delete group [type][name]", + "formatZH": "删除组 [type][name]", + "paramKeys": [] + } + } + }, + "/groups/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "查询系统组", + "consumes": [ + "application/json" + ], + "tags": [ + "System Group" + ], + "summary": "List groups", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.GroupSearch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/groups/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新系统组", + "consumes": [ + "application/json" + ], + "tags": [ + "System Group" + ], + "summary": "Update group", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.GroupUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name", + "type" + ], + "formatEN": "update group [name][type]", + "formatZH": "更新组 [name][type]", + "paramKeys": [] + } + } + }, "/hosts": { "post": { "security": [ @@ -5295,8 +5476,8 @@ var doc = `{ "port", "strategy" ], - "formatEN": "create port rules {[strategy][port]}", - "formatZH": "添加端口规则 {[strategy] [port]}", + "formatEN": "create port rules [strategy][port]", + "formatZH": "添加端口规则 [strategy] [port]", "paramKeys": [] } } @@ -5403,187 +5584,6 @@ var doc = `{ } } }, - "/hosts/group": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "description": "创建系统组", - "consumes": [ - "application/json" - ], - "tags": [ - "System Group" - ], - "summary": "Create group", - "parameters": [ - { - "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/dto.GroupCreate" - } - } - ], - "responses": { - "200": { - "description": "" - } - }, - "x-panel-log": { - "BeforeFuntions": [], - "bodyKeys": [ - "name", - "type" - ], - "formatEN": "create group [name][type]", - "formatZH": "创建组 [name][type]", - "paramKeys": [] - } - } - }, - "/hosts/group/del": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "description": "删除系统组", - "consumes": [ - "application/json" - ], - "tags": [ - "System Group" - ], - "summary": "Delete group", - "parameters": [ - { - "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/dto.OperateByID" - } - } - ], - "responses": { - "200": { - "description": "" - } - }, - "x-panel-log": { - "BeforeFuntions": [ - { - "db": "groups", - "input_colume": "id", - "input_value": "id", - "isList": false, - "output_colume": "name", - "output_value": "name" - }, - { - "db": "groups", - "input_colume": "id", - "input_value": "id", - "isList": false, - "output_colume": "type", - "output_value": "type" - } - ], - "bodyKeys": [ - "id" - ], - "formatEN": "delete group [type][name]", - "formatZH": "删除组 [type][name]", - "paramKeys": [] - } - } - }, - "/hosts/group/search": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "description": "查询系统组", - "consumes": [ - "application/json" - ], - "tags": [ - "System Group" - ], - "summary": "List groups", - "parameters": [ - { - "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/dto.GroupSearch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "anrry" - } - } - } - } - }, - "/hosts/group/update": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "description": "更新系统组", - "consumes": [ - "application/json" - ], - "tags": [ - "System Group" - ], - "summary": "Update group", - "parameters": [ - { - "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/dto.GroupUpdate" - } - } - ], - "responses": { - "200": { - "description": "" - } - }, - "x-panel-log": { - "BeforeFuntions": [], - "bodyKeys": [ - "name", - "type" - ], - "formatEN": "update group [name][type]", - "formatZH": "更新组 [name][type]", - "paramKeys": [] - } - } - }, "/hosts/search": { "post": { "security": [ @@ -5724,6 +5724,49 @@ var doc = `{ } }, "/hosts/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新主机", + "consumes": [ + "application/json" + ], + "tags": [ + "Host" + ], + "summary": "Update host", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.HostOperate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name", + "addr" + ], + "formatEN": "update host [name][addr]", + "formatZH": "更新主机信息 [name][addr]", + "paramKeys": [] + } + } + }, + "/hosts/update/group": { "post": { "security": [ { diff --git a/cmd/server/docs/swagger.json b/cmd/server/docs/swagger.json index 9d6c5eba8..85bcb4974 100644 --- a/cmd/server/docs/swagger.json +++ b/cmd/server/docs/swagger.json @@ -4824,6 +4824,187 @@ } } }, + "/groups": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "创建系统组", + "consumes": [ + "application/json" + ], + "tags": [ + "System Group" + ], + "summary": "Create group", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.GroupCreate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name", + "type" + ], + "formatEN": "create group [name][type]", + "formatZH": "创建组 [name][type]", + "paramKeys": [] + } + } + }, + "/groups/del": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除系统组", + "consumes": [ + "application/json" + ], + "tags": [ + "System Group" + ], + "summary": "Delete group", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByID" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [ + { + "db": "groups", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "name", + "output_value": "name" + }, + { + "db": "groups", + "input_colume": "id", + "input_value": "id", + "isList": false, + "output_colume": "type", + "output_value": "type" + } + ], + "bodyKeys": [ + "id" + ], + "formatEN": "delete group [type][name]", + "formatZH": "删除组 [type][name]", + "paramKeys": [] + } + } + }, + "/groups/search": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "查询系统组", + "consumes": [ + "application/json" + ], + "tags": [ + "System Group" + ], + "summary": "List groups", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.GroupSearch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "anrry" + } + } + } + } + }, + "/groups/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新系统组", + "consumes": [ + "application/json" + ], + "tags": [ + "System Group" + ], + "summary": "Update group", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.GroupUpdate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name", + "type" + ], + "formatEN": "update group [name][type]", + "formatZH": "更新组 [name][type]", + "paramKeys": [] + } + } + }, "/hosts": { "post": { "security": [ @@ -5281,8 +5462,8 @@ "port", "strategy" ], - "formatEN": "create port rules {[strategy][port]}", - "formatZH": "添加端口规则 {[strategy] [port]}", + "formatEN": "create port rules [strategy][port]", + "formatZH": "添加端口规则 [strategy] [port]", "paramKeys": [] } } @@ -5389,187 +5570,6 @@ } } }, - "/hosts/group": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "description": "创建系统组", - "consumes": [ - "application/json" - ], - "tags": [ - "System Group" - ], - "summary": "Create group", - "parameters": [ - { - "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/dto.GroupCreate" - } - } - ], - "responses": { - "200": { - "description": "" - } - }, - "x-panel-log": { - "BeforeFuntions": [], - "bodyKeys": [ - "name", - "type" - ], - "formatEN": "create group [name][type]", - "formatZH": "创建组 [name][type]", - "paramKeys": [] - } - } - }, - "/hosts/group/del": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "description": "删除系统组", - "consumes": [ - "application/json" - ], - "tags": [ - "System Group" - ], - "summary": "Delete group", - "parameters": [ - { - "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/dto.OperateByID" - } - } - ], - "responses": { - "200": { - "description": "" - } - }, - "x-panel-log": { - "BeforeFuntions": [ - { - "db": "groups", - "input_colume": "id", - "input_value": "id", - "isList": false, - "output_colume": "name", - "output_value": "name" - }, - { - "db": "groups", - "input_colume": "id", - "input_value": "id", - "isList": false, - "output_colume": "type", - "output_value": "type" - } - ], - "bodyKeys": [ - "id" - ], - "formatEN": "delete group [type][name]", - "formatZH": "删除组 [type][name]", - "paramKeys": [] - } - } - }, - "/hosts/group/search": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "description": "查询系统组", - "consumes": [ - "application/json" - ], - "tags": [ - "System Group" - ], - "summary": "List groups", - "parameters": [ - { - "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/dto.GroupSearch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "anrry" - } - } - } - } - }, - "/hosts/group/update": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "description": "更新系统组", - "consumes": [ - "application/json" - ], - "tags": [ - "System Group" - ], - "summary": "Update group", - "parameters": [ - { - "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/dto.GroupUpdate" - } - } - ], - "responses": { - "200": { - "description": "" - } - }, - "x-panel-log": { - "BeforeFuntions": [], - "bodyKeys": [ - "name", - "type" - ], - "formatEN": "update group [name][type]", - "formatZH": "更新组 [name][type]", - "paramKeys": [] - } - } - }, "/hosts/search": { "post": { "security": [ @@ -5710,6 +5710,49 @@ } }, "/hosts/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新主机", + "consumes": [ + "application/json" + ], + "tags": [ + "Host" + ], + "summary": "Update host", + "parameters": [ + { + "description": "request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.HostOperate" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "x-panel-log": { + "BeforeFuntions": [], + "bodyKeys": [ + "name", + "addr" + ], + "formatEN": "update host [name][addr]", + "formatZH": "更新主机信息 [name][addr]", + "paramKeys": [] + } + } + }, + "/hosts/update/group": { "post": { "security": [ { diff --git a/cmd/server/docs/swagger.yaml b/cmd/server/docs/swagger.yaml index 449575649..7f89be649 100644 --- a/cmd/server/docs/swagger.yaml +++ b/cmd/server/docs/swagger.yaml @@ -5862,6 +5862,123 @@ paths: formatEN: Download url => [path]/[name] formatZH: 下载 url => [path]/[name] paramKeys: [] + /groups: + post: + consumes: + - application/json + description: 创建系统组 + parameters: + - description: request + in: body + name: request + required: true + schema: + $ref: '#/definitions/dto.GroupCreate' + responses: + "200": + description: "" + security: + - ApiKeyAuth: [] + summary: Create group + tags: + - System Group + x-panel-log: + BeforeFuntions: [] + 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: "" + security: + - ApiKeyAuth: [] + summary: Delete group + tags: + - System Group + x-panel-log: + BeforeFuntions: + - db: groups + input_colume: id + input_value: id + isList: false + output_colume: name + output_value: name + - db: groups + input_colume: id + input_value: id + isList: false + output_colume: 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: + type: anrry + 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: "" + security: + - ApiKeyAuth: [] + summary: Update group + tags: + - System Group + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - name + - type + formatEN: update group [name][type] + formatZH: 更新组 [name][type] + paramKeys: [] /hosts: post: consumes: @@ -6153,8 +6270,8 @@ paths: bodyKeys: - port - strategy - formatEN: create port rules {[strategy][port]} - formatZH: 添加端口规则 {[strategy] [port]} + formatEN: create port rules [strategy][port] + formatZH: 添加端口规则 [strategy] [port] paramKeys: [] /hosts/firewall/search: post: @@ -6218,123 +6335,6 @@ paths: summary: Create group tags: - Firewall - /hosts/group: - post: - consumes: - - application/json - description: 创建系统组 - parameters: - - description: request - in: body - name: request - required: true - schema: - $ref: '#/definitions/dto.GroupCreate' - responses: - "200": - description: "" - security: - - ApiKeyAuth: [] - summary: Create group - tags: - - System Group - x-panel-log: - BeforeFuntions: [] - bodyKeys: - - name - - type - formatEN: create group [name][type] - formatZH: 创建组 [name][type] - paramKeys: [] - /hosts/group/del: - post: - consumes: - - application/json - description: 删除系统组 - parameters: - - description: request - in: body - name: request - required: true - schema: - $ref: '#/definitions/dto.OperateByID' - responses: - "200": - description: "" - security: - - ApiKeyAuth: [] - summary: Delete group - tags: - - System Group - x-panel-log: - BeforeFuntions: - - db: groups - input_colume: id - input_value: id - isList: false - output_colume: name - output_value: name - - db: groups - input_colume: id - input_value: id - isList: false - output_colume: type - output_value: type - bodyKeys: - - id - formatEN: delete group [type][name] - formatZH: 删除组 [type][name] - paramKeys: [] - /hosts/group/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: - type: anrry - security: - - ApiKeyAuth: [] - summary: List groups - tags: - - System Group - /hosts/group/update: - post: - consumes: - - application/json - description: 更新系统组 - parameters: - - description: request - in: body - name: request - required: true - schema: - $ref: '#/definitions/dto.GroupUpdate' - responses: - "200": - description: "" - security: - - ApiKeyAuth: [] - summary: Update group - tags: - - System Group - x-panel-log: - BeforeFuntions: [] - bodyKeys: - - name - - type - formatEN: update group [name][type] - formatZH: 更新组 [name][type] - paramKeys: [] /hosts/search: post: consumes: @@ -6421,6 +6421,34 @@ paths: 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: "" + security: + - ApiKeyAuth: [] + summary: Update host + tags: + - Host + x-panel-log: + BeforeFuntions: [] + bodyKeys: + - name + - addr + formatEN: update host [name][addr] + formatZH: 更新主机信息 [name][addr] + paramKeys: [] + /hosts/update/group: post: consumes: - application/json diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index c0a02efa2..99669eb58 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -694,6 +694,7 @@ const message = { apps: 'App', websites: 'Website', containers: 'Container', + runtimes: 'Runtime', commands: 'Command', groups: 'System Group', files: 'File Manage', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 90a935714..ceb733b68 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -694,6 +694,7 @@ const message = { apps: '应用', websites: '网站', containers: '容器', + runtimes: '运行环境', groups: '系统组', commands: '快捷命令', files: '文件管理',