ydb-embedded-ui 1.6.3 → 1.6.4
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 +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.tsx +1 -1
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.tsx +1 -1
- package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.tsx +6 -5
- package/dist/containers/Tenant/Tenant.tsx +2 -2
- package/dist/containers/Tenant/utils/schema.ts +17 -14
- package/dist/services/api.d.ts +7 -1
- package/dist/types/api/schema.ts +118 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [1.6.4](https://github.com/ydb-platform/ydb-embedded-ui/compare/v1.6.3...v1.6.4) (2022-06-24)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* **Tenant:** properly display ColumnTables ([14d1e07](https://github.com/ydb-platform/ydb-embedded-ui/commit/14d1e074bf615be50f4f466d25e605b418f22b47))
|
9
|
+
|
3
10
|
## [1.6.3](https://github.com/ydb-platform/ydb-embedded-ui/compare/v1.6.2...v1.6.3) (2022-06-22)
|
4
11
|
|
5
12
|
|
@@ -95,7 +95,7 @@ function Overview(props: OverviewProps) {
|
|
95
95
|
}, [autorefresh]);
|
96
96
|
|
97
97
|
const tableSchema =
|
98
|
-
currentItem?.PathDescription?.Table || currentItem?.PathDescription?.
|
98
|
+
currentItem?.PathDescription?.Table || currentItem?.PathDescription?.ColumnTableDescription;
|
99
99
|
|
100
100
|
const schemaData = useMemo(() => {
|
101
101
|
return props.type === OLAP_TABLE_TYPE
|
@@ -102,7 +102,7 @@ function ObjectSummary(props: ObjectSummaryProps) {
|
|
102
102
|
const currentSchemaData = _.get(data[currentSchemaPath], 'PathDescription.Self');
|
103
103
|
|
104
104
|
const tableSchema =
|
105
|
-
currentItem?.PathDescription?.Table || currentItem?.PathDescription?.
|
105
|
+
currentItem?.PathDescription?.Table || currentItem?.PathDescription?.ColumnTableDescription;
|
106
106
|
|
107
107
|
const schema =
|
108
108
|
props.type === OLAP_TABLE_TYPE ? prepareOlapTableSchema(tableSchema) : tableSchema;
|
@@ -5,14 +5,15 @@ import {NavigationTree} from 'ydb-ui-components';
|
|
5
5
|
import {setCurrentSchemaPath, getSchema} from '../../../../store/reducers/schema';
|
6
6
|
import {getDescribe} from '../../../../store/reducers/describe';
|
7
7
|
import {getSchemaAcl} from '../../../../store/reducers/schemaAcl';
|
8
|
+
import type {EPathType} from '../../../../types/api/schema';
|
8
9
|
|
9
|
-
import {
|
10
|
+
import {mapPathTypeToNavigationTreeType} from '../../utils/schema';
|
10
11
|
import {getActions} from '../../utils/schemaActions';
|
11
12
|
|
12
13
|
interface SchemaTreeProps {
|
13
14
|
rootPath: string;
|
14
15
|
rootName: string;
|
15
|
-
rootType:
|
16
|
+
rootType: EPathType;
|
16
17
|
currentPath: string;
|
17
18
|
}
|
18
19
|
|
@@ -31,9 +32,9 @@ export function SchemaTree(props: SchemaTreeProps) {
|
|
31
32
|
{concurrentId: `NavigationTree.getSchema|${path}`},
|
32
33
|
)
|
33
34
|
.then(({PathDescription: {Children = []} = {}}) => {
|
34
|
-
return Children.map(({Name, PathType}) => ({
|
35
|
+
return Children.map(({Name = '', PathType}) => ({
|
35
36
|
name: Name,
|
36
|
-
type:
|
37
|
+
type: mapPathTypeToNavigationTreeType(PathType),
|
37
38
|
}));
|
38
39
|
});
|
39
40
|
|
@@ -49,7 +50,7 @@ export function SchemaTree(props: SchemaTreeProps) {
|
|
49
50
|
rootState={{
|
50
51
|
path: rootPath,
|
51
52
|
name: rootName,
|
52
|
-
type:
|
53
|
+
type: mapPathTypeToNavigationTreeType(rootType),
|
53
54
|
collapsed: false,
|
54
55
|
}}
|
55
56
|
fetchPath={fetchPath}
|
@@ -28,8 +28,8 @@ import './Tenant.scss';
|
|
28
28
|
const b = cn('tenant-page');
|
29
29
|
|
30
30
|
export const TABLE_TYPE = 'Table';
|
31
|
-
export const OLAP_TABLE_TYPE = '
|
32
|
-
export const OLAP_STORE_TYPE = '
|
31
|
+
export const OLAP_TABLE_TYPE = 'ColumnTable';
|
32
|
+
export const OLAP_STORE_TYPE = 'ColumnStore';
|
33
33
|
|
34
34
|
export function calcEntityType(currentPathType?: string) {
|
35
35
|
return currentPathType && currentPathType.replace('EPathType', '');
|
@@ -1,17 +1,20 @@
|
|
1
|
-
import type {NavigationTreeNodeType} from
|
1
|
+
import type {NavigationTreeNodeType} from 'ydb-ui-components';
|
2
|
+
import {EPathType} from '../../../types/api/schema';
|
2
3
|
|
3
|
-
const
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
4
|
+
export const mapPathTypeToNavigationTreeType = (
|
5
|
+
type: EPathType = EPathType.EPathTypeDir,
|
6
|
+
defaultType: NavigationTreeNodeType = 'directory'
|
7
|
+
): NavigationTreeNodeType => {
|
8
|
+
switch (type) {
|
9
|
+
case EPathType.EPathTypeSubDomain:
|
10
|
+
return 'database';
|
11
|
+
case EPathType.EPathTypeTable:
|
12
|
+
case EPathType.EPathTypeColumnTable:
|
13
|
+
return 'table';
|
14
|
+
case EPathType.EPathTypeDir:
|
15
|
+
case EPathType.EPathTypeColumnStore:
|
16
|
+
return 'directory';
|
17
|
+
default:
|
18
|
+
return defaultType;
|
14
19
|
}
|
15
|
-
|
16
|
-
return 'directory';
|
17
20
|
};
|
package/dist/services/api.d.ts
CHANGED
@@ -0,0 +1,118 @@
|
|
1
|
+
export interface TEvDescribeSchemeResult {
|
2
|
+
Status?: EStatus;
|
3
|
+
Reason?: string;
|
4
|
+
Path?: string;
|
5
|
+
PathDescription?: TPathDescription;
|
6
|
+
/** fixed64 */
|
7
|
+
PathOwner?: string;
|
8
|
+
/** fixed64 */
|
9
|
+
PathId?: string;
|
10
|
+
|
11
|
+
LastExistedPrefixPath?: string;
|
12
|
+
/** fixed64 */
|
13
|
+
LastExistedPrefixPathId?: string;
|
14
|
+
LastExistedPrefixDescription?: TPathDescription;
|
15
|
+
/** fixed64 */
|
16
|
+
PathOwnerId?: string;
|
17
|
+
}
|
18
|
+
|
19
|
+
enum EStatus {
|
20
|
+
StatusSuccess = 'StatusSuccess',
|
21
|
+
StatusAccepted = 'StatusAccepted',
|
22
|
+
StatusPathDoesNotExist = 'StatusPathDoesNotExist',
|
23
|
+
StatusPathIsNotDirectory = 'StatusPathIsNotDirectory',
|
24
|
+
StatusAlreadyExists = 'StatusAlreadyExists',
|
25
|
+
StatusSchemeError = 'StatusSchemeError',
|
26
|
+
StatusNameConflict = 'StatusNameConflict',
|
27
|
+
StatusInvalidParameter = 'StatusInvalidParameter',
|
28
|
+
StatusMultipleModifications = 'StatusMultipleModifications',
|
29
|
+
StatusReadOnly = 'StatusReadOnly',
|
30
|
+
StatusTxIdNotExists = 'StatusTxIdNotExists',
|
31
|
+
StatusTxIsNotCancellable = 'StatusTxIsNotCancellable',
|
32
|
+
StatusAccessDenied = 'StatusAccessDenied',
|
33
|
+
StatusNotAvailable = 'StatusNotAvailable',
|
34
|
+
StatusPreconditionFailed = 'StatusPreconditionFailed',
|
35
|
+
StatusRedirectDomain = 'StatusRedirectDomain',
|
36
|
+
StatusQuotaExceeded = 'StatusQuotaExceeded',
|
37
|
+
StatusResourceExhausted = 'StatusResourceExhausted',
|
38
|
+
}
|
39
|
+
|
40
|
+
// incomplete interface, only currently used fields are covered
|
41
|
+
interface TPathDescription {
|
42
|
+
/** info about the path itself */
|
43
|
+
Self?: TDirEntry;
|
44
|
+
DomainDescription?: unknown;
|
45
|
+
|
46
|
+
// for directory
|
47
|
+
Children?: TDirEntry[];
|
48
|
+
|
49
|
+
// for table
|
50
|
+
Table?: unknown;
|
51
|
+
TableStats?: unknown;
|
52
|
+
TabletMetrics?: unknown;
|
53
|
+
TablePartitions?: unknown[];
|
54
|
+
|
55
|
+
ColumnStoreDescription?: unknown;
|
56
|
+
ColumnTableDescription?: unknown;
|
57
|
+
}
|
58
|
+
|
59
|
+
interface TDirEntry {
|
60
|
+
Name?: string;
|
61
|
+
/** uint64 */
|
62
|
+
PathId?: string;
|
63
|
+
/** uint64 */
|
64
|
+
SchemeshardId?: string;
|
65
|
+
PathType?: EPathType;
|
66
|
+
CreateFinished?: boolean;
|
67
|
+
/** uint64 */
|
68
|
+
CreateTxId?: string;
|
69
|
+
/** uint64 */
|
70
|
+
CreateStep?: string;
|
71
|
+
/** uint64 */
|
72
|
+
ParentPathId?: string;
|
73
|
+
PathState?: EPathState;
|
74
|
+
Owner?: string;
|
75
|
+
ACL?: string;
|
76
|
+
EffectiveACL?: string;
|
77
|
+
/** uint64 */
|
78
|
+
PathVersion?: string;
|
79
|
+
PathSubType?: EPathSubType;
|
80
|
+
Version?: TPathVersion;
|
81
|
+
}
|
82
|
+
|
83
|
+
// incomplete
|
84
|
+
export enum EPathType {
|
85
|
+
EPathTypeInvalid = 'EPathTypeInvalid',
|
86
|
+
EPathTypeDir = 'EPathTypeDir',
|
87
|
+
EPathTypeTable = 'EPathTypeTable',
|
88
|
+
EPathTypeSubDomain = 'EPathTypeSubDomain',
|
89
|
+
EPathTypeColumnStore = 'EPathTypeColumnStore',
|
90
|
+
EPathTypeColumnTable = 'EPathTypeColumnTable',
|
91
|
+
}
|
92
|
+
|
93
|
+
enum EPathSubType {
|
94
|
+
EPathSubTypeEmpty = 'EPathSubTypeEmpty',
|
95
|
+
EPathSubTypeSyncIndexImplTable = 'EPathSubTypeSyncIndexImplTable',
|
96
|
+
EPathSubTypeAsyncIndexImplTable = 'EPathSubTypeAsyncIndexImplTable',
|
97
|
+
EPathSubTypeStreamImpl = 'EPathSubTypeStreamImpl',
|
98
|
+
}
|
99
|
+
|
100
|
+
enum EPathState {
|
101
|
+
EPathStateNotExist = 'EPathStateNotExist',
|
102
|
+
EPathStateNoChanges = 'EPathStateNoChanges',
|
103
|
+
EPathStateCreate = 'EPathStateCreate',
|
104
|
+
EPathStateAlter = 'EPathStateAlter',
|
105
|
+
EPathStateDrop = 'EPathStateDrop',
|
106
|
+
EPathStateCopying = 'EPathStateCopying',
|
107
|
+
EPathStateBackup = 'EPathStateBackup',
|
108
|
+
EPathStateUpgrade = 'EPathStateUpgrade',
|
109
|
+
EPathStateMigrated = 'EPathStateMigrated',
|
110
|
+
EPathStateRestore = 'EPathStateRestore',
|
111
|
+
EPathStateMoving = 'EPathStateMoving',
|
112
|
+
}
|
113
|
+
|
114
|
+
// incomplete
|
115
|
+
interface TPathVersion {
|
116
|
+
/** uint64 */
|
117
|
+
GeneralVersion?: string;
|
118
|
+
}
|