diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-06-26 13:59:04 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-06-26 14:37:29 +0200 |
commit | e176044c7e31951d338966ff48922ebb17676962 (patch) | |
tree | eb932855e35fd213b725263df9a8e5cb216b4b8d /plugins | |
parent | fa87ec377ff2f5facde2d57aa4c5eb5fb9f8f1de (diff) | |
download | sonarqube-e176044c7e31951d338966ff48922ebb17676962.tar.gz sonarqube-e176044c7e31951d338966ff48922ebb17676962.zip |
Remove unused core ruby source tabs
Diffstat (limited to 'plugins')
4 files changed, 0 insertions, 213 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java index 0b22c904e59..44e3b343aa0 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java @@ -81,7 +81,6 @@ import org.sonar.plugins.core.timemachine.NewOverallCoverageFileAnalyzer; import org.sonar.plugins.core.timemachine.TendencyDecorator; import org.sonar.plugins.core.timemachine.TimeMachineConfigurationPersister; import org.sonar.plugins.core.timemachine.VariationDecorator; -import org.sonar.plugins.core.web.TestsViewer; import org.sonar.plugins.core.widgets.AlertsWidget; import org.sonar.plugins.core.widgets.BubbleChartWidget; import org.sonar.plugins.core.widgets.ComplexityWidget; @@ -271,9 +270,6 @@ public final class CorePlugin extends SonarPlugin { UserManagedMetrics.class, Periods.class, - // pages - TestsViewer.class, - // measure filters ProjectFilter.class, MyFavouritesFilter.class, diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/web/TestsViewer.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/web/TestsViewer.java deleted file mode 100644 index 894c54fded7..00000000000 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/web/TestsViewer.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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.web; - -import org.sonar.api.measures.CoreMetrics; -import org.sonar.api.resources.Qualifiers; -import org.sonar.api.web.*; - -@ResourceQualifier(Qualifiers.UNIT_TEST_FILE) -@NavigationSection(NavigationSection.RESOURCE_TAB) -@DefaultTab(metrics = { - CoreMetrics.TESTS_KEY, CoreMetrics.TEST_EXECUTION_TIME_KEY, CoreMetrics.TEST_SUCCESS_DENSITY_KEY, - CoreMetrics.TEST_FAILURES_KEY, CoreMetrics.TEST_ERRORS_KEY, CoreMetrics.SKIPPED_TESTS_KEY}) -@UserRole(UserRole.USER) -public class TestsViewer extends AbstractRubyTemplate implements RubyRailsPage { - - public String getId() { - return "tests_viewer"; - } - - public String getTitle() { - return "Tests"; - } - - @Override - protected String getTemplatePath() { - return "/org/sonar/plugins/core/web/tests_viewer.html.erb"; - } -} diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/web/package-info.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/web/package-info.java deleted file mode 100644 index 09ed3e65f6b..00000000000 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/web/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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. - */ -@ParametersAreNonnullByDefault -package org.sonar.plugins.core.web; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/web/tests_viewer.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/web/tests_viewer.html.erb deleted file mode 100644 index 4314fded31d..00000000000 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/web/tests_viewer.html.erb +++ /dev/null @@ -1,140 +0,0 @@ -<div class="tab_header tests_viewer tests_header"> - <table> - <tr> - <% test_success_density = measure('test_success_density') %> - <td id="test_success_density" class=" big"><%= test_success_density ? number_with_precision(test_success_density.value(), :precision => 1) : "100.0" -%>%</td> - <td class="sep"></td> - <td class="name"><%= message('test_viewer.tests') -%>:</td> - <% - tests = measure('tests') - tests_display = tests ? format_measure(tests) : "-" - skipped_tests = measure('skipped_tests') - if skipped_tests - tests_display = tests_display + " (+" + format_measure(skipped_tests) + " " + message('test_viewer.skipped') + ")" - end - %> - <td id="tests" class="value"><%= tests_display -%></td> - <td class="sep"></td> - <td class="name"><%= message('test_viewer.failures') -%>/<%= message('test_viewer.errors') -%>:</td> - <% - test_failures = measure('test_failures') ? format_measure(measure('test_failures')) : "0" - test_errors = measure('test_errors') ? format_measure(measure('test_errors')) : "0" - %> - <td id="test_failures_errors" class="value"><%= test_failures -%>/<%= test_errors -%></td> - <td class="sep"></td> - <td class="name"><%= message('test_viewer.duration') -%>:</td> - <% test_execution_time = measure('test_execution_time') %> - <td id="test_execution_time" class="value"><%= test_execution_time ? format_measure(test_execution_time) : "-" -%></td> - </tr> - </table> -</div> - -<% - test_cases = [] - has_covered_lines = false - - test_data = measure('test_data') - if test_data - blocks = REXML::Document.new test_data.data - blocks.elements.each("tests-details/testcase") do |block| - test_case = {} - test_case[:name] = block.attributes['name'] - test_case[:status] = block.attributes['status'].upcase - test_case[:time] = block.attributes['time'] - - error = block.elements['error'] - block_message = !error.nil? ? error : nil - failure = block.elements['failure'] - block_message = !failure.nil? ? failure : block_message - test_case[:message] = block_message.attributes['message'] if block_message - test_case[:stack_trace] = block_message.first.to_s if test_case[:message] - test_cases << test_case - end - else - # New Test API - test_plan = controller.java_facade.testPlan(@snapshot.id) - if test_plan - test_plan.testCases().each do |test| - test_case = {} - test_case[:name] = test.name - test_case[:status] = test.status.name - test_case[:time] = test.durationInMs - has_covered_lines ||= test.doesCover - test_case[:covered_lines] = test.countCoveredLines if test.doesCover - if test.status().to_s != 'ok' - test_case[:message] = '' - test_case[:message] = test.message if test.message - test_case[:stack_trace] = html_escape(test.stackTrace) - end - test_cases << test_case - end - end - end - test_cases = test_cases.sort_by { |test_case| test_case[:name] } -%> -<% if !test_cases.empty? %> - <table class="data width100 tests_viewer" id="test_data"> - <thead class="tests-viewer-head"> - <tr> - <th class="thin"> </th> - <th class="thin right"><%= message('test_viewer.duration') -%></th> - <% if has_covered_lines %> - <th class="thin" nowrap><%= message('test_viewer.covered_lines') -%></th> - <% end %> - <th><%= message('test_viewer.unit_test_name') -%></th> - </tr> - </thead> - <tbody class="tests-viewer-body"> - - <% - test_cases.each_with_index do |test_case, index| - %> - <tr class="<%= cycle("even", "odd") -%> testdata_<%= index -%>" display="table-row"> - <td class="thin" nowrap> - <img id="test_status_<%= index -%>_<%= test_case[:status] -%>" src="<%= ApplicationController.root_context + "/images/test/" + test_case[:status] + ".png" -%>"/> - </td> - <td id="test_time_<%= index -%>" class="thin right" nowrap><%= test_case[:time] -%> ms</td> - <% if has_covered_lines %> - <td id="test_covered_lines_<%= index -%>" class="test-covered-lines-<%= index -%>" class="thin right" nowrap> - <a id="test_covered_lines_link_<%= index -%>" class="test-overed-lines-link-<%= index -%>" - href="<%= ApplicationController.root_context -%>/test/testcase/<%= h @snapshot.resource.key -%>?test=<%= test_case[:name] -%>" - onclick="openAccordionItem(this.href, this); return false;"><%= number_with_precision(test_case[:covered_lines], :precision => 0) -%> - </a> - </td> - <% end %> - <td> - <span class="test_name_<%= index -%>"> - <% name = test_case[:name] %> - <% if !test_case[:message].blank? || !test_case[:stack_trace].blank? %> - <a class="test_expandLink_<%= index -%>" href="#" onclick="expandTests(<%= index -%>, this);"><%= name -%></a> - <a class="test_collapseLink_<%= index -%>" class="collapse" href="#" onclick="collapseTests(<%= index -%>, this);" style="display: none;"><%= name -%></a> - <% else %> - <%= name -%> - <% end %> - </span> - - <% if !test_case[:message].blank? || !test_case[:stack_trace].blank? %> - <div class="test_message_<%= index -%> message" style="display:none; margin-top:5px;"> - <% message = test_case[:message] %> - <% if !message.nil? %> - <span><%= h message -%></span> - <% end %> - <pre style="border: 1px solid #ddd; padding: 5px; margin: 5px 0"><%= test_case[:stack_trace] -%></pre> - </div> - <% end %> - </td> - </tr> - - <% - end - %> - </tbody> - </table> - -<% - else -%> - <p><%= message('no_data') -%></p> -<% - end -%>
\ No newline at end of file |