Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion web-console/src/react-table/react-table-extra.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@

.ReactTable {
&.centered-table {
.rt-th,
.rt-th {
align-content: start;
}

.rt-td {
align-content: center;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ exports[`ServicesView renders data 1`] = `
"Usage",
"Start time",
"Version",
"CPU processors",
"Available processors",
"Total memory",
"Labels",
"Detail",
Expand Down Expand Up @@ -225,12 +225,16 @@ exports[`ServicesView renders data 1`] = `
{
"Aggregated": [Function],
"Cell": [Function],
"Header": "CPU processors",
"Header": <React.Fragment>
Available
<br />
processors
</React.Fragment>,
"accessor": "available_processors",
"className": "padded",
"filterable": false,
"show": true,
"width": 120,
"width": 100,
},
{
"Aggregated": [Function],
Expand Down
12 changes: 7 additions & 5 deletions web-console/src/views/services-view/services-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import {
formatBytesCompact,
formatDate,
formatDurationWithMsIfNeeded,
formatInteger,
getApiArray,
hasOverlayOpen,
LocalStorageBackedVisibility,
Expand All @@ -67,6 +68,7 @@ import {
QueryManager,
QueryState,
ResultWithAuxiliaryWork,
twoLines,
} from '../../utils';
import type { BasicAction } from '../../utils/basic-action';
import { TableFilter, TableFilters } from '../../utils/table-filters';
Expand All @@ -87,7 +89,7 @@ const TABLE_COLUMNS_BY_MODE: Record<CapabilitiesMode, TableColumnSelectorColumn[
'Usage',
'Start time',
'Version',
'CPU processors',
'Available processors',
'Total memory',
'Labels',
'Detail',
Expand Down Expand Up @@ -672,13 +674,13 @@ ORDER BY
Aggregated: () => '',
},
{
Header: 'CPU processors',
show: visibleColumns.shown('CPU processors'),
Header: twoLines('Available', 'processors'),
show: visibleColumns.shown('Available processors'),
accessor: 'available_processors',
className: 'padded',
filterable: false,
width: 120,
Cell: ({ value }) => (value === null ? '' : value),
width: 100,
Cell: ({ value }) => (value === null ? '' : formatInteger(value)),
Aggregated: ({ subRows }) => {
const originalRows: ServiceResultRow[] = subRows.map(r => r._original);
const totalAvailableProcessors = sum(originalRows, s => s.available_processors);
Expand Down
Loading