@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
|
@@ -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,19 +23,127 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
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 { useState } from 'react';
|
|
15
28
|
import { usePopper } from 'react-popper';
|
|
16
29
|
import { Button } from '@parca/components';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
30
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
31
|
+
var CompareButton = function CompareButton(t0) {
|
|
32
|
+
var $ = _c(14);
|
|
33
|
+
var disabled = t0.disabled,
|
|
34
|
+
onClick = t0.onClick;
|
|
35
|
+
var _useState = useState(false),
|
|
36
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
37
|
+
compareHover = _useState2[0],
|
|
38
|
+
setCompareHover = _useState2[1];
|
|
39
|
+
var _useState3 = useState(null),
|
|
40
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
41
|
+
comparePopperReferenceElement = _useState4[0],
|
|
42
|
+
setComparePopperReferenceElement = _useState4[1];
|
|
43
|
+
var _useState5 = useState(null),
|
|
44
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
45
|
+
comparePopperElement = _useState6[0],
|
|
46
|
+
setComparePopperElement = _useState6[1];
|
|
47
|
+
var t1;
|
|
48
|
+
if ($[0] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
49
|
+
t1 = {
|
|
50
|
+
placement: "bottom"
|
|
51
|
+
};
|
|
52
|
+
$[0] = t1;
|
|
53
|
+
} else {
|
|
54
|
+
t1 = $[0];
|
|
55
|
+
}
|
|
56
|
+
var _usePopper = usePopper(comparePopperReferenceElement, comparePopperElement, t1),
|
|
57
|
+
styles = _usePopper.styles,
|
|
58
|
+
attributes = _usePopper.attributes;
|
|
59
|
+
if (disabled) {
|
|
60
|
+
var _t;
|
|
61
|
+
if ($[1] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
62
|
+
_t = /*#__PURE__*/_jsx(_Fragment, {});
|
|
63
|
+
$[1] = _t;
|
|
64
|
+
} else {
|
|
65
|
+
_t = $[1];
|
|
66
|
+
}
|
|
67
|
+
return _t;
|
|
68
|
+
}
|
|
69
|
+
var t2;
|
|
70
|
+
var t3;
|
|
71
|
+
if ($[2] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
72
|
+
t2 = function t2() {
|
|
73
|
+
return setCompareHover(true);
|
|
74
|
+
};
|
|
75
|
+
t3 = function t3() {
|
|
76
|
+
return setCompareHover(false);
|
|
77
|
+
};
|
|
78
|
+
$[2] = t2;
|
|
79
|
+
$[3] = t3;
|
|
80
|
+
} else {
|
|
81
|
+
t2 = $[2];
|
|
82
|
+
t3 = $[3];
|
|
83
|
+
}
|
|
84
|
+
var t4;
|
|
85
|
+
if ($[4] !== disabled || $[5] !== onClick) {
|
|
86
|
+
t4 = /*#__PURE__*/_jsx(Button, {
|
|
87
|
+
variant: "neutral",
|
|
88
|
+
disabled: disabled,
|
|
89
|
+
onClick: onClick,
|
|
90
|
+
onMouseEnter: t2,
|
|
91
|
+
onMouseLeave: t3,
|
|
92
|
+
id: "h-compare-button",
|
|
93
|
+
children: "Compare"
|
|
94
|
+
});
|
|
95
|
+
$[4] = disabled;
|
|
96
|
+
$[5] = onClick;
|
|
97
|
+
$[6] = t4;
|
|
98
|
+
} else {
|
|
99
|
+
t4 = $[6];
|
|
100
|
+
}
|
|
101
|
+
var t5;
|
|
102
|
+
if ($[7] !== attributes || $[8] !== compareHover || $[9] !== styles) {
|
|
103
|
+
t5 = compareHover && /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
|
|
104
|
+
ref: setComparePopperElement,
|
|
105
|
+
style: styles.popper
|
|
106
|
+
}, attributes.popper), {}, {
|
|
107
|
+
className: "z-50",
|
|
108
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
109
|
+
className: "flex",
|
|
110
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
111
|
+
className: "relative mx-2",
|
|
112
|
+
children: [/*#__PURE__*/_jsx("svg", {
|
|
113
|
+
className: "left-0 h-1 w-full text-black",
|
|
114
|
+
x: "0px",
|
|
115
|
+
y: "0px",
|
|
116
|
+
viewBox: "0 0 255 127.5",
|
|
117
|
+
children: /*#__PURE__*/_jsx("polygon", {
|
|
118
|
+
className: "fill-current",
|
|
119
|
+
points: "0,127.5 127.5,0 255,127.5"
|
|
120
|
+
})
|
|
121
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
122
|
+
className: "right-0 w-40 rounded bg-black px-3 py-2 text-xs text-white",
|
|
123
|
+
children: "Compare two profiles and see the relative difference between them more clearly."
|
|
124
|
+
})]
|
|
125
|
+
})
|
|
126
|
+
})
|
|
127
|
+
}));
|
|
128
|
+
$[7] = attributes;
|
|
129
|
+
$[8] = compareHover;
|
|
130
|
+
$[9] = styles;
|
|
131
|
+
$[10] = t5;
|
|
132
|
+
} else {
|
|
133
|
+
t5 = $[10];
|
|
134
|
+
}
|
|
135
|
+
var t6;
|
|
136
|
+
if ($[11] !== t4 || $[12] !== t5) {
|
|
137
|
+
t6 = /*#__PURE__*/_jsxs("div", {
|
|
138
|
+
ref: setComparePopperReferenceElement,
|
|
139
|
+
children: [t4, t5]
|
|
23
140
|
});
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
141
|
+
$[11] = t4;
|
|
142
|
+
$[12] = t5;
|
|
143
|
+
$[13] = t6;
|
|
144
|
+
} else {
|
|
145
|
+
t6 = $[13];
|
|
146
|
+
}
|
|
147
|
+
return t6;
|
|
28
148
|
};
|
|
29
|
-
export default CompareButton;
|
|
149
|
+
export default CompareButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetricsGraphSection.d.ts","sourceRoot":"","sources":["../../src/ProfileSelector/MetricsGraphSection.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAQ,kBAAkB,EAAC,MAAM,eAAe,CAAC;AACxD,OAAO,EAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"MetricsGraphSection.d.ts","sourceRoot":"","sources":["../../src/ProfileSelector/MetricsGraphSection.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAQ,kBAAkB,EAAC,MAAM,eAAe,CAAC;AACxD,OAAO,EAAC,aAAa,EAAoC,MAAM,mBAAmB,CAAC;AACnF,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAEpC,OAAO,EAAC,gBAAgB,EAAC,MAAM,IAAI,CAAC;AAIpC,OAAO,EAAC,cAAc,EAAC,MAAM,SAAS,CAAC;AAEvC,UAAU,wBAAwB;IAChC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gCAAgC,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3D,cAAc,EAAE,cAAc,CAAC;IAC/B,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,WAAW,EAAE,kBAAkB,CAAC;IAChC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,qBAAqB,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACtD,WAAW,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAChF,KAAK,EAAE,KAAK,CAAC;IACb,qBAAqB,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,kBAAkB,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,WAAW,EAAE,CACX,kBAAkB,CAAC,EAAE;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAC,EACtE,UAAU,CAAC,EAAE,MAAM,KAChB,IAAI,CAAC;IACV,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,wBAAgB,mBAAmB,CAAC,EAClC,gBAAgB,EAChB,gCAAgC,EAChC,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,mBAAmB,EACnB,WAAW,EACX,qBAAqB,EACrB,qBAAqB,EACrB,WAAW,EACX,mBAAmB,EACnB,KAAK,EACL,qBAAqB,EACrB,WAAW,EACX,mBAA2B,EAC3B,iBAAyB,GAC1B,EAAE,wBAAwB,GAAG,GAAG,CAAC,OAAO,CAmIxC"}
|
|
@@ -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 _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
3
|
+
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."); }
|
|
4
|
+
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; } }
|
|
5
|
+
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; }
|
|
6
|
+
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; } }
|
|
7
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
|
+
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; }
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
|
+
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); }
|
|
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,76 +23,236 @@ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-run
|
|
|
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 cx from 'classnames';
|
|
15
|
-
import { useParcaContext } from '@parca/components';
|
|
28
|
+
import { useParcaContext, useURLStateBatch } from '@parca/components';
|
|
16
29
|
import { Query } from '@parca/parser';
|
|
17
30
|
import { useMetricsGraphDimensions } from '../MetricsGraph/useMetricsGraphDimensions';
|
|
18
31
|
import ProfileMetricsGraph, { ProfileMetricsEmptyState } from '../ProfileMetricsGraph';
|
|
19
32
|
import { useResetStateOnSeriesChange } from '../ProfileView/hooks/useResetStateOnSeriesChange';
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
33
|
+
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
34
|
+
export function MetricsGraphSection(t0) {
|
|
35
|
+
var $ = _c(37);
|
|
36
|
+
var showMetricsGraph = t0.showMetricsGraph,
|
|
37
|
+
setDisplayHideMetricsGraphButton = t0.setDisplayHideMetricsGraphButton,
|
|
38
|
+
querySelection = t0.querySelection,
|
|
39
|
+
profileSelection = t0.profileSelection,
|
|
40
|
+
comparing = t0.comparing,
|
|
41
|
+
sumBy = t0.sumBy,
|
|
42
|
+
defaultSumByLoading = t0.defaultSumByLoading,
|
|
43
|
+
queryClient = t0.queryClient,
|
|
44
|
+
queryExpressionString = t0.queryExpressionString,
|
|
45
|
+
setTimeRangeSelection = t0.setTimeRangeSelection,
|
|
46
|
+
selectQuery = t0.selectQuery,
|
|
47
|
+
setProfileSelection = t0.setProfileSelection,
|
|
48
|
+
query = t0.query,
|
|
49
|
+
setNewQueryExpression = t0.setNewQueryExpression,
|
|
50
|
+
commitDraft = t0.commitDraft,
|
|
51
|
+
t1 = t0.profileTypesLoading,
|
|
52
|
+
t2 = t0.hasNoProfileTypes;
|
|
53
|
+
var profileTypesLoading = t1 === undefined ? false : t1;
|
|
54
|
+
var hasNoProfileTypes = t2 === undefined ? false : t2;
|
|
55
|
+
var resetStateOnSeriesChange = useResetStateOnSeriesChange();
|
|
56
|
+
var batchUpdates = useURLStateBatch();
|
|
57
|
+
var _useParcaContext = useParcaContext(),
|
|
58
|
+
profileExplorer = _useParcaContext.profileExplorer;
|
|
59
|
+
var _useMetricsGraphDimen = useMetricsGraphDimensions(comparing, profileExplorer === null || profileExplorer === void 0 ? void 0 : profileExplorer.metricsGraph.height),
|
|
60
|
+
heightStyle = _useMetricsGraphDimen.heightStyle;
|
|
61
|
+
var t3;
|
|
62
|
+
if ($[0] !== query || $[1] !== queryExpressionString || $[2] !== selectQuery || $[3] !== setTimeRangeSelection) {
|
|
63
|
+
t3 = function t3(range) {
|
|
64
|
+
var from = range.getFromMs();
|
|
65
|
+
var to = range.getToMs();
|
|
66
|
+
var mergedProfileParams = {};
|
|
67
|
+
if (query.profileType().delta) {
|
|
68
|
+
mergedProfileParams = {
|
|
69
|
+
mergeFrom: from * 1000000,
|
|
70
|
+
mergeTo: to * 1000000
|
|
45
71
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
hasChanged = changed;
|
|
55
|
-
newQuery = query;
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
const { key, value } = labels;
|
|
59
|
-
const newValue = replaceBackslash(value);
|
|
60
|
-
const [query, changed] = Query.parse(queryExpressionString).setMatcher(key, newValue);
|
|
61
|
-
hasChanged = changed;
|
|
62
|
-
newQuery = query;
|
|
63
|
-
}
|
|
64
|
-
if (hasChanged) {
|
|
65
|
-
// Immediately apply the filter when adding label matchers from the graph
|
|
66
|
-
setNewQueryExpression(newQuery.toString());
|
|
67
|
-
commitDraft(undefined, newQuery.toString());
|
|
68
|
-
}
|
|
72
|
+
}
|
|
73
|
+
setTimeRangeSelection(range);
|
|
74
|
+
selectQuery(_objectSpread({
|
|
75
|
+
expression: queryExpressionString,
|
|
76
|
+
from: from,
|
|
77
|
+
to: to,
|
|
78
|
+
timeSelection: range.getRangeKey()
|
|
79
|
+
}, mergedProfileParams));
|
|
69
80
|
};
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
81
|
+
$[0] = query;
|
|
82
|
+
$[1] = queryExpressionString;
|
|
83
|
+
$[2] = selectQuery;
|
|
84
|
+
$[3] = setTimeRangeSelection;
|
|
85
|
+
$[4] = t3;
|
|
86
|
+
} else {
|
|
87
|
+
t3 = $[4];
|
|
88
|
+
}
|
|
89
|
+
var handleTimeRangeChange = t3;
|
|
90
|
+
var t4;
|
|
91
|
+
if ($[5] !== batchUpdates || $[6] !== commitDraft || $[7] !== queryExpressionString || $[8] !== setNewQueryExpression) {
|
|
92
|
+
t4 = function t4(labels) {
|
|
93
|
+
var replaceBackslash = _temp;
|
|
94
|
+
var newQuery;
|
|
95
|
+
var hasChanged;
|
|
96
|
+
if (Array.isArray(labels)) {
|
|
97
|
+
var newLabels = labels.map(function (t5) {
|
|
98
|
+
var key = t5.key,
|
|
99
|
+
value_0 = t5.value;
|
|
100
|
+
var newValue = replaceBackslash(value_0);
|
|
101
|
+
return {
|
|
102
|
+
key: key,
|
|
103
|
+
value: newValue
|
|
104
|
+
};
|
|
105
|
+
});
|
|
106
|
+
var _Query$parse$setMulti = Query.parse(queryExpressionString).setMultipleMatchers(newLabels),
|
|
107
|
+
_Query$parse$setMulti2 = _slicedToArray(_Query$parse$setMulti, 2),
|
|
108
|
+
query_0 = _Query$parse$setMulti2[0],
|
|
109
|
+
changed = _Query$parse$setMulti2[1];
|
|
110
|
+
hasChanged = changed;
|
|
111
|
+
newQuery = query_0;
|
|
112
|
+
} else {
|
|
113
|
+
var key_0 = labels.key,
|
|
114
|
+
value_1 = labels.value;
|
|
115
|
+
var newValue_0 = replaceBackslash(value_1);
|
|
116
|
+
var _Query$parse$setMatch = Query.parse(queryExpressionString).setMatcher(key_0, newValue_0),
|
|
117
|
+
_Query$parse$setMatch2 = _slicedToArray(_Query$parse$setMatch, 2),
|
|
118
|
+
query_1 = _Query$parse$setMatch2[0],
|
|
119
|
+
changed_0 = _Query$parse$setMatch2[1];
|
|
120
|
+
hasChanged = changed_0;
|
|
121
|
+
newQuery = query_1;
|
|
122
|
+
}
|
|
123
|
+
if (hasChanged) {
|
|
124
|
+
batchUpdates(function () {
|
|
125
|
+
setNewQueryExpression(newQuery.toString());
|
|
126
|
+
commitDraft(undefined, newQuery.toString());
|
|
77
127
|
});
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
$[5] = batchUpdates;
|
|
131
|
+
$[6] = commitDraft;
|
|
132
|
+
$[7] = queryExpressionString;
|
|
133
|
+
$[8] = setNewQueryExpression;
|
|
134
|
+
$[9] = t4;
|
|
135
|
+
} else {
|
|
136
|
+
t4 = $[9];
|
|
137
|
+
}
|
|
138
|
+
var addLabelMatcher = t4;
|
|
139
|
+
var t5;
|
|
140
|
+
if ($[10] !== batchUpdates || $[11] !== resetStateOnSeriesChange || $[12] !== setProfileSelection) {
|
|
141
|
+
t5 = function t5(timestamp, labels_0, queryExpression, duration) {
|
|
142
|
+
var query_2 = Query.parse(queryExpression);
|
|
143
|
+
labels_0.forEach(function (l) {
|
|
144
|
+
var _query_2$setMatcher = query_2.setMatcher(l.name, l.value),
|
|
145
|
+
_query_2$setMatcher2 = _slicedToArray(_query_2$setMatcher, 2),
|
|
146
|
+
newQuery_0 = _query_2$setMatcher2[0],
|
|
147
|
+
updated = _query_2$setMatcher2[1];
|
|
148
|
+
if (updated) {
|
|
149
|
+
query_2 = newQuery_0;
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
var mergeFrom = timestamp;
|
|
153
|
+
var mergeTo = query_2.profileType().delta ? mergeFrom + BigInt(duration) : mergeFrom;
|
|
154
|
+
batchUpdates(function () {
|
|
155
|
+
resetStateOnSeriesChange();
|
|
156
|
+
setProfileSelection(mergeFrom, mergeTo, query_2);
|
|
157
|
+
});
|
|
82
158
|
};
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
159
|
+
$[10] = batchUpdates;
|
|
160
|
+
$[11] = resetStateOnSeriesChange;
|
|
161
|
+
$[12] = setProfileSelection;
|
|
162
|
+
$[13] = t5;
|
|
163
|
+
} else {
|
|
164
|
+
t5 = $[13];
|
|
165
|
+
}
|
|
166
|
+
var handlePointClick = t5;
|
|
167
|
+
var t6 = !showMetricsGraph;
|
|
168
|
+
var t7;
|
|
169
|
+
if ($[14] !== t6) {
|
|
170
|
+
t7 = cx("relative", {
|
|
171
|
+
"py-4": t6
|
|
172
|
+
});
|
|
173
|
+
$[14] = t6;
|
|
174
|
+
$[15] = t7;
|
|
175
|
+
} else {
|
|
176
|
+
t7 = $[15];
|
|
177
|
+
}
|
|
178
|
+
var t8;
|
|
179
|
+
if ($[16] !== setDisplayHideMetricsGraphButton || $[17] !== showMetricsGraph) {
|
|
180
|
+
t8 = setDisplayHideMetricsGraphButton != null ? /*#__PURE__*/_jsxs("button", {
|
|
181
|
+
onClick: function onClick() {
|
|
182
|
+
return setDisplayHideMetricsGraphButton(!showMetricsGraph);
|
|
183
|
+
},
|
|
184
|
+
className: cx("hidden px-3 py-1 text-sm font-medium text-gray-700 dark:text-gray-200 bg-gray-100 rounded-md hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:bg-gray-900 z-[5]", showMetricsGraph && "absolute right-0 bottom-3 !flex", !showMetricsGraph && "relative !flex ml-auto"),
|
|
185
|
+
children: [showMetricsGraph ? "Hide" : "Show", " Metrics Graph"]
|
|
186
|
+
}) : null;
|
|
187
|
+
$[16] = setDisplayHideMetricsGraphButton;
|
|
188
|
+
$[17] = showMetricsGraph;
|
|
189
|
+
$[18] = t8;
|
|
190
|
+
} else {
|
|
191
|
+
t8 = $[18];
|
|
192
|
+
}
|
|
193
|
+
var t9;
|
|
194
|
+
if ($[19] !== addLabelMatcher || $[20] !== comparing || $[21] !== defaultSumByLoading || $[22] !== handlePointClick || $[23] !== handleTimeRangeChange || $[24] !== hasNoProfileTypes || $[25] !== heightStyle || $[26] !== profileSelection || $[27] !== profileTypesLoading || $[28] !== queryClient || $[29] !== querySelection || $[30] !== showMetricsGraph || $[31] !== sumBy) {
|
|
195
|
+
t9 = showMetricsGraph && /*#__PURE__*/_jsx(_Fragment, {
|
|
196
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
197
|
+
style: {
|
|
198
|
+
height: heightStyle
|
|
199
|
+
},
|
|
200
|
+
children: (querySelection.expression !== "" || defaultSumByLoading) && querySelection.from !== undefined && querySelection.to !== undefined ? /*#__PURE__*/_jsx(_Fragment, {
|
|
201
|
+
children: /*#__PURE__*/_jsx(ProfileMetricsGraph, {
|
|
202
|
+
queryClient: queryClient,
|
|
203
|
+
queryExpression: querySelection.expression,
|
|
204
|
+
from: querySelection.from,
|
|
205
|
+
to: querySelection.to,
|
|
206
|
+
profile: profileSelection,
|
|
207
|
+
comparing: comparing,
|
|
208
|
+
sumBy: sumBy !== null && sumBy !== void 0 ? sumBy : [],
|
|
209
|
+
sumByLoading: defaultSumByLoading,
|
|
210
|
+
setTimeRange: handleTimeRangeChange,
|
|
211
|
+
addLabelMatcher: addLabelMatcher,
|
|
212
|
+
onPointClick: handlePointClick
|
|
213
|
+
})
|
|
214
|
+
}) : profileSelection === null && !profileTypesLoading ? /*#__PURE__*/_jsx("div", {
|
|
215
|
+
className: "p-2",
|
|
216
|
+
children: hasNoProfileTypes ? /*#__PURE__*/_jsx(ProfileMetricsEmptyState, {
|
|
217
|
+
message: "No profiling data found in the selected time range. Try selecting a longer time range."
|
|
218
|
+
}) : /*#__PURE__*/_jsx(ProfileMetricsEmptyState, {
|
|
219
|
+
message: "Please select a profile type and click 'Search' to begin."
|
|
220
|
+
})
|
|
221
|
+
}) : null
|
|
222
|
+
})
|
|
223
|
+
});
|
|
224
|
+
$[19] = addLabelMatcher;
|
|
225
|
+
$[20] = comparing;
|
|
226
|
+
$[21] = defaultSumByLoading;
|
|
227
|
+
$[22] = handlePointClick;
|
|
228
|
+
$[23] = handleTimeRangeChange;
|
|
229
|
+
$[24] = hasNoProfileTypes;
|
|
230
|
+
$[25] = heightStyle;
|
|
231
|
+
$[26] = profileSelection;
|
|
232
|
+
$[27] = profileTypesLoading;
|
|
233
|
+
$[28] = queryClient;
|
|
234
|
+
$[29] = querySelection;
|
|
235
|
+
$[30] = showMetricsGraph;
|
|
236
|
+
$[31] = sumBy;
|
|
237
|
+
$[32] = t9;
|
|
238
|
+
} else {
|
|
239
|
+
t9 = $[32];
|
|
240
|
+
}
|
|
241
|
+
var t10;
|
|
242
|
+
if ($[33] !== t7 || $[34] !== t8 || $[35] !== t9) {
|
|
243
|
+
t10 = /*#__PURE__*/_jsxs("div", {
|
|
244
|
+
className: t7,
|
|
245
|
+
children: [t8, t9]
|
|
246
|
+
});
|
|
247
|
+
$[33] = t7;
|
|
248
|
+
$[34] = t8;
|
|
249
|
+
$[35] = t9;
|
|
250
|
+
$[36] = t10;
|
|
251
|
+
} else {
|
|
252
|
+
t10 = $[36];
|
|
253
|
+
}
|
|
254
|
+
return t10;
|
|
86
255
|
}
|
|
256
|
+
function _temp(value) {
|
|
257
|
+
return value.includes("\\") ? value.replaceAll("\\", "\\\\") : value;
|
|
258
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileSelector/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,QAAQ,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileSelector/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,QAAQ,EAAE,cAAc,EAAyC,MAAM,OAAO,CAAC;AAEvF,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAsB,oBAAoB,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAY5F,OAAO,EAAyB,KAAK,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAe/E,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,uBAAuB;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;AAED,UAAU,oBAAqB,SAAQ,uBAAuB;IAC5D,WAAW,EAAE,kBAAkB,CAAC;IAChC,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,gCAAgC,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACrE,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB;AAED,eAAO,MAAM,eAAe,GAC1B,QAAQ,kBAAkB,EAC1B,QAAQ,MAAM,EACd,MAAM,MAAM,KACX,mBAsBF,CAAC;AAEF,QAAA,MAAM,eAAe,GAAI,kMAYtB,oBAAoB,KAAG,GAAG,CAAC,OA+R7B,CAAC;AAEF,eAAe,eAAe,CAAC"}
|