Skip to content

Commit

Permalink
Merge pull request #114 from pharaujo/folderUIDs
Browse files Browse the repository at this point in the history
Allow setting folderUid
  • Loading branch information
brancz authored Aug 31, 2021
2 parents b11ac70 + 60ff35d commit 133753a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions grafana/grafana.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
dashboards: {},
rawDashboards: {},
folderDashboards: {},
folderUidGenerator(folder): '',
datasources: [{
name: 'prometheus',
type: 'prometheus',
Expand Down Expand Up @@ -123,6 +124,7 @@
name: '0',
orgId: 1,
folder: 'Default',
folderUid: $._config.grafana.folderUidGenerator('Default'),
type: 'file',
options: {
path: '/grafana-dashboard-definitions/0',
Expand All @@ -135,6 +137,7 @@
name: folder,
orgId: 1,
folder: folder,
folderUid: $._config.grafana.folderUidGenerator(folder),
type: 'file',
options: {
path: '/grafana-dashboard-definitions/' + folder,
Expand Down Expand Up @@ -333,6 +336,7 @@
[if std.length($._config.grafana.config) > 0 then 'checksum/grafana-config']: std.md5(std.toString($.grafana.config)),
'checksum/grafana-datasources': std.md5(std.toString($.grafana.dashboardDatasources)),
[if $._config.grafana.dashboardsChecksum then 'checksum/grafana-dashboards']: std.md5(std.toString($.grafana.dashboardDefinitions)),
'checksum/grafana-dashboardproviders': std.md5(std.toString($.grafana.dashboardSources)),
},
},
spec: {
Expand Down

0 comments on commit 133753a

Please sign in to comment.