From 5ae8607771ad3a07b14ef55b11a90e50f057062d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sat, 19 Jul 2014 19:06:28 +0200 Subject: [PATCH] Fixed dashboard import, broken by dashboard loading redesign #609 --- src/app/directives/dashUpload.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/directives/dashUpload.js b/src/app/directives/dashUpload.js index c6b4239c0f6..e08734886da 100644 --- a/src/app/directives/dashUpload.js +++ b/src/app/directives/dashUpload.js @@ -6,7 +6,7 @@ function (angular) { var module = angular.module('kibana.directives'); - module.directive('dashUpload', function(timer, dashboard, alertSrv) { + module.directive('dashUpload', function(timer, alertSrv) { return { restrict: 'A', link: function(scope) { @@ -14,7 +14,8 @@ function (angular) { var files = evt.target.files; // FileList object var readerOnload = function() { return function(e) { - dashboard.dash_load(JSON.parse(e.target.result)); + var dashboard = JSON.parse(e.target.result); + scope.emitAppEvent('setup-dashboard', dashboard); scope.$apply(); }; }; @@ -34,4 +35,4 @@ function (angular) { } }; }); -}); \ No newline at end of file +});