ydb-embedded-ui 6.19.0 → 6.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. package/dist/components/CriticalActionDialog/CriticalActionDialog.d.ts +2 -1
  2. package/dist/components/CriticalActionDialog/CriticalActionDialog.js +11 -3
  3. package/dist/components/CriticalActionDialog/CriticalActionDialog.js.map +1 -1
  4. package/dist/components/CriticalActionDialog/i18n/en.json +2 -1
  5. package/dist/components/CriticalActionDialog/i18n/index.d.ts +1 -1
  6. package/dist/components/DiskStateProgressBar/DiskStateProgressBar.scss +7 -36
  7. package/dist/components/TabletsStatistic/TabletsStatistic.d.ts +2 -4
  8. package/dist/components/TabletsStatistic/TabletsStatistic.js.map +1 -1
  9. package/dist/components/Tag/Tag.d.ts +2 -1
  10. package/dist/components/Tag/Tag.js.map +1 -1
  11. package/dist/components/Tags/Tags.d.ts +2 -1
  12. package/dist/components/Tags/Tags.js.map +1 -1
  13. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +3 -112
  14. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js.map +1 -1
  15. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +7 -14
  16. package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.d.ts +7 -0
  17. package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.js +43 -0
  18. package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.js.map +1 -0
  19. package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.scss +11 -0
  20. package/dist/containers/Cluster/ClusterInfo/components/NodesState/NodesState.d.ts +8 -0
  21. package/dist/containers/Cluster/ClusterInfo/components/NodesState/NodesState.js +8 -0
  22. package/dist/containers/Cluster/ClusterInfo/components/NodesState/NodesState.js.map +1 -0
  23. package/dist/containers/Cluster/ClusterInfo/components/NodesState/NodesState.scss +16 -0
  24. package/dist/containers/Cluster/ClusterInfo/shared.d.ts +1 -0
  25. package/dist/containers/Cluster/ClusterInfo/shared.js +3 -0
  26. package/dist/containers/Cluster/ClusterInfo/shared.js.map +1 -0
  27. package/dist/containers/Cluster/ClusterInfo/utils.d.ts +12 -0
  28. package/dist/containers/Cluster/ClusterInfo/utils.js +145 -0
  29. package/dist/containers/Cluster/ClusterInfo/utils.js.map +1 -1
  30. package/dist/containers/Cluster/i18n/en.json +7 -1
  31. package/dist/containers/Cluster/i18n/index.d.ts +1 -1
  32. package/dist/containers/Cluster/i18n/index.js +1 -2
  33. package/dist/containers/Cluster/i18n/index.js.map +1 -1
  34. package/dist/containers/Nodes/Nodes.js +3 -13
  35. package/dist/containers/Nodes/Nodes.js.map +1 -1
  36. package/dist/containers/PDiskPage/DecommissionButton/DecommissionButton.js +1 -1
  37. package/dist/containers/PDiskPage/DecommissionButton/DecommissionButton.js.map +1 -1
  38. package/dist/containers/UserSettings/i18n/en.json +0 -2
  39. package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
  40. package/dist/containers/UserSettings/settings.d.ts +0 -1
  41. package/dist/containers/UserSettings/settings.js +2 -12
  42. package/dist/containers/UserSettings/settings.js.map +1 -1
  43. package/dist/services/api.d.ts +3 -6
  44. package/dist/services/api.js +0 -5
  45. package/dist/services/api.js.map +1 -1
  46. package/dist/services/settings.d.ts +0 -1
  47. package/dist/services/settings.js +1 -2
  48. package/dist/services/settings.js.map +1 -1
  49. package/dist/store/reducers/cluster/cluster.js +10 -1
  50. package/dist/store/reducers/cluster/cluster.js.map +1 -1
  51. package/dist/store/reducers/cluster/utils.d.ts +3 -1
  52. package/dist/store/reducers/cluster/utils.js +9 -3
  53. package/dist/store/reducers/cluster/utils.js.map +1 -1
  54. package/dist/store/reducers/executeQuery.js +1 -1
  55. package/dist/store/reducers/executeQuery.js.map +1 -1
  56. package/dist/store/reducers/explainQuery/utils.d.ts +1 -1
  57. package/dist/store/reducers/explainQuery/utils.js.map +1 -1
  58. package/dist/store/reducers/nodes/nodes.d.ts +1 -2
  59. package/dist/store/reducers/nodes/nodes.js +1 -16
  60. package/dist/store/reducers/nodes/nodes.js.map +1 -1
  61. package/dist/store/reducers/nodes/types.d.ts +1 -6
  62. package/dist/store/reducers/nodes/utils.d.ts +1 -4
  63. package/dist/store/reducers/nodes/utils.js +1 -41
  64. package/dist/store/reducers/nodes/utils.js.map +1 -1
  65. package/dist/store/reducers/viewSchema/viewSchema.js +1 -1
  66. package/dist/store/reducers/viewSchema/viewSchema.js.map +1 -1
  67. package/dist/styles/mixins.scss +45 -0
  68. package/dist/types/api/cluster.d.ts +31 -1
  69. package/dist/types/api/cluster.js +3 -1
  70. package/dist/types/api/cluster.js.map +1 -1
  71. package/dist/types/api/meta.d.ts +2 -2
  72. package/dist/utils/constants.d.ts +0 -1
  73. package/dist/utils/constants.js +0 -1
  74. package/dist/utils/constants.js.map +1 -1
  75. package/dist/utils/nodes.d.ts +1 -2
  76. package/dist/utils/nodes.js.map +1 -1
  77. package/dist/utils/versions/parseNodesToVersionsValues.d.ts +1 -1
  78. package/dist/utils/versions/parseNodesToVersionsValues.js +3 -2
  79. package/dist/utils/versions/parseNodesToVersionsValues.js.map +1 -1
  80. package/package.json +2 -1
  81. package/dist/containers/Cluster/i18n/ru.json +0 -16
  82. package/dist/types/api/compute.d.ts +0 -57
  83. package/dist/types/api/compute.js +0 -2
  84. package/dist/types/api/compute.js.map +0 -1
