use of org.opennms.features.topology.api.info.MeasurementsWrapper in project opennms by OpenNMS.
the class GraphMLEdgeStatusProvider method createBindings.
private SimpleBindings createBindings(GraphMLEdge edge) {
SimpleBindings bindings = new SimpleBindings();
bindings.put("edge", edge);
bindings.put("sourceNode", getNodeForEdgeVertexConnector(edge.getSource()));
bindings.put("targetNode", getNodeForEdgeVertexConnector(edge.getTarget()));
bindings.put("measurements", new MeasurementsWrapper(serviceAccessor.getMeasurementsService()));
bindings.put("nodeDao", serviceAccessor.getNodeDao());
bindings.put("snmpInterfaceDao", serviceAccessor.getSnmpInterfaceDao());
return bindings;
}
use of org.opennms.features.topology.api.info.MeasurementsWrapper in project opennms by OpenNMS.
the class GenericInfoPanelItemProvider method createContext.
private Map<String, Object> createContext(final GraphContainer container) {
final Map<String, Object> context = Maps.newHashMap();
Optional.ofNullable(Iterables.getOnlyElement(container.getSelectionManager().getSelectedEdgeRefs(), null)).map(this::createEdgeContext).ifPresent(context::putAll);
Optional.ofNullable(Iterables.getOnlyElement(container.getSelectionManager().getSelectedVertexRefs(), null)).map(this::createVertexContext).ifPresent(context::putAll);
context.put("measurements", new MeasurementsWrapper(measurementsService));
return context;
}
Aggregations