ydb-embedded-ui 1.8.1 → 1.8.2
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.
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [1.8.2](https://github.com/ydb-platform/ydb-embedded-ui/compare/v1.8.1...v1.8.2) (2022-07-07)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* **Tenant:** 3 tabs for indexes ([9280384](https://github.com/ydb-platform/ydb-embedded-ui/commit/9280384733938c4bd269bf6f9adf23efb552c6e8))
|
9
|
+
* **Tenant:** hide preview button for index tables ([a25e0ea](https://github.com/ydb-platform/ydb-embedded-ui/commit/a25e0ea0413277e27c54d123e2be7a15b8a2aaa4))
|
10
|
+
|
3
11
|
## [1.8.1](https://github.com/ydb-platform/ydb-embedded-ui/compare/v1.8.0...v1.8.1) (2022-07-06)
|
4
12
|
|
5
13
|
|
@@ -76,8 +76,6 @@ export const TABLE_PAGES = [overview, topShards, graph, tablets, hotKeys, descri
|
|
76
76
|
|
77
77
|
export const DIR_PAGES = [overview, topShards, describe];
|
78
78
|
|
79
|
-
export const INDEX_PAGES = [overview];
|
80
|
-
|
81
79
|
export const getPagesByType = (type?: EPathType) => {
|
82
80
|
switch (type) {
|
83
81
|
case EPathType.EPathTypeColumnStore:
|
@@ -86,9 +84,8 @@ export const getPagesByType = (type?: EPathType) => {
|
|
86
84
|
case EPathType.EPathTypeColumnTable:
|
87
85
|
case EPathType.EPathTypeTable:
|
88
86
|
return TABLE_PAGES;
|
89
|
-
case EPathType.EPathTypeTableIndex:
|
90
|
-
return INDEX_PAGES;
|
91
87
|
case EPathType.EPathTypeDir:
|
88
|
+
case EPathType.EPathTypeTableIndex:
|
92
89
|
default:
|
93
90
|
return DIR_PAGES;
|
94
91
|
}
|
@@ -16,8 +16,8 @@ import CopyToClipboard from '../../../components/CopyToClipboard/CopyToClipboard
|
|
16
16
|
import InfoViewer from '../../../components/InfoViewer/InfoViewer';
|
17
17
|
import Icon from '../../../components/Icon/Icon';
|
18
18
|
|
19
|
-
import type {EPathType} from '../../../types/api/schema';
|
20
|
-
import {isColumnEntityType, isTableType} from '../utils/schema';
|
19
|
+
import type {EPathSubType, EPathType} from '../../../types/api/schema';
|
20
|
+
import {isColumnEntityType, isIndexTable, isTableType} from '../utils/schema';
|
21
21
|
|
22
22
|
import {
|
23
23
|
DEFAULT_IS_TENANT_COMMON_INFO_COLLAPSED,
|
@@ -71,6 +71,7 @@ function prepareOlapTableSchema(tableSchema: any) {
|
|
71
71
|
|
72
72
|
interface ObjectSummaryProps {
|
73
73
|
type?: EPathType;
|
74
|
+
subType?: EPathSubType;
|
74
75
|
onCollapseSummary: VoidFunction;
|
75
76
|
onExpandSummary: VoidFunction;
|
76
77
|
isCollapsed: boolean;
|
@@ -229,10 +230,10 @@ function ObjectSummary(props: ObjectSummaryProps) {
|
|
229
230
|
};
|
230
231
|
|
231
232
|
const renderCommonInfoControls = () => {
|
232
|
-
const
|
233
|
+
const showPreview = isTableType(props.type) && !isIndexTable(props.subType);
|
233
234
|
return (
|
234
235
|
<React.Fragment>
|
235
|
-
{
|
236
|
+
{showPreview && (
|
236
237
|
<Button view="flat-secondary" onClick={onOpenPreview} title="Show preview">
|
237
238
|
<Icon name="tablePreview" viewBox={'0 0 16 16'} height={16} width={16} />
|
238
239
|
</Button>
|
@@ -104,7 +104,10 @@ function Tenant(props: TenantProps) {
|
|
104
104
|
};
|
105
105
|
}, [tenantName, dispatch]);
|
106
106
|
|
107
|
-
const
|
107
|
+
const {
|
108
|
+
PathType: currentPathType,
|
109
|
+
PathSubType: currentPathSubType,
|
110
|
+
} = (currentItem as TEvDescribeSchemeResult).PathDescription?.Self || {};
|
108
111
|
|
109
112
|
const onCollapseSummaryHandler = () => {
|
110
113
|
dispatchSummaryVisibilityAction(PaneVisibilityActionTypes.triggerCollapse);
|
@@ -138,6 +141,7 @@ function Tenant(props: TenantProps) {
|
|
138
141
|
>
|
139
142
|
<ObjectSummary
|
140
143
|
type={currentPathType}
|
144
|
+
subType={currentPathSubType}
|
141
145
|
onCollapseSummary={onCollapseSummaryHandler}
|
142
146
|
onExpandSummary={onExpandSummaryHandler}
|
143
147
|
isCollapsed={summaryVisibilityState.collapsed}
|
@@ -35,6 +35,9 @@ export const mapPathTypeToNavigationTreeType = (
|
|
35
35
|
export const isTableType = (type?: EPathType) =>
|
36
36
|
mapPathTypeToNavigationTreeType(type) === 'table';
|
37
37
|
|
38
|
+
export const isIndexTable = (subType?: EPathSubType) =>
|
39
|
+
mapTablePathSubTypeToNavigationTreeType(subType) === 'index_table';
|
40
|
+
|
38
41
|
export const isColumnEntityType = (type?: EPathType) =>
|
39
42
|
type === EPathType.EPathTypeColumnStore ||
|
40
43
|
type === EPathType.EPathTypeColumnTable;
|