diff options
author | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2015-02-11 16:04:12 +0100 |
---|---|---|
committer | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2015-02-11 16:55:31 +0100 |
commit | e82eb1c5db9efdc46af6d8f4ebf15d6a1cc2e888 (patch) | |
tree | 4f531397f755de100c286e496d0a2f3e61e5ad42 /plugins | |
parent | 804d9277a03a85d6731b0b4c04a8991c781f0f1d (diff) | |
download | sonarqube-e82eb1c5db9efdc46af6d8f4ebf15d6a1cc2e888.tar.gz sonarqube-e82eb1c5db9efdc46af6d8f4ebf15d6a1cc2e888.zip |
SONAR-4400 Issue tag cloud widget handles differential periods
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issue_tag_cloud.html.erb | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issue_tag_cloud.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issue_tag_cloud.html.erb index 9638db45121..99012a289e5 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issue_tag_cloud.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issue_tag_cloud.html.erb @@ -3,11 +3,15 @@ maxItems = widget_properties['maxItems'].to_i if has_role?(:user, @project) && !Internal.issues.listTagsForComponent(@project.uuid, maxItems).isEmpty() - search_options = {} + search_options = { + 'resolved' => 'false' + } if @project search_options['componentUuids'] = @project.uuid end - search_options['resolved'] = 'false' + if @dashboard_configuration.selected_period? + search_options['createdAfter'] = @snapshot.period_datetime(@dashboard_configuration.period_index).strftime('%FT%T%z') + end title = message('widget.issue_tag_cloud.title') %> @@ -24,10 +28,17 @@ <!--[if (gte IE 9)|!(IE)]><!--> <script> (function () { - var query = [ + var createdAfter = ''; + <% if @dashboard_configuration.selected_period? -%> + createdAfter = moment('<%= search_options['createdAfter'] -%>').format('YYYY-MM-DD'); + <% end -%> + + var queryParams = [ 'componentUuid=<%= @project.uuid() -%>', - 'ps=<%= maxItems -%>' - ].join('&'), + 'ps=<%= maxItems -%>', + 'createdAfter=' + createdAfter + ], + query = queryParams.join('&'), widget = new SonarWidgets.Widget(); widget @@ -36,7 +47,8 @@ .options({ maxItemsReachedMessage: '<%= message("widget.measure_filter_histogram.max_items_reached", :params => [maxItems]) -%>', baseUrl: baseUrl + '/component_issues/index?id=<%= @project.key -%>#resolved=false', - noData: '<%= message('no_data') -%>' + noData: '<%= message('no_data') -%>', + createdAfter: createdAfter }) .render('#<%= containerId -%>'); |