diff options
author | Denis Anisimov <denis@vaadin.com> | 2014-10-19 14:54:47 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-12-02 10:52:59 +0000 |
commit | 53f87e5bf3014382f0bf9cd7acb18c56709ba1f7 (patch) | |
tree | 831259e7d43722ac30c0561242cc1705681b1e11 /client | |
parent | 58cf6113d02cb0331dae6d5ff46eb3e4a0ccdb01 (diff) | |
download | vaadin-framework-53f87e5bf3014382f0bf9cd7acb18c56709ba1f7.tar.gz vaadin-framework-53f87e5bf3014382f0bf9cd7acb18c56709ba1f7.zip |
Show push version information in debug window (#14904).
Change-Id: Id1761abbf2b2dc29b4138520f11ce51bb4d423fc
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ApplicationConfiguration.java | 45 | ||||
-rw-r--r-- | client/src/com/vaadin/client/debug/internal/InfoSection.java | 8 |
2 files changed, 53 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConfiguration.java b/client/src/com/vaadin/client/ApplicationConfiguration.java index 12b1585292..4865e38a4a 100644 --- a/client/src/com/vaadin/client/ApplicationConfiguration.java +++ b/client/src/com/vaadin/client/ApplicationConfiguration.java @@ -172,6 +172,33 @@ public class ApplicationConfiguration implements EntryPoint { return this.getConfig("versionInfo").vaadinVersion; }-*/; + /** + * Gets the version of the Atmosphere framework. + * + * @return a string with the version + * + * @see org.atmosphere.util#getRawVersion() + */ + private native String getAtmosphereVersion() + /*-{ + return this.getConfig("versionInfo").atmosphereVersion; + }-*/; + + /** + * Gets the JS version used in the Atmosphere framework. + * + * @return a string with the version + */ + private native String getAtmosphereJSVersion() + /*-{ + if ($wnd.jQueryVaadin != undefined){ + return $wnd.jQueryVaadin.atmosphere.version; + } + else { + return null; + } + }-*/; + private native String getUIDL() /*-{ return this.getConfig("uidl"); @@ -461,6 +488,24 @@ public class ApplicationConfiguration implements EntryPoint { return getJsoConfiguration(id).getVaadinVersion(); } + /** + * Return Atmosphere version. + * + * @return Atmosphere version. + */ + public String getAtmosphereVersion() { + return getJsoConfiguration(id).getAtmosphereVersion(); + } + + /** + * Return Atmosphere JS version. + * + * @return Atmosphere JS version. + */ + public String getAtmosphereJSVersion() { + return getJsoConfiguration(id).getAtmosphereJSVersion(); + } + public Class<? extends ServerConnector> getConnectorClassByEncodedTag( int tag) { Class<? extends ServerConnector> type = classes.get(tag); diff --git a/client/src/com/vaadin/client/debug/internal/InfoSection.java b/client/src/com/vaadin/client/debug/internal/InfoSection.java index a7a84f5f8f..dfb31cdd18 100644 --- a/client/src/com/vaadin/client/debug/internal/InfoSection.java +++ b/client/src/com/vaadin/client/debug/internal/InfoSection.java @@ -193,6 +193,9 @@ public class InfoSection implements Section { ApplicationConfiguration applicationConfiguration) { String clientVersion = Version.getFullVersion(); String servletVersion = applicationConfiguration.getServletVersion(); + String atmosphereVersion = applicationConfiguration + .getAtmosphereVersion(); + String jsVersion = applicationConfiguration.getAtmosphereJSVersion(); String themeVersion; boolean themeOk; @@ -213,6 +216,11 @@ public class InfoSection implements Section { addRow("Server engine version", servletVersion, servletOk ? null : ERROR_STYLE); addRow("Theme version", themeVersion, themeOk ? null : ERROR_STYLE); + if (jsVersion != null) { + addRow("Push server version", atmosphereVersion); + addRow("Push client version", jsVersion + + " (note: does not need to match server version)"); + } } /** |