From 4a93d205bbf4ffc21ecb9f95f26f00b9190308dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 23 Feb 2015 10:13:16 +0100 Subject: [PATCH] Moved dashboard import and json import to same view, found via dashboard search dropdown, #1511 --- src/app/features/account/all.js | 1 - .../features/account/partials/account.html | 1 - src/app/features/dashboard/all.js | 1 + .../{account => dashboard}/importCtrl.js | 2 +- .../partials/import.html | 23 +++++++++++++++---- src/app/partials/search.html | 15 ++---------- src/app/routes/backend/all.js | 8 +++---- src/css/less/search.less | 2 +- 8 files changed, 27 insertions(+), 26 deletions(-) rename src/app/features/{account => dashboard}/importCtrl.js (96%) rename src/app/features/{account => dashboard}/partials/import.html (72%) diff --git a/src/app/features/account/all.js b/src/app/features/account/all.js index 277ae1a75f1..b2c7b2962e9 100644 --- a/src/app/features/account/all.js +++ b/src/app/features/account/all.js @@ -3,6 +3,5 @@ define([ './datasourcesCtrl', './datasourceEditCtrl', './apiKeysCtrl', - './importCtrl', './accountCtrl', ], function () {}); diff --git a/src/app/features/account/partials/account.html b/src/app/features/account/partials/account.html index a25a6bb7bc3..012ef18d6f2 100644 --- a/src/app/features/account/partials/account.html +++ b/src/app/features/account/partials/account.html @@ -2,7 +2,6 @@ diff --git a/src/app/features/dashboard/all.js b/src/app/features/dashboard/all.js index a64800867c2..cadab505e5b 100644 --- a/src/app/features/dashboard/all.js +++ b/src/app/features/dashboard/all.js @@ -13,4 +13,5 @@ define([ './timeSrv', './unsavedChangesSrv', './directives/dashSearchView', + './importCtrl', ], function () {}); diff --git a/src/app/features/account/importCtrl.js b/src/app/features/dashboard/importCtrl.js similarity index 96% rename from src/app/features/account/importCtrl.js rename to src/app/features/dashboard/importCtrl.js index f14374d2db1..8b3612ea70e 100644 --- a/src/app/features/account/importCtrl.js +++ b/src/app/features/dashboard/importCtrl.js @@ -7,7 +7,7 @@ function (angular, _) { var module = angular.module('grafana.controllers'); - module.controller('ImportCtrl', function($scope, $http, backendSrv, datasourceSrv) { + module.controller('DashboardImportCtrl', function($scope, $http, backendSrv, datasourceSrv) { $scope.init = function() { $scope.datasources = []; diff --git a/src/app/features/account/partials/import.html b/src/app/features/dashboard/partials/import.html similarity index 72% rename from src/app/features/account/partials/import.html rename to src/app/features/dashboard/partials/import.html index 39ec78f0032..965331bdd15 100644 --- a/src/app/features/account/partials/import.html +++ b/src/app/features/dashboard/partials/import.html @@ -1,14 +1,27 @@ - +
-

Import dashboards

+

+ Import dashboard + Load dashboard JSON layout from file +

+ +
+
+
+
+
+
+
+
+
+ +

Migrate dashboards

    diff --git a/src/app/partials/search.html b/src/app/partials/search.html index 61c06229b04..8320c9d19b7 100644 --- a/src/app/partials/search.html +++ b/src/app/partials/search.html @@ -62,26 +62,15 @@
-
-
-
-
Local File Load dashboard JSON layout from file
-
-
-
-
-
-
-
- +