ydb-embedded-ui 4.17.0 → 4.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/components/FullNodeViewer/FullNodeViewer.scss +1 -1
  3. package/dist/components/FullNodeViewer/FullNodeViewer.tsx +15 -6
  4. package/dist/components/InfoViewer/formatters/common.ts +1 -1
  5. package/dist/components/InfoViewer/formatters/pqGroup.ts +1 -1
  6. package/dist/components/InfoViewer/formatters/table.ts +6 -1
  7. package/dist/components/ProgressViewer/ProgressViewer.tsx +105 -0
  8. package/dist/components/TooltipsContent/TabletTooltipContent/TabletTooltipContent.tsx +1 -1
  9. package/dist/containers/AsideNavigation/AsideNavigation.tsx +3 -1
  10. package/dist/containers/Authentication/Authentication.tsx +14 -4
  11. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.tsx +2 -2
  12. package/dist/containers/Heatmap/Heatmap.tsx +1 -1
  13. package/dist/containers/Heatmap/Histogram/Histogram.js +1 -1
  14. package/dist/containers/Node/NodeStructure/Pdisk.tsx +2 -2
  15. package/dist/containers/Node/NodeStructure/Vdisk.tsx +5 -2
  16. package/dist/containers/Nodes/getNodesColumns.tsx +3 -2
  17. package/dist/containers/Storage/PDisk/PDisk.tsx +1 -1
  18. package/dist/containers/Storage/PDiskPopup/PDiskPopup.tsx +2 -2
  19. package/dist/containers/Storage/StorageGroups/StorageGroups.tsx +3 -232
  20. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.tsx +278 -0
  21. package/dist/containers/Storage/VDisk/VDisk.tsx +1 -1
  22. package/dist/containers/Storage/VDiskPopup/VDiskPopup.tsx +1 -1
  23. package/dist/containers/Tablet/TabletInfo/TabletInfo.tsx +1 -1
  24. package/dist/containers/Tablet/TabletTable/TabletTable.tsx +1 -1
  25. package/dist/containers/Tenant/Diagnostics/Consumers/TopicStats/ConsumersTopicStats.tsx +1 -1
  26. package/dist/containers/Tenant/Diagnostics/Consumers/columns/columns.tsx +1 -1
  27. package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.tsx +3 -3
  28. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo.ts +1 -1
  29. package/dist/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.tsx +1 -1
  30. package/dist/containers/Tenant/Diagnostics/Partitions/columns/columns.tsx +1 -1
  31. package/dist/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.tsx +2 -3
  32. package/dist/containers/Tenant/Diagnostics/TenantOverview/OldTenantOverview.tsx +1 -1
  33. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.tsx +22 -6
  34. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TenantStorage.scss +41 -0
  35. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TenantStorage.tsx +68 -0
  36. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.tsx +76 -0
  37. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.tsx +105 -0
  38. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/en.json +2 -0
  39. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/ru.json +2 -0
  40. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.tsx +1 -1
  41. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.tsx +1 -1
  42. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.tsx +1 -1
  43. package/dist/containers/Tenants/Tenants.tsx +5 -1
  44. package/dist/containers/UserSettings/i18n/en.json +1 -1
  45. package/dist/containers/UserSettings/i18n/ru.json +1 -1
  46. package/dist/containers/UserSettings/settings.ts +2 -2
  47. package/dist/containers/Versions/NodesTable/NodesTable.tsx +3 -2
  48. package/dist/services/api.ts +1 -1
  49. package/dist/store/reducers/clusterNodes/clusterNodes.tsx +1 -1
  50. package/dist/store/reducers/index.ts +4 -0
  51. package/dist/store/reducers/node/selectors.ts +1 -1
  52. package/dist/store/reducers/nodes/selectors.ts +1 -1
  53. package/dist/store/reducers/nodes/types.ts +1 -1
  54. package/dist/store/reducers/nodes/utils.ts +1 -1
  55. package/dist/store/reducers/settings/settings.ts +4 -4
  56. package/dist/store/reducers/storage/types.ts +1 -1
  57. package/dist/store/reducers/storage/utils.ts +21 -12
  58. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.ts +93 -0
  59. package/dist/store/reducers/tenantOverview/executeTopTables/types.ts +14 -0
  60. package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.ts +98 -0
  61. package/dist/store/reducers/tenantOverview/topStorageGroups/types.ts +29 -0
  62. package/dist/store/reducers/tenantOverview/topStorageGroups/utils.ts +20 -0
  63. package/dist/store/reducers/tenants/utils.ts +30 -20
  64. package/dist/styles/constants.scss +4 -0
  65. package/dist/types/additionalProps.ts +1 -1
  66. package/dist/types/api/storage.ts +1 -1
  67. package/dist/types/api/tenant.ts +21 -8
  68. package/dist/types/api/vdisk.ts +1 -1
  69. package/dist/utils/bytesParsers/__test__/formatBytes.test.ts +10 -1
  70. package/dist/utils/bytesParsers/formatBytes.ts +3 -3
  71. package/dist/utils/constants.ts +10 -1
  72. package/dist/utils/dataFormatters/__test__/roundToSignificant.test.ts +22 -0
  73. package/dist/utils/dataFormatters/dataFormatters.ts +150 -0
  74. package/dist/utils/dataFormatters/i18n/en.json +3 -0
  75. package/dist/utils/dataFormatters/i18n/ru.json +3 -0
  76. package/dist/utils/index.js +0 -102
  77. package/package.json +1 -1
  78. package/dist/components/ProgressViewer/ProgressViewer.js +0 -92
  79. package/dist/utils/formatCPU/formatCPU.ts +0 -20
  80. package/dist/utils/formatCPU/i18n/en.json +0 -3
  81. package/dist/utils/formatCPU/i18n/ru.json +0 -3
  82. /package/dist/utils/{formatCPU → dataFormatters}/i18n/index.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.19.0](https://github.com/ydb-platform/ydb-embedded-ui/compare/v4.18.0...v4.19.0) (2023-10-11)
4
+
5
+
6
+ ### Features
7
+
8
+ * **TenantOverview:** add storage tab to tenant diagnostics ([#541](https://github.com/ydb-platform/ydb-embedded-ui/issues/541)) ([c4cdd35](https://github.com/ydb-platform/ydb-embedded-ui/commit/c4cdd354cd9780dfd7dfee80ec225f59d4230625))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add NodeId to NodeAddress type ([#545](https://github.com/ydb-platform/ydb-embedded-ui/issues/545)) ([3df82d3](https://github.com/ydb-platform/ydb-embedded-ui/commit/3df82d39466696ec61e34b915b355dacd0482ebc))
14
+ * display database name in node info ([#543](https://github.com/ydb-platform/ydb-embedded-ui/issues/543)) ([788ad9a](https://github.com/ydb-platform/ydb-embedded-ui/commit/788ad9a7a1a56ffe93ec7e4861ded6cceef72d9c))
15
+ * fix cpu usage calculation ([#542](https://github.com/ydb-platform/ydb-embedded-ui/issues/542)) ([f46b03d](https://github.com/ydb-platform/ydb-embedded-ui/commit/f46b03d6157f19017560d71a9ab6591f045bad96))
16
+ * fix incorrect data display in ProgressViewer ([#546](https://github.com/ydb-platform/ydb-embedded-ui/issues/546)) ([be077b8](https://github.com/ydb-platform/ydb-embedded-ui/commit/be077b83a4b4cf083d506e77abf0f2b6570c87d3))
17
+
18
+ ## [4.18.0](https://github.com/ydb-platform/ydb-embedded-ui/compare/v4.17.0...v4.18.0) (2023-09-25)
19
+
20
+
21
+ ### Features
22
+
23
+ * **ProgressViewer:** add custom threasholds to ProgressViewer ([#540](https://github.com/ydb-platform/ydb-embedded-ui/issues/540)) ([3553065](https://github.com/ydb-platform/ydb-embedded-ui/commit/35530655581357f4a79c277a5bf9846b3befb784))
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * **Authentication:** enable page redirect ([#539](https://github.com/ydb-platform/ydb-embedded-ui/issues/539)) ([721883c](https://github.com/ydb-platform/ydb-embedded-ui/commit/721883cc7f4ca60e64d4a5f77b939dbb8e960855))
29
+ * **Healthcheck:** add merge_records request param ([#538](https://github.com/ydb-platform/ydb-embedded-ui/issues/538)) ([6a47481](https://github.com/ydb-platform/ydb-embedded-ui/commit/6a474814f71c3318715a8ce638fd522a770d8038))
30
+ * **Nodes:** use nodes endpoint by default ([#535](https://github.com/ydb-platform/ydb-embedded-ui/issues/535)) ([12d4fef](https://github.com/ydb-platform/ydb-embedded-ui/commit/12d4fefde7a6663bb1a11f46b4e94fb24b23e966))
31
+ * rename flag for display metrics cards for database diagnostics ([#536](https://github.com/ydb-platform/ydb-embedded-ui/issues/536)) ([957e1fa](https://github.com/ydb-platform/ydb-embedded-ui/commit/957e1fafbbc43928498ae9e8d0bc119bcda5288d))
32
+
3
33
  ## [4.17.0](https://github.com/ydb-platform/ydb-embedded-ui/compare/v4.16.2...v4.17.0) (2023-09-18)
4
34
 
5
35
 
@@ -23,7 +23,7 @@
23
23
  }
24
24
 
25
25
  .info-viewer__label {
26
- min-width: 60px;
26
+ min-width: 100px;
27
27
  }
28
28
 
29
29
  &__section-title {
@@ -3,10 +3,10 @@ import cn from 'bem-cn-lite';
3
3
  import type {TSystemStateInfo} from '../../types/api/nodes';
4
4
 
5
5
  import {LOAD_AVERAGE_TIME_INTERVALS} from '../../utils/constants';
6
- import {calcUptime} from '../../utils';
6
+ import {calcUptime} from '../../utils/dataFormatters/dataFormatters';
7
7
 
8
- import InfoViewer from '../InfoViewer/InfoViewer';
9
- import ProgressViewer from '../ProgressViewer/ProgressViewer';
8
+ import InfoViewer, {type InfoViewerItem} from '../InfoViewer/InfoViewer';
9
+ import {ProgressViewer} from '../ProgressViewer/ProgressViewer';
10
10
  import {PoolUsage} from '../PoolUsage/PoolUsage';
11
11
 
12
12
  import './FullNodeViewer.scss';
@@ -24,16 +24,25 @@ export const FullNodeViewer = ({node, className}: FullNodeViewerProps) => {
24
24
  value: Address,
25
25
  }));
26
26
 
27
- const commonInfo = [
27
+ const commonInfo: InfoViewerItem[] = [];
28
+
29
+ // Do not add DB field for static nodes (they have no Tenants)
30
+ if (node?.Tenants?.length) {
31
+ commonInfo.push({label: 'Database', value: node.Tenants[0]});
32
+ }
33
+
34
+ commonInfo.push(
28
35
  {label: 'Version', value: node?.Version},
29
36
  {label: 'Uptime', value: calcUptime(node?.StartTime)},
30
37
  {label: 'DC', value: node?.DataCenterDescription},
31
38
  {label: 'Rack', value: node?.Rack},
32
- ];
39
+ );
33
40
 
34
41
  const averageInfo = node?.LoadAverage?.map((load, loadIndex) => ({
35
42
  label: LOAD_AVERAGE_TIME_INTERVALS[loadIndex],
36
- value: <ProgressViewer value={load} percents={true} colorizeProgress={true} />,
43
+ value: (
44
+ <ProgressViewer value={load} percents={true} colorizeProgress={true} capacity={100} />
45
+ ),
37
46
  }));
38
47
 
39
48
  return (
@@ -1,5 +1,5 @@
1
1
  import type {TDirEntry} from '../../../types/api/schema';
2
- import {formatDateTime} from '../../../utils';
2
+ import {formatDateTime} from '../../../utils/dataFormatters/dataFormatters';
3
3
 
4
4
  import {createInfoFormatter} from '../utils';
5
5
 
@@ -4,7 +4,7 @@ import {
4
4
  TPQPartitionConfig,
5
5
  TPQTabletConfig,
6
6
  } from '../../../types/api/schema';
7
- import {formatBps, formatBytes, formatNumber} from '../../../utils';
7
+ import {formatBps, formatBytes, formatNumber} from '../../../utils/dataFormatters/dataFormatters';
8
8
  import {HOUR_IN_SECONDS} from '../../../utils/constants';
9
9
 
10
10
  import {createInfoFormatter} from '../utils';
@@ -1,6 +1,11 @@
1
1
  import type {TFollowerGroup, TPartitionConfig, TTableStats} from '../../../types/api/schema';
2
2
  import type {TMetrics} from '../../../types/api/tenant';
3
- import {formatCPU, formatNumber, formatBps, formatDateTime} from '../../../utils';
3
+ import {
4
+ formatBps,
5
+ formatCPU,
6
+ formatDateTime,
7
+ formatNumber,
8
+ } from '../../../utils/dataFormatters/dataFormatters';
4
9
  import {toFormattedSize} from '../../FormattedBytes/utils';
5
10
 
6
11
  import {createInfoFormatter} from '../utils';
@@ -0,0 +1,105 @@
1
+ import cn from 'bem-cn-lite';
2
+
3
+ import type {ValueOf} from '../../types/common';
4
+
5
+ import './ProgressViewer.scss';
6
+
7
+ const b = cn('progress-viewer');
8
+
9
+ export const PROGRESS_VIEWER_SIZE_IDS = {
10
+ xs: 'xs',
11
+ s: 's',
12
+ ns: 'ns',
13
+ m: 'm',
14
+ n: 'n',
15
+ l: 'l',
16
+ head: 'head',
17
+ } as const;
18
+
19
+ type ProgressViewerSize = ValueOf<typeof PROGRESS_VIEWER_SIZE_IDS>;
20
+
21
+ /*
22
+
23
+ Props description:
24
+ 1) value - the amount of progress
25
+ 2) capacity - maximum possible progress value
26
+ 3) formatValues - function for formatting the value and capacity
27
+ 4) percents - display progress in percents
28
+ 5) colorizeProgress - change the color of the progress bar depending on its value
29
+ 6) inverseColorize - invert the colors of the progress bar
30
+ 7) warningThreshold - the percentage of fullness at which the color of the progress bar changes to yellow
31
+ 8) dangerThreshold - the percentage of fullness at which the color of the progress bar changes to red
32
+ */
33
+
34
+ interface ProgressViewerProps {
35
+ value?: number | string;
36
+ capacity?: number | string;
37
+ formatValues?: (value?: number, capacity?: number) => (string | undefined)[];
38
+ percents?: boolean;
39
+ className?: string;
40
+ size?: ProgressViewerSize;
41
+ colorizeProgress?: boolean;
42
+ inverseColorize?: boolean;
43
+ warningThreshold?: number;
44
+ dangerThreshold?: number;
45
+ }
46
+
47
+ export function ProgressViewer({
48
+ value,
49
+ capacity,
50
+ formatValues,
51
+ percents,
52
+ className,
53
+ size = PROGRESS_VIEWER_SIZE_IDS.xs,
54
+ colorizeProgress,
55
+ inverseColorize,
56
+ warningThreshold = 60,
57
+ dangerThreshold = 80,
58
+ }: ProgressViewerProps) {
59
+ let fillWidth = Math.round((parseFloat(String(value)) / parseFloat(String(capacity))) * 100);
60
+ fillWidth = fillWidth > 100 ? 100 : fillWidth;
61
+ let valueText: number | string | undefined = Math.round(Number(value)),
62
+ capacityText: number | string | undefined = capacity,
63
+ divider = '/';
64
+ if (formatValues) {
65
+ [valueText, capacityText] = formatValues(Number(value), Number(capacity));
66
+ } else if (percents) {
67
+ valueText = fillWidth + '%';
68
+ capacityText = '';
69
+ divider = '';
70
+ }
71
+
72
+ let bg = inverseColorize ? 'scarlet' : 'apple';
73
+ if (colorizeProgress) {
74
+ if (fillWidth > warningThreshold && fillWidth <= dangerThreshold) {
75
+ bg = 'saffron';
76
+ } else if (fillWidth > dangerThreshold) {
77
+ bg = inverseColorize ? 'apple' : 'scarlet';
78
+ }
79
+ }
80
+
81
+ const lineStyle = {
82
+ width: fillWidth + '%',
83
+ };
84
+
85
+ const text = fillWidth > 60 ? 'contrast0' : 'contrast70';
86
+
87
+ const renderContent = () => {
88
+ if (capacityText) {
89
+ return `${valueText} ${divider} ${capacityText}`;
90
+ }
91
+
92
+ return valueText;
93
+ };
94
+
95
+ if (!isNaN(Number(value))) {
96
+ return (
97
+ <div className={b({size}, className)}>
98
+ <div className={b('line', {bg})} style={lineStyle}></div>
99
+ <span className={b('text', {text})}>{renderContent()}</span>
100
+ </div>
101
+ );
102
+ }
103
+
104
+ return <div className={`${b({size})} ${className} error`}>no data</div>;
105
+ }
@@ -1,6 +1,6 @@
1
1
  import type {TTabletStateInfo} from '../../../types/api/tablet';
2
2
 
3
- import {calcUptime} from '../../../utils';
3
+ import {calcUptime} from '../../../utils/dataFormatters/dataFormatters';
4
4
  import {InfoViewer, createInfoFormatter, formatObject} from '../../InfoViewer';
5
5
 
6
6
  const formatTablet = createInfoFormatter<TTabletStateInfo>({
@@ -50,7 +50,9 @@ function YbdInternalUser({ydbUser, logout}: YbdInternalUserProps) {
50
50
  const history = useHistory();
51
51
 
52
52
  const handleLoginClick = () => {
53
- history.push(createHref(routes.auth, undefined, {returnUrl: encodeURI(location.href)}));
53
+ history.push(
54
+ createHref(routes.auth, undefined, {returnUrl: encodeURIComponent(location.href)}),
55
+ );
54
56
  };
55
57
 
56
58
  return (
@@ -1,12 +1,13 @@
1
1
  import {KeyboardEvent, useEffect, useState} from 'react';
2
2
  import {useDispatch} from 'react-redux';
3
- import {useHistory} from 'react-router';
3
+ import {useHistory, useLocation} from 'react-router';
4
4
  import cn from 'bem-cn-lite';
5
5
 
6
6
  import {Button, TextInput, Icon, Link as ExternalLink} from '@gravity-ui/uikit';
7
7
 
8
8
  import {authenticate} from '../../store/reducers/authentication/authentication';
9
9
  import {useTypedSelector} from '../../utils/hooks';
10
+ import {parseQuery} from '../../routes';
10
11
 
11
12
  import ydbLogoIcon from '../../assets/icons/ydb.svg';
12
13
  import showIcon from '../../assets/icons/show.svg';
@@ -18,13 +19,15 @@ import './Authentication.scss';
18
19
  const b = cn('authentication');
19
20
 
20
21
  interface AuthenticationProps {
21
- returnUrl?: string;
22
22
  closable?: boolean;
23
23
  }
24
24
 
25
- function Authentication({returnUrl, closable = false}: AuthenticationProps) {
25
+ function Authentication({closable = false}: AuthenticationProps) {
26
26
  const dispatch = useDispatch();
27
27
  const history = useHistory();
28
+ const location = useLocation();
29
+
30
+ const {returnUrl} = parseQuery(location);
28
31
 
29
32
  const {error} = useTypedSelector((state) => state.authentication);
30
33
 
@@ -58,7 +61,14 @@ function Authentication({returnUrl, closable = false}: AuthenticationProps) {
58
61
  // typed dispatch required, remove error expectation after adding it
59
62
  dispatch(authenticate(login, pass)).then(() => {
60
63
  if (returnUrl) {
61
- history.replace(decodeURI(returnUrl));
64
+ const decodedUrl = decodeURIComponent(returnUrl.toString());
65
+
66
+ // to prevent page reload we use router history
67
+ // history navigates relative to origin
68
+ // so we remove origin to make it work properly
69
+ const url = new URL(decodedUrl);
70
+ const path = url.pathname + url.search;
71
+ history.replace(path);
62
72
  }
63
73
  });
64
74
  };
@@ -3,7 +3,7 @@ import block from 'bem-cn-lite';
3
3
  import {Skeleton} from '@gravity-ui/uikit';
4
4
 
5
5
  import EntityStatus from '../../../components/EntityStatus/EntityStatus';
6
- import ProgressViewer from '../../../components/ProgressViewer/ProgressViewer';
6
+ import {ProgressViewer} from '../../../components/ProgressViewer/ProgressViewer';
7
7
  import InfoViewer, {InfoViewerItem} from '../../../components/InfoViewer/InfoViewer';
8
8
  import {Tags} from '../../../components/Tags';
9
9
  import {Tablet} from '../../../components/Tablet';
@@ -16,7 +16,7 @@ import type {AdditionalClusterProps, ClusterLink} from '../../../types/additiona
16
16
  import type {VersionValue} from '../../../types/versions';
17
17
  import type {TClusterInfo} from '../../../types/api/cluster';
18
18
  import {backend, customBackend} from '../../../store';
19
- import {formatStorageValues} from '../../../utils';
19
+ import {formatStorageValues} from '../../../utils/dataFormatters/dataFormatters';
20
20
  import {useSetting, useTypedSelector} from '../../../utils/hooks';
21
21
  import {
22
22
  CLUSTER_DEFAULT_TITLE,
@@ -7,7 +7,7 @@ import {Checkbox, Select} from '@gravity-ui/uikit';
7
7
  import type {IHeatmapMetricValue} from '../../types/store/heatmap';
8
8
  import {getTabletsInfo, setHeatmapOptions} from '../../store/reducers/heatmap';
9
9
  import {showTooltip, hideTooltip} from '../../store/reducers/tooltip';
10
- import {formatNumber} from '../../utils';
10
+ import {formatNumber} from '../../utils/dataFormatters/dataFormatters';
11
11
  import {useAutofetcher, useTypedSelector} from '../../utils/hooks';
12
12
 
13
13
  import {Loader} from '../../components/Loader';
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import cn from 'bem-cn-lite';
4
4
 
5
5
  import {getColorRange, getCurrentMetricLimits} from '../util';
6
- import {formatNumber} from '../../../utils';
6
+ import {formatNumber} from '../../../utils/dataFormatters/dataFormatters';
7
7
 
8
8
  import './Histogram.scss';
9
9
 
@@ -8,12 +8,12 @@ import DataTable, {Column, Settings} from '@gravity-ui/react-data-table';
8
8
 
9
9
  import EntityStatus from '../../../components/EntityStatus/EntityStatus';
10
10
  import InfoViewer from '../../../components/InfoViewer/InfoViewer';
11
- import ProgressViewer from '../../../components/ProgressViewer/ProgressViewer';
11
+ import {ProgressViewer} from '../../../components/ProgressViewer/ProgressViewer';
12
12
  import {Icon} from '../../../components/Icon';
13
13
  import {Vdisk} from './Vdisk';
14
14
 
15
15
  import {bytesToGB, pad9} from '../../../utils/utils';
16
- import {formatStorageValuesToGb} from '../../../utils';
16
+ import {formatStorageValuesToGb} from '../../../utils/dataFormatters/dataFormatters';
17
17
  import {getPDiskType} from '../../../utils/pdisk';
18
18
 
19
19
  import {DEFAULT_TABLE_SETTINGS} from '../../../utils/constants';
@@ -1,8 +1,11 @@
1
1
  import React from 'react';
2
2
  import cn from 'bem-cn-lite';
3
3
 
4
- import ProgressViewer from '../../../components/ProgressViewer/ProgressViewer';
5
- import {formatStorageValuesToGb, stringifyVdiskId} from '../../../utils';
4
+ import {ProgressViewer} from '../../../components/ProgressViewer/ProgressViewer';
5
+ import {
6
+ formatStorageValuesToGb,
7
+ stringifyVdiskId,
8
+ } from '../../../utils/dataFormatters/dataFormatters';
6
9
  import {bytesToGB, bytesToSpeed} from '../../../utils/utils';
7
10
  import EntityStatus from '../../../components/EntityStatus/EntityStatus';
8
11
  import {valueIsDefined} from './NodeStructure';
@@ -2,12 +2,12 @@ import DataTable, {Column} from '@gravity-ui/react-data-table';
2
2
  import {Popover} from '@gravity-ui/uikit';
3
3
 
4
4
  import {PoolsGraph} from '../../components/PoolsGraph/PoolsGraph';
5
- import ProgressViewer from '../../components/ProgressViewer/ProgressViewer';
5
+ import {ProgressViewer} from '../../components/ProgressViewer/ProgressViewer';
6
6
  import {TabletsStatistic} from '../../components/TabletsStatistic';
7
7
  import {NodeHostWrapper} from '../../components/NodeHostWrapper/NodeHostWrapper';
8
8
 
9
9
  import {isSortableNodesProperty} from '../../utils/nodes';
10
- import {formatBytesToGigabyte} from '../../utils/index';
10
+ import {formatBytesToGigabyte} from '../../utils/dataFormatters/dataFormatters';
11
11
 
12
12
  import type {NodesPreparedEntity} from '../../store/reducers/nodes/types';
13
13
 
@@ -120,6 +120,7 @@ export function getNodesColumns({
120
120
  row.LoadAverage && row.LoadAverage.length > 0 ? (
121
121
  <ProgressViewer
122
122
  value={row.LoadAverage[0]}
123
+ capacity={100}
123
124
  percents={true}
124
125
  colorizeProgress={true}
125
126
  />
@@ -7,7 +7,7 @@ import {Stack} from '../../../components/Stack/Stack';
7
7
  import routes, {createHref} from '../../../routes';
8
8
  import {selectVDisksForPDisk} from '../../../store/reducers/storage/selectors';
9
9
  import {TPDiskStateInfo, TPDiskState} from '../../../types/api/pdisk';
10
- import {stringifyVdiskId} from '../../../utils';
10
+ import {stringifyVdiskId} from '../../../utils/dataFormatters/dataFormatters';
11
11
  import {useTypedSelector} from '../../../utils/hooks';
12
12
  import {getPDiskType} from '../../../utils/pdisk';
13
13
  import {isFullVDiskData} from '../../../utils/storage';
@@ -9,7 +9,7 @@ import {InfoViewer, InfoViewerItem} from '../../../components/InfoViewer';
9
9
 
10
10
  import {EFlag} from '../../../types/api/enums';
11
11
  import {TPDiskStateInfo} from '../../../types/api/pdisk';
12
- import {getPDiskId} from '../../../utils';
12
+ import {getPDiskId} from '../../../utils/dataFormatters/dataFormatters';
13
13
  import {getPDiskType} from '../../../utils/pdisk';
14
14
  import {bytesToGB} from '../../../utils/utils';
15
15
 
@@ -23,7 +23,7 @@ export const preparePDiskData = (data: TPDiskStateInfo, nodes?: NodesMap) => {
23
23
  const {AvailableSize, TotalSize, State, PDiskId, NodeId, Path, Realtime, Device} = data;
24
24
 
25
25
  const pdiskData: InfoViewerItem[] = [
26
- {label: 'PDisk', value: getPDiskId({NodeId, PDiskId})},
26
+ {label: 'PDisk', value: getPDiskId({NodeId, PDiskId}) || '-'},
27
27
  {label: 'State', value: State || 'not available'},
28
28
  {label: 'Type', value: getPDiskType(data) || 'unknown'},
29
29
  ];