@yugabytedb/perf-advisor-ui 1.0.0-alpha.1
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/LICENSE +7 -0
- package/README.md +50 -0
- package/dist/cjs/index.css +1 -0
- package/dist/cjs/index.js +23 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/types.d.ts +1053 -0
- package/package.json +109 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,1053 @@
|
|
|
1
|
+
import { MUIDataTableMeta, MUIDataTableColumn, MUIDataTableOptions } from 'mui-datatables';
|
|
2
|
+
import * as axios from 'axios';
|
|
3
|
+
import React$1, { FC, ReactNode, ReactElement, ChangeEvent, HTMLAttributes, VFC } from 'react';
|
|
4
|
+
import { ButtonProps, StandardTextFieldProps, MenuProps, SelectProps, BoxProps, CheckboxProps, InputProps, DialogProps, DialogContentProps, PopperProps, TooltipProps, SwitchProps, FormControlLabelProps } from '@material-ui/core';
|
|
5
|
+
import { LinkProps } from 'react-router-dom';
|
|
6
|
+
import * as _material_ui_core_styles_withStyles from '@material-ui/core/styles/withStyles';
|
|
7
|
+
import { FieldValues, UseControllerProps } from 'react-hook-form';
|
|
8
|
+
import { FetchNextPageOptions, InfiniteQueryObserverResult } from 'react-query';
|
|
9
|
+
|
|
10
|
+
interface Universe {
|
|
11
|
+
creationDate: string;
|
|
12
|
+
name: string;
|
|
13
|
+
ashEnabled: boolean;
|
|
14
|
+
ashSupported: boolean;
|
|
15
|
+
resources: Resources;
|
|
16
|
+
universeConfig: UniverseConfig;
|
|
17
|
+
universeDetails: any;
|
|
18
|
+
universeUUID: string;
|
|
19
|
+
version: number;
|
|
20
|
+
}
|
|
21
|
+
declare enum NodeState {
|
|
22
|
+
ToBeAdded = "ToBeAdded",
|
|
23
|
+
Provisioned = "Provisioned",
|
|
24
|
+
SoftwareInstalled = "SoftwareInstalled",
|
|
25
|
+
UpgradeSoftware = "UpgradeSoftware",
|
|
26
|
+
UpdateGFlags = "UpdateGFlags",
|
|
27
|
+
Live = "Live",
|
|
28
|
+
Stopping = "Stopping",
|
|
29
|
+
Starting = "Starting",
|
|
30
|
+
Stopped = "Stopped",
|
|
31
|
+
Unreachable = "Unreachable",
|
|
32
|
+
ToBeRemoved = "ToBeRemoved",
|
|
33
|
+
Removing = "Removing",
|
|
34
|
+
Removed = "Removed",
|
|
35
|
+
Adding = "Adding",
|
|
36
|
+
BeingDecommissioned = "BeingDecommissioned",
|
|
37
|
+
Decommissioned = "Decommissioned"
|
|
38
|
+
}
|
|
39
|
+
interface NodeDetails {
|
|
40
|
+
nodeIdx: number;
|
|
41
|
+
nodeName: string | null;
|
|
42
|
+
nodeUuid: string | null;
|
|
43
|
+
placementUuid: string;
|
|
44
|
+
state: NodeState;
|
|
45
|
+
}
|
|
46
|
+
interface NodeDataCloudInfo {
|
|
47
|
+
region: string;
|
|
48
|
+
zone: string;
|
|
49
|
+
}
|
|
50
|
+
interface NodeDataMetrics {
|
|
51
|
+
memory_used_bytes: number;
|
|
52
|
+
total_sst_file_size_bytes: number;
|
|
53
|
+
uncompressed_sst_file_size_bytes: number;
|
|
54
|
+
read_ops_per_sec: number;
|
|
55
|
+
write_ops_per_sec: number;
|
|
56
|
+
user_tablets_total?: number;
|
|
57
|
+
user_tablets_leaders?: number;
|
|
58
|
+
system_tablets_total?: number;
|
|
59
|
+
system_tablets_leaders?: number;
|
|
60
|
+
}
|
|
61
|
+
interface NodeData {
|
|
62
|
+
name: string;
|
|
63
|
+
is_node_up: boolean;
|
|
64
|
+
is_master: boolean;
|
|
65
|
+
is_tserver: boolean;
|
|
66
|
+
is_leader?: boolean;
|
|
67
|
+
is_read_replica?: boolean;
|
|
68
|
+
metrics: NodeDataMetrics;
|
|
69
|
+
cloud_info: NodeDataCloudInfo;
|
|
70
|
+
}
|
|
71
|
+
interface ClusterNodeListMetadata {
|
|
72
|
+
active_tablet_peers?: number;
|
|
73
|
+
tablet_peer_limit?: number;
|
|
74
|
+
}
|
|
75
|
+
interface ClusterNodeInfo {
|
|
76
|
+
data: NodeData[];
|
|
77
|
+
metadata?: ClusterNodeListMetadata;
|
|
78
|
+
}
|
|
79
|
+
interface Resources {
|
|
80
|
+
azList: string[];
|
|
81
|
+
ebsPricePerHour: number;
|
|
82
|
+
memSizeGB: number;
|
|
83
|
+
numCores: number;
|
|
84
|
+
numNodes: number;
|
|
85
|
+
pricePerHour: number;
|
|
86
|
+
volumeCount: number;
|
|
87
|
+
volumeSizeGB: number;
|
|
88
|
+
}
|
|
89
|
+
interface UniverseConfig {
|
|
90
|
+
disableAlertsUntilSecs: string;
|
|
91
|
+
takeBackups: string;
|
|
92
|
+
}
|
|
93
|
+
declare enum MetricMeasure {
|
|
94
|
+
OVERALL = "Overall",
|
|
95
|
+
OUTLIER = "Outlier",
|
|
96
|
+
OUTLIER_TABLES = "Outlier_Tables"
|
|
97
|
+
}
|
|
98
|
+
interface Anomaly {
|
|
99
|
+
uuid: string;
|
|
100
|
+
metadataUuid: string;
|
|
101
|
+
category: AnomalyCategory;
|
|
102
|
+
type: AnomalyType;
|
|
103
|
+
universeUuid: string;
|
|
104
|
+
affectedNodes: NodeInfo[];
|
|
105
|
+
graphStartTime?: Date | string;
|
|
106
|
+
graphEndTime?: Date | string;
|
|
107
|
+
affectedTables?: TableInfo[] | [];
|
|
108
|
+
title: string;
|
|
109
|
+
summary: string;
|
|
110
|
+
detectionTime: Date | string;
|
|
111
|
+
startTime: Date;
|
|
112
|
+
endTime?: Date;
|
|
113
|
+
groupId: string;
|
|
114
|
+
mainGraphs: GraphMetadata[];
|
|
115
|
+
defaultSettings: GraphSettings;
|
|
116
|
+
rcaGuidelines: RCAGuideline[];
|
|
117
|
+
isResolved?: boolean;
|
|
118
|
+
}
|
|
119
|
+
declare enum AnomalyCategory {
|
|
120
|
+
SQL = "SQL",
|
|
121
|
+
APP = "APP",
|
|
122
|
+
NODE = "NODE",
|
|
123
|
+
INFRA = "INFRA",
|
|
124
|
+
DB = "DB"
|
|
125
|
+
}
|
|
126
|
+
declare enum AnomalyType {
|
|
127
|
+
SQL_QUERY_LATENCY_INCREASE = "SQL_QUERY_LATENCY_INCREASE",
|
|
128
|
+
HOT_NODE_READS_WRITES = "HOT_NODE_READS_WRITES",
|
|
129
|
+
HOT_NODE_CPU = "HOT_NODE_CPU",
|
|
130
|
+
HOT_NODE_QUERIES = "HOT_NODE_QUERIES",
|
|
131
|
+
HOT_NODE_DATA = "HOT_NODE_DATA",
|
|
132
|
+
SLOW_DISKS = "SLOW_DISKS"
|
|
133
|
+
}
|
|
134
|
+
interface NodeInfo {
|
|
135
|
+
name: string;
|
|
136
|
+
uuid: string;
|
|
137
|
+
}
|
|
138
|
+
interface TableInfo {
|
|
139
|
+
databaseName: string;
|
|
140
|
+
tableName: string;
|
|
141
|
+
tableId: string;
|
|
142
|
+
}
|
|
143
|
+
interface RCAGuideline {
|
|
144
|
+
possibleCause: string;
|
|
145
|
+
possibleCauseDescription: string;
|
|
146
|
+
troubleshootingRecommendations: TroubleshootingRecommendations[];
|
|
147
|
+
}
|
|
148
|
+
interface TroubleshootingRecommendations {
|
|
149
|
+
recommendation: string;
|
|
150
|
+
supportingGraphs: GraphMetadata[];
|
|
151
|
+
}
|
|
152
|
+
interface GraphMetadata {
|
|
153
|
+
name: string;
|
|
154
|
+
filters: GraphFilters;
|
|
155
|
+
groupBy?: GraphLabel[];
|
|
156
|
+
groupByControl: boolean;
|
|
157
|
+
displayName?: string;
|
|
158
|
+
aggregatedLineSettings?: AggregatedLineSettings;
|
|
159
|
+
}
|
|
160
|
+
interface GraphRequestParams {
|
|
161
|
+
start: Date | string;
|
|
162
|
+
end: Date | string;
|
|
163
|
+
name: string;
|
|
164
|
+
filters: GraphFilters;
|
|
165
|
+
settings: GraphSettings;
|
|
166
|
+
groupBy?: GraphLabel[];
|
|
167
|
+
aggregatedLineSettings?: AggregatedLineSettings;
|
|
168
|
+
stepSeconds?: number;
|
|
169
|
+
}
|
|
170
|
+
declare enum GraphLabel {
|
|
171
|
+
WAIT_EVENT_COMPONENT = "waitEventComponent",
|
|
172
|
+
WAIT_EVENT_CLASS = "waitEventClass",
|
|
173
|
+
WAIT_EVENT_TYPE = "waitEventType",
|
|
174
|
+
WAIT_EVENT = "waitEvent",
|
|
175
|
+
CLIENT_NODE_IP = "clientNodeIp",
|
|
176
|
+
QUERY_ID = "queryId",
|
|
177
|
+
TABLET_ID = "tabletId"
|
|
178
|
+
}
|
|
179
|
+
interface AggregatedLineSettings {
|
|
180
|
+
aggregateBy: GraphFilters;
|
|
181
|
+
excludeFiltered: boolean;
|
|
182
|
+
aggregation: Aggregation;
|
|
183
|
+
}
|
|
184
|
+
interface GraphFilters {
|
|
185
|
+
universeUuid: string[];
|
|
186
|
+
queryId?: string[];
|
|
187
|
+
userId?: string[];
|
|
188
|
+
dbId?: string[];
|
|
189
|
+
tableId?: string[];
|
|
190
|
+
instanceName?: string[];
|
|
191
|
+
clusterUuid?: string[];
|
|
192
|
+
regionCode?: string[];
|
|
193
|
+
azCode?: string[];
|
|
194
|
+
waitEvent?: string[];
|
|
195
|
+
waitEventComponent?: string[];
|
|
196
|
+
waitEventClass?: string[];
|
|
197
|
+
waitEventType?: string[];
|
|
198
|
+
clientNodeIp?: string[];
|
|
199
|
+
tabletId?: string[];
|
|
200
|
+
metricName?: string[];
|
|
201
|
+
namespace?: string[];
|
|
202
|
+
dbName?: string[];
|
|
203
|
+
tableName?: string[];
|
|
204
|
+
schemaName?: string[];
|
|
205
|
+
}
|
|
206
|
+
interface AnomalyDetectionStatus {
|
|
207
|
+
detectionEndTime: string;
|
|
208
|
+
lastSuccessTime: string;
|
|
209
|
+
status: AnomalyDetectionStatusText;
|
|
210
|
+
statusTime: string;
|
|
211
|
+
universeUuid: string;
|
|
212
|
+
}
|
|
213
|
+
interface GraphSettings {
|
|
214
|
+
splitMode: SplitMode;
|
|
215
|
+
splitType: SplitType;
|
|
216
|
+
splitCount: number;
|
|
217
|
+
returnAggregatedValue: boolean;
|
|
218
|
+
aggregatedValueFunction: Aggregation;
|
|
219
|
+
}
|
|
220
|
+
declare const SplitMode: {
|
|
221
|
+
readonly NONE: "NONE";
|
|
222
|
+
readonly TOP: "TOP";
|
|
223
|
+
readonly BOTTOM: "BOTTOM";
|
|
224
|
+
};
|
|
225
|
+
type SplitMode = typeof SplitMode[keyof typeof SplitMode];
|
|
226
|
+
declare const SplitType: {
|
|
227
|
+
readonly NONE: "NONE";
|
|
228
|
+
readonly NODE: "NODE";
|
|
229
|
+
readonly TABLE: "TABLE";
|
|
230
|
+
readonly NAMESPACE: "NAMESPACE";
|
|
231
|
+
};
|
|
232
|
+
type SplitType = typeof SplitType[keyof typeof SplitType];
|
|
233
|
+
declare const Aggregation: {
|
|
234
|
+
readonly AVERAGE: "AVG";
|
|
235
|
+
readonly MAX: "MAX";
|
|
236
|
+
readonly MIN: "MIN";
|
|
237
|
+
readonly SUM: "SUM";
|
|
238
|
+
};
|
|
239
|
+
type Aggregation = typeof Aggregation[keyof typeof Aggregation];
|
|
240
|
+
interface GraphResponse {
|
|
241
|
+
successful: boolean;
|
|
242
|
+
errorMessage: string;
|
|
243
|
+
layout: any;
|
|
244
|
+
data: any;
|
|
245
|
+
name: string;
|
|
246
|
+
}
|
|
247
|
+
declare enum AppName {
|
|
248
|
+
YBA = "YBA",
|
|
249
|
+
YBM = "YBM",
|
|
250
|
+
YBD = "YBD",
|
|
251
|
+
WEB = "WEB"
|
|
252
|
+
}
|
|
253
|
+
declare enum QueryType {
|
|
254
|
+
SQL = "SQL",
|
|
255
|
+
CQL = "CQL"
|
|
256
|
+
}
|
|
257
|
+
declare enum GraphType {
|
|
258
|
+
SINGLE_SUPPORTING = "SINGLE_SUPPORTING",
|
|
259
|
+
MULTI_SUPPORTING = "MULTI_SUPPORTING",
|
|
260
|
+
MAIN_RCA = "MAIN_RCA"
|
|
261
|
+
}
|
|
262
|
+
interface QueryWaitEvents {
|
|
263
|
+
eps: number;
|
|
264
|
+
waitEventType: string;
|
|
265
|
+
}
|
|
266
|
+
interface UrlParams {
|
|
267
|
+
queryId: string | undefined;
|
|
268
|
+
startTime?: string | null;
|
|
269
|
+
endTime?: string | null;
|
|
270
|
+
duration?: string | null;
|
|
271
|
+
dbId?: string | null;
|
|
272
|
+
universeId: string | null;
|
|
273
|
+
userId?: string | null;
|
|
274
|
+
}
|
|
275
|
+
interface MetadataFields {
|
|
276
|
+
id: string;
|
|
277
|
+
name?: string;
|
|
278
|
+
customerId: string;
|
|
279
|
+
apiToken: string;
|
|
280
|
+
platformUrl: string;
|
|
281
|
+
metricsUrl: string;
|
|
282
|
+
metricsScrapePeriodSec: number;
|
|
283
|
+
dataMountPoints: string[];
|
|
284
|
+
otherMountPoints: string[];
|
|
285
|
+
lastSyncError?: string | null;
|
|
286
|
+
}
|
|
287
|
+
interface AuthDetails {
|
|
288
|
+
authType: string;
|
|
289
|
+
password: string;
|
|
290
|
+
setUpAuth: boolean;
|
|
291
|
+
username: string;
|
|
292
|
+
}
|
|
293
|
+
interface UniverseMetadataFields {
|
|
294
|
+
authDetails: AuthDetails;
|
|
295
|
+
customerId: string;
|
|
296
|
+
dataMountPoints: string[];
|
|
297
|
+
id: string;
|
|
298
|
+
otherMountPoints: string[];
|
|
299
|
+
}
|
|
300
|
+
interface AttachUniversePayload {
|
|
301
|
+
id: string;
|
|
302
|
+
customerId: string;
|
|
303
|
+
dataMountPoints: string[];
|
|
304
|
+
otherMountPoints: string[];
|
|
305
|
+
}
|
|
306
|
+
interface UpdateMetadataFormFields {
|
|
307
|
+
apiToken: string;
|
|
308
|
+
metricsScrapePeriodSec: number;
|
|
309
|
+
}
|
|
310
|
+
declare enum SortDirection {
|
|
311
|
+
ASC = "ASC",
|
|
312
|
+
DESC = "DESC"
|
|
313
|
+
}
|
|
314
|
+
declare enum PrimaryDashboardViewTabs {
|
|
315
|
+
ANOMALY = "Anomaly",
|
|
316
|
+
QUERY = "Query"
|
|
317
|
+
}
|
|
318
|
+
interface QueryPageParams extends TPUrlParams {
|
|
319
|
+
dbId?: string | null;
|
|
320
|
+
queryId?: string | null;
|
|
321
|
+
universeId?: string | null;
|
|
322
|
+
userId?: string | null;
|
|
323
|
+
}
|
|
324
|
+
interface TPUrlParams {
|
|
325
|
+
duration?: string | null;
|
|
326
|
+
startTime?: string | null;
|
|
327
|
+
endTime?: string | null;
|
|
328
|
+
}
|
|
329
|
+
interface TablePageParams {
|
|
330
|
+
schemaName: string;
|
|
331
|
+
namespaceName: string;
|
|
332
|
+
tableId: string;
|
|
333
|
+
universeId: string;
|
|
334
|
+
startDateTime?: string;
|
|
335
|
+
endDateTime?: string;
|
|
336
|
+
}
|
|
337
|
+
interface UniverseQueryData {
|
|
338
|
+
dbName: string;
|
|
339
|
+
id: QueryPageParams;
|
|
340
|
+
lastHourCalls?: number;
|
|
341
|
+
lastHourTotalTime?: number;
|
|
342
|
+
lastHourLatencyAvg?: number;
|
|
343
|
+
lastHourLatencyP90?: number;
|
|
344
|
+
lastHourLatencyP99?: number;
|
|
345
|
+
lastHourRowsAvg?: number;
|
|
346
|
+
lastHourRps?: number;
|
|
347
|
+
lastHourStatsTimestamp?: string;
|
|
348
|
+
query: string;
|
|
349
|
+
userName?: string;
|
|
350
|
+
scheduledTimestamp: string;
|
|
351
|
+
}
|
|
352
|
+
interface Events {
|
|
353
|
+
eps: number;
|
|
354
|
+
waitEventType: string;
|
|
355
|
+
}
|
|
356
|
+
interface UniverseQueryStatsData {
|
|
357
|
+
databaseId: string;
|
|
358
|
+
eps: number;
|
|
359
|
+
events: Events[];
|
|
360
|
+
query: string;
|
|
361
|
+
queryId: string;
|
|
362
|
+
queryType: QueryType;
|
|
363
|
+
rowsAvg: number;
|
|
364
|
+
rps: number;
|
|
365
|
+
totalTime: number;
|
|
366
|
+
universeId: string;
|
|
367
|
+
namespaceName: string;
|
|
368
|
+
firstActive: string;
|
|
369
|
+
lastActive: string;
|
|
370
|
+
latencyAvg: string;
|
|
371
|
+
latencyP90: string;
|
|
372
|
+
latencyP99: string;
|
|
373
|
+
}
|
|
374
|
+
interface RowItemClasses$1 {
|
|
375
|
+
rowTableCell: string;
|
|
376
|
+
queryTableCell: string;
|
|
377
|
+
queryCodeElement: string;
|
|
378
|
+
queryPreBlock: string;
|
|
379
|
+
queryContainerCode: string;
|
|
380
|
+
overrideExpandBtn: string;
|
|
381
|
+
}
|
|
382
|
+
declare enum TPFeatureFlags {
|
|
383
|
+
SHOW_QUERY_STATS_TIMESTAMP = "showStatsTimestamp",
|
|
384
|
+
SHOW_CLEANUP_HISTORICAL_DATA = "showCleanupHistoricalData",
|
|
385
|
+
SHOW_ADVANCED_VIEW = "showAdvancedView"
|
|
386
|
+
}
|
|
387
|
+
declare enum AnomalyDetectionStatusText {
|
|
388
|
+
EMPTY = "EMPTY",
|
|
389
|
+
SCHEDULED = "SCHEDULED",
|
|
390
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
391
|
+
SUCCESS = "SUCCESS",
|
|
392
|
+
FAILURE = "FAILURE"
|
|
393
|
+
}
|
|
394
|
+
interface RuntimeConfigData {
|
|
395
|
+
description: string;
|
|
396
|
+
overriden: boolean;
|
|
397
|
+
path: string;
|
|
398
|
+
type: string;
|
|
399
|
+
value: string;
|
|
400
|
+
}
|
|
401
|
+
interface UpdateRuntimeConfigFormFields {
|
|
402
|
+
configValue: string | boolean;
|
|
403
|
+
}
|
|
404
|
+
declare enum RuntimeConfigType {
|
|
405
|
+
TEXT = "TEXT",
|
|
406
|
+
INT = "INT",
|
|
407
|
+
FLOAT = "FLOAT",
|
|
408
|
+
BOOL = "BOOL",
|
|
409
|
+
DURATION = "DURATION"
|
|
410
|
+
}
|
|
411
|
+
interface AnomalyInstance {
|
|
412
|
+
detectionTime: string;
|
|
413
|
+
endTime: string;
|
|
414
|
+
entityDisplayName: string;
|
|
415
|
+
entityId: string;
|
|
416
|
+
graphEndTime: string;
|
|
417
|
+
graphStartTime: string;
|
|
418
|
+
groupId: string;
|
|
419
|
+
lastUpdateTime: string;
|
|
420
|
+
category: string;
|
|
421
|
+
title: string;
|
|
422
|
+
type: string;
|
|
423
|
+
startTime: string;
|
|
424
|
+
summary: string;
|
|
425
|
+
universeUuid: string;
|
|
426
|
+
uuid: string;
|
|
427
|
+
metadataUuid: string;
|
|
428
|
+
affectedNodes: NodeInfo[];
|
|
429
|
+
affectedTables?: TableInfo[] | [];
|
|
430
|
+
mainGraphs: GraphMetadata[];
|
|
431
|
+
defaultSettings: GraphSettings;
|
|
432
|
+
rcaGuidelines: RCAGuideline[];
|
|
433
|
+
isResolved?: boolean;
|
|
434
|
+
}
|
|
435
|
+
interface Interval {
|
|
436
|
+
startTime: string;
|
|
437
|
+
endTime: string;
|
|
438
|
+
}
|
|
439
|
+
interface AnomalyGroup {
|
|
440
|
+
lastInstance: AnomalyInstance;
|
|
441
|
+
anomalyIntervals: Interval[];
|
|
442
|
+
}
|
|
443
|
+
interface FormattedAnomalyRca {
|
|
444
|
+
cause: string;
|
|
445
|
+
name: string[];
|
|
446
|
+
title: string;
|
|
447
|
+
groupByControl: boolean[];
|
|
448
|
+
description: string;
|
|
449
|
+
index: number[];
|
|
450
|
+
rcaRecommendation?: string;
|
|
451
|
+
}
|
|
452
|
+
interface AnomalyDetails {
|
|
453
|
+
groups: AnomalyGroup[];
|
|
454
|
+
hasMore: boolean;
|
|
455
|
+
totalCount: number;
|
|
456
|
+
}
|
|
457
|
+
interface AnomalyResponse {
|
|
458
|
+
[category: string]: {
|
|
459
|
+
[type: string]: AnomalyDetails;
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
declare enum InsightsTabs {
|
|
463
|
+
ANOMALIES = "Detected Anomalies",
|
|
464
|
+
QUERIES = "Queries",
|
|
465
|
+
METRICS = "Metrics"
|
|
466
|
+
}
|
|
467
|
+
interface ColumnOptions {
|
|
468
|
+
sort?: boolean;
|
|
469
|
+
display?: boolean;
|
|
470
|
+
filter?: boolean;
|
|
471
|
+
setCellHeaderProps?: () => {
|
|
472
|
+
style: React.CSSProperties;
|
|
473
|
+
className: string;
|
|
474
|
+
};
|
|
475
|
+
customBodyRender?: (value: any, tableMeta: MUIDataTableMeta) => React.ReactNode;
|
|
476
|
+
}
|
|
477
|
+
interface Column {
|
|
478
|
+
label: string;
|
|
479
|
+
name: string;
|
|
480
|
+
options?: ColumnOptions;
|
|
481
|
+
}
|
|
482
|
+
interface GraphAxisData {
|
|
483
|
+
labels: Record<string, string>;
|
|
484
|
+
name: string;
|
|
485
|
+
type: string;
|
|
486
|
+
waitEventType: string;
|
|
487
|
+
x: number[] | string[];
|
|
488
|
+
y: string[];
|
|
489
|
+
}
|
|
490
|
+
interface SupportedGroupBy {
|
|
491
|
+
label: string;
|
|
492
|
+
name: string;
|
|
493
|
+
}
|
|
494
|
+
interface GraphLayoutData {
|
|
495
|
+
title: string;
|
|
496
|
+
metadata: {
|
|
497
|
+
currentGroupBy: string[];
|
|
498
|
+
supportedGroupBy: SupportedGroupBy[];
|
|
499
|
+
};
|
|
500
|
+
type: string;
|
|
501
|
+
xaxis: {
|
|
502
|
+
type: string;
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
interface ClusterLoadResponseData {
|
|
506
|
+
data: GraphAxisData[];
|
|
507
|
+
layout: GraphLayoutData;
|
|
508
|
+
name: string;
|
|
509
|
+
stepSeconds: number;
|
|
510
|
+
successful: boolean;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
interface MetricsAnalysisEntryProps {
|
|
514
|
+
universeUuid: string;
|
|
515
|
+
troubleshootUuid: string | null;
|
|
516
|
+
shouldAnalyzeTopK?: boolean;
|
|
517
|
+
universeData: Universe | ClusterNodeInfo;
|
|
518
|
+
appName: AppName;
|
|
519
|
+
timezone?: string;
|
|
520
|
+
apiUrl: string;
|
|
521
|
+
onSelectedIssue?: (troubleshootUuid: string | null, params?: TPUrlParams) => void;
|
|
522
|
+
onSelectedQuery?: (queryId: string | null, params?: QueryPageParams) => void;
|
|
523
|
+
}
|
|
524
|
+
declare const MetricsAnalysisEntry: ({ universeUuid, troubleshootUuid, universeData, appName, timezone, apiUrl, shouldAnalyzeTopK, onSelectedIssue, onSelectedQuery }: MetricsAnalysisEntryProps) => JSX.Element;
|
|
525
|
+
|
|
526
|
+
interface PerfAdvisorEntryProps {
|
|
527
|
+
timezone?: string;
|
|
528
|
+
universeUuid: string;
|
|
529
|
+
appName: AppName;
|
|
530
|
+
apiUrl: string;
|
|
531
|
+
onSelectedIssue?: (troubleshootUuid: string, params?: TPUrlParams) => void;
|
|
532
|
+
onSelectedQuery?: (queryId: string, params?: QueryPageParams) => void;
|
|
533
|
+
}
|
|
534
|
+
declare const PerfAdvisorEntry: ({ timezone, universeUuid, appName, apiUrl, onSelectedIssue, onSelectedQuery }: PerfAdvisorEntryProps) => JSX.Element;
|
|
535
|
+
|
|
536
|
+
interface RuntimeConfigsProps {
|
|
537
|
+
apiUrl: string;
|
|
538
|
+
appName: AppName;
|
|
539
|
+
toast: {
|
|
540
|
+
success: (message: string) => void;
|
|
541
|
+
error: (message: string) => void;
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
declare const RuntimeConfigs: ({ apiUrl, appName, toast }: RuntimeConfigsProps) => JSX.Element;
|
|
545
|
+
|
|
546
|
+
declare enum QUERY_KEY {
|
|
547
|
+
fetchAnomalies = "fetchAnomalies",
|
|
548
|
+
fetchGraphs = "fetchGraphs",
|
|
549
|
+
fetchQueries = "fetchQueries",
|
|
550
|
+
fetchUniverseMetadataList = "fetchUniverseMetadataList",
|
|
551
|
+
deleteUniverseMetadata = "deleteUniverseMetadata",
|
|
552
|
+
updateUniverseMetadata = "updateUniverseMetadata",
|
|
553
|
+
fetchUniverseListDetails = "fetchUniverseListDetails",
|
|
554
|
+
fetchUniverseById = "fetchUniverseById",
|
|
555
|
+
fetchAnomalyDetectionStatus = "fetchAnomalyDetectionStatus",
|
|
556
|
+
scheduleAnomalyDetectionStatus = "scheduleAnomalyDetectionStatus",
|
|
557
|
+
fetchAnomaliesPage = "fetchAnomaliesPage",
|
|
558
|
+
fetchQueriesPage = "fetchQueriesPage",
|
|
559
|
+
fetchQueriesStatsPage = "fetchQueriesStatsPage",
|
|
560
|
+
fetchQueriesDatabases = "fetchQueriesDatabases",
|
|
561
|
+
fetchCustomerMetadataList = "fetchCustomerMetadataList",
|
|
562
|
+
fetchQueryStats = "fetchQueryStats",
|
|
563
|
+
fetchTablesPage = "fetchTablesPage",
|
|
564
|
+
fetchNamespaces = "fetchNamespaces",
|
|
565
|
+
deleteRuntimeConfig = "deleteRuntimeConfig",
|
|
566
|
+
fetchRuntimeConfigs = "fetchRuntimeConfigs",
|
|
567
|
+
fetchSpecificRuntimeConfigs = "fetchSpecificRuntimeConfigs",
|
|
568
|
+
fetchSpecificRuntimeConfigsKey = "fetchSpecificRuntimeConfigsKey",
|
|
569
|
+
updateRuntimeConfig = "updateRuntimeConfig",
|
|
570
|
+
fetchAnomalyGroups = "fetchAnomalyGroups",
|
|
571
|
+
fetchAnomalyGroupsByType = "fetchAnomalyGroupsByType",
|
|
572
|
+
fetchAnomalyGroupsById = "fetchAnomalyGroupsById",
|
|
573
|
+
getUniverseMetadata = "getUniverseMetadata",
|
|
574
|
+
fetchMetricsGraphs = "fetchMetricsGraphs"
|
|
575
|
+
}
|
|
576
|
+
declare class ApiService {
|
|
577
|
+
fetchAnomalies: (universeUuid: string, startTime?: Date | null, endTime?: Date | null, apiUrl?: string) => Promise<Anomaly[]>;
|
|
578
|
+
fetchAnomaliesPage: (universeUuid: string, pageno: number, apiUrl?: string, records_to_fetch?: number, startTime?: Date | null, endTime?: Date | null, category?: any, searchInput?: string) => Promise<axios.AxiosResponse<Anomaly[]>>;
|
|
579
|
+
fetchQueriesPage: (universeUuid: string, payload: any) => Promise<axios.AxiosResponse<GraphRequestParams[]>>;
|
|
580
|
+
fetchQueriesStatsPage: (universeUuid: string, payload: any) => Promise<axios.AxiosResponse<GraphRequestParams[]>>;
|
|
581
|
+
fetchNamespaceSchemas: (universeUuid: string, namespaceName: string, apiUrl?: string) => Promise<string[]>;
|
|
582
|
+
fetchQueryStats: (universeUuid: string, payload: any, apiUrl?: string) => Promise<string[]>;
|
|
583
|
+
fetchTablesPage: (universeUuid: string, payload: any) => Promise<axios.AxiosResponse<any[]>>;
|
|
584
|
+
fetchNamespaces: (universeUuid: string, apiUrl?: string) => Promise<string[]>;
|
|
585
|
+
fetchQueriesDatabases: (universeUuid: string, apiUrl?: string) => Promise<string[]>;
|
|
586
|
+
fetchAnomaliesById: (universeUuid: string, anomalyUuid: string, apiUrl?: string) => Promise<Anomaly>;
|
|
587
|
+
fetchGraphs: (universeUuid: String, data: any, apiUrl?: string) => Promise<ClusterLoadResponseData[]>;
|
|
588
|
+
fetchQueries: (universeUuid: string, apiUrl?: string, queryParams?: QueryPageParams | null) => Promise<GraphRequestParams[]>;
|
|
589
|
+
fetchCustomerMetadataList: (apiUrl?: string) => Promise<MetadataFields[]>;
|
|
590
|
+
fetchCustomerMetadataById: (customerUuid: string, apiUrl?: string) => Promise<any>;
|
|
591
|
+
updateCustomerMetadata: (customerUuid: string, data: any, apiUrl?: string) => Promise<any>;
|
|
592
|
+
deleteCustomerMetadataById: (customerUuid: string, apiUrl?: string) => Promise<any>;
|
|
593
|
+
fetchUniverseMetadataList: (apiUrl?: string, customerUuid?: string, universeUuid?: string) => Promise<MetadataFields[]>;
|
|
594
|
+
getUniverseMetadata: (universeUuid: string, apiUrl?: string) => Promise<any>;
|
|
595
|
+
updateUniverseMetadata: (universeUuid: string, data: any, apiUrl?: string) => Promise<any>;
|
|
596
|
+
deleteUniverseMetadata: (universeUuid: string, apiUrl?: string) => Promise<any>;
|
|
597
|
+
fetchUniverseListDetails: (apiUrl?: string, customerUuid?: string, universeUuid?: string) => Promise<any>;
|
|
598
|
+
fetchUniverseById: (universeUuid: string, apiUrl?: string) => Promise<any>;
|
|
599
|
+
fetchAnomalyDetectionStatus: (universeUuid: string, apiUrl?: string) => Promise<AnomalyDetectionStatus>;
|
|
600
|
+
scheduleAnomalyDetectionStatus: (universeUuid: string, apiUrl?: string) => Promise<AnomalyDetectionStatus>;
|
|
601
|
+
fetchRuntimeConfigs: (scopeUuid?: string, apiUrl?: string) => Promise<string[]>;
|
|
602
|
+
fetchSpecificRuntimeConfigs: (scopeUuid: string | undefined, keys: string[], apiUrl?: string) => Promise<string[]>;
|
|
603
|
+
updateRuntimeConfig: (scopeUuid: string | undefined, configKey: string, configValue: string, apiUrl?: string) => Promise<any>;
|
|
604
|
+
deleteRuntimeConfig: (scopeUuid: string | undefined, configKey: string, apiUrl?: string) => Promise<any>;
|
|
605
|
+
fetchAnomalyGroups: (universeUuid: string, startTime: string | null, endTime: string | null, apiUrl?: string) => {};
|
|
606
|
+
fetchAnomalyGroupsByType: (universeUuid: string, startTime: string, endTime: string, anomalyType: string, apiUrl?: string) => Promise<AnomalyGroup[]>;
|
|
607
|
+
fetchAnomalyGroupById: (universeUuid: string, anomalyGroupId: string, startTime: string, endTime: string, apiUrl?: string) => {};
|
|
608
|
+
}
|
|
609
|
+
declare const TroubleshootAPI: ApiService;
|
|
610
|
+
|
|
611
|
+
type MUIButtonProps = ButtonProps & Partial<LinkProps>;
|
|
612
|
+
interface YBButtonProps extends Omit<MUIButtonProps, 'variant' | 'color' | 'classes'> {
|
|
613
|
+
variant?: 'primary' | 'secondary' | 'ghost' | 'gradient' | 'pill';
|
|
614
|
+
showSpinner?: boolean;
|
|
615
|
+
selected?: boolean;
|
|
616
|
+
}
|
|
617
|
+
declare const YBButton: FC<YBButtonProps>;
|
|
618
|
+
|
|
619
|
+
interface CodeBlockProps$1 {
|
|
620
|
+
analyticsEventOnCopy?: string;
|
|
621
|
+
analyticsEventProps?: Record<string, string>;
|
|
622
|
+
showCopyButton?: boolean;
|
|
623
|
+
multiBlock?: boolean;
|
|
624
|
+
codeClassName?: string;
|
|
625
|
+
preClassName?: string;
|
|
626
|
+
lang?: 'sql' | 'plaintext';
|
|
627
|
+
containerClassName?: string;
|
|
628
|
+
text: string | string[] | React$1.ReactElement | React$1.ReactElement[];
|
|
629
|
+
dataTestId?: string;
|
|
630
|
+
}
|
|
631
|
+
declare const YBCodeBlock: FC<CodeBlockProps$1>;
|
|
632
|
+
|
|
633
|
+
interface CodeBlockProps {
|
|
634
|
+
showCopyButton?: boolean;
|
|
635
|
+
analyticsEventProps?: Record<string, string>;
|
|
636
|
+
multiBlock?: boolean;
|
|
637
|
+
codeClassName?: string;
|
|
638
|
+
preClassName?: string;
|
|
639
|
+
lang?: string;
|
|
640
|
+
containerClassName?: string;
|
|
641
|
+
text: string | string[] | React$1.ReactElement | React$1.ReactElement[];
|
|
642
|
+
dataTestId?: string;
|
|
643
|
+
enabledExpandCollapse?: boolean;
|
|
644
|
+
showExpandCollapse?: boolean;
|
|
645
|
+
collapseHeight?: number;
|
|
646
|
+
}
|
|
647
|
+
declare const YBCodeBlockCopy: FC<CodeBlockProps>;
|
|
648
|
+
|
|
649
|
+
declare const useCodeBlockStyles: (props?: any) => _material_ui_core_styles_withStyles.ClassNameMap<"searchBox" | "refreshBtn" | "tableHeaderCell" | "rowTableCell" | "tableContainer" | "tableRow" | "queryTableRow" | "queryTableCell" | "queryPreBlock" | "queryCodeElement" | "queryContainerCode" | "defaultActions" | "overrideExpandBtn">;
|
|
650
|
+
|
|
651
|
+
interface YBErrorIndicatorProps {
|
|
652
|
+
type?: string;
|
|
653
|
+
uuid?: string;
|
|
654
|
+
customErrorMessage?: string;
|
|
655
|
+
}
|
|
656
|
+
declare const YBErrorIndicator: ({ type, uuid, customErrorMessage }: YBErrorIndicatorProps) => JSX.Element;
|
|
657
|
+
|
|
658
|
+
interface YBLabelProps {
|
|
659
|
+
className?: string;
|
|
660
|
+
dataTestId?: string;
|
|
661
|
+
width?: string;
|
|
662
|
+
}
|
|
663
|
+
declare const YBLabel: FC<YBLabelProps>;
|
|
664
|
+
|
|
665
|
+
type YBInputProps = {
|
|
666
|
+
tooltip?: ReactNode;
|
|
667
|
+
} & Omit<StandardTextFieldProps, 'variant' | 'color' | 'classes' | 'size' | 'select' | 'FormHelperTextProps' | 'SelectProps'>;
|
|
668
|
+
declare const YBInput: FC<YBInputProps>;
|
|
669
|
+
|
|
670
|
+
type YBInputFieldProps$1<T extends FieldValues> = UseControllerProps<T> & YBInputProps;
|
|
671
|
+
declare const YBInputField: <T extends FieldValues>(props: YBInputFieldProps$1<T>) => ReactElement;
|
|
672
|
+
|
|
673
|
+
type YBSelectProps = {
|
|
674
|
+
tooltip?: ReactNode;
|
|
675
|
+
renderValue?: (value: unknown) => ReactNode;
|
|
676
|
+
menuProps?: Partial<MenuProps>;
|
|
677
|
+
selectProps?: Partial<SelectProps>;
|
|
678
|
+
} & Omit<StandardTextFieldProps, 'variant' | 'color' | 'classes' | 'select' | 'size' | 'placeholder' | 'FormHelperTextProps' | 'SelectProps'>;
|
|
679
|
+
declare const YBSelect: FC<YBSelectProps>;
|
|
680
|
+
|
|
681
|
+
interface GenericFailureProps extends BoxProps {
|
|
682
|
+
text?: string;
|
|
683
|
+
}
|
|
684
|
+
declare const GenericFailure: FC<GenericFailureProps>;
|
|
685
|
+
|
|
686
|
+
declare enum AlertVariant {
|
|
687
|
+
Info = "info",
|
|
688
|
+
Warning = "warning",
|
|
689
|
+
Error = "error",
|
|
690
|
+
Success = "success",
|
|
691
|
+
InProgress = "inProgress"
|
|
692
|
+
}
|
|
693
|
+
interface TransitionProps {
|
|
694
|
+
appear?: number;
|
|
695
|
+
enter?: number;
|
|
696
|
+
exit?: number;
|
|
697
|
+
}
|
|
698
|
+
interface AlertProps {
|
|
699
|
+
open: boolean;
|
|
700
|
+
text: string | ReactNode;
|
|
701
|
+
icon?: ReactNode;
|
|
702
|
+
onClose?: () => void;
|
|
703
|
+
autoDismiss?: number;
|
|
704
|
+
width?: number;
|
|
705
|
+
isToast?: boolean;
|
|
706
|
+
variant?: AlertVariant;
|
|
707
|
+
key?: string | number;
|
|
708
|
+
position?: number;
|
|
709
|
+
className?: string;
|
|
710
|
+
dataTestId?: string;
|
|
711
|
+
transitionTimeout?: number | TransitionProps;
|
|
712
|
+
}
|
|
713
|
+
declare const YBAlert: FC<AlertProps>;
|
|
714
|
+
|
|
715
|
+
interface YBCheckboxProps extends CheckboxProps {
|
|
716
|
+
label: React$1.ReactNode;
|
|
717
|
+
labelClassName?: string;
|
|
718
|
+
showCheckedIcon?: boolean;
|
|
719
|
+
inputProps?: InputProps['inputProps'];
|
|
720
|
+
}
|
|
721
|
+
declare const YBCheckbox: FC<YBCheckboxProps>;
|
|
722
|
+
|
|
723
|
+
interface YBDateTimePickerProps {
|
|
724
|
+
defaultDateTimeValue?: string;
|
|
725
|
+
dateTimeLabel: string;
|
|
726
|
+
value: string;
|
|
727
|
+
className?: any;
|
|
728
|
+
errorMsg?: string;
|
|
729
|
+
onChange: (selectedValue: ChangeEvent<HTMLInputElement>) => void;
|
|
730
|
+
disabled?: boolean;
|
|
731
|
+
}
|
|
732
|
+
declare const YBDateTimePicker: ({ defaultDateTimeValue, dateTimeLabel, value, errorMsg, onChange, className, disabled }: YBDateTimePickerProps) => JSX.Element;
|
|
733
|
+
|
|
734
|
+
interface OverrideButtonProps {
|
|
735
|
+
primary?: YBButtonProps;
|
|
736
|
+
secondary?: YBButtonProps;
|
|
737
|
+
}
|
|
738
|
+
interface YBModalProps extends DialogProps {
|
|
739
|
+
title?: string;
|
|
740
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
741
|
+
overrideHeight?: string | number;
|
|
742
|
+
overrideWidth?: string | number;
|
|
743
|
+
isSidePanel?: boolean;
|
|
744
|
+
titleSeparator?: boolean;
|
|
745
|
+
titleIcon?: React$1.ReactNode;
|
|
746
|
+
actionsInfo?: React$1.ReactNode;
|
|
747
|
+
onClose?: () => void;
|
|
748
|
+
onSubmit?: () => void;
|
|
749
|
+
enableBackdropDismiss?: boolean;
|
|
750
|
+
submitLabel?: string;
|
|
751
|
+
submitButtonTooltip?: string | ReactElement;
|
|
752
|
+
submitTestId?: string;
|
|
753
|
+
customSubmitButton?: React$1.ReactNode;
|
|
754
|
+
cancelLabel?: React$1.ReactNode;
|
|
755
|
+
cancelButtonTooltip?: string;
|
|
756
|
+
cancelTestId?: string;
|
|
757
|
+
buttonProps?: OverrideButtonProps;
|
|
758
|
+
customTitle?: React$1.ReactNode;
|
|
759
|
+
hideCloseBtn?: boolean;
|
|
760
|
+
dialogContentProps?: DialogContentProps;
|
|
761
|
+
formProps?: React$1.HTMLProps<HTMLFormElement>;
|
|
762
|
+
gradientTag?: string;
|
|
763
|
+
}
|
|
764
|
+
declare const YBModal: FC<YBModalProps>;
|
|
765
|
+
|
|
766
|
+
interface YBInfinitePaginationProps<T> {
|
|
767
|
+
dataPrefetchFn: (options?: FetchNextPageOptions | undefined) => Promise<InfiniteQueryObserverResult<T, unknown>>;
|
|
768
|
+
page: number;
|
|
769
|
+
rowsPerPage?: number;
|
|
770
|
+
rowsPerPageOptions?: number[];
|
|
771
|
+
total: number;
|
|
772
|
+
showRecordsPerPage?: boolean;
|
|
773
|
+
recordsPerPageCaption?: string | React$1.ReactNode;
|
|
774
|
+
onPageChange: (newPage: number) => void;
|
|
775
|
+
onPageSizeChange: (newSize: string | number) => void;
|
|
776
|
+
hasMoreData?: boolean;
|
|
777
|
+
}
|
|
778
|
+
declare const YBInfinitePagination: <T>({ dataPrefetchFn, page, onPageChange, onPageSizeChange, hasMoreData, total, rowsPerPageOptions, rowsPerPage, showRecordsPerPage, recordsPerPageCaption }: YBInfinitePaginationProps<T>) => React$1.ReactElement;
|
|
779
|
+
|
|
780
|
+
interface PaginationProps {
|
|
781
|
+
onPageSelect: (pageNo: number) => void;
|
|
782
|
+
pageSize?: number;
|
|
783
|
+
currentPage?: number;
|
|
784
|
+
hasMore?: boolean;
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* Note that pagination for this component corresponds to the page number and is one-indexed
|
|
788
|
+
*/
|
|
789
|
+
declare const YBPagination: FC<PaginationProps>;
|
|
790
|
+
|
|
791
|
+
interface YBPanelItemProps {
|
|
792
|
+
noBackground?: boolean;
|
|
793
|
+
className?: any;
|
|
794
|
+
bodyClassName?: any;
|
|
795
|
+
children?: any;
|
|
796
|
+
header?: any;
|
|
797
|
+
body: any;
|
|
798
|
+
title?: string;
|
|
799
|
+
}
|
|
800
|
+
declare const YBPanelItem: ({ noBackground, className, bodyClassName, children, body, header, title, }: YBPanelItemProps) => JSX.Element;
|
|
801
|
+
|
|
802
|
+
interface CustomTableOptions extends MUIDataTableOptions {
|
|
803
|
+
customHeader?: ReactNode;
|
|
804
|
+
}
|
|
805
|
+
interface YBTableProps extends HTMLAttributes<unknown> {
|
|
806
|
+
tableTitle?: ReactNode;
|
|
807
|
+
selectableRows?: 'single' | 'multiple' | 'none';
|
|
808
|
+
data: (Record<any, any> | number[] | string[])[];
|
|
809
|
+
columns: MUIDataTableColumn[];
|
|
810
|
+
options?: CustomTableOptions;
|
|
811
|
+
withBorder?: boolean;
|
|
812
|
+
dataTestId?: string;
|
|
813
|
+
}
|
|
814
|
+
declare const YBTable: ({ tableTitle, selectableRows, withBorder, data, columns, options, className, dataTestId }: YBTableProps) => ReactElement;
|
|
815
|
+
|
|
816
|
+
type CustomFooterFunction = (count: number, page: number, rowsPerPage: number, changeRowsPerPage: (newPage: string | number) => void, changePage: (newPage: number) => void) => ReactNode;
|
|
817
|
+
declare const getCustomFooterComponent: <T>(fetchNextPage: (options?: FetchNextPageOptions) => Promise<InfiniteQueryObserverResult<T, unknown>>, pageSizeCaptionText: string, dataLength: number, hasNextPage?: boolean) => CustomFooterFunction | undefined;
|
|
818
|
+
|
|
819
|
+
interface RowItemClasses {
|
|
820
|
+
rowTableCell: string;
|
|
821
|
+
queryTableCell: string;
|
|
822
|
+
queryCodeElement: string;
|
|
823
|
+
queryPreBlock: string;
|
|
824
|
+
queryContainerCode: string;
|
|
825
|
+
overrideExpandBtn: string;
|
|
826
|
+
}
|
|
827
|
+
declare const getRowCellComponent: (appName: AppName, currentTablePage: number, displayedRows: any[], classes: any & RowItemClasses, showQuery: boolean, tableColumns: MUIDataTableColumn[], ignoredColumns: string[], startTime: string | null, endTime: string | null, expandedRowIndex: number | null, handleExpandedRowIndex: (index: number | null) => void, onSelectedQuery?: ((queryId: string, params: QueryPageParams) => void) | undefined) => (data: any[], dataIndex: number) => ReactNode;
|
|
828
|
+
|
|
829
|
+
type YBTooltipProps = {
|
|
830
|
+
children?: ReactElement;
|
|
831
|
+
dark?: boolean;
|
|
832
|
+
PopperProps?: Partial<PopperProps> & {
|
|
833
|
+
'data-testid'?: string;
|
|
834
|
+
};
|
|
835
|
+
} & Omit<TooltipProps, 'children'>;
|
|
836
|
+
declare const YBTooltip: VFC<YBTooltipProps>;
|
|
837
|
+
|
|
838
|
+
interface YBToggleProps extends SwitchProps {
|
|
839
|
+
label?: string;
|
|
840
|
+
formControlLabelProps?: Partial<FormControlLabelProps>;
|
|
841
|
+
inputProps?: InputProps['inputProps'];
|
|
842
|
+
}
|
|
843
|
+
declare const YBToggle: FC<YBToggleProps>;
|
|
844
|
+
|
|
845
|
+
type YBInputFieldProps<T extends FieldValues> = UseControllerProps<T> & YBToggleProps;
|
|
846
|
+
declare const YBToggleField: <T extends FieldValues>(props: YBInputFieldProps<T>) => ReactElement;
|
|
847
|
+
|
|
848
|
+
interface MetricSplitSelectorProps {
|
|
849
|
+
metricSplitSelectors: any;
|
|
850
|
+
anomalyData?: Anomaly | null;
|
|
851
|
+
onSplitTypeSelected: (selectedOption: MetricMeasure) => void;
|
|
852
|
+
}
|
|
853
|
+
declare const MetricSplitSelector: ({ metricSplitSelectors, onSplitTypeSelected, anomalyData }: MetricSplitSelectorProps) => JSX.Element;
|
|
854
|
+
|
|
855
|
+
interface OutlierSelectorProps {
|
|
856
|
+
metricOutlierSelectors: any;
|
|
857
|
+
selectedNumNodes: number;
|
|
858
|
+
outlierType: SplitMode;
|
|
859
|
+
onOutlierTypeSelected: (selectedOption: SplitMode) => void;
|
|
860
|
+
onNumNodesChanged: (numNodes: number) => void;
|
|
861
|
+
}
|
|
862
|
+
declare const OutlierSelector: ({ metricOutlierSelectors, selectedNumNodes, outlierType, onOutlierTypeSelected, onNumNodesChanged }: OutlierSelectorProps) => JSX.Element;
|
|
863
|
+
|
|
864
|
+
interface ClusterRegionSelectorProps$1 {
|
|
865
|
+
selectedItem: string;
|
|
866
|
+
primaryZoneToNodesMap: any;
|
|
867
|
+
asyncZoneToNodesMap: any;
|
|
868
|
+
onZoneNodeSelected: (isZone: boolean, isNode: boolean, selectedOption: string) => void;
|
|
869
|
+
}
|
|
870
|
+
declare const ZoneNodeSelector: ({ selectedItem, primaryZoneToNodesMap, asyncZoneToNodesMap, onZoneNodeSelected }: ClusterRegionSelectorProps$1) => JSX.Element;
|
|
871
|
+
|
|
872
|
+
interface ClusterRegionSelectorProps {
|
|
873
|
+
selectedItem: string;
|
|
874
|
+
primaryClusterToRegionMap: any;
|
|
875
|
+
asyncClusterToRegionMap: any;
|
|
876
|
+
onClusterRegionSelected: (isCluster: boolean, isRegion: boolean, selectedOption: string, isPrimaryCluster: boolean) => void;
|
|
877
|
+
}
|
|
878
|
+
declare const ClusterRegionSelector: ({ selectedItem, primaryClusterToRegionMap, asyncClusterToRegionMap, onClusterRegionSelected }: ClusterRegionSelectorProps) => JSX.Element;
|
|
879
|
+
|
|
880
|
+
type YBCheckboxFieldProps<T extends FieldValues> = UseControllerProps<T> & YBCheckboxProps;
|
|
881
|
+
declare const YBCheckboxField: <T extends FieldValues>(props: YBCheckboxFieldProps<T>) => ReactElement;
|
|
882
|
+
|
|
883
|
+
declare const IN_DEVELOPMENT_MODE: boolean;
|
|
884
|
+
declare const REACT_APP_API_URL: string;
|
|
885
|
+
|
|
886
|
+
declare const ALL_REGIONS = "All Regions and Clusters";
|
|
887
|
+
declare const ALL = "All";
|
|
888
|
+
declare const ALL_ZONES = "All Zones and Nodes";
|
|
889
|
+
declare const ASH = "ASH";
|
|
890
|
+
declare const MIN_OUTLIER_NUM_NODES = 3;
|
|
891
|
+
declare const MAX_OUTLIER_NUM_NODES = 10;
|
|
892
|
+
declare const METRIC_FONT = "Inter";
|
|
893
|
+
declare const MetricConsts: {
|
|
894
|
+
readonly NODE_AVERAGE: "Selected Nodes Average";
|
|
895
|
+
readonly ALL: "all";
|
|
896
|
+
readonly TOP: "top";
|
|
897
|
+
readonly PRIMARY: "PRIMARY";
|
|
898
|
+
};
|
|
899
|
+
declare const metricSplitSelectors: readonly [{
|
|
900
|
+
readonly value: MetricMeasure.OVERALL;
|
|
901
|
+
readonly label: "Overall";
|
|
902
|
+
}, {
|
|
903
|
+
readonly value: MetricMeasure.OUTLIER;
|
|
904
|
+
readonly label: "Outlier Nodes";
|
|
905
|
+
readonly k8label: "Outlier Pods";
|
|
906
|
+
}, {
|
|
907
|
+
readonly value: MetricMeasure.OUTLIER_TABLES;
|
|
908
|
+
readonly label: "Outlier Tables";
|
|
909
|
+
}];
|
|
910
|
+
declare const metricOutlierSelectors: readonly [{
|
|
911
|
+
readonly value: "TOP";
|
|
912
|
+
readonly label: "Top";
|
|
913
|
+
}, {
|
|
914
|
+
readonly value: "BOTTOM";
|
|
915
|
+
readonly label: "Bottom";
|
|
916
|
+
}];
|
|
917
|
+
declare const TABLE_REQUEST_GRAPHS: string[];
|
|
918
|
+
declare const QUERY_REQUEST_GRAPHS: string[];
|
|
919
|
+
declare const CQL_QUERY_REQUEST_GRAPHS: string[];
|
|
920
|
+
declare const TABLET_REQUEST_GRAPHS: string[];
|
|
921
|
+
declare const ASH_GROUPBY_VALUES: {
|
|
922
|
+
WAIT_EVENT_COMPONENT: string;
|
|
923
|
+
WAIT_EVENT_CLASS: string;
|
|
924
|
+
WAIT_EVENT_TYPE: string;
|
|
925
|
+
WAIT_EVENT: string;
|
|
926
|
+
CLIENT_NODE_IP: string;
|
|
927
|
+
QUERY: string;
|
|
928
|
+
};
|
|
929
|
+
declare const DEFAULT_RECORDS_PER_PAGE: number[];
|
|
930
|
+
declare const ANOMALY_CATEGORY_LIST: AnomalyCategory[];
|
|
931
|
+
declare const GLOBAL_RUNTIME_CONFIG = "00000000-0000-0000-0000-000000000000";
|
|
932
|
+
declare const RUNTIME_CONFIG_KEYS: {
|
|
933
|
+
SHOW_ADVANCED_VIEW: string;
|
|
934
|
+
SHOW_CLEANUP_HISTORICAL_DATA: string;
|
|
935
|
+
SHOW_QUERIES_VIEW: string;
|
|
936
|
+
SHOW_TOPK_METRICS_VIEW: string;
|
|
937
|
+
};
|
|
938
|
+
declare const ANOMALY_TYPE_TO_NAME_MAP: Record<string, string>;
|
|
939
|
+
declare const MORE = "MORE";
|
|
940
|
+
declare const ELLIPSIS = "...";
|
|
941
|
+
declare const TIME_FILTER_LABEL: {
|
|
942
|
+
readonly ONE_HOUR: "Last 1 hour";
|
|
943
|
+
readonly SIX_HOURS: "Last 6 hours";
|
|
944
|
+
readonly TWENTYFOUR_HOURS: "Last 24 hours";
|
|
945
|
+
readonly TWO_DAYS: "Last 2 days";
|
|
946
|
+
readonly SEVEN_DAYS: "Last 7 days";
|
|
947
|
+
readonly CUSTOM: "Custom";
|
|
948
|
+
};
|
|
949
|
+
declare const TIME_FILTER_VALUES: {
|
|
950
|
+
readonly ONE_HOUR: "1h";
|
|
951
|
+
readonly SIX_HOURS: "6h";
|
|
952
|
+
readonly TWENTYFOUR_HOURS: "24h";
|
|
953
|
+
readonly TWO_DAYS: "2d";
|
|
954
|
+
readonly SEVEN_DAYS: "7d";
|
|
955
|
+
readonly CUSTOM: "Custom";
|
|
956
|
+
};
|
|
957
|
+
declare const ANOMALY_FILTER_DURATION_OPTIONS: readonly [{
|
|
958
|
+
readonly label: "Last 24 hours";
|
|
959
|
+
readonly value: "24h";
|
|
960
|
+
}, {
|
|
961
|
+
readonly label: "Last 6 hours";
|
|
962
|
+
readonly value: "6h";
|
|
963
|
+
}, {
|
|
964
|
+
readonly label: "Last 1 hour";
|
|
965
|
+
readonly value: "1h";
|
|
966
|
+
}, {
|
|
967
|
+
readonly label: "Last 2 days";
|
|
968
|
+
readonly value: "2d";
|
|
969
|
+
}, {
|
|
970
|
+
readonly label: "Last 7 days";
|
|
971
|
+
readonly value: "7d";
|
|
972
|
+
}, {
|
|
973
|
+
readonly label: "Custom";
|
|
974
|
+
readonly value: "Custom";
|
|
975
|
+
}];
|
|
976
|
+
declare const filterDurations: readonly [{
|
|
977
|
+
readonly label: "Custom";
|
|
978
|
+
readonly value: "Custom";
|
|
979
|
+
}];
|
|
980
|
+
declare const CATEGORY_HEADER_DATA_MAP: Record<any, any>;
|
|
981
|
+
declare const QUERY_DETAILS = "QUERY DETAILS";
|
|
982
|
+
declare const DB_TAG = "Database";
|
|
983
|
+
declare const USER_TAG = "User";
|
|
984
|
+
declare const TABLE_TAG = "Table";
|
|
985
|
+
declare const TABLET_TAG = "Tablet Id";
|
|
986
|
+
declare const ANOMALY_TAG = "ANOMALY";
|
|
987
|
+
declare const REGION_TAG = "Region";
|
|
988
|
+
declare const ZONE_TAG = "Zone";
|
|
989
|
+
declare const MetricOrigin: {
|
|
990
|
+
readonly TABLE: "table";
|
|
991
|
+
readonly CUSTOMER: "customer";
|
|
992
|
+
readonly UNIVERSE: "universe";
|
|
993
|
+
};
|
|
994
|
+
declare const METRIC_TABS: readonly ["ysql_ops", "ycql_ops", "server", "per_process", "disk_io", "tserver", "master", "master_advanced", "lsmdb"];
|
|
995
|
+
declare const METRIC_TABS_TABLES: string[];
|
|
996
|
+
declare const METRIC_TABLES_RESOURCES_WITH_GRAPHS: {
|
|
997
|
+
title: string;
|
|
998
|
+
name: string;
|
|
999
|
+
metrics: string[];
|
|
1000
|
+
}[];
|
|
1001
|
+
declare const METRIC_RESOURCES_WITH_GRAPHS: readonly [{
|
|
1002
|
+
readonly title: "YSQL";
|
|
1003
|
+
readonly name: "ysql_ops";
|
|
1004
|
+
readonly metrics: readonly ["ysql_server_rpc_per_second", "ysql_sql_latency", "ysql_connections", "ysql_connections_per_sec", "ysql_server_advanced_rpc_per_second", "ysql_sql_advanced_latency", "ysql_catalog_cache_misses", "ysql_conn_mgr_active_connections"];
|
|
1005
|
+
}, {
|
|
1006
|
+
readonly title: "YCQL";
|
|
1007
|
+
readonly name: "ycql_ops";
|
|
1008
|
+
readonly metrics: readonly ["cql_server_rpc_per_second", "cql_sql_latency", "cql_server_rpc_p99", "cql_sql_latency_breakdown", "cql_yb_local_vs_remote", "cql_yb_latency", "cql_reactor_latency", "tserver_rpc_queue_size_cql", "cql_response_sizes", "cql_yb_transaction", "cql_yb_rpc_connections"];
|
|
1009
|
+
}, {
|
|
1010
|
+
readonly title: "Resource";
|
|
1011
|
+
readonly name: "server";
|
|
1012
|
+
readonly metrics: readonly ["cpu_usage", "memory_usage", "disk_iops", "disk_usage_percent", "disk_used_size_total", "disk_volume_usage_percent", "disk_volume_used", "disk_bytes_per_second_per_node", "disk_io_time", "disk_io_queue_depth", "disk_io_read_latency", "disk_io_write_latency", "network_packets", "network_bytes", "network_errors", "system_load_over_time", "node_clock_skew"];
|
|
1013
|
+
}, {
|
|
1014
|
+
readonly title: "Per Process";
|
|
1015
|
+
readonly name: "per_process";
|
|
1016
|
+
readonly metrics: readonly ["process_user_cpu_seconds", "process_system_cpu_seconds", "process_virtual_memory", "process_resident_memory", "process_proportional_memory", "process_io_read", "process_io_write", "process_open_files"];
|
|
1017
|
+
}, {
|
|
1018
|
+
readonly title: "Disk I/O";
|
|
1019
|
+
readonly name: "disk_io";
|
|
1020
|
+
readonly metrics: readonly ["disk_iops", "disk_usage_percent", "disk_used_size_total", "disk_volume_usage_percent", "disk_volume_used", "disk_bytes_per_second_per_node", "lsm_rocksdb_flush_size", "lsm_rocksdb_compaction", "lsm_rocksdb_compaction_time", "tserver_log_bytes_read", "tserver_log_bytes_written"];
|
|
1021
|
+
}, {
|
|
1022
|
+
readonly title: "Tablet Server";
|
|
1023
|
+
readonly name: "tserver";
|
|
1024
|
+
readonly metrics: readonly ["tserver_rpcs_per_sec_per_node", "tserver_ops_latency", "tserver_handler_latency", "tserver_threads_running", "tserver_threads_started", "tserver_uptime_min", "tserver_consensus_rpcs_per_sec", "tserver_change_config", "tserver_remote_bootstraps", "tserver_consensus_rpcs_latency", "tserver_change_config_latency", "tserver_context_switches", "tserver_spinlock_server", "tserver_log_latency", "tserver_log_bytes_written", "tserver_log_bytes_read", "tserver_log_ops_second", "tserver_write_lock_latency", "tserver_tc_malloc_stats", "tserver_log_stats", "tserver_cache_reader_num_ops", "tserver_glog_info_messages", "tserver_rpc_queue_size_tserver", "tserver_cpu_util_secs", "tserver_yb_rpc_connections", "tserver_live_tablet_peers", "raft_leader", "tserver_max_follower_lag"];
|
|
1025
|
+
}, {
|
|
1026
|
+
readonly title: "Master Server";
|
|
1027
|
+
readonly name: "master";
|
|
1028
|
+
readonly metrics: readonly ["master_overall_rpc_rate", "master_latency", "master_uptime_min", "master_get_tablet_location", "master_tsservice_reads", "master_tsservice_reads_latency", "master_tsservice_writes", "master_tsservice_writes_latency", "master_ts_heartbeats", "tserver_rpc_queue_size_master", "master_consensus_update", "master_consensus_update_latency", "master_multiraft_consensus_update", "master_multiraft_consensus_update_latency", "master_table_ops", "master_cpu_util_secs", "master_yb_rpc_connections", "master_leaderless_and_underreplicated_tablets", "master_max_follower_lag", "master_load_balancer_stats"];
|
|
1029
|
+
}, {
|
|
1030
|
+
readonly title: "Master Server Advanced";
|
|
1031
|
+
readonly name: "master_advanced";
|
|
1032
|
+
readonly metrics: readonly ["master_threads_running", "master_log_latency", "master_log_bytes_written", "master_log_bytes_read", "master_tc_malloc_stats", "master_glog_info_messages", "master_lsm_rocksdb_seek_next_prev", "master_lsm_rocksdb_num_seeks_per_node", "master_lsm_rocksdb_total_sst_per_node", "master_lsm_rocksdb_avg_num_sst_per_node", "master_lsm_rocksdb_block_cache_hit_miss", "master_lsm_rocksdb_block_cache_usage", "master_lsm_rocksdb_blooms_checked_and_useful", "master_lsm_rocksdb_flush_size", "master_lsm_rocksdb_compaction", "master_lsm_rocksdb_compaction_numfiles", "master_lsm_rocksdb_compaction_time"];
|
|
1033
|
+
}, {
|
|
1034
|
+
readonly title: "DocDB";
|
|
1035
|
+
readonly name: "lsmdb";
|
|
1036
|
+
readonly metrics: readonly ["lsm_rocksdb_seek_next_prev", "lsm_rocksdb_total_sst_per_node", "lsm_rocksdb_avg_num_sst_per_node", "lsm_rocksdb_latencies_get", "lsm_rocksdb_latencies_write", "lsm_rocksdb_latencies_seek", "lsm_rocksdb_latencies_mutex", "lsm_rocksdb_block_cache_hit_miss", "lsm_rocksdb_block_cache_usage", "lsm_rocksdb_blooms_checked_and_useful", "lsm_rocksdb_stalls", "lsm_rocksdb_write_rejections", "lsm_rocksdb_memory_rejections", "lsm_rocksdb_flush_size", "lsm_rocksdb_compaction", "lsm_rocksdb_compaction_tasks", "lsm_rocksdb_compaction_time", "lsm_rocksdb_compaction_numfiles", "lsm_rocksdb_mem_tracker_db_memtable", "docdb_transaction", "docdb_transaction_pool_cache", "tablet_splitting_stats", "automatic_split_manager_time"];
|
|
1037
|
+
}];
|
|
1038
|
+
|
|
1039
|
+
declare function isDefinedNotNull(obj: any): boolean;
|
|
1040
|
+
declare function isEmptyArray(arr: any): boolean;
|
|
1041
|
+
declare function isNonEmptyArray(arr: any): boolean;
|
|
1042
|
+
declare function isNullOrEmpty(obj: any): boolean;
|
|
1043
|
+
declare function isEmptyObject(obj: any): boolean;
|
|
1044
|
+
declare function isNonEmptyObject(obj: any): boolean;
|
|
1045
|
+
declare function isNonEmptyString(str: string): boolean;
|
|
1046
|
+
declare function isEmptyString(str: string): boolean;
|
|
1047
|
+
declare const isValidObject: typeof isDefinedNotNull;
|
|
1048
|
+
declare function removeNullProperties(obj: any): void;
|
|
1049
|
+
declare function isYAxisGreaterThanThousand(dataArray: any): boolean;
|
|
1050
|
+
declare function divideYAxisByThousand(dataArray: any): any;
|
|
1051
|
+
declare function timeFormatXAxis(dataArray: any, timezone: string | undefined): any;
|
|
1052
|
+
|
|
1053
|
+
export { ALL, ALL_REGIONS, ALL_ZONES, ANOMALY_CATEGORY_LIST, ANOMALY_FILTER_DURATION_OPTIONS, ANOMALY_TAG, ANOMALY_TYPE_TO_NAME_MAP, ASH, ASH_GROUPBY_VALUES, AggregatedLineSettings, Aggregation, AlertVariant, Anomaly, AnomalyCategory, AnomalyDetails, AnomalyDetectionStatus, AnomalyDetectionStatusText, AnomalyGroup, AnomalyInstance, AnomalyResponse, AnomalyType, AppName, AttachUniversePayload, AuthDetails, CATEGORY_HEADER_DATA_MAP, CQL_QUERY_REQUEST_GRAPHS, ClusterLoadResponseData, ClusterNodeInfo, ClusterNodeListMetadata, ClusterRegionSelector, Column, ColumnOptions, DB_TAG, DEFAULT_RECORDS_PER_PAGE, ELLIPSIS, FormattedAnomalyRca, GLOBAL_RUNTIME_CONFIG, GenericFailure, GraphAxisData, GraphFilters, GraphLabel, GraphMetadata, GraphRequestParams, GraphResponse, GraphSettings, GraphType, IN_DEVELOPMENT_MODE, InsightsTabs, MAX_OUTLIER_NUM_NODES, METRIC_FONT, METRIC_RESOURCES_WITH_GRAPHS, METRIC_TABLES_RESOURCES_WITH_GRAPHS, METRIC_TABS, METRIC_TABS_TABLES, MIN_OUTLIER_NUM_NODES, MORE, MetadataFields, MetricConsts, MetricMeasure, MetricOrigin, MetricSplitSelector, MetricsAnalysisEntry, MetricsAnalysisEntryProps, NodeData, NodeDataCloudInfo, NodeDataMetrics, NodeDetails, NodeInfo, NodeState, OutlierSelector, PerfAdvisorEntry, PrimaryDashboardViewTabs, QUERY_DETAILS, QUERY_KEY, QUERY_REQUEST_GRAPHS, QueryPageParams, QueryType, QueryWaitEvents, RCAGuideline, REACT_APP_API_URL, REGION_TAG, RUNTIME_CONFIG_KEYS, Resources, RowItemClasses$1 as RowItemClasses, RuntimeConfigData, RuntimeConfigType, RuntimeConfigs, SortDirection, SplitMode, SplitType, TABLET_REQUEST_GRAPHS, TABLET_TAG, TABLE_REQUEST_GRAPHS, TABLE_TAG, TIME_FILTER_LABEL, TIME_FILTER_VALUES, TPFeatureFlags, TPUrlParams, TableInfo, TablePageParams, TroubleshootAPI, TroubleshootingRecommendations, USER_TAG, Universe, UniverseConfig, UniverseMetadataFields, UniverseQueryData, UniverseQueryStatsData, UpdateMetadataFormFields, UpdateRuntimeConfigFormFields, UrlParams, YBAlert, YBButton, YBCheckbox, YBCheckboxField, YBCodeBlock, YBCodeBlockCopy, YBDateTimePicker, YBErrorIndicator, YBInfinitePagination, YBInput, YBInputField, YBLabel, YBModal, YBPagination, YBPanelItem, YBSelect, YBTable, YBToggle, YBToggleField, YBTooltip, ZONE_TAG, ZoneNodeSelector, divideYAxisByThousand, filterDurations, getCustomFooterComponent, getRowCellComponent, isDefinedNotNull, isEmptyArray, isEmptyObject, isEmptyString, isNonEmptyArray, isNonEmptyObject, isNonEmptyString, isNullOrEmpty, isValidObject, isYAxisGreaterThanThousand, metricOutlierSelectors, metricSplitSelectors, removeNullProperties, timeFormatXAxis, useCodeBlockStyles };
|