diff --git a/dbm-ui/frontend/package.json b/dbm-ui/frontend/package.json index b69380f114..be43097994 100644 --- a/dbm-ui/frontend/package.json +++ b/dbm-ui/frontend/package.json @@ -18,7 +18,7 @@ "@blueking/ip-selector": "0.0.1-beta.116", "@vueuse/core": "10.2.1", "axios": "1.2.1", - "bkui-vue": "0.0.2-beta.29", + "bkui-vue": "0.0.2-beta.35", "date-fns": "2.28.0", "dayjs": "1.11.9", "html-to-image": "1.11.3", diff --git a/dbm-ui/frontend/src/components/db-popconfirm/index.vue b/dbm-ui/frontend/src/components/db-popconfirm/index.vue index 4139ee56d3..918b2ffeba 100644 --- a/dbm-ui/frontend/src/components/db-popconfirm/index.vue +++ b/dbm-ui/frontend/src/components/db-popconfirm/index.vue @@ -116,6 +116,18 @@ offset: [0, 12], zIndex: 999999, hideOnClick: true, + popperOptions: { + strategy: 'fixed', + modifiers: [ + { + name: 'flip', + options: { + fallbackPlacements: ['top-start', 'top-end'], + allowedAutoPlacements: ['top-start', 'top-end'], + }, + }, + ], + }, }); } }); @@ -154,5 +166,12 @@ content: none; } } + + &[data-placement^="top-end"]{ + & > .tippy-arrow{ + right: -6px; + left: unset !important; + } + } } diff --git a/dbm-ui/frontend/src/components/db-table/index.vue b/dbm-ui/frontend/src/components/db-table/index.vue index 5f120d5f86..30c129d0c8 100644 --- a/dbm-ui/frontend/src/components/db-table/index.vue +++ b/dbm-ui/frontend/src/components/db-table/index.vue @@ -295,6 +295,7 @@ const fetchListData = (loading = true) => { isReady = true; + console.log('from dadta source statatat = '); Promise.resolve() .then(() => { isLoading.value = loading; @@ -306,6 +307,8 @@ ...sortParams, }; + isAnomalies.value = false; + props.dataSource(params) .then((data) => { tableData.value = data; @@ -324,7 +327,8 @@ emits('requestSuccess', data); }) - .catch(() => { + .catch((error) => { + console.error('request error: ', error); tableData.value.results = []; pagination.count = 0; isAnomalies.value = true; diff --git a/dbm-ui/frontend/src/helper/validator/is-ip.ts b/dbm-ui/frontend/src/helper/validator/is-ip.ts index f523537c4c..e7462e474d 100644 --- a/dbm-ui/frontend/src/helper/validator/is-ip.ts +++ b/dbm-ui/frontend/src/helper/validator/is-ip.ts @@ -11,7 +11,4 @@ * the specific language governing permissions and limitations under the License. */ -export const isIp = (str: string): boolean => { - console.log('asda', str); - return true; -}; +export const isIp = (str: string): boolean => true; diff --git a/dbm-ui/frontend/src/locales/en.json b/dbm-ui/frontend/src/locales/en.json index d1c73d6925..9bbee04b33 100644 --- a/dbm-ui/frontend/src/locales/en.json +++ b/dbm-ui/frontend/src/locales/en.json @@ -158,8 +158,8 @@ "请选择版本名称": "Please select a version name", "MySQL单节点": "MySQL standalone", "MySQL高可用": "MySQL HA", - "TendisCache集群": "TendisCache", - "Tendisplus存储版集群": "Tendisplus", + "TendisCache": "TendisCache", + "Tendisplus": "Tendisplus", "上一步": "Previous", "下一步": "Next step", "保存后将会引用最新的配置_如涉及重启的实例_将在重启后生效": "After saving, the latest configuration will be referenced. If the instance involves restarting, it will take effect after restarting", @@ -1206,7 +1206,7 @@ "是否继续提交单据": "Do you want to continue to submit the ticket", "InfluxDB版本": "InfluxDB version", "InfluxDB集群部署": "InfluxDB cluster deployment", - "TendisSSD存储版集群": "TendisSSD storage cluster", + "TendisSSD": "TendisSSD", "分组名": "Group name", "新建分组": "New group", "申请InfluxDB集群部署": "Apply for InfluxDB cluster deployment", diff --git a/dbm-ui/frontend/src/locales/zh-cn.json b/dbm-ui/frontend/src/locales/zh-cn.json index 94e6383fc5..7eb81f3ccf 100644 --- a/dbm-ui/frontend/src/locales/zh-cn.json +++ b/dbm-ui/frontend/src/locales/zh-cn.json @@ -190,8 +190,7 @@ "发布记录详情": "发布记录详情", "范围值": "范围值", "请设置范围值": "请设置范围值", - "Tendisplus存储版集群": "Tendisplus 存储版集群", - "TendisCache集群": "TendisCache 集群", + "TendisCache": "TendisCache", "MySQL高可用": "MySQL 高可用", "MySQL单节点": "MySQL 单节点", "发布后_所有业务下的新增的实例将会引用当前最新配置": "发布后,所有业务下的新增的实例将会引用当前最新配置", @@ -1221,7 +1220,6 @@ "InfluxDB版本": "InfluxDB 版本", "分组名": "分组名", "新建分组": "新建分组", - "TendisSSD存储版集群": "TendisSSD 存储版集群", "主机数数量即为实例数量_建议规格至少为2核4G": "主机数数量即为实例数量,建议规格至少为 2 核 4 G", "InfluxDB实例管理": "【InfluxDB】实例管理", "实例管理": "实例管理", @@ -1510,7 +1508,7 @@ "复制异常 IP": "复制异常 IP", "导入设置": "导入设置", "当前已经有n个导入任务正在进行中,": "当前已经有{0}个导入任务正在进行中,", - "主从切换:针对TendisSSD、TendisCache集群,主从切换是把Slave提升为Master,原Master被剔除,针对Tendisplus集群,主从切换是把Slave和Master互换": "主从切换:针对TendisSSD、TendisCache集群,主从切换是把Slave提升为Master,原Master被剔除,针对Tendisplus集群,主从切换是把Slave和Master互换", + "主从切换:针对TendisSSD、TendisCache,主从切换是把Slave提升为Master,原Master被剔除,针对Tendisplus集群,主从切换是把Slave和Master互换": "主从切换:针对TendisSSD、TendisCache,主从切换是把Slave提升为Master,原Master被剔除,针对Tendisplus集群,主从切换是把Slave和Master互换", "主故障切换": "主故障切换", "主库故障主机": "主库故障主机", "业务空闲机": "业务空闲机", @@ -1790,9 +1788,9 @@ "所属云区域": "所属云区域", "运维节点 IP": "运维节点 IP", "云区域不能为空": "云区域不能为空", - "执行前检测连接,如有连接": "执行前检测连接,如有连接", - "检查延迟": "检查延迟", - "检查校验结果": "检查校验结果", + "检查业务来源的连接": "检查业务来源的连接", + "检查主从同步延迟": "检查主从同步延迟", + "检查主从数据校验结果": "检查主从数据校验结果", "源 DB 名": "源 DB 名", "新 DB 名": "新 DB 名", "DB 重命名:database 重命名": "DB 重命名:database 重命名", @@ -1938,8 +1936,8 @@ "授权人": "授权人", "授权时间": "授权时间", "账号规则": "账号规则", - "TendisSSD集群": "TendisSSD 集群", - "TendisPlus集群": "TendisPlus 集群", + "TendisSSD": "TendisSSD", + "Tendisplus": "Tendisplus", "请选择版本": "请选择版本", "DB 名不能为空": "DB 名不能为空", "一格仅支持单个 % 对象": "一格仅支持单个 % 对象", @@ -2054,5 +2052,7 @@ "集群部署、扩缩容等操作新主机的任务,如任务执行失败,相应的主机将会被挪到这里,等待人工确认": "集群部署、扩缩容等操作新主机的任务,如任务执行失败,相应的主机将会被挪到这里,等待人工确认", "请输入表名称,支持通配符“%”,含通配符的仅支持单个": "请输入表名称,支持通配符“%”,含通配符的仅支持单个", "目标 DB 不能为*": "目标 DB 不能为*", + "主机将被落到空闲机,如需要可再次导入": "主机将被落到空闲机,如需要可再次导入", + "保存并执行": "保存并执行", "这行勿动!新增翻译请在上一行添加!": "" } \ No newline at end of file diff --git a/dbm-ui/frontend/src/services/model/partition/partition-log.ts b/dbm-ui/frontend/src/services/model/partition/partition-log.ts index 57113ee8d4..084a16eedb 100644 --- a/dbm-ui/frontend/src/services/model/partition/partition-log.ts +++ b/dbm-ui/frontend/src/services/model/partition/partition-log.ts @@ -65,4 +65,8 @@ export default class PartitionLog { PartitionLog.STATUS_RUNNING, ].includes(this.status); } + + get isFailed() { + return this.status === PartitionLog.STATUS_FAILED; + } } diff --git a/dbm-ui/frontend/src/services/model/redis/redis.ts b/dbm-ui/frontend/src/services/model/redis/redis.ts index cc56fa7441..0cb1cbe2ad 100644 --- a/dbm-ui/frontend/src/services/model/redis/redis.ts +++ b/dbm-ui/frontend/src/services/model/redis/redis.ts @@ -13,9 +13,9 @@ import { PipelineStatus } from '@common/const'; export const enum RedisClusterTypes { - PredixyTendisplusCluster = 'PredixyTendisplusCluster', // Tendisplus存储版集群 - TwemproxyRedisInstance = 'TwemproxyRedisInstance', // TendisCache集群 - TwemproxyTendisSSDInstance = 'TwemproxyTendisSSDInstance', // TendisSSD集群 + PredixyTendisplusCluster = 'PredixyTendisplusCluster', // Tendisplus + TwemproxyRedisInstance = 'TwemproxyRedisInstance', // TendisCache + TwemproxyTendisSSDInstance = 'TwemproxyTendisSSDInstance', // TendisSSD } interface Node { diff --git a/dbm-ui/frontend/src/services/model/spider/tendbCluster.ts b/dbm-ui/frontend/src/services/model/spider/tendbCluster.ts index 0fd1f7e533..6314d37101 100644 --- a/dbm-ui/frontend/src/services/model/spider/tendbCluster.ts +++ b/dbm-ui/frontend/src/services/model/spider/tendbCluster.ts @@ -151,6 +151,37 @@ export default class TendbCluster { this.operations = this.initOperations(payload.operations); } + // 操作中的状态 + get operationRunningStatus() { + if (this.operations.length < 1) { + return ''; + } + const operation = this.operations[0]; + if (operation.status !== 'RUNNING') { + return ''; + } + return operation.ticket_type; + } + // 操作中的状态描述文本 + get operationStatusText() { + return TendbCluster.operationTextMap[this.operationRunningStatus]; + } + // 操作中的状态 icon + get operationStatusIcon() { + return TendbCluster.operationIconMap[this.operationRunningStatus]; + } + // 操作中的单据 ID + get operationTicketId() { + if (this.operations.length < 1) { + return 0; + } + const operation = this.operations[0]; + if (operation.status !== 'RUNNING') { + return 0; + } + return operation.ticket_id; + } + get operationDisabled() { // 集群异常不支持操作 if (this.status === STATUS_ABNORMAL) { @@ -160,6 +191,7 @@ export default class TendbCluster { if (this.phase !== 'online') { return true; } + // 各个操作互斥,有其他任务进行中禁用操作按钮 if (this.operations.find(item => item.status === 'RUNNING')) { return true; @@ -175,21 +207,22 @@ export default class TendbCluster { if (!Array.isArray(payload)) { return []; } - return payload.map(item => ({ - ...item, - operationDisabled: this.operationDisabled, - // 操作中的状态描述文本 - get operationStatusText() { - return TendbCluster.operationTextMap[item.ticket_type]; - }, - // 操作中的状态 icon - get operationStatusIcon() { - return TendbCluster.operationIconMap[item.ticket_type]; - }, - // 操作中的单据 ID - get operationTicketId() { - return item.ticket_id ?? 0; - }, - })); + return payload; + // return payload.map(item => ({ + // ...item, + // operationDisabled: this.operationDisabled, + // // 操作中的状态描述文本 + // get operationStatusText() { + // return TendbCluster.operationTextMap[item.ticket_type]; + // }, + // // 操作中的状态 icon + // get operationStatusIcon() { + // return TendbCluster.operationIconMap[item.ticket_type]; + // }, + // // 操作中的单据 ID + // get operationTicketId() { + // return item.ticket_id ?? 0; + // }, + // })); } } diff --git a/dbm-ui/frontend/src/views/db-configure/components/EditBase.vue b/dbm-ui/frontend/src/views/db-configure/components/EditBase.vue index 334d5086ad..43ae231cf0 100644 --- a/dbm-ui/frontend/src/views/db-configure/components/EditBase.vue +++ b/dbm-ui/frontend/src/views/db-configure/components/EditBase.vue @@ -212,7 +212,6 @@ // 添加配置项 const handleAddConfItem = (index: number) => { - // console.log('will add after index: ', index); state.data.conf_items.splice(index + 1, 0, { conf_name: '', conf_name_lc: '', diff --git a/dbm-ui/frontend/src/views/db-configure/components/ParameterTable.vue b/dbm-ui/frontend/src/views/db-configure/components/ParameterTable.vue index e06c643fd3..55e94260ff 100644 --- a/dbm-ui/frontend/src/views/db-configure/components/ParameterTable.vue +++ b/dbm-ui/frontend/src/views/db-configure/components/ParameterTable.vue @@ -445,10 +445,8 @@ */ function handleSelected(index: number, value: string) { const selected = props.parameters.find(item => item.conf_name === value); - // console.log('selected: ', selected); if (selected) { emits('onChangeParameterItem', index, selected); - // props.data[index] = Object.assign(_.cloneDeep(selected), { op_type: 'add' }); } } @@ -464,9 +462,7 @@ * enums multiple change */ function handleChangeMultipleEnums(index: number, key: string, value: string[]) { - // console.log('multiple select change: ', value); emits('onChangeMultipleEnums', index, key, value); - // props.data[index].value_default = value.join(','); } /** diff --git a/dbm-ui/frontend/src/views/db-configure/components/TopTab.vue b/dbm-ui/frontend/src/views/db-configure/components/TopTab.vue index 9b66a80510..5ef88a0d37 100644 --- a/dbm-ui/frontend/src/views/db-configure/components/TopTab.vue +++ b/dbm-ui/frontend/src/views/db-configure/components/TopTab.vue @@ -65,15 +65,15 @@ }, { moduleId: 'redis', id: ClusterTypes.TWEMPROXY_REDIS_INSTANCE, - name: t('TendisCache集群'), + name: t('TendisCache'), }, { moduleId: 'redis', id: ClusterTypes.TWEMPROXY_TENDIS_SSD_INSTANCE, - name: t('TendisSSD存储版集群'), + name: t('TendisSSD'), }, { moduleId: 'redis', id: ClusterTypes.PREDIXY_TENDISPLUS_CLUSTER, - name: t('Tendisplus存储版集群'), + name: t('Tendisplus'), }, { moduleId: 'bigdata', id: ClusterTypes.ES, diff --git a/dbm-ui/frontend/src/views/deployment-plan/list/Index.vue b/dbm-ui/frontend/src/views/deployment-plan/list/Index.vue index c2bbc709cd..d7a1872ee6 100644 --- a/dbm-ui/frontend/src/views/deployment-plan/list/Index.vue +++ b/dbm-ui/frontend/src/views/deployment-plan/list/Index.vue @@ -22,7 +22,7 @@ label="TendisCache" name="tendiscache" /> { - console.log('hhto post = ', value); - return ![2181, 8480, 8485].includes(value); - }, + validator: (value: number) => ![2181, 8480, 8485].includes(value), message: t('禁用2181_8480_8485'), trigger: 'change', }, diff --git a/dbm-ui/frontend/src/views/hdfs-manage/list/index.vue b/dbm-ui/frontend/src/views/hdfs-manage/list/index.vue index 9566bfab95..b210277c2d 100644 --- a/dbm-ui/frontend/src/views/hdfs-manage/list/index.vue +++ b/dbm-ui/frontend/src/views/hdfs-manage/list/index.vue @@ -91,7 +91,6 @@ diff --git a/dbm-ui/frontend/src/views/spider-manage/proxy-scale-down/pages/page1/Index.vue b/dbm-ui/frontend/src/views/spider-manage/proxy-scale-down/pages/page1/Index.vue index 192694bf79..62e507c66a 100644 --- a/dbm-ui/frontend/src/views/spider-manage/proxy-scale-down/pages/page1/Index.vue +++ b/dbm-ui/frontend/src/views/spider-manage/proxy-scale-down/pages/page1/Index.vue @@ -258,8 +258,7 @@ }, }); }) - .catch((e) => { - console.error('submit spider scale down error: ', e); + .catch(() => { window.changeConfirm = false; }) .finally(() => { diff --git a/dbm-ui/frontend/src/views/spider-manage/proxy-scale-up/pages/page1/Index.vue b/dbm-ui/frontend/src/views/spider-manage/proxy-scale-up/pages/page1/Index.vue index caaef91d68..061c7d7f8e 100644 --- a/dbm-ui/frontend/src/views/spider-manage/proxy-scale-up/pages/page1/Index.vue +++ b/dbm-ui/frontend/src/views/spider-manage/proxy-scale-up/pages/page1/Index.vue @@ -235,7 +235,6 @@ }, }; - console.log('params: ', params); InfoBox({ title: t('确认对n个集群扩容接入层?', { n: `${totalNum.value}` }), width: 480, diff --git a/dbm-ui/frontend/src/views/spider-manage/sql-execute/steps/step1/components/sql-file/local-file/components/CheckError.vue b/dbm-ui/frontend/src/views/spider-manage/sql-execute/steps/step1/components/sql-file/local-file/components/CheckError.vue index ea250bebd8..0675cf68c0 100644 --- a/dbm-ui/frontend/src/views/spider-manage/sql-execute/steps/step1/components/sql-file/local-file/components/CheckError.vue +++ b/dbm-ui/frontend/src/views/spider-manage/sql-execute/steps/step1/components/sql-file/local-file/components/CheckError.vue @@ -13,7 +13,7 @@