From e3c78fd57db69e7e93a44fdbfc3726f5b98bbe58 Mon Sep 17 00:00:00 2001 From: ssongliu Date: Tue, 7 Mar 2023 10:19:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=BB=E6=9C=BA=E5=88=86=E7=BB=84?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4=E5=88=86?= =?UTF-8?q?=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/init/migration/migrations/init.go | 2 +- frontend/src/components/group/index.vue | 9 ++++++--- frontend/src/lang/modules/en.ts | 2 +- frontend/src/lang/modules/zh.ts | 2 +- frontend/src/views/host/terminal/host/operate/index.vue | 6 ++++++ 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/backend/init/migration/migrations/init.go b/backend/init/migration/migrations/init.go index 884e79c89..2253612e9 100644 --- a/backend/init/migration/migrations/init.go +++ b/backend/init/migration/migrations/init.go @@ -33,7 +33,7 @@ var AddTableHost = &gormigrate.Migration{ return err } group := model.Group{ - Name: "default", Type: "host", + Name: "default", Type: "host", IsDefault: true, } if err := tx.Create(&group).Error; err != nil { return err diff --git a/frontend/src/components/group/index.vue b/frontend/src/components/group/index.vue index 0660259dd..f8a77a42c 100644 --- a/frontend/src/components/group/index.vue +++ b/frontend/src/components/group/index.vue @@ -10,10 +10,13 @@ diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 083982671..1d0fb08b6 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -126,7 +126,7 @@ export default { imageName: 'Support English, Chinese, numbers, :.-_, length 1-30', volumeName: 'Support English, numbers, .-_, length 1-30', complexityPassword: - 'Please enter a password with more than 8 characters and at least two combinations of letters, numbers, and special symbols', + 'Enter a password that is longer than eight characters and contains at least two letters, digits, and special characters', commonPassword: 'Please enter a password with more than 6 characters', email: 'Email format error', number: 'Please enter the correct number', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index beaefb628..a2e264746 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -130,7 +130,7 @@ export default { dbName: '支持英文、中文、数字、.-_,长度1-16', imageName: '支持英文、中文、数字、:.-_,长度1-30', volumeName: '支持英文、数字、.-和_,长度1-30', - complexityPassword: '请输入 8 位以上、必须含有字母、数字、特殊符号至少两种组合的密码', + complexityPassword: '请输入长度大于 8 位且包含字母、数字、特殊字符至少两项的密码组合', commonPassword: '请输入 6 位以上长度密码', linuxName: '长度1-30,名称不能含有{0}等符号', email: '请输入正确的邮箱', diff --git a/frontend/src/views/host/terminal/host/operate/index.vue b/frontend/src/views/host/terminal/host/operate/index.vue index ca3ce73e9..b4eb5ef20 100644 --- a/frontend/src/views/host/terminal/host/operate/index.vue +++ b/frontend/src/views/host/terminal/host/operate/index.vue @@ -120,6 +120,12 @@ const rules = reactive({ const loadGroups = async () => { const res = await GetGroupList({ type: 'host' }); groupList.value = res.data; + for (const item of groupList.value) { + if (item.isDefault) { + dialogData.value.rowData.groupID = item.id; + break; + } + } }; const submitAddHost = (formEl: FormInstance | undefined, ops: string) => {