ydb-embedded-ui 6.12.0 → 6.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) hide show
  1. package/dist/components/AutoRefreshControl/i18n/index.d.ts +1 -1
  2. package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.d.ts +3 -2
  3. package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js +9 -5
  4. package/dist/components/CriticalActionDialog/CriticalActionDialog.d.ts +5 -3
  5. package/dist/components/CriticalActionDialog/CriticalActionDialog.js +8 -7
  6. package/dist/components/CriticalActionDialog/CriticalActionDialog.scss +1 -1
  7. package/dist/components/CriticalActionDialog/i18n/en.json +1 -0
  8. package/dist/components/CriticalActionDialog/i18n/index.d.ts +1 -1
  9. package/dist/components/Errors/PageError/PageError.d.ts +11 -0
  10. package/dist/components/Errors/PageError/PageError.js +19 -0
  11. package/dist/components/Errors/i18n/en.json +2 -1
  12. package/dist/components/Errors/i18n/index.d.ts +1 -1
  13. package/dist/components/Errors/i18n/ru.json +2 -1
  14. package/dist/components/Fullscreen/Fullscreen.d.ts +1 -1
  15. package/dist/components/Fullscreen/Fullscreen.js +34 -27
  16. package/dist/components/Fullscreen/Fullscreen.scss +16 -8
  17. package/dist/components/Graph/Graph.d.ts +13 -0
  18. package/dist/components/Graph/Graph.js +41 -0
  19. package/dist/components/LabelWithPopover/LabelWithPopover.d.ts +4 -1
  20. package/dist/components/LabelWithPopover/LabelWithPopover.js +1 -1
  21. package/dist/components/Loader/Loader.d.ts +2 -1
  22. package/dist/components/Loader/Loader.js +6 -1
  23. package/dist/components/LoaderWrapper/LoaderWrapper.d.ts +10 -0
  24. package/dist/components/LoaderWrapper/LoaderWrapper.js +8 -0
  25. package/dist/components/MetricChart/reducer.d.ts +2 -2
  26. package/dist/components/PDiskInfo/PDiskInfo.d.ts +2 -2
  27. package/dist/components/PDiskInfo/PDiskInfo.js +9 -6
  28. package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
  29. package/dist/components/ProgressViewer/ProgressViewer.js +3 -0
  30. package/dist/components/QueryExecutionStatus/QueryExecutionStatus.js +13 -3
  31. package/dist/components/QueryExecutionStatus/QueryExecutionStatus.scss +4 -0
  32. package/dist/components/QuerySettingsDescription/QuerySettingsDescription.d.ts +7 -0
  33. package/dist/components/QuerySettingsDescription/QuerySettingsDescription.js +8 -0
  34. package/dist/components/QuerySettingsDescription/QuerySettingsDescription.scss +8 -0
  35. package/dist/components/QuerySettingsDescription/index.d.ts +1 -0
  36. package/dist/components/QuerySettingsDescription/index.js +1 -0
  37. package/dist/components/VDisk/VDisk.js +3 -4
  38. package/dist/components/VDiskInfo/VDiskInfo.d.ts +2 -2
  39. package/dist/components/VDiskInfo/VDiskInfo.js +4 -2
  40. package/dist/containers/App/Content.js +15 -19
  41. package/dist/containers/AsideNavigation/AsideNavigation.js +2 -1
  42. package/dist/containers/AsideNavigation/YdbInternalUser/YdbInternalUser.js +4 -4
  43. package/dist/containers/Authentication/Authentication.js +8 -10
  44. package/dist/containers/Authentication/utils.d.ts +8 -0
  45. package/dist/containers/Authentication/utils.js +15 -0
  46. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +6 -6
  47. package/dist/containers/Clusters/constants.d.ts +1 -1
  48. package/dist/containers/Heatmap/Heatmap.js +5 -4
  49. package/dist/containers/Node/Node.js +5 -7
  50. package/dist/containers/Node/Node.scss +4 -0
  51. package/dist/containers/Node/NodeStructure/NodeStructure.js +4 -4
  52. package/dist/containers/Node/NodeStructure/NodeStructure.scss +4 -0
  53. package/dist/containers/Node/NodeStructure/Pdisk.js +2 -2
  54. package/dist/containers/Nodes/Nodes.js +6 -8
  55. package/dist/containers/Nodes/getNodesColumns.js +6 -21
  56. package/dist/containers/PDiskPage/PDiskPage.js +19 -8
  57. package/dist/containers/PDiskPage/i18n/en.json +1 -0
  58. package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
  59. package/dist/containers/Storage/PDisk/PDisk.js +3 -4
  60. package/dist/containers/Storage/Storage.js +4 -6
  61. package/dist/containers/Tablet/Tablet.js +2 -2
  62. package/dist/containers/Tablet/TabletControls/TabletControls.js +2 -1
  63. package/dist/containers/Tablets/Tablets.js +3 -5
  64. package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.js +2 -5
  65. package/dist/containers/Tenant/Diagnostics/Describe/Describe.js +10 -13
  66. package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.scss +1 -0
  67. package/dist/containers/Tenant/Diagnostics/Network/Network.js +8 -11
  68. package/dist/containers/Tenant/Diagnostics/Network/Network.scss +1 -0
  69. package/dist/containers/Tenant/Diagnostics/Overview/Overview.d.ts +1 -2
  70. package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +3 -5
  71. package/dist/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.js +3 -4
  72. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +1 -4
  73. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverviewTableLayout.js +3 -3
  74. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
  75. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +4 -3
  76. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +4 -3
  77. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.d.ts +2 -2
  78. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +56 -20
  79. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.scss +10 -6
  80. package/dist/containers/Tenant/Query/ExecuteResult/i18n/en.json +7 -0
  81. package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.d.ts +2 -0
  82. package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.js +4 -0
  83. package/dist/containers/Tenant/Query/ExecuteResult/utils.d.ts +18 -0
  84. package/dist/containers/Tenant/Query/ExecuteResult/utils.js +36 -0
  85. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.d.ts +23 -1
  86. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +56 -111
  87. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.scss +1 -30
  88. package/dist/containers/Tenant/Query/ExplainResult/components/Ast/Ast.d.ts +7 -0
  89. package/dist/containers/Tenant/Query/ExplainResult/components/Ast/Ast.js +18 -0
  90. package/dist/containers/Tenant/Query/ExplainResult/components/Ast/Ast.scss +8 -0
  91. package/dist/containers/Tenant/Query/ExplainResult/components/Graph/Graph.d.ts +8 -0
  92. package/dist/containers/Tenant/Query/ExplainResult/components/Graph/Graph.js +14 -0
  93. package/dist/containers/Tenant/Query/ExplainResult/components/Graph/Graph.scss +14 -0
  94. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/MetricsCell.d.ts +6 -0
  95. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/MetricsCell.js +11 -0
  96. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationCell.d.ts +13 -0
  97. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationCell.js +48 -0
  98. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationParams.d.ts +6 -0
  99. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationParams.js +66 -0
  100. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.d.ts +7 -0
  101. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.js +100 -0
  102. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.scss +128 -0
  103. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/types.d.ts +5 -0
  104. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/utils.d.ts +5 -0
  105. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/utils.js +59 -0
  106. package/dist/containers/Tenant/Query/ExplainResult/components/TextExplain/TextExplain.d.ts +8 -0
  107. package/dist/containers/Tenant/Query/ExplainResult/components/TextExplain/TextExplain.js +11 -0
  108. package/dist/containers/Tenant/Query/ExplainResult/components/TextExplain/TextExplain.scss +14 -0
  109. package/dist/containers/Tenant/Query/ExplainResult/i18n/en.json +8 -0
  110. package/dist/containers/Tenant/Query/ExplainResult/i18n/index.d.ts +2 -0
  111. package/dist/containers/Tenant/Query/ExplainResult/i18n/index.js +4 -0
  112. package/dist/containers/Tenant/Query/Preview/Preview.js +2 -3
  113. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js +1 -19
  114. package/dist/containers/Tenant/Query/QueryDuration/QueryDuration.js +1 -1
  115. package/dist/containers/Tenant/Query/QueryDuration/QueryDuration.scss +11 -0
  116. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +1 -1
  117. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +91 -95
  118. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.d.ts +4 -6
  119. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +18 -49
  120. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.d.ts +2 -0
  121. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.js +5 -0
  122. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.test.d.ts +1 -0
  123. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.test.js +42 -0
  124. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.d.ts +5 -0
  125. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.js +19 -0
  126. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.test.d.ts +1 -0
  127. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.test.js +56 -0
  128. package/dist/containers/Tenant/Query/QuerySettingsBanner/QuerySettingsBanner.d.ts +2 -0
  129. package/dist/containers/Tenant/Query/QuerySettingsBanner/QuerySettingsBanner.js +12 -0
  130. package/dist/containers/Tenant/Query/QuerySettingsBanner/QuerySettingsBanner.scss +3 -0
  131. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.js +20 -23
  132. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.d.ts +123 -7
  133. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js +32 -10
  134. package/dist/containers/Tenant/Query/i18n/en.json +3 -1
  135. package/dist/containers/Tenant/Query/i18n/index.d.ts +1 -1
  136. package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.js +6 -6
  137. package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +5 -2
  138. package/dist/containers/Tenant/Schema/SchemaViewer/columns.d.ts +2 -1
  139. package/dist/containers/Tenant/Schema/SchemaViewer/columns.js +13 -1
  140. package/dist/containers/Tenant/Schema/SchemaViewer/i18n/en.json +1 -0
  141. package/dist/containers/Tenant/Schema/SchemaViewer/i18n/index.d.ts +1 -1
  142. package/dist/containers/Tenant/Schema/SchemaViewer/prepareData.js +3 -2
  143. package/dist/containers/Tenant/Schema/SchemaViewer/types.d.ts +1 -0
  144. package/dist/containers/Tenant/Tenant.js +4 -8
  145. package/dist/containers/Tenant/utils/schemaActions.d.ts +2 -2
  146. package/dist/containers/Tenant/utils/schemaActions.js +2 -2
  147. package/dist/containers/Tenants/Tenants.js +4 -7
  148. package/dist/containers/UserSettings/i18n/en.json +3 -5
  149. package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
  150. package/dist/containers/UserSettings/settings.d.ts +2 -3
  151. package/dist/containers/UserSettings/settings.js +17 -23
  152. package/dist/containers/VDiskPage/VDiskPage.js +27 -13
  153. package/dist/containers/VDiskPage/i18n/en.json +1 -0
  154. package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
  155. package/dist/services/api.d.ts +21 -8
  156. package/dist/services/api.js +29 -42
  157. package/dist/services/settings.d.ts +11 -4
  158. package/dist/services/settings.js +7 -6
  159. package/dist/store/configureStore.d.ts +7 -7
  160. package/dist/store/defaultStore.d.ts +3 -3
  161. package/dist/store/reducers/api.d.ts +1 -1
  162. package/dist/store/reducers/api.js +1 -1
  163. package/dist/store/reducers/authentication/authentication.d.ts +37 -24
  164. package/dist/store/reducers/authentication/authentication.js +77 -57
  165. package/dist/store/reducers/authentication/types.d.ts +0 -8
  166. package/dist/store/reducers/capabilities/capabilities.d.ts +106 -0
  167. package/dist/store/reducers/capabilities/capabilities.js +22 -0
  168. package/dist/store/reducers/capabilities/hooks.d.ts +2 -0
  169. package/dist/store/reducers/capabilities/hooks.js +13 -0
  170. package/dist/store/reducers/cluster/cluster.d.ts +2 -2
  171. package/dist/store/reducers/clusterNodes/clusterNodes.d.ts +2 -2
  172. package/dist/store/reducers/clusters/clusters.d.ts +2 -2
  173. package/dist/store/reducers/describe.d.ts +2 -2
  174. package/dist/store/reducers/executeQuery.d.ts +7 -14
  175. package/dist/store/reducers/executeQuery.js +19 -14
  176. package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +2 -2
  177. package/dist/store/reducers/explainQuery/explainQuery.d.ts +5 -4
  178. package/dist/store/reducers/explainQuery/explainQuery.js +14 -4
  179. package/dist/store/reducers/explainQuery/types.d.ts +13 -1
  180. package/dist/store/reducers/explainQuery/utils.js +7 -2
  181. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +58 -58
  182. package/dist/store/reducers/heatmap.d.ts +2 -2
  183. package/dist/store/reducers/hotKeys/hotKeys.d.ts +2 -2
  184. package/dist/store/reducers/index.d.ts +6 -6
  185. package/dist/store/reducers/network/network.d.ts +2 -2
  186. package/dist/store/reducers/node/node.d.ts +3 -3
  187. package/dist/store/reducers/node/selectors.d.ts +1 -1
  188. package/dist/store/reducers/nodes/nodes.d.ts +3 -3
  189. package/dist/store/reducers/nodesList.d.ts +3 -3
  190. package/dist/store/reducers/overview/overview.d.ts +2 -2
  191. package/dist/store/reducers/partitions/partitions.d.ts +2 -2
  192. package/dist/store/reducers/pdisk/pdisk.d.ts +3 -3
  193. package/dist/store/reducers/preview.d.ts +2 -2
  194. package/dist/store/reducers/schema/schema.d.ts +3 -3
  195. package/dist/store/reducers/schema/schema.js +10 -3
  196. package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +2 -2
  197. package/dist/store/reducers/shardsWorkload/shardsWorkload.d.ts +2 -2
  198. package/dist/store/reducers/storage/storage.d.ts +3 -3
  199. package/dist/store/reducers/tablet.d.ts +3 -3
  200. package/dist/store/reducers/tablets.d.ts +13 -13
  201. package/dist/store/reducers/tabletsFilters.d.ts +1 -1
  202. package/dist/store/reducers/tenant/tenant.d.ts +2 -2
  203. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.d.ts +2 -2
  204. package/dist/store/reducers/tenantOverview/topNodes/topNodes.d.ts +2 -2
  205. package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.d.ts +2 -2
  206. package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.d.ts +2 -2
  207. package/dist/store/reducers/tenants/selectors.d.ts +31 -30
  208. package/dist/store/reducers/tenants/selectors.js +8 -2
  209. package/dist/store/reducers/tenants/tenants.d.ts +2 -2
  210. package/dist/store/reducers/topic.d.ts +44 -44
  211. package/dist/store/reducers/vdisk/vdisk.d.ts +2 -2
  212. package/dist/store/reducers/viewSchema/viewSchema.d.ts +2 -2
  213. package/dist/styles/mixins.scss +2 -0
  214. package/dist/types/api/capabilities.d.ts +7 -0
  215. package/dist/types/api/capabilities.js +1 -0
  216. package/dist/types/api/modifyDisk.d.ts +8 -0
  217. package/dist/types/api/modifyDisk.js +1 -0
  218. package/dist/types/api/query.d.ts +39 -3
  219. package/dist/types/api/query.js +9 -1
  220. package/dist/types/api/schema/shared.d.ts +8 -0
  221. package/dist/types/store/query.d.ts +7 -0
  222. package/dist/utils/__test__/prepareQueryExplain.test.d.ts +1 -0
  223. package/dist/utils/__test__/prepareQueryExplain.test.js +115 -0
  224. package/dist/utils/constants.d.ts +13 -4
  225. package/dist/utils/constants.js +15 -4
  226. package/dist/utils/dataFormatters/dataFormatters.d.ts +0 -1
  227. package/dist/utils/dataFormatters/dataFormatters.js +1 -4
  228. package/dist/utils/hooks/index.d.ts +2 -1
  229. package/dist/utils/hooks/index.js +2 -1
  230. package/dist/utils/hooks/useChangedQuerySettings.d.ts +10 -0
  231. package/dist/utils/hooks/useChangedQuerySettings.js +46 -0
  232. package/dist/utils/hooks/useDelayed.d.ts +1 -0
  233. package/dist/utils/hooks/useDelayed.js +13 -0
  234. package/dist/utils/hooks/useEventHandler.d.ts +6 -0
  235. package/dist/utils/hooks/useEventHandler.js +17 -0
  236. package/dist/utils/hooks/useLastQueryExecutionSettings.d.ts +2 -0
  237. package/dist/utils/hooks/useLastQueryExecutionSettings.js +5 -0
  238. package/dist/utils/hooks/useQueryExecutionSettings.d.ts +8 -0
  239. package/dist/utils/hooks/useQueryExecutionSettings.js +15 -0
  240. package/dist/utils/prepareQueryExplain.d.ts +3 -1
  241. package/dist/utils/prepareQueryExplain.js +54 -2
  242. package/dist/utils/query.js +1 -0
  243. package/dist/utils/query.test.js +3 -0
  244. package/dist/utils/utils.d.ts +8 -7
  245. package/dist/utils/utils.js +23 -11
  246. package/package.json +4 -2
  247. package/dist/containers/Tenant/Query/ExplainResult/utils.d.ts +0 -2
  248. package/dist/containers/Tenant/Query/ExplainResult/utils.js +0 -4
  249. package/dist/store/utils.d.ts +0 -23
  250. package/dist/store/utils.js +0 -49
  251. package/dist/types/api/restartPDisk.d.ts +0 -4
  252. package/dist/utils/hooks/useQueryModes.d.ts +0 -2
  253. package/dist/utils/hooks/useQueryModes.js +0 -5
  254. /package/dist/{types/api/restartPDisk.js → containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/types.js} +0 -0