@@ -6,10 +6,11 @@ interface CriticalActionDialogProps<T> {
6
6
  text?: string;
7
7
  withRetry?: boolean;
8
8
  retryButtonText?: string;
9
+ withCheckBox?: boolean;
9
10
  onClose: VoidFunction;
10
11
  onConfirm: (isRetry?: boolean) => Promise<T>;
11
12
  onConfirmActionSuccess: VoidFunction;
12
13
  onConfirmActionError: (error: unknown) => void;
13
14
  }
14
- export declare function CriticalActionDialog<T>({ visible, header, text, withRetry, retryButtonText, onClose, onConfirm, onConfirmActionSuccess, onConfirmActionError, }: CriticalActionDialogProps<T>): import("react/jsx-runtime").JSX.Element;
15
+ export declare function CriticalActionDialog<T>({ visible, header, text, withRetry, retryButtonText, withCheckBox, onClose, onConfirm, onConfirmActionSuccess, onConfirmActionError, }: CriticalActionDialogProps<T>): import("react/jsx-runtime").JSX.Element;
15
16
  export {};
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { CircleXmarkFill, TriangleExclamationFill } from '@gravity-ui/icons';
4
- import { Dialog, Icon } from '@gravity-ui/uikit';
4
+ import { Checkbox, Dialog, Icon } from '@gravity-ui/uikit';
5
5
  import { cn } from '../../utils/cn';
6
6
  import { criticalActionDialogKeyset } from './i18n';
7
7
  import './CriticalActionDialog.scss';
@@ -15,9 +15,10 @@ const parseError = (error) => {
15
15
  }
16
16
  return criticalActionDialogKeyset('default-error');
17
17
  };
18
- export function CriticalActionDialog({ visible, header, text, withRetry, retryButtonText, onClose, onConfirm, onConfirmActionSuccess, onConfirmActionError, }) {
18
+ export function CriticalActionDialog({ visible, header, text, withRetry, retryButtonText, withCheckBox, onClose, onConfirm, onConfirmActionSuccess, onConfirmActionError, }) {
19
19
  const [isLoading, setIsLoading] = React.useState(false);
20
20
  const [error, setError] = React.useState();
21
+ const [checkBoxChecked, setCheckBoxChecked] = React.useState(false);
21
22
  const onApply = async (isRetry) => {
22
23
  setIsLoading(true);
23
24
  return onConfirm(isRetry)
@@ -35,6 +36,13 @@ export function CriticalActionDialog({ visible, header, text, withRetry, retryBu
35
36
  };
36
37
  const handleTransitionExited = () => {
37
38
  setError(undefined);
39
+ setCheckBoxChecked(false);
40
+ };
41
+ const renderCheckBox = () => {
42
+ if (withCheckBox) {
43
+ return (_jsx(Checkbox, { checked: checkBoxChecked, onUpdate: setCheckBoxChecked, children: criticalActionDialogKeyset('checkbox-text') }));
44
+ }
45
+ return null;
38
46
  };
39
47
  const renderDialogContent = () => {
40
48
  if (error) {
@@ -42,7 +50,7 @@ export function CriticalActionDialog({ visible, header, text, withRetry, retryBu
42
50
  ? retryButtonText || criticalActionDialogKeyset('button-retry')
43
51
  : undefined, textButtonCancel: criticalActionDialogKeyset('button-close'), onClickButtonApply: () => onApply(true), onClickButtonCancel: onClose })] }));
44
52
  }
45
- return (_jsxs(React.Fragment, { children: [_jsx(Dialog.Header, { caption: header }), _jsx(Dialog.Body, { className: b('body'), children: _jsxs("div", { className: b('body-message', { warning: true }), children: [_jsx("span", { className: b('warning-icon'), children: _jsx(Icon, { data: TriangleExclamationFill, size: 24 }) }), text] }) }), _jsx(Dialog.Footer, { loading: isLoading, preset: "default", textButtonApply: criticalActionDialogKeyset('button-confirm'), textButtonCancel: criticalActionDialogKeyset('button-cancel'), propsButtonApply: { type: 'submit' }, onClickButtonCancel: onClose, onClickButtonApply: () => onApply() })] }));
53
+ return (_jsxs(React.Fragment, { children: [_jsx(Dialog.Header, { caption: header }), _jsxs(Dialog.Body, { className: b('body'), children: [_jsxs("div", { className: b('body-message', { warning: true }), children: [_jsx("span", { className: b('warning-icon'), children: _jsx(Icon, { data: TriangleExclamationFill, size: 24 }) }), text] }), renderCheckBox()] }), _jsx(Dialog.Footer, { loading: isLoading, preset: "default", textButtonApply: criticalActionDialogKeyset('button-confirm'), textButtonCancel: criticalActionDialogKeyset('button-cancel'), propsButtonApply: { type: 'submit', disabled: withCheckBox && !checkBoxChecked }, onClickButtonCancel: onClose, onClickButtonApply: () => onApply() })] }));
46
54
  };
