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
index a5d86ea82f6..95474e6a80f 100644
--- 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
@@ -21,132 +21,24 @@ class UpdatecenterController < ApplicationController
SECTION=Navigation::SECTION_CONFIGURATION
before_filter :admin_required
- before_filter :updatecenter_activated
-
- verify :method => :post, :only => [:cancel, :install], :redirect_to => {:action => :index}
def index
- @uninstalls=java_facade.getPluginUninstalls()
- @downloads=java_facade.getPluginDownloads()
- load_plugin_center
- @plugins = installed_plugins
end
- def available
- @uninstalls=java_facade.getPluginUninstalls()
- @downloads=java_facade.getPluginDownloads()
- @update_plugin_center=nil
- @updates_by_category={}
-
- load_plugin_center()
- if @update_plugin_center
- @update_plugin_center.findAvailablePlugins().each do |update|
- already_download = update.plugin.releases.find {|release| @downloads.include? release.filename }
- if !already_download
- category = update.plugin.category||''
- @updates_by_category[category]||=[]
- @updates_by_category[category]< 'index'
end
def updates
- @uninstalls=java_facade.getPluginUninstalls()
- @downloads=java_facade.getPluginDownloads()
-
- @update_plugin_center=nil
- @updates_by_plugin={}
- @installed_plugins={}
- @last_compatible={}
-
- load_plugin_center()
- if @update_plugin_center
- @sonar_version = org.sonar.server.platform.Platform.getServer().getVersion()
-
- installed_plugins.each do |plugin|
- @installed_plugins[plugin.getKey()]=plugin.lastRelease.getVersion()
- end
-
- @update_plugin_center.findPluginUpdates().each do |update|
- plugin = update.plugin
- already_download = update.plugin.releases.find {|release| @downloads.include? release.filename }
- if !already_download
- @updates_by_plugin[plugin]||=[]
- @updates_by_plugin[plugin]< 'index'
end
- def cancel_downloads
- java_facade.cancelPluginDownloads()
- flash[:notice]="Pending plugin installations are canceled."
- redirect_to :action => 'index'
+ def available
+ render :action => 'index'
end
- def install
- key=params[:key]
- version=params[:version]
- if key && version
- begin
- java_facade.downloadPlugin(key, version)
- rescue Exception => e
- flash[:error]=e.message
- end
- end
- redirect_to :action => (params[:from] || 'index')
- end
-
- def uninstall
- key=params[:key]
- if key
- begin
- java_facade.uninstallPlugin(key)
- rescue Exception => e
- flash[:error]=e.message
- end
- end
- redirect_to :action => (params[:from] || 'index')
- end
-
- def cancel_uninstalls
- java_facade.cancelPluginUninstalls()
- flash[:notice]="Pending plugin uninstalls are canceled."
- redirect_to :action => 'index'
- end
-
- def system_updates
- @uninstalls=java_facade.getPluginUninstalls()
- @downloads=java_facade.getPluginDownloads()
-
- @update_plugin_center=nil
- @sonar_updates=[]
- load_plugin_center()
- if @update_plugin_center
- @sonar_updates=@update_plugin_center.findSonarUpdates()
- end
- end
-
- private
-
- def load_plugin_center
- @update_plugin_center = java_facade.getUpdatePluginCenter(params[:reload]=='true')
- @installed_plugin_referential = java_facade.installedPluginReferential
- end
-
- def updatecenter_activated
- update_center_activated = java_facade.getSettings().getBoolean('sonar.updatecenter.activate')
- unless update_center_activated
- redirect_to home_url
- end
- end
-
- def installed_plugins
- @installed_plugin_referential.lastMasterReleasePlugins
+ def system
+ render :action => 'index'
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/updatecenter_new_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/updatecenter_new_controller.rb
deleted file mode 100644
index 14185ad966a..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/updatecenter_new_controller.rb
+++ /dev/null
@@ -1,44 +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 UpdatecenterNewController < 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/views/updatecenter/_operations.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/updatecenter/_operations.html.erb
deleted file mode 100644
index fe786c620ef..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/updatecenter/_operations.html.erb
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-<% if @uninstalls.size > 0 %>
-
-<% end %>
-
-<% if @downloads.size > 0 %>
-
-<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/updatecenter/_status.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/updatecenter/_status.html.erb
deleted file mode 100644
index 74de7615e23..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/updatecenter/_status.html.erb
+++ /dev/null
@@ -1,7 +0,0 @@
-<% if @update_plugin_center.nil? %>
-
Not connected to update center. Please check your internet connection and logs.
-<% end %>
\ No newline at end of file
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/updatecenter/_tabs.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/updatecenter/_tabs.html.erb
deleted file mode 100644
index 11c148d741f..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/updatecenter/_tabs.html.erb
+++ /dev/null
@@ -1,14 +0,0 @@
-
<%= update.getRelease().getVersion() -%> <%= "(#{date})" if date -%>
-
-
-
- <% if plugin.getTermsConditionsUrl() %>
- I accept the <%= link_to 'Terms and Conditions', plugin.getTermsConditionsUrl(), :class => 'external' %>
- <% end %>
-
-
- <% if update.hasWarnings() %>
- Follow those steps to upgrade SonarQube from version <%= sonar_version -%> to
- version <%= release.getVersion() -%> :
-
-
Stop SonarQube
-
<%= link_to 'Download', release.getDownloadUrl(), :class => 'external' -%> and install
- SonarQube <%= release.getVersion() -%> after having carefully read the
- upgrade guide.
-
- <% update.getIncompatiblePlugins().each do |incompatible_plugin| %>
-
- Uninstall the plugin <%= incompatible_plugin.getName() -%> which is not compatible with
- SonarQube <%= release.getVersion() -%>.
-
-
- <% end %>
- <% update.getPluginsToUpgrade().each do |plugin_to_upgrade| %>
-
- Replace current version of plugin <%= plugin_to_upgrade.getArtifact().getName() -%> by
- version <%= plugin_to_upgrade.getVersion() -%>
-
-
- <% end %>
-
Start SonarQube
-
-
- <% else %>
- <%= link_to 'Download', release.getDownloadUrl(), :class => 'external' -%> and install
- SonarQube <%= release.getVersion() -%> after having carefully read the
- upgrade guide.
- <% end %>
-
-
-
-
-
-
-
-
-
- <% end
- end
- end %>
-
- <%= render :partial => 'updatecenter/status', :locals => {:action => 'system_updates'} %>
-