Commit fa2e074b by Torkel Ödegaard

Fixed drilldown link issue, Fixes #1579

parent e75acce6
...@@ -21,7 +21,7 @@ function (angular, kbn) { ...@@ -21,7 +21,7 @@ function (angular, kbn) {
else { else {
info.title = templateSrv.replace(link.title || ''); info.title = templateSrv.replace(link.title || '');
var slug = kbn.slugifyForUrl(link.dashboard || ''); var slug = kbn.slugifyForUrl(link.dashboard || '');
info.href = '#dashboard/db/' + slug + '?'; info.href = 'dashboard/db/' + slug + '?';
} }
var range = timeSrv.timeRangeForUrl(); var range = timeSrv.timeRangeForUrl();
......
...@@ -19,7 +19,7 @@ function (angular, _) { ...@@ -19,7 +19,7 @@ function (angular, _) {
link: function() { link: function() {
} }
}; };
}).controller('PanelLinkEditorCtrl', function($scope, datasourceSrv) { }).controller('PanelLinkEditorCtrl', function($scope, backendSrv) {
$scope.panel.links = $scope.panel.links || []; $scope.panel.links = $scope.panel.links || [];
...@@ -30,11 +30,10 @@ function (angular, _) { ...@@ -30,11 +30,10 @@ function (angular, _) {
}); });
}; };
$scope.searchDashboards = function(query, callback) { $scope.searchDashboards = function(queryStr, callback) {
var ds = datasourceSrv.getGrafanaDB(); var query = {query: queryStr};
if (ds === null) { return; }
ds.searchDashboards(query).then(function(result) { backendSrv.search(query).then(function(result) {
var dashboards = _.map(result.dashboards, function(dash) { var dashboards = _.map(result.dashboards, function(dash) {
return dash.title; return dash.title;
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment