ydb-embedded-ui 6.31.0 → 6.32.0-hotfix.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. package/dist/components/AutoRefreshControl/AutoRefreshControl.js +1 -1
  2. package/dist/components/AutoRefreshControl/AutoRefreshControl.js.map +1 -1
  3. package/dist/components/BasicNodeViewer/BasicNodeViewer.js +9 -5
  4. package/dist/components/BasicNodeViewer/BasicNodeViewer.js.map +1 -1
  5. package/dist/components/NodeHostWrapper/NodeHostWrapper.js +9 -5
  6. package/dist/components/NodeHostWrapper/NodeHostWrapper.js.map +1 -1
  7. package/dist/components/PDiskPopup/PDiskPopup.js +9 -9
  8. package/dist/components/PDiskPopup/PDiskPopup.js.map +1 -1
  9. package/dist/components/PaginatedTable/types.d.ts +1 -1
  10. package/dist/components/Search/Search.d.ts +3 -1
  11. package/dist/components/Search/Search.js +2 -2
  12. package/dist/components/Search/Search.js.map +1 -1
  13. package/dist/components/TabletNameWrapper/TabletNameWrapper.js +1 -1
  14. package/dist/components/TabletNameWrapper/TabletNameWrapper.js.map +1 -1
  15. package/dist/components/TenantNameWrapper/TenantNameWrapper.js +1 -1
  16. package/dist/components/TenantNameWrapper/TenantNameWrapper.js.map +1 -1
  17. package/dist/components/TooltipsContent/NodeEndpointsTooltipContent/NodeEndpointsTooltipContent.js +10 -10
  18. package/dist/components/TooltipsContent/NodeEndpointsTooltipContent/NodeEndpointsTooltipContent.js.map +1 -1
  19. package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
  20. package/dist/components/VDiskPopup/VDiskPopup.js +1 -9
  21. package/dist/components/VDiskPopup/VDiskPopup.js.map +1 -1
  22. package/dist/components/nodesColumns/constants.d.ts +4 -0
  23. package/dist/components/nodesColumns/constants.js +10 -0
  24. package/dist/components/nodesColumns/constants.js.map +1 -1
  25. package/dist/components/nodesColumns/i18n/en.json +2 -0
  26. package/dist/components/nodesColumns/i18n/index.d.ts +1 -1
  27. package/dist/containers/Clusters/i18n/index.d.ts +1 -1
  28. package/dist/containers/Header/Header.js +2 -9
  29. package/dist/containers/Header/Header.js.map +1 -1
  30. package/dist/containers/Nodes/Nodes.js +11 -33
  31. package/dist/containers/Nodes/Nodes.js.map +1 -1
  32. package/dist/containers/Nodes/Nodes.scss +4 -0
  33. package/dist/containers/Nodes/NodesControls/NodesControls.d.ts +11 -0
  34. package/dist/containers/Nodes/NodesControls/NodesControls.js +24 -0
  35. package/dist/containers/Nodes/NodesControls/NodesControls.js.map +1 -0
  36. package/dist/containers/Nodes/PaginatedNodes.d.ts +2 -2
  37. package/dist/containers/Nodes/PaginatedNodes.js +78 -54
  38. package/dist/containers/Nodes/PaginatedNodes.js.map +1 -1
  39. package/dist/containers/Nodes/PaginatedNodesTable.d.ts +22 -0
  40. package/dist/containers/Nodes/PaginatedNodesTable.js +30 -0
  41. package/dist/containers/Nodes/PaginatedNodesTable.js.map +1 -0
  42. package/dist/containers/Nodes/columns/constants.d.ts +4 -0
  43. package/dist/containers/Nodes/columns/constants.js +28 -0
  44. package/dist/containers/Nodes/columns/constants.js.map +1 -1
  45. package/dist/containers/Nodes/getNodes.js +4 -5
  46. package/dist/containers/Nodes/getNodes.js.map +1 -1
  47. package/dist/containers/Nodes/i18n/en.json +5 -1
  48. package/dist/containers/Nodes/i18n/index.d.ts +1 -1
  49. package/dist/containers/Nodes/i18n/index.js +1 -2
  50. package/dist/containers/Nodes/i18n/index.js.map +1 -1
  51. package/dist/containers/Nodes/shared.d.ts +5 -0
  52. package/dist/containers/Nodes/shared.js +16 -0
  53. package/dist/containers/Nodes/shared.js.map +1 -0
  54. package/dist/containers/Nodes/useNodesPageQueryParams.d.ts +9 -0
  55. package/dist/containers/Nodes/useNodesPageQueryParams.js +34 -0
  56. package/dist/containers/Nodes/useNodesPageQueryParams.js.map +1 -0
  57. package/dist/containers/Storage/Disks/Disks.js +1 -2
  58. package/dist/containers/Storage/Disks/Disks.js.map +1 -1
  59. package/dist/containers/Storage/PaginatedStorageNodes.js +1 -2
  60. package/dist/containers/Storage/PaginatedStorageNodes.js.map +1 -1
  61. package/dist/containers/Storage/i18n/index.d.ts +1 -1
  62. package/dist/containers/Storage/utils/index.d.ts +1 -1
  63. package/dist/containers/Tenant/ObjectSummary/SchemaTree/RefreshTreeButton.js +2 -2
  64. package/dist/containers/Tenant/Query/NewSQL/i18n/en.json +1 -1
  65. package/dist/containers/Tenant/i18n/en.json +1 -0
  66. package/dist/containers/Tenant/i18n/index.d.ts +1 -1
  67. package/dist/containers/Tenant/utils/schemaActions.js +5 -1
  68. package/dist/containers/Tenant/utils/schemaActions.js.map +1 -1
  69. package/dist/containers/Tenant/utils/schemaQueryTemplates.js +5 -1
  70. package/dist/containers/Tenant/utils/schemaQueryTemplates.js.map +1 -1
  71. package/dist/store/reducers/capabilities/hooks.d.ts +1 -0
  72. package/dist/store/reducers/capabilities/hooks.js +3 -0
  73. package/dist/store/reducers/capabilities/hooks.js.map +1 -1
  74. package/dist/store/reducers/node/selectors.js +5 -5
  75. package/dist/store/reducers/node/selectors.js.map +1 -1
  76. package/dist/store/reducers/node/types.d.ts +3 -4
  77. package/dist/store/reducers/nodes/types.d.ts +3 -1
  78. package/dist/store/reducers/nodes/utils.d.ts +1 -1
  79. package/dist/store/reducers/nodes/utils.js +9 -4
  80. package/dist/store/reducers/nodes/utils.js.map +1 -1
  81. package/dist/store/reducers/pdisk/utils.js +6 -3
  82. package/dist/store/reducers/pdisk/utils.js.map +1 -1
  83. package/dist/store/reducers/settings/hooks.d.ts +5 -0
  84. package/dist/store/reducers/settings/hooks.js +14 -0
  85. package/dist/store/reducers/settings/hooks.js.map +1 -0
  86. package/dist/store/reducers/storage/__test__/prepareGroupsDisks.test.d.ts +1 -0
  87. package/dist/store/reducers/storage/__test__/prepareGroupsDisks.test.js +354 -0
  88. package/dist/store/reducers/storage/__test__/prepareGroupsDisks.test.js.map +1 -0
  89. package/dist/store/reducers/storage/prepareGroupsDisks.d.ts +37 -0
  90. package/dist/store/reducers/storage/prepareGroupsDisks.js +72 -0
  91. package/dist/store/reducers/storage/prepareGroupsDisks.js.map +1 -0
  92. package/dist/store/reducers/storage/utils.js +7 -28
  93. package/dist/store/reducers/storage/utils.js.map +1 -1
  94. package/dist/store/reducers/tenantOverview/topShards/utils.d.ts +1 -1
  95. package/dist/store/reducers/vdisk/utils.js +3 -3
  96. package/dist/store/reducers/vdisk/utils.js.map +1 -1
  97. package/dist/types/api/nodes.d.ts +1 -1
  98. package/dist/types/api/pdisk.d.ts +1 -1
  99. package/dist/types/api/storage.d.ts +2 -2
  100. package/dist/utils/developerUI/__test__/developerUI.test.js +21 -1
  101. package/dist/utils/developerUI/__test__/developerUI.test.js.map +1 -1
  102. package/dist/utils/developerUI/developerUI.d.ts +1 -0
  103. package/dist/utils/developerUI/developerUI.js +3 -0
  104. package/dist/utils/developerUI/developerUI.js.map +1 -1
  105. package/dist/utils/disks/__test__/calculatePDiskSeverity.test.js +10 -7
  106. package/dist/utils/disks/__test__/calculatePDiskSeverity.test.js.map +1 -1
  107. package/dist/utils/disks/__test__/calculateVDiskSeverity.test.js +8 -23
  108. package/dist/utils/disks/__test__/calculateVDiskSeverity.test.js.map +1 -1
  109. package/dist/utils/disks/__test__/prepareDisks.test.d.ts +1 -0
  110. package/dist/utils/disks/__test__/prepareDisks.test.js +200 -0
  111. package/dist/utils/disks/__test__/prepareDisks.test.js.map +1 -0
  112. package/dist/utils/disks/calculatePDiskSeverity.d.ts +5 -2
  113. package/dist/utils/disks/calculatePDiskSeverity.js +2 -2
  114. package/dist/utils/disks/calculatePDiskSeverity.js.map +1 -1
  115. package/dist/utils/disks/calculateVDiskSeverity.d.ts +8 -2
  116. package/dist/utils/disks/calculateVDiskSeverity.js +0 -4
  117. package/dist/utils/disks/calculateVDiskSeverity.js.map +1 -1
  118. package/dist/utils/disks/helpers.d.ts +2 -1
  119. package/dist/utils/disks/helpers.js.map +1 -1
  120. package/dist/utils/disks/prepareDisks.d.ts +22 -4
  121. package/dist/utils/disks/prepareDisks.js +75 -28
  122. package/dist/utils/disks/prepareDisks.js.map +1 -1
  123. package/dist/utils/disks/types.d.ts +9 -2
  124. package/dist/utils/storage.d.ts +1 -1
  125. package/package.json +3 -2
  126. package/dist/containers/Nodes/i18n/ru.json +0 -3
