ydb-embedded-ui 6.6.1 → 6.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (201) hide show
  1. package/dist/package.json +31 -30
  2. package/dist/src/components/InfoViewer/InfoViewer.d.ts +1 -1
  3. package/dist/src/components/InfoViewer/InfoViewer.js +2 -1
  4. package/dist/src/components/InfoViewer/i18n/en.json +2 -1
  5. package/dist/src/components/InfoViewer/i18n/index.d.ts +1 -1
  6. package/dist/src/components/InfoViewer/i18n/index.js +1 -2
  7. package/dist/src/containers/App/App.d.ts +1 -1
  8. package/dist/src/containers/App/Content.js +1 -1
  9. package/dist/src/containers/App/appSlots.d.ts +1 -1
  10. package/dist/src/containers/AppWithClusters/AppWithClusters.js +1 -1
  11. package/dist/src/containers/AsideNavigation/Navigation.js +1 -3
  12. package/dist/src/containers/AsideNavigation/i18n/en.json +0 -2
  13. package/dist/src/containers/AsideNavigation/i18n/index.d.ts +1 -1
  14. package/dist/src/containers/AsideNavigation/i18n/index.js +1 -2
  15. package/dist/src/containers/Cluster/i18n/index.d.ts +1 -1
  16. package/dist/src/containers/Clusters/constants.d.ts +1 -1
  17. package/dist/src/containers/Header/Header.js +17 -21
  18. package/dist/src/containers/Header/Header.scss +14 -5
  19. package/dist/src/containers/Header/breadcrumbs.js +65 -71
  20. package/dist/src/containers/Heatmap/Heatmap.js +3 -3
  21. package/dist/src/containers/Nodes/Nodes.js +4 -4
  22. package/dist/src/containers/Nodes/VirtualNodes.js +2 -2
  23. package/dist/src/containers/Storage/Storage.js +2 -2
  24. package/dist/src/containers/Storage/StorageGroups/getStorageGroupsColumns.js +4 -3
  25. package/dist/src/containers/Tablets/Tablets.js +8 -8
  26. package/dist/src/containers/TabletsFilters/TabletsFilters.d.ts +2 -57
  27. package/dist/src/containers/TabletsFilters/TabletsFilters.js +70 -180
  28. package/dist/src/containers/Tenant/Acl/Acl.d.ts +3 -1
  29. package/dist/src/containers/Tenant/Acl/Acl.js +85 -69
  30. package/dist/src/containers/Tenant/Acl/Acl.scss +14 -9
  31. package/dist/src/containers/Tenant/Diagnostics/Autorefresh/AutorefreshControl.js +4 -5
  32. package/dist/src/containers/Tenant/Diagnostics/Consumers/Consumers.js +3 -3
  33. package/dist/src/containers/Tenant/Diagnostics/Describe/Describe.d.ts +2 -2
  34. package/dist/src/containers/Tenant/Diagnostics/Describe/Describe.js +5 -6
  35. package/dist/src/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.d.ts +1 -0
  36. package/dist/src/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.js +3 -5
  37. package/dist/src/containers/Tenant/Diagnostics/Diagnostics.d.ts +2 -0
  38. package/dist/src/containers/Tenant/Diagnostics/Diagnostics.js +26 -50
  39. package/dist/src/containers/Tenant/Diagnostics/Diagnostics.scss +1 -1
  40. package/dist/src/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +19 -58
  41. package/dist/src/containers/Tenant/Diagnostics/Network/Network.d.ts +2 -2
  42. package/dist/src/containers/Tenant/Diagnostics/Network/Network.js +5 -5
  43. package/dist/src/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.js +1 -6
  44. package/dist/src/containers/Tenant/Diagnostics/Overview/ChangefeedInfo/ChangefeedInfo.d.ts +2 -1
  45. package/dist/src/containers/Tenant/Diagnostics/Overview/ChangefeedInfo/ChangefeedInfo.js +3 -8
  46. package/dist/src/containers/Tenant/Diagnostics/Overview/Overview.d.ts +2 -2
  47. package/dist/src/containers/Tenant/Diagnostics/Overview/Overview.js +19 -21
  48. package/dist/src/containers/Tenant/Diagnostics/Overview/TableInfo/TableInfo.js +3 -3
  49. package/dist/src/containers/Tenant/Diagnostics/Overview/TableInfo/TableInfo.scss +0 -2
  50. package/dist/src/containers/Tenant/Diagnostics/Overview/TopicInfo/TopicInfo.d.ts +2 -1
  51. package/dist/src/containers/Tenant/Diagnostics/Overview/TopicInfo/TopicInfo.js +3 -8
  52. package/dist/src/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.d.ts +3 -1
  53. package/dist/src/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.js +5 -5
  54. package/dist/src/containers/Tenant/Diagnostics/Partitions/Partitions.js +4 -12
  55. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/Healthcheck.scss +48 -57
  56. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckDetails.d.ts +2 -5
  57. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckDetails.js +7 -2
  58. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.d.ts +1 -6
  59. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.js +22 -16
  60. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.d.ts +2 -8
  61. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.js +2 -2
  62. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TenantCpu.d.ts +2 -2
  63. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TenantCpu.js +2 -2
  64. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.d.ts +2 -2
  65. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js +4 -4
  66. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.d.ts +2 -2
  67. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js +4 -4
  68. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.d.ts +2 -2
  69. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +4 -4
  70. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.d.ts +2 -1
  71. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js +5 -5
  72. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantDashboard/TenantDashboard.js +3 -3
  73. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TenantMemory.d.ts +2 -2
  74. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TenantMemory.js +2 -2
  75. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.d.ts +2 -2
  76. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js +4 -4
  77. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +7 -9
  78. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +3 -3
  79. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.js +3 -3
  80. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
  81. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/useHealthcheck.js +1 -1
  82. package/dist/src/containers/Tenant/Diagnostics/TopQueries/TopQueries.d.ts +2 -2
  83. package/dist/src/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +5 -5
  84. package/dist/src/containers/Tenant/Diagnostics/TopShards/TopShards.d.ts +3 -2
  85. package/dist/src/containers/Tenant/Diagnostics/TopShards/TopShards.js +8 -8
  86. package/dist/src/containers/Tenant/EntityTitle/EntityTitle.d.ts +6 -0
  87. package/dist/src/containers/Tenant/EntityTitle/EntityTitle.js +11 -0
  88. package/dist/src/containers/Tenant/Info/ExternalDataSource/ExternalDataSource.js +0 -6
  89. package/dist/src/containers/Tenant/Info/ExternalTable/ExternalTable.js +0 -6
  90. package/dist/src/containers/Tenant/Info/View/View.js +0 -6
  91. package/dist/src/containers/Tenant/ObjectGeneral/ObjectGeneral.d.ts +2 -1
  92. package/dist/src/containers/Tenant/ObjectGeneral/ObjectGeneral.js +7 -13
  93. package/dist/src/containers/Tenant/ObjectSummary/ObjectSummary.d.ts +4 -4
  94. package/dist/src/containers/Tenant/ObjectSummary/ObjectSummary.js +159 -63
  95. package/dist/src/containers/Tenant/Query/Issues/Issues.js +6 -5
  96. package/dist/src/containers/Tenant/Query/Preview/Preview.d.ts +2 -1
  97. package/dist/src/containers/Tenant/Query/Preview/Preview.js +6 -6
  98. package/dist/src/containers/Tenant/Query/Query.d.ts +1 -0
  99. package/dist/src/containers/Tenant/Query/Query.scss +1 -1
  100. package/dist/src/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +2 -0
  101. package/dist/src/containers/Tenant/Query/QueryEditor/QueryEditor.js +9 -22
  102. package/dist/src/containers/Tenant/Query/i18n/en.json +1 -1
  103. package/dist/src/containers/Tenant/Schema/SchemaTree/SchemaTree.d.ts +1 -0
  104. package/dist/src/containers/Tenant/Schema/SchemaTree/SchemaTree.js +11 -19
  105. package/dist/src/containers/Tenant/Schema/SchemaViewer/SchemaViewer.d.ts +2 -2
  106. package/dist/src/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +13 -8
  107. package/dist/src/containers/Tenant/Schema/SchemaViewer/columns.d.ts +2 -1
  108. package/dist/src/containers/Tenant/Schema/SchemaViewer/columns.js +21 -2
  109. package/dist/src/containers/Tenant/Schema/SchemaViewer/i18n/en.json +1 -0
  110. package/dist/src/containers/Tenant/Schema/SchemaViewer/i18n/index.d.ts +1 -1
  111. package/dist/src/containers/Tenant/Schema/SchemaViewer/prepareData.js +2 -1
  112. package/dist/src/containers/Tenant/Schema/SchemaViewer/types.d.ts +1 -0
  113. package/dist/src/containers/Tenant/Tenant.js +20 -36
  114. package/dist/src/containers/Tenant/Tenant.scss +4 -0
  115. package/dist/src/containers/Tenant/TenantNavigation/TenantNavigation.d.ts +2 -0
  116. package/dist/src/containers/Tenant/TenantNavigation/TenantNavigation.js +19 -0
  117. package/dist/src/containers/Tenant/TenantNavigation/TenantNavigation.scss +18 -0
  118. package/dist/src/containers/Tenant/TenantNavigation/useTenantNavigation.d.ts +9 -0
  119. package/dist/src/containers/Tenant/TenantNavigation/useTenantNavigation.js +44 -0
  120. package/dist/src/containers/Tenant/i18n/en.json +22 -1
  121. package/dist/src/containers/Tenant/i18n/index.d.ts +1 -1
  122. package/dist/src/containers/Tenant/utils/index.d.ts +1 -0
  123. package/dist/src/containers/Tenant/utils/index.js +6 -0
  124. package/dist/src/containers/Tenant/utils/queryTemplates.d.ts +4 -0
  125. package/dist/src/containers/Tenant/utils/queryTemplates.js +32 -0
  126. package/dist/src/containers/Tenant/utils/schemaActions.js +18 -2
  127. package/dist/src/containers/UserSettings/Setting.d.ts +7 -9
  128. package/dist/src/containers/UserSettings/Setting.js +13 -28
  129. package/dist/src/containers/UserSettings/UserSettings.d.ts +0 -2
  130. package/dist/src/containers/UserSettings/UserSettings.js +3 -6
  131. package/dist/src/containers/UserSettings/i18n/en.json +2 -2
  132. package/dist/src/containers/UserSettings/settings.js +3 -3
  133. package/dist/src/lib.d.ts +1 -1
  134. package/dist/src/lib.js +1 -1
  135. package/dist/src/routes.d.ts +1 -1
  136. package/dist/src/routes.js +3 -1
  137. package/dist/src/services/api.d.ts +6 -1
  138. package/dist/src/services/api.js +24 -3
  139. package/dist/src/services/settings.d.ts +1 -0
  140. package/dist/src/services/settings.js +3 -2
  141. package/dist/src/store/configureStore.d.ts +36 -134
  142. package/dist/src/store/configureStore.js +2 -15
  143. package/dist/src/store/defaultStore.d.ts +17 -81
  144. package/dist/src/store/reducers/api.js +0 -1
  145. package/dist/src/store/reducers/authentication/authentication.d.ts +51 -243
  146. package/dist/src/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +196 -849
  147. package/dist/src/store/reducers/healthcheckInfo/healthcheckInfo.js +3 -3
  148. package/dist/src/store/reducers/hotKeys/hotKeys.d.ts +6 -25
  149. package/dist/src/store/reducers/hotKeys/hotKeys.js +36 -49
  150. package/dist/src/store/reducers/index.d.ts +23 -100
  151. package/dist/src/store/reducers/index.js +0 -8
  152. package/dist/src/store/reducers/node/selectors.d.ts +0 -40
  153. package/dist/src/store/reducers/nodesList.d.ts +0 -40
  154. package/dist/src/store/reducers/schema/schema.d.ts +13 -149
  155. package/dist/src/store/reducers/schema/schema.js +45 -90
  156. package/dist/src/store/reducers/schema/types.d.ts +2 -21
  157. package/dist/src/store/reducers/schemaAcl/schemaAcl.d.ts +8 -135
  158. package/dist/src/store/reducers/schemaAcl/schemaAcl.js +18 -44
  159. package/dist/src/store/reducers/settings/settings.d.ts +17 -23
  160. package/dist/src/store/reducers/settings/settings.js +40 -33
  161. package/dist/src/store/reducers/settings/types.d.ts +1 -12
  162. package/dist/src/store/reducers/tablets.d.ts +288 -41
  163. package/dist/src/store/reducers/tablets.js +8 -4
  164. package/dist/src/store/reducers/tabletsFilters.d.ts +11 -164
  165. package/dist/src/store/reducers/tabletsFilters.js +14 -76
  166. package/dist/src/store/reducers/tenants/selectors.d.ts +8 -362
  167. package/dist/src/store/reducers/topic.d.ts +0 -600
  168. package/dist/src/store/state-url-mapping.js +0 -3
  169. package/dist/src/styles/mixins.scss +5 -0
  170. package/dist/src/styles/themes.scss +1 -1
  171. package/dist/src/types/api/acl.d.ts +2 -1
  172. package/dist/src/types/api/schema/schema.d.ts +5 -0
  173. package/dist/src/utils/constants.d.ts +1 -1
  174. package/dist/src/utils/constants.js +1 -1
  175. package/dist/src/utils/dataFormatters/dataFormatters.d.ts +2 -1
  176. package/dist/src/utils/dataFormatters/dataFormatters.js +7 -3
  177. package/dist/src/utils/hooks/index.d.ts +1 -0
  178. package/dist/src/utils/hooks/index.js +1 -0
  179. package/dist/src/utils/hooks/useAutoRefreshInterval.d.ts +1 -0
  180. package/dist/src/utils/hooks/useAutoRefreshInterval.js +5 -0
  181. package/dist/src/utils/utils.js +2 -1
  182. package/package.json +31 -30
  183. package/dist/src/components/InfoViewer/i18n/ru.json +0 -4
  184. package/dist/src/components/InfoViewer/schemaOverview/CDCStreamOverview.d.ts +0 -6
  185. package/dist/src/components/InfoViewer/schemaOverview/CDCStreamOverview.js +0 -17
  186. package/dist/src/components/InfoViewer/schemaOverview/PersQueueGroupOverview.d.ts +0 -6
  187. package/dist/src/components/InfoViewer/schemaOverview/PersQueueGroupOverview.js +0 -20
  188. package/dist/src/components/InfoViewer/schemaOverview/index.d.ts +0 -2
  189. package/dist/src/components/InfoViewer/schemaOverview/index.js +0 -2
  190. package/dist/src/containers/AsideNavigation/i18n/ru.json +0 -10
  191. package/dist/src/containers/AsideNavigation/useNavigationMenuItems.d.ts +0 -2
  192. package/dist/src/containers/AsideNavigation/useNavigationMenuItems.js +0 -54
  193. package/dist/src/containers/UserSettings/UserSettings.scss +0 -9
  194. package/dist/src/store/reducers/host.d.ts +0 -130
  195. package/dist/src/store/reducers/host.js +0 -26
  196. package/dist/src/store/reducers/hotKeys/types.d.ts +0 -10
  197. package/dist/src/store/reducers/hotKeys/types.js +0 -1
  198. package/dist/src/store/reducers/schemaAcl/types.d.ts +0 -12
  199. package/dist/src/store/reducers/schemaAcl/types.js +0 -1
  200. package/dist/src/types/store/host.d.ts +0 -15
  201. 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',
