Search in sources :

Example 1 with Status

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

the class AlarmTopovMessageHandler method createBadge.

private NodeBadge createBadge(int n) {
    Status status = n > 0 ? Status.ERROR : Status.INFO;
    String noun = n > 0 ? "(Alarmed)" : "(Normal)";
    String msg = "Alarms: " + n + " " + noun;
    return NodeBadge.number(status, n, msg);
}
Also used : Status(org.onosproject.ui.topo.NodeBadge.Status)

Aggregations

Status (org.onosproject.ui.topo.NodeBadge.Status)1