use of org.opennms.features.topology.app.internal.ui.NodeInfoWindow in project opennms by OpenNMS.
the class NodeInfoPanelItemProvider method createComponent.
private Component createComponent(AbstractVertex ref) {
Preconditions.checkState(ref.getNodeID() != null, "no Node ID defined.");
OnmsNode node = nodeDao.get(ref.getNodeID());
FormLayout formLayout = new FormLayout();
formLayout.setSpacing(false);
formLayout.setMargin(false);
formLayout.addComponent(createLabel("Node ID", "" + node.getId()));
final HorizontalLayout nodeButtonLayout = new HorizontalLayout();
Button nodeButton = createButton(node.getLabel(), null, null, event -> new NodeInfoWindow(ref.getNodeID()).open());
nodeButton.setStyleName(BaseTheme.BUTTON_LINK);
nodeButtonLayout.addComponent(nodeButton);
nodeButtonLayout.setCaption("Node Label");
formLayout.addComponent(nodeButtonLayout);
if (!Strings.isNullOrEmpty(node.getSysObjectId())) {
formLayout.addComponent(createLabel("Enterprise OID", node.getSysObjectId()));
}
return formLayout;
}
Aggregations