Просмотр исходного кода

small fix for graphite-web import

Torkel Ödegaard 11 лет назад
Родитель
Сommit
34f36fff5c
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      src/app/controllers/graphiteImport.js

+ 3 - 2
src/app/controllers/graphiteImport.js

@@ -73,7 +73,7 @@ function (angular, app, _, kbn) {
       newDashboard.title = state.name;
       newDashboard.rows.push(currentRow);
 
-      _.each(state.graphs, function(graph) {
+      _.each(state.graphs, function(graph, index) {
         if (currentRow.panels.length === graphsPerRow) {
           currentRow = angular.copy(rowTemplate);
           newDashboard.rows.push(currentRow);
@@ -84,7 +84,8 @@ function (angular, app, _, kbn) {
           span: 12 / graphsPerRow,
           title: graph[1].title,
           targets: [],
-          datasource: datasource
+          datasource: datasource,
+          id: index + 1
         };
 
         _.each(graph[1].target, function(target) {