ydb-embedded-ui 6.2.2 → 6.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. package/README.md +38 -16
  2. package/dist/assets/icons/disableFullscreen.svg +4 -0
  3. package/dist/assets/icons/emptyState.svg +13 -0
  4. package/dist/assets/icons/key.svg +6 -0
  5. package/dist/assets/icons/monitoring.svg +9 -0
  6. package/dist/assets/icons/network.svg +21 -0
  7. package/dist/components/BasicNodeViewer/BasicNodeViewer.js +11 -5
  8. package/dist/components/CriticalActionDialog/CriticalActionDialog.js +3 -4
  9. package/dist/components/CriticalActionDialog/CriticalActionDialog.scss +2 -0
  10. package/dist/components/EmptyState/EmptyState.js +3 -2
  11. package/dist/components/EnableFullscreenButton/EnableFullscreenButton.js +3 -3
  12. package/dist/components/Fullscreen/Fullscreen.js +3 -3
  13. package/dist/components/MonitoringButton/MonitoringButton.js +3 -3
  14. package/dist/components/NodeHostWrapper/NodeHostWrapper.js +3 -3
  15. package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
  16. package/dist/components/QueryExecutionStatus/QueryExecutionStatus.js +4 -5
  17. package/dist/components/StatusIcon/StatusIcon.js +5 -7
  18. package/dist/containers/App/App.js +1 -2
  19. package/dist/containers/AsideNavigation/AsideNavigation.js +4 -9
  20. package/dist/containers/AsideNavigation/YdbInternalUser/YdbInternalUser.js +2 -3
  21. package/dist/containers/AsideNavigation/useNavigationMenuItems.js +5 -6
  22. package/dist/containers/Authentication/Authentication.js +2 -4
  23. package/dist/containers/Node/NodeStructure/Pdisk.js +4 -4
  24. package/dist/containers/Nodes/Nodes.js +19 -15
  25. package/dist/containers/Nodes/VirtualNodes.js +23 -6
  26. package/dist/containers/PDiskPage/PDiskPage.js +2 -2
  27. package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
  28. package/dist/containers/Storage/Storage.js +50 -22
  29. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +2 -2
  30. package/dist/containers/Storage/VirtualStorage.js +32 -10
  31. package/dist/containers/Storage/utils/index.d.ts +4 -1
  32. package/dist/containers/Storage/utils/index.js +29 -0
  33. package/dist/containers/Tablet/Tablet.js +3 -3
  34. package/dist/containers/Tablet/i18n/index.d.ts +1 -1
  35. package/dist/containers/Tablets/Tablets.d.ts +1 -2
  36. package/dist/containers/Tablets/Tablets.js +112 -53
  37. package/dist/containers/Tablets/i18n/en.json +9 -4
  38. package/dist/containers/Tablets/i18n/index.d.ts +1 -1
  39. package/dist/containers/Tablets/i18n/index.js +1 -2
  40. package/dist/containers/Tenant/Diagnostics/Diagnostics.js +5 -5
  41. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +7 -0
  42. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +2 -0
  43. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +3 -2
  44. package/dist/containers/Tenant/Diagnostics/Network/Network.js +3 -3
  45. package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +1 -0
  46. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.js +2 -2
  47. package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.js +2 -8
  48. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +10 -7
  49. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +1 -1
  50. package/dist/containers/Tenant/Query/Issues/Issues.js +6 -9
  51. package/dist/containers/Tenant/Query/Preview/Preview.js +5 -5
  52. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +1 -1
  53. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +4 -4
  54. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js +3 -3
  55. package/dist/containers/Tenant/Schema/SchemaViewer/helpers.js +7 -6
  56. package/dist/containers/Tenant/i18n/en.json +2 -1
  57. package/dist/containers/Tenant/i18n/index.d.ts +1 -1
  58. package/dist/containers/Tenant/i18n/index.js +1 -2
  59. package/dist/containers/Tenant/utils/ToggleButton.scss +0 -2
  60. package/dist/containers/Tenant/utils/paneVisibilityToggleHelpers.js +4 -4
  61. package/dist/containers/Tenant/utils/queryTemplates.d.ts +2 -0
  62. package/dist/containers/Tenant/utils/queryTemplates.js +6 -0
  63. package/dist/containers/Tenant/utils/schema.d.ts +4 -3
  64. package/dist/containers/Tenant/utils/schema.js +12 -3
  65. package/dist/containers/Tenant/utils/schemaActions.js +10 -1
  66. package/dist/containers/Tenant/utils/schemaControls.js +4 -3
  67. package/dist/containers/VDiskPage/VDiskPage.js +2 -2
  68. package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
  69. package/dist/routes.d.ts +1 -1
  70. package/dist/services/settings.d.ts +18 -1
  71. package/dist/store/configureStore.d.ts +0 -8
  72. package/dist/store/defaultStore.d.ts +0 -4
  73. package/dist/store/reducers/authentication/authentication.d.ts +0 -6
  74. package/dist/store/reducers/executeQuery.d.ts +0 -2
  75. package/dist/store/reducers/explainQuery.d.ts +0 -4
  76. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +0 -40
  77. package/dist/store/reducers/host.d.ts +0 -2
  78. package/dist/store/reducers/index.d.ts +0 -6
  79. package/dist/store/reducers/index.js +0 -4
  80. package/dist/store/reducers/node/selectors.d.ts +0 -2
  81. package/dist/store/reducers/nodes/nodes.d.ts +1 -5
  82. package/dist/store/reducers/nodes/nodes.js +0 -27
  83. package/dist/store/reducers/nodes/types.d.ts +4 -13
  84. package/dist/store/reducers/nodesList.d.ts +0 -2
  85. package/dist/store/reducers/schema/schema.d.ts +0 -2
  86. package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +0 -2
  87. package/dist/store/reducers/storage/selectors.d.ts +2 -17
  88. package/dist/store/reducers/storage/selectors.js +1 -36
  89. package/dist/store/reducers/storage/storage.d.ts +2 -6
  90. package/dist/store/reducers/storage/storage.js +0 -44
  91. package/dist/store/reducers/storage/types.d.ts +15 -22
  92. package/dist/store/reducers/storage/types.js +4 -1
  93. package/dist/store/reducers/tablets.d.ts +92 -1
  94. package/dist/store/reducers/tablets.js +16 -1
  95. package/dist/store/reducers/tabletsFilters.d.ts +0 -2
  96. package/dist/store/reducers/tenant/tenant.d.ts +2 -2
  97. package/dist/store/reducers/tenant/tenant.js +10 -1
  98. package/dist/store/reducers/tenant/types.d.ts +8 -3
  99. package/dist/store/reducers/tenant/types.js +3 -1
  100. package/dist/store/reducers/tenants/selectors.d.ts +0 -18
  101. package/dist/store/reducers/tenants/utils.d.ts +4 -4
  102. package/dist/store/reducers/tenants/utils.js +8 -8
  103. package/dist/store/reducers/topic.d.ts +0 -30
  104. package/dist/store/state-url-mapping.js +0 -22
  105. package/dist/types/api/schema/schema.d.ts +4 -1
  106. package/dist/types/api/schema/schema.js +1 -0
  107. package/dist/types/api/schema/view.d.ts +8 -0
  108. package/dist/types/api/schema/view.js +1 -0
  109. package/dist/utils/nodes.d.ts +2 -0
  110. package/dist/utils/nodes.js +4 -0
  111. package/dist/utils/tablet.d.ts +2 -0
  112. package/dist/utils/tablet.js +14 -0
  113. package/package.json +4 -3
  114. package/dist/assets/icons/bug.svg +0 -1
  115. package/dist/assets/icons/circle-exclamation.svg +0 -1
  116. package/dist/assets/icons/circle-info.svg +0 -1
  117. package/dist/assets/icons/circle-xmark.svg +0 -1
  118. package/dist/assets/icons/close.svg +0 -1
  119. package/dist/assets/icons/control-menu-button.svg +0 -1
  120. package/dist/assets/icons/dots.svg +0 -1
  121. package/dist/assets/icons/hide.svg +0 -1
  122. package/dist/assets/icons/question.svg +0 -1
  123. package/dist/assets/icons/server.svg +0 -1
  124. package/dist/assets/icons/settings-with-dot.svg +0 -1
  125. package/dist/assets/icons/settings.svg +0 -1
  126. package/dist/assets/icons/shield.svg +0 -3
  127. package/dist/assets/icons/show.svg +0 -1
  128. package/dist/assets/icons/signIn.svg +0 -1
  129. package/dist/assets/icons/signOut.svg +0 -1
  130. package/dist/assets/icons/storage.svg +0 -1
  131. package/dist/assets/icons/support.svg +0 -1
  132. package/dist/assets/icons/triangle-exclamation.svg +0 -1
  133. package/dist/assets/icons/update-arrow.svg +0 -6
  134. package/dist/components/Icon/Icon.d.ts +0 -14
  135. package/dist/components/Icon/Icon.js +0 -16
  136. package/dist/components/Icon/index.d.ts +0 -1
  137. package/dist/components/Icon/index.js +0 -1
  138. package/dist/containers/AppIcons/AppIcons.d.ts +0 -2
  139. package/dist/containers/AppIcons/AppIcons.js +0 -9
  140. package/dist/containers/Tablets/Tablets.scss +0 -35
  141. package/dist/containers/Tablets/i18n/ru.json +0 -6
  142. package/dist/containers/Tenant/i18n/ru.json +0 -22
@@ -1,25 +1,120 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from 'react';
3
- import { Select } from '@gravity-ui/uikit';
2
+ import { ArrowsRotateRight } from '@gravity-ui/icons';
3
+ import { Icon, Label, Text } from '@gravity-ui/uikit';
4
4
  import { skipToken } from '@reduxjs/toolkit/query';
5
- import ReactList from 'react-list';
5
+ import { ButtonWithConfirmDialog } from '../../components/ButtonWithConfirmDialog/ButtonWithConfirmDialog';
6
+ import { EntityStatus } from '../../components/EntityStatus/EntityStatus';
6
7
  import { ResponseError } from '../../components/Errors/ResponseError';
7
- import { Loader } from '../../components/Loader';
8
- import { Tablet } from '../../components/Tablet';
9
- import TabletsOverall from '../../components/TabletsOverall/TabletsOverall';
10
- import { setStateFilter, setTypeFilter, tabletsApi } from '../../store/reducers/tablets';
8
+ import { InternalLink } from '../../components/InternalLink';
9
+ import { ResizeableDataTable } from '../../components/ResizeableDataTable/ResizeableDataTable';
10
+ import { TableSkeleton } from '../../components/TableSkeleton/TableSkeleton';
11
+ import routes, { createHref } from '../../routes';
12
+ import { selectTabletsWithFqdn, tabletsApi } from '../../store/reducers/tablets';
13
+ import { ETabletState } from '../../types/api/tablet';
11
14
  import { cn } from '../../utils/cn';
15
+ import { DEFAULT_TABLE_SETTINGS } from '../../utils/constants';
16
+ import { calcUptime } from '../../utils/dataFormatters/dataFormatters';
12
17
  import { useTypedDispatch, useTypedSelector } from '../../utils/hooks';
18
+ import { mapTabletStateToLabelTheme } from '../../utils/tablet';
19
+ import { getDefaultNodePath } from '../Node/NodePages';
13
20
  import i18n from './i18n';
14
- import './Tablets.scss';
15
21
  const b = cn('tablets');
