From 4e65e4bcd7a2c3518e9188a68560feaf03f3ab09 Mon Sep 17 00:00:00 2001
From: Godin
Date: Mon, 25 Oct 2010 12:47:12 +0000
Subject: SONAR-1563: Rename domain to "updatecenter"
---
.../WEB-INF/app/controllers/plugins_controller.rb | 86 ---------------------
.../app/controllers/updatecenter_controller.rb | 86 +++++++++++++++++++++
.../WEB-INF/app/views/layouts/_layout.html.erb | 2 +-
.../WEB-INF/app/views/plugins/_downloads.html.erb | 28 -------
.../WEB-INF/app/views/plugins/_status.html.erb | 7 --
.../WEB-INF/app/views/plugins/available.html.erb | 89 ----------------------
.../WEB-INF/app/views/plugins/index.html.erb | 66 ----------------
.../WEB-INF/app/views/plugins/updates.html.erb | 73 ------------------
.../app/views/updatecenter/_downloads.html.erb | 28 +++++++
.../app/views/updatecenter/_status.html.erb | 7 ++
.../app/views/updatecenter/available.html.erb | 89 ++++++++++++++++++++++
.../WEB-INF/app/views/updatecenter/index.html.erb | 66 ++++++++++++++++
.../app/views/updatecenter/updates.html.erb | 73 ++++++++++++++++++
13 files changed, 350 insertions(+), 350 deletions(-)
delete mode 100644 sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins_controller.rb
create mode 100644 sonar-server/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb
delete mode 100644 sonar-server/src/main/webapp/WEB-INF/app/views/plugins/_downloads.html.erb
delete mode 100644 sonar-server/src/main/webapp/WEB-INF/app/views/plugins/_status.html.erb
delete mode 100644 sonar-server/src/main/webapp/WEB-INF/app/views/plugins/available.html.erb
delete mode 100644 sonar-server/src/main/webapp/WEB-INF/app/views/plugins/index.html.erb
delete mode 100644 sonar-server/src/main/webapp/WEB-INF/app/views/plugins/updates.html.erb
create mode 100644 sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_downloads.html.erb
create mode 100644 sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_status.html.erb
create mode 100644 sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/available.html.erb
create mode 100644 sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb
create mode 100644 sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/updates.html.erb
(limited to 'sonar-server')
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins_controller.rb
deleted file mode 100644
index ede4810febf..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins_controller.rb
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar 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.
-#
-# Sonar 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 Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class PluginsController < ApplicationController
-
- SECTION=Navigation::SECTION_CONFIGURATION
- before_filter :admin_required
-
- verify :method => :post, :only => [:cancel, :install], :redirect_to => {:action => :index}
-
- def index
- @user_plugins=Plugin.user_plugins
- @core_plugins=Plugin.core_plugins
- end
-
- def updates
- @downloads=java_facade.getPluginDownloads()
-
- @center=nil
- @sonar_updates=[]
- @plugin_updates=[]
-
- finder=load_update_finder()
- if finder
- @center=finder.getCenter()
- @sonar_updates=finder.findSonarUpdates()
- @plugin_updates=finder.findPluginUpdates()
- end
- end
-
- def available
- @downloads=java_facade.getPluginDownloads()
- @center=nil
- @updates_by_category={}
-
- finder=load_update_finder()
- if finder
- @center=finder.getCenter()
- finder.findAvailablePlugins().each do |update|
- category=update.getPlugin().getCategory()||''
- @updates_by_category[category]||=[]
- @updates_by_category[category]< '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
-
- private
- def load_update_finder
- @finder=java_facade.getUpdateFinder(params[:reload]=='true')
- end
-end
\ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb
new file mode 100644
index 00000000000..28c89ac0d68
--- /dev/null
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb
@@ -0,0 +1,86 @@
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2009 SonarSource SA
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar 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.
+#
+# Sonar 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 Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
+#
+class UpdatecenterController < ApplicationController
+
+ SECTION=Navigation::SECTION_CONFIGURATION
+ before_filter :admin_required
+
+ verify :method => :post, :only => [:cancel, :install], :redirect_to => {:action => :index}
+
+ def index
+ @user_plugins=Plugin.user_plugins
+ @core_plugins=Plugin.core_plugins
+ end
+
+ def updates
+ @downloads=java_facade.getPluginDownloads()
+
+ @center=nil
+ @sonar_updates=[]
+ @plugin_updates=[]
+
+ finder=load_update_finder()
+ if finder
+ @center=finder.getCenter()
+ @sonar_updates=finder.findSonarUpdates()
+ @plugin_updates=finder.findPluginUpdates()
+ end
+ end
+
+ def available
+ @downloads=java_facade.getPluginDownloads()
+ @center=nil
+ @updates_by_category={}
+
+ finder=load_update_finder()
+ if finder
+ @center=finder.getCenter()
+ finder.findAvailablePlugins().each do |update|
+ category=update.getPlugin().getCategory()||''
+ @updates_by_category[category]||=[]
+ @updates_by_category[category]< '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
+
+ private
+ def load_update_finder
+ @finder=java_facade.getUpdateFinder(params[:reload]=='true')
+ end
+end
\ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb
index e223aab7811..8a2a24bb8ff 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb
@@ -74,7 +74,7 @@
<% end %>
<% end %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/plugins/_downloads.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/plugins/_downloads.html.erb
deleted file mode 100644
index 8f9d1e8a836..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/plugins/_downloads.html.erb
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-<% if @downloads.size>0 %>
-
-
-<% end %>
\ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/plugins/_status.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/plugins/_status.html.erb
deleted file mode 100644
index 01179af82e8..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/plugins/_status.html.erb
+++ /dev/null
@@ -1,7 +0,0 @@
-
- <% if @center.nil? %>
-
Not connected to update center. Please check your internet connection and logs.
- <% else %>
- Updated on <%= @center.getDate() %>. <%= link_to 'Refresh', :action => action, :reload => true %>
- <% end %>
-
\ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/plugins/available.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/plugins/available.html.erb
deleted file mode 100644
index 4e2e0e3071b..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/plugins/available.html.erb
+++ /dev/null
@@ -1,89 +0,0 @@
-
\ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_downloads.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_downloads.html.erb
new file mode 100644
index 00000000000..8f9d1e8a836
--- /dev/null
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_downloads.html.erb
@@ -0,0 +1,28 @@
+
+
+
+<% if @downloads.size>0 %>
+
+<% end %>
\ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_status.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_status.html.erb
new file mode 100644
index 00000000000..01179af82e8
--- /dev/null
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_status.html.erb
@@ -0,0 +1,7 @@
+
+ <% if @center.nil? %>
+
Not connected to update center. Please check your internet connection and logs.
+ <% else %>
+ Updated on <%= @center.getDate() %>. <%= link_to 'Refresh', :action => action, :reload => true %>
+ <% end %>
+
\ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/available.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/available.html.erb
new file mode 100644
index 00000000000..f7cafd53e42
--- /dev/null
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/available.html.erb
@@ -0,0 +1,89 @@
+
+ <% end %>
+<% end %>
+<%= render :partial => 'updatecenter/status', :locals => {:action => 'available' } %>
+
\ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb
new file mode 100644
index 00000000000..c3b89859719
--- /dev/null
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb
@@ -0,0 +1,66 @@
+
+ <% if plugin.organization %>
+ <%= link_to_if plugin.organization_url, plugin.organization, plugin.organization_url, :class=>'external' %>
+ <% end %>
+
+
<%= link_to 'Details', plugin.homepage, :class => 'external' if plugin.homepage %>
+
+ <% end %>
+ <% end %>
+
+
+
+
+
System plugins
+
+
+
Plugin
+
Description
+
+
+ <%
+ @core_plugins.each do |plugin|
+ %>
+
+
<%= plugin.name -%>
+
<%= plugin.description %>
+
+ <% end %>
+
+
+
\ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/updates.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/updates.html.erb
new file mode 100644
index 00000000000..615d92fb0af
--- /dev/null
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/updates.html.erb
@@ -0,0 +1,73 @@
+