ydb-embedded-ui 6.6.1 → 6.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. package/dist/package.json +2 -1
  2. package/dist/src/containers/App/App.d.ts +1 -1
  3. package/dist/src/containers/App/Content.js +1 -1
  4. package/dist/src/containers/App/appSlots.d.ts +1 -1
  5. package/dist/src/containers/AsideNavigation/Navigation.js +1 -3
  6. package/dist/src/containers/AsideNavigation/i18n/en.json +0 -2
  7. package/dist/src/containers/AsideNavigation/i18n/index.d.ts +1 -1
  8. package/dist/src/containers/AsideNavigation/i18n/index.js +1 -2
  9. package/dist/src/containers/Cluster/i18n/index.d.ts +1 -1
  10. package/dist/src/containers/Clusters/constants.d.ts +1 -1
  11. package/dist/src/containers/Header/Header.js +17 -21
  12. package/dist/src/containers/Header/Header.scss +14 -5
  13. package/dist/src/containers/Header/breadcrumbs.js +65 -71
  14. package/dist/src/containers/Heatmap/Heatmap.js +3 -3
  15. package/dist/src/containers/Nodes/Nodes.js +4 -4
  16. package/dist/src/containers/Nodes/VirtualNodes.js +2 -2
  17. package/dist/src/containers/Storage/Storage.js +2 -2
  18. package/dist/src/containers/Tablets/Tablets.js +8 -8
  19. package/dist/src/containers/TabletsFilters/TabletsFilters.d.ts +2 -57
  20. package/dist/src/containers/TabletsFilters/TabletsFilters.js +70 -180
  21. package/dist/src/containers/Tenant/Acl/Acl.d.ts +3 -1
  22. package/dist/src/containers/Tenant/Acl/Acl.js +7 -17
  23. package/dist/src/containers/Tenant/Diagnostics/Autorefresh/AutorefreshControl.js +4 -5
  24. package/dist/src/containers/Tenant/Diagnostics/Consumers/Consumers.js +3 -3
  25. package/dist/src/containers/Tenant/Diagnostics/Describe/Describe.d.ts +2 -2
  26. package/dist/src/containers/Tenant/Diagnostics/Describe/Describe.js +5 -6
  27. package/dist/src/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.d.ts +1 -0
  28. package/dist/src/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.js +3 -5
  29. package/dist/src/containers/Tenant/Diagnostics/Diagnostics.d.ts +2 -0
  30. package/dist/src/containers/Tenant/Diagnostics/Diagnostics.js +26 -50
  31. package/dist/src/containers/Tenant/Diagnostics/Diagnostics.scss +1 -1
  32. package/dist/src/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +19 -58
  33. package/dist/src/containers/Tenant/Diagnostics/Network/Network.d.ts +2 -2
  34. package/dist/src/containers/Tenant/Diagnostics/Network/Network.js +5 -5
  35. package/dist/src/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.js +1 -6
  36. package/dist/src/containers/Tenant/Diagnostics/Overview/ChangefeedInfo/ChangefeedInfo.d.ts +2 -1
  37. package/dist/src/containers/Tenant/Diagnostics/Overview/ChangefeedInfo/ChangefeedInfo.js +3 -8
  38. package/dist/src/containers/Tenant/Diagnostics/Overview/Overview.d.ts +2 -2
  39. package/dist/src/containers/Tenant/Diagnostics/Overview/Overview.js +19 -21
  40. package/dist/src/containers/Tenant/Diagnostics/Overview/TableInfo/TableInfo.scss +0 -2
  41. package/dist/src/containers/Tenant/Diagnostics/Overview/TopicInfo/TopicInfo.d.ts +2 -1
  42. package/dist/src/containers/Tenant/Diagnostics/Overview/TopicInfo/TopicInfo.js +3 -8
  43. package/dist/src/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.d.ts +3 -1
  44. package/dist/src/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.js +5 -5
  45. package/dist/src/containers/Tenant/Diagnostics/Partitions/Partitions.js +4 -12
  46. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/Healthcheck.scss +48 -57
  47. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckDetails.d.ts +2 -5
  48. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckDetails.js +7 -2
  49. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.d.ts +1 -6
  50. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.js +22 -16
  51. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.d.ts +2 -8
  52. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.js +2 -2
  53. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TenantCpu.d.ts +2 -2
  54. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TenantCpu.js +2 -2
  55. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.d.ts +2 -2
  56. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js +4 -4
  57. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.d.ts +2 -2
  58. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js +4 -4
  59. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.d.ts +2 -2
  60. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +4 -4
  61. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.d.ts +2 -1
  62. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js +5 -5
  63. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantDashboard/TenantDashboard.js +3 -3
  64. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TenantMemory.d.ts +2 -2
  65. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TenantMemory.js +2 -2
  66. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.d.ts +2 -2
  67. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js +4 -4
  68. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +7 -9
  69. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +3 -3
  70. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.js +3 -3
  71. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/useHealthcheck.js +1 -1
  72. package/dist/src/containers/Tenant/Diagnostics/TopQueries/TopQueries.d.ts +2 -2
  73. package/dist/src/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +5 -5
  74. package/dist/src/containers/Tenant/Diagnostics/TopShards/TopShards.d.ts +3 -2
  75. package/dist/src/containers/Tenant/Diagnostics/TopShards/TopShards.js +8 -8
  76. package/dist/src/containers/Tenant/Info/ExternalDataSource/ExternalDataSource.js +0 -6
  77. package/dist/src/containers/Tenant/Info/ExternalTable/ExternalTable.js +0 -6
  78. package/dist/src/containers/Tenant/Info/View/View.js +0 -6
  79. package/dist/src/containers/Tenant/ObjectGeneral/ObjectGeneral.d.ts +2 -1
  80. package/dist/src/containers/Tenant/ObjectGeneral/ObjectGeneral.js +7 -13
  81. package/dist/src/containers/Tenant/ObjectSummary/ObjectSummary.d.ts +4 -4
  82. package/dist/src/containers/Tenant/ObjectSummary/ObjectSummary.js +159 -63
  83. package/dist/src/containers/Tenant/Query/Issues/Issues.js +6 -5
  84. package/dist/src/containers/Tenant/Query/Preview/Preview.d.ts +2 -1
  85. package/dist/src/containers/Tenant/Query/Preview/Preview.js +6 -6
  86. package/dist/src/containers/Tenant/Query/Query.d.ts +1 -0
  87. package/dist/src/containers/Tenant/Query/Query.scss +1 -1
  88. package/dist/src/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +2 -0
  89. package/dist/src/containers/Tenant/Query/QueryEditor/QueryEditor.js +9 -22
  90. package/dist/src/containers/Tenant/Query/i18n/en.json +1 -1
  91. package/dist/src/containers/Tenant/Schema/SchemaTree/SchemaTree.d.ts +1 -0
  92. package/dist/src/containers/Tenant/Schema/SchemaTree/SchemaTree.js +11 -19
  93. package/dist/src/containers/Tenant/Schema/SchemaViewer/SchemaViewer.d.ts +2 -2
  94. package/dist/src/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +13 -8
  95. package/dist/src/containers/Tenant/Schema/SchemaViewer/columns.d.ts +2 -1
  96. package/dist/src/containers/Tenant/Schema/SchemaViewer/columns.js +21 -2
  97. package/dist/src/containers/Tenant/Schema/SchemaViewer/i18n/en.json +1 -0
  98. package/dist/src/containers/Tenant/Schema/SchemaViewer/i18n/index.d.ts +1 -1
  99. package/dist/src/containers/Tenant/Schema/SchemaViewer/prepareData.js +2 -1
  100. package/dist/src/containers/Tenant/Schema/SchemaViewer/types.d.ts +1 -0
  101. package/dist/src/containers/Tenant/Tenant.js +20 -36
  102. package/dist/src/containers/Tenant/Tenant.scss +4 -0
  103. package/dist/src/containers/Tenant/TenantNavigation/TenantNavigation.d.ts +2 -0
  104. package/dist/src/containers/Tenant/TenantNavigation/TenantNavigation.js +19 -0
  105. package/dist/src/containers/Tenant/TenantNavigation/TenantNavigation.scss +18 -0
  106. package/dist/src/containers/Tenant/TenantNavigation/useTenantNavigation.d.ts +9 -0
  107. package/dist/src/containers/Tenant/TenantNavigation/useTenantNavigation.js +44 -0
  108. package/dist/src/containers/Tenant/i18n/en.json +17 -0
  109. package/dist/src/containers/Tenant/i18n/index.d.ts +1 -1
  110. package/dist/src/containers/Tenant/utils/queryTemplates.d.ts +1 -0
  111. package/dist/src/containers/Tenant/utils/queryTemplates.js +12 -0
  112. package/dist/src/containers/Tenant/utils/schemaActions.js +3 -1
  113. package/dist/src/lib.d.ts +1 -1
  114. package/dist/src/lib.js +1 -1
  115. package/dist/src/routes.d.ts +1 -1
  116. package/dist/src/routes.js +3 -1
  117. package/dist/src/services/api.d.ts +6 -1
  118. package/dist/src/services/api.js +23 -3
  119. package/dist/src/services/settings.d.ts +1 -0
  120. package/dist/src/services/settings.js +3 -2
  121. package/dist/src/store/configureStore.d.ts +36 -134
  122. package/dist/src/store/configureStore.js +2 -15
  123. package/dist/src/store/defaultStore.d.ts +17 -81
  124. package/dist/src/store/reducers/api.js +0 -1
  125. package/dist/src/store/reducers/authentication/authentication.d.ts +51 -243
  126. package/dist/src/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +196 -849
  127. package/dist/src/store/reducers/healthcheckInfo/healthcheckInfo.js +3 -3
  128. package/dist/src/store/reducers/hotKeys/hotKeys.d.ts +6 -25
  129. package/dist/src/store/reducers/hotKeys/hotKeys.js +36 -49
  130. package/dist/src/store/reducers/index.d.ts +23 -100
  131. package/dist/src/store/reducers/index.js +0 -8
  132. package/dist/src/store/reducers/node/selectors.d.ts +0 -40
  133. package/dist/src/store/reducers/nodesList.d.ts +0 -40
  134. package/dist/src/store/reducers/schema/schema.d.ts +13 -149
  135. package/dist/src/store/reducers/schema/schema.js +45 -90
  136. package/dist/src/store/reducers/schema/types.d.ts +2 -21
  137. package/dist/src/store/reducers/schemaAcl/schemaAcl.d.ts +8 -135
  138. package/dist/src/store/reducers/schemaAcl/schemaAcl.js +18 -44
  139. package/dist/src/store/reducers/settings/settings.d.ts +17 -23
  140. package/dist/src/store/reducers/settings/settings.js +40 -33
  141. package/dist/src/store/reducers/settings/types.d.ts +1 -12
  142. package/dist/src/store/reducers/tablets.d.ts +288 -41
  143. package/dist/src/store/reducers/tablets.js +8 -4
  144. package/dist/src/store/reducers/tabletsFilters.d.ts +11 -164
  145. package/dist/src/store/reducers/tabletsFilters.js +14 -76
  146. package/dist/src/store/reducers/tenants/selectors.d.ts +8 -362
  147. package/dist/src/store/reducers/topic.d.ts +0 -600
  148. package/dist/src/store/state-url-mapping.js +0 -3
  149. package/dist/src/utils/constants.d.ts +1 -1
  150. package/dist/src/utils/constants.js +1 -1
  151. package/dist/src/utils/dataFormatters/dataFormatters.d.ts +2 -1
  152. package/dist/src/utils/dataFormatters/dataFormatters.js +7 -3
  153. package/dist/src/utils/hooks/index.d.ts +1 -0
  154. package/dist/src/utils/hooks/index.js +1 -0
  155. package/dist/src/utils/hooks/useAutoRefreshInterval.d.ts +1 -0
  156. package/dist/src/utils/hooks/useAutoRefreshInterval.js +5 -0
  157. package/dist/src/utils/utils.js +2 -1
  158. package/package.json +2 -1
  159. package/dist/src/components/InfoViewer/schemaOverview/CDCStreamOverview.d.ts +0 -6
  160. package/dist/src/components/InfoViewer/schemaOverview/CDCStreamOverview.js +0 -17
  161. package/dist/src/components/InfoViewer/schemaOverview/PersQueueGroupOverview.d.ts +0 -6
  162. package/dist/src/components/InfoViewer/schemaOverview/PersQueueGroupOverview.js +0 -20
  163. package/dist/src/components/InfoViewer/schemaOverview/index.d.ts +0 -2
  164. package/dist/src/components/InfoViewer/schemaOverview/index.js +0 -2
  165. package/dist/src/containers/AsideNavigation/i18n/ru.json +0 -10
  166. package/dist/src/containers/AsideNavigation/useNavigationMenuItems.d.ts +0 -2
  167. package/dist/src/containers/AsideNavigation/useNavigationMenuItems.js +0 -54
  168. package/dist/src/store/reducers/host.d.ts +0 -130
  169. package/dist/src/store/reducers/host.js +0 -26
  170. package/dist/src/store/reducers/hotKeys/types.d.ts +0 -10
  171. package/dist/src/store/reducers/hotKeys/types.js +0 -1
  172. package/dist/src/store/reducers/schemaAcl/types.d.ts +0 -12
  173. package/dist/src/store/reducers/schemaAcl/types.js +0 -1
  174. package/dist/src/types/store/host.d.ts +0 -15
  175. package/dist/src/types/store/host.js +0 -1
