Skip to content

Commit

Permalink
Merge pull request #5309 from parca-dev/context-menu-debuginfo-status
Browse files Browse the repository at this point in the history
ui: Added provisions to allow debuginfo status checks
  • Loading branch information
yomete authored Nov 21, 2024
2 parents 928c94b + 9b995a5 commit 5fad7cf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions ui/packages/shared/components/src/ParcaContext/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ interface Props {
additionalFlamegraphColorProfiles?: Record<string, ColorConfig>;
timezone?: string;
preferencesModal?: boolean;
checkDebuginfoStatusHandler?: (buildId: string) => void;
}

export const defaultValue: Props = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const ContextMenu = ({
hideBinary,
}: ContextMenuProps): JSX.Element => {
const {isDarkMode} = useParcaContext();
const {enableSourcesView} = useParcaContext();
const {enableSourcesView, checkDebuginfoStatusHandler} = useParcaContext();
const [isGraphTooltipDocked, setIsDocked] = useUserPreference<boolean>(
USER_PREFERENCES.GRAPH_METAINFO_DOCKED.key
);
Expand Down Expand Up @@ -222,6 +222,23 @@ const ContextMenu = ({
))}
</div>
</Submenu>
{checkDebuginfoStatusHandler !== undefined ? (
<Item
id="check-debuginfo-status"
onClick={() => checkDebuginfoStatusHandler(mappingBuildID as string)}
disabled={!isMappingBuildIDAvailable}
>
<div className="flex w-full items-center gap-2">
<Icon icon="bx:bx-info-circle" />
<div className="relative pr-4">
Check debuginfo status{' '}
<span className="absolute top-1 right-0">
<Icon icon="radix-icons:open-in-new-window" width={12} height={12} />
</span>
</div>
</div>
</Item>
) : null}
<Separator />
<Item id="dock-tooltip" onClick={handleDockTooltip}>
<div className="flex w-full items-center gap-2">
Expand Down

0 comments on commit 5fad7cf

Please sign in to comment.