@parca/profile 0.16.152 → 0.16.153

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/Callgraph/index.js +1 -1
  3. package/dist/GraphTooltip/ExpandOnHoverValue.js +1 -1
  4. package/dist/GraphTooltip/index.js +4 -4
  5. package/dist/MatchersInput/SuggestionItem.js +2 -2
  6. package/dist/MatchersInput/SuggestionsList.js +1 -1
  7. package/dist/MatchersInput/index.js +1 -1
  8. package/dist/MetricsGraph/MetricsTooltip/index.js +3 -3
  9. package/dist/ProfileExplorer/index.js +1 -1
  10. package/dist/ProfileIcicleGraph/IcicleGraph/ColorStackLegend.js +3 -3
  11. package/dist/ProfileMetricsGraph/index.js +3 -3
  12. package/dist/ProfileSelector/CompareButton.js +1 -1
  13. package/dist/ProfileSelector/index.js +1 -1
  14. package/dist/ProfileView/VisualizationPanel.js +1 -1
  15. package/dist/ProfileView/index.js +4 -4
  16. package/dist/TopTable/index.js +1 -1
  17. package/dist/components/DiffLegend.js +3 -3
  18. package/dist/components/ProfileShareButton/ResultBox.js +1 -1
  19. package/dist/components/ProfileShareButton/index.js +2 -2
  20. package/package.json +3 -3
  21. package/src/Callgraph/index.tsx +2 -2
  22. package/src/GraphTooltip/ExpandOnHoverValue.tsx +3 -3
  23. package/src/GraphTooltip/index.tsx +7 -7
  24. package/src/MatchersInput/SuggestionItem.tsx +2 -2
  25. package/src/MatchersInput/SuggestionsList.tsx +1 -1
  26. package/src/MatchersInput/index.tsx +2 -2
  27. package/src/MetricsGraph/MetricsTooltip/index.tsx +5 -5
  28. package/src/ProfileExplorer/index.tsx +1 -1
  29. package/src/ProfileIcicleGraph/IcicleGraph/ColorStackLegend.tsx +3 -3
  30. package/src/ProfileIcicleGraph/ProfileIcicleGraph.stories.mdx +1 -1
  31. package/src/ProfileMetricsGraph/index.tsx +3 -3
  32. package/src/ProfileSelector/CompareButton.tsx +2 -2
  33. package/src/ProfileSelector/index.tsx +2 -2
  34. package/src/ProfileView/VisualizationPanel.tsx +2 -2
  35. package/src/ProfileView/index.tsx +6 -6
  36. package/src/TopTable/index.tsx +1 -1
  37. package/src/components/DiffLegend.tsx +3 -3
  38. package/src/components/ProfileShareButton/ResultBox.tsx +4 -4
  39. package/src/components/ProfileShareButton/index.tsx +3 -3
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 0.16.153 (2023-03-28)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
6
10
  ## [0.16.152](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.150...@parca/profile@0.16.152) (2023-03-27)
7
11
 
8
12
  **Note:** Version bump only for package @parca/profile
@@ -108,6 +108,6 @@ var Callgraph = function (_a) {
108
108
  var isResetViewButtonEnabled = view.scale !== originalView.scale ||
109
109
  view.translation.x !== originalView.translation.x ||
110
110
  view.translation.y !== originalView.translation.y;
111
- return (_jsxs("div", __assign({ className: "w-full relative" }, { children: [_jsxs("div", __assign({ ref: containerRef, className: "w-full overflow-hidden" }, { children: [_jsx(MapInteractionCSS, __assign({ showControls: true, minScale: 1, maxScale: 5, value: view, onChange: function (value) { return setView(value); } }, { children: _jsx(SVG, { ref: svgWrapper, src: svgString, width: width, height: "auto", title: "Callgraph", innerRef: svgRef }) })), svgRef.current !== null && (_jsx(GraphTooltip, { type: "callgraph", unit: sampleUnit, total: parseInt(data.cumulative), totalUnfiltered: parseInt(data.cumulative), contextElement: containerRef.current }))] })), _jsx("div", __assign({ className: cx(dashboardItems.length > 1 ? 'left-[25px]' : 'left-0', 'w-auto absolute top-[-46px]') }, { children: _jsx(Button, __assign({ variant: "neutral", onClick: resetView, className: "z-50", disabled: !isResetViewButtonEnabled }, { children: "Reset View" })) }))] })));
111
+ return (_jsxs("div", __assign({ className: "relative w-full" }, { children: [_jsxs("div", __assign({ ref: containerRef, className: "w-full overflow-hidden" }, { children: [_jsx(MapInteractionCSS, __assign({ showControls: true, minScale: 1, maxScale: 5, value: view, onChange: function (value) { return setView(value); } }, { children: _jsx(SVG, { ref: svgWrapper, src: svgString, width: width, height: "auto", title: "Callgraph", innerRef: svgRef }) })), svgRef.current !== null && (_jsx(GraphTooltip, { type: "callgraph", unit: sampleUnit, total: parseInt(data.cumulative), totalUnfiltered: parseInt(data.cumulative), contextElement: containerRef.current }))] })), _jsx("div", __assign({ className: cx(dashboardItems.length > 1 ? 'left-[25px]' : 'left-0', 'absolute top-[-46px] w-auto') }, { children: _jsx(Button, __assign({ variant: "neutral", onClick: resetView, className: "z-50", disabled: !isResetViewButtonEnabled }, { children: "Reset View" })) }))] })));
112
112
  };
113
113
  export default Callgraph;
@@ -12,5 +12,5 @@ var __assign = (this && this.__assign) || function () {
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  export var ExpandOnHover = function (_a) {
14
14
  var value = _a.value, displayValue = _a.displayValue;
15
- return (_jsxs("div", __assign({ className: "relative group w-full" }, { children: [_jsx("div", __assign({ className: "text-ellipsis w-full overflow-hidden whitespace-nowrap" }, { children: displayValue !== null && displayValue !== void 0 ? displayValue : value })), _jsx("div", __assign({ className: "group-hover:flex hidden absolute -inset-2 max-w-[500px] whitespace-normal h-fit bg-gray-50 dark:bg-gray-900 shadow-[0_0_10px_2px_rgba(0,0,0,0.3)] rounded p-2 break-all" }, { children: value }))] })));
15
+ return (_jsxs("div", __assign({ className: "group relative w-full" }, { children: [_jsx("div", __assign({ className: "w-full overflow-hidden text-ellipsis whitespace-nowrap" }, { children: displayValue !== null && displayValue !== void 0 ? displayValue : value })), _jsx("div", __assign({ className: "absolute -inset-2 hidden h-fit max-w-[500px] whitespace-normal break-all rounded bg-gray-50 p-2 shadow-[0_0_10px_2px_rgba(0,0,0,0.3)] group-hover:flex dark:bg-gray-900" }, { children: value }))] })));
16
16
  };
@@ -43,7 +43,7 @@ import { getLastItem, valueFormatter } from '@parca/utilities';
43
43
  import { hexifyAddress, truncateString, truncateStringReverse } from '../';
44
44
  import { ExpandOnHover } from './ExpandOnHoverValue';
45
45
  var NoData = function () {
46
- return _jsx("span", __assign({ className: "rounded bg-gray-200 dark:bg-gray-800 px-2" }, { children: "Not available" }));
46
+ return _jsx("span", __assign({ className: "rounded bg-gray-200 px-2 dark:bg-gray-800" }, { children: "Not available" }));
47
47
  };
48
48
  var virtualElement = {
49
49
  getBoundingClientRect: function () {
@@ -124,7 +124,7 @@ var TooltipMetaInfo = function (_a) {
124
124
  };
125
125
  var file = getTextForFile(hoveringNode);
126
126
  return (_jsxs(_Fragment, { children: [_jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "File" })), _jsx("td", __assign({ className: "w-3/4 break-all" }, { children: ((_d = (_c = hoveringNode.meta) === null || _c === void 0 ? void 0 : _c.function) === null || _d === void 0 ? void 0 : _d.filename) == null ||
127
- ((_e = hoveringNode.meta) === null || _e === void 0 ? void 0 : _e.function.filename) === '' ? (_jsx(NoData, {})) : (_jsx(CopyToClipboard, __assign({ onCopy: onCopy, text: file }, { children: _jsx("button", __assign({ className: "cursor-pointer text-left whitespace-nowrap" }, { children: _jsx(ExpandOnHover, { value: file, displayValue: truncateStringReverse(file, 40) }) })) }))) }))] }), _jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "Address" })), _jsx("td", __assign({ className: "w-3/4 break-all" }, { children: ((_g = (_f = hoveringNode.meta) === null || _f === void 0 ? void 0 : _f.location) === null || _g === void 0 ? void 0 : _g.address) == null ||
127
+ ((_e = hoveringNode.meta) === null || _e === void 0 ? void 0 : _e.function.filename) === '' ? (_jsx(NoData, {})) : (_jsx(CopyToClipboard, __assign({ onCopy: onCopy, text: file }, { children: _jsx("button", __assign({ className: "cursor-pointer whitespace-nowrap text-left" }, { children: _jsx(ExpandOnHover, { value: file, displayValue: truncateStringReverse(file, 40) }) })) }))) }))] }), _jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "Address" })), _jsx("td", __assign({ className: "w-3/4 break-all" }, { children: ((_g = (_f = hoveringNode.meta) === null || _f === void 0 ? void 0 : _f.location) === null || _g === void 0 ? void 0 : _g.address) == null ||
128
128
  ((_h = hoveringNode.meta) === null || _h === void 0 ? void 0 : _h.location.address) === '0' ? (_jsx(NoData, {})) : (_jsx(CopyToClipboard, __assign({ onCopy: onCopy, text: hexifyAddress(hoveringNode.meta.location.address) }, { children: _jsx("button", __assign({ className: "cursor-pointer" }, { children: hexifyAddress(hoveringNode.meta.location.address) })) }))) }))] }), _jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "Binary" })), _jsx("td", __assign({ className: "w-3/4 break-all" }, { children: ((_j = hoveringNode.meta) === null || _j === void 0 ? void 0 : _j.mapping) == null || hoveringNode.meta.mapping.file === '' ? (_jsx(NoData, {})) : (_jsx(CopyToClipboard, __assign({ onCopy: onCopy, text: hoveringNode.meta.mapping.file }, { children: _jsx("button", __assign({ className: "cursor-pointer" }, { children: getLastItem(hoveringNode.meta.mapping.file) })) }))) }))] }), _jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "Build Id" })), _jsx("td", __assign({ className: "w-3/4 break-all" }, { children: ((_k = hoveringNode.meta) === null || _k === void 0 ? void 0 : _k.mapping) == null || ((_l = hoveringNode.meta) === null || _l === void 0 ? void 0 : _l.mapping.buildId) === '' ? (_jsx(NoData, {})) : (_jsx(CopyToClipboard, __assign({ onCopy: onCopy, text: hoveringNode.meta.mapping.buildId }, { children: _jsx("button", __assign({ className: "cursor-pointer" }, { children: truncateString(getLastItem(hoveringNode.meta.mapping.buildId), 28) })) }))) }))] })] }));
