Skip to content

Commit 72aef25

Browse files
committed
feat(Tenants): display tenant nodes count
1 parent d1aed44 commit 72aef25

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/containers/Tenants/Tenants.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import ProblemFilter, {problemFilterType} from '../../components/ProblemFilter/P
1414
import {AutoFetcher} from '../../utils/autofetcher';
1515

1616
import routes, {CLUSTER_PAGES, createHref} from '../../routes';
17-
import {formatCPU, formatBytesToGigabyte} from '../../utils';
17+
import {formatCPU, formatBytesToGigabyte, formatNumber} from '../../utils';
1818
import {hideTooltip, showTooltip} from '../../store/reducers/tooltip';
1919
import {withSearch} from '../../HOCS';
2020
import {ALL, DEFAULT_TABLE_SETTINGS, TENANT_INITIAL_TAB_KEY} from '../../utils/constants';
@@ -257,13 +257,23 @@ class Tenants extends React.Component {
257257
align: DataTable.RIGHT,
258258
defaultOrder: DataTable.DESCENDING,
259259
},
260+
{
261+
name: 'NodeIds',
262+
header: 'Nodes',
263+
width: 100,
264+
accessor: ({NodeIds}) => NodeIds.length,
265+
sortAccessor: ({NodeIds}) => NodeIds.length,
266+
render: ({value}) => formatNumber(value) || '—',
267+
align: DataTable.RIGHT,
268+
defaultOrder: DataTable.DESCENDING,
269+
},
260270
{
261271
name: 'StorageGroups',
262272
header: 'Groups',
263273
width: 100,
264274
sortAccessor: ({StorageGroups}) =>
265275
isNaN(Number(StorageGroups)) ? 0 : Number(StorageGroups),
266-
render: ({value}) => value ?? '—',
276+
render: ({value}) => formatNumber(value) || '—',
267277
align: DataTable.RIGHT,
268278
defaultOrder: DataTable.DESCENDING,
269279
},

0 commit comments

Comments
 (0)