From 9f0ac150e77324d55a200aaca660f2edf7a4bece Mon Sep 17 00:00:00 2001 From: hLinx <327159425@qq.com> Date: Thu, 26 Sep 2024 15:32:58 +0800 Subject: [PATCH 1/6] =?UTF-8?q?fix(frontend):=20sqlserver=20=E9=9B=86?= =?UTF-8?q?=E7=BE=A4=E5=88=97=E8=A1=A8=E6=9D=83=E9=99=90=E8=A1=A5=E5=85=A8?= =?UTF-8?q?=20#7147?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/frontend/package.json | 2 +- .../src/components/db-table/index.vue | 1 + .../src/services/source/sqlserveHaCluster.ts | 10 +++++++-- .../services/source/sqlserverSingleCluster.ts | 4 +++- .../common/sql-execute/cluster-ids/Index.vue | 19 ++++++++-------- .../execute-objects/RenderData/Row.vue | 22 +++++++++---------- .../ha-cluster-list/components/List.vue | 7 ++++-- .../single-cluster/components/List.vue | 7 ++++-- 8 files changed, 43 insertions(+), 29 deletions(-) diff --git a/dbm-ui/frontend/package.json b/dbm-ui/frontend/package.json index 1ba0f12229..fd63b014ad 100644 --- a/dbm-ui/frontend/package.json +++ b/dbm-ui/frontend/package.json @@ -27,7 +27,7 @@ "@icon-cool/bk-icon-bk-biz-components": "0.0.4", "@vueuse/core": "^11.0.3", "axios": "^1.7.7", - "bkui-vue": "2.0.1-beta.69", + "bkui-vue": "2.0.1-beta.72", "date-fns": "3.6.0", "dayjs": "^1.11.13", "html-to-image": "1.11.11", diff --git a/dbm-ui/frontend/src/components/db-table/index.vue b/dbm-ui/frontend/src/components/db-table/index.vue index f93d11c627..4f8a4b61e8 100644 --- a/dbm-ui/frontend/src/components/db-table/index.vue +++ b/dbm-ui/frontend/src/components/db-table/index.vue @@ -323,6 +323,7 @@ props.dataSource(params, payload) .then((data) => { tableData.value = data; + console.log('tabledata = ', data); pagination.count = data.count; isSearching.value = getSearchingStatus(); isAnomalies.value = false; diff --git a/dbm-ui/frontend/src/services/source/sqlserveHaCluster.ts b/dbm-ui/frontend/src/services/source/sqlserveHaCluster.ts index 912f0beaa2..92743e5f00 100644 --- a/dbm-ui/frontend/src/services/source/sqlserveHaCluster.ts +++ b/dbm-ui/frontend/src/services/source/sqlserveHaCluster.ts @@ -30,7 +30,9 @@ const path = `/apis/sqlserver/bizs/${currentBizId}/sqlserver_ha_resources`; export function getHaClusterList(params: { limit?: number; offset?: number; sys_mode?: 'mirrorin' | 'always_on' }) { return http.get>(`${path}/`, params).then((data) => ({ ...data, - results: data.results.map((item) => new SqlServerHaModel(item)), + results: data.results.map( + (item) => new SqlServerHaModel(Object.assign({}, item, Object.assign(item.permission, data.permission))), + ), })); } @@ -43,7 +45,11 @@ export function getHaClusterWholeList() { limit: -1, offset: 0, }) - .then((data) => data.results.map((item) => new SqlServerHaModel(item))); + .then((data) => + data.results.map( + (item) => new SqlServerHaModel(Object.assign({}, item, Object.assign(item.permission, data.permission))), + ), + ); } /** diff --git a/dbm-ui/frontend/src/services/source/sqlserverSingleCluster.ts b/dbm-ui/frontend/src/services/source/sqlserverSingleCluster.ts index 7bb67e775c..b31e834ee7 100644 --- a/dbm-ui/frontend/src/services/source/sqlserverSingleCluster.ts +++ b/dbm-ui/frontend/src/services/source/sqlserverSingleCluster.ts @@ -26,7 +26,9 @@ const getPath = () => `/apis/sqlserver/bizs/${window.PROJECT_CONFIG.BIZ_ID}/sqls export function getSingleClusterList(params: { limit?: number; offset?: number }) { return http.get>(`${getPath()}/`, params).then((data) => ({ ...data, - results: data.results.map((item) => new SqlServerSingleModel(item)), + results: data.results.map( + (item) => new SqlServerSingleModel(Object.assign({}, item, Object.assign(item.permission, data.permission))), + ), })); } diff --git a/dbm-ui/frontend/src/views/db-manage/common/sql-execute/cluster-ids/Index.vue b/dbm-ui/frontend/src/views/db-manage/common/sql-execute/cluster-ids/Index.vue index 5dc4926eff..657a79bee4 100644 --- a/dbm-ui/frontend/src/views/db-manage/common/sql-execute/cluster-ids/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/common/sql-execute/cluster-ids/Index.vue @@ -42,16 +42,6 @@ @change="handelClusterChange" /> - - + - + - diff --git a/dbm-ui/frontend/src/views/db-manage/sqlserver/permission/components/AccountDialog.vue b/dbm-ui/frontend/src/views/db-manage/sqlserver/permission/components/AccountDialog.vue index 68992d9ab7..be531bb09e 100644 --- a/dbm-ui/frontend/src/views/db-manage/sqlserver/permission/components/AccountDialog.vue +++ b/dbm-ui/frontend/src/views/db-manage/sqlserver/permission/components/AccountDialog.vue @@ -6,7 +6,7 @@ :is-show="accountDialogIsShow" :quick-close="false" :title="t('新建账号')" - :width="480" + :width="580" @closed="handleClose"> + :maxlength="32" + :placeholder="userPlaceholder" + show-word-limit />

