Skip to content

Commit bfbe413

Browse files
committed
add ability to override datasource for dashboards
1 parent 567320d commit bfbe413

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

cortex-mixin/config.libsonnet

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,8 @@
6868

6969
// The routes to exclude from alerts.
7070
alert_excluded_routes: [],
71+
72+
// Name of the datasource for which the dashboards should attach to
73+
dashboard_datasource: 'default',
7174
},
7275
}

cortex-mixin/dashboards/dashboard-utils.libsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
88
// - default tags,
99
// - some links that propagate the selectred cluster.
1010
dashboard(title)::
11-
super.dashboard(title) + {
11+
super.dashboard(title=title, datasource=$._config.dashboard_datasource) + {
1212
addRowIf(condition, row)::
1313
if condition
1414
then self.addRow(row)

0 commit comments

Comments
 (0)