diff --git a/grafana-plugin/src/dashboards/oncall_metrics_dashboard.json b/grafana-plugin/src/dashboards/oncall_metrics_dashboard.json index 791aa6f22d..aa42406517 100644 --- a/grafana-plugin/src/dashboards/oncall_metrics_dashboard.json +++ b/grafana-plugin/src/dashboards/oncall_metrics_dashboard.json @@ -1392,6 +1392,7 @@ "type": "query" }, { + "allValue": ".+", "current": { "selected": true, "text": ["All"], @@ -1419,6 +1420,7 @@ "type": "query" }, { + "allValue": ".+", "current": { "selected": true, "text": ["All"], @@ -1446,6 +1448,7 @@ "type": "query" }, { + "allValue": ".+", "current": { "selected": true, "text": ["All"], diff --git a/grafana-plugin/src/pages/insights/variables.ts b/grafana-plugin/src/pages/insights/variables.ts index 574bbebce5..199bcfd96f 100644 --- a/grafana-plugin/src/pages/insights/variables.ts +++ b/grafana-plugin/src/pages/insights/variables.ts @@ -5,6 +5,7 @@ import { InsightsConfig } from './Insights.types'; const DEFAULT_VARIABLE_CONFIG: Partial[0]> = { hide: 0, includeAll: true, + allValue: `.+`, isMulti: true, options: [], refresh: 1, @@ -14,18 +15,13 @@ const DEFAULT_VARIABLE_CONFIG: Partial ({ - // Selectable - ...(isOpenSource - ? { - datasource: new DataSourceVariable({ - name: 'datasource', - label: 'Data source', - pluginId: 'prometheus', - value: 'grafanacloud-usage', - }), - } - : {}), +const getVariables = ({ datasource, stack }: InsightsConfig) => ({ + datasource: new DataSourceVariable({ + name: 'datasource', + label: 'Data source', + pluginId: 'prometheus', + value: 'grafanacloud-usage', + }), team: new QueryVariable({ ...DEFAULT_VARIABLE_CONFIG, name: 'team',