@@ -1,2 +1,2 @@
1
- declare const _default: (key: "1 min" | "5 min" | "None" | "15 sec" | "2 min" | "Refresh", params?: import("@gravity-ui/i18n").Params) => string;
1
+ declare const _default: (key: "None" | "1 min" | "5 min" | "15 sec" | "2 min" | "Refresh", params?: import("@gravity-ui/i18n").Params) => string;
2
2
  export default _default;
@@ -2,9 +2,10 @@ import React from 'react';
2
2
  import type { ButtonProps, PopoverProps } from '@gravity-ui/uikit';
3
3
  interface ButtonWithConfirmDialogProps<T, K> {
4
4
  children: React.ReactNode;
5
- onConfirmAction: () => Promise<T>;
5
+ onConfirmAction: (isRetry?: boolean) => Promise<T>;
6
6
  onConfirmActionSuccess?: (() => Promise<K>) | VoidFunction;
7
7
  dialogContent: string;
8
+ retryButtonText?: string;
8
9
  buttonDisabled?: ButtonProps['disabled'];
9
10
  buttonView?: ButtonProps['view'];
10
11
  buttonClassName?: ButtonProps['className'];
@@ -13,5 +14,5 @@ interface ButtonWithConfirmDialogProps<T, K> {
13
14
  popoverPlacement?: PopoverProps['placement'];
14
15
  popoverDisabled?: PopoverProps['disabled'];
15
16
  }
16
- export declare function ButtonWithConfirmDialog<T, K>({ children, onConfirmAction, onConfirmActionSuccess, dialogContent, buttonDisabled, buttonView, buttonClassName, withPopover, popoverContent, popoverPlacement, popoverDisabled, }: ButtonWithConfirmDialogProps<T, K>): import("react/jsx-runtime").JSX.Element;
17
+ export declare function ButtonWithConfirmDialog<T, K>({ children, onConfirmAction, onConfirmActionSuccess, dialogContent, retryButtonText, buttonDisabled, buttonView, buttonClassName, withPopover, popoverContent, popoverPlacement, popoverDisabled, }: ButtonWithConfirmDialogProps<T, K>): import("react/jsx-runtime").JSX.Element;
17
18
  export {};
@@ -2,15 +2,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { Button, Popover } from '@gravity-ui/uikit';
4
4
  import { CriticalActionDialog } from '../CriticalActionDialog';
5
- export function ButtonWithConfirmDialog({ children, onConfirmAction, onConfirmActionSuccess, dialogContent, buttonDisabled = false, buttonView = 'action', buttonClassName, withPopover = false, popoverContent, popoverPlacement = 'right', popoverDisabled = true, }) {
5
+ export function ButtonWithConfirmDialog({ children, onConfirmAction, onConfirmActionSuccess, dialogContent, retryButtonText, buttonDisabled = false, buttonView = 'action', buttonClassName, withPopover = false, popoverContent, popoverPlacement = 'right', popoverDisabled = true, }) {
6
6
  const [isConfirmDialogVisible, setIsConfirmDialogVisible] = React.useState(false);
7
7
  const [buttonLoading, setButtonLoading] = React.useState(false);
8
- const handleConfirmAction = async () => {
8
+ const [withRetry, setWithRetry] = React.useState(false);
9
+ const handleConfirmAction = async (isRetry) => {
9
10
  setButtonLoading(true);
10
- await onConfirmAction();
11
+ await onConfirmAction(isRetry);
11
12
  setButtonLoading(false);
12
13
  };
13
14
  const handleConfirmActionSuccess = async () => {
15
+ setWithRetry(false);
14
16
  if (onConfirmActionSuccess) {
15
17
  setButtonLoading(true);
16
18
  try {
@@ -23,7 +25,9 @@ export function ButtonWithConfirmDialog({ children, onConfirmAction, onConfirmAc
23
25
  }
24
26
  }
25
27
  };
26
- const handleConfirmActionError = () => {
28
+ const handleConfirmActionError = (error) => {
29
+ const isWithRetry = Boolean(error && typeof error === 'object' && 'retryPossible' in error && error.retryPossible);
30
+ setWithRetry(isWithRetry);
27
31
  setButtonLoading(false);
28
32
  };
29
33
  const renderButton = () => {
@@ -35,7 +39,7 @@ export function ButtonWithConfirmDialog({ children, onConfirmAction, onConfirmAc
35
39
  }
36
40
  return renderButton();
37
41
  };
38
- return (_jsxs(React.Fragment, { children: [_jsx(CriticalActionDialog, { visible: isConfirmDialogVisible, text: dialogContent, onConfirm: handleConfirmAction, onConfirmActionSuccess: handleConfirmActionSuccess, onConfirmActionError: handleConfirmActionError, onClose: () => {
42
+ return (_jsxs(React.Fragment, { children: [_jsx(CriticalActionDialog, { visible: isConfirmDialogVisible, text: dialogContent, withRetry: withRetry, retryButtonText: retryButtonText, onConfirm: handleConfirmAction, onConfirmActionSuccess: handleConfirmActionSuccess, onConfirmActionError: handleConfirmActionError, onClose: () => {
39
43
  setIsConfirmDialogVisible(false);
40
44
  } }), renderContent()] }));
41
45
  }
@@ -2,10 +2,12 @@ import './CriticalActionDialog.scss';
2
2
  interface CriticalActionDialogProps<T> {
3
3
  visible: boolean;
4
4
  text: string;
5
+ withRetry?: boolean;
6
+ retryButtonText?: string;
5
7
  onClose: VoidFunction;
6
- onConfirm: () => Promise<T>;
8
+ onConfirm: (isRetry?: boolean) => Promise<T>;
7
9
  onConfirmActionSuccess: VoidFunction;
8
- onConfirmActionError: VoidFunction;
10
+ onConfirmActionError: (error: unknown) => void;
9
11
  }
10
- export declare function CriticalActionDialog<T>({ visible, text, onClose, onConfirm, onConfirmActionSuccess, onConfirmActionError, }: CriticalActionDialogProps<T>): import("react/jsx-runtime").JSX.Element;
12
+ export declare function CriticalActionDialog<T>({ visible, text, withRetry, retryButtonText, onClose, onConfirm, onConfirmActionSuccess, onConfirmActionError, }: CriticalActionDialogProps<T>): import("react/jsx-runtime").JSX.Element;
11
13
  export {};
@@ -15,19 +15,18 @@ const parseError = (error) => {
15
15
  }
16
16
  return criticalActionDialogKeyset('default-error');
17
17
  };
18
- export function CriticalActionDialog({ visible, text, onClose, onConfirm, onConfirmActionSuccess, onConfirmActionError, }) {
18
+ export function CriticalActionDialog({ visible, text, withRetry, retryButtonText, onClose, onConfirm, onConfirmActionSuccess, onConfirmActionError, }) {
19
19
  const [isLoading, setIsLoading] = React.useState(false);
20
20
  const [error, setError] = React.useState();
21
- const onSubmit = async (e) => {
22
- e.preventDefault();
21
+ const onApply = async (isRetry) => {
23
22
  setIsLoading(true);
24
- return onConfirm()
23
+ return onConfirm(isRetry)
25
24
  .then(() => {
26
25
  onConfirmActionSuccess();
27
26
  onClose();
28
27
  })
29
28
  .catch((err) => {
30
- onConfirmActionError();
29
+ onConfirmActionError(err);
31
30
  setError(err);
32
31
  })
33
32
  .finally(() => {
@@ -36,9 +35,11 @@ export function CriticalActionDialog({ visible, text, onClose, onConfirm, onConf
36
35
  };
37
36
  const renderDialogContent = () => {
38
37
  if (error) {
39
- return (_jsxs(React.Fragment, { children: [_jsxs(Dialog.Body, { className: b('body'), children: [_jsx("span", { className: b('error-icon'), children: _jsx(CircleXmarkFill, { width: "24", height: "22" }) }), parseError(error)] }), _jsx(Dialog.Footer, { loading: false, preset: "default", textButtonCancel: criticalActionDialogKeyset('button-close'), onClickButtonCancel: onClose })] }));
38
+ return (_jsxs(React.Fragment, { children: [_jsxs(Dialog.Body, { className: b('body'), children: [_jsx("span", { className: b('error-icon'), children: _jsx(CircleXmarkFill, { width: "24", height: "22" }) }), parseError(error)] }), _jsx(Dialog.Footer, { loading: false, preset: "default", textButtonApply: withRetry
39
+ ? retryButtonText || criticalActionDialogKeyset('button-retry')
40
+ : undefined, textButtonCancel: criticalActionDialogKeyset('button-close'), onClickButtonApply: () => onApply(true), onClickButtonCancel: onClose })] }));
40
41
  }
41
- return (_jsxs("form", { onSubmit: onSubmit, children: [_jsxs(Dialog.Body, { className: b('body'), children: [_jsx("span", { className: b('warning-icon'), children: _jsx(Icon, { data: TriangleExclamationFill, size: 24 }) }), text] }), _jsx(Dialog.Footer, { loading: isLoading, preset: "default", textButtonApply: criticalActionDialogKeyset('button-confirm'), textButtonCancel: criticalActionDialogKeyset('button-cancel'), propsButtonApply: { type: 'submit' }, onClickButtonCancel: onClose, onClickButtonApply: () => { } })] }));
42
+ return (_jsxs(React.Fragment, { children: [_jsxs(Dialog.Body, { className: b('body'), children: [_jsx("span", { className: b('warning-icon'), children: _jsx(Icon, { data: TriangleExclamationFill, size: 24 }) }), text] }), _jsx(Dialog.Footer, { loading: isLoading, preset: "default", textButtonApply: criticalActionDialogKeyset('button-confirm'), textButtonCancel: criticalActionDialogKeyset('button-cancel'), propsButtonApply: { type: 'submit' }, onClickButtonCancel: onClose, onClickButtonApply: () => onApply() })] }));
42
43
  };
43
44
  return (_jsx(Dialog, { open: visible, hasCloseButton: false, className: b(), size: "s", onClose: onClose, onTransitionExited: () => setError(undefined), children: renderDialogContent() }));
44
45
  }
@@ -1,5 +1,5 @@
1
1
  .ydb-critical-dialog {
2
- width: 400px;
2
+ padding-top: 18px;
3
3
 
4
4
  &__warning-icon {
5
5
  margin-right: 16px;
@@ -2,6 +2,7 @@
2
2
  "default-error": "Something went wrong, action cannot be completed",
3
3
  "no-rights-error": "You don't have enough rights to complete the operation",
4
4
  "button-confirm": "Confirm",
5
+ "button-retry": "Retry",
5
6
  "button-cancel": "Cancel",
6
7
  "button-close": "Close"
7
8
  }
@@ -1 +1 @@
1
- export declare const criticalActionDialogKeyset: (key: "default-error" | "no-rights-error" | "button-confirm" | "button-cancel" | "button-close", params?: import("@gravity-ui/i18n").Params) => string;
1
+ export declare const criticalActionDialogKeyset: (key: "default-error" | "no-rights-error" | "button-confirm" | "button-retry" | "button-cancel" | "button-close", params?: import("@gravity-ui/i18n").Params) => string;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { EmptyStateProps } from '../../EmptyState';
3
+ interface PageErrorProps extends Omit<EmptyStateProps, 'image' | 'title' | 'description'> {
4
+ title?: string;
5
+ description?: string;
6
+ error: unknown;
7
+ children?: React.ReactNode;
8
+ }
9
+ export declare function PageError({ title, description, error, children, ...restProps }: PageErrorProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function isAccessError(error: unknown): boolean;
11
+ export {};
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { EmptyState } from '../../EmptyState';
4
+ import { Illustration } from '../../Illustration';
5
+ import { AccessDenied } from '../403';
6
+ import { ResponseError } from '../ResponseError';
7
+ import i18n from '../i18n';
8
+ export function PageError({ title, description, error, children, ...restProps }) {
9
+ if (isAccessError(error)) {
10
+ return _jsx(AccessDenied, { title: title, description: description, ...restProps });
11
+ }
12
+ if (error || description) {
13
+ return (_jsx(EmptyState, { image: _jsx(Illustration, { name: "error" }), title: title || i18n('error.title'), description: error ? _jsx(ResponseError, { error: error }) : description, ...restProps }));
14
+ }
15
+ return _jsx(React.Fragment, { children: children });
16
+ }
17
+ export function isAccessError(error) {
18
+ return Boolean(error && typeof error === 'object' && 'status' in error && error.status === 403);
19
+ }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "403.title": "Access denied",
3
3
  "403.description": "You don’t have the necessary roles to view this page.",
4
- "responseError.defaultMessage": "Response error"
4
+ "responseError.defaultMessage": "Response error",
5
+ "error.title": "Error"
5
6
  }
@@ -1,2 +1,2 @@
1
- declare const _default: (key: "403.title" | "403.description" | "responseError.defaultMessage", params?: import("@gravity-ui/i18n").Params) => string;
1
+ declare const _default: (key: "403.title" | "403.description" | "responseError.defaultMessage" | "error.title", params?: import("@gravity-ui/i18n").Params) => string;
2
2
  export default _default;
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "403.title": "Доступ запрещен",
3
3
  "403.description": "У вас недостаточно прав для просмотра данной страницы.",
4
- "responseError.defaultMessage": "Ошибка запроса"
4
+ "responseError.defaultMessage": "Ошибка запроса",
5
+ "error.title": "Ошибка"
5
6
  }
@@ -4,5 +4,5 @@ interface FullscreenProps {
4
4
  children: React.ReactNode;
5
5
  className?: string;
6
6
  }
7
- declare function Fullscreen(props: FullscreenProps): import("react/jsx-runtime").JSX.Element;
7
+ declare function Fullscreen({ children, className }: FullscreenProps): import("react/jsx-runtime").JSX.Element | null;
8
8
  export default Fullscreen;
@@ -1,35 +1,16 @@
1
+ var _a;
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import React from 'react';
3
- import { Button, Icon } from '@gravity-ui/uikit';
4
- import ReactDOM from 'react-dom';
4
+ import { Button, Icon, Portal } from '@gravity-ui/uikit';
5
5
  import { disableFullscreen } from '../../store/reducers/fullscreen';
6
6
  import { cn } from '../../utils/cn';
7
- import { useTypedDispatch } from '../../utils/hooks';
7
+ import { useTypedDispatch, useTypedSelector } from '../../utils/hooks';
8
8
  import disableFullscreenIcon from '../../assets/icons/disableFullscreen.svg';
9
9
  import './Fullscreen.scss';
10
- const b = cn('kv-fullscreen');
11
- class FullscreenWrapper extends React.Component {
12
- constructor(props) {
13
- super(props);
14
- this.modalRoot = null;
15
- this.el = document.createElement('div');
16
- }
17
- componentDidMount() {
18
- this.modalRoot = document.getElementById('fullscreen-root');
19
- if (this.modalRoot) {
20
- this.modalRoot.appendChild(this.el);
21
- }
22
- }
23
- componentWillUnmount() {
24
- if (this.modalRoot) {
25
- this.modalRoot.removeChild(this.el);
26
- }
27
- }
28
- render() {
29
- return ReactDOM.createPortal(this.props.children, this.el);
30
- }
31
- }
32
- function Fullscreen(props) {
10
+ const b = cn('ydb-fullscreen');
11
+ const fullscreenRoot = (_a = document.getElementById('fullscreen-root')) !== null && _a !== void 0 ? _a : undefined;
12
+ function Fullscreen({ children, className }) {
13
+ const isFullscreen = useTypedSelector((state) => state.fullscreen);
33
14
  const dispatch = useTypedDispatch();
34
15
  const onDisableFullScreen = React.useCallback(() => {
35
16
  dispatch(disableFullscreen());
@@ -45,6 +26,32 @@ function Fullscreen(props) {
45
26
  document.removeEventListener('keydown', escFunction, false);
46
27
  };
47
28
  }, [onDisableFullScreen]);
48
- return (_jsx(FullscreenWrapper, { children: _jsxs("div", { className: b(null, props.className), children: [_jsx(Button, { onClick: onDisableFullScreen, view: "raised", className: b('close-button'), children: _jsx(Icon, { data: disableFullscreenIcon }) }), props.children] }) }));
29
+ const [container, setContainer] = React.useState(null);
30
+ React.useEffect(() => {
31
+ const div = document.createElement('div');
32
+ fullscreenRoot === null || fullscreenRoot === void 0 ? void 0 : fullscreenRoot.appendChild(div);
33
+ div.style.display = 'contents';
34
+ setContainer(div);
35
+ return () => {
36
+ setContainer(null);
37
+ div.remove();
38
+ };
39
+ }, []);
40
+ const ref = React.useRef(null);
41
+ React.useLayoutEffect(() => {
42
+ var _a;
43
+ if (container) {
44
+ if (isFullscreen) {
45
+ fullscreenRoot === null || fullscreenRoot === void 0 ? void 0 : fullscreenRoot.appendChild(container);
46
+ }
47
+ else {
48
+ (_a = ref.current) === null || _a === void 0 ? void 0 : _a.appendChild(container);
49
+ }
50
+ }
51
+ }, [container, isFullscreen]);
52
+ if (!container) {
53
+ return null;
54
+ }
55
+ return (_jsx("div", { ref: ref, style: { display: 'contents' }, children: _jsx(Portal, { container: container, children: _jsxs("div", { className: b({ fullscreen: isFullscreen }, className), children: [_jsx(Button, { onClick: onDisableFullScreen, view: "raised", className: b('close-button'), children: _jsx(Icon, { data: disableFullscreenIcon }) }), children] }) }) }));
49
56
  }
50
57
  export default Fullscreen;
@@ -1,20 +1,28 @@
1
- .kv-fullscreen {
2
- // should expand to fill the content area, keeping aside navigation visible
3
- // counts on .gn-aside-header__content to have position: relative, it is set in App.scss
4
- position: absolute;
5
- z-index: 10;
6
- inset: 0;
7
-
1
+ .ydb-fullscreen {
8
2
  display: flex;
9
3
  overflow: hidden;
10
4
  flex-grow: 1;
11
5
 
12
- background-color: var(--g-color-base-background);
6
+ &_fullscreen {
7
+ // should expand to fill the content area, keeping aside navigation visible
8
+ // counts on .gn-aside-header__content to have position: relative, it is set in App.scss
9
+ position: absolute;
10
+ z-index: 10;
11
+ inset: 0;
12
+
13
+ background-color: var(--g-color-base-background);
14
+ }
13
15
 
14
16
  &__close-button {
15
17
  position: fixed;
16
18
  z-index: 11;
17
19
  top: 8px;
18
20
  right: 20px;
21
+
22
+ display: none;
23
+ }
24
+
25
+ &_fullscreen &__close-button {
26
+ display: block;
19
27
  }
20
28
  }
@@ -0,0 +1,13 @@
1
+ import type { Data, GraphNode, Options, Shapes } from '@gravity-ui/paranoid';
2
+ interface GraphProps<T> {
3
+ data: Data<T>;
4
+ opts?: Options;
5
+ shapes?: Shapes;
6
+ }
7
+ export declare function Graph<T>(props: GraphProps<T>): import("react/jsx-runtime").JSX.Element;
8
+ export declare const renderExplainNode: (node: GraphNode) => string;
9
+ interface YDBGraphProps<T> {
10
+ data: Data<T>;
11
+ }
12
+ export declare function YDBGraph<T>(props: YDBGraphProps<T>): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { getTopology, getYdbPlanNodeShape } from '@gravity-ui/paranoid';
4
+ export function Graph(props) {
5
+ const containerRef = React.useRef(null);
6
+ const containerId = React.useId();
7
+ const { data, opts, shapes } = props;
8
+ React.useEffect(() => {
9
+ const graphRoot = containerRef.current;
10
+ if (!graphRoot) {
11
+ return undefined;
12
+ }
13
+ graphRoot.innerHTML = '';
14
+ // set width and height to screen size to make a canvas bigger then the container
15
+ graphRoot.style.setProperty('width', '100vw');
16
+ graphRoot.style.setProperty('height', '100vh');
17
+ const topology = getTopology(graphRoot.id, data, opts, shapes);
18
+ topology.render();
19
+ graphRoot.style.setProperty('width', '100%');
20
+ graphRoot.style.setProperty('height', '100%');
21
+ return () => {
22
+ topology.destroy();
23
+ };
24
+ }, [data, opts, shapes]);
25
+ return _jsx("div", { id: containerId, ref: containerRef, style: { overflow: 'auto' } });
26
+ }
27
+ export const renderExplainNode = (node) => {
28
+ const parts = node.name.split('|');
29
+ return parts.length > 1 ? parts[1] : node.name;
30
+ };
31
+ const schemaOptions = {
32
+ renderNodeTitle: renderExplainNode,
33
+ textOverflow: 'normal',
34
+ initialZoomFitsCanvas: true,
35
+ };
36
+ const schemaShapes = {
37
+ node: getYdbPlanNodeShape,
38
+ };
39
+ export function YDBGraph(props) {
40
+ return _jsx(Graph, { ...props, opts: schemaOptions, shapes: schemaShapes });
41
+ }
@@ -1,8 +1,11 @@
1
+ import type { ButtonProps } from '@gravity-ui/uikit';
1
2
  interface LabelWithPopoverProps {
2
3
  text: React.ReactNode;
3
4
  popoverContent: React.ReactNode;
5
+ popoverClassName?: string;
4
6
  className?: string;
5
7
  contentClassName?: string;
8
+ buttonProps?: ButtonProps;
6
9
  }
7
- export declare const LabelWithPopover: ({ text, popoverContent, className, contentClassName, }: LabelWithPopoverProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const LabelWithPopover: ({ text, popoverContent, popoverClassName, className, contentClassName, buttonProps, }: LabelWithPopoverProps) => import("react/jsx-runtime").JSX.Element;
8
11
  export {};
@@ -1,3 +1,3 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { HelpPopover } from '@gravity-ui/components';
3
- export const LabelWithPopover = ({ text, popoverContent, className, contentClassName, }) => (_jsxs("div", { className: className, children: [text, '\u00a0', _jsx(HelpPopover, { content: popoverContent, contentClassName: contentClassName })] }));
3
+ export const LabelWithPopover = ({ text, popoverContent, popoverClassName, className, contentClassName, buttonProps, }) => (_jsxs("div", { className: className, children: [text, '\u00a0', _jsx(HelpPopover, { className: popoverClassName, buttonProps: buttonProps, content: popoverContent, contentClassName: contentClassName })] }));
@@ -2,7 +2,8 @@ import type { LoaderSize } from '@gravity-ui/uikit';
2
2
  import './Loader.scss';
3
3
  interface LoaderProps {
4
4
  size?: LoaderSize;
5
+ delay?: number;
5
6
  className?: string;
6
7
  }
7
- export declare const Loader: ({ size, className }: LoaderProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const Loader: ({ size, delay, className }: LoaderProps) => import("react/jsx-runtime").JSX.Element | null;
8
9
  export {};
@@ -1,8 +1,13 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Loader as KitLoader } from '@gravity-ui/uikit';
3
3
  import { cn } from '../../utils/cn';
4
+ import { useDelayed } from '../../utils/hooks/useDelayed';
4
5
  import './Loader.scss';
5
6
  const b = cn('ydb-loader');
6
- export const Loader = ({ size = 'm', className }) => {
7
+ export const Loader = ({ size = 'm', delay = 600, className }) => {
8
+ const show = useDelayed(delay);
9
+ if (!show) {
10
+ return null;
11
+ }
7
12
  return (_jsx("div", { className: b(null, className), children: _jsx(KitLoader, { size: size }) }));
8
13
  };
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { LoaderSize } from '@gravity-ui/uikit';
3
+ interface LoaderWrapperProps {
4
+ loading?: boolean;
5
+ size?: LoaderSize;
6
+ className?: string;
7
+ children: React.ReactNode;
8
+ }
9
+ export declare function LoaderWrapper({ loading, size, className, children }: LoaderWrapperProps): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
10
+ export {};
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Loader } from '../Loader/Loader';
3
+ export function LoaderWrapper({ loading, size = 'm', className, children }) {
4
+ if (loading) {
5
+ return _jsx(Loader, { size: size, className: className });
6
+ }
7
+ return children;
8
+ }
@@ -1,4 +1,4 @@
1
1
  import type { GetChartDataParams } from './getChartData';
2
2
  export declare const chartApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, {
3
- getChartData: import("@reduxjs/toolkit/query").QueryDefinition<GetChartDataParams, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, "All" | "PDiskData", import("./types").PreparedMetricsData | undefined, "api">;
4
- }, "api", "All" | "PDiskData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
3
+ getChartData: import("@reduxjs/toolkit/query").QueryDefinition<GetChartDataParams, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, "All" | "PDiskData" | "UserData", import("./types").PreparedMetricsData | undefined, "api">;
4
+ }, "api", "All" | "PDiskData" | "UserData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
@@ -3,11 +3,11 @@ import './PDiskInfo.scss';
3
3
  interface GetPDiskInfoOptions<T extends PreparedPDisk> {
4
4
  pDisk?: T;
5
5
  nodeId?: number | string | null;
6
- isPDiskPage?: boolean;
6
+ withPDiskPageLink?: boolean;
7
7
  isUserAllowedToMakeChanges?: boolean;
8
8
  }
9
9
  interface PDiskInfoProps<T extends PreparedPDisk> extends GetPDiskInfoOptions<T> {
10
10
  className?: string;
11
11
  }
12
- export declare function PDiskInfo<T extends PreparedPDisk>({ pDisk, nodeId, isPDiskPage, className, }: PDiskInfoProps<T>): import("react/jsx-runtime").JSX.Element;
12
+ export declare function PDiskInfo<T extends PreparedPDisk>({ pDisk, nodeId, withPDiskPageLink, className, }: PDiskInfoProps<T>): import("react/jsx-runtime").JSX.Element;
13
13
  export {};
@@ -1,5 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { getPDiskPagePath } from '../../routes';
3
+ import { selectIsUserAllowedToMakeChanges } from '../../store/reducers/authentication/authentication';
4
+ import { useDiskPagesAvailable } from '../../store/reducers/capabilities/hooks';
3
5
  import { valueIsDefined } from '../../utils';
4
6
  import { formatBytes } from '../../utils/bytesParsers';
5
7
  import { cn } from '../../utils/cn';
@@ -14,7 +16,7 @@ import { pDiskInfoKeyset } from './i18n';
14
16
  import './PDiskInfo.scss';
15
17
  const b = cn('ydb-pdisk-info');
16
18
  // eslint-disable-next-line complexity
17
- function getPDiskInfo({ pDisk, nodeId, isPDiskPage = false, isUserAllowedToMakeChanges, }) {
19
+ function getPDiskInfo({ pDisk, nodeId, withPDiskPageLink, isUserAllowedToMakeChanges, }) {
18
20
  const { PDiskId, Path, Guid, Category, Type, Device, Realtime, State, SerialNumber, TotalSize, AllocatedSize, DecommitStatus, StatusV2, NumActiveSlots, ExpectedSlotCount, LogUsedSize, LogTotalSize, SystemSize, SharedWithOs, } = pDisk || {};
19
21
  const generalInfo = [];
20
22
  if (valueIsDefined(DecommitStatus)) {
@@ -88,7 +90,7 @@ function getPDiskInfo({ pDisk, nodeId, isPDiskPage = false, isUserAllowedToMakeC
88
90
  });
89
91
  }
90
92
  const additionalInfo = [];
91
- const shouldDisplayLinks = (!isPDiskPage || isUserAllowedToMakeChanges) &&
93
+ const shouldDisplayLinks = (withPDiskPageLink || isUserAllowedToMakeChanges) &&
92
94
  valueIsDefined(PDiskId) &&
93
95
  valueIsDefined(nodeId);
94
96
  if (shouldDisplayLinks) {
@@ -99,17 +101,18 @@ function getPDiskInfo({ pDisk, nodeId, isPDiskPage = false, isUserAllowedToMakeC
99
101
  });
100
102
  additionalInfo.push({
101
103
  label: pDiskInfoKeyset('links'),
102
- value: (_jsxs("span", { className: b('links'), children: [!isPDiskPage && (_jsx(LinkWithIcon, { title: pDiskInfoKeyset('pdisk-page'), url: pDiskPagePath, external: false })), isUserAllowedToMakeChanges && (_jsx(LinkWithIcon, { title: pDiskInfoKeyset('developer-ui'), url: pDiskInternalViewerPath }))] })),
104
+ value: (_jsxs("span", { className: b('links'), children: [withPDiskPageLink && (_jsx(LinkWithIcon, { title: pDiskInfoKeyset('pdisk-page'), url: pDiskPagePath, external: false })), isUserAllowedToMakeChanges && (_jsx(LinkWithIcon, { title: pDiskInfoKeyset('developer-ui'), url: pDiskInternalViewerPath }))] })),
103
105
  });
104
106
  }
105
107
  return [generalInfo, statusInfo, spaceInfo, additionalInfo];
106
108
  }
107
- export function PDiskInfo({ pDisk, nodeId, isPDiskPage = false, className, }) {
108
- const { isUserAllowedToMakeChanges } = useTypedSelector((state) => state.authentication);
109
+ export function PDiskInfo({ pDisk, nodeId, withPDiskPageLink, className, }) {
110
+ const isUserAllowedToMakeChanges = useTypedSelector(selectIsUserAllowedToMakeChanges);
111
+ const diskPagesAvailable = useDiskPagesAvailable();
109
112
  const [generalInfo, statusInfo, spaceInfo, additionalInfo] = getPDiskInfo({
110
113
  pDisk,
111
114
  nodeId,
112
- isPDiskPage,
115
+ withPDiskPageLink: withPDiskPageLink && diskPagesAvailable,
113
116
  isUserAllowedToMakeChanges,
114
117
  });
115
118
  return (_jsxs("div", { className: b('wrapper', className), children: [_jsxs("div", { className: b('col'), children: [_jsx(InfoViewer, { info: generalInfo, renderEmptyState: () => null }), _jsx(InfoViewer, { info: spaceInfo, renderEmptyState: () => null })] }), _jsxs("div", { className: b('col'), children: [_jsx(InfoViewer, { info: statusInfo, renderEmptyState: () => null }), _jsx(InfoViewer, { info: additionalInfo, renderEmptyState: () => null })] })] }));
@@ -1 +1 @@
1
- export declare const pDiskInfoKeyset: (key: "path" | "space" | "type" | "state" | "yes" | "links" | "decomission-status" | "guid" | "serial-number" | "shared-with-os" | "drive-status" | "device" | "realtime" | "slots" | "log-size" | "system-size" | "developer-ui" | "pdisk-page", params?: import("@gravity-ui/i18n").Params) => string;
1
+ export declare const pDiskInfoKeyset: (key: "type" | "path" | "space" | "state" | "yes" | "links" | "decomission-status" | "guid" | "serial-number" | "shared-with-os" | "drive-status" | "device" | "realtime" | "slots" | "log-size" | "system-size" | "developer-ui" | "pdisk-page", params?: import("@gravity-ui/i18n").Params) => string;
@@ -32,6 +32,9 @@ export function ProgressViewer({ value, capacity, formatValues = defaultFormatVa
32
32
  else if (fillWidth > dangerThreshold) {
33
33
  status = inverseColorize ? 'good' : 'danger';
34
34
  }
35
+ if (!isNumeric(capacity)) {
36
+ fillWidth = 100;
37
+ }
35
38
  }
36
39
  const lineStyle = {
37
40
  width: fillWidth + '%',
@@ -1,10 +1,20 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { CircleCheck, CircleQuestionFill, CircleXmark } from '@gravity-ui/icons';
3
- import { Icon } from '@gravity-ui/uikit';
2
+ import { CircleCheck, CircleInfo, CircleQuestionFill, CircleXmark } from '@gravity-ui/icons';
3
+ import { Icon, Tooltip } from '@gravity-ui/uikit';
4
4
  import { isAxiosError } from 'axios';
5
+ import i18n from '../../containers/Tenant/Query/i18n';
5
6
  import { cn } from '../../utils/cn';
7
+ import { useChangedQuerySettings } from '../../utils/hooks/useChangedQuerySettings';
8
+ import QuerySettingsDescription from '../QuerySettingsDescription/QuerySettingsDescription';
6
9
  import './QueryExecutionStatus.scss';
7
10
  const b = cn('kv-query-execution-status');
11
+ const QuerySettingsIndicator = () => {
12
+ const { isIndicatorShown, changedLastExecutionSettingsDescriptions } = useChangedQuerySettings();
13
+ if (!isIndicatorShown) {
14
+ return null;
15
+ }
16
+ return (_jsx(Tooltip, { openDelay: 0, content: _jsx(QuerySettingsDescription, { prefix: i18n('banner.query-settings.message'), querySettings: changedLastExecutionSettingsDescriptions }), children: _jsx(Icon, { data: CircleInfo, className: b('query-settings-icon') }) }));
17
+ };
8
18
  export const QueryExecutionStatus = ({ className, error }) => {
9
19
  let icon;
10
20
  let label;
@@ -17,5 +27,5 @@ export const QueryExecutionStatus = ({ className, error }) => {
17
27
  icon = (_jsx(Icon, { data: hasError ? CircleXmark : CircleCheck, className: b('result-status-icon', { error: hasError }) }));
18
28
  label = hasError ? 'Failed' : 'Completed';
19
29
  }
20
- return (_jsxs("div", { className: b(null, className), children: [icon, label] }));
30
+ return (_jsxs("div", { className: b(null, className), children: [icon, label, _jsx(QuerySettingsIndicator, {})] }));
21
31
  };
@@ -10,4 +10,8 @@
10
10
  color: var(--g-color-text-danger);
11
11
  }
12
12
  }
13
+
14
+ &__query-settings-icon {
15
+ color: var(--g-color-text-hint);
16
+ }
13
17
  }
@@ -0,0 +1,7 @@
1
+ import './QuerySettingsDescription.scss';
2
+ interface QuerySettingsDescriptionProps {
3
+ prefix: string;
4
+ querySettings: Record<string, string>;
5
+ }
6
+ declare const QuerySettingsDescription: ({ querySettings, prefix }: QuerySettingsDescriptionProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default QuerySettingsDescription;
@@ -0,0 +1,8 @@
1
+ import { jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from '../../utils/cn';
3
+ import './QuerySettingsDescription.scss';
4
+ const b = cn('ydb-query-settings-description');
5
+ const QuerySettingsDescription = ({ querySettings, prefix }) => {
6
+ return (_jsxs("div", { className: b('message'), children: [prefix, Object.entries(querySettings).map(([key, value], index, arr) => (_jsxs("span", { className: b('description-item'), children: [`${key}: ${value}`, index < arr.length - 1 ? ', ' : null] }, index)))] }));
7
+ };
8
+ export default QuerySettingsDescription;
@@ -0,0 +1,8 @@
1
+ .ydb-query-settings-description {
2
+ &__message {
3
+ display: flex;
4
+ flex-wrap: wrap;
5
+
6
+ white-space: pre;
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ export * from './QuerySettingsDescription';
@@ -0,0 +1 @@
1
+ export * from './QuerySettingsDescription';