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
UI update: Fix relative manager URL (#1712)
Wouter Bornc4ed8f295c9d
diff --git a/ui/component/core/src/index.ts b/ui/component/core/src/index.tsindex 9b5f46397..aa47ef9f0 100644--- a/ui/component/core/src/index.ts+++ b/ui/component/core/src/index.ts@@ -92,7 +92,7 @@ export function normaliseConfig(config: ManagerConfig): ManagerConfig {if (!normalisedConfig.managerUrl || normalisedConfig.managerUrl === "") {// Assume manager is running on same host as this codenormalisedConfig.managerUrl = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : "")- + window.location.pathname.replace(/\/manager\/\S*/g, "");+ + window.location.pathname.replace(/\/[^/]+\/?$/, '');} else {// Normalise by stripping any trailing slashesnormalisedConfig.managerUrl = normalisedConfig.managerUrl.replace(/\/+$/, "");