fix: 统一删除提示信息及样式 (#2690)

This commit is contained in:
ssongliu
2023-10-26 18:20:16 +08:00
committed by GitHub
parent 3f6ea63d73
commit 8857d97dd7
31 changed files with 720 additions and 423 deletions

View File

@@ -2314,12 +2314,11 @@ const docTemplate = `{
"x-panel-log": {
"BeforeFunctions": [],
"bodyKeys": [
"name",
"operation",
"newName"
"names",
"operation"
],
"formatEN": "container [operation] [name] [newName]",
"formatZH": "容器 [name] 执行 [operation] [newName]",
"formatEN": "container [operation] [names]",
"formatZH": "容器 [names] 执行 [operation]",
"paramKeys": []
}
}
@@ -2369,6 +2368,49 @@ const docTemplate = `{
}
}
},
"/containers/rename": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "容器重命名",
"consumes": [
"application/json"
],
"tags": [
"Container"
],
"summary": "Rename Container",
"parameters": [
{
"description": "request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.ContainerRename"
}
}
],
"responses": {
"200": {
"description": "OK"
}
},
"x-panel-log": {
"BeforeFunctions": [],
"bodyKeys": [
"name",
"newName"
],
"formatEN": "rename container [name] =\u003e [newName]",
"formatZH": "容器重命名 [name] =\u003e [newName]",
"paramKeys": []
}
}
},
"/containers/repo": {
"get": {
"security": [
@@ -13022,15 +13064,15 @@ const docTemplate = `{
"dto.ContainerOperation": {
"type": "object",
"required": [
"name",
"names",
"operation"
],
"properties": {
"name": {
"type": "string"
},
"newName": {
"type": "string"
"names": {
"type": "array",
"items": {
"type": "string"
}
},
"operation": {
"type": "string",
@@ -13041,7 +13083,6 @@ const docTemplate = `{
"kill",
"pause",
"unpause",
"rename",
"remove"
]
}
@@ -13078,6 +13119,20 @@ const docTemplate = `{
}
}
},
"dto.ContainerRename": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"newName": {
"type": "string"
}
}
},
"dto.ContainerStats": {
"type": "object",
"properties": {

View File

@@ -2307,12 +2307,11 @@
"x-panel-log": {
"BeforeFunctions": [],
"bodyKeys": [
"name",
"operation",
"newName"
"names",
"operation"
],
"formatEN": "container [operation] [name] [newName]",
"formatZH": "容器 [name] 执行 [operation] [newName]",
"formatEN": "container [operation] [names]",
"formatZH": "容器 [names] 执行 [operation]",
"paramKeys": []
}
}
@@ -2362,6 +2361,49 @@
}
}
},
"/containers/rename": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "容器重命名",
"consumes": [
"application/json"
],
"tags": [
"Container"
],
"summary": "Rename Container",
"parameters": [
{
"description": "request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.ContainerRename"
}
}
],
"responses": {
"200": {
"description": "OK"
}
},
"x-panel-log": {
"BeforeFunctions": [],
"bodyKeys": [
"name",
"newName"
],
"formatEN": "rename container [name] =\u003e [newName]",
"formatZH": "容器重命名 [name] =\u003e [newName]",
"paramKeys": []
}
}
},
"/containers/repo": {
"get": {
"security": [
@@ -13015,15 +13057,15 @@
"dto.ContainerOperation": {
"type": "object",
"required": [
"name",
"names",
"operation"
],
"properties": {
"name": {
"type": "string"
},
"newName": {
"type": "string"
"names": {
"type": "array",
"items": {
"type": "string"
}
},
"operation": {
"type": "string",
@@ -13034,7 +13076,6 @@
"kill",
"pause",
"unpause",
"rename",
"remove"
]
}
@@ -13071,6 +13112,20 @@
}
}
},
"dto.ContainerRename": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"newName": {
"type": "string"
}
}
},
"dto.ContainerStats": {
"type": "object",
"properties": {

View File

@@ -431,10 +431,10 @@ definitions:
type: object
dto.ContainerOperation:
properties:
name:
type: string
newName:
type: string
names:
items:
type: string
type: array
operation:
enum:
- start
@@ -443,11 +443,10 @@ definitions:
- kill
- pause
- unpause
- rename
- remove
type: string
required:
- name
- names
- operation
type: object
dto.ContainerPrune:
@@ -471,6 +470,15 @@ definitions:
spaceReclaimed:
type: integer
type: object
dto.ContainerRename:
properties:
name:
type: string
newName:
type: string
required:
- name
type: object
dto.ContainerStats:
properties:
cache:
@@ -5704,11 +5712,10 @@ paths:
x-panel-log:
BeforeFunctions: []
bodyKeys:
- name
- names
- operation
- newName
formatEN: container [operation] [name] [newName]
formatZH: 容器 [name] 执行 [operation] [newName]
formatEN: container [operation] [names]
formatZH: 容器 [names] 执行 [operation]
paramKeys: []
/containers/prune:
post:
@@ -5739,6 +5746,34 @@ paths:
formatEN: clean container [pruneType]
formatZH: 清理容器 [pruneType]
paramKeys: []
/containers/rename:
post:
consumes:
- application/json
description: 容器重命名
parameters:
- description: request
in: body
name: request
required: true
schema:
$ref: '#/definitions/dto.ContainerRename'
responses:
"200":
description: OK
security:
- ApiKeyAuth: []
summary: Rename Container
tags:
- Container
x-panel-log:
BeforeFunctions: []
bodyKeys:
- name
- newName
formatEN: rename container [name] => [newName]
formatZH: 容器重命名 [name] => [newName]
paramKeys: []
/containers/repo:
get:
description: 获取镜像仓库列表