ydb-embedded-ui 6.10.3 → 6.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (250) hide show
  1. package/dist/components/DateRange/DateRange.d.ts +4 -4
  2. package/dist/components/DateRange/DateRange.js +23 -26
  3. package/dist/components/DateRange/DateRange.scss +14 -13
  4. package/dist/components/DateRange/__test__/fromDateRangeValues.test.d.ts +1 -0
  5. package/dist/components/DateRange/__test__/fromDateRangeValues.test.js +80 -0
  6. package/dist/components/DateRange/__test__/getdatePickerSize.test.d.ts +1 -0
  7. package/dist/components/DateRange/__test__/getdatePickerSize.test.js +56 -0
  8. package/dist/components/DateRange/__test__/toDateRangeValues.test.d.ts +1 -0
  9. package/dist/components/DateRange/__test__/toDateRangeValues.test.js +80 -0
  10. package/dist/components/DateRange/i18n/en.json +4 -0
  11. package/dist/components/DateRange/i18n/index.d.ts +2 -0
  12. package/dist/components/DateRange/i18n/index.js +5 -0
  13. package/dist/components/DateRange/i18n/ru.json +4 -0
  14. package/dist/components/DateRange/utils.d.ts +5 -0
  15. package/dist/components/DateRange/utils.js +41 -0
  16. package/dist/components/DeveloperUILinkButton/DeveloperUILinkButton.d.ts +8 -0
  17. package/dist/components/DeveloperUILinkButton/DeveloperUILinkButton.js +9 -0
  18. package/dist/components/DeveloperUILinkButton/DeveloperUILinkButton.scss +12 -0
  19. package/dist/components/DiskStateProgressBar/DiskStateProgressBar.d.ts +6 -1
  20. package/dist/components/DiskStateProgressBar/DiskStateProgressBar.js +22 -12
  21. package/dist/components/DiskStateProgressBar/DiskStateProgressBar.scss +45 -45
  22. package/dist/components/EntityStatus/EntityStatus.js +1 -1
  23. package/dist/components/EntityStatus/EntityStatus.scss +6 -2
  24. package/dist/components/MetricChart/reducer.d.ts +2 -2
  25. package/dist/components/MonacoEditor/MonacoEditor.js +0 -2
  26. package/dist/components/NodeHostWrapper/NodeHostWrapper.d.ts +0 -1
  27. package/dist/components/NodeHostWrapper/NodeHostWrapper.js +11 -7
  28. package/dist/components/PDiskInfo/PDiskInfo.d.ts +7 -4
  29. package/dist/components/PDiskInfo/PDiskInfo.js +73 -26
  30. package/dist/components/PDiskInfo/PDiskInfo.scss +15 -1
  31. package/dist/components/PDiskInfo/i18n/en.json +11 -5
  32. package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
  33. package/dist/components/PDiskPopup/PDiskPopup.js +8 -2
  34. package/dist/components/VDiskInfo/VDiskInfo.d.ts +3 -2
  35. package/dist/components/VDiskInfo/VDiskInfo.js +9 -4
  36. package/dist/components/VDiskInfo/VDiskInfo.scss +7 -1
  37. package/dist/components/VDiskInfo/i18n/en.json +2 -1
  38. package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
  39. package/dist/containers/Cluster/Cluster.scss +1 -4
  40. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +1 -1
  41. package/dist/containers/Heatmap/Heatmap.d.ts +2 -1
  42. package/dist/containers/Heatmap/Heatmap.js +2 -2
  43. package/dist/containers/Node/Node.scss +1 -4
  44. package/dist/containers/Node/NodeStructure/NodeStructure.scss +0 -20
  45. package/dist/containers/Node/NodeStructure/Pdisk.js +2 -2
  46. package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.d.ts +6 -0
  47. package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.js +24 -0
  48. package/dist/containers/PDiskPage/PDiskPage.js +62 -24
  49. package/dist/containers/PDiskPage/PDiskPage.scss +8 -5
  50. package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.d.ts +7 -0
  51. package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js +93 -0
  52. package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.scss +52 -0
  53. package/dist/containers/PDiskPage/PDiskSpaceDistribution/utils.d.ts +4 -0
  54. package/dist/containers/PDiskPage/PDiskSpaceDistribution/utils.js +9 -0
  55. package/dist/containers/PDiskPage/i18n/en.json +8 -1
  56. package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
  57. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +16 -6
  58. package/dist/containers/Tablets/Tablets.js +12 -5
  59. package/dist/containers/Tenant/Acl/Acl.d.ts +2 -1
  60. package/dist/containers/Tenant/Acl/Acl.js +10 -8
  61. package/dist/containers/Tenant/Acl/Acl.scss +8 -8
  62. package/dist/containers/Tenant/Acl/i18n/en.json +6 -0
  63. package/dist/containers/Tenant/Acl/i18n/index.d.ts +2 -0
  64. package/dist/containers/Tenant/Acl/i18n/index.js +4 -0
  65. package/dist/containers/Tenant/Diagnostics/Describe/Describe.d.ts +2 -1
  66. package/dist/containers/Tenant/Diagnostics/Describe/Describe.js +4 -4
  67. package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.js +1 -1
  68. package/dist/containers/Tenant/Diagnostics/Diagnostics.js +3 -3
  69. package/dist/containers/Tenant/Diagnostics/Diagnostics.scss +3 -1
  70. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.d.ts +2 -1
  71. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +3 -3
  72. package/dist/containers/Tenant/Diagnostics/Overview/Overview.d.ts +2 -1
  73. package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +6 -18
  74. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/TableInfo.d.ts +1 -3
  75. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/TableInfo.js +2 -2
  76. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/en.json +14 -1
  77. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/index.d.ts +1 -1
  78. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/index.js +1 -2
  79. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo.d.ts +2 -3
  80. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo.js +64 -76
  81. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +8 -5
  82. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +28 -3
  83. package/dist/containers/Tenant/Diagnostics/TenantOverview/getSectionTitle.d.ts +2 -1
  84. package/dist/containers/Tenant/Diagnostics/TenantOverview/getSectionTitle.js +2 -2
  85. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/en.json +3 -2
  86. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
  87. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +2 -2
  88. package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.d.ts +2 -2
  89. package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.js +19 -28
  90. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +7 -17
  91. package/dist/containers/Tenant/Diagnostics/TopShards/getTopShardsColumns.js +6 -2
  92. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +31 -18
  93. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +2 -2
  94. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +8 -3
  95. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.d.ts +2 -1
  96. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +9 -7
  97. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.d.ts +2 -0
  98. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.js +38 -0
  99. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.scss +63 -0
  100. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.d.ts +15 -0
  101. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.js +14 -0
  102. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.scss +19 -0
  103. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.d.ts +99 -0
  104. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js +109 -0
  105. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/en.json +13 -0
  106. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/index.d.ts +2 -0
  107. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/index.js +5 -0
  108. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/ru.json +13 -0
  109. package/dist/containers/Tenant/Query/i18n/en.json +14 -0
  110. package/dist/containers/Tenant/Query/i18n/index.d.ts +1 -1
  111. package/dist/containers/Tenant/Schema/CreateDirectoryDialog/CreateDirectoryDialog.d.ts +3 -2
  112. package/dist/containers/Tenant/Schema/CreateDirectoryDialog/CreateDirectoryDialog.js +2 -2
  113. package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.js +2 -2
  114. package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +1 -1
  115. package/dist/containers/Tenant/Tenant.js +1 -1
  116. package/dist/containers/Tenant/TenantPages.d.ts +12 -1
  117. package/dist/containers/Tenant/TenantPages.js +1 -1
  118. package/dist/containers/Tenant/i18n/en.json +2 -2
  119. package/dist/containers/Tenant/i18n/index.d.ts +1 -1
  120. package/dist/containers/Tenant/utils/schema.js +1 -1
  121. package/dist/containers/Tenants/Tenants.js +1 -1
  122. package/dist/containers/Tenants/Tenants.scss +0 -4
  123. package/dist/containers/UserSettings/i18n/en.json +2 -0
  124. package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
  125. package/dist/containers/UserSettings/settings.d.ts +1 -0
  126. package/dist/containers/UserSettings/settings.js +6 -1
  127. package/dist/routes.js +2 -2
  128. package/dist/services/api.d.ts +39 -21
  129. package/dist/services/api.js +45 -56
  130. package/dist/services/settings.d.ts +1 -0
  131. package/dist/services/settings.js +2 -1
  132. package/dist/store/configureStore.d.ts +4 -4
  133. package/dist/store/defaultStore.d.ts +2 -2
  134. package/dist/store/reducers/api.d.ts +1 -1
  135. package/dist/store/reducers/api.js +1 -1
  136. package/dist/store/reducers/cluster/cluster.d.ts +2 -2
  137. package/dist/store/reducers/clusterNodes/clusterNodes.d.ts +2 -2
  138. package/dist/store/reducers/clusters/clusters.d.ts +2 -2
  139. package/dist/store/reducers/describe.d.ts +5 -2
  140. package/dist/store/reducers/describe.js +2 -2
  141. package/dist/store/reducers/executeQuery.d.ts +2 -2
  142. package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +2 -2
  143. package/dist/store/reducers/executeTopQueries/executeTopQueries.js +20 -14
  144. package/dist/store/reducers/executeTopQueries/types.d.ts +2 -2
  145. package/dist/store/reducers/executeTopQueries/utils.js +11 -7
  146. package/dist/store/reducers/explainQuery/explainQuery.d.ts +2 -2
  147. package/dist/store/reducers/explainQuery/explainQuery.js +6 -1
  148. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +58 -58
  149. package/dist/store/reducers/heatmap.d.ts +2 -2
  150. package/dist/store/reducers/heatmap.js +3 -3
  151. package/dist/store/reducers/hotKeys/hotKeys.d.ts +3 -2
  152. package/dist/store/reducers/hotKeys/hotKeys.js +3 -3
  153. package/dist/store/reducers/index.d.ts +3 -3
  154. package/dist/store/reducers/network/network.d.ts +2 -2
  155. package/dist/store/reducers/network/network.js +1 -1
  156. package/dist/store/reducers/node/node.d.ts +3 -3
  157. package/dist/store/reducers/node/selectors.d.ts +1 -1
  158. package/dist/store/reducers/node/selectors.js +2 -2
  159. package/dist/store/reducers/nodes/nodes.d.ts +3 -3
  160. package/dist/store/reducers/nodesList.d.ts +3 -3
  161. package/dist/store/reducers/overview/overview.d.ts +5 -2
  162. package/dist/store/reducers/overview/overview.js +2 -2
  163. package/dist/store/reducers/partitions/partitions.d.ts +2 -2
  164. package/dist/store/reducers/pdisk/pdisk.d.ts +3 -3
  165. package/dist/store/reducers/pdisk/pdisk.js +15 -2
  166. package/dist/store/reducers/pdisk/types.d.ts +17 -1
  167. package/dist/store/reducers/pdisk/utils.d.ts +2 -2
  168. package/dist/store/reducers/pdisk/utils.js +68 -8
  169. package/dist/store/reducers/preview.d.ts +2 -2
  170. package/dist/store/reducers/preview.js +1 -1
  171. package/dist/store/reducers/queryActions/types.d.ts +1 -1
  172. package/dist/store/reducers/schema/schema.d.ts +28 -10
  173. package/dist/store/reducers/schema/schema.js +11 -12
  174. package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +4 -2
  175. package/dist/store/reducers/schemaAcl/schemaAcl.js +9 -3
  176. package/dist/store/reducers/shardsWorkload/shardsWorkload.d.ts +2 -2
  177. package/dist/store/reducers/shardsWorkload/shardsWorkload.js +22 -6
  178. package/dist/store/reducers/shardsWorkload/types.d.ts +2 -2
  179. package/dist/store/reducers/storage/storage.d.ts +3 -3
  180. package/dist/store/reducers/tablet.d.ts +3 -3
  181. package/dist/store/reducers/tablets.d.ts +13 -13
  182. package/dist/store/reducers/tabletsFilters.d.ts +1 -1
  183. package/dist/store/reducers/tenant/tenant.d.ts +2 -2
  184. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.d.ts +2 -2
  185. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.js +1 -1
  186. package/dist/store/reducers/tenantOverview/topNodes/topNodes.d.ts +2 -2
  187. package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.d.ts +2 -2
  188. package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js +1 -1
  189. package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.d.ts +2 -2
  190. package/dist/store/reducers/tenants/selectors.d.ts +27 -27
  191. package/dist/store/reducers/tenants/tenants.d.ts +2 -2
  192. package/dist/store/reducers/topic.d.ts +44 -44
  193. package/dist/store/reducers/vdisk/vdisk.d.ts +2 -2
  194. package/dist/store/reducers/vdisk/vdisk.js +1 -1
  195. package/dist/store/reducers/viewSchema/viewSchema.d.ts +2 -2
  196. package/dist/store/reducers/viewSchema/viewSchema.js +1 -1
  197. package/dist/store/state-url-mapping.d.ts +70 -0
  198. package/dist/store/state-url-mapping.js +1 -5
  199. package/dist/styles/mixins.scss +11 -0
  200. package/dist/types/api/acl.d.ts +1 -0
  201. package/dist/types/api/pdisk.d.ts +65 -2
  202. package/dist/types/api/schema/schema.d.ts +21 -0
  203. package/dist/types/api/vdisk.d.ts +33 -2
  204. package/dist/types/common.d.ts +3 -0
  205. package/dist/types/store/heatmap.d.ts +1 -0
  206. package/dist/types/store/query.d.ts +4 -1
  207. package/dist/utils/constants.d.ts +1 -0
  208. package/dist/utils/constants.js +1 -0
  209. package/dist/utils/dataFormatters/dataFormatters.d.ts +0 -4
  210. package/dist/utils/dataFormatters/dataFormatters.js +2 -8
  211. package/dist/utils/developerUI/developerUI.d.ts +1 -0
  212. package/dist/utils/developerUI/developerUI.js +3 -0
  213. package/dist/utils/diagnostics.d.ts +21 -17
  214. package/dist/utils/diagnostics.js +28 -7
  215. package/dist/utils/disks/getPDiskType.d.ts +3 -3
  216. package/dist/utils/disks/helpers.d.ts +1 -0
  217. package/dist/utils/disks/helpers.js +3 -0
  218. package/dist/utils/disks/prepareDisks.d.ts +2 -2
  219. package/dist/utils/disks/prepareDisks.js +17 -22
  220. package/dist/utils/disks/types.d.ts +7 -5
  221. package/dist/utils/monaco/constats.d.ts +2 -0
  222. package/dist/utils/monaco/constats.js +2 -0
  223. package/dist/utils/monaco/yql/constants.d.ts +0 -1
  224. package/dist/utils/monaco/yql/constants.js +0 -1
  225. package/dist/utils/monaco/yql/yql.completionItemProvider.js +3 -3
  226. package/dist/utils/query.d.ts +24 -1
  227. package/dist/utils/query.js +40 -0
  228. package/package.json +5 -1
  229. package/dist/components/NodeHostWrapper/NodeHostWrapper.scss +0 -15
  230. package/dist/containers/Node/NodeStructure/Vdisk.d.ts +0 -6
  231. package/dist/containers/Node/NodeStructure/Vdisk.js +0 -13
  232. package/dist/containers/PDiskPage/PDiskGroups.d.ts +0 -9
  233. package/dist/containers/PDiskPage/PDiskGroups.js +0 -20
  234. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/ru.json +0 -5
  235. package/dist/store/reducers/olapStats.d.ts +0 -5
  236. package/dist/store/reducers/olapStats.js +0 -31
  237. package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.d.ts +0 -5
  238. package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.js +0 -38
  239. package/dist/utils/monaco/index.d.ts +0 -1
  240. package/dist/utils/monaco/index.js +0 -6
  241. package/dist/utils/monaco/s-expression/constants.d.ts +0 -1
  242. package/dist/utils/monaco/s-expression/constants.js +0 -1
  243. package/dist/utils/monaco/s-expression/registerLanguage.d.ts +0 -1
  244. package/dist/utils/monaco/s-expression/registerLanguage.js +0 -59
  245. package/dist/utils/monaco/yql/registerLanguage.d.ts +0 -1
  246. package/dist/utils/monaco/yql/registerLanguage.js +0 -8
  247. package/dist/utils/monaco/yql/yql.d.ts +0 -7
  248. package/dist/utils/monaco/yql/yql.js +0 -180
  249. package/dist/utils/monaco/yql/yql.keywords.d.ts +0 -3
  250. package/dist/utils/monaco/yql/yql.keywords.js +0 -3
