ydb-embedded-ui 6.1.0 → 6.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. package/dist/components/DateRange/DateRange.scss +7 -0
  2. package/dist/components/NodeHostWrapper/NodeHostWrapper.js +1 -1
  3. package/dist/components/NodeHostWrapper/NodeHostWrapper.scss +0 -6
  4. package/dist/components/QueryResultTable/QueryResultTable.d.ts +2 -2
  5. package/dist/components/QueryResultTable/QueryResultTable.js +2 -1
  6. package/dist/components/QueryResultTable/QueryResultTable.scss +1 -0
  7. package/dist/components/ResizeableDataTable/ResizeableDataTable.d.ts +7 -0
  8. package/dist/components/ResizeableDataTable/ResizeableDataTable.js +14 -0
  9. package/dist/components/ResizeableDataTable/ResizeableDataTable.scss +8 -0
  10. package/dist/components/VirtualTable/ResizeHandler.d.ts +8 -0
  11. package/dist/components/VirtualTable/ResizeHandler.js +62 -0
  12. package/dist/components/VirtualTable/ResizeableVirtualTable.d.ts +6 -0
  13. package/dist/components/VirtualTable/ResizeableVirtualTable.js +16 -0
  14. package/dist/components/VirtualTable/TableHead.d.ts +3 -3
  15. package/dist/components/VirtualTable/TableHead.js +16 -31
  16. package/dist/components/VirtualTable/VirtualTable.d.ts +2 -4
  17. package/dist/components/VirtualTable/VirtualTable.scss +24 -4
  18. package/dist/components/VirtualTable/types.d.ts +3 -0
  19. package/dist/components/VirtualTable/utils.d.ts +2 -0
  20. package/dist/components/VirtualTable/utils.js +21 -0
  21. package/dist/containers/ClusterModeGuard/ClusterModeGuard.js +1 -1
  22. package/dist/containers/Clusters/Clusters.js +3 -2
  23. package/dist/containers/Clusters/Clusters.scss +5 -0
  24. package/dist/containers/Clusters/columns.d.ts +1 -0
  25. package/dist/containers/Clusters/columns.js +4 -3
  26. package/dist/containers/Nodes/Nodes.js +4 -4
  27. package/dist/containers/Nodes/Nodes.scss +0 -5
  28. package/dist/containers/Nodes/VirtualNodes.js +4 -6
  29. package/dist/containers/Nodes/getNodesColumns.d.ts +1 -0
  30. package/dist/containers/Nodes/getNodesColumns.js +9 -1
  31. package/dist/containers/PDiskPage/PDiskGroups.js +3 -3
  32. package/dist/containers/Storage/Storage.scss +0 -4
  33. package/dist/containers/Storage/StorageGroups/StorageGroups.js +3 -3
  34. package/dist/containers/Storage/StorageGroups/VirtualStorageGroups.js +3 -3
  35. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.d.ts +3 -0
  36. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +7 -3
  37. package/dist/containers/Storage/StorageNodes/StorageNodes.js +3 -3
  38. package/dist/containers/Storage/StorageNodes/VirtualStorageNodes.js +3 -3
  39. package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.d.ts +3 -0
  40. package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.js +2 -0
  41. package/dist/containers/Tablet/Tablet.scss +0 -4
  42. package/dist/containers/Tablet/TabletTable/TabletTable.js +5 -3
  43. package/dist/containers/Tenant/Acl/Acl.js +3 -2
  44. package/dist/containers/Tenant/Acl/Acl.scss +0 -6
  45. package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.js +3 -3
  46. package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.scss +2 -0
  47. package/dist/containers/Tenant/Diagnostics/Consumers/columns/columns.d.ts +1 -0
  48. package/dist/containers/Tenant/Diagnostics/Consumers/columns/columns.js +2 -0
  49. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +5 -4
  50. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.scss +1 -5
  51. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +8 -4
  52. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.scss +2 -0
  53. package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.js +1 -1
  54. package/dist/containers/Tenant/Diagnostics/Partitions/columns/Columns.scss +0 -8
  55. package/dist/containers/Tenant/Diagnostics/Partitions/columns/columns.d.ts +1 -0
  56. package/dist/containers/Tenant/Diagnostics/Partitions/columns/columns.js +11 -4
  57. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js +2 -2
  58. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js +2 -2
  59. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +3 -2
  60. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js +2 -2
  61. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js +2 -2
  62. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.scss +3 -7
  63. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverviewTableLayout.d.ts +2 -2
  64. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverviewTableLayout.js +2 -2
  65. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +2 -2
  66. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.js +4 -2
  67. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +8 -11
  68. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.scss +2 -24
  69. package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.d.ts +1 -0
  70. package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.js +7 -0
  71. package/dist/containers/Tenant/Diagnostics/TopShards/Filters/Filters.d.ts +1 -2
  72. package/dist/containers/Tenant/Diagnostics/TopShards/Filters/Filters.js +3 -4
  73. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.d.ts +0 -1
  74. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +8 -10
  75. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.scss +4 -15
  76. package/dist/containers/Tenant/Diagnostics/TopShards/getTopShardsColumns.d.ts +1 -0
  77. package/dist/containers/Tenant/Diagnostics/TopShards/getTopShardsColumns.js +5 -0
  78. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +1 -1
  79. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.scss +0 -6
  80. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.scss +1 -21
  81. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +4 -4
  82. package/dist/containers/Tenant/Query/ExplainResult/utils.d.ts +0 -3
  83. package/dist/containers/Tenant/Query/ExplainResult/utils.js +0 -34
  84. package/dist/containers/Tenant/Query/Preview/Preview.scss +6 -3
  85. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js +4 -2
  86. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.scss +0 -1
  87. package/dist/containers/Tenant/Query/QueryEditor/helpers.js +2 -1
  88. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js +4 -1
  89. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.scss +0 -1
  90. package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.d.ts +1 -2
  91. package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +4 -3
  92. package/dist/containers/Tenant/Schema/SchemaViewer/helpers.d.ts +1 -0
  93. package/dist/containers/Tenant/Schema/SchemaViewer/helpers.js +4 -2
  94. package/dist/containers/Tenants/Tenants.js +8 -3
  95. package/dist/containers/Tenants/Tenants.scss +13 -5
  96. package/dist/containers/Versions/GroupedNodesTree/GroupedNodesTree.scss +0 -2
  97. package/dist/containers/Versions/NodesTable/NodesTable.js +14 -9
  98. package/dist/styles/mixins.scss +0 -47
  99. package/dist/utils/constants.d.ts +25 -10
  100. package/dist/utils/hooks/useTableResize.d.ts +2 -7
  101. package/dist/utils/hooks/useTableResize.js +12 -24
  102. package/package.json +10 -10
  103. package/dist/containers/Tenant/Diagnostics/TopShards/Filters/Filters.scss +0 -8
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { TENANT_DIAGNOSTICS_TABS_IDS } from '../../../../../store/reducers/tenant/constants';
3
3
  import { topNodesApi } from '../../../../../store/reducers/tenantOverview/topNodes/topNodes';
