Search in sources :

Example 1 with PropertyPanel

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

the class TopologyViewMessageHandler method requestSummary.

// Subscribes for summary messages.
private synchronized void requestSummary() {
    PropertyPanel pp = summmaryMessage();
    overlayCache.currentOverlay().modifySummary(pp);
    sendMessage(envelope(SHOW_SUMMARY, json(pp)));
}
Also used : PropertyPanel(org.onosproject.ui.topo.PropertyPanel)

Example 2 with PropertyPanel

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

the class TopologyViewMessageHandlerBase method hostDetails.

// Generates a property panel model for a host details response
protected PropertyPanel hostDetails(HostId hostId) {
    log.debug("generate prop panel data for host {}", hostId);
    Host host = services.host().getHost(hostId);
    Annotations annot = host.annotations();
    String glyphId = glyphForHost(annot);
    LionBundle lion = getLionBundle(LION_TOPO);
    PropertyPanel pp = new PropertyPanel(nameForHost(host), glyphId).navPath(HOST_NAV_PATH).id(hostId.toString());
    addHostBasicProps(pp, host, lion);
    addLocationProps(pp, annot, lion);
    return pp;
}
Also used : Annotations(org.onosproject.net.Annotations) Host(org.onosproject.net.Host) TopoUtils.compactLinkString(org.onosproject.ui.topo.TopoUtils.compactLinkString) LionBundle(org.onosproject.ui.lion.LionBundle) PropertyPanel(org.onosproject.ui.topo.PropertyPanel)

Example 3 with PropertyPanel

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

the class TopologyViewMessageHandlerBase method summmaryMessage.

// Returns property panel model for summary response.
protected PropertyPanel summmaryMessage() {
    // chose NOT to add debug messages, since this is called every few seconds
    Topology topology = services.topology().currentTopology();
    LionBundle lion = getLionBundle(LION_TOPO);
    String panelTitle = lion.getSafe("title_panel_summary");
    return new PropertyPanel(panelTitle, "bird").addProp(VERSION, lion.getSafe(VERSION), version).addSeparator().addProp(DEVICES, lion.getSafe(DEVICES), services.device().getDeviceCount()).addProp(LINKS, lion.getSafe(LINKS), topology.linkCount()).addProp(HOSTS, lion.getSafe(HOSTS), services.host().getHostCount()).addProp(TOPOLOGY_SSCS, lion.getSafe(TOPOLOGY_SSCS), topology.clusterCount()).addSeparator().addProp(INTENTS, lion.getSafe(INTENTS), services.intent().getIntentCount()).addProp(FLOWS, lion.getSafe(FLOWS), services.flow().getFlowRuleCount());
}
Also used : Topology(org.onosproject.net.topology.Topology) TopoUtils.compactLinkString(org.onosproject.ui.topo.TopoUtils.compactLinkString) LionBundle(org.onosproject.ui.lion.LionBundle) PropertyPanel(org.onosproject.ui.topo.PropertyPanel)

Example 4 with PropertyPanel

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

the class TopologyViewMessageHandlerBase method edgeLinkDetails.

// Generates a property panel model for a link details response (edge-link)
protected PropertyPanel edgeLinkDetails(HostId hid, ConnectPoint cp) {
    log.debug("generate prop panel data for edgelink {} {}", hid, cp);
    LionBundle lion = getLionBundle(LION_TOPO);
    String title = lion.getSafe("title_edge_link");
    PropertyPanel pp = new PropertyPanel(title, LINK_GLYPH);
    addLinkHostProps(pp, hid, lion);
    addLinkCpBProps(pp, cp, lion);
    return pp;
}
Also used : TopoUtils.compactLinkString(org.onosproject.ui.topo.TopoUtils.compactLinkString) LionBundle(org.onosproject.ui.lion.LionBundle) PropertyPanel(org.onosproject.ui.topo.PropertyPanel)

Example 5 with PropertyPanel

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

the class TopologyViewMessageHandlerBase method infraLinkDetails.

// Generates a property panel model for a link details response (infra-link)
protected PropertyPanel infraLinkDetails(ConnectPoint cpA, ConnectPoint cpB) {
    log.debug("generate prop panel data for infralink {} {}", cpA, cpB);
    LionBundle lion = getLionBundle(LION_TOPO);
    String title = lion.getSafe("title_infra_link");
    PropertyPanel pp = new PropertyPanel(title, LINK_GLYPH);
    addLinkCpAProps(pp, cpA, lion);
    addLinkCpBProps(pp, cpB, lion);
    addLinkBackingProps(pp, cpA, cpB, lion);
    return pp;
}
Also used : TopoUtils.compactLinkString(org.onosproject.ui.topo.TopoUtils.compactLinkString) LionBundle(org.onosproject.ui.lion.LionBundle) PropertyPanel(org.onosproject.ui.topo.PropertyPanel)

Aggregations

PropertyPanel (org.onosproject.ui.topo.PropertyPanel)6 LionBundle (org.onosproject.ui.lion.LionBundle)5 TopoUtils.compactLinkString (org.onosproject.ui.topo.TopoUtils.compactLinkString)5 Annotations (org.onosproject.net.Annotations)2 Device (org.onosproject.net.Device)1 Host (org.onosproject.net.Host)1 Topology (org.onosproject.net.topology.Topology)1