Author: jonathan
Date: Mon Jan 21 17:32:05 2008
New Revision: 12663

Log:

MASHUP-531: Fixed negative ages

Modified:
   trunk/mashup/java/modules/samples/upgradeChecker/upgradeChecker.js
   
trunk/mashup/java/modules/samples/upgradeChecker/upgradeChecker.resources/www/index.html

Modified: trunk/mashup/java/modules/samples/upgradeChecker/upgradeChecker.js
==============================================================================
--- trunk/mashup/java/modules/samples/upgradeChecker/upgradeChecker.js  
(original)
+++ trunk/mashup/java/modules/samples/upgradeChecker/upgradeChecker.js  Mon Jan 
21 17:32:05 2008
@@ -55,8 +55,8 @@
     // Fetch information about the latest nightly build of the Mashup Server
     var nightlyBuildDate = fetchNightlyBuildDate();
     
-    var nightlyAge = Math.floor((nightlyBuildDate.getTime() - 
userBuildDate.getTime())/(1000*60*60));
-    var releaseAge = Math.floor((releaseBuildDate.getTime() - 
userBuildDate.getTime())/(1000*60*60));
+    var nightlyAge = Math.floor((userBuildDate.getTime() - 
nightlyBuildDate.getTime())/(1000*60*60));
+    var releaseAge = Math.floor((userBuildDate.getTime() - 
releaseBuildDate.getTime())/(1000*60*60));
     
     var build = new Object();
     build.product = "Mashup Server";
@@ -79,8 +79,8 @@
         "date" : releaseBuildDate
     };
 
-    var newerRelease = releaseAge > 0;
-    var newerNightly = nightlyAge > 0;
+    var newerRelease = releaseAge < 0;
+    var newerNightly = nightlyAge < 0;
     if (newerRelease) {
         build.release.action = "recommended";
         if (newerNightly) {
@@ -111,18 +111,18 @@
              <current
                 nightly = {build.current.nightly}
                 version = {build.current.version}
-                date = {build.current.date} />
+                date = {build.current.date} />
              <nightly 
-                download = {build.nightly.download}
-                       age = {build.nightly.age}
+                download = {build.nightly.download}
+                       age = {build.nightly.age}
                                date = {build.nightly.date} 
-                               action = {build.nightly.action} />
+                               action = {build.nightly.action} />
              <release 
-                version = {build.release.version} 
-                       download = {build.release.download}
-                       age = {build.release.age}
+                version = {build.release.version} 
+                       download = {build.release.download}
+                       age = {build.release.age}
                        date = {build.release.date}
-                       action = {build.release.action} />
+                       action = {build.release.action} />
            </build>;
 }
 
@@ -173,8 +173,8 @@
     // running 0.2 release, newer nightly
     if (id == "release-new-nightly") 
         return <build product="Mashup Server">
-            <current nightly="false" version="0.2" date="Thu Oct 04 2007 
04:21:00 GMT-0700 (PDT)" />
-            <nightly 
download="http://dist.wso2.org/products/mashup/nightly-build/"; age="73" 
date="Fri Oct 26 2007 11:13:00 GMT-0700 (PDT)" action="recommended" />
+            <current nightly="false" version="0.2" date="Thu Oct 04 2007 
04:21:00 GMT-0700 (PDT)" />
+            <nightly 
download="http://dist.wso2.org/products/mashup/nightly-build/"; age="73" 
date="Fri Oct 26 2007 11:13:00 GMT-0700 (PDT)" action="recommended" />
             <release version="0.2" 
download="http://dist.wso2.org/products/mashup/0.2/"; age={22*24} date="Thu Oct 
04 2007 04:21:00 GMT-0700 (PDT)" />
         </build>;
 

Modified: 
trunk/mashup/java/modules/samples/upgradeChecker/upgradeChecker.resources/www/index.html
==============================================================================
--- 
trunk/mashup/java/modules/samples/upgradeChecker/upgradeChecker.resources/www/index.html
    (original)
+++ 
trunk/mashup/java/modules/samples/upgradeChecker/upgradeChecker.resources/www/index.html
    Mon Jan 21 17:32:05 2008
@@ -29,7 +29,7 @@
        a.imglink:hover img {border:none}
        .normal {padding:0.5em}
     table {margin: 1em}
-       th {background:color:red}
+       th {background-color:red}
        h1 {font-size:150%; margin:0.25em}
     td {text-align:center}
     .build_date {font-size:70%}

_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to