From d4d6b60db26132a529738cf299d870180159b698 Mon Sep 17 00:00:00 2001 From: "Jingwei.Zhang" Date: Fri, 26 Aug 2022 11:04:49 +0800 Subject: [PATCH] fix: optimize the display of subnet information 1. Add subnet id in the subnet list page and subnet download data 2. Add tip of the used ip in the subnet list page in console Change-Id: Ib38b94f71e02c9ed890e4e3d79773f1982a27c0f --- src/locales/en.json | 3 ++- src/locales/zh.json | 3 ++- src/pages/network/containers/Subnet/index.jsx | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 55fbc031..82b6c7b4 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1589,6 +1589,7 @@ "Note: The security group you use will act on all virtual adapters of the instance.": "Note: The security group you use will act on all virtual adapters of the instance.", "Nova Service": "Nova Service", "Number of GPU": "Number of GPU", + "Number of IPs used by all projects": "Number of IPs used by all projects", "Number of Master Nodes": "Number of Master Nodes", "Number of Nodes": "Number of Nodes", "Number of Ports": "Number of Ports", @@ -1737,7 +1738,6 @@ "Please input metadata": "Please input metadata", "Please input name": "Please input name", "Please input or load Template from a file": "Please input or load Template from a file", - "Please input port range": "Please input port range", "Please input prefix": "Please input prefix", "Please input protocol number if it absent in select list.": "Please input protocol number if it absent in select list.", "Please input provider": "Please input provider", @@ -2224,6 +2224,7 @@ "Subnet Count": "Subnet Count", "Subnet Detail": "Subnet Detail", "Subnet ID": "Subnet ID", + "Subnet ID/Name": "Subnet ID/Name", "Subnet Name": "Subnet Name", "Subnets": "Subnets", "Subordinate Projects": "Subordinate Projects", diff --git a/src/locales/zh.json b/src/locales/zh.json index 359c9db1..05cbacb2 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -1589,6 +1589,7 @@ "Note: The security group you use will act on all virtual adapters of the instance.": "注:您所用的安全组将作用于云主机的全部虚拟网卡。", "Nova Service": "计算服务", "Number of GPU": "GPU数量", + "Number of IPs used by all projects": "所有项目使用的IP数量", "Number of Master Nodes": "主节点数", "Number of Nodes": "节点数量", "Number of Ports": "端口数量", @@ -1737,7 +1738,6 @@ "Please input metadata": "请输入元数据", "Please input name": "请输入名称", "Please input or load Template from a file": "请输入或者从文件加载模板", - "Please input port range": "请输入端口范围", "Please input prefix": "请输入前缀", "Please input protocol number if it absent in select list.": "如果选择列表中没有,请输入协议号。", "Please input provider": "请输入提供者", @@ -2224,6 +2224,7 @@ "Subnet Count": "子网数量", "Subnet Detail": "子网详情", "Subnet ID": "子网ID", + "Subnet ID/Name": "子网ID/名称", "Subnet Name": "子网名称", "Subnets": "子网", "Subordinate Projects": "所属项目列表", diff --git a/src/pages/network/containers/Subnet/index.jsx b/src/pages/network/containers/Subnet/index.jsx index 25f977ce..24c32874 100644 --- a/src/pages/network/containers/Subnet/index.jsx +++ b/src/pages/network/containers/Subnet/index.jsx @@ -57,9 +57,8 @@ export class Subnets extends Base { getColumns = () => { const ret = [ { - title: t('Name'), + title: t('Subnet ID/Name'), dataIndex: 'name', - stringify: (name, record) => name || record.id, routeName: this.getRouteName('subnetDetail'), routeParamsFunc: (data) => ({ networkId: data.network_id, @@ -118,6 +117,9 @@ export class Subnets extends Base { { title: t('Used IPs'), dataIndex: 'used_ips', + titleTip: this.isAdminPage + ? '' + : t('Number of IPs used by all projects'), } ); }