Skip to content

Commit

Permalink
Add common.jsonnet
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Oct 4, 2024
1 parent 3dc4f75 commit e089509
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions grafana-dashboards/common.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v11.1.0/main.libsonnet';
local var = grafonnet.dashboard.variable;

{
// grafonnet ref: https://grafana.github.io/grafonnet/API/dashboard/variable.html
variables: {
datasource:
var.datasource.new('datasource', 'yesoreyeram-infinity-datasource')
+ var.datasource.generalOptions.showOnDashboard.withNothing()
,
newhub:
var.query.new('hub')
+ var.query.withDatasourceFromVariable(self.datasource)
+ var.query.selectionOptions.withIncludeAll(value=true)
,
},
}

0 comments on commit e089509

Please sign in to comment.