protected static String getNodeTooltipText( OnmsNode node, AbstractVertex vertex, OnmsIpInterface ip) { StringBuffer tooltipText = new StringBuffer(); /* if (node.getSysDescription() != null && node.getSysDescription().length() >0) { tooltipText.append(HTML_TOOLTIP_TAG_OPEN); tooltipText.append("Description: " + node.getSysDescription()); tooltipText.append(HTML_TOOLTIP_TAG_END); } */ tooltipText.append(HTML_TOOLTIP_TAG_OPEN); tooltipText.append( "Management IP and Name: " + vertex.getIpAddress() + " (" + vertex.getLabel() + ")"); tooltipText.append(HTML_TOOLTIP_TAG_END); if (node.getSysLocation() != null && node.getSysLocation().length() > 0) { tooltipText.append(HTML_TOOLTIP_TAG_OPEN); tooltipText.append("Location: " + node.getSysLocation()); tooltipText.append(HTML_TOOLTIP_TAG_END); } tooltipText.append(HTML_TOOLTIP_TAG_OPEN); tooltipText.append("Status: " + getNodeStatusString(node.getType())); if (ip != null && ip.isManaged()) { tooltipText.append(" / Managed"); } else { tooltipText.append(" / Unmanaged"); } tooltipText.append(HTML_TOOLTIP_TAG_END); return tooltipText.toString(); }
/** * mergeAgentAttributes * * @param scannedNode a {@link org.opennms.netmgt.model.OnmsNode} object. */ public void mergeAgentAttributes(OnmsNode scannedNode) { if (hasNewValue(scannedNode.getSysContact(), getSysContact())) { setSysContact(scannedNode.getSysContact()); } if (hasNewValue(scannedNode.getSysDescription(), getSysDescription())) { setSysDescription(scannedNode.getSysDescription()); } if (hasNewValue(scannedNode.getSysLocation(), getSysLocation())) { setSysLocation(scannedNode.getSysLocation()); } if (hasNewValue(scannedNode.getSysName(), getSysName())) { setSysName(scannedNode.getSysName()); } if (hasNewValue(scannedNode.getSysObjectId(), getSysObjectId())) { setSysObjectId(scannedNode.getSysObjectId()); } }