4
4
  import { useSearchQuery, useTypedSelector } from '../../../../../utils/hooks';
5
- import { getTopNodesByCpuColumns } from '../../../../Nodes/getNodesColumns';
5
+ import { NODES_COLUMNS_WIDTH_LS_KEY, getTopNodesByCpuColumns, } from '../../../../Nodes/getNodesColumns';
6
6
  import { TenantTabsGroups, getTenantPath } from '../../../TenantPages';
7
7
  import { TenantOverviewTableLayout } from '../TenantOverviewTableLayout';
8
8
  import { getSectionTitle } from '../getSectionTitle';
@@ -19,5 +19,5 @@ export function TopNodesByCpu({ path, additionalNodesProps }) {
19
19
  postfix: i18n('by-pools-usage'),
20
20
  link: getTenantPath(Object.assign(Object.assign({}, query), { [TenantTabsGroups.diagnosticsTab]: TENANT_DIAGNOSTICS_TABS_IDS.nodes })),
21
21
  });
22
- return (_jsx(TenantOverviewTableLayout, { data: topNodes || [], columns: columns, title: title, loading: loading, error: error, emptyDataMessage: i18n('top-nodes.empty-data') }));
22
+ return (_jsx(TenantOverviewTableLayout, { columnsWidthLSKey: NODES_COLUMNS_WIDTH_LS_KEY, data: topNodes || [], columns: columns, title: title, loading: loading, error: error, emptyDataMessage: i18n('top-nodes.empty-data') }));
23
23
  }
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { TENANT_DIAGNOSTICS_TABS_IDS } from '../../../../../store/reducers/tenant/constants';
3
3
  import { topNodesApi } from '../../../../../store/reducers/tenantOverview/topNodes/topNodes';
4
4
  import { useSearchQuery, useTypedSelector } from '../../../../../utils/hooks';
5
- import { getTopNodesByLoadColumns } from '../../../../Nodes/getNodesColumns';
5
+ import { NODES_COLUMNS_WIDTH_LS_KEY, getTopNodesByLoadColumns, } from '../../../../Nodes/getNodesColumns';
6
6
  import { TenantTabsGroups, getTenantPath } from '../../../TenantPages';
7
7
  import { TenantOverviewTableLayout } from '../TenantOverviewTableLayout';
8
8
  import { getSectionTitle } from '../getSectionTitle';
@@ -19,5 +19,5 @@ export function TopNodesByLoad({ path, additionalNodesProps }) {
19
19
  postfix: i18n('by-load'),
20
20
  link: getTenantPath(Object.assign(Object.assign({}, query), { [TenantTabsGroups.diagnosticsTab]: TENANT_DIAGNOSTICS_TABS_IDS.nodes })),
21
21
  });
22
- return (_jsx(TenantOverviewTableLayout, { data: topNodes || [], columns: columns, title: title, loading: loading, error: error, emptyDataMessage: i18n('top-nodes.empty-data') }));
22
+ return (_jsx(TenantOverviewTableLayout, { columnsWidthLSKey: NODES_COLUMNS_WIDTH_LS_KEY, data: topNodes || [], columns: columns, title: title, loading: loading, error: error, emptyDataMessage: i18n('top-nodes.empty-data') }));
23
23
  }
