Add "Show exemplars" button (doesn't do anything yet)

Signed-off-by: Julius Volz <julius.volz@gmail.com>
This commit is contained in:
Julius Volz 2024-09-04 17:45:31 +02:00
parent 88519152e5
commit 7103b35568

View file

@ -205,6 +205,44 @@ const QueryPanel: FC<PanelProps> = ({ idx, metricNames }) => {
/>
</Group>
<Group gap="lg">
<Button
variant="subtle"
color="gray.9"
size="xs"
leftSection={
panel.visualizer.showExemplars ? (
<IconCheckbox
style={{
width: "1.5em",
height: "1.5em",
marginRight: -1,
}}
/>
) : (
<IconSquare
style={{
width: "1.3em",
height: "1.3em",
}}
/>
)
}
onClick={() =>
dispatch(
setVisualizer({
idx,
visualizer: {
...panel.visualizer,
showExemplars: !panel.visualizer.showExemplars,
},
})
)
}
>
Show exemplars
</Button>
<SegmentedControl
onChange={(value) =>
dispatch(
@ -237,50 +275,18 @@ const QueryPanel: FC<PanelProps> = ({ idx, metricNames }) => {
</Center>
),
},
{
value: GraphDisplayMode.Heatmap,
label: (
<Center>
<IconChartGridDots style={iconStyle} />
<Box ml={10}>Heatmap</Box>
</Center>
),
},
// {
// value: GraphDisplayMode.Heatmap,
// label: (
// <Center>
// <IconChartGridDots style={iconStyle} />
// <Box ml={10}>Heatmap</Box>
// </Center>
// ),
// },
]}
/>
{/* <Switch color="gray" defaultChecked label="Show exemplars" /> */}
{/* <Switch
checked={panel.visualizer.showExemplars}
onChange={(event) =>
dispatch(
setVisualizer({
idx,
visualizer: {
...panel.visualizer,
showExemplars: event.currentTarget.checked,
},
})
)
}
color={"rgba(34,139,230,.1)"}
size="md"
label="Show exemplars"
thumbIcon={
panel.visualizer.showExemplars ? (
<IconCheck
style={{ width: "0.9rem", height: "0.9rem" }}
color={"rgba(34,139,230,.1)"}
stroke={3}
/>
) : (
<IconX
style={{ width: "0.9rem", height: "0.9rem" }}
color="rgba(34,139,230,.1)"
stroke={3}
/>
)
}
/> */}
</Group>
</Group>
<Space h="lg" />
<Graph