Merge "fix the QoS policy list" into stable/zed

This commit is contained in:
Zuul
2022-09-28 09:34:52 +00:00
committed by Gerrit Code Review

View File

@@ -52,16 +52,21 @@ export const getQosPolicyColumns = ({ self, all = false }) => {
{ {
title: t('Rules'), title: t('Rules'),
dataIndex: 'rules', dataIndex: 'rules',
render: (rules) => ( render: (rules) =>
<Row> rules.length ? (
{rules.map((rule) => ( <Row>
<Col span={24} key={rule.direction}> {rules.map((rule) => (
{getRuleValue(rule)} <Col span={24} key={rule.direction}>
</Col> {getRuleValue(rule)}
))} </Col>
</Row> ))}
), </Row>
stringify: (rules) => rules.map((rule) => getRuleValue(rule)).join('\n'), ) : (
'-'
),
sorter: false,
stringify: (rules) =>
rules.length ? rules.map((rule) => getRuleValue(rule)).join('\n') : '-',
}, },
{ {
title: t('Shared'), title: t('Shared'),
@@ -86,7 +91,7 @@ export const getQosPolicyColumns = ({ self, all = false }) => {
sorter: false, sorter: false,
}, },
]; ];
if (all) { if (all && self.isAdminPage) {
ret.splice(2, 0, { ret.splice(2, 0, {
title: t('Project ID/Name'), title: t('Project ID/Name'),
dataIndex: 'project_name', dataIndex: 'project_name',