129
129
  };
130
130
  var timeoutHandle = null;
@@ -152,9 +152,9 @@ export var GraphTooltipContent = function (_a) {
152
152
  : '';
153
153
  return "".concat(valueFormatter(hoveringNodeCumulative, unit, 2), "\n (").concat(((hoveringNodeCumulative * 100) / totalUnfiltered).toFixed(2), "%").concat(filtered, ")");
154
154
  };
155
- return (_jsx("div", __assign({ className: "text-sm flex ".concat(isFixed ? 'w-full' : '') }, { children: _jsx("div", __assign({ className: "m-auto w-full ".concat(isFixed ? 'w-full' : '') }, { children: _jsxs("div", __assign({ className: "border border-gray-300 dark:border-gray-500 bg-gray-50 dark:bg-gray-900 rounded-lg p-3 shadow-lg min-h-52 w-[500px] flex justify-between flex-col" }, { children: [_jsx("div", __assign({ className: "flex flex-row" }, { children: _jsxs("div", __assign({ className: "mx-2" }, { children: [_jsx("div", __assign({ className: "font-semibold break-all h-10 flex items-center" }, { children: hoveringNode.meta === undefined ? (_jsx("p", { children: "root" })) : (_jsx(_Fragment, { children: hoveringNode.meta.function !== undefined &&
155
+ return (_jsx("div", __assign({ className: "flex text-sm ".concat(isFixed ? 'w-full' : '') }, { children: _jsx("div", __assign({ className: "m-auto w-full ".concat(isFixed ? 'w-full' : '') }, { children: _jsxs("div", __assign({ className: "min-h-52 flex w-[500px] flex-col justify-between rounded-lg border border-gray-300 bg-gray-50 p-3 shadow-lg dark:border-gray-500 dark:bg-gray-900" }, { children: [_jsx("div", __assign({ className: "flex flex-row" }, { children: _jsxs("div", __assign({ className: "mx-2" }, { children: [_jsx("div", __assign({ className: "flex h-10 items-center break-all font-semibold" }, { children: hoveringNode.meta === undefined ? (_jsx("p", { children: "root" })) : (_jsx(_Fragment, { children: hoveringNode.meta.function !== undefined &&
156
156
  hoveringNode.meta.function.name !== '' ? (_jsx(CopyToClipboard, __assign({ onCopy: onCopy, text: hoveringNode.meta.function.name }, { children: _jsx("button", __assign({ className: "cursor-pointer text-left" }, { children: hoveringNode.meta.function.name })) }))) : (_jsx(_Fragment, { children: hoveringNode.meta.location !== undefined &&
157
- parseInt(hoveringNode.meta.location.address, 10) !== 0 ? (_jsx(CopyToClipboard, __assign({ onCopy: onCopy, text: hexifyAddress(hoveringNode.meta.location.address) }, { children: _jsx("button", __assign({ className: "cursor-pointer text-left" }, { children: hexifyAddress(hoveringNode.meta.location.address) })) }))) : (_jsx("p", { children: "unknown" })) })) })) })), _jsx("table", __assign({ className: "table-fixed pr-0 text-gray-700 dark:text-gray-300 my-2 w-full" }, { children: _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "Cumulative" })), _jsx("td", __assign({ className: "w-3/4" }, { children: _jsx(CopyToClipboard, __assign({ onCopy: onCopy, text: getTextForCumulative(hoveringNodeCumulative) }, { children: _jsx("button", __assign({ className: "cursor-pointer" }, { children: getTextForCumulative(hoveringNodeCumulative) })) })) }))] }), hoveringNode.diff !== undefined && diff !== 0 && (_jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "Diff" })), _jsx("td", __assign({ className: "w-3/4" }, { children: _jsx(CopyToClipboard, __assign({ onCopy: onCopy, text: diffText }, { children: _jsx("button", __assign({ className: "cursor-pointer" }, { children: diffText })) })) }))] })), _jsx(TooltipMetaInfo, { onCopy: onCopy, hoveringNode: hoveringNode, strings: strings, mappings: mappings, locations: locations, functions: functions, type: type })] }) }))] })) })), _jsx("span", __assign({ className: "block text-gray-500 text-xs mx-2" }, { children: isCopied ? 'Copied!' : 'Hold shift and click on a value to copy.' }))] })) })) })));
157
+ parseInt(hoveringNode.meta.location.address, 10) !== 0 ? (_jsx(CopyToClipboard, __assign({ onCopy: onCopy, text: hexifyAddress(hoveringNode.meta.location.address) }, { children: _jsx("button", __assign({ className: "cursor-pointer text-left" }, { children: hexifyAddress(hoveringNode.meta.location.address) })) }))) : (_jsx("p", { children: "unknown" })) })) })) })), _jsx("table", __assign({ className: "my-2 w-full table-fixed pr-0 text-gray-700 dark:text-gray-300" }, { children: _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "Cumulative" })), _jsx("td", __assign({ className: "w-3/4" }, { children: _jsx(CopyToClipboard, __assign({ onCopy: onCopy, text: getTextForCumulative(hoveringNodeCumulative) }, { children: _jsx("button", __assign({ className: "cursor-pointer" }, { children: getTextForCumulative(hoveringNodeCumulative) })) })) }))] }), hoveringNode.diff !== undefined && diff !== 0 && (_jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "Diff" })), _jsx("td", __assign({ className: "w-3/4" }, { children: _jsx(CopyToClipboard, __assign({ onCopy: onCopy, text: diffText }, { children: _jsx("button", __assign({ className: "cursor-pointer" }, { children: diffText })) })) }))] })), _jsx(TooltipMetaInfo, { onCopy: onCopy, hoveringNode: hoveringNode, strings: strings, mappings: mappings, locations: locations, functions: functions, type: type })] }) }))] })) })), _jsx("span", __assign({ className: "mx-2 block text-xs text-gray-500" }, { children: isCopied ? 'Copied!' : 'Hold shift and click on a value to copy.' }))] })) })) })));
158
158
  };
159
159
  var GraphTooltip = function (_a) {
160
160
  var x = _a.x, y = _a.y, unit = _a.unit, total = _a.total, totalUnfiltered = _a.totalUnfiltered, hoveringNodeProp = _a.hoveringNode, contextElement = _a.contextElement, _b = _a.isFixed, isFixed = _b === void 0 ? false : _b, _c = _a.virtualContextElement, virtualContextElement = _c === void 0 ? true : _c, strings = _a.strings, mappings = _a.mappings, locations = _a.locations, functions = _a.functions, _d = _a.type, type = _d === void 0 ? 'flamegraph' : _d;
@@ -32,8 +32,8 @@ var SuggestionItem = function (_a) {
32
32
  ref.current.scrollIntoView({ block: 'nearest' });
33
33
  }
34
34
  }, [isHighlighted]);