@@ -7,10 +7,11 @@ import { TENANT_DIAGNOSTICS_TABS_IDS, TENANT_PAGE, TENANT_PAGES_IDS, TENANT_QUER
7
7
  import { topQueriesApi } from '../../../../../store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries';
8
8
  import { useTypedDispatch, useTypedSelector } from '../../../../../utils/hooks';
9
9
  import { TenantTabsGroups, getTenantPath } from '../../../TenantPages';
10
- import { getTenantOverviewTopQueriesColumns } from '../../TopQueries/getTopQueriesColumns';
10
+ import { TOP_QUERIES_COLUMNS_WIDTH_LS_KEY, getTenantOverviewTopQueriesColumns, } from '../../TopQueries/getTopQueriesColumns';
11
11
  import { TenantOverviewTableLayout } from '../TenantOverviewTableLayout';
12
12
  import { getSectionTitle } from '../getSectionTitle';
13
13
  import i18n from '../i18n';
14
+ import { b } from '../utils';
14
15
  export function TopQueries({ path }) {
15
16
  const dispatch = useTypedDispatch();
16
17
  const location = useLocation();
@@ -33,5 +34,5 @@ export function TopQueries({ path }) {
33
34
  postfix: i18n('by-cpu-time'),
34
35
  link: getTenantPath(Object.assign(Object.assign({}, query), { [TenantTabsGroups.diagnosticsTab]: TENANT_DIAGNOSTICS_TABS_IDS.topQueries })),
35
36
  });
36
- return (_jsx(TenantOverviewTableLayout, { data: data || [], columns: columns, onRowClick: handleRowClick, title: title, loading: loading, error: error, tableClassNameModifiers: { 'top-queries': true } }));
37
+ return (_jsx(TenantOverviewTableLayout, { columnsWidthLSKey: TOP_QUERIES_COLUMNS_WIDTH_LS_KEY, data: data || [], columns: columns, onRowClick: handleRowClick, title: title, loading: loading, error: error, rowClassName: () => b('top-queries-row') }));
37
38
  }
@@ -5,7 +5,7 @@ import { TENANT_DIAGNOSTICS_TABS_IDS } from '../../../../../store/reducers/tenan
5
5
  import { topShardsApi } from '../../../../../store/reducers/tenantOverview/topShards/tenantOverviewTopShards';
6
6
  import { useTypedSelector } from '../../../../../utils/hooks';
7
7
  import { TenantTabsGroups, getTenantPath } from '../../../TenantPages';
8
- import { getTopShardsColumns } from '../../TopShards/getTopShardsColumns';
8
+ import { TOP_SHARDS_COLUMNS_WIDTH_LS_KEY, getTopShardsColumns, } from '../../TopShards/getTopShardsColumns';
9
9
  import { TenantOverviewTableLayout } from '../TenantOverviewTableLayout';
10
10
  import { getSectionTitle } from '../getSectionTitle';
11
11
  import i18n from '../i18n';
@@ -22,5 +22,5 @@ export const TopShards = ({ path }) => {
22
22
  postfix: i18n('by-cpu-usage'),
23
23
  link: getTenantPath(Object.assign(Object.assign({}, query), { [TenantTabsGroups.diagnosticsTab]: TENANT_DIAGNOSTICS_TABS_IDS.topShards })),
24
24
  });
25
- return (_jsx(TenantOverviewTableLayout, { data: data || [], columns: columns, title: title, loading: loading, error: error, tableClassNameModifiers: { 'top-queries': true } }));
25
+ return (_jsx(TenantOverviewTableLayout, { columnsWidthLSKey: TOP_SHARDS_COLUMNS_WIDTH_LS_KEY, data: data || [], columns: columns, title: title, loading: loading, error: error }));
26
26
  };
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { TENANT_DIAGNOSTICS_TABS_IDS } from '../../../../../store/reducers/tenant/constants';
3
3
  import { topNodesApi } from '../../../../../store/reducers/tenantOverview/topNodes/topNodes';
4
4
  import { useSearchQuery, useTypedSelector } from '../../../../../utils/hooks';
5
- import { getTopNodesByMemoryColumns } from '../../../../Nodes/getNodesColumns';
5
+ import { NODES_COLUMNS_WIDTH_LS_KEY, getTopNodesByMemoryColumns, } from '../../../../Nodes/getNodesColumns';
6
6
  import { TenantTabsGroups, getTenantPath } from '../../../TenantPages';
7
7
  import { TenantOverviewTableLayout } from '../TenantOverviewTableLayout';
8
8
  import { getSectionTitle } from '../getSectionTitle';
@@ -21,5 +21,5 @@ export function TopNodesByMemory({ path, additionalNodesProps }) {
21
21
  postfix: i18n('by-memory'),
22
22
  link: getTenantPath(Object.assign(Object.assign({}, query), { [TenantTabsGroups.diagnosticsTab]: TENANT_DIAGNOSTICS_TABS_IDS.nodes })),
23
23
  });
24
- return (_jsx(TenantOverviewTableLayout, { data: topNodes || [], columns: columns, title: title, loading: loading, error: error, emptyDataMessage: i18n('top-nodes.empty-data') }));
24
+ return (_jsx(TenantOverviewTableLayout, { columnsWidthLSKey: NODES_COLUMNS_WIDTH_LS_KEY, data: topNodes || [], columns: columns, title: title, loading: loading, error: error, emptyDataMessage: i18n('top-nodes.empty-data') }));
25
25
  }
@@ -51,10 +51,6 @@
51
51
  }
52
52
 
53
53
  &__table {
54
- width: var(--diagnostics-section-table-width);
55
-
56
- @include table-styles();
57
-
58
54
  &:not(:last-child) {
59
55
  margin-bottom: var(--diagnostics-section-margin);
60
56
  }
@@ -64,10 +60,10 @@
64
60
 
65
61
  vertical-align: middle;
66
62
  }
63
+ }
67
64
 
68
- &_top-queries tr {
69
- cursor: pointer;
70
- }
65
+ &__top-queries-row {
66
+ cursor: pointer;
71
67
  }
72
68
 
