From d03949a735fd6ee486e278feb3b87f252be5ce96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 6 Jan 2015 18:38:48 +0100 Subject: [PATCH] Worked on dashboard and tag search through backend --- src/app/features/grafanaDatasource/datasource.js | 6 ++---- src/app/partials/search.html | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/app/features/grafanaDatasource/datasource.js b/src/app/features/grafanaDatasource/datasource.js index f3ec1569352..c96199ce168 100644 --- a/src/app/features/grafanaDatasource/datasource.js +++ b/src/app/features/grafanaDatasource/datasource.js @@ -65,12 +65,10 @@ function (angular, _, kbn) { GrafanaDatasource.prototype.searchDashboards = function(query) { return backendSrv.get('/api/search/', { q: query } ) .then(function(data) { - var hits = { dashboards: [], tags: [] }; - hits.dashboards = _.map(data, function(item) { + _.each(data.dashboards, function(item) { item.id = item.slug; - return item; }); - return hits; + return data; }); }; diff --git a/src/app/partials/search.html b/src/app/partials/search.html index 2d220b206fd..7cdccba793a 100644 --- a/src/app/partials/search.html +++ b/src/app/partials/search.html @@ -30,7 +30,6 @@
-
No dashboards matching your query were found.
@@ -47,6 +46,8 @@
+
No dashboards matching your query were found.
+