ydb-embedded-ui 6.2.2 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,8 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import DataTable from '@gravity-ui/react-data-table';
3
- import { Icon } from '../../../../components/Icon';
3
+ import { Icon } from '@gravity-ui/uikit';
4
4
  import { EColumnCodec } from '../../../../types/api/schema';
5
- import { isColumnEntityType, isExternalTable, isRowTable, isTableType } from '../../utils/schema';
5
+ import { isColumnEntityType, isExternalTableType, isRowTableType, isTableType, } from '../../utils/schema';
6
+ import keyIcon from '../../../../assets/icons/key.svg';
6
7
  export const SchemaViewerColumns = {
7
8
  id: 'Id',
8
9
  name: 'Name',
@@ -51,7 +52,7 @@ export function prepareColumnDescriptions(type, scheme) {
51
52
  keyColumnIds = (_b = columnTableSchema.KeyColumnIds) !== null && _b !== void 0 ? _b : [];
52
53
  columns = (_c = columnTableSchema.Columns) !== null && _c !== void 0 ? _c : [];
53
54
  }
54
- else if (isExternalTable(type)) {
55
+ else if (isExternalTableType(type)) {
55
56
  columns = (_f = (_e = (_d = scheme === null || scheme === void 0 ? void 0 : scheme.PathDescription) === null || _d === void 0 ? void 0 : _d.ExternalTableDescription) === null || _e === void 0 ? void 0 : _e.Columns) !== null && _f !== void 0 ? _f : [];
56
57
  }
57
58
  else {
@@ -83,7 +84,7 @@ export function prepareSchemaTableColumns(options) {
83
84
  width: 60,
84
85
  },
85
86
  ];
86
- if (!isExternalTable(options.type)) {
87
+ if (!isExternalTableType(options.type)) {
87
88
  // External tables don't have key columns
88
89
  columns.push({
89
90
  name: SchemaViewerColumns.key,
@@ -94,7 +95,7 @@ export function prepareSchemaTableColumns(options) {
94
95
  // Values in keyColumnsOrderValues are always negative, so it will be 1 for not key columns
95
96
  sortAccessor: (row) => (row.Id && keyColumnsOrderValues[row.Id]) || 1,
96
97
  render: ({ row }) => {
97
- return row.Id && options.keyColumnIds.includes(row.Id) ? (_jsx("div", { className: options.b('key-icon'), children: _jsx(Icon, { name: "key", viewBox: "0 0 12 7", width: 12, height: 7 }) })) : null;
98
+ return row.Id && options.keyColumnIds.includes(row.Id) ? (_jsx("div", { className: options.b('key-icon'), children: _jsx(Icon, { data: keyIcon, width: 12, height: 7 }) })) : null;
98
99
  },
99
100
  });
100
101
  }
@@ -116,7 +117,7 @@ export function prepareSchemaTableColumns(options) {
116
117
  return undefined;
117
118
  },
118
119
  });
119
- if (options.withFamilies && isRowTable(options.type)) {
120
+ if (options.withFamilies && isRowTableType(options.type)) {
120
121
  columns.push({
121
122
  name: SchemaViewerColumns.familyName,
122
123
  width: 100,
@@ -7,14 +7,15 @@
7
7
  "summary.copySchemaPath": "Copy schema path",
8
8
  "actions.copied": "The path is copied to the clipboard",
9
9
  "actions.notCopied": "Couldn’t copy the path",
10
- "actions.externalTableSelectUnavailable": "Select query for external tables available only with 'YQL - QueryService' query mode. You need to turn in additional query modes in settings to enable it",
11
10
  "actions.copyPath": "Copy path",
12
11
  "actions.openPreview": "Open preview",
13
12
  "actions.createTable": "Create table...",
14
13
  "actions.createExternalTable": "Create external table...",
15
14
  "actions.createTopic": "Create topic...",
15
+ "actions.createView": "Create view...",
16
16
  "actions.dropTable": "Drop table...",
17
17
  "actions.dropTopic": "Drop topic...",
18
+ "actions.dropView": "Drop view...",
18
19
  "actions.alterTable": "Alter table...",
19
20
  "actions.alterTopic": "Alter topic...",
20
21
  "actions.selectQuery": "Select query...",
@@ -1,2 +1,2 @@
1
- declare const _default: (key: "page.title" | "acl.owner" | "acl.empty" | "summary.navigation" | "summary.showPreview" | "summary.copySchemaPath" | "actions.copied" | "actions.notCopied" | "actions.externalTableSelectUnavailable" | "actions.copyPath" | "actions.openPreview" | "actions.createTable" | "actions.createExternalTable" | "actions.createTopic" | "actions.dropTable" | "actions.dropTopic" | "actions.alterTable" | "actions.alterTopic" | "actions.selectQuery" | "actions.upsertQuery", params?: import("@gravity-ui/i18n").Params | undefined) => string;
1
+ declare const _default: (key: "page.title" | "acl.owner" | "acl.empty" | "summary.navigation" | "summary.showPreview" | "summary.copySchemaPath" | "actions.copied" | "actions.notCopied" | "actions.copyPath" | "actions.openPreview" | "actions.createTable" | "actions.createExternalTable" | "actions.createTopic" | "actions.createView" | "actions.dropTable" | "actions.dropTopic" | "actions.dropView" | "actions.alterTable" | "actions.alterTopic" | "actions.selectQuery" | "actions.upsertQuery", 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-tenant';
5
- export default registerKeysets(COMPONENT, { en, ru });
4
+ export default registerKeysets(COMPONENT, { en });
@@ -17,8 +17,6 @@
17
17
  &_left.rotate {
18
18
  transform: rotate(90deg);
19
19
  }
20
- &_top {
21
- }
22
20
 
23
21
  &_top.rotate {
24
22
  transform: rotate(180deg);
@@ -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 } from '@gravity-ui/uikit';
4
- import { Icon } from '../../../components/Icon';
3
+ import { ChevronsUp } from '@gravity-ui/icons';
4
+ import { Button, Icon } from '@gravity-ui/uikit';
5
5
  import { cn } from '../../../utils/cn';
6
6
  import './ToggleButton.scss';
7
7
  export var PaneVisibilityActionTypes;
@@ -44,7 +44,7 @@ const b = cn('kv-pane-visibility-button');
44
44
  export function PaneVisibilityToggleButtons({ onCollapse, onExpand, isCollapsed, initialDirection = 'top', className, }) {
45
45
  return (_jsxs(React.Fragment, { children: [_jsx(Button, { view: "flat-secondary", onClick: onCollapse, className: b({
46
46
  hidden: isCollapsed,
47
- }, className), title: "Collapse", children: _jsx(Icon, { name: "collapse", viewBox: "0 0 384 512", width: 14, height: 14, className: b({ [initialDirection]: true }) }) }), _jsx(Button, { view: "flat-secondary", onClick: onExpand, className: b({
47
+ }, className), title: "Collapse", children: _jsx(Icon, { data: ChevronsUp, className: b({ [initialDirection]: true }) }) }), _jsx(Button, { view: "flat-secondary", onClick: onExpand, className: b({
48
48
  hidden: !isCollapsed,
49
- }, className), title: "Expand", children: _jsx(Icon, { name: "collapse", viewBox: "0 0 384 512", width: 14, height: 14, className: b({ [initialDirection]: true }, 'rotate') }) })] }));
49
+ }, className), title: "Expand", children: _jsx(Icon, { data: ChevronsUp, className: b({ [initialDirection]: true }, 'rotate') }) })] }));
50
50
  }
@@ -7,3 +7,5 @@ export declare const createExternalTableTemplate: (path: string) => string;
7
7
  export declare const createTopicTemplate: (path: string) => string;
8
8
  export declare const alterTopicTemplate: (path: string) => string;
9
9
  export declare const dropTopicTemplate: (path: string) => string;
10
+ export declare const createViewTemplate: (path: string) => string;
11
+ export declare const dropViewTemplate: (path: string) => string;
@@ -105,3 +105,9 @@ ALTER TOPIC \`${path}\`
105
105
  export const dropTopicTemplate = (path) => {
106
106
  return `DROP TOPIC \`${path}\`;`;
107
107
  };
108
+ export const createViewTemplate = (path) => {
109
+ return `CREATE VIEW \`${path}/my_view\` WITH (security_invoker = TRUE) AS SELECT 1;`;
110
+ };
111
+ export const dropViewTemplate = (path) => {
112
+ return `DROP VIEW \`${path}\`;`;
113
+ };
@@ -5,12 +5,13 @@ export declare const mapPathTypeToNavigationTreeType: (type?: EPathType, subType
5
5
  export declare const mapPathTypeToEntityName: (type?: EPathType, subType?: EPathSubType) => string | undefined;
6
6
  export declare const mapDatabaseTypeToDBName: (type?: ETenantType) => string | undefined;
7
7
  export declare const isTableType: (pathType?: EPathType) => boolean;
8
- export declare const isIndexTable: (subType?: EPathSubType) => boolean;
8
+ export declare const isIndexTableType: (subType?: EPathSubType) => boolean;
9
9
  export declare const isColumnEntityType: (type?: EPathType) => boolean;
10
10
  export declare const isDatabaseEntityType: (type?: EPathType) => boolean;
11
11
  export declare const isCdcStreamEntityType: (type?: EPathType) => boolean;
12
12
  export declare const isEntityWithMergedImplementation: (type?: EPathType) => boolean;
13
13
  export declare const isChildlessPathType: (type?: EPathType, subType?: EPathSubType) => boolean;
14
14
  export declare const isPathTypeWithTopic: (type?: EPathType) => boolean;
15
- export declare const isExternalTable: (type?: EPathType) => boolean;
16
- export declare const isRowTable: (type?: EPathType) => boolean;
15
+ export declare const isExternalTableType: (type?: EPathType) => boolean;
16
+ export declare const isRowTableType: (type?: EPathType) => boolean;
17
+ export declare const isViewType: (type?: EPathType) => boolean;
@@ -22,6 +22,7 @@ const pathTypeToNodeType = {
22
22
  [EPathType.EPathTypePersQueueGroup]: 'topic',
23
23
  [EPathType.EPathTypeExternalDataSource]: 'external_data_source',
24
24
  [EPathType.EPathTypeExternalTable]: 'external_table',
25
+ [EPathType.EPathTypeView]: 'view',
25
26
  };
26
27
  export const mapPathTypeToNavigationTreeType = (type = EPathType.EPathTypeDir, subType, defaultType = 'directory') => (subType && pathSubTypeToNodeType[subType]) || pathTypeToNodeType[type] || defaultType;
27
28
  // ====================
@@ -44,6 +45,7 @@ const pathTypeToEntityName = {
44
45
  [EPathType.EPathTypePersQueueGroup]: 'Topic',
45
46
  [EPathType.EPathTypeExternalDataSource]: 'External Data Source',
46
47
  [EPathType.EPathTypeExternalTable]: 'External Table',
48
+ [EPathType.EPathTypeView]: 'View',
47
49
  };
48
50
  export const mapPathTypeToEntityName = (type, subType) => (subType && pathSubTypeToEntityName[subType]) || (type && pathTypeToEntityName[type]);
49
51
  // ====================
@@ -60,6 +62,7 @@ const pathTypeToIsTable = {
60
62
  [EPathType.EPathTypeTable]: true,
61
63
  [EPathType.EPathTypeColumnTable]: true,
62
64
  [EPathType.EPathTypeExternalTable]: true,
65
+ [EPathType.EPathTypeView]: true,
63
66
  [EPathType.EPathTypeInvalid]: false,
64
67
  [EPathType.EPathTypeDir]: false,
65
68
  [EPathType.EPathTypeSubDomain]: false,
@@ -78,7 +81,7 @@ const pathSubTypeToIsIndexImpl = {
78
81
  [EPathSubType.EPathSubTypeStreamImpl]: false,
79
82
  [EPathSubType.EPathSubTypeEmpty]: false,
80
83
  };
81
- export const isIndexTable = (subType) => { var _a; return (_a = (subType && pathSubTypeToIsIndexImpl[subType])) !== null && _a !== void 0 ? _a : false; };
84
+ export const isIndexTableType = (subType) => { var _a; return (_a = (subType && pathSubTypeToIsIndexImpl[subType])) !== null && _a !== void 0 ? _a : false; };
82
85
  // ====================
83
86
  const pathTypeToIsColumn = {
84
87
  [EPathType.EPathTypeColumnStore]: true,
@@ -93,6 +96,7 @@ const pathTypeToIsColumn = {
93
96
  [EPathType.EPathTypePersQueueGroup]: false,
94
97
  [EPathType.EPathTypeExternalDataSource]: false,
95
98
  [EPathType.EPathTypeExternalTable]: false,
99
+ [EPathType.EPathTypeView]: false,
96
100
  };
97
101
  export const isColumnEntityType = (type) => { var _a; return (_a = (type && pathTypeToIsColumn[type])) !== null && _a !== void 0 ? _a : false; };
98
102
  // ====================
@@ -109,6 +113,7 @@ const pathTypeToIsDatabase = {
109
113
  [EPathType.EPathTypePersQueueGroup]: false,
110
114
  [EPathType.EPathTypeExternalDataSource]: false,
111
115
  [EPathType.EPathTypeExternalTable]: false,
116
+ [EPathType.EPathTypeView]: false,
112
117
  };
113
118
  export const isDatabaseEntityType = (type) => { var _a; return (_a = (type && pathTypeToIsDatabase[type])) !== null && _a !== void 0 ? _a : false; };
114
119
  // ====================
@@ -127,6 +132,7 @@ const pathTypeToEntityWithMergedImplementation = {
127
132
  [EPathType.EPathTypeExtSubDomain]: false,
128
133
  [EPathType.EPathTypeExternalDataSource]: false,
129
134
  [EPathType.EPathTypeExternalTable]: false,
135
+ [EPathType.EPathTypeView]: false,
130
136
  };
131
137
  export const isEntityWithMergedImplementation = (type) => { var _a; return (_a = (type && pathTypeToEntityWithMergedImplementation[type])) !== null && _a !== void 0 ? _a : false; };
132
138
  // ====================
@@ -141,6 +147,7 @@ const pathTypeToChildless = {
141
147
  [EPathType.EPathTypePersQueueGroup]: true,
142
148
  [EPathType.EPathTypeExternalDataSource]: true,
143
149
  [EPathType.EPathTypeExternalTable]: true,
150
+ [EPathType.EPathTypeView]: true,
144
151
  [EPathType.EPathTypeInvalid]: false,
145
152
  [EPathType.EPathTypeColumnStore]: false,
146
153
  [EPathType.EPathTypeColumnTable]: false,
@@ -165,8 +172,10 @@ const mapPathTypeToIsWithTopic = {
165
172
  [EPathType.EPathTypeExtSubDomain]: false,
166
173
  [EPathType.EPathTypeExternalDataSource]: false,
167
174
  [EPathType.EPathTypeExternalTable]: false,
175
+ [EPathType.EPathTypeView]: false,
168
176
  };
169
177
  export const isPathTypeWithTopic = (type) => { var _a; return (_a = (type && mapPathTypeToIsWithTopic[type])) !== null && _a !== void 0 ? _a : false; };
170
178
  // ====================
171
- export const isExternalTable = (type) => type === EPathType.EPathTypeExternalTable;
172
- export const isRowTable = (type) => type === EPathType.EPathTypeTable;
179
+ export const isExternalTableType = (type) => type === EPathType.EPathTypeExternalTable;
180
+ export const isRowTableType = (type) => type === EPathType.EPathTypeTable;
181
+ export const isViewType = (type) => type === EPathType.EPathTypeView;
@@ -4,7 +4,7 @@ import { TENANT_PAGES_IDS, TENANT_QUERY_TABS_ID } from '../../../store/reducers/
4
4
  import { setQueryTab, setTenantPage } from '../../../store/reducers/tenant/tenant';
5
5
  import createToast from '../../../utils/createToast';
6
6
  import i18n from '../i18n';
7
- import { alterTableTemplate, alterTopicTemplate, createExternalTableTemplate, createTableTemplate, createTopicTemplate, dropExternalTableTemplate, dropTopicTemplate, selectQueryTemplate, upsertQueryTemplate, } from './queryTemplates';
7
+ import { alterTableTemplate, alterTopicTemplate, createExternalTableTemplate, createTableTemplate, createTopicTemplate, createViewTemplate, dropExternalTableTemplate, dropTopicTemplate, dropViewTemplate, selectQueryTemplate, upsertQueryTemplate, } from './queryTemplates';
8
8
  const bindActions = (path, dispatch, additionalEffects) => {
9
9
  const { setActivePath, setQueryMode } = additionalEffects;
10
10
  const inputQuery = (tmpl, mode) => () => {
@@ -27,6 +27,8 @@ const bindActions = (path, dispatch, additionalEffects) => {
27
27
  createTopic: inputQuery(createTopicTemplate, 'script'),
28
28
  alterTopic: inputQuery(alterTopicTemplate, 'script'),
29
29
  dropTopic: inputQuery(dropTopicTemplate, 'script'),
30
+ createView: inputQuery(createViewTemplate, 'script'),
31
+ dropView: inputQuery(dropViewTemplate, 'script'),
30
32
  copyPath: () => {
31
33
  try {
32
34
  copy(path);
@@ -54,6 +56,7 @@ export const getActions = (dispatch, additionalEffects) => (path, type) => {
54
56
  [
55
57
  { text: i18n('actions.createTable'), action: actions.createTable },
56
58
  { text: i18n('actions.createTopic'), action: actions.createTopic },
59
+ { text: i18n('actions.createView'), action: actions.createView },
57
60
  ],
58
61
  ];
59
62
  const TABLE_SET = [
@@ -85,6 +88,11 @@ export const getActions = (dispatch, additionalEffects) => (path, type) => {
85
88
  [copyItem],
86
89
  [{ text: i18n('actions.createExternalTable'), action: actions.createExternalTable }],
87
90
  ];
91
+ const VIEW_SET = [
92
+ [copyItem],
93
+ [{ text: i18n('actions.selectQuery'), action: actions.selectQuery }],
94
+ [{ text: i18n('actions.dropView'), action: actions.dropView }],
95
+ ];
88
96
  const JUST_COPY = [copyItem];
89
97
  // verbose mapping to guarantee a correct actions set for new node types
90
98
  // TS will error when a new type is added in the lib but is not mapped here
@@ -99,6 +107,7 @@ export const getActions = (dispatch, additionalEffects) => (path, type) => {
99
107
  index: JUST_COPY,
100
108
  external_table: EXTERNAL_TABLE_SET,
101
109
  external_data_source: EXTERNAL_DATA_SOURCE_SET,
110
+ view: VIEW_SET,
102
111
  };
103
112
  return nodeTypeToActions[type];
104
113
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Button } from '@gravity-ui/uikit';
3
- import { Icon } from '../../../components/Icon';
2
+ import { LayoutHeaderCellsLargeFill } from '@gravity-ui/icons';
3
+ import { Button, Icon } from '@gravity-ui/uikit';
4
4
  import { setShowPreview } from '../../../store/reducers/schema/schema';
5
5
  import { TENANT_PAGES_IDS, TENANT_QUERY_TABS_ID } from '../../../store/reducers/tenant/constants';
6
6
  import { setQueryTab, setTenantPage } from '../../../store/reducers/tenant/tenant';
@@ -18,7 +18,7 @@ const bindActions = (path, dispatch, additionalEffects) => {
18
18
  };
19
19
  export const getControls = (dispatch, additionalEffects) => (path, type) => {
20
20
  const options = bindActions(path, dispatch, additionalEffects);
21
- const openPreview = (_jsx(Button, { view: "flat-secondary", onClick: options.openPreview, title: i18n('actions.openPreview'), size: "s", children: _jsx(Icon, { name: "tablePreview" }) }));
21
+ const openPreview = (_jsx(Button, { view: "flat-secondary", onClick: options.openPreview, title: i18n('actions.openPreview'), size: "s", children: _jsx(Icon, { data: LayoutHeaderCellsLargeFill }) }));
22
22
  const nodeTypeToControls = {
23
23
  database: undefined,
24
24
  directory: undefined,
@@ -30,6 +30,7 @@ export const getControls = (dispatch, additionalEffects) => (path, type) => {
30
30
  index: undefined,
31
31
  external_table: openPreview,
32
32
  external_data_source: undefined,
33
+ view: openPreview,
33
34
  };
34
35
  return nodeTypeToControls[type];
35
36
  };
@@ -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 { ArrowsOppositeToDots } from '@gravity-ui/icons';
3
4
  import { Icon } from '@gravity-ui/uikit';
4
5
  import { skipToken } from '@reduxjs/toolkit/query';
5
6
  import { Helmet } from 'react-helmet-async';
@@ -21,7 +22,6 @@ import { stringifyVdiskId } from '../../utils/dataFormatters/dataFormatters';
21
22
  import { getSeverityColor } from '../../utils/disks/helpers';
22
23
  import { useTypedDispatch, useTypedSelector } from '../../utils/hooks';
23
24
  import { vDiskPageKeyset } from './i18n';
24
- import ArrowsOppositeToDotsIcon from '@gravity-ui/icons/svgs/arrows-opposite-to-dots.svg';
25
25
  import './VDiskPage.scss';
26
26
  const vDiskPageCn = cn('ydb-vdisk-page');
27
27
  export function VDiskPage() {
@@ -84,7 +84,7 @@ export function VDiskPage() {
84
84
  return (_jsx(DiskPageTitle, { entityName: vDiskPageKeyset('vdisk'), status: getSeverityColor(Severity), id: stringifyVdiskId(vDiskData === null || vDiskData === void 0 ? void 0 : vDiskData.VDiskId) }));
85
85
  };
86
86
  const renderControls = () => {
87
- return (_jsx("div", { children: _jsxs(ButtonWithConfirmDialog, { onConfirmAction: handleEvictVDisk, onConfirmActionSuccess: handleAfterEvictVDisk, buttonDisabled: !VDiskId, buttonView: "normal", dialogContent: vDiskPageKeyset('evict-vdisk-dialog'), children: [_jsx(Icon, { data: ArrowsOppositeToDotsIcon }), vDiskPageKeyset('evict-vdisk-button')] }) }));
87
+ return (_jsx("div", { children: _jsxs(ButtonWithConfirmDialog, { onConfirmAction: handleEvictVDisk, onConfirmActionSuccess: handleAfterEvictVDisk, buttonDisabled: !VDiskId, buttonView: "normal", dialogContent: vDiskPageKeyset('evict-vdisk-dialog'), children: [_jsx(Icon, { data: ArrowsOppositeToDots }), vDiskPageKeyset('evict-vdisk-button')] }) }));
88
88
  };
89
89
  const renderInfo = () => {
90
90
  return _jsx(VDiskInfo, { data: vDiskData, isVDiskPage: true });
@@ -1 +1 @@
1
- export declare const vDiskPageKeyset: (key: "node" | "group" | "pdisk" | "vdisk" | "fqdn" | "evict-vdisk-button" | "evict-vdisk-dialog", params?: import("@gravity-ui/i18n").Params | undefined) => string;
1
+ export declare const vDiskPageKeyset: (key: "node" | "fqdn" | "group" | "pdisk" | "vdisk" | "evict-vdisk-button" | "evict-vdisk-dialog", params?: import("@gravity-ui/i18n").Params | undefined) => string;
package/dist/routes.d.ts CHANGED
@@ -20,7 +20,7 @@ declare const routes: {
20
20
  };
21
21
  export default routes;
22
22
  export declare const parseQuery: (location: Location) => qs.ParsedQs;
23
- export type Query = Record<string | number, string | number | string[] | number[] | undefined>;
23
+ export type Query = Record<string | number, string | number | string[] | number[] | undefined | null>;
24
24
  export declare function createHref(route: string, params?: Record<string, string | number>, query?: Query): string;
25
25
  export declare const createExternalUILink: (query?: {}) => string;
26
26
  export declare function getLocationObjectFromHref(href: string): {
@@ -1,6 +1,23 @@
1
1
  export type SettingsObject = Record<string, unknown>;
2
2
  /** User settings keys and their default values */
3
- export declare const DEFAULT_USER_SETTINGS: SettingsObject;
3
+ export declare const DEFAULT_USER_SETTINGS: {
4
+ readonly theme: "system";
5
+ readonly language: undefined;
6
+ readonly invertedDisks: false;
7
+ readonly useNodesEndpointInDiagnostics: false;
8
+ readonly queryUseMultiSchema: false;
9
+ readonly binaryDataInPlainTextDisplay: true;
10
+ readonly saved_queries: readonly [];
11
+ readonly saved_tenant_initial_tab: "query";
12
+ readonly query_initial_mode: "script";
13
+ readonly last_used_query_action: "execute";
14
+ readonly asideHeaderCompact: true;
15
+ readonly partitionsHiddenColumns: readonly [];
16
+ readonly useBackendParamsForTables: false;
17
+ readonly useClusterBalancerAsBacked: true;
18
+ readonly enableAutocomplete: false;
19
+ readonly autocompleteOnEnter: true;
20
+ };
4
21
  declare class SettingsManager {
5
22
  /**
6
23
  * Returns parsed settings value.
@@ -8,10 +8,8 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
8
8
  aRootReducer?: Reducer<{
9
9
  api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
10
10
  singleClusterMode: boolean;
11
- nodes: import("./reducers/nodes/types").NodesState;
12
11
  cluster: import("./reducers/cluster/types").ClusterState;
13
12
  tenant: import("./reducers/tenant/types").TenantState;
14
- storage: import("./reducers/storage/types").StorageState;
15
13
  tooltip: import("../types/store/tooltip").ITooltipState;
16
14
  tablets: import("../types/store/tablets").TabletsState;
17
15
  schema: import("./reducers/schema/types").SchemaState;
@@ -71,10 +69,8 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
71
69
  }, any, Partial<{
72
70
  api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api"> | undefined;
73
71
  singleClusterMode: boolean | undefined;
74
- nodes: import("./reducers/nodes/types").NodesState | undefined;
75
72
  cluster: import("./reducers/cluster/types").ClusterState | undefined;
76
73
  tenant: import("./reducers/tenant/types").TenantState | undefined;
77
- storage: import("./reducers/storage/types").StorageState | undefined;
78
74
  tooltip: never;
79
75
  tablets: import("../types/store/tablets").TabletsState | undefined;
80
76
  schema: never;
@@ -109,10 +105,8 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
109
105
  store: import("@reduxjs/toolkit").EnhancedStore<{
110
106
  api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
111
107
  singleClusterMode: boolean;
112
- nodes: import("./reducers/nodes/types").NodesState;
113
108
  cluster: import("./reducers/cluster/types").ClusterState;
114
109
  tenant: import("./reducers/tenant/types").TenantState;
115
- storage: import("./reducers/storage/types").StorageState;
116
110
  tooltip: import("../types/store/tooltip").ITooltipState;
117
111
  tablets: import("../types/store/tablets").TabletsState;
118
112
  schema: import("./reducers/schema/types").SchemaState;
@@ -173,10 +167,8 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
173
167
  dispatch: import("redux-thunk").ThunkDispatch<{
174
168
  api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
175
169
  singleClusterMode: boolean;
176
- nodes: import("./reducers/nodes/types").NodesState;
177
170
  cluster: import("./reducers/cluster/types").ClusterState;
178
171
  tenant: import("./reducers/tenant/types").TenantState;
179
- storage: import("./reducers/storage/types").StorageState;
180
172
  tooltip: import("../types/store/tooltip").ITooltipState;
181
173
  tablets: import("../types/store/tablets").TabletsState;
182
174
  schema: import("./reducers/schema/types").SchemaState;
@@ -1,10 +1,8 @@
1
1
  export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
2
2
  api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
3
3
  singleClusterMode: boolean;
4
- nodes: import("./reducers/nodes/types").NodesState;
5
4
  cluster: import("./reducers/cluster/types").ClusterState;
6
5
  tenant: import("./reducers/tenant/types").TenantState;
7
- storage: import("./reducers/storage/types").StorageState;
8
6
  tooltip: import("../types/store/tooltip").ITooltipState;
9
7
  tablets: import("../types/store/tablets").TabletsState;
10
8
  schema: import("./reducers/schema/types").SchemaState;
@@ -65,10 +63,8 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
65
63
  dispatch: import("redux-thunk").ThunkDispatch<{
66
64
  api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
67
65
  singleClusterMode: boolean;
68
- nodes: import("./reducers/nodes/types").NodesState;
69
66
  cluster: import("./reducers/cluster/types").ClusterState;
70
67
  tenant: import("./reducers/tenant/types").TenantState;
71
- storage: import("./reducers/storage/types").StorageState;
72
68
  tooltip: import("../types/store/tooltip").ITooltipState;
73
69
  tablets: import("../types/store/tablets").TabletsState;
74
70
  schema: import("./reducers/schema/types").SchemaState;
@@ -19,10 +19,8 @@ declare const authentication: Reducer<AuthenticationState, AuthenticationAction>
19
19
  export declare const authenticate: (user: string, password: string) => (dispatch: import("redux").Dispatch<import("redux").UnknownAction>, getState: () => {
20
20
  api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
21
21
  singleClusterMode: boolean;
22
- nodes: import("../nodes/types").NodesState;
23
22
  cluster: import("../cluster/types").ClusterState;
24
23
  tenant: import("../tenant/types").TenantState;
25
- storage: import("../storage/types").StorageState;
26
24
  tooltip: import("../../../types/store/tooltip").ITooltipState;
27
25
  tablets: import("../../../types/store/tablets").TabletsState;
28
26
  schema: import("../schema/types").SchemaState;
@@ -83,10 +81,8 @@ export declare const authenticate: (user: string, password: string) => (dispatch
83
81
  export declare const logout: () => (dispatch: import("redux").Dispatch<import("redux").UnknownAction>, getState: () => {
84
82
  api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
85
83
  singleClusterMode: boolean;
86
- nodes: import("../nodes/types").NodesState;
87
84
  cluster: import("../cluster/types").ClusterState;
88
85
  tenant: import("../tenant/types").TenantState;
89
- storage: import("../storage/types").StorageState;
90
86
  tooltip: import("../../../types/store/tooltip").ITooltipState;
91
87
  tablets: import("../../../types/store/tablets").TabletsState;
92
88
  schema: import("../schema/types").SchemaState;
@@ -147,10 +143,8 @@ export declare const logout: () => (dispatch: import("redux").Dispatch<import("r
147
143
  export declare const getUser: () => (dispatch: import("redux").Dispatch<import("redux").UnknownAction>, getState: () => {
148
144
  api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
149
145
  singleClusterMode: boolean;
150
- nodes: import("../nodes/types").NodesState;
151
146
  cluster: import("../cluster/types").ClusterState;
152
147
  tenant: import("../tenant/types").TenantState;
153
- storage: import("../storage/types").StorageState;
154
148
  tooltip: import("../../../types/store/tooltip").ITooltipState;
155
149
  tablets: import("../../../types/store/tablets").TabletsState;
156
150
  schema: import("../schema/types").SchemaState;
@@ -15,10 +15,8 @@ interface SendQueryParams extends QueryRequestParams {
15
15
  export declare const sendExecuteQuery: ({ query, database, mode, schema }: SendQueryParams) => (dispatch: import("redux").Dispatch<import("redux").UnknownAction>, getState: () => {
16
16
  api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
17
17
  singleClusterMode: boolean;
18
- nodes: import("./nodes/types").NodesState;
19
18
  cluster: import("./cluster/types").ClusterState;
20
19
  tenant: import("./tenant/types").TenantState;
21
- storage: import("./storage/types").StorageState;
22
20
  tooltip: import("../../types/store/tooltip").ITooltipState;
23
21
  tablets: import("../../types/store/tablets").TabletsState;
24
22
  schema: import("./schema/types").SchemaState;
@@ -15,10 +15,8 @@ declare const explainQuery: Reducer<ExplainQueryState, ExplainQueryAction>;
15
15
  export declare const getExplainQueryAst: ({ query, database }: QueryRequestParams) => (dispatch: import("redux").Dispatch<import("redux").UnknownAction>, getState: () => {
16
16
  api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
17
17
  singleClusterMode: boolean;
18
- nodes: import("./nodes/types").NodesState;
19
18
  cluster: import("./cluster/types").ClusterState;
20
19
  tenant: import("./tenant/types").TenantState;
21
- storage: import("./storage/types").StorageState;
22
20
  tooltip: import("../../types/store/tooltip").ITooltipState;
23
21
  tablets: import("../../types/store/tablets").TabletsState;
24
22
  schema: import("./schema/types").SchemaState;
@@ -85,10 +83,8 @@ interface ExplainQueryParams extends QueryRequestParams {
85
83
  export declare const getExplainQuery: ({ query, database, mode }: ExplainQueryParams) => (dispatch: import("redux").Dispatch<import("redux").UnknownAction>, getState: () => {
86
84
  api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
87
85
  singleClusterMode: boolean;
88
- nodes: import("./nodes/types").NodesState;
89
86
  cluster: import("./cluster/types").ClusterState;
90
87
  tenant: import("./tenant/types").TenantState;
91
- storage: import("./storage/types").StorageState;
92
88
  tooltip: import("../../types/store/tooltip").ITooltipState;
93
89
  tablets: import("../../types/store/tablets").TabletsState;
94
90
  schema: import("./schema/types").SchemaState;