@yugabytedb/perf-advisor-ui 1.0.95 → 1.0.96

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/dist/esm/index.js CHANGED
@@ -1,11 +1,10 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import * as React$1 from 'react';
3
3
  import React__default, { useCallback, useEffect, Fragment as Fragment$1, useState, useRef, useMemo, createElement as createElement$1, useLayoutEffect, useReducer, isValidElement, cloneElement } from 'react';
4
- import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';
5
- import { makeStyles as makeStyles$1, Box as Box$1, Grid as Grid$2, MenuItem as MenuItem$1, TableRow, TableCell, Typography as Typography$1, Divider, InputAdornment, IconButton, styled as styled$1, Accordion, AccordionSummary, AccordionDetails, alpha, Collapse, Breadcrumbs, Link as Link$1, Tooltip } from '@material-ui/core';
6
- import { YBInput, YBSelect, YBPagination, YBToggle, YBButtonGroup, YBCheckbox, yba, YBThemeProvider, coreTheme, YBTooltip, YBButton, YBCodeBlock, YBBreadcrumb, mui, YBDatePicker, YBLabel, YBModal, GenericFailure, YBTable, YBTab, YBTabs, YBTag, YBAutoComplete } from '@yugabyte-ui-library/core';
4
+ import { useMutation, useInfiniteQuery, useQuery, useQueryClient } from 'react-query';
5
+ import { makeStyles as makeStyles$1, Box as Box$1, Grid as Grid$2, MenuItem as MenuItem$1, TableRow, TableCell, Typography as Typography$1, Divider, styled as styled$1, InputAdornment, IconButton, alpha, Collapse, Accordion, AccordionSummary, AccordionDetails, Breadcrumbs, Link as Link$1, Tooltip } from '@material-ui/core';
6
+ import { YBInput, YBSelect, YBPagination, YBToggle, YBButtonGroup, YBCheckbox, yba, YBThemeProvider, coreTheme, YBTooltip, YBButton, YBCodeBlock, YBBreadcrumb, mui, YBDatePicker, YBLabel, YBTab, GenericFailure, YBTabs, YBModal, YBTable, YBTag, YBAutoComplete } from '@yugabyte-ui-library/core';
7
7
  import { makeStyles } from '@material-ui/core/styles';
8
- import { Clear, FileCopy } from '@material-ui/icons';
9
8
  import require$$1$2 from 'http';
10
9
  import require$$2 from 'https';
11
10
  import require$$0$2 from 'url';
@@ -15,6 +14,7 @@ import require$$1 from 'tty';
15
14
  import require$$1$1 from 'util';
16
15
  import require$$0$1 from 'os';
17
16
  import require$$8 from 'zlib';
17
+ import { Clear, FileCopy } from '@material-ui/icons';
18
18
  import { Timeline } from 'vis-timeline/standalone';
19
19
  import 'vis-timeline/styles/vis-timeline-graph2d.css?inline';
20
20
  import { TabContext, TabPanel } from '@material-ui/lab';
@@ -270,7 +270,7 @@ var useCodeBlockStyles = makeStyles(function (theme) {
270
270
  });
271
271
  });
272
272
 
273
- var useStyles$q = makeStyles$1({
273
+ var useStyles$p = makeStyles$1({
274
274
  errorContainer: {
275
275
  textAlign: 'center',
276
276
  fontSize: '16px',
@@ -287,7 +287,7 @@ var useStyles$q = makeStyles$1({
287
287
  });
288
288
  var YBErrorIndicator = function (_a) {
289
289
  var type = _a.type, uuid = _a.uuid, customErrorMessage = _a.customErrorMessage;
290
- var classes = useStyles$q();
290
+ var classes = useStyles$p();
291
291
  var errorDisplayMessage = jsx("span", {});
292
292
  var errorRecoveryMessage = jsx("span", {});
293
293
  if (type === 'universe') {
@@ -2401,7 +2401,7 @@ var YBInputField = function (props) {
2401
2401
  return (jsx(YBInput, __assign({}, fieldProps, ybInputProps, { inputRef: ref, error: !!fieldState.error, helperText: (_b = (_a = fieldState.error) === null || _a === void 0 ? void 0 : _a.message) !== null && _b !== void 0 ? _b : ybInputProps.helperText })));
2402
2402
  };
2403
2403
 
2404
- var useStyles$p = makeStyles$1(function (theme) { return ({
2404
+ var useStyles$o = makeStyles$1(function (theme) { return ({
2405
2405
  root: {
2406
2406
  display: 'flex',
2407
2407
  justifyContent: 'flex-end',
@@ -2429,7 +2429,7 @@ var useStyles$p = makeStyles$1(function (theme) { return ({
2429
2429
  }); });
2430
2430
  var YBInfinitePagination = function (_a) {
2431
2431
  var dataPrefetchFn = _a.dataPrefetchFn, page = _a.page, onPageChange = _a.onPageChange, onPageSizeChange = _a.onPageSizeChange, hasMoreData = _a.hasMoreData, total = _a.total, _b = _a.rowsPerPageOptions, rowsPerPageOptions = _b === void 0 ? [10, 20, 50] : _b, rowsPerPage = _a.rowsPerPage, showRecordsPerPage = _a.showRecordsPerPage, _c = _a.recordsPerPageCaption, recordsPerPageCaption = _c === void 0 ? '' : _c;
2432
- var classes = useStyles$p();
2432
+ var classes = useStyles$o();
2433
2433
  var totalPages = Math.ceil(total / (rowsPerPage !== null && rowsPerPage !== void 0 ? rowsPerPage : rowsPerPageOptions[0]));
2434
2434
  var handleOnPageSelect = useCallback(function (newPage) {
2435
2435
  // If on last page, prefetch additional pages when available
@@ -2455,7 +2455,7 @@ var YBInfinitePagination = function (_a) {
2455
2455
  }, children: rowsPerPageOptions.map(function (recordSize) { return (jsx(MenuItem$1, { value: recordSize, "data-testid": "RowsPerPageSelectMenuItem-".concat(recordSize), children: recordSize }, recordSize)); }) })] })), jsx(Box$1, { ml: 4, children: jsx(YBPagination, { currentPage: page + 1, pageSize: totalPages, onPageSelect: handleOnPageSelect, hasMore: hasMoreData, dataTestId: "TablePagination" }) })] }));
2456
2456
  };
2457
2457
 
2458
- var useStyles$o = makeStyles$1(function (theme) { return ({
2458
+ var useStyles$n = makeStyles$1(function (theme) { return ({
2459
2459
  header: {
2460
2460
  minHeight: '42px',
2461
2461
  marginBottom: '25px'
@@ -2481,7 +2481,7 @@ var useStyles$o = makeStyles$1(function (theme) { return ({
2481
2481
  }); });
2482
2482
  var YBPanelItem = function (_a) {
2483
2483
  var noBackground = _a.noBackground, className = _a.className, bodyClassName = _a.bodyClassName, children = _a.children, body = _a.body, header = _a.header, title = _a.title;
2484
- var classes = useStyles$o();
2484
+ var classes = useStyles$n();
2485
2485
  var panelBodyClassName = clsx(classes.body, noBackground && classes.transparentBody, bodyClassName);
2486
2486
  return (jsxs(Box$1, { className: className ? classes.contentPanel + className : 'classes.contentPanel', children: [(header || title) && (jsxs(Box$1, { className: classes.header, children: [header, " ", title] })), jsx(Box$1, { className: "container", children: body && (jsxs(Box$1, { className: panelBodyClassName, children: [body, children] })) })] }));
2487
2487
  };
@@ -3938,12 +3938,10 @@ var useHelperStyles = makeStyles(function (theme) { return ({
3938
3938
  position: 'sticky',
3939
3939
  top: 0,
3940
3940
  zIndex: 1100,
3941
- backgroundColor: 'transparent',
3942
- paddingBottom: theme.spacing(2)
3941
+ backgroundColor: 'transparent'
3943
3942
  },
3944
3943
  stickyHeaderYBM: {
3945
- backgroundColor: 'transparent',
3946
- paddingBottom: theme.spacing(2)
3944
+ backgroundColor: 'transparent'
3947
3945
  },
3948
3946
  infoIcon: {
3949
3947
  color: '#97A5B0',
@@ -4055,12 +4053,6 @@ var useHelperStyles = makeStyles(function (theme) { return ({
4055
4053
  tabletNodeLoadMetadataTableCell: {
4056
4054
  padding: '4px 10px'
4057
4055
  },
4058
- ellipsisText: {
4059
- overflow: 'hidden',
4060
- textOverflow: 'ellipsis',
4061
- whiteSpace: 'nowrap',
4062
- width: '100%'
4063
- },
4064
4056
  queryLoadMetadataTableCell: {
4065
4057
  padding: '12px 10px'
4066
4058
  },
@@ -4070,9 +4062,6 @@ var useHelperStyles = makeStyles(function (theme) { return ({
4070
4062
  metricSplitSelectorBox: {
4071
4063
  gap: theme.spacing(2),
4072
4064
  marginTop: theme.spacing(2)
4073
- },
4074
- tabsContainer: {
4075
- marginBottom: theme.spacing(3)
4076
4065
  }
4077
4066
  }); });
4078
4067
 
@@ -4272,7 +4261,7 @@ var NUM_NODES_SELECTOR_OPTIONS = [
4272
4261
  { value: 5, label: '5' },
4273
4262
  { value: 10, label: '10' }
4274
4263
  ];
4275
- var useStyles$n = makeStyles(function (theme) { return ({
4264
+ var useStyles$m = makeStyles(function (theme) { return ({
4276
4265
  icon: {
4277
4266
  marginRight: theme.spacing(1)
4278
4267
  },
@@ -4291,7 +4280,7 @@ var useStyles$n = makeStyles(function (theme) { return ({
4291
4280
  var OutlierSelector = function (_a) {
4292
4281
  var _b;
4293
4282
  var metricOutlierSelectors = _a.metricOutlierSelectors, selectedNumNodes = _a.selectedNumNodes, outlierType = _a.outlierType, onOutlierTypeSelected = _a.onOutlierTypeSelected, onNumNodesChanged = _a.onNumNodesChanged, metricMeasure = _a.metricMeasure, _c = _a.showNumNodesInput, showNumNodesInput = _c === void 0 ? true : _c, _d = _a.showNumNodesSelector, showNumNodesSelector = _d === void 0 ? false : _d;
4294
- var classes = useStyles$n();
4283
+ var classes = useStyles$m();
4295
4284
  var defaultActiveIndex = outlierType === SplitMode.TOP ? 0 : 1;
4296
4285
  var _e = useState(defaultActiveIndex), active = _e[0], setActive = _e[1];
4297
4286
  var buttons = metricOutlierSelectors.map(function (outlierSelector, idx) { return ({
@@ -4577,10 +4566,10 @@ function isYAxisGreaterThanThousand(dataArray) {
4577
4566
  return false;
4578
4567
  }
4579
4568
 
4580
- var img$k = "data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M13.0911 7.70567H3V4.60325C3 4.31623 2.82388 4 2.37381 4C1.92374 4 1.74762 4.31623 1.74762 4.60325V8.78291H13.0911L10.8545 11.0805C10.6362 11.2909 10.6362 11.6319 10.8545 11.8422C11.0729 12.0526 11.4269 12.0526 11.6452 11.8422L14.8362 8.62515C15.0546 8.41481 15.0546 8.07377 14.8362 7.86343L11.6452 4.60325C11.4269 4.39291 11.0729 4.39291 10.8545 4.60325C10.6362 4.81359 10.6362 5.15463 10.8545 5.36497L13.0911 7.70567Z' fill='%23232329' fill-opacity='0.4'/%3e%3c/svg%3e";
4581
- var TreeIcon = img$k;
4569
+ var img$h = "data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M13.0911 7.70567H3V4.60325C3 4.31623 2.82388 4 2.37381 4C1.92374 4 1.74762 4.31623 1.74762 4.60325V8.78291H13.0911L10.8545 11.0805C10.6362 11.2909 10.6362 11.6319 10.8545 11.8422C11.0729 12.0526 11.4269 12.0526 11.6452 11.8422L14.8362 8.62515C15.0546 8.41481 15.0546 8.07377 14.8362 7.86343L11.6452 4.60325C11.4269 4.39291 11.0729 4.39291 10.8545 4.60325C10.6362 4.81359 10.6362 5.15463 10.8545 5.36497L13.0911 7.70567Z' fill='%23232329' fill-opacity='0.4'/%3e%3c/svg%3e";
4570
+ var TreeIcon = img$h;
4582
4571
 
4583
- var useStyles$m = makeStyles(function (theme) { return ({
4572
+ var useStyles$l = makeStyles(function (theme) { return ({
4584
4573
  selectBox: {
4585
4574
  minWidth: '300px'
4586
4575
  },
@@ -4614,7 +4603,7 @@ var useStyles$m = makeStyles(function (theme) { return ({
4614
4603
  var ALL_ZONES = 'All Zones and Nodes';
4615
4604
  var ZoneNodeSelector = function (_a) {
4616
4605
  var selectedItem = _a.selectedItem, primaryZoneToNodesMap = _a.primaryZoneToNodesMap, asyncZoneToNodesMap = _a.asyncZoneToNodesMap, onZoneNodeSelected = _a.onZoneNodeSelected;
4617
- var classes = useStyles$m();
4606
+ var classes = useStyles$l();
4618
4607
  var renderZoneAndNodeItems = function (primaryZoneToNodesMap, asyncZoneToNodesMap) {
4619
4608
  var renderedItems = [];
4620
4609
  renderedItems.push(jsx(MenuItem$1, { value: ALL_ZONES, onClick: function (e) {
@@ -4677,7 +4666,7 @@ var ZoneNodeSelector = function (_a) {
4677
4666
  return (jsx(YBSelect, { className: clsx(classes.selectBox, classes.overrideMuiInput), dataTestId: "YBZoneNodeSelector-Zone", value: selectedItem, children: renderZoneAndNodeItems(primaryZoneToNodesMap, asyncZoneToNodesMap) }));
4678
4667
  };
4679
4668
 
4680
- var useStyles$l = makeStyles(function (theme) { return ({
4669
+ var useStyles$k = makeStyles(function (theme) { return ({
4681
4670
  selectBox: {
4682
4671
  minWidth: '300px'
4683
4672
  },
@@ -4707,7 +4696,7 @@ var useStyles$l = makeStyles(function (theme) { return ({
4707
4696
  }); });
4708
4697
  var ClusterRegionSelector = function (_a) {
4709
4698
  var selectedItem = _a.selectedItem, primaryClusterToRegionMap = _a.primaryClusterToRegionMap, asyncClusterToRegionMap = _a.asyncClusterToRegionMap, onClusterRegionSelected = _a.onClusterRegionSelected;
4710
- var classes = useStyles$l();
4699
+ var classes = useStyles$k();
4711
4700
  var renderClusterAndRegionItems = function (primaryClusterToRegionMap, asyncClusterToRegionMap) {
4712
4701
  var renderedItems = [];
4713
4702
  renderedItems.push(jsx(MenuItem$1, { value: ALL_REGIONS, onClick: function (e) {
@@ -8242,32 +8231,9 @@ var getTelemetryPayload = function (appName, key, startTime, endTime, universeUu
8242
8231
  ];
8243
8232
  return payload;
8244
8233
  };
8245
- /**
8246
- * Processes anomaly group data to extract possible cause information
8247
- * @param anomalyGroupData - The anomaly group data (can be null)
8248
- * @returns Processed data containing observation and possible causes
8249
- */
8250
- var getAnomalyPossibleCauseData = function (anomalyGroupData) {
8251
- var _a, _b, _c, _d, _e;
8252
- var data = {
8253
- observation: (_b = (_a = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : '',
8254
- possibleCauses: (_e = (_d = (_c = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _c === void 0 ? void 0 : _c.rcaGuidelines) === null || _d === void 0 ? void 0 : _d.map(function (rcaGuideline) {
8255
- var _a, _b, _c, _d;
8256
- return {
8257
- possibleCause: (_a = rcaGuideline.possibleCause) !== null && _a !== void 0 ? _a : '',
8258
- possibleCauseDescription: (_b = rcaGuideline.possibleCauseDescription) !== null && _b !== void 0 ? _b : '',
8259
- troubleshootingRecommendations: (_d = (_c = rcaGuideline.troubleshootingRecommendations) === null || _c === void 0 ? void 0 : _c.map(function (troubleshootingRecommendation) {
8260
- var _a;
8261
- return (_a = troubleshootingRecommendation === null || troubleshootingRecommendation === void 0 ? void 0 : troubleshootingRecommendation.recommendation) !== null && _a !== void 0 ? _a : '';
8262
- })) !== null && _d !== void 0 ? _d : []
8263
- };
8264
- })) !== null && _e !== void 0 ? _e : []
8265
- };
8266
- return data;
8267
- };
8268
8234
 
8269
- var img$j = "data:image/svg+xml,%3csvg width='13' height='14' viewBox='0 0 13 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.11094 3.11172V3.88945H1.94434C1.30004 3.88945 0.777735 4.41176 0.777735 5.05605V12.0557C0.777735 12.7 1.30004 13.2223 1.94434 13.2223H7.38848C8.03278 13.2223 8.55508 12.7 8.55508 12.0557V10.8891H9.33282V12.0557C9.33282 13.1295 8.46231 14 7.38848 14H1.94434C0.870509 14 0 13.1295 0 12.0557V5.05605C0 3.98223 0.870509 3.11172 1.94434 3.11172H3.11094ZM9.33333 0.778528H5.05579C4.4115 0.778528 3.88919 1.30083 3.88919 1.94513V8.94474C3.88919 9.58904 4.4115 10.1113 5.05579 10.1113H10.4999C11.1442 10.1113 11.6665 9.58904 11.6665 8.94474V3.11173H9.7222C9.50744 3.11173 9.33333 2.93763 9.33333 2.72286V0.778528ZM12.4436 2.74461V8.94473C12.4436 10.0186 11.5731 10.8891 10.4993 10.8891H5.05514C3.98132 10.8891 3.11081 10.0186 3.11081 8.94473V1.94512C3.11081 0.871289 3.98132 0.000779584 5.05514 0.000779584H9.69979C9.80303 -0.00576853 9.9105 0.0286532 9.99652 0.114676L12.3297 2.44788C12.4157 2.5339 12.4502 2.64137 12.4436 2.74461ZM10.1108 2.33401H11.1163L10.1108 1.32848V2.33401ZM5.83301 7.77813C5.61824 7.77813 5.44414 7.60403 5.44414 7.38926C5.44414 7.1745 5.61824 7.0004 5.83301 7.0004H7.38848C7.60324 7.0004 7.77734 7.1745 7.77734 7.38926C7.77734 7.60403 7.60324 7.77813 7.38848 7.77813H5.83301ZM5.83301 6.22267C5.61824 6.22267 5.44414 6.04857 5.44414 5.8338C5.44414 5.61904 5.61824 5.44494 5.83301 5.44494H9.72168C9.93645 5.44494 10.1105 5.61904 10.1105 5.8338C10.1105 6.04857 9.93645 6.22267 9.72168 6.22267H5.83301ZM5.83301 4.66718C5.61824 4.66718 5.44414 4.49308 5.44414 4.27832C5.44414 4.06355 5.61824 3.88945 5.83301 3.88945H9.72168C9.93645 3.88945 10.1105 4.06355 10.1105 4.27832C10.1105 4.49308 9.93645 4.66718 9.72168 4.66718H5.83301Z' fill='%232B59C3'/%3e%3c/svg%3e";
8270
- var CopyIcon = img$j;
8235
+ var img$g = "data:image/svg+xml,%3csvg width='13' height='14' viewBox='0 0 13 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.11094 3.11172V3.88945H1.94434C1.30004 3.88945 0.777735 4.41176 0.777735 5.05605V12.0557C0.777735 12.7 1.30004 13.2223 1.94434 13.2223H7.38848C8.03278 13.2223 8.55508 12.7 8.55508 12.0557V10.8891H9.33282V12.0557C9.33282 13.1295 8.46231 14 7.38848 14H1.94434C0.870509 14 0 13.1295 0 12.0557V5.05605C0 3.98223 0.870509 3.11172 1.94434 3.11172H3.11094ZM9.33333 0.778528H5.05579C4.4115 0.778528 3.88919 1.30083 3.88919 1.94513V8.94474C3.88919 9.58904 4.4115 10.1113 5.05579 10.1113H10.4999C11.1442 10.1113 11.6665 9.58904 11.6665 8.94474V3.11173H9.7222C9.50744 3.11173 9.33333 2.93763 9.33333 2.72286V0.778528ZM12.4436 2.74461V8.94473C12.4436 10.0186 11.5731 10.8891 10.4993 10.8891H5.05514C3.98132 10.8891 3.11081 10.0186 3.11081 8.94473V1.94512C3.11081 0.871289 3.98132 0.000779584 5.05514 0.000779584H9.69979C9.80303 -0.00576853 9.9105 0.0286532 9.99652 0.114676L12.3297 2.44788C12.4157 2.5339 12.4502 2.64137 12.4436 2.74461ZM10.1108 2.33401H11.1163L10.1108 1.32848V2.33401ZM5.83301 7.77813C5.61824 7.77813 5.44414 7.60403 5.44414 7.38926C5.44414 7.1745 5.61824 7.0004 5.83301 7.0004H7.38848C7.60324 7.0004 7.77734 7.1745 7.77734 7.38926C7.77734 7.60403 7.60324 7.77813 7.38848 7.77813H5.83301ZM5.83301 6.22267C5.61824 6.22267 5.44414 6.04857 5.44414 5.8338C5.44414 5.61904 5.61824 5.44494 5.83301 5.44494H9.72168C9.93645 5.44494 10.1105 5.61904 10.1105 5.8338C10.1105 6.04857 9.93645 6.22267 9.72168 6.22267H5.83301ZM5.83301 4.66718C5.61824 4.66718 5.44414 4.49308 5.44414 4.27832C5.44414 4.06355 5.61824 3.88945 5.83301 3.88945H9.72168C9.93645 3.88945 10.1105 4.06355 10.1105 4.27832C10.1105 4.49308 9.93645 4.66718 9.72168 4.66718H5.83301Z' fill='%232B59C3'/%3e%3c/svg%3e";
8236
+ var CopyIcon = img$g;
8271
8237
 
8272
8238
  var MetadataHeader = function (_a) {
8273
8239
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
@@ -8295,7 +8261,7 @@ var MetadataHeader = function (_a) {
8295
8261
  e.stopPropagation();
8296
8262
  }
8297
8263
  };
8298
- return (jsx(Box$1, { children: isDrilldownView && showDetails && (jsx(Box$1, { className: clsx(helperClasses.headerMetadataBox, helperClasses.boxContainer, helperClasses.flexColumn), children: !isHistoricalQueryView ? (jsx(Fragment, { children: anomalyData && (jsxs(Box$1, { className: helperClasses.flexColumn, children: [jsxs(Box$1, { className: helperClasses.flexRow, width: "100%", justifyContent: 'space-between', children: [jsxs(Box$1, { className: helperClasses.flexColumn, children: [jsx(Box$1, { className: helperClasses.headerTitle, children: ANOMALY_TAG }), jsx(Box$1, { className: helperClasses.anomalyTypeTag, children: jsx("span", { className: helperClasses.anomalyTypeText, children: ANOMALY_TYPE_TO_NAME_MAP[(_p = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _p === void 0 ? void 0 : _p.type] }) })] }), anomalyCategory !== AnomalyCategory.SQL && (jsxs(Box$1, { className: helperClasses.flexColumn, children: [jsx(Box$1, { className: helperClasses.headerTitle, children: (_r = CATEGORY_HEADER_DATA_MAP[(_q = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _q === void 0 ? void 0 : _q.type]) === null || _r === void 0 ? void 0 : _r.title }), jsxs(Box$1, { children: [jsx(YBTooltip, { title: entityDisplayName || '', placement: "top", arrow: true, children: jsx("span", { className: helperClasses.regularMetadata, children: truncateEntityDisplayName(entityDisplayName, anomalyCategory, anomalyCategory === AnomalyCategory.SQL ? 40 : 30) }) }), (anomalyCategory === AnomalyCategory.NODE ||
8264
+ return (jsx(Box$1, { children: isDrilldownView && showDetails && (jsx(Box$1, { className: clsx(helperClasses.headerMetadataBox, helperClasses.boxContainer, helperClasses.flexColumn), mt: 3, children: !isHistoricalQueryView ? (jsx(Fragment, { children: anomalyData && (jsxs(Box$1, { className: helperClasses.flexColumn, children: [jsxs(Box$1, { className: helperClasses.flexRow, width: "100%", justifyContent: 'space-between', children: [jsxs(Box$1, { className: helperClasses.flexColumn, children: [jsx(Box$1, { className: helperClasses.headerTitle, children: ANOMALY_TAG }), jsx(Box$1, { className: helperClasses.anomalyTypeTag, children: jsx("span", { className: helperClasses.anomalyTypeText, children: ANOMALY_TYPE_TO_NAME_MAP[(_p = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _p === void 0 ? void 0 : _p.type] }) })] }), anomalyCategory !== AnomalyCategory.SQL && (jsxs(Box$1, { className: helperClasses.flexColumn, children: [jsx(Box$1, { className: helperClasses.headerTitle, children: (_r = CATEGORY_HEADER_DATA_MAP[(_q = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _q === void 0 ? void 0 : _q.type]) === null || _r === void 0 ? void 0 : _r.title }), jsxs(Box$1, { children: [jsx(YBTooltip, { title: entityDisplayName || '', placement: "top", arrow: true, children: jsx("span", { className: helperClasses.regularMetadata, children: truncateEntityDisplayName(entityDisplayName, anomalyCategory, anomalyCategory === AnomalyCategory.SQL ? 40 : 30) }) }), (anomalyCategory === AnomalyCategory.NODE ||
8299
8265
  anomalyCategory === AnomalyCategory.APP) && (jsx(YBTooltip, { title: copied ? 'Copied' : 'Copy', open: copied ? true : undefined, children: jsx("img", { src: CopyIcon, alt: "Copy Icon", style: { marginLeft: '4px', cursor: 'pointer' }, onClick: function () {
8300
8266
  navigator.clipboard.writeText(entityDisplayName);
8301
8267
  setCopied(true);
@@ -8321,8 +8287,8 @@ var MetadataHeader = function (_a) {
8321
8287
  }, children: 'Hide Details' }) }) })] }), jsx(Box$1, { className: helperClasses.flexColumn, mt: 2, children: jsx(Box$1, { onClick: handleCodeBlockClick, width: "100%", style: { minWidth: 0, overflow: 'hidden', display: 'grid' }, children: jsx(YBCodeBlock, { lang: "sql", showCopyButton: true, singleLineEllipsis: true, enabledExpandCollapse: false, text: (_3 = queryObject === null || queryObject === void 0 ? void 0 : queryObject.query) !== null && _3 !== void 0 ? _3 : '', containerClassName: codeBlockClasses.queryContainerCodeInBreadcrumbs }, "TableHelperQueries-query") }) })] })) })) }));
8322
8288
  };
8323
8289
 
8324
- var img$i = "data:image/svg+xml,%3csvg width='13' height='10' viewBox='0 0 13 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M9.66667 3.66667H1M4.33333 1H1M12.3333 6.33333H1M9.66667 9H1' stroke='%232B59C3' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";
8325
- var MaximizeIcon = img$i;
8290
+ var img$f = "data:image/svg+xml,%3csvg width='13' height='10' viewBox='0 0 13 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M9.66667 3.66667H1M4.33333 1H1M12.3333 6.33333H1M9.66667 9H1' stroke='%232B59C3' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";
8291
+ var MaximizeIcon = img$f;
8326
8292
 
8327
8293
  var BreadCrumbsHeader = function (_a) {
8328
8294
  var _b, _c;
@@ -8416,10 +8382,10 @@ var BreadCrumbsHeader = function (_a) {
8416
8382
  return (jsx(Box$1, { children: jsxs(Box$1, { display: 'flex', mb: 3, mt: 1, children: [jsx(Box$1, { className: helperClasses.ybBreadcrumbWrapper, children: isDrilldownView && (jsx(YBBreadcrumb, { size: "small", separator: "/", maxLabelWidth: 600, items: getBreadcrumbItems(), dataTestId: "GenericHeader-Breadcrumb" })) }), jsx(Box$1, { ml: 2, style: { marginTop: '-2px' }, children: !showDetails && (jsx(YBButton, { size: "small", variant: "secondary", onClick: function () { return onShowDetails(true); }, dataTestId: "BreadCrumbsAndMetadataHeader-ShowDetails", startIcon: jsx("img", { src: MaximizeIcon, alt: "Maximize Icon" }), children: 'Show Details' })) })] }) }));
8417
8383
  };
8418
8384
 
8419
- var img$h = "data:image/svg+xml,%3csvg width='1' height='16' viewBox='0 0 1 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cline x1='0.5' y1='2.18557e-08' x2='0.499999' y2='16' stroke='%23B7C3CB'/%3e%3c/svg%3e";
8420
- var DividerIcon = img$h;
8385
+ var img$e = "data:image/svg+xml,%3csvg width='1' height='16' viewBox='0 0 1 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cline x1='0.5' y1='2.18557e-08' x2='0.499999' y2='16' stroke='%23B7C3CB'/%3e%3c/svg%3e";
8386
+ var DividerIcon = img$e;
8421
8387
 
8422
- var useStyles$k = makeStyles$1(function () { return ({
8388
+ var useStyles$j = makeStyles$1(function () { return ({
8423
8389
  groupByOperationDropdown: { borderRadius: '8px' },
8424
8390
  overrideDefaultMuiFormControl: {
8425
8391
  flexDirection: 'row',
@@ -8441,7 +8407,7 @@ var GenericHeader = function (_a) {
8441
8407
  region = _a.region, metricMeasure = _a.metricMeasure, outlierType = _a.outlierType, numNodes = _a.numNodes, _b = _a.isDrilldownView, isDrilldownView = _b === void 0 ? true : _b, onZoneNodeSelected = _a.onZoneNodeSelected, onClusterRegionSelected = _a.onClusterRegionSelected, onOutlierTypeSelected = _a.onOutlierTypeSelected, onSplitTypeSelected = _a.onSplitTypeSelected; _a.onQueryTypeSelected; var onNumNodesChanged = _a.onNumNodesChanged, _c = _a.showMetricAggregator, showMetricAggregator = _c === void 0 ? true : _c; _a.showQueryTypeSelector; var _e = _a.showSplitSelector, showSplitSelector = _e === void 0 ? true : _e;
8442
8408
  var _f = formatData(universeData), primaryZoneMapping = _f.primaryZoneMapping, asyncZoneMapping = _f.asyncZoneMapping, primaryClusterMapping = _f.primaryClusterMapping, asyncClusterMapping = _f.asyncClusterMapping;
8443
8409
  var helperClasses = useHelperStyles();
8444
- useStyles$k();
8410
+ useStyles$j();
8445
8411
  // State variables
8446
8412
  var _g = useState(primaryZoneMapping), primaryZoneToNodesMap = _g[0], setPrimaryZoneToNodesMap = _g[1];
8447
8413
  var _h = useState(asyncZoneMapping), asyncZoneToNodesMap = _h[0], setAsyncZoneToNodesMap = _h[1];
@@ -12585,8 +12551,8 @@ var getDiffDays = function (startDateTime, endDateTime) {
12585
12551
  return diffDays;
12586
12552
  };
12587
12553
 
12588
- var img$g = "data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M14.5199 19.5097C14.5199 19.841 14.2513 20.1097 13.9199 20.1097H9.99993C7.43733 20.1097 5.35993 18.0323 5.35993 15.4697V5.93966L3.41993 7.84966C3.18035 8.04677 2.83002 8.02873 2.61196 7.80807C2.39389 7.5874 2.38 7.23688 2.57993 6.99966L5.51993 4.06966C5.63251 3.95669 5.78544 3.89319 5.94493 3.89319C6.10442 3.89319 6.25735 3.95669 6.36993 4.06966L9.29993 6.99966C9.53465 7.23438 9.53465 7.61494 9.29993 7.84966C9.06521 8.08438 8.68465 8.08438 8.44993 7.84966L6.53993 5.93966V15.4797C6.54257 16.3937 6.90891 17.2692 7.55808 17.9127C8.20725 18.5563 9.08585 18.915 9.99993 18.9097H13.9499C14.2695 18.9257 14.5203 19.1897 14.5199 19.5097ZM20.9949 15.9732C20.8354 15.9732 20.6825 16.0367 20.5699 16.1497L18.6499 18.0697V8.52966C18.6499 7.29732 18.1597 6.1156 17.2874 5.24514C16.415 4.37469 15.2323 3.887 13.9999 3.88966H10.0799C9.74856 3.88966 9.47993 4.15829 9.47993 4.48966C9.47993 4.82103 9.74856 5.08966 10.0799 5.08966H13.9999C15.8998 5.08966 17.4399 6.6298 17.4399 8.52966V18.0697L15.5199 16.1497C15.3681 15.9978 15.1468 15.9385 14.9394 15.9941C14.732 16.0497 14.5699 16.2117 14.5144 16.4191C14.4588 16.6265 14.5181 16.8478 14.6699 16.9997L17.6099 19.9397C17.7225 20.0526 17.8754 20.1161 18.0349 20.1161C18.1944 20.1161 18.3473 20.0526 18.4599 19.9397L21.4199 16.9997C21.5329 16.8871 21.5964 16.7341 21.5964 16.5747C21.5964 16.4152 21.5329 16.2622 21.4199 16.1497C21.3073 16.0367 21.1544 15.9732 20.9949 15.9732Z' fill='%232B59C3'/%3e%3c/svg%3e";
12589
- var RefreshIcon = img$g;
12554
+ var img$d = "data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M14.5199 19.5097C14.5199 19.841 14.2513 20.1097 13.9199 20.1097H9.99993C7.43733 20.1097 5.35993 18.0323 5.35993 15.4697V5.93966L3.41993 7.84966C3.18035 8.04677 2.83002 8.02873 2.61196 7.80807C2.39389 7.5874 2.38 7.23688 2.57993 6.99966L5.51993 4.06966C5.63251 3.95669 5.78544 3.89319 5.94493 3.89319C6.10442 3.89319 6.25735 3.95669 6.36993 4.06966L9.29993 6.99966C9.53465 7.23438 9.53465 7.61494 9.29993 7.84966C9.06521 8.08438 8.68465 8.08438 8.44993 7.84966L6.53993 5.93966V15.4797C6.54257 16.3937 6.90891 17.2692 7.55808 17.9127C8.20725 18.5563 9.08585 18.915 9.99993 18.9097H13.9499C14.2695 18.9257 14.5203 19.1897 14.5199 19.5097ZM20.9949 15.9732C20.8354 15.9732 20.6825 16.0367 20.5699 16.1497L18.6499 18.0697V8.52966C18.6499 7.29732 18.1597 6.1156 17.2874 5.24514C16.415 4.37469 15.2323 3.887 13.9999 3.88966H10.0799C9.74856 3.88966 9.47993 4.15829 9.47993 4.48966C9.47993 4.82103 9.74856 5.08966 10.0799 5.08966H13.9999C15.8998 5.08966 17.4399 6.6298 17.4399 8.52966V18.0697L15.5199 16.1497C15.3681 15.9978 15.1468 15.9385 14.9394 15.9941C14.732 16.0497 14.5699 16.2117 14.5144 16.4191C14.4588 16.6265 14.5181 16.8478 14.6699 16.9997L17.6099 19.9397C17.7225 20.0526 17.8754 20.1161 18.0349 20.1161C18.1944 20.1161 18.3473 20.0526 18.4599 19.9397L21.4199 16.9997C21.5329 16.8871 21.5964 16.7341 21.5964 16.5747C21.5964 16.4152 21.5329 16.2622 21.4199 16.1497C21.3073 16.0367 21.1544 15.9732 20.9949 15.9732Z' fill='%232B59C3'/%3e%3c/svg%3e";
12555
+ var RefreshIcon = img$d;
12590
12556
 
12591
12557
  var Box = mui.Box, MenuItem = mui.MenuItem, Typography = mui.Typography;
12592
12558
  var YBDatePickerDisplayFormat = 'dd/MM/yyyy, hh:mm a';
@@ -71503,7 +71469,7 @@ var IDEAL_CHART_WIDTH = 500;
71503
71469
  var MIN_GRAPH_WIDTH = 490;
71504
71470
  var MAX_GRAPH_WIDTH = (window === null || window === void 0 ? void 0 : window.outerWidth) > 1728 ? 550 : 470;
71505
71471
  var MAX_GRAPH_WIDTH_YBM = (window === null || window === void 0 ? void 0 : window.outerWidth) > 1728 ? 680 : 590;
71506
- var useStyles$j = makeStyles$1(function () { return ({
71472
+ var useStyles$i = makeStyles$1(function () { return ({
71507
71473
  metricPanel: {
71508
71474
  position: 'relative'
71509
71475
  },
@@ -71528,7 +71494,7 @@ var useStyles$j = makeStyles$1(function () { return ({
71528
71494
  var GraphView = React__default.memo(function (_a) {
71529
71495
  var _b, _c, _d;
71530
71496
  var metricData = _a.metricData, appName = _a.appName, metricKey = _a.metricKey, metricMeasure = _a.metricMeasure, operations = _a.operations, groupByOperations = _a.groupByOperations; _a.height; var _e = _a.isRecommendationGraph, isRecommendationGraph = _e === void 0 ? false : _e, timezone = _a.timezone, graphTitle = _a.graphTitle, graphType = _a.graphType, queryData = _a.queryData, dateTimeRange = _a.dateTimeRange, isHistoricalQueryView = _a.isHistoricalQueryView, _f = _a.showTitle, showTitle = _f === void 0 ? true : _f, onEChartsDateSelect = _a.onEChartsDateSelect, onSelectAshLabel = _a.onSelectAshLabel, registerChartInstance = _a.registerChartInstance;
71531
- var classes = useStyles$j();
71497
+ var classes = useStyles$i();
71532
71498
  var metricOperationsDisplayed = operations;
71533
71499
  var chartId = "".concat(CHART_ID_PREFIX).concat(metricKey);
71534
71500
  // State variables
@@ -72187,982 +72153,472 @@ var GraphView = React__default.memo(function (_a) {
72187
72153
  } })] }));
72188
72154
  });
72189
72155
 
72190
- /** `Object#toString` result references. */
72191
- var symbolTag = '[object Symbol]';
72156
+ var axios$3 = {exports: {}};
72157
+
72158
+ var bind$2 = function bind(fn, thisArg) {
72159
+ return function wrap() {
72160
+ var args = new Array(arguments.length);
72161
+ for (var i = 0; i < args.length; i++) {
72162
+ args[i] = arguments[i];
72163
+ }
72164
+ return fn.apply(thisArg, args);
72165
+ };
72166
+ };
72167
+
72168
+ var bind$1 = bind$2;
72169
+
72170
+ // utils is a library of generic helper functions non-specific to axios
72171
+
72172
+ var toString = Object.prototype.toString;
72192
72173
 
72193
72174
  /**
72194
- * Checks if `value` is classified as a `Symbol` primitive or object.
72195
- *
72196
- * @static
72197
- * @memberOf _
72198
- * @since 4.0.0
72199
- * @category Lang
72200
- * @param {*} value The value to check.
72201
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
72202
- * @example
72203
- *
72204
- * _.isSymbol(Symbol.iterator);
72205
- * // => true
72175
+ * Determine if a value is an Array
72206
72176
  *
72207
- * _.isSymbol('abc');
72208
- * // => false
72177
+ * @param {Object} val The value to test
72178
+ * @returns {boolean} True if value is an Array, otherwise false
72209
72179
  */
72210
- function isSymbol(value) {
72211
- return typeof value == 'symbol' ||
72212
- (isObjectLike(value) && baseGetTag(value) == symbolTag);
72180
+ function isArray(val) {
72181
+ return toString.call(val) === '[object Array]';
72213
72182
  }
72214
72183
 
72215
- /** Used to match a single whitespace character. */
72216
- var reWhitespace = /\s/;
72217
-
72218
72184
  /**
72219
- * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
72220
- * character of `string`.
72185
+ * Determine if a value is undefined
72221
72186
  *
72222
- * @private
72223
- * @param {string} string The string to inspect.
72224
- * @returns {number} Returns the index of the last non-whitespace character.
72187
+ * @param {Object} val The value to test
72188
+ * @returns {boolean} True if the value is undefined, otherwise false
72225
72189
  */
72226
- function trimmedEndIndex(string) {
72227
- var index = string.length;
72228
-
72229
- while (index-- && reWhitespace.test(string.charAt(index))) {}
72230
- return index;
72190
+ function isUndefined(val) {
72191
+ return typeof val === 'undefined';
72231
72192
  }
72232
72193
 
72233
- /** Used to match leading whitespace. */
72234
- var reTrimStart = /^\s+/;
72235
-
72236
72194
  /**
72237
- * The base implementation of `_.trim`.
72195
+ * Determine if a value is a Buffer
72238
72196
  *
72239
- * @private
72240
- * @param {string} string The string to trim.
72241
- * @returns {string} Returns the trimmed string.
72197
+ * @param {Object} val The value to test
72198
+ * @returns {boolean} True if value is a Buffer, otherwise false
72242
72199
  */
72243
- function baseTrim(string) {
72244
- return string
72245
- ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
72246
- : string;
72200
+ function isBuffer(val) {
72201
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
72202
+ && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
72247
72203
  }
72248
72204
 
72249
- /** Used as references for various `Number` constants. */
72250
- var NAN = 0 / 0;
72251
-
72252
- /** Used to detect bad signed hexadecimal string values. */
72253
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
72254
-
72255
- /** Used to detect binary string values. */
72256
- var reIsBinary = /^0b[01]+$/i;
72257
-
72258
- /** Used to detect octal string values. */
72259
- var reIsOctal = /^0o[0-7]+$/i;
72205
+ /**
72206
+ * Determine if a value is an ArrayBuffer
72207
+ *
72208
+ * @param {Object} val The value to test
72209
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
72210
+ */
72211
+ function isArrayBuffer(val) {
72212
+ return toString.call(val) === '[object ArrayBuffer]';
72213
+ }
72260
72214
 
72261
- /** Built-in method references without a dependency on `root`. */
72262
- var freeParseInt = parseInt;
72215
+ /**
72216
+ * Determine if a value is a FormData
72217
+ *
72218
+ * @param {Object} val The value to test
72219
+ * @returns {boolean} True if value is an FormData, otherwise false
72220
+ */
72221
+ function isFormData(val) {
72222
+ return (typeof FormData !== 'undefined') && (val instanceof FormData);
72223
+ }
72263
72224
 
72264
72225
  /**
72265
- * Converts `value` to a number.
72226
+ * Determine if a value is a view on an ArrayBuffer
72266
72227
  *
72267
- * @static
72268
- * @memberOf _
72269
- * @since 4.0.0
72270
- * @category Lang
72271
- * @param {*} value The value to process.
72272
- * @returns {number} Returns the number.
72273
- * @example
72228
+ * @param {Object} val The value to test
72229
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
72230
+ */
72231
+ function isArrayBufferView(val) {
72232
+ var result;
72233
+ if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
72234
+ result = ArrayBuffer.isView(val);
72235
+ } else {
72236
+ result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
72237
+ }
72238
+ return result;
72239
+ }
72240
+
72241
+ /**
72242
+ * Determine if a value is a String
72274
72243
  *
72275
- * _.toNumber(3.2);
72276
- * // => 3.2
72244
+ * @param {Object} val The value to test
72245
+ * @returns {boolean} True if value is a String, otherwise false
72246
+ */
72247
+ function isString(val) {
72248
+ return typeof val === 'string';
72249
+ }
72250
+
72251
+ /**
72252
+ * Determine if a value is a Number
72277
72253
  *
72278
- * _.toNumber(Number.MIN_VALUE);
72279
- * // => 5e-324
72254
+ * @param {Object} val The value to test
72255
+ * @returns {boolean} True if value is a Number, otherwise false
72256
+ */
72257
+ function isNumber(val) {
72258
+ return typeof val === 'number';
72259
+ }
72260
+
72261
+ /**
72262
+ * Determine if a value is an Object
72280
72263
  *
72281
- * _.toNumber(Infinity);
72282
- * // => Infinity
72264
+ * @param {Object} val The value to test
72265
+ * @returns {boolean} True if value is an Object, otherwise false
72266
+ */
72267
+ function isObject(val) {
72268
+ return val !== null && typeof val === 'object';
72269
+ }
72270
+
72271
+ /**
72272
+ * Determine if a value is a plain Object
72283
72273
  *
72284
- * _.toNumber('3.2');
72285
- * // => 3.2
72274
+ * @param {Object} val The value to test
72275
+ * @return {boolean} True if value is a plain Object, otherwise false
72286
72276
  */
72287
- function toNumber(value) {
72288
- if (typeof value == 'number') {
72289
- return value;
72290
- }
72291
- if (isSymbol(value)) {
72292
- return NAN;
72293
- }
72294
- if (isObject$5(value)) {
72295
- var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
72296
- value = isObject$5(other) ? (other + '') : other;
72297
- }
72298
- if (typeof value != 'string') {
72299
- return value === 0 ? value : +value;
72277
+ function isPlainObject(val) {
72278
+ if (toString.call(val) !== '[object Object]') {
72279
+ return false;
72300
72280
  }
72301
- value = baseTrim(value);
72302
- var isBinary = reIsBinary.test(value);
72303
- return (isBinary || reIsOctal.test(value))
72304
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
72305
- : (reIsBadHex.test(value) ? NAN : +value);
72281
+
72282
+ var prototype = Object.getPrototypeOf(val);
72283
+ return prototype === null || prototype === Object.prototype;
72306
72284
  }
72307
72285
 
72308
72286
  /**
72309
- * Gets the timestamp of the number of milliseconds that have elapsed since
72310
- * the Unix epoch (1 January 1970 00:00:00 UTC).
72287
+ * Determine if a value is a Date
72311
72288
  *
72312
- * @static
72313
- * @memberOf _
72314
- * @since 2.4.0
72315
- * @category Date
72316
- * @returns {number} Returns the timestamp.
72317
- * @example
72289
+ * @param {Object} val The value to test
72290
+ * @returns {boolean} True if value is a Date, otherwise false
72291
+ */
72292
+ function isDate$1(val) {
72293
+ return toString.call(val) === '[object Date]';
72294
+ }
72295
+
72296
+ /**
72297
+ * Determine if a value is a File
72318
72298
  *
72319
- * _.defer(function(stamp) {
72320
- * console.log(_.now() - stamp);
72321
- * }, _.now());
72322
- * // => Logs the number of milliseconds it took for the deferred invocation.
72299
+ * @param {Object} val The value to test
72300
+ * @returns {boolean} True if value is a File, otherwise false
72323
72301
  */
72324
- var now = function() {
72325
- return root$1.Date.now();
72326
- };
72302
+ function isFile(val) {
72303
+ return toString.call(val) === '[object File]';
72304
+ }
72327
72305
 
72328
- var now$1 = now;
72306
+ /**
72307
+ * Determine if a value is a Blob
72308
+ *
72309
+ * @param {Object} val The value to test
72310
+ * @returns {boolean} True if value is a Blob, otherwise false
72311
+ */
72312
+ function isBlob(val) {
72313
+ return toString.call(val) === '[object Blob]';
72314
+ }
72329
72315
 
72330
- /** Error message constants. */
72331
- var FUNC_ERROR_TEXT = 'Expected a function';
72316
+ /**
72317
+ * Determine if a value is a Function
72318
+ *
72319
+ * @param {Object} val The value to test
72320
+ * @returns {boolean} True if value is a Function, otherwise false
72321
+ */
72322
+ function isFunction(val) {
72323
+ return toString.call(val) === '[object Function]';
72324
+ }
72332
72325
 
72333
- /* Built-in method references for those with the same name as other `lodash` methods. */
72334
- var nativeMax = Math.max,
72335
- nativeMin = Math.min;
72326
+ /**
72327
+ * Determine if a value is a Stream
72328
+ *
72329
+ * @param {Object} val The value to test
72330
+ * @returns {boolean} True if value is a Stream, otherwise false
72331
+ */
72332
+ function isStream(val) {
72333
+ return isObject(val) && isFunction(val.pipe);
72334
+ }
72336
72335
 
72337
72336
  /**
72338
- * Creates a debounced function that delays invoking `func` until after `wait`
72339
- * milliseconds have elapsed since the last time the debounced function was
72340
- * invoked. The debounced function comes with a `cancel` method to cancel
72341
- * delayed `func` invocations and a `flush` method to immediately invoke them.
72342
- * Provide `options` to indicate whether `func` should be invoked on the
72343
- * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
72344
- * with the last arguments provided to the debounced function. Subsequent
72345
- * calls to the debounced function return the result of the last `func`
72346
- * invocation.
72337
+ * Determine if a value is a URLSearchParams object
72347
72338
  *
72348
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
72349
- * invoked on the trailing edge of the timeout only if the debounced function
72350
- * is invoked more than once during the `wait` timeout.
72339
+ * @param {Object} val The value to test
72340
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
72341
+ */
72342
+ function isURLSearchParams(val) {
72343
+ return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
72344
+ }
72345
+
72346
+ /**
72347
+ * Trim excess whitespace off the beginning and end of a string
72351
72348
  *
72352
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
72353
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
72349
+ * @param {String} str The String to trim
72350
+ * @returns {String} The String freed of excess whitespace
72351
+ */
72352
+ function trim(str) {
72353
+ return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
72354
+ }
72355
+
72356
+ /**
72357
+ * Determine if we're running in a standard browser environment
72354
72358
  *
72355
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
72356
- * for details over the differences between `_.debounce` and `_.throttle`.
72359
+ * This allows axios to run in a web worker, and react-native.
72360
+ * Both environments support XMLHttpRequest, but not fully standard globals.
72357
72361
  *
72358
- * @static
72359
- * @memberOf _
72360
- * @since 0.1.0
72361
- * @category Function
72362
- * @param {Function} func The function to debounce.
72363
- * @param {number} [wait=0] The number of milliseconds to delay.
72364
- * @param {Object} [options={}] The options object.
72365
- * @param {boolean} [options.leading=false]
72366
- * Specify invoking on the leading edge of the timeout.
72367
- * @param {number} [options.maxWait]
72368
- * The maximum time `func` is allowed to be delayed before it's invoked.
72369
- * @param {boolean} [options.trailing=true]
72370
- * Specify invoking on the trailing edge of the timeout.
72371
- * @returns {Function} Returns the new debounced function.
72372
- * @example
72362
+ * web workers:
72363
+ * typeof window -> undefined
72364
+ * typeof document -> undefined
72373
72365
  *
72374
- * // Avoid costly calculations while the window size is in flux.
72375
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
72366
+ * react-native:
72367
+ * navigator.product -> 'ReactNative'
72368
+ * nativescript
72369
+ * navigator.product -> 'NativeScript' or 'NS'
72370
+ */
72371
+ function isStandardBrowserEnv() {
72372
+ if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
72373
+ navigator.product === 'NativeScript' ||
72374
+ navigator.product === 'NS')) {
72375
+ return false;
72376
+ }
72377
+ return (
72378
+ typeof window !== 'undefined' &&
72379
+ typeof document !== 'undefined'
72380
+ );
72381
+ }
72382
+
72383
+ /**
72384
+ * Iterate over an Array or an Object invoking a function for each item.
72376
72385
  *
72377
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
72378
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
72379
- * 'leading': true,
72380
- * 'trailing': false
72381
- * }));
72386
+ * If `obj` is an Array callback will be called passing
72387
+ * the value, index, and complete array for each item.
72382
72388
  *
72383
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
72384
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
72385
- * var source = new EventSource('/stream');
72386
- * jQuery(source).on('message', debounced);
72389
+ * If 'obj' is an Object callback will be called passing
72390
+ * the value, key, and complete object for each property.
72387
72391
  *
72388
- * // Cancel the trailing debounced invocation.
72389
- * jQuery(window).on('popstate', debounced.cancel);
72392
+ * @param {Object|Array} obj The object to iterate
72393
+ * @param {Function} fn The callback to invoke for each item
72390
72394
  */
72391
- function debounce(func, wait, options) {
72392
- var lastArgs,
72393
- lastThis,
72394
- maxWait,
72395
- result,
72396
- timerId,
72397
- lastCallTime,
72398
- lastInvokeTime = 0,
72399
- leading = false,
72400
- maxing = false,
72401
- trailing = true;
72402
-
72403
- if (typeof func != 'function') {
72404
- throw new TypeError(FUNC_ERROR_TEXT);
72405
- }
72406
- wait = toNumber(wait) || 0;
72407
- if (isObject$5(options)) {
72408
- leading = !!options.leading;
72409
- maxing = 'maxWait' in options;
72410
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
72411
- trailing = 'trailing' in options ? !!options.trailing : trailing;
72412
- }
72413
-
72414
- function invokeFunc(time) {
72415
- var args = lastArgs,
72416
- thisArg = lastThis;
72417
-
72418
- lastArgs = lastThis = undefined;
72419
- lastInvokeTime = time;
72420
- result = func.apply(thisArg, args);
72421
- return result;
72422
- }
72423
-
72424
- function leadingEdge(time) {
72425
- // Reset any `maxWait` timer.
72426
- lastInvokeTime = time;
72427
- // Start the timer for the trailing edge.
72428
- timerId = setTimeout(timerExpired, wait);
72429
- // Invoke the leading edge.
72430
- return leading ? invokeFunc(time) : result;
72431
- }
72432
-
72433
- function remainingWait(time) {
72434
- var timeSinceLastCall = time - lastCallTime,
72435
- timeSinceLastInvoke = time - lastInvokeTime,
72436
- timeWaiting = wait - timeSinceLastCall;
72437
-
72438
- return maxing
72439
- ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
72440
- : timeWaiting;
72395
+ function forEach(obj, fn) {
72396
+ // Don't bother if no value provided
72397
+ if (obj === null || typeof obj === 'undefined') {
72398
+ return;
72441
72399
  }
72442
72400
 
72443
- function shouldInvoke(time) {
72444
- var timeSinceLastCall = time - lastCallTime,
72445
- timeSinceLastInvoke = time - lastInvokeTime;
72446
-
72447
- // Either this is the first call, activity has stopped and we're at the
72448
- // trailing edge, the system time has gone backwards and we're treating
72449
- // it as the trailing edge, or we've hit the `maxWait` limit.
72450
- return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
72451
- (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
72401
+ // Force an array if not already something iterable
72402
+ if (typeof obj !== 'object') {
72403
+ /*eslint no-param-reassign:0*/
72404
+ obj = [obj];
72452
72405
  }
72453
72406
 
72454
- function timerExpired() {
72455
- var time = now$1();
72456
- if (shouldInvoke(time)) {
72457
- return trailingEdge(time);
72407
+ if (isArray(obj)) {
72408
+ // Iterate over array values
72409
+ for (var i = 0, l = obj.length; i < l; i++) {
72410
+ fn.call(null, obj[i], i, obj);
72411
+ }
72412
+ } else {
72413
+ // Iterate over object keys
72414
+ for (var key in obj) {
72415
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
72416
+ fn.call(null, obj[key], key, obj);
72417
+ }
72458
72418
  }
72459
- // Restart the timer.
72460
- timerId = setTimeout(timerExpired, remainingWait(time));
72461
72419
  }
72420
+ }
72462
72421
 
72463
- function trailingEdge(time) {
72464
- timerId = undefined;
72465
-
72466
- // Only invoke if we have `lastArgs` which means `func` has been
72467
- // debounced at least once.
72468
- if (trailing && lastArgs) {
72469
- return invokeFunc(time);
72422
+ /**
72423
+ * Accepts varargs expecting each argument to be an object, then
72424
+ * immutably merges the properties of each object and returns result.
72425
+ *
72426
+ * When multiple objects contain the same key the later object in
72427
+ * the arguments list will take precedence.
72428
+ *
72429
+ * Example:
72430
+ *
72431
+ * ```js
72432
+ * var result = merge({foo: 123}, {foo: 456});
72433
+ * console.log(result.foo); // outputs 456
72434
+ * ```
72435
+ *
72436
+ * @param {Object} obj1 Object to merge
72437
+ * @returns {Object} Result of all merge properties
72438
+ */
72439
+ function merge(/* obj1, obj2, obj3, ... */) {
72440
+ var result = {};
72441
+ function assignValue(val, key) {
72442
+ if (isPlainObject(result[key]) && isPlainObject(val)) {
72443
+ result[key] = merge(result[key], val);
72444
+ } else if (isPlainObject(val)) {
72445
+ result[key] = merge({}, val);
72446
+ } else if (isArray(val)) {
72447
+ result[key] = val.slice();
72448
+ } else {
72449
+ result[key] = val;
72470
72450
  }
72471
- lastArgs = lastThis = undefined;
72472
- return result;
72473
72451
  }
72474
72452
 
72475
- function cancel() {
72476
- if (timerId !== undefined) {
72477
- clearTimeout(timerId);
72478
- }
72479
- lastInvokeTime = 0;
72480
- lastArgs = lastCallTime = lastThis = timerId = undefined;
72481
- }
72482
-
72483
- function flush() {
72484
- return timerId === undefined ? result : trailingEdge(now$1());
72485
- }
72486
-
72487
- function debounced() {
72488
- var time = now$1(),
72489
- isInvoking = shouldInvoke(time);
72490
-
72491
- lastArgs = arguments;
72492
- lastThis = this;
72493
- lastCallTime = time;
72494
-
72495
- if (isInvoking) {
72496
- if (timerId === undefined) {
72497
- return leadingEdge(lastCallTime);
72498
- }
72499
- if (maxing) {
72500
- // Handle invocations in a tight loop.
72501
- clearTimeout(timerId);
72502
- timerId = setTimeout(timerExpired, wait);
72503
- return invokeFunc(lastCallTime);
72504
- }
72505
- }
72506
- if (timerId === undefined) {
72507
- timerId = setTimeout(timerExpired, wait);
72508
- }
72509
- return result;
72453
+ for (var i = 0, l = arguments.length; i < l; i++) {
72454
+ forEach(arguments[i], assignValue);
72510
72455
  }
72511
- debounced.cancel = cancel;
72512
- debounced.flush = flush;
72513
- return debounced;
72456
+ return result;
72514
72457
  }
72515
72458
 
72516
- var TOP_MARGIN$1 = 10;
72517
- var BOTTOM_MARGIN$1 = 10;
72518
- var EMPTY_CATEGORY_NAME = 'EMPTY_EVENT';
72519
- var QueryEventsChart = function (_a) {
72520
- var data = _a.data, maxEPS = _a.maxEPS, groupByOperation = _a.groupByOperation, _b = _a.isTabletAnomaly, isTabletAnomaly = _b === void 0 ? false : _b;
72521
- var chartRef = useRef(null);
72522
- var barHeight = 40;
72523
- useEffect(function () {
72524
- if (!chartRef.current)
72525
- return;
72526
- var chartInstance = init(chartRef.current);
72527
- var categories = data.map(function (entry) {
72528
- return groupByOperation === WaitEventClassification.WAIT_EVENT
72529
- ? entry.waitEvent
72530
- : entry.waitEventType;
72531
- });
72532
- // Calculate total used EPS
72533
- var totalUsed = data.reduce(function (sum, entry) { return sum + entry.eps; }, 0);
72534
- var emptySpace = Math.max(0, maxEPS - totalUsed);
72535
- var series = [];
72536
- // Add series for each category first (these will be on the left)
72537
- categories.forEach(function (category, index) {
72538
- var _a;
72539
- series.push({
72540
- name: category,
72541
- type: 'bar',
72542
- stack: 'total',
72543
- label: { show: false },
72544
- data: [data[index].eps],
72545
- itemStyle: {
72546
- color: (_a = NAME_COLOR_MAPPING[category]) !== null && _a !== void 0 ? _a : COLORS[index]
72547
- }
72548
- });
72549
- });
72550
- // Add empty space series last (this will appear on the right after all colored segments)
72551
- if (emptySpace > 0) {
72552
- series.push({
72553
- name: EMPTY_CATEGORY_NAME,
72554
- type: 'bar',
72555
- stack: 'total',
72556
- label: { show: false },
72557
- data: [emptySpace],
72558
- itemStyle: {
72559
- color: NAME_COLOR_MAPPING[EMPTY_CATEGORY_NAME]
72560
- },
72561
- silent: true,
72562
- tooltip: { show: false }
72563
- });
72564
- }
72565
- var option = {
72566
- animation: false,
72567
- grid: {
72568
- left: 0,
72569
- right: 0,
72570
- top: TOP_MARGIN$1,
72571
- bottom: BOTTOM_MARGIN$1,
72572
- containLabel: false
72573
- },
72574
- tooltip: {
72575
- trigger: 'item',
72576
- confine: false,
72577
- extraCssText: 'letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px; z-index:10000 !important;',
72578
- formatter: function (params) {
72579
- var left = getLegendKey(params.color, params.seriesName);
72580
- var right = getLegendValue(Number(params.value).toFixed(3));
72581
- var rows = "<div style=\"\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* \u2190 24px between columns */\n align-items:center;\n margin-bottom:6px;\n \">\n ".concat(left).concat(right, "\n </div>");
72582
- return "<div style=\"letter-spacing:0.5px;\">".concat(rows, "</div>");
72583
- // Mimic Plotly's 'x+name' behavior
72584
- // return `${params.marker} ${params.seriesName}: ${params.value}`;
72585
- },
72586
- // backgroundColor: 'rgba(50, 50, 50, 0.8)',
72587
- textStyle: {
72588
- fontSize: 11.5,
72589
- color: '#0B1117',
72590
- fontWeight: 400
72591
- }
72592
- },
72593
- xAxis: {
72594
- type: 'value',
72595
- show: false,
72596
- min: 0,
72597
- max: maxEPS
72598
- },
72599
- yAxis: {
72600
- type: 'category',
72601
- data: [''], // single row
72602
- show: false
72603
- },
72604
- series: series
72605
- };
72606
- chartInstance.setOption(option);
72607
- // Resize handling
72608
- var resizeObserver = new ResizeObserver(function () {
72609
- chartInstance.resize();
72610
- });
72611
- resizeObserver.observe(chartRef.current);
72612
- return function () {
72613
- resizeObserver.disconnect();
72614
- chartInstance.dispose();
72615
- };
72616
- }, [data, groupByOperation, maxEPS]);
72617
- return (jsx("div", { className: "query-events-chart-container", ref: chartRef, style: {
72618
- height: "".concat(barHeight, "px"),
72619
- width: isTabletAnomaly ? '75%' : '100%',
72620
- display: 'flex',
72621
- alignItems: 'center',
72622
- justifyContent: 'center'
72623
- } }));
72624
- };
72625
-
72626
- var useStyles$i = makeStyles$1(function (theme) { return ({
72627
- itemsContainer: {
72628
- padding: theme.spacing(1, 0)
72629
- },
72630
- item: {
72631
- paddingLeft: theme.spacing(2),
72632
- '& label': {
72633
- height: '36px'
72634
- }
72635
- },
72636
- checkbox: {
72637
- '& .yb-MuiSvgIcon-root': {
72638
- width: '20px',
72639
- height: '20px'
72640
- }
72641
- }
72642
- }); });
72643
- var ColumnSelectorDrawer = function (_a) {
72644
- var _b;
72645
- _a.appName; var columns = _a.columns, hiddenColumns = _a.hiddenColumns, _c = _a.isDbLoadMetadataColumns, isDbLoadMetadataColumns = _c === void 0 ? false : _c, _d = _a.isTabletsMetadataColumns, isTabletsMetadataColumns = _d === void 0 ? false : _d, _e = _a.isNodeLoadMetadataColumns, isNodeLoadMetadataColumns = _e === void 0 ? false : _e, onColumnVisibilityChange = _a.onColumnVisibilityChange, close = _a.close;
72646
- var classes = useStyles$i();
72647
- var visibleStorageKey = VISIBLE_QUERY_METADATA_COLUMNS;
72648
- if (isTabletsMetadataColumns) {
72649
- visibleStorageKey = VISIBLE_TABLETS_METADATA_COLUMNS;
72650
- }
72651
- else if (isDbLoadMetadataColumns) {
72652
- visibleStorageKey = VISIBLE_DB_LOAD_METADATA_COLUMNS;
72653
- }
72654
- else if (isNodeLoadMetadataColumns) {
72655
- visibleStorageKey = VISIBLE_NODE_LOAD_METADATA_COLUMNS;
72656
- }
72657
- // Retrieve VISIBLE_QUERY_METADATA_COLUMNS from session storage if it exists
72658
- var storedVisibleColumns = JSON.parse((_b = sessionStorage.getItem(visibleStorageKey)) !== null && _b !== void 0 ? _b : '[]');
72659
- var defaultValues = columns.reduce(function (acc, column) {
72660
- var _a;
72661
- acc[column.name] =
72662
- storedVisibleColumns.length > 0
72663
- ? storedVisibleColumns.includes(column.name)
72664
- : (_a = column === null || column === void 0 ? void 0 : column.options) === null || _a === void 0 ? void 0 : _a.display;
72665
- return acc;
72666
- }, {});
72667
- var _f = useForm({ defaultValues: defaultValues }), control = _f.control, handleSubmit = _f.handleSubmit, reset = _f.reset;
72668
- useEffect(function () {
72669
- reset(defaultValues);
72670
- }, [columns, reset]);
72671
- var handleClose = function () {
72672
- close();
72673
- };
72674
- var onSubmit = function (data) {
72675
- var visibleMetadataColumns = [];
72676
- Object.keys(data).forEach(function (key) {
72677
- var isVisible = data[key];
72678
- var columnName = key;
72679
- onColumnVisibilityChange(columnName, isVisible);
72680
- if (isVisible) {
72681
- visibleMetadataColumns.push(columnName);
72682
- }
72683
- });
72684
- sessionStorage.setItem(visibleStorageKey, JSON.stringify(visibleMetadataColumns));
72685
- handleClose();
72686
- };
72687
- return (jsx(YBModal, { open: true, isSidePanel: true, title: 'Add and Remove Columns', onClose: handleClose, onSubmit: handleSubmit(onSubmit), enableBackdropDismiss: true, titleSeparator: true, dialogContentProps: {
72688
- style: {
72689
- padding: 0
72690
- }
72691
- }, submitLabel: 'Apply', submitTestId: "btnApplyMetricsSelection", cancelLabel: 'Cancel', cancelTestId: "btnCloseMetricsSelection", children: jsx(Box$1, { children: jsx(Box$1, { className: classes.itemsContainer, children: columns.map(function (column) {
72692
- var isHidden = hiddenColumns.includes(column.name);
72693
- if (isHidden) {
72694
- return null;
72695
- }
72696
- return (jsx(Box$1, { className: classes.item, children: jsx(YBCheckboxField, { name: column.name, label: column.label, control: control, dataTestId: column.name, className: classes.checkbox }) }, column.name));
72697
- }) }) }) }));
72698
- };
72699
-
72700
- var axios$3 = {exports: {}};
72701
-
72702
- var bind$2 = function bind(fn, thisArg) {
72703
- return function wrap() {
72704
- var args = new Array(arguments.length);
72705
- for (var i = 0; i < args.length; i++) {
72706
- args[i] = arguments[i];
72707
- }
72708
- return fn.apply(thisArg, args);
72709
- };
72710
- };
72711
-
72712
- var bind$1 = bind$2;
72713
-
72714
- // utils is a library of generic helper functions non-specific to axios
72715
-
72716
- var toString = Object.prototype.toString;
72717
-
72718
72459
  /**
72719
- * Determine if a value is an Array
72460
+ * Extends object a by mutably adding to it the properties of object b.
72720
72461
  *
72721
- * @param {Object} val The value to test
72722
- * @returns {boolean} True if value is an Array, otherwise false
72462
+ * @param {Object} a The object to be extended
72463
+ * @param {Object} b The object to copy properties from
72464
+ * @param {Object} thisArg The object to bind function to
72465
+ * @return {Object} The resulting value of object a
72723
72466
  */
72724
- function isArray(val) {
72725
- return toString.call(val) === '[object Array]';
72467
+ function extend(a, b, thisArg) {
72468
+ forEach(b, function assignValue(val, key) {
72469
+ if (thisArg && typeof val === 'function') {
72470
+ a[key] = bind$1(val, thisArg);
72471
+ } else {
72472
+ a[key] = val;
72473
+ }
72474
+ });
72475
+ return a;
72726
72476
  }
72727
72477
 
72728
72478
  /**
72729
- * Determine if a value is undefined
72479
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
72730
72480
  *
72731
- * @param {Object} val The value to test
72732
- * @returns {boolean} True if the value is undefined, otherwise false
72481
+ * @param {string} content with BOM
72482
+ * @return {string} content value without BOM
72733
72483
  */
72734
- function isUndefined(val) {
72735
- return typeof val === 'undefined';
72484
+ function stripBOM(content) {
72485
+ if (content.charCodeAt(0) === 0xFEFF) {
72486
+ content = content.slice(1);
72487
+ }
72488
+ return content;
72736
72489
  }
72737
72490
 
72738
- /**
72739
- * Determine if a value is a Buffer
72740
- *
72741
- * @param {Object} val The value to test
72742
- * @returns {boolean} True if value is a Buffer, otherwise false
72743
- */
72744
- function isBuffer(val) {
72745
- return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
72746
- && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
72747
- }
72491
+ var utils$9 = {
72492
+ isArray: isArray,
72493
+ isArrayBuffer: isArrayBuffer,
72494
+ isBuffer: isBuffer,
72495
+ isFormData: isFormData,
72496
+ isArrayBufferView: isArrayBufferView,
72497
+ isString: isString,
72498
+ isNumber: isNumber,
72499
+ isObject: isObject,
72500
+ isPlainObject: isPlainObject,
72501
+ isUndefined: isUndefined,
72502
+ isDate: isDate$1,
72503
+ isFile: isFile,
72504
+ isBlob: isBlob,
72505
+ isFunction: isFunction,
72506
+ isStream: isStream,
72507
+ isURLSearchParams: isURLSearchParams,
72508
+ isStandardBrowserEnv: isStandardBrowserEnv,
72509
+ forEach: forEach,
72510
+ merge: merge,
72511
+ extend: extend,
72512
+ trim: trim,
72513
+ stripBOM: stripBOM
72514
+ };
72748
72515
 
72749
- /**
72750
- * Determine if a value is an ArrayBuffer
72751
- *
72752
- * @param {Object} val The value to test
72753
- * @returns {boolean} True if value is an ArrayBuffer, otherwise false
72754
- */
72755
- function isArrayBuffer(val) {
72756
- return toString.call(val) === '[object ArrayBuffer]';
72757
- }
72516
+ var utils$8 = utils$9;
72758
72517
 
72759
- /**
72760
- * Determine if a value is a FormData
72761
- *
72762
- * @param {Object} val The value to test
72763
- * @returns {boolean} True if value is an FormData, otherwise false
72764
- */
72765
- function isFormData(val) {
72766
- return (typeof FormData !== 'undefined') && (val instanceof FormData);
72518
+ function encode$1(val) {
72519
+ return encodeURIComponent(val).
72520
+ replace(/%3A/gi, ':').
72521
+ replace(/%24/g, '$').
72522
+ replace(/%2C/gi, ',').
72523
+ replace(/%20/g, '+').
72524
+ replace(/%5B/gi, '[').
72525
+ replace(/%5D/gi, ']');
72767
72526
  }
72768
72527
 
72769
72528
  /**
72770
- * Determine if a value is a view on an ArrayBuffer
72529
+ * Build a URL by appending params to the end
72771
72530
  *
72772
- * @param {Object} val The value to test
72773
- * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
72531
+ * @param {string} url The base of the url (e.g., http://www.google.com)
72532
+ * @param {object} [params] The params to be appended
72533
+ * @returns {string} The formatted url
72774
72534
  */
72775
- function isArrayBufferView(val) {
72776
- var result;
72777
- if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
72778
- result = ArrayBuffer.isView(val);
72779
- } else {
72780
- result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
72535
+ var buildURL$1 = function buildURL(url, params, paramsSerializer) {
72536
+ /*eslint no-param-reassign:0*/
72537
+ if (!params) {
72538
+ return url;
72781
72539
  }
72782
- return result;
72783
- }
72784
72540
 
72785
- /**
72786
- * Determine if a value is a String
72787
- *
72788
- * @param {Object} val The value to test
72789
- * @returns {boolean} True if value is a String, otherwise false
72790
- */
72791
- function isString(val) {
72792
- return typeof val === 'string';
72793
- }
72541
+ var serializedParams;
72542
+ if (paramsSerializer) {
72543
+ serializedParams = paramsSerializer(params);
72544
+ } else if (utils$8.isURLSearchParams(params)) {
72545
+ serializedParams = params.toString();
72546
+ } else {
72547
+ var parts = [];
72794
72548
 
72795
- /**
72796
- * Determine if a value is a Number
72797
- *
72798
- * @param {Object} val The value to test
72799
- * @returns {boolean} True if value is a Number, otherwise false
72800
- */
72801
- function isNumber(val) {
72802
- return typeof val === 'number';
72803
- }
72549
+ utils$8.forEach(params, function serialize(val, key) {
72550
+ if (val === null || typeof val === 'undefined') {
72551
+ return;
72552
+ }
72804
72553
 
72805
- /**
72806
- * Determine if a value is an Object
72807
- *
72808
- * @param {Object} val The value to test
72809
- * @returns {boolean} True if value is an Object, otherwise false
72810
- */
72811
- function isObject(val) {
72812
- return val !== null && typeof val === 'object';
72813
- }
72554
+ if (utils$8.isArray(val)) {
72555
+ key = key + '[]';
72556
+ } else {
72557
+ val = [val];
72558
+ }
72814
72559
 
72815
- /**
72816
- * Determine if a value is a plain Object
72817
- *
72818
- * @param {Object} val The value to test
72819
- * @return {boolean} True if value is a plain Object, otherwise false
72820
- */
72821
- function isPlainObject(val) {
72822
- if (toString.call(val) !== '[object Object]') {
72823
- return false;
72560
+ utils$8.forEach(val, function parseValue(v) {
72561
+ if (utils$8.isDate(v)) {
72562
+ v = v.toISOString();
72563
+ } else if (utils$8.isObject(v)) {
72564
+ v = JSON.stringify(v);
72565
+ }
72566
+ parts.push(encode$1(key) + '=' + encode$1(v));
72567
+ });
72568
+ });
72569
+
72570
+ serializedParams = parts.join('&');
72824
72571
  }
72825
72572
 
72826
- var prototype = Object.getPrototypeOf(val);
72827
- return prototype === null || prototype === Object.prototype;
72828
- }
72573
+ if (serializedParams) {
72574
+ var hashmarkIndex = url.indexOf('#');
72575
+ if (hashmarkIndex !== -1) {
72576
+ url = url.slice(0, hashmarkIndex);
72577
+ }
72829
72578
 
72830
- /**
72831
- * Determine if a value is a Date
72832
- *
72833
- * @param {Object} val The value to test
72834
- * @returns {boolean} True if value is a Date, otherwise false
72835
- */
72836
- function isDate$1(val) {
72837
- return toString.call(val) === '[object Date]';
72838
- }
72579
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
72580
+ }
72839
72581
 
72840
- /**
72841
- * Determine if a value is a File
72842
- *
72843
- * @param {Object} val The value to test
72844
- * @returns {boolean} True if value is a File, otherwise false
72845
- */
72846
- function isFile(val) {
72847
- return toString.call(val) === '[object File]';
72848
- }
72582
+ return url;
72583
+ };
72849
72584
 
72850
- /**
72851
- * Determine if a value is a Blob
72852
- *
72853
- * @param {Object} val The value to test
72854
- * @returns {boolean} True if value is a Blob, otherwise false
72855
- */
72856
- function isBlob(val) {
72857
- return toString.call(val) === '[object Blob]';
72858
- }
72585
+ var utils$7 = utils$9;
72859
72586
 
72860
- /**
72861
- * Determine if a value is a Function
72862
- *
72863
- * @param {Object} val The value to test
72864
- * @returns {boolean} True if value is a Function, otherwise false
72865
- */
72866
- function isFunction(val) {
72867
- return toString.call(val) === '[object Function]';
72587
+ function InterceptorManager$1() {
72588
+ this.handlers = [];
72868
72589
  }
72869
72590
 
72870
72591
  /**
72871
- * Determine if a value is a Stream
72592
+ * Add a new interceptor to the stack
72872
72593
  *
72873
- * @param {Object} val The value to test
72874
- * @returns {boolean} True if value is a Stream, otherwise false
72875
- */
72876
- function isStream(val) {
72877
- return isObject(val) && isFunction(val.pipe);
72878
- }
72879
-
72880
- /**
72881
- * Determine if a value is a URLSearchParams object
72594
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
72595
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
72882
72596
  *
72883
- * @param {Object} val The value to test
72884
- * @returns {boolean} True if value is a URLSearchParams object, otherwise false
72597
+ * @return {Number} An ID used to remove interceptor later
72885
72598
  */
72886
- function isURLSearchParams(val) {
72887
- return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
72888
- }
72599
+ InterceptorManager$1.prototype.use = function use(fulfilled, rejected, options) {
72600
+ this.handlers.push({
72601
+ fulfilled: fulfilled,
72602
+ rejected: rejected,
72603
+ synchronous: options ? options.synchronous : false,
72604
+ runWhen: options ? options.runWhen : null
72605
+ });
72606
+ return this.handlers.length - 1;
72607
+ };
72889
72608
 
72890
72609
  /**
72891
- * Trim excess whitespace off the beginning and end of a string
72610
+ * Remove an interceptor from the stack
72892
72611
  *
72893
- * @param {String} str The String to trim
72894
- * @returns {String} The String freed of excess whitespace
72612
+ * @param {Number} id The ID that was returned by `use`
72895
72613
  */
72896
- function trim(str) {
72897
- return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
72898
- }
72614
+ InterceptorManager$1.prototype.eject = function eject(id) {
72615
+ if (this.handlers[id]) {
72616
+ this.handlers[id] = null;
72617
+ }
72618
+ };
72899
72619
 
72900
72620
  /**
72901
- * Determine if we're running in a standard browser environment
72902
- *
72903
- * This allows axios to run in a web worker, and react-native.
72904
- * Both environments support XMLHttpRequest, but not fully standard globals.
72905
- *
72906
- * web workers:
72907
- * typeof window -> undefined
72908
- * typeof document -> undefined
72909
- *
72910
- * react-native:
72911
- * navigator.product -> 'ReactNative'
72912
- * nativescript
72913
- * navigator.product -> 'NativeScript' or 'NS'
72914
- */
72915
- function isStandardBrowserEnv() {
72916
- if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
72917
- navigator.product === 'NativeScript' ||
72918
- navigator.product === 'NS')) {
72919
- return false;
72920
- }
72921
- return (
72922
- typeof window !== 'undefined' &&
72923
- typeof document !== 'undefined'
72924
- );
72925
- }
72926
-
72927
- /**
72928
- * Iterate over an Array or an Object invoking a function for each item.
72929
- *
72930
- * If `obj` is an Array callback will be called passing
72931
- * the value, index, and complete array for each item.
72932
- *
72933
- * If 'obj' is an Object callback will be called passing
72934
- * the value, key, and complete object for each property.
72935
- *
72936
- * @param {Object|Array} obj The object to iterate
72937
- * @param {Function} fn The callback to invoke for each item
72938
- */
72939
- function forEach(obj, fn) {
72940
- // Don't bother if no value provided
72941
- if (obj === null || typeof obj === 'undefined') {
72942
- return;
72943
- }
72944
-
72945
- // Force an array if not already something iterable
72946
- if (typeof obj !== 'object') {
72947
- /*eslint no-param-reassign:0*/
72948
- obj = [obj];
72949
- }
72950
-
72951
- if (isArray(obj)) {
72952
- // Iterate over array values
72953
- for (var i = 0, l = obj.length; i < l; i++) {
72954
- fn.call(null, obj[i], i, obj);
72955
- }
72956
- } else {
72957
- // Iterate over object keys
72958
- for (var key in obj) {
72959
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
72960
- fn.call(null, obj[key], key, obj);
72961
- }
72962
- }
72963
- }
72964
- }
72965
-
72966
- /**
72967
- * Accepts varargs expecting each argument to be an object, then
72968
- * immutably merges the properties of each object and returns result.
72969
- *
72970
- * When multiple objects contain the same key the later object in
72971
- * the arguments list will take precedence.
72972
- *
72973
- * Example:
72974
- *
72975
- * ```js
72976
- * var result = merge({foo: 123}, {foo: 456});
72977
- * console.log(result.foo); // outputs 456
72978
- * ```
72979
- *
72980
- * @param {Object} obj1 Object to merge
72981
- * @returns {Object} Result of all merge properties
72982
- */
72983
- function merge(/* obj1, obj2, obj3, ... */) {
72984
- var result = {};
72985
- function assignValue(val, key) {
72986
- if (isPlainObject(result[key]) && isPlainObject(val)) {
72987
- result[key] = merge(result[key], val);
72988
- } else if (isPlainObject(val)) {
72989
- result[key] = merge({}, val);
72990
- } else if (isArray(val)) {
72991
- result[key] = val.slice();
72992
- } else {
72993
- result[key] = val;
72994
- }
72995
- }
72996
-
72997
- for (var i = 0, l = arguments.length; i < l; i++) {
72998
- forEach(arguments[i], assignValue);
72999
- }
73000
- return result;
73001
- }
73002
-
73003
- /**
73004
- * Extends object a by mutably adding to it the properties of object b.
73005
- *
73006
- * @param {Object} a The object to be extended
73007
- * @param {Object} b The object to copy properties from
73008
- * @param {Object} thisArg The object to bind function to
73009
- * @return {Object} The resulting value of object a
73010
- */
73011
- function extend(a, b, thisArg) {
73012
- forEach(b, function assignValue(val, key) {
73013
- if (thisArg && typeof val === 'function') {
73014
- a[key] = bind$1(val, thisArg);
73015
- } else {
73016
- a[key] = val;
73017
- }
73018
- });
73019
- return a;
73020
- }
73021
-
73022
- /**
73023
- * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
73024
- *
73025
- * @param {string} content with BOM
73026
- * @return {string} content value without BOM
73027
- */
73028
- function stripBOM(content) {
73029
- if (content.charCodeAt(0) === 0xFEFF) {
73030
- content = content.slice(1);
73031
- }
73032
- return content;
73033
- }
73034
-
73035
- var utils$9 = {
73036
- isArray: isArray,
73037
- isArrayBuffer: isArrayBuffer,
73038
- isBuffer: isBuffer,
73039
- isFormData: isFormData,
73040
- isArrayBufferView: isArrayBufferView,
73041
- isString: isString,
73042
- isNumber: isNumber,
73043
- isObject: isObject,
73044
- isPlainObject: isPlainObject,
73045
- isUndefined: isUndefined,
73046
- isDate: isDate$1,
73047
- isFile: isFile,
73048
- isBlob: isBlob,
73049
- isFunction: isFunction,
73050
- isStream: isStream,
73051
- isURLSearchParams: isURLSearchParams,
73052
- isStandardBrowserEnv: isStandardBrowserEnv,
73053
- forEach: forEach,
73054
- merge: merge,
73055
- extend: extend,
73056
- trim: trim,
73057
- stripBOM: stripBOM
73058
- };
73059
-
73060
- var utils$8 = utils$9;
73061
-
73062
- function encode$1(val) {
73063
- return encodeURIComponent(val).
73064
- replace(/%3A/gi, ':').
73065
- replace(/%24/g, '$').
73066
- replace(/%2C/gi, ',').
73067
- replace(/%20/g, '+').
73068
- replace(/%5B/gi, '[').
73069
- replace(/%5D/gi, ']');
73070
- }
73071
-
73072
- /**
73073
- * Build a URL by appending params to the end
73074
- *
73075
- * @param {string} url The base of the url (e.g., http://www.google.com)
73076
- * @param {object} [params] The params to be appended
73077
- * @returns {string} The formatted url
73078
- */
73079
- var buildURL$1 = function buildURL(url, params, paramsSerializer) {
73080
- /*eslint no-param-reassign:0*/
73081
- if (!params) {
73082
- return url;
73083
- }
73084
-
73085
- var serializedParams;
73086
- if (paramsSerializer) {
73087
- serializedParams = paramsSerializer(params);
73088
- } else if (utils$8.isURLSearchParams(params)) {
73089
- serializedParams = params.toString();
73090
- } else {
73091
- var parts = [];
73092
-
73093
- utils$8.forEach(params, function serialize(val, key) {
73094
- if (val === null || typeof val === 'undefined') {
73095
- return;
73096
- }
73097
-
73098
- if (utils$8.isArray(val)) {
73099
- key = key + '[]';
73100
- } else {
73101
- val = [val];
73102
- }
73103
-
73104
- utils$8.forEach(val, function parseValue(v) {
73105
- if (utils$8.isDate(v)) {
73106
- v = v.toISOString();
73107
- } else if (utils$8.isObject(v)) {
73108
- v = JSON.stringify(v);
73109
- }
73110
- parts.push(encode$1(key) + '=' + encode$1(v));
73111
- });
73112
- });
73113
-
73114
- serializedParams = parts.join('&');
73115
- }
73116
-
73117
- if (serializedParams) {
73118
- var hashmarkIndex = url.indexOf('#');
73119
- if (hashmarkIndex !== -1) {
73120
- url = url.slice(0, hashmarkIndex);
73121
- }
73122
-
73123
- url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
73124
- }
73125
-
73126
- return url;
73127
- };
73128
-
73129
- var utils$7 = utils$9;
73130
-
73131
- function InterceptorManager$1() {
73132
- this.handlers = [];
73133
- }
73134
-
73135
- /**
73136
- * Add a new interceptor to the stack
73137
- *
73138
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
73139
- * @param {Function} rejected The function to handle `reject` for a `Promise`
73140
- *
73141
- * @return {Number} An ID used to remove interceptor later
73142
- */
73143
- InterceptorManager$1.prototype.use = function use(fulfilled, rejected, options) {
73144
- this.handlers.push({
73145
- fulfilled: fulfilled,
73146
- rejected: rejected,
73147
- synchronous: options ? options.synchronous : false,
73148
- runWhen: options ? options.runWhen : null
73149
- });
73150
- return this.handlers.length - 1;
73151
- };
73152
-
73153
- /**
73154
- * Remove an interceptor from the stack
73155
- *
73156
- * @param {Number} id The ID that was returned by `use`
73157
- */
73158
- InterceptorManager$1.prototype.eject = function eject(id) {
73159
- if (this.handlers[id]) {
73160
- this.handlers[id] = null;
73161
- }
73162
- };
73163
-
73164
- /**
73165
- * Iterate over all the registered interceptors
72621
+ * Iterate over all the registered interceptors
73166
72622
  *
73167
72623
  * This method is particularly useful for skipping over any
73168
72624
  * interceptors that may have become `null` calling `eject`.
@@ -77432,93 +76888,930 @@ var ApiService = /** @class */ (function () {
77432
76888
  : "/runtime_config_entry/".concat(scopeUuid, "/").concat(configKey);
77433
76889
  return axiosInstance.delete(requestUrl).then(function (resp) { return resp.data; });
77434
76890
  };
77435
- this.fetchBackgroundTasks = function (universeUuid, startTime, endTime, limit, apiUrl) {
77436
- var requestURL = isNonEmptyString(apiUrl)
77437
- ? "".concat(apiUrl, "/universe/").concat(universeUuid, "/background_tasks")
77438
- : "/universe/".concat(universeUuid, "/background_tasks");
77439
- var params = {};
77440
- if (startTime) {
77441
- params.startTime = startTime;
77442
- }
77443
- if (endTime) {
77444
- params.endTime = endTime;
77445
- }
77446
- if (limit !== null) {
77447
- params.limit = limit;
77448
- }
77449
- return axiosInstance
77450
- .get(requestURL, {
77451
- params: params
77452
- })
77453
- .then(function (res) { return res.data; });
76891
+ this.fetchBackgroundTasks = function (universeUuid, startTime, endTime, limit, apiUrl) {
76892
+ var requestURL = isNonEmptyString(apiUrl)
76893
+ ? "".concat(apiUrl, "/universe/").concat(universeUuid, "/background_tasks")
76894
+ : "/universe/".concat(universeUuid, "/background_tasks");
76895
+ var params = {};
76896
+ if (startTime) {
76897
+ params.startTime = startTime;
76898
+ }
76899
+ if (endTime) {
76900
+ params.endTime = endTime;
76901
+ }
76902
+ if (limit !== null) {
76903
+ params.limit = limit;
76904
+ }
76905
+ return axiosInstance
76906
+ .get(requestURL, {
76907
+ params: params
76908
+ })
76909
+ .then(function (res) { return res.data; });
76910
+ };
76911
+ // New Anomaly APIs
76912
+ this.fetchAnomalyGroups = function (universeUuid, startTime, endTime, anomalyType, getClusterDetails, apiUrl) {
76913
+ if (anomalyType === void 0) { anomalyType = ''; }
76914
+ var _a = getClusterDetails(), cluster = _a.cluster, region = _a.region, zone = _a.zone, node = _a.node;
76915
+ var params = new URLSearchParams();
76916
+ if (startTime) {
76917
+ params.append('startTime', startTime);
76918
+ }
76919
+ if (endTime) {
76920
+ params.append('endTime', endTime);
76921
+ }
76922
+ if (startTime === null && endTime === null) {
76923
+ return {};
76924
+ }
76925
+ if (isNonEmptyString(anomalyType)) {
76926
+ params.append('anomalyType', anomalyType);
76927
+ }
76928
+ if (isNonEmptyString(cluster) && cluster !== ALL) {
76929
+ params.append('clusterUuids', cluster);
76930
+ }
76931
+ if (isNonEmptyString(region) && region !== ALL) {
76932
+ params.append('regionCodes', region);
76933
+ }
76934
+ if (isNonEmptyString(zone) && zone !== ALL) {
76935
+ params.append('azCodes', zone);
76936
+ }
76937
+ if (isNonEmptyString(node) && node !== ALL) {
76938
+ params.append('instanceNames', node);
76939
+ }
76940
+ var requestUrl = isNonEmptyString(apiUrl)
76941
+ ? "".concat(apiUrl, "/universe/").concat(universeUuid, "/anomaly_groups/by_type?").concat(params.toString())
76942
+ : "/universe/".concat(universeUuid, "/anomaly_groups/by_type?").concat(params.toString());
76943
+ return axiosInstance.get(requestUrl).then(function (res) { return res.data; });
76944
+ };
76945
+ this.fetchAnomalyGroupsByType = function (universeUuid, startTime, endTime, anomalyType, apiUrl) {
76946
+ var requestUrl = isNonEmptyString(apiUrl)
76947
+ ? "".concat(apiUrl, "/universe/").concat(universeUuid, "/anomaly_groups?startTime=").concat(startTime, "&endTime=").concat(endTime, "&type=").concat(anomalyType)
76948
+ : "/universe/".concat(universeUuid, "/anomaly_groups?startTime=").concat(startTime, "&endTime=").concat(endTime, "&type=").concat(anomalyType);
76949
+ return axiosInstance.get(requestUrl).then(function (res) { return res.data; });
76950
+ };
76951
+ this.fetchAnomalyGroupById = function (universeUuid, anomalyGroupId, startTime, endTime, apiUrl) {
76952
+ if (startTime === null && endTime === null) {
76953
+ return {};
76954
+ }
76955
+ var requestUrl = isNonEmptyString(apiUrl)
76956
+ ? "".concat(apiUrl, "/universe/").concat(universeUuid, "/anomaly_groups/").concat(anomalyGroupId, "?startTime=").concat(startTime, "&endTime=").concat(endTime)
76957
+ : "/universe/".concat(universeUuid, "/anomaly_groups/").concat(anomalyGroupId, "?startTime=").concat(startTime, "&endTime=").concat(endTime);
76958
+ return axiosInstance.get(requestUrl).then(function (res) { return res.data; });
76959
+ };
76960
+ // Send telemetry events on successful click events
76961
+ this.sendTelemetryEvent = function (universeUuid, payload, apiUrl) {
76962
+ var requestUrl = isNonEmptyString(apiUrl)
76963
+ ? "".concat(apiUrl, "/universe/").concat(universeUuid, "/ui_events")
76964
+ : "/universe/".concat(universeUuid, "/ui_events");
76965
+ return axiosInstance.post(requestUrl, payload).then(function (resp) { return resp.data; });
76966
+ };
76967
+ }
76968
+ return ApiService;
76969
+ }());
76970
+ var PerfAdvisorAPI = new ApiService();
76971
+
76972
+ var _circle, _circle2, _circle3, _circle4, _circle5, _circle6, _circle7, _circle8, _circle9;
76973
+ function _extends$i() { return _extends$i = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$i.apply(null, arguments); }
76974
+ const SvgLoading = props => /*#__PURE__*/React$1.createElement("svg", _extends$i({
76975
+ xmlns: "http://www.w3.org/2000/svg",
76976
+ style: {
76977
+ display: "block",
76978
+ shapeRendering: "auto",
76979
+ backgroundPosition: "initial initial",
76980
+ backgroundRepeat: "initial initial"
76981
+ },
76982
+ width: 24,
76983
+ height: 24,
76984
+ viewBox: "30 30 40 40",
76985
+ preserveAspectRatio: "xMidYMid"
76986
+ }, props), _circle || (_circle = /*#__PURE__*/React$1.createElement("circle", {
76987
+ cx: 65,
76988
+ cy: 50,
76989
+ fill: "#bfcded",
76990
+ r: 3
76991
+ }, /*#__PURE__*/React$1.createElement("animate", {
76992
+ attributeName: "r",
76993
+ values: "1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",
76994
+ dur: "2.0408163265306123s",
76995
+ repeatCount: "indefinite",
76996
+ begin: "-1.8140589569160996s"
76997
+ }), /*#__PURE__*/React$1.createElement("animate", {
76998
+ attributeName: "fill",
76999
+ values: "#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",
77000
+ repeatCount: "indefinite",
77001
+ dur: "2.0408163265306123s",
77002
+ begin: "-1.8140589569160996s"
77003
+ }))), _circle2 || (_circle2 = /*#__PURE__*/React$1.createElement("circle", {
77004
+ cx: 61.491,
77005
+ cy: 59.642,
77006
+ fill: "#bfcded",
77007
+ r: 3
77008
+ }, /*#__PURE__*/React$1.createElement("animate", {
77009
+ attributeName: "r",
77010
+ values: "1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",
77011
+ dur: "2.0408163265306123s",
77012
+ repeatCount: "indefinite",
77013
+ begin: "-1.5873015873015872s"
77014
+ }), /*#__PURE__*/React$1.createElement("animate", {
77015
+ attributeName: "fill",
77016
+ values: "#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",
77017
+ repeatCount: "indefinite",
77018
+ dur: "2.0408163265306123s",
77019
+ begin: "-1.5873015873015872s"
77020
+ }))), _circle3 || (_circle3 = /*#__PURE__*/React$1.createElement("circle", {
77021
+ cx: 52.605,
77022
+ cy: 64.772,
77023
+ fill: "#bfcded",
77024
+ r: 3
77025
+ }, /*#__PURE__*/React$1.createElement("animate", {
77026
+ attributeName: "r",
77027
+ values: "1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",
77028
+ dur: "2.0408163265306123s",
77029
+ repeatCount: "indefinite",
77030
+ begin: "-1.3605442176870748s"
77031
+ }), /*#__PURE__*/React$1.createElement("animate", {
77032
+ attributeName: "fill",
77033
+ values: "#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",
77034
+ repeatCount: "indefinite",
77035
+ dur: "2.0408163265306123s",
77036
+ begin: "-1.3605442176870748s"
77037
+ }))), _circle4 || (_circle4 = /*#__PURE__*/React$1.createElement("circle", {
77038
+ cx: 42.5,
77039
+ cy: 62.99,
77040
+ fill: "#bfcded",
77041
+ r: 3
77042
+ }, /*#__PURE__*/React$1.createElement("animate", {
77043
+ attributeName: "r",
77044
+ values: "1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",
77045
+ dur: "2.0408163265306123s",
77046
+ repeatCount: "indefinite",
77047
+ begin: "-1.1337868480725624s"
77048
+ }), /*#__PURE__*/React$1.createElement("animate", {
77049
+ attributeName: "fill",
77050
+ values: "#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",
77051
+ repeatCount: "indefinite",
77052
+ dur: "2.0408163265306123s",
77053
+ begin: "-1.1337868480725624s"
77054
+ }))), _circle5 || (_circle5 = /*#__PURE__*/React$1.createElement("circle", {
77055
+ cx: 35.905,
77056
+ cy: 55.13,
77057
+ fill: "#bfcded",
77058
+ r: 3
77059
+ }, /*#__PURE__*/React$1.createElement("animate", {
77060
+ attributeName: "r",
77061
+ values: "1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",
77062
+ dur: "2.0408163265306123s",
77063
+ repeatCount: "indefinite",
77064
+ begin: "-0.9070294784580498s"
77065
+ }), /*#__PURE__*/React$1.createElement("animate", {
77066
+ attributeName: "fill",
77067
+ values: "#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",
77068
+ repeatCount: "indefinite",
77069
+ dur: "2.0408163265306123s",
77070
+ begin: "-0.9070294784580498s"
77071
+ }))), _circle6 || (_circle6 = /*#__PURE__*/React$1.createElement("circle", {
77072
+ cx: 35.905,
77073
+ cy: 44.87,
77074
+ fill: "#bfcded",
77075
+ r: 3
77076
+ }, /*#__PURE__*/React$1.createElement("animate", {
77077
+ attributeName: "r",
77078
+ values: "1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",
77079
+ dur: "2.0408163265306123s",
77080
+ repeatCount: "indefinite",
77081
+ begin: "-0.6802721088435374s"
77082
+ }), /*#__PURE__*/React$1.createElement("animate", {
77083
+ attributeName: "fill",
77084
+ values: "#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",
77085
+ repeatCount: "indefinite",
77086
+ dur: "2.0408163265306123s",
77087
+ begin: "-0.6802721088435374s"
77088
+ }))), _circle7 || (_circle7 = /*#__PURE__*/React$1.createElement("circle", {
77089
+ cx: 42.5,
77090
+ cy: 37.01,
77091
+ fill: "#bfcded",
77092
+ r: 3
77093
+ }, /*#__PURE__*/React$1.createElement("animate", {
77094
+ attributeName: "r",
77095
+ values: "1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",
77096
+ dur: "2.0408163265306123s",
77097
+ repeatCount: "indefinite",
77098
+ begin: "-0.4535147392290249s"
77099
+ }), /*#__PURE__*/React$1.createElement("animate", {
77100
+ attributeName: "fill",
77101
+ values: "#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",
77102
+ repeatCount: "indefinite",
77103
+ dur: "2.0408163265306123s",
77104
+ begin: "-0.4535147392290249s"
77105
+ }))), _circle8 || (_circle8 = /*#__PURE__*/React$1.createElement("circle", {
77106
+ cx: 52.605,
77107
+ cy: 35.228,
77108
+ fill: "#bfcded",
77109
+ r: 3
77110
+ }, /*#__PURE__*/React$1.createElement("animate", {
77111
+ attributeName: "r",
77112
+ values: "1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",
77113
+ dur: "2.0408163265306123s",
77114
+ repeatCount: "indefinite",
77115
+ begin: "-0.22675736961451246s"
77116
+ }), /*#__PURE__*/React$1.createElement("animate", {
77117
+ attributeName: "fill",
77118
+ values: "#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",
77119
+ repeatCount: "indefinite",
77120
+ dur: "2.0408163265306123s",
77121
+ begin: "-0.22675736961451246s"
77122
+ }))), _circle9 || (_circle9 = /*#__PURE__*/React$1.createElement("circle", {
77123
+ cx: 61.491,
77124
+ cy: 40.358,
77125
+ fill: "#bfcded",
77126
+ r: 3
77127
+ }, /*#__PURE__*/React$1.createElement("animate", {
77128
+ attributeName: "r",
77129
+ values: "1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",
77130
+ dur: "2.0408163265306123s",
77131
+ repeatCount: "indefinite",
77132
+ begin: "0s"
77133
+ }), /*#__PURE__*/React$1.createElement("animate", {
77134
+ attributeName: "fill",
77135
+ values: "#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",
77136
+ repeatCount: "indefinite",
77137
+ dur: "2.0408163265306123s",
77138
+ begin: "0s"
77139
+ }))));
77140
+
77141
+ var img$c = "data:image/svg+xml,%3csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.0911 3.70567H2V0.60325C2 0.316226 1.82388 0 1.37381 0C0.923736 0 0.74762 0.316226 0.74762 0.60325V4.78291H12.0911L9.85455 7.08053C9.63621 7.29087 9.63621 7.6319 9.85455 7.84224C10.0729 8.05259 10.4269 8.05259 10.6452 7.84224L13.8362 4.62515C14.0546 4.41481 14.0546 4.07377 13.8362 3.86343L10.6452 0.603249C10.4269 0.392907 10.0729 0.392907 9.85455 0.603249C9.63621 0.813592 9.63621 1.15463 9.85455 1.36497L12.0911 3.70567Z' fill='%2397A5B0'/%3e%3c/svg%3e";
77142
+ var UnderIcon = img$c;
77143
+
77144
+ var YBStyledTab$4 = styled$1(YBTab)(function (_a) {
77145
+ var theme = _a.theme;
77146
+ return ({
77147
+ display: 'flex',
77148
+ flexDirection: 'row',
77149
+ alignItems: 'center',
77150
+ padding: theme.spacing(0.5, 1),
77151
+ '& .yb-MuiTab-iconWrapper': {
77152
+ marginTop: theme.spacing(0.5)
77153
+ }
77154
+ });
77155
+ });
77156
+ var AnomalyRCAGraphs = function (_a) {
77157
+ var _b, _c, _d;
77158
+ var appName = _a.appName, timezone = _a.timezone, startTime = _a.startTime, endTime = _a.endTime, dateTimeRange = _a.dateTimeRange, metricMeasure = _a.metricMeasure, anomalyData = _a.anomalyData, getClusterDetails = _a.getClusterDetails, apiUrl = _a.apiUrl, amomalyGraphRequestParams = _a.amomalyGraphRequestParams, formattedAnomalyRca = _a.formattedAnomalyRca, urlParams = _a.urlParams, onEChartsDateSelect = _a.onEChartsDateSelect;
77159
+ // Ref to store chart instances
77160
+ var chartInstancesRef = useRef([]);
77161
+ var classes = useHelperStyles();
77162
+ var _e = useState(0), selectedTab = _e[0], setSelectedTab = _e[1];
77163
+ var _f = useState(null), RCAGraphResponseData = _f[0], setRCAGraphResponseData = _f[1];
77164
+ var _g = useState(amomalyGraphRequestParams), graphRequestParams = _g[0], setGraphRequestParams = _g[1];
77165
+ var _h = getClusterDetails(), universeUuid = _h.universeUuid, cluster = _h.cluster, region = _h.region, zone = _h.zone, node = _h.node, numNodes = _h.numNodes, outlierType = _h.outlierType;
77166
+ // Check previous props
77167
+ var previousMetricMeasure = usePrevious(metricMeasure);
77168
+ var handleTabChange = function (event, newValue) {
77169
+ var scrollY = window.scrollY; // Save scroll position
77170
+ setSelectedTab(newValue);
77171
+ setTimeout(function () { return window.scrollTo(0, scrollY); }, 0); // Restore after re-render
77172
+ };
77173
+ var onSelectAshLabel = function (groupByLabel, metricData, isAdvancedView) {
77174
+ var _a, _b;
77175
+ var groupBy = WaitEventClassification.WAIT_EVENT_COMPONENT;
77176
+ if (groupByLabel === 'Class') {
77177
+ groupBy = WaitEventClassification.WAIT_EVENT_CLASS;
77178
+ }
77179
+ else if (groupByLabel === 'Type') {
77180
+ groupBy = WaitEventClassification.WAIT_EVENT_TYPE;
77181
+ }
77182
+ else if (groupByLabel === 'Event') {
77183
+ groupBy = WaitEventClassification.WAIT_EVENT;
77184
+ }
77185
+ else if (groupByLabel === 'Query') {
77186
+ groupBy = WaitEventClassification.QUERY_ID;
77187
+ }
77188
+ else if (groupByLabel === 'Client IP') {
77189
+ groupBy = WaitEventClassification.CLIENT_NODE_IP;
77190
+ }
77191
+ if (((_a = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _a === void 0 ? void 0 : _a.category) &&
77192
+ ((_b = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _b === void 0 ? void 0 : _b.category) !== AnomalyCategory.DB) {
77193
+ var graphParamsCopy = JSON.parse(JSON.stringify(graphRequestParams));
77194
+ var ashGraph_1 = graphParamsCopy === null || graphParamsCopy === void 0 ? void 0 : graphParamsCopy.find(function (queryParams, idx) {
77195
+ return idx > 0 && queryParams.name === (metricData === null || metricData === void 0 ? void 0 : metricData.name);
77196
+ });
77197
+ if (ashGraph_1) {
77198
+ ashGraph_1.groupBy = [groupBy];
77199
+ }
77200
+ graphParamsCopy.map(function (obj, paramsIdx) {
77201
+ if (paramsIdx > 0 && obj.name === (metricData === null || metricData === void 0 ? void 0 : metricData.name)) {
77202
+ return ashGraph_1;
77203
+ }
77204
+ return obj;
77205
+ });
77206
+ setGraphRequestParams(graphParamsCopy);
77207
+ fetchAnomalyGraphs.mutate(graphParamsCopy);
77208
+ }
77209
+ };
77210
+ useEffect(function () {
77211
+ var _a;
77212
+ if (previousMetricMeasure && previousMetricMeasure !== metricMeasure) {
77213
+ setRCAGraphResponseData(null);
77214
+ }
77215
+ var graphParamsCopy = JSON.parse(JSON.stringify(graphRequestParams));
77216
+ var clusterDetails = getClusterDetails();
77217
+ var payload = getQueryParams(false, false, 0, clusterDetails, graphParamsCopy, __assign(__assign({}, urlParams), { type: (_a = urlParams.type) !== null && _a !== void 0 ? _a : null }));
77218
+ var actualQueryParams = payload !== null && payload !== void 0 ? payload : graphRequestParams;
77219
+ setGraphRequestParams(actualQueryParams);
77220
+ fetchAnomalyGraphs.mutate(actualQueryParams);
77221
+ }, [metricMeasure, startTime, endTime, region, cluster, zone, node, outlierType, numNodes]);
77222
+ var fetchAnomalyGraphs = useMutation({
77223
+ // @ts-ignore
77224
+ mutationKey: ['fetchAnomalyGraphs'],
77225
+ mutationFn: function (params) {
77226
+ return PerfAdvisorAPI.fetchGraphs(universeUuid, params, apiUrl, 'fetchAnomalyGraphs');
77227
+ },
77228
+ onSuccess: function (data) {
77229
+ setRCAGraphResponseData(data);
77230
+ },
77231
+ onError: function (error) {
77232
+ console.error('Failed to fetch RCA graphs', error);
77233
+ }
77234
+ });
77235
+ var fetchAnomalyGraphsErrorMessage = (_d = (_c = (_b = fetchAnomalyGraphs === null || fetchAnomalyGraphs === void 0 ? void 0 : fetchAnomalyGraphs.error) === null || _b === void 0 ? void 0 : _b.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.error;
77236
+ var renderGraphs = function (graphResponseData, uniqueOperations, groupByOperations, graphType, index, graphTitle) {
77237
+ return (jsx(Box$1, { mr: 8, children: jsx(GraphView, { metricData: graphResponseData, metricKey: graphResponseData.name, graphTitle: graphTitle, containerWidth: null, dateTimeRange: dateTimeRange, metricMeasure: metricMeasure, operations: uniqueOperations, groupByOperations: groupByOperations, registerChartInstance: function (instance) {
77238
+ return registerChartInstance(instance, index);
77239
+ }, isRecommendationGraph: true, appName: appName, graphType: graphType, timezone: timezone, onSelectAshLabel: onSelectAshLabel, onEChartsDateSelect: onEChartsDateSelect }, "".concat(metricMeasure, "-").concat(graphResponseData.name)) }));
77240
+ };
77241
+ var filteredRecommendationMetrics = formattedAnomalyRca === null || formattedAnomalyRca === void 0 ? void 0 : formattedAnomalyRca.filter(function (item) { var _a; return ((_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.length) > 0; });
77242
+ // Reset chart instances on metricMeasure change
77243
+ useEffect(function () {
77244
+ chartInstancesRef.current = [];
77245
+ }, [metricMeasure]);
77246
+ // Callback to register chart instance from each child
77247
+ var registerChartInstance = function (instance, index) {
77248
+ chartInstancesRef.current[index] = instance;
77249
+ };
77250
+ // Connect axis pointer after charts are registered
77251
+ useEffect(function () {
77252
+ if (fetchAnomalyGraphs.isSuccess && RCAGraphResponseData && RCAGraphResponseData.length > 0) {
77253
+ connect(chartInstancesRef.current);
77254
+ }
77255
+ return function () {
77256
+ disconnect(chartInstancesRef.current);
77257
+ };
77258
+ }, [fetchAnomalyGraphs.isSuccess, RCAGraphResponseData, selectedTab]);
77259
+ return (jsx(Box$1, { children: jsxs(Box$1, { children: [fetchAnomalyGraphs.isLoading && (jsx(Box$1, { mt: 2, className: classes.loadingBox, children: jsx(SvgLoading, { className: clsx(classes.icon, classes.inProgressIcon) }) })), fetchAnomalyGraphs.isError && (jsxs(Box$1, { mt: 4, children: [(appName === AppName.YBA || appName === AppName.WEB) && (jsx(YBErrorIndicator, { customErrorMessage: isNonEmptyString(fetchAnomalyGraphsErrorMessage)
77260
+ ? fetchAnomalyGraphsErrorMessage
77261
+ : DEFAULT_ERROR_MESSAGES.RCA_GRAPHS_FETCH_ERROR })), appName === AppName.YBM && (jsx(GenericFailure, { text: isNonEmptyString(fetchAnomalyGraphsErrorMessage)
77262
+ ? fetchAnomalyGraphsErrorMessage
77263
+ : DEFAULT_ERROR_MESSAGES.RCA_GRAPHS_FETCH_ERROR }))] })), fetchAnomalyGraphs.isSuccess && (jsx(Box$1, { children: isNonEmptyArray(RCAGraphResponseData) &&
77264
+ isNonEmptyArray(filteredRecommendationMetrics) && (jsxs(Box$1, { children: [jsx(YBTabs, { pill: true, value: selectedTab, onChange: handleTabChange, children: filteredRecommendationMetrics === null || filteredRecommendationMetrics === void 0 ? void 0 : filteredRecommendationMetrics.map(function (item, index) { return (jsx(YBStyledTab$4, { value: index, label: item.cause, className: classes.causeTabButton }, index)); }) }), filteredRecommendationMetrics === null || filteredRecommendationMetrics === void 0 ? void 0 : filteredRecommendationMetrics.map(function (item, recIndex) {
77265
+ var _a, _b;
77266
+ return (jsx(Box$1, { role: "tabpanel", hidden: selectedTab !== recIndex, id: "tabpanel-".concat(recIndex), "aria-labelledby": "tab-".concat(recIndex), style: {
77267
+ border: '1px solid #E9EEF2',
77268
+ borderRadius: '8px',
77269
+ backgroundColor: '#FFFFFF',
77270
+ padding: '16px'
77271
+ }, children: selectedTab === recIndex && (jsxs(Box$1, { mt: 2, display: 'flex', flexDirection: 'column', children: [jsx("span", { className: classes.causeText, children: item.cause }), jsxs(Box$1, { mt: 1, children: [jsx("img", { src: UnderIcon, alt: "path" }), jsx("span", { className: classes.descriptionText, children: item.description })] }), jsx(Box$1, { mt: 2, className: ((_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.length) > 1
77272
+ ? clsx(classes.gridBox, classes.gridBoxDouble)
77273
+ : '', children: (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.map(function (metricName, index) {
77274
+ var _a, _b, _c;
77275
+ var metricData = RCAGraphResponseData === null || RCAGraphResponseData === void 0 ? void 0 : RCAGraphResponseData.find(function (data, graphIdx) {
77276
+ return (graphIdx > 0 &&
77277
+ (data === null || data === void 0 ? void 0 : data.name) === metricName &&
77278
+ item.index.includes(graphIdx));
77279
+ });
77280
+ var isOnlyReason = ((_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.length) === 1;
77281
+ var shouldShowGroupbyOperations = (_b = item.groupByControl) === null || _b === void 0 ? void 0 : _b[0];
77282
+ if (isNonEmptyString((_c = metricData === null || metricData === void 0 ? void 0 : metricData.errorMessage) !== null && _c !== void 0 ? _c : '')) {
77283
+ return jsx(Box$1, {});
77284
+ }
77285
+ else {
77286
+ var operations = getOperations(metricMeasure, metricData, GraphType.MULTI_SUPPORTING, shouldShowGroupbyOperations, amomalyGraphRequestParams);
77287
+ return (jsx(Box$1, { style: {
77288
+ border: '1px solid #E9EEF2',
77289
+ borderRadius: '8px',
77290
+ marginRight: isOnlyReason ? '0px' : '16px'
77291
+ }, children: renderGraphs(metricData, operations.uniqueOperations, operations.groupByOperations, isOnlyReason
77292
+ ? GraphType.SINGLE_SUPPORTING
77293
+ : GraphType.MULTI_SUPPORTING, recIndex + index, item.title) }));
77294
+ }
77295
+ }) })] })) }, recIndex));
77296
+ })] })) }))] }) }));
77297
+ };
77298
+
77299
+ /** `Object#toString` result references. */
77300
+ var symbolTag = '[object Symbol]';
77301
+
77302
+ /**
77303
+ * Checks if `value` is classified as a `Symbol` primitive or object.
77304
+ *
77305
+ * @static
77306
+ * @memberOf _
77307
+ * @since 4.0.0
77308
+ * @category Lang
77309
+ * @param {*} value The value to check.
77310
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
77311
+ * @example
77312
+ *
77313
+ * _.isSymbol(Symbol.iterator);
77314
+ * // => true
77315
+ *
77316
+ * _.isSymbol('abc');
77317
+ * // => false
77318
+ */
77319
+ function isSymbol(value) {
77320
+ return typeof value == 'symbol' ||
77321
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
77322
+ }
77323
+
77324
+ /** Used to match a single whitespace character. */
77325
+ var reWhitespace = /\s/;
77326
+
77327
+ /**
77328
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
77329
+ * character of `string`.
77330
+ *
77331
+ * @private
77332
+ * @param {string} string The string to inspect.
77333
+ * @returns {number} Returns the index of the last non-whitespace character.
77334
+ */
77335
+ function trimmedEndIndex(string) {
77336
+ var index = string.length;
77337
+
77338
+ while (index-- && reWhitespace.test(string.charAt(index))) {}
77339
+ return index;
77340
+ }
77341
+
77342
+ /** Used to match leading whitespace. */
77343
+ var reTrimStart = /^\s+/;
77344
+
77345
+ /**
77346
+ * The base implementation of `_.trim`.
77347
+ *
77348
+ * @private
77349
+ * @param {string} string The string to trim.
77350
+ * @returns {string} Returns the trimmed string.
77351
+ */
77352
+ function baseTrim(string) {
77353
+ return string
77354
+ ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
77355
+ : string;
77356
+ }
77357
+
77358
+ /** Used as references for various `Number` constants. */
77359
+ var NAN = 0 / 0;
77360
+
77361
+ /** Used to detect bad signed hexadecimal string values. */
77362
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
77363
+
77364
+ /** Used to detect binary string values. */
77365
+ var reIsBinary = /^0b[01]+$/i;
77366
+
77367
+ /** Used to detect octal string values. */
77368
+ var reIsOctal = /^0o[0-7]+$/i;
77369
+
77370
+ /** Built-in method references without a dependency on `root`. */
77371
+ var freeParseInt = parseInt;
77372
+
77373
+ /**
77374
+ * Converts `value` to a number.
77375
+ *
77376
+ * @static
77377
+ * @memberOf _
77378
+ * @since 4.0.0
77379
+ * @category Lang
77380
+ * @param {*} value The value to process.
77381
+ * @returns {number} Returns the number.
77382
+ * @example
77383
+ *
77384
+ * _.toNumber(3.2);
77385
+ * // => 3.2
77386
+ *
77387
+ * _.toNumber(Number.MIN_VALUE);
77388
+ * // => 5e-324
77389
+ *
77390
+ * _.toNumber(Infinity);
77391
+ * // => Infinity
77392
+ *
77393
+ * _.toNumber('3.2');
77394
+ * // => 3.2
77395
+ */
77396
+ function toNumber(value) {
77397
+ if (typeof value == 'number') {
77398
+ return value;
77399
+ }
77400
+ if (isSymbol(value)) {
77401
+ return NAN;
77402
+ }
77403
+ if (isObject$5(value)) {
77404
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
77405
+ value = isObject$5(other) ? (other + '') : other;
77406
+ }
77407
+ if (typeof value != 'string') {
77408
+ return value === 0 ? value : +value;
77409
+ }
77410
+ value = baseTrim(value);
77411
+ var isBinary = reIsBinary.test(value);
77412
+ return (isBinary || reIsOctal.test(value))
77413
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
77414
+ : (reIsBadHex.test(value) ? NAN : +value);
77415
+ }
77416
+
77417
+ /**
77418
+ * Gets the timestamp of the number of milliseconds that have elapsed since
77419
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
77420
+ *
77421
+ * @static
77422
+ * @memberOf _
77423
+ * @since 2.4.0
77424
+ * @category Date
77425
+ * @returns {number} Returns the timestamp.
77426
+ * @example
77427
+ *
77428
+ * _.defer(function(stamp) {
77429
+ * console.log(_.now() - stamp);
77430
+ * }, _.now());
77431
+ * // => Logs the number of milliseconds it took for the deferred invocation.
77432
+ */
77433
+ var now = function() {
77434
+ return root$1.Date.now();
77435
+ };
77436
+
77437
+ var now$1 = now;
77438
+
77439
+ /** Error message constants. */
77440
+ var FUNC_ERROR_TEXT = 'Expected a function';
77441
+
77442
+ /* Built-in method references for those with the same name as other `lodash` methods. */
77443
+ var nativeMax = Math.max,
77444
+ nativeMin = Math.min;
77445
+
77446
+ /**
77447
+ * Creates a debounced function that delays invoking `func` until after `wait`
77448
+ * milliseconds have elapsed since the last time the debounced function was
77449
+ * invoked. The debounced function comes with a `cancel` method to cancel
77450
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
77451
+ * Provide `options` to indicate whether `func` should be invoked on the
77452
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
77453
+ * with the last arguments provided to the debounced function. Subsequent
77454
+ * calls to the debounced function return the result of the last `func`
77455
+ * invocation.
77456
+ *
77457
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
77458
+ * invoked on the trailing edge of the timeout only if the debounced function
77459
+ * is invoked more than once during the `wait` timeout.
77460
+ *
77461
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
77462
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
77463
+ *
77464
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
77465
+ * for details over the differences between `_.debounce` and `_.throttle`.
77466
+ *
77467
+ * @static
77468
+ * @memberOf _
77469
+ * @since 0.1.0
77470
+ * @category Function
77471
+ * @param {Function} func The function to debounce.
77472
+ * @param {number} [wait=0] The number of milliseconds to delay.
77473
+ * @param {Object} [options={}] The options object.
77474
+ * @param {boolean} [options.leading=false]
77475
+ * Specify invoking on the leading edge of the timeout.
77476
+ * @param {number} [options.maxWait]
77477
+ * The maximum time `func` is allowed to be delayed before it's invoked.
77478
+ * @param {boolean} [options.trailing=true]
77479
+ * Specify invoking on the trailing edge of the timeout.
77480
+ * @returns {Function} Returns the new debounced function.
77481
+ * @example
77482
+ *
77483
+ * // Avoid costly calculations while the window size is in flux.
77484
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
77485
+ *
77486
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
77487
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
77488
+ * 'leading': true,
77489
+ * 'trailing': false
77490
+ * }));
77491
+ *
77492
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
77493
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
77494
+ * var source = new EventSource('/stream');
77495
+ * jQuery(source).on('message', debounced);
77496
+ *
77497
+ * // Cancel the trailing debounced invocation.
77498
+ * jQuery(window).on('popstate', debounced.cancel);
77499
+ */
77500
+ function debounce(func, wait, options) {
77501
+ var lastArgs,
77502
+ lastThis,
77503
+ maxWait,
77504
+ result,
77505
+ timerId,
77506
+ lastCallTime,
77507
+ lastInvokeTime = 0,
77508
+ leading = false,
77509
+ maxing = false,
77510
+ trailing = true;
77511
+
77512
+ if (typeof func != 'function') {
77513
+ throw new TypeError(FUNC_ERROR_TEXT);
77514
+ }
77515
+ wait = toNumber(wait) || 0;
77516
+ if (isObject$5(options)) {
77517
+ leading = !!options.leading;
77518
+ maxing = 'maxWait' in options;
77519
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
77520
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
77521
+ }
77522
+
77523
+ function invokeFunc(time) {
77524
+ var args = lastArgs,
77525
+ thisArg = lastThis;
77526
+
77527
+ lastArgs = lastThis = undefined;
77528
+ lastInvokeTime = time;
77529
+ result = func.apply(thisArg, args);
77530
+ return result;
77531
+ }
77532
+
77533
+ function leadingEdge(time) {
77534
+ // Reset any `maxWait` timer.
77535
+ lastInvokeTime = time;
77536
+ // Start the timer for the trailing edge.
77537
+ timerId = setTimeout(timerExpired, wait);
77538
+ // Invoke the leading edge.
77539
+ return leading ? invokeFunc(time) : result;
77540
+ }
77541
+
77542
+ function remainingWait(time) {
77543
+ var timeSinceLastCall = time - lastCallTime,
77544
+ timeSinceLastInvoke = time - lastInvokeTime,
77545
+ timeWaiting = wait - timeSinceLastCall;
77546
+
77547
+ return maxing
77548
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
77549
+ : timeWaiting;
77550
+ }
77551
+
77552
+ function shouldInvoke(time) {
77553
+ var timeSinceLastCall = time - lastCallTime,
77554
+ timeSinceLastInvoke = time - lastInvokeTime;
77555
+
77556
+ // Either this is the first call, activity has stopped and we're at the
77557
+ // trailing edge, the system time has gone backwards and we're treating
77558
+ // it as the trailing edge, or we've hit the `maxWait` limit.
77559
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
77560
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
77561
+ }
77562
+
77563
+ function timerExpired() {
77564
+ var time = now$1();
77565
+ if (shouldInvoke(time)) {
77566
+ return trailingEdge(time);
77567
+ }
77568
+ // Restart the timer.
77569
+ timerId = setTimeout(timerExpired, remainingWait(time));
77570
+ }
77571
+
77572
+ function trailingEdge(time) {
77573
+ timerId = undefined;
77574
+
77575
+ // Only invoke if we have `lastArgs` which means `func` has been
77576
+ // debounced at least once.
77577
+ if (trailing && lastArgs) {
77578
+ return invokeFunc(time);
77579
+ }
77580
+ lastArgs = lastThis = undefined;
77581
+ return result;
77582
+ }
77583
+
77584
+ function cancel() {
77585
+ if (timerId !== undefined) {
77586
+ clearTimeout(timerId);
77587
+ }
77588
+ lastInvokeTime = 0;
77589
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
77590
+ }
77591
+
77592
+ function flush() {
77593
+ return timerId === undefined ? result : trailingEdge(now$1());
77594
+ }
77595
+
77596
+ function debounced() {
77597
+ var time = now$1(),
77598
+ isInvoking = shouldInvoke(time);
77599
+
77600
+ lastArgs = arguments;
77601
+ lastThis = this;
77602
+ lastCallTime = time;
77603
+
77604
+ if (isInvoking) {
77605
+ if (timerId === undefined) {
77606
+ return leadingEdge(lastCallTime);
77607
+ }
77608
+ if (maxing) {
77609
+ // Handle invocations in a tight loop.
77610
+ clearTimeout(timerId);
77611
+ timerId = setTimeout(timerExpired, wait);
77612
+ return invokeFunc(lastCallTime);
77613
+ }
77614
+ }
77615
+ if (timerId === undefined) {
77616
+ timerId = setTimeout(timerExpired, wait);
77617
+ }
77618
+ return result;
77619
+ }
77620
+ debounced.cancel = cancel;
77621
+ debounced.flush = flush;
77622
+ return debounced;
77623
+ }
77624
+
77625
+ var TOP_MARGIN$1 = 10;
77626
+ var BOTTOM_MARGIN$1 = 10;
77627
+ var EMPTY_CATEGORY_NAME = 'EMPTY_EVENT';
77628
+ var QueryEventsChart = function (_a) {
77629
+ var data = _a.data, maxEPS = _a.maxEPS, groupByOperation = _a.groupByOperation, _b = _a.isTabletAnomaly, isTabletAnomaly = _b === void 0 ? false : _b;
77630
+ var chartRef = useRef(null);
77631
+ var barHeight = 40;
77632
+ useEffect(function () {
77633
+ if (!chartRef.current)
77634
+ return;
77635
+ var chartInstance = init(chartRef.current);
77636
+ var categories = data.map(function (entry) {
77637
+ return groupByOperation === WaitEventClassification.WAIT_EVENT
77638
+ ? entry.waitEvent
77639
+ : entry.waitEventType;
77640
+ });
77641
+ // Calculate total used EPS
77642
+ var totalUsed = data.reduce(function (sum, entry) { return sum + entry.eps; }, 0);
77643
+ var emptySpace = Math.max(0, maxEPS - totalUsed);
77644
+ var series = [];
77645
+ // Add series for each category first (these will be on the left)
77646
+ categories.forEach(function (category, index) {
77647
+ var _a;
77648
+ series.push({
77649
+ name: category,
77650
+ type: 'bar',
77651
+ stack: 'total',
77652
+ label: { show: false },
77653
+ data: [data[index].eps],
77654
+ itemStyle: {
77655
+ color: (_a = NAME_COLOR_MAPPING[category]) !== null && _a !== void 0 ? _a : COLORS[index]
77656
+ }
77657
+ });
77658
+ });
77659
+ // Add empty space series last (this will appear on the right after all colored segments)
77660
+ if (emptySpace > 0) {
77661
+ series.push({
77662
+ name: EMPTY_CATEGORY_NAME,
77663
+ type: 'bar',
77664
+ stack: 'total',
77665
+ label: { show: false },
77666
+ data: [emptySpace],
77667
+ itemStyle: {
77668
+ color: NAME_COLOR_MAPPING[EMPTY_CATEGORY_NAME]
77669
+ },
77670
+ silent: true,
77671
+ tooltip: { show: false }
77672
+ });
77673
+ }
77674
+ var option = {
77675
+ animation: false,
77676
+ grid: {
77677
+ left: 0,
77678
+ right: 0,
77679
+ top: TOP_MARGIN$1,
77680
+ bottom: BOTTOM_MARGIN$1,
77681
+ containLabel: false
77682
+ },
77683
+ tooltip: {
77684
+ trigger: 'item',
77685
+ confine: false,
77686
+ extraCssText: 'letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px; z-index:10000 !important;',
77687
+ formatter: function (params) {
77688
+ var left = getLegendKey(params.color, params.seriesName);
77689
+ var right = getLegendValue(Number(params.value).toFixed(3));
77690
+ var rows = "<div style=\"\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* \u2190 24px between columns */\n align-items:center;\n margin-bottom:6px;\n \">\n ".concat(left).concat(right, "\n </div>");
77691
+ return "<div style=\"letter-spacing:0.5px;\">".concat(rows, "</div>");
77692
+ // Mimic Plotly's 'x+name' behavior
77693
+ // return `${params.marker} ${params.seriesName}: ${params.value}`;
77694
+ },
77695
+ // backgroundColor: 'rgba(50, 50, 50, 0.8)',
77696
+ textStyle: {
77697
+ fontSize: 11.5,
77698
+ color: '#0B1117',
77699
+ fontWeight: 400
77700
+ }
77701
+ },
77702
+ xAxis: {
77703
+ type: 'value',
77704
+ show: false,
77705
+ min: 0,
77706
+ max: maxEPS
77707
+ },
77708
+ yAxis: {
77709
+ type: 'category',
77710
+ data: [''], // single row
77711
+ show: false
77712
+ },
77713
+ series: series
77714
+ };
77715
+ chartInstance.setOption(option);
77716
+ // Resize handling
77717
+ var resizeObserver = new ResizeObserver(function () {
77718
+ chartInstance.resize();
77719
+ });
77720
+ resizeObserver.observe(chartRef.current);
77721
+ return function () {
77722
+ resizeObserver.disconnect();
77723
+ chartInstance.dispose();
77454
77724
  };
77455
- // New Anomaly APIs
77456
- this.fetchAnomalyGroups = function (universeUuid, startTime, endTime, anomalyType, getClusterDetails, apiUrl) {
77457
- if (anomalyType === void 0) { anomalyType = ''; }
77458
- var _a = getClusterDetails(), cluster = _a.cluster, region = _a.region, zone = _a.zone, node = _a.node;
77459
- var params = new URLSearchParams();
77460
- if (startTime) {
77461
- params.append('startTime', startTime);
77462
- }
77463
- if (endTime) {
77464
- params.append('endTime', endTime);
77465
- }
77466
- if (startTime === null && endTime === null) {
77467
- return {};
77468
- }
77469
- if (isNonEmptyString(anomalyType)) {
77470
- params.append('anomalyType', anomalyType);
77471
- }
77472
- if (isNonEmptyString(cluster) && cluster !== ALL) {
77473
- params.append('clusterUuids', cluster);
77474
- }
77475
- if (isNonEmptyString(region) && region !== ALL) {
77476
- params.append('regionCodes', region);
77477
- }
77478
- if (isNonEmptyString(zone) && zone !== ALL) {
77479
- params.append('azCodes', zone);
77480
- }
77481
- if (isNonEmptyString(node) && node !== ALL) {
77482
- params.append('instanceNames', node);
77725
+ }, [data, groupByOperation, maxEPS]);
77726
+ return (jsx("div", { className: "query-events-chart-container", ref: chartRef, style: {
77727
+ height: "".concat(barHeight, "px"),
77728
+ width: isTabletAnomaly ? '75%' : '100%',
77729
+ display: 'flex',
77730
+ alignItems: 'center',
77731
+ justifyContent: 'center'
77732
+ } }));
77733
+ };
77734
+
77735
+ var useStyles$h = makeStyles$1(function (theme) { return ({
77736
+ itemsContainer: {
77737
+ padding: theme.spacing(1, 0)
77738
+ },
77739
+ item: {
77740
+ paddingLeft: theme.spacing(2),
77741
+ '& label': {
77742
+ height: '36px'
77743
+ }
77744
+ },
77745
+ checkbox: {
77746
+ '& .yb-MuiSvgIcon-root': {
77747
+ width: '20px',
77748
+ height: '20px'
77749
+ }
77750
+ }
77751
+ }); });
77752
+ var ColumnSelectorDrawer = function (_a) {
77753
+ var _b;
77754
+ _a.appName; var columns = _a.columns, hiddenColumns = _a.hiddenColumns, _c = _a.isDbLoadMetadataColumns, isDbLoadMetadataColumns = _c === void 0 ? false : _c, _d = _a.isTabletsMetadataColumns, isTabletsMetadataColumns = _d === void 0 ? false : _d, _e = _a.isNodeLoadMetadataColumns, isNodeLoadMetadataColumns = _e === void 0 ? false : _e, onColumnVisibilityChange = _a.onColumnVisibilityChange, close = _a.close;
77755
+ var classes = useStyles$h();
77756
+ var visibleStorageKey = VISIBLE_QUERY_METADATA_COLUMNS;
77757
+ if (isTabletsMetadataColumns) {
77758
+ visibleStorageKey = VISIBLE_TABLETS_METADATA_COLUMNS;
77759
+ }
77760
+ else if (isDbLoadMetadataColumns) {
77761
+ visibleStorageKey = VISIBLE_DB_LOAD_METADATA_COLUMNS;
77762
+ }
77763
+ else if (isNodeLoadMetadataColumns) {
77764
+ visibleStorageKey = VISIBLE_NODE_LOAD_METADATA_COLUMNS;
77765
+ }
77766
+ // Retrieve VISIBLE_QUERY_METADATA_COLUMNS from session storage if it exists
77767
+ var storedVisibleColumns = JSON.parse((_b = sessionStorage.getItem(visibleStorageKey)) !== null && _b !== void 0 ? _b : '[]');
77768
+ var defaultValues = columns.reduce(function (acc, column) {
77769
+ var _a;
77770
+ acc[column.name] =
77771
+ storedVisibleColumns.length > 0
77772
+ ? storedVisibleColumns.includes(column.name)
77773
+ : (_a = column === null || column === void 0 ? void 0 : column.options) === null || _a === void 0 ? void 0 : _a.display;
77774
+ return acc;
77775
+ }, {});
77776
+ var _f = useForm({ defaultValues: defaultValues }), control = _f.control, handleSubmit = _f.handleSubmit, reset = _f.reset;
77777
+ useEffect(function () {
77778
+ reset(defaultValues);
77779
+ }, [columns, reset]);
77780
+ var handleClose = function () {
77781
+ close();
77782
+ };
77783
+ var onSubmit = function (data) {
77784
+ var visibleMetadataColumns = [];
77785
+ Object.keys(data).forEach(function (key) {
77786
+ var isVisible = data[key];
77787
+ var columnName = key;
77788
+ onColumnVisibilityChange(columnName, isVisible);
77789
+ if (isVisible) {
77790
+ visibleMetadataColumns.push(columnName);
77483
77791
  }
77484
- var requestUrl = isNonEmptyString(apiUrl)
77485
- ? "".concat(apiUrl, "/universe/").concat(universeUuid, "/anomaly_groups/by_type?").concat(params.toString())
77486
- : "/universe/".concat(universeUuid, "/anomaly_groups/by_type?").concat(params.toString());
77487
- return axiosInstance.get(requestUrl).then(function (res) { return res.data; });
77488
- };
77489
- this.fetchAnomalyGroupsByType = function (universeUuid, startTime, endTime, anomalyType, apiUrl) {
77490
- var requestUrl = isNonEmptyString(apiUrl)
77491
- ? "".concat(apiUrl, "/universe/").concat(universeUuid, "/anomaly_groups?startTime=").concat(startTime, "&endTime=").concat(endTime, "&type=").concat(anomalyType)
77492
- : "/universe/".concat(universeUuid, "/anomaly_groups?startTime=").concat(startTime, "&endTime=").concat(endTime, "&type=").concat(anomalyType);
77493
- return axiosInstance.get(requestUrl).then(function (res) { return res.data; });
77494
- };
77495
- this.fetchAnomalyGroupById = function (universeUuid, anomalyGroupId, startTime, endTime, apiUrl) {
77496
- if (startTime === null && endTime === null) {
77497
- return {};
77792
+ });
77793
+ sessionStorage.setItem(visibleStorageKey, JSON.stringify(visibleMetadataColumns));
77794
+ handleClose();
77795
+ };
77796
+ return (jsx(YBModal, { open: true, isSidePanel: true, title: 'Add and Remove Columns', onClose: handleClose, onSubmit: handleSubmit(onSubmit), enableBackdropDismiss: true, titleSeparator: true, dialogContentProps: {
77797
+ style: {
77798
+ padding: 0
77498
77799
  }
77499
- var requestUrl = isNonEmptyString(apiUrl)
77500
- ? "".concat(apiUrl, "/universe/").concat(universeUuid, "/anomaly_groups/").concat(anomalyGroupId, "?startTime=").concat(startTime, "&endTime=").concat(endTime)
77501
- : "/universe/".concat(universeUuid, "/anomaly_groups/").concat(anomalyGroupId, "?startTime=").concat(startTime, "&endTime=").concat(endTime);
77502
- return axiosInstance.get(requestUrl).then(function (res) { return res.data; });
77503
- };
77504
- // Send telemetry events on successful click events
77505
- this.sendTelemetryEvent = function (universeUuid, payload, apiUrl) {
77506
- var requestUrl = isNonEmptyString(apiUrl)
77507
- ? "".concat(apiUrl, "/universe/").concat(universeUuid, "/ui_events")
77508
- : "/universe/".concat(universeUuid, "/ui_events");
77509
- return axiosInstance.post(requestUrl, payload).then(function (resp) { return resp.data; });
77510
- };
77511
- }
77512
- return ApiService;
77513
- }());
77514
- var PerfAdvisorAPI = new ApiService();
77800
+ }, submitLabel: 'Apply', submitTestId: "btnApplyMetricsSelection", cancelLabel: 'Cancel', cancelTestId: "btnCloseMetricsSelection", children: jsx(Box$1, { children: jsx(Box$1, { className: classes.itemsContainer, children: columns.map(function (column) {
77801
+ var isHidden = hiddenColumns.includes(column.name);
77802
+ if (isHidden) {
77803
+ return null;
77804
+ }
77805
+ return (jsx(Box$1, { className: classes.item, children: jsx(YBCheckboxField, { name: column.name, label: column.label, control: control, dataTestId: column.name, className: classes.checkbox }) }, column.name));
77806
+ }) }) }) }));
77807
+ };
77515
77808
 
77516
- var img$f = "data:image/svg+xml,%3csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath opacity='0.5' fill-rule='evenodd' clip-rule='evenodd' d='M1.16699 6.99984C1.16699 3.77818 3.77866 1.1665 7.00033 1.1665C8.54742 1.1665 10.0312 1.78109 11.1251 2.87505C12.2191 3.96901 12.8337 5.45274 12.8337 6.99984C12.8337 10.2215 10.222 12.8332 7.00033 12.8332C3.77866 12.8332 1.16699 10.2215 1.16699 6.99984ZM6.41699 4.6665C6.41699 4.34434 6.67816 4.08317 7.00033 4.08317C7.32249 4.08317 7.58366 4.34434 7.58366 4.6665C7.58366 4.98867 7.32249 5.24984 7.00033 5.24984C6.67816 5.24984 6.41699 4.98867 6.41699 4.6665ZM6.41699 6.4165C6.41699 6.09434 6.67816 5.83317 7.00033 5.83317C7.32249 5.83317 7.58366 6.09434 7.58366 6.4165V9.33317C7.58366 9.65534 7.32249 9.9165 7.00033 9.9165C6.67816 9.9165 6.41699 9.65534 6.41699 9.33317V6.4165Z' fill='%2367666C'/%3e%3c/svg%3e";
77517
- var InfoMessageIcon = img$f;
77809
+ var img$b = "data:image/svg+xml,%3csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath opacity='0.5' fill-rule='evenodd' clip-rule='evenodd' d='M1.16699 6.99984C1.16699 3.77818 3.77866 1.1665 7.00033 1.1665C8.54742 1.1665 10.0312 1.78109 11.1251 2.87505C12.2191 3.96901 12.8337 5.45274 12.8337 6.99984C12.8337 10.2215 10.222 12.8332 7.00033 12.8332C3.77866 12.8332 1.16699 10.2215 1.16699 6.99984ZM6.41699 4.6665C6.41699 4.34434 6.67816 4.08317 7.00033 4.08317C7.32249 4.08317 7.58366 4.34434 7.58366 4.6665C7.58366 4.98867 7.32249 5.24984 7.00033 5.24984C6.67816 5.24984 6.41699 4.98867 6.41699 4.6665ZM6.41699 6.4165C6.41699 6.09434 6.67816 5.83317 7.00033 5.83317C7.32249 5.83317 7.58366 6.09434 7.58366 6.4165V9.33317C7.58366 9.65534 7.32249 9.9165 7.00033 9.9165C6.67816 9.9165 6.41699 9.65534 6.41699 9.33317V6.4165Z' fill='%2367666C'/%3e%3c/svg%3e";
77810
+ var InfoMessageIcon = img$b;
77518
77811
 
77519
77812
  var _g$1;
77520
- function _extends$i() { return _extends$i = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$i.apply(null, arguments); }
77521
- const SvgPlus = props => /*#__PURE__*/React$1.createElement("svg", _extends$i({
77813
+ function _extends$h() { return _extends$h = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$h.apply(null, arguments); }
77814
+ const SvgPlus = props => /*#__PURE__*/React$1.createElement("svg", _extends$h({
77522
77815
  xmlns: "http://www.w3.org/2000/svg",
77523
77816
  width: 24,
77524
77817
  height: 24
@@ -77533,8 +77826,8 @@ const SvgPlus = props => /*#__PURE__*/React$1.createElement("svg", _extends$i({
77533
77826
  }))));
77534
77827
 
77535
77828
  var _g;
77536
- function _extends$h() { return _extends$h = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$h.apply(null, arguments); }
77537
- const SvgSearch = props => /*#__PURE__*/React$1.createElement("svg", _extends$h({
77829
+ function _extends$g() { return _extends$g = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$g.apply(null, arguments); }
77830
+ const SvgSearch = props => /*#__PURE__*/React$1.createElement("svg", _extends$g({
77538
77831
  xmlns: "http://www.w3.org/2000/svg",
77539
77832
  width: 24,
77540
77833
  height: 24
@@ -78034,176 +78327,7 @@ var QueryLevelTabletMetadata = function (_a) {
78034
78327
  } }, "AccessedTablets-".concat(sortBy, "-").concat(sortDirection))] }) })] })] })] }));
78035
78328
  };
78036
78329
 
78037
- var _circle, _circle2, _circle3, _circle4, _circle5, _circle6, _circle7, _circle8, _circle9;
78038
- function _extends$g() { return _extends$g = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$g.apply(null, arguments); }
78039
- const SvgLoading = props => /*#__PURE__*/React$1.createElement("svg", _extends$g({
78040
- xmlns: "http://www.w3.org/2000/svg",
78041
- style: {
78042
- display: "block",
78043
- shapeRendering: "auto",
78044
- backgroundPosition: "initial initial",
78045
- backgroundRepeat: "initial initial"
78046
- },
78047
- width: 24,
78048
- height: 24,
78049
- viewBox: "30 30 40 40",
78050
- preserveAspectRatio: "xMidYMid"
78051
- }, props), _circle || (_circle = /*#__PURE__*/React$1.createElement("circle", {
78052
- cx: 65,
78053
- cy: 50,
78054
- fill: "#bfcded",
78055
- r: 3
78056
- }, /*#__PURE__*/React$1.createElement("animate", {
78057
- attributeName: "r",
78058
- values: "1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",
78059
- dur: "2.0408163265306123s",
78060
- repeatCount: "indefinite",
78061
- begin: "-1.8140589569160996s"
78062
- }), /*#__PURE__*/React$1.createElement("animate", {
78063
- attributeName: "fill",
78064
- values: "#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",
78065
- repeatCount: "indefinite",
78066
- dur: "2.0408163265306123s",
78067
- begin: "-1.8140589569160996s"
78068
- }))), _circle2 || (_circle2 = /*#__PURE__*/React$1.createElement("circle", {
78069
- cx: 61.491,
78070
- cy: 59.642,
78071
- fill: "#bfcded",
78072
- r: 3
78073
- }, /*#__PURE__*/React$1.createElement("animate", {
78074
- attributeName: "r",
78075
- values: "1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",
78076
- dur: "2.0408163265306123s",
78077
- repeatCount: "indefinite",
78078
- begin: "-1.5873015873015872s"
78079
- }), /*#__PURE__*/React$1.createElement("animate", {
78080
- attributeName: "fill",
78081
- values: "#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",
78082
- repeatCount: "indefinite",
78083
- dur: "2.0408163265306123s",
78084
- begin: "-1.5873015873015872s"
78085
- }))), _circle3 || (_circle3 = /*#__PURE__*/React$1.createElement("circle", {
78086
- cx: 52.605,
78087
- cy: 64.772,
78088
- fill: "#bfcded",
78089
- r: 3
78090
- }, /*#__PURE__*/React$1.createElement("animate", {
78091
- attributeName: "r",
78092
- values: "1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",
78093
- dur: "2.0408163265306123s",
78094
- repeatCount: "indefinite",
78095
- begin: "-1.3605442176870748s"
78096
- }), /*#__PURE__*/React$1.createElement("animate", {
78097
- attributeName: "fill",
78098
- values: "#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",
78099
- repeatCount: "indefinite",
78100
- dur: "2.0408163265306123s",
78101
- begin: "-1.3605442176870748s"
78102
- }))), _circle4 || (_circle4 = /*#__PURE__*/React$1.createElement("circle", {
78103
- cx: 42.5,
78104
- cy: 62.99,
78105
- fill: "#bfcded",
78106
- r: 3
78107
- }, /*#__PURE__*/React$1.createElement("animate", {
78108
- attributeName: "r",
78109
- values: "1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",
78110
- dur: "2.0408163265306123s",
78111
- repeatCount: "indefinite",
78112
- begin: "-1.1337868480725624s"
78113
- }), /*#__PURE__*/React$1.createElement("animate", {
78114
- attributeName: "fill",
78115
- values: "#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",
78116
- repeatCount: "indefinite",
78117
- dur: "2.0408163265306123s",
78118
- begin: "-1.1337868480725624s"
78119
- }))), _circle5 || (_circle5 = /*#__PURE__*/React$1.createElement("circle", {
78120
- cx: 35.905,
78121
- cy: 55.13,
78122
- fill: "#bfcded",
78123
- r: 3
78124
- }, /*#__PURE__*/React$1.createElement("animate", {
78125
- attributeName: "r",
78126
- values: "1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",
78127
- dur: "2.0408163265306123s",
78128
- repeatCount: "indefinite",
78129
- begin: "-0.9070294784580498s"
78130
- }), /*#__PURE__*/React$1.createElement("animate", {
78131
- attributeName: "fill",
78132
- values: "#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",
78133
- repeatCount: "indefinite",
78134
- dur: "2.0408163265306123s",
78135
- begin: "-0.9070294784580498s"
78136
- }))), _circle6 || (_circle6 = /*#__PURE__*/React$1.createElement("circle", {
78137
- cx: 35.905,
78138
- cy: 44.87,
78139
- fill: "#bfcded",
78140
- r: 3
78141
- }, /*#__PURE__*/React$1.createElement("animate", {
78142
- attributeName: "r",
78143
- values: "1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",
78144
- dur: "2.0408163265306123s",
78145
- repeatCount: "indefinite",
78146
- begin: "-0.6802721088435374s"
78147
- }), /*#__PURE__*/React$1.createElement("animate", {
78148
- attributeName: "fill",
78149
- values: "#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",
78150
- repeatCount: "indefinite",
78151
- dur: "2.0408163265306123s",
78152
- begin: "-0.6802721088435374s"
78153
- }))), _circle7 || (_circle7 = /*#__PURE__*/React$1.createElement("circle", {
78154
- cx: 42.5,
78155
- cy: 37.01,
78156
- fill: "#bfcded",
78157
- r: 3
78158
- }, /*#__PURE__*/React$1.createElement("animate", {
78159
- attributeName: "r",
78160
- values: "1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",
78161
- dur: "2.0408163265306123s",
78162
- repeatCount: "indefinite",
78163
- begin: "-0.4535147392290249s"
78164
- }), /*#__PURE__*/React$1.createElement("animate", {
78165
- attributeName: "fill",
78166
- values: "#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",
78167
- repeatCount: "indefinite",
78168
- dur: "2.0408163265306123s",
78169
- begin: "-0.4535147392290249s"
78170
- }))), _circle8 || (_circle8 = /*#__PURE__*/React$1.createElement("circle", {
78171
- cx: 52.605,
78172
- cy: 35.228,
78173
- fill: "#bfcded",
78174
- r: 3
78175
- }, /*#__PURE__*/React$1.createElement("animate", {
78176
- attributeName: "r",
78177
- values: "1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",
78178
- dur: "2.0408163265306123s",
78179
- repeatCount: "indefinite",
78180
- begin: "-0.22675736961451246s"
78181
- }), /*#__PURE__*/React$1.createElement("animate", {
78182
- attributeName: "fill",
78183
- values: "#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",
78184
- repeatCount: "indefinite",
78185
- dur: "2.0408163265306123s",
78186
- begin: "-0.22675736961451246s"
78187
- }))), _circle9 || (_circle9 = /*#__PURE__*/React$1.createElement("circle", {
78188
- cx: 61.491,
78189
- cy: 40.358,
78190
- fill: "#bfcded",
78191
- r: 3
78192
- }, /*#__PURE__*/React$1.createElement("animate", {
78193
- attributeName: "r",
78194
- values: "1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",
78195
- dur: "2.0408163265306123s",
78196
- repeatCount: "indefinite",
78197
- begin: "0s"
78198
- }), /*#__PURE__*/React$1.createElement("animate", {
78199
- attributeName: "fill",
78200
- values: "#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",
78201
- repeatCount: "indefinite",
78202
- dur: "2.0408163265306123s",
78203
- begin: "0s"
78204
- }))));
78205
-
78206
- var YBStyledTab$2 = styled$1(YBTab)(function (_a) {
78330
+ var YBStyledTab$3 = styled$1(YBTab)(function (_a) {
78207
78331
  var theme = _a.theme;
78208
78332
  return ({
78209
78333
  display: 'flex',
@@ -78216,15 +78340,15 @@ var YBStyledTab$2 = styled$1(YBTab)(function (_a) {
78216
78340
  });
78217
78341
  });
78218
78342
  var SqlDrilldown = function (_a) {
78219
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
78220
- var metricMeasure = _a.metricMeasure, anomalyData = _a.anomalyData, apiUrl = _a.apiUrl, universeQueryStatsData = _a.universeQueryStatsData, appName = _a.appName, sqlTab = _a.sqlTab, timezone = _a.timezone, urlParams = _a.urlParams, dateTimeRange = _a.dateTimeRange, getClusterDetails = _a.getClusterDetails, onEChartsDateSelect = _a.onEChartsDateSelect;
78343
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
78344
+ var metricMeasure = _a.metricMeasure, anomalyData = _a.anomalyData, apiUrl = _a.apiUrl, universeQueryStatsData = _a.universeQueryStatsData, appName = _a.appName, sqlTab = _a.sqlTab, timezone = _a.timezone, urlParams = _a.urlParams, dateTimeRange = _a.dateTimeRange, amomalyGraphRequestParams = _a.amomalyGraphRequestParams, formattedAnomalyRca = _a.formattedAnomalyRca, getClusterDetails = _a.getClusterDetails, onEChartsDateSelect = _a.onEChartsDateSelect;
78221
78345
  var classes = useHelperStyles();
78222
78346
  // Ref to store chart instances
78223
78347
  var chartInstancesRef = useRef([]);
78224
- var _o = useState(null), queryGraphData = _o[0], setQueryGraphData = _o[1];
78225
- var _p = useState([]), historicalQueryRequestParams = _p[0], setHistoricalQueryRequestParams = _p[1];
78226
- var _q = useState(SqlDrilldownTabs.PERFORMANCE_METRICS), sqlDrilldownTab = _q[0], setSqlDrilldownTab = _q[1];
78227
- var _r = getClusterDetails(), universeUuid = _r.universeUuid, cluster = _r.cluster, region = _r.region, zone = _r.zone, node = _r.node, numNodes = _r.numNodes, outlierType = _r.outlierType;
78348
+ var _s = useState(null), queryGraphData = _s[0], setQueryGraphData = _s[1];
78349
+ var _t = useState([]), historicalQueryRequestParams = _t[0], setHistoricalQueryRequestParams = _t[1];
78350
+ var _u = useState(SqlDrilldownTabs.PERFORMANCE_METRICS), sqlDrilldownTab = _u[0], setSqlDrilldownTab = _u[1];
78351
+ var _v = getClusterDetails(), universeUuid = _v.universeUuid, cluster = _v.cluster, region = _v.region, zone = _v.zone, node = _v.node, numNodes = _v.numNodes, outlierType = _v.outlierType;
78228
78352
  var onSelectAshLabel = function (groupByLabel, metricData, isHistoricalQueryView) {
78229
78353
  if (isHistoricalQueryView === void 0) { isHistoricalQueryView = false; }
78230
78354
  var groupBy = WaitEventClassification.WAIT_EVENT_COMPONENT;
@@ -78385,7 +78509,7 @@ var SqlDrilldown = function (_a) {
78385
78509
  : operations.uniqueOperations, registerChartInstance: function (instance) {
78386
78510
  return registerChartInstance(instance, index);
78387
78511
  }, graphType: GraphType.MULTI_SUPPORTING, groupByOperations: operations.groupByOperations, appName: appName, timezone: timezone, queryData: universeQueryStatsData, onSelectAshLabel: onSelectAshLabel, isHistoricalQueryView: true, onEChartsDateSelect: onEChartsDateSelect, showTitle: true }, "".concat(metricMeasure, "-").concat(key)) }) }, "HistoricalQueryView-ash-".concat(metricMeasure, "-").concat(index)));
78388
- }) }), !anomalyData && (jsx(YBTabs, { pill: true, value: sqlDrilldownTab, onChange: handleSqlDrilldownTabChange, children: jsx(YBStyledTab$2, { value: SqlDrilldownTabs.PERFORMANCE_METRICS, label: SqlDrilldownTabs.PERFORMANCE_METRICS }) })), !anomalyData && sqlDrilldownTab === SqlDrilldownTabs.PERFORMANCE_METRICS && (jsx(Box$1, { className: clsx(classes.gridBox, classes.gridBoxThree), children: queryGraphData === null || queryGraphData === void 0 ? void 0 : queryGraphData.filter(function (data) { var _a; return !((_a = data === null || data === void 0 ? void 0 : data.name) === null || _a === void 0 ? void 0 : _a.startsWith('active_session_history')); }).map(function (data, index) {
78512
+ }) }), !anomalyData && (jsx(YBTabs, { pill: true, value: sqlDrilldownTab, onChange: handleSqlDrilldownTabChange, children: jsx(YBStyledTab$3, { value: SqlDrilldownTabs.PERFORMANCE_METRICS, label: SqlDrilldownTabs.PERFORMANCE_METRICS }) })), !anomalyData && sqlDrilldownTab === SqlDrilldownTabs.PERFORMANCE_METRICS && (jsx(Box$1, { className: clsx(classes.gridBox, classes.gridBoxThree), children: queryGraphData === null || queryGraphData === void 0 ? void 0 : queryGraphData.filter(function (data) { var _a; return !((_a = data === null || data === void 0 ? void 0 : data.name) === null || _a === void 0 ? void 0 : _a.startsWith('active_session_history')); }).map(function (data, index) {
78389
78513
  var operations = getOperations(metricMeasure, data, GraphType.SINGLE_SUPPORTING, true, historicalQueryRequestParams, true);
78390
78514
  var key = data.name;
78391
78515
  return (jsx(Box$1, { id: "HistoricalQueryView-".concat(metricMeasure, "-").concat(index), children: jsx(Box$1, { style: {
@@ -78399,7 +78523,7 @@ var SqlDrilldown = function (_a) {
78399
78523
  : operations.uniqueOperations, registerChartInstance: function (instance) {
78400
78524
  return registerChartInstance(instance, index);
78401
78525
  }, graphType: GraphType.MULTI_SUPPORTING, groupByOperations: operations.groupByOperations, appName: appName, timezone: timezone, queryData: universeQueryStatsData, onSelectAshLabel: onSelectAshLabel, isHistoricalQueryView: true, onEChartsDateSelect: onEChartsDateSelect, showTitle: true }, "".concat(metricMeasure, "-").concat(key)) }) }, "HistoricalQueryView-".concat(metricMeasure, "-").concat(index)));
78402
- }) }))] }))] }), jsx(Box$1, { children: jsx(QueryLevelTabletMetadata, { appName: appName, getClusterDetails: getClusterDetails, universeUuid: universeUuid, apiUrl: apiUrl, queryId: (_f = (_e = getSqlTabletsParams()) === null || _e === void 0 ? void 0 : _e.queryId) !== null && _f !== void 0 ? _f : null, dbId: (_h = (_g = getSqlTabletsParams()) === null || _g === void 0 ? void 0 : _g.dbId) !== null && _h !== void 0 ? _h : null, startTime: (_k = (_j = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.startDateTime) === null || _j === void 0 ? void 0 : _j.toISOString()) !== null && _k !== void 0 ? _k : null, endTime: (_m = (_l = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.endDateTime) === null || _l === void 0 ? void 0 : _l.toISOString()) !== null && _m !== void 0 ? _m : null }) })] }));
78526
+ }) }))] }))] }), jsx(Box$1, { children: jsx(QueryLevelTabletMetadata, { appName: appName, getClusterDetails: getClusterDetails, universeUuid: universeUuid, apiUrl: apiUrl, queryId: (_f = (_e = getSqlTabletsParams()) === null || _e === void 0 ? void 0 : _e.queryId) !== null && _f !== void 0 ? _f : null, dbId: (_h = (_g = getSqlTabletsParams()) === null || _g === void 0 ? void 0 : _g.dbId) !== null && _h !== void 0 ? _h : null, startTime: (_k = (_j = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.startDateTime) === null || _j === void 0 ? void 0 : _j.toISOString()) !== null && _k !== void 0 ? _k : null, endTime: (_m = (_l = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.endDateTime) === null || _l === void 0 ? void 0 : _l.toISOString()) !== null && _m !== void 0 ? _m : null }) }), anomalyData && (jsxs(Box$1, { mt: 2, children: [jsx(Typography$1, { variant: "h5", children: 'Possible Causes' }), jsx(Box$1, { mt: 1, children: jsx(AnomalyRCAGraphs, { appName: appName, timezone: timezone, startTime: (_p = (_o = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.startDateTime) === null || _o === void 0 ? void 0 : _o.toISOString()) !== null && _p !== void 0 ? _p : null, endTime: (_r = (_q = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.endDateTime) === null || _q === void 0 ? void 0 : _q.toISOString()) !== null && _r !== void 0 ? _r : null, anomalyData: anomalyData, getClusterDetails: getClusterDetails, apiUrl: apiUrl, dateTimeRange: dateTimeRange, metricMeasure: metricMeasure, amomalyGraphRequestParams: amomalyGraphRequestParams, formattedAnomalyRca: formattedAnomalyRca, onEChartsDateSelect: onEChartsDateSelect, urlParams: urlParams }) })] }))] }));
78403
78527
  };
78404
78528
 
78405
78529
  var DB_SELECTOR_OPTIONS = [
@@ -78407,7 +78531,7 @@ var DB_SELECTOR_OPTIONS = [
78407
78531
  { value: IO_TEXT, label: IO_TEXT },
78408
78532
  { value: CPU_TEXT, label: CPU_TEXT }
78409
78533
  ];
78410
- var useStyles$h = makeStyles(function (theme) { return ({
78534
+ var useStyles$g = makeStyles(function (theme) { return ({
78411
78535
  dbSelectorBox: {
78412
78536
  gap: theme.spacing(2)
78413
78537
  }
@@ -78415,7 +78539,7 @@ var useStyles$h = makeStyles(function (theme) { return ({
78415
78539
  var DbLoadHeader = function (_a) {
78416
78540
  var _b;
78417
78541
  var outlierType = _a.outlierType, numNodes = _a.numNodes, waitEventType = _a.waitEventType, _c = _a.isDbClusterLoadView, isDbClusterLoadView = _c === void 0 ? true : _c, onChangeDbWaitEventType = _a.onChangeDbWaitEventType, onOutlierTypeSelected = _a.onOutlierTypeSelected, onNumNodesChanged = _a.onNumNodesChanged;
78418
- var classes = useStyles$h();
78542
+ var classes = useStyles$g();
78419
78543
  var _d = useState(0), active = _d[0], setActive = _d[1];
78420
78544
  var getDefaultActiveIndex = function () {
78421
78545
  if (waitEventType === DB_WAIT_EVENT_TYPE_MAPPING.CPU.toUpperCase()) {
@@ -78457,7 +78581,7 @@ const SvgGroup = props => /*#__PURE__*/React$1.createElement("svg", _extends$f({
78457
78581
  strokeLinejoin: "round"
78458
78582
  })));
78459
78583
 
78460
- var useStyles$g = makeStyles$1(function () { return ({
78584
+ var useStyles$f = makeStyles$1(function () { return ({
78461
78585
  selectBox: {
78462
78586
  width: '168px'
78463
78587
  },
@@ -78474,7 +78598,7 @@ var QueriesMetadata = function (_a) {
78474
78598
  var _b, _c, _d, _e, _f, _g, _h, _j, _k;
78475
78599
  var dbWaitEventType = _a.dbWaitEventType, name = _a.name, apiUrl = _a.apiUrl, appName = _a.appName, startTime = _a.startTime, endTime = _a.endTime, universeUuid = _a.universeUuid, _l = _a.groupByOperation, groupByOperation = _l === void 0 ? WaitEventClassification.WAIT_EVENT_TYPE : _l, _m = _a.isDbLoadMetadata, isDbLoadMetadata = _m === void 0 ? false : _m, _o = _a.isNodeLoadMetadata, isNodeLoadMetadata = _o === void 0 ? false : _o, _p = _a.isTabletLoadMetadata, isTabletLoadMetadata = _p === void 0 ? false : _p, onSelectedQuery = _a.onSelectedQuery, onSetGroupByOperation = _a.onSetGroupByOperation, onNavigateToUrl = _a.onNavigateToUrl;
78476
78600
  var helperClasses = useHelperStyles();
78477
- var classes = useStyles$g();
78601
+ var classes = useStyles$f();
78478
78602
  var codeBlockClasses = useCodeBlockStyles();
78479
78603
  var debouncedSearchHandlerRef = useRef(
78480
78604
  // Use debounce from lodash-es to debounce the search input not material-ui/core as it does not havwe cancel method
@@ -79531,16 +79655,16 @@ var NodeLoadMetadata = function (_a) {
79531
79655
  } }, "NodeLoad-".concat(dbWaitEventType, "-").concat(sortBy, "-").concat(sortDirection)))] }) })] })] })] }));
79532
79656
  };
79533
79657
 
79534
- var img$e = "data:image/svg+xml,%3csvg width='42' height='22' viewBox='0 0 42 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M41 1L25.2627 16.7373C24.4707 17.5293 24.0747 17.9253 23.618 18.0737C23.2163 18.2042 22.7837 18.2042 22.382 18.0737C21.9253 17.9253 21.5293 17.5293 20.7373 16.7373L15.2627 11.2627C14.4707 10.4707 14.0747 10.0747 13.618 9.92631C13.2163 9.7958 12.7837 9.7958 12.382 9.92631C11.9253 10.0747 11.5293 10.4707 10.7373 11.2627L1 21M41 1H27M41 1V15' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";
79535
- var ArrowLargeIcon = img$e;
79658
+ var img$a = "data:image/svg+xml,%3csvg width='42' height='22' viewBox='0 0 42 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M41 1L25.2627 16.7373C24.4707 17.5293 24.0747 17.9253 23.618 18.0737C23.2163 18.2042 22.7837 18.2042 22.382 18.0737C21.9253 17.9253 21.5293 17.5293 20.7373 16.7373L15.2627 11.2627C14.4707 10.4707 14.0747 10.0747 13.618 9.92631C13.2163 9.7958 12.7837 9.7958 12.382 9.92631C11.9253 10.0747 11.5293 10.4707 10.7373 11.2627L1 21M41 1H27M41 1V15' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";
79659
+ var ArrowLargeIcon = img$a;
79536
79660
 
79537
- var img$d = "data:image/svg+xml,%3csvg width='21' height='12' viewBox='0 0 21 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M20.5 1L12.6314 8.86863C12.2354 9.26465 12.0373 9.46265 11.809 9.53684C11.6082 9.6021 11.3918 9.6021 11.191 9.53684C10.9627 9.46265 10.7646 9.26465 10.3686 8.86863L7.63137 6.13137C7.23535 5.73535 7.03735 5.53735 6.80902 5.46316C6.60817 5.3979 6.39183 5.3979 6.19098 5.46316C5.96265 5.53735 5.76465 5.73535 5.36863 6.13137L0.5 11M20.5 1H13.5M20.5 1V8' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";
79538
- var ArrowSmallIcon = img$d;
79661
+ var img$9 = "data:image/svg+xml,%3csvg width='21' height='12' viewBox='0 0 21 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M20.5 1L12.6314 8.86863C12.2354 9.26465 12.0373 9.46265 11.809 9.53684C11.6082 9.6021 11.3918 9.6021 11.191 9.53684C10.9627 9.46265 10.7646 9.26465 10.3686 8.86863L7.63137 6.13137C7.23535 5.73535 7.03735 5.53735 6.80902 5.46316C6.60817 5.3979 6.39183 5.3979 6.19098 5.46316C5.96265 5.53735 5.76465 5.73535 5.36863 6.13137L0.5 11M20.5 1H13.5M20.5 1V8' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";
79662
+ var ArrowSmallIcon = img$9;
79539
79663
 
79540
- var img$c = "data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.8002 13.7616H4.48019C3.95091 13.7616 3.52019 13.3308 3.52019 12.8016C3.52019 12.2723 3.95091 11.8416 4.48019 11.8416H12.1602C12.3368 11.8416 12.4802 11.6982 12.4802 11.5216V3.20156C12.4802 2.319 11.7621 1.60156 10.8802 1.60156H4.48019C3.59827 1.60156 2.88019 2.319 2.88019 3.20156V12.8016C2.88019 13.6841 3.59827 14.4016 4.48019 14.4016H12.8002C12.9768 14.4016 13.1202 14.2582 13.1202 14.0816C13.1202 13.9049 12.9768 13.7616 12.8002 13.7616ZM3.52019 3.20156C3.52019 2.67228 3.95091 2.24156 4.48019 2.24156H10.8802C11.4095 2.24156 11.8402 2.67228 11.8402 3.20156V11.2016H4.48019C4.12051 11.2016 3.78771 11.3212 3.52019 11.5222V3.20156Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 6.08203H5.76006C5.58342 6.08203 5.44006 6.22539 5.44006 6.40203C5.44006 6.57867 5.58342 6.72203 5.76006 6.72203H9.60006C9.7767 6.72203 9.92006 6.57867 9.92006 6.40203C9.92006 6.22539 9.7767 6.08203 9.60006 6.08203Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 7.85938H5.76006C5.58342 7.85938 5.44006 8.00274 5.44006 8.17938C5.44006 8.35602 5.58342 8.49938 5.76006 8.49938H9.60006C9.7767 8.49938 9.92006 8.35602 9.92006 8.17938C9.92006 8.00274 9.7767 7.85938 9.60006 7.85938Z' fill='%232B59C3'/%3e%3cpath d='M9.6 4.30469H5.76C5.58336 4.30469 5.44 4.44805 5.44 4.62469C5.44 4.80133 5.58336 4.94469 5.76 4.94469H9.6C9.77664 4.94469 9.92 4.80133 9.92 4.62469C9.92 4.44805 9.77664 4.30469 9.6 4.30469Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 7.85938H5.76006C5.58342 7.85938 5.44006 8.00274 5.44006 8.17938C5.44006 8.35602 5.58342 8.49938 5.76006 8.49938H9.60006C9.7767 8.49938 9.92006 8.35602 9.92006 8.17938C9.92006 8.00274 9.7767 7.85938 9.60006 7.85938Z' fill='%232B59C3'/%3e%3c/svg%3e";
79541
- var DocsIcon = img$c;
79664
+ var img$8 = "data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.8002 13.7616H4.48019C3.95091 13.7616 3.52019 13.3308 3.52019 12.8016C3.52019 12.2723 3.95091 11.8416 4.48019 11.8416H12.1602C12.3368 11.8416 12.4802 11.6982 12.4802 11.5216V3.20156C12.4802 2.319 11.7621 1.60156 10.8802 1.60156H4.48019C3.59827 1.60156 2.88019 2.319 2.88019 3.20156V12.8016C2.88019 13.6841 3.59827 14.4016 4.48019 14.4016H12.8002C12.9768 14.4016 13.1202 14.2582 13.1202 14.0816C13.1202 13.9049 12.9768 13.7616 12.8002 13.7616ZM3.52019 3.20156C3.52019 2.67228 3.95091 2.24156 4.48019 2.24156H10.8802C11.4095 2.24156 11.8402 2.67228 11.8402 3.20156V11.2016H4.48019C4.12051 11.2016 3.78771 11.3212 3.52019 11.5222V3.20156Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 6.08203H5.76006C5.58342 6.08203 5.44006 6.22539 5.44006 6.40203C5.44006 6.57867 5.58342 6.72203 5.76006 6.72203H9.60006C9.7767 6.72203 9.92006 6.57867 9.92006 6.40203C9.92006 6.22539 9.7767 6.08203 9.60006 6.08203Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 7.85938H5.76006C5.58342 7.85938 5.44006 8.00274 5.44006 8.17938C5.44006 8.35602 5.58342 8.49938 5.76006 8.49938H9.60006C9.7767 8.49938 9.92006 8.35602 9.92006 8.17938C9.92006 8.00274 9.7767 7.85938 9.60006 7.85938Z' fill='%232B59C3'/%3e%3cpath d='M9.6 4.30469H5.76C5.58336 4.30469 5.44 4.44805 5.44 4.62469C5.44 4.80133 5.58336 4.94469 5.76 4.94469H9.6C9.77664 4.94469 9.92 4.80133 9.92 4.62469C9.92 4.44805 9.77664 4.30469 9.6 4.30469Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 7.85938H5.76006C5.58342 7.85938 5.44006 8.00274 5.44006 8.17938C5.44006 8.35602 5.58342 8.49938 5.76006 8.49938H9.60006C9.7767 8.49938 9.92006 8.35602 9.92006 8.17938C9.92006 8.00274 9.7767 7.85938 9.60006 7.85938Z' fill='%232B59C3'/%3e%3c/svg%3e";
79665
+ var DocsIcon = img$8;
79542
79666
 
79543
- var useStyles$f = makeStyles$1(function (theme) { return ({
79667
+ var useStyles$e = makeStyles$1(function (theme) { return ({
79544
79668
  messageBox: {
79545
79669
  width: '100%',
79546
79670
  height: '228px',
@@ -79583,7 +79707,7 @@ var DOC_LINK = [
79583
79707
  ];
79584
79708
  var ASHBanner = function (_a) {
79585
79709
  var isAshSupported = _a.isAshSupported;
79586
- var classes = useStyles$f();
79710
+ var classes = useStyles$e();
79587
79711
  return (jsxs(Box$1, { className: classes.messageBox, children: [jsx("img", { src: !isAshSupported ? ArrowLargeIcon : ArrowSmallIcon, alt: "Arrow" }), jsx("span", { className: classes.ashText, children: !isAshSupported ? UPGRADE_DB_FOR_ASH : ENABLE_ASH_MSG }), jsxs(Box$1, { display: "flex", flexDirection: 'row', children: [jsx("img", { src: DocsIcon, alt: "Docs" }), jsx("a", { className: classes.ashLink, href: !isAshSupported ? DOC_LINK[0].link : DOC_LINK[1].link, target: "_blank", rel: "noreferrer", children: !isAshSupported ? DOC_LINK[0].text : DOC_LINK[1].text })] })] }));
79588
79712
  };
79589
79713
 
@@ -80070,11 +80194,11 @@ var generateEChartsOptions = function (overallMetrics, dbWaitEventType, isDbClus
80070
80194
  return options;
80071
80195
  };
80072
80196
 
80073
- var img$b = "data:image/svg+xml,%3csvg width='18' height='16' viewBox='0 0 18 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M0.599976 6.43334V14.6M5.93331 0.600006V14.6M11.2666 6.43334V14.6M16.6 0.600006V14.6' stroke='%232B59C3' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";
80074
- var BarIcon = img$b;
80197
+ var img$7 = "data:image/svg+xml,%3csvg width='18' height='16' viewBox='0 0 18 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M0.599976 6.43334V14.6M5.93331 0.600006V14.6M11.2666 6.43334V14.6M16.6 0.600006V14.6' stroke='%232B59C3' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";
80198
+ var BarIcon = img$7;
80075
80199
 
80076
- var img$a = "data:image/svg+xml,%3csvg width='21' height='12' viewBox='0 0 21 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M19.6 10.6L13.8724 4.62478C13.6553 4.39833 13.5468 4.28511 13.4159 4.22658C13.3003 4.17493 13.1729 4.15363 13.0464 4.16477C12.903 4.1774 12.7621 4.2489 12.4804 4.3919L7.7196 6.80811C7.43784 6.95111 7.29696 7.02261 7.15357 7.03524C7.027 7.04639 6.89966 7.02508 6.78409 6.97343C6.65315 6.91491 6.54462 6.80168 6.32755 6.57523L0.599976 0.600006' stroke='%230B1117' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";
80077
- var LineIcon = img$a;
80200
+ var img$6 = "data:image/svg+xml,%3csvg width='21' height='12' viewBox='0 0 21 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M19.6 10.6L13.8724 4.62478C13.6553 4.39833 13.5468 4.28511 13.4159 4.22658C13.3003 4.17493 13.1729 4.15363 13.0464 4.16477C12.903 4.1774 12.7621 4.2489 12.4804 4.3919L7.7196 6.80811C7.43784 6.95111 7.29696 7.02261 7.15357 7.03524C7.027 7.04639 6.89966 7.02508 6.78409 6.97343C6.65315 6.91491 6.54462 6.80168 6.32755 6.57523L0.599976 0.600006' stroke='%230B1117' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";
80201
+ var LineIcon = img$6;
80078
80202
 
80079
80203
  use([
80080
80204
  install$3,
@@ -80088,7 +80212,7 @@ use([
80088
80212
  install$b
80089
80213
  ]);
80090
80214
  // ... (other useStyles and component setup remains the same)
80091
- var useStyles$e = makeStyles(function (theme) { return ({
80215
+ var useStyles$d = makeStyles(function (theme) { return ({
80092
80216
  metricPanel: {
80093
80217
  position: 'relative',
80094
80218
  // overflow: 'hidden',
@@ -80170,7 +80294,7 @@ var CHART_TYPE_SELECTOR_OPTIONS = [
80170
80294
  var PerfAdvisorClusterLoad = function (_a) {
80171
80295
  var _b, _c, _d;
80172
80296
  var startTime = _a.startTime, endTime = _a.endTime, appName = _a.appName, metricKey = _a.metricKey, shouldAbbreviateTraceName = _a.shouldAbbreviateTraceName, groupByOperation = _a.groupByOperation, timezone = _a.timezone, universeUuid = _a.universeUuid, isAshEnabled = _a.isAshEnabled, isAshSupported = _a.isAshSupported, apiUrl = _a.apiUrl, dbWaitEventType = _a.dbWaitEventType, _e = _a.isDbClusterLoadView, isDbClusterLoadView = _e === void 0 ? false : _e, _f = _a.isNodeClusterLoadView, isNodeClusterLoadView = _f === void 0 ? false : _f, onEChartsDateSelect = _a.onEChartsDateSelect, onSetGroupByOperation = _a.onSetGroupByOperation, onFilterBarData = _a.onFilterBarData, getClusterDetails = _a.getClusterDetails;
80173
- var classes = useStyles$e();
80297
+ var classes = useStyles$d();
80174
80298
  var helperClasses = useHelperStyles();
80175
80299
  // Use a ref to store the ECharts instance
80176
80300
  var chartInstance = useRef(null);
@@ -80437,11 +80561,11 @@ var PerfAdvisorClusterLoad = function (_a) {
80437
80561
  };
80438
80562
 
80439
80563
  var NodeDrilldown = function (_a) {
80440
- var _b, _c, _d, _e, _f, _g, _h, _j;
80441
- var appName = _a.appName, dbWaitEventType = _a.dbWaitEventType, timezone = _a.timezone, apiUrl = _a.apiUrl, dateTimeRange = _a.dateTimeRange, groupByOperation = _a.groupByOperation, onFilterBarData = _a.onFilterBarData, onChangeDbWaitEventType = _a.onChangeDbWaitEventType, getClusterDetails = _a.getClusterDetails, onOutlierTypeSelected = _a.onOutlierTypeSelected, onNumNodesChanged = _a.onNumNodesChanged, onEChartsDateSelect = _a.onEChartsDateSelect, onSetGroupByOperation = _a.onSetGroupByOperation, onSelectedQuery = _a.onSelectedQuery, onNavigateToUrl = _a.onNavigateToUrl;
80564
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
80565
+ var appName = _a.appName, dbWaitEventType = _a.dbWaitEventType, timezone = _a.timezone, apiUrl = _a.apiUrl, anomalyData = _a.anomalyData, metricMeasure = _a.metricMeasure, amomalyGraphRequestParams = _a.amomalyGraphRequestParams, formattedAnomalyRca = _a.formattedAnomalyRca, urlParams = _a.urlParams, dateTimeRange = _a.dateTimeRange, groupByOperation = _a.groupByOperation, onFilterBarData = _a.onFilterBarData, onChangeDbWaitEventType = _a.onChangeDbWaitEventType, getClusterDetails = _a.getClusterDetails, onOutlierTypeSelected = _a.onOutlierTypeSelected, onNumNodesChanged = _a.onNumNodesChanged, onEChartsDateSelect = _a.onEChartsDateSelect, onSetGroupByOperation = _a.onSetGroupByOperation, onSelectedQuery = _a.onSelectedQuery, onNavigateToUrl = _a.onNavigateToUrl;
80442
80566
  // State variables
80443
- var _k = getClusterDetails(), universeUuid = _k.universeUuid, numNodes = _k.numNodes, outlierType = _k.outlierType;
80444
- return (jsxs(Fragment, { children: [jsx(DbLoadHeader, { outlierType: outlierType, numNodes: numNodes, onOutlierTypeSelected: onOutlierTypeSelected, onNumNodesChanged: onNumNodesChanged, onChangeDbWaitEventType: onChangeDbWaitEventType, waitEventType: dbWaitEventType, isDbClusterLoadView: false }), jsx(PerfAdvisorClusterLoad, { dbWaitEventType: dbWaitEventType, isDbClusterLoadView: false, isNodeClusterLoadView: true, startTime: (_c = (_b = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.startDateTime) === null || _b === void 0 ? void 0 : _b.toISOString()) !== null && _c !== void 0 ? _c : null, endTime: (_e = (_d = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.endDateTime) === null || _d === void 0 ? void 0 : _d.toISOString()) !== null && _e !== void 0 ? _e : null, apiUrl: apiUrl, universeUuid: universeUuid, appName: appName, metricKey: "node_drilldown_cluster_load", groupByOperation: groupByOperation, shouldAbbreviateTraceName: true, timezone: timezone, isAshEnabled: true, isAshSupported: true, onFilterBarData: onFilterBarData, onSetGroupByOperation: onSetGroupByOperation, onEChartsDateSelect: onEChartsDateSelect, getClusterDetails: getClusterDetails }), jsx(NodeLoadMetadata, { appName: appName, dbWaitEventType: dbWaitEventType, universeUuid: universeUuid, apiUrl: apiUrl, startTime: (_g = (_f = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.startDateTime) === null || _f === void 0 ? void 0 : _f.toISOString()) !== null && _g !== void 0 ? _g : null, endTime: (_j = (_h = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.endDateTime) === null || _h === void 0 ? void 0 : _h.toISOString()) !== null && _j !== void 0 ? _j : null, onSelectedQuery: onSelectedQuery, onNavigateToUrl: onNavigateToUrl })] }));
80567
+ var _p = getClusterDetails(), universeUuid = _p.universeUuid, numNodes = _p.numNodes, outlierType = _p.outlierType;
80568
+ return (jsxs(Fragment, { children: [jsx(DbLoadHeader, { outlierType: outlierType, numNodes: numNodes, onOutlierTypeSelected: onOutlierTypeSelected, onNumNodesChanged: onNumNodesChanged, onChangeDbWaitEventType: onChangeDbWaitEventType, waitEventType: dbWaitEventType, isDbClusterLoadView: false }), jsx(PerfAdvisorClusterLoad, { dbWaitEventType: dbWaitEventType, isDbClusterLoadView: false, isNodeClusterLoadView: true, startTime: (_c = (_b = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.startDateTime) === null || _b === void 0 ? void 0 : _b.toISOString()) !== null && _c !== void 0 ? _c : null, endTime: (_e = (_d = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.endDateTime) === null || _d === void 0 ? void 0 : _d.toISOString()) !== null && _e !== void 0 ? _e : null, apiUrl: apiUrl, universeUuid: universeUuid, appName: appName, metricKey: "node_drilldown_cluster_load", groupByOperation: groupByOperation, shouldAbbreviateTraceName: true, timezone: timezone, isAshEnabled: true, isAshSupported: true, onFilterBarData: onFilterBarData, onSetGroupByOperation: onSetGroupByOperation, onEChartsDateSelect: onEChartsDateSelect, getClusterDetails: getClusterDetails }), jsx(NodeLoadMetadata, { appName: appName, dbWaitEventType: dbWaitEventType, universeUuid: universeUuid, apiUrl: apiUrl, startTime: (_g = (_f = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.startDateTime) === null || _f === void 0 ? void 0 : _f.toISOString()) !== null && _g !== void 0 ? _g : null, endTime: (_j = (_h = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.endDateTime) === null || _h === void 0 ? void 0 : _h.toISOString()) !== null && _j !== void 0 ? _j : null, onSelectedQuery: onSelectedQuery, onNavigateToUrl: onNavigateToUrl }), jsxs(Box$1, { mt: 2, children: [jsx(Typography$1, { variant: "h5", children: 'Possible Causes' }), jsx(Box$1, { mt: 1, children: jsx(AnomalyRCAGraphs, { appName: appName, timezone: timezone, startTime: (_l = (_k = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.startDateTime) === null || _k === void 0 ? void 0 : _k.toISOString()) !== null && _l !== void 0 ? _l : null, endTime: (_o = (_m = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.endDateTime) === null || _m === void 0 ? void 0 : _m.toISOString()) !== null && _o !== void 0 ? _o : null, anomalyData: anomalyData, getClusterDetails: getClusterDetails, apiUrl: apiUrl, dateTimeRange: dateTimeRange, metricMeasure: metricMeasure, amomalyGraphRequestParams: amomalyGraphRequestParams, formattedAnomalyRca: formattedAnomalyRca, onEChartsDateSelect: onEChartsDateSelect, urlParams: urlParams }) })] })] }));
80445
80569
  };
80446
80570
 
80447
80571
  var PerfAdvisorGantChart = function (_a) {
@@ -81302,19 +81426,37 @@ var PerfAdvisorGantChart = function (_a) {
81302
81426
  } }, name), jsx("style", { children: "\n .vis-foreground .vis-group {\n border-bottom: none;\n }\n .vis-foreground .vis-group.custom-group-row-1 {\n top: 8px;\n }\n .vis-foreground .vis-group.parent-category {\n border-top: 1px solid #E0E0E0 !important; /* Or whatever you want */\n }\n .vis-labelset .vis-label {\n border-right: 0px solid #ccc !important;\n border-bottom: none;\n border-top: none;\n }\n .vis-timeline {\n background-color: #FFFFFF !important;\n border: 0px solid #ccc !important;\n visibility: visible !important;\n }\n .vis-panel.vis-top {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-panel.vis-bottom {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-panel.vis-left {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-inner a {\n cursor: pointer;\n letter-spacing: 0.3px;\n text-decoration: none !important;\n outline: none !important;\n color: unset !important;\n &:focus {\n box-shadow: inset 0px 0px 4px rgb(247, 249, 251, 0.8) !important;\n }\n &:hover {\n box-shadow: inset 0px 0px 4px rgb(247, 249, 251, 0.8) !important;\n }\n }\n .vis-labelset .vis-label .vis-inner {\n padding: 0px;\n }\n .vis-inner span {\n padding: 2px 6px 2px 6px;\n height: 20px;\n width: fit-content;\n font-size: 11.5px;\n line-height: 16px;\n font-family: Inter;\n font-weight: 500;\n border-radius: 4px;\n }\n .vis-item.vis-range .vis-item-content {\n display: none;\n }\n .vis-item.vis-range {\n top: 10px !important;\n border-style: unset;\n border-radius: 8px;\n }\n .vis-labelset.my-custom-labelset-rca {\n width: 0px;\n }\n .vis-labelset {\n width: 250px;\n }\n .vis-inner {\n display: flex !important;\n justify-content: space-between;\n align-items: center;\n }\n .vis-time-axis .vis-grid.vis-vertical {\n border-left: 1px dashed !important;\n color: #D7DEE4;\n }\n .vis-time-axis .vis-grid.vis-horizontal {\n display: none !important;\n }\n .vis-panel.vis-center {\n border-left-style: dashed !important;\n border-right-style: dashed !important;\n border-top-color: #D7DEE4;\n top: 1px !important;\n margin-left: 8px;\n left: 254px !important;\n }\n .vis-panel.vis-center.my-custom-center-panel-rca {\n left: 0px !important;\n }\n .vis-time-axis .vis-grid.vis-major {\n border-color: #e5e5e5 !important;\n }\n .custom-group-separator-left {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n position: absolute;\n width: 100%;\n margin-top: 2px;\n }\n .custom-group-separator-right {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n position: absolute;\n width: 100%;\n }\n .custom-group-separator-bottom {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n content: '';\n }\n .custom-group-separator-top {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n content: '';\n }\n .item-separator {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n margin-top: 2px;\n }\n .item-separator-right {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n }\n .vis-label.custom-group-row-1 .vis-inner {\n padding-top: 16px;\n padding-bottom: 16px;\n }\n .vis-label.custom-group-row-2 .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-label.custom-group-row-3 .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-label.custom-group-row .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-foreground .vis-group.custom-group-row {\n border-bottom: 1px solid #D7DEE4;\n bottom: 3px;\n }\n .vis-label.custom-group-row .vis-inner .category-deeplink {\n text-decoration: underline !important;\n }\n .vis-label.custom-group-row-2 .vis-inner .category-badge-2 {\n margin-right: 40px;\n }\n .vis-label.custom-group-row-3 .vis-inner .category-badge-3 {\n margin-right: 44px;\n }\n .vis-label.custom-group-row-3 .vis-inner .category-deeplink {\n margin-left: 24px;\n text-decoration: underline !important;\n }\n .vis-label.db-background .vis-inner .db-inner-background {\n background-color: #E8E9FE !important;\n color: #30307F !important;\n }\n .vis-label.node-background .vis-inner .node-inner-background {\n background-color: #FFEEC8 !important;\n color: #9D6C00 !important;\n }\n .vis-label.sql-background .vis-inner .sql-inner-background {\n background-color: rgba(187, 66, 188, 0.15) !important;\n color: #7D2777 !important;\n }\n .vis-label.app-background .vis-inner .app-inner-background {\n background-color: #D7EFF4 !important;\n color: #2B59C3 !important;\n }\n .vis-label.infra-background .vis-inner .infra-inner-background {\n background-color: #c1ccec !important;\n color: #507ce1 !important;\n }\n .vis-label.bg-jobs-background .vis-inner .bg-jobs-inner-background {\n background-color: #E9EEF2 !important;\n color: #4E5F6D !important;\n }\n .vis-time-axis .vis-text {\n font-family: Inter;\n font-size: 11px;\n font-weight: 400;\n }\n " })] }, name));
81303
81427
  };
81304
81428
 
81429
+ var YBStyledTab$2 = styled$1(YBTab)(function (_a) {
81430
+ var theme = _a.theme;
81431
+ return ({
81432
+ display: 'flex',
81433
+ flexDirection: 'row',
81434
+ alignItems: 'center',
81435
+ padding: theme.spacing(0.5, 1),
81436
+ '& .yb-MuiTab-iconWrapper': {
81437
+ marginTop: theme.spacing(0.5)
81438
+ }
81439
+ });
81440
+ });
81305
81441
  var OtherDrilldown = function (_a) {
81306
81442
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
81307
- var metricMeasure = _a.metricMeasure, appName = _a.appName, timezone = _a.timezone, universeQueryData = _a.universeQueryData, amomalyGraphRequestParams = _a.amomalyGraphRequestParams, anomalyData = _a.anomalyData, gantChartData = _a.gantChartData, dateTimeRange = _a.dateTimeRange, urlParams = _a.urlParams, apiUrl = _a.apiUrl, getClusterDetails = _a.getClusterDetails, onEChartsDateSelect = _a.onEChartsDateSelect, onSelectedIssue = _a.onSelectedIssue;
81443
+ var metricMeasure = _a.metricMeasure, appName = _a.appName, timezone = _a.timezone, universeQueryData = _a.universeQueryData, amomalyGraphRequestParams = _a.amomalyGraphRequestParams, formattedAnomalyRca = _a.formattedAnomalyRca, anomalyData = _a.anomalyData, gantChartData = _a.gantChartData, dateTimeRange = _a.dateTimeRange, urlParams = _a.urlParams, apiUrl = _a.apiUrl, getClusterDetails = _a.getClusterDetails, onEChartsDateSelect = _a.onEChartsDateSelect, onSelectedIssue = _a.onSelectedIssue;
81308
81444
  // Ref to store chart instances
81309
81445
  var chartInstancesRef = useRef([]);
81310
81446
  var classes = useHelperStyles();
81311
- var _2 = useState(0), selectedTab = _2[0]; _2[1];
81312
- var _3 = useState(anomalyData), anomalyGantData = _3[0], setAnomalyGantData = _3[1];
81313
- var _4 = useState(null), RCAGraphResponseData = _4[0], setRCAGraphResponseData = _4[1];
81314
- var _5 = useState(amomalyGraphRequestParams), graphRequestParams = _5[0], setGraphRequestParams = _5[1];
81315
- var _6 = getClusterDetails(), universeUuid = _6.universeUuid, cluster = _6.cluster, region = _6.region, zone = _6.zone, node = _6.node, numNodes = _6.numNodes, outlierType = _6.outlierType;
81447
+ var _2 = useState(false); _2[0]; _2[1];
81448
+ var _3 = useState(0), selectedTab = _3[0], setSelectedTab = _3[1];
81449
+ var _4 = useState(anomalyData), anomalyGantData = _4[0], setAnomalyGantData = _4[1];
81450
+ var _5 = useState(null), RCAGraphResponseData = _5[0], setRCAGraphResponseData = _5[1];
81451
+ var _6 = useState(amomalyGraphRequestParams), graphRequestParams = _6[0], setGraphRequestParams = _6[1];
81452
+ var _7 = getClusterDetails(), universeUuid = _7.universeUuid, cluster = _7.cluster, region = _7.region, zone = _7.zone, node = _7.node, numNodes = _7.numNodes, outlierType = _7.outlierType;
81316
81453
  // Check previous props
81317
81454
  var previousMetricMeasure = usePrevious(metricMeasure);
81455
+ var handleTabChange = function (event, newValue) {
81456
+ var scrollY = window.scrollY; // Save scroll position
81457
+ setSelectedTab(newValue);
81458
+ setTimeout(function () { return window.scrollTo(0, scrollY); }, 0); // Restore after re-render
81459
+ };
81318
81460
  var onSelectAshLabel = function (groupByLabel, metricData, isAdvancedView) {
81319
81461
  var _a, _b;
81320
81462
  var groupBy = WaitEventClassification.WAIT_EVENT_COMPONENT;
@@ -81388,6 +81530,7 @@ var OtherDrilldown = function (_a) {
81388
81530
  return registerChartInstance(instance, index);
81389
81531
  }, appName: appName, graphType: graphType, timezone: timezone, queryData: universeQueryData, onSelectAshLabel: onSelectAshLabel, onEChartsDateSelect: onEChartsDateSelect }, "".concat(metricMeasure, "-").concat(graphResponseData.name)) }));
81390
81532
  };
81533
+ var filteredRecommendationMetrics = formattedAnomalyRca === null || formattedAnomalyRca === void 0 ? void 0 : formattedAnomalyRca.filter(function (item) { var _a; return ((_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.length) > 0; });
81391
81534
  // Reset chart instances on metricMeasure change
81392
81535
  useEffect(function () {
81393
81536
  chartInstancesRef.current = [];
@@ -81432,10 +81575,42 @@ var OtherDrilldown = function (_a) {
81432
81575
  (gantChartData.isError && ((_x = (_w = gantChartData === null || gantChartData === void 0 ? void 0 : gantChartData.error) === null || _w === void 0 ? void 0 : _w.response) === null || _x === void 0 ? void 0 : _x.status) === 404)) &&
81433
81576
  (isNonEmptyObject(anomalyGantData) ? (jsx(Box$1, { className: classes.rcaGantChartBox, children: jsx(PerfAdvisorGantChart, { universeUuid: universeUuid, apiUrl: apiUrl, sourceData: gantChartData.isError && ((_z = (_y = gantChartData === null || gantChartData === void 0 ? void 0 : gantChartData.error) === null || _y === void 0 ? void 0 : _y.response) === null || _z === void 0 ? void 0 : _z.status) === 404
81434
81577
  ? []
81435
- : [anomalyGantData], name: RCA_GANT_CHART, showMoreOptions: false, expandAll: true, startTime: (_0 = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.startDateTime) === null || _0 === void 0 ? void 0 : _0.toISOString(), endTime: (_1 = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.endDateTime) === null || _1 === void 0 ? void 0 : _1.toISOString(), onSelectedIssue: onSelectedIssue, appName: appName, showMultiline: false }, RCA_GANT_CHART) })) : (jsxs(Box$1, { mt: 2, children: [(appName === AppName.WEB || appName === AppName.YBA) && (jsx("span", { children: 'Failed to fetch anomaly data, please try again.' })), appName === AppName.YBM && (jsx(GenericFailure, { text: 'Failed to fetch anomaly data, please try again.' }))] })))] })] }))] }) }));
81578
+ : [anomalyGantData], name: RCA_GANT_CHART, showMoreOptions: false, expandAll: true, startTime: (_0 = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.startDateTime) === null || _0 === void 0 ? void 0 : _0.toISOString(), endTime: (_1 = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.endDateTime) === null || _1 === void 0 ? void 0 : _1.toISOString(), onSelectedIssue: onSelectedIssue, appName: appName, showMultiline: false }, RCA_GANT_CHART) })) : (jsxs(Box$1, { mt: 2, children: [(appName === AppName.WEB || appName === AppName.YBA) && (jsx("span", { children: 'Failed to fetch anomaly data, please try again.' })), appName === AppName.YBM && (jsx(GenericFailure, { text: 'Failed to fetch anomaly data, please try again.' }))] })))] }), isNonEmptyArray(RCAGraphResponseData) &&
81579
+ isNonEmptyArray(filteredRecommendationMetrics) && (jsxs(Box$1, { mt: 2, children: [jsx(YBTabs, { pill: true, value: selectedTab, onChange: handleTabChange, children: filteredRecommendationMetrics === null || filteredRecommendationMetrics === void 0 ? void 0 : filteredRecommendationMetrics.map(function (item, index) { return (jsx(YBStyledTab$2, { value: index, label: item.cause, className: classes.causeTabButton }, index)); }) }), filteredRecommendationMetrics === null || filteredRecommendationMetrics === void 0 ? void 0 : filteredRecommendationMetrics.map(function (item, recIndex) {
81580
+ var _a, _b;
81581
+ return (jsx(Box$1, { role: "tabpanel", hidden: selectedTab !== recIndex, id: "tabpanel-".concat(recIndex), "aria-labelledby": "tab-".concat(recIndex), style: {
81582
+ border: '1px solid #E9EEF2',
81583
+ borderRadius: '8px',
81584
+ padding: '16px'
81585
+ }, children: selectedTab === recIndex && (jsxs(Box$1, { mt: 2, display: 'flex', flexDirection: 'column', children: [jsx("span", { className: classes.causeText, children: item.cause }), jsxs(Box$1, { children: [jsx("img", { src: UnderIcon, alt: "path" }), jsx("span", { className: classes.descriptionText, children: item.description })] }), jsx(Box$1, { mt: 2, className: ((_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.length) > 1
81586
+ ? clsx(classes.gridBox, classes.gridBoxDouble)
81587
+ : '', children: (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.map(function (metricName, index) {
81588
+ var _a, _b, _c;
81589
+ var metricData = RCAGraphResponseData === null || RCAGraphResponseData === void 0 ? void 0 : RCAGraphResponseData.find(function (data, graphIdx) {
81590
+ return (graphIdx > 0 &&
81591
+ (data === null || data === void 0 ? void 0 : data.name) === metricName &&
81592
+ item.index.includes(graphIdx));
81593
+ });
81594
+ var isOnlyReason = ((_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.length) === 1;
81595
+ var shouldShowGroupbyOperations = (_b = item.groupByControl) === null || _b === void 0 ? void 0 : _b[0];
81596
+ if (isNonEmptyString((_c = metricData === null || metricData === void 0 ? void 0 : metricData.errorMessage) !== null && _c !== void 0 ? _c : '')) {
81597
+ return jsx(Box$1, {});
81598
+ }
81599
+ else {
81600
+ var operations = getOperations(metricMeasure, metricData, GraphType.MULTI_SUPPORTING, shouldShowGroupbyOperations, amomalyGraphRequestParams);
81601
+ return (jsx(Box$1, { style: {
81602
+ border: '1px solid #E9EEF2',
81603
+ borderRadius: '8px',
81604
+ marginRight: isOnlyReason ? '0px' : '16px'
81605
+ }, children: renderGraphs(metricData, operations.uniqueOperations, operations.groupByOperations, isOnlyReason
81606
+ ? GraphType.SINGLE_SUPPORTING
81607
+ : GraphType.MULTI_SUPPORTING, recIndex + index, item.title) }));
81608
+ }
81609
+ }) })] })) }, recIndex));
81610
+ })] }))] }))] }) }));
81436
81611
  };
81437
81612
 
81438
- var useStyles$d = makeStyles$1(function (theme) { return ({
81613
+ var useStyles$c = makeStyles$1(function (theme) { return ({
81439
81614
  headerContainer: {
81440
81615
  height: '24px'
81441
81616
  },
@@ -81494,7 +81669,7 @@ var METADATA_LABELS = {
81494
81669
  var TabletLevelQueryMetadata = function (_a) {
81495
81670
  var anomalyTabletData = _a.anomalyTabletData, isHotTablet = _a.isHotTablet, universeUuid = _a.universeUuid, apiUrl = _a.apiUrl, appName = _a.appName, startTime = _a.startTime, endTime = _a.endTime, onSelectedQuery = _a.onSelectedQuery, onNavigateToUrl = _a.onNavigateToUrl;
81496
81671
  var helperClasses = useHelperStyles();
81497
- var classes = useStyles$d();
81672
+ var classes = useStyles$c();
81498
81673
  var _b = useState(WaitEventClassification.WAIT_EVENT_TYPE), groupByOperation = _b[0], setGroupByOperation = _b[1];
81499
81674
  var eps = anomalyTabletData.eps, events = anomalyTabletData.events, leaderNode = anomalyTabletData.leaderNode, followerNodes = anomalyTabletData.followerNodes, size = anomalyTabletData.size, totalEpsRatio = anomalyTabletData.totalEpsRatio, partition = anomalyTabletData.partition, tabletId = anomalyTabletData.tabletId;
81500
81675
  var onSetGroupByOperation = function (operation) {
@@ -81668,7 +81843,7 @@ var TABLETS_METADATA_LABELS = {
81668
81843
  };
81669
81844
  var TabletMetadata = function (_a) {
81670
81845
  var _b, _c, _d, _e, _f, _g, _h, _j, _k;
81671
- var universeUuid = _a.universeUuid, appName = _a.appName, apiUrl = _a.apiUrl, startTime = _a.startTime, endTime = _a.endTime, getClusterDetails = _a.getClusterDetails, tableName = _a.tableName, dbName = _a.dbName, tabletId = _a.tabletId, isHotTablet = _a.isHotTablet, onSelectedQuery = _a.onSelectedQuery, onNavigateToUrl = _a.onNavigateToUrl;
81846
+ var universeUuid = _a.universeUuid, appName = _a.appName, apiUrl = _a.apiUrl, startTime = _a.startTime, endTime = _a.endTime, dateTimeRange = _a.dateTimeRange, getClusterDetails = _a.getClusterDetails, timezone = _a.timezone, amomalyGraphRequestParams = _a.amomalyGraphRequestParams, formattedAnomalyRca = _a.formattedAnomalyRca, metricMeasure = _a.metricMeasure, urlParams = _a.urlParams, tableName = _a.tableName, dbName = _a.dbName, tabletId = _a.tabletId, isHotTablet = _a.isHotTablet, anomalyData = _a.anomalyData, onSelectedQuery = _a.onSelectedQuery, onNavigateToUrl = _a.onNavigateToUrl, onEChartsDateSelect = _a.onEChartsDateSelect;
81672
81847
  var helperClasses = useHelperStyles();
81673
81848
  var _l = useState([]), columns = _l[0], setColumns = _l[1];
81674
81849
  var _m = useState(false), isTabletsMetadataOptionsModalOpen = _m[0], setIsTabletsMetadataOptionsModalOpen = _m[1];
@@ -81919,11 +82094,10 @@ var TabletMetadata = function (_a) {
81919
82094
  }); },
81920
82095
  customHeadRender: function () { return (jsx(YBTooltip, { title: TOOLTIP_TEXT.PARTITION_TOOLTIP, placement: "top", arrow: true, children: jsxs(Box$1, { className: helperClasses.headerBox, children: [jsx(Typography$1, { variant: "body2", className: helperClasses.headerText, children: TABLETS_METADATA_LABELS.PARTITION }), jsx("img", { src: InfoMessageIcon, alt: "info", className: helperClasses.infoIcon })] }) })); },
81921
82096
  setCellProps: function () { return ({
81922
- className: clsx(helperClasses.tabletNodeLoadMetadataTableCell, helperClasses.ellipsisText)
82097
+ className: helperClasses.tabletNodeLoadMetadataTableCell
81923
82098
  }); },
81924
82099
  customBodyRender: function (value) {
81925
- var displayValue = isNonEmptyString(value) ? value : '-';
81926
- return (jsx(YBTooltip, { title: isNonEmptyString(value) ? value : '', placement: "top", arrow: true, children: jsx(Box$1, { className: helperClasses.ellipsisText, children: displayValue }) }));
82100
+ return isNonEmptyString(value) ? value : '-';
81927
82101
  }
81928
82102
  }
81929
82103
  },
@@ -81939,18 +82113,15 @@ var TabletMetadata = function (_a) {
81939
82113
  setCellHeaderProps: function () { return ({
81940
82114
  style: {
81941
82115
  minWidth: '10%',
81942
- maxWidth: '15%'
82116
+ maxWidth: '20%'
81943
82117
  },
81944
82118
  className: clsx(helperClasses.tableHeaderCell, appName === AppName.WEB && helperClasses.tableBorder)
81945
82119
  }); },
81946
82120
  setCellProps: function () { return ({
81947
- className: clsx(helperClasses.tabletNodeLoadMetadataTableCell, helperClasses.ellipsisText)
82121
+ className: helperClasses.tabletNodeLoadMetadataTableCell
81948
82122
  }); },
81949
82123
  customBodyRender: function (value) {
81950
- if (!isNonEmptyString(value)) {
81951
- return '-';
81952
- }
81953
- return (jsx(YBTooltip, { title: value, placement: "top", arrow: true, children: jsx(Box$1, { className: helperClasses.ellipsisText, children: jsx(YBTag, { variant: "light", size: 'medium', children: value }) }) }));
82124
+ return (jsx(YBTag, { variant: "light", size: 'medium', children: value }));
81954
82125
  }
81955
82126
  }
81956
82127
  },
@@ -81966,22 +82137,16 @@ var TabletMetadata = function (_a) {
81966
82137
  setCellHeaderProps: function () { return ({
81967
82138
  style: {
81968
82139
  minWidth: '10%',
81969
- maxWidth: '15%'
82140
+ maxWidth: '20%'
81970
82141
  },
81971
82142
  className: clsx(helperClasses.tableHeaderCell, appName === AppName.WEB && helperClasses.tableBorder)
81972
82143
  }); },
81973
82144
  setCellProps: function () { return ({
81974
- className: clsx(helperClasses.tabletNodeLoadMetadataTableCell, helperClasses.ellipsisText)
82145
+ className: helperClasses.tabletNodeLoadMetadataTableCell
81975
82146
  }); },
81976
82147
  customBodyRender: function (value) {
81977
- var _a;
81978
- var firstNode = value === null || value === void 0 ? void 0 : value[0];
81979
- var hasData = Array.isArray(value) && value.length > 0 && isNonEmptyString(firstNode);
81980
- var allNodes = (_a = value === null || value === void 0 ? void 0 : value.join(', ')) !== null && _a !== void 0 ? _a : '';
81981
- if (!hasData) {
81982
- return '-';
81983
- }
81984
- return (jsx(YBTooltip, { title: allNodes, placement: "top", arrow: true, children: jsxs(Box$1, { className: helperClasses.ellipsisText, display: "flex", alignItems: "center", style: { gap: '4px' }, children: [jsx(YBTag, { variant: "light", size: 'medium', children: firstNode }), (value === null || value === void 0 ? void 0 : value.length) >= 2 && (jsx(YBTag, { customSx: { marginLeft: '4px' }, variant: "light", size: 'medium', children: jsx("span", { children: "+".concat(value.length - 1) }) }))] }) }));
82148
+ var _a, _b, _c;
82149
+ return (jsxs(Fragment, { children: [jsx(YBTag, { variant: "light", size: 'medium', children: (_a = value === null || value === void 0 ? void 0 : value[0]) !== null && _a !== void 0 ? _a : '-' }), (value === null || value === void 0 ? void 0 : value.length) >= 2 && (jsx(YBTag, { customSx: { marginLeft: '4px' }, variant: "light", size: 'medium', children: jsx(YBTooltip, { title: (_c = (_b = value === null || value === void 0 ? void 0 : value.slice(1)) === null || _b === void 0 ? void 0 : _b.join('\n')) !== null && _c !== void 0 ? _c : '', placement: "top", arrow: true, children: jsx("span", { children: "+".concat(value.length - 1) }) }) }))] }));
81985
82150
  }
81986
82151
  }
81987
82152
  },
@@ -82170,22 +82335,22 @@ var TabletMetadata = function (_a) {
82170
82335
  customFooter: customFooter,
82171
82336
  manualSorting: true,
82172
82337
  state: tableState
82173
- } }, "TabletMetadata-".concat(sortBy, "-").concat(sortDirection)))] }) })] }) }), jsx(Box$1, { mt: 3, children: anomalyTabletData && (jsx(TabletLevelQueryMetadata, { anomalyTabletData: anomalyTabletData, isHotTablet: isHotTablet, appName: appName, universeUuid: universeUuid, startTime: startTime, endTime: endTime, apiUrl: apiUrl, onSelectedQuery: onSelectedQuery, onNavigateToUrl: onNavigateToUrl })) })] }));
82338
+ } }, "TabletMetadata-".concat(sortBy, "-").concat(sortDirection)))] }) })] }) }), jsx(Box$1, { mt: 3, children: anomalyTabletData && (jsx(TabletLevelQueryMetadata, { anomalyTabletData: anomalyTabletData, isHotTablet: isHotTablet, appName: appName, universeUuid: universeUuid, startTime: startTime, endTime: endTime, apiUrl: apiUrl, onSelectedQuery: onSelectedQuery, onNavigateToUrl: onNavigateToUrl })) }), jsxs(Box$1, { mt: 2, children: [jsx(Typography$1, { variant: "h5", children: 'Possible Causes' }), jsx(Box$1, { mt: 1, children: jsx(AnomalyRCAGraphs, { appName: appName, timezone: timezone, startTime: startTime, endTime: endTime, anomalyData: anomalyData, getClusterDetails: getClusterDetails, apiUrl: apiUrl, dateTimeRange: dateTimeRange, metricMeasure: metricMeasure, amomalyGraphRequestParams: amomalyGraphRequestParams, formattedAnomalyRca: formattedAnomalyRca, onEChartsDateSelect: onEChartsDateSelect, urlParams: urlParams }) })] })] }));
82174
82339
  };
82175
82340
 
82176
82341
  var TabletDrilldown = function (_a) {
82177
- var appName = _a.appName, getClusterDetails = _a.getClusterDetails, apiUrl = _a.apiUrl, tabletTab = _a.tabletTab, startTime = _a.startTime, endTime = _a.endTime, isHotTablet = _a.isHotTablet, anomalyData = _a.anomalyData, onSelectedQuery = _a.onSelectedQuery, onNavigateToUrl = _a.onNavigateToUrl;
82342
+ var appName = _a.appName, metricMeasure = _a.metricMeasure, timezone = _a.timezone, getClusterDetails = _a.getClusterDetails, apiUrl = _a.apiUrl, urlParams = _a.urlParams, tabletTab = _a.tabletTab, dateTimeRange = _a.dateTimeRange, startTime = _a.startTime, endTime = _a.endTime, isHotTablet = _a.isHotTablet, anomalyData = _a.anomalyData, amomalyGraphRequestParams = _a.amomalyGraphRequestParams, formattedAnomalyRca = _a.formattedAnomalyRca, onSelectedQuery = _a.onSelectedQuery, onNavigateToUrl = _a.onNavigateToUrl, onEChartsDateSelect = _a.onEChartsDateSelect;
82178
82343
  var _b = getSqlAnomalyGroupParams(anomalyData), tableName = _b.tableName, dbName = _b.dbName, tabletId = _b.tabletId;
82179
82344
  var universeUuid = getClusterDetails().universeUuid;
82180
- return (jsx(Fragment, { children: tabletTab === TabletTabs.TABLET_OVERVIEW && (jsx(TabletMetadata, { appName: appName, getClusterDetails: getClusterDetails, universeUuid: universeUuid, apiUrl: apiUrl, startTime: startTime, endTime: endTime, tableName: tableName !== null && tableName !== void 0 ? tableName : null, dbName: dbName !== null && dbName !== void 0 ? dbName : null, tabletId: tabletId !== null && tabletId !== void 0 ? tabletId : null, isHotTablet: isHotTablet, onSelectedQuery: onSelectedQuery, onNavigateToUrl: onNavigateToUrl })) }));
82345
+ return (jsx(Fragment, { children: tabletTab === TabletTabs.TABLET_OVERVIEW && (jsx(TabletMetadata, { appName: appName, timezone: timezone, urlParams: urlParams, metricMeasure: metricMeasure, amomalyGraphRequestParams: amomalyGraphRequestParams, formattedAnomalyRca: formattedAnomalyRca, getClusterDetails: getClusterDetails, universeUuid: universeUuid, apiUrl: apiUrl, dateTimeRange: dateTimeRange, startTime: startTime, endTime: endTime, tableName: tableName !== null && tableName !== void 0 ? tableName : null, dbName: dbName !== null && dbName !== void 0 ? dbName : null, tabletId: tabletId !== null && tabletId !== void 0 ? tabletId : null, isHotTablet: isHotTablet, anomalyData: anomalyData, onSelectedQuery: onSelectedQuery, onNavigateToUrl: onNavigateToUrl, onEChartsDateSelect: onEChartsDateSelect })) }));
82181
82346
  };
82182
82347
 
82183
82348
  var AnomalyRouter = function (_a) {
82184
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
82185
- var metricMeasure = _a.metricMeasure, appName = _a.appName, timezone = _a.timezone, universeQueryStatsData = _a.universeQueryStatsData, amomalyGraphRequestParams = _a.amomalyGraphRequestParams; _a.formattedAnomalyRca; var anomalyData = _a.anomalyData, gantChartData = _a.gantChartData, dateTimeRange = _a.dateTimeRange, urlParams = _a.urlParams, apiUrl = _a.apiUrl, sqlTab = _a.sqlTab, tabletTab = _a.tabletTab, getClusterDetails = _a.getClusterDetails, onEChartsDateSelect = _a.onEChartsDateSelect, onSelectedIssue = _a.onSelectedIssue, onSelectedQuery = _a.onSelectedQuery, onOutlierTypeSelected = _a.onOutlierTypeSelected, onNumNodesChanged = _a.onNumNodesChanged, onNavigateToUrl = _a.onNavigateToUrl;
82186
- var _t = useState([]); _t[0]; var setFilteredLegends = _t[1];
82187
- var _u = useState(ALL.toUpperCase()), dbWaitEventType = _u[0], setDbWaitEventType = _u[1];
82188
- var _v = useState(GROUP_BY_OPERATIONS[0]), groupByOperation = _v[0], setGroupByOperation = _v[1];
82349
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
82350
+ var metricMeasure = _a.metricMeasure, appName = _a.appName, timezone = _a.timezone, universeQueryStatsData = _a.universeQueryStatsData, amomalyGraphRequestParams = _a.amomalyGraphRequestParams, formattedAnomalyRca = _a.formattedAnomalyRca, anomalyData = _a.anomalyData, gantChartData = _a.gantChartData, dateTimeRange = _a.dateTimeRange, urlParams = _a.urlParams, apiUrl = _a.apiUrl, sqlTab = _a.sqlTab, tabletTab = _a.tabletTab, getClusterDetails = _a.getClusterDetails, onEChartsDateSelect = _a.onEChartsDateSelect, onSelectedIssue = _a.onSelectedIssue, onSelectedQuery = _a.onSelectedQuery, onOutlierTypeSelected = _a.onOutlierTypeSelected, onNumNodesChanged = _a.onNumNodesChanged, onNavigateToUrl = _a.onNavigateToUrl;
82351
+ var _v = useState([]); _v[0]; var setFilteredLegends = _v[1];
82352
+ var _w = useState(ALL.toUpperCase()), dbWaitEventType = _w[0], setDbWaitEventType = _w[1];
82353
+ var _x = useState(GROUP_BY_OPERATIONS[0]), groupByOperation = _x[0], setGroupByOperation = _x[1];
82189
82354
  var onFilterBarData = function (data) {
82190
82355
  setFilteredLegends(data);
82191
82356
  };
@@ -82202,234 +82367,15 @@ var AnomalyRouter = function (_a) {
82202
82367
  onChangeDbWaitEventType(DB_WAIT_EVENT_TYPE_MAPPING.CPU.toUpperCase());
82203
82368
  }
82204
82369
  }, [anomalyData]);
82205
- return (jsxs(Box$1, { children: [((_b = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _b === void 0 ? void 0 : _b.category) === AnomalyCategory.SQL && (jsx(SqlDrilldown, { metricMeasure: metricMeasure, apiUrl: apiUrl, anomalyData: anomalyData, universeQueryStatsData: universeQueryStatsData, appName: appName, timezone: timezone, urlParams: urlParams, dateTimeRange: dateTimeRange, sqlTab: sqlTab, getClusterDetails: getClusterDetails, onEChartsDateSelect: onEChartsDateSelect })), ((_c = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _c === void 0 ? void 0 : _c.category) === AnomalyCategory.NODE &&
82206
- ((_d = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _d === void 0 ? void 0 : _d.type) !== AnomalyType.SLOW_DISKS && (jsx(NodeDrilldown, { appName: appName, dateTimeRange: dateTimeRange, groupByOperation: groupByOperation, onSetGroupByOperation: onSetGroupByOperation, onFilterBarData: onFilterBarData, onChangeDbWaitEventType: onChangeDbWaitEventType, dbWaitEventType: dbWaitEventType, timezone: timezone, apiUrl: apiUrl, getClusterDetails: getClusterDetails, onOutlierTypeSelected: onOutlierTypeSelected, onNumNodesChanged: onNumNodesChanged, onEChartsDateSelect: onEChartsDateSelect, onNavigateToUrl: onNavigateToUrl })), ((_e = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _e === void 0 ? void 0 : _e.category) === AnomalyCategory.APP && (jsx(NodeDrilldown, { appName: appName, dateTimeRange: dateTimeRange, groupByOperation: groupByOperation, onSetGroupByOperation: onSetGroupByOperation, onFilterBarData: onFilterBarData, onChangeDbWaitEventType: onChangeDbWaitEventType, dbWaitEventType: dbWaitEventType, timezone: timezone, apiUrl: apiUrl, getClusterDetails: getClusterDetails, onOutlierTypeSelected: onOutlierTypeSelected, onNumNodesChanged: onNumNodesChanged, onEChartsDateSelect: onEChartsDateSelect, onSelectedQuery: onSelectedQuery, onNavigateToUrl: onNavigateToUrl })), ((_f = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _f === void 0 ? void 0 : _f.category) === AnomalyCategory.DB &&
82370
+ return (jsxs(Box$1, { children: [((_b = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _b === void 0 ? void 0 : _b.category) === AnomalyCategory.SQL && (jsx(SqlDrilldown, { metricMeasure: metricMeasure, apiUrl: apiUrl, anomalyData: anomalyData, universeQueryStatsData: universeQueryStatsData, appName: appName, timezone: timezone, urlParams: urlParams, dateTimeRange: dateTimeRange, sqlTab: sqlTab, amomalyGraphRequestParams: amomalyGraphRequestParams, formattedAnomalyRca: formattedAnomalyRca, getClusterDetails: getClusterDetails, onEChartsDateSelect: onEChartsDateSelect })), ((_c = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _c === void 0 ? void 0 : _c.category) === AnomalyCategory.NODE &&
82371
+ ((_d = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _d === void 0 ? void 0 : _d.type) !== AnomalyType.SLOW_DISKS && (jsx(NodeDrilldown, { appName: appName, dateTimeRange: dateTimeRange, groupByOperation: groupByOperation, onSetGroupByOperation: onSetGroupByOperation, onFilterBarData: onFilterBarData, onChangeDbWaitEventType: onChangeDbWaitEventType, dbWaitEventType: dbWaitEventType, timezone: timezone, apiUrl: apiUrl, anomalyData: anomalyData, urlParams: urlParams, metricMeasure: metricMeasure, amomalyGraphRequestParams: amomalyGraphRequestParams, formattedAnomalyRca: formattedAnomalyRca, getClusterDetails: getClusterDetails, onOutlierTypeSelected: onOutlierTypeSelected, onNumNodesChanged: onNumNodesChanged, onEChartsDateSelect: onEChartsDateSelect, onNavigateToUrl: onNavigateToUrl })), ((_e = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _e === void 0 ? void 0 : _e.category) === AnomalyCategory.APP && (jsx(NodeDrilldown, { appName: appName, dateTimeRange: dateTimeRange, groupByOperation: groupByOperation, onSetGroupByOperation: onSetGroupByOperation, onFilterBarData: onFilterBarData, onChangeDbWaitEventType: onChangeDbWaitEventType, dbWaitEventType: dbWaitEventType, timezone: timezone, apiUrl: apiUrl, anomalyData: anomalyData, urlParams: urlParams, metricMeasure: metricMeasure, amomalyGraphRequestParams: amomalyGraphRequestParams, formattedAnomalyRca: formattedAnomalyRca, getClusterDetails: getClusterDetails, onOutlierTypeSelected: onOutlierTypeSelected, onNumNodesChanged: onNumNodesChanged, onEChartsDateSelect: onEChartsDateSelect, onSelectedQuery: onSelectedQuery, onNavigateToUrl: onNavigateToUrl })), ((_f = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _f === void 0 ? void 0 : _f.category) === AnomalyCategory.DB &&
82207
82372
  (((_g = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _g === void 0 ? void 0 : _g.type) === AnomalyType.HOT_TABLET ||
82208
- ((_h = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _h === void 0 ? void 0 : _h.type) === AnomalyType.LARGE_TABLET) && (jsx(TabletDrilldown, { appName: appName, getClusterDetails: getClusterDetails, apiUrl: apiUrl, startTime: (_k = (_j = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.startDateTime) === null || _j === void 0 ? void 0 : _j.toISOString()) !== null && _k !== void 0 ? _k : null, endTime: (_m = (_l = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.endDateTime) === null || _l === void 0 ? void 0 : _l.toISOString()) !== null && _m !== void 0 ? _m : null, anomalyData: anomalyData, isHotTablet: ((_o = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _o === void 0 ? void 0 : _o.type) === AnomalyType.HOT_TABLET, tabletTab: tabletTab, onSelectedQuery: onSelectedQuery, onNavigateToUrl: onNavigateToUrl })), ((((_p = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _p === void 0 ? void 0 : _p.category) === AnomalyCategory.DB &&
82209
- ((_q = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _q === void 0 ? void 0 : _q.type) === AnomalyType.RANGE_SHARDING) ||
82210
- (((_r = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _r === void 0 ? void 0 : _r.category) === AnomalyCategory.NODE &&
82211
- ((_s = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _s === void 0 ? void 0 : _s.type) === AnomalyType.SLOW_DISKS)) && (jsx(OtherDrilldown, { metricMeasure: metricMeasure, appName: appName, dateTimeRange: dateTimeRange, timezone: timezone, universeQueryData: universeQueryStatsData, amomalyGraphRequestParams: amomalyGraphRequestParams, apiUrl: apiUrl, anomalyData: anomalyData, gantChartData: gantChartData, onEChartsDateSelect: onEChartsDateSelect, onSelectedIssue: onSelectedIssue, urlParams: urlParams, getClusterDetails: getClusterDetails }))] }));
82212
- };
82213
-
82214
- var img$9 = "data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.04222 3.39755C8.5722 2.86774 9.43119 2.86788 9.96117 3.39755L10.6409 4.07724C10.8483 4.28467 10.9651 4.56608 10.9651 4.85947C10.965 5.09301 10.8918 5.32043 10.7551 5.50888L10.6682 5.6124C10.6215 5.66128 10.6106 5.68877 10.6106 5.71689C10.6107 5.74468 10.6213 5.77136 10.6409 5.79111L14.2473 9.39755C14.3143 9.46457 14.4055 9.50202 14.5002 9.50204H17.219C17.5787 9.50222 17.9236 9.64524 18.178 9.89951L18.6067 10.3282C19.1365 10.8582 19.1364 11.7172 18.6067 12.2472L15.7092 15.1451L20.8533 20.2892L20.9112 20.3585C21.0462 20.5533 21.0269 20.8227 20.8533 20.9963C20.658 21.1916 20.3415 21.1916 20.1462 20.9963L15.0021 15.8522L12.1047 18.7501C11.5748 19.2798 10.7158 19.2795 10.1858 18.7501L9.75707 18.3214C9.50259 18.067 9.35968 17.7213 9.35961 17.3614V14.6436C9.35959 14.5491 9.3211 14.4587 9.25414 14.3917L5.64867 10.7852C5.62848 10.765 5.60147 10.7541 5.57347 10.754C5.55115 10.754 5.52901 10.7605 5.51097 10.7735L5.46898 10.8116C5.29093 10.9919 5.00934 11.1085 4.71605 11.1085C4.42276 11.1084 4.14119 10.9917 3.93383 10.7843L3.25414 10.1046C2.72453 9.57462 2.72459 8.71556 3.25414 8.18564L8.04222 3.39755ZM14.6385 14.8018L11.3977 18.0431C11.2584 18.1823 11.0322 18.182 10.8928 18.0431L10.4641 17.6143C10.3971 17.5474 10.3596 17.456 10.3596 17.3614V14.6436C10.3595 14.2837 10.2156 13.9381 9.96117 13.6837L6.3557 10.0782C6.14858 9.87077 5.8676 9.75437 5.57445 9.754C5.34083 9.75376 5.11349 9.82744 4.89379 9.98837L4.79125 10.0772C4.77137 10.0971 4.74416 10.1085 4.71605 10.1085C4.68803 10.1084 4.66072 10.0971 4.64086 10.0772L3.96117 9.39755C3.82206 9.25815 3.82213 9.03202 3.96117 8.89267L8.74925 4.10458C8.88866 3.96522 9.11471 3.9654 9.25414 4.10458L9.93382 4.78427C9.95371 4.80415 9.96507 4.83135 9.96507 4.85947C9.96507 4.86628 9.96446 4.87306 9.96395 4.87881C9.96278 4.89191 9.96209 4.89972 9.96996 4.89072L9.93382 4.93466C9.72659 5.14205 9.61058 5.42369 9.61058 5.71689C9.61069 6.00993 9.72675 6.29091 9.93382 6.49814L13.5403 10.1046C13.7947 10.3591 14.1403 10.502 14.5002 10.502H17.219C17.3134 10.5022 17.4041 10.5398 17.4709 10.6065L17.8996 11.0352C18.039 11.1747 18.0389 11.4007 17.8996 11.5401L14.6587 14.7815C14.6553 14.7848 14.6519 14.7881 14.6485 14.7915C14.6451 14.7949 14.6417 14.7983 14.6385 14.8018Z' fill='%234E5F6D'/%3e%3c/svg%3e";
82215
- var PinIcon = img$9;
82216
-
82217
- var img$8 = "data:image/svg+xml,%3csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.85355 5.85355C9.67999 6.02712 9.41056 6.0464 9.21569 5.91141L9.14645 5.85355L5.3535 2.06061C5.17994 1.8871 4.91059 1.86783 4.71578 2.00273L4.64655 2.06055L0.853554 5.85355C0.658292 6.04881 0.341708 6.04881 0.146446 5.85355C-0.0271206 5.67999 -0.0464048 5.41056 0.0885916 5.21569L0.146446 5.14645L3.9395 1.35339C4.48864 0.804418 5.35748 0.770107 5.94663 1.2505L6.06055 1.35345L9.85355 5.14645C10.0488 5.34171 10.0488 5.65829 9.85355 5.85355Z' fill='%236D7C88'/%3e%3c/svg%3e";
82218
- var DownArrowIcon = img$8;
82219
-
82220
- var img$7 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3e %3cg fill='none' fill-rule='evenodd'%3e %3cpolygon points='0 0 24 0 24 24 0 24'/%3e %3cpath fill='currentColor' d='M12.1740578%2c5.12506556 C15.4820453%2c5.18375443 18.1495789%2c7.85128805 18.2082961%2c11.1610977 C18.2387133%2c13.436696 16.9612465%2c15.5280468 14.9227532%2c16.5398856 L15.083%2c16.456 L15.0833333%2c18.0416667 C15.0833333%2c18.9136952 14.4136208%2c19.629304 13.560473%2c19.7022157 L13.4166667%2c19.7083333 L12.583%2c19.708 L12.5833333%2c21.1666667 C12.5833333%2c21.3967853 12.3967853%2c21.5833333 12.1666667%2c21.5833333 C11.9621168%2c21.5833333 11.791993%2c21.4359374 11.7567131%2c21.241563 L11.75%2c21.1666667 L11.75%2c19.708 L10.9166667%2c19.7083333 C10.0446381%2c19.7083333 9.32902931%2c19.0386208 9.25611766%2c18.185473 L9.25%2c18.0416667 L9.24975408%2c16.4569822 C7.30629027%2c15.4174 6.09677609%2c13.3784975 6.12506133%2c11.1628514 C6.18184747%2c7.85346767 8.84992176%2c5.1838123 12.1592713%2c5.12506556 L12.1592713%2c5.12506556 Z M14.25%2c16.583 L10.083%2c16.583 L10.0833333%2c18.0416667 C10.0833333%2c18.4665011 10.4012377%2c18.817085 10.8121351%2c18.8685072 L10.9166667%2c18.875 L13.4166667%2c18.875 C13.8415011%2c18.875 14.192085%2c18.5570957 14.2435072%2c18.1461982 L14.25%2c18.0416667 L14.25%2c16.583 Z M12.166%2c5.95766667 L11.9494155%2c5.9669341 C9.19374361%2c6.13087928 7.00606527%2c8.39184555 6.95829939%2c11.1753181 C6.93335801%2c13.1293036 8.03072034%2c14.9246063 9.7810898%2c15.7934494 L9.705%2c15.753 L9.707%2c15.753 L9.699%2c15.7496667 L11.75%2c15.749 L11.75%2c13.214 L9.99703884%2c11.4612945 C9.83432039%2c11.298576 9.83432039%2c11.0347573 9.99703884%2c10.8720388 C10.1394175%2c10.7296602 10.359201%2c10.7118629 10.5209309%2c10.8186468 L10.5862945%2c10.8720388 L12.167%2c12.4526667 L13.7470388%2c10.8720388 C13.9097573%2c10.7093204 14.173576%2c10.7093204 14.3362945%2c10.8720388 C14.4786731%2c11.0144175 14.4964705%2c11.234201 14.3896865%2c11.3959309 L14.3362945%2c11.4612945 L12.583%2c13.214 L12.583%2c15.749 L14.634%2c15.7496667 L14.7592441%2c15.6847261 C16.321701%2c14.8178192 17.3148422%2c13.192006 17.3728347%2c11.4076497 L17.3728347%2c11.4076497 L17.3750656%2c11.1740578 C17.3243367%2c8.3147327 15.0186006%2c6.00899667 12.166%2c5.95766667 L12.166%2c5.95766667 Z M4.66666667%2c10.75 C4.89678531%2c10.75 5.08333333%2c10.936548 5.08333333%2c11.1666667 C5.08333333%2c11.3712166 4.93593737%2c11.5413403 4.74156303%2c11.5766203 L4.66666667%2c11.5833333 L3.41666667%2c11.5833333 C3.18654802%2c11.5833333 3%2c11.3967853 3%2c11.1666667 C3%2c10.9621168 3.14739597%2c10.791993 3.34177031%2c10.7567131 L3.41666667%2c10.75 L4.66666667%2c10.75 Z M20.9166667%2c10.75 C21.1467853%2c10.75 21.3333333%2c10.936548 21.3333333%2c11.1666667 C21.3333333%2c11.3712166 21.1859374%2c11.5413403 20.991563%2c11.5766203 L20.9166667%2c11.5833333 L19.6666667%2c11.5833333 C19.436548%2c11.5833333 19.25%2c11.3967853 19.25%2c11.1666667 C19.25%2c10.9621168 19.397396%2c10.791993 19.5917703%2c10.7567131 L19.6666667%2c10.75 L20.9166667%2c10.75 Z M5.51394895%2c4.56414648 L5.5803637%2c4.6162251 L6.49703037%2c5.49705843 C6.66295966%2c5.6565014 6.66821787%2c5.92026774 6.5087749%2c6.08619703 C6.3692623%2c6.23138517 6.14987713%2c6.2535595 5.98605105%2c6.15002018 L5.9196363%2c6.09794157 L5.00296963%2c5.21710823 C4.83704034%2c5.05766526 4.83178213%2c4.79389893 4.9912251%2c4.62796963 C5.1307377%2c4.4827815 5.35012287%2c4.46060717 5.51394895%2c4.56414648 Z M19.3421082%2c4.62796963 C19.4816208%2c4.77315777 19.4950341%2c4.99325238 19.3850479%2c5.15282181 L19.3303637%2c5.21710823 L18.413697%2c6.09794157 C18.2477677%2c6.25738453 17.9840014%2c6.25212633 17.8245584%2c6.08619703 C17.6850458%2c5.9410089 17.6716326%2c5.72091428 17.7816188%2c5.56134486 L17.836303%2c5.49705843 L18.7529696%2c4.6162251 C18.9188989%2c4.45678213 19.1826653%2c4.46204034 19.3421082%2c4.62796963 Z M12.1666667%2c2 C12.3712166%2c2 12.5413403%2c2.14739597 12.5766203%2c2.34177031 L12.5833333%2c2.41666667 L12.5833333%2c3.66666667 C12.5833333%2c3.89678531 12.3967853%2c4.08333333 12.1666667%2c4.08333333 C11.9621168%2c4.08333333 11.791993%2c3.93593737 11.7567131%2c3.74156303 L11.75%2c3.66666667 L11.75%2c2.41666667 C11.75%2c2.18654802 11.936548%2c2 12.1666667%2c2 Z'/%3e %3c/g%3e%3c/svg%3e";
82221
- var LightBulbIcon = img$7;
82222
-
82223
- var img$6 = "data:image/svg+xml,%3csvg width='12' height='7' viewBox='0 0 12 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M11.2925 0.825396L6.75926 6.1142C6.36016 6.57981 5.63984 6.57981 5.24074 6.1142L0.707482 0.825396C0.42948 0.501059 0.659934 0 1.08711 0L10.9129 0C11.3401 0 11.5705 0.501059 11.2925 0.825396Z' fill='black'/%3e%3c/svg%3e";
82224
- var ArrowDownwardIcon = img$6;
82225
-
82226
- var img$5 = "data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle opacity='0.5' cx='12' cy='12' r='10.1' stroke='url(%23paint0_linear_3694_1224)' stroke-opacity='0.8' stroke-width='1.8'/%3e%3ccircle cx='12' cy='12.0002' r='1.81818' fill='%23ED36C7'/%3e%3ccircle cx='11.9995' cy='12.0003' r='5.36364' transform='rotate(-60 11.9995 12.0003)' stroke='url(%23paint1_linear_3694_1224)' stroke-width='2'/%3e%3cdefs%3e%3clinearGradient id='paint0_linear_3694_1224' x1='28.5' y1='7.50001' x2='22.2274' y2='27.7706' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0.0416667' stop-color='%23ED35EC'/%3e%3cstop offset='0.387036' stop-color='%23ED35C5'/%3e%3cstop offset='0.757473' stop-color='%237879F1'/%3e%3cstop offset='1' stop-color='%235E60F0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear_3694_1224' x1='17.9974' y1='23.3442' x2='5.01117' y2='22.7595' gradientUnits='userSpaceOnUse'%3e%3cstop offset='0.0416667' stop-color='%23ED35EC'/%3e%3cstop offset='0.387036' stop-color='%23ED35C5'/%3e%3cstop offset='0.757473' stop-color='%237879F1'/%3e%3cstop offset='1' stop-color='%235E60F0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e";
82227
- var InsightIndicatorIcon = img$5;
82228
-
82229
- var useStyles$c = makeStyles$1(function (theme) { return ({
82230
- accordion: {
82231
- borderRadius: theme.spacing(1),
82232
- marginBottom: theme.spacing(3),
82233
- backgroundColor: theme.palette.common.white,
82234
- border: "1px solid #CBCCFB",
82235
- boxShadow: 'none',
82236
- '&:before': {
82237
- display: 'none'
82238
- },
82239
- '&:not(.Mui-expanded)': {
82240
- boxShadow: '0px 4px 8px 0px #4F4FA414'
82241
- },
82242
- '&.Mui-expanded': {
82243
- margin: theme.spacing(3, 0, 3, 0)
82244
- }
82245
- },
82246
- accordionSummary: {
82247
- padding: theme.spacing(2),
82248
- height: '64px',
82249
- '& .MuiAccordionSummary-content': {
82250
- margin: 0,
82251
- alignItems: 'center',
82252
- '&.Mui-expanded': {
82253
- margin: 0
82254
- }
82255
- }
82256
- },
82257
- headerTitleContainer: {
82258
- display: 'flex',
82259
- alignItems: 'center',
82260
- flexDirection: 'row',
82261
- gap: theme.spacing(1)
82262
- },
82263
- headerTitle: {
82264
- fontWeight: 600,
82265
- fontSize: '15px',
82266
- lineHeight: '20px'
82267
- },
82268
- accordionDetails: {
82269
- display: 'flex',
82270
- flexDirection: 'column',
82271
- padding: theme.spacing(0, 2, 2, 2)
82272
- },
82273
- expandIcon: {
82274
- padding: theme.spacing(0, 0.8)
82275
- },
82276
- itemContainer: {
82277
- display: 'flex',
82278
- flexDirection: 'row',
82279
- gap: theme.spacing(1),
82280
- margin: theme.spacing(2.2, 1, 2.2, 1)
82281
- },
82282
- possibleCauseContainer: {
82283
- marginBottom: theme.spacing(2)
82284
- },
82285
- treeIconContainer: {
82286
- display: 'flex',
82287
- width: '20px',
82288
- height: '20px'
82289
- },
82290
- itemContentContainer: {
82291
- flex: 1,
82292
- minWidth: 0,
82293
- display: 'flex',
82294
- flexDirection: 'column',
82295
- gap: theme.spacing(1)
82296
- },
82297
- itemTitle: {
82298
- fontWeight: 600,
82299
- fontSize: '13px',
82300
- lineHeight: '16px'
82301
- },
82302
- itemDescriptionContainer: {
82303
- width: '100%',
82304
- display: 'flex',
82305
- flexDirection: 'column',
82306
- gap: theme.spacing(1)
82307
- },
82308
- itemDescription: {
82309
- fontWeight: 400,
82310
- fontSize: '13px',
82311
- lineHeight: '20px',
82312
- color: theme.palette.grey[700]
82313
- },
82314
- itemTabsContainer: {
82315
- width: '100%',
82316
- display: 'flex',
82317
- flexDirection: 'column'
82318
- },
82319
- itemTabsHeaderContainer: {
82320
- display: 'flex',
82321
- flexDirection: 'row'
82322
- },
82323
- tabListContainer: {
82324
- width: '100%',
82325
- display: 'flex',
82326
- gap: theme.spacing(4),
82327
- flexDirection: 'column',
82328
- padding: theme.spacing(2),
82329
- backgroundColor: '#FBFCFD',
82330
- borderRadius: theme.spacing(1),
82331
- border: "1px solid ".concat(theme.palette.grey[200])
82332
- },
82333
- tabListItem: {
82334
- display: 'flex',
82335
- flexDirection: 'row',
82336
- gap: theme.spacing(1)
82337
- },
82338
- tabListItemIconContainer: {
82339
- display: 'flex',
82340
- width: '20px',
82341
- height: '20px',
82342
- flexShrink: 0,
82343
- '& img': {
82344
- color: theme.palette.grey[700]
82345
- }
82346
- },
82347
- tabListItemContentContainer: {
82348
- flex: 1,
82349
- display: 'flex',
82350
- flexDirection: 'column',
82351
- gap: theme.spacing(0.5)
82352
- },
82353
- tabListItemTitle: {
82354
- fontWeight: 600,
82355
- fontSize: '13px',
82356
- lineHeight: '16px',
82357
- color: theme.palette.grey[800]
82358
- },
82359
- tabListItemDesc: {
82360
- fontWeight: 400,
82361
- fontSize: '13px',
82362
- lineHeight: '20px',
82363
- color: theme.palette.grey[700]
82364
- },
82365
- itemTabsContentContainer: {
82366
- flex: 1,
82367
- display: 'flex',
82368
- flexDirection: 'column'
82369
- },
82370
- itemFooterContainer: {
82371
- display: 'flex',
82372
- alignItems: 'center',
82373
- justifyContent: 'flex-end',
82374
- paddingRight: theme.spacing(1)
82375
- },
82376
- collapseSectionButton: {
82377
- '& .yb-MuiButton-endIcon': {
82378
- marginLeft: theme.spacing(1.2),
82379
- color: theme.palette.primary[600]
82380
- }
82381
- },
82382
- chip: {
82383
- alignItems: 'center',
82384
- whiteSpace: 'nowrap',
82385
- display: 'inline-flex',
82386
- padding: theme.spacing(0.5, 0.75),
82387
- borderRadius: theme.spacing(0.75),
82388
- border: "1px solid ".concat(theme.palette.grey[300])
82389
- },
82390
- chipText: {
82391
- fontWeight: 400,
82392
- lineHeight: '16px',
82393
- fontSize: '11.5px'
82394
- },
82395
- headerChipsContainer: {
82396
- display: 'flex',
82397
- alignItems: 'center',
82398
- flexDirection: 'row',
82399
- gap: theme.spacing(1),
82400
- marginLeft: theme.spacing(2)
82401
- }
82402
- }); });
82403
- var Chip = function (_a) {
82404
- var label = _a.label;
82405
- var classes = useStyles$c();
82406
- return (jsx(Box$1, { className: classes.chip, children: jsx(Typography$1, { variant: "body2", className: classes.chipText, children: label }) }));
82407
- };
82408
- var AnomalyPossibleCause = function (_a) {
82409
- var _b, _c, _d, _e, _f, _g;
82410
- var anomalyGroupData = _a.anomalyGroupData, _h = _a.accordianExpanded, accordianExpanded = _h === void 0 ? false : _h;
82411
- var classes = useStyles$c();
82412
- var _j = useState(accordianExpanded), isAccordionExpanded = _j[0], setIsAccordionExpanded = _j[1];
82413
- var _k = useState(0), selectedTabIndex = _k[0], setSelectedTabIndex = _k[1];
82414
- var handleAccordionChange = function (_event, expanded) {
82415
- setIsAccordionExpanded(expanded);
82416
- };
82417
- var handleTabChange = function (_event, newValue) {
82418
- setSelectedTabIndex(newValue);
82419
- };
82420
- var data = getAnomalyPossibleCauseData(anomalyGroupData);
82421
- var selectedPossibleCause = (_b = data === null || data === void 0 ? void 0 : data.possibleCauses) === null || _b === void 0 ? void 0 : _b[selectedTabIndex];
82422
- var handleCollapseSection = function () {
82423
- setIsAccordionExpanded(!isAccordionExpanded);
82424
- };
82425
- // Show max 3 chips, then show "+X" for remaining
82426
- var MAX_CHIPS = 3;
82427
- var possibleCauses = (data === null || data === void 0 ? void 0 : data.possibleCauses) || [];
82428
- var visibleChips = possibleCauses.slice(0, MAX_CHIPS);
82429
- var remainingCount = Math.max(0, possibleCauses.length - MAX_CHIPS);
82430
- return (jsxs(Accordion, { className: classes.accordion, expanded: isAccordionExpanded, onChange: handleAccordionChange, children: [jsx(AccordionSummary, { className: classes.accordionSummary, expandIcon: jsx("img", { src: ArrowDownwardIcon, className: classes.expandIcon, alt: isAccordionExpanded ? 'Collapse' : 'Expand' }), children: jsxs(Box$1, { className: classes.headerTitleContainer, children: [jsx("img", { src: InsightIndicatorIcon, alt: "Insight Indicator" }), jsx(Typography$1, { variant: "body2", className: classes.headerTitle, children: "Anomaly Possible Cause" }), !isAccordionExpanded && (possibleCauses === null || possibleCauses === void 0 ? void 0 : possibleCauses.length) > 0 && (jsxs(Box$1, { className: classes.headerChipsContainer, children: [visibleChips === null || visibleChips === void 0 ? void 0 : visibleChips.map(function (possibleCause, index) { return (jsx(Chip, { label: possibleCause === null || possibleCause === void 0 ? void 0 : possibleCause.possibleCause }, index)); }), remainingCount > 0 && jsx(Chip, { label: "+".concat(remainingCount) })] }))] }) }), jsxs(AccordionDetails, { className: classes.accordionDetails, children: [jsxs(Box$1, { className: classes.itemContainer, children: [jsx(Box$1, { className: classes.treeIconContainer, children: jsx("img", { src: TreeIcon, alt: "Tree Icon" }) }), jsxs(Box$1, { className: classes.itemContentContainer, children: [jsx(Typography$1, { variant: "body2", className: classes.itemTitle, children: "Observation" }), jsx(Box$1, { className: classes.itemDescriptionContainer, children: jsx(Typography$1, { variant: "body2", className: classes.itemDescription, children: data === null || data === void 0 ? void 0 : data.observation }) })] })] }), jsxs(Box$1, { className: clsx(classes.itemContainer, classes.possibleCauseContainer), children: [jsx(Box$1, { className: classes.treeIconContainer, children: jsx("img", { src: TreeIcon, alt: "Tree Icon" }) }), jsxs(Box$1, { className: classes.itemContentContainer, children: [jsx(Typography$1, { variant: "body2", className: classes.itemTitle, children: "Possible Cause" }), jsx(Box$1, { className: classes.itemDescriptionContainer, children: !!(data === null || data === void 0 ? void 0 : data.possibleCauses) && ((_c = data === null || data === void 0 ? void 0 : data.possibleCauses) === null || _c === void 0 ? void 0 : _c.length) > 0 && (jsxs(Box$1, { className: classes.itemTabsContainer, children: [jsx(Box$1, { className: classes.itemTabsHeaderContainer, children: jsx(YBTabs, { pill: true, value: selectedTabIndex, onChange: handleTabChange, children: (_d = data === null || data === void 0 ? void 0 : data.possibleCauses) === null || _d === void 0 ? void 0 : _d.map(function (possibleCause, tabIndex) { return (jsx(YBTab, { value: tabIndex, label: possibleCause === null || possibleCause === void 0 ? void 0 : possibleCause.possibleCause }, tabIndex)); }) }) }), jsx(Box$1, { className: classes.itemTabsContentContainer, children: !!selectedPossibleCause && (jsxs(Box$1, { className: classes.tabListContainer, children: [!!(selectedPossibleCause === null || selectedPossibleCause === void 0 ? void 0 : selectedPossibleCause.possibleCauseDescription) && (jsxs(Box$1, { className: classes.tabListItem, children: [jsx(Box$1, { className: classes.tabListItemIconContainer, children: jsx("img", { src: PinIcon, alt: "description icon" }) }), jsxs(Box$1, { className: classes.tabListItemContentContainer, children: [jsx(Typography$1, { variant: "body2", className: classes.tabListItemTitle, children: "Description" }), jsx(Typography$1, { variant: "body2", className: classes.tabListItemDesc, children: selectedPossibleCause === null || selectedPossibleCause === void 0 ? void 0 : selectedPossibleCause.possibleCauseDescription })] })] })), !!(selectedPossibleCause === null || selectedPossibleCause === void 0 ? void 0 : selectedPossibleCause.troubleshootingRecommendations) &&
82431
- ((_e = selectedPossibleCause === null || selectedPossibleCause === void 0 ? void 0 : selectedPossibleCause.troubleshootingRecommendations) === null || _e === void 0 ? void 0 : _e.length) > 0 &&
82432
- ((_f = selectedPossibleCause === null || selectedPossibleCause === void 0 ? void 0 : selectedPossibleCause.troubleshootingRecommendations) === null || _f === void 0 ? void 0 : _f[0]) && (jsxs(Box$1, { className: classes.tabListItem, children: [jsx(Box$1, { className: classes.tabListItemIconContainer, children: jsx("img", { src: LightBulbIcon, alt: "recommendation icon" }) }), jsxs(Box$1, { className: classes.tabListItemContentContainer, children: [jsx(Typography$1, { variant: "body2", className: classes.tabListItemTitle, children: "Recommendation" }), jsx(Typography$1, { variant: "body2", className: classes.tabListItemDesc, children: (_g = selectedPossibleCause === null || selectedPossibleCause === void 0 ? void 0 : selectedPossibleCause.troubleshootingRecommendations) === null || _g === void 0 ? void 0 : _g[0] })] })] }))] })) })] })) })] })] }), jsx(Box$1, { className: classes.itemFooterContainer, children: jsx(YBButton, { size: "medium", variant: "ghost", onClick: handleCollapseSection, className: classes.collapseSectionButton, dataTestId: "AnomalyPossibleCause-CollapseSectionButton", endIcon: jsx("img", { src: DownArrowIcon, alt: "Collapse Icon" }), children: "Collapse Section" }) })] })] }));
82373
+ ((_h = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _h === void 0 ? void 0 : _h.type) === AnomalyType.LARGE_TABLET) && (jsx(TabletDrilldown, { appName: appName, metricMeasure: metricMeasure, getClusterDetails: getClusterDetails, apiUrl: apiUrl, dateTimeRange: dateTimeRange, timezone: timezone, amomalyGraphRequestParams: amomalyGraphRequestParams, formattedAnomalyRca: formattedAnomalyRca, startTime: (_k = (_j = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.startDateTime) === null || _j === void 0 ? void 0 : _j.toISOString()) !== null && _k !== void 0 ? _k : null, endTime: (_m = (_l = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.endDateTime) === null || _l === void 0 ? void 0 : _l.toISOString()) !== null && _m !== void 0 ? _m : null, anomalyData: anomalyData, isHotTablet: ((_o = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _o === void 0 ? void 0 : _o.type) === AnomalyType.HOT_TABLET, tabletTab: tabletTab, urlParams: urlParams, onEChartsDateSelect: onEChartsDateSelect, onSelectedQuery: onSelectedQuery, onNavigateToUrl: onNavigateToUrl })), ((((_p = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _p === void 0 ? void 0 : _p.category) === AnomalyCategory.DB &&
82374
+ (((_q = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _q === void 0 ? void 0 : _q.type) === AnomalyType.UNUSED_INDEX ||
82375
+ ((_r = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _r === void 0 ? void 0 : _r.type) === AnomalyType.REDUNDANT_INDEX ||
82376
+ ((_s = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _s === void 0 ? void 0 : _s.type) === AnomalyType.RANGE_SHARDING)) ||
82377
+ (((_t = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _t === void 0 ? void 0 : _t.category) === AnomalyCategory.NODE &&
82378
+ ((_u = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _u === void 0 ? void 0 : _u.type) === AnomalyType.SLOW_DISKS)) && (jsx(OtherDrilldown, { metricMeasure: metricMeasure, appName: appName, dateTimeRange: dateTimeRange, timezone: timezone, universeQueryData: universeQueryStatsData, amomalyGraphRequestParams: amomalyGraphRequestParams, formattedAnomalyRca: formattedAnomalyRca, apiUrl: apiUrl, anomalyData: anomalyData, gantChartData: gantChartData, onEChartsDateSelect: onEChartsDateSelect, onSelectedIssue: onSelectedIssue, urlParams: urlParams, getClusterDetails: getClusterDetails }))] }));
82433
82379
  };
82434
82380
 
82435
82381
  var YBStyledTab$1 = styled$1(YBTab)(function (_a) {
@@ -82445,7 +82391,7 @@ var YBStyledTab$1 = styled$1(YBTab)(function (_a) {
82445
82391
  });
82446
82392
  });
82447
82393
  var ProcessGraphData = React__default.memo(function (_a) {
82448
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
82394
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
82449
82395
  var universeUuid = _a.universeUuid, universeData = _a.universeData, anomalyData = _a.anomalyData, amomalyGraphRequestParams = _a.amomalyGraphRequestParams, appName = _a.appName, timezone = _a.timezone, formattedAnomalyRca = _a.formattedAnomalyRca, apiUrl = _a.apiUrl, dbIdParam = _a.dbIdParam, isHistoricalQueryView = _a.isHistoricalQueryView, troubleshootUuid = _a.troubleshootUuid, queryIdParam = _a.queryIdParam, showStandaloneAnomalies = _a.showStandaloneAnomalies, onSelectedIssue = _a.onSelectedIssue, onSelectedQuery = _a.onSelectedQuery, onNavigateToUrl = _a.onNavigateToUrl;
82450
82396
  var helperClasses = useHelperStyles();
82451
82397
  // Get default values to be populated on page
@@ -82476,25 +82422,25 @@ var ProcessGraphData = React__default.memo(function (_a) {
82476
82422
  previousDate.setDate(previousDate.getDate() - 1);
82477
82423
  }
82478
82424
  // State variables
82479
- var _p = useState(true), showDetails = _p[0], setShowDetails = _p[1];
82480
- var _q = useState(ALL_REGIONS), clusterRegionItem = _q[0], setClusterRegionItem = _q[1];
82481
- var _r = useState(ALL_ZONES$1), zoneNodeItem = _r[0], setZoneNodeItem = _r[1];
82482
- var _s = useState(true), isPrimaryCluster = _s[0], setIsPrimaryCluster = _s[1];
82483
- var _t = useState(ALL), cluster = _t[0], setCluster = _t[1];
82484
- var _u = useState(ALL), region = _u[0], setRegion = _u[1];
82485
- var _v = useState(ALL), zone = _v[0], setZone = _v[1];
82486
- var _w = useState(ALL), node = _w[0], setNode = _w[1];
82487
- var _x = useState(anomalyMetricMeasure), metricMeasure = _x[0], setMetricMeasure = _x[1];
82488
- var _y = useState(anomalyOutlierType), outlierType = _y[0], setOutlierType = _y[1];
82489
- var _z = useState(TabletTabs.TABLET_OVERVIEW), tabletTab = _z[0], setTabletTab = _z[1];
82490
- var _0 = useState(SqlTabs.QUERY_OVERVIEW), sqlTab = _0[0], setSqlTab = _0[1];
82425
+ var _m = useState(true), showDetails = _m[0], setShowDetails = _m[1];
82426
+ var _o = useState(ALL_REGIONS), clusterRegionItem = _o[0], setClusterRegionItem = _o[1];
82427
+ var _p = useState(ALL_ZONES$1), zoneNodeItem = _p[0], setZoneNodeItem = _p[1];
82428
+ var _q = useState(true), isPrimaryCluster = _q[0], setIsPrimaryCluster = _q[1];
82429
+ var _r = useState(ALL), cluster = _r[0], setCluster = _r[1];
82430
+ var _s = useState(ALL), region = _s[0], setRegion = _s[1];
82431
+ var _t = useState(ALL), zone = _t[0], setZone = _t[1];
82432
+ var _u = useState(ALL), node = _u[0], setNode = _u[1];
82433
+ var _v = useState(anomalyMetricMeasure), metricMeasure = _v[0], setMetricMeasure = _v[1];
82434
+ var _w = useState(anomalyOutlierType), outlierType = _w[0], setOutlierType = _w[1];
82435
+ var _x = useState(TabletTabs.TABLET_OVERVIEW), tabletTab = _x[0], setTabletTab = _x[1];
82436
+ var _y = useState(SqlTabs.QUERY_OVERVIEW), sqlTab = _y[0], setSqlTab = _y[1];
82491
82437
  // If its Anomaly view, then set the default filter duration to custom as anomaly has graphStartTime and graphEndTime
82492
82438
  // If its not Anomaly view, then set the value passed in query parameter, if thats empty then set default filter duration to 1 day
82493
- var _1 = useState((_b = urlParams === null || urlParams === void 0 ? void 0 : urlParams.duration) !== null && _b !== void 0 ? _b : ANOMALY_FILTER_DURATION_OPTIONS[0].value), filterDuration = _1[0], setFilterDuration = _1[1];
82494
- var _2 = useState(anomalyOutlierNumNodes), numNodes = _2[0], setNumNodes = _2[1];
82495
- var _3 = useState(null), universeQueryStatsData = _3[0], setUniverseQueryStatsData = _3[1];
82496
- var _4 = useState(function () { return initializeDateTimeRange(filterDuration, today, previousDate); }), dateTimeRange = _4[0], setDateTimeRange = _4[1];
82497
- var _5 = useState(null), anomalyGroupData = _5[0], setAnomalyGroupData = _5[1];
82439
+ var _z = useState((_b = urlParams === null || urlParams === void 0 ? void 0 : urlParams.duration) !== null && _b !== void 0 ? _b : ANOMALY_FILTER_DURATION_OPTIONS[0].value), filterDuration = _z[0], setFilterDuration = _z[1];
82440
+ var _0 = useState(anomalyOutlierNumNodes), numNodes = _0[0], setNumNodes = _0[1];
82441
+ var _1 = useState(null), universeQueryStatsData = _1[0], setUniverseQueryStatsData = _1[1];
82442
+ var _2 = useState(function () { return initializeDateTimeRange(filterDuration, today, previousDate); }), dateTimeRange = _2[0], setDateTimeRange = _2[1];
82443
+ var _3 = useState(null), anomalyGroupData = _3[0], setAnomalyGroupData = _3[1];
82498
82444
  var gantChartData = useQuery([
82499
82445
  QUERY_KEY.fetchAnomalyGroupsById,
82500
82446
  universeUuid,
@@ -82535,8 +82481,6 @@ var ProcessGraphData = React__default.memo(function (_a) {
82535
82481
  formattedEndDate: formattedEndDate
82536
82482
  };
82537
82483
  };
82538
- var isIndexAnomaly = ((_c = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _c === void 0 ? void 0 : _c.type) === AnomalyType.UNUSED_INDEX ||
82539
- ((_d = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _d === void 0 ? void 0 : _d.type) === AnomalyType.REDUNDANT_INDEX;
82540
82484
  var setDuration = function () {
82541
82485
  if (filterDuration !== TIME_FILTER_VALUES.CUSTOM) {
82542
82486
  var _a = getDateRange(filterDuration, today), formattedStartDate = _a.formattedStartDate, formattedEndDate = _a.formattedEndDate;
@@ -82636,7 +82580,7 @@ var ProcessGraphData = React__default.memo(function (_a) {
82636
82580
  }
82637
82581
  setTabletTab(newSubTab);
82638
82582
  };
82639
- var _6 = useQuery([QUERY_KEY.fetchQueryStats, universeUuid], function () {
82583
+ var _4 = useQuery([QUERY_KEY.fetchQueryStats, universeUuid], function () {
82640
82584
  return PerfAdvisorAPI.fetchQueryStats(universeUuid, {
82641
82585
  // If we are navigating to queries drilldown via queries view, we will retireve DBID from URL
82642
82586
  // else if we are navigating via anomaly SQL view, we will retrieve it from anomalyData
@@ -82654,7 +82598,7 @@ var ProcessGraphData = React__default.memo(function (_a) {
82654
82598
  console.error('Failed to fetch query stats', error);
82655
82599
  },
82656
82600
  enabled: isHistoricalQueryView || (anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.category) === AnomalyCategory.SQL
82657
- }), universeQueryStatsLoading = _6.isLoading, universeQueryStatsError = _6.isError;
82601
+ }), universeQueryStatsLoading = _4.isLoading, universeQueryStatsError = _4.isError;
82658
82602
  if (universeQueryStatsLoading) {
82659
82603
  return (jsx(Box$1, { mt: 2, className: helperClasses.loadingBox, children: jsx(SvgLoading, { className: clsx(helperClasses.icon, helperClasses.inProgressIcon) }) }));
82660
82604
  }
@@ -82672,18 +82616,17 @@ var ProcessGraphData = React__default.memo(function (_a) {
82672
82616
  });
82673
82617
  return (jsxs(Box$1, { style: { height: '100vh', display: 'flex', flexDirection: 'column' }, children: [jsx(BreadCrumbsHeader, { appName: appName, queryObject: queryObject,
82674
82618
  // Refers to query view from Overall load queries not overall load ->anomalies -> sql ->query
82675
- isHistoricalQueryView: isHistoricalQueryView, showStandaloneAnomalies: showStandaloneAnomalies, anomalyData: isNonEmptyObject(anomalyGroupData) ? anomalyGroupData : null, onSelectedIssue: isNonEmptyObject(anomalyData) ? onSelectedIssue : undefined, onSelectedQuery: onSelectedQuery, showDetails: showDetails, onShowDetails: onShowDetails, onNavigateToUrl: onNavigateToUrl }), (((_e = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _e === void 0 ? void 0 : _e.category) === AnomalyCategory.SQL ||
82676
- isHistoricalQueryView) && (jsx(YBTabs, { value: sqlTab, onChange: handleSqlTabChange, className: helperClasses.tabsContainer, children: jsx(YBStyledTab$1, { value: SqlTabs.QUERY_OVERVIEW, label: SqlTabs.QUERY_OVERVIEW }) })), ((_f = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _f === void 0 ? void 0 : _f.category) === AnomalyCategory.DB &&
82619
+ isHistoricalQueryView: isHistoricalQueryView, showStandaloneAnomalies: showStandaloneAnomalies, anomalyData: isNonEmptyObject(anomalyGroupData) ? anomalyGroupData : null, onSelectedIssue: isNonEmptyObject(anomalyData) ? onSelectedIssue : undefined, onSelectedQuery: onSelectedQuery, showDetails: showDetails, onShowDetails: onShowDetails, onNavigateToUrl: onNavigateToUrl }), (((_c = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _c === void 0 ? void 0 : _c.category) === AnomalyCategory.SQL ||
82620
+ isHistoricalQueryView) && (jsx(YBTabs, { value: sqlTab, onChange: handleSqlTabChange, children: jsx(YBStyledTab$1, { value: SqlTabs.QUERY_OVERVIEW, label: SqlTabs.QUERY_OVERVIEW }) })), ((_d = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _d === void 0 ? void 0 : _d.category) === AnomalyCategory.DB &&
82677
82621
  !isHistoricalQueryView &&
82678
- (((_g = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _g === void 0 ? void 0 : _g.type) === AnomalyType.HOT_TABLET ||
82679
- ((_h = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _h === void 0 ? void 0 : _h.type) === AnomalyType.LARGE_TABLET) && (jsx(YBTabs, { value: tabletTab, onChange: handleTabletTabChange, className: helperClasses.tabsContainer, children: jsx(YBStyledTab$1, { value: TabletTabs.TABLET_OVERVIEW, label: TabletTabs.TABLET_OVERVIEW }) })), !!anomalyGroupData && !isHistoricalQueryView && (jsx(AnomalyPossibleCause, { accordianExpanded: isIndexAnomaly, anomalyGroupData: anomalyGroupData })), jsx(MetadataHeader, { universeData: universeData, queryObject: queryObject, isHistoricalQueryView: isHistoricalQueryView, universeQueryStatsData: universeQueryStatsData, anomalyData: isNonEmptyObject(anomalyGroupData) ? anomalyGroupData : null, showDetails: showDetails, onShowDetails: onShowDetails }), !isIndexAnomaly && (jsx(Box$1, { className: clsx(appName === AppName.WEB ? helperClasses.stickyHeader : helperClasses.stickyHeaderYBM), children: jsx(DateSelectorHeader, { appName: appName, filterDuration: filterDuration, startDateTime: dateTimeRange.startDateTime, endDateTime: dateTimeRange.endDateTime, timezone: timezone, onSelectedFilterDuration: onSelectedFilterDuration, metricMeasure: metricMeasure, showStandaloneAnomalies: showStandaloneAnomalies, onStartDateChange: onStartDateChange, onEndDateChange: onEndDateChange, onRefresh: onRefresh }) })), jsxs(Box$1, { style: {
82622
+ (((_e = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _e === void 0 ? void 0 : _e.type) === AnomalyType.HOT_TABLET ||
82623
+ ((_f = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _f === void 0 ? void 0 : _f.type) === AnomalyType.LARGE_TABLET) && (jsx(YBTabs, { value: tabletTab, onChange: handleTabletTabChange, children: jsx(YBStyledTab$1, { value: TabletTabs.TABLET_OVERVIEW, label: TabletTabs.TABLET_OVERVIEW }) })), jsx(MetadataHeader, { universeData: universeData, queryObject: queryObject, isHistoricalQueryView: isHistoricalQueryView, universeQueryStatsData: universeQueryStatsData, anomalyData: isNonEmptyObject(anomalyGroupData) ? anomalyGroupData : null, showDetails: showDetails, onShowDetails: onShowDetails }), jsx(Box$1, { className: clsx(appName === AppName.WEB ? helperClasses.stickyHeader : helperClasses.stickyHeaderYBM), children: jsx(DateSelectorHeader, { appName: appName, filterDuration: filterDuration, startDateTime: dateTimeRange.startDateTime, endDateTime: dateTimeRange.endDateTime, timezone: timezone, onSelectedFilterDuration: onSelectedFilterDuration, metricMeasure: metricMeasure, showStandaloneAnomalies: showStandaloneAnomalies, onStartDateChange: onStartDateChange, onEndDateChange: onEndDateChange, onRefresh: onRefresh }) }), jsxs(Box$1, { style: {
82680
82624
  flex: 1,
82681
82625
  overflow: 'auto'
82682
- }, children: [isHistoricalQueryView && (jsxs(Fragment, { children: [jsx(GenericHeader, { appName: appName, universeData: universeData, anomalyData: null, clusterRegionItem: clusterRegionItem, zoneNodeItem: zoneNodeItem, isPrimaryCluster: isPrimaryCluster, cluster: cluster, region: region, metricMeasure: metricMeasure, outlierType: outlierType, numNodes: numNodes, onZoneNodeSelected: onZoneNodeSelected, onClusterRegionSelected: onClusterRegionSelected, onOutlierTypeSelected: onOutlierTypeSelected, onSplitTypeSelected: onSplitTypeSelected, onNumNodesChanged: onNumNodesChanged }), jsx(SqlDrilldown, { urlParams: urlParams, anomalyData: null, getClusterDetails: getClusterDetails, metricMeasure: metricMeasure, apiUrl: apiUrl, appName: appName, timezone: timezone, sqlTab: sqlTab, dateTimeRange: dateTimeRange, universeQueryStatsData: universeQueryStatsData, onEChartsDateSelect: onEChartsDateSelect })] })), isNonEmptyObject(anomalyGroupData) && !isHistoricalQueryView && (jsxs(Fragment, { children: [!(((_j = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _j === void 0 ? void 0 : _j.category) === AnomalyCategory.APP ||
82683
- isIndexAnomaly ||
82684
- (((_k = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _k === void 0 ? void 0 : _k.category) === AnomalyCategory.NODE &&
82685
- ((_l = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _l === void 0 ? void 0 : _l.type) !== AnomalyType.SLOW_DISKS)) && (jsx(GenericHeader, { appName: appName, universeData: universeData, anomalyData: anomalyGroupData, clusterRegionItem: clusterRegionItem, zoneNodeItem: zoneNodeItem, isPrimaryCluster: isPrimaryCluster, cluster: cluster, region: region, metricMeasure: metricMeasure, outlierType: outlierType, numNodes: numNodes, showSplitSelector: ((_m = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _m === void 0 ? void 0 : _m.type) !== AnomalyType.LARGE_TABLET &&
82686
- ((_o = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _o === void 0 ? void 0 : _o.type) !== AnomalyType.HOT_TABLET, onZoneNodeSelected: onZoneNodeSelected, onClusterRegionSelected: onClusterRegionSelected, onOutlierTypeSelected: onOutlierTypeSelected, onSplitTypeSelected: onSplitTypeSelected, onNumNodesChanged: onNumNodesChanged })), jsx(AnomalyRouter, { metricMeasure: metricMeasure, appName: appName, dateTimeRange: dateTimeRange, timezone: timezone, universeQueryStatsData: universeQueryStatsData, amomalyGraphRequestParams: amomalyGraphRequestParams, formattedAnomalyRca: formattedAnomalyRca, apiUrl: apiUrl, anomalyData: anomalyGroupData, gantChartData: gantChartData, tabletTab: tabletTab, sqlTab: sqlTab, onEChartsDateSelect: onEChartsDateSelect, onSelectedIssue: onSelectedIssue, onSelectedQuery: onSelectedQuery, urlParams: urlParams, getClusterDetails: getClusterDetails, onOutlierTypeSelected: onOutlierTypeSelected, onNumNodesChanged: onNumNodesChanged, onNavigateToUrl: onNavigateToUrl })] }))] })] }));
82626
+ }, children: [isHistoricalQueryView && (jsxs(Fragment, { children: [jsx(GenericHeader, { appName: appName, universeData: universeData, anomalyData: null, clusterRegionItem: clusterRegionItem, zoneNodeItem: zoneNodeItem, isPrimaryCluster: isPrimaryCluster, cluster: cluster, region: region, metricMeasure: metricMeasure, outlierType: outlierType, numNodes: numNodes, onZoneNodeSelected: onZoneNodeSelected, onClusterRegionSelected: onClusterRegionSelected, onOutlierTypeSelected: onOutlierTypeSelected, onSplitTypeSelected: onSplitTypeSelected, onNumNodesChanged: onNumNodesChanged }), jsx(SqlDrilldown, { urlParams: urlParams, anomalyData: null, getClusterDetails: getClusterDetails, metricMeasure: metricMeasure, apiUrl: apiUrl, appName: appName, timezone: timezone, sqlTab: sqlTab, dateTimeRange: dateTimeRange, universeQueryStatsData: universeQueryStatsData, amomalyGraphRequestParams: null, formattedAnomalyRca: null, onEChartsDateSelect: onEChartsDateSelect })] })), isNonEmptyObject(anomalyGroupData) && !isHistoricalQueryView && (jsxs(Fragment, { children: [!(((_g = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _g === void 0 ? void 0 : _g.category) === AnomalyCategory.APP ||
82627
+ (((_h = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _h === void 0 ? void 0 : _h.category) === AnomalyCategory.NODE &&
82628
+ ((_j = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _j === void 0 ? void 0 : _j.type) !== AnomalyType.SLOW_DISKS)) && (jsx(GenericHeader, { appName: appName, universeData: universeData, anomalyData: anomalyGroupData, clusterRegionItem: clusterRegionItem, zoneNodeItem: zoneNodeItem, isPrimaryCluster: isPrimaryCluster, cluster: cluster, region: region, metricMeasure: metricMeasure, outlierType: outlierType, numNodes: numNodes, showSplitSelector: ((_k = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _k === void 0 ? void 0 : _k.type) !== AnomalyType.LARGE_TABLET &&
82629
+ ((_l = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _l === void 0 ? void 0 : _l.type) !== AnomalyType.HOT_TABLET, onZoneNodeSelected: onZoneNodeSelected, onClusterRegionSelected: onClusterRegionSelected, onOutlierTypeSelected: onOutlierTypeSelected, onSplitTypeSelected: onSplitTypeSelected, onNumNodesChanged: onNumNodesChanged })), jsx(AnomalyRouter, { metricMeasure: metricMeasure, appName: appName, dateTimeRange: dateTimeRange, timezone: timezone, universeQueryStatsData: universeQueryStatsData, amomalyGraphRequestParams: amomalyGraphRequestParams, formattedAnomalyRca: formattedAnomalyRca, apiUrl: apiUrl, anomalyData: anomalyGroupData, gantChartData: gantChartData, tabletTab: tabletTab, sqlTab: sqlTab, onEChartsDateSelect: onEChartsDateSelect, onSelectedIssue: onSelectedIssue, onSelectedQuery: onSelectedQuery, urlParams: urlParams, getClusterDetails: getClusterDetails, onOutlierTypeSelected: onOutlierTypeSelected, onNumNodesChanged: onNumNodesChanged, onNavigateToUrl: onNavigateToUrl })] }))] })] }));
82687
82630
  });
82688
82631
 
82689
82632
  var MetricsAnalysisEntry = function (_a) {
@@ -83818,6 +83761,123 @@ var ProcessTopKData = React__default.memo(function (_a) {
83818
83761
  }, urlParams: urlParams, filterTrigger: filterTrigger, onEChartsDateSelect: onEChartsDateSelect, openSelectionModal: openSelectionModal, closeSelectionModal: closeSelectionModal, getClusterDetails: getClusterDetails, handleFilterMetrics: handleFilterMetrics }) }));
83819
83762
  });
83820
83763
 
83764
+ var img$5 = "data:image/svg+xml,%3csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 11.2929L11.1464 8.14645C11.3417 7.95118 11.6583 7.95118 11.8536 8.14645C12.0488 8.34171 12.0488 8.65829 11.8536 8.85355L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536L3.14645 8.85355C2.95118 8.65829 2.95118 8.34171 3.14645 8.14645C3.34171 7.95118 3.65829 7.95118 3.85355 8.14645L7 11.2929L7 0.5C7 0.223857 7.22386 -3.39906e-07 7.5 -3.27835e-07C7.77614 -3.15765e-07 8 0.223857 8 0.5L8 11.2929ZM14.5 15C14.7761 15 15 15.2239 15 15.5C15 15.7761 14.7761 16 14.5 16L0.499999 16C0.223857 16 -6.89597e-07 15.7761 -6.77527e-07 15.5C-6.65456e-07 15.2239 0.223857 15 0.499999 15L14.5 15Z' fill='%232B59C3'/%3e%3c/svg%3e";
83765
+ var ExpandIcon = img$5;
83766
+
83767
+ var img$4 = "data:image/svg+xml,%3csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M7 4.70711L3.85355 7.85355C3.65829 8.04882 3.34171 8.04882 3.14645 7.85355C2.95118 7.65829 2.95118 7.34171 3.14645 7.14645L7.14645 3.14645C7.34171 2.95118 7.65829 2.95118 7.85355 3.14645L11.8536 7.14645C12.0488 7.34171 12.0488 7.65829 11.8536 7.85355C11.6583 8.04882 11.3417 8.04882 11.1464 7.85355L8 4.70711L8 15.5C8 15.7761 7.77614 16 7.5 16C7.22386 16 7 15.7761 7 15.5L7 4.70711ZM0.5 1C0.223858 1 1.81543e-07 0.776142 1.84836e-07 0.5C1.88129e-07 0.223858 0.223858 2.66948e-09 0.5 5.96244e-09L14.5 1.72911e-07C14.7761 1.76204e-07 15 0.223858 15 0.5C15 0.776142 14.7761 1 14.5 1L0.5 1Z' fill='%232B59C3'/%3e%3c/svg%3e";
83768
+ var CollapseIcon = img$4;
83769
+
83770
+ var img$3 = "data:image/svg+xml,%3csvg width='12' height='7' viewBox='0 0 12 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M11.2925 0.825396L6.75926 6.1142C6.36016 6.57981 5.63984 6.57981 5.24074 6.1142L0.707482 0.825396C0.42948 0.501059 0.659934 0 1.08711 0L10.9129 0C11.3401 0 11.5705 0.501059 11.2925 0.825396Z' fill='black'/%3e%3c/svg%3e";
83771
+ var ArrowDownwardIcon = img$3;
83772
+
83773
+ var useStyles$a = makeStyles$1(function (theme) { return ({
83774
+ accordion: {
83775
+ borderRadius: theme.spacing(1),
83776
+ backgroundColor: theme.palette.common.white,
83777
+ border: "1px solid ".concat(theme.palette.grey[200]),
83778
+ boxShadow: 'none',
83779
+ '&:before': {
83780
+ display: 'none'
83781
+ },
83782
+ '&.Mui-expanded': {
83783
+ margin: theme.spacing(2, 0, 0, 0)
83784
+ }
83785
+ },
83786
+ accordionSummary: {
83787
+ padding: theme.spacing(1.5, 2, 1, 2),
83788
+ minHeight: 'auto',
83789
+ '&.Mui-expanded': {
83790
+ minHeight: 'auto'
83791
+ },
83792
+ '& .MuiAccordionSummary-content': {
83793
+ margin: 0,
83794
+ '&.Mui-expanded': {
83795
+ margin: 0
83796
+ }
83797
+ }
83798
+ },
83799
+ accordionSummaryCollapsed: {
83800
+ padding: theme.spacing(1.5, 2, 1.5, 2)
83801
+ },
83802
+ headerTitle: {
83803
+ fontWeight: 600,
83804
+ fontSize: '13px',
83805
+ lineHeight: '16px'
83806
+ },
83807
+ accordionDetails: {
83808
+ padding: theme.spacing(0, 2, 2, 2),
83809
+ flexDirection: 'column'
83810
+ },
83811
+ expandIcon: {
83812
+ padding: theme.spacing(0, 0.8)
83813
+ },
83814
+ expandChartButtonContainer: {
83815
+ marginBottom: theme.spacing(1),
83816
+ alignSelf: 'flex-end'
83817
+ },
83818
+ countText: {
83819
+ fontWeight: 500,
83820
+ fontSize: '11.5px',
83821
+ lineHeight: '16px',
83822
+ color: theme.palette.grey[700]
83823
+ },
83824
+ countTextContainer: {
83825
+ height: '20px',
83826
+ width: '20px',
83827
+ borderRadius: '4px',
83828
+ display: 'flex',
83829
+ alignItems: 'center',
83830
+ justifyContent: 'center',
83831
+ marginLeft: theme.spacing(1),
83832
+ backgroundColor: theme.palette.grey[200]
83833
+ },
83834
+ headerTitleContainer: {
83835
+ display: 'flex',
83836
+ alignItems: 'center',
83837
+ flexDirection: 'row'
83838
+ }
83839
+ }); });
83840
+ var BackgroundJobs = function (_a) {
83841
+ var _b, _c, _d;
83842
+ var apiUrl = _a.apiUrl, endTime = _a.endTime, appName = _a.appName, startTime = _a.startTime, currentTab = _a.currentTab, universeUuid = _a.universeUuid, onSelectedIssue = _a.onSelectedIssue, onClickShowMoreAnomalies = _a.onClickShowMoreAnomalies;
83843
+ var classes = useStyles$a();
83844
+ var helperClasses = useHelperStyles();
83845
+ var _e = useState(false), expandChart = _e[0], setExpandChart = _e[1];
83846
+ var _f = useState(true), isAccordionExpanded = _f[0], setIsAccordionExpanded = _f[1];
83847
+ var _g = useState(null), backgroundTasks = _g[0], setBackgroundTasks = _g[1];
83848
+ var hasInitializedRef = useRef(false);
83849
+ var fetchBackgroundTasks = useQuery([QUERY_KEY.fetchBackgroundTasks, universeUuid, startTime, endTime], function () { return PerfAdvisorAPI.fetchBackgroundTasks(universeUuid, startTime, endTime, null, apiUrl); }, {
83850
+ onSuccess: function (data) {
83851
+ var transformedData = transformBackgroundTasks(data);
83852
+ setBackgroundTasks(transformedData);
83853
+ }
83854
+ });
83855
+ var backgroundTasksFetchError = (_d = (_c = (_b = fetchBackgroundTasks === null || fetchBackgroundTasks === void 0 ? void 0 : fetchBackgroundTasks.error) === null || _b === void 0 ? void 0 : _b.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.error;
83856
+ useEffect(function () {
83857
+ if (backgroundTasks !== null && !hasInitializedRef.current) {
83858
+ var hasTasks = (backgroundTasks === null || backgroundTasks === void 0 ? void 0 : backgroundTasks.groups) &&
83859
+ Object.values(backgroundTasks.groups).some(function (categoryGroups) { return Object.keys(categoryGroups !== null && categoryGroups !== void 0 ? categoryGroups : {}).length > 0; });
83860
+ setIsAccordionExpanded(hasTasks);
83861
+ hasInitializedRef.current = true;
83862
+ }
83863
+ }, [backgroundTasks]);
83864
+ var handleExpandChart = function () {
83865
+ setExpandChart(!expandChart);
83866
+ };
83867
+ var handleAccordionChange = function (_event, expanded) {
83868
+ setIsAccordionExpanded(expanded);
83869
+ };
83870
+ var totalBackgroundTasksCount = (backgroundTasks === null || backgroundTasks === void 0 ? void 0 : backgroundTasks.groups)
83871
+ ? Object.values(backgroundTasks.groups).reduce(function (total, categoryGroups) { return total + Object.keys(categoryGroups !== null && categoryGroups !== void 0 ? categoryGroups : {}).length; }, 0)
83872
+ : 0;
83873
+ return (jsxs(Accordion, { expanded: isAccordionExpanded, className: classes.accordion, onChange: handleAccordionChange, children: [jsx(AccordionSummary, { className: clsx(classes.accordionSummary, !isAccordionExpanded && classes.accordionSummaryCollapsed), expandIcon: jsx("img", { src: ArrowDownwardIcon, className: classes.expandIcon, alt: isAccordionExpanded ? 'Collapse' : 'Expand' }), children: jsxs(Box$1, { className: classes.headerTitleContainer, children: [jsx(Typography$1, { variant: "body2", className: classes.headerTitle, children: "Background Jobs" }), !isAccordionExpanded && (jsx(Box$1, { className: classes.countTextContainer, children: jsx(Typography$1, { variant: "body2", className: classes.countText, children: totalBackgroundTasksCount }) }))] }) }), jsxs(AccordionDetails, { className: classes.accordionDetails, children: [jsx(Box$1, { className: classes.expandChartButtonContainer, children: jsx(YBButton, { onClick: handleExpandChart, dataTestId: "BackgroundJobs-ExpandAllBtn", variant: appName === AppName.YBM ? 'ghost' : 'secondary', startIcon: jsx("img", { src: !expandChart ? ExpandIcon : CollapseIcon, alt: "Expand Icon" }), children: !expandChart ? 'Expand All' : 'Collapse All' }) }), fetchBackgroundTasks.isLoading && (jsx(Box$1, { mt: 2, className: helperClasses.loadingBox, children: jsx(SvgLoading, { className: clsx(helperClasses.icon, helperClasses.inProgressIcon) }) })), fetchBackgroundTasks.isError && (jsxs(Box$1, { mt: 2, children: [(appName === AppName.YBA || appName === AppName.WEB) && (jsx(YBErrorIndicator, { customErrorMessage: backgroundTasksFetchError && isNonEmptyString(backgroundTasksFetchError)
83874
+ ? backgroundTasksFetchError
83875
+ : DEFAULT_ERROR_MESSAGES.ANOMALIES_FETCH_ERROR })), appName === AppName.YBM && (jsx(GenericFailure, { text: backgroundTasksFetchError && isNonEmptyString(backgroundTasksFetchError)
83876
+ ? backgroundTasksFetchError
83877
+ : DEFAULT_ERROR_MESSAGES.ANOMALIES_FETCH_ERROR }))] })), fetchBackgroundTasks.isSuccess &&
83878
+ (!!backgroundTasks && isNonEmptyObject(backgroundTasks) ? (jsx(PerfAdvisorGantChart, { universeUuid: universeUuid, apiUrl: apiUrl, appName: appName, endTime: endTime, isInsightsTab: false, startTime: startTime, currentTab: currentTab, expandAll: expandChart, isBackgroundJobs: true, sourceData: backgroundTasks, onSelectedIssue: onSelectedIssue, name: "gant-chart-background-jobs", onClickShowMoreAnomalies: onClickShowMoreAnomalies }, "gant-chart-background-jobs")) : (jsx(Box$1, { mt: 2, children: jsx(Typography$1, { variant: "body2", children: "No Background Jobs detected" }) })))] })] }));
83879
+ };
83880
+
83821
83881
  function _extends$d() {
83822
83882
  _extends$d = Object.assign || function (target) {
83823
83883
  for (var i = 1; i < arguments.length; i++) {
@@ -85065,16 +85125,10 @@ eventManager.on(2
85065
85125
  }
85066
85126
  });
85067
85127
 
85068
- var img$4 = "data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_436_182000)'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 7.5C4 7.77614 3.77614 8 3.5 8C3.22386 8 3 7.77614 3 7.5V5.5C3 4.11929 4.11929 3 5.5 3H7.5C7.77614 3 8 3.22386 8 3.5C8 3.77614 7.77614 4 7.5 4H5.5C4.67157 4 4 4.67157 4 5.5V7.5ZM16.5 4C16.2239 4 16 3.77614 16 3.5C16 3.22386 16.2239 3 16.5 3H18.5C19.8807 3 21 4.11929 21 5.5V7.5C21 7.77614 20.7761 8 20.5 8C20.2239 8 20 7.77614 20 7.5V5.5C20 4.67157 19.3284 4 18.5 4H16.5ZM20 16.5C20 16.2239 20.2239 16 20.5 16C20.7761 16 21 16.2239 21 16.5V18.5C21 19.8807 19.8807 21 18.5 21H16.5C16.2239 21 16 20.7761 16 20.5C16 20.2239 16.2239 20 16.5 20H18.5C19.3284 20 20 19.3284 20 18.5V16.5ZM7.5 20C7.77614 20 8 20.2239 8 20.5C8 20.7761 7.77614 21 7.5 21H5.5C4.11929 21 3 19.8807 3 18.5V16.5C3 16.2239 3.22386 16 3.5 16C3.77614 16 4 16.2239 4 16.5V18.5C4 19.3284 4.67157 20 5.5 20H7.5Z' fill='white'/%3e%3cpath d='M12 7L12 9' stroke='white' stroke-linecap='round'/%3e%3cpath d='M12 15L12 17' stroke='white' stroke-linecap='round'/%3e%3cpath d='M7 12L9 12' stroke='white' stroke-linecap='round'/%3e%3cpath d='M15 12L17 12' stroke='white' stroke-linecap='round'/%3e%3ccircle cx='12' cy='12' r='3.5' stroke='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_436_182000'%3e%3crect width='24' height='24' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
85069
- var ScanIcon = img$4;
85070
-
85071
- var img$3 = "data:image/svg+xml,%3csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 11.2929L11.1464 8.14645C11.3417 7.95118 11.6583 7.95118 11.8536 8.14645C12.0488 8.34171 12.0488 8.65829 11.8536 8.85355L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536L3.14645 8.85355C2.95118 8.65829 2.95118 8.34171 3.14645 8.14645C3.34171 7.95118 3.65829 7.95118 3.85355 8.14645L7 11.2929L7 0.5C7 0.223857 7.22386 -3.39906e-07 7.5 -3.27835e-07C7.77614 -3.15765e-07 8 0.223857 8 0.5L8 11.2929ZM14.5 15C14.7761 15 15 15.2239 15 15.5C15 15.7761 14.7761 16 14.5 16L0.499999 16C0.223857 16 -6.89597e-07 15.7761 -6.77527e-07 15.5C-6.65456e-07 15.2239 0.223857 15 0.499999 15L14.5 15Z' fill='%232B59C3'/%3e%3c/svg%3e";
85072
- var ExpandIcon = img$3;
85128
+ var img$2 = "data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_436_182000)'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 7.5C4 7.77614 3.77614 8 3.5 8C3.22386 8 3 7.77614 3 7.5V5.5C3 4.11929 4.11929 3 5.5 3H7.5C7.77614 3 8 3.22386 8 3.5C8 3.77614 7.77614 4 7.5 4H5.5C4.67157 4 4 4.67157 4 5.5V7.5ZM16.5 4C16.2239 4 16 3.77614 16 3.5C16 3.22386 16.2239 3 16.5 3H18.5C19.8807 3 21 4.11929 21 5.5V7.5C21 7.77614 20.7761 8 20.5 8C20.2239 8 20 7.77614 20 7.5V5.5C20 4.67157 19.3284 4 18.5 4H16.5ZM20 16.5C20 16.2239 20.2239 16 20.5 16C20.7761 16 21 16.2239 21 16.5V18.5C21 19.8807 19.8807 21 18.5 21H16.5C16.2239 21 16 20.7761 16 20.5C16 20.2239 16.2239 20 16.5 20H18.5C19.3284 20 20 19.3284 20 18.5V16.5ZM7.5 20C7.77614 20 8 20.2239 8 20.5C8 20.7761 7.77614 21 7.5 21H5.5C4.11929 21 3 19.8807 3 18.5V16.5C3 16.2239 3.22386 16 3.5 16C3.77614 16 4 16.2239 4 16.5V18.5C4 19.3284 4.67157 20 5.5 20H7.5Z' fill='white'/%3e%3cpath d='M12 7L12 9' stroke='white' stroke-linecap='round'/%3e%3cpath d='M12 15L12 17' stroke='white' stroke-linecap='round'/%3e%3cpath d='M7 12L9 12' stroke='white' stroke-linecap='round'/%3e%3cpath d='M15 12L17 12' stroke='white' stroke-linecap='round'/%3e%3ccircle cx='12' cy='12' r='3.5' stroke='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_436_182000'%3e%3crect width='24' height='24' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
85129
+ var ScanIcon = img$2;
85073
85130
 
85074
- var img$2 = "data:image/svg+xml,%3csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M7 4.70711L3.85355 7.85355C3.65829 8.04882 3.34171 8.04882 3.14645 7.85355C2.95118 7.65829 2.95118 7.34171 3.14645 7.14645L7.14645 3.14645C7.34171 2.95118 7.65829 2.95118 7.85355 3.14645L11.8536 7.14645C12.0488 7.34171 12.0488 7.65829 11.8536 7.85355C11.6583 8.04882 11.3417 8.04882 11.1464 7.85355L8 4.70711L8 15.5C8 15.7761 7.77614 16 7.5 16C7.22386 16 7 15.7761 7 15.5L7 4.70711ZM0.5 1C0.223858 1 1.81543e-07 0.776142 1.84836e-07 0.5C1.88129e-07 0.223858 0.223858 2.66948e-09 0.5 5.96244e-09L14.5 1.72911e-07C14.7761 1.76204e-07 15 0.223858 15 0.5C15 0.776142 14.7761 1 14.5 1L0.5 1Z' fill='%232B59C3'/%3e%3c/svg%3e";
85075
- var CollapseIcon = img$2;
85076
-
85077
- var useStyles$a = makeStyles$1(function (theme) { return ({
85131
+ var useStyles$9 = makeStyles$1(function (theme) { return ({
85078
85132
  accordion: {
85079
85133
  borderRadius: theme.spacing(1),
85080
85134
  backgroundColor: theme.palette.common.white,
@@ -85131,7 +85185,7 @@ var useStyles$a = makeStyles$1(function (theme) { return ({
85131
85185
  var DetectedAnomalies = function (_a) {
85132
85186
  var _b, _c;
85133
85187
  var apiUrl = _a.apiUrl, appName = _a.appName, endTime = _a.endTime, currentTab = _a.currentTab, startTime = _a.startTime, universeUuid = _a.universeUuid, anomalyGroups = _a.anomalyGroups, onSelectedIssue = _a.onSelectedIssue, fetchAnomalyGroups = _a.fetchAnomalyGroups, anomalyGroupsFetchError = _a.anomalyGroupsFetchError, onClickShowMoreAnomalies = _a.onClickShowMoreAnomalies, onNavigateToUrl = _a.onNavigateToUrl;
85134
- var classes = useStyles$a();
85188
+ var classes = useStyles$9();
85135
85189
  var helperClasses = useHelperStyles();
85136
85190
  var _d = useState(false), expandAll = _d[0], setExpandAll = _d[1];
85137
85191
  var _e = useState(true), isAccordionExpanded = _e[0], setIsAccordionExpanded = _e[1];
@@ -85176,7 +85230,7 @@ var DetectedAnomalies = function (_a) {
85176
85230
  (isNonEmptyObject(anomalyGroups === null || anomalyGroups === void 0 ? void 0 : anomalyGroups.groups) ? (jsx(PerfAdvisorGantChart, { universeUuid: universeUuid, apiUrl: apiUrl, name: "gant-chart-insights", sourceData: anomalyGroups !== null && anomalyGroups !== void 0 ? anomalyGroups : [], expandAll: expandAll, showMoreOptions: true, onClickShowMoreAnomalies: onClickShowMoreAnomalies, startTime: (_b = startTime === null || startTime === void 0 ? void 0 : startTime.toISOString()) !== null && _b !== void 0 ? _b : null, endTime: (_c = endTime === null || endTime === void 0 ? void 0 : endTime.toISOString()) !== null && _c !== void 0 ? _c : null, onSelectedIssue: onSelectedIssue, appName: appName, currentTab: currentTab, isInsightsTab: currentTab === InsightsTabs.INSIGHTS, onNavigateToUrl: onNavigateToUrl }, "gant-chart-insights")) : (jsx(Box$1, { mt: 2, children: 'No Anomalies were detected' })))] })] }));
85177
85231
  };
85178
85232
 
85179
- var useStyles$9 = makeStyles$1(function (theme) { return ({
85233
+ var useStyles$8 = makeStyles$1(function (theme) { return ({
85180
85234
  dbLoadDataContainer: {
85181
85235
  border: '1px solid #E9EEF2',
85182
85236
  borderRadius: '8px',
@@ -85198,7 +85252,7 @@ var DB_METADATA_COLUMNS = {
85198
85252
  var DbLoadMetadata = function (_a) {
85199
85253
  var _b, _c, _d, _e, _f, _g, _h, _j, _k;
85200
85254
  var dbWaitEventType = _a.dbWaitEventType, universeUuid = _a.universeUuid, apiUrl = _a.apiUrl, appName = _a.appName, startTime = _a.startTime, endTime = _a.endTime, onSelectedQuery = _a.onSelectedQuery, onNavigateToUrl = _a.onNavigateToUrl;
85201
- var classes = useStyles$9();
85255
+ var classes = useStyles$8();
85202
85256
  var helperClasses = useHelperStyles();
85203
85257
  // State Variables
85204
85258
  var _l = useState([]), databaseList = _l[0], setDatabaseList = _l[1];
@@ -85660,114 +85714,6 @@ var DbLoadMetadata = function (_a) {
85660
85714
  } }, "DbLoadMetadata-".concat(dbWaitEventType, "-").concat(sortBy, "-").concat(sortDirection)))] })] })] }));
85661
85715
  };
85662
85716
 
85663
- var useStyles$8 = makeStyles$1(function (theme) { return ({
85664
- accordion: {
85665
- borderRadius: theme.spacing(1),
85666
- backgroundColor: theme.palette.common.white,
85667
- border: "1px solid ".concat(theme.palette.grey[200]),
85668
- boxShadow: 'none',
85669
- '&:before': {
85670
- display: 'none'
85671
- },
85672
- '&.Mui-expanded': {
85673
- margin: theme.spacing(2, 0, 0, 0)
85674
- }
85675
- },
85676
- accordionSummary: {
85677
- padding: theme.spacing(1.5, 2, 1, 2),
85678
- minHeight: 'auto',
85679
- '&.Mui-expanded': {
85680
- minHeight: 'auto'
85681
- },
85682
- '& .MuiAccordionSummary-content': {
85683
- margin: 0,
85684
- '&.Mui-expanded': {
85685
- margin: 0
85686
- }
85687
- }
85688
- },
85689
- accordionSummaryCollapsed: {
85690
- padding: theme.spacing(1.5, 2, 1.5, 2)
85691
- },
85692
- headerTitle: {
85693
- fontWeight: 600,
85694
- fontSize: '13px',
85695
- lineHeight: '16px'
85696
- },
85697
- accordionDetails: {
85698
- padding: theme.spacing(0, 2, 2, 2),
85699
- flexDirection: 'column'
85700
- },
85701
- expandIcon: {
85702
- padding: theme.spacing(0, 0.8)
85703
- },
85704
- expandChartButtonContainer: {
85705
- marginBottom: theme.spacing(1),
85706
- alignSelf: 'flex-end'
85707
- },
85708
- countText: {
85709
- fontWeight: 500,
85710
- fontSize: '11.5px',
85711
- lineHeight: '16px',
85712
- color: theme.palette.grey[700]
85713
- },
85714
- countTextContainer: {
85715
- height: '20px',
85716
- width: '20px',
85717
- borderRadius: '4px',
85718
- display: 'flex',
85719
- alignItems: 'center',
85720
- justifyContent: 'center',
85721
- marginLeft: theme.spacing(1),
85722
- backgroundColor: theme.palette.grey[200]
85723
- },
85724
- headerTitleContainer: {
85725
- display: 'flex',
85726
- alignItems: 'center',
85727
- flexDirection: 'row'
85728
- }
85729
- }); });
85730
- var BackgroundJobs = function (_a) {
85731
- var _b, _c, _d;
85732
- var apiUrl = _a.apiUrl, endTime = _a.endTime, appName = _a.appName, startTime = _a.startTime, currentTab = _a.currentTab, universeUuid = _a.universeUuid, onSelectedIssue = _a.onSelectedIssue, onClickShowMoreAnomalies = _a.onClickShowMoreAnomalies;
85733
- var classes = useStyles$8();
85734
- var helperClasses = useHelperStyles();
85735
- var _e = useState(false), expandChart = _e[0], setExpandChart = _e[1];
85736
- var _f = useState(true), isAccordionExpanded = _f[0], setIsAccordionExpanded = _f[1];
85737
- var _g = useState(null), backgroundTasks = _g[0], setBackgroundTasks = _g[1];
85738
- var hasInitializedRef = useRef(false);
85739
- var fetchBackgroundTasks = useQuery([QUERY_KEY.fetchBackgroundTasks, universeUuid, startTime, endTime], function () { return PerfAdvisorAPI.fetchBackgroundTasks(universeUuid, startTime, endTime, null, apiUrl); }, {
85740
- onSuccess: function (data) {
85741
- var transformedData = transformBackgroundTasks(data);
85742
- setBackgroundTasks(transformedData);
85743
- }
85744
- });
85745
- var backgroundTasksFetchError = (_d = (_c = (_b = fetchBackgroundTasks === null || fetchBackgroundTasks === void 0 ? void 0 : fetchBackgroundTasks.error) === null || _b === void 0 ? void 0 : _b.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.error;
85746
- useEffect(function () {
85747
- if (backgroundTasks !== null && !hasInitializedRef.current) {
85748
- var hasTasks = (backgroundTasks === null || backgroundTasks === void 0 ? void 0 : backgroundTasks.groups) &&
85749
- Object.values(backgroundTasks.groups).some(function (categoryGroups) { return Object.keys(categoryGroups !== null && categoryGroups !== void 0 ? categoryGroups : {}).length > 0; });
85750
- setIsAccordionExpanded(hasTasks);
85751
- hasInitializedRef.current = true;
85752
- }
85753
- }, [backgroundTasks]);
85754
- var handleExpandChart = function () {
85755
- setExpandChart(!expandChart);
85756
- };
85757
- var handleAccordionChange = function (_event, expanded) {
85758
- setIsAccordionExpanded(expanded);
85759
- };
85760
- var totalBackgroundTasksCount = (backgroundTasks === null || backgroundTasks === void 0 ? void 0 : backgroundTasks.groups)
85761
- ? Object.values(backgroundTasks.groups).reduce(function (total, categoryGroups) { return total + Object.keys(categoryGroups !== null && categoryGroups !== void 0 ? categoryGroups : {}).length; }, 0)
85762
- : 0;
85763
- return (jsxs(Accordion, { expanded: isAccordionExpanded, className: classes.accordion, onChange: handleAccordionChange, children: [jsx(AccordionSummary, { className: clsx(classes.accordionSummary, !isAccordionExpanded && classes.accordionSummaryCollapsed), expandIcon: jsx("img", { src: ArrowDownwardIcon, className: classes.expandIcon, alt: isAccordionExpanded ? 'Collapse' : 'Expand' }), children: jsxs(Box$1, { className: classes.headerTitleContainer, children: [jsx(Typography$1, { variant: "body2", className: classes.headerTitle, children: "Background Jobs" }), !isAccordionExpanded && (jsx(Box$1, { className: classes.countTextContainer, children: jsx(Typography$1, { variant: "body2", className: classes.countText, children: totalBackgroundTasksCount }) }))] }) }), jsxs(AccordionDetails, { className: classes.accordionDetails, children: [jsx(Box$1, { className: classes.expandChartButtonContainer, children: jsx(YBButton, { onClick: handleExpandChart, dataTestId: "BackgroundJobs-ExpandAllBtn", variant: appName === AppName.YBM ? 'ghost' : 'secondary', startIcon: jsx("img", { src: !expandChart ? ExpandIcon : CollapseIcon, alt: "Expand Icon" }), children: !expandChart ? 'Expand All' : 'Collapse All' }) }), fetchBackgroundTasks.isLoading && (jsx(Box$1, { mt: 2, className: helperClasses.loadingBox, children: jsx(SvgLoading, { className: clsx(helperClasses.icon, helperClasses.inProgressIcon) }) })), fetchBackgroundTasks.isError && (jsxs(Box$1, { mt: 2, children: [(appName === AppName.YBA || appName === AppName.WEB) && (jsx(YBErrorIndicator, { customErrorMessage: backgroundTasksFetchError && isNonEmptyString(backgroundTasksFetchError)
85764
- ? backgroundTasksFetchError
85765
- : DEFAULT_ERROR_MESSAGES.ANOMALIES_FETCH_ERROR })), appName === AppName.YBM && (jsx(GenericFailure, { text: backgroundTasksFetchError && isNonEmptyString(backgroundTasksFetchError)
85766
- ? backgroundTasksFetchError
85767
- : DEFAULT_ERROR_MESSAGES.ANOMALIES_FETCH_ERROR }))] })), fetchBackgroundTasks.isSuccess &&
85768
- (!!backgroundTasks && isNonEmptyObject(backgroundTasks) ? (jsx(PerfAdvisorGantChart, { universeUuid: universeUuid, apiUrl: apiUrl, appName: appName, endTime: endTime, isInsightsTab: false, startTime: startTime, currentTab: currentTab, expandAll: expandChart, isBackgroundJobs: true, sourceData: backgroundTasks, onSelectedIssue: onSelectedIssue, name: "gant-chart-background-jobs", onClickShowMoreAnomalies: onClickShowMoreAnomalies }, "gant-chart-background-jobs")) : (jsx(Box$1, { mt: 2, children: jsx(Typography$1, { variant: "body2", children: "No Background Jobs detected" }) })))] })] }));
85769
- };
85770
-
85771
85717
  var img$1 = "data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.5 4.5C4.237 4.5 3.214 5.523 3.214 6.786V11.357L1 12.5L3.214 13.643V18.214C3.214 19.477 4.237 20.5 5.5 20.5' stroke='%230B1117' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M18.4995 4.47221C19.7625 4.47221 20.7855 5.49521 20.7855 6.75821V11.3292L22.9995 12.4722L20.7855 13.6152V18.1862C20.7855 19.4492 19.7625 20.4722 18.4995 20.4722' stroke='%230B1117' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3crect x='7' y='14.5' width='2' height='3' rx='0.5' fill='%230B1117'/%3e%3crect x='11' y='11.5' width='2' height='6' rx='0.5' fill='%230B1117'/%3e%3crect x='15' y='7.5' width='2' height='10' rx='0.5' fill='%230B1117'/%3e%3c/svg%3e";
85772
85718
  var QueriesIcon = img$1;
85773
85719
 
@@ -85843,7 +85789,7 @@ var useStyles$7 = makeStyles$1(function (theme) { return ({
85843
85789
  }); });
85844
85790
  var PerfAdvisorTabs = function (_a) {
85845
85791
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
85846
- var startTime = _a.startTime, endTime = _a.endTime, universeUuid = _a.universeUuid, appName = _a.appName, timezone = _a.timezone, filterDuration = _a.filterDuration, apiUrl = _a.apiUrl, universeData = _a.universeData, isAshEnabled = _a.isAshEnabled, isAshSupported = _a.isAshSupported, showStandaloneAnomalies = _a.showStandaloneAnomalies, onClickShowMoreAnomalies = _a.onClickShowMoreAnomalies, onEChartsDateSelect = _a.onEChartsDateSelect, onSelectedIssue = _a.onSelectedIssue, onSelectedQuery = _a.onSelectedQuery, notifyTabChange = _a.notifyTabChange, onStartDateChange = _a.onStartDateChange, onEndDateChange = _a.onEndDateChange, onRefresh = _a.onRefresh, onSelectedFilterDuration = _a.onSelectedFilterDuration, onNavigateToUrl = _a.onNavigateToUrl;
85792
+ var startTime = _a.startTime, endTime = _a.endTime, universeUuid = _a.universeUuid, appName = _a.appName, timezone = _a.timezone, filterDuration = _a.filterDuration, apiUrl = _a.apiUrl, universeData = _a.universeData, isAshEnabled = _a.isAshEnabled, isAshSupported = _a.isAshSupported, showStandaloneAnomalies = _a.showStandaloneAnomalies, runtimeConfigs = _a.runtimeConfigs, onClickShowMoreAnomalies = _a.onClickShowMoreAnomalies, onEChartsDateSelect = _a.onEChartsDateSelect, onSelectedIssue = _a.onSelectedIssue, onSelectedQuery = _a.onSelectedQuery, notifyTabChange = _a.notifyTabChange, onStartDateChange = _a.onStartDateChange, onEndDateChange = _a.onEndDateChange, onRefresh = _a.onRefresh, onSelectedFilterDuration = _a.onSelectedFilterDuration, onNavigateToUrl = _a.onNavigateToUrl;
85847
85793
  var classes = useStyles$7();
85848
85794
  var helperClasses = useHelperStyles();
85849
85795
  var getCurrentTab = function () { return parseUrlState().currentTab; };
@@ -85999,7 +85945,13 @@ var PerfAdvisorTabs = function (_a) {
85999
85945
  case InsightsTabs.INSIGHTS:
86000
85946
  return jsx(Box$1, { mt: 0.5 });
86001
85947
  case InsightsTabs.CLUSTER_LOAD:
86002
- return (jsx(Box$1, { ml: appName === AppName.WEB ? 2 : 0, children: jsx(Box$1, { display: "flex", alignItems: "center", className: classes.tabsContainer, children: jsx(YBTabs, { value: clusterLoadSubTab, className: classes.ybTabs, onChange: handleClusterLoadSubTabChange, children: Object.values(ClusterLoadSubTabs).map(function (tab, index) { return (jsx(YBStyledTab, { "data-testid": "".concat(tab, "ClusterLoadSubTab"), value: tab, label: tab }, index)); }) }) }) }));
85948
+ return (jsx(Box$1, { ml: appName === AppName.WEB ? 2 : 0, children: jsx(Box$1, { display: "flex", alignItems: "center", className: classes.tabsContainer, children: jsx(YBTabs, { value: clusterLoadSubTab, className: classes.ybTabs, onChange: handleClusterLoadSubTabChange, children: Object.values(ClusterLoadSubTabs).map(function (tab, index) {
85949
+ if (!(runtimeConfigs === null || runtimeConfigs === void 0 ? void 0 : runtimeConfigs.showDbLoadView) &&
85950
+ tab === ClusterLoadSubTabs.LOAD_BY_DATABASE) {
85951
+ return null;
85952
+ }
85953
+ return (jsx(YBStyledTab, { "data-testid": "".concat(tab, "ClusterLoadSubTab"), value: tab, label: tab }, index));
85954
+ }) }) }) }));
86003
85955
  default:
86004
85956
  return null;
86005
85957
  }
@@ -86081,7 +86033,8 @@ var PerfAdvisorTabs = function (_a) {
86081
86033
  var showQueryTypeSelector = currentTab !== InsightsTabs.METRICS;
86082
86034
  return (jsxs(Box$1, { className: clsx(appName === AppName.WEB ? classes.tabBox : undefined), children: [appName === AppName.WEB && (jsx(Box$1, { children: jsxs(TabContext, { value: currentTab, children: [jsx(Box$1, { display: "flex", alignItems: "center", className: classes.tabsContainer, children: jsx(YBTabs, { value: currentTab, onChange: handleTabChange, children: filteredTabs.map(function (tab, index) { return (jsx(YBTab, { "data-testid": "".concat(tab, "Tab"), value: tab, label: tab, className: classes.tabButton }, index)); }) }) }), jsx(TabPanel, { className: helperClasses.tabPanelPrimary, value: InsightsTabs.METRICS, children: renderComponent(InsightsTabs.METRICS) }), jsx(TabPanel, { className: helperClasses.tabPanelPrimary, value: InsightsTabs.CLUSTER_LOAD, children: renderComponent(InsightsTabs.CLUSTER_LOAD) })] }) })), (appName === AppName.YBM || appName === AppName.YBA) && jsx(Fragment, { children: renderComponent(currentTab) }), renderHeaderComponent(), currentTab === InsightsTabs.METRICS && (jsx(ProcessTopKData, { universeUuid: universeUuid, appName: appName, timezone: timezone, apiUrl: apiUrl, onEChartsDateSelect: onEChartsDateSelect, getClusterDetails: getClusterDetails })), currentTab === InsightsTabs.CLUSTER_LOAD &&
86083
86035
  clusterLoadSubTab === ClusterLoadSubTabs.LOAD_BY_DATABASE && (jsxs(Box$1, { mt: 2, ml: appName === AppName.WEB ? 2 : 0, children: [clusterLoadSubTab === ClusterLoadSubTabs.LOAD_BY_DATABASE && (jsx(DbLoadHeader, { outlierType: outlierType, waitEventType: dbWaitEventType, numNodes: numNodes, onOutlierTypeSelected: onOutlierTypeSelected, onNumNodesChanged: onNumNodesChanged, onChangeDbWaitEventType: onChangeDbWaitEventType })), jsx(PerfAdvisorClusterLoad, { dbWaitEventType: dbWaitEventType, isDbClusterLoadView: true, startTime: (_e = startTime === null || startTime === void 0 ? void 0 : startTime.toISOString()) !== null && _e !== void 0 ? _e : null, endTime: (_f = endTime === null || endTime === void 0 ? void 0 : endTime.toISOString()) !== null && _f !== void 0 ? _f : null, apiUrl: apiUrl, universeUuid: universeUuid, appName: appName, metricKey: "cluster_load", groupByOperation: groupByOperation, shouldAbbreviateTraceName: true, timezone: timezone, isAshEnabled: isAshEnabled, isAshSupported: isAshSupported, onFilterBarData: onFilterBarData, onSetGroupByOperation: onSetGroupByOperation, onEChartsDateSelect: onEChartsDateSelect, getClusterDetails: getClusterDetails }), jsx(DbLoadMetadata, { appName: appName, universeUuid: universeUuid, apiUrl: apiUrl, dbWaitEventType: dbWaitEventType, startTime: (_g = startTime === null || startTime === void 0 ? void 0 : startTime.toISOString()) !== null && _g !== void 0 ? _g : null, endTime: (_h = endTime === null || endTime === void 0 ? void 0 : endTime.toISOString()) !== null && _h !== void 0 ? _h : null, onSelectedQuery: onSelectedQuery, onNavigateToUrl: onNavigateToUrl })] })), currentTab === InsightsTabs.CLUSTER_LOAD &&
86084
- clusterLoadSubTab === ClusterLoadSubTabs.OVERALL_LOAD && (jsxs(Box$1, { ml: appName === AppName.WEB ? 2 : 0, children: [jsx(PerfAdvisorClusterLoad, { dbWaitEventType: dbWaitEventType, isDbClusterLoadView: false, startTime: (_j = startTime === null || startTime === void 0 ? void 0 : startTime.toISOString()) !== null && _j !== void 0 ? _j : null, endTime: (_k = endTime === null || endTime === void 0 ? void 0 : endTime.toISOString()) !== null && _k !== void 0 ? _k : null, apiUrl: apiUrl, universeUuid: universeUuid, appName: appName, metricKey: "cluster_load", groupByOperation: groupByOperation, shouldAbbreviateTraceName: true, timezone: timezone, isAshEnabled: isAshEnabled, isAshSupported: isAshSupported, onFilterBarData: onFilterBarData, onSetGroupByOperation: onSetGroupByOperation, onEChartsDateSelect: onEChartsDateSelect, getClusterDetails: getClusterDetails }), appName === AppName.WEB && (jsx(Box$1, { display: "flex", alignItems: "center", className: classes.tabsContainer, mt: 5, children: jsxs(YBTabs, { pill: true, value: clusterLoadOverallSubTab, onChange: handleClusterLoadOverallSubTabChange, children: [jsx(YBStyledTab, { icon: jsx("img", { src: AnomaliesIcon, alt: "Anomalies Icon", style: { marginRight: '8px' } }), value: ClusterLoadOverallTabs.ANOMALIES, label: ClusterLoadOverallTabs.ANOMALIES }), jsx(YBStyledTab, { icon: jsx("img", { src: QueriesIcon, alt: "Queries Icon", style: { marginRight: '8px' } }), value: ClusterLoadOverallTabs.QUERIES, label: ClusterLoadOverallTabs.QUERIES })] }) })), currentTab === InsightsTabs.CLUSTER_LOAD &&
86036
+ clusterLoadSubTab === ClusterLoadSubTabs.OVERALL_LOAD && (jsxs(Box$1, { ml: appName === AppName.WEB ? 2 : 0, children: [jsx(PerfAdvisorClusterLoad, { dbWaitEventType: dbWaitEventType, isDbClusterLoadView: false, startTime: (_j = startTime === null || startTime === void 0 ? void 0 : startTime.toISOString()) !== null && _j !== void 0 ? _j : null, endTime: (_k = endTime === null || endTime === void 0 ? void 0 : endTime.toISOString()) !== null && _k !== void 0 ? _k : null, apiUrl: apiUrl, universeUuid: universeUuid, appName: appName, metricKey: "cluster_load", groupByOperation: groupByOperation, shouldAbbreviateTraceName: true, timezone: timezone, isAshEnabled: isAshEnabled, isAshSupported: isAshSupported, onFilterBarData: onFilterBarData, onSetGroupByOperation: onSetGroupByOperation, onEChartsDateSelect: onEChartsDateSelect, getClusterDetails: getClusterDetails }), appName === AppName.WEB && (jsx(Box$1, { display: "flex", alignItems: "center", className: classes.tabsContainer, mt: 5, children: jsxs(YBTabs, { pill: true, value: clusterLoadOverallSubTab, onChange: handleClusterLoadOverallSubTabChange, children: [jsx(YBStyledTab, { icon: jsx("img", { src: AnomaliesIcon, alt: "Anomalies Icon", style: { marginRight: '8px' } }), value: ClusterLoadOverallTabs.ANOMALIES, label: ClusterLoadOverallTabs.ANOMALIES }), jsx(YBStyledTab, { icon: jsx("img", { src: QueriesIcon, alt: "Queries Icon", style: { marginRight: '8px' } }), value: ClusterLoadOverallTabs.QUERIES, label: ClusterLoadOverallTabs.QUERIES })] }) })), !!(runtimeConfigs === null || runtimeConfigs === void 0 ? void 0 : runtimeConfigs.showBgTasksView) &&
86037
+ currentTab === InsightsTabs.CLUSTER_LOAD &&
86085
86038
  clusterLoadSubTab === ClusterLoadSubTabs.OVERALL_LOAD &&
86086
86039
  clusterLoadOverallSubTab === ClusterLoadOverallTabs.QUERIES && (jsx(Box$1, { mt: 2, ml: appName === AppName.WEB && currentTab === InsightsTabs.CLUSTER_LOAD ? 2 : 0, children: jsx(BackgroundJobs, { apiUrl: apiUrl, appName: appName, currentTab: currentTab, universeUuid: universeUuid, onSelectedIssue: onSelectedIssue, endTime: (_l = endTime === null || endTime === void 0 ? void 0 : endTime.toISOString()) !== null && _l !== void 0 ? _l : null, startTime: (_m = startTime === null || startTime === void 0 ? void 0 : startTime.toISOString()) !== null && _m !== void 0 ? _m : null, onClickShowMoreAnomalies: onClickShowMoreAnomalies }) })), clusterLoadOverallSubTab === ClusterLoadOverallTabs.QUERIES && (jsx(Box$1, { mt: 2, children: jsx(HistoricalQueryData, { universeUuid: universeUuid, groupByOperation: groupByOperation, apiUrl: apiUrl, startTime: (_o = startTime === null || startTime === void 0 ? void 0 : startTime.toISOString()) !== null && _o !== void 0 ? _o : null, endTime: (_p = endTime === null || endTime === void 0 ? void 0 : endTime.toISOString()) !== null && _p !== void 0 ? _p : null, appName: appName, filteredLegends: filteredLegends, queryType: queryType, onSelectedQuery: onSelectedQuery, getClusterDetails: getClusterDetails, onNavigateToUrl: onNavigateToUrl }) })), clusterLoadOverallSubTab === ClusterLoadOverallTabs.ANOMALIES && (jsx(Box$1, { className: helperClasses.noteTextContainer, children: jsxs(Typography$1, { variant: "body2", className: helperClasses.noteText, children: [jsx(Typography$1, { variant: "body2", className: clsx(helperClasses.noteText, helperClasses.noteTextBold), children: "Note!" }), "Only the time window filter applies to this view."] }) }))] })), (currentTab === InsightsTabs.INSIGHTS ||
86087
86040
  (currentTab === InsightsTabs.CLUSTER_LOAD &&
@@ -92397,7 +92350,7 @@ var ShowMoreAnomalies = function (_a) {
92397
92350
 
92398
92351
  var PerfAdvisorEntry = function (_a) {
92399
92352
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
92400
- var timezone = _a.timezone, universeUuid = _a.universeUuid, appName = _a.appName, apiUrl = _a.apiUrl, _m = _a.showStandaloneAnomalies, showStandaloneAnomalies = _m === void 0 ? false : _m, onSelectedIssue = _a.onSelectedIssue, onSelectedQuery = _a.onSelectedQuery, onNavigateToUrl = _a.onNavigateToUrl;
92353
+ var timezone = _a.timezone, universeUuid = _a.universeUuid, appName = _a.appName, apiUrl = _a.apiUrl, runtimeConfigs = _a.runtimeConfigs, _m = _a.showStandaloneAnomalies, showStandaloneAnomalies = _m === void 0 ? false : _m, onSelectedIssue = _a.onSelectedIssue, onSelectedQuery = _a.onSelectedQuery, onNavigateToUrl = _a.onNavigateToUrl;
92401
92354
  var helperClasses = useHelperStyles();
92402
92355
  var searchParams = new URLSearchParams(window.location.search);
92403
92356
  var end = searchParams === null || searchParams === void 0 ? void 0 : searchParams.get('endTime');
@@ -92528,7 +92481,7 @@ var PerfAdvisorEntry = function (_a) {
92528
92481
  : DEFAULT_ERROR_MESSAGES.UNIVERSE_PA_STATUS_ERROR
92529
92482
  : isNonEmptyString(universeDataFetchError)
92530
92483
  ? universeDataFetchError
92531
- : DEFAULT_ERROR_MESSAGES.UNIVERSE_DETAILS_ERROR }))] }))), universeDataFetch.isSuccess && (jsx(Fragment, { children: jsxs(Box$1, { children: [!showMoreAnomalyCategory && (jsx(Box$1, { children: jsx(PerfAdvisorTabs, { startTime: dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.startDateTime, endTime: dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.endDateTime, filterDuration: filterDuration, universeUuid: universeUuid, universeData: universeDataFetch === null || universeDataFetch === void 0 ? void 0 : universeDataFetch.data, appName: appName, timezone: timezone, isAshEnabled: !!isAshEnabled, isAshSupported: !!isAshSupported, apiUrl: apiUrl, showStandaloneAnomalies: showStandaloneAnomalies, onClickShowMoreAnomalies: onClickShowMoreAnomalies, onEChartsDateSelect: onEChartsDateSelect, onSelectedIssue: onSelectedIssue, onSelectedQuery: onSelectedQuery, notifyTabChange: notifyTabChange, onStartDateChange: onStartDateChange, onEndDateChange: onEndDateChange, onRefresh: onRefresh, onSelectedFilterDuration: onSelectedFilterDuration, onNavigateToUrl: onNavigateToUrl }) })), isNonEmptyString(showMoreAnomalyCategory) && (jsx(ShowMoreAnomalies, { onClickShowMoreAnomalies: onClickShowMoreAnomalies, selectedTab: selectedTab, showMoreAnomalyCategory: showMoreAnomalyCategory, startTime: (_k = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.startDateTime) === null || _k === void 0 ? void 0 : _k.toISOString(), endTime: (_l = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.endDateTime) === null || _l === void 0 ? void 0 : _l.toISOString(), universeUuid: universeUuid, appName: appName, apiUrl: apiUrl, onSelectedIssue: onSelectedIssue }))] }) }))] }) }));
92484
+ : DEFAULT_ERROR_MESSAGES.UNIVERSE_DETAILS_ERROR }))] }))), universeDataFetch.isSuccess && (jsx(Fragment, { children: jsxs(Box$1, { children: [!showMoreAnomalyCategory && (jsx(Box$1, { children: jsx(PerfAdvisorTabs, { startTime: dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.startDateTime, endTime: dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.endDateTime, filterDuration: filterDuration, universeUuid: universeUuid, universeData: universeDataFetch === null || universeDataFetch === void 0 ? void 0 : universeDataFetch.data, appName: appName, timezone: timezone, isAshEnabled: !!isAshEnabled, isAshSupported: !!isAshSupported, apiUrl: apiUrl, showStandaloneAnomalies: showStandaloneAnomalies, runtimeConfigs: runtimeConfigs, onClickShowMoreAnomalies: onClickShowMoreAnomalies, onEChartsDateSelect: onEChartsDateSelect, onSelectedIssue: onSelectedIssue, onSelectedQuery: onSelectedQuery, notifyTabChange: notifyTabChange, onStartDateChange: onStartDateChange, onEndDateChange: onEndDateChange, onRefresh: onRefresh, onSelectedFilterDuration: onSelectedFilterDuration, onNavigateToUrl: onNavigateToUrl }) })), isNonEmptyString(showMoreAnomalyCategory) && (jsx(ShowMoreAnomalies, { onClickShowMoreAnomalies: onClickShowMoreAnomalies, selectedTab: selectedTab, showMoreAnomalyCategory: showMoreAnomalyCategory, startTime: (_k = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.startDateTime) === null || _k === void 0 ? void 0 : _k.toISOString(), endTime: (_l = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.endDateTime) === null || _l === void 0 ? void 0 : _l.toISOString(), universeUuid: universeUuid, appName: appName, apiUrl: apiUrl, onSelectedIssue: onSelectedIssue }))] }) }))] }) }));
92532
92485
  };
92533
92486
 
92534
92487
  var useStyles$5 = makeStyles(function (theme) { return ({