73
69
  &__storage-info {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { DataTableProps } from '@gravity-ui/react-data-table';
3
- interface TenantOverviewTableLayoutProps<T> extends Omit<DataTableProps<T>, 'theme'> {
2
+ import type { ResizeableDataTableProps } from '../../../../components/ResizeableDataTable/ResizeableDataTable';
3
+ interface TenantOverviewTableLayoutProps<T> extends ResizeableDataTableProps<T> {
4
4
  title: React.ReactNode;
5
5
  loading?: boolean;
6
6
  error?: unknown;
@@ -1,8 +1,8 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React from 'react';
4
- import DataTable from '@gravity-ui/react-data-table';
5
4
  import { ResponseError } from '../../../../components/Errors/ResponseError';
5
+ import { ResizeableDataTable } from '../../../../components/ResizeableDataTable/ResizeableDataTable';
6
6
  import { TableSkeleton } from '../../../../components/TableSkeleton/TableSkeleton';
7
7
  import { TENANT_OVERVIEW_TABLES_LIMIT, TENANT_OVERVIEW_TABLES_SETTINGS, } from '../../../../utils/constants';
8
8
  import { b } from './utils';
@@ -15,7 +15,7 @@ export function TenantOverviewTableLayout(_a) {
15
15
  if (loading) {
16
16
  return _jsx(TableSkeleton, { rows: TENANT_OVERVIEW_TABLES_LIMIT });
17
17
  }
18
- return (_jsx(DataTable, Object.assign({ theme: "yandex-cloud", settings: TENANT_OVERVIEW_TABLES_SETTINGS }, props)));
18
+ return _jsx(ResizeableDataTable, Object.assign({ settings: TENANT_OVERVIEW_TABLES_SETTINGS }, props));
19
19
  };
20
20
  return (_jsxs(React.Fragment, { children: [_jsx("div", { className: b('title'), children: title }), _jsx("div", { className: b('table', tableClassNameModifiers), children: renderContent() })] }));
21
21
  }
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { TENANT_DIAGNOSTICS_TABS_IDS } from '../../../../../store/reducers/tenant/constants';
3
3
  import { topStorageGroupsApi } from '../../../../../store/reducers/tenantOverview/topStorageGroups/topStorageGroups';
4
4
  import { useSearchQuery, useTypedSelector } from '../../../../../utils/hooks';
5
- import { getStorageTopGroupsColumns } from '../../../../Storage/StorageGroups/getStorageGroupsColumns';
5
+ import { STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY, getStorageTopGroupsColumns, } from '../../../../Storage/StorageGroups/getStorageGroupsColumns';
6
6
  import { TenantTabsGroups, getTenantPath } from '../../../TenantPages';
7
7
  import { TenantOverviewTableLayout } from '../TenantOverviewTableLayout';
8
8
  import { getSectionTitle } from '../getSectionTitle';
@@ -19,5 +19,5 @@ export function TopGroups({ tenant }) {
19
19
  postfix: i18n('by-usage'),
20
20
  link: getTenantPath(Object.assign(Object.assign({}, query), { [TenantTabsGroups.diagnosticsTab]: TENANT_DIAGNOSTICS_TABS_IDS.storage })),
21
21
  });
22
- return (_jsx(TenantOverviewTableLayout, { data: topGroups || [], columns: columns, title: title, loading: loading, error: error }));
22
+ return (_jsx(TenantOverviewTableLayout, { columnsWidthLSKey: STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY, data: topGroups || [], columns: columns, title: title, loading: loading, error: error }));
23
23
  }
@@ -10,6 +10,7 @@ import { TenantOverviewTableLayout } from '../TenantOverviewTableLayout';
10
10
  import { getSectionTitle } from '../getSectionTitle';
11
11
  import i18n from '../i18n';
12
12
  import '../TenantOverview.scss';