47
55
  return (_jsx(Dialog, { open: visible, hasCloseButton: false, className: b(), size: "s", onClose: onClose, onTransitionExited: handleTransitionExited, children: renderDialogContent() }));
48
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CriticalActionDialog.js","sourceRoot":"","sources":["../../../src/components/CriticalActionDialog/CriticalActionDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,eAAe,EAAE,uBAAuB,EAAC,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAC,MAAM,EAA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AC,CAAC,cAAc,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,aAC9C,eAAM,SAAS,EAAE,CAAC,CAAC,cAAc,CAAC,YAC9B,KAAC,IAAI,IAAC,IAAI,EAAE,uBAAuB,EAAE,IAAI,EAAE,EAAE,GAAI,GAC9C,EACN,IAAI,IACH,GACI,EAEd,KAAC,MAAM,CAAC,MAAM,IACV,OAAO,EAAE,SAAS,EAClB,MAAM,EAAC,SAAS,EAChB,eAAe,EAAE,0BAA0B,CAAC,gBAAgB,CAAC,EAC7D,gBAAgB,EAAE,0BAA0B,CAAC,eAAe,CAAC,EAC7D,gBAAgB,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,EAClC,mBAAmB,EAAE,OAAO,EAC5B,kBAAkB,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,GACrC,IACW,CACpB,CAAC;IACN,CAAC,CAAC;IAEF,OAAO,CACH,KAAC,MAAM,IACH,IAAI,EAAE,OAAO,EACb,cAAc,EAAE,KAAK,EACrB,SAAS,EAAE,CAAC,EAAE,EACd,IAAI,EAAC,GAAG,EACR,OAAO,EAAE,OAAO,EAChB,kBAAkB,EAAE,sBAAsB,YAEzC,mBAAmB,EAAE,GACjB,CACZ,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"CriticalActionDialog.js","sourceRoot":"","sources":["../../../src/components/CriticalActionDialog/CriticalActionDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,eAAe,EAAE,uBAAuB,EAAC,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAGzD,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAElC,OAAO,EAAC,0BAA0B,EAAC,MAAM,QAAQ,CAAC;AAElD,OAAO,6BAA6B,CAAC;AAErC,MAAM,CAAC,GAAG,EAAE,CAAC,qB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AO,CACH,MAAC,KAAK,CAAC,QAAQ,eACX,KAAC,MAAM,CAAC,MAAM,IAAC,OAAO,EAAE,MAAM,GAAI,EAElC,MAAC,MAAM,CAAC,IAAI,IAAC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,aAC7B,eAAK,SAAS,EAAE,CAAC,CAAC,cAAc,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,aAC9C,eAAM,SAAS,EAAE,CAAC,CAAC,cAAc,CAAC,YAC9B,KAAC,IAAI,IAAC,IAAI,EAAE,uBAAuB,EAAE,IAAI,EAAE,EAAE,GAAI,GAC9C,EACN,IAAI,IACH,EAEL,cAAc,EAAE,IACP,EAEd,KAAC,MAAM,CAAC,MAAM,IACV,OAAO,EAAE,SAAS,EAClB,MAAM,EAAC,SAAS,EAChB,eAAe,EAAE,0BAA0B,CAAC,gBAAgB,CAAC,EAC7D,gBAAgB,EAAE,0BAA0B,CAAC,eAAe,CAAC,EAC7D,gBAAgB,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,IAAI,CAAC,eAAe,EAAC,EAC9E,mBAAmB,EAAE,OAAO,EAC5B,kBAAkB,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,GACrC,IACW,CACpB,CAAC;IACN,CAAC,CAAC;IAEF,OAAO,CACH,KAAC,MAAM,IACH,IAAI,EAAE,OAAO,EACb,cAAc,EAAE,KAAK,EACrB,SAAS,EAAE,CAAC,EAAE,EACd,IAAI,EAAC,GAAG,EACR,OAAO,EAAE,OAAO,EAChB,kBAAkB,EAAE,sBAAsB,YAEzC,mBAAmB,EAAE,GACjB,CACZ,CAAC;AACN,CAAC"}
@@ -4,5 +4,6 @@
4
4
  "button-confirm": "Confirm",
