From a18caadd627e5909043456b866a3eee9152aee6a Mon Sep 17 00:00:00 2001 From: chenwenchang <479999519@qq.com> Date: Tue, 3 Dec 2024 14:34:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20=E5=8D=95=E6=8D=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E8=BF=AD=E4=BB=A3=5F1203=20#7190?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/src/common/const/ticketTypes.ts | 4 +- dbm-ui/frontend/src/locales/zh-cn.json | 1 + .../model/ticket/details/mysql/checkSum.ts | 2 +- .../model/ticket/details/mysql/dataRepair.ts | 34 ++++++++++ .../model/ticket/details/mysql/index.ts | 2 +- .../ticket/details/tendbCluster/dataRepair.ts | 34 ++++++++++ .../ticket/details/tendbCluster/index.ts | 1 + .../task-info/com-factory/mysql/Checksum.vue | 2 +- .../com-factory/mysql/DataRepair.vue | 62 +++++++++++++++++++ .../com-factory/tendbCluster/DataRepair.vue | 62 +++++++++++++++++++ 10 files changed, 200 insertions(+), 4 deletions(-) create mode 100644 dbm-ui/frontend/src/services/model/ticket/details/mysql/dataRepair.ts create mode 100644 dbm-ui/frontend/src/services/model/ticket/details/tendbCluster/dataRepair.ts create mode 100644 dbm-ui/frontend/src/views/ticket-center/common/ticket-detail/components/task-info/com-factory/mysql/DataRepair.vue create mode 100644 dbm-ui/frontend/src/views/ticket-center/common/ticket-detail/components/task-info/com-factory/tendbCluster/DataRepair.vue diff --git a/dbm-ui/frontend/src/common/const/ticketTypes.ts b/dbm-ui/frontend/src/common/const/ticketTypes.ts index fee55a65b5..07fe68580b 100644 --- a/dbm-ui/frontend/src/common/const/ticketTypes.ts +++ b/dbm-ui/frontend/src/common/const/ticketTypes.ts @@ -36,7 +36,8 @@ export enum TicketTypes { MYSQL_HA_FULL_BACKUP = 'MYSQL_HA_FULL_BACKUP', MYSQL_OPEN_AREA = 'MYSQL_OPEN_AREA', // 开区 MYSQL_PARTITION = 'MYSQL_PARTITION', - MYSQL_DUMP_DATA = 'MYSQL_DUMP_DATA', // mysql mysql 数据导出 + MYSQL_DUMP_DATA = 'MYSQL_DUMP_DATA', // mysql 数据导出 + MYSQL_DATA_REPAIR = 'MYSQL_DATA_REPAIR', // mysql 数据修复 MYSQL_PROXY_UPGRADE = 'MYSQL_PROXY_UPGRADE', // MySQL Proxy 升级 MYSQL_LOCAL_UPGRADE = 'MYSQL_LOCAL_UPGRADE', // MySQL 原地升级 MYSQL_MIGRATE_UPGRADE = 'MYSQL_MIGRATE_UPGRADE', // MySQL 迁移升级 @@ -115,6 +116,7 @@ export enum TicketTypes { TENDBCLUSTER_RESTORE_LOCAL_SLAVE = 'TENDBCLUSTER_RESTORE_LOCAL_SLAVE', // spider 重建从库-原地重建 TENDBCLUSTER_RESTORE_SLAVE = 'TENDBCLUSTER_RESTORE_SLAVE', // spider 重建从库-新机重建 TENDBCLUSTER_DUMP_DATA = 'TENDBCLUSTER_DUMP_DATA', // spider 数据导出 + TENDBCLUSTER_DATA_REPAIR = 'TENDBCLUSTER_DATA_REPAIR', // spider 数据修复 TENDBCLUSTER_SEMANTIC_CHECK = 'TENDBCLUSTER_SEMANTIC_CHECK', // spider 模拟执行 TENDBCLUSTER_ACCOUNT_RULE_CHANGE = 'TENDBCLUSTER_ACCOUNT_RULE_CHANGE', // spider 权限变更 } diff --git a/dbm-ui/frontend/src/locales/zh-cn.json b/dbm-ui/frontend/src/locales/zh-cn.json index ede6fc518c..db35e16b74 100644 --- a/dbm-ui/frontend/src/locales/zh-cn.json +++ b/dbm-ui/frontend/src/locales/zh-cn.json @@ -3744,5 +3744,6 @@ "只读集群名称:": "只读集群名称:", "强制实例下架:": "强制实例下架:", "Excel文件:": "Excel文件:", + "不一致时间范围:": "不一致时间范围:", "这行勿动!新增翻译请在上一行添加!": "" } diff --git a/dbm-ui/frontend/src/services/model/ticket/details/mysql/checkSum.ts b/dbm-ui/frontend/src/services/model/ticket/details/mysql/checkSum.ts index 57f9bc991b..b11033e0b1 100644 --- a/dbm-ui/frontend/src/services/model/ticket/details/mysql/checkSum.ts +++ b/dbm-ui/frontend/src/services/model/ticket/details/mysql/checkSum.ts @@ -28,7 +28,7 @@ export interface CheckSum extends DetailBase { bk_host_id: number; ip: string; port?: number; - }; + }[]; table_patterns: string[]; }[]; is_sync_non_innodb: boolean; diff --git a/dbm-ui/frontend/src/services/model/ticket/details/mysql/dataRepair.ts b/dbm-ui/frontend/src/services/model/ticket/details/mysql/dataRepair.ts new file mode 100644 index 0000000000..c9ef136707 --- /dev/null +++ b/dbm-ui/frontend/src/services/model/ticket/details/mysql/dataRepair.ts @@ -0,0 +1,34 @@ +import type { DetailBase, DetailClusters } from '../common'; + +/** + * MySQL 数据修复 + */ +export interface DataRepair extends DetailBase { + clusters: DetailClusters; + infos: { + cluster_id: number; + master: { + id: number; + ip: string; + port: number; + bk_biz_id: number; + bk_host_id: number; + bk_cloud_id: number; + }; + slaves: { + id: number; + ip: string; + port: number; + bk_biz_id: number; + bk_host_id: number; + bk_cloud_id: number; + is_consistent: boolean; + }[]; + }[]; + end_time: string; + start_time: string; + trigger_type: string; + checksum_table: string; + is_sync_non_innodb: boolean; + is_ticket_consistent: boolean; +} diff --git a/dbm-ui/frontend/src/services/model/ticket/details/mysql/index.ts b/dbm-ui/frontend/src/services/model/ticket/details/mysql/index.ts index f602f414bc..81d5689dfd 100644 --- a/dbm-ui/frontend/src/services/model/ticket/details/mysql/index.ts +++ b/dbm-ui/frontend/src/services/model/ticket/details/mysql/index.ts @@ -3,8 +3,8 @@ export * from './addSlava'; export * from './authorizeRules'; export * from './checkSum'; export * from './clientCloneRules'; -export * from './clusterSwitch'; export * from './dataMigrate'; +export * from './dataRepair'; export * from './dumpData'; export * from './flashBack'; export * from './haApply'; diff --git a/dbm-ui/frontend/src/services/model/ticket/details/tendbCluster/dataRepair.ts b/dbm-ui/frontend/src/services/model/ticket/details/tendbCluster/dataRepair.ts new file mode 100644 index 0000000000..ddbc224603 --- /dev/null +++ b/dbm-ui/frontend/src/services/model/ticket/details/tendbCluster/dataRepair.ts @@ -0,0 +1,34 @@ +import type { DetailBase, DetailClusters } from '../common'; + +/** + * TenDBCluster 数据修复 + */ +export interface DataRepair extends DetailBase { + clusters: DetailClusters; + infos: { + cluster_id: number; + master: { + id: number; + ip: string; + port: number; + bk_biz_id: number; + bk_host_id: number; + bk_cloud_id: number; + }; + slaves: { + id: number; + ip: string; + port: number; + bk_biz_id: number; + bk_host_id: number; + bk_cloud_id: number; + is_consistent: boolean; + }[]; + }[]; + end_time: string; + start_time: string; + trigger_type: string; + checksum_table: string; + is_sync_non_innodb: boolean; + is_ticket_consistent: boolean; +} diff --git a/dbm-ui/frontend/src/services/model/ticket/details/tendbCluster/index.ts b/dbm-ui/frontend/src/services/model/ticket/details/tendbCluster/index.ts index bdc5cdbb06..62807b4293 100644 --- a/dbm-ui/frontend/src/services/model/ticket/details/tendbCluster/index.ts +++ b/dbm-ui/frontend/src/services/model/ticket/details/tendbCluster/index.ts @@ -3,6 +3,7 @@ export * from './apply'; export * from './authorizeRules'; export * from './checkSum'; export * from './clientCloneRules'; +export * from './dataRepair'; export * from './dbTableBackup'; export * from './destroy'; export * from './destroy'; diff --git a/dbm-ui/frontend/src/views/ticket-center/common/ticket-detail/components/task-info/com-factory/mysql/Checksum.vue b/dbm-ui/frontend/src/views/ticket-center/common/ticket-detail/components/task-info/com-factory/mysql/Checksum.vue index fb707dd615..c760560125 100644 --- a/dbm-ui/frontend/src/views/ticket-center/common/ticket-detail/components/task-info/com-factory/mysql/Checksum.vue +++ b/dbm-ui/frontend/src/views/ticket-center/common/ticket-detail/components/task-info/com-factory/mysql/Checksum.vue @@ -38,7 +38,7 @@