diff --git a/src/locales/en.json b/src/locales/en.json index 13cb278e..45274183 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -432,7 +432,6 @@ "Container Format": "Container Format", "Container Killing": "Container Killing", "Container Name": "Container Name", - "Container Orchestration Engine": "Container Orchestration Engine", "Container Rebooting": "Container Rebooting", "Container Rebuilding": "Container Rebuilding", "Container Starting": "Container Starting", @@ -951,7 +950,6 @@ "Fixed Subnet ID": "Fixed Subnet ID", "Flavor": "Flavor", "Flavor Detail": "Flavor Detail", - "Flavor ID": "Flavor ID", "Flavor Info": "Flavor Info", "Flavor Name": "Flavor Name", "Flavor of Master Nodes": "Flavor of Master Nodes", diff --git a/src/locales/zh.json b/src/locales/zh.json index e019b05c..ae5280a0 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -272,8 +272,8 @@ "CIDR": "网络地址", "CIDR Format Error(e.g. 192.168.0.0/24, 2001:DB8::/48)": "CIDR格式错误(如:192.168.0.0/24, 2001:DB8::/48)", "CIFS": "CIFS", - "COE": "COE", - "COE Version": "COE版本", + "COE": "容器编排引擎", + "COE Version": "容器编排引擎版本", "CPU": "CPU", "CPU %": "CPU使用率(%)", "CPU (Core)": "CPU (核)", @@ -432,7 +432,6 @@ "Container Format": "容器格式", "Container Killing": "容器终止中", "Container Name": "容器名称", - "Container Orchestration Engine": "容器编排引擎", "Container Rebooting": "容器重启中", "Container Rebuilding": "容器重建中", "Container Starting": "容器启动中", @@ -951,7 +950,6 @@ "Fixed Subnet ID": "内网子网ID", "Flavor": "云主机类型", "Flavor Detail": "云主机类型详情", - "Flavor ID": "云主机类型ID", "Flavor Info": "配置信息", "Flavor Name": "云主机类型名称", "Flavor of Master Nodes": "主节点类型", diff --git a/src/pages/container-infra/containers/ClusterTemplates/actions/StepCreate/StepInfo/index.jsx b/src/pages/container-infra/containers/ClusterTemplates/actions/StepCreate/StepInfo/index.jsx index 92acb133..cfab66c6 100644 --- a/src/pages/container-infra/containers/ClusterTemplates/actions/StepCreate/StepInfo/index.jsx +++ b/src/pages/container-infra/containers/ClusterTemplates/actions/StepCreate/StepInfo/index.jsx @@ -69,7 +69,7 @@ export class StepInfo extends Base { }, { name: 'coe', - label: t('Container Orchestration Engine'), + label: t('COE'), type: 'select', options: [ { diff --git a/src/pages/container-infra/containers/ClusterTemplates/index.jsx b/src/pages/container-infra/containers/ClusterTemplates/index.jsx index ff00fbf7..6f6b0b47 100644 --- a/src/pages/container-infra/containers/ClusterTemplates/index.jsx +++ b/src/pages/container-infra/containers/ClusterTemplates/index.jsx @@ -41,7 +41,18 @@ export class ClusterTemplates extends Base { return actionConfigs.actionConfigs; } - getColumns = () => getBaseTemplateColumns(this); + getColumns() { + return getBaseTemplateColumns(this); + } + + get searchFilters() { + return [ + { + label: t('Name'), + name: 'name', + }, + ]; + } } export default inject('rootStore')(observer(ClusterTemplates)); diff --git a/src/pages/container-infra/containers/Clusters/index.jsx b/src/pages/container-infra/containers/Clusters/index.jsx index bdfce63e..ef0511f9 100644 --- a/src/pages/container-infra/containers/Clusters/index.jsx +++ b/src/pages/container-infra/containers/Clusters/index.jsx @@ -14,6 +14,7 @@ import Base from 'containers/List'; import { inject, observer } from 'mobx-react'; +import { getOptions } from 'utils'; import { clusterStatus, healthStatus } from 'resources/magnum/cluster'; import globalClustersStore from 'src/stores/magnum/clusters'; import actionConfigs from './actions'; @@ -43,36 +44,57 @@ export class Clusters extends Base { return actionConfigs.actionConfigs; } - getColumns = () => [ - { - title: t('ID/Name'), - dataIndex: 'name', - routeName: this.getRouteName('containerInfraClusterDetail'), - }, - { - title: t('Status'), - isHideable: true, - dataIndex: 'status', - valueMap: clusterStatus, - }, - { - title: t('Health Status'), - isHideable: true, - dataIndex: 'health_status', - render: (value) => healthStatus[value] || value || '-', - }, - { - title: t('Keypair'), - isHideable: true, - dataIndex: 'keypair', - hidden: this.isAdminPage, - render: (value) => { - return value - ? this.getLinkRender('keypairDetail', value, { id: value }) - : '-'; + getColumns() { + return [ + { + title: t('ID/Name'), + dataIndex: 'name', + routeName: this.getRouteName('containerInfraClusterDetail'), }, - }, - ]; + { + title: t('Status'), + isHideable: true, + dataIndex: 'status', + valueMap: clusterStatus, + }, + { + title: t('Health Status'), + isHideable: true, + dataIndex: 'health_status', + render: (value) => healthStatus[value] || value || '-', + }, + { + title: t('Keypair'), + isHideable: true, + dataIndex: 'keypair', + hidden: this.isAdminPage, + render: (value) => { + return value + ? this.getLinkRender('keypairDetail', value, { id: value }) + : '-'; + }, + }, + ]; + } + + get searchFilters() { + return [ + { + label: t('Name'), + name: 'name', + }, + { + label: t('Status'), + name: 'status', + options: getOptions(clusterStatus), + }, + { + label: t('Health Status'), + name: 'health_status', + options: getOptions(healthStatus), + }, + ]; + } } export default inject('rootStore')(observer(Clusters));