Loading src/webui/service/main/routes.py +4 −2 Original line number Diff line number Diff line Loading @@ -136,7 +136,7 @@ def topology(): if device.device_id.device_uuid.uuid not in topo_device_uuids: continue devices.append({ 'id': device.device_id.device_uuid.uuid, 'name': device.device_id.device_uuid.uuid, 'name': device.name, 'type': device.device_type, }) Loading @@ -150,13 +150,15 @@ def topology(): continue links.append({ 'id': link.link_id.link_uuid.uuid, 'name': link.name, 'source': link.link_endpoint_ids[0].device_id.device_uuid.uuid, 'target': link.link_endpoint_ids[1].device_id.device_uuid.uuid, }) return jsonify({'devices': devices, 'links': links}) except: except: # pylint: disable=bare-except LOGGER.exception('Error retrieving topology') return jsonify({'devices': [], 'links': []}) finally: context_client.close() Loading src/webui/service/templates/js/topology.js +2 −2 Original line number Diff line number Diff line Loading @@ -88,9 +88,9 @@ d3.json("{{ url_for('main.topology') }}", function(data) { .call(d3.drag().on("start", dragstarted).on("drag", dragged).on("end", dragended)); // node tooltip node.append("title").text(function(d) { return d.id; }); node.append("title").text(function(n) { return n.name + ' (' + n.id + ')'; }); // link tooltip link.append("title").text(function(d) { return d.id; }); link.append("title").text(function(l) { return l.name + ' (' + l.id + ')'; }); // link style link Loading Loading
src/webui/service/main/routes.py +4 −2 Original line number Diff line number Diff line Loading @@ -136,7 +136,7 @@ def topology(): if device.device_id.device_uuid.uuid not in topo_device_uuids: continue devices.append({ 'id': device.device_id.device_uuid.uuid, 'name': device.device_id.device_uuid.uuid, 'name': device.name, 'type': device.device_type, }) Loading @@ -150,13 +150,15 @@ def topology(): continue links.append({ 'id': link.link_id.link_uuid.uuid, 'name': link.name, 'source': link.link_endpoint_ids[0].device_id.device_uuid.uuid, 'target': link.link_endpoint_ids[1].device_id.device_uuid.uuid, }) return jsonify({'devices': devices, 'links': links}) except: except: # pylint: disable=bare-except LOGGER.exception('Error retrieving topology') return jsonify({'devices': [], 'links': []}) finally: context_client.close() Loading
src/webui/service/templates/js/topology.js +2 −2 Original line number Diff line number Diff line Loading @@ -88,9 +88,9 @@ d3.json("{{ url_for('main.topology') }}", function(data) { .call(d3.drag().on("start", dragstarted).on("drag", dragged).on("end", dragended)); // node tooltip node.append("title").text(function(d) { return d.id; }); node.append("title").text(function(n) { return n.name + ' (' + n.id + ')'; }); // link tooltip link.append("title").text(function(d) { return d.id; }); link.append("title").text(function(l) { return l.name + ' (' + l.id + ')'; }); // link style link Loading