mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-12 14:27:27 -08:00
Handle graph/table tab selection via Redux state
Signed-off-by: Julius Volz <julius.volz@gmail.com>
This commit is contained in:
parent
0049e8baff
commit
e87214a6bd
|
@ -98,7 +98,21 @@ const QueryPanel: FC<PanelProps> = ({ idx, metricNames }) => {
|
||||||
dispatch(removePanel(idx));
|
dispatch(removePanel(idx));
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Tabs defaultValue="table" keepMounted={false}>
|
<Tabs
|
||||||
|
value={panel.visualizer.activeTab}
|
||||||
|
onChange={(v) =>
|
||||||
|
dispatch(
|
||||||
|
setVisualizer({
|
||||||
|
idx,
|
||||||
|
visualizer: {
|
||||||
|
...panel.visualizer,
|
||||||
|
activeTab: v as "table" | "graph",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
keepMounted={false}
|
||||||
|
>
|
||||||
<Tabs.List>
|
<Tabs.List>
|
||||||
<Tabs.Tab value="table" leftSection={<IconTable style={iconStyle} />}>
|
<Tabs.Tab value="table" leftSection={<IconTable style={iconStyle} />}>
|
||||||
Table
|
Table
|
||||||
|
|
Loading…
Reference in a new issue