@@ -32,9 +32,6 @@ const paramSetup = {
32
32
  stateKey: 'heatmap.currentMetric',
33
33
  initialState: initialHeatmapState.currentMetric,
34
34
  },
35
- schema: {
36
- stateKey: 'schema.currentSchemaPath',
37
- },
38
35
  stateFilter: {
39
36
  stateKey: 'tablets.stateFilter',
40
37
  type: 'array',
@@ -104,4 +104,4 @@ export declare const QUERY_USE_MULTI_SCHEMA_KEY = "queryUseMultiSchema";
104
104
  export declare const USE_CLUSTER_BALANCER_AS_BACKEND_KEY = "useClusterBalancerAsBacked";
105
105
  export declare const ENABLE_AUTOCOMPLETE = "enableAutocomplete";
106
106
  export declare const AUTOCOMPLETE_ON_ENTER = "autocompleteOnEnter";
107
- export declare const IS_HOTKEYS_HELP_HIDDDEN_KEY = "isHotKeysHelpHidden";
107
+ export declare const IS_HOTKEYS_HELP_HIDDEN_KEY = "isHotKeysHelpHidden";
@@ -102,4 +102,4 @@ export const QUERY_USE_MULTI_SCHEMA_KEY = 'queryUseMultiSchema';
102
102
  export const USE_CLUSTER_BALANCER_AS_BACKEND_KEY = 'useClusterBalancerAsBacked';
103
103
  export const ENABLE_AUTOCOMPLETE = 'enableAutocomplete';
104
104
  export const AUTOCOMPLETE_ON_ENTER = 'autocompleteOnEnter';
105
- export const IS_HOTKEYS_HELP_HIDDDEN_KEY = 'isHotKeysHelpHidden';
105
+ export const IS_HOTKEYS_HELP_HIDDEN_KEY = 'isHotKeysHelpHidden';
@@ -14,9 +14,10 @@ export declare const formatStorageValues: (value?: number, total?: number, size?
14
14
  export declare const formatStorageValuesToGb: (value?: number, total?: number) => string[];
15
15
  export declare const formatStorageValuesToTb: (value?: number, total?: number) => string[];
16
16
  export declare const formatNumber: (number?: unknown) => string;
17
+ export declare const formatSecondsToHours: (seconds: number) => string;
17
18
  export declare const roundToPrecision: (value: number | string, precision?: number) => number;
18
19
  export declare const formatCPU: (value?: number | string) => string | undefined;
19
20
  export declare const formatCPUWithLabel: (value?: number) => string | undefined;
20
- export declare const formatDateTime: (value?: number | string) => string;
21
+ export declare const formatDateTime: (value?: number | string, defaultValue?: string) => string;
21
22
  export declare const calcUptimeInSeconds: (milliseconds: number | string) => number;
22
23
  export declare const calcUptime: (milliseconds?: number | string) => string;
@@ -1,6 +1,6 @@
1
1
  import { dateTimeParse } from '@gravity-ui/date-utils';
2
2
  import { formatBytes as formatBytesCustom, getSizeWithSignificantDigits, } from '../bytesParsers/formatBytes';
3
- import { DAY_IN_SECONDS, GIGABYTE } from '../constants';
3
+ import { DAY_IN_SECONDS, GIGABYTE, HOUR_IN_SECONDS } from '../constants';
4
4
  import { configuredNumeral } from '../numeral';
5
5
  import { isNumeric } from '../utils';
6
6
  import i18n from './i18n';
@@ -71,6 +71,10 @@ export const formatNumber = (number) => {
71
71
  // "," in format is delimiter sign, not delimiter itself
72
72
  return configuredNumeral(number).format('0,0.[00000]');
73
73
  };
74
+ export const formatSecondsToHours = (seconds) => {
75
+ const hours = (seconds / HOUR_IN_SECONDS).toFixed(2);
76
+ return `${formatNumber(hours)} hours`;
77
+ };
74
78
  export const roundToPrecision = (value, precision = 0) => {
75
79
  let [digits] = String(value).split('.');
76
80
  if (Number(value) < 1) {
@@ -99,13 +103,13 @@ export const formatCPUWithLabel = (value) => {
99
103
  const localizedCores = configuredNumeral(cores).format('0.[000]');
100
104
  return `${localizedCores} ${i18n('format-cpu.cores', { count: cores })}`;
101
105
  };
102
- export const formatDateTime = (value) => {
106
+ export const formatDateTime = (value, defaultValue = 'N/A') => {
103
107
  var _a;
104
108
  if (!isNumeric(value)) {
105
109
  return '';
106
110
  }
107
111
  const formattedData = (_a = dateTimeParse(Number(value))) === null || _a === void 0 ? void 0 : _a.format('YYYY-MM-DD HH:mm');
108
- return Number(value) > 0 && formattedData ? formattedData : 'N/A';
112
+ return Number(value) > 0 && formattedData ? formattedData : defaultValue;
109
113
  };
110
114
  export const calcUptimeInSeconds = (milliseconds) => {
111
115
  const currentDate = new Date();
@@ -4,5 +4,6 @@ export * from './useSetting';
4
4
  export * from './useQueryModes';
5
5
  export * from './useTableSort';
6
6
  export * from './useSearchQuery';
7
+ export * from './useAutoRefreshInterval';
7
8
  export * from './useNodesRequestParams';
8
9
  export * from './useStorageRequestParams';
@@ -4,5 +4,6 @@ export * from './useSetting';
4
4
  export * from './useQueryModes';
5
5
  export * from './useTableSort';
6
6
  export * from './useSearchQuery';
7
+ export * from './useAutoRefreshInterval';
7
8
  export * from './useNodesRequestParams';
8
9
  export * from './useStorageRequestParams';
@@ -0,0 +1 @@
1
+ export declare function useAutoRefreshInterval(): [number, (value: number) => void];
@@ -0,0 +1,5 @@
1
+ import { AUTO_REFRESH_INTERVAL } from '../constants';
2
+ import { useSetting } from './useSetting';
3
+ export function useAutoRefreshInterval() {
4
+ return useSetting(AUTO_REFRESH_INTERVAL, 0);
5
+ }
@@ -25,8 +25,9 @@ export function bytesToSize(bytes) {
25
25
  if (isNaN(bytes)) {
26
26
  return '';
27
27
  }
28
- if (bytes < base)
28
+ if (bytes < base) {
29
29
  return String(bytes);
30
+ }
30
31
  let i = parseInt(Math.floor(Math.log(bytes) / Math.log(base)), 10);
31
32
  if (i >= sizes.length) {
32
33
  i = sizes.length - 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ydb-embedded-ui",
3
- "version": "6.6.1",
3
+ "version": "6.7.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -24,6 +24,7 @@
24
24
  "@gravity-ui/websql-autocomplete": "^9.1.0",
25
25
  "@reduxjs/toolkit": "^2.2.3",
26
26
  "axios": "^1.6.8",
27
+ "axios-retry": "^4.4.0",
27
28
  "colord": "^2.9.3",
28
29
  "copy-to-clipboard": "^3.3.3",
29
30
  "crc-32": "^1.2.2",
@@ -1,6 +0,0 @@
1
- import type { TEvDescribeSchemeResult } from '../../../types/api/schema';
2
- interface CDCStreamOverviewProps {
3
- data?: TEvDescribeSchemeResult;
4
- }
5
- export declare const CDCStreamOverview: ({ data }: CDCStreamOverviewProps) => import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,17 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import React from 'react';
3
- import { InfoViewer, formatObject } from '..';
4
- import { formatCdcStreamItem, formatCommonItem } from '../formatters';
5
- export const CDCStreamOverview = ({ data }) => {
6
- var _a, _b, _c, _d, _e;
7
- if (!data) {
8
- return _jsx("div", { className: "error", children: "No CDC Stream data" });
9
- }
10
- const TableIndex = (_a = data.PathDescription) === null || _a === void 0 ? void 0 : _a.CdcStreamDescription;
11
- const info = [];
12
- info.push(formatCommonItem('PathType', (_c = (_b = data.PathDescription) === null || _b === void 0 ? void 0 : _b.Self) === null || _c === void 0 ? void 0 : _c.PathType));
13
- info.push(formatCommonItem('CreateStep', (_e = (_d = data.PathDescription) === null || _d === void 0 ? void 0 : _d.Self) === null || _e === void 0 ? void 0 : _e.CreateStep));
14
- const { Mode, Format } = TableIndex || {};
15
- info.push(...formatObject(formatCdcStreamItem, { Mode, Format }));
16
- return (_jsx(React.Fragment, { children: info.length ? _jsx(InfoViewer, { info: info }) : 'Empty' }));
17
- };
@@ -1,6 +0,0 @@
1
- import type { TEvDescribeSchemeResult } from '../../../types/api/schema';
2
- interface PersQueueGroupOverviewProps {
3
- data?: TEvDescribeSchemeResult;
4
- }
5
- export declare const PersQueueGroupOverview: ({ data }: PersQueueGroupOverviewProps) => import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,20 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import React from 'react';
3
- import { InfoViewer } from '..';
4
- import { formatCommonItem, formatPQGroupItem } from '../formatters';
5
- export const PersQueueGroupOverview = ({ data }) => {
6
- var _a, _b, _c, _d, _e;
7
- if (!data) {
8
- return _jsx("div", { className: "error", children: "No PersQueueGroup data" });
9
- }
10
- const pqGroup = (_a = data.PathDescription) === null || _a === void 0 ? void 0 : _a.PersQueueGroup;
11
- const info = [];
12
- info.push(formatCommonItem('PathType', (_c = (_b = data.PathDescription) === null || _b === void 0 ? void 0 : _b.Self) === null || _c === void 0 ? void 0 : _c.PathType));
13
- info.push(formatCommonItem('CreateStep', (_e = (_d = data.PathDescription) === null || _d === void 0 ? void 0 : _d.Self) === null || _e === void 0 ? void 0 : _e.CreateStep));
14
- //@ts-expect-error
15
- info.push(formatPQGroupItem('Partitions', (pqGroup === null || pqGroup === void 0 ? void 0 : pqGroup.Partitions) || []));
16
- info.push(
17
- //@ts-expect-error
18
- formatPQGroupItem('PQTabletConfig', (pqGroup === null || pqGroup === void 0 ? void 0 : pqGroup.PQTabletConfig) || { PartitionConfig: { LifetimeSeconds: 0 } }));
19
- return (_jsx(React.Fragment, { children: info.length ? _jsx(InfoViewer, { info: info }) : 'Empty' }));
20
- };
@@ -1,2 +0,0 @@
1
- export * from './CDCStreamOverview';
2
- export * from './PersQueueGroupOverview';
@@ -1,2 +0,0 @@
1
- export * from './CDCStreamOverview';
2
- export * from './PersQueueGroupOverview';
@@ -1,10 +0,0 @@
1
- {
2
- "pages.query": "Редактор запросов",
3
- "pages.diagnostics": "Диагностика",
4
- "navigation-item.documentation": "Документация",
5
- "navigation-item.settings": "Настройки",
6
- "navigation-item.account": "Аккаунт",
7
- "account.user": "Пользователь YDB",
8
- "account.login": "Войти",
9
- "account.logout": "Выйти"
10
- }
@@ -1,2 +0,0 @@
1
- import type { MenuItem as AsideHeaderMenuItem } from '@gravity-ui/navigation';
2
- export declare function useNavigationMenuItems(): AsideHeaderMenuItem[];
@@ -1,54 +0,0 @@
1
- import React from 'react';
2
- import { Pulse, Terminal } from '@gravity-ui/icons';
3
- import { useHistory, useLocation } from 'react-router';
4
- import routes, { parseQuery } from '../../routes';
5
- import { TENANT_PAGE, TENANT_PAGES_IDS } from '../../store/reducers/tenant/constants';
6
- import { TENANT_INITIAL_PAGE_KEY } from '../../utils/constants';
7
- import { useSetting, useTypedSelector } from '../../utils/hooks';
8
- import { getTenantPath } from '../Tenant/TenantPages';
9
- import i18n from './i18n';
10
- export function useNavigationMenuItems() {
11
- const location = useLocation();
12
- const history = useHistory();
13
- const [, setInitialTenantPage] = useSetting(TENANT_INITIAL_PAGE_KEY);
14
- const { tenantPage } = useTypedSelector((state) => state.tenant);
15
- const { pathname } = location;
16
- const queryParams = parseQuery(location);
17
- const isTenantPage = pathname === routes.tenant;
18
- const menuItems = React.useMemo(() => {
19
- if (!isTenantPage) {
20
- return [];
21
- }
22
- const items = [
23
- {
24
- id: TENANT_PAGES_IDS.query,
25
- title: i18n('pages.query'),
26
- icon: Terminal,
27
- iconSize: 20,
28
- location: getTenantPath(Object.assign(Object.assign({}, queryParams), { [TENANT_PAGE]: TENANT_PAGES_IDS.query })),
29
- },
30
- {
31
- id: TENANT_PAGES_IDS.diagnostics,
32
- title: i18n('pages.diagnostics'),
33
- icon: Pulse,
34
- iconSize: 20,
35
- location: getTenantPath(Object.assign(Object.assign({}, queryParams), { [TENANT_PAGE]: TENANT_PAGES_IDS.diagnostics })),
36
- },
37
- ];
38
- return items.map((item) => {
39
- const current = item.id === tenantPage;
40
- return {
41
- id: item.id,
42
- title: item.title,
43
- icon: item.icon,
44
- iconSize: item.iconSize,
45
- current,
46
- onItemClick: () => {
47
- setInitialTenantPage(item.id);
48
- history.push(item.location);
49
- },
50
- };
51
- });
52
- }, [tenantPage, isTenantPage, setInitialTenantPage, history, queryParams]);
53
- return menuItems;
54
- }
@@ -1,130 +0,0 @@
1
- import type { Reducer } from '@reduxjs/toolkit';
2
- import type { IHostAction, IHostState } from '../../types/store/host';
3
- export declare const FETCH_HOST: {
4
- readonly REQUEST: "host/FETCH_HOST_REQUEST";
5
- readonly SUCCESS: "host/FETCH_HOST_SUCCESS";
6
- readonly FAILURE: "host/FETCH_HOST_FAILURE";
7
- };
8
- declare const host: Reducer<IHostState, IHostAction>;
9
- export declare function getHostInfo(): (dispatch: import("redux-thunk").ThunkDispatch<{
10
- api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
11
- singleClusterMode: boolean;
12
- cluster: import("./cluster/types").ClusterState;
13
- tenant: import("./tenant/types").TenantState;
14
- tooltip: import("../../types/store/tooltip").ITooltipState;
15
- tablets: import("../../types/store/tablets").TabletsState;
16
- schema: import("./schema/types").SchemaState;
17
- host: IHostState;
18
- tenants: import("./tenants/types").TenantsState;
19
- partitions: import("./partitions/types").PartitionsState;
20
- executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
21
- tabletsFilters: {
22
- loading: boolean;
23
- requestTime: number;
24
- data: undefined;
25
- wasLoaded: boolean;
26
- stateFilter: never[];
27
- typeFilter: never[];
28
- } | {
29
- tabletsData: any;
30
- nodes: any;
31
- loading: boolean;
32
- wasLoaded: boolean;
33
- timeoutForRequest: number;
34
- error: undefined;
35
- data: undefined;
36
- stateFilter: never[];
37
- typeFilter: never[];
38
- } | {
39
- error: any;
40
- loading: boolean;
41
- data: undefined;
42
- wasLoaded: boolean;
43
- stateFilter: never[];
44
- typeFilter: never[];
45
- } | {
46
- stateFilter: any;
47
- data: undefined;
48
- loading: boolean;
49
- wasLoaded: boolean;
50
- typeFilter: never[];
51
- } | {
52
- typeFilter: any;
53
- data: undefined;
54
- loading: boolean;
55
- wasLoaded: boolean;
56
- stateFilter: never[];
57
- };
58
- heatmap: import("../../types/store/heatmap").IHeatmapState;
59
- settings: import("./settings/types").SettingsState;
60
- schemaAcl: import("./schemaAcl/types").SchemaAclState;
61
- executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
62
- shardsWorkload: import("./shardsWorkload/types").ShardsWorkloadFilters;
63
- hotKeys: import("./hotKeys/types").HotKeysState;
64
- authentication: import("./authentication/types").AuthenticationState;
65
- header: import("./header/types").HeaderState;
66
- saveQuery: string | null;
67
- fullscreen: boolean;
68
- clusters: import("./clusters/types").ClustersFilters;
69
- }, undefined, import("redux").UnknownAction> & import("redux").Dispatch<any>, getState: () => {
70
- api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
71
- singleClusterMode: boolean;
72
- cluster: import("./cluster/types").ClusterState;
73
- tenant: import("./tenant/types").TenantState;
74
- tooltip: import("../../types/store/tooltip").ITooltipState;
75
- tablets: import("../../types/store/tablets").TabletsState;
76
- schema: import("./schema/types").SchemaState;
77
- host: IHostState;
78
- tenants: import("./tenants/types").TenantsState;
79
- partitions: import("./partitions/types").PartitionsState;
80
- executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
81
- tabletsFilters: {
82
- loading: boolean;
83
- requestTime: number;
84
- data: undefined;
85
- wasLoaded: boolean;
86
- stateFilter: never[];
87
- typeFilter: never[];
88
- } | {
89
- tabletsData: any;
90
- nodes: any;
91
- loading: boolean;
92
- wasLoaded: boolean;
93
- timeoutForRequest: number;
94
- error: undefined;
95
- data: undefined;
96
- stateFilter: never[];
97
- typeFilter: never[];
98
- } | {
99
- error: any;
100
- loading: boolean;
101
- data: undefined;
102
- wasLoaded: boolean;
103
- stateFilter: never[];
104
- typeFilter: never[];
105
- } | {
106
- stateFilter: any;
107
- data: undefined;
108
- loading: boolean;
109
- wasLoaded: boolean;
110
- typeFilter: never[];
111
- } | {
112
- typeFilter: any;
113
- data: undefined;
114
- loading: boolean;
115
- wasLoaded: boolean;
116
- stateFilter: never[];
117
- };
118
- heatmap: import("../../types/store/heatmap").IHeatmapState;
119
- settings: import("./settings/types").SettingsState;
120
- schemaAcl: import("./schemaAcl/types").SchemaAclState;
121
- executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
122
- shardsWorkload: import("./shardsWorkload/types").ShardsWorkloadFilters;
123
- hotKeys: import("./hotKeys/types").HotKeysState;
124
- authentication: import("./authentication/types").AuthenticationState;
125
- header: import("./header/types").HeaderState;
126
- saveQuery: string | null;
127
- fullscreen: boolean;
128
- clusters: import("./clusters/types").ClustersFilters;
129
- }) => Promise<unknown>;
130
- export default host;
@@ -1,26 +0,0 @@
1
- import { createApiRequest, createRequestActionTypes } from '../utils';
2
- export const FETCH_HOST = createRequestActionTypes('host', 'FETCH_HOST');
3
- const initialState = { loading: true, wasLoaded: false, data: {} };
4
- const host = (state = initialState, action) => {
5
- var _a;
6
- switch (action.type) {
7
- case FETCH_HOST.REQUEST: {
8
- return Object.assign(Object.assign({}, state), { loading: true });
9
- }
10
- case FETCH_HOST.SUCCESS: {
11
- return Object.assign(Object.assign({}, state), { data: (_a = action.data.SystemStateInfo) === null || _a === void 0 ? void 0 : _a[0], loading: false, wasLoaded: true, error: undefined });
12
- }
13
- case FETCH_HOST.FAILURE: {
14
- return Object.assign(Object.assign({}, state), { error: action.error, loading: false });
15
- }
16
- default:
17
- return state;
18
- }
19
- };
20
- export function getHostInfo() {
21
- return createApiRequest({
22
- request: window.api.getHostInfo(),
23
- actions: FETCH_HOST,
24
- });
25
- }
26
- export default host;
@@ -1,10 +0,0 @@
1
- import type { IResponseError } from '../../../types/api/error';
2
- import type { HotKey } from '../../../types/api/hotkeys';
3
- import type { setHotKeysData, setHotKeysDataWasNotLoaded, setHotKeysError, setHotKeysLoading } from './hotKeys';
4
- export interface HotKeysState {
5
- loading: boolean;
6
- wasLoaded: boolean;
7
- data: null | HotKey[];
8
- error?: IResponseError;
9
- }
10
- export type HotKeysAction = ReturnType<typeof setHotKeysDataWasNotLoaded> | ReturnType<typeof setHotKeysLoading> | ReturnType<typeof setHotKeysData> | ReturnType<typeof setHotKeysError>;
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- import type { TACE, TMetaInfo } from '../../../types/api/acl';
2
- import type { IResponseError } from '../../../types/api/error';
3
- import type { ApiRequestAction } from '../../utils';
4
- import type { FETCH_SCHEMA_ACL, setAclWasNotLoaded } from './schemaAcl';
5
- export interface SchemaAclState {
6
- loading: boolean;
7
- wasLoaded: boolean;
8
- acl?: TACE[];
9
- owner?: string;
10
- error?: IResponseError;
11
- }
12
- export type SchemaAclAction = ApiRequestAction<typeof FETCH_SCHEMA_ACL, TMetaInfo, IResponseError> | ReturnType<typeof setAclWasNotLoaded>;
@@ -1 +0,0 @@
1
- export {};
@@ -1,15 +0,0 @@
1
- import type { FETCH_HOST } from '../../store/reducers/host';
2
- import type { ApiRequestAction } from '../../store/utils';
3
- import type { IResponseError } from '../api/error';
4
- import type { TSystemStateInfo } from '../api/nodes';
5
- import type { TEvSystemStateResponse } from '../api/systemState';
6
- export interface IHostState {
7
- loading: boolean;
8
- wasLoaded: boolean;
9
- data?: TSystemStateInfo;
10
- error?: IResponseError;
11
- }
12
- export type IHostAction = ApiRequestAction<typeof FETCH_HOST, TEvSystemStateResponse, IResponseError>;
13
- export interface IHostRootStateSlice {
14
- host: IHostState;
15
- }
@@ -1 +0,0 @@
1
- export {};