ydb-embedded-ui 6.34.0 → 6.35.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/NodeHostWrapper/NodeHostWrapper.d.ts +5 -3
- package/dist/components/NodeHostWrapper/NodeHostWrapper.js +3 -2
- package/dist/components/NodeHostWrapper/NodeHostWrapper.js.map +1 -1
- package/dist/components/nodesColumns/__test__/utils.test.d.ts +1 -0
- package/dist/components/nodesColumns/__test__/utils.test.js +28 -0
- package/dist/components/nodesColumns/__test__/utils.test.js.map +1 -0
- package/dist/components/nodesColumns/columns.d.ts +28 -2
- package/dist/components/nodesColumns/columns.js +82 -4
- package/dist/components/nodesColumns/columns.js.map +1 -1
- package/dist/components/nodesColumns/constants.d.ts +12 -0
- package/dist/components/nodesColumns/constants.js +36 -0
- package/dist/components/nodesColumns/constants.js.map +1 -1
- package/dist/components/nodesColumns/i18n/en.json +11 -1
- package/dist/components/nodesColumns/i18n/index.d.ts +1 -1
- package/dist/components/nodesColumns/utils.d.ts +2 -0
- package/dist/components/nodesColumns/utils.js +11 -0
- package/dist/components/nodesColumns/utils.js.map +1 -0
- package/dist/containers/Nodes/Nodes.js +2 -2
- package/dist/containers/Nodes/Nodes.js.map +1 -1
- package/dist/containers/Nodes/NodesControls/NodesControls.d.ts +3 -1
- package/dist/containers/Nodes/NodesControls/NodesControls.js +3 -3
- package/dist/containers/Nodes/NodesControls/NodesControls.js.map +1 -1
- package/dist/containers/Nodes/PaginatedNodes.d.ts +11 -3
- package/dist/containers/Nodes/PaginatedNodes.js +16 -19
- package/dist/containers/Nodes/PaginatedNodes.js.map +1 -1
- package/dist/containers/Nodes/columns/constants.d.ts +3 -2
- package/dist/containers/Nodes/columns/constants.js +8 -8
- package/dist/containers/Nodes/columns/constants.js.map +1 -1
- package/dist/containers/Nodes/useNodesPageQueryParams.d.ts +3 -2
- package/dist/containers/Nodes/useNodesPageQueryParams.js +2 -2
- package/dist/containers/Nodes/useNodesPageQueryParams.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js +2 -2
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/columns.d.ts +4 -0
- package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/columns.js +23 -0
- package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/columns.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/constants.d.ts +5 -0
- package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/constants.js +23 -0
- package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/constants.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/Network/NetworkWrapper.d.ts +6 -0
- package/dist/containers/Tenant/Diagnostics/Network/NetworkWrapper.js +26 -0
- package/dist/containers/Tenant/Diagnostics/Network/NetworkWrapper.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +1 -1
- package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.d.ts +2 -2
- package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.js +3 -2
- package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.js.map +1 -1
- package/dist/containers/Tenant/Query/NewSQL/NewSQL.js +3 -9
- package/dist/containers/Tenant/Query/NewSQL/NewSQL.js.map +1 -1
- package/dist/containers/Tenant/Query/NewSQL/i18n/en.json +1 -2
- package/dist/containers/Tenant/Query/NewSQL/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +17 -3
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js.map +1 -1
- package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.d.ts +12 -3
- package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.js +25 -10
- package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.js.map +1 -1
- package/dist/containers/Tenant/utils/newSQLQueryActions.d.ts +0 -1
- package/dist/containers/Tenant/utils/newSQLQueryActions.js +0 -1
- package/dist/containers/Tenant/utils/newSQLQueryActions.js.map +1 -1
- package/dist/containers/Tenant/utils/schemaActions.js +5 -4
- package/dist/containers/Tenant/utils/schemaActions.js.map +1 -1
- package/dist/containers/Tenant/utils/schemaQueryTemplates.js +86 -53
- package/dist/containers/Tenant/utils/schemaQueryTemplates.js.map +1 -1
- package/dist/containers/UserSettings/i18n/en.json +1 -0
- package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
- package/dist/containers/UserSettings/settings.d.ts +1 -0
- package/dist/containers/UserSettings/settings.js +6 -2
- package/dist/containers/UserSettings/settings.js.map +1 -1
- package/dist/services/settings.d.ts +1 -0
- package/dist/services/settings.js +2 -1
- package/dist/services/settings.js.map +1 -1
- package/dist/store/configureStore.d.ts +12 -4
- package/dist/store/defaultStore.d.ts +6 -2
- package/dist/store/reducers/capabilities/capabilities.d.ts +24 -8
- package/dist/store/reducers/capabilities/hooks.d.ts +1 -0
- package/dist/store/reducers/capabilities/hooks.js +3 -0
- package/dist/store/reducers/capabilities/hooks.js.map +1 -1
- package/dist/store/reducers/cluster/cluster.d.ts +18 -6
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +60 -20
- package/dist/store/reducers/index.d.ts +9 -3
- package/dist/store/reducers/node/selectors.d.ts +3 -1
- package/dist/store/reducers/nodes/types.d.ts +13 -0
- package/dist/store/reducers/nodes/utils.js +3 -3
- package/dist/store/reducers/nodes/utils.js.map +1 -1
- package/dist/store/reducers/nodesList.d.ts +3 -1
- package/dist/store/reducers/partitions/partitions.d.ts +4 -3
- package/dist/store/reducers/partitions/partitions.js +1 -3
- package/dist/store/reducers/partitions/partitions.js.map +1 -1
- package/dist/store/reducers/partitions/types.d.ts +0 -3
- package/dist/store/reducers/queryActions/types.d.ts +1 -1
- package/dist/store/reducers/tablets.d.ts +15 -5
- package/dist/store/reducers/tenants/selectors.d.ts +27 -9
- package/dist/store/reducers/topic.d.ts +45 -15
- package/dist/types/api/nodes.d.ts +56 -0
- package/dist/types/api/nodes.js.map +1 -1
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.js +1 -0
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/dataFormatters/dataFormatters.d.ts +1 -1
- package/dist/utils/dataFormatters/dataFormatters.js +12 -6
- package/dist/utils/dataFormatters/dataFormatters.js.map +1 -1
- package/dist/utils/hooks/withConfirmation/useChangeInputWithConfirmation.js +12 -8
- package/dist/utils/hooks/withConfirmation/useChangeInputWithConfirmation.js.map +1 -1
- package/dist/utils/monaco/insertSnippet.d.ts +1 -0
- package/dist/utils/monaco/insertSnippet.js +8 -0
- package/dist/utils/monaco/insertSnippet.js.map +1 -0
- package/dist/utils/timeParsers/parsers.d.ts +1 -1
- package/dist/utils/timeParsers/parsers.js +3 -2
- package/dist/utils/timeParsers/parsers.js.map +1 -1
- package/package.json +2 -2
@@ -18,7 +18,9 @@ export declare const selectConsumersNames: ((state: {
|
|
18
18
|
showPreview: boolean;
|
19
19
|
};
|
20
20
|
tenants: import("./tenants/types").TenantsState;
|
21
|
-
partitions:
|
21
|
+
partitions: {
|
22
|
+
selectedConsumer?: string;
|
23
|
+
};
|
22
24
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
23
25
|
heatmap: import("../../types/store/heatmap").IHeatmapState;
|
24
26
|
settings: import("./settings/types").SettingsState;
|
@@ -54,7 +56,9 @@ export declare const selectConsumersNames: ((state: {
|
|
54
56
|
showPreview: boolean;
|
55
57
|
};
|
56
58
|
tenants: import("./tenants/types").TenantsState;
|
57
|
-
partitions:
|
59
|
+
partitions: {
|
60
|
+
selectedConsumer?: string;
|
61
|
+
};
|
58
62
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
59
63
|
heatmap: import("../../types/store/heatmap").IHeatmapState;
|
60
64
|
settings: import("./settings/types").SettingsState;
|
@@ -83,7 +87,9 @@ export declare const selectConsumersNames: ((state: {
|
|
83
87
|
showPreview: boolean;
|
84
88
|
};
|
85
89
|
tenants: import("./tenants/types").TenantsState;
|
86
|
-
partitions:
|
90
|
+
partitions: {
|
91
|
+
selectedConsumer?: string;
|
92
|
+
};
|
87
93
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
88
94
|
heatmap: import("../../types/store/heatmap").IHeatmapState;
|
89
95
|
settings: import("./settings/types").SettingsState;
|
@@ -116,7 +122,9 @@ export declare const selectConsumersNames: ((state: {
|
|
116
122
|
showPreview: boolean;
|
117
123
|
};
|
118
124
|
tenants: import("./tenants/types").TenantsState;
|
119
|
-
partitions:
|
125
|
+
partitions: {
|
126
|
+
selectedConsumer?: string;
|
127
|
+
};
|
120
128
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
121
129
|
heatmap: import("../../types/store/heatmap").IHeatmapState;
|
122
130
|
settings: import("./settings/types").SettingsState;
|
@@ -154,7 +162,9 @@ export declare const selectConsumersNames: ((state: {
|
|
154
162
|
showPreview: boolean;
|
155
163
|
};
|
156
164
|
tenants: import("./tenants/types").TenantsState;
|
157
|
-
partitions:
|
165
|
+
partitions: {
|
166
|
+
selectedConsumer?: string;
|
167
|
+
};
|
158
168
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
159
169
|
heatmap: import("../../types/store/heatmap").IHeatmapState;
|
160
170
|
settings: import("./settings/types").SettingsState;
|
@@ -203,7 +213,9 @@ export declare const selectPreparedTopicStats: ((state: {
|
|
203
213
|
showPreview: boolean;
|
204
214
|
};
|
205
215
|
tenants: import("./tenants/types").TenantsState;
|
206
|
-
partitions:
|
216
|
+
partitions: {
|
217
|
+
selectedConsumer?: string;
|
218
|
+
};
|
207
219
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
208
220
|
heatmap: import("../../types/store/heatmap").IHeatmapState;
|
209
221
|
settings: import("./settings/types").SettingsState;
|
@@ -259,7 +271,9 @@ export declare const selectPreparedTopicStats: ((state: {
|
|
259
271
|
showPreview: boolean;
|
260
272
|
};
|
261
273
|
tenants: import("./tenants/types").TenantsState;
|
262
|
-
partitions:
|
274
|
+
partitions: {
|
275
|
+
selectedConsumer?: string;
|
276
|
+
};
|
263
277
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
264
278
|
heatmap: import("../../types/store/heatmap").IHeatmapState;
|
265
279
|
settings: import("./settings/types").SettingsState;
|
@@ -288,7 +302,9 @@ export declare const selectPreparedTopicStats: ((state: {
|
|
288
302
|
showPreview: boolean;
|
289
303
|
};
|
290
304
|
tenants: import("./tenants/types").TenantsState;
|
291
|
-
partitions:
|
305
|
+
partitions: {
|
306
|
+
selectedConsumer?: string;
|
307
|
+
};
|
292
308
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
293
309
|
heatmap: import("../../types/store/heatmap").IHeatmapState;
|
294
310
|
settings: import("./settings/types").SettingsState;
|
@@ -321,7 +337,9 @@ export declare const selectPreparedTopicStats: ((state: {
|
|
321
337
|
showPreview: boolean;
|
322
338
|
};
|
323
339
|
tenants: import("./tenants/types").TenantsState;
|
324
|
-
partitions:
|
340
|
+
partitions: {
|
341
|
+
selectedConsumer?: string;
|
342
|
+
};
|
325
343
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
326
344
|
heatmap: import("../../types/store/heatmap").IHeatmapState;
|
327
345
|
settings: import("./settings/types").SettingsState;
|
@@ -359,7 +377,9 @@ export declare const selectPreparedTopicStats: ((state: {
|
|
359
377
|
showPreview: boolean;
|
360
378
|
};
|
361
379
|
tenants: import("./tenants/types").TenantsState;
|
362
|
-
partitions:
|
380
|
+
partitions: {
|
381
|
+
selectedConsumer?: string;
|
382
|
+
};
|
363
383
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
364
384
|
heatmap: import("../../types/store/heatmap").IHeatmapState;
|
365
385
|
settings: import("./settings/types").SettingsState;
|
@@ -408,7 +428,9 @@ export declare const selectPreparedConsumersData: ((state: {
|
|
408
428
|
showPreview: boolean;
|
409
429
|
};
|
410
430
|
tenants: import("./tenants/types").TenantsState;
|
411
|
-
partitions:
|
431
|
+
partitions: {
|
432
|
+
selectedConsumer?: string;
|
433
|
+
};
|
412
434
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
413
435
|
heatmap: import("../../types/store/heatmap").IHeatmapState;
|
414
436
|
settings: import("./settings/types").SettingsState;
|
@@ -468,7 +490,9 @@ export declare const selectPreparedConsumersData: ((state: {
|
|
468
490
|
showPreview: boolean;
|
469
491
|
};
|
470
492
|
tenants: import("./tenants/types").TenantsState;
|
471
|
-
partitions:
|
493
|
+
partitions: {
|
494
|
+
selectedConsumer?: string;
|
495
|
+
};
|
472
496
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
473
497
|
heatmap: import("../../types/store/heatmap").IHeatmapState;
|
474
498
|
settings: import("./settings/types").SettingsState;
|
@@ -497,7 +521,9 @@ export declare const selectPreparedConsumersData: ((state: {
|
|
497
521
|
showPreview: boolean;
|
498
522
|
};
|
499
523
|
tenants: import("./tenants/types").TenantsState;
|
500
|
-
partitions:
|
524
|
+
partitions: {
|
525
|
+
selectedConsumer?: string;
|
526
|
+
};
|
501
527
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
502
528
|
heatmap: import("../../types/store/heatmap").IHeatmapState;
|
503
529
|
settings: import("./settings/types").SettingsState;
|
@@ -530,7 +556,9 @@ export declare const selectPreparedConsumersData: ((state: {
|
|
530
556
|
showPreview: boolean;
|
531
557
|
};
|
532
558
|
tenants: import("./tenants/types").TenantsState;
|
533
|
-
partitions:
|
559
|
+
partitions: {
|
560
|
+
selectedConsumer?: string;
|
561
|
+
};
|
534
562
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
535
563
|
heatmap: import("../../types/store/heatmap").IHeatmapState;
|
536
564
|
settings: import("./settings/types").SettingsState;
|
@@ -568,7 +596,9 @@ export declare const selectPreparedConsumersData: ((state: {
|
|
568
596
|
showPreview: boolean;
|
569
597
|
};
|
570
598
|
tenants: import("./tenants/types").TenantsState;
|
571
|
-
partitions:
|
599
|
+
partitions: {
|
600
|
+
selectedConsumer?: string;
|
601
|
+
};
|
572
602
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
573
603
|
heatmap: import("../../types/store/heatmap").IHeatmapState;
|
574
604
|
settings: import("./settings/types").SettingsState;
|
@@ -19,13 +19,42 @@ export interface TNodesInfo {
|
|
19
19
|
}
|
20
20
|
export interface TNodeInfo {
|
21
21
|
NodeId: number;
|
22
|
+
Database?: string;
|
22
23
|
CpuUsage?: number;
|
23
24
|
DiskSpaceUsage?: number;
|
24
25
|
UptimeSeconds?: number;
|
26
|
+
Disconnected?: boolean;
|
25
27
|
SystemState: TSystemStateInfo;
|
26
28
|
PDisks?: TPDiskStateInfo[];
|
27
29
|
VDisks?: TVDiskStateInfo[];
|
28
30
|
Tablets?: TTabletStateInfo[];
|
31
|
+
Connections?: number;
|
32
|
+
ConnectStatus?: EFlag;
|
33
|
+
/** uint64 */
|
34
|
+
ReceiveThroughput?: string;
|
35
|
+
/** uint64 */
|
36
|
+
SendThroughput?: string;
|
37
|
+
NetworkUtilization?: number;
|
38
|
+
NetworkUtilizationMin?: number;
|
39
|
+
NetworkUtilizationMax?: number;
|
40
|
+
/** int64 */
|
41
|
+
ClockSkewUs?: string;
|
42
|
+
/** int64 */
|
43
|
+
ClockSkewMinUs?: string;
|
44
|
+
/** int64 */
|
45
|
+
ClockSkewMaxUs?: string;
|
46
|
+
/** int64 */
|
47
|
+
ReverseClockSkewUs?: string;
|
48
|
+
/** uint64 */
|
49
|
+
PingTimeUs?: string;
|
50
|
+
/** uint64 */
|
51
|
+
PingTimeMinUs?: string;
|
52
|
+
/** uint64 */
|
53
|
+
PingTimeMaxUs?: string;
|
54
|
+
/** uint64 */
|
55
|
+
ReversePingTimeUs?: string;
|
56
|
+
Peers?: TNodeStateInfo[];
|
57
|
+
ReversePeers?: TNodeStateInfo[];
|
29
58
|
}
|
30
59
|
export interface TNodesGroup {
|
31
60
|
GroupName: string;
|
@@ -99,6 +128,33 @@ export interface TSystemStateInfo {
|
|
99
128
|
TotalSessions?: number;
|
100
129
|
NodeName?: string;
|
101
130
|
}
|
131
|
+
interface TNodeStateInfo {
|
132
|
+
PeerName?: string;
|
133
|
+
Connected?: boolean;
|
134
|
+
NodeId?: number;
|
135
|
+
/** uint64 */
|
136
|
+
ChangeTime?: string;
|
137
|
+
/** uint32 */
|
138
|
+
OutputQueueSize?: string;
|
139
|
+
ConnectStatus?: EFlag;
|
140
|
+
/** uint64 */
|
141
|
+
ConnectTime?: string;
|
142
|
+
PeerNodeId?: number;
|
143
|
+
/** int64 */
|
144
|
+
ClockSkewUs?: string;
|
145
|
+
/** uint32 */
|
146
|
+
PingTimeUs?: string;
|
147
|
+
Utilization?: number;
|
148
|
+
ScopeId?: unknown;
|
149
|
+
/** uint32 */
|
150
|
+
Count?: string;
|
151
|
+
/** uint64 */
|
152
|
+
BytesWritten?: string;
|
153
|
+
/** uint64 */
|
154
|
+
WriteThroughput?: string;
|
155
|
+
SessionState?: ESessionState;
|
156
|
+
}
|
157
|
+
type ESessionState = 'CLOSED' | 'PENDING_CONNECTION' | 'CONNECTED';
|
102
158
|
export type PoolName = 'System' | 'User' | 'Batch' | 'IO' | 'IC';
|
103
159
|
export interface TPoolStats {
|
104
160
|
Name?: PoolName;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../../src/types/api/nodes.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../../src/types/api/nodes.ts"],"names":[],"mappings":"AA6NA,IAAK,YAGJ;AAHD,WAAK,YAAY;IACb,yCAA2B,CAAA;IAC3B,qCAAuB,CAAA;AAC3B,CAAC,EAHI,YAAY,KAAZ,YAAY,QAGhB"}
|
@@ -102,6 +102,7 @@ export declare const LAST_USED_QUERY_ACTION_KEY = "last_used_query_action";
|
|
102
102
|
export declare const PARTITIONS_HIDDEN_COLUMNS_KEY = "partitionsHiddenColumns";
|
103
103
|
export declare const TENANT_INITIAL_PAGE_KEY = "saved_tenant_initial_tab";
|
104
104
|
export declare const USE_PAGINATED_TABLES_KEY = "useBackendParamsForTables";
|
105
|
+
export declare const ENABLE_NETWORK_TABLE_KEY = "enableNetworkTable";
|
105
106
|
export declare const USE_SHOW_PLAN_SVG_KEY = "useShowPlanToSvg";
|
106
107
|
export declare const SHOW_DOMAIN_DATABASE_KEY = "showDomainDatabase";
|
107
108
|
export declare const USE_CLUSTER_BALANCER_AS_BACKEND_KEY = "useClusterBalancerAsBacked";
|
package/dist/utils/constants.js
CHANGED
@@ -105,6 +105,7 @@ export const TENANT_INITIAL_PAGE_KEY = 'saved_tenant_initial_tab';
|
|
105
105
|
// Setting to use paginated tables
|
106
106
|
// Old key value for backward compatibility
|
107
107
|
export const USE_PAGINATED_TABLES_KEY = 'useBackendParamsForTables';
|
108
|
+
export const ENABLE_NETWORK_TABLE_KEY = 'enableNetworkTable';
|
108
109
|
export const USE_SHOW_PLAN_SVG_KEY = 'useShowPlanToSvg';
|
109
110
|
// Setting to hide domain in database list
|
110
111
|
export const SHOW_DOMAIN_DATABASE_KEY = 'showDomainDatabase';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,8BAA8B,CAAC;AAGrD,OAAO,EAAC,KAAK,EAAC,MAAM,qBAAqB,CAAC;AAE1C,MAAM,MAAM,GAAG,IAAI,CAAC;AAEpB,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,GAAG,MAAM,CAAC;AAChD,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,GAAG,MAAM,CAAC;AACpD,yDAAyD;AACzD,6DAA6D;AAC7D,8DAA8D;AAC9D,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAK,CAAC;AAC9B,MAAM,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AAG,yBAAyB,CAAC;AAEvE,sDAAsD;AACtD,MAAM,CAAC,MAAM,uBAAuB,GAAG,0BAA0B,CAAC;AAElE,kCAAkC;AAClC,2CAA2C;AAC3C,MAAM,CAAC,MAAM,wBAAwB,GAAG,2BAA2B,CAAC;AAEpE,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAE7D,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AAExD,0CAA0C;AAC1C,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAE7D,MAAM,CAAC,MAAM,mCAAmC,GAAG,4BAA4B,CAAC;AAEhF,MAAM,CAAC,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;AAExD,MAAM,CAAC,MAAM,qBAAqB,GAAG,qBAAqB,CAAC;AAE3D,MAAM,CAAC,MAAM,0BAA0B,GAAG,qBAAqB,CAAC;AAEhE,MAAM,CAAC,MAAM,mCAAmC,GAAG,iCAAiC,CAAC"}
|
@@ -11,7 +11,7 @@ export declare function formatNumericValues(value?: number, total?: number, size
|
|
11
11
|
export declare const formatStorageValuesToGb: (value?: number, total?: number) => string[];
|
12
12
|
export declare const formatStorageValuesToTb: (value?: number, total?: number) => string[];
|
13
13
|
export declare const formatNumber: (number?: unknown) => string;
|
14
|
-
export declare const formatPercent: (number?: unknown) => string;
|
14
|
+
export declare const formatPercent: (number?: unknown, precision?: number) => string;
|
15
15
|
export declare const formatSecondsToHours: (seconds: number) => string;
|
16
16
|
export declare const roundToPrecision: (value: number | string, precision?: number) => number;
|
17
17
|
export declare const formatCPU: (value?: number | string) => string | undefined;
|
@@ -55,12 +55,16 @@ export const formatNumber = (number) => {
|
|
55
55
|
// "," in format is delimiter sign, not delimiter itself
|
56
56
|
return configuredNumeral(number).format('0,0.[00000]');
|
57
57
|
};
|
58
|
-
export const formatPercent = (number) => {
|
58
|
+
export const formatPercent = (number, precision = 2) => {
|
59
59
|
if (!isNumeric(number)) {
|
60
60
|
return '';
|
61
61
|
}
|
62
|
-
|
63
|
-
|
62
|
+
// Numeral doesn't work well with very low numbers (for example 2e-27)
|
63
|
+
// We can receive such numbers from backend in float fields
|
64
|
+
// So we need apply toFixed before configuration
|
65
|
+
const preparedNumber = Number(number).toFixed(precision);
|
66
|
+
const configuredNumber = configuredNumeral(preparedNumber);
|
67
|
+
const format = '0.[00]%';
|
64
68
|
return configuredNumber.format(format);
|
65
69
|
};
|
66
70
|
export const formatSecondsToHours = (seconds) => {
|
@@ -68,12 +72,14 @@ export const formatSecondsToHours = (seconds) => {
|
|
68
72
|
return `${formatNumber(hours)} hours`;
|
69
73
|
};
|
70
74
|
export const roundToPrecision = (value, precision = 0) => {
|
71
|
-
|
72
|
-
|
75
|
+
// Prevent "-" counting as digit in negative values
|
76
|
+
const valueAbs = Math.abs(Number(value));
|
77
|
+
let [digits] = String(valueAbs).split('.');
|
78
|
+
if (Number(valueAbs) < 1) {
|
73
79
|
digits = '';
|
74
80
|
}
|
75
81
|
if (digits.length >= precision) {
|
76
|
-
return
|
82
|
+
return Number(Number(value).toFixed(0));
|
77
83
|
}
|
78
84
|
return Number(Number(value).toFixed(precision - digits.length));
|
79
85
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dataFormatters.js","sourceRoot":"","sources":["../../../src/utils/dataFormatters/dataFormatters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAGrD,OAAO,EACH,WAAW,IAAI,iBAAiB,EAChC,4BAA4B,GAC/B,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAC,cAAc,EAAE,eAAe,EAAC,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAC,iBAAiB,EAAC,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAC,YAAY,EAAC,MAAM,UAAU,CAAC;AACtC,OAAO,EAAC,sBAAsB,EAAE,8BAA8B,EA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AAC;QACtB,OAAO,EAAE,CAAC;IACd,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;SAAM,CAAC;QACJ,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC5B,CAAC;AACL,CAAC"}
|
@@ -3,24 +3,28 @@ import React from 'react';
|
|
3
3
|
import NiceModal from '@ebay/nice-modal-react';
|
4
4
|
import { useTypedSelector } from '..';
|
5
5
|
import { CONFIRMATION_DIALOG } from '../../../components/ConfirmationDialog/ConfirmationDialog';
|
6
|
-
import { SaveQueryButton
|
6
|
+
import { SaveQueryButton } from '../../../containers/Tenant/Query/SaveQuery/SaveQuery';
|
7
7
|
import { selectUserInput } from '../../../store/reducers/executeQuery';
|
8
8
|
import i18n from './i18n';
|
9
9
|
function ExtendedSaveQueryButton() {
|
10
10
|
const modal = NiceModal.useModal(CONFIRMATION_DIALOG);
|
11
|
-
const closeModal = () => {
|
11
|
+
const closeModal = React.useCallback(() => {
|
12
12
|
modal.hide();
|
13
13
|
modal.remove();
|
14
|
-
};
|
15
|
-
const handleSaveQuerySuccess = () => {
|
14
|
+
}, [modal]);
|
15
|
+
const handleSaveQuerySuccess = React.useCallback(() => {
|
16
16
|
modal.resolve(true);
|
17
17
|
closeModal();
|
18
|
-
};
|
19
|
-
const handleCancelQuerySave = () => {
|
18
|
+
}, [modal, closeModal]);
|
19
|
+
const handleCancelQuerySave = React.useCallback(() => {
|
20
20
|
modal.resolve(false);
|
21
21
|
closeModal();
|
22
|
-
};
|
23
|
-
|
22
|
+
}, [closeModal, modal]);
|
23
|
+
const dialogProps = React.useMemo(() => ({
|
24
|
+
onSuccess: handleSaveQuerySuccess,
|
25
|
+
onCancel: handleCancelQuerySave,
|
26
|
+
}), [handleSaveQuerySuccess, handleCancelQuerySave]);
|
27
|
+
return _jsx(SaveQueryButton, { view: "action", size: "l", dialogProps: dialogProps });
|
24
28
|
}
|
25
29
|
export async function getConfirmation() {
|
26
30
|
return await NiceModal.show(CONFIRMATION_DIALOG, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useChangeInputWithConfirmation.js","sourceRoot":"","sources":["../../../../src/utils/hooks/withConfirmation/useChangeInputWithConfirmation.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAC,gBAAgB,EAAC,MAAM,IAAI,CAAC;AACpC,OAAO,EAAC,mBAAmB,EAAC,MAAM,2DAA2D,CAAC;AAC9F,OAAO,
|
1
|
+
{"version":3,"file":"useChangeInputWithConfirmation.js","sourceRoot":"","sources":["../../../../src/utils/hooks/withConfirmation/useChangeInputWithConfirmation.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAC,gBAAgB,EAAC,MAAM,IAAI,CAAC;AACpC,OAAO,EAAC,mBAAmB,EAAC,MAAM,2DAA2D,CAAC;AAC9F,OAAO,EAAC,eAAe,EAAC,MAAM,sDAAsD,CAAC;AACrF,OAAO,EAAC,eAAe,EAAC,MAAM,sCAAsC,CAAC;AAErE,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,SAAS,uBAAuB;IAC5B,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IAEtD,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QACtC,KAAK,CAAC,IAAI,EAAE,CAAC;QACb,KAAK,CAAC,MAAM,EAAE,CAAC;IACnB,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IACZ,MAAM,sBAAsB,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QAClD,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAA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;QACX,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC,CAAC;AACN,CAAC;AAED,MAAM,UAAU,8BAA8B,CAAI,QAA2B;IACzE,MAAM,SAAS,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;IACpD,MAAM,wBAAwB,GAAG,KAAK,CAAC,OAAO,CAC1C,GAAG,EAAE,CAAC,2BAA2B,CAAI,QAAQ,CAAC,EAC9C,CAAC,QAAQ,CAAC,CACb,CAAC;IACF,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,OAAO,QAAQ,CAAC;IACpB,CAAC;IACD,OAAO,wBAAwB,CAAC;AACpC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function insertSnippetToEditor(input: string): void;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export function insertSnippetToEditor(input) {
|
2
|
+
var _a;
|
3
|
+
if (!window.ydbEditor) {
|
4
|
+
console.error('Monaco editor not found');
|
5
|
+
}
|
6
|
+
(_a = window.ydbEditor) === null || _a === void 0 ? void 0 : _a.trigger(undefined, 'insertSnippetToEditor', input);
|
7
|
+
}
|
8
|
+
//# sourceMappingURL=insertSnippet.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"insertSnippet.js","sourceRoot":"","sources":["../../../src/utils/monaco/insertSnippet.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,qBAAqB,CAAC,KAAa;;IAC/C,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,MAAA,MAAM,CAAC,SAAS,0CAAE,OAAO,CAAC,SAAS,EAAE,uBAAuB,EAAE,KAAK,CAAC,CAAC;AACzE,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import type { IProtobufTimeObject } from '../../types/api/common';
|
2
2
|
export declare const parseLag: (value: string | IProtobufTimeObject | undefined) => number;
|
3
3
|
export declare const parseTimestampToIdleTime: (value: string | IProtobufTimeObject | undefined) => number;
|
4
|
-
export declare const parseUsToMs: (value: string | number | undefined) => number;
|
4
|
+
export declare const parseUsToMs: (value: string | number | undefined, precision?: number) => number;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { roundToPrecision } from '../dataFormatters/dataFormatters';
|
1
2
|
import { isNumeric } from '../utils';
|
2
3
|
import { parseProtobufDurationToMs, parseProtobufTimestampToMs } from './protobufParsers';
|
3
4
|
export const parseLag = (value) => value ? parseProtobufDurationToMs(value) : 0;
|
@@ -10,10 +11,10 @@ export const parseTimestampToIdleTime = (value) => {
|
|
10
11
|
// Usually it below 100ms, so it could be omitted
|
11
12
|
return duration < 0 ? 0 : duration;
|
12
13
|
};
|
13
|
-
export const parseUsToMs = (value) => {
|
14
|
+
export const parseUsToMs = (value, precision = 0) => {
|
14
15
|
if (!value || !isNumeric(value)) {
|
15
16
|
return 0;
|
16
17
|
}
|
17
|
-
return
|
18
|
+
return roundToPrecision(Number(value) / 1000, precision);
|
18
19
|
};
|
19
20
|
//# sourceMappingURL=parsers.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"parsers.js","sourceRoot":"","sources":["../../../src/utils/timeParsers/parsers.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAC,yBAAyB,EAAE,0BAA0B,EAAC,MAAM,mBAAmB,CAAC;AAExF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAA+C,EAAE,EAAE,CACxE,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEjD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAA+C,EAAE,EAAE;IACxF,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,OAAO,CAAC,CAAC;IACb,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,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CAAC,GAAG,IAAI,EAAE,SAAS,CAAC,CAAC;AAC7D,CAAC,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ydb-embedded-ui",
|
3
|
-
"version": "6.
|
3
|
+
"version": "6.35.0",
|
4
4
|
"files": [
|
5
5
|
"dist"
|
6
6
|
],
|
@@ -27,6 +27,7 @@
|
|
27
27
|
"@hookform/resolvers": "^3.9.0",
|
28
28
|
"@reduxjs/toolkit": "^2.2.3",
|
29
29
|
"@tanstack/react-table": "^8.19.3",
|
30
|
+
"@ebay/nice-modal-react": "^1.2.13",
|
30
31
|
"axios": "^1.7.3",
|
31
32
|
"axios-retry": "^4.4.2",
|
32
33
|
"colord": "^2.9.3",
|
@@ -119,7 +120,6 @@
|
|
119
120
|
"devDependencies": {
|
120
121
|
"@commitlint/cli": "^19.3.0",
|
121
122
|
"@commitlint/config-conventional": "^19.2.2",
|
122
|
-
"@ebay/nice-modal-react": "^1.2.13",
|
123
123
|
"@gravity-ui/browserslist-config": "^4.3.0",
|
124
124
|
"@gravity-ui/eslint-config": "^3.2.0",
|
125
125
|
"@gravity-ui/prettier-config": "^1.1.0",
|