mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Annotations: Avoid crash when listing panels (that are rows) (#66869)
This commit is contained in:
parent
faad4b92ad
commit
b992bdb62d
@ -142,6 +142,10 @@ export const AnnotationSettingsEdit = ({ editIdx, dashboard }: Props) => {
|
|||||||
const panels: Array<SelectableValue<number>> = useMemo(
|
const panels: Array<SelectableValue<number>> = useMemo(
|
||||||
() =>
|
() =>
|
||||||
dashboard?.panels
|
dashboard?.panels
|
||||||
|
// Filtering out rows at the moment, revisit to only include panels that support annotations
|
||||||
|
// However the information to know if a panel supports annotations requires it to be already loaded
|
||||||
|
// panel.plugin?.dataSupport?.annotations
|
||||||
|
.filter((panel) => config.panels[panel.type])
|
||||||
.map((panel) => ({
|
.map((panel) => ({
|
||||||
value: panel.id,
|
value: panel.id,
|
||||||
label: panel.title ?? `Panel ${panel.id}`,
|
label: panel.title ?? `Panel ${panel.id}`,
|
||||||
|
Loading…
Reference in New Issue
Block a user