100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
Removed GWT references
Rich Turner9100c1e2ecfd
diff --git a/.gitignore b/.gitignoreindex 436bf21ea..734210835 100644--- a/.gitignore+++ b/.gitignore@@ -35,7 +35,5 @@ ui/**/yarn.lockconsole/iOS/DerivedDataconsole/iOS/Pods-client/src/main/webapp/gwt/-client/.externalToolBuilders/manager/.factorypath-.sts4-cache/\ No newline at end of file+.sts4-cache/diff --git a/LICENSE.txt b/LICENSE.txtindex 3b6c68f04..25bd8ecac 100644--- a/LICENSE.txt+++ b/LICENSE.txt@@ -30,9 +30,6 @@ com.fasterxml:classmate: APACHE LICENSE, VERSION 2.0com.google.code.findbugs: GNU LESSER GENERAL PUBLIC LICENSE, VERSION 3com.google.errorprone:error_prone_annotations: APACHE LICENSE, VERSION 2.0com.google.guava:*: APACHE LICENSE, VERSION 2.0-com.google.gwt:*: APACHE LICENSE, VERSION 2.0-com.google.gwt.inject:*: APACHE LICENSE, VERSION 2.0-com.google.j2objc:j2objc-annotations: APACHE LICENSE, VERSION 2.0com.ning:async-http-client: APACHE LICENSE, VERSION 2.0com.sun.xml.bind:*: GNU GENERAL PUBLIC LICENSE, VERSION 2.0 WITH CLASSPATH EXCEPTIONcom.zaxxer:HikariCP: APACHE LICENSE, VERSION 2.0@@ -88,7 +85,6 @@ org.openremote:or-zwave: TODO Proprietary?org.slf4j:*: SLF4J LICENSExml-apis:xml-apis: APACHE LICENSE, VERSION 2.0org.xerial:sqlite-jdbc: APACHE LICENSE, VERSION 2.0-https://github.com/workingflows/gwt-jscore: TODO Unknown!---@@ -2356,4 +2352,4 @@ Linking this library statically or dynamically with other modules is making a coAs a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.----\ No newline at end of file+---diff --git a/container/src/main/java/org/openremote/container/web/file/FileServlet.java b/container/src/main/java/org/openremote/container/web/file/FileServlet.javaindex 7a7fa4213..a626354b8 100644--- a/container/src/main/java/org/openremote/container/web/file/FileServlet.java+++ b/container/src/main/java/org/openremote/container/web/file/FileServlet.java@@ -36,7 +36,7 @@ public class FileServlet extends AbstractFileServlet {private static final Logger LOG = Logger.getLogger(FileServlet.class.getName());public static final long DEFAULT_EXPIRE_SECONDS = 600; // 10 minutes- public static final long EXPIRES_SECONDS_CACHE_JS = 60 * 60 * 24 * 14; // 14 days for .cache.js of GWT+ public static final long EXPIRES_SECONDS_CACHE_JS = 60 * 60 * 24 * 14; // 14 daysfinal protected boolean devMode;final protected File base;@@ -136,12 +136,6 @@ public class FileServlet extends AbstractFileServlet {if (mimeTypesExpireSeconds.containsKey(contentType))expireTime = mimeTypesExpireSeconds.get(contentType);- // Caching of GWT JS files- if (file.getName().contains(".nocache.js"))- expireTime = 0;- if (file.getName().contains(".cache.js"))- expireTime = EXPIRES_SECONDS_CACHE_JS;-// Don't cache at all in dev modeexpireTime = devMode ? 0 : expireTime;diff --git a/container/src/main/resources/org/openremote/container/web/jsapi/client.js b/container/src/main/resources/org/openremote/container/web/jsapi/client.jsdeleted file mode 100644index 7feaf4829..000000000--- a/container/src/main/resources/org/openremote/container/web/jsapi/client.js+++ /dev/null@@ -1,556 +0,0 @@-// namespace-openremote.REST = {- apiURL: null,- debug: false,- loglevel: 0,- antiBrowserCache: false,- cacheHeaders: []-};--// helper function-openremote.REST.getKeys = function (o) {- if (o !== Object(o))- throw new TypeError('openremote.REST.getKeys called on non-object');- var ret = [], p;- for (p in o) if (Object.prototype.hasOwnProperty.call(o, p)) ret.push(p);- return ret;-};--// constructor-openremote.REST.Request = function () {- openremote.REST.log("Creating new Request");- this.uri = null;- this.method = "GET";- this.username = null;- this.password = null;- this.acceptHeader = "*/*";- this.contentTypeHeader = null;- this.async = true;- this.queryParameters = [];- this.matrixParameters = [];- this.formParameters = [];- this.forms = [];- this.cookies = [];- this.headers = [];- this.entity = null;-};--openremote.REST.Request.prototype = {- execute: function (callback) {- var request = new XMLHttpRequest();- var url = this.uri;-- if (openremote.REST.antiBrowserCache == true) {- request.url = url;- }-- var restRequest = this;- for (var i = 0; i < this.matrixParameters.length; i++) {- url += ";" + openremote.REST.Encoding.encodePathParamName(this.matrixParameters[i][0]);- url += "=" + openremote.REST.Encoding.encodePathParamValue(this.matrixParameters[i][1]);- }- for (var i = 0; i < this.queryParameters.length; i++) {- if (i == 0)- url += "?";- else- url += "&";- url += openremote.REST.Encoding.encodeQueryParamNameOrValue(this.queryParameters[i][0]);- url += "=" + openremote.REST.Encoding.encodeQueryParamNameOrValue(this.queryParameters[i][1]);- }- for (var i = 0; i < this.cookies.length; i++) {- document.cookie = encodeURI(this.cookies[i][0])- + "=" + encodeURI(this.cookies[i][1]);- }- if (this.username && this.password) {- // TODO Must be async false or Safari will popup 401 dialog- // TODO Must set dummy URL username or Chrome will popup 401 dialog but that leads to weird behavior in Safari...- request.open(this.method, url, this.async);- var credentials = "Basic " + btoa(this.username + ":" + this.password);- request.setRequestHeader("Authorization", credentials);- } else {- request.open(this.method, url, this.async);- }-- var acceptSet = false;- var contentTypeSet = false;- for (var i = 0; i < this.headers.length; i++) {- if (this.headers[i][0].toLowerCase() == 'accept')- acceptSet = this.headers[i][1];- if (this.headers[i][0].toLowerCase() == 'content-type')- contentTypeSet = this.headers[i][1];- request.setRequestHeader(openremote.REST.Encoding.encodeHeaderName(this.headers[i][0]),- openremote.REST.Encoding.encodeHeaderValue(this.headers[i][1]));- }- if (!acceptSet)- request.setRequestHeader('Accept', this.acceptHeader);- openremote.REST.log("Got form params: " + this.formParameters.length);- // see if we're sending an entity or a form- if (this.entity && (this.formParameters.length > 0 || this.forms.length > 0))- throw "Cannot have both an entity and form parameters";- // form- if (this.formParameters.length > 0 || this.forms.length > 0) {- if (contentTypeSet && contentTypeSet != "application/x-www-form-urlencoded")- throw "The ContentType that was set by header value (" + contentTypeSet + ") is incompatible with form parameters";- if (this.contentTypeHeader && this.contentTypeHeader != "application/x-www-form-urlencoded")- throw "The ContentType that was set with setContentType (" + this.contentTypeHeader + ") is incompatible with form parameters";- contentTypeSet = "application/x-www-form-urlencoded";- request.setRequestHeader('Content-Type', contentTypeSet);- } else if (this.entity && !contentTypeSet && this.contentTypeHeader) {- // entity- contentTypeSet = this.contentTypeHeader;- request.setRequestHeader('Content-Type', this.contentTypeHeader);- }- // we use this flag to work around buggy browsers- var gotReadyStateChangeEvent = false;- if (callback) {- request.onreadystatechange = function () {- gotReadyStateChangeEvent = true;- openremote.REST._complete(this, callback);- };- }- var data = this.entity;- if (this.entity) {- if (this.entity instanceof Element) {- if (!contentTypeSet || openremote.REST._isXMLMIME(contentTypeSet))- data = openremote.REST.serialiseXML(this.entity);- } else if (this.entity instanceof Document) {- if (!contentTypeSet || openremote.REST._isXMLMIME(contentTypeSet))- data = this.entity;- } else if (this.entity instanceof Object) {- if (!contentTypeSet || openremote.REST._isJSONMIME(contentTypeSet))- data = JSON.stringify(this.entity);- }- } else if (this.formParameters.length > 0) {- data = '';- for (var i = 0; i < this.formParameters.length; i++) {- if (i > 0)- data += "&";- data += openremote.REST.Encoding.encodeFormNameOrValue(this.formParameters[i][0]);- data += "=" + openremote.REST.Encoding.encodeFormNameOrValue(this.formParameters[i][1]);- }- } else if (this.forms.length > 0) {- data = '';- for (var i = 0; i < this.forms.length; i++) {- if (i > 0)- data += "&";- var obj = this.forms[i][1];- var key = openremote.REST.getKeys(obj)[0];- data += openremote.REST.Encoding.encodeFormNameOrValue(key);- data += "=" + openremote.REST.Encoding.encodeFormNameOrValue(obj[key]);- }- }- openremote.REST.log("Content-Type set to " + contentTypeSet);- openremote.REST.log("Entity set to " + data);- request.send(data);- // now if the browser did not follow the specs and did not fire the events while synchronous,- // handle it manually- if (!this.async && !gotReadyStateChangeEvent && callback) {- openremote.REST.log("Working around browser readystatechange bug");- openremote.REST._complete(request, callback);- }-- if (openremote.REST.debug == true) {- openremote.REST.lastRequest = request;- }-- if (openremote.REST.antiBrowserCache == true && request.status != 304) {- var _cachedHeaders = {- "Etag": request.getResponseHeader('Etag'),- "Last-Modified": request.getResponseHeader('Last-Modified'),- "entity": request.responseText- };-- var signature = openremote.REST._generate_cache_signature(url);- openremote.REST._remove_deprecated_cache_signature(signature);- openremote.REST._addToArray(openremote.REST.cacheHeaders, signature, _cachedHeaders);- }- },- setAccepts: function (acceptHeader) {- openremote.REST.log("setAccepts(" + acceptHeader + ")");- this.acceptHeader = acceptHeader;- },- setCredentials: function (username, password) {- this.password = password;- this.username = username;- },- setEntity: function (entity) {- openremote.REST.log("setEntity(" + entity + ")");- this.entity = entity;- },- setContentType: function (contentType) {- openremote.REST.log("setContentType(" + contentType + ")");- this.contentTypeHeader = contentType;- },- setURI: function (uri) {- openremote.REST.log("setURI(" + uri + ")");- this.uri = uri;- },- setMethod: function (method) {- openremote.REST.log("setMethod(" + method + ")");- this.method = method;- },- setAsync: function (async) {- openremote.REST.log("setAsync(" + async + ")");- this.async = async;- },- addCookie: function (name, value) {- openremote.REST.log("addCookie(" + name + "=" + value + ")");- openremote.REST._addToArray(this.cookies, name, value);- },- addQueryParameter: function (name, value) {- openremote.REST.log("addQueryParameter(" + name + "=" + value + ")");- openremote.REST._addToArray(this.queryParameters, name, value);- },- addMatrixParameter: function (name, value) {- openremote.REST.log("addMatrixParameter(" + name + "=" + value + ")");- openremote.REST._addToArray(this.matrixParameters, name, value);- },- addFormParameter: function (name, value) {- openremote.REST.log("addFormParameter(" + name + "=" + value + ")");- openremote.REST._addToArray(this.formParameters, name, value);- },- addForm: function (name, value) {- openremote.REST.log("addForm(" + name + "=" + value + ")");- openremote.REST._addToArray(this.forms, name, value);- },- addHeader: function (name, value) {- openremote.REST.log("addHeader(" + name + "=" + value + ")");- openremote.REST._addToArray(this.headers, name, value);- }-};--openremote.REST.log = function (string) {- if (openremote.REST.loglevel > 0)- console.log(string);-};--openremote.REST._addToArray = function (array, name, value) {- // JsInterop method to convert lists to JS Arrays- value = JsUtil.toJsArray(value);-- if (Array.isArray(value)) {- for (var i = 0; i < value.length; i++) {- array.push([name, value[i]]);- }- } else {- array.push([name, value]);- }-};--openremote.REST._generate_cache_signature = function (url) {- return url.replace(/\?resteasy_jsapi_anti_cache=\d+/, '');-};--openremote.REST._remove_deprecated_cache_signature = function (signature) {- for (idx in openremote.REST.cacheHeaders) {- var _signature = openremote.REST.cacheHeaders[idx][0];- if (signature == _signature) {- openremote.REST.cacheHeaders.splice(idx, 1);- }- }--};--openremote.REST._get_cache_signature = function (signature) {- for (idx in openremote.REST.cacheHeaders) {- var _signature = openremote.REST.cacheHeaders[idx][0];- if (signature == _signature) {- return openremote.REST.cacheHeaders[idx];- }- }- return null;-};--openremote.REST._complete = function (request, callback) {- openremote.REST.log("Request ready state: " + request.readyState);- if (request.readyState == 4) {- var entity;- openremote.REST.log("Request response status: " + request.status);-- if (request.status >= 200 && request.status < 300) {- request.onreadystatechange = null;- entity = openremote.REST._readResponseEntity(request);- } else if (request.status == 400) {- entity = openremote.REST._readResponseEntity(request);- }-- if (request.status == 304) {- entity = openremote.REST._get_cache_signature(openremote.REST._generate_cache_signature(request.url))[1]['entity'];- }- openremote.REST.log("Calling callback with: " + entity);- callback(request.status, request, entity);- }-};--openremote.REST._readResponseEntity= function (request) {- /* TODO: we marshall in GWT- var contentType = request.getResponseHeader("Content-Type");- if (contentType != null) {- if (openremote.REST._isXMLMIME(contentType))- return request.responseXML;- else if (openremote.REST._isJSONMIME(contentType))- return JSON.parse(request.responseText);- else- return request.responseText;- } else {- return request.responseText;- }- */- return request.responseText;-};--openremote.REST._isXMLMIME = function (contentType) {- return contentType == "text/xml"- || contentType == "application/xml"- || (contentType.indexOf("application/") == 0- && contentType.lastIndexOf("+xml") == (contentType.length - 4));-};--openremote.REST._isJSONMIME = function (contentType) {- return contentType == "application/json"- || (contentType.indexOf("application/") == 0- && contentType.lastIndexOf("+json") == (contentType.length - 5));-};--/* Encoding */--openremote.REST.Encoding = {};--openremote.REST.Encoding.hash = function (a) {- var ret = {};- for (var i = 0; i < a.length; i++)- ret[a[i]] = 1;- return ret;-};--//-// rules--openremote.REST.Encoding.Alpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];--openremote.REST.Encoding.Numeric = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];--openremote.REST.Encoding.AlphaNum = [].concat(openremote.REST.Encoding.Alpha, openremote.REST.Encoding.Numeric);--openremote.REST.Encoding.AlphaNumHash = openremote.REST.Encoding.hash(openremote.REST.Encoding.AlphaNum);--/**- * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"- */-openremote.REST.Encoding.Unreserved = [].concat(openremote.REST.Encoding.AlphaNum, ['-', '.', '_', '~']);--/**- * gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"- */-openremote.REST.Encoding.GenDelims = [':', '/', '?', '#', '[', ']', '@'];--/**- * sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="- */-openremote.REST.Encoding.SubDelims = ['!', '$', '&', '\'', '(', ')', '*', '+', ',', ';', '='];--/**- * reserved = gen-delims | sub-delims- */-openremote.REST.Encoding.Reserved = [].concat(openremote.REST.Encoding.GenDelims, openremote.REST.Encoding.SubDelims);--/**- * pchar = unreserved | escaped | sub-delims | ":" | "@"- *- * Note: we don't allow escaped here since we will escape it ourselves, so we don't want to allow them in the- * unescaped sequences- */-openremote.REST.Encoding.PChar = [].concat(openremote.REST.Encoding.Unreserved, openremote.REST.Encoding.SubDelims, [':', '@']);--/**- * path_segment = pchar <without> ";"- */-openremote.REST.Encoding.PathSegmentHash = openremote.REST.Encoding.hash(openremote.REST.Encoding.PChar);-delete openremote.REST.Encoding.PathSegmentHash[";"];--/**- * path_param_name = pchar <without> ";" | "="- */-openremote.REST.Encoding.PathParamHash = openremote.REST.Encoding.hash(openremote.REST.Encoding.PChar);-delete openremote.REST.Encoding.PathParamHash[";"];-delete openremote.REST.Encoding.PathParamHash["="];--/**- * path_param_value = pchar <without> ";"- */-openremote.REST.Encoding.PathParamValueHash = openremote.REST.Encoding.hash(openremote.REST.Encoding.PChar);-delete openremote.REST.Encoding.PathParamValueHash[";"];--/**- * query = pchar / "/" / "?"- */-openremote.REST.Encoding.QueryHash = openremote.REST.Encoding.hash([].concat(openremote.REST.Encoding.PChar, ['/', '?']));-// deviate from the RFC to disallow separators such as "=", "@" and the famous "+" which is treated as a space-// when decoding-delete openremote.REST.Encoding.QueryHash["="];-delete openremote.REST.Encoding.QueryHash["&"];-delete openremote.REST.Encoding.QueryHash["+"];--/**- * fragment = pchar / "/" / "?"- */-openremote.REST.Encoding.FragmentHash = openremote.REST.Encoding.hash([].concat(openremote.REST.Encoding.PChar, ['/', '?']));--// HTTP--openremote.REST.Encoding.HTTPSeparators = ["(", ")", "<", ">", "@"- , ",", ";", ":", "\\", "\""- , "/", "[", "]", "?", "="- , "{", "}", ' ', '\t'];--// This should also hold the CTLs but we never need them-openremote.REST.Encoding.HTTPChar = [];-(function () {- for (var i = 32; i < 127; i++)- openremote.REST.Encoding.HTTPChar.push(String.fromCharCode(i));-})();--// CHAR - separators-openremote.REST.Encoding.HTTPToken = openremote.REST.Encoding.hash(openremote.REST.Encoding.HTTPChar);-(function () {- for (var i = 0; i < openremote.REST.Encoding.HTTPSeparators.length; i++)- delete openremote.REST.Encoding.HTTPToken[openremote.REST.Encoding.HTTPSeparators[i]];-})();--//-// functions--//see http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1-//and http://www.apps.ietf.org/rfc/rfc1738.html#page-4-openremote.REST.Encoding.encodeFormNameOrValue = function (val) {- return openremote.REST.Encoding.encodeValue(val, openremote.REST.Encoding.AlphaNumHash, true);-};---//see http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2-openremote.REST.Encoding.encodeHeaderName = function (val) {- // token+ from http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2-- // There is no way to encode a header name. it is either a valid token or invalid and the- // XMLHttpRequest will fail (http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader-method)- // What we could do here is throw if the value is invalid- return val;-};--//see http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2-openremote.REST.Encoding.encodeHeaderValue = function (val) {- // *TEXT or combinations of token, separators, and quoted-string from http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2- // FIXME: implement me. Stef has given up, since it involves latin1, quoted strings, MIME encoding (http://www.ietf.org/rfc/rfc2047.txt)- // which mentions a limit on encoded value of 75 chars, which should be split into several lines. This is mad.- return val;-};--// see http://www.ietf.org/rfc/rfc3986.txt-openremote.REST.Encoding.encodeQueryParamNameOrValue = function (val) {- return openremote.REST.Encoding.encodeValue(val, openremote.REST.Encoding.QueryHash);-};--//see http://www.ietf.org/rfc/rfc3986.txt-openremote.REST.Encoding.encodePathSegment = function (val) {- return openremote.REST.Encoding.encodeValue(val, openremote.REST.Encoding.PathSegmentHash);-};--//see http://www.ietf.org/rfc/rfc3986.txt-openremote.REST.Encoding.encodePathParamName = function (val) {- return openremote.REST.Encoding.encodeValue(val, openremote.REST.Encoding.PathParamHash);-};--//see http://www.ietf.org/rfc/rfc3986.txt-openremote.REST.Encoding.encodePathParamValue = function (val) {- return openremote.REST.Encoding.encodeValue(val, openremote.REST.Encoding.PathParamValueHash);-};--openremote.REST.Encoding.encodeValue = function (val, allowed, form) {- if (typeof val != "string") {- return val;- }- if (val.length == 0) {- return val;- }- var ret = '';- for (var i = 0; i < val.length; i++) {- var first = val[i];- if (allowed[first] == 1) {- ret = ret.concat(first);- } else if (form && (first == ' ' || first == '\n')) {- // special rules for application/x-www-form-urlencoded- if (first == ' ')- ret += '+';- else- ret += '%0D%0A';- } else {- // See http://www.faqs.org/rfcs/rfc2781.html 2.2-- // switch to codepoint- first = val.charCodeAt(i);- // utf-16 pair?- if (first < 0xD800 || first > 0xDFFF) {- // just a single utf-16 char- ret = ret.concat(openremote.REST.Encoding.percentUTF8(first));- } else {- if (first > 0xDBFF || i + 1 >= val.length)- throw "Invalid UTF-16 value: " + val;- var second = val.charCodeAt(++i);- if (second < 0xDC00 || second > 0xDFFF)- throw "Invalid UTF-16 value: " + val;- // char = 10 lower bits of first shifted left + 10 lower bits of second- var c = ((first & 0x3FF) << 10) | (second & 0x3FF);- // and add this- c += 0x10000;- // char is now 32 bit unicode- ret = ret.concat(openremote.REST.Encoding.percentUTF8(c));- }- }- }- return ret;-};--// see http://tools.ietf.org/html/rfc3629-openremote.REST.Encoding.percentUTF8 = function (c) {- if (c < 0x80)- return openremote.REST.Encoding.percentByte(c);- if (c < 0x800) {- var first = 0xC0 | ((c & 0x7C0) >> 6);- var second = 0x80 | (c & 0x3F);- return openremote.REST.Encoding.percentByte(first, second);- }- if (c < 0x10000) {- var first = 0xE0 | ((c >> 12) & 0xF);- var second = 0x80 | ((c >> 6) & 0x3F);- var third = 0x80 | (c & 0x3F);- return openremote.REST.Encoding.percentByte(first, second, third);- }- if (c < 0x110000) {- var first = 0xF0 | ((c >> 18) & 0x7);- var second = 0x80 | ((c >> 12) & 0x3F);- var third = 0x80 | ((c >> 6) & 0x3F);- var fourth = 0x80 | (c & 0x3F);- return openremote.REST.Encoding.percentByte(first, second, third, fourth);- }- throw "Invalid character for UTF-8: " + c;-};--openremote.REST.Encoding.percentByte = function () {- var ret = '';- for (var i = 0; i < arguments.length; i++) {- var b = arguments[i];- if (b >= 0 && b <= 15)- ret += "%0" + b.toString(16);- else- ret += "%" + b.toString(16);- }- return ret;-};--openremote.REST.serialiseXML = function (node) {- if (typeof XMLSerializer != "undefined")- return (new XMLSerializer()).serializeToString(node);- else if (node.xml) return node.xml;- else throw "XML.serialize is not supported or can't serialize " + node;-};diff --git a/manager/src/main/java/org/openremote/manager/web/ManagerWebService.java b/manager/src/main/java/org/openremote/manager/web/ManagerWebService.javaindex e4b673f4c..eb4edcfef 100644--- a/manager/src/main/java/org/openremote/manager/web/ManagerWebService.java+++ b/manager/src/main/java/org/openremote/manager/web/ManagerWebService.java@@ -63,8 +63,6 @@ public class ManagerWebService extends WebService {public static final String APP_DOCROOT_DEFAULT = "deployment/build/manager/app";public static final String SHARED_DOCROOT = "SHARED_DOCROOT";public static final String SHARED_DOCROOT_DEFAULT = "deployment/manager/shared";- public static final String CONSOLE_USE_STATIC_BOWER_COMPONENTS = "CONSOLE_USE_STATIC_BOWER_COMPONENTS";- public static final boolean CONSOLE_USE_STATIC_BOWER_COMPONENTS_DEFAULT = true;public static final String APP_DEFAULT = "APP_DEFAULT";public static final String APP_DEFAULT_DEFAULT = "main";public static final String API_PATH = "/api";@@ -153,64 +151,18 @@ public class ManagerWebService extends WebService {}};- // TODO: Remove this once GWT client is replaced- // Add a file handler for GWT source files in dev mode- Path gwtSourceDir = Paths.get("client/src/main/webapp");-- if (Files.exists(gwtSourceDir) && container.isDevMode()) {- final HttpHandler baseGwtFileHandler = createFileHandler(devMode, identityService, gwtSourceDir, null);- final HttpHandler gwtFileHandler = exchange -> {- if (exchange.getRelativePath().isEmpty() || "/".equals(exchange.getRelativePath())) {- exchange.setRelativePath("/index.html");- }- baseGwtFileHandler.handleRequest(exchange);- };- HttpHandler standardHandler = appFileHandler;-- appFileHandler = exchange -> {- String path = exchange.getRelativePath();- if (path.startsWith("/manager")) {- exchange.setRelativePath(path.substring(8));- gwtFileHandler.handleRequest(exchange);- } else if (path.startsWith("/app/manager")) {- exchange.setRelativePath(path.substring(12));- gwtFileHandler.handleRequest(exchange);- } else {- standardHandler.handleRequest(exchange);- }- };- }- HttpHandler finalAppFileHandler = appFileHandler;-// Serve deployment filesPathHandler deploymentHandler = new PathHandler(appFileHandler)// TODO: Update this static file http handler to use shared folder in deployment.addPrefixPath(STATIC_PATH, exchange -> {- // TODO: Remove this horrible hack for crappy polymer 2.x NPM package relative import issue- if (exchange.getRelativePath().startsWith("/node_modules/@polymer/shadycss")) {- exchange.setRelativePath("/node_modules/@webcomponents/shadycss" + exchange.getRequestPath().substring(38));- exchange.setRequestPath(STATIC_PATH + exchange.getRelativePath());- }-exchange.setRelativePath("/manager" + exchange.getRelativePath());- finalAppFileHandler.handleRequest(exchange);+ appFileHandler.handleRequest(exchange);}).addPrefixPath(APP_PATH, appFileHandler)// TODO: Remove this path prefix at some point.addPrefixPath(CONSOLE_PATH, appFileHandler).addPrefixPath(SHARED_PATH, sharedFileHandler);- // TODO: Remove this once all apps updated to new structure- final boolean useStaticBowerComponents =- getBoolean(container.getConfig(), CONSOLE_USE_STATIC_BOWER_COMPONENTS, CONSOLE_USE_STATIC_BOWER_COMPONENTS_DEFAULT);- if (useStaticBowerComponents) {- deploymentHandler.addPrefixPath("/bower_components", exchange -> {- exchange.setRequestPath("/manager/bower_components" + exchange.getRequestPath());- finalAppFileHandler.handleRequest(exchange);- });- }--// Add all route handlers required by the manager in priority order// Redirect / to default appdiff --git a/model/src/main/java/org/openremote/model/rules/Ruleset.java b/model/src/main/java/org/openremote/model/rules/Ruleset.javaindex e5fcabdbb..d5123b4b9 100644--- a/model/src/main/java/org/openremote/model/rules/Ruleset.java+++ b/model/src/main/java/org/openremote/model/rules/Ruleset.java@@ -246,8 +246,8 @@ public abstract class Ruleset {@PreUpdate@PrePersist- public void updateLastModified() { // Don't call this setLastModified(), it confuses gwt-jackson- setLastModified(new Date());+ public Ruleset setLastModified() {+ return setLastModified(new Date());}public Ruleset setLastModified(Date lastModified) {diff --git a/model/src/main/java/org/openremote/model/syslog/SyslogEvent.java b/model/src/main/java/org/openremote/model/syslog/SyslogEvent.javaindex a34c90585..e75d8cb8b 100644--- a/model/src/main/java/org/openremote/model/syslog/SyslogEvent.java+++ b/model/src/main/java/org/openremote/model/syslog/SyslogEvent.java@@ -129,15 +129,14 @@ public class SyslogEvent extends SharedEvent {}public String getCategoryLabel() {- return getCategory().name() + getSubCategoryOptional().map(s -> " - " + s).orElse("");+ return getCategory().name() + getSubCategory().map(s -> " - " + s).orElse("");}public void setCategory(SyslogCategory category) {this.category = category;}- // GWT Jackson doesn't like it if it has the same name as a field but different return type...- public Optional<String> getSubCategoryOptional() {+ public Optional<String> getSubCategory() {return Optional.ofNullable(subCategory);}diff --git a/profile/deploy-no-build.yml b/profile/deploy-no-build.ymlindex cf16f24b8..02fa5af38 100644--- a/profile/deploy-no-build.yml+++ b/profile/deploy-no-build.yml@@ -184,12 +184,6 @@ services:# Custom default app name to load when '/' is requestedAPP_DEFAULT: ${APP_DEFAULT:-main}- # Disable HTTP redirects when a console application requests libraries which- # are delivered and used on the platform. This is necessary if your console application- # needs a different version of Polymer, Chart JS, or any of the other "bower_components"- # which are by default served as static resources from the manager service.- # CONSOLE_USE_STATIC_BOWER_COMPONENTS = 'false'-# Map related settings.# Provide a path to the map tiles database file (see https://openmaptiles.com/).# MAP_TILES_PATH: '/deployment/map/mapdata.mbtiles'diff --git a/profile/deploy.yml b/profile/deploy.ymlindex 6bed8434c..89f656a2c 100644--- a/profile/deploy.yml+++ b/profile/deploy.yml@@ -199,12 +199,6 @@ services:# Custom default app name to load when '/' is requestedAPP_DEFAULT: ${APP_DEFAULT:-main}- # Disable HTTP redirects when a console application requests libraries which- # are delivered and used on the platform. This is necessary if your console application- # needs a different version of Polymer, Chart JS, or any of the other "bower_components"- # which are by default served as static resources from the manager service.- # CONSOLE_USE_STATIC_BOWER_COMPONENTS = 'false'-# Map related settings.# Provide a path to the map tiles database file (see https://openmaptiles.com/).# MAP_TILES_PATH: '/deployment/map/mapdata.mbtiles'diff --git a/profile/dev.yml b/profile/dev.ymlindex 08b5e5f30..dcb65bc27 100644--- a/profile/dev.yml+++ b/profile/dev.yml@@ -29,8 +29,6 @@ services:# Use local deployment data in host-mapped directory for easy development. The# ../deployment directory is the one which will be baked into the managers image.- ${DEPLOYMENT_DIRECTORY:-../deployment}:/deployment- # Need to map GWT manager client into container when in dev mode- - ../client:/opt/app/clientenvironment:IDENTITY_NETWORK_WEBSERVER_PORT: 8080IDENTITY_NETWORK_SECURE: 'false'@@ -60,4 +58,4 @@ services:ports:- "5432:5432"volumes:- - postgresql-data:/var/lib/postgresql/data\ No newline at end of file+ - postgresql-data:/var/lib/postgresql/data