From 6df9012141f78f14213c6528ad131050c2bb928e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 2 Jun 2015 10:35:10 +0200 Subject: [PATCH] Updated dashboard links feature to support search by my multiple tags, #1944 --- public/app/features/dashlinks/editor.html | 3 ++- public/app/features/dashlinks/module.js | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/public/app/features/dashlinks/editor.html b/public/app/features/dashlinks/editor.html index 576cde9c408..2d563c23c71 100644 --- a/public/app/features/dashlinks/editor.html +++ b/public/app/features/dashlinks/editor.html @@ -25,7 +25,8 @@
  • With tag
  • - + +
  • diff --git a/public/app/features/dashlinks/module.js b/public/app/features/dashlinks/module.js index e33d5406fc2..7be8ffbd87b 100644 --- a/public/app/features/dashlinks/module.js +++ b/public/app/features/dashlinks/module.js @@ -89,7 +89,7 @@ function (angular, _) { function buildLinks(linkDef) { if (linkDef.type === 'dashboards') { - if (!linkDef.tag) { + if (!linkDef.tags) { console.log('Dashboard link missing tag'); return $q.when([]); } @@ -97,7 +97,7 @@ function (angular, _) { if (linkDef.asDropdown) { return $q.when([{ title: linkDef.title, - tag: linkDef.tag, + tags: linkDef.tags, keepTime: linkDef.keepTime, includeVars: linkDef.includeVars, icon: "fa fa-bars", @@ -132,7 +132,7 @@ function (angular, _) { } $scope.searchDashboards = function(link) { - return backendSrv.search({tag: link.tag}).then(function(results) { + return backendSrv.search({tag: link.tags}).then(function(results) { return _.reduce(results, function(memo, dash) { // do not add current dashboard if (dash.id !== currentDashId) {