@yugabytedb/perf-advisor-ui 1.0.97 → 1.0.99
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/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +321 -161
- package/dist/esm/index.js.map +1 -1
- package/dist/types.d.ts +3 -2
- package/package.json +3 -3
package/dist/esm/index.js
CHANGED
|
@@ -2655,7 +2655,7 @@ var RuntimeConfigType;
|
|
|
2655
2655
|
})(RuntimeConfigType || (RuntimeConfigType = {}));
|
|
2656
2656
|
var TransformedBackgroundTasksCategory;
|
|
2657
2657
|
(function (TransformedBackgroundTasksCategory) {
|
|
2658
|
-
TransformedBackgroundTasksCategory["
|
|
2658
|
+
TransformedBackgroundTasksCategory["ALL_BACKGROUND_JOBS"] = "All Background Jobs";
|
|
2659
2659
|
})(TransformedBackgroundTasksCategory || (TransformedBackgroundTasksCategory = {}));
|
|
2660
2660
|
var InsightsTabs;
|
|
2661
2661
|
(function (InsightsTabs) {
|
|
@@ -3386,7 +3386,7 @@ var NAME_COLOR_MAPPING = {
|
|
|
3386
3386
|
SQL: '#BB42BC',
|
|
3387
3387
|
APP: '#2FB3FF',
|
|
3388
3388
|
INFRA: '#507CE1',
|
|
3389
|
-
BACKGROUND_JOBS: '#
|
|
3389
|
+
BACKGROUND_JOBS: '#97A5B0',
|
|
3390
3390
|
// Source of data: https://github.com/yugabyte/yugabyte-db/blob/4f304d5aabe5b992b4d04e59f1e6096fa35233d9/docs/content/stable/explore/observability/active-session-history.md?plain=1#L121
|
|
3391
3391
|
// YSQL Wait event types
|
|
3392
3392
|
TableRead: '#966919', // Network or RPCWait
|
|
@@ -7076,7 +7076,6 @@ function cleanEscapedString(input) {
|
|
|
7076
7076
|
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
7077
7077
|
}
|
|
7078
7078
|
|
|
7079
|
-
var index = 0;
|
|
7080
7079
|
var formatData = function (data, appName) {
|
|
7081
7080
|
var formattedData = (data === null || data === void 0 ? void 0 : data.universeDetails)
|
|
7082
7081
|
? formatUniverseDetails(data)
|
|
@@ -7304,6 +7303,22 @@ function getReadOnlyCluster(clusters) {
|
|
|
7304
7303
|
}
|
|
7305
7304
|
return null;
|
|
7306
7305
|
}
|
|
7306
|
+
var getAnomalyMainGraphRequestParams = function (anomalyData) {
|
|
7307
|
+
var _a;
|
|
7308
|
+
var mainGraphRequest = (_a = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _a === void 0 ? void 0 : _a.mainGraphs.map(function (graph) {
|
|
7309
|
+
var _a, _b, _c;
|
|
7310
|
+
var request = {};
|
|
7311
|
+
request.name = graph.name;
|
|
7312
|
+
request.filters = graph.filters;
|
|
7313
|
+
request.start = (_a = anomalyData.lastInstance) === null || _a === void 0 ? void 0 : _a.graphStartTime;
|
|
7314
|
+
request.end = (_b = anomalyData.lastInstance) === null || _b === void 0 ? void 0 : _b.graphEndTime;
|
|
7315
|
+
request.settings = (_c = anomalyData.lastInstance) === null || _c === void 0 ? void 0 : _c.defaultSettings;
|
|
7316
|
+
request.aggregatedLineSettings = graph.aggregatedLineSettings;
|
|
7317
|
+
request.groupBy = graph.groupBy;
|
|
7318
|
+
return request;
|
|
7319
|
+
});
|
|
7320
|
+
return mainGraphRequest;
|
|
7321
|
+
};
|
|
7307
7322
|
var getGraphRequestParams = function (anomalyData) {
|
|
7308
7323
|
var _a;
|
|
7309
7324
|
var mainGraphRequest = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.mainGraphs.map(function (graph) {
|
|
@@ -7339,58 +7354,17 @@ var getGraphRequestParams = function (anomalyData) {
|
|
|
7339
7354
|
var requestParamsList = __spreadArray(__spreadArray([], mainGraphRequest, true), supportingGraphRequest, true);
|
|
7340
7355
|
return requestParamsList;
|
|
7341
7356
|
};
|
|
7342
|
-
var
|
|
7343
|
-
var _a
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
return
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
var _a;
|
|
7351
|
-
var params = {
|
|
7352
|
-
cause: '',
|
|
7353
|
-
name: [],
|
|
7354
|
-
// Determines if we need to show groupByOperations for individual graphs
|
|
7355
|
-
groupByControl: [],
|
|
7356
|
-
description: '',
|
|
7357
|
-
index: [],
|
|
7358
|
-
rcaRecommendation: '',
|
|
7359
|
-
title: undefined
|
|
7357
|
+
var formatAnomalyMainGraphs = function (anomalyData) {
|
|
7358
|
+
var _a;
|
|
7359
|
+
var mainGraphs = (_a = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _a === void 0 ? void 0 : _a.mainGraphs;
|
|
7360
|
+
var formattedMainGraphs = mainGraphs === null || mainGraphs === void 0 ? void 0 : mainGraphs.map(function (graph, index) {
|
|
7361
|
+
return {
|
|
7362
|
+
name: graph.name,
|
|
7363
|
+
index: index + 1,
|
|
7364
|
+
groupByControl: graph.groupByControl
|
|
7360
7365
|
};
|
|
7361
|
-
params.name = [];
|
|
7362
|
-
params.groupByControl = [];
|
|
7363
|
-
params.cause = rca.possibleCause;
|
|
7364
|
-
params.description = rca.possibleCauseDescription;
|
|
7365
|
-
return (_a = rca.troubleshootingRecommendations) === null || _a === void 0 ? void 0 : _a.map(function (recommendation) {
|
|
7366
|
-
var _a;
|
|
7367
|
-
if (!recommendation.supportingGraphs) {
|
|
7368
|
-
return params;
|
|
7369
|
-
}
|
|
7370
|
-
return (_a = recommendation.supportingGraphs) === null || _a === void 0 ? void 0 : _a.map(function (graph) {
|
|
7371
|
-
params.name.push(graph.name);
|
|
7372
|
-
params.rcaRecommendation = recommendation.recommendation;
|
|
7373
|
-
if (mainGraphsLength === 1) {
|
|
7374
|
-
params.index.push(incrementIndex());
|
|
7375
|
-
}
|
|
7376
|
-
else if (mainGraphsLength > 1) {
|
|
7377
|
-
params.index.push(incrementIndex() + mainGraphsLength - 1);
|
|
7378
|
-
}
|
|
7379
|
-
params.title = graph.displayName;
|
|
7380
|
-
// For each graph, we need to determine if we need to show groupByOperations
|
|
7381
|
-
params.groupByControl.push(graph.groupByControl);
|
|
7382
|
-
return params;
|
|
7383
|
-
});
|
|
7384
|
-
});
|
|
7385
7366
|
});
|
|
7386
|
-
|
|
7387
|
-
var flattenedAnomalyRcaSet = new Set(flattenedAnomalyRca);
|
|
7388
|
-
var formattedData = Array.from(flattenedAnomalyRcaSet);
|
|
7389
|
-
return formattedData;
|
|
7390
|
-
};
|
|
7391
|
-
var incrementIndex = function () {
|
|
7392
|
-
index = index + 1;
|
|
7393
|
-
return index;
|
|
7367
|
+
return formattedMainGraphs;
|
|
7394
7368
|
};
|
|
7395
7369
|
var getAshOperations = function (metricData, graphPayload, isAdvancedView) {
|
|
7396
7370
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -8231,11 +8205,23 @@ var navigateToDrilldownView = function (appName, anomalyData, onSelectedIssue, o
|
|
|
8231
8205
|
window.location.href = drilldownViewUrl;
|
|
8232
8206
|
}
|
|
8233
8207
|
};
|
|
8234
|
-
var transformBackgroundTasks = function (response) {
|
|
8208
|
+
var transformBackgroundTasks = function (response, options) {
|
|
8235
8209
|
var _a;
|
|
8210
|
+
var _b = options !== null && options !== void 0 ? options : {}, appName = _b.appName, backgroundTasksMappingFunc = _b.backgroundTasksMappingFunc;
|
|
8211
|
+
var shouldMapYBM = appName === AppName.YBM && typeof backgroundTasksMappingFunc === 'function';
|
|
8212
|
+
var modifiedGroups = response.groups;
|
|
8213
|
+
if (shouldMapYBM) {
|
|
8214
|
+
var mapped = {};
|
|
8215
|
+
for (var _i = 0, _c = Object.entries(response.groups); _i < _c.length; _i++) {
|
|
8216
|
+
var _d = _c[_i], enumKey = _d[0], group = _d[1];
|
|
8217
|
+
var displayName = backgroundTasksMappingFunc(enumKey);
|
|
8218
|
+
mapped[displayName] = __assign(__assign({}, group), { title: displayName });
|
|
8219
|
+
}
|
|
8220
|
+
modifiedGroups = mapped;
|
|
8221
|
+
}
|
|
8236
8222
|
return {
|
|
8237
8223
|
groups: (_a = {},
|
|
8238
|
-
_a[TransformedBackgroundTasksCategory.
|
|
8224
|
+
_a[TransformedBackgroundTasksCategory.ALL_BACKGROUND_JOBS] = modifiedGroups,
|
|
8239
8225
|
_a)
|
|
8240
8226
|
};
|
|
8241
8227
|
};
|
|
@@ -71680,6 +71666,7 @@ var GraphView = React__default.memo(function (_a) {
|
|
|
71680
71666
|
}
|
|
71681
71667
|
var unit = (_e = (_d = (_c = (_b = metric.layout) === null || _b === void 0 ? void 0 : _b.yaxis) === null || _c === void 0 ? void 0 : _c.ticksuffix) === null || _d === void 0 ? void 0 : _d.replace(/( |\s)+/g, '')) !== null && _e !== void 0 ? _e : null;
|
|
71682
71668
|
var yAxisMaxValue = 0;
|
|
71669
|
+
var isQueryView = ((_f = metric === null || metric === void 0 ? void 0 : metric.layout) === null || _f === void 0 ? void 0 : _f.type) === ASH && isHistoricalQueryView;
|
|
71683
71670
|
// Data processing
|
|
71684
71671
|
var series = metric.data.map(function (dataItem, i) {
|
|
71685
71672
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
@@ -71732,9 +71719,7 @@ var GraphView = React__default.memo(function (_a) {
|
|
|
71732
71719
|
}
|
|
71733
71720
|
var dataPoints = dataItem.x.map(function (xVal, j) { return [xVal, dataItem.y[j]]; });
|
|
71734
71721
|
var seriesData = ((_j = metric === null || metric === void 0 ? void 0 : metric.layout) === null || _j === void 0 ? void 0 : _j.type) === ASH ? dataPoints : dataPoints;
|
|
71735
|
-
return __assign(__assign({ name: name, fullname: fullname,
|
|
71736
|
-
// type: metric?.layout?.type === ASH ? 'bar' : 'line',
|
|
71737
|
-
type: 'line', data: seriesData, color: (_k = NAME_COLOR_MAPPING[name]) !== null && _k !== void 0 ? _k : COLORS[i % COLORS.length] }, (dataItem['name'] === MetricConsts.NODE_AVERAGE
|
|
71722
|
+
return __assign(__assign({ name: name, fullname: fullname, type: isQueryView ? 'bar' : 'line', data: seriesData, color: (_k = NAME_COLOR_MAPPING[name]) !== null && _k !== void 0 ? _k : COLORS[i % COLORS.length] }, (dataItem['name'] === MetricConsts.NODE_AVERAGE
|
|
71738
71723
|
? { lineStyle: { type: 'dashed' } }
|
|
71739
71724
|
: {})), { tooltip: {
|
|
71740
71725
|
formatter: function (params) {
|
|
@@ -71746,11 +71731,10 @@ var GraphView = React__default.memo(function (_a) {
|
|
|
71746
71731
|
}
|
|
71747
71732
|
},
|
|
71748
71733
|
// Set stack for bar charts
|
|
71749
|
-
|
|
71750
|
-
stack: undefined, smooth: false, showSymbol: false });
|
|
71734
|
+
stack: isQueryView ? 'total' : undefined, smooth: false, showSymbol: false });
|
|
71751
71735
|
});
|
|
71752
71736
|
// Unit conversion logic
|
|
71753
|
-
if (isNonEmptyObject((
|
|
71737
|
+
if (isNonEmptyObject((_g = metric.layout) === null || _g === void 0 ? void 0 : _g.yaxis) &&
|
|
71754
71738
|
unit === 'µs' &&
|
|
71755
71739
|
isNonEmptyArray(metric.data) &&
|
|
71756
71740
|
isYAxisGreaterThanThousand(metric.data)) {
|
|
@@ -71773,7 +71757,7 @@ var GraphView = React__default.memo(function (_a) {
|
|
|
71773
71757
|
var buffer = 1.5; // 20% buffer
|
|
71774
71758
|
yAxisMaxValue = globalMaxY * buffer;
|
|
71775
71759
|
// If you want to keep your ASH logic:
|
|
71776
|
-
if (((
|
|
71760
|
+
if (((_h = metric === null || metric === void 0 ? void 0 : metric.layout) === null || _h === void 0 ? void 0 : _h.type) === ASH) {
|
|
71777
71761
|
yAxisMaxValue = globalMaxY * 4.5;
|
|
71778
71762
|
}
|
|
71779
71763
|
// Minimum yAxis max to avoid zero/flat axis
|
|
@@ -71781,7 +71765,7 @@ var GraphView = React__default.memo(function (_a) {
|
|
|
71781
71765
|
yAxisMaxValue = 1.01;
|
|
71782
71766
|
// Title formatting
|
|
71783
71767
|
var fullTitle = appName !== AppName.YBA && unit ? "".concat(titleText, " (").concat(unit, ")") : titleText;
|
|
71784
|
-
if (
|
|
71768
|
+
if (isQueryView) {
|
|
71785
71769
|
fullTitle = 'Cluster Load for Selected Query';
|
|
71786
71770
|
}
|
|
71787
71771
|
// ECharts option object
|
|
@@ -78089,7 +78073,7 @@ var QueryLevelTabletMetadata = function (_a) {
|
|
|
78089
78073
|
} }, "AccessedTablets-".concat(sortBy, "-").concat(sortDirection))] }) })] })] })] }));
|
|
78090
78074
|
};
|
|
78091
78075
|
|
|
78092
|
-
var YBStyledTab$
|
|
78076
|
+
var YBStyledTab$1 = styled$1(YBTab)(function (_a) {
|
|
78093
78077
|
var theme = _a.theme;
|
|
78094
78078
|
return ({
|
|
78095
78079
|
display: 'flex',
|
|
@@ -78277,7 +78261,7 @@ var SqlDrilldown = function (_a) {
|
|
|
78277
78261
|
: operations.uniqueOperations, registerChartInstance: function (instance) {
|
|
78278
78262
|
return registerChartInstance(instance, index);
|
|
78279
78263
|
}, 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)));
|
|
78280
|
-
}) }),
|
|
78264
|
+
}) }), jsx(YBTabs, { pill: true, value: sqlDrilldownTab, onChange: handleSqlDrilldownTabChange, children: jsx(YBStyledTab$1, { value: SqlDrilldownTabs.PERFORMANCE_METRICS, label: SqlDrilldownTabs.PERFORMANCE_METRICS }) }), sqlDrilldownTab === SqlDrilldownTabs.PERFORMANCE_METRICS && (jsx(Box$1, { className: clsx(classes.gridBox, classes.gridBoxThree), children: (_f = (fetchHistoricalQueryGraphs.isLoading
|
|
78281
78265
|
? [
|
|
78282
78266
|
{ name: 'query_latency' },
|
|
78283
78267
|
{ name: 'query_rows' },
|
|
@@ -80712,7 +80696,7 @@ var PerfAdvisorGantChart = function (_a) {
|
|
|
80712
80696
|
});
|
|
80713
80697
|
});
|
|
80714
80698
|
};
|
|
80715
|
-
// Process top-level category (
|
|
80699
|
+
// Process top-level category (All Background Tasks)
|
|
80716
80700
|
for (var _i = 0, _a = Object.entries(sourceData === null || sourceData === void 0 ? void 0 : sourceData.groups); _i < _a.length; _i++) {
|
|
80717
80701
|
var _b = _a[_i], firstLevelCategory = _b[0], firstLevelData = _b[1];
|
|
80718
80702
|
_loop_4(firstLevelCategory, firstLevelData);
|
|
@@ -80767,7 +80751,24 @@ var PerfAdvisorGantChart = function (_a) {
|
|
|
80767
80751
|
};
|
|
80768
80752
|
var updatedGroups_1 = groups;
|
|
80769
80753
|
if (showMoreOptions || isBackgroundJobs) {
|
|
80770
|
-
|
|
80754
|
+
// Identify which groups are the last child in their parent section
|
|
80755
|
+
var lastChildMap_1 = new Map();
|
|
80756
|
+
var groupedByParent_1 = new Map();
|
|
80757
|
+
groups.forEach(function (group) {
|
|
80758
|
+
if (group.parent) {
|
|
80759
|
+
if (!groupedByParent_1.has(group.parent)) {
|
|
80760
|
+
groupedByParent_1.set(group.parent, []);
|
|
80761
|
+
}
|
|
80762
|
+
groupedByParent_1.get(group.parent).push(group);
|
|
80763
|
+
}
|
|
80764
|
+
});
|
|
80765
|
+
groupedByParent_1.forEach(function (children) {
|
|
80766
|
+
if (children.length > 0) {
|
|
80767
|
+
var lastChild = children[children.length - 1];
|
|
80768
|
+
lastChildMap_1.set(lastChild.id, true);
|
|
80769
|
+
}
|
|
80770
|
+
});
|
|
80771
|
+
var updatedGroups_2 = groups.map(function (group, index) {
|
|
80771
80772
|
var _a, _b, _c, _d;
|
|
80772
80773
|
// Check if the group has further descendants
|
|
80773
80774
|
var hasDescendants = ((_a = subCategoriesMap[group.id]) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
@@ -80805,13 +80806,14 @@ var PerfAdvisorGantChart = function (_a) {
|
|
|
80805
80806
|
nestingMarginLeft = 44;
|
|
80806
80807
|
}
|
|
80807
80808
|
var marginLeft = "margin-left: ".concat(nestingMarginLeft, "px;");
|
|
80808
|
-
|
|
80809
|
-
var
|
|
80810
|
-
? 'border-left: 2px solid #E9EEF2; height: 100%;'
|
|
80811
|
-
: '';
|
|
80812
|
-
var categoryClass = "".concat(marginLeft).concat(borderLeft).concat(colorStyle).concat(fontStyle);
|
|
80809
|
+
var extraPadding = isLevel2BgJob ? 'padding-left: 24px;' : '';
|
|
80810
|
+
var categoryClass = "".concat(marginLeft).concat(extraPadding).concat(colorStyle).concat(fontStyle);
|
|
80813
80811
|
var backgroundClass = '';
|
|
80814
80812
|
var groupOneCategoryName = '';
|
|
80813
|
+
// Add a class to indicate if this item should have a left border
|
|
80814
|
+
// Border will be handled via CSS with ::before pseudo-element to control height
|
|
80815
|
+
var shouldHaveBorder = (!hasDescendants && group.categoryLevel === 3) || isLevel2BgJob;
|
|
80816
|
+
var isLastInSection = lastChildMap_1.get(group.id) === true;
|
|
80815
80817
|
if (rootParent) {
|
|
80816
80818
|
switch (rootParent) {
|
|
80817
80819
|
case AnomalyCategory.DB:
|
|
@@ -80834,9 +80836,9 @@ var PerfAdvisorGantChart = function (_a) {
|
|
|
80834
80836
|
backgroundClass = 'infra-background';
|
|
80835
80837
|
groupOneCategoryName = 'Infrastructure';
|
|
80836
80838
|
break;
|
|
80837
|
-
case TransformedBackgroundTasksCategory.
|
|
80839
|
+
case TransformedBackgroundTasksCategory.ALL_BACKGROUND_JOBS:
|
|
80838
80840
|
backgroundClass = 'bg-jobs-background';
|
|
80839
|
-
groupOneCategoryName = '
|
|
80841
|
+
groupOneCategoryName = 'All Background Jobs';
|
|
80840
80842
|
break;
|
|
80841
80843
|
}
|
|
80842
80844
|
}
|
|
@@ -80859,7 +80861,13 @@ var PerfAdvisorGantChart = function (_a) {
|
|
|
80859
80861
|
var groupContent = '';
|
|
80860
80862
|
if (isLevel2BgJob) {
|
|
80861
80863
|
var name_1 = (_c = group.name) !== null && _c !== void 0 ? _c : '';
|
|
80862
|
-
|
|
80864
|
+
// Note: Classes added in HTML get stripped by vis-timeline, so we add them via JavaScript
|
|
80865
|
+
var nameElement = "<a title=\"".concat(name_1, "\">").concat(name_1, "</a>");
|
|
80866
|
+
// Count badge element (right side)
|
|
80867
|
+
var countBadgeElement = group.categoryCount
|
|
80868
|
+
? "<span>".concat(group.categoryCount, "</span>")
|
|
80869
|
+
: '';
|
|
80870
|
+
groupContent = "".concat(nameElement).concat(countBadgeElement);
|
|
80863
80871
|
}
|
|
80864
80872
|
else if (hasDescendants) {
|
|
80865
80873
|
var name_2 = (_d = group.name) !== null && _d !== void 0 ? _d : '';
|
|
@@ -80884,7 +80892,12 @@ var PerfAdvisorGantChart = function (_a) {
|
|
|
80884
80892
|
: '';
|
|
80885
80893
|
groupContent = "<a title=\"".concat(group.content, "\">").concat(icon).concat(displayContent, "</a>").concat(countBadge);
|
|
80886
80894
|
}
|
|
80887
|
-
|
|
80895
|
+
// Determine border class: last item in section gets different class for bottom spacing
|
|
80896
|
+
var borderClass = '';
|
|
80897
|
+
if (shouldHaveBorder) {
|
|
80898
|
+
borderClass = isLastInSection ? 'has-left-border-last' : 'has-left-border';
|
|
80899
|
+
}
|
|
80900
|
+
return __assign(__assign({}, group), { content: groupContent, className: [rowClass, backgroundClass, borderClass].filter(Boolean).join(' '),
|
|
80888
80901
|
// Have added border-right, border-top, border-bottom to .vis-labelset .vis-label, otherwise the below border-left does not work
|
|
80889
80902
|
style: categoryClass, visible: group.parent ? expandedCategories[group.parent] : true });
|
|
80890
80903
|
});
|
|
@@ -80939,7 +80952,7 @@ var PerfAdvisorGantChart = function (_a) {
|
|
|
80939
80952
|
case AnomalyCategory.INFRA:
|
|
80940
80953
|
itemColor = NAME_COLOR_MAPPING[AnomalyCategory.INFRA]; // Yellow for APP and its descendants
|
|
80941
80954
|
break;
|
|
80942
|
-
case
|
|
80955
|
+
case TransformedBackgroundTasksCategory.ALL_BACKGROUND_JOBS:
|
|
80943
80956
|
itemColor = NAME_COLOR_MAPPING[BackgroundJobCategory.BACKGROUND_JOBS];
|
|
80944
80957
|
break;
|
|
80945
80958
|
}
|
|
@@ -81052,8 +81065,21 @@ var PerfAdvisorGantChart = function (_a) {
|
|
|
81052
81065
|
appClass.forEach(function (el) { return el.classList.add('app-inner-background'); });
|
|
81053
81066
|
var infraClass = document.querySelectorAll('.vis-label.infra-background .vis-inner span');
|
|
81054
81067
|
infraClass.forEach(function (el) { return el.classList.add('infra-inner-background'); });
|
|
81055
|
-
var
|
|
81056
|
-
|
|
81068
|
+
var bgJobsRowsLevel1 = document.querySelectorAll('.vis-label.bg-jobs-background.custom-group-row-1 .vis-inner');
|
|
81069
|
+
bgJobsRowsLevel1.forEach(function (innerEl) {
|
|
81070
|
+
var span = innerEl.querySelector('span');
|
|
81071
|
+
if (span)
|
|
81072
|
+
span.classList.add('bg-job-count-styled');
|
|
81073
|
+
});
|
|
81074
|
+
var bgJobsRowsLevel2 = document.querySelectorAll('.vis-label.bg-jobs-background.custom-group-row-2 .vis-inner');
|
|
81075
|
+
bgJobsRowsLevel2.forEach(function (innerEl) {
|
|
81076
|
+
var anchor = innerEl.querySelector('a');
|
|
81077
|
+
var span = innerEl.querySelector('span');
|
|
81078
|
+
if (anchor)
|
|
81079
|
+
anchor.classList.add('bg-job-name-styled');
|
|
81080
|
+
if (span)
|
|
81081
|
+
span.classList.add('bg-job-count-styled');
|
|
81082
|
+
});
|
|
81057
81083
|
if ((showMoreOptions || isBackgroundJobs) && !isInsightsTab) {
|
|
81058
81084
|
insertCustomGroupSeparators(); // Second call
|
|
81059
81085
|
}
|
|
@@ -81159,10 +81185,9 @@ var PerfAdvisorGantChart = function (_a) {
|
|
|
81159
81185
|
]);
|
|
81160
81186
|
// Function to insert custom group separators on left, right, top and bottom side of the chart
|
|
81161
81187
|
function insertCustomGroupSeparators() {
|
|
81162
|
-
var _a, _b, _c, _d
|
|
81163
|
-
// Remove all existing separators
|
|
81188
|
+
var _a, _b, _c, _d;
|
|
81164
81189
|
document
|
|
81165
|
-
.querySelectorAll('.custom-group-separator-left, .custom-group-separator-right, .custom-group-separator-
|
|
81190
|
+
.querySelectorAll('.custom-group-separator-left, .custom-group-separator-right, .custom-group-separator-bottom')
|
|
81166
81191
|
.forEach(function (el) { return el.remove(); });
|
|
81167
81192
|
var group1Labels = Array.from(document.querySelectorAll('.vis-labelset .vis-label.custom-group-row-1'));
|
|
81168
81193
|
group1Labels.forEach(function (labelEl, idx) {
|
|
@@ -81183,25 +81208,18 @@ var PerfAdvisorGantChart = function (_a) {
|
|
|
81183
81208
|
fgContainer.appendChild(barSep);
|
|
81184
81209
|
}
|
|
81185
81210
|
});
|
|
81186
|
-
// Step 3: Insert top separator (above first label)
|
|
81187
|
-
var firstLabel = group1Labels[0];
|
|
81188
|
-
if (!((_a = firstLabel.previousElementSibling) === null || _a === void 0 ? void 0 : _a.classList.contains('custom-group-separator-top'))) {
|
|
81189
|
-
var firstTopLine = document.createElement('div');
|
|
81190
|
-
firstTopLine.className = 'custom-group-separator-top';
|
|
81191
|
-
(_b = firstLabel.parentNode) === null || _b === void 0 ? void 0 : _b.insertBefore(firstTopLine, firstLabel);
|
|
81192
|
-
}
|
|
81193
81211
|
var lastLabel = group1Labels[group1Labels.length - 1];
|
|
81194
81212
|
var insertAfterEl = getTrueBottomInsertPoint(lastLabel);
|
|
81195
81213
|
// Only insert if not already present
|
|
81196
|
-
if (!((
|
|
81197
|
-
!((
|
|
81214
|
+
if (!((_a = insertAfterEl === null || insertAfterEl === void 0 ? void 0 : insertAfterEl.previousElementSibling) === null || _a === void 0 ? void 0 : _a.classList.contains('custom-group-separator-bottom')) &&
|
|
81215
|
+
!((_b = lastLabel.nextElementSibling) === null || _b === void 0 ? void 0 : _b.classList.contains('custom-group-separator-bottom'))) {
|
|
81198
81216
|
var lastBottomLine = document.createElement('div');
|
|
81199
81217
|
lastBottomLine.className = 'custom-group-separator-bottom';
|
|
81200
81218
|
if (insertAfterEl) {
|
|
81201
|
-
(
|
|
81219
|
+
(_c = lastLabel.parentNode) === null || _c === void 0 ? void 0 : _c.insertBefore(lastBottomLine, insertAfterEl);
|
|
81202
81220
|
}
|
|
81203
81221
|
else {
|
|
81204
|
-
(
|
|
81222
|
+
(_d = lastLabel.parentNode) === null || _d === void 0 ? void 0 : _d.appendChild(lastBottomLine);
|
|
81205
81223
|
}
|
|
81206
81224
|
}
|
|
81207
81225
|
// Find the real last top-level label (skip over its children)
|
|
@@ -81223,7 +81241,7 @@ var PerfAdvisorGantChart = function (_a) {
|
|
|
81223
81241
|
}
|
|
81224
81242
|
return (jsxs(Box$1, { id: name, children: [jsx("div", { ref: timelineRef, style: {
|
|
81225
81243
|
backgroundColor: '#FFFFFF'
|
|
81226
|
-
} }, 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));
|
|
81244
|
+
} }, 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 {\n /* Performance optimizations for smoother repaints */\n transform: translateZ(0);\n backface-visibility: hidden;\n }\n .vis-labelset .vis-label {\n border-right: 0px solid #ccc !important;\n border-bottom: none;\n border-top: none;\n /* Disable transitions to prevent visual shift */\n transition: none !important;\n animation: none !important;\n /* Performance hint */\n contain: layout style;\n }\n .vis-labelset .vis-label.has-left-border {\n position: relative;\n }\n .vis-labelset .vis-label.has-left-border::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 2px;\n background-color: #E9EEF2;\n }\n .vis-labelset .vis-label.has-left-border-last {\n position: relative;\n }\n .vis-labelset .vis-label.has-left-border-last::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n bottom: 8px;\n width: 2px;\n background-color: #E9EEF2;\n }\n .vis-timeline {\n background-color: #FFFFFF !important;\n border: 0px solid #ccc !important;\n visibility: visible !important;\n /* Performance hints for smoother DOM updates */\n will-change: contents;\n contain: layout style paint;\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-label.bg-jobs-background.custom-group-row-2 .vis-inner span:not(.bg-job-count) {\n padding: 0 !important;\n height: auto !important;\n width: auto !important;\n border-radius: 0 !important;\n background: none !important;\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 .vis-labelset .vis-label.custom-group-row-1:first-of-type {\n border-top: 1px solid #D7DEE4 !important;\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 .vis-label.bg-jobs-background .vis-inner span.bg-job-count.bg-jobs-inner-background {\n background-color: #E9EEF2 !important;\n color: #4E5F6D !important;\n border-radius: 4px !important;\n display: inline-flex !important;\n align-items: center !important;\n justify-content: center !important;\n min-width: 20px !important;\n height: 20px !important;\n padding: 0 4px !important;\n }\n .vis-time-axis .vis-text {\n font-family: Inter;\n font-size: 11px;\n font-weight: 400;\n }\n \n /* Background Jobs Level 2 - Name styling (JavaScript-added class) */\n .vis-labelset .vis-label.bg-jobs-background.custom-group-row-2 .vis-inner a.bg-job-name-styled,\n .vis-label.bg-jobs-background.custom-group-row-2 .vis-inner a.bg-job-name-styled {\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n flex: 1 1 auto !important;\n min-width: 0 !important;\n max-width: calc(100% - 44px) !important;\n display: block !important;\n text-decoration: none !important;\n width: auto !important;\n margin-right: 24px !important;\n }\n \n /* Background Jobs Level 1 & 2 - Count badge styling (JavaScript-added class) */\n .vis-labelset .vis-label.bg-jobs-background.custom-group-row-1 .vis-inner span.bg-job-count-styled,\n .vis-label.bg-jobs-background.custom-group-row-1 .vis-inner span.bg-job-count-styled,\n .vis-labelset .vis-label.bg-jobs-background.custom-group-row-2 .vis-inner span.bg-job-count-styled,\n .vis-label.bg-jobs-background.custom-group-row-2 .vis-inner span.bg-job-count-styled {\n display: inline-flex !important;\n align-items: center !important;\n justify-content: center !important;\n min-width: 20px !important;\n height: 20px !important;\n width: auto !important;\n background-color: #E9EEF2 !important;\n border-radius: 4px !important;\n color: #4E5F6D !important;\n font-size: 11.5px !important;\n font-weight: 500 !important;\n line-height: 20px !important;\n padding: 0 4px !important;\n box-sizing: border-box !important;\n flex-shrink: 0 !important;\n flex-grow: 0 !important;\n }\n " })] }, name));
|
|
81227
81245
|
};
|
|
81228
81246
|
|
|
81229
81247
|
var OtherDrilldown = function (_a) {
|
|
@@ -81437,7 +81455,7 @@ var BOTTOM_MARGIN = 10;
|
|
|
81437
81455
|
var SIZE_BAR_COLOR = '#8DABF0'; // Default gray color
|
|
81438
81456
|
var MAX_SIZE_BAR_COLOR = '#F9ACAC'; // Slightly red color for max size
|
|
81439
81457
|
var SizeBarChart = function (_a) {
|
|
81440
|
-
var size = _a.size, maxSize = _a.maxSize;
|
|
81458
|
+
var size = _a.size, maxSize = _a.maxSize, isHotTablet = _a.isHotTablet;
|
|
81441
81459
|
var chartRef = useRef(null);
|
|
81442
81460
|
var barHeight = 40;
|
|
81443
81461
|
useEffect(function () {
|
|
@@ -81456,7 +81474,7 @@ var SizeBarChart = function (_a) {
|
|
|
81456
81474
|
label: { show: false },
|
|
81457
81475
|
data: [size],
|
|
81458
81476
|
itemStyle: {
|
|
81459
|
-
color: isMaxSize ? MAX_SIZE_BAR_COLOR : SIZE_BAR_COLOR
|
|
81477
|
+
color: isMaxSize && !isHotTablet ? MAX_SIZE_BAR_COLOR : SIZE_BAR_COLOR
|
|
81460
81478
|
}
|
|
81461
81479
|
}
|
|
81462
81480
|
];
|
|
@@ -81669,7 +81687,14 @@ var TabletMetadata = function (_a) {
|
|
|
81669
81687
|
((_f = (_e = (_d = data === null || data === void 0 ? void 0 : data.pages) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.entities)) {
|
|
81670
81688
|
if (isHotTablet && sortBy === TABLETS_COLUMNS.EPS) {
|
|
81671
81689
|
setMaxEPS((_l = (_k = (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.pages) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.data) === null || _j === void 0 ? void 0 : _j.entities[0]) === null || _k === void 0 ? void 0 : _k.eps) !== null && _l !== void 0 ? _l : 1);
|
|
81672
|
-
|
|
81690
|
+
var tabletEntities = (_p = (_o = (_m = data === null || data === void 0 ? void 0 : data.pages) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.data) === null || _p === void 0 ? void 0 : _p.entities;
|
|
81691
|
+
var tabletEntity = tabletEntities.find(function (entity) { return entity.tabletId === tabletId; });
|
|
81692
|
+
if (!tabletEntity) {
|
|
81693
|
+
tabletEntity = tabletEntities[0];
|
|
81694
|
+
}
|
|
81695
|
+
var maxSize = tabletEntities.reduce(function (max, entity) { return Math.max(max, entity.size); }, 0);
|
|
81696
|
+
setTabletMaxSize(maxSize);
|
|
81697
|
+
setAnomalyTabletData(tabletEntity);
|
|
81673
81698
|
}
|
|
81674
81699
|
else if (!isHotTablet && sortBy === TABLETS_COLUMNS.SIZE) {
|
|
81675
81700
|
setTabletMaxSize((_u = (_t = (_s = (_r = (_q = data === null || data === void 0 ? void 0 : data.pages) === null || _q === void 0 ? void 0 : _q[0]) === null || _r === void 0 ? void 0 : _r.data) === null || _s === void 0 ? void 0 : _s.entities[0]) === null || _t === void 0 ? void 0 : _t.size) !== null && _u !== void 0 ? _u : 1);
|
|
@@ -81796,7 +81821,7 @@ var TabletMetadata = function (_a) {
|
|
|
81796
81821
|
className: helperClasses.tabletNodeLoadMetadataTableCell
|
|
81797
81822
|
}); },
|
|
81798
81823
|
customBodyRender: function (value) {
|
|
81799
|
-
return (jsxs(Box$1, { display: "flex", flexDirection: 'row', alignItems: 'center', children: [jsx("span", { children: isNonEmptyString(value) ? value : '-' }),
|
|
81824
|
+
return (jsxs(Box$1, { display: "flex", flexDirection: 'row', alignItems: 'center', children: [jsx("span", { children: isNonEmptyString(value) ? value : '-' }), value === (anomalyTabletData === null || anomalyTabletData === void 0 ? void 0 : anomalyTabletData.tabletId) && (jsx(SvgAlertCircle, { style: { marginLeft: '4px' } }))] }));
|
|
81800
81825
|
}
|
|
81801
81826
|
}
|
|
81802
81827
|
},
|
|
@@ -81821,11 +81846,7 @@ var TabletMetadata = function (_a) {
|
|
|
81821
81846
|
}); },
|
|
81822
81847
|
customHeadRender: function () { return (jsx(YBTooltip, { title: TOOLTIP_TEXT.SIZE_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.SIZE }), jsx("img", { src: InfoMessageIcon, alt: "info", className: helperClasses.infoIcon })] }) })); },
|
|
81823
81848
|
customBodyRender: function (value) {
|
|
81824
|
-
|
|
81825
|
-
return jsx(SizeBarChart, { size: value, maxSize: tabletMaxSize });
|
|
81826
|
-
}
|
|
81827
|
-
var formattedSize = formatBytes(value);
|
|
81828
|
-
return isNonEmptyString(formattedSize) ? formattedSize : '-';
|
|
81849
|
+
return jsx(SizeBarChart, { size: value, maxSize: tabletMaxSize, isHotTablet: isHotTablet });
|
|
81829
81850
|
}
|
|
81830
81851
|
}
|
|
81831
81852
|
},
|
|
@@ -82105,12 +82126,156 @@ var TabletDrilldown = function (_a) {
|
|
|
82105
82126
|
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 })) }));
|
|
82106
82127
|
};
|
|
82107
82128
|
|
|
82129
|
+
styled$1(YBTab)(function (_a) {
|
|
82130
|
+
var theme = _a.theme;
|
|
82131
|
+
return ({
|
|
82132
|
+
display: 'flex',
|
|
82133
|
+
flexDirection: 'row',
|
|
82134
|
+
alignItems: 'center',
|
|
82135
|
+
padding: theme.spacing(0.5, 1),
|
|
82136
|
+
'& .yb-MuiTab-iconWrapper': {
|
|
82137
|
+
marginTop: theme.spacing(0.5)
|
|
82138
|
+
}
|
|
82139
|
+
});
|
|
82140
|
+
});
|
|
82141
|
+
var AnomalyRCAGraphs = function (_a) {
|
|
82142
|
+
var _b, _c, _d;
|
|
82143
|
+
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, formattedMainGraphs = _a.formattedMainGraphs, urlParams = _a.urlParams, onEChartsDateSelect = _a.onEChartsDateSelect;
|
|
82144
|
+
// Ref to store chart instances
|
|
82145
|
+
var chartInstancesRef = useRef([]);
|
|
82146
|
+
var classes = useHelperStyles();
|
|
82147
|
+
var _e = useState(0), selectedTab = _e[0]; _e[1];
|
|
82148
|
+
var _f = useState(null), RCAGraphResponseData = _f[0], setRCAGraphResponseData = _f[1];
|
|
82149
|
+
var _g = useState(amomalyGraphRequestParams), graphRequestParams = _g[0], setGraphRequestParams = _g[1];
|
|
82150
|
+
var _h = getClusterDetails(), universeUuid = _h.universeUuid, cluster = _h.cluster, region = _h.region, zone = _h.zone, node = _h.node, numNodes = _h.numNodes, outlierType = _h.outlierType;
|
|
82151
|
+
// Check previous props
|
|
82152
|
+
var previousMetricMeasure = usePrevious(metricMeasure);
|
|
82153
|
+
var onSelectAshLabel = function (groupByLabel, metricData, isAdvancedView) {
|
|
82154
|
+
var _a, _b;
|
|
82155
|
+
var groupBy = WaitEventClassification.WAIT_EVENT_COMPONENT;
|
|
82156
|
+
if (groupByLabel === 'Class') {
|
|
82157
|
+
groupBy = WaitEventClassification.WAIT_EVENT_CLASS;
|
|
82158
|
+
}
|
|
82159
|
+
else if (groupByLabel === 'Type') {
|
|
82160
|
+
groupBy = WaitEventClassification.WAIT_EVENT_TYPE;
|
|
82161
|
+
}
|
|
82162
|
+
else if (groupByLabel === 'Event') {
|
|
82163
|
+
groupBy = WaitEventClassification.WAIT_EVENT;
|
|
82164
|
+
}
|
|
82165
|
+
else if (groupByLabel === 'Query') {
|
|
82166
|
+
groupBy = WaitEventClassification.QUERY_ID;
|
|
82167
|
+
}
|
|
82168
|
+
else if (groupByLabel === 'Client IP') {
|
|
82169
|
+
groupBy = WaitEventClassification.CLIENT_NODE_IP;
|
|
82170
|
+
}
|
|
82171
|
+
if (((_a = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _a === void 0 ? void 0 : _a.category) &&
|
|
82172
|
+
((_b = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _b === void 0 ? void 0 : _b.category) !== AnomalyCategory.DB) {
|
|
82173
|
+
var graphParamsCopy = JSON.parse(JSON.stringify(graphRequestParams));
|
|
82174
|
+
var ashGraph_1 = graphParamsCopy === null || graphParamsCopy === void 0 ? void 0 : graphParamsCopy.find(function (queryParams, idx) {
|
|
82175
|
+
return idx > 0 && queryParams.name === (metricData === null || metricData === void 0 ? void 0 : metricData.name);
|
|
82176
|
+
});
|
|
82177
|
+
if (ashGraph_1) {
|
|
82178
|
+
ashGraph_1.groupBy = [groupBy];
|
|
82179
|
+
}
|
|
82180
|
+
graphParamsCopy.map(function (obj, paramsIdx) {
|
|
82181
|
+
if (paramsIdx > 0 && obj.name === (metricData === null || metricData === void 0 ? void 0 : metricData.name)) {
|
|
82182
|
+
return ashGraph_1;
|
|
82183
|
+
}
|
|
82184
|
+
return obj;
|
|
82185
|
+
});
|
|
82186
|
+
setGraphRequestParams(graphParamsCopy);
|
|
82187
|
+
fetchAnomalyGraphs.mutate(graphParamsCopy);
|
|
82188
|
+
}
|
|
82189
|
+
};
|
|
82190
|
+
useEffect(function () {
|
|
82191
|
+
var _a;
|
|
82192
|
+
if (previousMetricMeasure && previousMetricMeasure !== metricMeasure) {
|
|
82193
|
+
setRCAGraphResponseData(null);
|
|
82194
|
+
}
|
|
82195
|
+
var graphParamsCopy = JSON.parse(JSON.stringify(graphRequestParams));
|
|
82196
|
+
var clusterDetails = getClusterDetails();
|
|
82197
|
+
var payload = getQueryParams(false, false, 0, clusterDetails, graphParamsCopy, __assign(__assign({}, urlParams), { type: (_a = urlParams.type) !== null && _a !== void 0 ? _a : null }));
|
|
82198
|
+
var actualQueryParams = payload !== null && payload !== void 0 ? payload : graphRequestParams;
|
|
82199
|
+
setGraphRequestParams(actualQueryParams);
|
|
82200
|
+
fetchAnomalyGraphs.mutate(actualQueryParams);
|
|
82201
|
+
}, [metricMeasure, startTime, endTime, region, cluster, zone, node, outlierType, numNodes]);
|
|
82202
|
+
var fetchAnomalyGraphs = useMutation({
|
|
82203
|
+
// @ts-ignore
|
|
82204
|
+
mutationKey: ['fetchAnomalyGraphs'],
|
|
82205
|
+
mutationFn: function (params) {
|
|
82206
|
+
return PerfAdvisorAPI.fetchGraphs(universeUuid, params, apiUrl, 'fetchAnomalyGraphs');
|
|
82207
|
+
},
|
|
82208
|
+
onSuccess: function (data) {
|
|
82209
|
+
setRCAGraphResponseData(data);
|
|
82210
|
+
},
|
|
82211
|
+
onError: function (error) {
|
|
82212
|
+
console.error('Failed to fetch RCA graphs', error);
|
|
82213
|
+
}
|
|
82214
|
+
});
|
|
82215
|
+
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;
|
|
82216
|
+
var renderGraphs = function (graphResponseData, uniqueOperations, groupByOperations, graphType, index, graphTitle) {
|
|
82217
|
+
return (jsx(Box$1, { mr: 8, children: jsx(GraphView, { metricData: graphResponseData, metricKey: graphResponseData.name, graphTitle: graphTitle, containerWidth: null, loading: fetchAnomalyGraphs.isLoading, dateTimeRange: dateTimeRange, metricMeasure: metricMeasure, operations: uniqueOperations, groupByOperations: groupByOperations, registerChartInstance: function (instance) {
|
|
82218
|
+
return registerChartInstance(instance, index);
|
|
82219
|
+
}, isRecommendationGraph: true, appName: appName, graphType: graphType, timezone: timezone, onSelectAshLabel: onSelectAshLabel, onEChartsDateSelect: onEChartsDateSelect }, "".concat(metricMeasure, "-").concat(graphResponseData.name)) }));
|
|
82220
|
+
};
|
|
82221
|
+
// const filteredRecommendationMetrics = formattedAnomalyRca?.filter(
|
|
82222
|
+
// (item: FormattedAnomalyRca) => item?.name?.length > 0
|
|
82223
|
+
// );
|
|
82224
|
+
// Reset chart instances on metricMeasure change
|
|
82225
|
+
useEffect(function () {
|
|
82226
|
+
chartInstancesRef.current = [];
|
|
82227
|
+
}, [metricMeasure]);
|
|
82228
|
+
// Callback to register chart instance from each child
|
|
82229
|
+
var registerChartInstance = function (instance, index) {
|
|
82230
|
+
chartInstancesRef.current[index] = instance;
|
|
82231
|
+
};
|
|
82232
|
+
// Connect axis pointer after charts are registered
|
|
82233
|
+
useEffect(function () {
|
|
82234
|
+
if (fetchAnomalyGraphs.isSuccess && RCAGraphResponseData && RCAGraphResponseData.length > 0) {
|
|
82235
|
+
connect(chartInstancesRef.current);
|
|
82236
|
+
}
|
|
82237
|
+
return function () {
|
|
82238
|
+
disconnect(chartInstancesRef.current);
|
|
82239
|
+
};
|
|
82240
|
+
}, [fetchAnomalyGraphs.isSuccess, RCAGraphResponseData, selectedTab]);
|
|
82241
|
+
return (jsx(Box$1, { children: jsxs(Box$1, { children: [fetchAnomalyGraphs.isError && (jsxs(Box$1, { mt: 4, children: [(appName === AppName.YBA || appName === AppName.WEB) && (jsx(YBErrorIndicator, { customErrorMessage: isNonEmptyString(fetchAnomalyGraphsErrorMessage)
|
|
82242
|
+
? fetchAnomalyGraphsErrorMessage
|
|
82243
|
+
: DEFAULT_ERROR_MESSAGES.RCA_GRAPHS_FETCH_ERROR })), appName === AppName.YBM && (jsx(GenericFailure, { text: isNonEmptyString(fetchAnomalyGraphsErrorMessage)
|
|
82244
|
+
? fetchAnomalyGraphsErrorMessage
|
|
82245
|
+
: DEFAULT_ERROR_MESSAGES.RCA_GRAPHS_FETCH_ERROR }))] })), jsx(Box$1, { children: isNonEmptyArray(formattedMainGraphs) && (jsx(Box$1, { style: {
|
|
82246
|
+
border: '1px solid #E9EEF2',
|
|
82247
|
+
borderRadius: '8px',
|
|
82248
|
+
backgroundColor: '#FFFFFF',
|
|
82249
|
+
padding: '16px'
|
|
82250
|
+
}, children: jsx(Box$1, { className: (formattedMainGraphs === null || formattedMainGraphs === void 0 ? void 0 : formattedMainGraphs.length) > 1
|
|
82251
|
+
? clsx(classes.gridBox, classes.gridBoxDouble)
|
|
82252
|
+
: '', children: formattedMainGraphs === null || formattedMainGraphs === void 0 ? void 0 : formattedMainGraphs.map(function (item) {
|
|
82253
|
+
var _a;
|
|
82254
|
+
var metricData = RCAGraphResponseData === null || RCAGraphResponseData === void 0 ? void 0 : RCAGraphResponseData.find(function (data) { return data.name === item.name; });
|
|
82255
|
+
var title = metricData === null || metricData === void 0 ? void 0 : metricData.layout.title;
|
|
82256
|
+
var shouldShowGroupbyOperations = item.groupByControl;
|
|
82257
|
+
var operations = metricData
|
|
82258
|
+
? getOperations(metricMeasure, metricData, GraphType.MAIN_RCA, shouldShowGroupbyOperations, amomalyGraphRequestParams)
|
|
82259
|
+
: { uniqueOperations: [], groupByOperations: [] };
|
|
82260
|
+
// Skip rendering if there's an error message
|
|
82261
|
+
if (isNonEmptyString((_a = metricData === null || metricData === void 0 ? void 0 : metricData.errorMessage) !== null && _a !== void 0 ? _a : '') || !metricData) {
|
|
82262
|
+
return jsx(Box$1, {}, "error-".concat(item.index));
|
|
82263
|
+
}
|
|
82264
|
+
return (jsx(Box$1, { id: "main-graph-".concat(item.index), style: {
|
|
82265
|
+
border: (formattedMainGraphs === null || formattedMainGraphs === void 0 ? void 0 : formattedMainGraphs.length) > 1 ? '1px solid #E9EEF2' : 'none',
|
|
82266
|
+
borderRadius: (formattedMainGraphs === null || formattedMainGraphs === void 0 ? void 0 : formattedMainGraphs.length) > 1 ? '8px' : 'none'
|
|
82267
|
+
}, children: renderGraphs(metricData, operations.uniqueOperations, operations.groupByOperations, GraphType.MAIN_RCA, item.index, title) }, "graph-".concat(item.index)));
|
|
82268
|
+
}) }) })) })] }) }));
|
|
82269
|
+
};
|
|
82270
|
+
|
|
82108
82271
|
var AnomalyRouter = function (_a) {
|
|
82109
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
82110
|
-
var metricMeasure = _a.metricMeasure, appName = _a.appName, timezone = _a.timezone, universeQueryStatsData = _a.universeQueryStatsData, amomalyGraphRequestParams = _a.amomalyGraphRequestParams
|
|
82111
|
-
var
|
|
82112
|
-
var
|
|
82113
|
-
var
|
|
82272
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
82273
|
+
var metricMeasure = _a.metricMeasure, appName = _a.appName, timezone = _a.timezone, universeQueryStatsData = _a.universeQueryStatsData, amomalyGraphRequestParams = _a.amomalyGraphRequestParams, 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;
|
|
82274
|
+
var _x = useState([]); _x[0]; var setFilteredLegends = _x[1];
|
|
82275
|
+
var _y = useState(ALL.toUpperCase()), dbWaitEventType = _y[0], setDbWaitEventType = _y[1];
|
|
82276
|
+
var _z = useState(GROUP_BY_OPERATIONS[0]), groupByOperation = _z[0], setGroupByOperation = _z[1];
|
|
82277
|
+
var formattedMainGraphs = formatAnomalyMainGraphs(anomalyData);
|
|
82278
|
+
var anomalyMainGraphRequestParams = getAnomalyMainGraphRequestParams(anomalyData);
|
|
82114
82279
|
var onFilterBarData = function (data) {
|
|
82115
82280
|
setFilteredLegends(data);
|
|
82116
82281
|
};
|
|
@@ -82127,13 +82292,16 @@ var AnomalyRouter = function (_a) {
|
|
|
82127
82292
|
onChangeDbWaitEventType(DB_WAIT_EVENT_TYPE_MAPPING.CPU.toUpperCase());
|
|
82128
82293
|
}
|
|
82129
82294
|
}, [anomalyData]);
|
|
82130
|
-
|
|
82131
|
-
|
|
82132
|
-
|
|
82133
|
-
|
|
82295
|
+
var isNodeAnomalyWithoutSlowDisks = ((_b = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _b === void 0 ? void 0 : _b.category) === AnomalyCategory.NODE &&
|
|
82296
|
+
((_c = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _c === void 0 ? void 0 : _c.type) !== AnomalyType.SLOW_DISKS;
|
|
82297
|
+
var isAppAnomaly = ((_d = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _d === void 0 ? void 0 : _d.category) === AnomalyCategory.APP;
|
|
82298
|
+
var isTabletAnomaly = ((_e = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _e === void 0 ? void 0 : _e.category) === AnomalyCategory.DB &&
|
|
82299
|
+
(((_f = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _f === void 0 ? void 0 : _f.type) === AnomalyType.HOT_TABLET ||
|
|
82300
|
+
((_g = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _g === void 0 ? void 0 : _g.type) === AnomalyType.LARGE_TABLET);
|
|
82301
|
+
return (jsxs(Box$1, { children: [((_h = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _h === void 0 ? void 0 : _h.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 })), isNodeAnomalyWithoutSlowDisks && (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 })), isAppAnomaly && (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 })), isTabletAnomaly && (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 &&
|
|
82134
82302
|
((_q = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _q === void 0 ? void 0 : _q.type) === AnomalyType.RANGE_SHARDING) ||
|
|
82135
82303
|
(((_r = anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.lastInstance) === null || _r === void 0 ? void 0 : _r.category) === AnomalyCategory.NODE &&
|
|
82136
|
-
((_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 }))] }));
|
|
82304
|
+
((_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 })), (isNodeAnomalyWithoutSlowDisks || isAppAnomaly || isTabletAnomaly) && (jsxs(Box$1, { mt: 2, children: [jsx(Typography$1, { variant: "h5", children: 'Observed Anomaly' }), jsx(Box$1, { mt: 1, children: jsx(AnomalyRCAGraphs, { appName: appName, timezone: timezone, startTime: (_u = (_t = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.startDateTime) === null || _t === void 0 ? void 0 : _t.toISOString()) !== null && _u !== void 0 ? _u : null, endTime: (_w = (_v = dateTimeRange === null || dateTimeRange === void 0 ? void 0 : dateTimeRange.endDateTime) === null || _v === void 0 ? void 0 : _v.toISOString()) !== null && _w !== void 0 ? _w : null, anomalyData: anomalyData, getClusterDetails: getClusterDetails, apiUrl: apiUrl, dateTimeRange: dateTimeRange, metricMeasure: metricMeasure, formattedMainGraphs: formattedMainGraphs, amomalyGraphRequestParams: anomalyMainGraphRequestParams, onEChartsDateSelect: onEChartsDateSelect, urlParams: urlParams }) })] }))] }));
|
|
82137
82305
|
};
|
|
82138
82306
|
|
|
82139
82307
|
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";
|
|
@@ -82357,7 +82525,7 @@ var AnomalyPossibleCause = function (_a) {
|
|
|
82357
82525
|
((_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" }) })] })] }));
|
|
82358
82526
|
};
|
|
82359
82527
|
|
|
82360
|
-
|
|
82528
|
+
styled$1(YBTab)(function (_a) {
|
|
82361
82529
|
var theme = _a.theme;
|
|
82362
82530
|
return ({
|
|
82363
82531
|
display: 'flex',
|
|
@@ -82370,8 +82538,8 @@ var YBStyledTab$1 = styled$1(YBTab)(function (_a) {
|
|
|
82370
82538
|
});
|
|
82371
82539
|
});
|
|
82372
82540
|
var ProcessGraphData = React__default.memo(function (_a) {
|
|
82373
|
-
var _b, _c, _d, _e, _f, _g, _h, _j
|
|
82374
|
-
var universeUuid = _a.universeUuid, universeData = _a.universeData, anomalyData = _a.anomalyData, amomalyGraphRequestParams = _a.amomalyGraphRequestParams, appName = _a.appName, timezone = _a.timezone,
|
|
82541
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
|
82542
|
+
var universeUuid = _a.universeUuid, universeData = _a.universeData, anomalyData = _a.anomalyData, amomalyGraphRequestParams = _a.amomalyGraphRequestParams, appName = _a.appName, timezone = _a.timezone, 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;
|
|
82375
82543
|
var helperClasses = useHelperStyles();
|
|
82376
82544
|
// Get default values to be populated on page
|
|
82377
82545
|
var anomalyMetricMeasure = getAnomalyMetricMeasure(anomalyData);
|
|
@@ -82401,25 +82569,25 @@ var ProcessGraphData = React__default.memo(function (_a) {
|
|
|
82401
82569
|
previousDate.setDate(previousDate.getDate() - 1);
|
|
82402
82570
|
}
|
|
82403
82571
|
// State variables
|
|
82404
|
-
var
|
|
82405
|
-
var
|
|
82406
|
-
var
|
|
82407
|
-
var
|
|
82408
|
-
var
|
|
82409
|
-
var
|
|
82410
|
-
var
|
|
82411
|
-
var
|
|
82412
|
-
var
|
|
82413
|
-
var
|
|
82414
|
-
var
|
|
82415
|
-
var
|
|
82572
|
+
var _k = useState(true), showDetails = _k[0], setShowDetails = _k[1];
|
|
82573
|
+
var _l = useState(ALL_REGIONS), clusterRegionItem = _l[0], setClusterRegionItem = _l[1];
|
|
82574
|
+
var _m = useState(ALL_ZONES$1), zoneNodeItem = _m[0], setZoneNodeItem = _m[1];
|
|
82575
|
+
var _o = useState(true), isPrimaryCluster = _o[0], setIsPrimaryCluster = _o[1];
|
|
82576
|
+
var _p = useState(ALL), cluster = _p[0], setCluster = _p[1];
|
|
82577
|
+
var _q = useState(ALL), region = _q[0], setRegion = _q[1];
|
|
82578
|
+
var _r = useState(ALL), zone = _r[0], setZone = _r[1];
|
|
82579
|
+
var _s = useState(ALL), node = _s[0], setNode = _s[1];
|
|
82580
|
+
var _t = useState(anomalyMetricMeasure), metricMeasure = _t[0], setMetricMeasure = _t[1];
|
|
82581
|
+
var _u = useState(anomalyOutlierType), outlierType = _u[0], setOutlierType = _u[1];
|
|
82582
|
+
var _v = useState(TabletTabs.TABLET_OVERVIEW), tabletTab = _v[0]; _v[1];
|
|
82583
|
+
var _w = useState(SqlTabs.QUERY_OVERVIEW), sqlTab = _w[0]; _w[1];
|
|
82416
82584
|
// If its Anomaly view, then set the default filter duration to custom as anomaly has graphStartTime and graphEndTime
|
|
82417
82585
|
// If its not Anomaly view, then set the value passed in query parameter, if thats empty then set default filter duration to 1 day
|
|
82418
|
-
var
|
|
82419
|
-
var
|
|
82420
|
-
var
|
|
82421
|
-
var
|
|
82422
|
-
var
|
|
82586
|
+
var _x = useState((_b = urlParams === null || urlParams === void 0 ? void 0 : urlParams.duration) !== null && _b !== void 0 ? _b : ANOMALY_FILTER_DURATION_OPTIONS[0].value), filterDuration = _x[0], setFilterDuration = _x[1];
|
|
82587
|
+
var _y = useState(anomalyOutlierNumNodes), numNodes = _y[0], setNumNodes = _y[1];
|
|
82588
|
+
var _z = useState(null), universeQueryStatsData = _z[0], setUniverseQueryStatsData = _z[1];
|
|
82589
|
+
var _0 = useState(function () { return initializeDateTimeRange(filterDuration, today, previousDate); }), dateTimeRange = _0[0], setDateTimeRange = _0[1];
|
|
82590
|
+
var _1 = useState(null), anomalyGroupData = _1[0], setAnomalyGroupData = _1[1];
|
|
82423
82591
|
var gantChartData = useQuery([
|
|
82424
82592
|
QUERY_KEY.fetchAnomalyGroupsById,
|
|
82425
82593
|
universeUuid,
|
|
@@ -82549,13 +82717,7 @@ var ProcessGraphData = React__default.memo(function (_a) {
|
|
|
82549
82717
|
}
|
|
82550
82718
|
}
|
|
82551
82719
|
};
|
|
82552
|
-
var
|
|
82553
|
-
if (newSubTab === sqlTab) {
|
|
82554
|
-
return;
|
|
82555
|
-
}
|
|
82556
|
-
setSqlTab(newSubTab);
|
|
82557
|
-
};
|
|
82558
|
-
var _3 = useQuery([QUERY_KEY.fetchQueryStats, universeUuid], function () {
|
|
82720
|
+
var _2 = useQuery([QUERY_KEY.fetchQueryStats, universeUuid], function () {
|
|
82559
82721
|
return PerfAdvisorAPI.fetchQueryStats(universeUuid, {
|
|
82560
82722
|
// If we are navigating to queries drilldown via queries view, we will retireve DBID from URL
|
|
82561
82723
|
// else if we are navigating via anomaly SQL view, we will retrieve it from anomalyData
|
|
@@ -82573,8 +82735,8 @@ var ProcessGraphData = React__default.memo(function (_a) {
|
|
|
82573
82735
|
console.error('Failed to fetch query stats', error);
|
|
82574
82736
|
},
|
|
82575
82737
|
enabled: isHistoricalQueryView || (anomalyData === null || anomalyData === void 0 ? void 0 : anomalyData.category) === AnomalyCategory.SQL
|
|
82576
|
-
}), universeQueryStatsLoading =
|
|
82577
|
-
if (universeQueryStatsLoading) {
|
|
82738
|
+
}), universeQueryStatsLoading = _2.isLoading, universeQueryStatsError = _2.isError;
|
|
82739
|
+
if (universeQueryStatsLoading || ((gantChartData === null || gantChartData === void 0 ? void 0 : gantChartData.isLoading) && !isHistoricalQueryView)) {
|
|
82578
82740
|
return (jsx(Box$1, { mt: 2, children: jsx(LinearProgress, {}) }));
|
|
82579
82741
|
}
|
|
82580
82742
|
if (universeQueryStatsError &&
|
|
@@ -82591,12 +82753,11 @@ var ProcessGraphData = React__default.memo(function (_a) {
|
|
|
82591
82753
|
});
|
|
82592
82754
|
return (jsxs(Box$1, { style: { display: 'flex', flexDirection: 'column' }, children: [jsx(BreadCrumbsHeader, { appName: appName, queryObject: queryObject,
|
|
82593
82755
|
// Refers to query view from Overall load queries not overall load ->anomalies -> sql ->query
|
|
82594
|
-
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.
|
|
82595
|
-
isHistoricalQueryView) && (jsx(YBTabs, { value: sqlTab, onChange: handleSqlTabChange, className: helperClasses.tabsContainer, children: jsx(YBStyledTab$1, { value: SqlTabs.QUERY_OVERVIEW, label: SqlTabs.QUERY_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: helperClasses.stickyHeader, 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, { 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: [!(((_f = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _f === void 0 ? void 0 : _f.category) === AnomalyCategory.APP ||
|
|
82756
|
+
isHistoricalQueryView: isHistoricalQueryView, showStandaloneAnomalies: showStandaloneAnomalies, anomalyData: isNonEmptyObject(anomalyGroupData) ? anomalyGroupData : null, onSelectedIssue: isNonEmptyObject(anomalyData) ? onSelectedIssue : undefined, onSelectedQuery: onSelectedQuery, showDetails: showDetails, onShowDetails: onShowDetails, onNavigateToUrl: onNavigateToUrl }), !!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: helperClasses.stickyHeader, 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, { 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: [!(((_e = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _e === void 0 ? void 0 : _e.category) === AnomalyCategory.APP ||
|
|
82596
82757
|
isIndexAnomaly ||
|
|
82597
|
-
(((
|
|
82598
|
-
((
|
|
82599
|
-
((
|
|
82758
|
+
(((_f = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _f === void 0 ? void 0 : _f.category) === AnomalyCategory.NODE &&
|
|
82759
|
+
((_g = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _g === void 0 ? void 0 : _g.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: ((_h = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _h === void 0 ? void 0 : _h.type) !== AnomalyType.LARGE_TABLET &&
|
|
82760
|
+
((_j = anomalyGroupData === null || anomalyGroupData === void 0 ? void 0 : anomalyGroupData.lastInstance) === null || _j === void 0 ? void 0 : _j.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, 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 })] }))] })] }));
|
|
82600
82761
|
});
|
|
82601
82762
|
|
|
82602
82763
|
var MetricsAnalysisEntry = function (_a) {
|
|
@@ -82605,7 +82766,6 @@ var MetricsAnalysisEntry = function (_a) {
|
|
|
82605
82766
|
var helperClasses = useHelperStyles();
|
|
82606
82767
|
var _f = useState(null), userSelectedAnomaly = _f[0], setUserSelectedAnomaly = _f[1];
|
|
82607
82768
|
var _g = useState(null), amomalyGraphRequestParams = _g[0], setAmomalyGraphRequestParams = _g[1];
|
|
82608
|
-
var _h = useState(null), formattedAnomalyRca = _h[0], setFormattedAnomalyRca = _h[1];
|
|
82609
82769
|
var urlParams = new URLSearchParams(window.location.search);
|
|
82610
82770
|
var urlPath = window.location.pathname;
|
|
82611
82771
|
var queryIdParam = null;
|
|
@@ -82628,17 +82788,16 @@ var MetricsAnalysisEntry = function (_a) {
|
|
|
82628
82788
|
return PerfAdvisorAPI.fetchUniverseById(universeUuid, apiUrl);
|
|
82629
82789
|
});
|
|
82630
82790
|
var universeDataFetchError = (_d = (_c = (_b = universeDataFetch === null || universeDataFetch === void 0 ? void 0 : universeDataFetch.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;
|
|
82631
|
-
var
|
|
82791
|
+
var _h = useQuery([QUERY_KEY.fetchAnomalies, universeUuid], function () { return PerfAdvisorAPI.fetchAnomaliesById(universeUuid, troubleshootUuid, apiUrl); }, {
|
|
82632
82792
|
onSuccess: function (anomalyData) {
|
|
82633
82793
|
setUserSelectedAnomaly(anomalyData);
|
|
82634
82794
|
setAmomalyGraphRequestParams(getGraphRequestParams(anomalyData));
|
|
82635
|
-
setFormattedAnomalyRca(formatAnomalyRca(anomalyData));
|
|
82636
82795
|
},
|
|
82637
82796
|
onError: function (error) {
|
|
82638
82797
|
console.error('Failed to fetch Anomalies', error);
|
|
82639
82798
|
},
|
|
82640
82799
|
enabled: isNonEmptyString(troubleshootUuid)
|
|
82641
|
-
}), isLoading =
|
|
82800
|
+
}), isLoading = _h.isLoading, isError = _h.isError, isIdle = _h.isIdle;
|
|
82642
82801
|
if (isLoading) {
|
|
82643
82802
|
return (jsx(Box$1, { mt: 2, children: jsx(LinearProgress, {}) }));
|
|
82644
82803
|
}
|
|
@@ -82649,7 +82808,7 @@ var MetricsAnalysisEntry = function (_a) {
|
|
|
82649
82808
|
? DEFAULT_ERROR_MESSAGES.ANOMALIES_FETCH_ERROR
|
|
82650
82809
|
: DEFAULT_ERROR_MESSAGES.QUERY_STATS_FETCH_ERROR }))] }));
|
|
82651
82810
|
}
|
|
82652
|
-
return (jsx(YBThemeWrapper, { appName: appName, children: jsx(Box$1, { className: clsx(appName !== AppName.WEB && helperClasses.headerContainerYBM), children: (universeDataFetch === null || universeDataFetch === void 0 ? void 0 : universeDataFetch.data) && (jsx(ProcessGraphData, { apiUrl: apiUrl, troubleshootUuid: troubleshootUuid, anomalyData: userSelectedAnomaly, universeData: universeDataFetch === null || universeDataFetch === void 0 ? void 0 : universeDataFetch.data, universeUuid: universeUuid, appName: appName, timezone: timezone, isHistoricalQueryView: isHistoricalQueryView, amomalyGraphRequestParams: amomalyGraphRequestParams,
|
|
82811
|
+
return (jsx(YBThemeWrapper, { appName: appName, children: jsx(Box$1, { className: clsx(appName !== AppName.WEB && helperClasses.headerContainerYBM), children: (universeDataFetch === null || universeDataFetch === void 0 ? void 0 : universeDataFetch.data) && (jsx(ProcessGraphData, { apiUrl: apiUrl, troubleshootUuid: troubleshootUuid, anomalyData: userSelectedAnomaly, universeData: universeDataFetch === null || universeDataFetch === void 0 ? void 0 : universeDataFetch.data, universeUuid: universeUuid, appName: appName, timezone: timezone, isHistoricalQueryView: isHistoricalQueryView, amomalyGraphRequestParams: amomalyGraphRequestParams, dbIdParam: dbIdParam, queryIdParam: queryIdParam, showStandaloneAnomalies: showStandaloneAnomalies, onSelectedIssue: onSelectedIssue, onSelectedQuery: onSelectedQuery, onNavigateToUrl: onNavigateToUrl })) }) }));
|
|
82653
82812
|
};
|
|
82654
82813
|
|
|
82655
82814
|
var YSQL_COLUMNS = {
|
|
@@ -84002,7 +84161,7 @@ var useStyles$a = makeStyles$1(function (theme) { return ({
|
|
|
84002
84161
|
}); });
|
|
84003
84162
|
var BackgroundJobs = function (_a) {
|
|
84004
84163
|
var _b, _c, _d;
|
|
84005
|
-
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;
|
|
84164
|
+
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, backgroundTasksMappingFunc = _a.backgroundTasksMappingFunc;
|
|
84006
84165
|
var classes = useStyles$a();
|
|
84007
84166
|
var helperClasses = useHelperStyles();
|
|
84008
84167
|
var _e = useState(false), expandChart = _e[0], setExpandChart = _e[1];
|
|
@@ -84011,7 +84170,10 @@ var BackgroundJobs = function (_a) {
|
|
|
84011
84170
|
var hasInitializedRef = useRef(false);
|
|
84012
84171
|
var fetchBackgroundTasks = useQuery([QUERY_KEY.fetchBackgroundTasks, universeUuid, startTime, endTime], function () { return PerfAdvisorAPI.fetchBackgroundTasks(universeUuid, startTime, endTime, null, apiUrl); }, {
|
|
84013
84172
|
onSuccess: function (data) {
|
|
84014
|
-
var transformedData = transformBackgroundTasks(data
|
|
84173
|
+
var transformedData = transformBackgroundTasks(data, {
|
|
84174
|
+
appName: appName,
|
|
84175
|
+
backgroundTasksMappingFunc: backgroundTasksMappingFunc
|
|
84176
|
+
});
|
|
84015
84177
|
setBackgroundTasks(transformedData);
|
|
84016
84178
|
}
|
|
84017
84179
|
});
|
|
@@ -85300,9 +85462,7 @@ var useStyles$9 = makeStyles$1(function (theme) { return ({
|
|
|
85300
85462
|
'&:before': {
|
|
85301
85463
|
display: 'none'
|
|
85302
85464
|
},
|
|
85303
|
-
|
|
85304
|
-
margin: theme.spacing(2, 0, 0, 0)
|
|
85305
|
-
}
|
|
85465
|
+
margin: "".concat(theme.spacing(2), "px 0 0 0")
|
|
85306
85466
|
},
|
|
85307
85467
|
accordionSummary: {
|
|
85308
85468
|
padding: theme.spacing(1.5, 2, 1, 2),
|
|
@@ -85952,7 +86112,7 @@ var useStyles$7 = makeStyles$1(function (theme) { return ({
|
|
|
85952
86112
|
}); });
|
|
85953
86113
|
var PerfAdvisorTabs = function (_a) {
|
|
85954
86114
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
85955
|
-
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;
|
|
86115
|
+
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, backgroundTasksMappingFunc = _a.backgroundTasksMappingFunc;
|
|
85956
86116
|
var classes = useStyles$7();
|
|
85957
86117
|
var helperClasses = useHelperStyles();
|
|
85958
86118
|
var getCurrentTab = function () { return parseUrlState().currentTab; };
|
|
@@ -86199,7 +86359,7 @@ var PerfAdvisorTabs = function (_a) {
|
|
|
86199
86359
|
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) &&
|
|
86200
86360
|
currentTab === InsightsTabs.CLUSTER_LOAD &&
|
|
86201
86361
|
clusterLoadSubTab === ClusterLoadSubTabs.OVERALL_LOAD &&
|
|
86202
|
-
clusterLoadOverallSubTab === ClusterLoadOverallTabs.QUERIES && (jsx(Box$1, { mt: 2, 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 ||
|
|
86362
|
+
clusterLoadOverallSubTab === ClusterLoadOverallTabs.QUERIES && (jsx(Box$1, { mt: 2, 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, backgroundTasksMappingFunc: backgroundTasksMappingFunc }) })), 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 ||
|
|
86203
86363
|
(currentTab === InsightsTabs.CLUSTER_LOAD &&
|
|
86204
86364
|
clusterLoadSubTab === ClusterLoadSubTabs.OVERALL_LOAD &&
|
|
86205
86365
|
clusterLoadOverallSubTab === ClusterLoadOverallTabs.ANOMALIES)) && (jsx(Box$1, { mt: 2, mb: appName === AppName.WEB ? 4 : 0, ml: appName === AppName.WEB && currentTab === InsightsTabs.CLUSTER_LOAD ? 2 : 0, children: jsx(DetectedAnomalies, { apiUrl: apiUrl, appName: appName, endTime: endTime, startTime: startTime, currentTab: currentTab, universeUuid: universeUuid, anomalyGroups: anomalyGroups, onSelectedIssue: onSelectedIssue, fetchAnomalyGroups: fetchAnomalyGroups, anomalyGroupsFetchError: anomalyGroupsFetchError, onClickShowMoreAnomalies: onClickShowMoreAnomalies, onNavigateToUrl: onNavigateToUrl }) }))] }));
|
|
@@ -92513,7 +92673,7 @@ var ShowMoreAnomalies = function (_a) {
|
|
|
92513
92673
|
|
|
92514
92674
|
var PerfAdvisorEntry = function (_a) {
|
|
92515
92675
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
92516
|
-
var timezone = _a.timezone, universeUuid = _a.universeUuid, appName = _a.appName, apiUrl = _a.apiUrl, _m = _a.runtimeConfigs, runtimeConfigs = _m === void 0 ? { showDbLoadView: true, showBgTasksView: true } : _m, _o = _a.showStandaloneAnomalies, showStandaloneAnomalies = _o === void 0 ? false : _o, onSelectedIssue = _a.onSelectedIssue, onSelectedQuery = _a.onSelectedQuery, onNavigateToUrl = _a.onNavigateToUrl;
|
|
92676
|
+
var timezone = _a.timezone, universeUuid = _a.universeUuid, appName = _a.appName, apiUrl = _a.apiUrl, _m = _a.runtimeConfigs, runtimeConfigs = _m === void 0 ? { showDbLoadView: true, showBgTasksView: true } : _m, _o = _a.showStandaloneAnomalies, showStandaloneAnomalies = _o === void 0 ? false : _o, onSelectedIssue = _a.onSelectedIssue, onSelectedQuery = _a.onSelectedQuery, onNavigateToUrl = _a.onNavigateToUrl, backgroundTasksMappingFunc = _a.backgroundTasksMappingFunc;
|
|
92517
92677
|
var helperClasses = useHelperStyles();
|
|
92518
92678
|
var searchParams = new URLSearchParams(window.location.search);
|
|
92519
92679
|
var end = searchParams === null || searchParams === void 0 ? void 0 : searchParams.get('endTime');
|
|
@@ -92644,7 +92804,7 @@ var PerfAdvisorEntry = function (_a) {
|
|
|
92644
92804
|
: DEFAULT_ERROR_MESSAGES.UNIVERSE_PA_STATUS_ERROR
|
|
92645
92805
|
: isNonEmptyString(universeDataFetchError)
|
|
92646
92806
|
? universeDataFetchError
|
|
92647
|
-
: 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 }))] }) }))] }) }));
|
|
92807
|
+
: 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, backgroundTasksMappingFunc: backgroundTasksMappingFunc }) })), 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 }))] }) }))] }) }));
|
|
92648
92808
|
};
|
|
92649
92809
|
|
|
92650
92810
|
var useStyles$5 = makeStyles(function (theme) { return ({
|