use of org.opennms.features.poller.remote.gwt.client.GWTMarkerState in project opennms by OpenNMS.
the class DefaultLocationDataService method getLocationInfo.
private LocationInfo getLocationInfo(final OnmsMonitoringLocation def, final StatusDetails monitorStatus) {
GWTLatLng latLng = getLatLng(def, false);
if (latLng == null) {
LOG.debug("no geolocation or coordinates found, using OpenNMS World HQ");
latLng = new GWTLatLng(35.715751, -79.16262);
}
final GWTMarkerState state = new GWTMarkerState(def.getLocationName(), latLng, Status.UNKNOWN);
Set<String> tags = new TreeSet<String>();
if (def.getTags() != null) {
for (String tag : def.getTags()) {
tags.add(tag);
}
}
final LocationInfo locationInfo = new LocationInfo(def.getLocationName(), def.getMonitoringArea(), def.getGeolocation(), latLng.getCoordinates(), def.getPriority(), state, null, tags);
state.setStatus(monitorStatus.getStatus());
locationInfo.setStatusDetails(monitorStatus);
//LOG.debug("getLocationInfo({}) returning {}", def.getLocationName(), locationInfo);
return locationInfo;
}
Aggregations