5
5
  "button-retry": "Retry",
6
6
  "button-cancel": "Cancel",
7
- "button-close": "Close"
7
+ "button-close": "Close",
8
+ "checkbox-text": "I understand what I'm doing"
8
9
  }
@@ -1 +1 @@
1
- export declare const criticalActionDialogKeyset: (key: "default-error" | "no-rights-error" | "button-confirm" | "button-retry" | "button-cancel" | "button-close", params?: import("@gravity-ui/i18n").Params) => string;
1
+ export declare const criticalActionDialogKeyset: (key: "default-error" | "no-rights-error" | "button-confirm" | "button-retry" | "button-cancel" | "button-close" | "checkbox-text", params?: import("@gravity-ui/i18n").Params) => string;
@@ -1,3 +1,5 @@
1
+ @import '../../styles/mixins';
2
+
1
3
  .storage-disk-progress-bar {
2
4
  $block: &;
3
5
 
@@ -5,9 +7,6 @@
5
7
  $outer-border-radius: 4px;
6
8
  $inner-border-radius: $outer-border-radius - $border-width;
7
9
 
8
- --progress-bar-border-color: var(--g-color-base-misc-heavy);
9
- --progress-bar-background-color: var(--g-color-base-misc-light);
10
- --progress-bar-fill-color: var(--g-color-base-misc-medium);
11
10
  --progress-bar-full-height: var(--g-text-body-3-line-height);
12
11
  --progress-bar-compact-height: 12px;
13
12
 
@@ -20,9 +19,10 @@
20
19
  text-align: center;
21
20
 
22
21
  color: var(--g-color-text-primary);
23
- border: $border-width solid var(--progress-bar-border-color);
22
+ border: $border-width solid var(--entity-state-border-color);
24
23
  border-radius: $outer-border-radius;
25
- background-color: var(--progress-bar-background-color);
24
+ background-color: var(--entity-state-background-color);
25
+ @include entity-state-colors();
26
26
 
27
27
  &_compact {
28
28
  min-width: 0;
@@ -31,35 +31,6 @@
31
31
  border-radius: 2px;
32
32
  }
33
33
 
34
- &_green {
35
- --progress-bar-border-color: var(--g-color-base-positive-heavy);
36
- --progress-bar-background-color: var(--g-color-base-positive-light);
37
- --progress-bar-fill-color: var(--g-color-base-positive-medium);
38
- }
39
-
40
- &_blue {
41
- --progress-bar-border-color: var(--g-color-base-info-heavy);
42
- --progress-bar-background-color: var(--g-color-base-info-light);
43
- --progress-bar-fill-color: var(--g-color-base-info-medium);
44
- }
45
-
46
- &_yellow {
47
- --progress-bar-border-color: var(--g-color-base-warning-heavy);
48
- --progress-bar-background-color: var(--g-color-base-yellow-light);
49
- --progress-bar-fill-color: var(--g-color-base-yellow-medium);
50
- }
51
-
52
- &_orange {
53
- --progress-bar-border-color: var(--ydb-color-status-orange);
54
- --progress-bar-background-color: var(--g-color-base-warning-light);
55
- --progress-bar-fill-color: var(--g-color-base-warning-medium);
56
- }
57
- &_red {
58
- --progress-bar-border-color: var(--g-color-base-danger-heavy);
59
- --progress-bar-background-color: var(--g-color-base-danger-light);
60
- --progress-bar-fill-color: var(--g-color-base-danger-medium);
61
- }
62
-
63
34
  &_faded {
64
35
  background-color: unset;
65
36
  }
@@ -78,11 +49,11 @@
78
49
  height: 100%;
79
50
 
80
51
  border-radius: $inner-border-radius 0 0 $inner-border-radius;
81
- background-color: var(--progress-bar-fill-color);
52
+ background-color: var(--entity-state-fill-color);
82
53
 
83
54
  &_faded {
84
55
  // Bg color is light variant, use it to make bar less bright
85
- background-color: var(--progress-bar-background-color);
56
+ background-color: var(--entity-state-background-color);
86
57
  }
87
58
 
88
59
  &_compact {
@@ -1,9 +1,7 @@
1
- import type { TTabletStateInfo as TComputeTabletStateInfo } from '../../types/api/compute';
2
- import type { TTabletStateInfo as TFullTabletStateInfo } from '../../types/api/tablet';
1
+ import type { TTabletStateInfo } from '../../types/api/tablet';
3
2
  import './TabletsStatistic.scss';
4
- type Tablets = TFullTabletStateInfo[] | TComputeTabletStateInfo[];
5
3
  interface TabletsStatisticProps {
6
- tablets: Tablets;
4
+ tablets: TTabletStateInfo[];
7
5
  path: string | undefined;
8
6
  nodeId: string | number;
9
7
  backend?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"TabletsStatistic.js","sourceRoot":"","sources":["../../../src/components/TabletsStatistic/TabletsStatistic.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAEtC,OAAO,EAAC,OAAO,EAAC,MAAM,iCAAiC,CAAC;AACxD,OAAO,MAAM,EAAE,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAGhD,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAg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c,CAAC,OAAO,CAAC,CAAC;IAEhD,OAAO,cAAK,SAAS,EAAE,CAAC,EAAE,YAAG,eAAe,CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAO,CAAC;AAC9E,CAAC,CAAC"}
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import './Tag.scss';
2
3
  export type TagType = 'blue';
3
4
  interface TagProps {
4
- text: string;
5
+ text: React.ReactNode;
5
6
  type?: TagType;
6
7
  }
7
8
  export declare const Tag: ({ text, type }: TagProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAElC,OAAO,YAAY,CAAC;AAEpB,MAAM,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;AASpB,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,EAAC,IAAI,EAAE,IAAI,EAAW,EAAE,EAAE;IAC1C,OAAO,cAAK,SAAS,EAAE,CAAC,CAAC,EAAC,IAAI,EAAC,CAAC,YAAG,IAAI,GAAO,CAAC;AACnD,CAAC,CAAC"}
1
+ {"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAElC,OAAO,YAAY,CAAC;AAEpB,MAAM,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;AASpB,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,EAAC,IAAI,EAAE,IAAI,EAAW,EAAE,EAAE;IAC1C,OAAO,cAAK,SAAS,EAAE,CAAC,CAAC,EAAC,IAAI,EAAC,CAAC,YAAG,IAAI,GAAO,CAAC;AACnD,CAAC,CAAC"}
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import type { TagType } from '../Tag';
2
3
  import './Tags.scss';
3
4
  interface TagsProps {
4
- tags: string[];
5
+ tags: React.ReactNode[];
5
6
  tagsType?: TagType;
6
7
  className?: string;
7
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Tags.js","sourceRoot":"","sources":["../../../src/components/Tags/Tags.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAElC,OAAO,EAAC,GAAG,EAAC,MAAM,QAAQ,CAAC;AAE3B,OAAO,aAAa,CAAC;AAErB,MAAM,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC;AAQrB,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,GAAG,EAAE,EAAY,EAAE,EAAE;IAChE,OAAO,CACH,cAAK,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,YAC7B,IAAI;YACD,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,CAAC,KAAC,GAAG,IAAC,IAAI,EAAE,GAAG,EAAiB,IAAI,EAAE,QAAQ,IAAxB,QAAQ,CAAwB,CAAC,GACpF,CACT,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"file":"Tags.js","sourceRoot":"","sources":["../../../src/components/Tags/Tags.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAElC,OAAO,EAAC,GAAG,EAAC,MAAM,QAAQ,CAAC;AAE3B,OAAO,aAAa,CAAC;AAErB,MAAM,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC;AAQrB,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,GAAG,EAAE,EAAY,EAAE,EAAE;IAChE,OAAO,CACH,cAAK,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,YAC7B,IAAI;YACD,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,CAAC,KAAC,GAAG,IAAC,IAAI,EAAE,GAAG,EAAiB,IAAI,EAAE,QAAQ,IAAxB,QAAQ,CAAwB,CAAC,GACpF,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -1,125 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from 'react';
3
- import { ContentWithPopup } from '../../../components/ContentWithPopup/ContentWithPopup';
4
2
  import { ResponseError } from '../../../components/Errors/ResponseError';
5
3
  import { InfoViewer } from '../../../components/InfoViewer/InfoViewer';
6
4
  import { InfoViewerSkeleton } from '../../../components/InfoViewerSkeleton/InfoViewerSkeleton';
7
- import { LinkWithIcon } from '../../../components/LinkWithIcon/LinkWithIcon';
8
- import { ProgressViewer } from '../../../components/ProgressViewer/ProgressViewer';
9
- import { Tablet } from '../../../components/Tablet';
10
- import { Tags } from '../../../components/Tags';
11
5
  import { backend, customBackend } from '../../../store';
12
- import { nodesApi } from '../../../store/reducers/nodes/nodes';
13
- import { formatBytes, getSizeWithSignificantDigits } from '../../../utils/bytesParsers';
14
- import { cn } from '../../../utils/cn';
15
6
  import { DEVELOPER_UI_TITLE } from '../../../utils/constants';
16
- import { formatStorageValues } from '../../../utils/dataFormatters/dataFormatters';
17
7
  import { useTypedSelector } from '../../../utils/hooks';
18
- import { parseNodeGroupsToVersionsValues, parseNodesToVersionsValues } from '../../../utils/versions';
19
- import { VersionsBar } from '../VersionsBar/VersionsBar';
20
- import i18n from '../i18n';
21
- import { compareTablets } from './utils';
8
+ import { b } from './shared';
9
+ import { getInfo, useGetVersionValues } from './utils';
22
10
  import './ClusterInfo.scss';
23
- const b = cn('cluster-info');
24
- const GroupsStatsPopupContent = ({ stats }) => {
25
- const { diskType, erasure, allocatedSize, availableSize } = stats;
26
- const sizeToConvert = getSizeWithSignificantDigits(Math.max(allocatedSize, availableSize), 2);
27
- const convertedAllocatedSize = formatBytes({ value: allocatedSize, size: sizeToConvert });
28
- const convertedAvailableSize = formatBytes({ value: availableSize, size: sizeToConvert });
29
- const usage = Math.round((allocatedSize / (allocatedSize + availableSize)) * 100);
30
- const info = [
31
- {
32
- label: i18n('disk-type'),
33
- value: diskType,
34
- },
35
- {
36
- label: i18n('erasure'),
37
- value: erasure,
38
- },
39
- {
40
- label: i18n('allocated'),
41
- value: convertedAllocatedSize,
42
- },
43
- {
44
- label: i18n('available'),
45
- value: convertedAvailableSize,
46
- },
47
- {
48
- label: i18n('usage'),
49
- value: usage + '%',
50
- },
51
- ];
52
- return (_jsx(InfoViewer, { dots: true, info: info, className: b('groups-stats-popup-content'), size: "s" }));
53
- };
54
- const DiskGroupsStatsBars = ({ stats }) => {
55
- return (_jsx("div", { className: b('storage-groups-stats'), children: Object.values(stats).map((erasureStats) => (_jsx(ContentWithPopup, { placement: ['right'], content: _jsx(GroupsStatsPopupContent, { stats: erasureStats }), children: _jsx(ProgressViewer, { className: b('groups-stats-bar'), value: erasureStats.createdGroups, capacity: erasureStats.totalGroups }) }, erasureStats.erasure))) }));
56
- };
57
- const getGroupsStatsFields = (groupsStats) => {
58
- return Object.keys(groupsStats).map((diskType) => {
59
- return {
60
- label: i18n('storage-groups', { diskType }),
61
- value: _jsx(DiskGroupsStatsBars, { stats: groupsStats[diskType] }),
62
- };
63
- });
64
- };
65
- const getInfo = (cluster, versionsValues, groupsStats, additionalInfo, links) => {
66
- const info = [];
67
- if (cluster.DataCenters) {
68
- info.push({
69
- label: i18n('dc'),
70
- value: _jsx(Tags, { tags: cluster.DataCenters }),
71
- });
72
- }
73
- if (cluster.SystemTablets) {
74
- const tablets = cluster.SystemTablets.slice(0).sort(compareTablets);
75
- info.push({
76
- label: i18n('tablets'),
77
- value: (_jsx("div", { className: b('system-tablets'), children: tablets.map((tablet, tabletIndex) => (_jsx(Tablet, { tablet: tablet }, tabletIndex))) })),
78
- });
79
- }
80
- if (cluster.Tenants) {
81
- info.push({
82
- label: i18n('databases'),
83
- value: cluster.Tenants,
84
- });
85
- }
86
- info.push({
87
- label: i18n('nodes'),
88
- value: _jsx(ProgressViewer, { value: cluster === null || cluster === void 0 ? void 0 : cluster.NodesAlive, capacity: cluster === null || cluster === void 0 ? void 0 : cluster.NodesTotal }),
89
- }, {
90
- label: i18n('load'),
91
- value: _jsx(ProgressViewer, { value: cluster === null || cluster === void 0 ? void 0 : cluster.LoadAverage, capacity: cluster === null || cluster === void 0 ? void 0 : cluster.NumberOfCpus }),
92
- }, {
93
- label: i18n('storage-size'),
94
- value: (_jsx(ProgressViewer, { value: cluster === null || cluster === void 0 ? void 0 : cluster.StorageUsed, capacity: cluster === null || cluster === void 0 ? void 0 : cluster.StorageTotal, formatValues: formatStorageValues })),
95
- });
96
- if (Object.keys(groupsStats).length) {
97
- info.push(...getGroupsStatsFields(groupsStats));
98
- }
99
- info.push(...additionalInfo, {
100
- label: i18n('links'),
101
- value: (_jsx("div", { className: b('links'), children: links.map(({ title, url }) => (_jsx(LinkWithIcon, { title: title, url: url }, title))) })),
102
- }, {
103
- label: i18n('versions'),
104
- value: _jsx(VersionsBar, { versionsValues: versionsValues }),
105
- });
106
- return info;
107
- };
108
11
  export const ClusterInfo = ({ cluster, versionToColor, groupsStats = {}, loading, error, additionalClusterProps = {}, }) => {
109
12
  const singleClusterMode = useTypedSelector((state) => state.singleClusterMode);
110
- const { currentData } = nodesApi.useGetNodesQuery({
111
- tablets: false,
112
- group: 'Version',
113
- });
114
- const versionsValues = React.useMemo(() => {
115
- if (!currentData) {
116
- return [];
117
- }
118
- if (Array.isArray(currentData.NodeGroups)) {
119
- return parseNodeGroupsToVersionsValues(currentData.NodeGroups, versionToColor);
120
- }
121
- return parseNodesToVersionsValues(currentData.Nodes, versionToColor);
122
- }, [currentData, versionToColor]);
13
+ const versionsValues = useGetVersionValues(cluster, versionToColor);
123
14
  let internalLink = backend + '/internal';
124
15
  if (singleClusterMode && !customBackend) {
125
16
  internalLink = `/internal`;
@@ -1 +1 @@
1
- {"version":3,"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Aa,EAAE,CAAC;QACtC,YAAY,GAAG,WAAW,CAAC;IAC/B,CAAC;IAED,MAAM,EAAC,IAAI,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,EAAC,GAAG,sBAAsB,CAAC;IAEvD,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE,IAAI,EAAE;QAC1E,EAAC,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,YAAY,EAAC;QAC9C,GAAG,KAAK;KACX,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,GAAG,EAAE;QACpB,IAAI,OAAO,EAAE,CAAC;YACV,OAAO,KAAC,kBAAkB,IAAC,SAAS,EAAE,CAAC,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC,GAAI,CAAC;QACrE,CAAC;QAED,IAAI,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,OAAO,KAAC,UAAU,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,GAAI,CAAC;IACzD,CAAC,CAAC;IAEF,OAAO,CACH,eAAK,SAAS,EAAE,CAAC,EAAE,aACd,KAAK,CAAC,CAAC,CAAC,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,GAAI,CAAC,CAAC,CAAC,IAAI,EACtE,cAAK,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,YAAG,UAAU,EAAE,GAAO,IAC7C,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -47,24 +47,17 @@
47
47
  gap: var(--g-spacing-2);
48
48
  }
49
49
 
50
- &__storage-groups-stats {
51
- display: flex;
52
- flex-direction: column;
53
- gap: 11px;
54
- }
55
-
56
- &__groups-stats-bar {
57
- cursor: pointer;
58
- }
59
-
60
- &__groups-stats-popup-content {
61
- padding: 12px;
62
- }
63
-
64
50
  &__clipboard-button {
65
51
  display: flex;
66
52
  align-items: center;
67
53
 
68
54
  margin-left: 5px;
69
55
  }
56
+ &__dc-count {
57
+ text-transform: lowercase;
58
+ }
59
+ &__nodes-states {
60
+ display: flex;
61
+ gap: var(--g-spacing-half);
62
+ }
70
63
  }
@@ -0,0 +1,7 @@
1
+ import type { DiskGroupsStats } from '../../../../../store/reducers/cluster/types';
2
+ import './DiskGroupsStatsBars.scss';
3
+ interface DiskGroupsStatsProps {
4
+ stats: DiskGroupsStats;
5
+ }
6
+ export declare const DiskGroupsStatsBars: ({ stats }: DiskGroupsStatsProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ContentWithPopup } from '../../../../../components/ContentWithPopup/ContentWithPopup';
3
+ import { InfoViewer } from '../../../../../components/InfoViewer';
4
+ import { ProgressViewer } from '../../../../../components/ProgressViewer/ProgressViewer';
5
+ import { formatBytes, getSizeWithSignificantDigits } from '../../../../../utils/bytesParsers';
6
+ import { cn } from '../../../../../utils/cn';
7
+ import i18n from '../../../i18n';
8
+ import './DiskGroupsStatsBars.scss';
9
+ const b = cn('ydb-disk-groups-stats');
10
+ export const DiskGroupsStatsBars = ({ stats }) => {
11
+ return (_jsx("div", { className: b(), children: Object.values(stats).map((erasureStats) => (_jsx(ContentWithPopup, { placement: ['right'], content: _jsx(GroupsStatsPopupContent, { stats: erasureStats }), children: _jsx(ProgressViewer, { className: b('bar'), value: erasureStats.createdGroups, capacity: erasureStats.totalGroups }) }, erasureStats.erasure))) }));
12
+ };
13
+ function GroupsStatsPopupContent({ stats }) {
14
+ const { diskType, erasure, allocatedSize, availableSize } = stats;
15
+ const sizeToConvert = getSizeWithSignificantDigits(Math.max(allocatedSize, availableSize), 2);
16
+ const convertedAllocatedSize = formatBytes({ value: allocatedSize, size: sizeToConvert });
17
+ const convertedAvailableSize = formatBytes({ value: availableSize, size: sizeToConvert });
18
+ const usage = Math.round((allocatedSize / (allocatedSize + availableSize)) * 100);
19
+ const info = [
20
+ {
21
+ label: i18n('disk-type'),
22
+ value: diskType,
23
+ },
24
+ {
25
+ label: i18n('erasure'),
26
+ value: erasure,
27
+ },
28
+ {
29
+ label: i18n('allocated'),
30
+ value: convertedAllocatedSize,
31
+ },
32
+ {
33
+ label: i18n('available'),
34
+ value: convertedAvailableSize,
35
+ },
36
+ {
37
+ label: i18n('usage'),
38
+ value: usage + '%',
39
+ },
40
+ ];
41
+ return _jsx(InfoViewer, { dots: true, info: info, className: b('popup-content'), size: "s" });
42
+ }
43
+ //# sourceMappingURL=DiskGroupsStatsBars.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiskGroupsStatsBars.js","sourceRoot":"","sources":["../../../../../../src/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,6DAA6D,CAAC;AAC7F,OAAO,EAAC,UAAU,EAAC,MAAM,sCAAsC,CAAC;AAChE,OAAO,EAAC,cAAc,EAAC,MAAM,yDAAyD,CAAC;AAKvF,OAAO,EAAC,WAAW,EAAE,4BAA4B,EAAC,MAAM,mCAAmC,CAAC;AAC5F,OAAO,EAAC,EAAE,EAAC,MAAM,yBAAyB,CAAC;AAC3C,OAAO,IAAI,MAAM,eAAe,CAAC;AAEjC,OAAO,4BAA4B,CAAC;AAEpC,MAAM,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC,CAAC;AAMtC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAC,KAAK,EAAuB,EAAE,EAAE;IACjE,OAAO,CACH,cAAK,SAAS,EAAE,CAAC,EAAE,YACd,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,CACxC,KAAC,gBAAgB,IACb,SAAS,EAAE,CAAC,OAAO,CAAC,EA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C;YACpB,KAAK,EAAE,KAAK,GAAG,GAAG;SACrB;KACJ,CAAC;IAEF,OAAO,KAAC,UAAU,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,eAAe,CAAC,EAAE,IAAI,EAAC,GAAG,GAAG,CAAC;AAC1F,CAAC"}
@@ -0,0 +1,11 @@
1
+ .ydb-disk-groups-stats {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: var(--g-spacing-3);
5
+ &__bar {
6
+ cursor: pointer;
7
+ }
8
+ &__popup-content {
9
+ padding: var(--g-spacing-3);
10
+ }
11
+ }
@@ -0,0 +1,8 @@
1
+ import type { EFlag } from '../../../../../types/api/enums';
2
+ import './NodesState.scss';
3
+ interface NodesStateProps {
4
+ state: EFlag;
5
+ children: React.ReactNode;
6
+ }
7
+ export declare function NodesState({ state, children }: NodesStateProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from '../../../../../utils/cn';
3
+ import './NodesState.scss';
4
+ const b = cn('ydb-nodes-state');
5
+ export function NodesState({ state, children }) {
6
+ return _jsx("div", { className: b({ [state.toLowerCase()]: true }), children: children });
7
+ }
8
+ //# sourceMappingURL=NodesState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NodesState.js","sourceRoot":"","sources":["../../../../../../src/containers/Cluster/ClusterInfo/components/NodesState/NodesState.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,EAAE,EAAC,MAAM,yBAAyB,CAAC;AAE3C,OAAO,mBAAmB,CAAC;AAE3B,MAAM,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,CAAC;AAOhC,MAAM,UAAU,UAAU,CAAC,EAAC,KAAK,EAAE,QAAQ,EAAkB;IACzD,OAAO,cAAK,SAAS,EAAE,CAAC,CAAC,EAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,EAAE,IAAI,EAAC,CAAC,YAAG,QAAQ,GAAO,CAAC;AAC9E,CAAC"}
@@ -0,0 +1,16 @@
1
+ @import '../../../../../styles/mixins.scss';
2
+
3
+ .ydb-nodes-state {
4
+ display: flex;
5
+ justify-content: center;
6
+ align-items: center;
7
+
8
+ min-width: 30px;
9
+ padding: 0 var(--g-spacing-1);
10
+
11
+ color: var(--entity-state-font-color);
12
+ border: 1px solid var(--entity-state-border-color);
13
+ border-radius: var(--g-spacing-1);
14
+ background-color: var(--entity-state-background-color);
15
+ @include entity-state-colors();
16
+ }
@@ -0,0 +1 @@
1
+ export declare const b: import("@bem-react/classname").ClassNameFormatter;
@@ -0,0 +1,3 @@
1
+ import { cn } from '../../../utils/cn';
2
+ export const b = cn('cluster-info');
3
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../src/containers/Cluster/ClusterInfo/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,EAAE,EAAC,MAAM,mBAAmB,CAAC;AAErC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,CAAC"}
@@ -1,2 +1,14 @@
1
+ import type { InfoViewerItem } from '../../../components/InfoViewer/InfoViewer';
2
+ import type { ClusterGroupsStats } from '../../../store/reducers/cluster/types';
3
+ import type { ClusterLink } from '../../../types/additionalProps';
4
+ import type { TClusterInfo } from '../../../types/api/cluster';
1
5
  import type { TTabletStateInfo } from '../../../types/api/tablet';
6
+ import type { VersionToColorMap, VersionValue } from '../../../types/versions';
2
7
  export declare const compareTablets: (tablet1: TTabletStateInfo, tablet2: TTabletStateInfo) => 0 | 1 | -1;
8
+ export declare const getInfo: (cluster: TClusterInfo, versionsValues: VersionValue[], groupsStats: ClusterGroupsStats, additionalInfo: InfoViewerItem[], links: ClusterLink[]) => InfoViewerItem[];
9
+ export declare const useGetVersionValues: (cluster?: TClusterInfo, versionToColor?: VersionToColorMap) => {
10
+ title: string;
11
+ version: string;
12
+ color: string | undefined;
13
+ value: number;
14
+ }[];