From 9422c6fb84408d764d09b3802911f932cc0fcc61 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 11 Dec 2014 13:44:31 +0100 Subject: [PATCH] Remove unused ruby files (issues2 MVC) --- .../app/controllers/issues2_controller.rb | 75 ----- .../webapp/WEB-INF/app/models/navigation.rb | 1 - .../views/issues2/_bulk_change_form.html.erb | 161 ----------- .../views/issues2/_filter_copy_form.html.erb | 20 -- .../views/issues2/_filter_edit_form.html.erb | 20 -- .../views/issues2/_filter_favourites.html.erb | 9 - .../issues2/_filter_save_as_form.html.erb | 20 -- .../issues2/_filter_shared_form.html.erb | 33 --- .../WEB-INF/app/views/issues2/_list.html.erb | 126 --------- .../app/views/issues2/_operations.html.erb | 53 ---- .../views/issues2/_operations_ajax.html.erb | 12 - .../app/views/issues2/_search.html.erb | 4 - .../app/views/issues2/_search_ajax.html.erb | 10 - .../WEB-INF/app/views/issues2/manage.html.erb | 149 ---------- .../WEB-INF/app/views/issues2/search.html.erb | 257 ------------------ 15 files changed, 950 deletions(-) delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/issues2_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_bulk_change_form.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_copy_form.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_edit_form.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_favourites.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_save_as_form.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_shared_form.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_list.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_operations.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_operations_ajax.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_search.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_search_ajax.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/manage.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/search.html.erb diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/issues2_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/issues2_controller.rb deleted file mode 100644 index 9cc713e267c..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/issues2_controller.rb +++ /dev/null @@ -1,75 +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. -# -require 'set' - -class Issues2Controller < ApplicationController - - SECTION=Navigation::SECTION_ISSUES2 - - before_filter :init_options - before_filter :load_fav_filters, :only => [:index, :search, :search2, :filter, :manage, :favourites, :toggle_fav] - - PAGE_SIZE = 100 - - # GET /issues/index - def index - redirect_to :action => 'search' - end - - # GET /issues/search - def search - - end - - private - - def init_options - @options_for_statuses = Internal.issues.listStatus().map { |s| [message('issue.status.' + s), s] } - @options_for_resolutions = Internal.issues.listResolutions().map { |s| [message('issue.resolution.' + s), s] } - end - - def load_fav_filters - @favourite_filters = Internal.issues.findFavouriteIssueFiltersForCurrentUser() if logged_in? - end - - def find_filter(id) - Internal.issues.findIssueFilter(id) - end - - def criteria_params - new_params = params.clone - new_params.delete('controller') - new_params.delete('action') - new_params - end - - def init_params - params['pageSize'] = PAGE_SIZE unless request.xhr? - end - - def issues_query_params_sanitized - Internal.issues.sanitizeFilterQuery(params).to_hash - end - - def issues_query_params_from_filter(filter) - Internal.issues.deserializeFilterQuery(filter).to_hash - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/models/navigation.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/models/navigation.rb index 7c709252329..4b690d90178 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/models/navigation.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/models/navigation.rb @@ -32,7 +32,6 @@ class Navigation SECTION_RESOURCE_CONFIGURATION = Navigation.new('resource_configuration', true) SECTION_SESSION = Navigation.new('session', true) SECTION_ISSUES = Navigation.new('issues', false) - SECTION_ISSUES2 = Navigation.new('issues2', false) SECTION_MEASURES = Navigation.new('measures', false) SECTION_QUALITY_PROFILES = Navigation.new('quality_profiles', false) SECTION_QUALITY_GATES = Navigation.new('quality_gates', false) diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_bulk_change_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_bulk_change_form.html.erb deleted file mode 100644 index 3802a05e99d..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_bulk_change_form.html.erb +++ /dev/null @@ -1,161 +0,0 @@ -<% - project_uuid = @projectUuids.to_a.first if !@projectUuids.empty? && @projectUuids.to_a.size == 1 - project_key = Internal.component_api.findByUuid(project_uuid).key() if project_uuid - max_page_size_reached = @issues.size >= Internal.issues.maxPageSize() - - transitions_by_issues = {} - unresolved_issues = 0 - unresolved_issues_user_can_admin = 0 - at_least_one_issue_is_planned = false - at_least_one_issue_is_assigned = false - all_issues_are_assigned_to_current_user = true - @issues.each do |issue| - transitions = Internal.issues.listTransitions(issue) - transitions.each do |transition| - issues_for_transition = transitions_by_issues[transition.key] || 0 - issues_for_transition += 1 - transitions_by_issues[transition.key] = issues_for_transition - end - unresolved_issues += 1 unless issue.resolution() - if Java::OrgSonarServerUser::UserSession.get().hasProjectPermissionByUuid('issueadmin', issue.projectUuid) - unresolved_issues_user_can_admin += 1 unless issue.resolution() - end - at_least_one_issue_is_planned ||= issue.actionPlanKey() - at_least_one_issue_is_assigned ||= issue.assignee() - all_issues_are_assigned_to_current_user &&= issue.assignee() == current_user.login - end -%> -
- - -
- -
-
- diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_copy_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_copy_form.html.erb deleted file mode 100644 index ad34992b288..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_copy_form.html.erb +++ /dev/null @@ -1,20 +0,0 @@ -
- -
- - <%= render :partial => 'filter_shared_form' %> - -
-
- diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_edit_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_edit_form.html.erb deleted file mode 100644 index 650e7e19993..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_edit_form.html.erb +++ /dev/null @@ -1,20 +0,0 @@ -
- -
- - <%= render :partial => 'filter_shared_form', :locals => {:display_owner => true} %> - -
-
- diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_favourites.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_favourites.html.erb deleted file mode 100644 index 4c1f60180b8..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_favourites.html.erb +++ /dev/null @@ -1,9 +0,0 @@ -<% if logged_in? %> - { - <% @favourite_filters.each do |filter| %> - "<%= h filter.id -%>": "<%= escape_javascript filter.name -%>", - <% end %> - } -<% else %> - null -<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_save_as_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_save_as_form.html.erb deleted file mode 100644 index a771f24bd01..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_save_as_form.html.erb +++ /dev/null @@ -1,20 +0,0 @@ -
- -
- - <%= render :partial => 'filter_shared_form' %> - -
-
- diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_shared_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_shared_form.html.erb deleted file mode 100644 index 24c3891792a..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues2/_filter_shared_form.html.erb +++ /dev/null @@ -1,33 +0,0 @@ -<% if !local_assigns.has_key? :display_owner - display_owner = false - end %> -