diff options
author | Julien Lancelot <julien.lancelot@gmail.com> | 2013-02-20 17:22:31 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@gmail.com> | 2013-02-20 17:22:50 +0100 |
commit | dd8e6540a7e1cab420488489c326b5c5d02016d4 (patch) | |
tree | 8b98add16c4120d75ae18353b53b5eb5a947fffa /sonar-server | |
parent | 49005af25b940cea7e3ea9b36c1c5b79b9a4ec3e (diff) | |
download | sonarqube-dd8e6540a7e1cab420488489c326b5c5d02016d4.tar.gz sonarqube-dd8e6540a7e1cab420488489c326b5c5d02016d4.zip |
Update to latest update center API
Diffstat (limited to 'sonar-server')
4 files changed, 34 insertions, 19 deletions
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 aa8098209a4..37c62052a35 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 @@ -148,6 +148,6 @@ class UpdatecenterController < ApplicationController end def installed_plugins - @installed_plugin_referential.plugins + @installed_plugin_referential.lastMasterReleasePlugins end end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_children.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_children.html.erb deleted file mode 100644 index 6b8cadcba13..00000000000 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_children.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -<% index = 0 %> -<% children.each do |child| %> - <tr> - <% if index == 0 %> - <td class="thin nowrap"><b>Includes:</b></td> - <% else %> - <td> </td> - <% end %> - <td><span><%= child.name -%></span> : <span><%= child.description -%></span></td> - </tr> - <% index = index + 1 %> -<% 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 index cd2a1abeb7c..000736a63d7 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 @@ -32,8 +32,7 @@ function installPlugin(key) { </thead> <tbody> <% updates.sort_by{|update| update.plugin.key}.each do |update| - children = update.plugin.children - plugin = update.plugin + plugin = update.plugin %> <tr class="<%= cycle('even','odd', :name => category) -%>"> <td width="150" nowrap> @@ -43,7 +42,21 @@ function installPlugin(key) { <%= plugin.getDescription() %> <div id="detail-<%= plugin.getKey() -%>" style="display:none"> <table class="spaced width100"> - <%= render :partial => 'updatecenter/children', :locals => {:children => children} %> + <% index = 0 %> + <% plugin.lastRelease.children.each do |child| + child_plugin = @update_center_referential.findPlugin(child.key) + %> + <tr> + <% if index == 0 %> + <td class="thin nowrap"><b>Includes:</b></td> + <% else %> + <td> </td> + <% end %> + <td><span><%= child_plugin.name -%></span> : <span><%= child_plugin.description -%></span></td> + </tr> + <% index = index + 1 %> + <% end %> + <% release = @update_plugin_center.findLatestCompatibleRelease(plugin.key) %> <% release_dep_names = release.outgoingDependencies.collect { |dep| dep.artifact.name } %> <% unless release_dep_names.empty? %> 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 d553ae5e15d..5bfeff9301f 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 @@ -20,18 +20,32 @@ <tr class="even"><td colspan="5">No plugins</td></tr> <% else @plugins.each do |plugin| + release = plugin.lastRelease %> <tr class="select <%= cycle('even', 'odd', :name => 'user') -%>" id="select_<%= plugin.getKey() -%>"> <td width="1%" nowrap><b><a href="#plugin" onclick="showPlugin('<%= plugin.getKey() -%>')"><%= h(plugin.getName()) -%></a></b> <span class="note">[<%= h plugin.getKey() -%>]</span></td> - <td><%= plugin.lastRelease.getVersion() || '-' -%></td> + <td><%= release.getVersion() || '-' -%></td> <td> <%= plugin.getDescription() -%> <div id="detail-<%= plugin.getKey() -%>" style="display:none"> <table class="spaced width100"> - <%= render :partial => 'updatecenter/children', :locals => {:children => plugin.children} %> - <% release = @installed_plugin_referential.findLatestRelease(plugin.key) %> + <% index = 0 %> + <% plugin.lastRelease.children.each do |child| + child_plugin = @installed_plugin_referential.findPlugin(child.key) + %> + <tr> + <% if index == 0 %> + <td class="thin nowrap"><b>Includes:</b></td> + <% else %> + <td> </td> + <% end %> + <td><span><%= child_plugin.name -%></span> : <span><%= child_plugin.description -%></span></td> + </tr> + <% index = index + 1 %> + <% end %> + <% release_dep_names = release.outgoingDependencies.collect { |dep| dep.artifact.name } %> <% unless release_dep_names.empty? %> <tr> |