Converted version into a runtime property so that it can be easily maintained
authorChristos Stathis <chstath@ebs.gr>
Wed, 30 May 2012 13:10:17 +0000 (16:10 +0300)
committerChristos Stathis <chstath@ebs.gr>
Wed, 30 May 2012 13:10:17 +0000 (16:10 +0300)
build.xml
runtime.properties
src/gr/grnet/pithos/web/client/Configuration.java
src/gr/grnet/pithos/web/client/Configuration.properties
src/gr/grnet/pithos/web/client/StatusPanel.java
src/gr/grnet/pithos/web/public/index.html

index 682ff23..e7f27c7 100644 (file)
--- a/build.xml
+++ b/build.xml
                           replace="authCookie: &quot;${authCookie}&quot;"
                           byline="true"
            />
+           <replaceregexp file="${gwt.www.dir}/${gwt.module}/index.html"
+                          match="version: (.*)"
+                          replace="version: &quot;${version}&quot;"
+                          byline="true"
+           />
     </target>
 
     <target name="uploadToVM" depends="main">
index 91dd54d..d656cac 100644 (file)
@@ -5,4 +5,5 @@ CLOUDBAR_LOCATION = /static/im/cloudbar/
 CLOUDBAR_SERVICES = /im/get_services
 CLOUDBAR_MENU = /im/get_menu
 authCookie=_pithos2_a
-feedbackUrl=/feedback
\ No newline at end of file
+feedbackUrl=/feedback
+version=0.9.0
\ No newline at end of file
index f004674..8fcb5a5 100644 (file)
@@ -56,12 +56,6 @@ public interface Configuration extends Constants {
        @DefaultStringValue("/v1/")
        String apiPath();
 
-       /**
-        * @return the version string
-        */
-       @DefaultStringValue("")
-       String version();
-
        @DefaultStringValue("X-Auth-Token")
        String authTokenCookie();
        
index 568fefa..17be15f 100644 (file)
@@ -35,6 +35,5 @@
 
 cookieSeparator=|
 apiPath=/v1/
-version=0.8.4
 authTokenCookie=X-Auth-Token
 shibSessionCookiePrefix=_shibsession_
index 9262157..86d669c 100644 (file)
@@ -35,6 +35,7 @@
 package gr.grnet.pithos.web.client;
 
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.i18n.client.Dictionary;
 import com.google.gwt.user.client.ui.Anchor;
 import com.google.gwt.user.client.ui.Composite;
 import com.google.gwt.user.client.ui.HTML;
@@ -51,7 +52,8 @@ public class StatusPanel extends Composite {
         * The constructor of the status panel.
         */
        public StatusPanel() {
-               Configuration conf = GWT.create(Configuration.class);
+               Dictionary otherProperties = Dictionary.getDictionary("otherProperties");
+
                HorizontalPanel outer = new HorizontalPanel();
                outer.setWidth("100%");
                outer.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
@@ -72,7 +74,7 @@ public class StatusPanel extends Composite {
                inner.add(firstLine);
 
         HorizontalPanel secondLine = new HorizontalPanel();
-        secondLine.add(new HTML("Pithos Web Client v" + conf.version() + " <a class='grnet-sign' href='http://www.grnet.gr'>Copyright (C) 2011-2012 Greek Research and Technology Network</a>"));
+        secondLine.add(new HTML("Pithos Web Client v" + otherProperties.get("version") + " <a class='grnet-sign' href='http://www.grnet.gr'>Copyright (C) 2011-2012 Greek Research and Technology Network</a>"));
         secondLine.addStyleName("grnet-sign");
         inner.add(secondLine);
         outer.add(inner);
index 0801d19..c8d4f22 100644 (file)
@@ -68,7 +68,8 @@
                        var otherProperties = {
                                loginUrl: "/im/login?next=",
                                feedbackUrl: "/feedback",
-                               authCookie: "_pithos2_a"
+                               authCookie: "_pithos2_a",
+                               version: ""
                        }
                </script>
     </head>