16
- export const Tablets = ({ path, nodeId, className }) => {
22
+ const columns = [
23
+ {
24
+ name: 'Type',
25
+ get header() {
26
+ return i18n('Type');
27
+ },
28
+ render: ({ row }) => {
29
+ return (_jsxs("span", { children: [row.Type, " ", row.Leader ? _jsx(Text, { color: "secondary", children: "leader" }) : ''] }));
30
+ },
31
+ },
32
+ {
33
+ name: 'TabletId',
34
+ get header() {
35
+ return i18n('Tablet');
36
+ },
37
+ render: ({ row }) => {
38
+ const tabletPath = row.TabletId &&
39
+ createHref(routes.tablet, { id: row.TabletId }, { nodeId: row.NodeId, type: row.Type });
40
+ return _jsx(InternalLink, { to: tabletPath, children: row.TabletId });
41
+ },
42
+ },
43
+ {
44
+ name: 'State',
45
+ get header() {
46
+ return i18n('State');
47
+ },
48
+ render: ({ row }) => {
49
+ return _jsx(Label, { theme: mapTabletStateToLabelTheme(row.State), children: row.State });
50
+ },
51
+ },
52
+ {
53
+ name: 'NodeId',
54
+ get header() {
55
+ return i18n('Node ID');
56
+ },
57
+ render: ({ row }) => {
58
+ const nodePath = row.NodeId === undefined ? undefined : getDefaultNodePath(row.NodeId);
59
+ return _jsx(InternalLink, { to: nodePath, children: row.NodeId });
60
+ },
61
+ align: 'right',
62
+ },
63
+ {
64
+ name: 'FQDN',
65
+ get header() {
66
+ return i18n('Node FQDN');
67
+ },
68
+ render: ({ row }) => {
69
+ if (!row.fqdn) {
70
+ return _jsx("span", { children: "\u2014" });
71
+ }
72
+ return _jsx(EntityStatus, { name: row.fqdn, showStatus: false, hasClipboardButton: true });
73
+ },
74
+ },
75
+ {
76
+ name: 'Generation',
77
+ get header() {
78
+ return i18n('Generation');
79
+ },
80
+ align: 'right',
81
+ },
82
+ {
83
+ name: 'Uptime',
84
+ get header() {
85
+ return i18n('Uptime');
86
+ },
87
+ render: ({ row }) => {
88
+ return calcUptime(row.ChangeTime);
89
+ },
90
+ sortAccessor: (row) => -Number(row.ChangeTime),
91
+ align: 'right',
92
+ },
93
+ {
94
+ name: 'Actions',
95
+ sortable: false,
96
+ resizeable: false,
97
+ header: '',
98
+ render: ({ row }) => {
99
+ return _jsx(TabletActions, Object.assign({}, row));
100
+ },
101
+ },
102
+ ];
103
+ function TabletActions(tablet) {
104
+ const isDisabledRestart = tablet.State === ETabletState.Stopped;
17
105
  const dispatch = useTypedDispatch();
18
- const { stateFilter, typeFilter } = useTypedSelector((state) => state.tablets);
106
+ return (_jsx(ButtonWithConfirmDialog, { buttonView: "outlined", dialogContent: i18n('dialog.kill'), onConfirmAction: () => {
107
+ return window.api.killTablet(tablet.TabletId);
108
+ }, onConfirmActionSuccess: () => {
109
+ dispatch(tabletsApi.util.invalidateTags(['All']));
110
+ }, buttonDisabled: isDisabledRestart, children: _jsx(Icon, { data: ArrowsRotateRight }) }));
111
+ }
112
+ export function Tablets({ nodeId, path, className }) {
19
113
  const { autorefresh } = useTypedSelector((state) => state.schema);
20
114
  let params = skipToken;
21
- if (nodeId) {
22
- params = { nodes: [String(nodeId)] };
115
+ const node = nodeId === undefined ? undefined : String(nodeId);
116
+ if (node !== undefined) {
117
+ params = { nodes: [String(node)] };
23
118
  }
24
119
  else if (path) {
25
120
  params = { path };
@@ -28,48 +123,12 @@ export const Tablets = ({ path, nodeId, className }) => {
28
123
  pollingInterval: autorefresh,
29
124
  });
30
125
  const loading = isFetching && currentData === undefined;
31
- const tablets = React.useMemo(() => (currentData === null || currentData === void 0 ? void 0 : currentData.TabletStateInfo) || [], [currentData]);
32
- const tabletsToRender = React.useMemo(() => {
33
- let filteredTablets = tablets;
34
- if (typeFilter.length > 0) {
35
- filteredTablets = filteredTablets.filter((tablet) => typeFilter.some((filter) => tablet.Type === filter));
36
- }
37
- if (stateFilter.length > 0) {
38
- filteredTablets = filteredTablets.filter((tablet) => stateFilter.some((filter) => tablet.State === filter));
39
- }
40
- return filteredTablets;
41
- }, [tablets, stateFilter, typeFilter]);
42
- const handleStateFilterChange = (value) => {
43
- dispatch(setStateFilter(value));
44
- };
45
- const handleTypeFilterChange = (value) => {
46
- dispatch(setTypeFilter(value));
47
- };
48
- const renderTablet = (tabletIndex) => {
49
- return _jsx(Tablet, { tablet: tabletsToRender[tabletIndex] }, tabletIndex);
50
- };
51
- const renderContent = () => {
52
- const states = Array.from(new Set(tablets.map((tablet) => tablet.State)))
53
- .filter((state) => state !== undefined)
54
- .map((item) => ({
55
- value: item,
56
- content: item,
57
- }));
58
- const types = Array.from(new Set(tablets.map((tablet) => tablet.Type)))
59
- .filter((type) => type !== undefined)
60
- .map((item) => ({
61
- value: item,
62
- content: item,
63
- }));
64
- return (_jsxs("div", { className: b(null, className), children: [_jsxs("div", { className: b('header'), children: [_jsx(Select, { className: b('filter-control'), multiple: true, placeholder: i18n('controls.allItems'), label: `${i18n('controls.state')}:`, options: states, value: stateFilter, onUpdate: handleStateFilterChange }), _jsx(Select, { className: b('filter-control'), multiple: true, placeholder: i18n('controls.allItems'), label: `${i18n('controls.type')}:`, options: types, value: typeFilter, onUpdate: handleTypeFilterChange }), _jsx(TabletsOverall, { tablets: tablets })] }), _jsx("div", { className: b('items'), children: _jsx(ReactList, { itemRenderer: renderTablet, length: tabletsToRender.length, type: "uniform" }) })] }));
65
- };
126
+ const tablets = useTypedSelector((state) => selectTabletsWithFqdn(state, node, path));
66
127
  if (loading) {
67
- return _jsx(Loader, {});
128
+ return _jsx(TableSkeleton, {});
68
129
  }
69
- else if (error) {
130
+ if (error) {
70
131
  return _jsx(ResponseError, { error: error });
71
132
  }
72
- else {
73
- return tablets.length > 0 ? (renderContent()) : (_jsx("div", { className: "error", children: i18n('noTabletsData') }));
74
- }
75
- };
133
+ return (_jsx("div", { className: b(null, className), children: _jsx(ResizeableDataTable, { columns: columns, data: tablets, settings: DEFAULT_TABLE_SETTINGS, emptyDataMessage: i18n('noTabletsData') }) }));
134
+ }
@@ -1,6 +1,11 @@
1
1
  {
2
- "controls.type": "Type",
3
- "controls.state": "State",
4
- "controls.allItems": "All items",
5
- "noTabletsData": "No tablets data"
2
+ "noTabletsData": "No tablets data",
3
+ "Type": "Type",
4
+ "Tablet": "Tablet",
5
+ "State": "State",
6
+ "Node ID": "Node ID",
7
+ "Node FQDN": "Node FQDN",
8
+ "Generation": "Generation",
9
+ "Uptime": "Uptime",
10
+ "dialog.kill": "The tablet will be restarted. Do you want to proceed?"
6
11
  }
@@ -1,2 +1,2 @@
1
- declare const _default: (key: "controls.type" | "controls.state" | "controls.allItems" | "noTabletsData", params?: import("@gravity-ui/i18n").Params | undefined) => string;
1
+ declare const _default: (key: "Uptime" | "Type" | "State" | "Generation" | "Tablet" | "Node ID" | "Node FQDN" | "noTabletsData" | "dialog.kill", params?: import("@gravity-ui/i18n").Params | undefined) => 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-tablets';
5
- export default registerKeysets(COMPONENT, { ru, en });
4
+ export default registerKeysets(COMPONENT, { en });
@@ -1,10 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { Tabs } from '@gravity-ui/uikit';
4
- import qs from 'qs';
5
4
  import { Helmet } from 'react-helmet-async';
6
- import { useLocation } from 'react-router';
7
5
  import { Link } from 'react-router-dom';
6
+ import { StringParam, useQueryParams } from 'use-query-params';
8
7
  import { Loader } from '../../../components/Loader';
9
8
  import routes, { createHref } from '../../../routes';
10
9
  import { TENANT_DIAGNOSTICS_TABS_IDS } from '../../../store/reducers/tenant/constants';
@@ -35,9 +34,10 @@ function Diagnostics(props) {
35
34
  const dispatch = useTypedDispatch();
36
35
  const { currentSchemaPath, wasLoaded } = useTypedSelector((state) => state.schema);
37
36
  const { diagnosticsTab = TENANT_DIAGNOSTICS_TABS_IDS.overview } = useTypedSelector((state) => state.tenant);
38
- const location = useLocation();
39
- const queryParams = qs.parse(location.search, {
40
- ignoreQueryPrefix: true,
37
+ const [queryParams] = useQueryParams({
38
+ name: StringParam,
39
+ backend: StringParam,
40
+ clusterName: StringParam,
41
41
  });
42
42
  const { name: rootTenantName } = queryParams;
43
43
  const tenantName = isDatabaseEntityType(props.type) ? currentSchemaPath : rootTenantName;
@@ -135,5 +135,12 @@ export declare const EXTERNAL_TABLE_PAGES: ({
135
135
  id: "describe";
136
136
  title: string;
137
137
  })[];
138
+ export declare const VIEW_PAGES: ({
139
+ id: "overview";
140
+ title: string;
141
+ } | {
142
+ id: "describe";
143
+ title: string;
144
+ })[];
138
145
  export declare const getPagesByType: (type?: EPathType) => Page[];
139
146
  export {};
@@ -69,6 +69,7 @@ export const CDC_STREAM_PAGES = [overview, consumers, partitions, nodes, describ
69
69
  export const TOPIC_PAGES = [overview, consumers, partitions, nodes, describe];
70
70
  export const EXTERNAL_DATA_SOURCE_PAGES = [overview, describe];
71
71
  export const EXTERNAL_TABLE_PAGES = [overview, describe];
72
+ export const VIEW_PAGES = [overview, describe];
72
73
  // verbose mapping to guarantee correct tabs for new path types
73
74
  // TS will error when a new type is added but not mapped here
74
75
  const pathTypeToPages = {
@@ -84,5 +85,6 @@ const pathTypeToPages = {
84
85
  [EPathType.EPathTypePersQueueGroup]: TOPIC_PAGES,
85
86
  [EPathType.EPathTypeExternalDataSource]: EXTERNAL_DATA_SOURCE_PAGES,
86
87
  [EPathType.EPathTypeExternalTable]: EXTERNAL_TABLE_PAGES,
88
+ [EPathType.EPathTypeView]: VIEW_PAGES,
87
89
  };
88
90
  export const getPagesByType = (type) => (type && pathTypeToPages[type]) || DIR_PAGES;
@@ -1,14 +1,15 @@
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 { Icon } from '@gravity-ui/uikit';
4
5
  import { ResponseError } from '../../../../components/Errors/ResponseError';
5
- import { Icon } from '../../../../components/Icon';
6
6
  import { ResizeableDataTable } from '../../../../components/ResizeableDataTable/ResizeableDataTable';
7
7
  import { setHotKeysData, setHotKeysDataWasNotLoaded, setHotKeysError, setHotKeysLoading, } from '../../../../store/reducers/hotKeys/hotKeys';
8
8
  import { cn } from '../../../../utils/cn';
9
9
  import { DEFAULT_TABLE_SETTINGS } from '../../../../utils/constants';
10
10
  import { useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
11
11
  import i18n from './i18n';
12
+ import keyIcon from '../../../../assets/icons/key.svg';
12
13
  import './HotKeys.scss';
13
14
  const b = cn('ydb-hot-keys');
14
15
  const tableColumnsIds = {
@@ -18,7 +19,7 @@ const tableColumnsIds = {
18
19
  const getHotKeysColumns = (keyColumnsIds = []) => {
19
20
  const keysColumns = keyColumnsIds.map((col, index) => ({
20
21
  name: col,
21
- header: (_jsxs("div", { className: b('primary-key-column'), children: [_jsx(Icon, { name: "key", viewBox: "0 0 12 7", width: 12, height: 7 }), col] })),
22
+ header: (_jsxs("div", { className: b('primary-key-column'), children: [_jsx(Icon, { data: keyIcon, width: 12, height: 7 }), col] })),
22
23
  render: ({ row }) => row.keyValues[index],
23
24
  align: DataTable.RIGHT,
24
25
  sortable: false,
@@ -1,9 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { Checkbox, Loader } from '@gravity-ui/uikit';
3
+ import { Checkbox, Icon, Loader } from '@gravity-ui/uikit';
4
4
  import { Link } from 'react-router-dom';
5
5
  import { ResponseError } from '../../../../components/Errors/ResponseError';
6
- import { Icon } from '../../../../components/Icon';
7
6
  import { Illustration } from '../../../../components/Illustration';
8
7
  import { ProblemFilter } from '../../../../components/ProblemFilter';
9
8
  import { networkApi } from '../../../../store/reducers/network/network';
@@ -14,6 +13,7 @@ import { useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
14
13
  import { getDefaultNodePath } from '../../../Node/NodePages';
15
14
  import { NodeNetwork } from './NodeNetwork/NodeNetwork';
16
15
  import { getConnectedNodesCount } from './utils';
16
+ import networkIcon from '../../../../assets/icons/network.svg';
17
17
  import './Network.scss';
18
18
  const b = cn('network');
19
19
  export function Network({ path }) {
@@ -47,7 +47,7 @@ export function Network({ path }) {
47
47
  setShowId(!showId);
48
48
  }, checked: showId, children: "ID" }) }), _jsx("div", { className: b('checkbox-wrapper'), children: _jsx(Checkbox, { onUpdate: () => {
49
49
  setShowRacks(!showRacks);
50
- }, checked: showRacks, children: "Racks" }) })] }) }), _jsx(Nodes, { nodes: nodesGroupedByType, showId: showId, showRacks: showRacks, clickedNode: clickedNode, onClickNode: setClickedNode })] }), _jsx("div", { className: b('right'), children: clickedNode ? (_jsxs("div", { children: [_jsxs("div", { className: b('label'), children: ["Connectivity of node", ' ', _jsx(Link, { className: b('link'), to: getDefaultNodePath(clickedNode.NodeId), children: clickedNode.NodeId }), ' ', "to other nodes"] }), _jsx("div", { className: b('nodes-row'), children: _jsx(Nodes, { nodes: rightNodes, isRight: true, showId: showId, showRacks: showRacks, clickedNode: clickedNode, onClickNode: setClickedNode }) })] })) : (_jsxs("div", { className: b('placeholder'), children: [_jsx("div", { className: b('placeholder-img'), children: _jsx(Icon, { name: "network-placeholder", viewBox: "0 0 221 204", width: 221, height: 204 }) }), _jsx("div", { className: b('placeholder-text'), children: "Select node to see its connectivity to other nodes" })] })) })] }) }) }));
50
+ }, checked: showRacks, children: "Racks" }) })] }) }), _jsx(Nodes, { nodes: nodesGroupedByType, showId: showId, showRacks: showRacks, clickedNode: clickedNode, onClickNode: setClickedNode })] }), _jsx("div", { className: b('right'), children: clickedNode ? (_jsxs("div", { children: [_jsxs("div", { className: b('label'), children: ["Connectivity of node", ' ', _jsx(Link, { className: b('link'), to: getDefaultNodePath(clickedNode.NodeId), children: clickedNode.NodeId }), ' ', "to other nodes"] }), _jsx("div", { className: b('nodes-row'), children: _jsx(Nodes, { nodes: rightNodes, isRight: true, showId: showId, showRacks: showRacks, clickedNode: clickedNode, onClickNode: setClickedNode }) })] })) : (_jsxs("div", { className: b('placeholder'), children: [_jsx("div", { className: b('placeholder-img'), children: _jsx(Icon, { data: networkIcon, width: 221, height: 204 }) }), _jsx("div", { className: b('placeholder-text'), children: "Select node to see its connectivity to other nodes" })] })) })] }) }) }));
51
51
  }
