From 6d5fd08094fc87c6678f7f3f6420846f0db4abf6 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Thu, 8 Dec 2016 09:59:07 +0100 Subject: [PATCH] drop unused ruby views and controllers (#1438) --- .../app/controllers/about_controller.rb | 27 -- .../app/controllers/account_controller.rb | 118 --------- .../background_tasks_controller.rb | 32 --- .../app/controllers/code_controller.rb | 29 --- .../controllers/coding_rules_controller.rb | 30 --- .../app/controllers/component_controller.rb | 49 ---- .../component_issues_controller.rb | 33 --- .../component_measures_controller.rb | 28 --- .../app/controllers/confirm_controller.rb | 27 -- .../controllers/custom_measures_controller.rb | 29 --- .../app/controllers/dashboard_controller.rb | 65 ----- .../app/controllers/drilldown_controller.rb | 41 ---- .../email_configuration_controller.rb | 77 ------ .../app/controllers/favourites_controller.rb | 40 --- .../app/controllers/groups_controller.rb | 29 --- .../app/controllers/issues_controller.rb | 73 ------ .../app/controllers/landing_controller.rb | 31 --- .../app/controllers/maintenance_controller.rb | 28 --- .../app/controllers/markdown_controller.rb | 32 --- .../app/controllers/metrics_controller.rb | 30 --- .../app/controllers/overview_controller.rb | 29 --- .../permission_templates_controller.rb | 29 --- .../app/controllers/profiles_controller.rb | 64 ----- .../app/controllers/project_controller.rb | 232 ------------------ .../controllers/project_roles_controller.rb | 29 --- .../controllers/projects_admin_controller.rb | 30 --- .../app/controllers/projects_controller.rb | 30 --- .../controllers/property_sets_controller.rb | 30 --- .../controllers/quality_gates_controller.rb | 30 --- .../app/controllers/resource_controller.rb | 40 --- .../app/controllers/roles_controller.rb | 29 --- .../rules_configuration_controller.rb | 32 --- .../app/controllers/rules_controller.rb | 40 --- .../app/controllers/sessions_controller.rb | 66 ----- .../app/controllers/settings_controller.rb | 39 --- .../app/controllers/setup_controller.rb | 29 --- .../app/controllers/system_controller.rb | 29 --- .../controllers/updatecenter_controller.rb | 44 ---- .../app/controllers/users_controller.rb | 64 ----- .../controllers/view_projects_controller.rb | 29 --- .../app/controllers/web_api_controller.rb | 28 --- .../WEB-INF/app/views/about/index.html.erb | 18 -- .../app/views/account/_favorites.html.erb | 24 -- .../account/_global_notifications.html.erb | 31 --- .../_per_project_notifications.html.erb | 57 ----- .../WEB-INF/app/views/account/index.html.erb | 75 ------ .../views/api_documentation/index.html.erb | 6 - .../app/views/background_tasks/index.html.erb | 0 .../app/views/branding/_footer.html.erb | 6 - .../WEB-INF/app/views/code/index.html.erb | 0 .../app/views/coding_rules/index.html.erb | 0 .../app/views/component/index.html.erb | 18 -- .../app/views/component_issues/index.html.erb | 12 - .../views/component_measures/index.html.erb | 0 .../app/views/configuration/index.rhtml | 4 - .../app/views/confirm/_confirm.html.erb | 23 -- .../app/views/custom_measures/index.html.erb | 5 - .../app/views/dashboard/empty.html.erb | 11 - .../app/views/dashboard/no_dashboard.html.erb | 13 - .../app/views/dashboard/overview.html.erb | 83 ------- .../app/views/dashboards/index.html.erb | 20 -- .../app/views/drilldown/issues.html.erb | 22 -- .../views/email_configuration/index.html.erb | 94 ------- .../WEB-INF/app/views/groups/index.html.erb | 0 .../views/issues/_bulk_change_form.html.erb | 177 ------------- .../WEB-INF/app/views/issues/index.html.erb | 0 .../app/views/layouts/_footer.html.erb | 31 --- .../WEB-INF/app/views/layouts/_head.html.erb | 47 ---- .../app/views/layouts/_iframe.html.erb | 7 - .../app/views/layouts/_layout.html.erb | 64 ----- .../app/views/layouts/_navbar.html.erb | 23 -- .../app/views/layouts/_nolayout.html.erb | 17 -- .../app/views/layouts/application.html.erb | 19 -- .../WEB-INF/app/views/layouts/nonav.html.erb | 42 ---- .../app/views/maintenance/index.html.erb | 0 .../WEB-INF/app/views/markdown/_tips.html.erb | 4 - .../WEB-INF/app/views/markdown/help.html.erb | 102 -------- .../WEB-INF/app/views/metrics/index.html.erb | 0 .../views/permission_templates/index.html.erb | 0 .../WEB-INF/app/views/plugins/rails_page.erb | 1 - .../WEB-INF/app/views/profiles/index.html.erb | 0 .../views/project/_snapshot_title.html.erb | 11 - .../views/project/background_tasks.html.erb | 0 .../app/views/project/deletion.html.erb | 0 .../app/views/project/history.html.erb | 173 ------------- .../WEB-INF/app/views/project/index.html.erb | 0 .../WEB-INF/app/views/project/key.html.erb | 0 .../WEB-INF/app/views/project/links.html.erb | 0 .../app/views/project/profile.html.erb | 45 ---- .../app/views/project/quality_gate.html.erb | 0 .../views/project/quality_profiles.html.erb | 0 .../app/views/project/settings.html.erb | 0 .../app/views/project_roles/index.html.erb | 0 .../WEB-INF/app/views/projects/index.html.erb | 0 .../app/views/projects_admin/index.html.erb | 0 .../app/views/property_sets/_list.html.erb | 22 -- .../app/views/quality_gates/index.html.erb | 0 .../WEB-INF/app/views/roles/global.html.erb | 0 .../WEB-INF/app/views/sessions/_form.html.erb | 95 ------- .../WEB-INF/app/views/sessions/login.html.erb | 1 - .../WEB-INF/app/views/sessions/new.html.erb | 1 - .../app/views/sessions/unauthorized.html.erb | 15 -- .../WEB-INF/app/views/settings/index.html.erb | 0 .../WEB-INF/app/views/setup/index.html.erb | 0 .../app/views/shared/_no_issues.html.erb | 4 - .../views/shared/_result_messages.html.erb | 5 - .../WEB-INF/app/views/system/index.html.erb | 0 .../app/views/updatecenter/index.html.erb | 0 .../WEB-INF/app/views/users/index.html.erb | 0 .../WEB-INF/app/views/users/new.html.erb | 44 ---- .../views/utils/_tfoot_pagination.html.erb | 4 - .../app/views/view_projects/index.html.erb | 3 - .../WEB-INF/app/views/web_api/index.html.erb | 0 .../src/main/webapp/WEB-INF/config/routes.rb | 15 -- 114 files changed, 3314 deletions(-) delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/about_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/account_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/background_tasks_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/code_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/coding_rules_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/component_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/component_issues_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/component_measures_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/confirm_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/custom_measures_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/drilldown_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/email_configuration_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/favourites_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/groups_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/issues_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/landing_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/maintenance_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/markdown_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/metrics_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/overview_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/permission_templates_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_roles_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/projects_admin_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/projects_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/property_sets_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/quality_gates_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/sessions_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/setup_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/system_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/users_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/view_projects_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/controllers/web_api_controller.rb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/about/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_favorites.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_global_notifications.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_per_project_notifications.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/account/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/api_documentation/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/background_tasks/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/branding/_footer.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/code/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/coding_rules/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/component/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/component_issues/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/component_measures/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/configuration/index.rhtml delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/confirm/_confirm.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/custom_measures/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/empty.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/overview.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/drilldown/issues.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/groups/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_bulk_change_form.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_footer.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_iframe.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_nolayout.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/application.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/nonav.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/maintenance/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/markdown/_tips.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/markdown/help.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/metrics/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/permission_templates/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/plugins/rails_page.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/project/_snapshot_title.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/project/background_tasks.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/project/deletion.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/project/history.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/project/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/project/key.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/project/links.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/project/profile.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/project/quality_gate.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/project/quality_profiles.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/project/settings.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/project_roles/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/projects/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/projects_admin/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/property_sets/_list.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/quality_gates/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/global.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/_form.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/login.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/new.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/unauthorized.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/setup/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/shared/_no_issues.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/shared/_result_messages.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/system/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/users/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/users/new.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/utils/_tfoot_pagination.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/view_projects/index.html.erb delete mode 100644 server/sonar-web/src/main/webapp/WEB-INF/app/views/web_api/index.html.erb diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/about_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/about_controller.rb deleted file mode 100644 index 5fcb51d0469..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/about_controller.rb +++ /dev/null @@ -1,27 +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. -# - -class AboutController < ApplicationController - - def index - - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/account_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/account_controller.rb deleted file mode 100644 index 7851dd89c8f..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/account_controller.rb +++ /dev/null @@ -1,118 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class AccountController < ApplicationController - - before_filter :login_required - - def index - @channels = notification_service.getChannels() - @global_dispatchers = dispatchers_for_scope("globalNotification") - @per_project_dispatchers = dispatchers_for_scope("perProjectNotification") - - @global_notifications = {} - @per_project_notifications = {} - load_notification_properties - - if params[:new_project] - new_project = Project.by_key params[:new_project] - unless @per_project_notifications[new_project.id] - @per_project_notifications[new_project.id] = init_project_notifications - @new_project_id = new_project.id - end - @selected_project_id = new_project.id - end - end - - def update_notifications - verify_post_request - # Global notifs - global_notifs = params[:global_notifs] - Property.delete_all(['prop_key like ? AND user_id = ? AND resource_id IS NULL', 'notification.%', current_user.id]) - global_notifs.each_key { |key| Api::Utils.java_facade.saveProperty('notification.' + key, nil, current_user.id, 'true') } if global_notifs - - # Per project notifs - project_notifs = params[:project_notifs] - Property.delete_all(['prop_key like ? AND user_id = ? AND resource_id IS NOT NULL', 'notification.%', current_user.id]) - if project_notifs - project_notifs.each do |r_id, per_project_notif| - per_project_notif.each do |dispatch, channels| - channels.each do |channel, value| - Api::Utils.java_facade.saveProperty('notification.' + dispatch + '.' + channel, r_id.to_i, current_user.id, 'true') - end - end - end - end - - redirect_to "#{ApplicationController.root_context}/account/notifications/" - end - - private - - def notification_service - java_facade.getCoreComponentByClassname('org.sonar.server.notification.NotificationCenter') - end - - def dispatchers_for_scope(scope) - notification_service.getDispatcherKeysForProperty(scope, "true").to_a.sort {|x,y| dispatcher_name(x) <=> dispatcher_name(y)} - end - - def dispatcher_name(dispatcher_key) - Api::Utils.message('notification.dispatcher.' + dispatcher_key) - end - - def load_notification_properties - channel_keys = @channels.map {|c| c.getKey()} - - Property.find(:all, :conditions => ['prop_key like ? AND user_id = ?', 'notification.%', current_user.id]).each do |property| - r_id = property.resource_id - if r_id - # This is a per-project notif - parts = property.key.split('.') - dispatcher_key = parts[1] - channel_key = parts[2] - if @per_project_dispatchers.include?(dispatcher_key) && channel_keys.include?(channel_key) - project_notifs = get_project_notifications(r_id) - project_notifs[dispatcher_key] << channel_key - end - else - # This is a global notif - @global_notifications[property.key.sub('notification.', '')] = true - end - end - end - - def get_project_notifications(resource_id) - project_notifs = @per_project_notifications[resource_id] - unless project_notifs - project_notifs = init_project_notifications - @per_project_notifications[resource_id] = project_notifs - end - project_notifs - end - - def init_project_notifications - project_notifs = {} - @per_project_dispatchers.each do |dispatcher| - project_notifs[dispatcher] = [] - end - project_notifs - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/background_tasks_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/background_tasks_controller.rb deleted file mode 100644 index 084240d61b0..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/background_tasks_controller.rb +++ /dev/null @@ -1,32 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# - -class BackgroundTasksController < ApplicationController - - before_filter :admin_required - - SECTION=Navigation::SECTION_CONFIGURATION - - def index - - end - - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/code_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/code_controller.rb deleted file mode 100644 index 033b0e983bd..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/code_controller.rb +++ /dev/null @@ -1,29 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class CodeController < ApplicationController - before_filter :init_resource_for_user_role - - SECTION=Navigation::SECTION_RESOURCE - - def index - - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/coding_rules_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/coding_rules_controller.rb deleted file mode 100644 index 9cf4c2607e4..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/coding_rules_controller.rb +++ /dev/null @@ -1,30 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# - -class CodingRulesController < ApplicationController - - SECTION=Navigation::SECTION_CODING_RULES - - # GET /coding_rules/index - def index - - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/component_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/component_controller.rb deleted file mode 100644 index 54490d04949..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/component_controller.rb +++ /dev/null @@ -1,49 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class ComponentController < ApplicationController - - SECTION=Navigation::SECTION_RESOURCE - - def index - if params[:id] - @resource=Project.by_key(params[:id]) - return project_not_found unless @resource - @resource=@resource.permanent_resource - end - - @line = params[:line] - - if request.xhr? - render :action => 'index' - else - # popup mode, title will always be displayed - params[:layout] = 'false' - render :action => 'index' - end - end - - private - - def project_not_found - flash[:error] = message('dashboard.project_not_found') - redirect_to :controller => 'dashboard', :action => 'index' - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/component_issues_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/component_issues_controller.rb deleted file mode 100644 index 9b5a582d03a..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/component_issues_controller.rb +++ /dev/null @@ -1,33 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class ComponentIssuesController < ApplicationController - before_filter :init_resource_for_user_role - - SECTION=Navigation::SECTION_RESOURCE - - def index - if params[:period].present? && params[:period].to_i>0 - @period=params[:period].to_i - else - @period=nil - end - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/component_measures_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/component_measures_controller.rb deleted file mode 100644 index ff17773d070..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/component_measures_controller.rb +++ /dev/null @@ -1,28 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class ComponentMeasuresController < ApplicationController - before_filter :init_resource_for_user_role - - SECTION=Navigation::SECTION_RESOURCE - - def index - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/confirm_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/confirm_controller.rb deleted file mode 100644 index ab3f18acaa5..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/confirm_controller.rb +++ /dev/null @@ -1,27 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class ConfirmController < ApplicationController - - # GET /confirm?url=[&tk= 'confirm/confirm' - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/custom_measures_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/custom_measures_controller.rb deleted file mode 100644 index 76b456e361d..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/custom_measures_controller.rb +++ /dev/null @@ -1,29 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class CustomMeasuresController < ApplicationController - - SECTION=Navigation::SECTION_RESOURCE - before_filter :init_resource_for_admin_role - - def index - - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb deleted file mode 100644 index 5d9e1d37613..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb +++ /dev/null @@ -1,65 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -include ERB::Util -class DashboardController < ApplicationController - - SECTION=Navigation::SECTION_RESOURCE - - def index - @resource = Project.by_key(params[:id]) - return project_not_found unless @resource - @resource = @resource.permanent_resource - - access_denied unless has_role?(:user, @resource) - - # for backward compatibility with old widgets - @project = @resource - - # if file - if !@resource.display_dashboard? - @snapshot = @resource.last_snapshot - return project_not_analyzed unless @snapshot - @hide_sidebar = true - @file = @resource - @project = @resource.root_project - @metric=params[:metric] - render :action => 'no_dashboard' - else - # it is a project dashboard - # if governance plugin is installed and we are opening a view - if Project.root_qualifiers.include?('VW') && (@resource.qualifier == 'VW' || @resource.qualifier == 'SVW') - return redirect_to(url_for({:controller => 'governance'}) + '?id=' + url_encode(params[:id])) - else - @snapshot = @resource.last_snapshot - render :action => 'overview' - end - end - end - - private - - def project_not_found - raise ActionController::RoutingError.new('Not Found') - end - - def project_not_analyzed - render :action => 'empty' - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/drilldown_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/drilldown_controller.rb deleted file mode 100644 index 1122d163b1b..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/drilldown_controller.rb +++ /dev/null @@ -1,41 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class DrilldownController < ApplicationController - before_filter :init_resource_for_user_role - - SECTION=Navigation::SECTION_RESOURCE - - def measures - metric = params[:metric] || 'ncloc' - period = params[:period].to_i if params[:period].present? && params[:period].to_i > 0 - if period - return redirect_to(ApplicationController.root_context + "/component_measures/metric/#{metric}?id=#{url_encode(@resource.key)}&period=#{period}") - else - return redirect_to(ApplicationController.root_context + "/component_measures/metric/#{metric}?id=#{url_encode(@resource.key)}") - end - end - - def issues - @rule=Rule.by_key_or_id(params[:rule]) - @period=params[:period].to_i if params[:period].present? && params[:period].to_i>0 - @severity = params[:severity] - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/email_configuration_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/email_configuration_controller.rb deleted file mode 100644 index 7711fa43503..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/email_configuration_controller.rb +++ /dev/null @@ -1,77 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class EmailConfigurationController < ApplicationController - - SECTION=Navigation::SECTION_CONFIGURATION - before_filter :admin_required - - def index - @smtp_host = Property.value(configuration::SMTP_HOST, nil, configuration::SMTP_HOST_DEFAULT) - @smtp_port = Property.value(configuration::SMTP_PORT, nil, configuration::SMTP_PORT_DEFAULT) - @smtp_secure_connection = Property.value(configuration::SMTP_SECURE_CONNECTION, nil, configuration::SMTP_SECURE_CONNECTION) - @smtp_username = Property.value(configuration::SMTP_USERNAME, nil, configuration::SMTP_USERNAME_DEFAULT) - @smtp_password = Property.value(configuration::SMTP_PASSWORD, nil, configuration::SMTP_PASSWORD_DEFAULT) - @email_from = Property.value(configuration::FROM, nil, configuration::FROM_DEFAULT) - @email_prefix = Property.value(configuration::PREFIX, nil, configuration::PREFIX_DEFAULT) - @server_base_url = Property.value(properties::SERVER_BASE_URL, nil, properties::SERVER_BASE_URL_DEFAULT_VALUE) - params[:layout]='false' - end - - def save - Property.set(configuration::SMTP_HOST, params[:smtp_host]) - Property.set(configuration::SMTP_PORT, params[:smtp_port]) - Property.set(configuration::SMTP_SECURE_CONNECTION, params[:smtp_secure_connection]) - Property.set(configuration::SMTP_USERNAME, params[:smtp_username]) - # Do not update password that wasn't updated - Property.set(configuration::SMTP_PASSWORD, params[:smtp_password]) unless params[:smtp_password] == Property::EXISTING_PASSWORD - Property.set(configuration::FROM, params[:email_from]) - Property.set(configuration::PREFIX, params[:email_prefix]) - flash[:notice] = message('email_configuration.settings_saved') - redirect_to :action => 'index' - end - - def send_test_email - to_address = params[:to_address] - subject = params[:subject] - message = params[:message] - if to_address.blank? - flash[:error] = message('email_configuration.test.to_address_required') - else - begin - java_facade.getCoreComponentByClassname('org.sonar.server.notification.email.EmailNotificationChannel').sendTestEmail(to_address, subject, message) - flash[:notice] = message('email_configuration.test.email_was_sent_to_x', :params => [to_address]) - rescue Exception => e - flash[:error] = e.message - end - end - redirect_to :action => 'index' - end - - private - - def configuration - java_facade.getCoreComponentByClassname('org.sonar.api.config.EmailSettings').class - end - - def properties - Java::OrgSonarApi::CoreProperties - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/favourites_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/favourites_controller.rb deleted file mode 100644 index 8cbb258d0f1..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/favourites_controller.rb +++ /dev/null @@ -1,40 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class FavouritesController < ApplicationController - - before_filter :login_required - - def toggle - favourite_id=params[:id] - - if current_user.favourite?(favourite_id) - current_user.delete_favourite(favourite_id) - css='icon-not-favorite' - title=message('click_to_add_to_favorites') - else - current_user.add_favourite(favourite_id) - css='icon-favorite' - title=message('click_to_remove_from_favorites') - end - - render :json => {:css => css, :title => title}, :status => 200 - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/groups_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/groups_controller.rb deleted file mode 100644 index 0b7ba6dccc7..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/groups_controller.rb +++ /dev/null @@ -1,29 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class GroupsController < ApplicationController - - SECTION=Navigation::SECTION_CONFIGURATION - before_filter :admin_required - - def index - - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/issues_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/issues_controller.rb deleted file mode 100644 index c128815bf59..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/issues_controller.rb +++ /dev/null @@ -1,73 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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 IssuesController < ApplicationController - - SECTION=Navigation::SECTION_ISSUES - - # GET /issues/index - def index - - end - - # GET /issues/search - def search - redirect_to :action => 'index' - end - - def show - # the redirect is needed for the backward compatibility with eclipse plugin - redirect_to :action => 'search', :anchor => 'issues=' + params[:id] - end - - # GET /issues/bulk_change_form?[&criteria] - def bulk_change_form - access_denied unless logged_in? - - issues_query_params = criteria_params.clone.merge({'pageSize' => -1}) - # SONAR-4654 pagination parameters should be remove when loading issues for bulk change - issues_query_params.delete('pageIndex') - @issues = Internal.issues.execute(issues_query_params) - - @projectUuids = Set.new(@issues.map {|issue| issue.projectUuid()}) - @tags = Internal.issues.listTags() - - render :partial => 'issues/bulk_change_form' - end - - # POST /issues/bulk_change?criteria - def bulk_change - verify_post_request - Internal.issues.bulkChange(params, params[:comment], params[:sendNotifications] == 'true') - render :text => '', :status => 200 - end - - - private - - def criteria_params - new_params = params.clone - new_params.delete('controller') - new_params.delete('action') - new_params - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/landing_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/landing_controller.rb deleted file mode 100644 index 878e8669742..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/landing_controller.rb +++ /dev/null @@ -1,31 +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. -# - -class LandingController < ApplicationController - - def index - if logged_in? - return redirect_to :controller => 'projects', :action => 'favorite' - else - return redirect_to :controller => 'about' - end - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/maintenance_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/maintenance_controller.rb deleted file mode 100644 index 3af7f4669c0..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/maintenance_controller.rb +++ /dev/null @@ -1,28 +0,0 @@ - # - # SonarQube, open source software quality management tool. - # Copyright (C) 2008-2016 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. - # -class MaintenanceController < ApplicationController - skip_before_filter :check_database_version, :check_authentication - - SECTION=Navigation::SECTION_CONFIGURATION - - def index - render :template => "maintenance/index", :layout => 'nonav' - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/markdown_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/markdown_controller.rb deleted file mode 100644 index 3aa931a541f..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/markdown_controller.rb +++ /dev/null @@ -1,32 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class MarkdownController < ApplicationController - - SECTION=Navigation::SECTION_CONFIGURATION - - # just for speed optimization... - skip_before_filter :check_database_version, :check_authentication - - def help - params[:layout] = 'false' - render :action => 'help' - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/metrics_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/metrics_controller.rb deleted file mode 100644 index 3c8fcc8dc01..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/metrics_controller.rb +++ /dev/null @@ -1,30 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class MetricsController < ApplicationController - - before_filter :admin_required - - SECTION=Navigation::SECTION_CONFIGURATION - - def index - - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/overview_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/overview_controller.rb deleted file mode 100644 index b0b19617e9b..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/overview_controller.rb +++ /dev/null @@ -1,29 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class OverviewController < ApplicationController - before_filter :init_resource_for_user_role - - SECTION=Navigation::SECTION_RESOURCE - - def index - redirect_to "#{ApplicationController.root_context}/dashboard/?id=#{url_encode(params[:id])}" - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/permission_templates_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/permission_templates_controller.rb deleted file mode 100644 index 792bafff85b..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/permission_templates_controller.rb +++ /dev/null @@ -1,29 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# - -class PermissionTemplatesController < ApplicationController - SECTION = Navigation::SECTION_CONFIGURATION - - before_filter :admin_required - - # GET - def index - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb deleted file mode 100644 index c450e4c68c0..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb +++ /dev/null @@ -1,64 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# - -class ProfilesController < ApplicationController - - def index - - end - - def show - render :action => 'index' - end - - def changelog - render :action => 'index' - end - - def compare - render :action => 'index' - end - - def create - render :action => 'index' - end - - # GET /profiles/export?name=&language=&format= - def export - language = params[:language] - if params[:name].blank? - profile = Internal.qprofile_service.getDefault(language) - else - profile = Internal.qprofile_loader.getByLangAndName(language, CGI::unescape(params[:name])) - end - not_found('Profile not found') unless profile - - if params[:format].blank? - # standard sonar format - result = Internal.qprofile_service.backup(profile.getKee()) - send_data(result, :type => 'text/xml', :disposition => 'inline') - else - exporter_key = params[:format] - result = Internal.qprofile_exporters.export(profile.getKee(), exporter_key) - send_data(result, :type => Internal.qprofile_exporters.mimeType(exporter_key), :disposition => 'inline') - end - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb deleted file mode 100644 index 880e2ab2b09..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb +++ /dev/null @@ -1,232 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class ProjectController < ApplicationController - - SECTION=Navigation::SECTION_RESOURCE - - def index - # this URL should not be called. Replaced by dashboard/index - redirect_to :overwrite_params => {:controller => :dashboard, :action => 'index'} - end - - def settings - @project = get_current_project(params[:id]) - end - - def deletion - @project = get_current_project(params[:id]) - end - - def quality_profiles - # since 6.1 - @project = Project.by_key(params[:id]) - not_found("Project not found") unless @project - access_denied unless (is_admin?(@project.uuid) || has_role?(:profileadmin)) - end - - def profile - # redirect to another url since 6.1 - redirect_to(url_for({:action => 'quality_profiles'}) + '?id=' + url_encode(params[:id])) - end - - def background_tasks - @project = get_current_project(params[:id]) - end - - def quality_gate - # since 6.1 - @project = get_current_project(params[:id]) - end - - def qualitygate - # redirect to another url since 6.1 - redirect_to(url_for({:action => 'quality_gate'}) + '?id=' + url_encode(params[:id])) - end - - def links - @project = get_current_project(params[:id]) - end - - def key - @project = get_current_project(params[:id]) - end - - def history - @project = get_current_project(params[:id]) - - unless java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'modifiable_history') - redirect_to :action => 'index', :id => params[:id] - end - - @snapshot = @project.last_analysis - @analyses = Snapshot.all(:conditions => ["status='P' AND component_uuid=?", @project.uuid], - :include => 'events', :order => 'snapshots.created_at DESC') - end - - def update_version - snapshot=Snapshot.find(params[:sid], :include => 'project') - not_found("Snapshot not found") unless snapshot - access_denied unless is_admin?(snapshot) - - unless params[:version_name].blank? - if Event.already_exists(snapshot.component_uuid, params[:version_name], EventCategory::KEY_VERSION) - flash[:error] = message('project_history.version_already_exists', :params => h(params[:version_name])) - else - # We update the snapshot to have a version attribute in sync with the new name - snapshot.version = params[:version_name] - snapshot.save! - # And then we update/create the event on the snapshot - if snapshot.event(EventCategory::KEY_VERSION) - # This is an update: we update the event - Event.update_all({:name => params[:version_name]}, - ["category = ? AND analysis_uuid = ?", EventCategory::KEY_VERSION, snapshot.uuid]) - flash[:notice] = message('project_history.version_updated', :params => h(params[:version_name])) - else - # We create an event on the snapshot - event = Event.create!(:name => params[:version_name], :snapshot => snapshot, - :component_uuid => snapshot.project.uuid, :category => EventCategory::KEY_VERSION, - :event_date => snapshot.created_at) - flash[:notice] = message('project_history.version_created', :params => h(params[:version_name])) - end - end - end - - redirect_to :action => 'history', :id => snapshot.project.id - end - - def delete_version - parent_snapshot=Snapshot.find(params[:sid]) - not_found("Snapshot not found") unless parent_snapshot - access_denied unless is_admin?(parent_snapshot) - - # We update all the related snapshots to have the same version as the next snapshot - next_snapshot = Snapshot.find(:first, :conditions => ['created_at>? and component_uuid=?', parent_snapshot.created_at_long, parent_snapshot.component_uuid], :order => 'created_at asc') - parent_snapshot.version = next_snapshot.version - parent_snapshot.save! - - # and we delete the events - event = parent_snapshot.event(EventCategory::KEY_VERSION) - old_version_name = event.name - events = find_events(event) - - Event.transaction do - events.map { |e| e.id }.each_slice(999) do |safe_for_oracle_ids| - Event.delete(safe_for_oracle_ids) - end - end - - flash[:notice] = message('project_history.version_removed', :params => h(old_version_name)) - redirect_to :action => 'history', :id => parent_snapshot.project.id - end - - def create_event - snapshot=Snapshot.find(params[:sid]) - not_found("Snapshot not found") unless snapshot - access_denied unless is_admin?(snapshot) - - if Event.already_exists(snapshot.component_uuid, params[:event_name], EventCategory::KEY_OTHER) - flash[:error] = message('project_history.event_already_exists', :params => h(params[:event_name])) - else - e = Event.new({:name => params[:event_name], - :category => EventCategory::KEY_OTHER, - :snapshot => snapshot, - :component_uuid => snapshot.project.uuid, - :event_date => snapshot.created_at}) - e.save! - flash[:notice] = message('project_history.event_created', :params => h(params[:event_name])) - end - - redirect_to :action => 'history', :id => snapshot.project.id - end - - def update_event - event = Event.find(params[:id]) - not_found("Event not found") unless event - access_denied unless is_admin?(event.resource) - - if Event.already_exists(event.component_uuid, params[:event_name], EventCategory::KEY_OTHER) - flash[:error] = message('project_history.event_already_exists', :params => h(event.name)) - else - events = find_events(event) - events.each do |e| - e.name = params[:event_name] - e.save! - end - flash[:notice] = message('project_history.event_updated') - end - - redirect_to :action => 'history', :id => event.resource.id - end - - def delete_event - event = Event.find(params[:id]) - not_found("Event not found") unless event - access_denied unless is_admin?(event.resource) - - name = event.name - resource_id = event.resource.id - events = find_events(event) - Event.transaction do - events.map { |e| e.id }.each_slice(999) do |safe_for_oracle_ids| - Event.delete(safe_for_oracle_ids) - end - end - - flash[:notice] = message('project_history.event_deleted', :params => h(name)) - redirect_to :action => 'history', :id => resource_id - end - - def delete_snapshot_history - @project = get_current_project(params[:id]) - - sid = params[:snapshot_id] - if sid - Snapshot.update_all("status='U'", ["id=?", sid.to_i]) - flash[:notice] = message('project_history.snapshot_deleted') - end - - redirect_to :action => 'history', :id => @project.id - end - - protected - - def get_current_project(project_id) - project=Project.by_key(project_id) - not_found("Project not found") unless project - access_denied unless is_admin?(project) - project - end - - # Returns all an array that contains the given event + all the events that are the same - def find_events(event) - events = [] - name = event.name - category = event.category - event.snapshot.events.reject { |e| e.name!=name || e.category!=category }.each do |event| - events << event - end - events - end - - def redirect_to_default - redirect_to home_path - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_roles_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_roles_controller.rb deleted file mode 100644 index 1e543b5ce19..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_roles_controller.rb +++ /dev/null @@ -1,29 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class ProjectRolesController < ApplicationController - - SECTION=Navigation::SECTION_RESOURCE - - def index - @project = Project.by_key(params[:id]) - access_denied unless is_admin? || is_admin?(@project) - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/projects_admin_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/projects_admin_controller.rb deleted file mode 100644 index 27d848d7f2e..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/projects_admin_controller.rb +++ /dev/null @@ -1,30 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class ProjectsAdminController < ApplicationController - - before_filter :admin_required - - SECTION=Navigation::SECTION_CONFIGURATION - - def index - - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/projects_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/projects_controller.rb deleted file mode 100644 index b73c013b73a..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/projects_controller.rb +++ /dev/null @@ -1,30 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class ProjectsController < ApplicationController - - def index - - end - - def favorite - render :action => 'index' - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/property_sets_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/property_sets_controller.rb deleted file mode 100644 index e336e5d91a8..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/property_sets_controller.rb +++ /dev/null @@ -1,30 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class PropertySetsController < ApplicationController - - SECTION=Navigation::SECTION_CONFIGURATION - before_filter :admin_required - - def index - @property_sets = java_facade.listPropertySets() - render :partial => 'property_sets/list' - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/quality_gates_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/quality_gates_controller.rb deleted file mode 100644 index e07fcaae434..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/quality_gates_controller.rb +++ /dev/null @@ -1,30 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# - -class QualityGatesController < ApplicationController - - SECTION=Navigation::SECTION_QUALITY_GATES - - # GET /quality_gates/index - def index - - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb deleted file mode 100644 index 0f6403aab55..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb +++ /dev/null @@ -1,40 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# - -class ResourceController < ApplicationController - - SECTION=Navigation::SECTION_RESOURCE - - # DO NOT REMOVE - used by eclipse plugin - def index - require_parameters 'id' - - component_key = params[:id] - if Api::Utils.is_number?(component_key) - component=Project.by_key(component_key) - not_found unless component - access_denied unless has_role?(:user, component) - component_key = component.key - end - - redirect_to url_for(:controller => 'component', :action => 'index', :id => component_key) - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb deleted file mode 100644 index 3775accd86f..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb +++ /dev/null @@ -1,29 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class RolesController < ApplicationController - - SECTION=Navigation::SECTION_CONFIGURATION - - before_filter :admin_required - - # GET /roles/global - def global - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb deleted file mode 100644 index 4333b514349..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb +++ /dev/null @@ -1,32 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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 'java' - -class RulesConfigurationController < ApplicationController - - SECTION=Navigation::SECTION_QUALITY_PROFILES - - # deprecated since 2.3 - def export - redirect_to request.query_parameters.merge({:controller => 'profiles', :action => 'export'}) - end - - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb deleted file mode 100644 index 1415bfb39ec..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb +++ /dev/null @@ -1,40 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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 "erb" -include ERB::Util - -class RulesController < ApplicationController - - SECTION=Navigation::SECTION_CONFIGURATION - - # GET /rules/show/ - # This URL is used by the Eclipse plugin - # - # Example: GET /rules/show/squid:AvoidCycles - # - def show - require_parameters :id - - # the redirect is needed for the backward compatibility with eclipse plugin - url = url_for :controller => 'coding_rules', :action => 'index' - url = url + '#rule_key=' + url_encode(params[:id]) - redirect_to url - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/sessions_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/sessions_controller.rb deleted file mode 100644 index 4a302c34573..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/sessions_controller.rb +++ /dev/null @@ -1,66 +0,0 @@ - # - # SonarQube, open source software quality management tool. - # Copyright (C) 2008-2016 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. - # - -### Sessions Controller from restful_authentication (http://agilewebdevelopment.com/plugins/restful_authentication) -class SessionsController < ApplicationController - - layout 'nonav' - skip_before_filter :check_authentication - - def login - redirect_to :action => 'new' - end - - def logout - if logged_in? - self.current_user.on_logout - end - cookies.delete 'JWT-SESSION' - cookies.delete 'XSRF-TOKEN' - redirect_to(home_path) - end - - def new - default = home_url - if params[:return_to] - # user clicked on the link "login" : redirect to the original uri after authentication - default = Api::Utils.absolute_to_relative_url(params[:return_to]) - # else the original uri can be set by ApplicationController#access_denied - end - @return_to = get_redirect_back_or_default(default) - end - - private - - # Get redirection to the URI stored by the most recent store_location call or to the passed default. - def get_redirect_back_or_default(default) - # Prevent CSRF attack -> do not accept absolute urls - url = get_cookie_flash('return_to') || default - begin - url = URI(url).request_uri - rescue - url - end - anchor=params[:return_to_anchor] - url += anchor if anchor && anchor.start_with?('#') - url - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb deleted file mode 100644 index dcc132c323f..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb +++ /dev/null @@ -1,39 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class SettingsController < ApplicationController - SECTION=Navigation::SECTION_CONFIGURATION - before_filter :admin_required - - def index - - end - - def licenses - render :action => 'index' - end - - def encryption - render :action => 'index' - end - - def server_id - render :action => 'index' - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/setup_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/setup_controller.rb deleted file mode 100644 index 20643ada37e..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/setup_controller.rb +++ /dev/null @@ -1,29 +0,0 @@ - # - # SonarQube, open source software quality management tool. - # Copyright (C) 2008-2016 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. - # -class SetupController < ApplicationController - skip_before_filter :check_database_version, :check_authentication - - SECTION=Navigation::SECTION_CONFIGURATION - - def index - render :template => 'setup/index', :layout => 'nonav' - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/system_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/system_controller.rb deleted file mode 100644 index a64db082d44..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/system_controller.rb +++ /dev/null @@ -1,29 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class SystemController < ApplicationController - - SECTION=Navigation::SECTION_CONFIGURATION - before_filter :admin_required - - def index - - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb deleted file mode 100644 index 53bd57da3c7..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb +++ /dev/null @@ -1,44 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -class UpdatecenterController < ApplicationController - - SECTION=Navigation::SECTION_CONFIGURATION - before_filter :admin_required - - def index - - end - - def installed - render :action => 'index' - end - - def updates - render :action => 'index' - end - - def available - render :action => 'index' - end - - def system - render :action => 'index' - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/users_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/users_controller.rb deleted file mode 100644 index 455588d67fd..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/users_controller.rb +++ /dev/null @@ -1,64 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2016 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. -# -### Users Controller from restful_authentication (http://agilewebdevelopment.com/plugins/restful_authentication) -class UsersController < ApplicationController - - SECTION=Navigation::SECTION_CONFIGURATION - before_filter :admin_required, :except => ['new', 'signup', 'autocomplete'] - skip_before_filter :check_authentication, :only => ['new', 'signup', 'autocomplete'] - - def signup - access_denied unless request.post? && Property.value('sonar.allowUsersToSignUp')=='true' - - @user=prepare_user - if @user.save - Internal.users_api.index() - @user.notify_creation_handlers - flash[:notice] = 'Please log in now.' - redirect_to home_url - else - render :action => 'new', :layout => 'nonav' - end - end - - def index - - end - - def new - render :action => 'new', :layout => 'nonav' - end - - - private - - def prepare_user - user = User.new(params[:user]) - user.external_identity = user.login - user.external_identity_provider = 'sonarqube' - user.user_local = true - user.is_root = false - default_group_name=java_facade.getSettings().getString('sonar.defaultGroup') - default_group=Group.find_by_name(default_group_name) - user.groups< - -<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_favorites.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_favorites.html.erb deleted file mode 100644 index e0f6c2f658f..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_favorites.html.erb +++ /dev/null @@ -1,24 +0,0 @@ -<% max_favorites = 5 %> - -

<%= message('my_profile.favorites.title') -%>

- - <% current_user.favourites.each_with_index do |f, index | %> - = max_favorites %>class="hidden"<% end %>> - - - - <% end %> - -<% if current_user.favourites.size > max_favorites %> - -<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_global_notifications.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_global_notifications.html.erb deleted file mode 100644 index 2d2b66ce8a9..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_global_notifications.html.erb +++ /dev/null @@ -1,31 +0,0 @@ -

<%= message('my_profile.overall_notifications.title') -%>

- -

<%= message('notification.dispatcher.information') -%>

- - - - - - <% for channel in @channels %> - - <% end %> - - - - <% for dispatcher in @global_dispatchers %> - - - <% - for channel in @channels - notification_id = dispatcher + '.' + channel.getKey() - check_box_id = 'global_notifs[' + notification_id + ']' - check_box_checked = @global_notifications[notification_id] - %> - - <% end %> - - <% end %> - -
<%= message('notification.channel.' + channel.getKey()) -%>
<%= message('notification.dispatcher.' + dispatcher) -%> - <%= check_box_tag check_box_id, 'true', check_box_checked %> -
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_per_project_notifications.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_per_project_notifications.html.erb deleted file mode 100644 index a05956318dd..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_per_project_notifications.html.erb +++ /dev/null @@ -1,57 +0,0 @@ -

<%= message('my_profile.per_project_notifications.title') -%>

- -<% @per_project_notifications.each do |r_id, per_project_notif| %> -
- - - - - <% for channel in @channels %> - - <% end %> - - - - <% @per_project_dispatchers.each do |dispatcher| %> - - - <% - for channel in @channels - check_box_id = 'project_notifs[' + r_id.to_s + '][' + dispatcher + '][' + channel.getKey() + ']' - check_box_checked = per_project_notif[dispatcher].include?(channel.getKey()) - %> - - <% end %> - - <% end %> - -
- -

<%= Project.by_key(r_id).name -%>

-
<%= message('notification.channel.' + channel.getKey()) -%>
<%= message('notification.dispatcher.' + dispatcher) -%> - <%= check_box_tag check_box_id, 'true', check_box_checked %> -
-
-<% end %> - -
- <%= resource_select_tag 'new_project', {:qualifiers => ['TRK'], :width => '250px', - :select2_options => {'placeholder' => "'" + message('my_profile.add_project') + "'"} - } -%> -
- - diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/index.html.erb deleted file mode 100644 index c15f578952f..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/index.html.erb +++ /dev/null @@ -1,75 +0,0 @@ -<% content_for :extra_script do %> - -<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/api_documentation/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/api_documentation/index.html.erb deleted file mode 100644 index 3e12a98f45d..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/api_documentation/index.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -<% content_for :extra_script do %> - - -<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/background_tasks/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/background_tasks/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/branding/_footer.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/branding/_footer.html.erb deleted file mode 100644 index 968b000588b..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/branding/_footer.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -
- This application is based on - SonarQube™ - but is not an official version provided by - SonarSource SA. -
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/code/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/code/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/coding_rules/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/coding_rules/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/component/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/component/index.html.erb deleted file mode 100644 index aa8f970e11c..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/component/index.html.erb +++ /dev/null @@ -1,18 +0,0 @@ -<% content_for :extra_script do %> - <% if @resource %> - - <% end %> - -<% end %> - - - diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/component_issues/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/component_issues/index.html.erb deleted file mode 100644 index 6989a49b051..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/component_issues/index.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -<% content_for :extra_script do %> - -<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/component_measures/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/component_measures/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/configuration/index.rhtml b/server/sonar-web/src/main/webapp/WEB-INF/app/views/configuration/index.rhtml deleted file mode 100644 index 53999f10bd6..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/configuration/index.rhtml +++ /dev/null @@ -1,4 +0,0 @@ -
<%= image_tag 'loading.gif' %> loading
- -
- diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/confirm/_confirm.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/confirm/_confirm.html.erb deleted file mode 100644 index 64f47c4f522..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/confirm/_confirm.html.erb +++ /dev/null @@ -1,23 +0,0 @@ -<% - title_key = params[:tk] || 'confirm' - message_key = params[:mk] || 'are_you_sure' - message_params = params['mp'] || [] - button_key = params[:bk] || title_key -%> -
-
- - - -
-
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/custom_measures/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/custom_measures/index.html.erb deleted file mode 100644 index 6e435e85c27..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/custom_measures/index.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -<% content_for :extra_script do %> - -<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/empty.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/empty.html.erb deleted file mode 100644 index f65e6d90e04..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/empty.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -
- <% if @resource and !@snapshot %> -
- <%= h message('provisioning.no_analysis') -%> -
-
-

<%= h message('key') -%>

- <%= h @resource.key -%> -
- <% end %> -
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb deleted file mode 100644 index 6e88df08ff7..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -<% content_for :extra_script do %> - - -<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/overview.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/overview.html.erb deleted file mode 100644 index 5ca6b6fba86..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/overview.html.erb +++ /dev/null @@ -1,83 +0,0 @@ -<% - links_size = @resource.project_links.size - - profiles = [] - if @snapshot - qprofiles_measure = @snapshot.measure(Metric::QUALITY_PROFILES) - if qprofiles_measure && !qprofiles_measure.data.blank? - profiles = JSON.parse qprofiles_measure.data - end - end - profiles_size = profiles.size - - is_gate_default = false - gate = nil - root = @resource.root_project - gate_id = Property.value('sonar.qualitygate', root.id, nil) - unless gate_id - gate_id=Property.value('sonar.qualitygate', nil, nil) - is_gate_default = false || gate_id - end - if gate_id - gate = Internal.quality_gates.get(gate_id.to_i) - end -%> - -<% - if @snapshot - m = @snapshot.measure(Metric::QUALITY_GATE_DETAILS) - alert_status = @snapshot.measure(Metric::ALERT_STATUS) - if m && !m.data.blank? - details = JSON.parse m.data - m.alert_status = details['level'] - raw_conditions = details['conditions'] - conditions = [] - raw_conditions.each do |condition| - if !metric(condition['metric']).nil? - conditions << condition - end - end - end - end -%> - -<% content_for :extra_script do %> - -<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/index.html.erb deleted file mode 100644 index edbc0bf98e9..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/index.html.erb +++ /dev/null @@ -1,20 +0,0 @@ -
-
    -
  • - - <%= link_to message('create'), {:action => :create_form, :resource => (@resource.id if @resource)}, :id => "create-link-dashboard", :class => 'open-modal link-action' %> -
  • -
- -

<%= message('dashboard.my_global_dashboards') -%>

- <%= render_partial :partial => 'my_dashboards', :locals => { :is_admin => is_admin? } %> - -

<%= message('dashboard.available_dashboards') -%>

- <%= render_partial :partial => 'available_dashboards', :locals => { :is_admin => is_admin? } %> -
- -<% if params[:highlight] %> - -<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/drilldown/issues.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/drilldown/issues.html.erb deleted file mode 100644 index 375fb397e3c..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/drilldown/issues.html.erb +++ /dev/null @@ -1,22 +0,0 @@ - diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb deleted file mode 100644 index 76265ab1097..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb +++ /dev/null @@ -1,94 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- <%= text_field_tag 'smtp_host', @smtp_host %> -

<%= message('email_configuration.smtp_host.description') -%>

-
- <%= text_field_tag 'smtp_port', @smtp_port %> -

<%= message('email_configuration.smtp_port.description') -%>

-
- <%= select_tag 'smtp_secure_connection', options_for_select({'No' => '', 'SSL/TLS' => 'ssl', 'STARTTLS' => 'starttls'}, @smtp_secure_connection) %> -

<%= message('email_configuration.smtp_secure_connection.description') -%>

-
- <%= text_field_tag 'smtp_username', @smtp_username %> -

<%= message('email_configuration.smtp_username.description') -%>

-
- <% value = Property::EXISTING_PASSWORD unless @smtp_password.blank? %> - <%= password_field_tag 'smtp_password', value, {:autocomplete => 'off'} %> -

<%= message('email_configuration.smtp_password.description') -%>

-
- <%= text_field_tag 'email_from', @email_from %> -

<%= message('email_configuration.from_address.description') -%>

-
- <%= text_field_tag 'email_prefix', @email_prefix %> -

<%= message('email_configuration.email_prefix.description') -%>

-
- <%= submit_tag message('email_configuration.save_settings'), :disable_with => message('email_configuration.saving_settings'), :id => 'submit_save' %> -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - -
<%= message('email_configuration.test.title') -%>
- <%= submit_tag message('email_configuration.test.send'), :disable_with => message('email_configuration.test.sending'), :id => 'submit_test' %> -
<%= text_field_tag 'to_address', current_user.email %>
<%= text_field_tag 'subject', message('email_configuration.test.subject_text') %>
<%= text_area_tag 'message', message('email_configuration.test.message_text') + ' ' + @server_base_url, {:cols => 40, :rows => 6} %>
-
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/groups/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/groups/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_bulk_change_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_bulk_change_form.html.erb deleted file mode 100644 index 1d209e79cf9..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_bulk_change_form.html.erb +++ /dev/null @@ -1,177 +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_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 Internal.issues.isUserIssueAdmin(issue.projectUuid) - unresolved_issues_user_can_admin += 1 unless issue.resolution() - end - 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/issues/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_footer.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_footer.html.erb deleted file mode 100644 index e4ff4db0048..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_footer.html.erb +++ /dev/null @@ -1,31 +0,0 @@ - - -<% if cookies['flash'] %> - -<% end %> -<% cookies.delete 'flash' %> - - -<%= yield :extra_script -%> - - - diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb deleted file mode 100644 index afd65ce9196..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - <% - if @page_title - title="SonarQube - #{h(@page_title)}" - elsif @project - title="SonarQube - #{h(@project.name)}" - elsif @resource - title="#{h(@resource.long_name)}" - else - title='SonarQube' - end - %> - <%= title -%> - - - <%= yield :style -%> - - - - - - <%= yield :script -%> - - diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_iframe.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_iframe.html.erb deleted file mode 100644 index 5cc1498a0db..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_iframe.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -
- <% if @snapshot %>

<%= h @snapshot.project.name(true) %>

<% end %> - - - - <%= yield %> -
\ No newline at end of file diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb deleted file mode 100644 index c723423852b..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb +++ /dev/null @@ -1,64 +0,0 @@ -<% - selected_section = controller.class::SECTION if defined?(controller.class::SECTION) - if selected_section==Navigation::SECTION_RESOURCE && !@project && !@resource - selected_section = Navigation::SECTION_HOME - end - @project=@resource unless @project || selected_section==Navigation::SECTION_HOME - has_context_nav = selected_section==Navigation::SECTION_RESOURCE || selected_section==Navigation::SECTION_CONFIGURATION - period_param = "period=#{u(params[:period])}" if params[:period] -%> -
- - - <% if has_context_nav %> - - <% end %> - - <%= yield :header -%> - -
- -
-
- -<% unless params[:hd]=='false' %> - <%= yield :footer %> - -<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar.html.erb deleted file mode 100644 index a99e21339f7..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar.html.erb +++ /dev/null @@ -1,23 +0,0 @@ -<% - selected_section = controller.class::SECTION if defined?(controller.class::SECTION) - if selected_section == Navigation::SECTION_RESOURCE && !@project && !@resource - selected_section = Navigation::SECTION_HOME - end - - @project = @resource unless @project || selected_section == Navigation::SECTION_HOME -%> - - diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_nolayout.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_nolayout.html.erb deleted file mode 100644 index 2a7d0e94282..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_nolayout.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -
- <% if @resource %> -

<%= h @resource.name(true) %>

- <% end %> - - <%= yield %> -
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/application.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/application.html.erb deleted file mode 100644 index be9af4a1526..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/application.html.erb +++ /dev/null @@ -1,19 +0,0 @@ -<% - controller.java_facade.getCoreComponentByClassname('org.sonar.server.ui.PageDecorations').get().each do |decoration| - begin -%> - <%= render :inline => decoration.getTemplate() -%> - <% - rescue => error - logger.error(error) - end - end - %> -<%= render :partial => 'layouts/head' unless params[:hd]=='false' %> -<% if params[:layout]=='false' %> - <%= render :partial => 'layouts/nolayout' %> -<% else %> - <%= render :partial => 'layouts/layout' %> - <%= render :partial => 'layouts/navbar' %> -<% end %> -<%= render :partial => 'layouts/footer' unless params[:hd]=='false' %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/nonav.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/nonav.html.erb deleted file mode 100644 index 8eddafc65d3..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/nonav.html.erb +++ /dev/null @@ -1,42 +0,0 @@ -<%= render :partial => 'layouts/head' %> - - - -
-
-
<%= yield %>
-
-
- - - - - - -<%= yield :extra_script -%> - - diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/maintenance/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/maintenance/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/markdown/_tips.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/markdown/_tips.html.erb deleted file mode 100644 index 546d38240d2..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/markdown/_tips.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -
- <%= message('markdown.helplink')-%> : -   *<%= message('bold') -%>*    ``<%= message('code') -%>``    * <%= message('bulleted_point') -%> -
\ No newline at end of file diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/markdown/help.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/markdown/help.html.erb deleted file mode 100644 index ff4b4bc60ae..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/markdown/help.html.erb +++ /dev/null @@ -1,102 +0,0 @@ -
-

Markdown Syntax

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Write:To display:
*this text is bold*this text is bold
http://sonarqube.orghttp://sonarqube.org
- [SonarQube™ Home Page](http://www.sonarqube.org) - - SonarQube™ Home Page -
* first item
- * second item -
-
    -
  • first item
  • -
  • second item
  • -
-
1. first item
- 1. second item -
-
    -
  1. first item
  2. -
  3. second item
  4. -
-
- = Heading Level 1
- == Heading Level 2
- === Heading Level 3
- ==== Heading Level 4
- ===== Heading Level 5
- ====== Heading Level 6
-
-

Heading Level 1

-

Heading Level 2

-

Heading Level 3

-

Heading Level 4

-
Heading Level 5
-
Heading Level 6
-
``Lists#newArrayList()``Lists#newArrayList()
- ``
- // code on multiple lines
- public void foo() {
-   // do some logic here
- }
- `` -
-
-  // code on multiple lines
-  public void foo() {
-  // do some logic here
-  }
-
-
- Standard text
- > Blockquoted text
- > that spans multiple lines
-
-

Standard text

-
Blockquoted text
- that spans multiple lines
-
-
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/metrics/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/metrics/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/permission_templates/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/permission_templates/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/plugins/rails_page.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/plugins/rails_page.erb deleted file mode 100644 index 9eec0d172f8..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/plugins/rails_page.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render :inline => @page.getTemplate() %> \ No newline at end of file diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/_snapshot_title.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/_snapshot_title.html.erb deleted file mode 100644 index 9b77fc7808f..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/_snapshot_title.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -<% if @snapshot %> -
-

-<% - profile_measure=@snapshot.measure(Metric::PROFILE) - %> -<%= link_to_favourite(@project) -%> Version <%= @snapshot.version -%> - <%= l @snapshot.created_at %> -<% if profile_measure %> - profile <%= link_to profile_measure.data, :controller => 'profiles', :action => 'show', :id => profile_measure.value.to_i %><% end %> -

-
-<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/background_tasks.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/background_tasks.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/deletion.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/deletion.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/history.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/history.html.erb deleted file mode 100644 index 81caa07835a..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/history.html.erb +++ /dev/null @@ -1,173 +0,0 @@ -
- - - <% if !@snapshot %> - -
- <%= h message('provisioning.no_analysis') -%> -
- -
-

<%= h message('key') -%>

- <%= h @project.key -%> -
- - <% elsif @project.root? %> - - - - - - - - - - - - - - - - - <% - current_year = nil - current_month = nil - @analyses.each_with_index do |analysis, index| - time = analysis.created_at - version_event = analysis.event(EventCategory::KEY_VERSION) - alert_event = analysis.event(EventCategory::KEY_ALERT) - profile_event = analysis.event(EventCategory::KEY_PROFILE) - other_events = analysis.events.select{|e| e.category!=EventCategory::KEY_VERSION && e.category!=EventCategory::KEY_ALERT && e.category!=EventCategory::KEY_PROFILE} - %> - - - <%# Year %> - - - <%# Month %> - - - <%# Day %> - - - <%# Time %> - - - <%# Version %> - - - <%# Events %> - - - - - - - - - <% - current_year = time.year - current_month = time.month - end - %> - -
<%= message('project_history.col.year') -%><%= message('project_history.col.month') -%><%= message('project_history.col.day') -%><%= message('project_history.col.time') -%><%= message('project_history.col.version') -%><%= message('project_history.col.events') -%><%= message('project_history.col.action') -%>
<%= time.year unless time.year == current_year -%><%= l(time, :format => '%B').capitalize unless time.month == current_month -%><%= l(time, :format => '%d') -%><%= l(time, :format => '%H:%M') -%> - - - - <% if version_event %> - - - - <% else %> - - - <% end %> - - - - -
<%= h(version_event.name) if version_event -%> - <%= message('project_history.rename_version') -%> - - <% if version_event && !analysis.islast? %> - <%= link_to( message('project_history.remove_version'), - { :action => 'delete_version', :sid => analysis.id}, - :confirm => message('project_history.do_you_want_to_remove_version', :params => version_event.name) ) -%> - <% end %> - - <%= message('project_history.create_version') -%> -
-
- - <% - other_events.each_with_index do |event, index2| - event_index = index.to_s + '-' + index2.to_s - %> - - - - - - - - <% end %> - - - - - - -
<%= h event.name -%> - <%= message('project_history.rename_event') -%> - <%= link_to( message('project_history.remove_version'), - { :action => 'delete_event', :id => event.id}, - :confirm => message('project_history.do_you_want_to_remove_version', :params => event.name) ) -%> -
- <%= message('project_history.create_event') -%> -
-
- <%= image_tag "event_alert.png", :alt => (message('project_history.col.alert') + ": " + alert_event.name + ". " + alert_event.description_text) if alert_event -%> - - <%= image_tag "event_profile.png", :alt => message('project_history.col.profile') + ": " + profile_event.name if profile_event -%> - - <% - cell_content = nil; - if analysis.islast? - cell_content = "" + message('project_history.last_snapshot') + "" - else - cell_content = button_to( message('project_history.delete_snapshot'), - { :action => "delete_snapshot_history", :id => @project.id, :snapshot_id => analysis.id }, - :class => 'button-red', - :confirm => message('project_history.are_you_sure_delete_snapshot_x', :params => l(time, :format => :long)) ) - end - %> - <%= cell_content -%> -
- - <% end %> -
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/key.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/key.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/links.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/links.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/profile.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/profile.html.erb deleted file mode 100644 index d24f845572e..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/profile.html.erb +++ /dev/null @@ -1,45 +0,0 @@ -
- - - - - - - - - - - <% - Api::Utils.languages.each do |language| - selected_profile = Internal.quality_profiles.findProfileByProjectAndLanguage(@project_id, language.getKey()) - %> - - - - - <% end %> - -
<%= message 'language' -%>Quality Profile
<%= h language.getName() -%> -
- - - - - - <%= submit_tag message('update_verb'), :id => "submit-#{language.getKey()}", :disable_with => message('updating') %> -
-
-
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/quality_gate.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/quality_gate.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/quality_profiles.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/quality_profiles.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/settings.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/settings.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project_roles/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project_roles/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/projects/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/projects/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/projects_admin/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/projects_admin/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/property_sets/_list.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/property_sets/_list.html.erb deleted file mode 100644 index 40e1057d674..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/property_sets/_list.html.erb +++ /dev/null @@ -1,22 +0,0 @@ -
-
- - - - - -
-
- - diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/quality_gates/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/quality_gates/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/global.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/global.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/_form.html.erb deleted file mode 100644 index 3f1c87f5977..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/_form.html.erb +++ /dev/null @@ -1,95 +0,0 @@ -

Log In to SonarQube

- -<% auth_providers = Api::Utils.java_facade.getIdentityProviders().to_a %> -<% if auth_providers.size > 0 %> -
- -
-<% end %> - -
- - - - - -
- - - <% if Property.value('sonar.allowUsersToSignUp')=='true' %> -

- <%= message('sessions.new_account', :params => [url_for(:controller => 'users', :action => 'new')]) -%> -

- <% end %> -
- -

- - -

- -
-
- - <%= message('cancel') -%> -
-
-
- - - diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/login.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/login.html.erb deleted file mode 100644 index 786950e7048..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/login.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render :partial => 'form' %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/new.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/new.html.erb deleted file mode 100644 index 786950e7048..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/new.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render :partial => 'form' %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/unauthorized.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/unauthorized.html.erb deleted file mode 100644 index dee79e3add7..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/unauthorized.html.erb +++ /dev/null @@ -1,15 +0,0 @@ - - - - -
-
-

You're not authorized to access this page. Please contact the administrator.

-
-
- <% if params[:message] %> -
Reason : <%= params[:message] %>
-
- <% end %> - <%= message('layout.home') -%> -
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/setup/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/setup/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/shared/_no_issues.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/shared/_no_issues.html.erb deleted file mode 100644 index 046be07f3c4..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/shared/_no_issues.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -
-
<%= message('issue_filter.no_result') -%>
-
<%= image_tag 'help.png', :title => h(message('issue_filter.no_result.help')) -%>
-
\ No newline at end of file diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/shared/_result_messages.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/shared/_result_messages.html.erb deleted file mode 100644 index 9f8a57d72d2..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/shared/_result_messages.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -<% result.errors.each do |msg| %> -
<%= h (msg.text ? msg.text : Api::Utils.message(msg.l10nKey, :params => msg.l10nParams)) -%>
-<% end %> - - diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/system/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/system/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/new.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/new.html.erb deleted file mode 100644 index e779a8d23df..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/new.html.erb +++ /dev/null @@ -1,44 +0,0 @@ -
- -

Sign Up to SonarQube

- - <%= error_messages_for :user, :class => 'alert alert-danger', :header_message => nil, :message => nil %> - -
- - -

- <%= message('sessions.old_account', :params => [url_for(:controller => 'sessions', :action => 'new')]) -%> -

-
- -
- - -
- -

- - -

- -

- - -

- -

- - <%= message('cancel') -%> -

-
- - diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/utils/_tfoot_pagination.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/utils/_tfoot_pagination.html.erb deleted file mode 100644 index a6a6c3ec537..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/utils/_tfoot_pagination.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -<% - # this template is deprecated. Please use the method table_pagination. -%> -<%= table_pagination(pagination, :colspan => (colspan||1)) { |label, page_id| link_to(label, params.merge({:page => page_id}))} -%> \ No newline at end of file diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/view_projects/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/view_projects/index.html.erb deleted file mode 100644 index f5600f6ca03..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/view_projects/index.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<% content_for :extra_script do %> - -<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/web_api/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/web_api/index.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/config/routes.rb b/server/sonar-web/src/main/webapp/WEB-INF/config/routes.rb index a62b6c7af3c..2931db12590 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/config/routes.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/config/routes.rb @@ -13,26 +13,11 @@ ActionController::Routing::Routes.draw do |map| map.resources 'properties', :path_prefix => 'api', :controller => 'api/properties', :requirements => { :id => /.*/ } - # home page - map.home '', :controller => :landing, :action => :index - map.root :controller => :landing, :action => :index - # page plugins map.connect 'plugins/configuration/:page', :controller => 'plugins/configuration', :action => 'index', :requirements => { :page => /.*/ } map.connect 'plugins/home/:page', :controller => 'plugins/home', :action => 'index', :requirements => { :page => /.*/ } map.connect 'plugins/resource/:id', :controller => 'plugins/resource', :action => 'index', :requirements => { :id => /.*/ } - # to refactor - map.connect 'charts/:action/:project_id/:metric_id', :controller => 'charts' - map.connect 'rules_configuration/:action/:language/:name/:plugin.:format', :controller => 'rules_configuration' - - map.connect 'web_api/*other', :controller => 'web_api', :action => 'index' - map.connect 'quality_gates/*other', :controller => 'quality_gates', :action => 'index' - map.connect 'overview/*other', :controller => 'overview', :action => 'index' - map.connect 'component_measures/*other', :controller => 'component_measures', :action => 'index' - map.connect 'account/update_notifications', :controller => 'account', :action => 'update_notifications' - map.connect 'account/*other', :controller => 'account', :action => 'index' - # Install the default route as the lowest priority. map.connect ':controller/:action/:id', :requirements => { :id => /.*/ } -- 2.39.5