From: simonbrandhof Date: Mon, 1 Nov 2010 23:31:32 +0000 (+0000) Subject: Improve UI of Update Center + fix bug when plugin version is not listed in compatibil... X-Git-Tag: 2.6~704 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f94ad980c6d64414efca65ab5b7473ebbb079adb;p=sonarqube.git Improve UI of Update Center + fix bug when plugin version is not listed in compatibility matrix --- diff --git a/sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterMatrix.java b/sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterMatrix.java index a5c698539c3..82c1cc773c1 100644 --- a/sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterMatrix.java +++ b/sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterMatrix.java @@ -125,10 +125,7 @@ public final class UpdateCenterMatrix { Version pluginVersion = entry.getValue(); Release pluginRelease = plugin.getRelease(pluginVersion); - if (pluginRelease == null) { - update.addIncompatiblePlugin(plugin); - - } else if (pluginRelease.supportSonarVersion(sonarRelease.getVersion())) { + if (pluginRelease != null && pluginRelease.supportSonarVersion(sonarRelease.getVersion())) { update.addCompatiblePlugin(plugin); } else { diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/updatecenter_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/updatecenter_helper.rb index 04139237bee..856025ab7a7 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/updatecenter_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/updatecenter_helper.rb @@ -20,7 +20,11 @@ module UpdatecenterHelper def release_date(date) - Time.at(date.getTime() / 1000).strftime('%b %e, %Y') + if date + Time.at(date.getTime() / 1000).strftime('%b %e, %Y') + else + nil + end end end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_list.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/_list.html.erb deleted file mode 100644 index e69de29bb2d..00000000000 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 e4ccf1b0b5a..297999c8940 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 @@ -49,48 +49,54 @@ function installPlugin(key) { <%= plugin.getDescription() %> 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 58f7fca5504..432ad359a5a 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 @@ -1,4 +1,13 @@ -