Search in sources :

Example 1 with DeviceHighlight

use of org.onosproject.ui.topo.DeviceHighlight in project onos by opennetworkinglab.

the class AlarmTopovMessageHandler method addDeviceBadge.

private void addDeviceBadge(Highlights h, DeviceId devId, int n) {
    DeviceHighlight dh = new DeviceHighlight(devId.toString());
    dh.setBadge(createBadge(n));
    h.add(dh);
}
Also used : DeviceHighlight(org.onosproject.ui.topo.DeviceHighlight)

Example 2 with DeviceHighlight

use of org.onosproject.ui.topo.DeviceHighlight in project onos by opennetworkinglab.

the class PathPainterTopovMessageHandler method addDeviceBadge.

private Highlights addDeviceBadge(Highlights h, String elemId, String type) {
    DeviceHighlight dh = new DeviceHighlight(elemId);
    dh.setBadge(createBadge(type));
    h.add(dh);
    return h;
}
Also used : DeviceHighlight(org.onosproject.ui.topo.DeviceHighlight)

Example 3 with DeviceHighlight

use of org.onosproject.ui.topo.DeviceHighlight in project onos by opennetworkinglab.

the class ProtectedIntentMonitor method ensureNodePresent.

// TODO duplicate and can be brought in abstract upper class.
private void ensureNodePresent(Highlights highlights, ElementId eid) {
    String id = eid.toString();
    NodeHighlight nh = highlights.getNode(id);
    if (nh == null) {
        if (eid instanceof DeviceId) {
            nh = new DeviceHighlight(id);
            highlights.add((DeviceHighlight) nh);
        } else if (eid instanceof HostId) {
            nh = new HostHighlight(id);
            highlights.add((HostHighlight) nh);
        }
    }
}
Also used : DeviceHighlight(org.onosproject.ui.topo.DeviceHighlight) DeviceId(org.onosproject.net.DeviceId) HostHighlight(org.onosproject.ui.topo.HostHighlight) NodeHighlight(org.onosproject.ui.topo.NodeHighlight) HostId(org.onosproject.net.HostId)

Example 4 with DeviceHighlight

use of org.onosproject.ui.topo.DeviceHighlight in project onos by opennetworkinglab.

the class TrafficMonitorBase method ensureNodePresent.

protected void ensureNodePresent(Highlights highlights, ElementId eid) {
    String id = eid.toString();
    NodeHighlight nh = highlights.getNode(id);
    if (nh == null) {
        if (eid instanceof DeviceId) {
            nh = new DeviceHighlight(id);
            highlights.add((DeviceHighlight) nh);
        } else if (eid instanceof HostId) {
            nh = new HostHighlight(id);
            highlights.add((HostHighlight) nh);
        }
    }
}
Also used : DeviceHighlight(org.onosproject.ui.topo.DeviceHighlight) DeviceId(org.onosproject.net.DeviceId) HostHighlight(org.onosproject.ui.topo.HostHighlight) NodeHighlight(org.onosproject.ui.topo.NodeHighlight) HostId(org.onosproject.net.HostId)

Aggregations

DeviceHighlight (org.onosproject.ui.topo.DeviceHighlight)4 DeviceId (org.onosproject.net.DeviceId)2 HostId (org.onosproject.net.HostId)2 HostHighlight (org.onosproject.ui.topo.HostHighlight)2 NodeHighlight (org.onosproject.ui.topo.NodeHighlight)2