]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-1886: Uninstall a plugin
authorGodin <mandrikov@gmail.com>
Wed, 27 Oct 2010 17:33:21 +0000 (17:33 +0000)
committerGodin <mandrikov@gmail.com>
Wed, 27 Oct 2010 17:33:21 +0000 (17:33 +0000)
sonar-server/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_common.html.erb [deleted file]
sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_downloads.html.erb [deleted file]
sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_operations.html.erb [new file with mode: 0644]
sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_uninstalls.html.erb [deleted file]
sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/available.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/updates.html.erb

index a1be366c1551883728091629c32350482208b548..b330dcebdde26c19e125ad5a7e2053e6768950d3 100644 (file)
@@ -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 (file)
index c6784e0..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<script type="text/javascript">
-  function showPlugin(key) {
-    if ($('detail-' + key).visible()) {
-      $('detail-' + key).hide();
-    } else {
-      $('detail-' + key).show();
-    }
-    return false;
-  }
-</script>
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 (file)
index ee23bea..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<%= render :partial => 'updatecenter/common' %>
-
-<script>
-  function checkTermsConditions(key) {
-    var tc=$('tc-' + key)
-    if (tc!=null && !tc.checked) {
-      alert('Please accept the Terms and Conditions');
-      return false;
-    }
-    return true;
-  }
-</script>
-
-<% if @downloads.size > 0 %>
-<form action="<%= ApplicationController.root_context -%>/updatecenter/cancel" method="post" class="warning">
-<p>Sonar needs to be restarted in order to install the following plugins: <ul>
-  <% @downloads.each do |download| %>
-    <li><%= download -%></li>
-  <% end %>
-  </ul>
-  <input type="submit" value="Cancel downloads"></input>
-</p>
-</form>
-<% 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 (file)
index 0000000..58772db
--- /dev/null
@@ -0,0 +1,42 @@
+<script type="text/javascript">
+  function showPlugin(key) {
+    if ($('detail-' + key).visible()) {
+      $('detail-' + key).hide();
+    } else {
+      $('detail-' + key).show();
+    }
+    return false;
+  }
+  
+  function checkTermsConditions(key) {
+    var tc=$('tc-' + key)
+    if (tc!=null && !tc.checked) {
+      alert('Please accept the Terms and Conditions');
+      return false;
+    }
+    return true;
+  }
+</script>
+
+<% if @uninstalls.size > 0 %>
+<form action="<%= ApplicationController.root_context -%>/updatecenter/cancel_uninstalls" method="post" class="warning">
+<p>Sonar needs to be restarted in order to uninstall the following plugins: <ul>
+  <% @uninstalls.each do |uninstall| %>
+    <li><%= uninstall -%></li>
+  <% end %>
+  </ul>
+</p>
+</form>
+<% end %>
+
+<% if @downloads.size > 0 %>
+<form action="<%= ApplicationController.root_context -%>/updatecenter/cancel" method="post" class="warning">
+<p>Sonar needs to be restarted in order to install the following plugins: <ul>
+  <% @downloads.each do |download| %>
+    <li><%= download -%></li>
+  <% end %>
+  </ul>
+  <input type="submit" value="Cancel downloads"></input>
+</p>
+</form>
+<% 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 (file)
index d10e0ff..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<% if @uninstalls.size > 0 %>
-<form action="<%= ApplicationController.root_context -%>/updatecenter/cancel_uninstalls" method="post" class="warning">
-<p>Sonar needs to be restarted in order to uninstall the following plugins: <ul>
-  <% @uninstalls.each do |uninstall| %>
-    <li><%= uninstall -%></li>
-  <% end %>
-  </ul>
-</p>
-</form>
-<% end %>
index c508cf887ae81b900e1829c8219a7c54103271e1..126e83db43ddb6e856e4fc6fa454c31a48ae7205 100644 (file)
@@ -11,7 +11,7 @@
 </ul>
 <div class="tabs-panel">
 
-<%= render :partial => 'updatecenter/downloads' -%>
+<%= render :partial => 'updatecenter/operations' -%>
 
 <table class="data width100">
   <thead>
index 555b604b415dd88b1bb104dcdc3c07a2343c2bdd..3ce11dbb1042a44f2fffe688563228eef0de8c9c 100644 (file)
@@ -12,8 +12,7 @@
 
 <div class="tabs-panel">
 
-<%= render :partial => 'updatecenter/uninstalls' -%>
-<%= render :partial => 'updatecenter/common' -%>
+<%= render :partial => 'updatecenter/operations' -%>
 
 <h2>User-installed plugins</h2>
 <table class="data">
index fa8d744adbeb215c719af676b3fa784086a8c0f0..9cdc7ea07961bf222e481c5c7b8fceed8df99d32 100644 (file)
@@ -10,7 +10,8 @@
   </li>
 </ul>
 <div class="tabs-panel">
-<%= render :partial => 'updatecenter/downloads' -%>
+
+<%= render :partial => 'updatecenter/operations' -%>
 
 <% if @center %>
   <table class="data width100" id="plugin-updates">