From 74f7c0c9a3766c895a2f21afdfe6f48adf2be697 Mon Sep 17 00:00:00 2001 From: 3octaves <873551943@qq.com> Date: Mon, 11 Nov 2024 17:55:53 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20=E9=9B=86=E7=BE=A4=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=94=AF=E6=8C=81=E6=89=B9=E9=87=8F=E7=A6=81=E7=94=A8?= =?UTF-8?q?/=E5=90=AF=E7=94=A8=E3=80=81=E5=88=A0=E9=99=A4=E9=9B=86?= =?UTF-8?q?=E7=BE=A4=20#7753?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../doris/list/components/list/Index.vue | 47 +++++----- .../list/components/list/Index.vue | 35 ++++--- .../hdfs/list/components/list/Index.vue | 35 ++++--- .../kafka/list/components/list/Index.vue | 47 +++++----- .../components/list/Index.vue | 66 ++++++------- .../components/list/Index.vue | 94 +++++++++---------- .../mysql/ha-cluster-list/components/List.vue | 83 +++++++--------- .../single-cluster-list/components/List.vue | 62 ++++++------ .../pulsar/list/components/list/Index.vue | 29 +++--- .../redis/list-ha/components/list/Index.vue | 47 +++++----- .../redis/list/components/list/Index.vue | 47 +++++----- .../ha-cluster-list/components/List.vue | 53 ++++------- .../single-cluster/components/List.vue | 53 ++++------- .../list/components/list/Index.vue | 58 +++++------- 14 files changed, 336 insertions(+), 420 deletions(-) diff --git a/dbm-ui/frontend/src/views/db-manage/doris/list/components/list/Index.vue b/dbm-ui/frontend/src/views/db-manage/doris/list/components/list/Index.vue index 92b565672e..b4682fdb1f 100644 --- a/dbm-ui/frontend/src/views/db-manage/doris/list/components/list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/doris/list/components/list/Index.vue @@ -300,8 +300,7 @@ { label: t('访问入口'), field: 'domain', - width: 300, - minWidth: 300, + minWidth: 320, fixed: 'left', renderHead: () => ( ( <> + { + data.operationTagTips.map(item => ) + } + { + data.isOffline && !data.isStarting && ( + + {t('已禁用')} + + ) + } + { + data.isNew && ( + + NEW + + ) + } { data.domain && ( ( <> - { - data.operationTagTips.map(item => ) - } - { - data.isOffline && !data.isStarting && ( - - {t('已禁用')} - - ) - } - { - data.isNew && ( - - NEW - - ) - } ( ( <> + { + data.operationTagTips.map(item => ) + } + { + !data.isOnline && !data.isStarting && ( + + {t('已禁用')} + + ) + } + { + isRecentDays(data.create_at, 24 * 3) + && + } {data.domain && (
{data.cluster_alias || '--'}
- { - data.operationTagTips.map(item => ) - } - { - !data.isOnline && !data.isStarting && ( - - {t('已禁用')} - - ) - } - { - isRecentDays(data.create_at, 24 * 3) - && - } ( ( <> + { + data.operationTagTips.map(item => ) + } + { + data.isOffline && ( + + {t('已禁用')} + + ) + } + { + isRecentDays(data.create_at, 24 * 3) + && + } {data.domain && ( - { - data.operationTagTips.map(item => ) - } - { - data.isOffline && ( - - {t('已禁用')} - - ) - } - { - isRecentDays(data.create_at, 24 * 3) - && - } ( ( <> + { + data.operationTagTips.map(item => ) + } + { + data.isOffline && !data.isStarting && ( + + {t('已禁用')} + + ) + } + { + data.isNew && ( + + NEW + + ) + } {data.domain && ( ( <> - { - data.operationTagTips.map(item => ) - } - { - data.isOffline && !data.isStarting && ( - - {t('已禁用')} - - ) - } - { - data.isNew && ( - - NEW - - ) - } - - {{ t('批量授权') }} - - - ) - } { data.isStructCluster && ( ) } - { - data.operationTagTips.map(item => ( - - )) - } - { - data.isOffline && ( - - {t('已禁用')} - - ) - } ); @@ -448,6 +423,31 @@ ), append: () => ( <> + { + data.isNew && ( + + + ) + } + { + data.operationTagTips.map(item => ( + + )) + } + { + data.isOffline && ( + + {t('已禁用')} + + ) + } - - {{ t('批量授权') }} - - )) - } - { - data.isOffline && ( - - {t('已禁用')} - - ) - } - - ); - - return ( -
- handleToDetails(data.id)}> - {content} - - { data.cluster_alias } -
- ); - }, + render: ({ data }: { data: MongodbModel }) => ( +
+ handleToDetails(data.id)}> + + { data.cluster_alias } +
+ ), }, { label: t('主域名'), field: 'master_domain', - width: 280, - minWidth: 280, + minWidth: 320, renderHead: () => ( ( <> + { + data.isNew && ( + + ) + } + { + data.operationTagTips.map(item => ( + + )) + } + { + data.isOffline && ( + + {t('已禁用')} + + ) + } - - - {{ t('批量订阅') }} - - - - - {{ t('批量授权') }} - - selected.value.map(item => item.id)); const clusterBatchOperationList = computed(() => [ + { + dbConsole: 'mysql.haClusterList.batchSubscription', + click: () => handleShowCreateSubscribeRuleSlider(), + disabled: false, + tooltips: '', + text: t('批量订阅') + }, + { + dbConsole: 'mysql.haClusterList.batchAuthorize', + click: () => handleShowAuthorize(selected.value), + disabled: false, + tooltips: '', + text: t('批量授权') + }, { dbConsole: 'mysql.haClusterList.disable', click: () => handleSwitchCluster(TicketTypes.MYSQL_HA_DISABLE, selected.value), @@ -376,8 +362,7 @@ label: t('主访问入口'), field: 'master_domain', fixed: 'left', - width: 280, - minWidth: 280, + minWidth: 320, showOverflowTooltip: false, renderHead: () => ( ( <> + { + data.operationTagTips.map(item => ) + } + { + data.isOffline && !data.isStarting && ( + + {t('已禁用')} + + ) + } + { + isRecentDays(data.create_at, 24 * 3) && ( + + ) + } data.cluster_name, append: () => ( <> - { - data.operationTagTips.map(item => ) - } - { - data.isOffline && !data.isStarting && ( - - {t('已禁用')} - - ) - } - { - isRecentDays(data.create_at, 24 * 3) && ( - - ) - } - - - {{ t('批量授权') }} - - selected.value.map(item => item.id)); const clusterBatchOperationList = computed(() => [ + { + dbConsole: 'mysql.singleClusterList.batchAuthorize', + click: () => handleShowAuthorize(selected.value), + disabled: false, + tooltips: '', + text: t('批量授权') + }, { dbConsole: 'mysql.singleClusterList.disable', click: () => handleSwitchCluster(TicketTypes.MYSQL_SINGLE_DISABLE, selected.value), @@ -334,8 +327,7 @@ label: t('访问入口'), field: 'master_domain', fixed: 'left', - width: 280, - minWidth: 280, + minWidth: 320, renderHead: () => ( ( <> + { + data.operationTagTips.map(item => ) + } + { + data.isOffline && !data.isStarting && ( + + {t('已禁用')} + + ) + } + { + isRecentDays(data.create_at, 24 * 3) && ( + + ) + } data.cluster_name, append: () => ( <> - { - data.operationTagTips.map(item => ) - } - { - data.isOffline && !data.isStarting && ( - - {t('已禁用')} - - ) - } - { - isRecentDays(data.create_at, 24 * 3) && ( - - ) - } ( @@ -284,6 +283,19 @@ ), append: () => ( <> + { + data.operationTagTips.map(item => ) + } + { + data.isOffline && ( + + {t('已禁用')} + + ) + } + { data.isNew && } {data.domain && ( {data.cluster_name} - { - data.operationTagTips.map(item => ) - } - { - data.isOffline && ( - - {t('已禁用')} - - ) - } - { data.isNew && } ( ( <> + { + data.operationTagTips.map(item => ) + } + { + !data.isOnline && !data.isStarting && ( + + {t('已禁用')} + + ) + } + { + data.isNew && ( + + NEW + + ) + } {data.master_domain && ( -
- { - data.operationTagTips.map(item => ) - } - { - !data.isOnline && !data.isStarting && ( - - {t('已禁用')} - - ) - } - { - data.isNew && ( - - NEW - - ) - } -
( )} + { + data.operationTagTips.map(item => ) + } + { + !data.isOnline && !data.isStarting && ( + + {t('已禁用')} + + ) + } + { + data.isNew && ( + + NEW + + ) + } {data.master_domain && ( -
- { - data.operationTagTips.map(item => ) - } - { - !data.isOnline && !data.isStarting && ( - - {t('已禁用')} - - ) - } - { - data.isNew && ( - - NEW - - ) - } -
- - - {{ t('批量授权') }} - - @@ -141,7 +128,7 @@ import { getMenuListSearch, getSearchSelectorParams, - isRecentDays + // isRecentDays } from '@utils'; const haClusterData = defineModel<{ @@ -213,6 +200,13 @@ const isCN = computed(() => locale.value === 'zh-cn'); const clusterBatchOperationList = computed(() => [ + { + dbConsole: 'sqlserver.haClusterList.batchAuthorize', + click: () => handleShowAuthorize(selected.value), + disabled: false, + tooltips: '', + text: t('批量授权') + }, { dbConsole: 'sqlserver.haClusterList.disable', click: () => handleSwitchCluster(TicketTypes.SQLSERVER_DISABLE, selected.value), @@ -335,8 +329,7 @@ label: t('主访问入口'), field: 'master_domain', fixed: 'left', - width: 280, - minWidth: 280, + minWidth: 320, showOverflowTooltip: false, renderHead: () => ( )) } + { + data.isOffline && !data.isStarting && ( + + {t('已禁用')} + + ) + } data.cluster_name, append: () => ( <> - { - data.operationTagTips.map(item => ) - } - { - data.isOffline && !data.isStarting && ( - - {t('已禁用')} - - ) - } - { - isRecentDays(data.create_at, 24 * 3) && ( - - ) - } - - - {{ t('批量授权') }} - - @@ -140,7 +127,7 @@ import { getMenuListSearch, getSearchSelectorParams, - isRecentDays, + // isRecentDays, } from '@utils'; const singleClusterData = defineModel<{ clusterId: number }>('singleClusterData'); @@ -210,6 +197,13 @@ const isCN = computed(() => locale.value === 'zh-cn'); const clusterBatchOperationList = computed(() => [ + { + dbConsole: 'sqlserver.singleClusterList.batchAuthorize', + click: () => handleShowAuthorize(selected.value), + disabled: false, + tooltips: '', + text: t('批量授权') + }, { dbConsole: 'sqlserver.singleClusterList.disable', click: () => handleSwitchCluster(TicketTypes.SQLSERVER_DISABLE, selected.value), @@ -322,8 +316,7 @@ label: t('访问入口'), field: 'master_domain', fixed: 'left', - width: 280, - minWidth: 280, + minWidth: 320, renderHead: () => ( )) } + { + data.isOffline && !data.isStarting && ( + + {t('已禁用')} + + ) + } data.cluster_name, append: () => ( <> - { - data.operationTagTips.map(item => ) - } - { - data.isOffline && !data.isStarting && ( - - {t('已禁用')} - - ) - } - { - isRecentDays(data.create_at, 24 * 3) && ( - - ) - } - - - {{ t('批量授权') }} - - ) + } + { + data.isOffline && !data.isStarting && ( + + {t('已禁用')} + + ) + } + { + !data.isNew && ( + + ) + } {data.master_domain && ( ) } - { - data.operationTagTips.map(item => ) - } - { - data.isOffline && !data.isStarting && ( - - {t('已禁用')} - - ) - } - { - data.isNew && ( - - ) - }