ydb-embedded-ui 4.10.1 → 4.11.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +17 -0
- package/dist/components/QueryResultTable/Cell/Cell.tsx +8 -8
- package/dist/components/QueryResultTable/i18n/en.json +1 -1
- package/dist/components/QueryResultTable/i18n/ru.json +1 -1
- package/dist/components/ShortyString/ShortyString.tsx +3 -6
- package/dist/components/ShortyString/i18n/en.json +8 -8
- package/dist/components/ShortyString/i18n/ru.json +8 -8
- package/dist/components/SpeedMultiMeter/i18n/index.ts +0 -2
- package/dist/components/Stack/Stack.tsx +16 -16
- package/dist/components/TableSkeleton/TableSkeleton.tsx +3 -3
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.tsx +7 -3
- package/dist/containers/Header/Header.tsx +2 -2
- package/dist/containers/Header/breadcrumbs.ts +2 -1
- package/dist/containers/Heatmap/Heatmap.tsx +4 -3
- package/dist/containers/Node/NodeStructure/PDiskTitleBadge.tsx +2 -8
- package/dist/containers/Nodes/Nodes.tsx +1 -1
- package/dist/containers/Storage/EmptyFilter/i18n/en.json +2 -2
- package/dist/containers/Storage/EmptyFilter/i18n/ru.json +2 -2
- package/dist/containers/Storage/StorageGroups/i18n/en.json +5 -5
- package/dist/containers/Storage/StorageGroups/i18n/ru.json +5 -5
- package/dist/containers/Storage/UsageFilter/i18n/en.json +3 -8
- package/dist/containers/Storage/UsageFilter/i18n/ru.json +3 -8
- package/dist/containers/Tablet/Tablet.tsx +2 -2
- package/dist/containers/Tenant/Acl/Acl.scss +1 -9
- package/dist/containers/Tenant/Acl/Acl.tsx +137 -0
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.tsx +2 -2
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.ts +6 -0
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +3 -3
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.tsx +2 -0
- package/dist/containers/Tenant/Diagnostics/Overview/utils/prepareTopicSchemaInfo.ts +2 -3
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.scss +0 -6
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.tsx +95 -83
- package/dist/containers/Tenant/Query/Issues/Issues.tsx +27 -23
- package/dist/containers/Tenant/Query/Issues/models.ts +0 -11
- package/dist/containers/Tenant/Query/Preview/Preview.tsx +3 -3
- package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.tsx +2 -2
- package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.tsx +99 -0
- package/dist/containers/Tenant/Tenant.tsx +1 -5
- package/dist/containers/Tenant/TenantPages.tsx +9 -14
- package/dist/containers/Tenant/i18n/en.json +11 -0
- package/dist/containers/Tenant/i18n/index.ts +11 -0
- package/dist/containers/Tenant/i18n/ru.json +11 -0
- package/dist/containers/Tenant/utils/schema.ts +24 -0
- package/dist/containers/Tenant/utils/schemaActions.ts +28 -24
- package/dist/containers/Tenants/Tenants.tsx +1 -4
- package/dist/services/api.ts +6 -7
- package/dist/store/index.js +1 -1
- package/dist/store/reducers/nodes/nodes.ts +14 -5
- package/dist/store/reducers/nodes/types.ts +22 -3
- package/dist/store/reducers/nodes/utils.ts +23 -10
- package/dist/store/reducers/preview.ts +6 -4
- package/dist/store/reducers/schemaAcl/schemaAcl.ts +17 -0
- package/dist/store/reducers/schemaAcl/types.ts +9 -7
- package/dist/store/reducers/tenant/constants.ts +6 -0
- package/dist/store/reducers/tenant/tenant.ts +15 -0
- package/dist/store/reducers/tenant/types.ts +18 -3
- package/dist/store/state-url-mapping.js +3 -0
- package/dist/types/api/cluster.ts +1 -1
- package/dist/types/api/compute.ts +11 -11
- package/dist/types/api/error.ts +2 -2
- package/dist/types/api/netInfo.ts +3 -3
- package/dist/types/api/nodes.ts +9 -8
- package/dist/types/api/query.ts +1 -1
- package/dist/types/api/schema/schema.ts +3 -0
- package/dist/types/api/schema/shared.ts +3 -3
- package/dist/types/api/schema/table.ts +22 -22
- package/dist/types/api/storage.ts +1 -1
- package/dist/types/assets.d.ts +1 -2
- package/dist/types/store/executeQuery.ts +2 -3
- package/dist/types/store/executeTopQueries.ts +8 -5
- package/dist/types/store/explainQuery.ts +4 -4
- package/dist/types/store/query.ts +4 -3
- package/dist/types/store/shardsWorkload.ts +8 -5
- package/dist/utils/constants.ts +4 -1
- package/dist/utils/error.ts +2 -3
- package/dist/utils/query.ts +3 -9
- package/dist/utils/tests/providers.tsx +6 -9
- package/package.json +6 -2
- package/dist/containers/Tenant/Acl/Acl.js +0 -153
- package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +0 -94
@@ -7,6 +7,7 @@ import type {
|
|
7
7
|
TenantPage,
|
8
8
|
TenantQueryTab,
|
9
9
|
TenantState,
|
10
|
+
TenantSummaryTab,
|
10
11
|
} from './types';
|
11
12
|
|
12
13
|
import '../../../services/api';
|
@@ -17,6 +18,7 @@ export const FETCH_TENANT = createRequestActionTypes('tenant', 'FETCH_TENANT');
|
|
17
18
|
const SET_TOP_LEVEL_TAB = 'tenant/SET_TOP_LEVEL_TAB';
|
18
19
|
const SET_QUERY_TAB = 'tenant/SET_QUERY_TAB';
|
19
20
|
const SET_DIAGNOSTICS_TAB = 'tenant/SET_DIAGNOSTICS_TAB';
|
21
|
+
const SET_SUMMARY_TAB = 'tenant/SET_SUMMARY_TAB';
|
20
22
|
const CLEAR_TENANT = 'tenant/CLEAR_TENANT';
|
21
23
|
|
22
24
|
const initialState = {loading: false, wasLoaded: false};
|
@@ -75,6 +77,12 @@ const tenantReducer: Reducer<TenantState, TenantAction> = (state = initialState,
|
|
75
77
|
diagnosticsTab: action.data,
|
76
78
|
};
|
77
79
|
}
|
80
|
+
case SET_SUMMARY_TAB: {
|
81
|
+
return {
|
82
|
+
...state,
|
83
|
+
summaryTab: action.data,
|
84
|
+
};
|
85
|
+
}
|
78
86
|
|
79
87
|
default:
|
80
88
|
return state;
|
@@ -116,4 +124,11 @@ export function setDiagnosticsTab(tab: TenantDiagnosticsTab) {
|
|
116
124
|
} as const;
|
117
125
|
}
|
118
126
|
|
127
|
+
export function setSummaryTab(tab: TenantSummaryTab) {
|
128
|
+
return {
|
129
|
+
type: SET_SUMMARY_TAB,
|
130
|
+
data: tab,
|
131
|
+
} as const;
|
132
|
+
}
|
133
|
+
|
119
134
|
export default tenantReducer;
|
@@ -3,13 +3,26 @@ import type {TTenant} from '../../../types/api/tenant';
|
|
3
3
|
import type {ValueOf} from '../../../types/common';
|
4
4
|
import type {ApiRequestAction} from '../../utils';
|
5
5
|
|
6
|
-
import {
|
7
|
-
|
6
|
+
import {
|
7
|
+
TENANT_QUERY_TABS_ID,
|
8
|
+
TENANT_DIAGNOSTICS_TABS_IDS,
|
9
|
+
TENANT_PAGES_IDS,
|
10
|
+
TENANT_SUMMARY_TABS_IDS,
|
11
|
+
} from './constants';
|
12
|
+
import {
|
13
|
+
FETCH_TENANT,
|
14
|
+
clearTenant,
|
15
|
+
setDiagnosticsTab,
|
16
|
+
setQueryTab,
|
17
|
+
setSummaryTab,
|
18
|
+
setTenantPage,
|
19
|
+
} from './tenant';
|
8
20
|
|
9
21
|
export type TenantPage = ValueOf<typeof TENANT_PAGES_IDS>;
|
10
22
|
|
11
23
|
export type TenantQueryTab = ValueOf<typeof TENANT_QUERY_TABS_ID>;
|
12
24
|
export type TenantDiagnosticsTab = ValueOf<typeof TENANT_DIAGNOSTICS_TABS_IDS>;
|
25
|
+
export type TenantSummaryTab = ValueOf<typeof TENANT_SUMMARY_TABS_IDS>;
|
13
26
|
|
14
27
|
export interface TenantState {
|
15
28
|
loading: boolean;
|
@@ -17,6 +30,7 @@ export interface TenantState {
|
|
17
30
|
tenantPage?: TenantPage;
|
18
31
|
queryTab?: TenantQueryTab;
|
19
32
|
diagnosticsTab?: TenantDiagnosticsTab;
|
33
|
+
summaryTab?: TenantSummaryTab;
|
20
34
|
tenant?: TTenant;
|
21
35
|
error?: IResponseError;
|
22
36
|
}
|
@@ -26,4 +40,5 @@ export type TenantAction =
|
|
26
40
|
| ReturnType<typeof clearTenant>
|
27
41
|
| ReturnType<typeof setTenantPage>
|
28
42
|
| ReturnType<typeof setQueryTab>
|
29
|
-
| ReturnType<typeof setDiagnosticsTab
|
43
|
+
| ReturnType<typeof setDiagnosticsTab>
|
44
|
+
| ReturnType<typeof setSummaryTab>;
|
@@ -62,18 +62,18 @@ export interface TTabletStateInfo {
|
|
62
62
|
}
|
63
63
|
|
64
64
|
export enum EVersion {
|
65
|
-
v1,
|
66
|
-
v2, // only this versions works with sorting
|
65
|
+
v1 = 'v1',
|
66
|
+
v2 = 'v2', // only this versions works with sorting
|
67
67
|
}
|
68
68
|
|
69
69
|
export enum ESort {
|
70
|
-
NodeId,
|
71
|
-
Host,
|
72
|
-
DC,
|
73
|
-
Rack,
|
74
|
-
Version,
|
75
|
-
Uptime,
|
76
|
-
Memory,
|
77
|
-
CPU,
|
78
|
-
LoadAverage,
|
70
|
+
NodeId = 'NodeId',
|
71
|
+
Host = 'Host',
|
72
|
+
DC = 'DC',
|
73
|
+
Rack = 'Rack',
|
74
|
+
Version = 'Version',
|
75
|
+
Uptime = 'Uptime',
|
76
|
+
Memory = 'Memory',
|
77
|
+
CPU = 'CPU',
|
78
|
+
LoadAverage = 'LoadAverage',
|
79
79
|
}
|
package/dist/types/api/error.ts
CHANGED
package/dist/types/api/nodes.ts
CHANGED
@@ -103,12 +103,13 @@ enum EConfigState {
|
|
103
103
|
}
|
104
104
|
|
105
105
|
export enum ESort {
|
106
|
-
NodeId,
|
107
|
-
Host,
|
108
|
-
DC,
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
106
|
+
NodeId = 'NodeId',
|
107
|
+
Host = 'Host',
|
108
|
+
DC = 'DC',
|
109
|
+
Rack = 'Rack',
|
110
|
+
Version = 'Version',
|
111
|
+
Uptime = 'Uptime',
|
112
|
+
Memory = 'Memory',
|
113
|
+
CPU = 'CPU',
|
114
|
+
LoadAverage = 'LoadAverage',
|
114
115
|
}
|
package/dist/types/api/query.ts
CHANGED
@@ -260,6 +260,9 @@ export enum EPathType {
|
|
260
260
|
EPathTypeColumnStore = 'EPathTypeColumnStore',
|
261
261
|
EPathTypeColumnTable = 'EPathTypeColumnTable',
|
262
262
|
EPathTypeCdcStream = 'EPathTypeCdcStream',
|
263
|
+
|
264
|
+
EPathTypeExternalDataSource = 'EPathTypeExternalDataSource',
|
265
|
+
EPathTypeExternalTable = 'EPathTypeExternalTable',
|
263
266
|
}
|
264
267
|
|
265
268
|
export enum EPathSubType {
|
@@ -28,9 +28,9 @@ export interface TColumnDescription {
|
|
28
28
|
}
|
29
29
|
|
30
30
|
export enum EColumnCodec {
|
31
|
-
ColumnCodecPlain,
|
32
|
-
ColumnCodecLZ4,
|
33
|
-
ColumnCodecZSTD,
|
31
|
+
ColumnCodecPlain = 'ColumnCodecPlain',
|
32
|
+
ColumnCodecLZ4 = 'ColumnCodecLZ4',
|
33
|
+
ColumnCodecZSTD = 'ColumnCodecZSTD',
|
34
34
|
}
|
35
35
|
|
36
36
|
export enum EUnit {
|
@@ -579,38 +579,38 @@ interface TBackgroundPolicy {
|
|
579
579
|
}
|
580
580
|
|
581
581
|
enum EPurpose {
|
582
|
-
SysLog,
|
583
|
-
Log,
|
584
|
-
Data,
|
585
|
-
External,
|
582
|
+
SysLog = 'SysLog',
|
583
|
+
Log = 'Log',
|
584
|
+
Data = 'Data',
|
585
|
+
External = 'External',
|
586
586
|
}
|
587
587
|
|
588
588
|
enum EFreezeState {
|
589
|
-
Unspecified,
|
590
|
-
Freeze,
|
591
|
-
Unfreeze,
|
589
|
+
Unspecified = 'Unspecified',
|
590
|
+
Freeze = 'Freeze',
|
591
|
+
Unfreeze = 'Unfreeze',
|
592
592
|
}
|
593
593
|
|
594
594
|
enum EColumnCache {
|
595
|
-
ColumnCacheNone,
|
596
|
-
ColumnCacheOnce,
|
597
|
-
ColumnCacheEver,
|
595
|
+
ColumnCacheNone = 'ColumnCacheNone',
|
596
|
+
ColumnCacheOnce = 'ColumnCacheOnce',
|
597
|
+
ColumnCacheEver = 'ColumnCacheEver',
|
598
598
|
}
|
599
599
|
|
600
600
|
enum EColumnStorage {
|
601
|
-
ColumnStorage1,
|
602
|
-
ColumnStorage2,
|
603
|
-
ColumnStorage1Ext1,
|
604
|
-
ColumnStorage1Ext2,
|
605
|
-
ColumnStorage2Ext1,
|
606
|
-
ColumnStorage2Ext2,
|
607
|
-
ColumnStorage1Med2Ext2,
|
608
|
-
ColumnStorage2Med2Ext2,
|
609
|
-
ColumnStorageTest_1_2_1k,
|
601
|
+
ColumnStorage1 = 'ColumnStorage1',
|
602
|
+
ColumnStorage2 = 'ColumnStorage2',
|
603
|
+
ColumnStorage1Ext1 = 'ColumnStorage1Ext1',
|
604
|
+
ColumnStorage1Ext2 = 'ColumnStorage1Ext2',
|
605
|
+
ColumnStorage2Ext1 = 'ColumnStorage2Ext1',
|
606
|
+
ColumnStorage2Ext2 = 'ColumnStorage2Ext2',
|
607
|
+
ColumnStorage1Med2Ext2 = 'ColumnStorage1Med2Ext2',
|
608
|
+
ColumnStorage2Med2Ext2 = 'ColumnStorage2Med2Ext2',
|
609
|
+
ColumnStorageTest_1_2_1k = 'ColumnStorageTest_1_2_1k',
|
610
610
|
}
|
611
611
|
|
612
612
|
enum ECompactionStrategy {
|
613
|
-
CompactionStrategyUnset,
|
614
|
-
CompactionStrategyGenerational,
|
615
|
-
CompactionStrategySharded,
|
613
|
+
CompactionStrategyUnset = 'CompactionStrategyUnset',
|
614
|
+
CompactionStrategyGenerational = 'CompactionStrategyGenerational',
|
615
|
+
CompactionStrategySharded = 'CompactionStrategySharded',
|
616
616
|
}
|
package/dist/types/assets.d.ts
CHANGED
@@ -8,5 +8,4 @@ declare module '*.jpg';
|
|
8
8
|
declare module '*.jpeg';
|
9
9
|
declare module '*.ico';
|
10
10
|
|
11
|
-
declare type SVGIconData =
|
12
|
-
import('@gravity-ui/uikit/build/esm/components/Icon/types').SVGIconData;
|
11
|
+
declare type SVGIconData = import('@gravity-ui/uikit/build/esm/components/Icon/types').SVGIconData;
|
@@ -9,9 +9,8 @@ import {
|
|
9
9
|
MONACO_HOT_KEY_ACTIONS,
|
10
10
|
} from '../../store/reducers/executeQuery';
|
11
11
|
import type {ApiRequestAction} from '../../store/utils';
|
12
|
-
import type {ErrorResponse} from '../api/query';
|
13
12
|
import type {ValueOf} from '../common';
|
14
|
-
import type {IQueryResult, QueryError} from './query';
|
13
|
+
import type {IQueryResult, QueryError, QueryErrorResponse} from './query';
|
15
14
|
|
16
15
|
export type MonacoHotKeyAction = ValueOf<typeof MONACO_HOT_KEY_ACTIONS>;
|
17
16
|
|
@@ -26,7 +25,7 @@ export interface ExecuteQueryState {
|
|
26
25
|
tenantPath?: string;
|
27
26
|
data?: IQueryResult;
|
28
27
|
stats?: IQueryResult['stats'];
|
29
|
-
error?: string |
|
28
|
+
error?: string | QueryErrorResponse;
|
30
29
|
}
|
31
30
|
|
32
31
|
type SendQueryAction = ApiRequestAction<typeof SEND_QUERY, IQueryResult, QueryError>;
|
@@ -1,7 +1,10 @@
|
|
1
|
-
import {
|
1
|
+
import {
|
2
|
+
FETCH_TOP_QUERIES,
|
3
|
+
setTopQueriesState,
|
4
|
+
setTopQueriesFilters,
|
5
|
+
} from '../../store/reducers/executeTopQueries';
|
2
6
|
import type {ApiRequestAction} from '../../store/utils';
|
3
|
-
import type {
|
4
|
-
import type {IQueryResult} from './query';
|
7
|
+
import type {IQueryResult, QueryErrorResponse} from './query';
|
5
8
|
|
6
9
|
export interface ITopQueriesFilters {
|
7
10
|
/** ms from epoch */
|
@@ -15,12 +18,12 @@ export interface ITopQueriesState {
|
|
15
18
|
loading: boolean;
|
16
19
|
wasLoaded: boolean;
|
17
20
|
data?: IQueryResult;
|
18
|
-
error?:
|
21
|
+
error?: QueryErrorResponse;
|
19
22
|
filters: ITopQueriesFilters;
|
20
23
|
}
|
21
24
|
|
22
25
|
export type ITopQueriesAction =
|
23
|
-
| ApiRequestAction<typeof FETCH_TOP_QUERIES, IQueryResult,
|
26
|
+
| ApiRequestAction<typeof FETCH_TOP_QUERIES, IQueryResult, QueryErrorResponse>
|
24
27
|
| ReturnType<typeof setTopQueriesState>
|
25
28
|
| ReturnType<typeof setTopQueriesFilters>;
|
26
29
|
|
@@ -2,8 +2,8 @@ import type {ExplainPlanNodeData, GraphNode, Link} from '@gravity-ui/paranoid';
|
|
2
2
|
|
3
3
|
import {GET_EXPLAIN_QUERY, GET_EXPLAIN_QUERY_AST} from '../../store/reducers/explainQuery';
|
4
4
|
import type {ApiRequestAction} from '../../store/utils';
|
5
|
-
import type {PlanTable,
|
6
|
-
import type {IQueryResult, QueryError} from './query';
|
5
|
+
import type {PlanTable, QueryPlan, ScriptPlan} from '../api/query';
|
6
|
+
import type {IQueryResult, QueryError, QueryErrorResponse} from './query';
|
7
7
|
|
8
8
|
export interface PreparedExplainResponse {
|
9
9
|
plan?: {
|
@@ -20,8 +20,8 @@ export interface ExplainQueryState {
|
|
20
20
|
loading: boolean;
|
21
21
|
data?: PreparedExplainResponse['plan'];
|
22
22
|
dataAst?: PreparedExplainResponse['ast'];
|
23
|
-
error?: string |
|
24
|
-
errorAst?: string |
|
23
|
+
error?: string | QueryErrorResponse;
|
24
|
+
errorAst?: string | QueryErrorResponse;
|
25
25
|
}
|
26
26
|
|
27
27
|
type GetExplainQueryAstAction = ApiRequestAction<
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import {QUERY_ACTIONS, QUERY_MODES} from '../../utils/query';
|
2
2
|
|
3
|
-
import type {NetworkError} from '../api/error';
|
3
|
+
import type {IResponseError, NetworkError} from '../api/error';
|
4
4
|
import type {
|
5
5
|
KeyValueRow,
|
6
6
|
ColumnType,
|
7
|
-
ErrorResponse,
|
7
|
+
ErrorResponse as QueryErrorResponseData,
|
8
8
|
ScriptPlan,
|
9
9
|
QueryPlan,
|
10
10
|
TKqpStatsQuery,
|
@@ -24,7 +24,8 @@ export interface QueryRequestParams {
|
|
24
24
|
query: string;
|
25
25
|
}
|
26
26
|
|
27
|
-
export type
|
27
|
+
export type QueryErrorResponse = IResponseError<QueryErrorResponseData>;
|
28
|
+
export type QueryError = NetworkError | QueryErrorResponse;
|
28
29
|
|
29
30
|
export type QueryAction = ValueOf<typeof QUERY_ACTIONS>;
|
30
31
|
export type QueryMode = ValueOf<typeof QUERY_MODES>;
|
@@ -1,7 +1,10 @@
|
|
1
|
-
import {
|
1
|
+
import {
|
2
|
+
SEND_SHARD_QUERY,
|
3
|
+
setShardsState,
|
4
|
+
setShardsQueryFilters,
|
5
|
+
} from '../../store/reducers/shardsWorkload';
|
2
6
|
import type {ApiRequestAction} from '../../store/utils';
|
3
|
-
import type {
|
4
|
-
import type {IQueryResult} from './query';
|
7
|
+
import type {IQueryResult, QueryErrorResponse} from './query';
|
5
8
|
|
6
9
|
export enum EShardsWorkloadMode {
|
7
10
|
Immediate = 'immediate',
|
@@ -20,12 +23,12 @@ export interface IShardsWorkloadState {
|
|
20
23
|
loading: boolean;
|
21
24
|
wasLoaded: boolean;
|
22
25
|
data?: IQueryResult;
|
23
|
-
error?:
|
26
|
+
error?: QueryErrorResponse;
|
24
27
|
filters: IShardsWorkloadFilters;
|
25
28
|
}
|
26
29
|
|
27
30
|
export type IShardsWorkloadAction =
|
28
|
-
| ApiRequestAction<typeof SEND_SHARD_QUERY, IQueryResult,
|
31
|
+
| ApiRequestAction<typeof SEND_SHARD_QUERY, IQueryResult, QueryErrorResponse>
|
29
32
|
| ReturnType<typeof setShardsState>
|
30
33
|
| ReturnType<typeof setShardsQueryFilters>;
|
31
34
|
|
package/dist/utils/constants.ts
CHANGED
@@ -75,8 +75,11 @@ export const COLORS_PRIORITY = {
|
|
75
75
|
grey: 1,
|
76
76
|
};
|
77
77
|
|
78
|
-
|
78
|
+
// ==== Titles ====
|
79
|
+
export const DEVELOPER_UI_TITLE = 'Developer UI';
|
80
|
+
export const CLUSTER_DEFAULT_TITLE = 'Cluster';
|
79
81
|
|
82
|
+
// ==== Settings ====
|
80
83
|
export const THEME_KEY = 'theme';
|
81
84
|
export const INVERTED_DISKS_KEY = 'invertedDisks';
|
82
85
|
export const USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY = 'useNodesEndpointInDiagnostics';
|
package/dist/utils/error.ts
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
import type {AxiosError} from 'axios';
|
2
2
|
|
3
3
|
import type {IResponseError, NetworkError} from '../types/api/error';
|
4
|
-
import type {
|
5
|
-
import type {QueryError} from '../types/store/query';
|
4
|
+
import type {QueryError, QueryErrorResponse} from '../types/store/query';
|
6
5
|
|
7
|
-
type RequestError = NetworkError | IResponseError | AxiosError |
|
6
|
+
type RequestError = NetworkError | IResponseError | AxiosError | unknown;
|
8
7
|
|
9
8
|
const isNetworkError = (error: RequestError): error is NetworkError => {
|
10
9
|
return Boolean(
|
package/dist/utils/query.ts
CHANGED
@@ -7,7 +7,7 @@ import type {
|
|
7
7
|
QueryPlan,
|
8
8
|
ScriptPlan,
|
9
9
|
} from '../types/api/query';
|
10
|
-
import type {IQueryResult} from '../types/store/query';
|
10
|
+
import type {IQueryResult, QueryErrorResponse} from '../types/store/query';
|
11
11
|
|
12
12
|
export const QUERY_ACTIONS = {
|
13
13
|
execute: 'execute',
|
@@ -169,12 +169,6 @@ export const prepareQueryResponse = (data?: KeyValueRow[]) => {
|
|
169
169
|
});
|
170
170
|
};
|
171
171
|
|
172
|
-
export function prepareQueryError(error:
|
173
|
-
return
|
174
|
-
error.data?.error?.message ||
|
175
|
-
error.message ||
|
176
|
-
error.data ||
|
177
|
-
error.statusText ||
|
178
|
-
JSON.stringify(error)
|
179
|
-
);
|
172
|
+
export function prepareQueryError(error: QueryErrorResponse) {
|
173
|
+
return error.data?.error?.message || error.statusText;
|
180
174
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, {PropsWithChildren} from 'react';
|
2
|
-
import {Provider} from 'react-redux'
|
3
|
-
import {render} from '@testing-library/react'
|
4
|
-
import type {RenderOptions} from '@testing-library/react'
|
2
|
+
import {Provider} from 'react-redux';
|
3
|
+
import {render} from '@testing-library/react';
|
4
|
+
import type {RenderOptions} from '@testing-library/react';
|
5
5
|
|
6
6
|
import configureStore from '../../store';
|
7
7
|
|
@@ -14,16 +14,13 @@ interface ExtendedRenderOptions extends Omit<RenderOptions, 'queries'> {
|
|
14
14
|
|
15
15
|
export const renderWithStore = (
|
16
16
|
ui: React.ReactElement,
|
17
|
-
{
|
18
|
-
storeConfiguration = configureStore(),
|
19
|
-
...renderOptions
|
20
|
-
}: ExtendedRenderOptions = {}
|
17
|
+
{storeConfiguration = configureStore(), ...renderOptions}: ExtendedRenderOptions = {},
|
21
18
|
) => {
|
22
19
|
const {store} = storeConfiguration;
|
23
20
|
|
24
21
|
function Wrapper({children}: PropsWithChildren<{}>) {
|
25
|
-
return <Provider store={store}>{children}</Provider
|
22
|
+
return <Provider store={store}>{children}</Provider>;
|
26
23
|
}
|
27
24
|
|
28
|
-
return {store, ...render(ui, {wrapper: Wrapper, ...renderOptions})}
|
25
|
+
return {store, ...render(ui, {wrapper: Wrapper, ...renderOptions})};
|
29
26
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ydb-embedded-ui",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.11.0",
|
4
4
|
"files": [
|
5
5
|
"dist"
|
6
6
|
],
|
@@ -17,6 +17,7 @@
|
|
17
17
|
"@gravity-ui/react-data-table": "^1.0.3",
|
18
18
|
"axios": "0.19.2",
|
19
19
|
"bem-cn-lite": "4.0.0",
|
20
|
+
"copy-to-clipboard": "^3.3.3",
|
20
21
|
"history": "4.10.1",
|
21
22
|
"js-cookie": "2.2.1",
|
22
23
|
"keymaster": "1.6.2",
|
@@ -39,7 +40,7 @@
|
|
39
40
|
"reselect": "4.1.6",
|
40
41
|
"sass": "1.32.8",
|
41
42
|
"web-vitals": "1.1.2",
|
42
|
-
"ydb-ui-components": "^3.1
|
43
|
+
"ydb-ui-components": "^3.2.1"
|
43
44
|
},
|
44
45
|
"scripts": {
|
45
46
|
"start": "react-app-rewired start",
|
@@ -64,6 +65,9 @@
|
|
64
65
|
],
|
65
66
|
"*.{js,jsx,ts,tsx}": [
|
66
67
|
"eslint --fix --quiet"
|
68
|
+
],
|
69
|
+
"*.{json}": [
|
70
|
+
"prettier --write"
|
67
71
|
]
|
68
72
|
},
|
69
73
|
"jest": {
|