@parca/profile 0.19.140 → 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 +5 -1
- 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.d.ts.map +1 -1
- package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +104 -72
- 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.d.ts.map +1 -1
- package/dist/ProfileExplorer/ProfileExplorerCompare.js +241 -45
- 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.d.ts +2 -2
- package/dist/ProfileFlameChart/SamplesStrips/index.d.ts.map +1 -1
- package/dist/ProfileFlameChart/SamplesStrips/index.js +645 -134
- package/dist/ProfileFlameChart/SamplesStrips/labelSetUtils.js +114 -55
- package/dist/ProfileFlameChart/index.d.ts.map +1 -1
- package/dist/ProfileFlameChart/index.js +267 -129
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.js +288 -89
- 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 +72 -47
- 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.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/index.js +324 -150
- package/dist/ProfileMetricsGraph/hooks/useQueryRange.js +140 -32
- package/dist/ProfileMetricsGraph/index.d.ts.map +1 -1
- package/dist/ProfileMetricsGraph/index.js +519 -258
- package/dist/ProfileSelector/CompareButton.js +132 -12
- package/dist/ProfileSelector/MetricsGraphSection.d.ts.map +1 -1
- package/dist/ProfileSelector/MetricsGraphSection.js +236 -64
- package/dist/ProfileSelector/index.d.ts.map +1 -1
- package/dist/ProfileSelector/index.js +727 -141
- 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.d.ts.map +1 -1
- package/dist/ProfileView/components/ActionButtons/SortByDropdown.js +141 -35
- package/dist/ProfileView/components/ColorStackLegend.d.ts.map +1 -1
- package/dist/ProfileView/components/ColorStackLegend.js +185 -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.d.ts.map +1 -1
- package/dist/ProfileView/components/InvertCallStack/index.js +100 -12
- 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.d.ts +2 -1
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts.map +1 -1
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.js +188 -118
- 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 +678 -194
- package/dist/ProfileView/components/Toolbars/SwitchMenuItem.js +94 -7
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.js +199 -157
- package/dist/ProfileView/components/Toolbars/index.d.ts +2 -2
- package/dist/ProfileView/components/Toolbars/index.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/index.js +441 -21
- package/dist/ProfileView/components/ViewSelector/Dropdown.js +233 -22
- package/dist/ProfileView/components/ViewSelector/index.d.ts.map +1 -1
- package/dist/ProfileView/components/ViewSelector/index.js +212 -86
- 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.d.ts.map +1 -1
- package/dist/ProfileView/context/DashboardContext.js +85 -29
- 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.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetFlameGraphState.js +32 -12
- package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.js +71 -27
- package/dist/ProfileView/hooks/useResetStateOnSeriesChange.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetStateOnSeriesChange.js +40 -19
- package/dist/ProfileView/hooks/useVisualizationState.d.ts +3 -3
- package/dist/ProfileView/hooks/useVisualizationState.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useVisualizationState.js +258 -67
- 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.d.ts.map +1 -1
- package/dist/ProfileViewWithData.js +332 -228
- 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.d.ts.map +1 -1
- package/dist/Sandwich/index.js +126 -14
- 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.d.ts.map +1 -1
- package/dist/SourceView/index.js +178 -104
- package/dist/SourceView/lang-detector/ext-to-lang.json +798 -798
- package/dist/SourceView/lang-detector/index.js +28 -14
- package/dist/SourceView/useSelectedLineRange.d.ts.map +1 -1
- package/dist/SourceView/useSelectedLineRange.js +99 -23
- package/dist/Table/ColorCell.js +42 -1
- package/dist/Table/ColumnsVisibility.js +114 -6
- package/dist/Table/MoreDropdown.d.ts.map +1 -1
- package/dist/Table/MoreDropdown.js +122 -25
- package/dist/Table/TableContextMenu.d.ts.map +1 -1
- package/dist/Table/TableContextMenu.js +151 -137
- 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 +333 -169
- package/dist/Table/index.d.ts.map +1 -1
- package/dist/Table/index.js +222 -128
- 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.d.ts.map +1 -1
- package/dist/TopTable/index.js +342 -123
- 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.d.ts.map +1 -1
- package/dist/hooks/useCompareModeMeta.js +158 -64
- package/dist/hooks/useLabels.js +295 -52
- package/dist/hooks/useQueryState.d.ts +3 -3
- package/dist/hooks/useQueryState.d.ts.map +1 -1
- package/dist/hooks/useQueryState.js +373 -332
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -8
- 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 +1 -1
- package/dist/useSumBy.d.ts.map +1 -1
- package/dist/useSumBy.js +294 -138
- package/dist/utils.js +62 -30
- package/package.json +9 -10
- package/src/GraphTooltipArrow/index.tsx +3 -0
- package/src/GraphTooltipArrow/useGraphTooltipMetaInfo/index.ts +13 -11
- 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/ProfileExplorer/ProfileExplorerCompare.tsx +9 -4
- package/src/ProfileFlameChart/SamplesStrips/index.tsx +2 -2
- package/src/ProfileFlameChart/index.tsx +28 -21
- package/src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx +9 -10
- package/src/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.tsx +6 -5
- 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/ProfileFlameGraph/index.tsx +9 -6
- package/src/ProfileMetricsGraph/index.tsx +8 -6
- package/src/ProfileSelector/MetricsGraphSection.tsx +10 -5
- package/src/ProfileSelector/index.tsx +61 -39
- package/src/ProfileView/components/ActionButtons/SortByDropdown.tsx +6 -10
- package/src/ProfileView/components/ColorStackLegend.tsx +4 -2
- package/src/ProfileView/components/InvertCallStack/index.tsx +4 -5
- package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.tsx +192 -94
- package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.ts +21 -21
- package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +28 -24
- package/src/ProfileView/components/Toolbars/TableColumnsDropdown.tsx +5 -4
- package/src/ProfileView/components/Toolbars/index.tsx +3 -3
- package/src/ProfileView/components/ViewSelector/index.tsx +16 -9
- package/src/ProfileView/components/VisualizationContainer/index.tsx +3 -0
- package/src/ProfileView/context/DashboardContext.tsx +6 -6
- package/src/ProfileView/hooks/useResetFlameGraphState.ts +4 -6
- package/src/ProfileView/hooks/useResetStateOnProfileTypeChange.ts +26 -24
- package/src/ProfileView/hooks/useResetStateOnSeriesChange.ts +8 -16
- package/src/ProfileView/hooks/useVisualizationState.ts +69 -61
- package/src/ProfileViewWithData.tsx +35 -29
- package/src/Sandwich/index.tsx +3 -4
- package/src/SourceView/index.tsx +2 -4
- package/src/SourceView/useSelectedLineRange.ts +19 -34
- package/src/Table/MoreDropdown.tsx +11 -9
- package/src/Table/TableContextMenu.tsx +13 -10
- package/src/Table/hooks/useTableConfiguration.tsx +11 -16
- package/src/Table/index.tsx +21 -12
- package/src/TopTable/index.tsx +4 -3
- package/src/hooks/useCompareModeMeta.ts +91 -61
- package/src/hooks/useQueryState.test.tsx +345 -275
- package/src/hooks/useQueryState.ts +118 -136
- package/src/index.tsx +15 -16
- package/src/useDelayedLoader.ts +10 -10
- package/src/useSumBy.ts +15 -21
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.js +0 -455
- package/dist/hooks/urlParsers.d.ts +0 -18
- package/dist/hooks/urlParsers.d.ts.map +0 -1
- package/dist/hooks/urlParsers.js +0 -32
- package/dist/hooks/useColorBy.d.ts +0 -5
- package/dist/hooks/useColorBy.d.ts.map +0 -1
- package/dist/hooks/useColorBy.js +0 -26
- package/dist/hooks/useDashboardItems.d.ts +0 -5
- package/dist/hooks/useDashboardItems.d.ts.map +0 -1
- package/dist/hooks/useDashboardItems.js +0 -27
- package/dist/hooks/useQueryState.test.js +0 -868
- package/src/hooks/urlParsers.ts +0 -38
- package/src/hooks/useColorBy.ts +0 -42
- package/src/hooks/useDashboardItems.ts +0 -46
package/dist/hooks/useLabels.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
2
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
3
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
4
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
5
|
+
import { c as _c } from "react-compiler-runtime"; // Copyright 2022 The Parca Authors
|
|
2
6
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
7
|
// you may not use this file except in compliance with the License.
|
|
4
8
|
// You may obtain a copy of the License at
|
|
@@ -13,62 +17,301 @@
|
|
|
13
17
|
import { useGrpcMetadata } from '@parca/components';
|
|
14
18
|
import { millisToProtoTimestamp, sanitizeLabelValue } from '@parca/utilities';
|
|
15
19
|
import useGrpcQuery from '../useGrpcQuery';
|
|
16
|
-
export
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
export var useLabelNames = function useLabelNames(client, profileType, start, end, match) {
|
|
21
|
+
var $ = _c(29);
|
|
22
|
+
var metadata = useGrpcMetadata();
|
|
23
|
+
var enabled = profileType !== undefined && profileType !== "";
|
|
24
|
+
var t0;
|
|
25
|
+
if ($[0] !== match) {
|
|
26
|
+
t0 = match === null || match === void 0 ? void 0 : match.join(",");
|
|
27
|
+
$[0] = match;
|
|
28
|
+
$[1] = t0;
|
|
29
|
+
} else {
|
|
30
|
+
t0 = $[1];
|
|
31
|
+
}
|
|
32
|
+
var t1;
|
|
33
|
+
if ($[2] !== end || $[3] !== profileType || $[4] !== start || $[5] !== t0) {
|
|
34
|
+
t1 = ["labelNames", profileType, t0, start, end];
|
|
35
|
+
$[2] = end;
|
|
36
|
+
$[3] = profileType;
|
|
37
|
+
$[4] = start;
|
|
38
|
+
$[5] = t0;
|
|
39
|
+
$[6] = t1;
|
|
40
|
+
} else {
|
|
41
|
+
t1 = $[6];
|
|
42
|
+
}
|
|
43
|
+
var t2;
|
|
44
|
+
if ($[7] !== client || $[8] !== end || $[9] !== match || $[10] !== metadata || $[11] !== profileType || $[12] !== start) {
|
|
45
|
+
t2 = /*#__PURE__*/function () {
|
|
46
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(signal) {
|
|
47
|
+
var request, _yield$client$labels, response;
|
|
48
|
+
return _regenerator().w(function (_context) {
|
|
49
|
+
while (1) switch (_context.n) {
|
|
50
|
+
case 0:
|
|
51
|
+
request = {
|
|
52
|
+
match: match !== undefined ? match : []
|
|
53
|
+
};
|
|
54
|
+
if (start !== undefined && end !== undefined) {
|
|
24
55
|
request.start = millisToProtoTimestamp(start);
|
|
25
56
|
request.end = millisToProtoTimestamp(end);
|
|
26
|
-
|
|
27
|
-
|
|
57
|
+
}
|
|
58
|
+
if (profileType !== undefined) {
|
|
28
59
|
request.profileType = profileType;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
60
|
+
}
|
|
61
|
+
_context.n = 1;
|
|
62
|
+
return client.labels(request, {
|
|
63
|
+
meta: metadata,
|
|
64
|
+
abort: signal
|
|
65
|
+
});
|
|
66
|
+
case 1:
|
|
67
|
+
_yield$client$labels = _context.v;
|
|
68
|
+
response = _yield$client$labels.response;
|
|
69
|
+
return _context.a(2, response);
|
|
70
|
+
}
|
|
71
|
+
}, _callee);
|
|
72
|
+
}));
|
|
73
|
+
return function t2(_x) {
|
|
74
|
+
return _ref.apply(this, arguments);
|
|
75
|
+
};
|
|
76
|
+
}();
|
|
77
|
+
$[7] = client;
|
|
78
|
+
$[8] = end;
|
|
79
|
+
$[9] = match;
|
|
80
|
+
$[10] = metadata;
|
|
81
|
+
$[11] = profileType;
|
|
82
|
+
$[12] = start;
|
|
83
|
+
$[13] = t2;
|
|
84
|
+
} else {
|
|
85
|
+
t2 = $[13];
|
|
86
|
+
}
|
|
87
|
+
var t3;
|
|
88
|
+
if ($[14] !== enabled) {
|
|
89
|
+
t3 = {
|
|
90
|
+
enabled: enabled,
|
|
91
|
+
keepPreviousData: false
|
|
44
92
|
};
|
|
93
|
+
$[14] = enabled;
|
|
94
|
+
$[15] = t3;
|
|
95
|
+
} else {
|
|
96
|
+
t3 = $[15];
|
|
97
|
+
}
|
|
98
|
+
var t4;
|
|
99
|
+
if ($[16] !== t1 || $[17] !== t2 || $[18] !== t3) {
|
|
100
|
+
t4 = {
|
|
101
|
+
key: t1,
|
|
102
|
+
queryFn: t2,
|
|
103
|
+
options: t3
|
|
104
|
+
};
|
|
105
|
+
$[16] = t1;
|
|
106
|
+
$[17] = t2;
|
|
107
|
+
$[18] = t3;
|
|
108
|
+
$[19] = t4;
|
|
109
|
+
} else {
|
|
110
|
+
t4 = $[19];
|
|
111
|
+
}
|
|
112
|
+
var _useGrpcQuery = useGrpcQuery(t4),
|
|
113
|
+
data = _useGrpcQuery.data,
|
|
114
|
+
isLoading = _useGrpcQuery.isLoading,
|
|
115
|
+
error = _useGrpcQuery.error,
|
|
116
|
+
refetch = _useGrpcQuery.refetch;
|
|
117
|
+
var t5 = error;
|
|
118
|
+
var t6;
|
|
119
|
+
if ($[20] !== data || $[21] !== t5) {
|
|
120
|
+
t6 = {
|
|
121
|
+
response: data,
|
|
122
|
+
error: t5
|
|
123
|
+
};
|
|
124
|
+
$[20] = data;
|
|
125
|
+
$[21] = t5;
|
|
126
|
+
$[22] = t6;
|
|
127
|
+
} else {
|
|
128
|
+
t6 = $[22];
|
|
129
|
+
}
|
|
130
|
+
var t7 = enabled && isLoading;
|
|
131
|
+
var t8;
|
|
132
|
+
if ($[23] !== refetch) {
|
|
133
|
+
t8 = /*#__PURE__*/function () {
|
|
134
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
135
|
+
return _regenerator().w(function (_context2) {
|
|
136
|
+
while (1) switch (_context2.n) {
|
|
137
|
+
case 0:
|
|
138
|
+
_context2.n = 1;
|
|
139
|
+
return refetch();
|
|
140
|
+
case 1:
|
|
141
|
+
return _context2.a(2);
|
|
142
|
+
}
|
|
143
|
+
}, _callee2);
|
|
144
|
+
}));
|
|
145
|
+
return function t8() {
|
|
146
|
+
return _ref2.apply(this, arguments);
|
|
147
|
+
};
|
|
148
|
+
}();
|
|
149
|
+
$[23] = refetch;
|
|
150
|
+
$[24] = t8;
|
|
151
|
+
} else {
|
|
152
|
+
t8 = $[24];
|
|
153
|
+
}
|
|
154
|
+
var t9;
|
|
155
|
+
if ($[25] !== t6 || $[26] !== t7 || $[27] !== t8) {
|
|
156
|
+
t9 = {
|
|
157
|
+
result: t6,
|
|
158
|
+
loading: t7,
|
|
159
|
+
refetch: t8
|
|
160
|
+
};
|
|
161
|
+
$[25] = t6;
|
|
162
|
+
$[26] = t7;
|
|
163
|
+
$[27] = t8;
|
|
164
|
+
$[28] = t9;
|
|
165
|
+
} else {
|
|
166
|
+
t9 = $[28];
|
|
167
|
+
}
|
|
168
|
+
return t9;
|
|
45
169
|
};
|
|
46
|
-
export
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
170
|
+
export var useLabelValues = function useLabelValues(client, labelName, profileType, start, end) {
|
|
171
|
+
var $ = _c(29);
|
|
172
|
+
var metadata = useGrpcMetadata();
|
|
173
|
+
var t0;
|
|
174
|
+
if ($[0] !== end || $[1] !== labelName || $[2] !== profileType || $[3] !== start) {
|
|
175
|
+
t0 = ["labelValues", labelName, profileType, start, end];
|
|
176
|
+
$[0] = end;
|
|
177
|
+
$[1] = labelName;
|
|
178
|
+
$[2] = profileType;
|
|
179
|
+
$[3] = start;
|
|
180
|
+
$[4] = t0;
|
|
181
|
+
} else {
|
|
182
|
+
t0 = $[4];
|
|
183
|
+
}
|
|
184
|
+
var t1;
|
|
185
|
+
if ($[5] !== client || $[6] !== end || $[7] !== labelName || $[8] !== metadata || $[9] !== profileType || $[10] !== start) {
|
|
186
|
+
t1 = /*#__PURE__*/function () {
|
|
187
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(signal) {
|
|
188
|
+
var request, _yield$client$values, response;
|
|
189
|
+
return _regenerator().w(function (_context3) {
|
|
190
|
+
while (1) switch (_context3.n) {
|
|
191
|
+
case 0:
|
|
192
|
+
request = {
|
|
193
|
+
labelName: labelName,
|
|
194
|
+
match: [],
|
|
195
|
+
profileType: profileType
|
|
196
|
+
};
|
|
197
|
+
if (start !== undefined && end !== undefined) {
|
|
53
198
|
request.start = millisToProtoTimestamp(start);
|
|
54
199
|
request.end = millisToProtoTimestamp(end);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
200
|
+
}
|
|
201
|
+
_context3.n = 1;
|
|
202
|
+
return client.values(request, {
|
|
203
|
+
meta: metadata,
|
|
204
|
+
abort: signal
|
|
205
|
+
});
|
|
206
|
+
case 1:
|
|
207
|
+
_yield$client$values = _context3.v;
|
|
208
|
+
response = _yield$client$values.response;
|
|
209
|
+
return _context3.a(2, sanitizeLabelValue(response.labelValues));
|
|
210
|
+
}
|
|
211
|
+
}, _callee3);
|
|
212
|
+
}));
|
|
213
|
+
return function t1(_x2) {
|
|
214
|
+
return _ref3.apply(this, arguments);
|
|
215
|
+
};
|
|
216
|
+
}();
|
|
217
|
+
$[5] = client;
|
|
218
|
+
$[6] = end;
|
|
219
|
+
$[7] = labelName;
|
|
220
|
+
$[8] = metadata;
|
|
221
|
+
$[9] = profileType;
|
|
222
|
+
$[10] = start;
|
|
223
|
+
$[11] = t1;
|
|
224
|
+
} else {
|
|
225
|
+
t1 = $[11];
|
|
226
|
+
}
|
|
227
|
+
var t2 = profileType !== undefined && profileType !== "" && labelName !== undefined && labelName !== "";
|
|
228
|
+
var t3;
|
|
229
|
+
if ($[12] !== t2) {
|
|
230
|
+
t3 = {
|
|
231
|
+
enabled: t2,
|
|
232
|
+
keepPreviousData: false
|
|
73
233
|
};
|
|
74
|
-
|
|
234
|
+
$[12] = t2;
|
|
235
|
+
$[13] = t3;
|
|
236
|
+
} else {
|
|
237
|
+
t3 = $[13];
|
|
238
|
+
}
|
|
239
|
+
var t4;
|
|
240
|
+
if ($[14] !== t0 || $[15] !== t1 || $[16] !== t3) {
|
|
241
|
+
t4 = {
|
|
242
|
+
key: t0,
|
|
243
|
+
queryFn: t1,
|
|
244
|
+
options: t3
|
|
245
|
+
};
|
|
246
|
+
$[14] = t0;
|
|
247
|
+
$[15] = t1;
|
|
248
|
+
$[16] = t3;
|
|
249
|
+
$[17] = t4;
|
|
250
|
+
} else {
|
|
251
|
+
t4 = $[17];
|
|
252
|
+
}
|
|
253
|
+
var _useGrpcQuery2 = useGrpcQuery(t4),
|
|
254
|
+
data = _useGrpcQuery2.data,
|
|
255
|
+
isLoading = _useGrpcQuery2.isLoading,
|
|
256
|
+
error = _useGrpcQuery2.error,
|
|
257
|
+
refetch = _useGrpcQuery2.refetch;
|
|
258
|
+
var t5;
|
|
259
|
+
if ($[18] !== data) {
|
|
260
|
+
t5 = data !== null && data !== void 0 ? data : [];
|
|
261
|
+
$[18] = data;
|
|
262
|
+
$[19] = t5;
|
|
263
|
+
} else {
|
|
264
|
+
t5 = $[19];
|
|
265
|
+
}
|
|
266
|
+
var t6 = error;
|
|
267
|
+
var t7;
|
|
268
|
+
if ($[20] !== t5 || $[21] !== t6) {
|
|
269
|
+
t7 = {
|
|
270
|
+
response: t5,
|
|
271
|
+
error: t6
|
|
272
|
+
};
|
|
273
|
+
$[20] = t5;
|
|
274
|
+
$[21] = t6;
|
|
275
|
+
$[22] = t7;
|
|
276
|
+
} else {
|
|
277
|
+
t7 = $[22];
|
|
278
|
+
}
|
|
279
|
+
var t8;
|
|
280
|
+
if ($[23] !== refetch) {
|
|
281
|
+
t8 = /*#__PURE__*/function () {
|
|
282
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
|
|
283
|
+
return _regenerator().w(function (_context4) {
|
|
284
|
+
while (1) switch (_context4.n) {
|
|
285
|
+
case 0:
|
|
286
|
+
_context4.n = 1;
|
|
287
|
+
return refetch();
|
|
288
|
+
case 1:
|
|
289
|
+
return _context4.a(2);
|
|
290
|
+
}
|
|
291
|
+
}, _callee4);
|
|
292
|
+
}));
|
|
293
|
+
return function t8() {
|
|
294
|
+
return _ref4.apply(this, arguments);
|
|
295
|
+
};
|
|
296
|
+
}();
|
|
297
|
+
$[23] = refetch;
|
|
298
|
+
$[24] = t8;
|
|
299
|
+
} else {
|
|
300
|
+
t8 = $[24];
|
|
301
|
+
}
|
|
302
|
+
var t9;
|
|
303
|
+
if ($[25] !== isLoading || $[26] !== t7 || $[27] !== t8) {
|
|
304
|
+
t9 = {
|
|
305
|
+
result: t7,
|
|
306
|
+
loading: isLoading,
|
|
307
|
+
refetch: t8
|
|
308
|
+
};
|
|
309
|
+
$[25] = isLoading;
|
|
310
|
+
$[26] = t7;
|
|
311
|
+
$[27] = t8;
|
|
312
|
+
$[28] = t9;
|
|
313
|
+
} else {
|
|
314
|
+
t9 = $[28];
|
|
315
|
+
}
|
|
316
|
+
return t9;
|
|
317
|
+
};
|
|
@@ -29,9 +29,9 @@ interface UseQueryStateReturn {
|
|
|
29
29
|
sumByLoading: boolean;
|
|
30
30
|
draftParsedQuery: Query | null;
|
|
31
31
|
parsedQuery: Query | null;
|
|
32
|
-
setExpressionParam: (value: string |
|
|
33
|
-
setSumByParam: (value: string |
|
|
34
|
-
setGroupByParam: (value: string[] |
|
|
32
|
+
setExpressionParam: (value: string | undefined) => void;
|
|
33
|
+
setSumByParam: (value: string | undefined) => void;
|
|
34
|
+
setGroupByParam: (value: string[] | undefined) => void;
|
|
35
35
|
}
|
|
36
36
|
export declare const useQueryState: (options?: UseQueryStateOptions) => UseQueryStateReturn;
|
|
37
37
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQueryState.d.ts","sourceRoot":"","sources":["../../src/hooks/useQueryState.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useQueryState.d.ts","sourceRoot":"","sources":["../../src/hooks/useQueryState.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAEpC,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAC,gBAAgB,EAA8B,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAK7F,UAAU,oBAAoB;IAC5B,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,UAAU,mBAAmB;IAE3B,cAAc,EAAE,cAAc,CAAC;IAG/B,cAAc,EAAE,cAAc,CAAC;IAG/B,kBAAkB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7E,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS,KAAK,IAAI,CAAC;IACrD,mBAAmB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAG7C,WAAW,EAAE,CAAC,kBAAkB,CAAC,EAAE;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAC,KAAK,IAAI,CAAC;IAG9F,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAG1C,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IAGpC,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAGhF,YAAY,EAAE,OAAO,CAAC;IAGtB,gBAAgB,EAAE,KAAK,GAAG,IAAI,CAAC;IAG/B,WAAW,EAAE,KAAK,GAAG,IAAI,CAAC;IAE1B,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACxD,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACnD,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS,KAAK,IAAI,CAAC;CACxD;AAED,eAAO,MAAM,aAAa,GAAI,UAAS,oBAAyB,KAAG,mBA2alE,CAAC"}
|