{{ t('账号创建后,不支持修改。') }}

@@ -185,7 +187,7 @@ { trigger: 'change', message: userPlaceholder, - validator: (value: string) => /^[a-z0-9][a-z0-9-_.]*$/g.test(value), + validator: (value: string) => /^[a-zA-Z0-9][a-zA-Z0-9-_.]{0,31}$/.test(value), }, ], password: [ diff --git a/dbm-ui/frontend/src/views/db-manage/tendb-cluster/permission/components/AddAccountDialog.vue b/dbm-ui/frontend/src/views/db-manage/tendb-cluster/permission/components/AddAccountDialog.vue index 83edae3ad0..8865f287e2 100644 --- a/dbm-ui/frontend/src/views/db-manage/tendb-cluster/permission/components/AddAccountDialog.vue +++ b/dbm-ui/frontend/src/views/db-manage/tendb-cluster/permission/components/AddAccountDialog.vue @@ -19,7 +19,7 @@ :is-show="isShow" :quick-close="false" :title="t('新建账号')" - :width="480" + :width="580" @closed="handleClose"> + :maxlength="32" + :placeholder="userPlaceholder" + show-word-limit />

{{ t('账号创建后,不支持修改。') }}

@@ -208,7 +210,7 @@ { trigger: 'change', message: userPlaceholder, - validator: (value: string) => /^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,31}$/g.test(value), + validator: (value: string) => /^[a-zA-Z0-9][a-zA-Z0-9-_.]{0,31}$/.test(value), }, ], password: [ From ae2c3b4ddee0b50b8d4e06934a6f4d91b2806eea Mon Sep 17 00:00:00 2001 From: 3octaves <873551943@qq.com> Date: Fri, 27 Sep 2024 18:34:52 +0800 Subject: [PATCH 4/6] =?UTF-8?q?fix(frontend):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=BB=A5=E6=9E=84=E9=80=A0=E5=AE=9E=E4=BE=8B=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E6=8F=90=E5=8D=95=E5=8F=82=E6=95=B0=E7=BC=BA=E5=B0=91=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20#7178?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../redis/recover-from-instance/pages/page1/Index.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dbm-ui/frontend/src/views/db-manage/redis/recover-from-instance/pages/page1/Index.vue b/dbm-ui/frontend/src/views/db-manage/redis/recover-from-instance/pages/page1/Index.vue index b04e687a4e..fef1cf6463 100644 --- a/dbm-ui/frontend/src/views/db-manage/redis/recover-from-instance/pages/page1/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/redis/recover-from-instance/pages/page1/Index.vue @@ -88,6 +88,8 @@ import { useTicketCloneInfo } from '@hooks'; + import { useGlobalBizs } from '@stores'; + import { ClusterTypes, LocalStorageKeys, TicketTypes } from '@common/const'; import VisitEntrySelector from '@components/cluster-selector/Index.vue'; @@ -98,6 +100,7 @@ const { t } = useI18n(); const router = useRouter(); + const { currentBizId } = useGlobalBizs(); // 单据克隆 useTicketCloneInfo({ From 9b6c0cfa8bfc0b3cb75e13105f8b84a9bcdb3cac Mon Sep 17 00:00:00 2001 From: hLinx <327159425@qq.com> Date: Sun, 29 Sep 2024 22:50:54 +0800 Subject: [PATCH 5/6] =?UTF-8?q?fix(frontend):=20=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E8=BD=AE=E5=80=BC=E7=AD=96=E7=95=A5=E4=BA=BA=E5=91=98=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=97=A0=E6=95=88=20#7193?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/frontend/package.json | 2 +- .../components/db-member-selector/index.vue | 199 +++++++++++------ .../sql-execute/common/RenderSql/Index.vue | 4 +- .../views/duty-rule-manage/index/Index.vue | 4 +- .../components/edit-rule/CustomRotate.vue | 211 +++++------------- .../components/edit-rule/CycleRotate.vue | 81 +++---- .../index/components/edit-rule/Index.vue | 166 ++++---------- .../frontend/src/views/staff-manage/Index.vue | 2 +- .../components/MemberSelector.vue | 172 -------------- 9 files changed, 270 insertions(+), 571 deletions(-) delete mode 100644 dbm-ui/frontend/src/views/staff-manage/components/MemberSelector.vue diff --git a/dbm-ui/frontend/package.json b/dbm-ui/frontend/package.json index fd63b014ad..396751294d 100644 --- a/dbm-ui/frontend/package.json +++ b/dbm-ui/frontend/package.json @@ -27,7 +27,7 @@ "@icon-cool/bk-icon-bk-biz-components": "0.0.4", "@vueuse/core": "^11.0.3", "axios": "^1.7.7", - "bkui-vue": "2.0.1-beta.72", + "bkui-vue": "2.0.1-beta.74", "date-fns": "3.6.0", "dayjs": "^1.11.13", "html-to-image": "1.11.11", diff --git a/dbm-ui/frontend/src/components/db-member-selector/index.vue b/dbm-ui/frontend/src/components/db-member-selector/index.vue index 23f000c555..b4fe4867c1 100644 --- a/dbm-ui/frontend/src/components/db-member-selector/index.vue +++ b/dbm-ui/frontend/src/components/db-member-selector/index.vue @@ -13,75 +13,124 @@ - diff --git a/dbm-ui/frontend/src/views/db-manage/common/sql-execute/common/RenderSql/Index.vue b/dbm-ui/frontend/src/views/db-manage/common/sql-execute/common/RenderSql/Index.vue index 0d5a4d6c01..9b2dacbf0f 100644 --- a/dbm-ui/frontend/src/views/db-manage/common/sql-execute/common/RenderSql/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/common/sql-execute/common/RenderSql/Index.vue @@ -12,7 +12,9 @@ text theme="primary" @click="handleShowSql"> - {{ modelValue.length < 1 ? t('点击添加') : t('n 个 SQL 文件', { n: modelValue.length }) }} + {{ t('点击添加') }} + {{ modelValue[0] }} + {{ t('n 个 SQL 文件', { n: modelValue.length }) }} diff --git a/dbm-ui/frontend/src/views/duty-rule-manage/index/Index.vue b/dbm-ui/frontend/src/views/duty-rule-manage/index/Index.vue index 9657e5880b..3ab2606b17 100644 --- a/dbm-ui/frontend/src/views/duty-rule-manage/index/Index.vue +++ b/dbm-ui/frontend/src/views/duty-rule-manage/index/Index.vue @@ -20,13 +20,15 @@ From 47e69c9a3554de461baaf9604e7f371bced59f0c Mon Sep 17 00:00:00 2001 From: hLinx <327159425@qq.com> Date: Wed, 9 Oct 2024 12:01:14 +0800 Subject: [PATCH 6/6] =?UTF-8?q?fix(frontend):=20sqlserver=20=E5=8D=95?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E9=83=A8=E7=BD=B2=E6=94=AF=E6=8C=81=E7=AB=AF?= =?UTF-8?q?=E5=8F=A3=E5=8F=B7=20#7218?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/db-manage/sqlserver/apply/SqlServer.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dbm-ui/frontend/src/views/db-manage/sqlserver/apply/SqlServer.vue b/dbm-ui/frontend/src/views/db-manage/sqlserver/apply/SqlServer.vue index 761910aca8..fb1fea7a12 100644 --- a/dbm-ui/frontend/src/views/db-manage/sqlserver/apply/SqlServer.vue +++ b/dbm-ui/frontend/src/views/db-manage/sqlserver/apply/SqlServer.vue @@ -99,10 +99,9 @@ - +