import org.sonar.plugins.core.widgets.issues.ActionPlansWidget;
import org.sonar.plugins.core.widgets.issues.FalsePositiveIssuesWidget;
import org.sonar.plugins.core.widgets.issues.IssueFilterWidget;
+import org.sonar.plugins.core.widgets.issues.IssueTagCloudWidget;
import org.sonar.plugins.core.widgets.issues.IssuesWidget;
import org.sonar.plugins.core.widgets.issues.MyUnresolvedIssuesWidget;
import org.sonar.plugins.core.widgets.issues.UnresolvedIssuesPerAssigneeWidget;
UnresolvedIssuesPerAssigneeWidget.class,
UnresolvedIssuesStatusesWidget.class,
IssueFilterWidget.class,
+ IssueTagCloudWidget.class,
org.sonar.api.issue.NoSonarFilter.class,
// issue notifications
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.plugins.core.widgets.issues;
+
+import org.sonar.api.web.WidgetCategory;
+import org.sonar.api.web.WidgetProperties;
+import org.sonar.api.web.WidgetProperty;
+import org.sonar.api.web.WidgetPropertyType;
+import org.sonar.api.web.WidgetScope;
+import org.sonar.plugins.core.widgets.CoreWidget;
+
+import static org.sonar.api.web.WidgetScope.PROJECT;
+
+@WidgetCategory({"Issues"})
+@WidgetScope(PROJECT)
+@WidgetProperties({
+ @WidgetProperty(key = "maxItems", type = WidgetPropertyType.INTEGER, defaultValue = "100")
+})
+public class IssueTagCloudWidget extends CoreWidget {
+
+ public IssueTagCloudWidget() {
+ super("issue_tag_cloud", "Issue Tag Cloud", "/org/sonar/plugins/core/widgets/issues/issue_tag_cloud.html.erb");
+ }
+
+}
--- /dev/null
+<%
+ containerId = 'issue-tag-cloud' + widget.id.to_s
+ maxItems = widget_properties['maxItems'].to_i
+
+ if current_user && has_role?(:user, @project)
+ search_options = {}
+ if @project
+ search_options['componentUuids'] = @project.uuid
+ end
+ search_options['resolved'] = 'false'
+
+ title = message('widget.issue_tag_cloud.name')
+%>
+
+<div class="histogram-widget" id="<%= containerId %>">
+ <!--[if lte IE 8 ]> <h3><%= message('widget.unsupported_browser_warning') -%></h3> <![endif]-->
+</div>
+
+<!--[if (gte IE 9)|!(IE)]><!-->
+<script>
+ (function () {
+ var query = [
+ 'componentUuid=<%= @project.uuid() -%>',
+ 'ps=<%= maxItems -%>'
+ ].join('&'),
+ widget = new SonarWidgets.Widget();
+
+ widget
+ .type('TagCloud')
+ .source(baseUrl + '/api/issues/component_tags?' + query)
+ .options({
+ maxItemsReachedMessage: '<%= message("widget.measure_filter_histogram.max_items_reached", :params => [maxItems]) -%>',
+ baseUrl: baseUrl + '/issues/search/#componentUuids=<%= @project.uuid() -%>',
+ noData: '<%= message('no_data') -%>'
+ })
+ .render('#<%= containerId -%>');
+
+ autoResize(500, function() {
+ widget.update('#<%= containerId -%>');
+ });
+ })();
+</script>
+<!--<![endif]-->
+<% end %>
widget.issue_filter.property.displayFilterDescription.name=Display Filter Description
widget.issue_filter.unknown_filter_warning=This widget is configured to display an issue filter that doesn't exist anymore.
+widget.issue_tag_cloud.name=Issue Tag Cloud
+widget.issue_tag_cloud.description=Displays the cloud of tags associated to unresolved issues.
+widget.issue_tag_cloud.property.maxItems.name=Max Tags
+widget.issue_tag_cloud.property.maxItems.desc=Maximum number of tags to show
+
widget.treemap-widget.name=Treemap of Components
widget.treemap-widget.description=Displays a treemap of all direct components of the selected resource.
widget.treemap-widget.property.sizeMetric.name=Size Metric