@@ -78,13 +78,13 @@ function Diagnostics(props) {
78
78
  return _jsx(Network, { tenantName: tenantName });
79
79
  }
80
80
  case TENANT_DIAGNOSTICS_TABS_IDS.describe: {
81
- return _jsx(Describe, { path: path, type: type });
81
+ return _jsx(Describe, { path: path, database: tenantName, type: type });
82
82
  }
83
83
  case TENANT_DIAGNOSTICS_TABS_IDS.hotKeys: {
84
- return _jsx(HotKeys, { path: path });
84
+ return _jsx(HotKeys, { path: path, database: tenantName });
85
85
  }
86
86
  case TENANT_DIAGNOSTICS_TABS_IDS.graph: {
87
- return _jsx(Heatmap, { path: path });
87
+ return _jsx(Heatmap, { path: path, database: tenantName });
88
88
  }
89
89
  case TENANT_DIAGNOSTICS_TABS_IDS.consumers: {
90
90
  return _jsx(Consumers, { path: path, type: type });
@@ -1,3 +1,5 @@
1
+ @import '../../../styles/mixins.scss';
2
+
1
3
  .kv-tenant-diagnostics {
2
4
  display: flex;
3
5
  overflow: hidden;
@@ -16,7 +18,7 @@
16
18
  justify-content: space-between;
17
19
  align-items: center;
18
20
 
19
- box-shadow: inset 0 -1px 0 0 var(--g-color-line-generic);
21
+ @include tabs-wrapper-styles();
20
22
  & .g-tabs_direction_horizontal {
21
23
  box-shadow: unset;
22
24
  }
@@ -1,6 +1,7 @@
1
1
  import './HotKeys.scss';
2
2
  interface HotKeysProps {
3
+ database: string;
3
4
  path: string;
4
5
  }
5
- export declare function HotKeys({ path }: HotKeysProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function HotKeys({ path, database }: HotKeysProps): import("react/jsx-runtime").JSX.Element;
6
7
  export {};
@@ -37,11 +37,11 @@ const getHotKeysColumns = (keyColumnsIds = []) => {
37
37
  },
38
38
  ];
39
39
  };
40
- export function HotKeys({ path }) {
40
+ export function HotKeys({ path, database }) {
41
41
  var _a, _b;
42
- const { currentData: data, isFetching, error } = hotKeysApi.useGetHotKeysQuery({ path });
42
+ const { currentData: data, isFetching, error } = hotKeysApi.useGetHotKeysQuery({ path, database });
43
43
  const loading = isFetching && data === undefined;
44
- const { data: schemaData, isLoading: schemaLoading } = useGetSchemaQuery({ path });
44
+ const { data: schemaData, isLoading: schemaLoading } = useGetSchemaQuery({ path, database });
45
45
  const keyColumnsIds = (_b = (_a = schemaData === null || schemaData === void 0 ? void 0 : schemaData.PathDescription) === null || _a === void 0 ? void 0 : _a.Table) === null || _b === void 0 ? void 0 : _b.KeyColumnNames;
46
46
  const tableColumns = React.useMemo(() => {
47
47
  return getHotKeysColumns(keyColumnsIds);
@@ -3,6 +3,7 @@ import { EPathType } from '../../../../types/api/schema';
3
3
  interface OverviewProps {
4
4
  type?: EPathType;
5
5
  path: string;
6
+ database: string;
6
7
  }
7
- declare function Overview({ type, path }: OverviewProps): string | number | true | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element;
8
+ declare function Overview({ type, path, database }: OverviewProps): string | number | true | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element;
8
9
  export default Overview;
@@ -16,36 +16,24 @@ import { AsyncReplicationInfo } from './AsyncReplicationInfo';
16
16
  import { ChangefeedInfo } from './ChangefeedInfo';
17
17
  import { TableInfo } from './TableInfo';
18
18
  import { TopicInfo } from './TopicInfo';
19
- function Overview({ type, path }) {
19
+ function Overview({ type, path, database }) {
20
20
  const [autoRefreshInterval] = useAutoRefreshInterval();
21
- // FIXME: The request is too heavy, stats table may have millions of items
22
- // Disabled until fixed
23
- // https://github.com/ydb-platform/ydb-embedded-ui/issues/907
24
- // https://github.com/ydb-platform/ydb-embedded-ui/issues/908
25
- // const olapParams = isTableType(type) && isColumnEntityType(type) ? {path} : skipToken;
26
- // const {currentData: olapData, isFetching: olapIsFetching} = olapApi.useGetOlapStatsQuery(
27
- // olapParams,
28
- // {pollingInterval: autoRefreshInterval},
29
- // );
30
- // const olapStatsLoading = olapIsFetching && olapData === undefined;
31
- // const {result: olapStats} = olapData || {result: undefined};
32
21
  const isEntityWithMergedImpl = isEntityWithMergedImplementation(type);
33
22
  // shallowEqual prevents rerenders when new schema data is loaded
34
- const mergedChildrenPaths = useTypedSelector((state) => selectSchemaMergedChildrenPaths(state, path, type), shallowEqual);
35
- let paths = skipToken;
23
+ const mergedChildrenPaths = useTypedSelector((state) => selectSchemaMergedChildrenPaths(state, path, type, database), shallowEqual);
24
+ let paths = [];
36
25
  if (!isEntityWithMergedImpl) {
37
26
  paths = [path];
38
27
  }
39
28
  else if (mergedChildrenPaths) {
40
29
  paths = [path, ...mergedChildrenPaths];
41
30
  }
42
- const { currentData, isFetching, error: overviewError, } = overviewApi.useGetOverviewQuery(paths, {
31
+ const { currentData, isFetching, error: overviewError, } = overviewApi.useGetOverviewQuery(paths.length ? { paths, database } : skipToken, {
43
32
  pollingInterval: autoRefreshInterval,
44
33
  });
45
34
  const overviewLoading = isFetching && currentData === undefined;
46
35
  const { data: rawData, additionalData } = currentData || {};
47
- const { error: schemaError } = useGetSchemaQuery({ path });
48
- // overviewLoading || olapStatsLoading
36
+ const { error: schemaError } = useGetSchemaQuery({ path, database });
49
37
  const entityLoading = overviewLoading;
50
38
  const entityNotReady = isEntityWithMergedImpl && !mergedChildrenPaths;
51
39
  const renderContent = () => {
@@ -72,7 +60,7 @@ function Overview({ type, path }) {
72
60
  [EPathType.EPathTypeView]: () => _jsx(ViewInfo, { data: data }),
73
61
  [EPathType.EPathTypeReplication]: () => _jsx(AsyncReplicationInfo, { data: data }),
74
62
  };
75
- return ((type && ((_a = pathTypeToComponent[type]) === null || _a === void 0 ? void 0 : _a.call(pathTypeToComponent))) || (_jsx(TableInfo, { data: data, type: type })));
63
+ return (type && ((_a = pathTypeToComponent[type]) === null || _a === void 0 ? void 0 : _a.call(pathTypeToComponent))) || _jsx(TableInfo, { data: data, type: type });
76
64
  };
77
65
  if (entityLoading || entityNotReady) {
78
66
  return _jsx(Loader, { size: "m" });
@@ -1,10 +1,8 @@
1
- import type { KeyValueRow } from '../../../../../types/api/query';
2
1
  import type { EPathType, TEvDescribeSchemeResult } from '../../../../../types/api/schema';
3
2
  import './TableInfo.scss';
4
3
  interface TableInfoProps {
5
4
  data?: TEvDescribeSchemeResult;
6
5
  type?: EPathType;
7
- olapStats?: KeyValueRow[];
8
6
  }
9
- export declare const TableInfo: ({ data, type, olapStats }: TableInfoProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const TableInfo: ({ data, type }: TableInfoProps) => import("react/jsx-runtime").JSX.Element;
10
8
  export {};
@@ -7,8 +7,8 @@ import i18n from './i18n';
7
7
  import { prepareTableInfo } from './prepareTableInfo';
8
8
  import './TableInfo.scss';
9
9
  const b = cn('ydb-diagnostics-table-info');
10
- export const TableInfo = ({ data, type, olapStats }) => {
10
+ export const TableInfo = ({ data, type }) => {
11
11
  const title = _jsx(EntityTitle, { data: data === null || data === void 0 ? void 0 : data.PathDescription });
12
- const { generalInfo, tableStatsInfo, tabletMetricsInfo = [], partitionConfigInfo = [], } = React.useMemo(() => prepareTableInfo(data, type, olapStats), [data, type, olapStats]);
12
+ const { generalInfo, tableStatsInfo, tabletMetricsInfo = [], partitionConfigInfo = [], } = React.useMemo(() => prepareTableInfo(data, type), [data, type]);
13
13
  return (_jsxs("div", { className: b(), children: [_jsx(InfoViewer, { info: generalInfo, title: title, className: b('info-block'), renderEmptyState: () => _jsx("div", { className: b('title'), children: title }) }), _jsxs("div", { className: b('row'), children: [tableStatsInfo ? (_jsx("div", { className: b('col'), children: tableStatsInfo.map((info, index) => (_jsx(InfoViewer, { info: info, title: index === 0 ? i18n('tableStats') : undefined, className: b('info-block'), renderEmptyState: () => null }, index))) })) : null, tabletMetricsInfo.length > 0 || partitionConfigInfo.length > 0 ? (_jsxs("div", { className: b('col'), children: [_jsx(InfoViewer, { info: tabletMetricsInfo, title: i18n('tabletMetrics'), className: b('info-block'), renderEmptyState: () => null }), _jsx(InfoViewer, { info: partitionConfigInfo, title: i18n('partitionConfig'), className: b('info-block'), renderEmptyState: () => null })] })) : null] })] }));
14
14
  };
@@ -1,5 +1,18 @@
1
1
  {
2
2
  "tableStats": "Table Stats",
3
3
  "tabletMetrics": "Tablet Metrics",
4
- "partitionConfig": "Partition Config"
4
+ "partitionConfig": "Partition Config",
5
+ "label.ttl": "TTL for rows",
6
+ "value.ttl": "column: '{{columnName}}', expire after: {{expireTime}}",
7
+ "label.standalone": "Standalone",
8
+ "label.partitioning": "Partitioning",
9
+ "label.partitioning-by-size": "Partitioning by size",
10
+ "value.partitioning-by-size.enabled": "Enabled, split size: {{size}}",
11
+ "label.partitioning-by-load": "Partitioning by load",
12
+ "label.partitions-min": "Min number of partitions",
13
+ "label.partitions-max": "Max number of partitions",
14
+ "label.read-replicas": "Read replicas (followers)",
15
+ "label.bloom-filter": "Bloom filter",
16
+ "enabled": "Enabled",
17
+ "disabled": "Disabled"
5
18
  }
@@ -1,2 +1,2 @@
1
- declare const _default: (key: "tableStats" | "tabletMetrics" | "partitionConfig", params?: import("@gravity-ui/i18n").Params) => string;
1
+ declare const _default: (key: "disabled" | "tableStats" | "tabletMetrics" | "partitionConfig" | "label.ttl" | "value.ttl" | "label.standalone" | "label.partitioning" | "label.partitioning-by-size" | "value.partitioning-by-size.enabled" | "label.partitioning-by-load" | "label.partitions-min" | "label.partitions-max" | "label.read-replicas" | "label.bloom-filter" | "enabled", params?: import("@gravity-ui/i18n").Params) => string;
2
2
  export default _default;
@@ -1,5 +1,4 @@
1
1
  import { registerKeysets } from '../../../../../../utils/i18n';
2
2
  import en from './en.json';
3
- import ru from './ru.json';
4
3
  const COMPONENT = 'ydb-diagnostics-overview-table-info';
5
- export default registerKeysets(COMPONENT, { ru, en });
4
+ export default registerKeysets(COMPONENT, { en });
@@ -1,16 +1,15 @@
1
1
  import type { InfoViewerItem } from '../../../../../components/InfoViewer';
2
- import type { KeyValueRow } from '../../../../../types/api/query';
3
2
  import type { TEvDescribeSchemeResult } from '../../../../../types/api/schema';
4
3
  import { EPathType } from '../../../../../types/api/schema';
5
4
  /** Prepares data for Table, ColumnTable and ColumnStore */
6
- export declare const prepareTableInfo: (data?: TEvDescribeSchemeResult, type?: EPathType, olapStats?: KeyValueRow[]) => {
5
+ export declare const prepareTableInfo: (data?: TEvDescribeSchemeResult, type?: EPathType) => {
7
6
  generalInfo?: undefined;
8
7
  tableStatsInfo?: undefined;
9
8
  tabletMetricsInfo?: undefined;
10
9
  partitionConfigInfo?: undefined;
11
10
  } | {
12
11
  generalInfo: InfoViewerItem[];
13
- tableStatsInfo: InfoViewerItem[][] | undefined;
12
+ tableStatsInfo: InfoViewerItem[][];
14
13
  tabletMetricsInfo: InfoViewerItem[];
15
14
  partitionConfigInfo: InfoViewerItem[];
16
15
  };
@@ -1,49 +1,41 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Text } from '@gravity-ui/uikit';
3
+ import omit from 'lodash/omit';
1
4
  import { formatObject } from '../../../../../components/InfoViewer';
2
5
  import { formatFollowerGroupItem, formatPartitionConfigItem, formatTableStatsItem, formatTabletMetricsItem, } from '../../../../../components/InfoViewer/formatters';
3
6
  import { EPathType } from '../../../../../types/api/schema';
4
7
  import { formatBytes, formatNumber } from '../../../../../utils/dataFormatters/dataFormatters';
5
8
  import { formatDurationToShortTimeFormat } from '../../../../../utils/timeParsers';
6
- import { isNumeric } from '../../../../../utils/utils';
9
+ import i18n from './i18n';
7
10
  const isInStoreColumnTable = (table) => {
8
11
  // SchemaPresetId could be 0
9
12
  return table.SchemaPresetName && table.SchemaPresetId !== undefined;
10
13
  };
11
- const prepareOlapStats = (olapStats) => {
12
- var _a, _b, _c;
13
- const Bytes = olapStats === null || olapStats === void 0 ? void 0 : olapStats.reduce((acc, el) => {
14
- const value = isNumeric(el.Bytes) ? Number(el.Bytes) : 0;
15
- return acc + value;
16
- }, 0);
17
- const Rows = olapStats === null || olapStats === void 0 ? void 0 : olapStats.reduce((acc, el) => {
18
- const value = isNumeric(el.Rows) ? Number(el.Rows) : 0;
19
- return acc + value;
20
- }, 0);
21
- const tabletIds = olapStats === null || olapStats === void 0 ? void 0 : olapStats.reduce((acc, el) => {
22
- acc.add(el.TabletId);
23
- return acc;
24
- }, new Set());
25
- return [
26
- { label: 'PartCount', value: (_a = tabletIds === null || tabletIds === void 0 ? void 0 : tabletIds.size) !== null && _a !== void 0 ? _a : 0 },
27
- { label: 'RowCount', value: (_b = formatNumber(Rows)) !== null && _b !== void 0 ? _b : 0 },
28
- { label: 'DataSize', value: (_c = formatBytes(Bytes)) !== null && _c !== void 0 ? _c : 0 },
29
- ];
30
- };
31
14
  const prepareTTL = (ttl) => {
32
15
  // ExpireAfterSeconds could be 0
33
16
  if (ttl.Enabled && ttl.Enabled.ColumnName && ttl.Enabled.ExpireAfterSeconds !== undefined) {
34
- const value = `column: '${ttl.Enabled.ColumnName}', expire after: ${formatDurationToShortTimeFormat(ttl.Enabled.ExpireAfterSeconds * 1000, 1)}`;
35
- return { label: 'TTL for rows', value };
17
+ const value = i18n('value.ttl', {
18
+ columnName: ttl.Enabled.ColumnName,
19
+ expireTime: formatDurationToShortTimeFormat(ttl.Enabled.ExpireAfterSeconds * 1000, 1),
20
+ });
21
+ return { label: i18n('label.ttl'), value };
36
22
  }
37
23
  return undefined;
38
24
  };
39
25
  function prepareColumnTableGeneralInfo(columnTable) {
26
+ var _a, _b;
40
27
  const columnTableGeneralInfo = [];
41
28
  columnTableGeneralInfo.push({
42
- label: 'Standalone',
29
+ label: i18n('label.standalone'),
43
30
  value: String(!isInStoreColumnTable(columnTable)),
44
31
  });
45
- if (columnTable.Sharding && columnTable.Sharding.HashSharding) {
46
- columnTableGeneralInfo.push({ label: 'Sharding', value: 'hash' });
32
+ if ((_b = (_a = columnTable.Sharding) === null || _a === void 0 ? void 0 : _a.HashSharding) === null || _b === void 0 ? void 0 : _b.Columns) {
33
+ const columns = columnTable.Sharding.HashSharding.Columns.join(', ');
34
+ const content = `PARTITION BY HASH(${columns})`;
35
+ columnTableGeneralInfo.push({
36
+ label: i18n('label.partitioning'),
37
+ value: (_jsx(Text, { variant: "code-2", wordBreak: "break-word", children: content })),
38
+ });
47
39
  }
48
40
  if (columnTable.TtlSettings) {
49
41
  const ttlInfo = prepareTTL(columnTable === null || columnTable === void 0 ? void 0 : columnTable.TtlSettings);
@@ -58,18 +50,20 @@ const prepareTableGeneralInfo = (PartitionConfig, TTLSettings) => {
58
50
  const { PartitioningPolicy = {}, FollowerGroups, EnableFilterByKey } = PartitionConfig;
59
51
  const generalTableInfo = [];
60
52
  const partitioningBySize = PartitioningPolicy.SizeToSplit && Number(PartitioningPolicy.SizeToSplit) > 0
61
- ? `Enabled, split size: ${formatBytes(PartitioningPolicy.SizeToSplit)}`
62
- : 'Disabled';
53
+ ? i18n('value.partitioning-by-size.enabled', {
54
+ size: formatBytes(PartitioningPolicy.SizeToSplit),
55
+ })
56
+ : i18n('disabled');
63
57
  const partitioningByLoad = ((_a = PartitioningPolicy.SplitByLoadSettings) === null || _a === void 0 ? void 0 : _a.Enabled)
64
- ? 'Enabled'
65
- : 'Disabled';
66
- generalTableInfo.push({ label: 'Partitioning by size', value: partitioningBySize }, { label: 'Partitioning by load', value: partitioningByLoad }, {
67
- label: 'Min number of partitions',
58
+ ? i18n('enabled')
59
+ : i18n('disabled');
60
+ generalTableInfo.push({ label: i18n('label.partitioning-by-size'), value: partitioningBySize }, { label: i18n('label.partitioning-by-load'), value: partitioningByLoad }, {
61
+ label: i18n('label.partitions-min'),
68
62
  value: formatNumber(PartitioningPolicy.MinPartitionsCount || 0),
69
63
  });
70
64
  if (PartitioningPolicy.MaxPartitionsCount) {
71
65
  generalTableInfo.push({
72
- label: 'Max number of partitions',
66
+ label: i18n('label.partitions-max'),
73
67
  value: formatNumber(PartitioningPolicy.MaxPartitionsCount),
74
68
  });
75
69
  }
@@ -82,7 +76,7 @@ const prepareTableGeneralInfo = (PartitionConfig, TTLSettings) => {
82
76
  else {
83
77
  readReplicasConfig = `ANY_AZ: ${FollowerCount}`;
84
78
  }
85
- generalTableInfo.push({ label: 'Read replicas (followers)', value: readReplicasConfig });
79
+ generalTableInfo.push({ label: i18n('label.read-replicas'), value: readReplicasConfig });
86
80
  }
87
81
  if (TTLSettings) {
88
82
  const ttlInfo = prepareTTL(TTLSettings);
@@ -91,13 +85,13 @@ const prepareTableGeneralInfo = (PartitionConfig, TTLSettings) => {
91
85
  }
92
86
  }
93
87
  generalTableInfo.push({
94
- label: 'Bloom filter',
95
- value: EnableFilterByKey ? 'Enabled' : 'Disabled',
88
+ label: i18n('label.bloom-filter'),
89
+ value: EnableFilterByKey ? i18n('enabled') : i18n('disabled'),
96
90
  });
97
91
  return generalTableInfo;
98
92
  };
99
93
  /** Prepares data for Table, ColumnTable and ColumnStore */
100
- export const prepareTableInfo = (data, type, olapStats) => {
94
+ export const prepareTableInfo = (data, type) => {
101
95
  if (!data) {
102
96
  return {};
103
97
  }
@@ -116,45 +110,39 @@ export const prepareTableInfo = (data, type, olapStats) => {
116
110
  break;
117
111
  }
118
112
  }
119
- let tableStatsInfo;
120
- // There is no TableStats and TabletMetrics for ColumnTables inside ColumnStore
121
- // Therefore we parse olapStats
122
- if (type === EPathType.EPathTypeColumnTable && isInStoreColumnTable(ColumnTableDescription)) {
123
- if (olapStats) {
124
- tableStatsInfo = [prepareOlapStats(olapStats)];
125
- }
126
- }
127
- else {
128
- tableStatsInfo = [
129
- formatObject(formatTableStatsItem, {
130
- PartCount,
131
- RowCount,
132
- DataSize,
133
- IndexSize,
134
- }),
135
- formatObject(formatTableStatsItem, {
136
- LastAccessTime,
137
- LastUpdateTime,
138
- }),
139
- formatObject(formatTableStatsItem, {
140
- ImmediateTxCompleted,
141
- PlannedTxCompleted,
142
- TxRejectedByOverload,
143
- TxRejectedBySpace,
144
- TxCompleteLagMsec,
145
- InFlightTxCount,
146
- }),
147
- formatObject(formatTableStatsItem, {
148
- RowUpdates,
149
- RowDeletes,
150
- RowReads,
151
- RangeReads,
152
- RangeReadRows,
153
- }),
154
- ];
155
- }
156
- //@ts-expect-error
157
- const tabletMetricsInfo = formatObject(formatTabletMetricsItem, TabletMetrics);
113
+ const tableStatsInfo = [
114
+ formatObject(formatTableStatsItem, {
115
+ PartCount,
116
+ RowCount,
117
+ DataSize,
118
+ IndexSize,
119
+ }),
120
+ formatObject(formatTableStatsItem, {
121
+ LastAccessTime,
122
+ LastUpdateTime,
123
+ }),
124
+ formatObject(formatTableStatsItem, {
125
+ ImmediateTxCompleted,
126
+ PlannedTxCompleted,
127
+ TxRejectedByOverload,
128
+ TxRejectedBySpace,
129
+ TxCompleteLagMsec,
130
+ InFlightTxCount,
131
+ }),
132
+ formatObject(formatTableStatsItem, {
133
+ RowUpdates,
134
+ RowDeletes,
135
+ RowReads,
136
+ RangeReads,
137
+ RangeReadRows,
138
+ }),
139
+ ];
140
+ const tabletMetricsInfo = formatObject(formatTabletMetricsItem, omit(TabletMetrics, [
141
+ 'GroupReadIops',
142
+ 'GroupReadThroughput',
143
+ 'GroupWriteIops',
144
+ 'GroupWriteThroughput',
145
+ ]));
158
146
  let partitionConfigInfo = [];
159
147
  if (Array.isArray(FollowerGroups) && FollowerGroups.length > 0) {
160
148
  partitionConfigInfo = formatObject(formatFollowerGroupItem, FollowerGroups[0]);
@@ -3,12 +3,12 @@ import React from 'react';
3
3
  import { useHistory, useLocation } from 'react-router-dom';
4
4
  import { parseQuery } from '../../../../../routes';
5
5
  import { changeUserInput } from '../../../../../store/reducers/executeQuery';
6
+ import { setTopQueriesFilters, topQueriesApi, } from '../../../../../store/reducers/executeTopQueries/executeTopQueries';
6
7
  import { TENANT_DIAGNOSTICS_TABS_IDS, TENANT_PAGE, TENANT_PAGES_IDS, TENANT_QUERY_TABS_ID, } from '../../../../../store/reducers/tenant/constants';
7
- import { topQueriesApi } from '../../../../../store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries';
8
8
  import { useAutoRefreshInterval, useTypedDispatch } from '../../../../../utils/hooks';
9
9
  import { parseQueryErrorToString } from '../../../../../utils/query';
10
10
  import { TenantTabsGroups, getTenantPath } from '../../../TenantPages';
11
- import { TOP_QUERIES_COLUMNS_WIDTH_LS_KEY, getTenantOverviewTopQueriesColumns, } from '../../TopQueries/getTopQueriesColumns';
11
+ import { TENANT_OVERVIEW_TOP_QUERUES_COLUMNS, TOP_QUERIES_COLUMNS_WIDTH_LS_KEY, } from '../../TopQueries/getTopQueriesColumns';
12
12
  import { TenantOverviewTableLayout } from '../TenantOverviewTableLayout';
13
13
  import { getSectionTitle } from '../getSectionTitle';
14
14
  import i18n from '../i18n';
@@ -19,8 +19,8 @@ export function TopQueries({ tenantName }) {
19
19
  const history = useHistory();
20
20
  const query = parseQuery(location);
21
21
  const [autoRefreshInterval] = useAutoRefreshInterval();
22
- const columns = getTenantOverviewTopQueriesColumns();
23
- const { currentData, isFetching, error } = topQueriesApi.useGetOverviewTopQueriesQuery({ database: tenantName }, { pollingInterval: autoRefreshInterval });
22
+ const columns = TENANT_OVERVIEW_TOP_QUERUES_COLUMNS;
23
+ const { currentData, isFetching, error } = topQueriesApi.useGetTopQueriesQuery({ database: tenantName }, { pollingInterval: autoRefreshInterval });
24
24
  const loading = isFetching && currentData === undefined;
25
25
  const { result: data } = currentData || {};
26
26
  const handleRowClick = React.useCallback((row) => {
@@ -36,7 +36,10 @@ export function TopQueries({ tenantName }) {
36
36
  }, [dispatch, history, location]);
37
37
  const title = getSectionTitle({
38
38
  entity: i18n('queries'),
39
- postfix: i18n('by-cpu-time'),
39
+ postfix: i18n('by-cpu-time', { executionPeriod: i18n('executed-last-hour') }),
40
+ onClick: () => {
41
+ dispatch(setTopQueriesFilters({ from: undefined, to: undefined }));
42
+ },
40
43
  link: getTenantPath({
41
44
  ...query,
42
45
  [TenantTabsGroups.diagnosticsTab]: TENANT_DIAGNOSTICS_TABS_IDS.topQueries,
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Loader } from '@gravity-ui/uikit';
3
3
  import { EntityStatus } from '../../../../components/EntityStatus/EntityStatus';
4
+ import { useGetSchemaQuery } from '../../../../store/reducers/schema/schema';
4
5
  import { TENANT_METRICS_TABS_IDS } from '../../../../store/reducers/tenant/constants';
5
6
  import { tenantApi } from '../../../../store/reducers/tenant/tenant';
6
7
  import { calculateTenantMetrics } from '../../../../store/reducers/tenants/utils';
@@ -16,7 +17,7 @@ import { TenantStorage } from './TenantStorage/TenantStorage';
16
17
  import { b } from './utils';
17
18
  import './TenantOverview.scss';
18
19
  export function TenantOverview({ tenantName, additionalTenantProps, additionalNodesProps, }) {
19
- var _a;
20
+ var _a, _b, _c;
20
21
  const { metricsTab } = useTypedSelector((state) => state.tenant);
21
22
  const [autoRefreshInterval] = useAutoRefreshInterval();
22
23
  const { currentData: tenant, isFetching } = tenantApi.useGetTenantInfoQuery({ path: tenantName }, {
@@ -25,7 +26,31 @@ export function TenantOverview({ tenantName, additionalTenantProps, additionalNo
25
26
  const tenantLoading = isFetching && tenant === undefined;
26
27
  const { Name, Type, Overall } = tenant || {};
27
28
  const tenantType = mapDatabaseTypeToDBName(Type);
28
- const { blobStorage, tabletStorage, blobStorageLimit, tabletStorageLimit, poolsStats, memoryStats, blobStorageStats, tabletStorageStats, } = calculateTenantMetrics(tenant !== null && tenant !== void 0 ? tenant : undefined);
29
+ // FIXME: remove after correct data is added to tenantInfo
30
+ const { data: tenantSchemaData } = useGetSchemaQuery({ path: tenantName, database: tenantName });
31
+ const { Tables, Topics } = ((_b = (_a = tenantSchemaData === null || tenantSchemaData === void 0 ? void 0 : tenantSchemaData.PathDescription) === null || _a === void 0 ? void 0 : _a.DomainDescription) === null || _b === void 0 ? void 0 : _b.DiskSpaceUsage) || {};
32
+ const usedTabletStorage = [
33
+ Tables === null || Tables === void 0 ? void 0 : Tables.TotalSize,
34
+ Topics === null || Topics === void 0 ? void 0 : Topics.AccountSize,
35
+ Topics === null || Topics === void 0 ? void 0 : Topics.DataSize,
36
+ Topics === null || Topics === void 0 ? void 0 : Topics.ReserveSize,
37
+ Topics === null || Topics === void 0 ? void 0 : Topics.UsedReserveSize,
38
+ ].reduce((sum, current) => {
39
+ if (current) {
40
+ return sum + Number(current);
41
+ }
42
+ return sum;
43
+ }, 0);
44
+ const tenantData = {
45
+ ...tenant,
46
+ Metrics: {
47
+ ...tenant === null || tenant === void 0 ? void 0 : tenant.Metrics,
48
+ // Replace incorrect tenant metric with correct value
49
+ Storage: String(usedTabletStorage),
50
+ },
51
+ };
52
+ // === === ===
53
+ const { blobStorage, tabletStorage, blobStorageLimit, tabletStorageLimit, poolsStats, memoryStats, blobStorageStats, tabletStorageStats, } = calculateTenantMetrics(tenantData);
29
54
  const storageMetrics = {
30
55
  blobStorageUsed: blobStorage,
31
56
  blobStorageLimit,
@@ -57,5 +82,5 @@ export function TenantOverview({ tenantName, additionalTenantProps, additionalNo
57
82
  if (tenantLoading) {
58
83
  return (_jsx("div", { className: b('loader'), children: _jsx(Loader, { size: "m" }) }));
59
84
  }
60
- return (_jsxs("div", { className: b(), children: [_jsxs("div", { className: b('info'), children: [_jsx("div", { className: b('top-label'), children: tenantType }), _jsxs("div", { className: b('top'), children: [renderName(), (_a = additionalTenantProps === null || additionalTenantProps === void 0 ? void 0 : additionalTenantProps.getMonitoringLink) === null || _a === void 0 ? void 0 : _a.call(additionalTenantProps, Name, Type)] }), _jsx(MetricsCards, { poolsCpuStats: poolsStats, memoryStats: memoryStats, blobStorageStats: blobStorageStats, tabletStorageStats: tabletStorageStats, tenantName: tenantName })] }), renderTabContent()] }));
85
+ return (_jsxs("div", { className: b(), children: [_jsxs("div", { className: b('info'), children: [_jsx("div", { className: b('top-label'), children: tenantType }), _jsxs("div", { className: b('top'), children: [renderName(), (_c = additionalTenantProps === null || additionalTenantProps === void 0 ? void 0 : additionalTenantProps.getMonitoringLink) === null || _c === void 0 ? void 0 : _c.call(additionalTenantProps, Name, Type)] }), _jsx(MetricsCards, { poolsCpuStats: poolsStats, memoryStats: memoryStats, blobStorageStats: blobStorageStats, tabletStorageStats: tabletStorageStats, tenantName: tenantName })] }), renderTabContent()] }));
61
86
  }
@@ -3,6 +3,7 @@ interface GetSectionTitleParams {
3
3
  postfix: string;
4
4
  prefix?: string;
5
5
  link?: string;
6
+ onClick?: () => void;
6
7
  }
7
- export declare const getSectionTitle: ({ prefix, entity, postfix, link, }: GetSectionTitleParams) => string | import("react/jsx-runtime").JSX.Element;
8
+ export declare const getSectionTitle: ({ prefix, entity, postfix, link, onClick, }: GetSectionTitleParams) => string | import("react/jsx-runtime").JSX.Element;
8
9
  export {};
@@ -3,9 +3,9 @@ import React from 'react';
3
3
  import { InternalLink } from '../../../../components/InternalLink/InternalLink';
4
4
  import i18n from './i18n';
5
5
  // Titles are formed by the principle "Top entities by parameter"
6
- export const getSectionTitle = ({ prefix = i18n('top'), entity, postfix, link, }) => {
6
+ export const getSectionTitle = ({ prefix = i18n('top'), entity, postfix, link, onClick, }) => {
7
7
  if (link) {
8
- return (_jsxs(React.Fragment, { children: [prefix, " ", _jsx(InternalLink, { to: link, children: entity }), " ", postfix] }));
8
+ return (_jsxs(React.Fragment, { children: [prefix, ' ', _jsx(InternalLink, { to: link, onClick: onClick, children: entity }), ' ', postfix] }));
9
9
  }
10
10
  return `${prefix} ${entity} ${postfix}`;
11
11
  };
@@ -10,7 +10,7 @@
10
10
  "queries": "queries",
11
11
  "tables": "tables",
12
12
  "by-pools-usage": "by pools usage",
13
- "by-cpu-time": "by cpu time",
13
+ "by-cpu-time": "by cpu time, {{executionPeriod}}",
14
14
  "by-cpu-usage": "by cpu usage",
15
15
  "by-load": "by load",
16
16
  "by-memory": "by memory",
@@ -27,5 +27,6 @@
27
27
  "storage.tablet-storage-title": "Tablet storage",
28
28
  "storage.tablet-storage-description": "Size of user data and indexes stored in schema objects (tables, topics, etc.)",
29
29
  "storage.db-storage-title": "Database storage",
30
- "storage.db-storage-description": "Size of data stored in distributed storage with all overheads for redundancy"
30
+ "storage.db-storage-description": "Size of data stored in distributed storage with all overheads for redundancy",
31
+ "executed-last-hour": "executed in the last hour"
31
32
  }
@@ -1,2 +1,2 @@
1
- declare const _default: (key: "nodes" | "queries" | "groups" | "no-data" | "top" | "shards" | "tables" | "no-pools-data" | "top-nodes.empty-data" | "top-groups.empty-data" | "by-pools-usage" | "by-cpu-time" | "by-cpu-usage" | "by-load" | "by-memory" | "by-usage" | "by-size" | "cards.cpu-label" | "cards.storage-label" | "cards.memory-label" | "charts.queries-per-second" | "charts.transaction-latency" | "charts.cpu-usage" | "charts.storage-usage" | "charts.memory-usage" | "storage.tablet-storage-title" | "storage.tablet-storage-description" | "storage.db-storage-title" | "storage.db-storage-description", params?: import("@gravity-ui/i18n").Params) => string;
1
+ declare const _default: (key: "nodes" | "queries" | "groups" | "no-data" | "top" | "shards" | "tables" | "no-pools-data" | "top-nodes.empty-data" | "top-groups.empty-data" | "by-pools-usage" | "by-cpu-time" | "by-cpu-usage" | "by-load" | "by-memory" | "by-usage" | "by-size" | "cards.cpu-label" | "cards.storage-label" | "cards.memory-label" | "charts.queries-per-second" | "charts.transaction-latency" | "charts.cpu-usage" | "charts.storage-usage" | "charts.memory-usage" | "storage.tablet-storage-title" | "storage.tablet-storage-description" | "storage.db-storage-title" | "storage.db-storage-description" | "executed-last-hour", params?: import("@gravity-ui/i18n").Params) => string;
2
2
  export default _default;
@@ -16,7 +16,7 @@ import { parseQueryErrorToString } from '../../../../utils/query';
16
16
  import { TenantTabsGroups, getTenantPath } from '../../TenantPages';
17
17
  import { QUERY_TABLE_SETTINGS } from '../../utils/constants';
18
18
  import { isColumnEntityType } from '../../utils/schema';
19
- import { TOP_QUERIES_COLUMNS_WIDTH_LS_KEY, getTopQueriesColumns } from './getTopQueriesColumns';
19
+ import { TOP_QUERIES_COLUMNS, TOP_QUERIES_COLUMNS_WIDTH_LS_KEY } from './getTopQueriesColumns';
20
20
  import i18n from './i18n';
21
21
  import './TopQueries.scss';
22
22
  const b = cn('kv-top-queries');
@@ -32,7 +32,7 @@ export const TopQueries = ({ tenantName, type }) => {
32
32
  }, { pollingInterval: autoRefreshInterval });
33
33
  const loading = isFetching && currentData === undefined;
34
34
  const { result: data } = currentData || {};
35
- const rawColumns = getTopQueriesColumns();
35
+ const rawColumns = TOP_QUERIES_COLUMNS;
36
36
  const columns = rawColumns.map((column) => ({
37
37
  ...column,
38
38
  sortable: isSortableTopQueriesProperty(column.name),
@@ -2,5 +2,5 @@ import type { Column } from '@gravity-ui/react-data-table';
2
2
  import type { KeyValueRow } from '../../../../types/api/query';
3
3
  import './TopQueries.scss';
4
4
  export declare const TOP_QUERIES_COLUMNS_WIDTH_LS_KEY = "topQueriesColumnsWidth";
5
- export declare const getTopQueriesColumns: () => Column<KeyValueRow>[];
6
- export declare const getTenantOverviewTopQueriesColumns: () => Column<KeyValueRow>[];
5
+ export declare const TOP_QUERIES_COLUMNS: Column<KeyValueRow>[];
6
+ export declare const TENANT_OVERVIEW_TOP_QUERUES_COLUMNS: Column<KeyValueRow>[];