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
Added realm support via realm query param to manager app
Rich Turner360773f39b16
diff --git a/client/src/main/webapp/src/or-app/or-app-security.html b/client/src/main/webapp/src/or-app/or-app-security.htmlindex 8277863e2..5213c3282 100644--- a/client/src/main/webapp/src/or-app/or-app-security.html+++ b/client/src/main/webapp/src/or-app/or-app-security.html@@ -4,6 +4,8 @@<dom-module id="or-app-security"><template>+ <iron-query-params id="queryParams"></iron-query-params>+<style include="or-style">:host {/* Hide basic auth form by default */@@ -184,14 +186,15 @@super.ready();if (this.login && !this.realm) {- // TODO: Need a realm picker but for now hardcode to master- // if (!window.location.pathname || window.location.pathname.length <= 1) {- // this.set("error", "No tenant realm configured and URL doesn't have any path elements");- // return;- // }- // let realm = window.location.pathname.split('/')[1];- // console.log("No tenant realm configured, using first URL path segment: " + realm);- this.set("realm", "master");+ // TODO: Need a realm picker but for now just use query param+ this.$.queryParams.paramsString = window.location.search.slice(1);+ let queryParams = this.$.queryParams.paramsObject;++ if (queryParams.realm) {+ this.set("realm", queryParams.realm);+ } else {+ this.set("realm", "master");+ }}}