From: Stas Vilchik Date: Tue, 17 Dec 2013 06:41:06 +0000 (+0600) Subject: SONAR-3762 Provide a new Histogram widget to display a measure filter X-Git-Tag: 4.2~948 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6cef42996c631d34e9dd8cd1ca3f0a57c643e1e0;p=sonarqube.git SONAR-3762 Provide a new Histogram widget to display a measure filter Show resource in the same window Open correct tab for files --- diff --git a/sonar-server/src/main/webapp/javascripts/widgets/histogram.js b/sonar-server/src/main/webapp/javascripts/widgets/histogram.js index 5398854750c..00a68e21366 100644 --- a/sonar-server/src/main/webapp/javascripts/widgets/histogram.js +++ b/sonar-server/src/main/webapp/javascripts/widgets/histogram.js @@ -274,7 +274,15 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets; }) .on('mouseleave', leaveHandler) .on('click', function(d) { - window.open(widget.options().baseUrl + encodeURIComponent(d.key)); + switch (d.data.qualifier) { + case 'CLA': + case 'FIL': + window.location = widget.options().baseUrl + encodeURIComponent(d.key) + + '?metric=' + encodeURIComponent(widget.mainMetric); + break; + default: + window.location = widget.options().baseUrl + encodeURIComponent(d.key); + } }); };