Skip to content

Commit 4fc92c7

Browse files
Copilotastandrik
authored andcommitted
feat: make RAM and CPU bars fill container width in tables
1 parent 12c6987 commit 4fc92c7

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

src/components/CellWithPopover/CellWithPopover.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,9 @@
2828
}
2929
&__children-wrapper {
3030
cursor: pointer;
31+
32+
&_full-width {
33+
width: 100%;
34+
}
3135
}
3236
}

src/components/CellWithPopover/CellWithPopover.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function CellWithPopover({
3232
className={b('popover', {'full-width': fullWidth}, className)}
3333
{...props}
3434
>
35-
<div className={b('children-wrapper')}>{children}</div>
35+
<div className={b('children-wrapper', {'full-width': fullWidth})}>{children}</div>
3636
</Popover>
3737
</div>
3838
);

src/components/ProgressViewer/ProgressViewer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {useTheme} from '@gravity-ui/uikit';
22

33
import {cn} from '../../utils/cn';
4+
import {EMPTY_DATA_PLACEHOLDER} from '../../utils/constants';
45
import {calculateProgressStatus, defaultFormatProgressValues} from '../../utils/progress';
56
import type {FormatProgressViewerValues} from '../../utils/progress';
67
import {isNumeric} from '../../utils/utils';
@@ -103,5 +104,5 @@ export function ProgressViewer({
103104
);
104105
}
105106

106-
return <div className={`${b({size})} ${className} error`}>no data</div>;
107+
return <div className={b({size}, className)}>{EMPTY_DATA_PLACEHOLDER}</div>;
107108
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.ydb-nodes-columns {
22
&__column-ram,
33
&__column-cpu {
4+
width: 100%;
45
min-width: 40px;
56
}
67
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.cpu-usage-bar {
22
&__progress {
3-
width: 60px;
3+
flex: 1;
4+
45
min-width: 60px;
56
}
67
}

0 commit comments

Comments
 (0)