From: Godin
Date: Wed, 27 Oct 2010 17:33:21 +0000 (+0000)
Subject: SONAR-1886: Uninstall a plugin
X-Git-Tag: 2.6~748
X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a6e130d9f53cb759db4290441b87c876d92b9b94;p=sonarqube.git
SONAR-1886: Uninstall a plugin
---
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
index a1be366c155..b330dcebdde 100644
--- 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
@@ -26,11 +26,14 @@ class UpdatecenterController < ApplicationController
def index
@uninstalls=java_facade.getPluginUninstalls()
+ @downloads=java_facade.getPluginDownloads()
+
@user_plugins=Plugin.user_plugins
@core_plugins=Plugin.core_plugins
end
def updates
+ @uninstalls=java_facade.getPluginUninstalls()
@downloads=java_facade.getPluginDownloads()
@center=nil
@@ -46,7 +49,9 @@ class UpdatecenterController < ApplicationController
end
def available
+ @uninstalls=java_facade.getPluginUninstalls()
@downloads=java_facade.getPluginDownloads()
+
@center=nil
@updates_by_category={}
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_common.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_common.html.erb
deleted file mode 100644
index c6784e025dc..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_common.html.erb
+++ /dev/null
@@ -1,10 +0,0 @@
-
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
deleted file mode 100644
index ee23bea2b3c..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_downloads.html.erb
+++ /dev/null
@@ -1,24 +0,0 @@
-<%= render :partial => 'updatecenter/common' %>
-
-
-
-<% if @downloads.size > 0 %>
-
-
-<% end %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_operations.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_operations.html.erb
new file mode 100644
index 00000000000..58772dbcec9
--- /dev/null
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_operations.html.erb
@@ -0,0 +1,42 @@
+
+
+<% if @uninstalls.size > 0 %>
+
+<% end %>
+
+<% if @downloads.size > 0 %>
+
+<% end %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_uninstalls.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_uninstalls.html.erb
deleted file mode 100644
index d10e0ff29c0..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_uninstalls.html.erb
+++ /dev/null
@@ -1,10 +0,0 @@
-<% if @uninstalls.size > 0 %>
-
-<% end %>
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
index c508cf887ae..126e83db43d 100644
--- 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
@@ -11,7 +11,7 @@
-<%= render :partial => 'updatecenter/downloads' -%>
+<%= render :partial => 'updatecenter/operations' -%>
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
index 555b604b415..3ce11dbb104 100644
--- 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
@@ -12,8 +12,7 @@
-<%= render :partial => 'updatecenter/uninstalls' -%>
-<%= render :partial => 'updatecenter/common' -%>
+<%= render :partial => 'updatecenter/operations' -%>
User-installed plugins
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
index fa8d744adbe..9cdc7ea0796 100644
--- 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
@@ -10,7 +10,8 @@
-<%= render :partial => 'updatecenter/downloads' -%>
+
+<%= render :partial => 'updatecenter/operations' -%>
<% if @center %>