Web console: fix service view actions when grouping (#10898)

* fix service view actions when grouping

* fix test
This commit is contained in:
Vadim Ogievetsky 2021-03-09 21:38:56 -08:00 committed by GitHub
parent 58294329b7
commit c0fb326788
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -196,6 +196,7 @@ exports[`services view action services view 1`] = `
"width": 400, "width": 400,
}, },
Object { Object {
"Aggregated": [Function],
"Cell": [Function], "Cell": [Function],
"Header": "Actions", "Header": "Actions",
"accessor": [Function], "accessor": [Function],

View File

@ -559,12 +559,14 @@ ORDER BY "rank" DESC, "service" DESC`;
width: ACTION_COLUMN_WIDTH, width: ACTION_COLUMN_WIDTH,
accessor: row => row.worker, accessor: row => row.worker,
filterable: false, filterable: false,
Cell: ({ value }) => { Cell: ({ value, aggregated }) => {
if (aggregated) return '';
if (!value) return null; if (!value) return null;
const disabled = value.version === ''; const disabled = value.version === '';
const workerActions = this.getWorkerActions(value.host, disabled); const workerActions = this.getWorkerActions(value.host, disabled);
return <ActionCell actions={workerActions} />; return <ActionCell actions={workerActions} />;
}, },
Aggregated: () => '',
}, },
]} ]}
/> />