35
- return (_jsx("div", __assign({ className: cx('cursor-default select-none relative py-2 pl-3 pr-9', {
36
- 'text-white bg-indigo-600': isHighlighted,
35
+ return (_jsx("div", __assign({ className: cx('relative cursor-default select-none py-2 pl-3 pr-9', {
36
+ 'bg-indigo-600 text-white': isHighlighted,
37
37
  }), onMouseOver: function () { return onHighlight(); }, onClick: function () { return onApplySuggestion(); }, onMouseOut: function () { return onResetHighlight(); }, ref: ref }, { children: value })));
38
38
  };
39
39
  export default SuggestionItem;
@@ -148,7 +148,7 @@ var SuggestionsList = function (_a) {
148
148
  inputRef.removeEventListener('keypress', handleKeyPress);
149
149
  };
150
150
  }, [inputRef, highlightedSuggestionIndex, suggestions, handleKeyPress, handleKeyDown]);
151
- return (_jsx(_Fragment, { children: suggestionsLength > 0 && (_jsx("div", __assign({ ref: setPopperElement, style: __assign(__assign({}, styles.popper), { marginLeft: 0 }) }, attributes.popper, { className: "z-50" }, { children: _jsx(Transition, __assign({ show: focusedInput && showSuggest, as: Fragment, leave: "transition ease-in duration-100", leaveFrom: "opacity-100", leaveTo: "opacity-0" }, { children: _jsxs("div", __assign({ style: { width: inputRef === null || inputRef === void 0 ? void 0 : inputRef.offsetWidth }, className: "absolute z-10 max-h-[400px] mt-1 bg-gray-50 dark:bg-gray-900 shadow-lg rounded-md text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm" }, { children: [isLabelNamesLoading ? (_jsx(LoadingSpinner, {})) : (_jsx(_Fragment, { children: suggestions.labelNames.map(function (l, i) { return (_jsx(SuggestionItem, { isHighlighted: highlightedSuggestionIndex === i, onHighlight: function () { return setHighlightedSuggestionIndex(i); }, onApplySuggestion: function () { return applySuggestionWithIndex(i); }, onResetHighlight: function () { return resetHighlight(); }, value: l.value }, l.value)); }) })), suggestions.literals.map(function (l, i) { return (_jsx(SuggestionItem, { isHighlighted: highlightedSuggestionIndex === i + suggestions.labelNames.length, onHighlight: function () {
151
+ return (_jsx(_Fragment, { children: suggestionsLength > 0 && (_jsx("div", __assign({ ref: setPopperElement, style: __assign(__assign({}, styles.popper), { marginLeft: 0 }) }, attributes.popper, { className: "z-50" }, { children: _jsx(Transition, __assign({ show: focusedInput && showSuggest, as: Fragment, leave: "transition ease-in duration-100", leaveFrom: "opacity-100", leaveTo: "opacity-0" }, { children: _jsxs("div", __assign({ style: { width: inputRef === null || inputRef === void 0 ? void 0 : inputRef.offsetWidth }, className: "absolute z-10 mt-1 max-h-[400px] overflow-auto rounded-md bg-gray-50 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-gray-900 sm:text-sm" }, { children: [isLabelNamesLoading ? (_jsx(LoadingSpinner, {})) : (_jsx(_Fragment, { children: suggestions.labelNames.map(function (l, i) { return (_jsx(SuggestionItem, { isHighlighted: highlightedSuggestionIndex === i, onHighlight: function () { return setHighlightedSuggestionIndex(i); }, onApplySuggestion: function () { return applySuggestionWithIndex(i); }, onResetHighlight: function () { return resetHighlight(); }, value: l.value }, l.value)); }) })), suggestions.literals.map(function (l, i) { return (_jsx(SuggestionItem, { isHighlighted: highlightedSuggestionIndex === i + suggestions.labelNames.length, onHighlight: function () {
152
152
  return setHighlightedSuggestionIndex(i + suggestions.labelNames.length);
153
153
  }, onApplySuggestion: function () {
154
154
  return applySuggestionWithIndex(i + suggestions.labelNames.length);
@@ -154,7 +154,7 @@ var MatchersInput = function (_a) {
154
154
  setFocusedInput(false);
155
155
  };
156
156
  var profileSelected = currentQuery.profileName() === '';
157
- return (_jsxs("div", __assign({ className: "font-mono flex-1 w-full min-w-[300px]" }, { children: [_jsx(TextareaAutosize, { ref: inputRef, className: cx('bg-gray-50 dark:bg-gray-900 focus:ring-indigo-800 flex-1 block w-full px-2 py-2 text-sm outline-none rounded', profileSelected && 'cursor-not-allowed'), placeholder: profileSelected
157
+ return (_jsxs("div", __assign({ className: "w-full min-w-[300px] flex-1 font-mono" }, { children: [_jsx(TextareaAutosize, { ref: inputRef, className: cx('block w-full flex-1 rounded bg-gray-50 px-2 py-2 text-sm outline-none focus:ring-indigo-800 dark:bg-gray-900', profileSelected && 'cursor-not-allowed'), placeholder: profileSelected
158
158
  ? 'Select a profile first to enter a filter...'
159
159
  : 'filter profiles... eg. node="test"', onChange: onChange, value: value, onBlur: unfocus, onFocus: focus, disabled: profileSelected, title: profileSelected
160
160
  ? 'Select a profile first to enter a filter...'
@@ -98,10 +98,10 @@ var MetricsTooltip = function (_a) {
98
98
  }, [x, y, contextElement, update]);
99
99
  var nameLabel = highlighted === null || highlighted === void 0 ? void 0 : highlighted.labels.find(function (e) { return e.name === '__name__'; });
100
100
  var highlightedNameLabel = nameLabel !== undefined ? nameLabel : { name: '', value: '' };
101
- return (_jsx("div", __assign({ ref: setPopperElement, style: styles.popper }, attributes.popper, { className: "z-10" }, { children: _jsx("div", __assign({ className: "flex max-w-md" }, { children: _jsx("div", __assign({ className: "m-auto" }, { children: _jsx("div", __assign({ className: "border-gray-300 dark:border-gray-500 bg-gray-50 dark:bg-gray-900 rounded-lg p-3 shadow-lg opacity-90", style: { borderWidth: 1 } }, { children: _jsx("div", __assign({ className: "flex flex-row" }, { children: _jsxs("div", __assign({ className: "ml-2 mr-6" }, { children: [_jsx("span", __assign({ className: "font-semibold" }, { children: highlightedNameLabel.value })), _jsx("span", __assign({ className: "block text-gray-700 dark:text-gray-300 my-2" }, { children: _jsx("table", __assign({ className: "table-auto" }, { children: _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "Value" })), _jsx("td", __assign({ className: "w-3/4" }, { children: valueFormatter(highlighted.valuePerSecond, sampleUnit, 5) }))] }), delta && (_jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "Total" })), _jsx("td", __assign({ className: "w-3/4" }, { children: valueFormatter(highlighted.value, sampleUnit, 2) }))] })), highlighted.duration > 0 && (_jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "Duration" })), _jsx("td", __assign({ className: "w-3/4" }, { children: valueFormatter(highlighted.duration, 'nanoseconds', 2) }))] })), _jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "At" })), _jsx("td", __assign({ className: "w-3/4" }, { children: formatDate(highlighted.timestamp, timeFormat) }))] })] }) })) })), _jsx("span", __assign({ className: "block text-gray-500 my-2" }, { children: highlighted.labels
101
+ return (_jsx("div", __assign({ ref: setPopperElement, style: styles.popper }, attributes.popper, { className: "z-10" }, { children: _jsx("div", __assign({ className: "flex max-w-md" }, { children: _jsx("div", __assign({ className: "m-auto" }, { children: _jsx("div", __assign({ className: "rounded-lg border-gray-300 bg-gray-50 p-3 opacity-90 shadow-lg dark:border-gray-500 dark:bg-gray-900", style: { borderWidth: 1 } }, { children: _jsx("div", __assign({ className: "flex flex-row" }, { children: _jsxs("div", __assign({ className: "ml-2 mr-6" }, { children: [_jsx("span", __assign({ className: "font-semibold" }, { children: highlightedNameLabel.value })), _jsx("span", __assign({ className: "my-2 block text-gray-700 dark:text-gray-300" }, { children: _jsx("table", __assign({ className: "table-auto" }, { children: _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "Value" })), _jsx("td", __assign({ className: "w-3/4" }, { children: valueFormatter(highlighted.valuePerSecond, sampleUnit, 5) }))] }), delta && (_jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "Total" })), _jsx("td", __assign({ className: "w-3/4" }, { children: valueFormatter(highlighted.value, sampleUnit, 2) }))] })), highlighted.duration > 0 && (_jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "Duration" })), _jsx("td", __assign({ className: "w-3/4" }, { children: valueFormatter(highlighted.duration, 'nanoseconds', 2) }))] })), _jsxs("tr", { children: [_jsx("td", __assign({ className: "w-1/4" }, { children: "At" })), _jsx("td", __assign({ className: "w-3/4" }, { children: formatDate(highlighted.timestamp, timeFormat) }))] })] }) })) })), _jsx("span", __assign({ className: "my-2 block text-gray-500" }, { children: highlighted.labels
102
102
  .filter(function (label) { return label.name !== '__name__'; })
103
103
  .map(function (label) {
104
- return (_jsx("button", __assign({ type: "button", className: "inline-block rounded-lg text-gray-700 bg-gray-200 dark:bg-gray-700 dark:text-gray-400 px-2 py-1 text-xs font-bold mr-3", onClick: function () { return onLabelClick(label.name, label.value); } }, { children: _jsx(TextWithTooltip, { text: "".concat(label.name, "=\"").concat(label.value, "\""), maxTextLength: 37, id: "tooltip-".concat(label.name, "-").concat(label.value) }) }), label.name));
105
- }) })), _jsx("span", __assign({ className: "block text-gray-500 text-xs" }, { children: "Hold shift and click label to add to query." }))] })) })) })) })) })) })));
104
+ return (_jsx("button", __assign({ type: "button", className: "mr-3 inline-block rounded-lg bg-gray-200 px-2 py-1 text-xs font-bold text-gray-700 dark:bg-gray-700 dark:text-gray-400", onClick: function () { return onLabelClick(label.name, label.value); } }, { children: _jsx(TextWithTooltip, { text: "".concat(label.name, "=\"").concat(label.value, "\""), maxTextLength: 37, id: "tooltip-".concat(label.name, "-").concat(label.value) }) }), label.name));
105
+ }) })), _jsx("span", __assign({ className: "block text-xs text-gray-500" }, { children: "Hold shift and click label to add to query." }))] })) })) })) })) })) })));
106
106
  };
107
107
  export default MetricsTooltip;
@@ -104,7 +104,7 @@ var ProfileExplorerApp = function (_a) {
104
104
  return _jsx(_Fragment, { children: noDataPrompt });
105
105
  }
106
106
  if (profileTypesError !== undefined && profileTypesError !== null) {
107
- return (_jsxs("div", __assign({ className: "bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative", role: "alert" }, { children: [_jsx("strong", __assign({ className: "font-bold" }, { children: "Error! " })), _jsx("span", __assign({ className: "block sm:inline" }, { children: profileTypesError.message }))] })));
107
+ return (_jsxs("div", __assign({ className: "relative rounded border border-red-400 bg-red-100 px-4 py-3 text-red-700", role: "alert" }, { children: [_jsx("strong", __assign({ className: "font-bold" }, { children: "Error! " })), _jsx("span", __assign({ className: "block sm:inline" }, { children: profileTypesError.message }))] })));
108
108
  }
109
109
  var sanitizedRange = sanitizeDateRange(time_selection_a, from_a, to_a);
110
110
  time_selection_a = sanitizedRange.time_selection_a;
@@ -50,11 +50,11 @@ var ColorStackLegend = function (_a) {
50
50
  if (colorProfileName === 'default' || compareMode) {
51
51
  return _jsx(_Fragment, {});
52
52
  }
53
- return (_jsx("div", __assign({ className: "flex flex-wrap gap-2 my-6 justify-center" }, { children: stackColorArray.map(function (_a) {
53
+ return (_jsx("div", __assign({ className: "my-6 flex flex-wrap justify-center gap-2" }, { children: stackColorArray.map(function (_a) {
54
54
  var feature = _a[0], color = _a[1];
55
55
  var filteringAllowed = feature !== EVERYTHING_ELSE;
56
56
  var isHighlighted = currentSearchString === feature;
57
- return (_jsxs("div", __assign({ className: cx('flex gap-1 items-center text-ellipsis p-1 justify-between pr-2', {
57
+ return (_jsxs("div", __assign({ className: cx('flex items-center justify-between gap-1 text-ellipsis p-1 pr-2', {
58
58
  'cursor-pointer': filteringAllowed,
59
59
  'bg-gray-200 dark:bg-gray-800': isHighlighted,
60
60
  }), onClick: function () {
@@ -66,7 +66,7 @@ var ColorStackLegend = function (_a) {
66
66
  return;
67
67
  }
68
68
  setSearchString(feature);
69
- } }, { children: [_jsxs("div", __assign({ className: "flex items-center" }, { children: [_jsx("div", { className: "w-4 h-4 mr-1 inline-block", style: { backgroundColor: color } }), _jsx("span", __assign({ className: "text-sm" }, { children: feature }))] })), isHighlighted ? (_jsx(Icon, { icon: "radix-icons:cross-circled", onClick: function (e) {
69
+ } }, { children: [_jsxs("div", __assign({ className: "flex items-center" }, { children: [_jsx("div", { className: "mr-1 inline-block h-4 w-4", style: { backgroundColor: color } }), _jsx("span", __assign({ className: "text-sm" }, { children: feature }))] })), isHighlighted ? (_jsx(Icon, { icon: "radix-icons:cross-circled", onClick: function (e) {
70
70
  setSearchString('');
71
71
  e.stopPropagation();
72
72
  } })) : null] }), feature));
@@ -118,15 +118,15 @@ var ProfileMetricsGraph = function (_a) {
118
118
  return _jsx(_Fragment, { children: loader });
119
119
  }
120
120
  if (error !== null) {
121
- return (_jsxs("div", __assign({ className: "bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative", role: "alert" }, { children: [_jsx("strong", __assign({ className: "font-bold" }, { children: "Error! " })), _jsx("span", __assign({ className: "block sm:inline" }, { children: error.message }))] })));
121
+ return (_jsxs("div", __assign({ className: "relative rounded border border-red-400 bg-red-100 px-4 py-3 text-red-700", role: "alert" }, { children: [_jsx("strong", __assign({ className: "font-bold" }, { children: "Error! " })), _jsx("span", __assign({ className: "block sm:inline" }, { children: error.message }))] })));
122
122
  }
123
123
  var series = response === null || response === void 0 ? void 0 : response.series;
124
124
  if (series !== null && series !== undefined && (series === null || series === void 0 ? void 0 : series.length) > 0) {
125
125
  var handleSampleClick = function (timestamp, _value, labels) {
126
126
  onPointClick(timestamp, labels, queryExpression);
127
127
  };
128
- return (_jsx("div", __assign({ className: "dark:bg-gray-700 rounded border-gray-300 dark:border-gray-500", style: { borderWidth: 1 } }, { children: _jsx(MetricsGraph, { data: series, from: from, to: to, profile: profile, setTimeRange: setTimeRange, onSampleClick: handleSampleClick, onLabelClick: addLabelMatcher, width: 0, sampleUnit: Query.parse(queryExpression).profileType().sampleUnit }) })));
128
+ return (_jsx("div", __assign({ className: "rounded border-gray-300 dark:border-gray-500 dark:bg-gray-700", style: { borderWidth: 1 } }, { children: _jsx(MetricsGraph, { data: series, from: from, to: to, profile: profile, setTimeRange: setTimeRange, onSampleClick: handleSampleClick, onLabelClick: addLabelMatcher, width: 0, sampleUnit: Query.parse(queryExpression).profileType().sampleUnit }) })));
129
129
  }
130
- return (_jsx("div", __assign({ className: "grid grid-cols-1" }, { children: _jsx("div", __assign({ className: "py-20 flex justify-center" }, { children: _jsx("p", __assign({ className: "m-0" }, { children: "No data found. Try a different query." })) })) })));
130
+ return (_jsx("div", __assign({ className: "grid grid-cols-1" }, { children: _jsx("div", __assign({ className: "flex justify-center py-20" }, { children: _jsx("p", __assign({ className: "m-0" }, { children: "No data found. Try a different query." })) })) })));
131
131
  };
132
132
  export default ProfileMetricsGraph;
@@ -36,6 +36,6 @@ var CompareButton = function (_a) {
36
36
  var compareExplanation = 'Compare two profiles and see the relative difference between them more clearly.';
37
37
  if (disabled)
38
38
  return _jsx(_Fragment, {});
39
- return (_jsxs("div", __assign({ ref: setComparePopperReferenceElement }, { children: [_jsx(Button, __assign({ color: "neutral", disabled: disabled, onClick: onClick, onMouseEnter: function () { return setCompareHover(true); }, onMouseLeave: function () { return setCompareHover(false); } }, { children: "Compare" })), compareHover && (_jsx("div", __assign({ ref: setComparePopperElement, style: styles.popper }, attributes.popper, { className: "z-50" }, { children: _jsx("div", __assign({ className: "flex" }, { children: _jsxs("div", __assign({ className: "relative mx-2" }, { children: [_jsx("svg", __assign({ className: "text-black h-1 w-full left-0", x: "0px", y: "0px", viewBox: "0 0 255 127.5" }, { children: _jsx("polygon", { className: "fill-current", points: "0,127.5 127.5,0 255,127.5" }) })), _jsx("div", __assign({ className: "bg-black text-white text-xs rounded py-2 px-3 right-0 w-40" }, { children: compareExplanation }))] })) })) })))] })));
39
+ return (_jsxs("div", __assign({ ref: setComparePopperReferenceElement }, { children: [_jsx(Button, __assign({ color: "neutral", disabled: disabled, onClick: onClick, onMouseEnter: function () { return setCompareHover(true); }, onMouseLeave: function () { return setCompareHover(false); } }, { children: "Compare" })), compareHover && (_jsx("div", __assign({ ref: setComparePopperElement, style: styles.popper }, attributes.popper, { className: "z-50" }, { children: _jsx("div", __assign({ className: "flex" }, { children: _jsxs("div", __assign({ className: "relative mx-2" }, { children: [_jsx("svg", __assign({ className: "left-0 h-1 w-full text-black", x: "0px", y: "0px", viewBox: "0 0 255 127.5" }, { children: _jsx("polygon", { className: "fill-current", points: "0,127.5 127.5,0 255,127.5" }) })), _jsx("div", __assign({ className: "right-0 w-40 rounded bg-black py-2 px-3 text-xs text-white" }, { children: compareExplanation }))] })) })) })))] })));
40
40
  };
41
41
  export default CompareButton;
@@ -116,7 +116,7 @@ var ProfileSelector = function (_a) {
116
116
  queryExpressionString === '' ||
117
117
  queryExpressionString === '{}';
118
118
  var compareDisabled = selectedProfileName === '' || querySelection.expression === undefined;
119
- return (_jsxs(Card, { children: [_jsxs(Card.Header, __assign({ className: "flex space-x-2 !items-center" }, { children: [_jsxs("div", __assign({ className: "flex flex-wrap w-full justify-start space-x-2 space-y-1 items-center" }, { children: [_jsx("div", __assign({ className: "ml-2 mt-1" }, { children: _jsx(ProfileTypeSelector, { profileTypesData: profileTypesData, loading: profileTypesLoading, selectedKey: selectedProfileName, onSelection: setProfileName, error: error }) })), _jsx("div", __assign({ className: "w-full flex-1" }, { children: _jsx(MatchersInput, { queryClient: queryClient, setMatchersString: setMatchersString, runQuery: setQueryExpression, currentQuery: query }) })), _jsx(DateTimeRangePicker, { onRangeSelection: setTimeRangeSelection, range: timeRangeSelection }), _jsxs(ButtonGroup, { children: [!searchDisabled && (_jsx(_Fragment, { children: !comparing && (_jsx(CompareButton, { disabled: compareDisabled, onClick: handleCompareClick })) })), _jsx(Button, __assign({ disabled: searchDisabled, onClick: function (e) {
119
+ return (_jsxs(Card, { children: [_jsxs(Card.Header, __assign({ className: "flex !items-center space-x-2" }, { children: [_jsxs("div", __assign({ className: "flex w-full flex-wrap items-center justify-start space-x-2 space-y-1" }, { children: [_jsx("div", __assign({ className: "ml-2 mt-1" }, { children: _jsx(ProfileTypeSelector, { profileTypesData: profileTypesData, loading: profileTypesLoading, selectedKey: selectedProfileName, onSelection: setProfileName, error: error }) })), _jsx("div", __assign({ className: "w-full flex-1" }, { children: _jsx(MatchersInput, { queryClient: queryClient, setMatchersString: setMatchersString, runQuery: setQueryExpression, currentQuery: query }) })), _jsx(DateTimeRangePicker, { onRangeSelection: setTimeRangeSelection, range: timeRangeSelection }), _jsxs(ButtonGroup, { children: [!searchDisabled && (_jsx(_Fragment, { children: !comparing && (_jsx(CompareButton, { disabled: compareDisabled, onClick: handleCompareClick })) })), _jsx(Button, __assign({ disabled: searchDisabled, onClick: function (e) {
120
120
  e.preventDefault();
121
121
  setQueryExpression();
122
122
  } }, { children: "Search" }))] })] })), _jsx("div", { children: comparing && _jsx(IconButton, { onClick: function () { return closeProfile(); }, icon: _jsx(CloseIcon, {}) }) })] })), _jsx(Card.Body, { children: querySelection.expression !== undefined &&
@@ -31,7 +31,7 @@ import ViewSelector from './ViewSelector';
31
31
  export var VisualizationPanel = React.memo(function VisualizationPanel(_a) {
32
32
  var dashboardItem = _a.dashboardItem, index = _a.index, isMultiPanelView = _a.isMultiPanelView, handleClosePanel = _a.handleClosePanel, navigateTo = _a.navigateTo, dragHandleProps = _a.dragHandleProps, getDashboardItemByType = _a.getDashboardItemByType;
33
33
  var _b = useState(_jsx(_Fragment, {})), actionButtons = _b[0], setActionButtons = _b[1];
34
- return (_jsxs(_Fragment, { children: [_jsxs("div", __assign({ className: "w-full flex justify-end pb-2 gap-2" }, { children: [_jsxs("div", __assign({ className: "w-full flex justify-between items-center" }, { children: [_jsxs("div", __assign({ className: "flex" }, { children: [_jsx("div", __assign({ className: cx(isMultiPanelView ? 'visible' : 'invisible', 'flex items-center') }, dragHandleProps, { children: _jsx(Icon, { className: "text-xl", icon: "material-symbols:drag-indicator" }) })), _jsx(_Fragment, { children: actionButtons })] })), _jsx(ViewSelector, { defaultValue: dashboardItem, navigateTo: navigateTo, position: index })] })), isMultiPanelView && (_jsx(IconButton, { onClick: function () { return handleClosePanel(dashboardItem); }, icon: _jsx(CloseIcon, {}) }))] })), getDashboardItemByType({
34
+ return (_jsxs(_Fragment, { children: [_jsxs("div", __assign({ className: "flex w-full justify-end gap-2 pb-2" }, { children: [_jsxs("div", __assign({ className: "flex w-full items-center justify-between" }, { children: [_jsxs("div", __assign({ className: "flex" }, { children: [_jsx("div", __assign({ className: cx(isMultiPanelView ? 'visible' : 'invisible', 'flex items-center') }, dragHandleProps, { children: _jsx(Icon, { className: "text-xl", icon: "material-symbols:drag-indicator" }) })), _jsx(_Fragment, { children: actionButtons })] })), _jsx(ViewSelector, { defaultValue: dashboardItem, navigateTo: navigateTo, position: index })] })), isMultiPanelView && (_jsx(IconButton, { onClick: function () { return handleClosePanel(dashboardItem); }, icon: _jsx(CloseIcon, {}) }))] })), getDashboardItemByType({
35
35
  type: dashboardItem,
36
36
  isHalfScreen: isMultiPanelView,
37
37
  setActionButtons: setActionButtons,
@@ -194,7 +194,7 @@ export var ProfileView = function (_a) {
194
194
  }, [graphvizLoaded, callgraphData === null || callgraphData === void 0 ? void 0 : callgraphData.data]);
195
195
  if ((flamegraphData === null || flamegraphData === void 0 ? void 0 : flamegraphData.error) !== null) {
196
196
  console.error('Error: ', flamegraphData === null || flamegraphData === void 0 ? void 0 : flamegraphData.error);
197
- return (_jsxs("div", __assign({ className: "p-10 flex justify-center" }, { children: ["An error occurred: ", flamegraphData === null || flamegraphData === void 0 ? void 0 : flamegraphData.error.message] })));
197
+ return (_jsxs("div", __assign({ className: "flex justify-center p-10" }, { children: ["An error occurred: ", flamegraphData === null || flamegraphData === void 0 ? void 0 : flamegraphData.error.message] })));
198
198
  }
199
199
  var setNewCurPath = function (path) {
200
200
  if (!arrayEquals(curPath, path)) {
@@ -238,11 +238,11 @@ export var ProfileView = function (_a) {
238
238
  setDashboardItems(newDashboardItems);
239
239
  }
240
240
  };
241
- return (_jsx(KeyDownProvider, { children: _jsx("div", __assign({ className: "py-3" }, { children: _jsx(Card, { children: _jsxs(Card.Body, { children: [_jsxs("div", __assign({ className: "flex py-3 w-full" }, { children: [_jsxs("div", __assign({ className: "lg:w-1/2 flex space-x-4" }, { children: [_jsxs("div", __assign({ className: "flex space-x-1" }, { children: [profileSource !== undefined && queryClient !== undefined ? (_jsx(ProfileShareButton, { queryRequest: profileSource.QueryRequest(), queryClient: queryClient })) : null, _jsx(Button, __assign({ color: "neutral", onClick: function (e) {
241
+ return (_jsx(KeyDownProvider, { children: _jsx("div", __assign({ className: "py-3" }, { children: _jsx(Card, { children: _jsxs(Card.Body, { children: [_jsxs("div", __assign({ className: "flex w-full py-3" }, { children: [_jsxs("div", __assign({ className: "flex space-x-4 lg:w-1/2" }, { children: [_jsxs("div", __assign({ className: "flex space-x-1" }, { children: [profileSource !== undefined && queryClient !== undefined ? (_jsx(ProfileShareButton, { queryRequest: profileSource.QueryRequest(), queryClient: queryClient })) : null, _jsx(Button, __assign({ color: "neutral", onClick: function (e) {
242
242
  e.preventDefault();
243
243
  onDownloadPProf();
244
- } }, { children: "Download pprof" }))] })), _jsx(FilterByFunctionButton, { navigateTo: navigateTo })] })), _jsx("div", __assign({ className: "flex ml-auto gap-2" }, { children: _jsx(ViewSelector, { defaultValue: "", navigateTo: navigateTo, position: -1, placeholderText: "Add panel...", primary: true, addView: true, disabled: isMultiPanelView || dashboardItems.length < 1 }) }))] })), _jsx("div", __assign({ className: "w-full", ref: ref }, { children: isLoaderVisible ? (_jsx(_Fragment, { children: loader })) : (_jsx(DragDropContext, __assign({ onDragEnd: onDragEnd }, { children: _jsx(Droppable, __assign({ droppableId: "droppable", direction: "horizontal" }, { children: function (provided) { return (_jsx("div", __assign({ ref: provided.innerRef, className: "flex space-x-4 justify-between w-full" }, provided.droppableProps, { children: dashboardItems.map(function (dashboardItem, index) {
245
- return (_jsx(Draggable, __assign({ draggableId: dashboardItem, index: index, isDragDisabled: !isMultiPanelView }, { children: function (provided, snapshot) { return (_createElement("div", __assign({ ref: provided.innerRef }, provided.draggableProps, { key: dashboardItem, className: cx('border dark:bg-gray-700 rounded border-gray-300 dark:border-gray-500 p-3', isMultiPanelView ? 'w-1/2' : 'w-full', snapshot.isDragging ? 'bg-gray-200' : 'bg-white') }),
244
+ } }, { children: "Download pprof" }))] })), _jsx(FilterByFunctionButton, { navigateTo: navigateTo })] })), _jsx("div", __assign({ className: "ml-auto flex gap-2" }, { children: _jsx(ViewSelector, { defaultValue: "", navigateTo: navigateTo, position: -1, placeholderText: "Add panel...", primary: true, addView: true, disabled: isMultiPanelView || dashboardItems.length < 1 }) }))] })), _jsx("div", __assign({ className: "w-full", ref: ref }, { children: isLoaderVisible ? (_jsx(_Fragment, { children: loader })) : (_jsx(DragDropContext, __assign({ onDragEnd: onDragEnd }, { children: _jsx(Droppable, __assign({ droppableId: "droppable", direction: "horizontal" }, { children: function (provided) { return (_jsx("div", __assign({ ref: provided.innerRef, className: "flex w-full justify-between space-x-4" }, provided.droppableProps, { children: dashboardItems.map(function (dashboardItem, index) {
245
+ return (_jsx(Draggable, __assign({ draggableId: dashboardItem, index: index, isDragDisabled: !isMultiPanelView }, { children: function (provided, snapshot) { return (_createElement("div", __assign({ ref: provided.innerRef }, provided.draggableProps, { key: dashboardItem, className: cx('rounded border border-gray-300 p-3 dark:border-gray-500 dark:bg-gray-700', isMultiPanelView ? 'w-1/2' : 'w-full', snapshot.isDragging ? 'bg-gray-200' : 'bg-white') }),
246
246
  _jsx(VisualizationPanel, { handleClosePanel: handleClosePanel, isMultiPanelView: isMultiPanelView, dashboardItem: dashboardItem, getDashboardItemByType: getDashboardItemByType, dragHandleProps: provided.dragHandleProps, navigateTo: navigateTo, index: index }))); } }), dashboardItem));
247
247
  }) }))); } })) }))) }))] }) }) })) }));
248
248
  };
@@ -151,6 +151,6 @@ export var TopTable = React.memo(function TopTable(_a) {
151
151
  var total = top != null ? top.list.length : 0;
152
152
  if (total === 0 && !loading)
153
153
  return _jsx(_Fragment, { children: "Profile has no samples" });
154
- return (_jsx("div", __assign({ className: "relative" }, { children: _jsx("div", __assign({ className: "w-full font-robotoMono h-[80vh] overflow-scroll" }, { children: _jsx(Table, { data: (_b = top === null || top === void 0 ? void 0 : top.list) !== null && _b !== void 0 ? _b : [], columns: columns, initialSorting: initialSorting, onRowClick: onRowClick, enableHighlighting: enableHighlighting, shouldHighlightRow: shouldHighlightRow, usePointerCursor: dashboardItems.length > 1 }) })) })));
154
+ return (_jsx("div", __assign({ className: "relative" }, { children: _jsx("div", __assign({ className: "font-robotoMono h-[80vh] w-full overflow-scroll" }, { children: _jsx(Table, { data: (_b = top === null || top === void 0 ? void 0 : top.list) !== null && _b !== void 0 ? _b : [], columns: columns, initialSorting: initialSorting, onRowClick: onRowClick, enableHighlighting: enableHighlighting, shouldHighlightRow: shouldHighlightRow, usePointerCursor: dashboardItems.length > 1 }) })) })));
155
155
  });
156
156
  export default TopTable;
@@ -31,10 +31,10 @@ var transparencyValues = [-100, -80, -60, -40, -20, 0, 20, 40, 60, 80, 100];
31
31
  var DiffLegendBar = function (_a) {
32
32
  var onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave;
33
33
  var isDarkMode = useAppSelector(selectDarkMode);
34
- return (_jsx("div", __assign({ className: "flex items-center m-2" }, { children: transparencyValues.map(function (value) {
34
+ return (_jsx("div", __assign({ className: "m-2 flex items-center" }, { children: transparencyValues.map(function (value) {
35
35
  var valueAsPercentage = value / 100;
36
36
  var absoluteValue = Math.abs(valueAsPercentage);
37
- return (_jsx("div", { onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, className: "w-8 h-4", style: {
37
+ return (_jsx("div", { onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, className: "h-4 w-8", style: {
38
38
  backgroundColor: absoluteValue === 0
39
39
  ? getNewSpanColor(isDarkMode)
40
40
  : valueAsPercentage > 0
@@ -57,6 +57,6 @@ var DiffLegend = function () {
57
57
  var handleMouseLeave = function () {
58
58
  setShowLegendTooltip(false);
59
59
  };
60
- return (_jsxs("div", __assign({ className: "mt-1 mb-2" }, { children: [_jsxs("div", __assign({ ref: setReferenceElement, className: "flex items-center justify-center" }, { children: [_jsx("span", { children: "Better" }), _jsx(DiffLegendBar, { onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }), _jsx("span", { children: "Worse" })] })), _jsx(Popover, __assign({ className: "relative" }, { children: function () { return (_jsx(Transition, __assign({ show: showLegendTooltip, as: Fragment, enter: "transition ease-out duration-200", enterFrom: "opacity-0 translate-y-1", enterTo: "opacity-100 translate-y-0", leave: "transition ease-in duration-150", leaveFrom: "opacity-100 translate-y-0", leaveTo: "opacity-0 translate-y-1" }, { children: _jsx(Popover.Panel, __assign({ ref: setPopperElement, style: styles.popper }, attributes.popper, { children: _jsx("div", __assign({ className: "overflow-hidden rounded-lg shadow-lg ring-1 ring-black ring-opacity-5" }, { children: _jsxs("div", __assign({ className: "p-4 bg-gray-50 dark:bg-gray-800" }, { children: [_jsx("div", { className: "flex items-center justify-center" }), _jsx("span", __assign({ className: "block text-sm text-gray-500 dark:text-gray-50" }, { children: "This is a differential icicle graph, where a purple-colored node means unchanged, and the darker the red, the worse the node got, and the darker the green, the better the node got." }))] })) })) })) }))); } }))] })));
60
+ return (_jsxs("div", __assign({ className: "mt-1 mb-2" }, { children: [_jsxs("div", __assign({ ref: setReferenceElement, className: "flex items-center justify-center" }, { children: [_jsx("span", { children: "Better" }), _jsx(DiffLegendBar, { onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }), _jsx("span", { children: "Worse" })] })), _jsx(Popover, __assign({ className: "relative" }, { children: function () { return (_jsx(Transition, __assign({ show: showLegendTooltip, as: Fragment, enter: "transition ease-out duration-200", enterFrom: "opacity-0 translate-y-1", enterTo: "opacity-100 translate-y-0", leave: "transition ease-in duration-150", leaveFrom: "opacity-100 translate-y-0", leaveTo: "opacity-0 translate-y-1" }, { children: _jsx(Popover.Panel, __assign({ ref: setPopperElement, style: styles.popper }, attributes.popper, { children: _jsx("div", __assign({ className: "overflow-hidden rounded-lg shadow-lg ring-1 ring-black ring-opacity-5" }, { children: _jsxs("div", __assign({ className: "bg-gray-50 p-4 dark:bg-gray-800" }, { children: [_jsx("div", { className: "flex items-center justify-center" }), _jsx("span", __assign({ className: "block text-sm text-gray-500 dark:text-gray-50" }, { children: "This is a differential icicle graph, where a purple-colored node means unchanged, and the darker the red, the worse the node got, and the darker the green, the better the node got." }))] })) })) })) }))); } }))] })));
61
61
  };
62
62
  export default DiffLegend;
@@ -44,6 +44,6 @@ var ResultBox = function (_a) {
44
44
  }
45
45
  timeoutHandle = setTimeout(function () { return setIsCopied(false); }, 3000);
46
46
  };
47
- return (_jsxs("div", __assign({ className: cx('flex flex-row w-full', (_b = {}, _b[className] = (className === null || className === void 0 ? void 0 : className.length) > 0, _b)) }, { children: [_jsx("span", __assign({ className: "flex justify-center items-center border border-r-0 w-16 rounded-l" }, { children: _jsx(Icon, { icon: "ant-design:link-outlined" }) })), _jsx("input", { type: "text", className: "border text-sm bg-inherit w-full px-1 py-2 flex-grow", value: value, readOnly: true }), _jsx(CopyToClipboard, __assign({ text: value, onCopy: onCopy }, { children: _jsx(Button, __assign({ variant: "link", className: "border border-l-0 w-fit whitespace-nowrap p-4 items-center !text-indigo-600 dark:!text-indigo-400 rounded-none rounded-r" }, { children: isCopied ? 'Copied!' : 'Copy Link' })) }))] })));
47
+ return (_jsxs("div", __assign({ className: cx('flex w-full flex-row', (_b = {}, _b[className] = (className === null || className === void 0 ? void 0 : className.length) > 0, _b)) }, { children: [_jsx("span", __assign({ className: "flex w-16 items-center justify-center rounded-l border border-r-0" }, { children: _jsx(Icon, { icon: "ant-design:link-outlined" }) })), _jsx("input", { type: "text", className: "w-full flex-grow border bg-inherit px-1 py-2 text-sm", value: value, readOnly: true }), _jsx(CopyToClipboard, __assign({ text: value, onCopy: onCopy }, { children: _jsx(Button, __assign({ variant: "link", className: "w-fit items-center whitespace-nowrap rounded-none rounded-r border border-l-0 p-4 !text-indigo-600 dark:!text-indigo-400" }, { children: isCopied ? 'Copied!' : 'Copy Link' })) }))] })));
48
48
  };
49
49
  export default ResultBox;
@@ -106,10 +106,10 @@ var ProfileShareModal = function (_a) {
106
106
  setIsShared(false);
107
107
  closeModal();
108
108
  };
109
- return (_jsx(Modal, __assign({ isOpen: isOpen, closeModal: onClose, title: "Share Profile", className: "w-[420px]" }, { children: _jsxs("form", __assign({ className: "py-2" }, { children: [_jsx("p", __assign({ className: "text-sm text-gray-500 dark:text-gray-300" }, { children: "Note: Shared profiles can be accessed by anyone with the link, even from people outside your organisation." })), !isShared || (error === null || error === void 0 ? void 0 : error.length) > 0 ? (_jsxs(_Fragment, { children: [_jsx("p", __assign({ className: "text-sm text-gray-500 dark:text-gray-300 mt-3 mb-2" }, { children: "Enter a description (optional)" })), _jsx("textarea", { className: "border w-full text-gray-500 dark:text-gray-300 bg-inherit text-sm px-2 py-2", value: description, onChange: function (e) { return setDescription(e.target.value); } }), _jsx(Button, __assign({ className: "mt-4", onClick: function (e) {
109
+ return (_jsx(Modal, __assign({ isOpen: isOpen, closeModal: onClose, title: "Share Profile", className: "w-[420px]" }, { children: _jsxs("form", __assign({ className: "py-2" }, { children: [_jsx("p", __assign({ className: "text-sm text-gray-500 dark:text-gray-300" }, { children: "Note: Shared profiles can be accessed by anyone with the link, even from people outside your organisation." })), !isShared || (error === null || error === void 0 ? void 0 : error.length) > 0 ? (_jsxs(_Fragment, { children: [_jsx("p", __assign({ className: "mt-3 mb-2 text-sm text-gray-500 dark:text-gray-300" }, { children: "Enter a description (optional)" })), _jsx("textarea", { className: "w-full border bg-inherit px-2 py-2 text-sm text-gray-500 dark:text-gray-300", value: description, onChange: function (e) { return setDescription(e.target.value); } }), _jsx(Button, __assign({ className: "mt-4", onClick: function (e) {
110
110
  e.preventDefault();
111
111
  void handleSubmit();
112
- }, disabled: loading || !isFormDataValid(), type: "submit" }, { children: loading ? 'Sharing' : 'Share' })), error !== '' ? _jsx("p", { children: "Something went wrong please try again" }) : null] })) : (_jsxs(_Fragment, { children: [_jsx(ResultBox, { value: sharedLink, className: "mt-4" }), _jsx("div", __assign({ className: "flex justify-center mt-8" }, { children: _jsx(Button, __assign({ variant: "neutral", className: "w-fit", onClick: onClose }, { children: "Close" })) }))] }))] })) })));
112
+ }, disabled: loading || !isFormDataValid(), type: "submit" }, { children: loading ? 'Sharing' : 'Share' })), error !== '' ? _jsx("p", { children: "Something went wrong please try again" }) : null] })) : (_jsxs(_Fragment, { children: [_jsx(ResultBox, { value: sharedLink, className: "mt-4" }), _jsx("div", __assign({ className: "mt-8 flex justify-center" }, { children: _jsx(Button, __assign({ variant: "neutral", className: "w-fit", onClick: onClose }, { children: "Close" })) }))] }))] })) })));
113
113
  };
114
114
  var ProfileShareButton = function (_a) {
115
115
  var queryRequest = _a.queryRequest, queryClient = _a.queryClient, _b = _a.disabled, disabled = _b === void 0 ? false : _b;
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.16.152",
3
+ "version": "0.16.153",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
6
  "@parca/client": "^0.16.69",
7
- "@parca/components": "^0.16.123",
7
+ "@parca/components": "^0.16.124",
8
8
  "@parca/dynamicsize": "^0.16.54",
9
9
  "@parca/hooks": "^0.0.2",
10
10
  "@parca/parser": "^0.16.55",
@@ -46,5 +46,5 @@
46
46
  "access": "public",
47
47
  "registry": "https://registry.npmjs.org/"
48
48
  },
49
- "gitHead": "19debe37dc7ec224ad92c4bfd9614081e61cfc04"
49
+ "gitHead": "281f5a7c2be141ac1f72b3067cdcd30a1fd55822"
50
50
  }
@@ -125,7 +125,7 @@ const Callgraph = ({data, svgString, sampleUnit, width}: Props): JSX.Element =>
125
125
  view.translation.y !== originalView.translation.y;
126
126
 
127
127
  return (
128
- <div className="w-full relative">
128
+ <div className="relative w-full">
129
129
  <div ref={containerRef} className="w-full overflow-hidden">
130
130
  <MapInteractionCSS
131
131
  showControls
@@ -156,7 +156,7 @@ const Callgraph = ({data, svgString, sampleUnit, width}: Props): JSX.Element =>
156
156
  <div
157
157
  className={cx(
158
158
  dashboardItems.length > 1 ? 'left-[25px]' : 'left-0',
159
- 'w-auto absolute top-[-46px]'
159
+ 'absolute top-[-46px] w-auto'
160
160
  )}
161
161
  >
162
162
  <Button
@@ -18,11 +18,11 @@ interface Props {
18
18
 
19
19
  export const ExpandOnHover = ({value, displayValue}: Props): JSX.Element => {
20
20
  return (
21
- <div className="relative group w-full">
22
- <div className="text-ellipsis w-full overflow-hidden whitespace-nowrap">
21
+ <div className="group relative w-full">
22
+ <div className="w-full overflow-hidden text-ellipsis whitespace-nowrap">
23
23
  {displayValue ?? value}
24
24
  </div>
25
- <div className="group-hover:flex hidden absolute -inset-2 max-w-[500px] whitespace-normal h-fit bg-gray-50 dark:bg-gray-900 shadow-[0_0_10px_2px_rgba(0,0,0,0.3)] rounded p-2 break-all">
25
+ <div className="absolute -inset-2 hidden h-fit max-w-[500px] whitespace-normal break-all rounded bg-gray-50 p-2 shadow-[0_0_10px_2px_rgba(0,0,0,0.3)] group-hover:flex dark:bg-gray-900">
26
26
  {value}
27
27
  </div>
28
28
  </div>
@@ -37,7 +37,7 @@ import {hexifyAddress, truncateString, truncateStringReverse} from '../';
37
37
  import {ExpandOnHover} from './ExpandOnHoverValue';
38
38
 
39
39
  const NoData = (): JSX.Element => {
40
- return <span className="rounded bg-gray-200 dark:bg-gray-800 px-2">Not available</span>;
40
+ return <span className="rounded bg-gray-200 px-2 dark:bg-gray-800">Not available</span>;
41
41
  };
42
42
 
43
43
  interface ExtendedCallgraphNodeMeta extends CallgraphNodeMeta {
@@ -180,7 +180,7 @@ const TooltipMetaInfo = ({
180
180
  <NoData />
181
181
  ) : (
182
182
  <CopyToClipboard onCopy={onCopy} text={file}>
183
- <button className="cursor-pointer text-left whitespace-nowrap">
183
+ <button className="cursor-pointer whitespace-nowrap text-left">
184
184
  <ExpandOnHover value={file} displayValue={truncateStringReverse(file, 40)} />
185
185
  </button>
186
186
  </CopyToClipboard>
@@ -294,12 +294,12 @@ export const GraphTooltipContent = ({
294
294
  };
295
295
 
296
296
  return (
297
- <div className={`text-sm flex ${isFixed ? 'w-full' : ''}`}>
297
+ <div className={`flex text-sm ${isFixed ? 'w-full' : ''}`}>
298
298
  <div className={`m-auto w-full ${isFixed ? 'w-full' : ''}`}>
299
- <div className="border border-gray-300 dark:border-gray-500 bg-gray-50 dark:bg-gray-900 rounded-lg p-3 shadow-lg min-h-52 w-[500px] flex justify-between flex-col">
299
+ <div className="min-h-52 flex w-[500px] flex-col justify-between rounded-lg border border-gray-300 bg-gray-50 p-3 shadow-lg dark:border-gray-500 dark:bg-gray-900">
300
300
  <div className="flex flex-row">
301
301
  <div className="mx-2">
302
- <div className="font-semibold break-all h-10 flex items-center">
302
+ <div className="flex h-10 items-center break-all font-semibold">
303
303
  {hoveringNode.meta === undefined ? (
304
304
  <p>root</p>
305
305
  ) : (
@@ -331,7 +331,7 @@ export const GraphTooltipContent = ({
331
331
  </>
332
332
  )}
333
333
  </div>
334
- <table className="table-fixed pr-0 text-gray-700 dark:text-gray-300 my-2 w-full">
334
+ <table className="my-2 w-full table-fixed pr-0 text-gray-700 dark:text-gray-300">
335
335
  <tbody>
336
336
  <tr>
337
337
  <td className="w-1/4">Cumulative</td>
@@ -370,7 +370,7 @@ export const GraphTooltipContent = ({
370
370
  </table>
371
371
  </div>
372
372
  </div>
373
- <span className="block text-gray-500 text-xs mx-2">
373
+ <span className="mx-2 block text-xs text-gray-500">
374
374
  {isCopied ? 'Copied!' : 'Hold shift and click on a value to copy.'}
375
375
  </span>
376
376
  </div>
@@ -40,8 +40,8 @@ const SuggestionItem = ({
40
40
 
41
41
  return (
42
42
  <div
43
- className={cx('cursor-default select-none relative py-2 pl-3 pr-9', {
44
- 'text-white bg-indigo-600': isHighlighted,
43
+ className={cx('relative cursor-default select-none py-2 pl-3 pr-9', {
44
+ 'bg-indigo-600 text-white': isHighlighted,
45
45
  })}
46
46
  onMouseOver={() => onHighlight()}
47
47
  onClick={() => onApplySuggestion()}
@@ -222,7 +222,7 @@ const SuggestionsList = ({
222
222
  >
223
223
  <div
224
224
  style={{width: inputRef?.offsetWidth}}
225
- className="absolute z-10 max-h-[400px] mt-1 bg-gray-50 dark:bg-gray-900 shadow-lg rounded-md text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm"
225
+ className="absolute z-10 mt-1 max-h-[400px] overflow-auto rounded-md bg-gray-50 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-gray-900 sm:text-sm"
226
226
  >
227
227
  {isLabelNamesLoading ? (
228
228
  <LoadingSpinner />
@@ -193,11 +193,11 @@ const MatchersInput = ({
193
193
  const profileSelected = currentQuery.profileName() === '';
194
194
 
195
195
  return (
196
- <div className="font-mono flex-1 w-full min-w-[300px]">
196
+ <div className="w-full min-w-[300px] flex-1 font-mono">
197
197
  <TextareaAutosize
198
198
  ref={inputRef}
199
199
  className={cx(
200
- 'bg-gray-50 dark:bg-gray-900 focus:ring-indigo-800 flex-1 block w-full px-2 py-2 text-sm outline-none rounded',
200
+ 'block w-full flex-1 rounded bg-gray-50 px-2 py-2 text-sm outline-none focus:ring-indigo-800 dark:bg-gray-900',
201
201
  profileSelected && 'cursor-not-allowed'
202
202
  )}
203
203
  placeholder={
@@ -109,13 +109,13 @@ const MetricsTooltip = ({
109
109
  <div className="flex max-w-md">
110
110
  <div className="m-auto">
111
111
  <div
112
- className="border-gray-300 dark:border-gray-500 bg-gray-50 dark:bg-gray-900 rounded-lg p-3 shadow-lg opacity-90"
112
+ className="rounded-lg border-gray-300 bg-gray-50 p-3 opacity-90 shadow-lg dark:border-gray-500 dark:bg-gray-900"
113
113
  style={{borderWidth: 1}}
114
114
  >
115
115
  <div className="flex flex-row">
116
116
  <div className="ml-2 mr-6">
117
117
  <span className="font-semibold">{highlightedNameLabel.value}</span>
118
- <span className="block text-gray-700 dark:text-gray-300 my-2">
118
+ <span className="my-2 block text-gray-700 dark:text-gray-300">
119
119
  <table className="table-auto">
120
120
  <tbody>
121
121
  <tr>
@@ -147,7 +147,7 @@ const MetricsTooltip = ({
147
147
  </tbody>
148
148
  </table>
149
149
  </span>
150
- <span className="block text-gray-500 my-2">
150
+ <span className="my-2 block text-gray-500">
151
151
  {highlighted.labels
152
152
  .filter((label: Label) => label.name !== '__name__')
153
153
  .map(function (label: Label) {
@@ -155,7 +155,7 @@ const MetricsTooltip = ({
155
155
  <button
156
156
  key={label.name}
157
157
  type="button"
158
- className="inline-block rounded-lg text-gray-700 bg-gray-200 dark:bg-gray-700 dark:text-gray-400 px-2 py-1 text-xs font-bold mr-3"
158
+ className="mr-3 inline-block rounded-lg bg-gray-200 px-2 py-1 text-xs font-bold text-gray-700 dark:bg-gray-700 dark:text-gray-400"
159
159
  onClick={() => onLabelClick(label.name, label.value)}
160
160
  >
161
161
  <TextWithTooltip
@@ -167,7 +167,7 @@ const MetricsTooltip = ({
167
167
  );
168
168
  })}
169
169
  </span>
170
- <span className="block text-gray-500 text-xs">
170
+ <span className="block text-xs text-gray-500">
171
171
  Hold shift and click label to add to query.
172
172
  </span>
173
173
  </div>
@@ -168,7 +168,7 @@ const ProfileExplorerApp = ({
168
168
  if (profileTypesError !== undefined && profileTypesError !== null) {
169
169
  return (
170
170
  <div
171
- className="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative"
171
+ className="relative rounded border border-red-400 bg-red-100 px-4 py-3 text-red-700"
172
172
  role="alert"
173
173
  >
174
174
  <strong className="font-bold">Error! </strong>
@@ -50,14 +50,14 @@ const ColorStackLegend = ({navigateTo, compareMode = false}: Props): JSX.Element
50
50
  }
51
51
 
52
52
  return (
53
- <div className="flex flex-wrap gap-2 my-6 justify-center">
53
+ <div className="my-6 flex flex-wrap justify-center gap-2">
54
54
  {stackColorArray.map(([feature, color]) => {
55
55
  const filteringAllowed = feature !== EVERYTHING_ELSE;
56
56
  const isHighlighted = currentSearchString === feature;
57
57
  return (
58
58
  <div
59
59
  key={feature}
60
- className={cx('flex gap-1 items-center text-ellipsis p-1 justify-between pr-2', {
60
+ className={cx('flex items-center justify-between gap-1 text-ellipsis p-1 pr-2', {
61
61
  'cursor-pointer': filteringAllowed,
62
62
  'bg-gray-200 dark:bg-gray-800': isHighlighted,
63
63
  })}
@@ -73,7 +73,7 @@ const ColorStackLegend = ({navigateTo, compareMode = false}: Props): JSX.Element
73
73
  }}
74
74
  >
75
75
  <div className="flex items-center">
76
- <div className="w-4 h-4 mr-1 inline-block" style={{backgroundColor: color}} />
76
+ <div className="mr-1 inline-block h-4 w-4" style={{backgroundColor: color}} />
77
77
  <span className="text-sm">{feature}</span>
78
78
  </div>
79
79
  {isHighlighted ? (
@@ -3,9 +3,9 @@ import {Canvas, Meta, Story} from '@storybook/addon-docs';
3
3
 
4
4
  import {QueryResponse} from '@parca/client';
5
5
 
6
- import ProfileIcicleGraph from './index';
7
6
  import queryResponseDiff from '../testdata/fg-diff.json';
8
7
  import queryResponseSimple from '../testdata/fg-simple.json';
8
+ import ProfileIcicleGraph from './index';
9
9
 
10
10
  <Meta title="template/ProfileIcicleGraph" component={ProfileIcicleGraph} />
11
11
 
@@ -118,7 +118,7 @@ const ProfileMetricsGraph = ({
118
118
  if (error !== null) {
119
119
  return (
120
120
  <div
121
- className="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative"
121
+ className="relative rounded border border-red-400 bg-red-100 px-4 py-3 text-red-700"
122
122
  role="alert"
123
123
  >
124
124
  <strong className="font-bold">Error! </strong>
@@ -135,7 +135,7 @@ const ProfileMetricsGraph = ({
135
135
 
136
136
  return (
137
137
  <div
138
- className="dark:bg-gray-700 rounded border-gray-300 dark:border-gray-500"
138
+ className="rounded border-gray-300 dark:border-gray-500 dark:bg-gray-700"
139
139
  style={{borderWidth: 1}}
140
140
  >
141
141
  <MetricsGraph
@@ -154,7 +154,7 @@ const ProfileMetricsGraph = ({
154
154
  }
155
155
  return (
156
156
  <div className="grid grid-cols-1">
157
- <div className="py-20 flex justify-center">
157
+ <div className="flex justify-center py-20">
158
158
  <p className="m-0">No data found. Try a different query.</p>
159
159
  </div>
160
160
  </div>
@@ -57,10 +57,10 @@ const CompareButton = ({
57
57
  >
58
58
  <div className="flex">
59
59
  <div className="relative mx-2">
60
- <svg className="text-black h-1 w-full left-0" x="0px" y="0px" viewBox="0 0 255 127.5">
60
+ <svg className="left-0 h-1 w-full text-black" x="0px" y="0px" viewBox="0 0 255 127.5">
61
61
  <polygon className="fill-current" points="0,127.5 127.5,0 255,127.5" />
62
62
  </svg>
63
- <div className="bg-black text-white text-xs rounded py-2 px-3 right-0 w-40">
63
+ <div className="right-0 w-40 rounded bg-black py-2 px-3 text-xs text-white">
64
64
  {compareExplanation}
65
65
  </div>
66
66
  </div>
@@ -190,8 +190,8 @@ const ProfileSelector = ({
190
190
 
191
191
  return (
192
192
  <Card>
193
- <Card.Header className="flex space-x-2 !items-center">
194
- <div className="flex flex-wrap w-full justify-start space-x-2 space-y-1 items-center">
193
+ <Card.Header className="flex !items-center space-x-2">
194
+ <div className="flex w-full flex-wrap items-center justify-start space-x-2 space-y-1">
195
195
  <div className="ml-2 mt-1">
196
196
  <ProfileTypeSelector
197
197
  profileTypesData={profileTypesData}
@@ -50,8 +50,8 @@ export const VisualizationPanel = React.memo(function VisualizationPanel({
50
50
 
51
51
  return (
52
52
  <>
53
- <div className="w-full flex justify-end pb-2 gap-2">
54
- <div className="w-full flex justify-between items-center">
53
+ <div className="flex w-full justify-end gap-2 pb-2">
54
+ <div className="flex w-full items-center justify-between">
55
55
  <div className="flex">
56
56
  <div
57
57
  className={cx(isMultiPanelView ? 'visible' : 'invisible', 'flex items-center')}
@@ -199,7 +199,7 @@ export const ProfileView = ({
199
199
  if (flamegraphData?.error !== null) {
200
200
  console.error('Error: ', flamegraphData?.error);
201
201
  return (
202
- <div className="p-10 flex justify-center">
202
+ <div className="flex justify-center p-10">
203
203
  An error occurred: {flamegraphData?.error.message}
204
204
  </div>
205
205
  );
@@ -307,8 +307,8 @@ export const ProfileView = ({
307
307
  <div className="py-3">
308
308
  <Card>
309
309
  <Card.Body>
310
- <div className="flex py-3 w-full">
311
- <div className="lg:w-1/2 flex space-x-4">
310
+ <div className="flex w-full py-3">
311
+ <div className="flex space-x-4 lg:w-1/2">
312
312
  <div className="flex space-x-1">
313
313
  {profileSource !== undefined && queryClient !== undefined ? (
314
314
  <ProfileShareButton
@@ -330,7 +330,7 @@ export const ProfileView = ({
330
330
  <FilterByFunctionButton navigateTo={navigateTo} />
331
331
  </div>
332
332
 
333
- <div className="flex ml-auto gap-2">
333
+ <div className="ml-auto flex gap-2">
334
334
  <ViewSelector
335
335
  defaultValue=""
336
336
  navigateTo={navigateTo}
@@ -352,7 +352,7 @@ export const ProfileView = ({
352
352
  {provided => (
353
353
  <div
354
354
  ref={provided.innerRef}
355
- className="flex space-x-4 justify-between w-full"
355
+ className="flex w-full justify-between space-x-4"
356
356
  {...provided.droppableProps}
357
357
  >
358
358
  {dashboardItems.map((dashboardItem, index) => {
@@ -369,7 +369,7 @@ export const ProfileView = ({
369
369
  {...provided.draggableProps}
370
370
  key={dashboardItem}
371
371
  className={cx(
372
- 'border dark:bg-gray-700 rounded border-gray-300 dark:border-gray-500 p-3',
372
+ 'rounded border border-gray-300 p-3 dark:border-gray-500 dark:bg-gray-700',
373
373
  isMultiPanelView ? 'w-1/2' : 'w-full',
374
374
  snapshot.isDragging ? 'bg-gray-200' : 'bg-white'
375
375
  )}
@@ -224,7 +224,7 @@ export const TopTable = React.memo(function TopTable({
224
224
 
225
225
  return (
226
226
  <div className="relative">
227
- <div className="w-full font-robotoMono h-[80vh] overflow-scroll">
227
+ <div className="font-robotoMono h-[80vh] w-full overflow-scroll">
228
228
  <Table
229
229
  data={top?.list ?? []}
230
230
  columns={columns}
@@ -31,7 +31,7 @@ const DiffLegendBar = ({
31
31
  const isDarkMode = useAppSelector(selectDarkMode);
32
32
 
33
33
  return (
34
- <div className="flex items-center m-2">
34
+ <div className="m-2 flex items-center">
35
35
  {transparencyValues.map(value => {
36
36
  const valueAsPercentage = value / 100;
37
37
  const absoluteValue = Math.abs(valueAsPercentage);
@@ -39,7 +39,7 @@ const DiffLegendBar = ({
39
39
  <div
40
40
  onMouseEnter={onMouseEnter}
41
41
  onMouseLeave={onMouseLeave}
42
- className="w-8 h-4"
42
+ className="h-4 w-8"
43
43
  key={valueAsPercentage}
44
44
  style={{
45
45
  backgroundColor:
@@ -94,7 +94,7 @@ const DiffLegend = (): JSX.Element => {
94
94
  >
95
95
  <Popover.Panel ref={setPopperElement} style={styles.popper} {...attributes.popper}>
96
96
  <div className="overflow-hidden rounded-lg shadow-lg ring-1 ring-black ring-opacity-5">
97
- <div className="p-4 bg-gray-50 dark:bg-gray-800">
97
+ <div className="bg-gray-50 p-4 dark:bg-gray-800">
98
98
  <div className="flex items-center justify-center"></div>
99
99
  <span className="block text-sm text-gray-500 dark:text-gray-50">
100
100
  This is a differential icicle graph, where a purple-colored node means
@@ -43,20 +43,20 @@ const ResultBox = ({value, className = ''}: Props): JSX.Element => {
43
43
  };
44
44
 
45
45
  return (
46
- <div className={cx('flex flex-row w-full', {[className]: className?.length > 0})}>
47
- <span className="flex justify-center items-center border border-r-0 w-16 rounded-l">
46
+ <div className={cx('flex w-full flex-row', {[className]: className?.length > 0})}>
47
+ <span className="flex w-16 items-center justify-center rounded-l border border-r-0">
48
48
  <Icon icon="ant-design:link-outlined" />
49
49
  </span>
50
50
  <input
51
51
  type="text"
52
- className="border text-sm bg-inherit w-full px-1 py-2 flex-grow"
52
+ className="w-full flex-grow border bg-inherit px-1 py-2 text-sm"
53
53
  value={value}
54
54
  readOnly
55
55
  />
56
56
  <CopyToClipboard text={value} onCopy={onCopy}>
57
57
  <Button
58
58
  variant="link"
59
- className="border border-l-0 w-fit whitespace-nowrap p-4 items-center !text-indigo-600 dark:!text-indigo-400 rounded-none rounded-r"
59
+ className="w-fit items-center whitespace-nowrap rounded-none rounded-r border border-l-0 p-4 !text-indigo-600 dark:!text-indigo-400"
60
60
  >
61
61
  {isCopied ? 'Copied!' : 'Copy Link'}
62
62
  </Button>
@@ -85,11 +85,11 @@ const ProfileShareModal = ({
85
85
  </p>
86
86
  {!isShared || error?.length > 0 ? (
87
87
  <>
88
- <p className="text-sm text-gray-500 dark:text-gray-300 mt-3 mb-2">
88
+ <p className="mt-3 mb-2 text-sm text-gray-500 dark:text-gray-300">
89
89
  Enter a description (optional)
90
90
  </p>
91
91
  <textarea
92
- className="border w-full text-gray-500 dark:text-gray-300 bg-inherit text-sm px-2 py-2"
92
+ className="w-full border bg-inherit px-2 py-2 text-sm text-gray-500 dark:text-gray-300"
93
93
  value={description}
94
94
  onChange={e => setDescription(e.target.value)}
95
95
  ></textarea>
@@ -109,7 +109,7 @@ const ProfileShareModal = ({
109
109
  ) : (
110
110
  <>
111
111
  <ResultBox value={sharedLink} className="mt-4" />
112
- <div className="flex justify-center mt-8">
112
+ <div className="mt-8 flex justify-center">
113
113
  <Button variant="neutral" className="w-fit" onClick={onClose}>
114
114
  Close
115
115
  </Button>