@@ -176,14 +176,14 @@ export interface TStorageVDisk {
176
176
  AvailableSize?: string;
177
177
  Status?: EVDiskStatus;
178
178
  DiskSpace?: EFlag;
179
- Donors?: Omit<TStorageVDisk, 'PDisk' | 'Whiteboard'>;
179
+ Donors?: TStorageVDisk[];
180
180
  PDisk?: TStoragePDisk;
181
181
  Whiteboard?: TVDiskStateInfo;
182
182
  }
183
183
  /**
184
184
  * PDisk data from storage/groups handler
185
185
  */
186
- interface TStoragePDisk {
186
+ export interface TStoragePDisk {
187
187
  PDiskId?: string;
188
188
  Path?: string;
189
189
  Type?: 'hdd' | 'ssd' | 'nvme';
@@ -1,5 +1,25 @@
1
- import { createDeveloperUILinkWithNodeId, createPDiskDeveloperUILink, createVDiskDeveloperUILink, } from '../developerUI';
1
+ import { createDeveloperUIInternalPageHref, createDeveloperUILinkWithNodeId, createPDiskDeveloperUILink, createVDiskDeveloperUILink, } from '../developerUI';
2
2
  describe('Developer UI links generators', () => {
3
+ describe('createDeveloperUIInternalPageHref', () => {
4
+ it('should create correct link for embedded UI', () => {
5
+ expect(createDeveloperUIInternalPageHref('')).toBe('/internal');
6
+ });
7
+ it('should create correct link for embedded UI with node', () => {
8
+ expect(createDeveloperUIInternalPageHref('/node/5')).toBe('/node/5/internal');
9
+ });
10
+ it('should create correct link for embedded UI with proxy', () => {
11
+ expect(createDeveloperUIInternalPageHref('/my-ydb-host.net:8765')).toBe('/my-ydb-host.net:8765/internal');
12
+ });
13
+ it('should create correct link for UI with custom host', () => {
14
+ expect(createDeveloperUIInternalPageHref('http://my-ydb-host.net:8765')).toBe('http://my-ydb-host.net:8765/internal');
15
+ });
16
+ it('should create correct link for UI with custom host and node', () => {
17
+ expect(createDeveloperUIInternalPageHref('http://my-ydb-host.net:8765/node/5')).toBe('http://my-ydb-host.net:8765/node/5/internal');
18
+ });
19
+ it('should create correct link for UI with custom host and proxy', () => {
20
+ expect(createDeveloperUIInternalPageHref('https://my-ydb-proxy/my-ydb-host.net:8765')).toBe('https://my-ydb-proxy/my-ydb-host.net:8765/internal');
21
+ });
22
+ });
3
23
  describe('createDeveloperUILinkWithNodeId', () => {
4
24
  it('should create relative link with no host', () => {
5
25
  expect(createDeveloperUILinkWithNodeId(1)).toBe('/node/1');
@@ -1 +1 @@
1
- {"version":3,"file":"developerUI.test.js","sourceRoot":"","sources":["../../../../src/utils/developerUI/__test__/developerUI.test.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,+BAA+B,EAC/B,0BAA0B,EAC1B,0BAA0B,GAC7B,MAAM,gBAAgB,CAAC;AAExB,QAAQ,CAAC,+BAA+B,EAAE,GAAG,EAAE;IAC3C,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;QAC7C,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;YAChD,MAAM,CAAC,+BAA+B,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,qEAAqE,EAAE,GAAG,EAAE;YAC3E,MAAM,CAAC,+BAA+B,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3E,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;YACzC,MAAM,CACF,+BAA+B,CAC3B,CAAC,EACD,iDAAiD,CACpD,CACJ,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,uEAAuE,EAAE,GAAG,EAAE;YAC7E,MAAM,CACF,+BAA+B,CAC3B,CAAC,EACD,wDAAwD,CAC3D,CACJ,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACxC,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;YAClD,MAAM,CAAC,0BAA0B,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAC,CAAC,CAAC,CAAC,IAAI,CAC5D,sCAAsC,CACzC,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACxC,EAAE,CAAC,qDAAqD,EAAE,GAAG,EAAE;YAC3D,MAAM,CACF,0BAA0B,CAAC;gBACvB,MAAM,EAAE,CAAC;gBACT,OAAO,EAAE,CAAC;gBACV,WAAW,EAAE,CAAC;aACjB,CAAC,CACL,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"developerUI.test.js","sourceRoot":"","sources":["../../../../src/utils/developerUI/__test__/developerUI.test.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iCAAiC,EACjC,+BAA+B,EAC/B,0BAA0B,EAC1B,0BAA0B,GAC7B,MAAM,gBAAgB,CAAC;AAExB,QAAQ,CAAC,+BAA+B,EAAE,GAAG,EAAE;IAC3C,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC/C,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;YAClD,MAAM,CAAC,iCAAiC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACpE,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;YAC5D,MAAM,CAAC,iCAAiC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAClF,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,uDA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CACF,+BAA+B,CAC3B,CAAC,EACD,wDAAwD,CAC3D,CACJ,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACxC,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;YAClD,MAAM,CAAC,0BAA0B,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAC,CAAC,CAAC,CAAC,IAAI,CAC5D,sCAAsC,CACzC,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACxC,EAAE,CAAC,qDAAqD,EAAE,GAAG,EAAE;YAC3D,MAAM,CACF,0BAA0B,CAAC;gBACvB,MAAM,EAAE,CAAC;gBACT,OAAO,EAAE,CAAC;gBACV,WAAW,EAAE,CAAC;aACjB,CAAC,CACL,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
+ export declare function createDeveloperUIInternalPageHref(host?: string | undefined): string;
1
2
  export declare const createDeveloperUILinkWithNodeId: (nodeId: number | string, host?: string | undefined) => string;
2
3
  interface PDiskDeveloperUILinkParams {
3
4
  nodeId: number | string;
@@ -1,5 +1,8 @@
1
1
  import { backend } from '../../store';
2
2
  import { pad9 } from '../utils';
3
+ export function createDeveloperUIInternalPageHref(host = backend) {
4
+ return host + '/internal';
5
+ }
3
6
  // Current node connects with target node by itself using nodeId
4
7
  export const createDeveloperUILinkWithNodeId = (nodeId, host = backend) => {
5
8
  const nodePathRegexp = /\/node\/\d+\/?$/g;
@@ -1 +1 @@
1
- {"version":3,"file":"developerUI.js","sourceRoot":"","sources":["../../../src/utils/developerUI/developerUI.ts"],"names":[],"mappings":"AA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ACN,OAAO,EACP,WAAW,EACX,IAAI,GACqB,EAAE,EAAE;IAC7B,MAAM,SAAS,GAAG,sBAAsB,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC;IAEnF,OAAO,+BAA+B,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,SAAS,CAAC;AACrE,CAAC,CAAC;AAEF,MAAM,UAAU,2BAA2B,CACvC,QAAyB,EACzB,UAAmB,EACnB,WAAW,GAAG,UAAU,EACxB,IAAI,GAAG,OAAO;IAEd,MAAM,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACnD,OAAO,GAAG,IAAI,WAAW,OAAO,IAAI,WAAW,IAAI,QAAQ,EAAE,CAAC;AAClE,CAAC"}
@@ -8,16 +8,19 @@ describe('PDisk state', () => {
8
8
  expect(normalDiskSeverity).not.toEqual(erroredDiskSeverity);
9
9
  });
10
10
  it('Should determine severity based on space utilization if state severity is OK', () => {
11
- const severity1 = calculatePDiskSeverity({ State: TPDiskState.Normal }, 0);
12
- const severity2 = calculatePDiskSeverity({ State: TPDiskState.Normal }, 86);
13
- const severity3 = calculatePDiskSeverity({ State: TPDiskState.Normal }, 96);
11
+ const severity1 = calculatePDiskSeverity({ State: TPDiskState.Normal, AllocatedPercent: 0 });
12
+ const severity2 = calculatePDiskSeverity({ State: TPDiskState.Normal, AllocatedPercent: 86 });
13
+ const severity3 = calculatePDiskSeverity({ State: TPDiskState.Normal, AllocatedPercent: 96 });
14
14
  expect(severity1).toEqual(DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Green);
15
15
  expect(severity2).toEqual(DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Yellow);
16
16
  expect(severity3).toEqual(DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Red);
17
17
  });
18
18
  it('Should determine severity based on max severity of state and space utilization ', () => {
19
- const severity1 = calculatePDiskSeverity({ State: TPDiskState.ChunkQuotaError }, 0);
20
- const severity2 = calculatePDiskSeverity({ State: TPDiskState.Normal }, 96);
19
+ const severity1 = calculatePDiskSeverity({
20
+ State: TPDiskState.ChunkQuotaError,
21
+ AllocatedPercent: 0,
22
+ });
23
+ const severity2 = calculatePDiskSeverity({ State: TPDiskState.Normal, AllocatedPercent: 96 });
21
24
  expect(severity1).toEqual(DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Red);
22
25
  expect(severity2).toEqual(DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Red);
23
26
  });
@@ -28,8 +31,8 @@ describe('PDisk state', () => {
28
31
  expect(severity2).not.toEqual(DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Grey);
29
32
  });
30
33
  it('Should display as unavailabe when no State is provided event if space severity is not OK', () => {
31
- const severity1 = calculatePDiskSeverity({}, 86);
32
- const severity2 = calculatePDiskSeverity({}, 96);
34
+ const severity1 = calculatePDiskSeverity({ AllocatedPercent: 86 });
35
+ const severity2 = calculatePDiskSeverity({ AllocatedPercent: 96 });
33
36
  expect(severity1).toEqual(DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Grey);
34
37
  expect(severity2).toEqual(DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Grey);
35
38
  });
@@ -1 +1 @@
1
- {"version":3,"file":"calculatePDiskSeverity.test.js","sourceRoot":"","sources":["../../../../src/utils/disks/__test__/calculatePDiskSeverity.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAC,sBAAsB,EAAC,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAC,oCAAoC,EAAC,MAAM,cAAc,CAAC;AAElE,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,kEAAkE,EAAE,GAAG,EAAE;QACxE,MAAM,kBAAkB,GAAG,sBAAsB,CAAC,EAAC,KAAK,EAAE,WAAW,CAA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AAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,oCAAoC,CAAC,GAAG,CAAC,CAAC;QACpE,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,oCAAoC,CAAC,GAAG,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;QAC9D,MAAM,SAAS,GAAG,sBAAsB,CAAC,EAAE,CAAC,CAAC;QAC7C,MAAM,SAAS,GAAG,sBAAsB,CAAC,EAAC,KAAK,EAAE,WAAW,CAAC,eAAe,EAAC,CAAC,CAAC;QAE/E,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,oCAAoC,CAAC,IAAI,CAAC,CAAC;QACrE,MAAM,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,oCAAoC,CAAC,IAAI,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0FAA0F,EAAE,GAAG,EAAE;QAChG,MAAM,SAAS,GAAG,sBAAsB,CAAC,EAAC,gBAAgB,EAAE,EAAE,EAAC,CAAC,CAAC;QACjE,MAAM,SAAS,GAAG,sBAAsB,CAAC,EAAC,gBAAgB,EAAE,EAAE,EAAC,CAAC,CAAC;QAEjE,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,oCAAoC,CAAC,IAAI,CAAC,CAAC;QACrE,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,oCAAoC,CAAC,IAAI,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -5,19 +5,16 @@ import { DISK_COLOR_STATE_TO_NUMERIC_SEVERITY } from '../constants';
5
5
  describe('VDisk state', () => {
6
6
  it('Should determine severity based on the highest value among VDiskState, DiskSpace and FrontQueues', () => {
7
7
  const severity1 = calculateVDiskSeverity({
8
- VDiskId: { Domain: 1 },
9
8
  VDiskState: EVDiskState.OK, // severity 1, green
10
9
  DiskSpace: EFlag.Yellow, // severity 3, yellow
11
10
  FrontQueues: EFlag.Green, // severity 1, green
12
11
  });
13
12
  const severity2 = calculateVDiskSeverity({
14
- VDiskId: { Domain: 2 },
15
13
  VDiskState: EVDiskState.PDiskError, // severity 5, red
16
14
  DiskSpace: EFlag.Yellow, // severity 3, yellow
17
15
  FrontQueues: EFlag.Green, // severity 1, green
18
16
  });
19
17
  const severity3 = calculateVDiskSeverity({
20
- VDiskId: { Domain: 3 },
21
18
  VDiskState: EVDiskState.OK, // severity 1, green
22
19
  DiskSpace: EFlag.Yellow, // severity 3, yellow
23
20
  FrontQueues: EFlag.Orange, // severity 4, orange
@@ -28,13 +25,11 @@ describe('VDisk state', () => {
28
25
  });
29
26
  it('Should not pick the highest severity based on FrontQueues value', () => {
30
27
  const severity1 = calculateVDiskSeverity({
31
- VDiskId: { Domain: 1 },
32
28
  VDiskState: EVDiskState.OK, // severity 1, green
33
29
  DiskSpace: EFlag.Green, // severity 1, green
34
30
  FrontQueues: EFlag.Red, // severity 5, red
35
31
  });
36
32
  const severity2 = calculateVDiskSeverity({
37
- VDiskId: { Domain: 2 },
38
33
  VDiskState: EVDiskState.OK, // severity 1, green
39
34
  DiskSpace: EFlag.Red, // severity 5, red
40
35
  FrontQueues: EFlag.Red, // severity 5, red
@@ -44,29 +39,27 @@ describe('VDisk state', () => {
44
39
  });
45
40
  // prettier-ignore
46
41
  it('Should display as unavailable when no VDiskState is provided', () => {
47
- const severity1 = calculateVDiskSeverity({
48
- VDiskId: { Domain: 1 }
49
- });
42
+ const severity1 = calculateVDiskSeverity({});
50
43
  const severity2 = calculateVDiskSeverity({
51
- VDiskId: { Domain: 2 }, VDiskState: EVDiskState.OK
44
+ VDiskState: EVDiskState.OK
52
45
  });
53
46
  const severity3 = calculateVDiskSeverity({
54
- VDiskId: { Domain: 3 }, DiskSpace: EFlag.Green
47
+ DiskSpace: EFlag.Green
55
48
  });
56
49
  const severity4 = calculateVDiskSeverity({
57
- VDiskId: { Domain: 4 }, FrontQueues: EFlag.Green
50
+ FrontQueues: EFlag.Green
58
51
  });
59
52
  const severity5 = calculateVDiskSeverity({
60
- VDiskId: { Domain: 5 }, VDiskState: EVDiskState.OK, DiskSpace: EFlag.Green
53
+ VDiskState: EVDiskState.OK, DiskSpace: EFlag.Green
61
54
  });
62
55
  const severity6 = calculateVDiskSeverity({
63
- VDiskId: { Domain: 6 }, VDiskState: EVDiskState.OK, FrontQueues: EFlag.Green
56
+ VDiskState: EVDiskState.OK, FrontQueues: EFlag.Green
64
57
  });
65
58
  const severity7 = calculateVDiskSeverity({
66
- VDiskId: { Domain: 7 }, DiskSpace: EFlag.Green, FrontQueues: EFlag.Green
59
+ DiskSpace: EFlag.Green, FrontQueues: EFlag.Green
67
60
  });
68
61
  const severity8 = calculateVDiskSeverity({
69
- VDiskId: { Domain: 8 }, VDiskState: EVDiskState.OK, DiskSpace: EFlag.Green, FrontQueues: EFlag.Green
62
+ VDiskState: EVDiskState.OK, DiskSpace: EFlag.Green, FrontQueues: EFlag.Green
70
63
  });
71
64
  // unavailable disks display with the grey color
72
65
  expect(severity1).toEqual(DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Grey);
@@ -80,7 +73,6 @@ describe('VDisk state', () => {
80
73
  });
81
74
  it('Should display as unavailable when no VDiskState is provided even if DiskSpace or FrontQueues flags are not green', () => {
82
75
  const severity1 = calculateVDiskSeverity({
83
- VDiskId: { Domain: 1 },
84
76
  DiskSpace: EFlag.Red,
85
77
  FrontQueues: EFlag.Yellow,
86
78
  });
@@ -89,12 +81,10 @@ describe('VDisk state', () => {
89
81
  });
90
82
  it('Should display replicating VDisks in OK state with a distinct color', () => {
91
83
  const severity1 = calculateVDiskSeverity({
92
- VDiskId: { Domain: 1 },
93
84
  VDiskState: EVDiskState.OK, // severity 1, green
94
85
  Replicated: false,
95
86
  });
96
87
  const severity2 = calculateVDiskSeverity({
97
- VDiskId: { Domain: 2 },
98
88
  VDiskState: EVDiskState.OK, // severity 1, green
99
89
  Replicated: true,
100
90
  });
@@ -103,12 +93,10 @@ describe('VDisk state', () => {
103
93
  });
104
94
  it('Should display replicating VDisks in a not-OK state with a regular color', () => {
105
95
  const severity1 = calculateVDiskSeverity({
106
- VDiskId: { Domain: 1 },
107
96
  VDiskState: EVDiskState.Initial, // severity 3, yellow
108
97
  Replicated: false,
109
98
  });
110
99
  const severity2 = calculateVDiskSeverity({
111
- VDiskId: { Domain: 2 },
112
100
  VDiskState: EVDiskState.PDiskError, // severity 5, red
113
101
  Replicated: false,
114
102
  });
@@ -117,19 +105,16 @@ describe('VDisk state', () => {
117
105
  });
118
106
  it('Should always display donor VDisks with a regular color', () => {
119
107
  const severity1 = calculateVDiskSeverity({
120
- VDiskId: { Domain: 1 },
121
108
  VDiskState: EVDiskState.OK, // severity 1, green
122
109
  Replicated: false, // donors are always in the not replicated state since they are leftovers
123
110
  DonorMode: true,
124
111
  });
125
112
  const severity2 = calculateVDiskSeverity({
126
- VDiskId: { Domain: 2 },
127
113
  VDiskState: EVDiskState.Initial, // severity 3, yellow
128
114
  Replicated: false,
129
115
  DonorMode: true,
130
116
  });
131
117
  const severity3 = calculateVDiskSeverity({
132
- VDiskId: { Domain: 3 },
133
118
  VDiskState: EVDiskState.PDiskError, // severity 5, red
134
119
  Replicated: false,
135
120
  DonorMode: true,
@@ -1 +1 @@
1
- {"version":3,"file":"calculateVDiskSeverity.test.js","sourceRoot":"","sources":["../../../../src/utils/disks/__test__/calculateVDiskSeverity.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAC,WAAW,EAAC,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAC,sBAAsB,EAAC,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAC,oCAAoC,EAAC,MAAM,cAAc,CAAC;AAElE,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,kGAAkG,EAAE,GAAG,EAAE;QACxG,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AAC,OAAO,CAAC,oCAAoC,CAAC,MAAM,CAAC,CAAC;QACvE,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,oCAAoC,CAAC,GAAG,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"calculateVDiskSeverity.test.js","sourceRoot":"","sources":["../../../../src/utils/disks/__test__/calculateVDiskSeverity.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAC,WAAW,EAAC,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAC,sBAAsB,EAAC,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAC,oCAAoC,EAAC,MAAM,cAAc,CAAC;AAElE,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,kGAAkG,EAAE,GAAG,EAAE;QACxG,MAAM,SAAS,GAAG,sBAAsB,CAAC;YACrC,UAAU,EAAE,WAAW,CAAC,EAAE,EAAE,oBAAoB;YAChD,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,qBAAqB;YAC9C,WAAW,EAAE,KAAK,CAAC,KAAK,EAAE,oBAAoB;SACjD,CAAC,CAAC;QACH,MAAM,SAAS,GAAG,sBAAsB,CAAC;YACrC,UAAU,EAAE,WAAW,CAAC,UAAU,EAAE,kBAAkB;YACtD,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,qBAAqB;YAC9C,WAAW,EAAE,KAAK,CAAC,KAAK,EAAE,oBAAoB;SACjD,CAAC,CAAC;QACH,MAAM,SAAS,GAAG,sBAAsB,CAAC;YACrC,UAAU,EAAE,WAAW,CAAC,EAAE,EAAE,oBAAoB;YAChD,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,qBAAqB;YAC9C,WAAW,EAAE,KAAK,CAAC,MAAM,EAAE,qBAAqB;SACnD,CAAC,CAAC;QAEH,MAAM,CAAC,SAAS,CAA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,SAAS,CAAC,CAAC,OAAO,CAAC,oCAAoC,CAAC,MAAM,CAAC,CAAC;QACvE,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,oCAAoC,CAAC,GAAG,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QAC/D,MAAM,SAAS,GAAG,sBAAsB,CAAC;YACrC,UAAU,EAAE,WAAW,CAAC,EAAE,EAAE,oBAAoB;YAChD,UAAU,EAAE,KAAK,EAAE,yEAAyE;YAC5F,SAAS,EAAE,IAAI;SAClB,CAAC,CAAC;QACH,MAAM,SAAS,GAAG,sBAAsB,CAAC;YACrC,UAAU,EAAE,WAAW,CAAC,OAAO,EAAE,qBAAqB;YACtD,UAAU,EAAE,KAAK;YACjB,SAAS,EAAE,IAAI;SAClB,CAAC,CAAC;QACH,MAAM,SAAS,GAAG,sBAAsB,CAAC;YACrC,UAAU,EAAE,WAAW,CAAC,UAAU,EAAE,kBAAkB;YACtD,UAAU,EAAE,KAAK;YACjB,SAAS,EAAE,IAAI;SAClB,CAAC,CAAC;QAEH,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,oCAAoC,CAAC,IAAI,CAAC,CAAC;QACrE,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,oCAAoC,CAAC,MAAM,CAAC,CAAC;QACvE,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,oCAAoC,CAAC,GAAG,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,200 @@
1
+ import { preparePDiskSizeFields, prepareVDiskSizeFields, prepareWhiteboardPDiskData, prepareWhiteboardVDiskData, } from '../prepareDisks';
2
+ describe('prepareWhiteboardVDiskData', () => {
3
+ it('Should correctly parse data', () => {
4
+ const data = {
5
+ VDiskId: {
6
+ GroupID: 0,
7
+ GroupGeneration: 1,
8
+ Ring: 0,
9
+ Domain: 0,
10
+ VDisk: 0,
11
+ },
12
+ ChangeTime: '1730384311105',
13
+ PDiskId: 1,
14
+ VDiskSlotId: 0,
15
+ Guid: '3910585916831022250',
16
+ Kind: '0',
17
+ NodeId: 1,
18
+ VDiskState: 'OK',
19
+ DiskSpace: 'Green',
20
+ SatisfactionRank: {
21
+ FreshRank: {
22
+ Flag: 'Green',
23
+ },
24
+ LevelRank: {
25
+ Flag: 'Green',
26
+ },
27
+ },
28
+ Replicated: true,
29
+ ReplicationProgress: 1,
30
+ ReplicationSecondsRemaining: 0,
31
+ AllocatedSize: '8996782080',
32
+ AvailableSize: '188523479040',
33
+ HasUnreadableBlobs: false,
34
+ IncarnationGuid: '719472956608975753',
35
+ InstanceGuid: '11219959563151194061',
36
+ FrontQueues: 'Green',
37
+ StoragePoolName: 'static',
38
+ ReadThroughput: '0',
39
+ WriteThroughput: '447',
40
+ };
41
+ const expectedResult = {
42
+ StringifiedId: '0-1-0-0-0',
43
+ VDiskId: {
44
+ GroupID: 0,
45
+ GroupGeneration: 1,
46
+ Ring: 0,
47
+ Domain: 0,
48
+ VDisk: 0,
49
+ },
50
+ NodeId: 1,
51
+ PDiskId: 1,
52
+ VDiskSlotId: 0,
53
+ StoragePoolName: 'static',
54
+ ChangeTime: '1730384311105',
55
+ Guid: '3910585916831022250',
56
+ Kind: '0',
57
+ IncarnationGuid: '719472956608975753',
58
+ InstanceGuid: '11219959563151194061',
59
+ Severity: 1,
60
+ VDiskState: 'OK',
61
+ DiskSpace: 'Green',
62
+ FrontQueues: 'Green',
63
+ SatisfactionRank: {
64
+ FreshRank: {
65
+ Flag: 'Green',
66
+ },
67
+ LevelRank: {
68
+ Flag: 'Green',
69
+ },
70
+ },
71
+ Replicated: true,
72
+ ReplicationProgress: 1,
73
+ ReplicationSecondsRemaining: 0,
74
+ HasUnreadableBlobs: false,
75
+ ReadThroughput: '0',
76
+ WriteThroughput: '447',
77
+ AvailableSize: 188523479040,
78
+ AllocatedSize: 8996782080,
79
+ TotalSize: 197520261120,
80
+ AllocatedPercent: 5,
81
+ };
82
+ const preparedData = prepareWhiteboardVDiskData(data);
83
+ expect(preparedData).toEqual(expectedResult);
84
+ });
85
+ it('Should parse unavailable donors', () => {
86
+ const data = {
87
+ NodeId: 1,
88
+ PDiskId: 2,
89
+ VSlotId: 3,
90
+ };
91
+ const expectedResult = {
92
+ NodeId: 1,
93
+ PDiskId: 2,
94
+ VDiskSlotId: 3,
95
+ StringifiedId: '1-2-3',
96
+ };
97
+ const preparedData = prepareWhiteboardVDiskData(data);
98
+ expect(preparedData).toEqual(expectedResult);
99
+ });
100
+ });
101
+ describe('prepareWhiteboardPDiskData', () => {
102
+ it('Should correctly parse data', () => {
103
+ const data = {
104
+ PDiskId: 1,
105
+ ChangeTime: '1730383540716',
106
+ Path: '/dev/disk/by-partlabel/kikimr_nvme_01',
107
+ Guid: '3910585916831022250',
108
+ Category: '1',
109
+ AvailableSize: '3107979264000',
110
+ TotalSize: '3199556648960',
111
+ State: 'Normal',
112
+ NodeId: 1,
113
+ Device: 'Green',
114
+ Realtime: 'Green',
115
+ SerialNumber: '',
116
+ SystemSize: '817889280',
117
+ LogUsedSize: '1772093440',
118
+ LogTotalSize: '36805017600',
119
+ ExpectedSlotCount: 16,
120
+ EnforcedDynamicSlotSize: '197520261120',
121
+ NumActiveSlots: 10,
122
+ };
123
+ const expectedResult = {
124
+ PDiskId: 1,
125
+ NodeId: 1,
126
+ StringifiedId: '1-1',
127
+ Type: 'SSD',
128
+ Category: '1',
129
+ Path: '/dev/disk/by-partlabel/kikimr_nvme_01',
130
+ Guid: '3910585916831022250',
131
+ SerialNumber: '',
132
+ ChangeTime: '1730383540716',
133
+ Severity: 1,
134
+ Device: 'Green',
135
+ Realtime: 'Green',
136
+ State: 'Normal',
137
+ AvailableSize: 3107979264000,
138
+ TotalSize: 3199556648960,
139
+ AllocatedSize: 91577384960,
140
+ AllocatedPercent: 3,
141
+ ExpectedSlotCount: 16,
142
+ NumActiveSlots: 10,
143
+ SlotSize: '197520261120',
144
+ SystemSize: '817889280',
145
+ LogUsedSize: '1772093440',
146
+ LogTotalSize: '36805017600',
147
+ };
148
+ const preparedData = prepareWhiteboardPDiskData(data);
149
+ expect(preparedData).toEqual(expectedResult);
150
+ });
151
+ });
152
+ describe('prepareVDiskSizeFields', () => {
153
+ it('Should prepare VDisk size fields', () => {
154
+ expect(prepareVDiskSizeFields({
155
+ AvailableSize: '400',
156
+ AllocatedSize: '100',
157
+ })).toEqual({
158
+ AvailableSize: 400,
159
+ AllocatedSize: 100,
160
+ TotalSize: 500,
161
+ AllocatedPercent: 20,
162
+ });
163
+ });
164
+ it('Returns NaN if on undefined data', () => {
165
+ expect(prepareVDiskSizeFields({
166
+ AvailableSize: undefined,
167
+ AllocatedSize: undefined,
168
+ })).toEqual({
169
+ AvailableSize: NaN,
170
+ AllocatedSize: NaN,
171
+ TotalSize: NaN,
172
+ AllocatedPercent: NaN,
173
+ });
174
+ });
175
+ });
176
+ describe('preparePDiskSizeFields', () => {
177
+ it('Should prepare PDisk size fields', () => {
178
+ expect(preparePDiskSizeFields({
179
+ AvailableSize: '400',
180
+ TotalSize: '500',
181
+ })).toEqual({
182
+ AvailableSize: 400,
183
+ AllocatedSize: 100,
184
+ TotalSize: 500,
185
+ AllocatedPercent: 20,
186
+ });
187
+ });
188
+ it('Returns NaN if on undefined data', () => {
189
+ expect(preparePDiskSizeFields({
190
+ AvailableSize: undefined,
191
+ TotalSize: undefined,
192
+ })).toEqual({
193
+ AvailableSize: NaN,
194
+ AllocatedSize: NaN,
195
+ TotalSize: NaN,
196
+ AllocatedPercent: NaN,
197
+ });
198
+ });
199
+ });
200
+ //# sourceMappingURL=prepareDisks.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepareDisks.test.js","sourceRoot":"","sources":["../../../../src/utils/disks/__test__/prepareDisks.test.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,sBAAsB,EACtB,sBAAsB,EACtB,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CAAC,CACL,CAAC,OAAO,CAAC;YACN,aAAa,EAAE,GAAG;YAClB,aAAa,EAAE,GAAG;YAClB,SAAS,EAAE,GAAG;YACd,gBAAgB,EAAE,GAAG;SACxB,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +1,5 @@
1
- import type { TPDiskStateInfo } from '../../types/api/pdisk';
2
- export declare function calculatePDiskSeverity(pDisk: TPDiskStateInfo, allocatedPercent?: number): number;
1
+ import type { TPDiskState } from '../../types/api/pdisk';
2
+ export declare function calculatePDiskSeverity<T extends {
3
+ State?: TPDiskState;
4
+ AllocatedPercent?: number;
5
+ }>(pDisk: T): number;
@@ -2,9 +2,9 @@ import { EFlag } from '../../types/api/enums';
2
2
  import { generateEvaluator } from '../generateEvaluator';
3
3
  import { DISK_COLOR_STATE_TO_NUMERIC_SEVERITY, NOT_AVAILABLE_SEVERITY, PDISK_STATE_SEVERITY, } from './constants';
4
4
  const getUsageSeverityForPDisk = generateEvaluator(85, 95, [EFlag.Green, EFlag.Yellow, EFlag.Red]);
5
- export function calculatePDiskSeverity(pDisk, allocatedPercent = 0) {
5
+ export function calculatePDiskSeverity(pDisk) {
6
6
  const stateSeverity = getStateSeverity(pDisk.State);
7
- const spaceSeverityFlag = getUsageSeverityForPDisk(allocatedPercent);
7
+ const spaceSeverityFlag = getUsageSeverityForPDisk(pDisk.AllocatedPercent || 0);
8
8
  if (stateSeverity === NOT_AVAILABLE_SEVERITY || !spaceSeverityFlag) {
9
9
  return stateSeverity;
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"calculatePDiskSeverity.js","sourceRoot":"","sources":["../../../src/utils/disks/calculatePDiskSeverity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EACH,oCAAoC,EACpC,sBAAsB,EACtB,oBAAo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AC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AAEnG,MAAM,UAAU,sBAAsB,CAKpC,KAAQ;IACN,MAAM,aAAa,GAAG,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,iBAAiB,GAAG,wBAAwB,CAAC,KAAK,CAAC,gBAAgB,IAAI,CAAC,CAAC,CAAC;IAEhF,IAAI,aAAa,KAAK,sBAAsB,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACjE,OAAO,aAAa,CAAC;IACzB,CAAC;IAED,OAAO,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,oCAAoC,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC5F,CAAC;AAED,SAAS,gBAAgB,CAAC,UAAwB;IAC9C,OAAO,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC;AACjG,CAAC;AAED,SAAS,aAAa,CAAC,GAAiB;IACpC,OAAO,GAAG,KAAK,SAAS,IAAI,GAAG,IAAI,oBAAoB,CAAC;AAC5D,CAAC"}
@@ -1,2 +1,8 @@
1
- import type { TVDiskStateInfo } from '../../types/api/vdisk';
2
- export declare function calculateVDiskSeverity(vDisk: TVDiskStateInfo): number;
1
+ import type { EFlag } from '../../types/api/enums';
2
+ import type { EVDiskState } from '../../types/api/vdisk';
3
+ export declare function calculateVDiskSeverity<T extends {
4
+ DiskSpace?: EFlag;
5
+ VDiskState?: EVDiskState;
6
+ FrontQueues?: EFlag;
7
+ Replicated?: boolean;
8
+ }>(vDisk: T): number;
@@ -1,9 +1,5 @@
1
1
  import { DISK_COLOR_STATE_TO_NUMERIC_SEVERITY, NOT_AVAILABLE_SEVERITY, VDISK_STATE_SEVERITY, } from './constants';
2
- import { isFullVDiskData } from './helpers';
3
2
  export function calculateVDiskSeverity(vDisk) {
4
- if (!isFullVDiskData(vDisk)) {
5
- return NOT_AVAILABLE_SEVERITY;
6
- }
7
3
  const { DiskSpace, VDiskState, FrontQueues, Replicated } = vDisk;
8
4
  // if the disk is not available, this determines its status severity regardless of other features
9
5
  if (!VDiskState) {
@@ -1 +1 @@
1
- {"version":3,"file":"calculateVDiskSeverity.js","sourceRoot":"","sources":["../../../src/utils/disks/calculateVDiskSeverity.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,oCAAoC,EACpC,sBAAsB,EACtB,oBAAoB,GACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAC,eAAe,EAAC,MAAM,WAAW,CAAC;AAE1C,MAAM,UAAU,sBAAsB,CAAC,KAAsB;IACzD,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,sBAAsB,CAAC;IAClC,CAAC;IAED,MAAM,EAAC,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAC,GAAG,KAAK,CAAC;IAE/D,iGAAiG;IACjG,IAAI,CAAC,UAAU,EAAE,CAAC;QACd,OAAO,sBAAsB,CAAC;IAClC,CAAC;IAED,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;IACtD,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACxD,MAAM,mBAAmB,GAAG,IAAI,CAAC,GAAG,CAChC,oCAAoC,CAAC,MAAM,EAC3C,gBAAgB,CAAC,WAAW,CAAC,CAChC,CAAC;IAEF,IAAI,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,CAAC;IAEpF,yEAAyE;IACzE,IAAI,CAAC,UAAU,IAAI,QAAQ,KAAK,oCAAoC,CAAC,KAAK,EAAE,CAAC;QACzE,QAAQ,GAAG,oCAAoC,CAAC,IAAI,CAAC;IACzD,CAAC;IAED,OAAO,QAAQ,CAAC;AACpB,CAAC;AAED,SAAS,gBAAgB,CAAC,UAAwB;;IAC9C,IAAI,CAAC,UA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AAgB,CAAC,UAAwB;;IAC9C,IAAI,CAAC,UAAU,EAAE,CAAC;QACd,OAAO,sBAAsB,CAAC;IAClC,CAAC;IAED,OAAO,MAAA,oBAAoB,CAAC,UAAU,CAAC,mCAAI,sBAAsB,CAAC;AACtE,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa;;IACnC,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,OAAO,sBAAsB,CAAC;IAClC,CAAC;IAED,OAAO,MAAA,oCAAoC,CAAC,KAAK,CAAC,mCAAI,sBAAsB,CAAC;AACjF,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import type { EFlag } from '../../types/api/enums';
2
2
  import type { TVDiskStateInfo, TVSlotId } from '../../types/api/vdisk';
3
- export declare function isFullVDiskData(disk: TVDiskStateInfo | TVSlotId): disk is TVDiskStateInfo;
3
+ import type { PreparedVDisk } from './types';
4
+ export declare function isFullVDiskData(disk: PreparedVDisk | TVDiskStateInfo | TVSlotId): disk is PreparedVDisk | TVDiskStateInfo;
4
5
  export declare function getSeverityColor(severity: number | undefined): EFlag;
5
6
  export declare function getColorSeverity(color?: EFlag): number;
6
7
  export declare function getPDiskId(nodeId?: string | number | null, pDiskId?: string | number | null): string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/utils/disks/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,IAAI,CAAC;AAIlC,OAAO,EACH,oCAAoC,EACpC,oCAAoC,EACpC,4BAA4B,GAC/B,MAAM,aAAa,CAAC;AAErB,MAAM,UAAU,eAAe,CAAC,IAAgC;IAC5D,OAAO,SAAS,IAAI,IAAI,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,QAA4B;IACzD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,4BAA4B,CAAC;IACxC,CAAC;IAED,OAAO,oCAAoC,CAAC,QAAQ,CAAC,IAAI,4BA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E,OAAgC;IACxF,IAAI,cAAc,CAAC,MAAM,CAAC,IAAI,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;QACpD,OAAO,GAAG,MAAM,IAAI,OAAO,EAAE,CAAC;IAClC,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,mBAAmB,CAC/B,MAAuB,EACvB,OAAwB,EACxB,WAA4B;IAE5B,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACpD,CAAC"}
@@ -1,5 +1,23 @@
1
- import type { TPDiskInfo, TPDiskStateInfo } from '../../types/api/pdisk';
2
- import type { TVDiskStateInfo } from '../../types/api/vdisk';
1
+ import type { TPDiskStateInfo } from '../../types/api/pdisk';
2
+ import type { TVDiskStateInfo, TVSlotId } from '../../types/api/vdisk';
3
3
  import type { PreparedPDisk, PreparedVDisk } from './types';
4
- export declare function prepareVDiskData(vdiskState?: TVDiskStateInfo): PreparedVDisk;
5
- export declare function preparePDiskData(pdiskState?: TPDiskStateInfo, bscPDiskInfo?: TPDiskInfo): PreparedPDisk;
4
+ export declare function prepareWhiteboardVDiskData(vDiskState?: TVDiskStateInfo | TVSlotId): PreparedVDisk;
5
+ export declare function prepareWhiteboardPDiskData(pdiskState?: TPDiskStateInfo): PreparedPDisk;
6
+ export declare function prepareVDiskSizeFields({ AvailableSize, AllocatedSize, }: {
7
+ AvailableSize: string | number | undefined;
8
+ AllocatedSize: string | number | undefined;
9
+ }): {
10
+ AvailableSize: number;
11
+ AllocatedSize: number;
12
+ TotalSize: number;
13
+ AllocatedPercent: number;
14
+ };
15
+ export declare function preparePDiskSizeFields({ AvailableSize, TotalSize, }: {
16
+ AvailableSize: string | number | undefined;
17
+ TotalSize: string | number | undefined;
18
+ }): {
19
+ AvailableSize: number;
20
+ TotalSize: number;
21
+ AllocatedSize: number;
22
+ AllocatedPercent: number;
23
+ };