@@ -35,6 +35,11 @@
35
35
  line-height: var(--g-text-subheader-3-line-height);
36
36
  }
37
37
 
38
+ @mixin subheader-2-typography() {
39
+ font-size: var(--g-text-subheader-2-font-size);
40
+ line-height: var(--g-text-subheader-2-line-height);
41
+ }
42
+
38
43
  @mixin header-1-typography() {
39
44
  font-size: var(--g-text-header-1-font-size);
40
45
  line-height: var(--g-text-header-1-line-height);
@@ -7,7 +7,7 @@
7
7
 
8
8
  .g-root {
9
9
  --g-text-header-font-weight: 500;
10
- --g-text-subheader-font-weight: 500;
10
+ --g-text-subheader-font-weight: 600;
11
11
  --g-text-display-font-weight: 500;
12
12
  --g-text-accent-font-weight: 500;
13
13
 
@@ -17,7 +17,8 @@ export interface TMetaCommonInfo {
17
17
  export interface TACE {
18
18
  AccessType: string;
19
19
  AccessRights?: string[];
20
+ AccessRules?: string[];
20
21
  Subject: string;
21
22
  InheritanceType?: string[];
22
- AccessRule: string;
23
+ AccessRule?: string;
23
24
  }
@@ -56,6 +56,7 @@ export interface TPathDescription {
56
56
  /** info about the path itself */
57
57
  Self?: TDirEntry;
58
58
  DomainDescription?: TDomainDescription;
59
+ UserAttributes?: TUserAttribute[];
59
60
  Children?: TDirEntry[];
60
61
  Table?: TTableDescription;
61
62
  TableStats?: TTableStats;
@@ -250,4 +251,8 @@ interface TTablePartition {
250
251
  /** uint64 */
251
252
  DatashardId?: string;
252
253
  }
254
+ interface TUserAttribute {
255
+ Key?: string;
256
+ Value?: string;
257
+ }
253
258
  export {};
@@ -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.8.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -12,18 +12,19 @@
12
12
  "dependencies": {
13
13
  "@bem-react/classname": "^1.6.0",
14
14
  "@gravity-ui/axios-wrapper": "^1.4.1",
15
- "@gravity-ui/chartkit": "^5.5.0",
16
- "@gravity-ui/components": "^3.6.2",
17
- "@gravity-ui/date-utils": "^2.4.0",
18
- "@gravity-ui/i18n": "^1.5.0",
19
- "@gravity-ui/icons": "^2.9.1",
20
- "@gravity-ui/navigation": "^2.10.0",
15
+ "@gravity-ui/chartkit": "^5.9.0",
16
+ "@gravity-ui/components": "^3.7.0",
17
+ "@gravity-ui/date-utils": "^2.5.3",
18
+ "@gravity-ui/i18n": "^1.5.1",
19
+ "@gravity-ui/icons": "^2.10.0",
20
+ "@gravity-ui/navigation": "^2.16.0",
21
21
  "@gravity-ui/paranoid": "^2.0.1",
22
22
  "@gravity-ui/react-data-table": "^2.1.1",
23
- "@gravity-ui/uikit": "^6.15.0",
23
+ "@gravity-ui/uikit": "^6.20.1",
24
24
  "@gravity-ui/websql-autocomplete": "^9.1.0",
25
25
  "@reduxjs/toolkit": "^2.2.3",
26
- "axios": "^1.6.8",
26
+ "axios": "^1.7.2",
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",
@@ -34,17 +35,17 @@
34
35
  "path-to-regexp": "^3.0.0",
35
36
  "qs": "^6.12.0",
36
37
  "react-error-boundary": "^4.0.13",
37
- "react-helmet-async": "2.0.4",
38
+ "react-helmet-async": "^2.0.5",
38
39
  "react-json-inspector": "^7.1.1",
39
40
  "react-list": "^0.8.17",
40
41
  "react-monaco-editor": "^0.55.0",
41
- "react-redux": "^9.1.0",
42
+ "react-redux": "^9.1.2",
42
43
  "react-router": "^5.3.4",
43
44
  "react-router-dom": "^5.3.4",
44
45
  "react-split": "^2.0.14",
45
46
  "redux": "^5.0.1",
46
47
  "redux-location-state": "^2.8.2",
47
- "tslib": "^2.6.2",
48
+ "tslib": "^2.6.3",
48
49
  "url": "^0.11.3",
49
50
  "use-query-params": "^2.2.1",
50
51
  "web-vitals": "^1.1.2",
@@ -121,54 +122,54 @@
121
122
  ]
122
123
  },
123
124
  "devDependencies": {
124
- "@commitlint/cli": "^19.2.1",
125
- "@commitlint/config-conventional": "^19.1.0",
125
+ "@commitlint/cli": "^19.3.0",
126
+ "@commitlint/config-conventional": "^19.2.2",
126
127
  "@gravity-ui/eslint-config": "^3.2.0",
127
128
  "@gravity-ui/prettier-config": "^1.1.0",
128
129
  "@gravity-ui/stylelint-config": "^4.0.1",
129
130
  "@gravity-ui/tsconfig": "^1.0.0",
130
131
  "@playwright/test": "^1.42.1",
131
- "@testing-library/jest-dom": "^6.4.2",
132
+ "@testing-library/jest-dom": "^6.4.6",
132
133
  "@testing-library/react": "^14.2.2",
133
134
  "@testing-library/user-event": "^14.5.2",
134
135
  "@types/jest": "^29.5.12",
135
136
  "@types/lodash": "^4.17.0",
136
137
  "@types/numeral": "^2.0.5",
137
- "@types/qs": "^6.9.14",
138
- "@types/react": "^18.2.73",
139
- "@types/react-dom": "^18.2.23",
138
+ "@types/qs": "^6.9.15",
139
+ "@types/react": "^18.3.3",
140
+ "@types/react-dom": "^18.3.0",
140
141
  "@types/react-router": "^5.1.20",
141
142
  "@types/react-router-dom": "^5.3.3",
142
143
  "copyfiles": "^2.4.1",
143
144
  "http-proxy-middleware": "^2.0.6",
144
145
  "husky": "^9.0.11",
145
146
  "jest-transform-css": "^6.0.1",
146
- "lint-staged": "^15.2.2",
147
+ "lint-staged": "^15.2.7",
147
148
  "npm-run-all": "^4.1.5",
148
149
  "postcss": "^8.4.38",
149
150
  "prettier": "^3.2.5",
150
151
  "prop-types": "^15.8.1",
151
- "react": "^18.2.0",
152
+ "react": "^18.3.1",
152
153
  "react-app-rewired": "^2.2.1",
153
- "react-dom": "^18.2.0",
154
+ "react-dom": "^18.3.1",
154
155
  "react-scripts": "^5.0.1",
155
156
  "sass": "^1.72.0",
156
157
  "source-map-explorer": "^2.5.3",
157
- "stylelint": "^15.0.0",
158
- "ts-jest": "^29.1.2",
158
+ "stylelint": "^15.11.0",
159
+ "ts-jest": "^29.1.5",
159
160
  "typescript": "^5.4.3"
160
161
  },
161
162
  "peerDependencies": {
162
163
  "prop-types": "^15.8.1",
163
- "react": "^18.2.0",
164
- "react-dom": "^18.2.0"
164
+ "react": "^18.3.1",
165
+ "react-dom": "^18.3.1"
165
166
  },
166
167
  "overrides": {
167
168
  "fork-ts-checker-webpack-plugin": "^9.0.2",
168
- "react": "^18.2.0",
169
- "react-dom": "^18.2.0",
170
- "redux": "^5.0.1",
171
- "typescript": "^5.4.3",
172
- "monaco-editor": "^0.48.0"
169
+ "react": "$react",
170
+ "react-dom": "$react-dom",
171
+ "redux": "$redux",
172
+ "typescript": "$typescript",
173
+ "monaco-editor": "$monaco-editor"
173
174
  }
174
175
  }
@@ -1,4 +0,0 @@
1
- {
2
- "common.created": "Создано",
3
- "common.type": "Тип"
4
- }
@@ -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,9 +0,0 @@
1
- .ydb-user-settings {
2
- &__item-with-popup {
3
- max-width: 180px;
4
- }
5
-
6
- &__popup {
7
- max-width: 370px;
8
- }
9
- }
@@ -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 {};