diff --git a/src/components/grafanaData.ts b/src/components/grafanaData.ts index 8e727d631..efff5fff3 100644 --- a/src/components/grafanaData.ts +++ b/src/components/grafanaData.ts @@ -22,7 +22,7 @@ export const GRAFANA_ANNOTATION_DASHBOARD_SELECTOR = 'grafana/dashboard-selector export const GRAFANA_ANNOTATION_ALERT_LABEL_SELECTOR = 'grafana/alert-label-selector'; export const GRAFANA_ANNOTATION_OVERVIEW_DASHBOARD = 'grafana/overview-dashboard'; -export const isDashboardSelectorAvailable = (entity: Entity) => entity?.metadata.annotations?.[GRAFANA_ANNOTATION_DASHBOARD_SELECTOR] || entity?.metadata.annotations?.[GRAFANA_ANNOTATION_TAG_SELECTOR]; +export const isDashboardSelectorAvailable = (entity: Entity) => Boolean(entity?.metadata.annotations?.[GRAFANA_ANNOTATION_DASHBOARD_SELECTOR] || entity?.metadata.annotations?.[GRAFANA_ANNOTATION_TAG_SELECTOR]); export const isAlertSelectorAvailable = (entity: Entity) => Boolean(entity?.metadata.annotations?.[GRAFANA_ANNOTATION_ALERT_LABEL_SELECTOR]); export const isOverviewDashboardAvailable = (entity: Entity) => Boolean(entity?.metadata.annotations?.[GRAFANA_ANNOTATION_OVERVIEW_DASHBOARD]);