Hiding geo dashboard tools when GeoLocationConfiguration is Disabled

4.x.x
Rasika Perera 7 years ago
parent ab606238d9
commit 83d0793a35

@ -28,6 +28,7 @@ import javax.xml.bind.annotation.XmlRootElement;
public class GeoLocationConfiguration {
private boolean publishLocationOperationResponse;
private boolean isEnabled;
public boolean getPublishLocationOperationResponse() {
return publishLocationOperationResponse;
@ -37,4 +38,13 @@ public class GeoLocationConfiguration {
public void setPublishLocationOperationResponse(boolean publishLocationOperationResponse) {
this.publishLocationOperationResponse = publishLocationOperationResponse;
}
public boolean getIsEnabled() {
return isEnabled;
}
@XmlElement(name = "isEnabled", required = true)
public void setEnabled(boolean enabled) {
isEnabled = enabled;
}
}

@ -56,6 +56,8 @@ var conf = function () {
}
}
);
var DeviceConfigurationManager = Packages.org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
conf["serverConfig"] = DeviceConfigurationManager.getInstance().getDeviceManagementConfig();
application.put("CONF", conf);
}
return conf;

@ -52,6 +52,6 @@ function onRequest(context) {
} else {
viewModel.lastLocation = stringify({});
}
viewModel.showGeoFencingTools = true;
viewModel.showGeoFencingTools = devicemgtProps.serverConfig.geoLocationConfiguration.isEnabled;
return viewModel;
}

@ -79,6 +79,7 @@
<ExpiryTime>600</ExpiryTime>
</DeviceCacheConfiguration>
<GeoLocationConfiguration>
<isEnabled>false</isEnabled>
<PublishLocationOperationResponse>false</PublishLocationOperationResponse>
</GeoLocationConfiguration>
</DeviceMgtConfiguration>

Loading…
Cancel
Save