52
52
  function Nodes({ nodes, isRight, showId, showRacks, clickedNode, onClickNode }) {
53
53
  const filter = useTypedSelector(selectProblemFilter);
@@ -62,6 +62,7 @@ function Overview({ type, tenantName }) {
62
62
  [EPathType.EPathTypePersQueueGroup]: () => _jsx(TopicInfo, { data: data }),
63
63
  [EPathType.EPathTypeExternalTable]: () => _jsx(ExternalTableInfo, { data: data }),
64
64
  [EPathType.EPathTypeExternalDataSource]: () => _jsx(ExternalDataSourceInfo, { data: data }),
65
+ [EPathType.EPathTypeView]: undefined,
65
66
  };
66
67
  return ((type && ((_a = pathTypeToComponent[type]) === null || _a === void 0 ? void 0 : _a.call(pathTypeToComponent))) || (_jsx(TableInfo, { data: data, type: type, olapStats: olapStats })));
67
68
  };
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
+ import { ArrowsRotateRight } from '@gravity-ui/icons';
3
4
  import { Button, Icon } from '@gravity-ui/uikit';
4
5
  import { DiagnosticCard } from '../../../../../components/DiagnosticCard/DiagnosticCard';
5
6
  import { EntityStatus } from '../../../../../components/EntityStatus/EntityStatus';
