From 9cc0be0fc2d9b051a457f107e7dcef060a8cb303 Mon Sep 17 00:00:00 2001 From: Jason Wilder Date: Wed, 11 Feb 2015 12:06:33 -0700 Subject: [PATCH 1/4] Add grafana binary to .gitignore Running "go build" defaults to building a binary named grafana in the root dir. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e0a0048b514..88bb7c6b8e0 100644 --- a/.gitignore +++ b/.gitignore @@ -17,5 +17,6 @@ src/css/*.min.css /data/* /bin/* /grafana-pro +/grafana grafana.custom.ini From a6df991b76c2f3f341e9e4ef3a2c7ae0597c29ec Mon Sep 17 00:00:00 2001 From: Jason Wilder Date: Wed, 11 Feb 2015 12:12:17 -0700 Subject: [PATCH 2/4] Update README.md w/ known working build tool versions --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a99d15676c3..e5eef25d513 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,8 @@ godep restore (will pull down all golang lib dependecies in your current GOPATH) go build -o ./bin/grafana . ``` -To build less to css for frontend: +To build less to css for the frontend you will need a recent version of of node (v0.12.0), +npm (v2.5.0) and grunt (v0.4.5). Run the following: ``` npm install From 8230279932df05c5f1345093c707cbda604b9ee8 Mon Sep 17 00:00:00 2001 From: Jason Wilder Date: Wed, 11 Feb 2015 15:09:28 -0700 Subject: [PATCH 3/4] Assign new ID to when importing dashboard via frontend Fixes a panic: interface conversion: interface is string, not float64 when importing a dashboard that has a non-float ID. --- src/app/directives/dashUpload.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/directives/dashUpload.js b/src/app/directives/dashUpload.js index 889438dffc9..d9f8e3e4ae9 100644 --- a/src/app/directives/dashUpload.js +++ b/src/app/directives/dashUpload.js @@ -24,6 +24,7 @@ function (angular, kbn) { return; } var title = kbn.slugifyForUrl(window.grafanaImportDashboard.title); + window.grafanaImportDashboard.id = null; $location.path('/dashboard/import/' + title); }); }; From 793eda764080572bcd1d3e48f4c92d4b38cb2177 Mon Sep 17 00:00:00 2001 From: Jason Wilder Date: Wed, 11 Feb 2015 15:17:40 -0700 Subject: [PATCH 4/4] Assign new dashboard ID when importing dashboard via command-line --- pkg/cmd/import.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/cmd/import.go b/pkg/cmd/import.go index 1c3545904a2..aeea8cb17ed 100644 --- a/pkg/cmd/import.go +++ b/pkg/cmd/import.go @@ -106,6 +106,7 @@ func importDashboard(path string, accountId int64) error { if err := jsonParser.Decode(&dash.Data); err != nil { return err } + dash.Data["id"] = nil cmd := m.SaveDashboardCommand{ AccountId: accountId,