From cdc11586030c046a6261018854122c31863298f6 Mon Sep 17 00:00:00 2001 From: Christos Stathis Date: Wed, 30 May 2012 16:10:17 +0300 Subject: [PATCH] Converted version into a runtime property so that it can be easily maintained --- build.xml | 5 +++++ runtime.properties | 3 ++- src/gr/grnet/pithos/web/client/Configuration.java | 6 ------ src/gr/grnet/pithos/web/client/Configuration.properties | 1 - src/gr/grnet/pithos/web/client/StatusPanel.java | 6 ++++-- src/gr/grnet/pithos/web/public/index.html | 3 ++- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/build.xml b/build.xml index 682ff23..e7f27c7 100644 --- a/build.xml +++ b/build.xml @@ -113,6 +113,11 @@ replace="authCookie: "${authCookie}"" byline="true" /> + diff --git a/runtime.properties b/runtime.properties index 91dd54d..d656cac 100644 --- a/runtime.properties +++ b/runtime.properties @@ -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 diff --git a/src/gr/grnet/pithos/web/client/Configuration.java b/src/gr/grnet/pithos/web/client/Configuration.java index f004674..8fcb5a5 100644 --- a/src/gr/grnet/pithos/web/client/Configuration.java +++ b/src/gr/grnet/pithos/web/client/Configuration.java @@ -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(); diff --git a/src/gr/grnet/pithos/web/client/Configuration.properties b/src/gr/grnet/pithos/web/client/Configuration.properties index 568fefa..17be15f 100644 --- a/src/gr/grnet/pithos/web/client/Configuration.properties +++ b/src/gr/grnet/pithos/web/client/Configuration.properties @@ -35,6 +35,5 @@ cookieSeparator=| apiPath=/v1/ -version=0.8.4 authTokenCookie=X-Auth-Token shibSessionCookiePrefix=_shibsession_ diff --git a/src/gr/grnet/pithos/web/client/StatusPanel.java b/src/gr/grnet/pithos/web/client/StatusPanel.java index 9262157..86d669c 100644 --- a/src/gr/grnet/pithos/web/client/StatusPanel.java +++ b/src/gr/grnet/pithos/web/client/StatusPanel.java @@ -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() + " Copyright (C) 2011-2012 Greek Research and Technology Network")); + secondLine.add(new HTML("Pithos Web Client v" + otherProperties.get("version") + " Copyright (C) 2011-2012 Greek Research and Technology Network")); secondLine.addStyleName("grnet-sign"); inner.add(secondLine); outer.add(inner); diff --git a/src/gr/grnet/pithos/web/public/index.html b/src/gr/grnet/pithos/web/public/index.html index 0801d19..c8d4f22 100644 --- a/src/gr/grnet/pithos/web/public/index.html +++ b/src/gr/grnet/pithos/web/public/index.html @@ -68,7 +68,8 @@ var otherProperties = { loginUrl: "/im/login?next=", feedbackUrl: "/feedback", - authCookie: "_pithos2_a" + authCookie: "_pithos2_a", + version: "" } -- 1.7.10.4