13
+ const TOP_TABLES_COLUMNS_WIDTH_LS_KEY = 'topTablesTableColumnsWidth';
13
14
  export function TopTables({ path }) {
14
15
  const location = useLocation();
15
16
  const { autorefresh } = useTypedSelector((state) => state.schema);
@@ -23,13 +24,14 @@ export function TopTables({ path }) {
23
24
  const columns = [
24
25
  {
25
26
  name: 'Size',
26
- width: 80,
27
+ width: 100,
27
28
  sortable: false,
28
29
  render: ({ row }) => formatSize(Number(row.Size)),
29
30
  align: DataTable.RIGHT,
30
31
  },
31
32
  {
32
33
  name: 'Path',
34
+ width: 700,
33
35
  sortable: false,
34
36
  render: ({ row }) => row.Path ? (_jsx(CellWithPopover, { content: row.Path, children: _jsx(LinkToSchemaObject, { path: String(row.Path), location: location, children: row.Path }) })) : null,
35
37
  },
@@ -38,5 +40,5 @@ export function TopTables({ path }) {
38
40
  entity: i18n('tables'),
39
41
  postfix: i18n('by-size'),
40
42
  });
41
- return (_jsx(TenantOverviewTableLayout, { data: data || [], columns: columns, title: title, loading: loading, error: error }));
43
+ return (_jsx(TenantOverviewTableLayout, { columnsWidthLSKey: TOP_TABLES_COLUMNS_WIDTH_LS_KEY, data: data || [], columns: columns, title: title, loading: loading, error: error }));
42
44
  }
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import DataTable from '@gravity-ui/react-data-table';
4
- import { Loader } from '@gravity-ui/uikit';
5
3
  import { useHistory, useLocation } from 'react-router';
6
4
  import { DateRange } from '../../../../components/DateRange';
5
+ import { ResizeableDataTable } from '../../../../components/ResizeableDataTable/ResizeableDataTable';
7
6
  import { Search } from '../../../../components/Search';
7
+ import { TableWithControlsLayout } from '../../../../components/TableWithControlsLayout/TableWithControlsLayout';
8
8
  import { parseQuery } from '../../../../routes';
9
9
  import { changeUserInput } from '../../../../store/reducers/executeQuery';
10
10
  import { setTopQueriesFilters, topQueriesApi, } from '../../../../store/reducers/executeTopQueries/executeTopQueries';
@@ -16,7 +16,7 @@ import { prepareQueryError } 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 { getTopQueriesColumns } from './getTopQueriesColumns';
19
+ import { TOP_QUERIES_COLUMNS_WIDTH_LS_KEY, getTopQueriesColumns } from './getTopQueriesColumns';
20
20
  import i18n from './i18n';
21
21
  import './TopQueries.scss';
22
22
  const b = cn('kv-top-queries');
@@ -47,20 +47,17 @@ export const TopQueries = ({ path, type }) => {
47
47
  const handleDateRangeChange = (value) => {
48
48
  dispatch(setTopQueriesFilters(value));
49
49
  };
50
- const renderLoader = () => {
51
- return (_jsx("div", { className: b('loader'), children: _jsx(Loader, { size: "m" }) }));
52
- };
53
50
  const renderContent = () => {
54
- if (loading) {
55
- return renderLoader();
56
- }
57
51
  if (error && typeof error === 'object' && !error.isCancelled) {
58
52
  return _jsx("div", { className: "error", children: prepareQueryError(error) });
59
53
  }
60
54
  if (!data || isColumnEntityType(type)) {
61
55
  return i18n('no-data');
62
56
  }
63
- return (_jsx("div", { className: b('table'), children: _jsx(DataTable, { columns: columns, data: data, settings: QUERY_TABLE_SETTINGS, onRowClick: handleRowClick, theme: "yandex-cloud" }) }));
57
+ return (_jsx(ResizeableDataTable, { columnsWidthLSKey: TOP_QUERIES_COLUMNS_WIDTH_LS_KEY, columns: columns, data: data, settings: QUERY_TABLE_SETTINGS, onRowClick: handleRowClick, rowClassName: () => b('row') }));
58
+ };
59
+ const renderControls = () => {
60
+ return (_jsxs(React.Fragment, { children: [_jsx(Search, { value: filters.text, onChange: handleTextSearchUpdate, placeholder: i18n('filter.text.placeholder'), className: b('search') }), _jsx(DateRange, { from: filters.from, to: filters.to, onChange: handleDateRangeChange })] }));
64
61
  };
65
- return (_jsxs("div", { className: b(), children: [_jsxs("div", { className: b('controls'), children: [_jsx(Search, { value: filters.text, onChange: handleTextSearchUpdate, placeholder: i18n('filter.text.placeholder'), className: b('search') }), _jsx(DateRange, { from: filters.from, to: filters.to, onChange: handleDateRangeChange })] }), renderContent()] }));
62
+ return (_jsxs(TableWithControlsLayout, { children: [_jsx(TableWithControlsLayout.Controls, { children: renderControls() }), _jsx(TableWithControlsLayout.Table, { loading: loading, children: renderContent() })] }));
66
63
  };
@@ -8,39 +8,17 @@
8
8
 
9
9
  @include query-data-table;
10
10
 
11
- &__loader {
12
- display: flex;
13
- justify-content: center;
14
- }
15
-
16
- &__controls {
17
- display: flex;
18
- flex-wrap: wrap;
19
- gap: 16px;
20
-
21
- margin-bottom: 10px;
22
- }
23
-
24
11
  &__search {
25
12
  @include search();
26
13
  }
27
14
 
28
- &__table {
29
- overflow: auto;
30
- flex-grow: 1;
31
-
32
- .data-table {
33
- &__row {
34
- cursor: pointer;
35
- }
36
- }
15
+ &__row {
16
+ cursor: pointer;
37
17
  }
38
18
 
39
19
  &__query {
40
20
  overflow: hidden;
41
21
 
42
- width: 500px;
43
-
44
22
  vertical-align: top;
45
23
  white-space: pre-wrap;
46
24
  text-overflow: ellipsis;
@@ -1,5 +1,6 @@
1
1
  import type { Column } from '@gravity-ui/react-data-table';
2
2
  import type { KeyValueRow } from '../../../../types/api/query';
3
3
  import './TopQueries.scss';
4
+ export declare const TOP_QUERIES_COLUMNS_WIDTH_LS_KEY = "topQueriesColumnsWidth";
4
5
  export declare const getTopQueriesColumns: () => Column<KeyValueRow>[];
5
6
  export declare const getTenantOverviewTopQueriesColumns: () => Column<KeyValueRow>[];
@@ -8,6 +8,7 @@ import { parseUsToMs } from '../../../../utils/timeParsers';
8
8
  import { MAX_QUERY_HEIGHT } from '../../utils/constants';
9
9
  import './TopQueries.scss';
10
10
  const b = cn('kv-top-queries');
11
+ export const TOP_QUERIES_COLUMNS_WIDTH_LS_KEY = 'topQueriesColumnsWidth';
11
12
  const TOP_QUERIES_COLUMNS_IDS = {
12
13
  CPUTimeUs: 'CPUTimeUs',
13
14
  QueryText: 'QueryText',
@@ -34,23 +35,27 @@ const queryTextColumn = {
34
35
  return (_jsx("div", { className: b('query'), children: _jsx(TruncatedQuery, { value: (_a = row.QueryText) === null || _a === void 0 ? void 0 : _a.toString(), maxQueryHeight: MAX_QUERY_HEIGHT }) }));
35
36
  },
36
37
  sortable: false,
38
+ width: 500,
37
39
  };
38
40
  const endTimeColumn = {
39
41
  name: TOP_QUERIES_COLUMNS_IDS.EndTime,
40
42
  render: ({ row }) => formatDateTime(new Date(row.EndTime).getTime()),
41
43
  align: DataTable.RIGHT,
44
+ width: 200,
42
45
  };
43
46
  const readRowsColumn = {
44
47
  name: TOP_QUERIES_COLUMNS_IDS.ReadRows,
45
48
  render: ({ row }) => formatNumber(row.ReadRows),
46
49
  sortAccessor: (row) => Number(row.ReadRows),
47
50
  align: DataTable.RIGHT,
51
+ width: 150,
48
52
  };
49
53
  const readBytesColumn = {
50
54
  name: TOP_QUERIES_COLUMNS_IDS.ReadBytes,
51
55
  render: ({ row }) => formatNumber(row.ReadBytes),
52
56
  sortAccessor: (row) => Number(row.ReadBytes),
53
57
  align: DataTable.RIGHT,
58
+ width: 150,
54
59
  };
55
60
  const userSIDColumn = {
56
61
  name: TOP_QUERIES_COLUMNS_IDS.UserSID,
@@ -63,6 +68,7 @@ const oneLineQueryTextColumn = {
63
68
  header: 'QueryText',
64
69
  render: ({ row }) => { var _a; return _jsx(OneLineQueryWithPopover, { value: (_a = row.QueryText) === null || _a === void 0 ? void 0 : _a.toString() }); },
65
70
  sortable: false,
71
+ width: 500,
66
72
  };
67
73
  const queryHashColumn = {
68
74
  name: TOP_QUERIES_COLUMNS_IDS.QueryHash,
@@ -76,6 +82,7 @@ const durationColumn = {
76
82
  render: ({ row }) => { var _a; return formatNumber(parseUsToMs((_a = row.Duration) !== null && _a !== void 0 ? _a : undefined)); },
77
83
  sortAccessor: (row) => Number(row.Duration),
78
84
  align: DataTable.RIGHT,
85
+ width: 150,
79
86
  };
80
87
  export const getTopQueriesColumns = () => {
81
88
  return [
@@ -1,9 +1,8 @@
1
1
  import type { ShardsWorkloadFilters } from '../../../../../store/reducers/shardsWorkload/types';
2
- import './Filters.scss';
3
2
  interface FiltersProps {
4
3
  value: ShardsWorkloadFilters;
5
4
  onChange: (value: Partial<ShardsWorkloadFilters>) => void;
6
5
  className?: string;
7
6
  }
8
- export declare const Filters: ({ value, onChange, className }: FiltersProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const Filters: ({ value, onChange }: FiltersProps) => import("react/jsx-runtime").JSX.Element;
9
8
  export {};
@@ -1,12 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from 'react';
2
3
  import { RadioButton } from '@gravity-ui/uikit';
3
4
  import { DateRange } from '../../../../../components/DateRange';
4
5
  import { EShardsWorkloadMode } from '../../../../../store/reducers/shardsWorkload/types';
5
6
  import { isEnumMember } from '../../../../../utils/typecheckers';
6
- import { b } from '../TopShards';
7
7
  import i18n from '../i18n';
8
- import './Filters.scss';
9
- export const Filters = ({ value, onChange, className }) => {
8
+ export const Filters = ({ value, onChange }) => {
10
9
  const handleModeChange = (mode) => {
11
10
  if (!isEnumMember(EShardsWorkloadMode, mode)) {
12
11
  const values = Object.values(EShardsWorkloadMode).join(', ');
@@ -19,5 +18,5 @@ export const Filters = ({ value, onChange, className }) => {
19
18
  };
20
19
  const from = value.mode === EShardsWorkloadMode.Immediate ? undefined : value.from;
21
20
  const to = value.mode === EShardsWorkloadMode.Immediate ? undefined : value.to;
22
- return (_jsxs("div", { className: b('filters', className), children: [_jsxs(RadioButton, { value: value.mode, onUpdate: handleModeChange, children: [_jsx(RadioButton.Option, { value: EShardsWorkloadMode.Immediate, children: i18n('filters.mode.immediate') }), _jsx(RadioButton.Option, { value: EShardsWorkloadMode.History, children: i18n('filters.mode.history') })] }), _jsx(DateRange, { from: from, to: to, onChange: handleDateRangeChange })] }));
21
+ return (_jsxs(React.Fragment, { children: [_jsxs(RadioButton, { value: value.mode, onUpdate: handleModeChange, children: [_jsx(RadioButton.Option, { value: EShardsWorkloadMode.Immediate, children: i18n('filters.mode.immediate') }), _jsx(RadioButton.Option, { value: EShardsWorkloadMode.History, children: i18n('filters.mode.history') })] }), _jsx(DateRange, { from: from, to: to, onChange: handleDateRangeChange })] }));
23
22
  };
@@ -1,6 +1,5 @@
1
1
  import type { EPathType } from '../../../../types/api/schema';
2
2
  import './TopShards.scss';
3
- export declare const b: import("@bem-react/classname").ClassNameFormatter;
4
3
  interface TopShardsProps {
5
4
  tenantPath: string;
6
5
  type?: EPathType;
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import DataTable from '@gravity-ui/react-data-table';
4
- import { Loader } from '@gravity-ui/uikit';
5
4
  import { useLocation } from 'react-router';
5
+ import { ResizeableDataTable } from '../../../../components/ResizeableDataTable/ResizeableDataTable';
6
+ import { TableWithControlsLayout } from '../../../../components/TableWithControlsLayout/TableWithControlsLayout';
6
7
  import { setShardsQueryFilters, shardApi, } from '../../../../store/reducers/shardsWorkload/shardsWorkload';
7
8
  import { EShardsWorkloadMode } from '../../../../store/reducers/shardsWorkload/types';
8
9
  import { cn } from '../../../../utils/cn';
@@ -13,10 +14,10 @@ import { useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
13
14
  import { prepareQueryError } from '../../../../utils/query';
14
15
  import { isColumnEntityType } from '../../utils/schema';
15
16
  import { Filters } from './Filters';
16
- import { getShardsWorkloadColumns } from './getTopShardsColumns';
17
+ import { TOP_SHARDS_COLUMNS_WIDTH_LS_KEY, getShardsWorkloadColumns } from './getTopShardsColumns';
17
18
  import i18n from './i18n';
18
19
  import './TopShards.scss';
19
- export const b = cn('top-shards');
20
+ const b = cn('top-shards');
20
21
  const TABLE_SETTINGS = Object.assign(Object.assign({}, DEFAULT_TABLE_SETTINGS), { dynamicRender: false, externalSort: true, disableSortReset: true, defaultOrder: DataTable.DESCENDING });
21
22
  const tableColumnsNames = {
22
23
  TabletId: 'TabletId',
@@ -129,20 +130,17 @@ export const TopShards = ({ tenantPath, type }) => {
129
130
  }
130
131
  return columns;
131
132
  }, [filters.mode, tenantPath, location]);
132
- const renderLoader = () => {
133
- return (_jsx("div", { className: b('loader'), children: _jsx(Loader, { size: "m" }) }));
133
+ const renderControls = () => {
134
+ return _jsx(Filters, { value: filters, onChange: handleFiltersChange });
134
135
  };
135
136
  const renderContent = () => {
136
- if (loading) {
137
- return renderLoader();
138
- }
139
137
  if (error && typeof error === 'object' && !error.isCancelled) {
140
138
  return _jsx("div", { className: "error", children: prepareQueryError(error) });
141
139
  }
142
140
  if (!data || isColumnEntityType(type)) {
143
141
  return i18n('no-data');
144
142
  }
145
- return (_jsx("div", { className: b('table'), children: _jsx(DataTable, { columns: tableColumns, data: data, settings: TABLE_SETTINGS, theme: "yandex-cloud", onSort: onSort, sortOrder: stringToDataTableSortOrder(sortOrder) }) }));
143
+ return (_jsx(ResizeableDataTable, { columnsWidthLSKey: TOP_SHARDS_COLUMNS_WIDTH_LS_KEY, columns: tableColumns, data: data, settings: TABLE_SETTINGS, onSort: onSort, sortOrder: stringToDataTableSortOrder(sortOrder) }));
146
144
  };
147
- return (_jsxs("div", { className: b(), children: [_jsx(Filters, { value: filters, onChange: handleFiltersChange }), filters.mode === EShardsWorkloadMode.History && _jsx("div", { children: i18n('description') }), renderContent()] }));
145
+ return (_jsxs(TableWithControlsLayout, { children: [_jsx(TableWithControlsLayout.Controls, { children: renderControls() }), filters.mode === EShardsWorkloadMode.History && (_jsx("div", { className: b('hint'), children: i18n('description') })), _jsx(TableWithControlsLayout.Table, { loading: loading, children: renderContent() })] }));
148
146
  };
@@ -1,19 +1,8 @@
1
1
  .top-shards {
2
- display: flex;
3
- flex-direction: column;
4
- gap: 10px;
2
+ &__hint {
3
+ position: sticky;
4
+ left: 0;
5
5
 
6
- height: 100%;
7
-
8
- background-color: var(--g-color-base-background);
9
-
10
- &__loader {
11
- display: flex;
12
- justify-content: center;
13
- }
14
-
15
- &__table {
16
- overflow: auto;
17
- flex-grow: 1;
6
+ width: max-content;
18
7
  }
19
8
  }
@@ -1,5 +1,6 @@
1
1
  import type { Column } from '@gravity-ui/react-data-table';
2
2
  import type { Location } from 'history';
3
3
  import type { KeyValueRow } from '../../../../types/api/query';
4
+ export declare const TOP_SHARDS_COLUMNS_WIDTH_LS_KEY = "topShardsColumnsWidth";
4
5
  export declare const getShardsWorkloadColumns: (schemaPath: string, location: Location) => Column<KeyValueRow>[];
5
6
  export declare const getTopShardsColumns: (schemaPath: string, location: Location) => Column<KeyValueRow>[];
@@ -7,6 +7,7 @@ import routes, { createHref } from '../../../../routes';
7
7
  import { getLoadSeverityForShard } from '../../../../store/reducers/tenantOverview/topShards/utils';
8
8
  import { formatNumber, roundToPrecision } from '../../../../utils/dataFormatters/dataFormatters';
9
9
  import { getDefaultNodePath } from '../../../Node/NodePages';
10
+ export const TOP_SHARDS_COLUMNS_WIDTH_LS_KEY = 'topShardsColumnsWidth';
10
11
  const TOP_SHARDS_COLUMNS_IDS = {
11
12
  TabletId: 'TabletId',
12
13
  CPUCores: 'CPUCores',
@@ -38,6 +39,7 @@ const getPathColumn = (schemaPath, location) => ({
38
39
  return (_jsx(LinkToSchemaObject, { path: schemaPath + row.Path, location: location, children: row.Path }));
39
40
  },
40
41
  sortable: false,
42
+ width: 300,
41
43
  });
42
44
  const cpuCoresColumn = {
43
45
  name: TOP_SHARDS_COLUMNS_IDS.CPUCores,
@@ -65,6 +67,7 @@ const tabletIdColumn = {
65
67
  return (_jsx(InternalLink, { to: createHref(routes.tablet, { id: row.TabletId }), children: row.TabletId }));
66
68
  },
67
69
  sortable: false,
70
+ width: 190,
68
71
  };
69
72
  const nodeIdColumn = {
70
73
  name: TOP_SHARDS_COLUMNS_IDS.NodeId,
@@ -85,6 +88,8 @@ const topShardsCpuCoresColumn = {
85
88
  },
86
89
  align: DataTable.RIGHT,
87
90
  sortable: false,
91
+ width: 140,
92
+ resizeMinWidth: 140,
88
93
  };
89
94
  const inFlightTxCountColumn = {
90
95
  name: TOP_SHARDS_COLUMNS_IDS.InFlightTxCount,
@@ -106,7 +106,7 @@ export function ObjectSummary({ type, subType, onCollapseSummary, onExpandSummar
106
106
  return _jsx(Acl, {});
107
107
  }
108
108
  case TENANT_SUMMARY_TABS_IDS.schema: {
109
- return (_jsx(SchemaViewer, { className: b('schema'), type: type, path: currentSchemaPath }));
109
+ return _jsx(SchemaViewer, { type: type, path: currentSchemaPath });
110
110
  }
111
111
  default: {
112
112
  return renderObjectOverview();
@@ -77,12 +77,6 @@
77
77
  flex-direction: column;
78
78
  }
79
79
 
80
- &__schema {
81
- display: flex;
82
- overflow: auto;
83
- flex-grow: 1;
84
- }
85
-
86
80
  &__info-controls {
87
81
  display: flex;
88
82
  gap: 4px;
@@ -7,7 +7,7 @@
7
7
  flex-grow: 1;
8
8
  flex-direction: column;
9
9
 
10
- padding: 0px 10px;
10
+ padding-left: 10px;
11
11
 
12
12
  @include query-data-table();
13
13
  & .data-table__table-wrapper {
@@ -20,8 +20,6 @@
20
20
  flex-direction: column;
21
21
 
22
22
  width: 100%;
23
- margin-top: 10px;
24
- padding: 0 10px 10px;
25
23
  }
26
24
 
27
25
  &__result-tabs {
@@ -59,7 +57,6 @@
59
57
  gap: 4px;
60
58
  }
61
59
  &__inspector {
62
- max-width: calc(100% - 50px);
63
60
  padding: 15px 10px;
64
61
  @include json-tree-styles();
65
62
  &_fullscreen {
@@ -70,21 +67,4 @@
70
67
  padding: 10px;
71
68
  }
72
69
  }
73
-
74
- &__fullscreen-table-wrapper {
75
- overflow: auto;
76
-
77
- width: 100%;
78
- height: 100%;
79
- margin: 20px;
80
-
81
- background-color: var(--g-color-base-background);
82
- @include table-styles();
83
- table {
84
- width: 100% !important;
85
- }
86
- .data-table__table-wrapper {
87
- padding: 0 !important;
88
- }
89
- }
90
70
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { TextOverflow, getTopology, getYdbPlanNodeShape } from '@gravity-ui/paranoid';
3
+ import { getTopology, getYdbPlanNodeShape } from '@gravity-ui/paranoid';
4
4
  import { Loader, RadioButton } from '@gravity-ui/uikit';
5
5
  import JSONTree from 'react-json-inspector';
6
6
  import Divider from '../../../../components/Divider/Divider';
@@ -14,7 +14,7 @@ import { cn } from '../../../../utils/cn';
14
14
  import { useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
15
15
  import { LANGUAGE_S_EXPRESSION_ID } from '../../../../utils/monaco/s-expression/constants';
16
16
  import { PaneVisibilityToggleButtons } from '../../utils/paneVisibilityToggleHelpers';
17
- import { getColors, renderExplainNode } from './utils';
17
+ import { renderExplainNode } from './utils';
18
18
  import './ExplainResult.scss';
19
19
  import 'react-json-inspector/json-inspector.css';
20
20
  const b = cn('ydb-query-explain-result');
@@ -46,7 +46,7 @@ function GraphRoot(props) {
46
46
  throw new Error("Can't find element with id #graphRoot");
47
47
  }
48
48
  graphRoot.innerHTML = '';
49
- paranoid.current = getTopology('graphRoot', data, Object.assign(Object.assign({}, opts), { colors: getColors() }), shapes);
49
+ paranoid.current = getTopology('graphRoot', data, opts, shapes);
50
50
  paranoid.current.render();
51
51
  return () => {
52
52
  paranoid.current = undefined;
@@ -109,7 +109,7 @@ export function ExplainResult(props) {
109
109
  hidden: activeOption !== ExplainOptionIds.schema,
110
110
  }), children: _jsx(GraphRoot, { theme: theme, data: { links, nodes }, opts: {
111
111
  renderNodeTitle: renderExplainNode,
112
- textOverflow: TextOverflow.Normal,
112
+ textOverflow: 'normal',
113
113
  initialZoomFitsCanvas: true,
114
114
  }, shapes: {
115
115
  node: getYdbPlanNodeShape,
@@ -1,5 +1,2 @@
1
1
  import type { GraphNode } from '@gravity-ui/paranoid';
2
2
  export declare const renderExplainNode: (node: GraphNode) => string;
3
- export declare function getColors(): {
4
- getCommonColor: (name: string) => string;
5
- };