提交 4c893a3f 编写于 作者: K kohsuke

Detect the updates to <tt>hudson.war</tt> and report it.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@11397 71c3de6d-444a-0410-be80-ed276b4c234a
上级 467519b2
...@@ -244,6 +244,13 @@ public class UpdateCenter implements ModelObject { ...@@ -244,6 +244,13 @@ public class UpdateCenter implements ModelObject {
plugins.put(e.getKey(),new Plugin(e.getValue())); plugins.put(e.getKey(),new Plugin(e.getValue()));
} }
} }
/**
* Is there a new version of the core?
*/
public boolean hasCoreUpdates() {
return core.isNewerThan(Hudson.VERSION);
}
} }
public static class Entry { public static class Entry {
......
...@@ -32,6 +32,10 @@ ...@@ -32,6 +32,10 @@
</script> </script>
<span id="message"></span> <span id="message"></span>
</j:if> </j:if>
<j:set var="ucData" value="${it.updateCenter.data}" />
<j:if test="${ucData.hasCoreUpdates()}">
<div class="warning">${%NewVersionAvailable(ucData.core.version,ucData.core.url)}</div>
</j:if>
<table style="padding-left: 2em;"> <table style="padding-left: 2em;">
<local:feature icon="setting.gif" href="configure" title="${%Configure System}"> <local:feature icon="setting.gif" href="configure" title="${%Configure System}">
${%Configure global settings and paths.} ${%Configure global settings and paths.}
......
SystemLogText=\ SystemLogText=\
System log captures output from <tt>java.util.logging</tt> output related to Hudson. System log captures output from <tt>java.util.logging</tt> output related to Hudson.
\ No newline at end of file NewVersionAvailable=New version of Hudson ({0}) is available for <a href="{1}">download</a>.
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册