ydb-embedded-ui 4.24.0 → 4.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +39 -0
  3. package/dist/components/BasicNodeViewer/BasicNodeViewer.scss +3 -11
  4. package/dist/components/CircularProgressBar/CircularProgressBar.scss +4 -4
  5. package/dist/components/DateRange/DateRange.scss +3 -3
  6. package/dist/components/DiagnosticCard/DiagnosticCard.scss +4 -4
  7. package/dist/components/Divider/Divider.scss +1 -1
  8. package/dist/components/EmptyState/EmptyState.scss +8 -9
  9. package/dist/components/EntityStatus/EntityStatus.scss +19 -29
  10. package/dist/components/ExternalLinkWithIcon/ExternalLinkWithIcon.tsx +2 -2
  11. package/dist/components/FullNodeViewer/FullNodeViewer.scss +1 -4
  12. package/dist/components/Fullscreen/Fullscreen.scss +2 -9
  13. package/dist/components/Icon/Icon.tsx +1 -5
  14. package/dist/components/InfoViewer/InfoViewer.scss +6 -6
  15. package/dist/components/LabelWithPopover/LabelWithPopover.tsx +3 -2
  16. package/dist/components/NodeHostWrapper/NodeHostWrapper.tsx +2 -2
  17. package/dist/components/PoolBar/PoolBar.scss +6 -6
  18. package/dist/components/PoolUsage/PoolUsage.scss +15 -17
  19. package/dist/components/ProgressViewer/ProgressViewer.scss +17 -16
  20. package/dist/components/QueryExecutionStatus/QueryExecutionStatus.scss +3 -3
  21. package/dist/components/SpeedMultiMeter/SpeedMultiMeter.scss +5 -5
  22. package/dist/components/SpeedMultiMeter/SpeedMultiMeter.tsx +12 -13
  23. package/dist/components/SplitPane/SplitPane.scss +5 -5
  24. package/dist/components/TableSkeleton/TableSkeleton.scss +1 -1
  25. package/dist/components/Tablet/Tablet.scss +10 -10
  26. package/dist/components/TabletsStatistic/TabletsStatistic.scss +13 -13
  27. package/dist/components/Tag/Tag.scss +3 -3
  28. package/dist/components/TruncatedQuery/TruncatedQuery.scss +1 -1
  29. package/dist/components/UsageLabel/UsageLabel.scss +2 -2
  30. package/dist/components/UsageLabel/UsageLabel.tsx +1 -1
  31. package/dist/components/VirtualTable/VirtualTable.scss +3 -3
  32. package/dist/containers/App/App.scss +20 -24
  33. package/dist/containers/AsideNavigation/AsideNavigation.scss +1 -4
  34. package/dist/containers/Authentication/Authentication.scss +4 -4
  35. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +4 -6
  36. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.tsx +1 -1
  37. package/dist/containers/Cluster/ClusterInfoSkeleton/ClusterInfoSkeleton.scss +3 -3
  38. package/dist/containers/Cluster/VersionsBar/VersionsBar.tsx +1 -1
  39. package/dist/containers/Header/Header.scss +1 -1
  40. package/dist/containers/Heatmap/Heatmap.scss +3 -5
  41. package/dist/containers/Heatmap/Histogram/Histogram.scss +6 -6
  42. package/dist/containers/Node/NodeStructure/NodeStructure.scss +10 -13
  43. package/dist/containers/Node/NodeStructure/Pdisk.tsx +1 -1
  44. package/dist/containers/ReduxTooltip/ReduxTooltip.js +1 -1
  45. package/dist/containers/ReduxTooltip/ReduxTooltip.scss +1 -18
  46. package/dist/containers/Storage/DiskStateProgressBar/DiskStateProgressBar.scss +23 -23
  47. package/dist/containers/Storage/PDisk/PDisk.scss +4 -4
  48. package/dist/containers/Storage/PDiskPopup/PDiskPopup.tsx +1 -1
  49. package/dist/containers/Storage/Storage.scss +1 -1
  50. package/dist/containers/Storage/StorageGroups/StorageGroups.scss +1 -1
  51. package/dist/containers/Storage/UsageFilter/UsageFilter.scss +7 -6
  52. package/dist/containers/Storage/VDiskPopup/VDiskPopup.scss +1 -1
  53. package/dist/containers/Storage/VDiskPopup/VDiskPopup.tsx +1 -1
  54. package/dist/containers/Tablet/Tablet.scss +5 -5
  55. package/dist/containers/TabletsFilters/TabletsFilters.scss +2 -3
  56. package/dist/containers/Tenant/Acl/Acl.scss +1 -15
  57. package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.scss +0 -4
  58. package/dist/containers/Tenant/Diagnostics/Consumers/TopicStats/ConsumersTopicStats.scss +5 -4
  59. package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.scss +0 -6
  60. package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.tsx +11 -79
  61. package/dist/containers/Tenant/Diagnostics/Diagnostics.scss +2 -2
  62. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.scss +2 -2
  63. package/dist/containers/Tenant/Diagnostics/Network/Network.scss +8 -10
  64. package/dist/containers/Tenant/Diagnostics/Network/NodeNetwork/NodeNetwork.scss +8 -8
  65. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.scss +1 -5
  66. package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.tsx +0 -1
  67. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/Healthcheck.scss +12 -12
  68. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTree.scss +1 -36
  69. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTreeItem/IssueTreeItem.scss +3 -3
  70. package/dist/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricCard/MetricCard.scss +7 -7
  71. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.scss +2 -53
  72. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.scss +1 -1
  73. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.scss +4 -8
  74. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.tsx +2 -1
  75. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.scss +3 -6
  76. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.scss +2 -5
  77. package/dist/containers/Tenant/Query/Issues/Issues.scss +11 -14
  78. package/dist/containers/Tenant/Query/Preview/Preview.scss +3 -7
  79. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.tsx +5 -12
  80. package/dist/containers/Tenant/Query/QueryDuration/QueryDuration.scss +1 -1
  81. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +1 -10
  82. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.scss +3 -9
  83. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.scss +3 -25
  84. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.tsx +15 -40
  85. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.scss +5 -5
  86. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.tsx +3 -3
  87. package/dist/containers/Tenant/Query/i18n/en.json +0 -2
  88. package/dist/containers/Tenant/Query/i18n/ru.json +0 -2
  89. package/dist/containers/Tenant/Tenant.scss +1 -2
  90. package/dist/containers/Tenant/utils/schemaActions.ts +11 -18
  91. package/dist/containers/Tenant/utils/schemaControls.tsx +2 -2
  92. package/dist/containers/UserSettings/Setting.tsx +5 -1
  93. package/dist/containers/UserSettings/i18n/en.json +1 -7
  94. package/dist/containers/UserSettings/i18n/ru.json +1 -7
  95. package/dist/containers/UserSettings/settings.ts +1 -19
  96. package/dist/containers/Versions/GroupedNodesTree/GroupedNodesTree.scss +2 -3
  97. package/dist/containers/Versions/NodesTreeTitle/NodesTreeTitle.scss +1 -1
  98. package/dist/containers/Versions/NodesTreeTitle/NodesTreeTitle.tsx +1 -1
  99. package/dist/index.tsx +1 -0
  100. package/dist/services/api.ts +1 -0
  101. package/dist/store/reducers/settings/settings.ts +0 -10
  102. package/dist/styles/mixins.scss +37 -35
  103. package/dist/styles/themes/dark-hc.scss +296 -0
  104. package/dist/styles/themes/dark.scss +297 -0
  105. package/dist/styles/themes/light-hc.scss +289 -0
  106. package/dist/styles/themes/light.scss +291 -0
  107. package/dist/styles/themes.scss +73 -0
  108. package/dist/utils/constants.ts +0 -11
  109. package/dist/utils/hooks/useQueryModes.ts +3 -32
  110. package/dist/utils/query.ts +0 -4
  111. package/package.json +7 -6
  112. package/dist/containers/App/TipPopup/TipPopup.js +0 -66
  113. package/dist/containers/App/TipPopup/TipPopup.scss +0 -46
  114. package/dist/containers/Tenant/Diagnostics/OldHealthcheck/Details/Details.tsx +0 -64
  115. package/dist/containers/Tenant/Diagnostics/OldHealthcheck/Details/index.ts +0 -1
  116. package/dist/containers/Tenant/Diagnostics/OldHealthcheck/Healthcheck.scss +0 -137
  117. package/dist/containers/Tenant/Diagnostics/OldHealthcheck/Healthcheck.tsx +0 -92
  118. package/dist/containers/Tenant/Diagnostics/OldHealthcheck/Preview/Preview.tsx +0 -82
  119. package/dist/containers/Tenant/Diagnostics/OldHealthcheck/Preview/index.ts +0 -1
  120. package/dist/containers/Tenant/Diagnostics/OldHealthcheck/index.ts +0 -1
  121. package/dist/containers/Tenant/Diagnostics/TenantOverview/OldTenantOverview.tsx +0 -155
  122. package/dist/utils/hooks/i18n/en.json +0 -3
  123. package/dist/utils/hooks/i18n/index.ts +0 -11
  124. package/dist/utils/hooks/i18n/ru.json +0 -3
