Skip to content

Commit

Permalink
fix: don't show empty stats. (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
egorgripasov authored Feb 15, 2022
1 parent dc7605a commit bb7b45e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/console-app/src/containers/ServicesPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ const columns: GridColDef[] = [
width: 140,
align: 'right',
cellClassName: 'monospace',
valueFormatter: ({ value }) => (value as number).toFixed(2)
valueFormatter: ({ value }) => value !== undefined ? (value as number).toFixed(2) : ''
},
{
field: 'memory',
headerName: 'Memory',
width: 160,
align: 'right',
cellClassName: 'monospace',
valueFormatter: ({ value }) => format.format(value as number / 1000) + 'K'
valueFormatter: ({ value }) => value !== undefined ? format.format(value as number / 1000) + 'K' : ''
}
];

Expand All @@ -63,7 +63,7 @@ export const ServicesPanel = () => {
useEffect(() => {
const prepopulate = async () => {
const result = await serviceRequester(config, false, true);
setServicesPrelist(result.data);
setServicesPrelist(result.data.map(({ name, type, status }: any) => ({ name, type, status })));
};
void prepopulate();
}, []);
Expand Down

0 comments on commit bb7b45e

Please sign in to comment.