diff --git a/grafana-plugin/src/pages/insights/variables.ts b/grafana-plugin/src/pages/insights/variables.ts index b8dbd6e2..9a5cdb76 100644 --- a/grafana-plugin/src/pages/insights/variables.ts +++ b/grafana-plugin/src/pages/insights/variables.ts @@ -4,8 +4,6 @@ import { InsightsConfig } from './Insights.types'; const DEFAULT_VARIABLE_CONFIG: Partial[0]> = { hide: 0, - includeAll: true, - allValue: `.+`, isMulti: true, options: [], refresh: 1, @@ -33,6 +31,8 @@ const getVariables = ({ isOpenSource, datasource, stack }: InsightsConfig) => ({ label: 'Team', text: ['All'], value: ['$__all'], + includeAll: true, + allValue: `.+`, datasource, definition: `label_values(\${alert_groups_total}{slug=~"${stack}"},team)`, query: { @@ -47,6 +47,8 @@ const getVariables = ({ isOpenSource, datasource, stack }: InsightsConfig) => ({ label: 'Integration', text: ['All'], value: ['$__all'], + includeAll: true, + allValue: `.+`, datasource, definition: `label_values(\${alert_groups_total}{team=~"$team",slug=~"${stack}"},integration)`, query: { @@ -61,6 +63,7 @@ const getVariables = ({ isOpenSource, datasource, stack }: InsightsConfig) => ({ label: 'Service name', text: ['All'], value: ['$__all'], + includeAll: true, allValue: '($^)|(.+)', datasource, definition: `label_values(\${alert_groups_total}{slug=~"${stack}",team=~"$team"},service_name)`, @@ -85,7 +88,6 @@ const getVariables = ({ isOpenSource, datasource, stack }: InsightsConfig) => ({ value: ['oncall_alert_groups_total', 'grafanacloud_oncall_instance_alert_groups_total'], definition: 'metrics(alert_groups_total)', hide: 2, - includeAll: false, }), userNotified: new QueryVariable({ ...DEFAULT_VARIABLE_CONFIG,