diff --git a/src/app/controllers/search.js b/src/app/controllers/search.js
index 7d885f91a43..980bbec4b11 100644
--- a/src/app/controllers/search.js
+++ b/src/app/controllers/search.js
@@ -41,7 +41,7 @@ function (angular, _, config, $) {
var selectedDash = $scope.results.dashboards[$scope.selectedIndex];
if (selectedDash) {
- $location.path("/dashboard/elasticsearch/" + selectedDash.id);
+ $location.path("/dashboard/db/" + selectedDash.id);
setTimeout(function() {
$('body').click(); // hack to force dropdown to close;
});
@@ -54,7 +54,7 @@ function (angular, _, config, $) {
$scope.share = {
title: title,
- url: baseUrl + '#dashboard/elasticsearch/' + encodeURIComponent(id)
+ url: baseUrl + '#dashboard/db/' + encodeURIComponent(id)
};
};
diff --git a/src/app/partials/search.html b/src/app/partials/search.html
index 37cba55a8fa..a281bd9b46b 100644
--- a/src/app/partials/search.html
+++ b/src/app/partials/search.html
@@ -80,7 +80,7 @@
ng-class="{'selected': $index === selectedIndex }">
|
-
+
|
diff --git a/src/app/routes/all.js b/src/app/routes/all.js
index 17a829f84be..5342515d545 100644
--- a/src/app/routes/all.js
+++ b/src/app/routes/all.js
@@ -1,7 +1,7 @@
define([
- './dashboard-from-es',
+ './dashboard-from-db',
'./dashboard-from-file',
'./dashboard-from-script',
'./dashboard-default',
],
-function () {});
\ No newline at end of file
+function () {});
diff --git a/src/app/routes/dashboard-from-es.js b/src/app/routes/dashboard-from-db.js
similarity index 66%
rename from src/app/routes/dashboard-from-es.js
rename to src/app/routes/dashboard-from-db.js
index f2d8ce85fb5..39e3e2581b0 100644
--- a/src/app/routes/dashboard-from-es.js
+++ b/src/app/routes/dashboard-from-db.js
@@ -8,17 +8,21 @@ function (angular) {
module.config(function($routeProvider) {
$routeProvider
+ .when('/dashboard/db/:id', {
+ templateUrl: 'app/partials/dashboard.html',
+ controller : 'DashFromDBProvider',
+ })
.when('/dashboard/elasticsearch/:id', {
templateUrl: 'app/partials/dashboard.html',
- controller : 'DashFromElasticProvider',
+ controller : 'DashFromDBProvider',
})
.when('/dashboard/temp/:id', {
templateUrl: 'app/partials/dashboard.html',
- controller : 'DashFromElasticProvider',
+ controller : 'DashFromDBProvider',
});
});
- module.controller('DashFromElasticProvider', function($scope, $rootScope, datasourceSrv, $routeParams, alertSrv) {
+ module.controller('DashFromDBProvider', function($scope, $rootScope, datasourceSrv, $routeParams, alertSrv) {
var db = datasourceSrv.getGrafanaDB();
db.getDashboard($routeParams.id)
diff --git a/src/app/services/elasticsearch/es-datasource.js b/src/app/services/elasticsearch/es-datasource.js
index e063af0eaef..577e143cd14 100644
--- a/src/app/services/elasticsearch/es-datasource.js
+++ b/src/app/services/elasticsearch/es-datasource.js
@@ -141,7 +141,7 @@ function (angular, _, $, config, kbn, moment) {
return this._request('PUT', '/dashboard/' + encodeURIComponent(title), this.index, data)
.then(function() {
- return { title: title, url: '/dashboard/elasticsearch/' + title };
+ return { title: title, url: '/dashboard/db/' + title };
}, function(err) {
throw 'Failed to save to elasticsearch ' + err.data;
});
diff --git a/src/app/services/influxdb/influxdbDatasource.js b/src/app/services/influxdb/influxdbDatasource.js
index defca83d18f..6929ba21aab 100644
--- a/src/app/services/influxdb/influxdbDatasource.js
+++ b/src/app/services/influxdb/influxdbDatasource.js
@@ -243,7 +243,7 @@ function (angular, _, kbn, InfluxSeries) {
}];
return this._influxRequest('POST', '/series', data).then(function() {
- return { title: title, url: '/dashboard/elasticsearch/' + title };
+ return { title: title, url: '/dashboard/db/' + title };
}, function(err) {
throw 'Failed to save dashboard to InfluxDB: ' + err.data;
});
|