Browse Source

Merge pull request #1467 from jwilder/jw-fixes

Small fixes to getting up and running
Torkel Ödegaard 11 years ago
parent
commit
2a31f16b76
4 changed files with 5 additions and 1 deletions
  1. 1 0
      .gitignore
  2. 2 1
      README.md
  3. 1 0
      pkg/cmd/import.go
  4. 1 0
      src/app/directives/dashUpload.js

+ 1 - 0
.gitignore

@@ -17,5 +17,6 @@ src/css/*.min.css
 /data/*
 /data/*
 /bin/*
 /bin/*
 /grafana-pro
 /grafana-pro
+/grafana
 
 
 grafana.custom.ini
 grafana.custom.ini

+ 2 - 1
README.md

@@ -43,7 +43,8 @@ godep restore (will pull down all golang lib dependecies in your current GOPATH)
 go build -o ./bin/grafana .
 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
 npm install

+ 1 - 0
pkg/cmd/import.go

@@ -106,6 +106,7 @@ func importDashboard(path string, accountId int64) error {
 	if err := jsonParser.Decode(&dash.Data); err != nil {
 	if err := jsonParser.Decode(&dash.Data); err != nil {
 		return err
 		return err
 	}
 	}
+	dash.Data["id"] = nil
 
 
 	cmd := m.SaveDashboardCommand{
 	cmd := m.SaveDashboardCommand{
 		AccountId: accountId,
 		AccountId: accountId,

+ 1 - 0
src/app/directives/dashUpload.js

@@ -24,6 +24,7 @@ function (angular, kbn) {
                   return;
                   return;
                 }
                 }
                 var title = kbn.slugifyForUrl(window.grafanaImportDashboard.title);
                 var title = kbn.slugifyForUrl(window.grafanaImportDashboard.title);
+                window.grafanaImportDashboard.id = null;
                 $location.path('/dashboard/import/' + title);
                 $location.path('/dashboard/import/' + title);
               });
               });
             };
             };