From 4870d40a28d6900c93223faa8a12bfc2dc807e53 Mon Sep 17 00:00:00 2001 From: chenwenchang <479999519@qq.com> Date: Tue, 27 Aug 2024 14:59:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=E5=8D=95=E6=8D=AE=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4=20#6482=20#=20Rev?= =?UTF-8?q?iewed,=20transaction=20id:=2017892?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/demand-factory/Index.vue | 13 +- .../demand-factory/bigdata/DetailsES.vue | 118 ++++++++-------- .../demand-factory/bigdata/DetailsHDFS.vue | 100 +++++++------- .../bigdata/DetailsInfluxDB.vue | 76 +++++----- .../demand-factory/bigdata/DetailsKafka.vue | 94 ++++++------- .../demand-factory/bigdata/DetailsPulsar.vue | 130 +++++++++--------- .../demand-factory/bigdata/DetailsRiak.vue | 94 ++++++------- .../bigdata/RiakExpansionCapacity.vue | 38 ++--- .../bigdata/expansion-capacity/Index.vue | 44 +++--- .../demand-factory/components/DemandInfo.vue | 2 +- .../demand-factory/mongodb/DbBackup.vue | 57 ++++---- .../demand-factory/mongodb/DbClear.vue | 40 +++--- .../demand-factory/mongodb/DbStruct.vue | 22 +-- .../demand-factory/mongodb/DbTableBackup.vue | 48 ++++--- .../demand-factory/mongodb/ShardScaleDown.vue | 126 +++++++++-------- .../demand-factory/mongodb/ShardScaleUp.vue | 8 +- .../mongodb/script-execute/Index.vue | 12 +- .../demand-factory/mysql/Checksum.vue | 21 ++- .../components/demand-factory/mysql/Clone.vue | 1 - .../demand-factory/mysql/ClusterOperation.vue | 1 - .../demand-factory/mysql/DataMigrate.vue | 1 - .../demand-factory/mysql/Details.vue | 96 ++++++------- .../demand-factory/mysql/DumperInstall.vue | 32 ++--- .../mysql/DumperNodeStatusUpdate.vue | 1 - .../demand-factory/mysql/DumperSwitchNode.vue | 1 - .../demand-factory/mysql/Flashback.vue | 1 - .../demand-factory/mysql/FullBackup.vue | 27 ++-- .../demand-factory/mysql/HATruncate.vue | 9 +- .../demand-factory/mysql/MasterFailOver.vue | 83 ++++++----- .../mysql/MasterSlaveSwitch.vue | 83 ++++++----- .../demand-factory/mysql/MigrateCluster.vue | 1 - .../demand-factory/mysql/OpenArea.vue | 3 +- .../demand-factory/mysql/Partition.vue | 1 - .../demand-factory/mysql/ProxyAdd.vue | 1 - .../demand-factory/mysql/ProxySwitch.vue | 1 - .../demand-factory/mysql/Rename.vue | 1 - .../mysql/RestoreLocalSlave.vue | 1 - .../demand-factory/mysql/RestoreSlave.vue | 1 - .../demand-factory/mysql/SlaveAdd.vue | 1 - .../demand-factory/mysql/TableBackup.vue | 1 - .../mysql/authorize-rule/Index.vue | 2 +- .../mysql/import-sql-file/Index.vue | 44 +++--- .../openarea/components/TargetCluster.vue | 2 +- .../demand-factory/mysql/rollback/Index.vue | 9 +- .../components/RollbackExistCluster.vue | 1 - .../components/RollbackNewCluster.vue | 1 - .../components/RollbackOriginCluster.vue | 1 - .../version-upgrade/VersionLocalUpgrade.vue | 1 - .../version-upgrade/VersionMigrateUpgrade.vue | 1 - .../version-upgrade/VersionProxyUpgrade.vue | 1 - .../redis/ClusterShardUpdate.vue | 20 +-- .../redis/ClusterTypeUpdate.vue | 20 +-- .../redis/DataCheckAndRepair.vue | 38 ++--- .../demand-factory/redis/DataCopy.vue | 57 ++++---- .../demand-factory/redis/Details.vue | 130 +++++++++--------- .../demand-factory/redis/MasterFailover.vue | 25 ++-- .../demand-factory/redis/RollbackDataCopy.vue | 21 +-- .../demand-factory/spider/AuthorizeRules.vue | 26 ++-- .../demand-factory/spider/CheckSum.vue | 59 ++++---- .../demand-factory/spider/Destroy.vue | 41 ++---- .../demand-factory/spider/Details.vue | 94 ++++++------- .../demand-factory/spider/Enable.vue | 41 ++---- .../demand-factory/spider/FullBackup.vue | 47 +++---- .../demand-factory/spider/MasterFailOver.vue | 81 +++++++++++ .../spider/MasterSlaveSwitch.vue | 35 ++--- .../demand-factory/spider/NodeRebalance.vue | 43 +++--- .../demand-factory/spider/SlaveDestroy.vue | 41 ++---- .../tickets/common/styles/DetailsTable.less | 6 +- .../tickets/common/styles/ticketDetails.less | 16 +-- .../my-tickets/components/details/Index.vue | 35 ++--- .../my-todos/components/details/Index.vue | 8 +- 71 files changed, 1151 insertions(+), 1187 deletions(-) create mode 100644 dbm-ui/frontend/src/views/tickets/common/components/demand-factory/spider/MasterFailOver.vue diff --git a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/Index.vue b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/Index.vue index b34d9a2bcb..ab72218ea9 100644 --- a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/Index.vue +++ b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/Index.vue @@ -115,6 +115,7 @@ import SpiderEnable from './spider/Enable.vue'; import SpiderFlashback from './spider/Flashback.vue'; import SpiderFullBackup from './spider/FullBackup.vue'; + import SpiderMasterFailOver from './spider/MasterFailOver.vue'; import SpiderMasterSlaveSwitch from './spider/MasterSlaveSwitch.vue'; import SpiderMigrateCluster from './spider/MigrateCluster.vue'; import SpiderMNTApply from './spider/MNTApply.vue'; @@ -235,11 +236,6 @@ TicketTypes.INFLUXDB_DESTROY, ]; - const spiderMasterSlaveTypes = [ - TicketTypes.TENDBCLUSTER_MASTER_SLAVE_SWITCH, - TicketTypes.TENDBCLUSTER_MASTER_FAIL_OVER, - ]; - const spiderAuthorizeRulesTypes = [ TicketTypes.TENDBCLUSTER_AUTHORIZE_RULES, TicketTypes.TENDBCLUSTER_EXCEL_AUTHORIZE_RULES, @@ -292,7 +288,6 @@ [TicketTypes.MYSQL_PROXY_SWITCH]: MySQLProxySwitch, [TicketTypes.MYSQL_HA_DB_TABLE_BACKUP]: MySQLTableBackup, [TicketTypes.MYSQL_MIGRATE_CLUSTER]: MySQLMigrateCluster, - [TicketTypes.MYSQL_PROXY_ADD]: MySQLProxyAdd, [TicketTypes.MYSQL_MASTER_FAIL_OVER]: MySQLMasterFailOver, [TicketTypes.MYSQL_FLASHBACK]: MySQLFlashback, @@ -328,6 +323,8 @@ [TicketTypes.TENDBCLUSTER_DESTROY]: SpiderDestroy, [TicketTypes.TENDBCLUSTER_DISABLE]: SpiderDisable, [TicketTypes.TENDBCLUSTER_ENABLE]: SpiderEnable, + [TicketTypes.TENDBCLUSTER_MASTER_SLAVE_SWITCH]: SpiderMasterSlaveSwitch, + [TicketTypes.TENDBCLUSTER_MASTER_FAIL_OVER]: SpiderMasterFailOver, [TicketTypes.TENDBCLUSTER_FLASHBACK]: SpiderFlashback, [TicketTypes.TENDBCLUSTER_FULL_BACKUP]: SpiderFullBackup, [TicketTypes.TENDBCLUSTER_SPIDER_MNT_APPLY]: SpiderMNTApply, @@ -422,10 +419,6 @@ if (riakCapacityType.includes(ticketType)) { return RiakExpansionCapacity; } - // Spider 主从相关 - if (spiderMasterSlaveTypes.includes(ticketType)) { - return SpiderMasterSlaveSwitch; - } // spider 授权规则 if (spiderAuthorizeRulesTypes.includes(ticketType)) { return SpiderAuthorizeRules; diff --git a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/bigdata/DetailsES.vue b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/bigdata/DetailsES.vue index fa9c3e6cf1..2fba56d345 100644 --- a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/bigdata/DetailsES.vue +++ b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/bigdata/DetailsES.vue @@ -12,49 +12,49 @@ --> -
- {{ $t('Client节点IP') }}: - +
+ {{ $t('Client节点IP') }}: + --
-
- {{ $t('Master节点IP') }}: - +
+ {{ $t('Master节点IP') }}: + -
- {{ $t('端口号') }}: - {{ ticketDetails?.details?.http_port || '--' }} +
+ {{ $t('端口号') }}: + {{ ticketDetails?.details?.http_port || '--' }}
-
- {{ $t('备注') }}: +
+ {{ $t('备注') }}: + class="ticket-details-item-value"> {{ ticketDetails?.remark || '--' }}
diff --git a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/bigdata/DetailsHDFS.vue b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/bigdata/DetailsHDFS.vue index 5b338f501a..736769a7ce 100644 --- a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/bigdata/DetailsHDFS.vue +++ b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/bigdata/DetailsHDFS.vue @@ -12,49 +12,49 @@ -->
-
- {{ $t('Zookeeper节点IP') }}: - +
+ {{ $t('Zookeeper节点IP') }}: + -
- {{ $t('备注') }}: +
+ {{ $t('备注') }}: + class="ticket-details-item-value"> {{ ticketDetails?.remark || '--' }}
diff --git a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/bigdata/DetailsInfluxDB.vue b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/bigdata/DetailsInfluxDB.vue index 87a7795022..a68a83e337 100644 --- a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/bigdata/DetailsInfluxDB.vue +++ b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/bigdata/DetailsInfluxDB.vue @@ -12,45 +12,45 @@ --> -
- {{ $t('Partition数量') }}: - {{ ticketDetails?.details?.partition_num || '--' }} +
+ {{ $t('Partition数量') }}: + {{ ticketDetails?.details?.partition_num || '--' }}
-
- {{ $t('消息保留') }}: - {{ ticketDetails?.details?.retention_hours || '--' }} +
+ {{ $t('消息保留') }}: + {{ ticketDetails?.details?.retention_hours || '--' }}
-
- {{ $t('副本数量') }}: - {{ ticketDetails?.details?.replication_num || '--' }} +
+ {{ $t('副本数量') }}: + {{ ticketDetails?.details?.replication_num || '--' }}
-
- {{ $t('至少写入成功副本数量') }}: - {{ ticketDetails?.details?.ack_quorum || '--' }} +
+ {{ $t('至少写入成功副本数量') }}: + {{ ticketDetails?.details?.ack_quorum || '--' }}
-
- {{ $t('访问端口') }}: - {{ ticketDetails?.details?.port || '--' }} +
+ {{ $t('访问端口') }}: + {{ ticketDetails?.details?.port || '--' }}
-
- {{ $t('备注') }}: - {{ ticketDetails?.remark || '--' }} +
+ {{ $t('备注') }}: + {{ ticketDetails?.remark || '--' }}