From b4665cdfde650c3342e80ebe38f8b0b30414e8c7 Mon Sep 17 00:00:00 2001 From: chenwenchang <479999519@qq.com> Date: Fri, 29 Nov 2024 15:01:06 +0800 Subject: [PATCH 01/50] =?UTF-8?q?fix(frontend):=20=E5=BC=80=E5=8C=BA?= =?UTF-8?q?=E5=8D=95=E6=8D=AE=E6=9D=83=E9=99=90=E5=B1=95=E7=A4=BAbug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20#6004=20#=20Reviewed,=20transaction=20id:?= =?UTF-8?q?=2025349?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../openarea/components/PermissionRule.vue | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/mysql/openarea/components/PermissionRule.vue b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/mysql/openarea/components/PermissionRule.vue index 96b65c49dd..ea975577cb 100644 --- a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/mysql/openarea/components/PermissionRule.vue +++ b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/mysql/openarea/components/PermissionRule.vue @@ -115,11 +115,24 @@ }, ]); + const { run: getPermissionRulesRun, loading: isLoading } = useRequest(getPermissionRules, { + manual: true, + onSuccess({ results }) { + tableData.value = results.map((item) => ({ + user: item.account.user, + rules: item.rules.map((rule) => ({ + priv: rule.privilege, + access_db: rule.access_db, + })), + })); + }, + }); + watch( () => props.ticketDetails, () => { // 有权限快照返回直接渲染 - if (props.ticketDetails.details.rules_set?.[0].privileges?.length) { + if (props.ticketDetails.details.rules_set?.[0]?.privileges?.length) { const rulesMemo: Record = {} tableData.value = props.ticketDetails.details.rules_set.reduce((acc, cur) => { if (!rulesMemo[cur.user]) { @@ -142,7 +155,7 @@ () => props.templateDetail, () => { // 无权限返回则现查 - if (props.templateDetail && tableData.value.length === 0) { + if (props.templateDetail.related_authorize.length && tableData.value.length === 0) { const accountTypeMap = { [ClusterTypes.TENDBHA]: AccountTypes.MYSQL, [ClusterTypes.TENDBSINGLE]: AccountTypes.MYSQL, @@ -159,19 +172,6 @@ }, ); - const { run: getPermissionRulesRun, loading: isLoading } = useRequest(getPermissionRules, { - manual: true, - onSuccess({ results }) { - tableData.value = results.map((item) => ({ - user: item.account.user, - rules: item.rules.map((rule) => ({ - priv: rule.privilege, - access_db: rule.access_db, - })), - })); - }, - }); - const handleToogleExpand = (user: string) => { rowFlodMap.value[user] = !rowFlodMap.value[user]; }; From 1fd4acd25f339804ba5277ae8c363d2f940a98e5 Mon Sep 17 00:00:00 2001 From: royalpioneer Date: Wed, 27 Nov 2024 16:40:46 +0800 Subject: [PATCH 02/50] =?UTF-8?q?feat(frontend):=20tendbcluster=20?= =?UTF-8?q?=E5=92=8C=20es=20=E9=83=A8=E5=88=86=E6=96=87=E6=A1=88=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=20#8233=20#=20Reviewed,=20transaction=20id:?= =?UTF-8?q?=2025398?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/frontend/src/locales/en.json | 63 +++++++++++++++++-- dbm-ui/frontend/src/locales/zh-cn.json | 4 +- .../page1/components/RenderData/Index.vue | 4 +- .../page1/components/RenderData/Index.vue | 2 +- .../page1/components/RenderData/Index.vue | 4 +- .../db-manage/tendb-cluster/toolbox-menu.ts | 2 +- .../demand-factory/sqlserver/DbRename.vue | 2 +- 7 files changed, 66 insertions(+), 15 deletions(-) diff --git a/dbm-ui/frontend/src/locales/en.json b/dbm-ui/frontend/src/locales/en.json index 93281073e4..ba68044f4a 100644 --- a/dbm-ui/frontend/src/locales/en.json +++ b/dbm-ui/frontend/src/locales/en.json @@ -424,7 +424,7 @@ "批量删除Key": "Multi-delete keys", "批量备份集群": "Multi-backup cluster", "批量提取Key": "Multi-extract keys", - "批量操作": "Multi", + "批量操作": "Batch Operation", "批量清档集群": "Multi-cleanup clusters", "批量编辑": "Multi-edit", "批量设置包含Key": "Multi-set include keys", @@ -572,8 +572,8 @@ "实例_域名_IP_端口_状态": "Instance/domain/IP/port/status", "申请实例": "Apply for instance", "导入": "Import", - "批量授权": "Multi-grant", - "授权": "Grant", + "批量授权": "Authorize", + "授权": "Authorize", "支持Excel文件_文件小于2M_下载": "Support Excel file, the file is less than 2 M, download", "模块": "Module", "模板文件": "Template", @@ -1046,7 +1046,7 @@ "Redis_集群管理": "'Redis' cluster Management", "Redis集群详情": "Redis cluster details", "SQL任务": "SQL Task", - "主从互切": "Master-Slave Exchanges", + "主从互切": "Master-Slave switch", "主库故障切换": "Master Failure Switch", "克隆主从": "Clone Master-Slave", "全库备份": "Full Backup", @@ -1126,7 +1126,7 @@ "全局": "Global", "创建成功": "Created successfully", "批量删除": "Multi-delete", - "授权白名单": "Granted Whitelist", + "授权白名单": "Authorized Whitelist", "新建": "New", "新建白名单": "New whitelist", "白名单": "whitelist", @@ -1199,7 +1199,6 @@ "是否继续提交单据": "Do you want to continue to submit the ticket", "InfluxDB版本": "InfluxDB version", "InfluxDB集群部署": "InfluxDB cluster deployment", - "TendisSSD": "TendisSSD", "分组名": "Group name", "新建分组": "New group", "申请InfluxDB集群部署": "Apply for InfluxDB cluster deployment", @@ -1593,5 +1592,57 @@ "主机资源不足_等待管理员users补货_补货完成后可以前往place重试": "Host resources are insufficient. Wait for the administrator ({users}) to replenish the inventory. After the replenishment is complete, you can go to \"{place}\" and try again", "可用主机数": "Number of available hosts", "版本日志": "Release Notes", + "TendbCluster集群": "TendbCluster", + "分区管理": "Partitioning Management", + "安全": "Security", + "临时密码修改": "One time password", + "全局配置": "Global Setting", + "个人工作台": "Dashboard", + "可观测": "Observations", + "迁移主从": "Migrate master-slave", + "访问入口": "Access Entry", + "部署只读接入层": "Deploy read-only proxy", + "运维节点管理": "O&M Node", + "添加运维节点": "Add O&M nodes", + "克隆开区": "Clone and open a zone", + "开区模版": "Template for Opening a zone", + "数据查询": "Data Query", + "DB 重命名": "DB Rename", + "原 DB 名": "Original DB Name", + "新 DB 名": "New DB Name", + "主从互切:主机级别操作,即同机所有集群均会完成主从关系互切": "It is an operation at the host level, all clusters on the same machine will complete the mutual switchover of the master-slave relationship.", + "检查业务来源的连接": "Check connections from application", + "检查主从同步延迟": "Check synchronization latency between master and slave", + "检查主从数据校验结果": "Check master-slave data validation results", + "TendbCluster分布式集群_集群管理": "[TendbCluster] Cluster Management", + "容量使用率": "Usage %", + "时区": "Time Zone", + "导出数据": "Export data", + "导出": "Export", + "机器空闲检查及初始化": "Machine idle check and initialization", + "安装[bkmonitorbeat]插件": "Installation of [bkmonitorbeat] plugin", + "原有机器下发dbactuator": "Download dbactuator", + "打包证书": "Package certificates", + "分发证书": "Distribute certificates", + "集群监控视图": "Cluster Monitoring", + "集群状态": "Cluster Status", + "master数量": "Total Masters", + "热节点数量": "Total Hot Nodes", + "冷节点数量": "Cold Nodes", + "client数量": "Clients", + "shard数量": "Shards", + "document数量": "Documents", + "总数据量": "Total Data Volume", + "上报master数量": "Detected Masters", + "上报热节点数量": "Detected Hot Nodes", + "上报冷节点数量": "Detected Cold Nodes", + "热节点容量": "Size of Hot Nodes", + "冷节点容量": "Size of Cold Nodes", + "数据订阅": "Data Subscription", + "权限查询": "Authorization Query", + "副本集": "ReplicaSet", + "分片集群": "Sharded Cluster", + "主从管理": "HA Management", + "DB 重命名:database 重命名": "DB Rename:database rename", "这行勿动!新增翻译请在上一行添加!": "" } diff --git a/dbm-ui/frontend/src/locales/zh-cn.json b/dbm-ui/frontend/src/locales/zh-cn.json index 00a7ec1ffb..38e75bba5c 100644 --- a/dbm-ui/frontend/src/locales/zh-cn.json +++ b/dbm-ui/frontend/src/locales/zh-cn.json @@ -1757,7 +1757,7 @@ "TendbCluster分布式集群实例详情name": "TendbCluster 分布式集群实例详情【{name}】", "请输入单个源 DB 名": "请输入单个源 DB 名", "DB 重命名": "DB 重命名", - "运维 Spider 管理": "运维 Spider 管理", + "运维节点管理": "运维节点管理", "添加运维节点": "添加运维节点", "数据校验修复:对集群的主库和从库进行数据一致性校验和修复,其中 MyISAM 引擎库表不会被校验和修复": "数据校验修复:对集群的主库和从库进行数据一致性校验和修复,其中 MyISAM 引擎库表不会被校验和修复", "校验范围": "校验范围", @@ -1781,7 +1781,7 @@ "检查业务来源的连接": "检查业务来源的连接", "检查主从同步延迟": "检查主从同步延迟", "检查主从数据校验结果": "检查主从数据校验结果", - "源 DB 名": "源 DB 名", + "原 DB 名": "原 DB 名", "新 DB 名": "新 DB 名", "DB 重命名:database 重命名": "DB 重命名:database 重命名", "DB 实例权限克隆": "DB 实例权限克隆", diff --git a/dbm-ui/frontend/src/views/db-manage/mysql/db-rename/pages/page1/components/RenderData/Index.vue b/dbm-ui/frontend/src/views/db-manage/mysql/db-rename/pages/page1/components/RenderData/Index.vue index 8fd57b0a80..4994273fe0 100644 --- a/dbm-ui/frontend/src/views/db-manage/mysql/db-rename/pages/page1/components/RenderData/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/mysql/db-rename/pages/page1/components/RenderData/Index.vue @@ -28,10 +28,10 @@ - {{ t('源 DB 名') }} + {{ t('原 DB 名') }} - {{ t('源 DB 名') }} + {{ t('原 DB 名') }} - {{ t('源 DB 名') }} + {{ t('原 DB 名') }}