@@ -1,137 +0,0 @@
1
- @import '../../../../styles/mixins.scss';
2
- @import '@gravity-ui/uikit/styles/mixins.scss';
3
-
4
- .old-healthcheck {
5
- display: flex;
6
-
7
- &_expanded {
8
- // Since most of the inner containers have fixed width, we can set fixed width here as well
9
- // Thus we will get rid of unneeded layout shift when scrollbar appear
10
- min-width: 885px;
11
- }
12
-
13
- &__details {
14
- width: 860px;
15
- padding: 25px 20px 20px;
16
- }
17
-
18
- &__issue-preview {
19
- margin-bottom: 15px;
20
- }
21
-
22
- &__details-content-wrapper {
23
- overflow-x: hidden;
24
- overflow-y: auto;
25
-
26
- height: 70vh;
27
- max-height: 70vh;
28
- }
29
-
30
- &__message-container {
31
- padding: 15px 0;
32
- }
33
-
34
- &__details-header {
35
- display: flex;
36
- align-items: center;
37
-
38
- margin-bottom: 20px;
39
- }
40
-
41
- &__details-header-title {
42
- margin: 0 10px 0 0;
43
-
44
- @include text-header-1();
45
- }
46
-
47
- &__details-header-update {
48
- margin-left: 10px;
49
- }
50
-
51
- &__preview {
52
- width: 206px;
53
- padding: 16px;
54
- padding-bottom: 28px;
55
-
56
- border: 1px solid var(--yc-color-line-generic);
57
- border-radius: 8px;
58
- background-color: transparent;
59
- }
60
-
61
- &__preview-header {
62
- margin-bottom: var(--diagnostics-section-title-margin);
63
- gap: 8px;
64
- }
65
-
66
- &__preview-title {
67
- font-weight: 600;
68
- @include lead-typography();
69
- }
70
-
71
- &__preview-content {
72
- line-height: 24px;
73
- }
74
-
75
- &__preview-title-wrapper {
76
- display: flex;
77
- align-items: center;
78
-
79
- margin-bottom: 4px;
80
-
81
- gap: 8px;
82
- }
83
-
84
- &__issues-statistics {
85
- display: flex;
86
- flex-wrap: wrap;
87
- align-items: center;
88
-
89
- margin: 8px 0;
90
-
91
- gap: 10px;
92
- }
93
-
94
- &__self-check-status-indicator {
95
- display: inline-block;
96
-
97
- padding: 0 8px;
98
-
99
- font-size: 13px;
100
- line-height: 24px;
101
-
102
- border-radius: 4px;
103
-
104
- &_good,
105
- &_green {
106
- color: var(--yc-color-text-positive);
107
- background-color: var(--yc-color-base-positive);
108
- }
109
- &_degraded,
110
- &_yellow {
111
- color: var(--yc-color-text-warning);
112
- background-color: var(--yc-color-base-warning);
113
- }
114
-
115
- &_blue {
116
- color: var(--yc-color-text-info);
117
- background-color: var(--yc-color-base-info);
118
- }
119
-
120
- &_emergency,
121
- &_red {
122
- color: var(--yc-color-text-danger);
123
- background-color: var(--yc-color-base-danger);
124
- }
125
- &_unspecified,
126
- &_gray,
127
- &_grey {
128
- color: var(--yc-color-text-misc);
129
- background-color: var(--yc-color-base-misc);
130
- }
131
- &_maintenance_required,
132
- &_orange {
133
- color: var(--yc-color-text-warning-heavy);
134
- background-color: var(--yc-color-infographics-warning-light);
135
- }
136
- }
137
- }
@@ -1,92 +0,0 @@
1
- import {useCallback} from 'react';
2
- import {useDispatch} from 'react-redux';
3
- import cn from 'bem-cn-lite';
4
-
5
- import {Loader} from '@gravity-ui/uikit';
6
-
7
- import {SelfCheckResult} from '../../../../types/api/healthcheck';
8
- import {useTypedSelector, useAutofetcher} from '../../../../utils/hooks';
9
- import {
10
- getHealthcheckInfo,
11
- selectIssuesStatistics,
12
- selectIssuesTrees,
13
- setDataWasNotLoaded,
14
- } from '../../../../store/reducers/healthcheckInfo';
15
-
16
- import {Details} from './Details';
17
- import {Preview} from './Preview';
18
-
19
- import './Healthcheck.scss';
20
-
21
- interface HealthcheckProps {
22
- tenant: string;
23
- preview?: boolean;
24
- fetchData?: boolean;
25
- showMoreHandler?: VoidFunction;
26
- }
27
-
28
- const b = cn('old-healthcheck');
29
-
30
- export const Healthcheck = (props: HealthcheckProps) => {
31
- const {tenant, preview, fetchData = true, showMoreHandler} = props;
32
-
33
- const dispatch = useDispatch();
34
-
35
- const {data, loading, wasLoaded, error} = useTypedSelector((state) => state.healthcheckInfo);
36
- const issuesStatistics = useTypedSelector(selectIssuesStatistics);
37
- const issueTrees = useTypedSelector(selectIssuesTrees);
38
- const {autorefresh} = useTypedSelector((state) => state.schema);
39
-
40
- const selfCheckResult = data?.self_check_result || SelfCheckResult.UNSPECIFIED;
41
-
42
- const fetchHealthcheck = useCallback(
43
- (isBackground = true) => {
44
- if (!isBackground) {
45
- dispatch(setDataWasNotLoaded());
46
- }
47
-
48
- dispatch(getHealthcheckInfo(tenant));
49
- },
50
- [dispatch, tenant],
51
- );
52
-
53
- useAutofetcher(
54
- (isBackground) => {
55
- if (fetchData) {
56
- fetchHealthcheck(isBackground);
57
- }
58
- },
59
- [fetchData, fetchHealthcheck],
60
- autorefresh,
61
- );
62
-
63
- const renderContent = () => {
64
- if (loading && !wasLoaded) {
65
- return (
66
- <div className={b('old-preview', {loader: true})}>
67
- <Loader size="m" />
68
- </div>
69
- );
70
- }
71
-
72
- return preview ? (
73
- <Preview
74
- issuesStatistics={issuesStatistics}
75
- selfCheckResult={selfCheckResult}
76
- loading={loading}
77
- onShowMore={showMoreHandler}
78
- onUpdate={fetchHealthcheck}
79
- error={error}
80
- />
81
- ) : (
82
- <Details
83
- loading={loading}
84
- onUpdate={fetchHealthcheck}
85
- issueTrees={issueTrees}
86
- error={error}
87
- />
88
- );
89
- };
90
-
91
- return <div className={b({expanded: !preview})}>{renderContent()}</div>;
92
- };
@@ -1,82 +0,0 @@
1
- import cn from 'bem-cn-lite';
2
-
3
- import {Button, Icon, Link} from '@gravity-ui/uikit';
4
-
5
- import updateArrow from '../../../../../assets/icons/update-arrow.svg';
6
-
7
- import {SelfCheckResult, type StatusFlag} from '../../../../../types/api/healthcheck';
8
- import type {IResponseError} from '../../../../../types/api/error';
9
- import EntityStatus from '../../../../../components/EntityStatus/EntityStatus';
10
- import {ResponseError} from '../../../../../components/Errors/ResponseError';
11
-
12
- import i18n from '../../TenantOverview/Healthcheck/i18n';
13
-
14
- const b = cn('old-healthcheck');
15
-
16
- interface PreviewProps {
17
- selfCheckResult: SelfCheckResult;
18
- issuesStatistics?: [StatusFlag, number][];
19
- loading?: boolean;
20
- onShowMore?: VoidFunction;
21
- onUpdate: VoidFunction;
22
- error?: IResponseError;
23
- }
24
-
25
- export const Preview = (props: PreviewProps) => {
26
- const {selfCheckResult, issuesStatistics, loading, onShowMore, onUpdate, error} = props;
27
-
28
- const renderHeader = () => {
29
- const modifier = selfCheckResult.toLowerCase();
30
-
31
- return (
32
- <div className={b('preview-header')}>
33
- <div className={b('preview-title-wrapper')}>
34
- <div className={b('preview-title')}>{i18n('title.healthcheck')}</div>
35
- <Button size="s" onClick={onUpdate} loading={loading} view="flat-secondary">
36
- <Icon data={updateArrow} width={20} height={20} />
37
- </Button>
38
- </div>
39
- <div className={b('self-check-status-indicator', {[modifier]: true})}>
40
- {selfCheckResult}
41
- </div>
42
- </div>
43
- );
44
- };
45
-
46
- const renderContent = () => {
47
- if (error) {
48
- return <ResponseError error={error} defaultMessage={i18n('no-data')} />;
49
- }
50
-
51
- return (
52
- <div className={b('preview-content')}>
53
- {!issuesStatistics || !issuesStatistics.length ? (
54
- i18n('status_message.ok')
55
- ) : (
56
- <>
57
- <div>{i18n('label.issues')}</div>
58
- <div className={b('issues-statistics')}>
59
- {issuesStatistics.map(([status, count]) => (
60
- <EntityStatus
61
- key={status}
62
- mode="icons"
63
- status={status}
64
- label={count.toString()}
65
- size="l"
66
- />
67
- ))}
68
- </div>
69
- <Link onClick={() => onShowMore?.()}>{i18n('label.show-details')}</Link>
70
- </>
71
- )}
72
- </div>
73
- );
74
- };
75
-
76
- return (
77
- <div className={b('preview')}>
78
- {renderHeader()}
79
- {renderContent()}
80
- </div>
81
- );
82
- };
@@ -1 +0,0 @@
1
- export * from './Preview';
@@ -1 +0,0 @@
1
- export * from './Healthcheck';
@@ -1,155 +0,0 @@
1
- import cn from 'bem-cn-lite';
2
- import {useCallback} from 'react';
3
- import {useDispatch} from 'react-redux';
4
-
5
- import {Loader} from '@gravity-ui/uikit';
6
-
7
- import {InfoViewer} from '../../../../components/InfoViewer';
8
- import {PoolUsage} from '../../../../components/PoolUsage/PoolUsage';
9
- import {Tablet} from '../../../../components/Tablet';
10
- import EntityStatus from '../../../../components/EntityStatus/EntityStatus';
11
- import {formatCPU} from '../../../../utils/dataFormatters/dataFormatters';
12
- import {TABLET_STATES, TENANT_DEFAULT_TITLE} from '../../../../utils/constants';
13
- import {bytesToGB} from '../../../../utils/utils';
14
- import {mapDatabaseTypeToDBName} from '../../utils/schema';
15
- import {useAutofetcher, useTypedSelector} from '../../../../utils/hooks';
16
- import type {ETabletVolatileState} from '../../../../types/api/tenant';
17
- import type {AdditionalTenantsProps} from '../../../../types/additionalProps';
18
- import {getTenantInfo, setDataWasNotLoaded} from '../../../../store/reducers/tenant/tenant';
19
-
20
- import i18n from './i18n';
21
- import './TenantOverview.scss';
22
-
23
- const b = cn('tenant-overview');
24
-
25
- interface OldTenantOverviewProps {
26
- tenantName: string;
27
- additionalTenantProps?: AdditionalTenantsProps;
28
- }
29
-
30
- export function OldTenantOverview({tenantName, additionalTenantProps}: OldTenantOverviewProps) {
31
- const {tenant, loading, wasLoaded} = useTypedSelector((state) => state.tenant);
32
- const {autorefresh} = useTypedSelector((state) => state.schema);
33
- const dispatch = useDispatch();
34
- const fetchTenant = useCallback(
35
- (isBackground = true) => {
36
- if (!isBackground) {
37
- dispatch(setDataWasNotLoaded());
38
- }
39
- dispatch(getTenantInfo({path: tenantName}));
40
- },
41
- [dispatch, tenantName],
42
- );
43
-
44
- useAutofetcher(fetchTenant, [fetchTenant], autorefresh);
45
-
46
- const {
47
- Metrics = {},
48
- PoolStats,
49
- StateStats = [],
50
- MemoryUsed,
51
- Name,
52
- State,
53
- CoresUsed,
54
- StorageGroups,
55
- StorageAllocatedSize,
56
- Type,
57
- SystemTablets,
58
- } = tenant || {};
59
-
60
- const tenantType = mapDatabaseTypeToDBName(Type);
61
- const memoryRaw = MemoryUsed ?? Metrics.Memory;
62
-
63
- const memory = (memoryRaw && bytesToGB(memoryRaw)) || i18n('no-data');
64
- const storage = (Metrics.Storage && bytesToGB(Metrics.Storage)) || i18n('no-data');
65
- const storageGroups = StorageGroups ?? i18n('no-data');
66
- const blobStorage =
67
- (StorageAllocatedSize && bytesToGB(StorageAllocatedSize)) || i18n('no-data');
68
- const storageEfficiency =
69
- Metrics.Storage && StorageAllocatedSize
70
- ? `${((parseInt(Metrics.Storage) * 100) / parseInt(StorageAllocatedSize)).toFixed(2)}%`
71
- : i18n('no-data');
72
-
73
- const cpuRaw = CoresUsed !== undefined ? Number(CoresUsed) * 1_000_000 : Metrics.CPU;
74
-
75
- const cpu = formatCPU(cpuRaw);
76
-
77
- const metricsInfo = [
78
- {label: 'Type', value: Type},
79
- {label: 'Memory', value: memory},
80
- {label: 'CPU', value: cpu},
81
- {label: 'Tablet storage', value: storage},
82
- {label: 'Storage groups', value: storageGroups},
83
- {label: 'Blob storage', value: blobStorage},
84
- {label: 'Storage efficiency', value: storageEfficiency},
85
- ];
86
-
87
- const tabletsInfo = StateStats.filter(
88
- (item): item is {VolatileState: ETabletVolatileState; Count: number} => {
89
- return item.VolatileState !== undefined && item.Count !== undefined;
90
- },
91
- ).map((info) => {
92
- return {label: TABLET_STATES[info.VolatileState], value: info.Count};
93
- });
94
-
95
- const renderName = () => {
96
- return (
97
- <div className={b('tenant-name-wrapper')}>
98
- <EntityStatus
99
- status={State}
100
- name={Name || TENANT_DEFAULT_TITLE}
101
- withLeftTrim
102
- hasClipboardButton={Boolean(tenant)}
103
- clipboardButtonAlwaysVisible
104
- />
105
- </div>
106
- );
107
- };
108
-
109
- if (loading && !wasLoaded) {
110
- return (
111
- <div className={b('loader')}>
112
- <Loader size="m" />
113
- </div>
114
- );
115
- }
116
-
117
- return (
118
- <div className={b()}>
119
- <div className={b('top-label')}>{tenantType}</div>
120
- <div className={b('top')}>
121
- {renderName()}
122
- {additionalTenantProps?.getMonitoringLink?.(Name, Type)}
123
- </div>
124
- <div className={b('system-tablets')}>
125
- {SystemTablets &&
126
- SystemTablets.map((tablet, tabletIndex) => (
127
- <Tablet key={tabletIndex} tablet={tablet} tenantName={Name} />
128
- ))}
129
- </div>
130
- <div className={b('common-info')}>
131
- <div>
132
- <div className={b('section-title')}>{i18n('title.pools')}</div>
133
- {PoolStats ? (
134
- <div className={b('section', {pools: true})}>
135
- {PoolStats.map((pool, poolIndex) => (
136
- <PoolUsage key={poolIndex} data={pool} />
137
- ))}
138
- </div>
139
- ) : (
140
- <div className="error">{i18n('no-pools-data')}</div>
141
- )}
142
- </div>
143
- <InfoViewer
144
- title={i18n('title.metrics')}
145
- className={b('section', {metrics: true})}
146
- info={metricsInfo}
147
- />
148
-
149
- <div className={b('section')}>
150
- <InfoViewer info={tabletsInfo} title="Tablets" />
151
- </div>
152
- </div>
153
- </div>
154
- );
155
- }
@@ -1,3 +0,0 @@
1
- {
2
- "useQueryModes.queryModeCannotBeSet": "Query mode '{{mode}}' cannot be set. You need to turn in additional query modes in settings to enable it"
3
- }
@@ -1,11 +0,0 @@
1
- import {i18n, Lang} from '../../../utils/i18n';
2
-
3
- import en from './en.json';
4
- import ru from './ru.json';
5
-
6
- const COMPONENT = 'ydb-hooks';
7
-
8
- i18n.registerKeyset(Lang.En, COMPONENT, en);
9
- i18n.registerKeyset(Lang.Ru, COMPONENT, ru);
10
-
11
- export default i18n.keyset(COMPONENT);
@@ -1,3 +0,0 @@
1
- {
2
- "useQueryModes.queryModeCannotBeSet": "Режим выполнения запроса '{{mode}}' недоступен. Вам необходимо включить дополнительные режимы выполнения запросов в настройках"
3
- }