fix: Support search filter for cluster and template.

Support search filter for cluster instance and cluster template

Closes-Bug: #1999128
Change-Id: Ic1ec950f483f6eca845aa13ba3ae533b29d844e0
This commit is contained in:
xusongfu 2022-12-08 15:44:06 +08:00
parent 228ccff07b
commit 77df05477e
5 changed files with 66 additions and 37 deletions

View File

@ -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",

View File

@ -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": "主节点类型",

View File

@ -69,7 +69,7 @@ export class StepInfo extends Base {
},
{
name: 'coe',
label: t('Container Orchestration Engine'),
label: t('COE'),
type: 'select',
options: [
{

View File

@ -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));

View File

@ -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,7 +44,8 @@ export class Clusters extends Base {
return actionConfigs.actionConfigs;
}
getColumns = () => [
getColumns() {
return [
{
title: t('ID/Name'),
dataIndex: 'name',
@ -75,4 +77,24 @@ export class Clusters extends Base {
];
}
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));