From d7ef6daeb8133bd26c7f2cc57a9911770ecdd39b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 27 Nov 2014 10:41:20 +0100 Subject: [PATCH] SinglestatPanel: Fixed absolute drilldown link issue, Fixes #1150 --- CHANGELOG.md | 1 + src/app/panels/singlestat/singleStatPanel.js | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44bc4d0be12..aab7128900a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - [Issue #1095](https://github.com/grafana/grafana/issues/1095). DrilldownLink: template variables in params property was not interpolated - [Issue #1114](https://github.com/grafana/grafana/issues/1114). Graphite: Lexer fix, allow equal sign (=) in metric paths - [Issue #1136](https://github.com/grafana/grafana/issues/1136). Graph: Fix to legend value Max and negative values +- [Issue #1150](https://github.com/grafana/grafana/issues/1150). SinglestatPanel: Fixed absolute drilldown link issue # 1.9.0-rc1 (2014-11-17) diff --git a/src/app/panels/singlestat/singleStatPanel.js b/src/app/panels/singlestat/singleStatPanel.js index 6ac830d9e00..f3b0d946430 100644 --- a/src/app/panels/singlestat/singleStatPanel.js +++ b/src/app/panels/singlestat/singleStatPanel.js @@ -186,7 +186,13 @@ function (angular, app, _, $) { var linkInfo = linkSrv.getPanelLinkAnchorInfo(panel.links[0]); if (linkInfo.href[0] === '#') { linkInfo.href = linkInfo.href.substring(1); } - $timeout(function() { $location.url(linkInfo.href); }); + if (linkInfo.href.indexOf('http') === 0) { + window.location.href = linkInfo.href; + } else { + $timeout(function() { + $location.url(linkInfo.href); + }); + } drilldownTooltip.detach(); });