@parca/profile 0.16.450 → 0.16.452
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +1 -1
- package/dist/MetricsGraphStrips/index.d.ts +2 -1
- package/dist/MetricsGraphStrips/index.d.ts.map +1 -1
- package/dist/MetricsGraphStrips/index.js +4 -4
- package/dist/ProfileIcicleGraph/IcicleGraph/index.js +1 -1
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.js +1 -1
- package/dist/ProfileIcicleGraph/index.d.ts +2 -1
- package/dist/ProfileIcicleGraph/index.d.ts.map +1 -1
- package/dist/ProfileIcicleGraph/index.js +7 -5
- package/dist/ProfileView/components/ActionButtons/GroupByDropdown.d.ts.map +1 -0
- package/dist/{components → ProfileView/components}/ActionButtons/GroupByDropdown.js +1 -1
- package/dist/ProfileView/components/ActionButtons/SortByDropdown.d.ts.map +1 -0
- package/dist/{components → ProfileView/components}/ActionButtons/SortByDropdown.js +2 -2
- package/dist/ProfileView/components/ColorStackLegend.d.ts.map +1 -0
- package/dist/ProfileView/{ColorStackLegend.js → components/ColorStackLegend.js} +2 -2
- package/dist/ProfileView/components/DashboardItems/index.d.ts +27 -0
- package/dist/ProfileView/components/DashboardItems/index.d.ts.map +1 -0
- package/dist/ProfileView/components/DashboardItems/index.js +42 -0
- package/dist/ProfileView/components/DashboardLayout/index.d.ts +15 -0
- package/dist/ProfileView/components/DashboardLayout/index.d.ts.map +1 -0
- package/dist/ProfileView/components/DashboardLayout/index.js +20 -0
- package/dist/ProfileView/components/DiffLegend.d.ts.map +1 -0
- package/dist/ProfileView/components/FilterByFunctionButton.d.ts.map +1 -0
- package/dist/ProfileView/components/ProfileHeader/index.d.ts +9 -0
- package/dist/ProfileView/components/ProfileHeader/index.d.ts.map +1 -0
- package/dist/ProfileView/components/ProfileHeader/index.js +12 -0
- package/dist/ProfileView/components/ShareButton/ResultBox.d.ts.map +1 -0
- package/dist/{components → ProfileView/components}/ShareButton/index.d.ts +1 -1
- package/dist/ProfileView/components/ShareButton/index.d.ts.map +1 -0
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.d.ts.map +1 -0
- package/dist/{components/VisualisationToolbar → ProfileView/components/Toolbars}/MultiLevelDropdown.js +2 -2
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.d.ts.map +1 -0
- package/dist/{components/VisualisationToolbar → ProfileView/components/Toolbars}/TableColumnsDropdown.js +4 -4
- package/dist/ProfileView/components/Toolbars/index.d.ts +41 -0
- package/dist/ProfileView/components/Toolbars/index.d.ts.map +1 -0
- package/dist/ProfileView/components/Toolbars/index.js +24 -0
- package/dist/ProfileView/components/ViewSelector/Dropdown.d.ts.map +1 -0
- package/dist/ProfileView/components/ViewSelector/index.d.ts.map +1 -0
- package/dist/ProfileView/components/VisualizationContainer/index.d.ts +21 -0
- package/dist/ProfileView/components/VisualizationContainer/index.d.ts.map +1 -0
- package/dist/ProfileView/components/VisualizationContainer/index.js +8 -0
- package/dist/ProfileView/{VisualizationPanel.d.ts → components/VisualizationPanel.d.ts} +4 -3
- package/dist/ProfileView/components/VisualizationPanel.d.ts.map +1 -0
- package/dist/ProfileView/context/DashboardContext.d.ts +12 -0
- package/dist/ProfileView/context/DashboardContext.d.ts.map +1 -0
- package/dist/ProfileView/context/DashboardContext.js +39 -0
- package/dist/ProfileView/{ProfileViewContext.d.ts → context/ProfileViewContext.d.ts} +1 -1
- package/dist/ProfileView/context/ProfileViewContext.d.ts.map +1 -0
- package/dist/ProfileView/hooks/useGraphviz.d.ts +12 -0
- package/dist/ProfileView/hooks/useGraphviz.d.ts.map +1 -0
- package/dist/ProfileView/hooks/useGraphviz.js +42 -0
- package/dist/ProfileView/hooks/useProfileMetadata.d.ts +17 -0
- package/dist/ProfileView/hooks/useProfileMetadata.d.ts.map +1 -0
- package/dist/ProfileView/hooks/useProfileMetadata.js +30 -0
- package/dist/ProfileView/hooks/useVisualizationState.d.ts +14 -0
- package/dist/ProfileView/hooks/useVisualizationState.d.ts.map +1 -0
- package/dist/ProfileView/hooks/useVisualizationState.js +52 -0
- package/dist/ProfileView/index.d.ts +2 -49
- package/dist/ProfileView/index.d.ts.map +1 -1
- package/dist/ProfileView/index.js +55 -173
- package/dist/ProfileView/types/visualization.d.ts +50 -0
- package/dist/ProfileView/types/visualization.d.ts.map +1 -0
- package/dist/ProfileView/types/visualization.js +13 -0
- package/dist/ProfileView/utils/colorUtils.d.ts +3 -0
- package/dist/ProfileView/utils/colorUtils.d.ts.map +1 -0
- package/dist/ProfileView/utils/colorUtils.js +21 -0
- package/dist/ProfileViewWithData.d.ts +3 -1
- package/dist/ProfileViewWithData.d.ts.map +1 -1
- package/dist/ProfileViewWithData.js +2 -2
- package/dist/SourceView/Highlighter.js +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/TopTable/index.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
- package/src/GraphTooltipArrow/useGraphTooltipMetaInfo/index.ts +1 -1
- package/src/MetricsGraphStrips/index.tsx +6 -4
- package/src/ProfileIcicleGraph/IcicleGraph/index.tsx +1 -1
- package/src/ProfileIcicleGraph/IcicleGraphArrow/index.tsx +1 -1
- package/src/ProfileIcicleGraph/index.tsx +31 -16
- package/src/{components → ProfileView/components}/ActionButtons/GroupByDropdown.tsx +1 -1
- package/src/{components → ProfileView/components}/ActionButtons/SortByDropdown.tsx +2 -2
- package/src/ProfileView/{ColorStackLegend.tsx → components/ColorStackLegend.tsx} +2 -2
- package/src/ProfileView/components/DashboardItems/index.tsx +151 -0
- package/src/ProfileView/components/DashboardLayout/index.tsx +96 -0
- package/src/ProfileView/components/ProfileHeader/index.tsx +68 -0
- package/src/{components → ProfileView/components}/ShareButton/index.tsx +1 -1
- package/src/{components/VisualisationToolbar → ProfileView/components/Toolbars}/MultiLevelDropdown.tsx +2 -6
- package/src/{components/VisualisationToolbar → ProfileView/components/Toolbars}/TableColumnsDropdown.tsx +4 -4
- package/src/ProfileView/components/Toolbars/index.tsx +193 -0
- package/src/ProfileView/components/VisualizationContainer/index.tsx +68 -0
- package/src/ProfileView/{VisualizationPanel.tsx → components/VisualizationPanel.tsx} +5 -3
- package/src/ProfileView/context/DashboardContext.tsx +61 -0
- package/src/ProfileView/{ProfileViewContext.tsx → context/ProfileViewContext.tsx} +1 -1
- package/src/ProfileView/hooks/useGraphviz.ts +69 -0
- package/src/ProfileView/hooks/useProfileMetadata.ts +59 -0
- package/src/ProfileView/hooks/useVisualizationState.ts +82 -0
- package/src/ProfileView/index.tsx +128 -451
- package/src/ProfileView/types/visualization.ts +76 -0
- package/src/ProfileView/utils/colorUtils.ts +24 -0
- package/src/ProfileViewWithData.tsx +6 -0
- package/src/SourceView/Highlighter.tsx +1 -1
- package/src/Table/index.tsx +1 -1
- package/src/TopTable/index.tsx +1 -1
- package/dist/ProfileView/ColorStackLegend.d.ts.map +0 -1
- package/dist/ProfileView/ProfileViewContext.d.ts.map +0 -1
- package/dist/ProfileView/VisualizationPanel.d.ts.map +0 -1
- package/dist/components/ActionButtons/GroupByDropdown.d.ts.map +0 -1
- package/dist/components/ActionButtons/SortByDropdown.d.ts.map +0 -1
- package/dist/components/DiffLegend.d.ts.map +0 -1
- package/dist/components/FilterByFunctionButton.d.ts.map +0 -1
- package/dist/components/ShareButton/ResultBox.d.ts.map +0 -1
- package/dist/components/ShareButton/index.d.ts.map +0 -1
- package/dist/components/ViewSelector/Dropdown.d.ts.map +0 -1
- package/dist/components/ViewSelector/index.d.ts.map +0 -1
- package/dist/components/VisualisationToolbar/MultiLevelDropdown.d.ts.map +0 -1
- package/dist/components/VisualisationToolbar/TableColumnsDropdown.d.ts.map +0 -1
- package/dist/components/VisualisationToolbar/index.d.ts +0 -37
- package/dist/components/VisualisationToolbar/index.d.ts.map +0 -1
- package/dist/components/VisualisationToolbar/index.js +0 -64
- package/src/components/VisualisationToolbar/index.tsx +0 -228
- /package/dist/{components → ProfileView/components}/ActionButtons/GroupByDropdown.d.ts +0 -0
- /package/dist/{components → ProfileView/components}/ActionButtons/SortByDropdown.d.ts +0 -0
- /package/dist/ProfileView/{ColorStackLegend.d.ts → components/ColorStackLegend.d.ts} +0 -0
- /package/dist/{components → ProfileView/components}/DiffLegend.d.ts +0 -0
- /package/dist/{components → ProfileView/components}/DiffLegend.js +0 -0
- /package/dist/{components → ProfileView/components}/FilterByFunctionButton.d.ts +0 -0
- /package/dist/{components → ProfileView/components}/FilterByFunctionButton.js +0 -0
- /package/dist/{components → ProfileView/components}/ShareButton/ResultBox.d.ts +0 -0
- /package/dist/{components → ProfileView/components}/ShareButton/ResultBox.js +0 -0
- /package/dist/{components → ProfileView/components}/ShareButton/index.js +0 -0
- /package/dist/{components/VisualisationToolbar → ProfileView/components/Toolbars}/MultiLevelDropdown.d.ts +0 -0
- /package/dist/{components/VisualisationToolbar → ProfileView/components/Toolbars}/TableColumnsDropdown.d.ts +0 -0
- /package/dist/{components → ProfileView/components}/ViewSelector/Dropdown.d.ts +0 -0
- /package/dist/{components → ProfileView/components}/ViewSelector/Dropdown.js +0 -0
- /package/dist/{components → ProfileView/components}/ViewSelector/index.d.ts +0 -0
- /package/dist/{components → ProfileView/components}/ViewSelector/index.js +0 -0
- /package/dist/ProfileView/{VisualizationPanel.js → components/VisualizationPanel.js} +0 -0
- /package/dist/ProfileView/{ProfileViewContext.js → context/ProfileViewContext.js} +0 -0
- /package/src/{components → ProfileView/components}/DiffLegend.tsx +0 -0
- /package/src/{components → ProfileView/components}/FilterByFunctionButton.tsx +0 -0
- /package/src/{components → ProfileView/components}/ShareButton/ResultBox.tsx +0 -0
- /package/src/{components → ProfileView/components}/ViewSelector/Dropdown.tsx +0 -0
- /package/src/{components → ProfileView/components}/ViewSelector/index.tsx +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.452 (2024-12-02)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
10
|
+
## [0.16.451](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.450...@parca/profile@0.16.451) (2024-11-28)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @parca/profile
|
|
13
|
+
|
|
6
14
|
## [0.16.450](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.449...@parca/profile@0.16.450) (2024-11-28)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -14,7 +14,7 @@ import { QueryRequest_ReportType } from '@parca/client';
|
|
|
14
14
|
import { useParcaContext, useURLState } from '@parca/components';
|
|
15
15
|
import { FIELD_FUNCTION_FILE_NAME, FIELD_FUNCTION_START_LINE, FIELD_FUNCTION_SYSTEM_NAME, FIELD_INLINED, FIELD_LOCATION_ADDRESS, FIELD_LOCATION_LINE, FIELD_MAPPING_BUILD_ID, FIELD_MAPPING_FILE, } from '../../ProfileIcicleGraph/IcicleGraphArrow';
|
|
16
16
|
import { arrowToString } from '../../ProfileIcicleGraph/IcicleGraphArrow/utils';
|
|
17
|
-
import { useProfileViewContext } from '../../ProfileView/ProfileViewContext';
|
|
17
|
+
import { useProfileViewContext } from '../../ProfileView/context/ProfileViewContext';
|
|
18
18
|
import { useQuery } from '../../useQuery';
|
|
19
19
|
export const useGraphTooltipMetaInfo = ({ table, row }) => {
|
|
20
20
|
const mappingFile = arrowToString(table.getChild(FIELD_MAPPING_FILE)?.get(row));
|
|
@@ -8,7 +8,8 @@ interface Props {
|
|
|
8
8
|
bounds: NumberDuo;
|
|
9
9
|
};
|
|
10
10
|
onSelectedTimeline: (index: number, bounds: NumberDuo | undefined) => void;
|
|
11
|
+
width?: number;
|
|
11
12
|
}
|
|
12
|
-
export declare const MetricsGraphStrips: ({ cpus, data, selectedTimeline, onSelectedTimeline, }: Props) => JSX.Element;
|
|
13
|
+
export declare const MetricsGraphStrips: ({ cpus, data, selectedTimeline, onSelectedTimeline, width, }: Props) => JSX.Element;
|
|
13
14
|
export {};
|
|
14
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/MetricsGraphStrips/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AACnC,OAAO,EAAY,SAAS,EAAC,MAAM,aAAa,CAAC;AAEjD,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,SAAS,CAAC;KACnB,CAAC;IACF,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/MetricsGraphStrips/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AACnC,OAAO,EAAY,SAAS,EAAC,MAAM,aAAa,CAAC;AAEjD,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,SAAS,CAAC;KACnB,CAAC;IACF,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,CAAC;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAMD,eAAO,MAAM,kBAAkB,iEAM5B,KAAK,KAAG,GAAG,CAAC,OA+Dd,CAAC"}
|
|
@@ -19,7 +19,7 @@ import { AreaGraph } from './AreaGraph';
|
|
|
19
19
|
const getTimelineGuideHeight = (cpus, collapsedIndices) => {
|
|
20
20
|
return 56 * (cpus.length - collapsedIndices.length) + 20 * collapsedIndices.length + 24;
|
|
21
21
|
};
|
|
22
|
-
export const MetricsGraphStrips = ({ cpus, data, selectedTimeline, onSelectedTimeline, }) => {
|
|
22
|
+
export const MetricsGraphStrips = ({ cpus, data, selectedTimeline, onSelectedTimeline, width, }) => {
|
|
23
23
|
const [collapsedIndices, setCollapsedIndices] = useState([]);
|
|
24
24
|
// @ts-expect-error
|
|
25
25
|
const color = d3.scaleOrdinal(d3.schemeObservable10);
|
|
@@ -33,9 +33,9 @@ export const MetricsGraphStrips = ({ cpus, data, selectedTimeline, onSelectedTim
|
|
|
33
33
|
});
|
|
34
34
|
return [0, bounds[1] - bounds[0]];
|
|
35
35
|
}, [data]);
|
|
36
|
-
return (_jsxs("div", { className: "flex flex-col gap-1 relative", children: [_jsx(TimelineGuide, { bounds: bounds, width: 1468, height: getTimelineGuideHeight(cpus, collapsedIndices), margin: 1 }), cpus.map((cpu, i) => {
|
|
36
|
+
return (_jsxs("div", { className: "flex flex-col gap-1 relative my-0 ml-[70px]", style: { width: width ?? '100%' }, children: [_jsx(TimelineGuide, { bounds: bounds, width: width ?? 1468, height: getTimelineGuideHeight(cpus, collapsedIndices), margin: 1 }), cpus.map((cpu, i) => {
|
|
37
37
|
const isCollapsed = collapsedIndices.includes(i);
|
|
38
|
-
return (_jsxs("div", { className: "relative min-h-5", children: [_jsxs("div", { className: "text-xs absolute top-0 left-0 flex gap-[2px] items-center bg-white/50 px-1 rounded-sm cursor-pointer z-30", onClick: () => {
|
|
38
|
+
return (_jsxs("div", { className: "relative min-h-5", style: { width: width ?? 1468 }, children: [_jsxs("div", { className: "text-xs absolute top-0 left-0 flex gap-[2px] items-center bg-white/50 px-1 rounded-sm cursor-pointer z-30", onClick: () => {
|
|
39
39
|
const newCollapsedIndices = [...collapsedIndices];
|
|
40
40
|
if (collapsedIndices.includes(i)) {
|
|
41
41
|
newCollapsedIndices.splice(newCollapsedIndices.indexOf(i), 1);
|
|
@@ -44,7 +44,7 @@ export const MetricsGraphStrips = ({ cpus, data, selectedTimeline, onSelectedTim
|
|
|
44
44
|
newCollapsedIndices.push(i);
|
|
45
45
|
}
|
|
46
46
|
setCollapsedIndices(newCollapsedIndices);
|
|
47
|
-
}, children: [_jsx(Icon, { icon: isCollapsed ? 'bxs:right-arrow' : 'bxs:down-arrow' }), cpu] }), !isCollapsed ? (_jsx(AreaGraph, { data: data[i], height: 56, width: 1468, fill: color(i.toString()), selectionBounds: selectedTimeline?.index === i ? selectedTimeline.bounds : undefined, setSelectionBounds: bounds => {
|
|
47
|
+
}, children: [_jsx(Icon, { icon: isCollapsed ? 'bxs:right-arrow' : 'bxs:down-arrow' }), cpu] }), !isCollapsed ? (_jsx(AreaGraph, { data: data[i], height: 56, width: width ?? 1468, fill: color(i.toString()), selectionBounds: selectedTimeline?.index === i ? selectedTimeline.bounds : undefined, setSelectionBounds: bounds => {
|
|
48
48
|
onSelectedTimeline(i, bounds);
|
|
49
49
|
} })) : null] }, cpu));
|
|
50
50
|
})] }));
|
|
@@ -16,7 +16,7 @@ import { useURLState } from '@parca/components';
|
|
|
16
16
|
import { setHoveringNode, useAppDispatch } from '@parca/store';
|
|
17
17
|
import { scaleLinear, selectQueryParam } from '@parca/utilities';
|
|
18
18
|
import GraphTooltip from '../../GraphTooltip';
|
|
19
|
-
import { useProfileViewContext } from '../../ProfileView/ProfileViewContext';
|
|
19
|
+
import { useProfileViewContext } from '../../ProfileView/context/ProfileViewContext';
|
|
20
20
|
import ColorStackLegend from './ColorStackLegend';
|
|
21
21
|
import { IcicleNode, RowHeight } from './IcicleGraphNodes';
|
|
22
22
|
import useColoredGraph from './useColoredGraph';
|
|
@@ -21,7 +21,7 @@ import { getLastItem, scaleLinear } from '@parca/utilities';
|
|
|
21
21
|
import GraphTooltipArrow from '../../GraphTooltipArrow';
|
|
22
22
|
import GraphTooltipArrowContent from '../../GraphTooltipArrow/Content';
|
|
23
23
|
import { DockedGraphTooltip } from '../../GraphTooltipArrow/DockedGraphTooltip';
|
|
24
|
-
import { useProfileViewContext } from '../../ProfileView/ProfileViewContext';
|
|
24
|
+
import { useProfileViewContext } from '../../ProfileView/context/ProfileViewContext';
|
|
25
25
|
import ContextMenu from './ContextMenu';
|
|
26
26
|
import { IcicleNode, RowHeight } from './IcicleGraphNodes';
|
|
27
27
|
import { useFilenamesList } from './useMappingList';
|
|
@@ -17,7 +17,8 @@ interface ProfileIcicleGraphProps {
|
|
|
17
17
|
isHalfScreen: boolean;
|
|
18
18
|
metadataMappingFiles?: string[];
|
|
19
19
|
metadataLoading?: boolean;
|
|
20
|
+
showTimelineGuide?: boolean;
|
|
20
21
|
}
|
|
21
|
-
declare const ProfileIcicleGraph: ({ graph, arrow, total, filtered, curPath, setNewCurPath, profileType, loading, error, width, isHalfScreen, metadataMappingFiles, }: ProfileIcicleGraphProps) => JSX.Element;
|
|
22
|
+
declare const ProfileIcicleGraph: ({ graph, arrow, total, filtered, curPath, setNewCurPath, profileType, loading, error, width, isHalfScreen, metadataMappingFiles, showTimelineGuide, }: ProfileIcicleGraphProps) => JSX.Element;
|
|
22
23
|
export default ProfileIcicleGraph;
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileIcicleGraph/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAI1D,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileIcicleGraph/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAI1D,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAY1C,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;AAEpE,UAAU,uBAAuB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IACvB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,KAAK,IAAI,CAAC;IACxD,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,YAAY,EAAE,OAAO,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAMD,QAAA,MAAM,kBAAkB,0JAcrB,uBAAuB,KAAG,GAAG,CAAC,OA2LhC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
// Copyright 2022 The Parca Authors
|
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
// you may not use this file except in compliance with the License.
|
|
@@ -15,8 +15,9 @@ import { useEffect, useMemo, useState } from 'react';
|
|
|
15
15
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
16
16
|
import { IcicleGraphSkeleton, useParcaContext, useURLState } from '@parca/components';
|
|
17
17
|
import { capitalizeOnlyFirstLetter, divide } from '@parca/utilities';
|
|
18
|
-
import
|
|
19
|
-
import
|
|
18
|
+
import DiffLegend from '../ProfileView/components/DiffLegend';
|
|
19
|
+
import { useProfileViewContext } from '../ProfileView/context/ProfileViewContext';
|
|
20
|
+
import { TimelineGuide } from '../TimelineGuide';
|
|
20
21
|
import { IcicleGraph } from './IcicleGraph';
|
|
21
22
|
import { FIELD_FUNCTION_NAME, IcicleGraphArrow } from './IcicleGraphArrow';
|
|
22
23
|
import useMappingList from './IcicleGraphArrow/useMappingList';
|
|
@@ -24,7 +25,7 @@ const numberFormatter = new Intl.NumberFormat('en-US');
|
|
|
24
25
|
const ErrorContent = ({ errorMessage }) => {
|
|
25
26
|
return _jsx("div", { className: "flex justify-center p-10", children: errorMessage });
|
|
26
27
|
};
|
|
27
|
-
const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ graph, arrow, total, filtered, curPath, setNewCurPath, profileType, loading, error, width, isHalfScreen, metadataMappingFiles, }) {
|
|
28
|
+
const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ graph, arrow, total, filtered, curPath, setNewCurPath, profileType, loading, error, width, isHalfScreen, metadataMappingFiles, showTimelineGuide = false, }) {
|
|
28
29
|
const { onError, authenticationErrorMessage, isDarkMode } = useParcaContext();
|
|
29
30
|
const { compareMode } = useProfileViewContext();
|
|
30
31
|
const [isLoading, setIsLoading] = useState(true);
|
|
@@ -82,7 +83,7 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ graph, arrow, to
|
|
|
82
83
|
if (graph !== undefined)
|
|
83
84
|
return (_jsx(IcicleGraph, { width: width, graph: graph, total: total, filtered: filtered, curPath: curPath, setCurPath: setNewCurPath, profileType: profileType }));
|
|
84
85
|
if (arrow !== undefined)
|
|
85
|
-
return (_jsx(IcicleGraphArrow, { width: width, arrow: arrow, total: total, filtered: filtered, curPath: curPath, setCurPath: setNewCurPath, profileType: profileType, sortBy: storeSortBy, flamegraphLoading: isLoading, isHalfScreen: isHalfScreen, mappingsListFromMetadata: mappingsList, compareAbsolute: isCompareAbsolute }));
|
|
86
|
+
return (_jsxs("div", { className: "relative", children: [showTimelineGuide && (_jsx(TimelineGuide, { bounds: [0, 60000], width: width, height: 1000, margin: 0, ticks: 60000 / 10000 })), _jsx(IcicleGraphArrow, { width: width, arrow: arrow, total: total, filtered: filtered, curPath: curPath, setCurPath: setNewCurPath, profileType: profileType, sortBy: storeSortBy, flamegraphLoading: isLoading, isHalfScreen: isHalfScreen, mappingsListFromMetadata: mappingsList, compareAbsolute: isCompareAbsolute })] }));
|
|
86
87
|
}, [
|
|
87
88
|
isLoading,
|
|
88
89
|
graph,
|
|
@@ -99,6 +100,7 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ graph, arrow, to
|
|
|
99
100
|
isDarkMode,
|
|
100
101
|
mappingsList,
|
|
101
102
|
isCompareAbsolute,
|
|
103
|
+
showTimelineGuide,
|
|
102
104
|
]);
|
|
103
105
|
if (error != null) {
|
|
104
106
|
onError?.(error);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupByDropdown.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/ActionButtons/GroupByDropdown.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAoQzD,UAAU,oBAAoB;IAC5B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAC9C;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAoDnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -16,7 +16,7 @@ import { Transition } from '@headlessui/react';
|
|
|
16
16
|
import { Icon } from '@iconify/react';
|
|
17
17
|
import Select from 'react-select';
|
|
18
18
|
import { Button } from '@parca/components';
|
|
19
|
-
import { FIELD_FUNCTION_FILE_NAME, FIELD_FUNCTION_NAME, FIELD_LABELS, FIELD_LOCATION_ADDRESS, FIELD_MAPPING_FILE, } from '
|
|
19
|
+
import { FIELD_FUNCTION_FILE_NAME, FIELD_FUNCTION_NAME, FIELD_LABELS, FIELD_LOCATION_ADDRESS, FIELD_MAPPING_FILE, } from '../../../ProfileIcicleGraph/IcicleGraphArrow';
|
|
20
20
|
const groupByOptions = [
|
|
21
21
|
{
|
|
22
22
|
value: FIELD_FUNCTION_NAME,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SortByDropdown.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/ActionButtons/SortByDropdown.tsx"],"names":[],"mappings":"AAsBA,QAAA,MAAM,cAAc,QAAO,KAAK,CAAC,GAAG,CAAC,OA2DpC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -12,8 +12,8 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
import { Select, useURLState } from '@parca/components';
|
|
15
|
-
import { FIELD_CUMULATIVE, FIELD_DIFF, FIELD_FUNCTION_NAME, } from '
|
|
16
|
-
import { useProfileViewContext } from '../../
|
|
15
|
+
import { FIELD_CUMULATIVE, FIELD_DIFF, FIELD_FUNCTION_NAME, } from '../../../ProfileIcicleGraph/IcicleGraphArrow';
|
|
16
|
+
import { useProfileViewContext } from '../../context/ProfileViewContext';
|
|
17
17
|
const SortByDropdown = () => {
|
|
18
18
|
const [storeSortBy, setStoreSortBy] = useURLState('sort_by', {
|
|
19
19
|
defaultValue: FIELD_FUNCTION_NAME,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorStackLegend.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/components/ColorStackLegend.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgB,MAAM,OAAO,CAAC;AAYrC,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,uCAA8C,KAAK,KAAG,KAAK,CAAC,GAAG,CAAC,OAmGrF,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -17,8 +17,8 @@ import cx from 'classnames';
|
|
|
17
17
|
import { useURLState } from '@parca/components';
|
|
18
18
|
import { USER_PREFERENCES, useCurrentColorProfile, useUserPreference } from '@parca/hooks';
|
|
19
19
|
import { EVERYTHING_ELSE, selectDarkMode, useAppSelector } from '@parca/store';
|
|
20
|
-
import { getMappingColors } from '
|
|
21
|
-
import useMappingList from '
|
|
20
|
+
import { getMappingColors } from '../../ProfileIcicleGraph/IcicleGraphArrow';
|
|
21
|
+
import useMappingList from '../../ProfileIcicleGraph/IcicleGraphArrow/useMappingList';
|
|
22
22
|
const ColorStackLegend = ({ mappings, compareMode = false, loading }) => {
|
|
23
23
|
const isDarkMode = useAppSelector(selectDarkMode);
|
|
24
24
|
const currentColorProfile = useCurrentColorProfile();
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ProfilerOnRenderCallback } from 'react';
|
|
2
|
+
import { ProfileSource } from '../../../ProfileSource';
|
|
3
|
+
import type { CallgraphData, FlamegraphData, SourceData, TopTableData, VisualizationType } from '../../types/visualization';
|
|
4
|
+
interface GetDashboardItemProps {
|
|
5
|
+
type: VisualizationType;
|
|
6
|
+
isHalfScreen: boolean;
|
|
7
|
+
dimensions: DOMRect | undefined;
|
|
8
|
+
flamegraphData: FlamegraphData;
|
|
9
|
+
topTableData?: TopTableData;
|
|
10
|
+
callgraphData?: CallgraphData;
|
|
11
|
+
sourceData?: SourceData;
|
|
12
|
+
profileSource?: ProfileSource;
|
|
13
|
+
total: bigint;
|
|
14
|
+
filtered: bigint;
|
|
15
|
+
curPath: string[];
|
|
16
|
+
setNewCurPath: (path: string[]) => void;
|
|
17
|
+
currentSearchString?: string;
|
|
18
|
+
setSearchString?: (value: string) => void;
|
|
19
|
+
callgraphSVG?: string;
|
|
20
|
+
perf?: {
|
|
21
|
+
onRender?: ProfilerOnRenderCallback;
|
|
22
|
+
};
|
|
23
|
+
showTimelineGuide?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const getDashboardItem: ({ type, isHalfScreen, dimensions, flamegraphData, topTableData, callgraphData, sourceData, profileSource, total, filtered, curPath, setNewCurPath, currentSearchString, setSearchString, callgraphSVG, perf, showTimelineGuide, }: GetDashboardItemProps) => JSX.Element;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/DashboardItems/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAW,wBAAwB,EAAC,MAAM,OAAO,CAAC;AAMzD,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAGrD,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,UAAU,EACV,YAAY,EACZ,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAEnC,UAAU,qBAAqB;IAC7B,IAAI,EAAE,iBAAiB,CAAC;IACxB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE;QACL,QAAQ,CAAC,EAAE,wBAAwB,CAAC;KACrC,CAAC;IACF,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,gBAAgB,sOAkB1B,qBAAqB,KAAG,GAAG,CAAC,OAgF9B,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
// Copyright 2022 The Parca Authors
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { Profiler } from 'react';
|
|
15
|
+
import { ConditionalWrapper } from '@parca/components';
|
|
16
|
+
import Callgraph from '../../../Callgraph';
|
|
17
|
+
import ProfileIcicleGraph from '../../../ProfileIcicleGraph';
|
|
18
|
+
import { SourceView } from '../../../SourceView';
|
|
19
|
+
import { Table } from '../../../Table';
|
|
20
|
+
export const getDashboardItem = ({ type, isHalfScreen, dimensions, flamegraphData, topTableData, callgraphData, sourceData, profileSource, total, filtered, curPath, setNewCurPath, currentSearchString, setSearchString, callgraphSVG, perf, showTimelineGuide, }) => {
|
|
21
|
+
switch (type) {
|
|
22
|
+
case 'icicle':
|
|
23
|
+
return (_jsx(ConditionalWrapper, { condition: perf?.onRender != null, WrapperComponent: Profiler, wrapperProps: {
|
|
24
|
+
id: 'icicleGraph',
|
|
25
|
+
onRender: perf?.onRender ?? (() => { }),
|
|
26
|
+
}, children: _jsx(ProfileIcicleGraph, { curPath: curPath, setNewCurPath: setNewCurPath, arrow: flamegraphData?.arrow, graph: flamegraphData?.data, total: total, filtered: filtered, profileType: profileSource?.ProfileType(), loading: flamegraphData.loading, error: flamegraphData.error, isHalfScreen: isHalfScreen, width: dimensions?.width !== undefined
|
|
27
|
+
? isHalfScreen
|
|
28
|
+
? (dimensions.width - 54) / 2
|
|
29
|
+
: dimensions.width - 16
|
|
30
|
+
: 0, metadataMappingFiles: flamegraphData.metadataMappingFiles, metadataLoading: flamegraphData.metadataLoading, showTimelineGuide: showTimelineGuide }) }));
|
|
31
|
+
case 'callgraph':
|
|
32
|
+
return callgraphData?.data !== undefined &&
|
|
33
|
+
callgraphSVG !== undefined &&
|
|
34
|
+
dimensions?.width !== undefined ? (_jsx(Callgraph, { data: callgraphData.data, svgString: callgraphSVG, profileType: profileSource?.ProfileType(), width: isHalfScreen ? dimensions?.width / 2 : dimensions?.width })) : (_jsx(_Fragment, {}));
|
|
35
|
+
case 'table':
|
|
36
|
+
return topTableData != null ? (_jsx(Table, { total: total, filtered: filtered, loading: topTableData.loading, data: topTableData.arrow?.record, unit: topTableData.unit, profileType: profileSource?.ProfileType(), currentSearchString: currentSearchString, setSearchString: setSearchString, isHalfScreen: isHalfScreen, metadataMappingFiles: flamegraphData.metadataMappingFiles })) : (_jsx(_Fragment, {}));
|
|
37
|
+
case 'source':
|
|
38
|
+
return sourceData != null ? (_jsx(SourceView, { loading: sourceData.loading, data: sourceData.data, total: total, filtered: filtered })) : (_jsx(_Fragment, {}));
|
|
39
|
+
default:
|
|
40
|
+
return _jsx(_Fragment, {});
|
|
41
|
+
}
|
|
42
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { VisualizationType } from '../../types/visualization';
|
|
3
|
+
interface DashboardLayoutProps {
|
|
4
|
+
getDashboardItemByType: (props: {
|
|
5
|
+
type: VisualizationType;
|
|
6
|
+
isHalfScreen: boolean;
|
|
7
|
+
}) => JSX.Element;
|
|
8
|
+
actionButtons: {
|
|
9
|
+
icicle: JSX.Element;
|
|
10
|
+
table: JSX.Element;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare const DashboardLayout: FC<DashboardLayoutProps>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/DashboardLayout/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,EAAE,EAAC,MAAM,OAAO,CAAC;AAYzB,OAAO,EAAC,iBAAiB,EAAC,MAAM,2BAA2B,CAAC;AAG5D,UAAU,oBAAoB;IAC5B,sBAAsB,EAAE,CAAC,KAAK,EAAE;QAAC,IAAI,EAAE,iBAAiB,CAAC;QAAC,YAAY,EAAE,OAAO,CAAA;KAAC,KAAK,GAAG,CAAC,OAAO,CAAC;IACjG,aAAa,EAAE;QACb,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC;QACpB,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC;KACpB,CAAC;CACH;AAED,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA2DpD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
import { DragDropContext, Draggable, Droppable, } from 'react-beautiful-dnd';
|
|
4
|
+
import { useDashboard } from '../../context/DashboardContext';
|
|
5
|
+
import { VisualizationContainer } from '../VisualizationContainer';
|
|
6
|
+
export const DashboardLayout = ({ getDashboardItemByType, actionButtons, }) => {
|
|
7
|
+
const { dashboardItems, setDashboardItems, isMultiPanelView } = useDashboard();
|
|
8
|
+
const onDragEnd = (result) => {
|
|
9
|
+
const { destination, source, draggableId } = result;
|
|
10
|
+
if (Boolean(destination) && destination?.index !== source.index) {
|
|
11
|
+
const targetItem = draggableId;
|
|
12
|
+
const otherItems = dashboardItems.filter(item => item !== targetItem);
|
|
13
|
+
const newDashboardItems = destination.index < source.index
|
|
14
|
+
? [targetItem, ...otherItems]
|
|
15
|
+
: [...otherItems, targetItem];
|
|
16
|
+
setDashboardItems(newDashboardItems);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
return (_jsx(DragDropContext, { onDragEnd: onDragEnd, children: _jsx(Droppable, { droppableId: "droppable", direction: "horizontal", children: provided => (_jsxs("div", { ref: provided.innerRef, className: cx('grid w-full gap-2', isMultiPanelView ? 'grid-cols-2 mt-4' : 'grid-cols-1'), ...provided.droppableProps, children: [dashboardItems.map((dashboardItem, index) => (_jsx(Draggable, { draggableId: dashboardItem, index: index, isDragDisabled: !isMultiPanelView, children: (provided, snapshot) => (_jsx(VisualizationContainer, { provided: provided, snapshot: snapshot, dashboardItem: dashboardItem, getDashboardItemByType: getDashboardItemByType, isMultiPanelView: isMultiPanelView, index: index, actionButtons: actionButtons })) }, dashboardItem))), provided.placeholder] })) }) }));
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiffLegend.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/components/DiffLegend.tsx"],"names":[],"mappings":"AA0DA,QAAA,MAAM,UAAU,QAAO,GAAG,CAAC,OAqD1B,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterByFunctionButton.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/components/FilterByFunctionButton.tsx"],"names":[],"mappings":"AAoBA,QAAA,MAAM,sBAAsB,QAAO,GAAG,CAAC,OAuCtC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
interface ProfileHeaderProps {
|
|
3
|
+
profileSourceString?: string;
|
|
4
|
+
hasProfileSource: boolean;
|
|
5
|
+
externalMainActions?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const ProfileHeader: FC<ProfileHeaderProps>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/ProfileHeader/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,EAAE,EAAC,MAAM,OAAO,CAAC;AAIzB,UAAU,kBAAkB;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACvC;AAED,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA4ChD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
export const ProfileHeader = ({ profileSourceString, hasProfileSource, externalMainActions, }) => {
|
|
4
|
+
const headerParts = profileSourceString?.split('"') ?? [];
|
|
5
|
+
const showDivider = hasProfileSource && (externalMainActions === null || externalMainActions === undefined);
|
|
6
|
+
return (_jsxs(_Fragment, { children: [showDivider && (_jsx("div", { className: "border-t border-gray-200 dark:border-gray-700 h-[1px] w-full pb-4" })), _jsx("div", { className: cx('flex w-full', hasProfileSource || externalMainActions != null ? 'justify-start' : 'justify-end', {
|
|
7
|
+
'items-end mb-4': !hasProfileSource && externalMainActions != null,
|
|
8
|
+
'items-center mb-2': hasProfileSource,
|
|
9
|
+
}), children: _jsxs("div", { children: [hasProfileSource && (_jsxs("div", { className: "flex items-center gap-1", children: [_jsx("div", { className: "text-xs font-medium", children: headerParts.length > 0 ? headerParts[0].replace(/"/g, '') : '' }), _jsx("div", { className: "text-xs font-medium", children: headerParts.length > 1
|
|
10
|
+
? headerParts[headerParts.length - 1].replace(/"/g, '')
|
|
11
|
+
: '' })] })), externalMainActions] }) })] }));
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResultBox.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/ShareButton/ResultBox.tsx"],"names":[],"mappings":"AAoBA,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,QAAA,MAAM,SAAS,yBAA6B,KAAK,KAAG,GAAG,CAAC,OAqCvD,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { QueryRequest, QueryServiceClient } from '@parca/client';
|
|
3
|
-
import { ProfileSource } from '
|
|
3
|
+
import { ProfileSource } from '../../../ProfileSource';
|
|
4
4
|
interface Props {
|
|
5
5
|
profileSource?: ProfileSource;
|
|
6
6
|
queryClient?: QueryServiceClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/ShareButton/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAItC,OAAO,EAAC,YAAY,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAG/D,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAGrD,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,6BAA6B,EAAE,KAAK,CAAC,SAAS,CAAC;CAChD;AAkGD,QAAA,MAAM,WAAW,oHAOd,KAAK,KAAG,GAAG,CAAC,OA4Ed,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiLevelDropdown.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAOzC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AA6H1C,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAsJzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -16,8 +16,8 @@ import { Menu } from '@headlessui/react';
|
|
|
16
16
|
import { Icon } from '@iconify/react';
|
|
17
17
|
import { useURLState } from '@parca/components';
|
|
18
18
|
import { USER_PREFERENCES, useUserPreference } from '@parca/hooks';
|
|
19
|
-
import { FIELD_FUNCTION_NAME
|
|
20
|
-
import { useProfileViewContext } from '../../
|
|
19
|
+
import { FIELD_FUNCTION_NAME } from '../../../ProfileIcicleGraph/IcicleGraphArrow';
|
|
20
|
+
import { useProfileViewContext } from '../../context/ProfileViewContext';
|
|
21
21
|
const MenuItem = ({ label, items, onclick, onSelect, path = [], id, closeDropdown, isNested = false, activeValueForSortBy, activeValueForColorBy, value, disabled = false, icon, customSubmenu, }) => {
|
|
22
22
|
let isActive = false;
|
|
23
23
|
if (isNested) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableColumnsDropdown.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/Toolbars/TableColumnsDropdown.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAQ1C,UAAU,KAAK;IACb,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,oBAAoB,qCAAoC,KAAK,KAAG,GAAG,CAAC,OA6LzE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -15,10 +15,10 @@ import { useEffect, useMemo, useState } from 'react';
|
|
|
15
15
|
import { createColumnHelper } from '@tanstack/table-core';
|
|
16
16
|
import { useURLState } from '@parca/components';
|
|
17
17
|
import { valueFormatter } from '@parca/utilities';
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
18
|
+
import { isDummyRow } from '../../../Table';
|
|
19
|
+
import ColumnsVisibility from '../../../Table/ColumnsVisibility';
|
|
20
|
+
import { addPlusSign, getRatioString } from '../../../Table/utils/functions';
|
|
21
|
+
import { useProfileViewContext } from '../../context/ProfileViewContext';
|
|
22
22
|
const TableColumnsDropdown = ({ profileType, total, filtered }) => {
|
|
23
23
|
const { compareMode } = useProfileViewContext();
|
|
24
24
|
const [tableColumns, setTableColumns] = useURLState('table_columns', {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { QueryServiceClient } from '@parca/client';
|
|
3
|
+
import { ProfileType } from '@parca/parser';
|
|
4
|
+
import { ProfileSource } from '../../../ProfileSource';
|
|
5
|
+
export interface VisualisationToolbarProps {
|
|
6
|
+
groupBy: string[];
|
|
7
|
+
toggleGroupBy: (key: string) => void;
|
|
8
|
+
hasProfileSource: boolean;
|
|
9
|
+
pprofdownloading?: boolean;
|
|
10
|
+
profileSource?: ProfileSource;
|
|
11
|
+
queryClient?: QueryServiceClient;
|
|
12
|
+
onDownloadPProf: () => void;
|
|
13
|
+
curPath: string[];
|
|
14
|
+
setNewCurPath: (path: string[]) => void;
|
|
15
|
+
profileType?: ProfileType;
|
|
16
|
+
total: bigint;
|
|
17
|
+
filtered: bigint;
|
|
18
|
+
currentSearchString?: string;
|
|
19
|
+
setSearchString?: (value: string) => void;
|
|
20
|
+
groupByLabels: string[];
|
|
21
|
+
preferencesModal?: boolean;
|
|
22
|
+
profileViewExternalSubActions?: React.ReactNode;
|
|
23
|
+
clearSelection: () => void;
|
|
24
|
+
setGroupByLabels: (labels: string[]) => void;
|
|
25
|
+
showVisualizationSelector?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface TableToolbarProps {
|
|
28
|
+
profileType?: ProfileType;
|
|
29
|
+
total: bigint;
|
|
30
|
+
filtered: bigint;
|
|
31
|
+
clearSelection: () => void;
|
|
32
|
+
currentSearchString?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface IcicleGraphToolbarProps {
|
|
35
|
+
curPath: string[];
|
|
36
|
+
setNewCurPath: (path: string[]) => void;
|
|
37
|
+
}
|
|
38
|
+
export declare const TableToolbar: FC<TableToolbarProps>;
|
|
39
|
+
export declare const IcicleGraphToolbar: FC<IcicleGraphToolbarProps>;
|
|
40
|
+
export declare const VisualisationToolbar: FC<VisualisationToolbarProps>;
|
|
41
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/Toolbars/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,EAAE,EAAC,MAAM,OAAO,CAAC;AAIzB,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAUrD,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,6BAA6B,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC7C,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAuB9C,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAiB1D,CAAC;AAMF,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CA6E9D,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Icon } from '@iconify/react';
|
|
3
|
+
import { Button, UserPreferencesModal } from '@parca/components';
|
|
4
|
+
import { useDashboard } from '../../context/DashboardContext';
|
|
5
|
+
import GroupByDropdown from '../ActionButtons/GroupByDropdown';
|
|
6
|
+
import SortByDropdown from '../ActionButtons/SortByDropdown';
|
|
7
|
+
import FilterByFunctionButton from '../FilterByFunctionButton';
|
|
8
|
+
import ShareButton from '../ShareButton';
|
|
9
|
+
import ViewSelector from '../ViewSelector';
|
|
10
|
+
import MultiLevelDropdown from './MultiLevelDropdown';
|
|
11
|
+
import TableColumnsDropdown from './TableColumnsDropdown';
|
|
12
|
+
export const TableToolbar = ({ profileType, total, filtered, clearSelection, currentSearchString, }) => {
|
|
13
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { className: "flex w-full gap-2 items-end", children: [_jsx(TableColumnsDropdown, { profileType: profileType, total: total, filtered: filtered }), _jsx(Button, { color: "neutral", onClick: clearSelection, className: "w-auto", variant: "neutral", disabled: currentSearchString === undefined || currentSearchString.length === 0, children: "Clear selection" })] }) }));
|
|
14
|
+
};
|
|
15
|
+
export const IcicleGraphToolbar = ({ curPath, setNewCurPath }) => {
|
|
16
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { className: "flex w-full gap-2 items-end", children: [_jsx(SortByDropdown, {}), _jsxs(Button, { variant: "neutral", className: "gap-2 w-max h-fit", onClick: () => setNewCurPath([]), disabled: curPath.length === 0, children: ["Reset graph", _jsx(Icon, { icon: "system-uicons:reset", width: 20 })] })] }) }));
|
|
17
|
+
};
|
|
18
|
+
const Divider = () => (_jsx("div", { className: "border-t mt-4 border-gray-200 dark:border-gray-700 h-[1px] w-full pb-4" }));
|
|
19
|
+
export const VisualisationToolbar = ({ groupBy, toggleGroupBy, groupByLabels, setGroupByLabels, profileType, preferencesModal, profileSource, queryClient, onDownloadPProf, pprofdownloading, profileViewExternalSubActions, curPath, setNewCurPath, total, filtered, currentSearchString, clearSelection, showVisualizationSelector = true, }) => {
|
|
20
|
+
const { dashboardItems } = useDashboard();
|
|
21
|
+
const isTableViz = dashboardItems?.includes('table');
|
|
22
|
+
const isGraphViz = dashboardItems?.includes('icicle');
|
|
23
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex w-full justify-between items-end", children: [_jsxs("div", { className: "flex gap-3 items-end", children: [_jsxs(_Fragment, { children: [_jsx(GroupByDropdown, { groupBy: groupBy, toggleGroupBy: toggleGroupBy, labels: groupByLabels, setGroupByLabels: setGroupByLabels }), _jsx(MultiLevelDropdown, { profileType: profileType, onSelect: () => { } })] }), _jsx(FilterByFunctionButton, {}), profileViewExternalSubActions != null ? profileViewExternalSubActions : null] }), _jsxs("div", { className: "flex gap-3", children: [preferencesModal != null ? _jsx(UserPreferencesModal, {}) : null, _jsx(ShareButton, { profileSource: profileSource, queryClient: queryClient, queryRequest: profileSource?.QueryRequest() ?? undefined, onDownloadPProf: onDownloadPProf, pprofdownloading: pprofdownloading ?? false, profileViewExternalSubActions: profileViewExternalSubActions }), showVisualizationSelector ? _jsx(ViewSelector, {}) : null] })] }), isGraphViz && !isTableViz && (_jsxs(_Fragment, { children: [_jsx(Divider, {}), _jsx(IcicleGraphToolbar, { curPath: curPath, setNewCurPath: setNewCurPath })] })), isTableViz && !isGraphViz && (_jsxs(_Fragment, { children: [_jsx(Divider, {}), _jsx(TableToolbar, { profileType: profileType, total: total, filtered: filtered, clearSelection: clearSelection, currentSearchString: currentSearchString })] }))] }));
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/ViewSelector/Dropdown.tsx"],"names":[],"mappings":"AAqBA,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC;IACpB,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,eAAe,CAAC;IACzB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,YAAY,EAAE,CAMnE;AAED,QAAA,MAAM,QAAQ,8GAYX;IACD,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,KAAG,GAAG,CAAC,OA4GP,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/ViewSelector/index.tsx"],"names":[],"mappings":"AAiBA,QAAA,MAAM,YAAY,QAAO,GAAG,CAAC,OAwF5B,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import type { DraggableProvided, DraggableStateSnapshot } from 'react-beautiful-dnd';
|
|
3
|
+
import { VisualizationType } from '../../types/visualization';
|
|
4
|
+
interface VisualizationContainerProps {
|
|
5
|
+
provided: DraggableProvided;
|
|
6
|
+
snapshot: DraggableStateSnapshot;
|
|
7
|
+
dashboardItem: VisualizationType;
|
|
8
|
+
getDashboardItemByType: (props: {
|
|
9
|
+
type: VisualizationType;
|
|
10
|
+
isHalfScreen: boolean;
|
|
11
|
+
}) => JSX.Element;
|
|
12
|
+
isMultiPanelView: boolean;
|
|
13
|
+
index: number;
|
|
14
|
+
actionButtons: {
|
|
15
|
+
icicle: JSX.Element;
|
|
16
|
+
table: JSX.Element;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export declare const VisualizationContainer: FC<VisualizationContainerProps>;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/VisualizationContainer/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,EAAE,EAAC,MAAM,OAAO,CAAC;AAGzB,OAAO,KAAK,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,qBAAqB,CAAC;AAGnF,OAAO,EAAC,iBAAiB,EAAC,MAAM,2BAA2B,CAAC;AAG5D,UAAU,2BAA2B;IACnC,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,EAAE,sBAAsB,CAAC;IACjC,aAAa,EAAE,iBAAiB,CAAC;IACjC,sBAAsB,EAAE,CAAC,KAAK,EAAE;QAAC,IAAI,EAAE,iBAAiB,CAAC;QAAC,YAAY,EAAE,OAAO,CAAA;KAAC,KAAK,GAAG,CAAC,OAAO,CAAC;IACjG,gBAAgB,EAAE,OAAO,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE;QACb,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC;QACpB,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC;KACpB,CAAC;CACH;AAED,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CAgClE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
import { useDashboard } from '../../context/DashboardContext';
|
|
4
|
+
import { VisualizationPanel } from '../VisualizationPanel';
|
|
5
|
+
export const VisualizationContainer = ({ provided, snapshot, dashboardItem, getDashboardItemByType, isMultiPanelView, index, actionButtons, }) => {
|
|
6
|
+
const { handleClosePanel } = useDashboard();
|
|
7
|
+
return (_jsx("div", { ref: provided.innerRef, ...provided.draggableProps, className: cx('w-full min-h-96', snapshot.isDragging ? 'bg-gray-200 dark:bg-gray-500' : 'bg-inherit dark:bg-gray-900', isMultiPanelView ? 'border-2 border-gray-100 dark:border-gray-700 rounded-md p-3' : ''), children: _jsx(VisualizationPanel, { handleClosePanel: handleClosePanel, isMultiPanelView: isMultiPanelView, dashboardItem: dashboardItem, getDashboardItemByType: getDashboardItemByType, dragHandleProps: provided.dragHandleProps, index: index, actionButtons: actionButtons }) }));
|
|
8
|
+
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DraggableProvidedDragHandleProps } from 'react-beautiful-dnd';
|
|
3
|
+
import { VisualizationType } from '../types/visualization';
|
|
3
4
|
interface Props {
|
|
4
|
-
dashboardItem:
|
|
5
|
+
dashboardItem: VisualizationType;
|
|
5
6
|
index: number;
|
|
6
7
|
isMultiPanelView: boolean;
|
|
7
|
-
handleClosePanel: (dashboardItem:
|
|
8
|
+
handleClosePanel: (dashboardItem: VisualizationType) => void;
|
|
8
9
|
dragHandleProps: DraggableProvidedDragHandleProps | null | undefined;
|
|
9
10
|
getDashboardItemByType: (props: {
|
|
10
|
-
type:
|
|
11
|
+
type: VisualizationType;
|
|
11
12
|
isHalfScreen: boolean;
|
|
12
13
|
}) => JSX.Element;
|
|
13
14
|
actionButtons: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VisualizationPanel.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/components/VisualizationPanel.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAC,gCAAgC,EAAC,MAAM,qBAAqB,CAAC;AAK1E,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AAEzD,UAAU,KAAK;IACb,aAAa,EAAE,iBAAiB,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,CAAC,aAAa,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC7D,eAAe,EAAE,gCAAgC,GAAG,IAAI,GAAG,SAAS,CAAC;IACrE,sBAAsB,EAAE,CAAC,KAAK,EAAE;QAAC,IAAI,EAAE,iBAAiB,CAAC;QAAC,YAAY,EAAE,OAAO,CAAA;KAAC,KAAK,GAAG,CAAC,OAAO,CAAC;IACjG,aAAa,EAAE;QACb,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC;QACpB,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC;KACpB,CAAC;CACH;AAED,eAAO,MAAM,kBAAkB,mCAyD7B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import { VisualizationType } from '../types/visualization';
|
|
3
|
+
interface DashboardContextType {
|
|
4
|
+
dashboardItems: string[];
|
|
5
|
+
setDashboardItems: (items: string[]) => void;
|
|
6
|
+
handleClosePanel: (visualizationType: VisualizationType) => void;
|
|
7
|
+
isMultiPanelView: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const DashboardProvider: FC<PropsWithChildren>;
|
|
10
|
+
export declare const useDashboard: () => DashboardContextType;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=DashboardContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardContext.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/context/DashboardContext.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,EAAE,EAAE,iBAAiB,EAA4B,MAAM,OAAO,CAAC;AAIvE,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AAEzD,UAAU,oBAAoB;IAC5B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC7C,gBAAgB,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjE,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAID,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,CAwBnD,CAAC;AAEF,eAAO,MAAM,YAAY,QAAO,oBAM/B,CAAC"}
|