File tree Expand file tree Collapse file tree 3 files changed +4
-12
lines changed
containers/Storage/StorageGroups Expand file tree Collapse file tree 3 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ import cn from 'bem-cn-lite';
22
33import { Label , type LabelProps } from '@gravity-ui/uikit' ;
44
5+ import './UsageLabel.scss' ;
6+
57const b = cn ( 'ydb-usage-label' ) ;
68
79interface UsageLabelProps extends LabelProps {
Original file line number Diff line number Diff line change 3131 width : 230px ;
3232 }
3333
34- & __usage-label {
35- & _overload {
36- color : var (--yc-color-text-light-primary );
37- background-color : var (--yc-color-base-danger-heavy );
38- }
39- }
4034 & __group-id {
4135 font-weight : 500 ;
4236 }
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {stringifyVdiskId} from '../../../utils/dataFormatters/dataFormatters';
1313import EntityStatus from '../../../components/EntityStatus/EntityStatus' ;
1414import { Stack } from '../../../components/Stack/Stack' ;
1515import { CellWithPopover } from '../../../components/CellWithPopover/CellWithPopover' ;
16+ import { UsageLabel } from '../../../components/UsageLabel/UsageLabel' ;
1617import { VDisk } from '../VDisk' ;
1718import { getDegradedSeverity , getUsageSeverityForStorageGroup } from '../utils' ;
1819import i18n from './i18n' ;
@@ -128,12 +129,7 @@ const usageColumn: Column<PreparedStorageGroup> = {
128129 // without a limit the usage can be evaluated as 0,
129130 // but the absence of a value is more clear
130131 return row . Limit ? (
131- < Label
132- theme = { getUsageSeverityForStorageGroup ( row . Usage ) }
133- className = { b ( 'usage-label' , { overload : row . Usage >= 90 } ) }
134- >
135- { row . Usage } %
136- </ Label >
132+ < UsageLabel value = { row . Usage } theme = { getUsageSeverityForStorageGroup ( row . Usage ) } />
137133 ) : (
138134 '-'
139135 ) ;
You can’t perform that action at this time.
0 commit comments