File tree Expand file tree Collapse file tree 7 files changed +38
-42
lines changed
containers/Tenant/Diagnostics Expand file tree Collapse file tree 7 files changed +38
-42
lines changed Original file line number Diff line number Diff line change 1+ .ydb-lag-popover {
2+ div :nth-child (1 ) {
3+ margin-bottom : 10px ;
4+ }
5+
6+ & _type_read {
7+ max-width : 280px ;
8+ }
9+
10+ & _type_write {
11+ max-width : 220px ;
12+ }
13+ }
Original file line number Diff line number Diff line change 1+ import block from 'bem-cn-lite' ;
2+
3+ import { ReadLagImage , WriteLagImage } from '../LagImages' ;
4+
5+ import './LagPopover.scss' ;
6+
7+ const b = block ( 'ydb-lag-popover' ) ;
8+
9+ interface LagPopoverProps {
10+ text : string ;
11+ type : 'read' | 'write' ;
12+ }
13+
14+ export const LagPopover = ( { text, type} : LagPopoverProps ) => (
15+ < div className = { b ( { type} ) } >
16+ < div > { text } </ div >
17+ < div > { type === 'read' ? < ReadLagImage /> : < WriteLagImage /> } </ div >
18+ </ div >
19+ ) ;
Original file line number Diff line number Diff line change 1+ export * from './LagPopover' ;
Original file line number Diff line number Diff line change 22 & __lags {
33 white-space : nowrap ;
44 }
5-
6- & __lags-popover-content {
7- max-width : 300px ;
8-
9- div :nth-child (1 ) {
10- margin-bottom : 10px ;
11- }
12- }
135}
Original file line number Diff line number Diff line change 11import block from 'bem-cn-lite' ;
22
3- import { ReadLagImage } from '../../../../../components/LagImages' ;
43import { LabelWithPopover } from '../../../../../components/LabelWithPopover' ;
4+ import { LagPopover } from '../../../../../components/LagPopover' ;
55
66import { CONSUMERS_COLUMNS_IDS , CONSUMERS_COLUMNS_TITILES } from '../utils/constants' ;
77
@@ -15,13 +15,6 @@ export const ReadLagsHeader = () => (
1515 < LabelWithPopover
1616 className = { b ( 'lags' ) }
1717 text = { CONSUMERS_COLUMNS_TITILES [ CONSUMERS_COLUMNS_IDS . READ_LAGS ] }
18- content = {
19- < div className = { b ( 'lags-popover-content' ) } >
20- < div > { i18n ( 'lagsPopover.readLags' ) } </ div >
21- < div >
22- < ReadLagImage />
23- </ div >
24- </ div >
25- }
18+ content = { < LagPopover text = { i18n ( 'lagsPopover.readLags' ) } type = "read" /> }
2619 />
2720) ;
Original file line number Diff line number Diff line change 1919 white-space : normal ;
2020 }
2121
22- & __lags-popover-content {
23- max-width : 300px ;
24-
25- div :nth-child (1 ) {
26- margin-bottom : 10px ;
27- }
28- }
29-
3022 & __messages-popover-content {
3123 max-width : 200px ;
3224 }
Original file line number Diff line number Diff line change 11import block from 'bem-cn-lite' ;
22
33import { LabelWithPopover } from '../../../../../components/LabelWithPopover' ;
4- import { WriteLagImage , ReadLagImage } from '../../../../../components/LagImages ' ;
4+ import { LagPopover } from '../../../../../components/LagPopover ' ;
55
66import { PARTITIONS_COLUMNS_IDS , PARTITIONS_COLUMNS_TITILES } from '../utils/constants' ;
77
@@ -29,29 +29,15 @@ export const WriteLagsHeader = () => (
2929 < LabelWithPopover
3030 className = { b ( 'lags' ) }
3131 text = { PARTITIONS_COLUMNS_TITILES [ PARTITIONS_COLUMNS_IDS . READ_LAGS ] }
32- content = {
33- < div className = { b ( 'lags-popover-content' ) } >
34- < div > { i18n ( 'lagsPopover.writeLags' ) } </ div >
35- < div >
36- < WriteLagImage />
37- </ div >
38- </ div >
39- }
32+ content = { < LagPopover text = { i18n ( 'lagsPopover.readLags' ) } type = "read" /> }
4033 />
4134) ;
4235
4336export const ReadLagsHeader = ( ) => (
4437 < LabelWithPopover
4538 className = { b ( 'lags' ) }
4639 text = { PARTITIONS_COLUMNS_TITILES [ PARTITIONS_COLUMNS_IDS . WRITE_LAGS ] }
47- content = {
48- < div className = { b ( 'lags-popover-content' ) } >
49- < div > { i18n ( 'lagsPopover.readLags' ) } </ div >
50- < div >
51- < ReadLagImage />
52- </ div >
53- </ div >
54- }
40+ content = { < LagPopover text = { i18n ( 'lagsPopover.writeLags' ) } type = "write" /> }
5541 />
5642) ;
5743
You can’t perform that action at this time.
0 commit comments