Clearer naming for dashboard provisioning config.

Renames folder (in options) to path to make it
different from the grafana folder wherein the
dashboard will be created.
This commit is contained in:
Leonard Gram
2018-01-16 17:35:28 +01:00
parent 307b419f7c
commit 183507964c
2 changed files with 4 additions and 4 deletions

View File

@@ -33,7 +33,7 @@ func TestDashboardsAsConfig(t *testing.T) {
So(ds.Editable, ShouldBeTrue) So(ds.Editable, ShouldBeTrue)
So(len(ds.Options), ShouldEqual, 1) So(len(ds.Options), ShouldEqual, 1)
So(ds.Options["folder"], ShouldEqual, "/var/lib/grafana/dashboards") So(ds.Options["path"], ShouldEqual, "/var/lib/grafana/dashboards")
ds2 := cfg[1] ds2 := cfg[1]
@@ -44,7 +44,7 @@ func TestDashboardsAsConfig(t *testing.T) {
So(ds2.Editable, ShouldBeFalse) So(ds2.Editable, ShouldBeFalse)
So(len(ds2.Options), ShouldEqual, 1) So(len(ds2.Options), ShouldEqual, 1)
So(ds2.Options["folder"], ShouldEqual, "/var/lib/grafana/dashboards") So(ds2.Options["path"], ShouldEqual, "/var/lib/grafana/dashboards")
}) })
Convey("Should skip broken config files", func() { Convey("Should skip broken config files", func() {

View File

@@ -4,9 +4,9 @@
editable: true editable: true
type: file type: file
options: options:
folder: /var/lib/grafana/dashboards path: /var/lib/grafana/dashboards
- name: 'default' - name: 'default'
type: file type: file
options: options:
folder: /var/lib/grafana/dashboards path: /var/lib/grafana/dashboards