ydb-embedded-ui 1.9.0 → 1.10.2
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +43 -0
- package/dist/components/IndexInfoViewer/IndexInfoViewer.tsx +10 -7
- package/dist/components/InfoViewer/InfoViewer.scss +1 -2
- package/dist/components/InfoViewer/utils.ts +18 -10
- package/dist/containers/Storage/Pdisk/Pdisk.tsx +25 -33
- package/dist/containers/Storage/Vdisk/Vdisk.js +2 -0
- package/dist/containers/Tablet/Tablet.js +2 -2
- package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.tsx +15 -14
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.ts +24 -14
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +3 -3
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.tsx +20 -13
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +80 -10
- package/dist/containers/Tenant/QueryEditor/QueryEditor.js +12 -2
- package/dist/containers/Tenant/Schema/SchemaInfoViewer/SchemaInfoViewer.js +164 -42
- package/dist/containers/Tenant/Schema/SchemaInfoViewer/SchemaInfoViewer.scss +18 -0
- package/dist/containers/Tenant/utils/schema.ts +73 -28
- package/dist/containers/Tenant/utils/schemaActions.ts +45 -32
- package/dist/services/api.js +13 -9
- package/dist/store/reducers/executeQuery.js +4 -3
- package/dist/store/reducers/executeTopQueries.js +1 -1
- package/dist/store/reducers/olapStats.js +5 -1
- package/dist/store/reducers/preview.js +1 -1
- package/dist/store/reducers/settings.js +20 -13
- package/dist/store/reducers/shardsWorkload.js +32 -4
- package/dist/types/api/schema.ts +123 -4
- package/dist/types/api/storage.ts +1 -1
- package/dist/utils/constants.js +4 -0
- package/dist/utils/index.js +7 -3
- package/dist/utils/pdisk.ts +2 -2
- package/package.json +2 -2
package/dist/types/api/schema.ts
CHANGED
@@ -16,7 +16,7 @@ export interface TEvDescribeSchemeResult {
|
|
16
16
|
PathOwnerId?: string;
|
17
17
|
}
|
18
18
|
|
19
|
-
enum EStatus
|
19
|
+
enum EStatus {
|
20
20
|
StatusSuccess = 'StatusSuccess',
|
21
21
|
StatusAccepted = 'StatusAccepted',
|
22
22
|
StatusPathDoesNotExist = 'StatusPathDoesNotExist',
|
@@ -47,8 +47,8 @@ interface TPathDescription {
|
|
47
47
|
Children?: TDirEntry[];
|
48
48
|
|
49
49
|
// for table
|
50
|
-
Table?:
|
51
|
-
TableStats?:
|
50
|
+
Table?: TTableDescription;
|
51
|
+
TableStats?: TTableStats;
|
52
52
|
TabletMetrics?: unknown;
|
53
53
|
TablePartitions?: unknown[];
|
54
54
|
|
@@ -82,6 +82,119 @@ interface TDirEntry {
|
|
82
82
|
Version?: TPathVersion;
|
83
83
|
}
|
84
84
|
|
85
|
+
// incomplete
|
86
|
+
export interface TTableDescription {
|
87
|
+
PartitionConfig?: TPartitionConfig;
|
88
|
+
}
|
89
|
+
|
90
|
+
// incomplete
|
91
|
+
export interface TPartitionConfig {
|
92
|
+
/** uint64 */
|
93
|
+
FollowerCount?: string;
|
94
|
+
/**
|
95
|
+
* uint32
|
96
|
+
* @deprecated use FollowerGroups
|
97
|
+
*/
|
98
|
+
CrossDataCenterFollowerCount?: string;
|
99
|
+
/** 0 or 1 items */
|
100
|
+
FollowerGroups?: TFollowerGroup[];
|
101
|
+
}
|
102
|
+
|
103
|
+
export interface TFollowerGroup {
|
104
|
+
/** uint32 */
|
105
|
+
FollowerCount?: string;
|
106
|
+
AllowLeaderPromotion?: boolean;
|
107
|
+
AllowClientRead?: boolean;
|
108
|
+
/** uint32[] */
|
109
|
+
AllowedNodeIDs?: string[];
|
110
|
+
/**
|
111
|
+
* uint32[]
|
112
|
+
* @deprecated use AllowedDataCenters
|
113
|
+
*/
|
114
|
+
AllowedDataCenterNumIDs?: string[];
|
115
|
+
RequireAllDataCenters?: boolean;
|
116
|
+
LocalNodeOnly?: boolean;
|
117
|
+
RequireDifferentNodes?: boolean;
|
118
|
+
FollowerCountPerDataCenter?: boolean; // multiplies FollowerCount by number of DataCenters
|
119
|
+
AllowedDataCenters?: string[];
|
120
|
+
}
|
121
|
+
|
122
|
+
interface TTableStats {
|
123
|
+
/** uint64 */
|
124
|
+
DataSize?: string;
|
125
|
+
/** uint64 */
|
126
|
+
RowCount?: string;
|
127
|
+
/** uint64 */
|
128
|
+
IndexSize?: string;
|
129
|
+
/** uint64 */
|
130
|
+
InMemSize?: string;
|
131
|
+
|
132
|
+
/**
|
133
|
+
* uint64
|
134
|
+
* unix time in millisec
|
135
|
+
*/
|
136
|
+
LastAccessTime?: string;
|
137
|
+
/**
|
138
|
+
* uint64
|
139
|
+
* unix time in millisec
|
140
|
+
*/
|
141
|
+
LastUpdateTime?: string;
|
142
|
+
|
143
|
+
RowCountHistogram?: THistogram;
|
144
|
+
DataSizeHistogram?: THistogram;
|
145
|
+
|
146
|
+
/** uint64 */
|
147
|
+
ImmediateTxCompleted?: string;
|
148
|
+
/** uint64 */
|
149
|
+
PlannedTxCompleted?: string;
|
150
|
+
/** uint64 */
|
151
|
+
TxRejectedByOverload?: string;
|
152
|
+
/** uint64 */
|
153
|
+
TxRejectedBySpace?: string;
|
154
|
+
/** uint64 */
|
155
|
+
TxCompleteLagMsec?: string;
|
156
|
+
/** uint64 */
|
157
|
+
InFlightTxCount?: string;
|
158
|
+
|
159
|
+
/** uint64 */
|
160
|
+
RowUpdates?: string;
|
161
|
+
/** uint64 */
|
162
|
+
RowDeletes?: string;
|
163
|
+
/** uint64 */
|
164
|
+
RowReads?: string;
|
165
|
+
/** uint64 */
|
166
|
+
RangeReads?: string;
|
167
|
+
/** uint64 */
|
168
|
+
RangeReadRows?: string;
|
169
|
+
|
170
|
+
/** uint64 */
|
171
|
+
PartCount?: string;
|
172
|
+
|
173
|
+
KeyAccessSample?: THistogram;
|
174
|
+
|
175
|
+
/** uint64 */
|
176
|
+
SearchHeight?: string;
|
177
|
+
|
178
|
+
/**
|
179
|
+
* uint64
|
180
|
+
* seconds since epoch
|
181
|
+
*/
|
182
|
+
LastFullCompactionTs?: string;
|
183
|
+
|
184
|
+
// i.e. this shard lent to other shards
|
185
|
+
HasLoanedParts?: boolean;
|
186
|
+
}
|
187
|
+
|
188
|
+
interface THistogram {
|
189
|
+
Buckets?: THistogramBucket[];
|
190
|
+
}
|
191
|
+
|
192
|
+
interface THistogramBucket {
|
193
|
+
Key?: string;
|
194
|
+
/** uint64 */
|
195
|
+
Value?: string;
|
196
|
+
}
|
197
|
+
|
85
198
|
export interface TIndexDescription {
|
86
199
|
Name?: string;
|
87
200
|
/** uint64 */
|
@@ -108,10 +221,16 @@ export enum EPathType {
|
|
108
221
|
EPathTypeInvalid = 'EPathTypeInvalid',
|
109
222
|
EPathTypeDir = 'EPathTypeDir',
|
110
223
|
EPathTypeTable = 'EPathTypeTable',
|
224
|
+
|
111
225
|
EPathTypeSubDomain = 'EPathTypeSubDomain',
|
226
|
+
|
227
|
+
EPathTypeTableIndex = 'EPathTypeTableIndex',
|
228
|
+
EPathTypeExtSubDomain = 'EPathTypeExtSubDomain',
|
229
|
+
|
112
230
|
EPathTypeColumnStore = 'EPathTypeColumnStore',
|
113
231
|
EPathTypeColumnTable = 'EPathTypeColumnTable',
|
114
|
-
|
232
|
+
EPathTypeCdcStream = 'EPathTypeCdcStream',
|
233
|
+
|
115
234
|
}
|
116
235
|
|
117
236
|
export enum EPathSubType {
|
package/dist/utils/constants.js
CHANGED
@@ -6,6 +6,9 @@ export const GROUP_AUTO_RELOAD_INTERVAL = 10 * SECOND;
|
|
6
6
|
export const PDISK_AUTO_RELOAD_INTERVAL = 10 * SECOND;
|
7
7
|
export const VDISK_AUTO_RELOAD_INTERVAL = 10 * SECOND;
|
8
8
|
export const AUTO_RELOAD_INTERVAL = 10 * SECOND;
|
9
|
+
// by agreement, display all byte values in decimal scale
|
10
|
+
// values in data are always in bytes, never in higher units,
|
11
|
+
// therefore there is no issue arbitrary converting them in UI
|
9
12
|
export const MEGABYTE = 1_000_000;
|
10
13
|
export const GIGABYTE = 1_000_000_000;
|
11
14
|
export const TERABYTE = 1_000_000_000_000;
|
@@ -139,3 +142,4 @@ export const DEFAULT_TABLE_SETTINGS = {
|
|
139
142
|
};
|
140
143
|
|
141
144
|
export const TENANT_INITIAL_TAB_KEY = 'saved_tenant_initial_tab';
|
145
|
+
export const QUERY_INITIAL_RUN_ACTION_KEY = 'query_initial_run_action';
|
package/dist/utils/index.js
CHANGED
@@ -1,16 +1,20 @@
|
|
1
1
|
import numeral from 'numeral';
|
2
2
|
import _ from 'lodash';
|
3
3
|
|
4
|
+
import {i18n} from './i18n';
|
4
5
|
import {MEGABYTE, TERABYTE, DAY_IN_SECONDS, GIGABYTE} from './constants';
|
5
6
|
|
6
7
|
import locales from 'numeral/locales'; // eslint-disable-line no-unused-vars
|
7
|
-
|
8
|
-
numeral.
|
8
|
+
|
9
|
+
numeral.locale(i18n.lang);
|
9
10
|
|
10
11
|
export const formatBytes = (bytes) => {
|
11
|
-
|
12
|
+
// by agreement, display byte values in decimal scale
|
13
|
+
return numeral(bytes).format('0 b');
|
12
14
|
};
|
13
15
|
|
16
|
+
export const formatBps = (bytes) => formatBytes(bytes) + '/s';
|
17
|
+
|
14
18
|
export const formatBytesToGigabyte = (bytes) => {
|
15
19
|
return `${Math.floor(bytes / GIGABYTE)} GB`;
|
16
20
|
};
|
package/dist/utils/pdisk.ts
CHANGED
@@ -28,7 +28,7 @@ export const parseBitField = <T extends Record<string, number>>(
|
|
28
28
|
};
|
29
29
|
|
30
30
|
export enum IPDiskType {
|
31
|
-
|
31
|
+
HDD = 'HDD', // ROT (Rotation?) = HDD
|
32
32
|
SSD = 'SSD',
|
33
33
|
MVME = 'NVME',
|
34
34
|
}
|
@@ -67,7 +67,7 @@ export const getPDiskType = (data: TPDiskStateInfo): IPDiskType | undefined => {
|
|
67
67
|
return IPDiskType.MVME;
|
68
68
|
}
|
69
69
|
} else if (categoryBitField.typeExt === '0') {
|
70
|
-
return IPDiskType.
|
70
|
+
return IPDiskType.HDD;
|
71
71
|
}
|
72
72
|
|
73
73
|
return undefined;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ydb-embedded-ui",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.10.2",
|
4
4
|
"files": [
|
5
5
|
"dist"
|
6
6
|
],
|
@@ -40,7 +40,7 @@
|
|
40
40
|
"reselect": "4.0.0",
|
41
41
|
"sass": "1.32.8",
|
42
42
|
"web-vitals": "1.1.2",
|
43
|
-
"ydb-ui-components": "2.4.
|
43
|
+
"ydb-ui-components": "2.4.1"
|
44
44
|
},
|
45
45
|
"scripts": {
|
46
46
|
"start": "react-app-rewired start",
|