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
Manager_config: do not overwrite image paths if the image is not actually copied, other bugfixes (#1632)
Panos Kalogeropoulos0c110426fd75
diff --git a/manager/src/main/java/org/openremote/manager/app/ConfigurationService.java b/manager/src/main/java/org/openremote/manager/app/ConfigurationService.javaindex f0e562cc8..8f9325536 100644--- a/manager/src/main/java/org/openremote/manager/app/ConfigurationService.java+++ b/manager/src/main/java/org/openremote/manager/app/ConfigurationService.java@@ -276,10 +276,10 @@ public class ConfigurationService implements ContainerService {managerAppRealmConfig.setLogo(fixImageRef(managerAppRealmConfig.getLogo()));}if (!TextUtil.isNullOrEmpty(managerAppRealmConfig.getLogoMobile())) {- managerAppRealmConfig.setLogo(fixImageRef(managerAppRealmConfig.getLogoMobile()));+ managerAppRealmConfig.setLogoMobile(fixImageRef(managerAppRealmConfig.getLogoMobile()));}if (!TextUtil.isNullOrEmpty(managerAppRealmConfig.getFavicon())) {- managerAppRealmConfig.setLogo(fixImageRef(managerAppRealmConfig.getFavicon()));+ managerAppRealmConfig.setFavicon(fixImageRef(managerAppRealmConfig.getFavicon()));}});}@@ -287,6 +287,7 @@ public class ConfigurationService implements ContainerService {}protected String fixImageRef(String image) {+ String originalString = image;if (!image.isBlank()) {image = image.replace("/api/master/configuration/manager/image/", "");image = image.replace("images/", "");@@ -303,11 +304,13 @@ public class ConfigurationService implements ContainerService {// Change the reference in the config to the typical API-like reference:image = "/api/master/configuration/manager/image/" + imagePath;} catch (Exception e) {- LOG.warning("Error occurred whilst copying manager config image to persisted path: " + imagePath);+ LOG.warning("Error occurred whilst copying manager config image to persisted path: " + persistedImagePath);}} else {LOG.warning("manager_config.json image reference doesn't exist: " + imagePath);}+ } else {+ return originalString;}}return image;