@@ -8,7 +9,6 @@ import { Loader } from '../../../../../components/Loader';
8
9
  import { hcStatusToColorFlag } from '../../../../../store/reducers/healthcheckInfo/utils';
9
10
  import { cn } from '../../../../../utils/cn';
10
11
  import i18n from './i18n';
11
- import updateArrow from '../../../../../assets/icons/update-arrow.svg';
12
12
  import './Healthcheck.scss';
13
13
  const b = cn('healthcheck');
14
14
  export function HealthcheckPreview(props) {
@@ -22,7 +22,7 @@ export function HealthcheckPreview(props) {
22
22
  // FIXME: refactor card to remove the button from the anchor link.
23
23
  event.preventDefault();
24
24
  onUpdate();
25
- }, loading: loading, view: "flat-secondary", children: _jsx(Icon, { data: updateArrow, width: 20, height: 20 }) })] }), _jsx("div", { className: b('self-check-status-indicator', { [modifier]: true }), children: selfCheckResult })] }));
25
+ }, loading: loading, view: "flat-secondary", children: _jsx(Icon, { data: ArrowsRotateRight, size: 20 }) })] }), _jsx("div", { className: b('self-check-status-indicator', { [modifier]: true }), children: selfCheckResult })] }));
26
26
  };
27
27
  const renderContent = () => {
28
28
  if (error) {
@@ -1,21 +1,15 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useThemeValue } from '@gravity-ui/uikit';
3
- import { useLocation } from 'react-router';
4
- import { parseQuery } from '../../../routes';
5
3
  import { TENANT_PAGES_IDS } from '../../../store/reducers/tenant/constants';
6
4
  import { cn } from '../../../utils/cn';
7
- import { TENANT_INITIAL_PAGE_KEY } from '../../../utils/constants';
8
- import { useSetting } from '../../../utils/hooks';
5
+ import { useTypedSelector } from '../../../utils/hooks';
9
6
  import Diagnostics from '../Diagnostics/Diagnostics';
10
7
  import { Query } from '../Query/Query';
11
8
  import './ObjectGeneral.scss';
12
9
  const b = cn('object-general');
13
10
  function ObjectGeneral(props) {
14
- const location = useLocation();
15
11
  const theme = useThemeValue();
16
- const [initialPage] = useSetting(TENANT_INITIAL_PAGE_KEY);
17
- const queryParams = parseQuery(location);
18
- const { tenantPage = initialPage } = queryParams;
12
+ const { tenantPage } = useTypedSelector((state) => state.tenant);
19
13
  const renderTabContent = () => {
20
14
  const { type, additionalTenantProps, additionalNodesProps, tenantName } = props;
21
15
  switch (tenantPage) {
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { HelpPopover } from '@gravity-ui/components';
4
- import { Button, Tabs } from '@gravity-ui/uikit';
4
+ import { LayoutHeaderCellsLargeFill } from '@gravity-ui/icons';
5
+ import { Button, Icon, Tabs } from '@gravity-ui/uikit';
5
6
  import qs from 'qs';
6
7
  import { useLocation } from 'react-router';
7
8
  import { Link } from 'react-router-dom';
8
9
  import { ClipboardButton } from '../../../components/ClipboardButton';
9
- import { Icon } from '../../../components/Icon';
10
10
  import InfoViewer from '../../../components/InfoViewer/InfoViewer';
11
11
  import { CDCStreamOverview, PersQueueGroupOverview, } from '../../../components/InfoViewer/schemaOverview';
12
12
  import { Loader } from '../../../components/Loader';
@@ -28,7 +28,7 @@ import { SchemaViewer } from '../Schema/SchemaViewer/SchemaViewer';
28
28
  import { TENANT_INFO_TABS, TENANT_SCHEMA_TAB, TenantTabsGroups } from '../TenantPages';
29
29
  import i18n from '../i18n';
30
30
  import { PaneVisibilityActionTypes, PaneVisibilityToggleButtons, paneVisibilityToggleReducerCreator, } from '../utils/paneVisibilityToggleHelpers';
31
- import { isIndexTable, isTableType } from '../utils/schema';
31
+ import { isIndexTableType, isTableType, isViewType } from '../utils/schema';
32
32
  import './ObjectSummary.scss';
33
33
  const b = cn('object-summary');
34
34
  const getTenantCommonInfoState = () => {
@@ -54,13 +54,15 @@ export function ObjectSummary({ type, subType, onCollapseSummary, onExpandSummar
54
54
  const currentObjectData = currentSchemaPath ? data[currentSchemaPath] : undefined;
55
55
  const currentSchemaData = (_c = currentObjectData === null || currentObjectData === void 0 ? void 0 : currentObjectData.PathDescription) === null || _c === void 0 ? void 0 : _c.Self;
56
56
  React.useEffect(() => {
57
- const isTable = isTableType(type);
57
+ // TODO: enable schema tab for view when supported
58
+ const isTable = isTableType(type) && !isViewType(type);
58
59
  if (type && !isTable && !TENANT_INFO_TABS.find((el) => el.id === summaryTab)) {
59
60
  dispatch(setSummaryTab(TENANT_SUMMARY_TABS_IDS.overview));
60
61
  }
61
62
  }, [dispatch, type, summaryTab]);
62
63
  const renderTabs = () => {
63
- const isTable = isTableType(type);
64
+ // TODO: enable schema tab for view when supported
65
+ const isTable = isTableType(type) && !isViewType(type);
64
66
  const tabsItems = isTable ? [...TENANT_INFO_TABS, ...TENANT_SCHEMA_TAB] : TENANT_INFO_TABS;
65
67
  return (_jsx("div", { className: b('tabs'), children: _jsx(Tabs, { size: "l", items: tabsItems, activeTab: summaryTab, wrapTo: ({ id }, node) => {
66
68
  const path = createHref(routes.tenant, undefined, Object.assign(Object.assign({}, queryParams), { name: tenantName, [TenantTabsGroups.summaryTab]: id }));
@@ -84,6 +86,7 @@ export function ObjectSummary({ type, subType, onCollapseSummary, onExpandSummar
84
86
  [EPathType.EPathTypePersQueueGroup]: () => (_jsx(PersQueueGroupOverview, { data: currentObjectData })),
85
87
  [EPathType.EPathTypeExternalTable]: () => (_jsx(ExternalTableSummary, { data: currentObjectData })),
86
88
  [EPathType.EPathTypeExternalDataSource]: () => (_jsx(ExternalDataSourceSummary, { data: currentObjectData })),
89
+ [EPathType.EPathTypeView]: undefined,
87
90
  };
88
91
  let component = (currentSchemaData === null || currentSchemaData === void 0 ? void 0 : currentSchemaData.PathType) && ((_a = pathTypeToComponent[currentSchemaData.PathType]) === null || _a === void 0 ? void 0 : _a.call(pathTypeToComponent));
89
92
  if (!component) {
@@ -134,8 +137,8 @@ export function ObjectSummary({ type, subType, onCollapseSummary, onExpandSummar
134
137
  dispatch(setQueryTab(TENANT_QUERY_TABS_ID.newQuery));
135
138
  };
136
139
  const renderCommonInfoControls = () => {
137
- const showPreview = isTableType(type) && !isIndexTable(subType);
138
- return (_jsxs(React.Fragment, { children: [showPreview && (_jsx(Button, { view: "flat-secondary", onClick: onOpenPreview, title: i18n('summary.showPreview'), children: _jsx(Icon, { name: "tablePreview", viewBox: '0 0 16 16', height: 16, width: 16 }) })), currentSchemaPath && (_jsx(ClipboardButton, { text: currentSchemaPath, view: "flat-secondary", title: i18n('summary.copySchemaPath') })), _jsx(PaneVisibilityToggleButtons, { onCollapse: onCollapseInfoHandler, onExpand: onExpandInfoHandler, isCollapsed: commonInfoVisibilityState.collapsed, initialDirection: "bottom" })] }));
140
+ const showPreview = isTableType(type) && !isIndexTableType(subType);
141
+ return (_jsxs(React.Fragment, { children: [showPreview && (_jsx(Button, { view: "flat-secondary", onClick: onOpenPreview, title: i18n('summary.showPreview'), children: _jsx(Icon, { data: LayoutHeaderCellsLargeFill }) })), currentSchemaPath && (_jsx(ClipboardButton, { text: currentSchemaPath, view: "flat-secondary", title: i18n('summary.copySchemaPath') })), _jsx(PaneVisibilityToggleButtons, { onCollapse: onCollapseInfoHandler, onExpand: onExpandInfoHandler, isCollapsed: commonInfoVisibilityState.collapsed, initialDirection: "bottom" })] }));
139
142
  };
140
143
  const renderEntityTypeBadge = () => {
141
144
  const { Status, Reason } = currentItem;
@@ -97,7 +97,7 @@ export function ExplainResult(props) {
97
97
  return (_jsxs(React.Fragment, { children: [content, isFullscreen && _jsx(Fullscreen, { children: content })] }));
98
98
  };
99
99
  const renderAstExplain = () => {
100
- const content = (_jsx("div", { className: b('ast'), children: _jsx(MonacoEditor, { language: LANGUAGE_S_EXPRESSION_ID, value: props.ast, options: EDITOR_OPTIONS, wrappingIndent: "indent" }) }));
100
+ const content = (_jsx("div", { className: b('ast'), children: _jsx(MonacoEditor, { language: LANGUAGE_S_EXPRESSION_ID, value: props.ast, options: EDITOR_OPTIONS, wrappingIndent: "indent", theme: `vs-${props.theme}` }) }));
101
101
  return (_jsxs(React.Fragment, { children: [content, isFullscreen && _jsx(Fullscreen, { children: content })] }));
102
102
  };
103
103
  const renderGraph = () => {
@@ -1,13 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
+ import { CircleExclamationFill, CircleInfoFill, CircleXmarkFill, TriangleExclamationFill, } from '@gravity-ui/icons';
3
4
  import { ArrowToggle, Button, Icon } from '@gravity-ui/uikit';
4
5
  import ShortyString from '../../../../components/ShortyString/ShortyString';
5
6
  import { cn } from '../../../../utils/cn';
6
7
  import { getSeverity } from './models';
7
- import warningIcon from '../../../../assets/icons/circle-exclamation.svg';
8
- import infoIcon from '../../../../assets/icons/circle-info.svg';
9
- import fatalIcon from '../../../../assets/icons/circle-xmark.svg';
10
- import errorIcon from '../../../../assets/icons/triangle-exclamation.svg';
11
8
  import './Issues.scss';
12
9
  const blockWrapper = cn('kv-result-issues');
13
10
  const blockIssues = cn('kv-issues');
@@ -55,15 +52,15 @@ function IssueList(props) {
55
52
  return (_jsx("div", { className: blockIssue('list'), children: issues.map((issue, index) => (_jsx(Issue, { issue: issue, level: level, expanded: expanded }, index))) }));
56
53
  }
57
54
  const severityIcons = {
58
- S_INFO: infoIcon,
59
- S_WARNING: warningIcon,
60
- S_ERROR: errorIcon,
61
- S_FATAL: fatalIcon,
55
+ S_INFO: CircleInfoFill,
56
+ S_WARNING: CircleExclamationFill,
57
+ S_ERROR: TriangleExclamationFill,
58
+ S_FATAL: CircleXmarkFill,
62
59
  };
63
60
  const blockIssueSeverity = cn('yql-issue-severity');
64
61
  function IssueSeverity({ severity }) {
65
62
  const shortenSeverity = severity.slice(2).toLowerCase();
66
- return (_jsxs("span", { className: blockIssueSeverity({ severity: shortenSeverity }), children: [_jsx(Icon, { className: blockIssueSeverity('icon'), data: severityIcons[severity], size: 16 }), _jsx("span", { className: blockIssueSeverity('title'), children: shortenSeverity })] }));
63
+ return (_jsxs("span", { className: blockIssueSeverity({ severity: shortenSeverity }), children: [_jsx(Icon, { className: blockIssueSeverity('icon'), data: severityIcons[severity] }), _jsx("span", { className: blockIssueSeverity('title'), children: shortenSeverity })] }));
67
64
  }
68
65
  function getIssuePosition(issue) {
69
66
  const { position = {} } = issue;
@@ -1,15 +1,15 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Button, Loader } from '@gravity-ui/uikit';
2
+ import { Xmark } from '@gravity-ui/icons';
3
+ import { Button, Icon, Loader } from '@gravity-ui/uikit';
3
4
  import EnableFullscreenButton from '../../../../components/EnableFullscreenButton/EnableFullscreenButton';
4
5
  import Fullscreen from '../../../../components/Fullscreen/Fullscreen';
5
- import { Icon } from '../../../../components/Icon';
6
6
  import { QueryResultTable } from '../../../../components/QueryResultTable';
7
7
  import { previewApi } from '../../../../store/reducers/preview';
8
8
  import { setShowPreview } from '../../../../store/reducers/schema/schema';
9
9
  import { cn } from '../../../../utils/cn';
10
10
  import { useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
11
11
  import { prepareQueryError } from '../../../../utils/query';
12
- import { isExternalTable, isTableType } from '../../utils/schema';
12
+ import { isExternalTableType, isTableType } from '../../utils/schema';
13
13
  import i18n from '../i18n';
14
14
  import './Preview.scss';
15
15
  const b = cn('kv-preview');
@@ -19,14 +19,14 @@ export const Preview = ({ database, type }) => {
19
19
  const { autorefresh, currentSchemaPath } = useTypedSelector((state) => state.schema);
20
20
  const isFullscreen = useTypedSelector((state) => state.fullscreen);
21
21
  const query = `--!syntax_v1\nselect * from \`${currentSchemaPath}\` limit 32`;
22
- const { currentData, isFetching, error } = previewApi.useSendQueryQuery({ database, query, action: isExternalTable(type) ? 'execute-query' : 'execute-scan' }, { pollingInterval: autorefresh, skip: !isPreviewAvailable });
22
+ const { currentData, isFetching, error } = previewApi.useSendQueryQuery({ database, query, action: isExternalTableType(type) ? 'execute-query' : 'execute-scan' }, { pollingInterval: autorefresh, skip: !isPreviewAvailable });
23
23
  const loading = isFetching && currentData === undefined;
24
24
  const data = currentData !== null && currentData !== void 0 ? currentData : {};
25
25
  const handleClosePreview = () => {
26
26
  dispatch(setShowPreview(false));
27
27
  };
28
28
  const renderHeader = () => {
29
- return (_jsxs("div", { className: b('header'), children: [_jsxs("div", { className: b('title'), children: [i18n('preview.title'), ' ', _jsx("div", { className: b('table-name'), children: currentSchemaPath })] }), _jsxs("div", { className: b('controls-left'), children: [_jsx(EnableFullscreenButton, { disabled: Boolean(error) }), _jsx(Button, { view: "flat-secondary", onClick: handleClosePreview, title: i18n('preview.close'), children: _jsx(Icon, { name: "close", viewBox: '0 0 16 16', width: 16, height: 16 }) })] })] }));
29
+ return (_jsxs("div", { className: b('header'), children: [_jsxs("div", { className: b('title'), children: [i18n('preview.title'), ' ', _jsx("div", { className: b('table-name'), children: currentSchemaPath })] }), _jsxs("div", { className: b('controls-left'), children: [_jsx(EnableFullscreenButton, { disabled: Boolean(error) }), _jsx(Button, { view: "flat-secondary", onClick: handleClosePreview, title: i18n('preview.close'), children: _jsx(Icon, { data: Xmark, size: 18 }) })] })] }));
30
30
  };
31
31
  if (loading) {
32
32
  return (_jsx("div", { className: b('loader-container'), children: _jsx(Loader, { size: "m" }) }));
@@ -28,8 +28,8 @@ interface QueryEditorProps {
28
28
  declare function QueryEditor(props: QueryEditorProps): import("react/jsx-runtime").JSX.Element;
29
29
  declare const _default: import("react-redux").ConnectedComponent<typeof QueryEditor, {
30
30
  theme: string;
31
- type?: EPathType | undefined;
32
31
  path: string;
32
+ type?: EPathType | undefined;
33
33
  changeUserInput: (arg: {
34
34
  input: string;
35
35
  }) => void;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { Button, DropdownMenu } from '@gravity-ui/uikit';
4
- import { Icon } from '../../../../components/Icon';
3
+ import { ChevronDown, PlayFill } from '@gravity-ui/icons';
4
+ import { Button, DropdownMenu, Icon } from '@gravity-ui/uikit';
5
5
  import { LabelWithPopover } from '../../../../components/LabelWithPopover';
6
6
  import { cn } from '../../../../utils/cn';
7
7
  import { QUERY_MODES, QUERY_MODES_TITLES } from '../../../../utils/query';
@@ -48,10 +48,10 @@ export const QueryEditorControls = ({ onRunButtonClick, runIsLoading, onExplainB
48
48
  const explainView = highlightedAction === 'explain' ? 'action' : undefined;
49
49
  return (_jsxs("div", { className: b(), children: [_jsxs("div", { className: b('left'), children: [_jsxs(Button, { onClick: () => {
50
50
  onRunButtonClick(queryMode);
51
- }, disabled: disabled, loading: runIsLoading, view: runView, children: [_jsx(Icon, { name: "startPlay", viewBox: "0 0 16 16", width: 16, height: 16 }), 'Run'] }), _jsx(Button, { onClick: () => {
51
+ }, disabled: disabled, loading: runIsLoading, view: runView, children: [_jsx(Icon, { data: PlayFill, size: 14 }), 'Run'] }), _jsx(Button, { onClick: () => {
52
52
  onExplainButtonClick(queryMode);
53
53
  }, disabled: disabled, loading: explainIsLoading, view: explainView, children: "Explain" }), _jsx("div", { className: b('mode-selector'), children: _jsx(DropdownMenu, { items: querySelectorMenuItems, popupProps: {
54
54
  className: b('mode-selector__popup'),
55
55
  qa: queryModeSelectorPopupQa,
56
- }, switcher: _jsx(Button, { className: b('mode-selector__button'), qa: queryModeSelectorQa, children: _jsxs("span", { className: b('mode-selector__button-content'), children: [`${i18n('controls.query-mode-selector_type')} ${QueryModeSelectorOptions[queryMode].title}`, _jsx(Icon, { name: "chevron-down", width: 16, height: 16 })] }) }) }) })] }), _jsx(SaveQuery, { savedQueries: savedQueries, onSaveQuery: onSaveQueryClick, saveButtonDisabled: disabled })] }));
56
+ }, switcher: _jsx(Button, { className: b('mode-selector__button'), qa: queryModeSelectorQa, children: _jsxs("span", { className: b('mode-selector__button-content'), children: [`${i18n('controls.query-mode-selector_type')} ${QueryModeSelectorOptions[queryMode].title}`, _jsx(Icon, { data: ChevronDown })] }) }) }) })] }), _jsx(SaveQuery, { savedQueries: savedQueries, onSaveQuery: onSaveQueryClick, saveButtonDisabled: disabled })] }));
57
57
  };
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
+ import { Pencil, TrashBin } from '@gravity-ui/icons';
3
4
  import DataTable from '@gravity-ui/react-data-table';
4
- import { Button, Dialog } from '@gravity-ui/uikit';
5
- import { Icon } from '../../../../components/Icon';
5
+ import { Button, Dialog, Icon } from '@gravity-ui/uikit';
6
6
  import { ResizeableDataTable } from '../../../../components/ResizeableDataTable/ResizeableDataTable';
7
7
  import { TruncatedQuery } from '../../../../components/TruncatedQuery/TruncatedQuery';
8
8
  import { setQueryNameToEdit } from '../../../../store/reducers/saveQuery';
@@ -56,7 +56,7 @@ export const SavedQueries = ({ savedQueries, changeUserInput, onDeleteQuery }) =
56
56
  {
57
57
  name: 'body',
58
58
  header: 'Query Text',
59
- render: ({ row: query }) => (_jsxs("div", { className: b('query'), children: [_jsx("div", { className: b('query-body'), children: _jsx(TruncatedQuery, { value: query.body, maxQueryHeight: MAX_QUERY_HEIGHT }) }), _jsxs("span", { className: b('controls'), children: [_jsx(Button, { view: "flat-secondary", children: _jsx(Icon, { name: "pencil", viewBox: "0 0 24 24" }) }), _jsx(Button, { view: "flat-secondary", onClick: onDeleteQueryClick(query.name), children: _jsx(Icon, { name: "trash", viewBox: "0 0 24 24" }) })] })] })),
59
+ render: ({ row: query }) => (_jsxs("div", { className: b('query'), children: [_jsx("div", { className: b('query-body'), children: _jsx(TruncatedQuery, { value: query.body, maxQueryHeight: MAX_QUERY_HEIGHT }) }), _jsxs("span", { className: b('controls'), children: [_jsx(Button, { view: "flat-secondary", children: _jsx(Icon, { data: Pencil }) }), _jsx(Button, { view: "flat-secondary", onClick: onDeleteQueryClick(query.name), children: _jsx(Icon, { data: TrashBin }) })] })] })),
60
60
  sortable: false,
61
61
  resizeMinWidth: 650,
62
62
  },