ydb-embedded-ui 2.4.4 → 2.6.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.
- package/CHANGELOG.md +42 -0
- package/dist/components/InfoViewer/InfoViewer.scss +3 -3
- package/dist/components/InfoViewer/formatters/schema.ts +2 -1
- package/dist/components/InfoViewer/schemaInfo/CDCStreamInfo.tsx +23 -22
- package/dist/components/InfoViewer/schemaInfo/PersQueueGroupInfo.tsx +8 -13
- package/dist/components/InfoViewer/schemaInfo/TableIndexInfo.tsx +2 -12
- package/dist/components/InfoViewer/schemaOverview/CDCStreamOverview.tsx +3 -16
- package/dist/components/InfoViewer/schemaOverview/PersQueueGroupOverview.tsx +8 -13
- package/dist/components/InfoViewer/utils.ts +6 -6
- package/dist/components/Loader/Loader.scss +6 -3
- package/dist/components/Loader/Loader.tsx +7 -5
- package/dist/components/Loader/index.ts +1 -0
- package/dist/components/UptimeFIlter/UptimeFilter.tsx +21 -0
- package/dist/components/UptimeFIlter/index.ts +1 -0
- package/dist/containers/Node/Node.scss +1 -0
- package/dist/containers/Node/Node.tsx +3 -8
- package/dist/containers/Node/NodeStructure/NodeStructure.scss +0 -6
- package/dist/containers/Node/NodeStructure/NodeStructure.tsx +1 -1
- package/dist/containers/Nodes/Nodes.js +22 -10
- package/dist/{components → containers}/NodesViewer/NodesViewer.js +49 -62
- package/dist/{components → containers}/NodesViewer/NodesViewer.scss +0 -0
- package/dist/containers/Storage/Pdisk/Pdisk.scss +1 -1
- package/dist/containers/Storage/Pdisk/Pdisk.tsx +3 -9
- package/dist/containers/Storage/Pdisk/__tests__/colors.tsx +1 -1
- package/dist/containers/Storage/Storage.js +46 -11
- package/dist/containers/Storage/StorageGroups/StorageGroups.tsx +39 -32
- package/dist/containers/Storage/StorageNodes/StorageNodes.scss +2 -2
- package/dist/containers/Storage/StorageNodes/StorageNodes.tsx +35 -17
- package/dist/containers/Storage/StorageNodes/i18n/en.json +6 -4
- package/dist/containers/Storage/StorageNodes/i18n/ru.json +6 -4
- package/dist/containers/Storage/UsageFilter/UsageFilter.scss +10 -5
- package/dist/containers/Tenant/Acl/Acl.js +1 -7
- package/dist/containers/Tenant/Diagnostics/Compute/Compute.js +22 -14
- package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.tsx +52 -10
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.scss +0 -8
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.tsx +42 -15
- package/dist/containers/Tenant/Diagnostics/Diagnostics.scss +0 -7
- package/dist/containers/Tenant/Diagnostics/Diagnostics.tsx +19 -15
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Healthcheck/Healthcheck.tsx +13 -5
- package/dist/containers/Tenant/Diagnostics/Network/Network.js +17 -4
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.tsx +50 -16
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +16 -2
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +1 -0
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +21 -13
- package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.tsx +1 -5
- package/dist/containers/Tenant/QueryEditor/QueryExplain/QueryExplain.js +4 -4
- package/dist/containers/Tenant/QueryEditor/SaveQuery/SaveQuery.js +1 -4
- package/dist/containers/Tenant/Schema/SchemaInfoViewer/SchemaInfoViewer.js +23 -28
- package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.tsx +2 -2
- package/dist/containers/Tenant/TenantPages.tsx +1 -1
- package/dist/containers/Tenant/utils/schema.ts +84 -0
- package/dist/containers/Tenant/utils/schemaActions.ts +9 -20
- package/dist/services/api.d.ts +17 -11
- package/dist/store/reducers/clusterNodes.js +29 -10
- package/dist/store/reducers/describe.ts +56 -14
- package/dist/store/reducers/healthcheckInfo.ts +23 -8
- package/dist/store/reducers/network.js +22 -1
- package/dist/store/reducers/nodes.js +37 -3
- package/dist/store/reducers/schema.ts +229 -0
- package/dist/store/reducers/storage.js +59 -5
- package/dist/types/api/enums.ts +10 -0
- package/dist/types/api/nodes.ts +96 -0
- package/dist/types/api/pdisk.ts +48 -0
- package/dist/types/api/schema.ts +148 -9
- package/dist/types/api/storage.ts +3 -173
- package/dist/types/api/tablet.ts +97 -0
- package/dist/types/api/vdisk.ts +120 -0
- package/dist/types/store/describe.ts +8 -2
- package/dist/types/store/healthcheck.ts +12 -0
- package/dist/types/store/schema.ts +52 -0
- package/dist/utils/index.js +6 -2
- package/dist/utils/nodes.ts +9 -0
- package/dist/utils/pdisk.ts +1 -1
- package/dist/utils/storage.ts +1 -1
- package/package.json +1 -1
- package/dist/store/reducers/schema.js +0 -148
@@ -0,0 +1,120 @@
|
|
1
|
+
import {EFlag} from './enums';
|
2
|
+
import {TPDiskStateInfo} from './pdisk';
|
3
|
+
|
4
|
+
export interface TVDiskStateInfo {
|
5
|
+
VDiskId?: TVDiskID;
|
6
|
+
/** uint64 */
|
7
|
+
CreateTime?: string;
|
8
|
+
/** uint64 */
|
9
|
+
ChangeTime?: string;
|
10
|
+
PDisk?: TPDiskStateInfo;
|
11
|
+
VDiskSlotId?: number;
|
12
|
+
/** uint64 */
|
13
|
+
Guid?: string;
|
14
|
+
/** uint64 */
|
15
|
+
Kind?: string;
|
16
|
+
NodeId?: number;
|
17
|
+
Count?: number;
|
18
|
+
|
19
|
+
Overall?: EFlag;
|
20
|
+
|
21
|
+
/** Current state of VDisk */
|
22
|
+
VDiskState?: EVDiskState;
|
23
|
+
/** Disk space flags */
|
24
|
+
DiskSpace?: EFlag;
|
25
|
+
/** Compaction satisfaction rank */
|
26
|
+
SatisfactionRank?: TVDiskSatisfactionRank;
|
27
|
+
/** Is VDisk replicated? (i.e. contains all blobs it must have) */
|
28
|
+
Replicated?: boolean;
|
29
|
+
/** Does this VDisk has any yet unreplicated phantom-like blobs? */
|
30
|
+
UnreplicatedPhantoms?: boolean;
|
31
|
+
/** The same for the non-phantom-like blobs. */
|
32
|
+
UnreplicatedNonPhantoms?: boolean;
|
33
|
+
/**
|
34
|
+
* uint64
|
35
|
+
* How many unsynced VDisks from current BlobStorage group we see
|
36
|
+
*/
|
37
|
+
UnsyncedVDisks?: string;
|
38
|
+
/**
|
39
|
+
* uint64
|
40
|
+
* How much this VDisk have allocated on corresponding PDisk
|
41
|
+
*/
|
42
|
+
AllocatedSize?: string;
|
43
|
+
/**
|
44
|
+
* uint64
|
45
|
+
* How much space is available for VDisk corresponding to PDisk's hard space limits
|
46
|
+
*/
|
47
|
+
AvailableSize?: string;
|
48
|
+
/** Does this disk has some unreadable but not yet restored blobs? */
|
49
|
+
HasUnreadableBlobs?: boolean;
|
50
|
+
/** fixed64 */
|
51
|
+
IncarnationGuid?: string;
|
52
|
+
DonorMode?: boolean;
|
53
|
+
/**
|
54
|
+
* fixed64
|
55
|
+
* VDisk actor instance guid
|
56
|
+
*/
|
57
|
+
InstanceGuid?: string;
|
58
|
+
// in reality it is `Donors: TVDiskStateInfo[] | TVSlotId[]`, but this way it is more error-proof
|
59
|
+
Donors?: Array<TVDiskStateInfo | TVSlotId>;
|
60
|
+
|
61
|
+
/** VDisk (Skeleton) Front Queue Status */
|
62
|
+
FrontQueues?: EFlag;
|
63
|
+
|
64
|
+
/** VDisk storage pool label */
|
65
|
+
StoragePoolName?: string;
|
66
|
+
|
67
|
+
/**
|
68
|
+
* uint64
|
69
|
+
* Read bytes per second from PDisk for TEvVGet blobs only
|
70
|
+
*/
|
71
|
+
ReadThroughput?: string;
|
72
|
+
/**
|
73
|
+
* uint64
|
74
|
+
* Write bytes per second to PDisk for TEvVPut blobs and replication bytes only
|
75
|
+
*/
|
76
|
+
WriteThroughput?: string;
|
77
|
+
}
|
78
|
+
|
79
|
+
export interface TVSlotId {
|
80
|
+
NodeId?: number;
|
81
|
+
PDiskId?: number;
|
82
|
+
VSlotId?: number;
|
83
|
+
}
|
84
|
+
|
85
|
+
interface TVDiskSatisfactionRank {
|
86
|
+
FreshRank?: TRank;
|
87
|
+
LevelRank?: TRank;
|
88
|
+
}
|
89
|
+
|
90
|
+
interface TVDiskID {
|
91
|
+
GroupID?: number;
|
92
|
+
GroupGeneration?: number;
|
93
|
+
Ring?: number;
|
94
|
+
Domain?: number;
|
95
|
+
VDisk?: number;
|
96
|
+
}
|
97
|
+
|
98
|
+
interface TRank {
|
99
|
+
/**
|
100
|
+
* Rank in percents; 0-100% is good; >100% is bad.
|
101
|
+
* Formula for rank calculation is the following:
|
102
|
+
* Rank = actual_value / max_allowed_value * 100
|
103
|
+
*/
|
104
|
+
RankPercent?: number;
|
105
|
+
|
106
|
+
/**
|
107
|
+
* Flag is the Rank transformed to something simple
|
108
|
+
* to understand: Green, Yellow or Red
|
109
|
+
*/
|
110
|
+
Flag?: EFlag;
|
111
|
+
}
|
112
|
+
|
113
|
+
enum EVDiskState {
|
114
|
+
Initial = 'Initial',
|
115
|
+
LocalRecoveryError = 'LocalRecoveryError',
|
116
|
+
SyncGuidRecovery = 'SyncGuidRecovery',
|
117
|
+
SyncGuidRecoveryError = 'SyncGuidRecoveryError',
|
118
|
+
OK = 'OK',
|
119
|
+
PDiskError = 'PDiskError',
|
120
|
+
}
|
@@ -13,14 +13,20 @@ export interface IDescribeState {
|
|
13
13
|
loading: boolean;
|
14
14
|
wasLoaded: boolean;
|
15
15
|
data: IDescribeData;
|
16
|
-
currentDescribe?:
|
16
|
+
currentDescribe?: IDescribeData;
|
17
17
|
currentDescribePath?: string;
|
18
18
|
error?: IResponseError;
|
19
19
|
}
|
20
20
|
|
21
|
+
export interface IDescribeHandledResponse {
|
22
|
+
path: string | undefined;
|
23
|
+
data: IDescribeData | undefined;
|
24
|
+
currentDescribe: IDescribeData | undefined;
|
25
|
+
}
|
26
|
+
|
21
27
|
type IDescribeApiRequestAction = ApiRequestAction<
|
22
28
|
typeof FETCH_DESCRIBE,
|
23
|
-
|
29
|
+
IDescribeHandledResponse,
|
24
30
|
IResponseError
|
25
31
|
>;
|
26
32
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import {ApiRequestAction} from '../../store/utils';
|
2
|
+
import {FETCH_HEALTHCHECK, setDataWasNotLoaded} from '../../store/reducers/healthcheckInfo';
|
1
3
|
import {IResponseError} from '../api/error';
|
2
4
|
import type {HealthCheckAPIResponse, IssueLog} from '../api/healthcheck';
|
3
5
|
|
@@ -14,6 +16,16 @@ export interface IHealthcheckInfoState {
|
|
14
16
|
error?: IResponseError;
|
15
17
|
}
|
16
18
|
|
19
|
+
type IHealthCheckApiRequestAction = ApiRequestAction<
|
20
|
+
typeof FETCH_HEALTHCHECK,
|
21
|
+
HealthCheckAPIResponse,
|
22
|
+
IResponseError
|
23
|
+
>;
|
24
|
+
|
25
|
+
export type IHealthCheckInfoAction =
|
26
|
+
| IHealthCheckApiRequestAction
|
27
|
+
| ReturnType<typeof setDataWasNotLoaded>;
|
28
|
+
|
17
29
|
export interface IHealthcheckInfoRootStateSlice {
|
18
30
|
healthcheckInfo: IHealthcheckInfoState;
|
19
31
|
}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import {
|
2
|
+
disableAutorefresh,
|
3
|
+
enableAutorefresh,
|
4
|
+
FETCH_SCHEMA,
|
5
|
+
preloadSchemas,
|
6
|
+
resetLoadingState,
|
7
|
+
setCurrentSchemaPath,
|
8
|
+
setShowPreview,
|
9
|
+
} from '../../store/reducers/schema';
|
10
|
+
import {ApiRequestAction} from '../../store/utils';
|
11
|
+
import {IResponseError} from '../api/error';
|
12
|
+
import {TEvDescribeSchemeResult} from '../api/schema';
|
13
|
+
|
14
|
+
export type ISchemaData = Record<string, TEvDescribeSchemeResult>;
|
15
|
+
|
16
|
+
export interface ISchemaState {
|
17
|
+
loading: boolean;
|
18
|
+
wasLoaded: boolean;
|
19
|
+
data: ISchemaData;
|
20
|
+
currentSchema?: TEvDescribeSchemeResult;
|
21
|
+
currentSchemaPath?: string;
|
22
|
+
autorefresh: boolean;
|
23
|
+
showPreview: boolean;
|
24
|
+
error?: IResponseError;
|
25
|
+
}
|
26
|
+
|
27
|
+
export interface ISchemaHandledResponse {
|
28
|
+
path: string | undefined;
|
29
|
+
currentSchema: TEvDescribeSchemeResult | undefined;
|
30
|
+
data: ISchemaData | undefined;
|
31
|
+
}
|
32
|
+
|
33
|
+
type ISchemaApiRequestAction = ApiRequestAction<
|
34
|
+
typeof FETCH_SCHEMA,
|
35
|
+
ISchemaHandledResponse,
|
36
|
+
IResponseError
|
37
|
+
>;
|
38
|
+
|
39
|
+
export type ISchemaAction =
|
40
|
+
| ISchemaApiRequestAction
|
41
|
+
| (
|
42
|
+
| ReturnType<typeof setCurrentSchemaPath>
|
43
|
+
| ReturnType<typeof enableAutorefresh>
|
44
|
+
| ReturnType<typeof disableAutorefresh>
|
45
|
+
| ReturnType<typeof setShowPreview>
|
46
|
+
| ReturnType<typeof preloadSchemas>
|
47
|
+
| ReturnType<typeof resetLoadingState>
|
48
|
+
);
|
49
|
+
|
50
|
+
export interface ISchemaRootStateSlice {
|
51
|
+
schema: ISchemaState;
|
52
|
+
}
|
package/dist/utils/index.js
CHANGED
@@ -79,9 +79,13 @@ export const formatDateTime = (value) => {
|
|
79
79
|
return value > 0 ? new Date(Number(value)).toUTCString() : 'N/A';
|
80
80
|
};
|
81
81
|
|
82
|
-
export const
|
82
|
+
export const calcUptimeInSeconds = (milliseconds) => {
|
83
83
|
const currentDate = new Date();
|
84
|
-
return
|
84
|
+
return (currentDate - Number(milliseconds)) / 1000;
|
85
|
+
};
|
86
|
+
|
87
|
+
export const calcUptime = (milliseconds) => {
|
88
|
+
return formatUptime(calcUptimeInSeconds(milliseconds));
|
85
89
|
};
|
86
90
|
|
87
91
|
// determine how many nodes have status Connected "true"
|
package/dist/utils/pdisk.ts
CHANGED
package/dist/utils/storage.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type {TVSlotId, TVDiskStateInfo} from '../types/api/vdisk';
|
2
2
|
import type {IStoragePoolGroup} from '../types/store/storage';
|
3
3
|
|
4
4
|
export const isFullDonorData = (donor: TVDiskStateInfo | TVSlotId): donor is TVDiskStateInfo =>
|
package/package.json
CHANGED
@@ -1,148 +0,0 @@
|
|
1
|
-
import {createRequestActionTypes, createApiRequest} from '../utils';
|
2
|
-
import '../../services/api';
|
3
|
-
|
4
|
-
const FETCH_SCHEMA = createRequestActionTypes('schema', 'FETCH_SCHEMA');
|
5
|
-
const PRELOAD_SCHEMAS = 'schema/PRELOAD_SCHEMAS';
|
6
|
-
const SET_SCHEMA = 'schema/SET_SCHEMA';
|
7
|
-
const SET_SHOW_PREVIEW = 'schema/SET_SHOW_PREVIEW';
|
8
|
-
const ENABLE_AUTOREFRESH = 'schema/ENABLE_AUTOREFRESH';
|
9
|
-
const DISABLE_AUTOREFRESH = 'schema/DISABLE_AUTOREFRESH';
|
10
|
-
const RESET_LOADING_STATE = 'schema/RESET_LOADING_STATE';
|
11
|
-
|
12
|
-
export const initialState = {
|
13
|
-
loading: true,
|
14
|
-
wasLoaded: false,
|
15
|
-
data: {},
|
16
|
-
currentSchemaPath: undefined,
|
17
|
-
autorefresh: false,
|
18
|
-
showPreview: false,
|
19
|
-
};
|
20
|
-
|
21
|
-
const schema = (state = initialState, action) => {
|
22
|
-
switch (action.type) {
|
23
|
-
case FETCH_SCHEMA.REQUEST: {
|
24
|
-
return {
|
25
|
-
...state,
|
26
|
-
loading: true,
|
27
|
-
};
|
28
|
-
}
|
29
|
-
case FETCH_SCHEMA.SUCCESS: {
|
30
|
-
const newData = JSON.parse(JSON.stringify(state.data));
|
31
|
-
newData[action.data.Path] = action.data;
|
32
|
-
const currentSchema = state.currentSchemaPath
|
33
|
-
? newData[state.currentSchemaPath]
|
34
|
-
: action.data;
|
35
|
-
const currentSchemaPath = state.currentSchemaPath || action.data.Path;
|
36
|
-
return {
|
37
|
-
...state,
|
38
|
-
error: undefined,
|
39
|
-
data: newData,
|
40
|
-
currentSchema,
|
41
|
-
currentSchemaPath,
|
42
|
-
loading: false,
|
43
|
-
wasLoaded: true,
|
44
|
-
};
|
45
|
-
}
|
46
|
-
case FETCH_SCHEMA.FAILURE: {
|
47
|
-
if (action.error?.isCancelled) {
|
48
|
-
return state;
|
49
|
-
}
|
50
|
-
|
51
|
-
return {
|
52
|
-
...state,
|
53
|
-
error: action.error,
|
54
|
-
loading: false,
|
55
|
-
};
|
56
|
-
}
|
57
|
-
case PRELOAD_SCHEMAS: {
|
58
|
-
return {
|
59
|
-
...state,
|
60
|
-
data: {
|
61
|
-
// we don't want to overwrite existing paths
|
62
|
-
...action.data,
|
63
|
-
...state.data,
|
64
|
-
},
|
65
|
-
};
|
66
|
-
}
|
67
|
-
case SET_SCHEMA: {
|
68
|
-
return {
|
69
|
-
...state,
|
70
|
-
currentSchemaPath: action.data,
|
71
|
-
wasLoaded: false,
|
72
|
-
};
|
73
|
-
}
|
74
|
-
case ENABLE_AUTOREFRESH: {
|
75
|
-
return {
|
76
|
-
...state,
|
77
|
-
autorefresh: true,
|
78
|
-
};
|
79
|
-
}
|
80
|
-
case DISABLE_AUTOREFRESH: {
|
81
|
-
return {
|
82
|
-
...state,
|
83
|
-
autorefresh: false,
|
84
|
-
};
|
85
|
-
}
|
86
|
-
case SET_SHOW_PREVIEW: {
|
87
|
-
return {
|
88
|
-
...state,
|
89
|
-
showPreview: action.data,
|
90
|
-
};
|
91
|
-
}
|
92
|
-
case RESET_LOADING_STATE: {
|
93
|
-
return {
|
94
|
-
...state,
|
95
|
-
wasLoaded: initialState.wasLoaded,
|
96
|
-
};
|
97
|
-
}
|
98
|
-
default:
|
99
|
-
return state;
|
100
|
-
}
|
101
|
-
};
|
102
|
-
|
103
|
-
export function getSchema({path}) {
|
104
|
-
return createApiRequest({
|
105
|
-
request: window.api.getSchema({path}),
|
106
|
-
actions: FETCH_SCHEMA,
|
107
|
-
});
|
108
|
-
}
|
109
|
-
|
110
|
-
export function setCurrentSchemaPath(currentSchemaPath) {
|
111
|
-
return {
|
112
|
-
type: SET_SCHEMA,
|
113
|
-
data: currentSchemaPath,
|
114
|
-
};
|
115
|
-
}
|
116
|
-
export function enableAutorefresh() {
|
117
|
-
return {
|
118
|
-
type: ENABLE_AUTOREFRESH,
|
119
|
-
};
|
120
|
-
}
|
121
|
-
export function disableAutorefresh() {
|
122
|
-
return {
|
123
|
-
type: DISABLE_AUTOREFRESH,
|
124
|
-
};
|
125
|
-
}
|
126
|
-
export function setShowPreview(value) {
|
127
|
-
return {
|
128
|
-
type: SET_SHOW_PREVIEW,
|
129
|
-
data: value,
|
130
|
-
};
|
131
|
-
}
|
132
|
-
|
133
|
-
// only stores data for paths that are not in the store yet
|
134
|
-
// existing paths are ignored
|
135
|
-
export function preloadSchemas(data) {
|
136
|
-
return {
|
137
|
-
type: PRELOAD_SCHEMAS,
|
138
|
-
data,
|
139
|
-
};
|
140
|
-
}
|
141
|
-
|
142
|
-
export function resetLoadingState() {
|
143
|
-
return {
|
144
|
-
type: RESET_LOADING_STATE,
|
145
|
-
};
|
146
|
-
}
|
147
|
-
|
148
|
-
export default schema;
|