@parca/profile 0.19.139 → 0.19.142
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/CHANGELOG.md +8 -0
- package/dist/GraphTooltipArrow/Content.js +224 -30
- package/dist/GraphTooltipArrow/DockedGraphTooltip/index.js +192 -33
- package/dist/GraphTooltipArrow/ExpandOnHoverValue.js +53 -3
- package/dist/GraphTooltipArrow/index.d.ts.map +1 -1
- package/dist/GraphTooltipArrow/index.js +86 -56
- package/dist/GraphTooltipArrow/useGraphTooltip/index.js +37 -37
- package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +103 -73
- package/dist/MatchersInput/SuggestionItem.js +91 -12
- package/dist/MatchersInput/SuggestionsList.d.ts +2 -1
- package/dist/MatchersInput/SuggestionsList.d.ts.map +1 -1
- package/dist/MatchersInput/SuggestionsList.js +371 -157
- package/dist/MatchersInput/SuggestionsList.test.d.ts +2 -0
- package/dist/MatchersInput/SuggestionsList.test.d.ts.map +1 -0
- package/dist/MatchersInput/index.js +308 -115
- package/dist/MetricsCircle/index.js +39 -3
- package/dist/MetricsGraph/MetricsContextMenu/index.js +119 -19
- package/dist/MetricsGraph/MetricsInfoPanel/index.js +81 -20
- package/dist/MetricsGraph/MetricsTooltip/index.d.ts.map +1 -1
- package/dist/MetricsGraph/MetricsTooltip/index.js +107 -74
- package/dist/MetricsGraph/index.js +552 -203
- package/dist/MetricsGraph/useMetricsGraphDimensions.js +46 -25
- package/dist/MetricsGraph/utils/colorMapping.js +24 -17
- package/dist/MetricsSeries/index.js +70 -7
- package/dist/PreSelectedMatchers/index.d.ts.map +1 -1
- package/dist/PreSelectedMatchers/index.js +249 -102
- package/dist/ProfileExplorer/ProfileExplorerCompare.js +240 -49
- package/dist/ProfileExplorer/ProfileExplorerSingle.js +98 -11
- package/dist/ProfileExplorer/index.js +183 -32
- package/dist/ProfileFlameChart/SamplesStrips/SamplesGraph/index.js +333 -148
- package/dist/ProfileFlameChart/SamplesStrips/SamplesStrips.stories.js +69 -35
- package/dist/ProfileFlameChart/SamplesStrips/index.js +645 -134
- package/dist/ProfileFlameChart/SamplesStrips/labelSetUtils.js +114 -55
- package/dist/ProfileFlameChart/index.js +266 -134
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.js +287 -88
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenuWrapper.js +56 -20
- package/dist/ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.js +211 -140
- package/dist/ProfileFlameGraph/FlameGraphArrow/MemoizedTooltip.js +133 -38
- package/dist/ProfileFlameGraph/FlameGraphArrow/MiniMap.js +261 -216
- package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.js +71 -45
- package/dist/ProfileFlameGraph/FlameGraphArrow/TooltipContext.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/TooltipContext.js +58 -28
- package/dist/ProfileFlameGraph/FlameGraphArrow/ZoomControls.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/ZoomControls.js +59 -8
- package/dist/ProfileFlameGraph/FlameGraphArrow/index.js +396 -179
- package/dist/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.js +68 -50
- package/dist/ProfileFlameGraph/FlameGraphArrow/useMappingList.js +62 -38
- package/dist/ProfileFlameGraph/FlameGraphArrow/useNodeColor.js +14 -6
- package/dist/ProfileFlameGraph/FlameGraphArrow/useScrollViewport.js +124 -82
- package/dist/ProfileFlameGraph/FlameGraphArrow/useVisibleNodes.js +160 -98
- package/dist/ProfileFlameGraph/FlameGraphArrow/useZoom.js +232 -112
- package/dist/ProfileFlameGraph/FlameGraphArrow/utils.js +137 -114
- package/dist/ProfileFlameGraph/benchmarks/benchdata/populateData.js +85 -0
- package/dist/ProfileFlameGraph/index.js +324 -148
- package/dist/ProfileMetricsGraph/hooks/useQueryRange.js +140 -32
- package/dist/ProfileMetricsGraph/index.js +518 -259
- package/dist/ProfileSelector/CompareButton.js +132 -12
- package/dist/ProfileSelector/MetricsGraphSection.js +234 -67
- package/dist/ProfileSelector/index.d.ts.map +1 -1
- package/dist/ProfileSelector/index.js +730 -142
- package/dist/ProfileSelector/useAutoQuerySelector.js +249 -130
- package/dist/ProfileSource.js +230 -163
- package/dist/ProfileTypeSelector/index.js +214 -125
- package/dist/ProfileView/components/ActionButtons/GroupByDropdown.js +50 -4
- package/dist/ProfileView/components/ActionButtons/SortByDropdown.js +139 -33
- package/dist/ProfileView/components/ColorStackLegend.js +184 -55
- package/dist/ProfileView/components/DashboardItems/index.js +87 -28
- package/dist/ProfileView/components/DashboardLayout/index.js +108 -16
- package/dist/ProfileView/components/DiffLegend.js +172 -29
- package/dist/ProfileView/components/GroupByLabelsDropdown/index.js +199 -55
- package/dist/ProfileView/components/InvertCallStack/index.js +99 -10
- package/dist/ProfileView/components/ProfileFilters/filterPresets.js +260 -315
- package/dist/ProfileView/components/ProfileFilters/index.js +518 -215
- package/dist/ProfileView/components/ProfileFilters/useProfileFilters.js +370 -306
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.js +188 -120
- package/dist/ProfileView/components/ProfileHeader/index.js +105 -11
- package/dist/ProfileView/components/ShareButton/ResultBox.js +119 -16
- package/dist/ProfileView/components/ShareButton/index.js +352 -62
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.js +675 -195
- package/dist/ProfileView/components/Toolbars/SwitchMenuItem.js +94 -7
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.js +198 -157
- package/dist/ProfileView/components/Toolbars/index.js +441 -21
- package/dist/ProfileView/components/ViewSelector/Dropdown.js +233 -22
- package/dist/ProfileView/components/ViewSelector/index.js +211 -91
- package/dist/ProfileView/components/VisualizationContainer/index.d.ts.map +1 -1
- package/dist/ProfileView/components/VisualizationContainer/index.js +52 -7
- package/dist/ProfileView/components/VisualizationPanel.js +185 -8
- package/dist/ProfileView/context/DashboardContext.js +84 -28
- package/dist/ProfileView/context/ProfileViewContext.js +56 -15
- package/dist/ProfileView/hooks/useAutoSelectDimension.js +71 -41
- package/dist/ProfileView/hooks/useProfileMetadata.js +50 -18
- package/dist/ProfileView/hooks/useResetFlameGraphState.js +31 -10
- package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.js +72 -29
- package/dist/ProfileView/hooks/useResetStateOnSeriesChange.js +39 -13
- package/dist/ProfileView/hooks/useVisualizationState.js +262 -87
- package/dist/ProfileView/index.js +383 -45
- package/dist/ProfileView/types/visualization.js +1 -13
- package/dist/ProfileView/utils/colorUtils.js +8 -7
- package/dist/ProfileViewWithData.js +332 -237
- package/dist/QueryControls/index.js +418 -47
- package/dist/Sandwich/components/CalleesSection.js +54 -4
- package/dist/Sandwich/components/CallersSection.js +97 -27
- package/dist/Sandwich/components/TableSection.js +77 -4
- package/dist/Sandwich/index.js +125 -12
- package/dist/Sandwich/utils/processRowData.js +48 -39
- package/dist/SelectWithRefresh/index.js +102 -28
- package/dist/SimpleMatchers/Select.js +520 -187
- package/dist/SimpleMatchers/index.js +590 -288
- package/dist/SourceView/Highlighter.js +230 -70
- package/dist/SourceView/LineNo.js +72 -17
- package/dist/SourceView/index.js +177 -101
- package/dist/SourceView/lang-detector/ext-to-lang.json +798 -798
- package/dist/SourceView/lang-detector/index.js +28 -14
- package/dist/SourceView/useSelectedLineRange.js +97 -16
- package/dist/Table/ColorCell.js +42 -1
- package/dist/Table/ColumnsVisibility.js +114 -6
- package/dist/Table/MoreDropdown.js +121 -27
- package/dist/Table/TableContextMenu.js +150 -139
- package/dist/Table/TableContextMenuWrapper.js +59 -14
- package/dist/Table/hooks/useColorManagement.js +58 -16
- package/dist/Table/hooks/useTableConfiguration.d.ts.map +1 -1
- package/dist/Table/hooks/useTableConfiguration.js +331 -168
- package/dist/Table/index.js +222 -126
- package/dist/Table/utils/functions.js +169 -144
- package/dist/Table/utils/topAndBottomExpandedRowModel.js +69 -52
- package/dist/TimelineGuide/index.js +209 -16
- package/dist/TopTable/benchmarks/benchdata/populateData.js +91 -0
- package/dist/TopTable/index.js +340 -122
- package/dist/contexts/LabelsQueryProvider.js +94 -32
- package/dist/contexts/UnifiedLabelsContext.js +114 -49
- package/dist/contexts/utils.js +37 -15
- package/dist/hooks/useCompareModeMeta.js +157 -94
- package/dist/hooks/useLabels.js +295 -52
- package/dist/hooks/useQueryState.js +371 -330
- package/dist/index.js +21 -16
- package/dist/testdata/fg-diff.json +3750 -0
- package/dist/testdata/fg-simple.json +1879 -0
- package/dist/testdata/link_data.json +56 -0
- package/dist/testdata/tabular.json +30 -0
- package/dist/testdata/test_flamegraph.json +26846 -0
- package/dist/testdata/test_graph.json +53 -0
- package/dist/useDelayedLoader.js +32 -18
- package/dist/useGrpcQuery/index.js +71 -11
- package/dist/useHasProfileData.js +90 -12
- package/dist/useQuery.js +205 -64
- package/dist/useSumBy.d.ts.map +1 -1
- package/dist/useSumBy.js +294 -138
- package/dist/utils.js +62 -30
- package/package.json +9 -9
- package/src/GraphTooltipArrow/index.tsx +3 -0
- package/src/MatchersInput/SuggestionsList.test.tsx +70 -0
- package/src/MatchersInput/SuggestionsList.tsx +11 -10
- package/src/MatchersInput/index.tsx +1 -1
- package/src/MetricsGraph/MetricsTooltip/index.tsx +22 -34
- package/src/PreSelectedMatchers/index.tsx +3 -0
- package/src/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.tsx +3 -0
- package/src/ProfileFlameGraph/FlameGraphArrow/TooltipContext.tsx +3 -0
- package/src/ProfileFlameGraph/FlameGraphArrow/ZoomControls.tsx +3 -0
- package/src/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.ts +3 -0
- package/src/ProfileSelector/index.tsx +30 -7
- package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +3 -0
- package/src/ProfileView/components/VisualizationContainer/index.tsx +3 -0
- package/src/Table/hooks/useTableConfiguration.tsx +7 -13
- package/src/useDelayedLoader.ts +10 -10
- package/src/useSumBy.ts +12 -18
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.js +0 -541
- package/dist/hooks/useQueryState.test.js +0 -984
package/dist/TopTable/index.js
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
|
+
import { c as _c } from "react-compiler-runtime";
|
|
2
14
|
// Copyright 2022 The Parca Authors
|
|
3
15
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
16
|
// you may not use this file except in compliance with the License.
|
|
@@ -11,134 +23,340 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
11
23
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
24
|
// See the License for the specific language governing permissions and
|
|
13
25
|
// limitations under the License.
|
|
26
|
+
|
|
14
27
|
import React, { useCallback, useEffect, useMemo } from 'react';
|
|
15
28
|
import { createColumnHelper } from '@tanstack/react-table';
|
|
16
29
|
import { Button, Table, useURLState } from '@parca/components';
|
|
17
|
-
import { getLastItem, isSearchMatch, parseParams, valueFormatter
|
|
30
|
+
import { getLastItem, isSearchMatch, parseParams, valueFormatter } from '@parca/utilities';
|
|
18
31
|
import { useProfileViewContext } from '../ProfileView/context/ProfileViewContext';
|
|
19
32
|
import { hexifyAddress } from '../utils';
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const fallback = `${mapping} ${address}`;
|
|
30
|
-
return fallback === '' ? '<unknown>' : fallback;
|
|
33
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
34
|
+
export var RowLabel = function RowLabel(meta) {
|
|
35
|
+
var _meta$mapping, _meta$mapping2, _getLastItem, _meta$function, _meta$function2, _meta$location;
|
|
36
|
+
if (meta === undefined) return '<unknown>';
|
|
37
|
+
var mapping = "".concat((meta === null || meta === void 0 || (_meta$mapping = meta.mapping) === null || _meta$mapping === void 0 ? void 0 : _meta$mapping.file) !== undefined && (meta === null || meta === void 0 || (_meta$mapping2 = meta.mapping) === null || _meta$mapping2 === void 0 ? void 0 : _meta$mapping2.file) !== '' ? "[".concat((_getLastItem = getLastItem(meta.mapping.file)) !== null && _getLastItem !== void 0 ? _getLastItem : '', "]") : '');
|
|
38
|
+
if (((_meta$function = meta["function"]) === null || _meta$function === void 0 ? void 0 : _meta$function.name) !== undefined && ((_meta$function2 = meta["function"]) === null || _meta$function2 === void 0 ? void 0 : _meta$function2.name) !== '') return "".concat(mapping, " ").concat(meta["function"].name);
|
|
39
|
+
var address = hexifyAddress((_meta$location = meta.location) === null || _meta$location === void 0 ? void 0 : _meta$location.address);
|
|
40
|
+
var fallback = "".concat(mapping, " ").concat(address);
|
|
41
|
+
return fallback === '' ? '<unknown>' : fallback;
|
|
31
42
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
var columnHelper = createColumnHelper();
|
|
44
|
+
var addPlusSign = function addPlusSign(num) {
|
|
45
|
+
if (num.charAt(0) === '0' || num.charAt(0) === '-') {
|
|
46
|
+
return num;
|
|
47
|
+
}
|
|
48
|
+
return "+".concat(num);
|
|
38
49
|
};
|
|
39
|
-
export
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
50
|
+
export var TopTable = /*#__PURE__*/React.memo(function TopTable(t0) {
|
|
51
|
+
var $ = _c(46);
|
|
52
|
+
var top = t0.data,
|
|
53
|
+
unit = t0.sampleUnit,
|
|
54
|
+
navigateTo = t0.navigateTo,
|
|
55
|
+
loading = t0.loading,
|
|
56
|
+
currentSearchString = t0.currentSearchString,
|
|
57
|
+
setActionButtons = t0.setActionButtons;
|
|
58
|
+
var t1;
|
|
59
|
+
if ($[0] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
60
|
+
var _window;
|
|
61
|
+
t1 = parseParams((_window = window) === null || _window === void 0 ? void 0 : _window.location.search);
|
|
62
|
+
$[0] = t1;
|
|
63
|
+
} else {
|
|
64
|
+
t1 = $[0];
|
|
65
|
+
}
|
|
66
|
+
var router = t1;
|
|
67
|
+
var t2;
|
|
68
|
+
if ($[1] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
69
|
+
t2 = {
|
|
70
|
+
alwaysReturnArray: true
|
|
71
|
+
};
|
|
72
|
+
$[1] = t2;
|
|
73
|
+
} else {
|
|
74
|
+
t2 = $[1];
|
|
75
|
+
}
|
|
76
|
+
var _useURLState = useURLState("dashboard_items", t2),
|
|
77
|
+
_useURLState2 = _slicedToArray(_useURLState, 1),
|
|
78
|
+
dashboardItems = _useURLState2[0];
|
|
79
|
+
var _useProfileViewContex = useProfileViewContext(),
|
|
80
|
+
compareMode = _useProfileViewContex.compareMode;
|
|
81
|
+
var t3;
|
|
82
|
+
if ($[2] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
83
|
+
t3 = columnHelper.accessor("meta", {
|
|
84
|
+
header: _temp,
|
|
85
|
+
cell: _temp2,
|
|
86
|
+
sortingFn: _temp3
|
|
87
|
+
});
|
|
88
|
+
$[2] = t3;
|
|
89
|
+
} else {
|
|
90
|
+
t3 = $[2];
|
|
91
|
+
}
|
|
92
|
+
var t4;
|
|
93
|
+
if ($[3] !== unit) {
|
|
94
|
+
t4 = columnHelper.accessor("flat", {
|
|
95
|
+
header: _temp4,
|
|
96
|
+
cell: function cell(info_0) {
|
|
97
|
+
return valueFormatter(info_0.getValue(), unit, 2);
|
|
98
|
+
},
|
|
99
|
+
size: 150,
|
|
100
|
+
meta: {
|
|
101
|
+
align: "right"
|
|
102
|
+
},
|
|
103
|
+
sortDescFirst: true
|
|
104
|
+
});
|
|
105
|
+
$[3] = unit;
|
|
106
|
+
$[4] = t4;
|
|
107
|
+
} else {
|
|
108
|
+
t4 = $[4];
|
|
109
|
+
}
|
|
110
|
+
var t5;
|
|
111
|
+
if ($[5] !== unit) {
|
|
112
|
+
t5 = columnHelper.accessor("cumulative", {
|
|
113
|
+
header: _temp5,
|
|
114
|
+
cell: function cell(info_1) {
|
|
115
|
+
return valueFormatter(info_1.getValue(), unit, 2);
|
|
116
|
+
},
|
|
117
|
+
size: 150,
|
|
118
|
+
meta: {
|
|
119
|
+
align: "right"
|
|
120
|
+
},
|
|
121
|
+
sortDescFirst: true
|
|
122
|
+
});
|
|
123
|
+
$[5] = unit;
|
|
124
|
+
$[6] = t5;
|
|
125
|
+
} else {
|
|
126
|
+
t5 = $[6];
|
|
127
|
+
}
|
|
128
|
+
var cols;
|
|
129
|
+
if ($[7] !== compareMode || $[8] !== t4 || $[9] !== t5 || $[10] !== unit) {
|
|
130
|
+
cols = [t3, t4, t5];
|
|
131
|
+
if (compareMode) {
|
|
132
|
+
var _t;
|
|
133
|
+
if ($[12] !== unit) {
|
|
134
|
+
_t = columnHelper.accessor("diff", {
|
|
135
|
+
header: _temp6,
|
|
136
|
+
cell: function cell(info_2) {
|
|
137
|
+
return addPlusSign(valueFormatter(info_2.getValue(), unit, 2));
|
|
138
|
+
},
|
|
139
|
+
size: 150,
|
|
140
|
+
meta: {
|
|
141
|
+
align: "right"
|
|
142
|
+
},
|
|
143
|
+
sortDescFirst: true
|
|
144
|
+
});
|
|
145
|
+
$[12] = unit;
|
|
146
|
+
$[13] = _t;
|
|
147
|
+
} else {
|
|
148
|
+
_t = $[13];
|
|
149
|
+
}
|
|
150
|
+
cols.push(_t);
|
|
151
|
+
}
|
|
152
|
+
$[7] = compareMode;
|
|
153
|
+
$[8] = t4;
|
|
154
|
+
$[9] = t5;
|
|
155
|
+
$[10] = unit;
|
|
156
|
+
$[11] = cols;
|
|
157
|
+
} else {
|
|
158
|
+
cols = $[11];
|
|
159
|
+
}
|
|
160
|
+
var columns = cols;
|
|
161
|
+
var t6;
|
|
162
|
+
if ($[14] !== navigateTo) {
|
|
163
|
+
t6 = function t6(span) {
|
|
164
|
+
if (navigateTo != null) {
|
|
165
|
+
navigateTo("/", _objectSpread(_objectSpread({}, router), {
|
|
166
|
+
search_string: span.trim()
|
|
167
|
+
}), {
|
|
168
|
+
replace: true
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
$[14] = navigateTo;
|
|
173
|
+
$[15] = t6;
|
|
174
|
+
} else {
|
|
175
|
+
t6 = $[15];
|
|
176
|
+
}
|
|
177
|
+
var selectSpan = t6;
|
|
178
|
+
var t7;
|
|
179
|
+
if ($[16] !== dashboardItems.length || $[17] !== selectSpan) {
|
|
180
|
+
t7 = function t7(row) {
|
|
181
|
+
if (dashboardItems.length <= 1) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
var meta_0 = row.meta;
|
|
185
|
+
if (meta_0 === undefined) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
var name_0 = RowLabel(meta_0);
|
|
189
|
+
selectSpan(name_0);
|
|
190
|
+
};
|
|
191
|
+
$[16] = dashboardItems.length;
|
|
192
|
+
$[17] = selectSpan;
|
|
193
|
+
$[18] = t7;
|
|
194
|
+
} else {
|
|
195
|
+
t7 = $[18];
|
|
196
|
+
}
|
|
197
|
+
var onRowClick = t7;
|
|
198
|
+
var t8;
|
|
199
|
+
if ($[19] !== currentSearchString) {
|
|
200
|
+
t8 = function t8(row_0) {
|
|
201
|
+
var meta_1 = row_0.meta;
|
|
202
|
+
if (meta_1 === undefined) {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
var name_1 = RowLabel(meta_1);
|
|
206
|
+
return isSearchMatch(currentSearchString, name_1);
|
|
207
|
+
};
|
|
208
|
+
$[19] = currentSearchString;
|
|
209
|
+
$[20] = t8;
|
|
210
|
+
} else {
|
|
211
|
+
t8 = $[20];
|
|
212
|
+
}
|
|
213
|
+
var shouldHighlightRow = t8;
|
|
214
|
+
var enableHighlighting = currentSearchString != null && (currentSearchString === null || currentSearchString === void 0 ? void 0 : currentSearchString.length) > 0;
|
|
215
|
+
var t9;
|
|
216
|
+
if ($[21] !== navigateTo) {
|
|
217
|
+
t9 = function t9() {
|
|
218
|
+
if (navigateTo != null) {
|
|
219
|
+
navigateTo("/", _objectSpread(_objectSpread({}, router), {
|
|
220
|
+
search_string: ""
|
|
221
|
+
}), {
|
|
222
|
+
replace: true
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
$[21] = navigateTo;
|
|
227
|
+
$[22] = t9;
|
|
228
|
+
} else {
|
|
229
|
+
t9 = $[22];
|
|
230
|
+
}
|
|
231
|
+
var clearSelection = t9;
|
|
232
|
+
var t10;
|
|
233
|
+
if ($[23] !== clearSelection || $[24] !== currentSearchString || $[25] !== dashboardItems.length || $[26] !== setActionButtons) {
|
|
234
|
+
t10 = function t10() {
|
|
235
|
+
if (setActionButtons === undefined) {
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
setActionButtons(dashboardItems.length > 1 ? /*#__PURE__*/_jsx("div", {
|
|
239
|
+
className: "ml-2",
|
|
240
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
241
|
+
color: "neutral",
|
|
242
|
+
onClick: clearSelection,
|
|
243
|
+
className: "w-auto",
|
|
244
|
+
variant: "neutral",
|
|
245
|
+
disabled: currentSearchString === undefined || currentSearchString.length === 0,
|
|
246
|
+
children: "Clear selection"
|
|
247
|
+
})
|
|
248
|
+
}) : /*#__PURE__*/_jsx(_Fragment, {}));
|
|
249
|
+
};
|
|
250
|
+
$[23] = clearSelection;
|
|
251
|
+
$[24] = currentSearchString;
|
|
252
|
+
$[25] = dashboardItems.length;
|
|
253
|
+
$[26] = setActionButtons;
|
|
254
|
+
$[27] = t10;
|
|
255
|
+
} else {
|
|
256
|
+
t10 = $[27];
|
|
257
|
+
}
|
|
258
|
+
var t11;
|
|
259
|
+
if ($[28] !== clearSelection || $[29] !== currentSearchString || $[30] !== dashboardItems || $[31] !== setActionButtons) {
|
|
260
|
+
t11 = [dashboardItems, clearSelection, currentSearchString, setActionButtons];
|
|
261
|
+
$[28] = clearSelection;
|
|
262
|
+
$[29] = currentSearchString;
|
|
263
|
+
$[30] = dashboardItems;
|
|
264
|
+
$[31] = setActionButtons;
|
|
265
|
+
$[32] = t11;
|
|
266
|
+
} else {
|
|
267
|
+
t11 = $[32];
|
|
268
|
+
}
|
|
269
|
+
useEffect(t10, t11);
|
|
270
|
+
var t12 = compareMode ? "diff" : "cumulative";
|
|
271
|
+
var t13;
|
|
272
|
+
if ($[33] !== t12) {
|
|
273
|
+
t13 = [{
|
|
274
|
+
id: t12,
|
|
275
|
+
desc: true
|
|
276
|
+
}];
|
|
277
|
+
$[33] = t12;
|
|
278
|
+
$[34] = t13;
|
|
279
|
+
} else {
|
|
280
|
+
t13 = $[34];
|
|
281
|
+
}
|
|
282
|
+
var initialSorting = t13;
|
|
283
|
+
var total = top != null ? top.list.length : 0;
|
|
284
|
+
if (total === 0 && !loading) {
|
|
285
|
+
var _t2;
|
|
286
|
+
if ($[35] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
287
|
+
_t2 = /*#__PURE__*/_jsx("div", {
|
|
288
|
+
className: "mx-auto text-center",
|
|
289
|
+
children: "Profile has no samples"
|
|
290
|
+
});
|
|
291
|
+
$[35] = _t2;
|
|
292
|
+
} else {
|
|
293
|
+
_t2 = $[35];
|
|
294
|
+
}
|
|
295
|
+
return _t2;
|
|
296
|
+
}
|
|
297
|
+
var t14;
|
|
298
|
+
if ($[36] !== (top === null || top === void 0 ? void 0 : top.list)) {
|
|
299
|
+
var _top$list;
|
|
300
|
+
t14 = (_top$list = top === null || top === void 0 ? void 0 : top.list) !== null && _top$list !== void 0 ? _top$list : [];
|
|
301
|
+
$[36] = top === null || top === void 0 ? void 0 : top.list;
|
|
302
|
+
$[37] = t14;
|
|
303
|
+
} else {
|
|
304
|
+
t14 = $[37];
|
|
305
|
+
}
|
|
306
|
+
var t15 = dashboardItems.length > 1;
|
|
307
|
+
var t16;
|
|
308
|
+
if ($[38] !== columns || $[39] !== enableHighlighting || $[40] !== initialSorting || $[41] !== onRowClick || $[42] !== shouldHighlightRow || $[43] !== t14 || $[44] !== t15) {
|
|
309
|
+
t16 = /*#__PURE__*/_jsx("div", {
|
|
310
|
+
className: "relative",
|
|
311
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
312
|
+
className: "font-robotoMono h-[80vh] w-full overflow-scroll",
|
|
313
|
+
children: /*#__PURE__*/_jsx(Table, {
|
|
314
|
+
data: t14,
|
|
315
|
+
columns: columns,
|
|
316
|
+
initialSorting: initialSorting,
|
|
317
|
+
onRowClick: onRowClick,
|
|
318
|
+
enableHighlighting: enableHighlighting,
|
|
319
|
+
shouldHighlightRow: shouldHighlightRow,
|
|
320
|
+
usePointerCursor: t15
|
|
321
|
+
})
|
|
322
|
+
})
|
|
43
323
|
});
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const bName = RowLabel(b.original.meta);
|
|
57
|
-
return aName.localeCompare(bName);
|
|
58
|
-
},
|
|
59
|
-
}),
|
|
60
|
-
columnHelper.accessor('flat', {
|
|
61
|
-
header: () => 'Flat',
|
|
62
|
-
cell: info => valueFormatter(info.getValue(), unit, 2),
|
|
63
|
-
size: 150,
|
|
64
|
-
meta: {
|
|
65
|
-
align: 'right',
|
|
66
|
-
},
|
|
67
|
-
sortDescFirst: true,
|
|
68
|
-
}),
|
|
69
|
-
columnHelper.accessor('cumulative', {
|
|
70
|
-
header: () => 'Cumulative',
|
|
71
|
-
cell: info => valueFormatter(info.getValue(), unit, 2),
|
|
72
|
-
size: 150,
|
|
73
|
-
meta: {
|
|
74
|
-
align: 'right',
|
|
75
|
-
},
|
|
76
|
-
sortDescFirst: true,
|
|
77
|
-
}),
|
|
78
|
-
];
|
|
79
|
-
if (compareMode) {
|
|
80
|
-
cols.push(columnHelper.accessor('diff', {
|
|
81
|
-
header: () => 'Diff',
|
|
82
|
-
cell: info => addPlusSign(valueFormatter(info.getValue(), unit, 2)),
|
|
83
|
-
size: 150,
|
|
84
|
-
meta: {
|
|
85
|
-
align: 'right',
|
|
86
|
-
},
|
|
87
|
-
sortDescFirst: true,
|
|
88
|
-
}));
|
|
89
|
-
}
|
|
90
|
-
return cols;
|
|
91
|
-
}, [unit, compareMode]);
|
|
92
|
-
const selectSpan = useCallback((span) => {
|
|
93
|
-
if (navigateTo != null) {
|
|
94
|
-
navigateTo('/', {
|
|
95
|
-
...router,
|
|
96
|
-
...{ search_string: span.trim() },
|
|
97
|
-
}, { replace: true });
|
|
98
|
-
}
|
|
99
|
-
}, [navigateTo, router]);
|
|
100
|
-
const onRowClick = useCallback((row) => {
|
|
101
|
-
// If there is only one dashboard item, we don't want to select a span
|
|
102
|
-
if (dashboardItems.length <= 1) {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
const meta = row.meta;
|
|
106
|
-
if (meta === undefined) {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
const name = RowLabel(meta);
|
|
110
|
-
selectSpan(name);
|
|
111
|
-
}, [selectSpan, dashboardItems.length]);
|
|
112
|
-
const shouldHighlightRow = useCallback((row) => {
|
|
113
|
-
const meta = row.meta;
|
|
114
|
-
if (meta === undefined)
|
|
115
|
-
return false;
|
|
116
|
-
const name = RowLabel(meta);
|
|
117
|
-
return isSearchMatch(currentSearchString, name);
|
|
118
|
-
}, [currentSearchString]);
|
|
119
|
-
const enableHighlighting = useMemo(() => {
|
|
120
|
-
return currentSearchString != null && currentSearchString?.length > 0;
|
|
121
|
-
}, [currentSearchString]);
|
|
122
|
-
const clearSelection = useCallback(() => {
|
|
123
|
-
if (navigateTo != null) {
|
|
124
|
-
navigateTo('/', {
|
|
125
|
-
...router,
|
|
126
|
-
...{ search_string: '' },
|
|
127
|
-
}, { replace: true });
|
|
128
|
-
}
|
|
129
|
-
}, [navigateTo, router]);
|
|
130
|
-
useEffect(() => {
|
|
131
|
-
if (setActionButtons === undefined) {
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
setActionButtons(dashboardItems.length > 1 ? (_jsx("div", { className: "ml-2", children: _jsx(Button, { color: "neutral", onClick: clearSelection, className: "w-auto", variant: "neutral", disabled: currentSearchString === undefined || currentSearchString.length === 0, children: "Clear selection" }) })) : (_jsx(_Fragment, {})));
|
|
135
|
-
}, [dashboardItems, clearSelection, currentSearchString, setActionButtons]);
|
|
136
|
-
const initialSorting = useMemo(() => {
|
|
137
|
-
return [{ id: compareMode ? 'diff' : 'cumulative', desc: true }];
|
|
138
|
-
}, [compareMode]);
|
|
139
|
-
const total = top != null ? top.list.length : 0;
|
|
140
|
-
if (total === 0 && !loading)
|
|
141
|
-
return _jsx("div", { className: "mx-auto text-center", children: "Profile has no samples" });
|
|
142
|
-
return (_jsx("div", { className: "relative", children: _jsx("div", { className: "font-robotoMono h-[80vh] w-full overflow-scroll", children: _jsx(Table, { data: top?.list ?? [], columns: columns, initialSorting: initialSorting, onRowClick: onRowClick, enableHighlighting: enableHighlighting, shouldHighlightRow: shouldHighlightRow, usePointerCursor: dashboardItems.length > 1 }) }) }));
|
|
324
|
+
$[38] = columns;
|
|
325
|
+
$[39] = enableHighlighting;
|
|
326
|
+
$[40] = initialSorting;
|
|
327
|
+
$[41] = onRowClick;
|
|
328
|
+
$[42] = shouldHighlightRow;
|
|
329
|
+
$[43] = t14;
|
|
330
|
+
$[44] = t15;
|
|
331
|
+
$[45] = t16;
|
|
332
|
+
} else {
|
|
333
|
+
t16 = $[45];
|
|
334
|
+
}
|
|
335
|
+
return t16;
|
|
143
336
|
});
|
|
144
337
|
export default TopTable;
|
|
338
|
+
function _temp() {
|
|
339
|
+
return /*#__PURE__*/_jsx("span", {
|
|
340
|
+
className: "text-left",
|
|
341
|
+
children: "Name"
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
function _temp2(info) {
|
|
345
|
+
var meta = info.row.original.meta;
|
|
346
|
+
var name = RowLabel(meta);
|
|
347
|
+
return name;
|
|
348
|
+
}
|
|
349
|
+
function _temp3(a, b) {
|
|
350
|
+
var aName = RowLabel(a.original.meta);
|
|
351
|
+
var bName = RowLabel(b.original.meta);
|
|
352
|
+
return aName.localeCompare(bName);
|
|
353
|
+
}
|
|
354
|
+
function _temp4() {
|
|
355
|
+
return "Flat";
|
|
356
|
+
}
|
|
357
|
+
function _temp5() {
|
|
358
|
+
return "Cumulative";
|
|
359
|
+
}
|
|
360
|
+
function _temp6() {
|
|
361
|
+
return "Diff";
|
|
362
|
+
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
|
+
import { c as _c } from "react-compiler-runtime";
|
|
2
8
|
// Copyright 2022 The Parca Authors
|
|
3
9
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
10
|
// you may not use this file except in compliance with the License.
|
|
@@ -11,6 +17,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
11
17
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
18
|
// See the License for the specific language governing permissions and
|
|
13
19
|
// limitations under the License.
|
|
20
|
+
|
|
14
21
|
/**
|
|
15
22
|
* LabelsQueryProvider - Data Fetching Layer
|
|
16
23
|
*
|
|
@@ -31,40 +38,95 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
31
38
|
*
|
|
32
39
|
* Consumer Hook: useLabelsQueryProvider()
|
|
33
40
|
*/
|
|
41
|
+
|
|
34
42
|
import { createContext, useContext, useState } from 'react';
|
|
35
43
|
import { useLabelNames, useLabelValues } from '../hooks/useLabels';
|
|
36
44
|
import { useExtractedLabelNames } from './utils';
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
45
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
46
|
+
var LabelsQueryProviderContext = /*#__PURE__*/createContext(null);
|
|
47
|
+
export function LabelsQueryProvider(t0) {
|
|
48
|
+
var $ = _c(19);
|
|
49
|
+
var children = t0.children,
|
|
50
|
+
queryClient = t0.queryClient,
|
|
51
|
+
setMatchersString = t0.setMatchersString,
|
|
52
|
+
runQuery = t0.runQuery,
|
|
53
|
+
currentQuery = t0.currentQuery,
|
|
54
|
+
profileType = t0.profileType,
|
|
55
|
+
start = t0.start,
|
|
56
|
+
end = t0.end,
|
|
57
|
+
suffix = t0.suffix;
|
|
58
|
+
var _useState = useState(null),
|
|
59
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
60
|
+
currentLabelName = _useState2[0],
|
|
61
|
+
setCurrentLabelName = _useState2[1];
|
|
62
|
+
var _useLabelNames = useLabelNames(queryClient, profileType, start, end),
|
|
63
|
+
labelNamesResponse = _useLabelNames.result,
|
|
64
|
+
isLabelNamesLoading = _useLabelNames.loading,
|
|
65
|
+
labelNamesRefetch = _useLabelNames.refetch;
|
|
66
|
+
var labelNames = useExtractedLabelNames(labelNamesResponse.response, labelNamesResponse.error);
|
|
67
|
+
var _useLabelValues = useLabelValues(queryClient, currentLabelName !== null && currentLabelName !== void 0 ? currentLabelName : "", profileType, start, end),
|
|
68
|
+
labelValuesOriginal = _useLabelValues.result,
|
|
69
|
+
isLabelValuesLoading = _useLabelValues.loading,
|
|
70
|
+
labelValuesRefetch = _useLabelValues.refetch;
|
|
71
|
+
var labelValues = labelValuesOriginal.response;
|
|
72
|
+
var t1;
|
|
73
|
+
if ($[0] !== currentLabelName || $[1] !== currentQuery || $[2] !== end || $[3] !== isLabelNamesLoading || $[4] !== isLabelValuesLoading || $[5] !== labelNames || $[6] !== labelNamesRefetch || $[7] !== labelValues || $[8] !== labelValuesRefetch || $[9] !== profileType || $[10] !== queryClient || $[11] !== runQuery || $[12] !== setMatchersString || $[13] !== start || $[14] !== suffix) {
|
|
74
|
+
t1 = {
|
|
75
|
+
labelNames: labelNames,
|
|
76
|
+
labelValues: labelValues,
|
|
77
|
+
isLabelNamesLoading: isLabelNamesLoading,
|
|
78
|
+
isLabelValuesLoading: isLabelValuesLoading,
|
|
79
|
+
refetchLabelValues: labelValuesRefetch,
|
|
80
|
+
refetchLabelNames: labelNamesRefetch,
|
|
81
|
+
queryClient: queryClient,
|
|
82
|
+
setMatchersString: setMatchersString,
|
|
83
|
+
runQuery: runQuery,
|
|
84
|
+
currentQuery: currentQuery,
|
|
85
|
+
profileType: profileType,
|
|
86
|
+
start: start,
|
|
87
|
+
end: end,
|
|
88
|
+
setCurrentLabelName: setCurrentLabelName,
|
|
89
|
+
currentLabelName: currentLabelName,
|
|
90
|
+
suffix: suffix
|
|
61
91
|
};
|
|
62
|
-
|
|
92
|
+
$[0] = currentLabelName;
|
|
93
|
+
$[1] = currentQuery;
|
|
94
|
+
$[2] = end;
|
|
95
|
+
$[3] = isLabelNamesLoading;
|
|
96
|
+
$[4] = isLabelValuesLoading;
|
|
97
|
+
$[5] = labelNames;
|
|
98
|
+
$[6] = labelNamesRefetch;
|
|
99
|
+
$[7] = labelValues;
|
|
100
|
+
$[8] = labelValuesRefetch;
|
|
101
|
+
$[9] = profileType;
|
|
102
|
+
$[10] = queryClient;
|
|
103
|
+
$[11] = runQuery;
|
|
104
|
+
$[12] = setMatchersString;
|
|
105
|
+
$[13] = start;
|
|
106
|
+
$[14] = suffix;
|
|
107
|
+
$[15] = t1;
|
|
108
|
+
} else {
|
|
109
|
+
t1 = $[15];
|
|
110
|
+
}
|
|
111
|
+
var value = t1;
|
|
112
|
+
var t2;
|
|
113
|
+
if ($[16] !== children || $[17] !== value) {
|
|
114
|
+
t2 = /*#__PURE__*/_jsx(LabelsQueryProviderContext.Provider, {
|
|
115
|
+
value: value,
|
|
116
|
+
children: children
|
|
117
|
+
});
|
|
118
|
+
$[16] = children;
|
|
119
|
+
$[17] = value;
|
|
120
|
+
$[18] = t2;
|
|
121
|
+
} else {
|
|
122
|
+
t2 = $[18];
|
|
123
|
+
}
|
|
124
|
+
return t2;
|
|
63
125
|
}
|
|
64
126
|
export function useLabelsQueryProvider() {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
127
|
+
var context = useContext(LabelsQueryProviderContext);
|
|
128
|
+
if (context === null) {
|
|
129
|
+
throw new Error("useLabelsQueryProvider must be used within a LabelsQueryProvider");
|
|
130
|
+
}
|
|
131
|
+
return context;
|
|
132
|
+
}
|