From ab87addebc00351f1ec66d2765e57434680c1545 Mon Sep 17 00:00:00 2001
From: chenwenchang <479999519@qq.com>
Date: Tue, 24 Sep 2024 10:39:47 +0800
Subject: [PATCH] =?UTF-8?q?feat(frontend):=20=E9=9B=86=E7=BE=A4=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E5=B1=95=E7=A4=BA=E4=BC=98=E5=8C=96=20#6834=20#=20Rev?=
=?UTF-8?q?iewed,=20transaction=20id:=2019213?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../cluster-capacity-usage-rate/Index.vue | 4 +-
.../components/cluster-entry-config/Index.vue | 153 ++-
.../cluster-entry-config/MultipleInput.vue | 126 ---
.../cluster-entry-config/RenderBindIps.vue | 228 +++++
.../render-instances/RenderInstances.vue | 105 +-
dbm-ui/frontend/src/locales/zh-cn.json | 3 +-
.../src/services/model/mysql/tendbha.ts | 12 +
.../model/sqlserver/sqlserver-ha-cluster.ts | 1 +
.../sqlserver/sqlserver-single-cluster.ts | 4 +
dbm-ui/frontend/src/services/source/spider.ts | 11 +
dbm-ui/frontend/src/types/auto-imports.d.ts | 1 +
.../list/components/list/Index.vue | 32 +-
.../hdfs/list/components/list/Index.vue | 35 +-
.../kafka/list/components/list/Index.vue | 33 +-
.../mysql/ha-cluster-list/components/List.vue | 180 ++--
.../components/RenderEntries.vue | 104 ++
.../ha-instance-list/components/List.vue | 80 +-
.../single-cluster-list/components/List.vue | 36 +-
.../pulsar/list/components/list/Index.vue | 35 +-
.../redis/list-ha/components/list/Index.vue | 53 +-
.../redis/list/components/list/Index.vue | 960 +++++++++---------
.../ha-cluster-list/components/List.vue | 70 +-
.../single-cluster/components/List.vue | 32 +-
.../list-instance/components/list/Index.vue | 86 +-
.../list/components/list/Index.vue | 283 +++---
25 files changed, 1372 insertions(+), 1295 deletions(-)
delete mode 100644 dbm-ui/frontend/src/components/cluster-entry-config/MultipleInput.vue
create mode 100644 dbm-ui/frontend/src/components/cluster-entry-config/RenderBindIps.vue
create mode 100644 dbm-ui/frontend/src/views/db-manage/mysql/ha-cluster-list/components/RenderEntries.vue
diff --git a/dbm-ui/frontend/src/components/cluster-capacity-usage-rate/Index.vue b/dbm-ui/frontend/src/components/cluster-capacity-usage-rate/Index.vue
index f1e2121cd0..89d25d275e 100644
--- a/dbm-ui/frontend/src/components/cluster-capacity-usage-rate/Index.vue
+++ b/dbm-ui/frontend/src/components/cluster-capacity-usage-rate/Index.vue
@@ -48,7 +48,7 @@
}
let color = '#2DCB56';
- const { used, total, in_use: inUse } = props.clusterStats;
+ const { used = 0, total = 0, in_use: inUse = 0 } = props.clusterStats;
if (inUse >= 90) {
color = '#EA3636';
@@ -71,8 +71,8 @@
align-items: center;
.usage-rate {
- color: #63656e;
font-weight: 700;
+ color: #63656e;
}
.usage-text {
diff --git a/dbm-ui/frontend/src/components/cluster-entry-config/Index.vue b/dbm-ui/frontend/src/components/cluster-entry-config/Index.vue
index 23e448d1e2..6f8d6b8314 100644
--- a/dbm-ui/frontend/src/components/cluster-entry-config/Index.vue
+++ b/dbm-ui/frontend/src/components/cluster-entry-config/Index.vue
@@ -12,12 +12,19 @@
-->
+ (isShow = true)" />
+ @closed="() => (isShow = false)">
-
-
- {{ t('保存') }}
-
-
- {{ t('取消') }}
-
-
-
diff --git a/dbm-ui/frontend/src/components/cluster-entry-config/MultipleInput.vue b/dbm-ui/frontend/src/components/cluster-entry-config/MultipleInput.vue
deleted file mode 100644
index 740f316609..0000000000
--- a/dbm-ui/frontend/src/components/cluster-entry-config/MultipleInput.vue
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
-
-
diff --git a/dbm-ui/frontend/src/components/cluster-entry-config/RenderBindIps.vue b/dbm-ui/frontend/src/components/cluster-entry-config/RenderBindIps.vue
new file mode 100644
index 0000000000..e13f1b5db4
--- /dev/null
+++ b/dbm-ui/frontend/src/components/cluster-entry-config/RenderBindIps.vue
@@ -0,0 +1,228 @@
+
+
+
+
+
+
+
diff --git a/dbm-ui/frontend/src/components/render-instances/RenderInstances.vue b/dbm-ui/frontend/src/components/render-instances/RenderInstances.vue
index c98879269e..742d6ed421 100644
--- a/dbm-ui/frontend/src/components/render-instances/RenderInstances.vue
+++ b/dbm-ui/frontend/src/components/render-instances/RenderInstances.vue
@@ -35,6 +35,9 @@
size="small">
{{ t('不可用') }}
+
-
-
+
+
diff --git a/dbm-ui/frontend/src/views/db-manage/mysql/ha-instance-list/components/List.vue b/dbm-ui/frontend/src/views/db-manage/mysql/ha-instance-list/components/List.vue
index 09ee42de1f..f32fde52d6 100644
--- a/dbm-ui/frontend/src/views/db-manage/mysql/ha-instance-list/components/List.vue
+++ b/dbm-ui/frontend/src/views/db-manage/mysql/ha-instance-list/components/List.vue
@@ -176,7 +176,7 @@
label: t('实例'),
field: 'instance_address',
fixed: 'left',
- minWidth: 200,
+ width: 200,
showOverflowTooltip: false,
render: ({ cell, data }: ColumnData) => (
@@ -198,36 +198,6 @@
),
},
- {
- label: t('集群名称'),
- field: 'cluster_name',
- minWidth: 200,
- showOverflowTooltip: false,
- render: ({ cell, data }: ColumnData) => (
-
- {{
- default: () => (
- handleToClusterDetails(data)}>
- {cell}
-
- ),
- append: () => (
- copy(cell)} />
- ),
- }}
-
- ),
- },
{
label: t('状态'),
field: 'status',
@@ -255,9 +225,18 @@
},
},
{
- label: t('主访问入口'),
+ label: t('部署角色'),
+ field: 'role',
+ width: 140,
+ filter: {
+ list: columnAttrs.value.role,
+ checked: columnCheckedMap.value.role,
+ },
+ },
+ {
+ label: t('所属集群'),
field: 'master_domain',
- minWidth: 200,
+ width: 260,
showOverflowTooltip: false,
render: ({ cell }: ColumnData) => (
@@ -265,7 +244,7 @@
default: () => cell,
append: () => (
copy(cell)} />
@@ -275,17 +254,27 @@
),
},
{
- label: t('从访问入口'),
- field: 'slave_domain',
- minWidth: 200,
+ label: t('集群名称'),
+ field: 'cluster_name',
+ width: 180,
showOverflowTooltip: false,
- render: ({ cell }: ColumnData) => (
+ render: ({ cell, data }: ColumnData) => (
{{
- default: () => cell,
+ default: () => (
+ handleToClusterDetails(data)}>
+ {cell}
+
+ ),
append: () => (
copy(cell)} />
@@ -294,19 +283,10 @@
),
},
- {
- label: t('部署角色'),
- field: 'role',
- width: 100,
- filter: {
- list: columnAttrs.value.role,
- checked: columnCheckedMap.value.role,
- },
- },
{
label: t('部署时间'),
field: 'create_at',
- width: 250,
+ width: 240,
sort: true,
render: ({ data }: { data: TendbhaInstanceModel }) => data.createAtDisplay || '--',
},
diff --git a/dbm-ui/frontend/src/views/db-manage/mysql/single-cluster-list/components/List.vue b/dbm-ui/frontend/src/views/db-manage/mysql/single-cluster-list/components/List.vue
index efbfd46c33..e88f3070f3 100644
--- a/dbm-ui/frontend/src/views/db-manage/mysql/single-cluster-list/components/List.vue
+++ b/dbm-ui/frontend/src/views/db-manage/mysql/single-cluster-list/components/List.vue
@@ -86,10 +86,6 @@
-
>();
const isShowExcelAuthorize = ref(false);
const showDataExportSlider = ref(false)
- const showEditEntryConfig = ref(false);
const selected = ref([])
- const currentData = ref()
+ const currentData = ref();
const authorizeState = reactive({
isShow: false,
@@ -359,17 +355,14 @@
}
]
} />
- handleOpenEntryConfig(data)}>
-
-
+
+
+
>
),
}}
@@ -807,11 +800,6 @@
isShowExcelAuthorize.value = true;
};
- const handleOpenEntryConfig = (row: TendbsingleModel) => {
- showEditEntryConfig.value = true;
- clusterId.value = row.id;
- };
-
const handleShowDataExportSlider = (data: TendbsingleModel) => {
currentData.value = data
showDataExportSlider.value = true;
@@ -975,7 +963,7 @@
}
.db-icon-copy,
- .db-icon-edit {
+ .db-icon-visible1 {
display: none;
margin-top: 1px;
margin-left: 4px;
@@ -1007,7 +995,7 @@
:deep(td:hover) {
.db-icon-copy,
- .db-icon-edit {
+ .db-icon-visible1 {
display: inline-block !important;
}
}
diff --git a/dbm-ui/frontend/src/views/db-manage/pulsar/list/components/list/Index.vue b/dbm-ui/frontend/src/views/db-manage/pulsar/list/components/list/Index.vue
index 0bef32bc71..37c26e6d67 100644
--- a/dbm-ui/frontend/src/views/db-manage/pulsar/list/components/list/Index.vue
+++ b/dbm-ui/frontend/src/views/db-manage/pulsar/list/components/list/Index.vue
@@ -93,10 +93,6 @@
-