aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-core-plugin
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2014-11-06 12:24:44 +0100
committerStas Vilchik <vilchiks@gmail.com>2014-11-06 12:24:52 +0100
commit6deae83daebb117e8ae49b58c72fb0ce8d0043b7 (patch)
tree56d52e5f48b6f0bb2996175b38dc8302c7d8c54c /plugins/sonar-core-plugin
parentb7e3c205a224d06c418f1975693df36867684091 (diff)
downloadsonarqube-6deae83daebb117e8ae49b58c72fb0ce8d0043b7.tar.gz
sonarqube-6deae83daebb117e8ae49b58c72fb0ce8d0043b7.zip
SONAR-5718 Add module criteria, update widgets
Diffstat (limited to 'plugins/sonar-core-plugin')
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/action_plans.html.erb12
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/false_positive_issues.html.erb6
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/my_unresolved_issues.html.erb6
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_per_assignee.html.erb6
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_statuses.html.erb6
5 files changed, 31 insertions, 5 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/action_plans.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/action_plans.html.erb
index dab39e4846f..18fe4e3c186 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/action_plans.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/action_plans.html.erb
@@ -67,7 +67,17 @@
<% if unresolved_issues_size == 0 %>
<%= unresolved_issues_size -%>
<% else %>
- <a href="<%= url_for_issues({:actionPlans => plan.key, :resolved => 'false', :componentRoots => u(@project.key)}) -%>"
+ <%
+ search_options = {}
+ search_options['actionPlans'] = plan.key
+ search_options['resolved'] = false
+ if @project.qualifier == 'TRK'
+ search_options['projectUuids'] = @project.uuid
+ else
+ search_options['componentRootUuids'] = @project.uuid
+ end
+ %>
+ <a href="<%= url_for_issues(search_options) -%>"
title="<%= message('widget.action_plans.x_unresolved_issues', :params => unresolved_issues_size.to_s) -%>"><%= unresolved_issues_size -%></a>
<% end %>
</td>
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/false_positive_issues.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/false_positive_issues.html.erb
index cf6c4661fcc..0a33fb66901 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/false_positive_issues.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/false_positive_issues.html.erb
@@ -2,7 +2,11 @@
if has_role?(:user, @project)
search_options = {}
- search_options['componentRoots'] = @project.key
+ if @project.qualifier == 'TRK'
+ search_options['projectUuids'] = @project.uuid
+ else
+ search_options['componentRootUuids'] = @project.uuid
+ end
search_options['resolutions'] = 'FALSE-POSITIVE'
title = message('widget.false_positive_reviews.name')
%>
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/my_unresolved_issues.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/my_unresolved_issues.html.erb
index 8dd860ff7ac..5cf9c869f61 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/my_unresolved_issues.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/my_unresolved_issues.html.erb
@@ -2,7 +2,11 @@
if current_user && (!@project || has_role?(:user, @project))
search_options = {}
- search_options['projectUuids'] = @project.uuid if @project
+ if @project.qualifier == 'TRK'
+ search_options['projectUuids'] = @project.uuid
+ else
+ search_options['componentRootUuids'] = @project.uuid
+ end
search_options['resolved'] = 'false'
search_options['assignees'] = current_user.login
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_per_assignee.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_per_assignee.html.erb
index f7b61a024b3..bfae944e337 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_per_assignee.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_per_assignee.html.erb
@@ -1,7 +1,11 @@
<%
options = {}
options['resolved'] = 'false'
- options['projectUuids'] = @project.uuid
+ if @project.qualifier == 'TRK'
+ options['projectUuids'] = @project.uuid
+ else
+ options['componentRootUuids'] = @project.uuid
+ end
if @dashboard_configuration.selected_period?
options['createdAfter'] = Api::Utils.format_datetime(@dashboard_configuration.from_datetime)
options['createdBefore'] = Api::Utils.format_datetime(DateTime.now)
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_statuses.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_statuses.html.erb
index 0cd1a8d10ee..f620dcbe4e9 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_statuses.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_statuses.html.erb
@@ -6,7 +6,11 @@
issues_search_options = {}
issues_search_options['resolved'] = 'false'
- issues_search_options['projectUuids'] = @project.uuid
+ if @project.qualifier == 'TRK'
+ issues_search_options['projectUuids'] = @project.uuid
+ else
+ issues_search_options['componentRootUuids'] = @project.uuid
+ end
%>
<table width="100%">
<tr>