]> source.dussan.org Git - sonarqube.git/commitdiff
Bubble Chart: redirect to main project dashboard
authorStas Vilchik <vilchiks@gmail.com>
Thu, 9 Jan 2014 06:29:53 +0000 (12:29 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 9 Jan 2014 06:29:53 +0000 (12:29 +0600)
sonar-server/src/main/webapp/javascripts/widgets/bubble-chart.js

index 861d09a3616e4119b9c6d88a4f343c420f449e7f..2b2c1910e87db0afbe016f09897a5a138daae75d 100644 (file)
@@ -187,8 +187,15 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
     // Set event listeners
     this.items
         .on('click', function (d) {
-          var url = baseUrl + '/resource/index/' + d.key + '?display_title=true&metric=ncloc';
-          window.open(url, '', 'height=800,width=900,scrollbars=1,resizable=1');
+          switch (d.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);
+          }
         })
         .on('mouseenter', function (d) {
           d3.select(this).select('circle')