Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

*) Status page now has button to install updates (1/2)

(no author)b25bc6c36dd2
diff --git a/htroot/Status.html b/htroot/Status.html
index 6da534324..f8e7a0b42 100644
--- a/htroot/Status.html
+++ b/htroot/Status.html
@@ -38,24 +38,24 @@
#(hintVersionAvailable)#::
<dt><img src="env/grafics/start.gif"></dt>
- <dd>latest public version is #[latestVersion]#.
- You can download a more recent version of YaCy. Click here to aquire a direct download location:
+ <dd>Latest public version is v#[latestVersion]#.
+ You can download a more recent version of YaCy. Click here to install this update and restart YaCy:
<form action="Status.html" method="get" class="PeerControl">
- <button type="submit" name="aquirerelease" value="aquire release information">
+ <button type="submit" name="aquirerelease" value="Update YaCy">
<img src="/env/grafics/lock.gif"/>
- aquire download location
+ Install YaCy v#[latestVersion]#
</button>
</form>
</dd>
#(/hintVersionAvailable)#
-
+ <!--
#(hintVersionDownload)#::
<dt><img src="env/grafics/start.gif"></dt>
<dd>You can download the latest releases here:
#[versionResMain]# or #[versionResDev]#
</dd>
#(/hintVersionDownload)#
-
+ -->
#(hintStatusVirgin)#::
<dt><img src="env/grafics/start.gif"></dt>
<dd>You have not published your peer seed yet. This happens automatically, just wait.
diff --git a/htroot/Status.java b/htroot/Status.java
index d26e453ae..dca4d82e5 100644
--- a/htroot/Status.java
+++ b/htroot/Status.java
@@ -154,6 +154,16 @@ public class Status {
double thisVersion = Double.parseDouble(env.getConfig("version","0.1"));
// cut off the SVN Rev in the Version
try {thisVersion = Math.round(thisVersion*1000.0)/1000.0;} catch (NumberFormatException e) {}
+
+ if ((adminaccess) && !(((plasmaSwitchboard) env).updaterCallback == null) && (((plasmaSwitchboard) env).updaterCallback.updateYaCyIsPossible() == true)){
+ prop.put("hintVersionAvailable", 1);
+ prop.put("hintVersionAvailable_latestVersion", ((plasmaSwitchboard) env).updaterCallback.getYaCyUpdateReleaseVersion());
+ if ((post != null) && (post.containsKey("aquirerelease"))) {
+ ((plasmaSwitchboard) env).updaterCallback.grantYaCyUpdate();
+ }
+ }
+
+ /*
if ((adminaccess) && (yacyVersion.latestRelease >= (thisVersion+0.01))) { // only new Versions(not new SVN)
if ((yacyVersion.latestMainRelease != null) ||
(yacyVersion.latestDevRelease != null)) {
@@ -168,7 +178,8 @@ public class Status {
prop.putASIS("hintVersionDownload_versionResMain", (yacyVersion.latestMainRelease == null) ? "-" : yacyVersion.latestMainRelease.toAnchor());
prop.putASIS("hintVersionDownload_versionResDev", (yacyVersion.latestDevRelease == null) ? "-" : yacyVersion.latestDevRelease.toAnchor());
prop.put("hintVersionAvailable_latestVersion", Double.toString(yacyVersion.latestRelease));
-
+ */
+
// hostname and port
String extendedPortString = env.getConfig("port", "8080");
int pos = extendedPortString.indexOf(":");