+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
- activate="factoryStartUp" deactivate="factoryShutDown"
- factory="routing.dijkstra_implementation.factory" name="routing.dijkstra_implementation.ComponentFactory">
- <implementation class="org.opendaylight.controller.routing.dijkstra_implementation.internal.DijkstraImplementation"/>
- <service>
- <provide interface="org.osgi.service.component.ComponentFactory"/>
- </service>
-</scr:component>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
- activate="startUp"
- deactivate="shutDown"
- name="routing.dijkstra_implementation.Component">
- <implementation class="org.opendaylight.controller.routing.dijkstra_implementation.internal.DijkstraImplementation"/>
-
- <service>
- <provide interface="org.opendaylight.controller.sal.routing.IRouting"/>
- <provide interface="org.opendaylight.controller.topologymanager.ITopologyManagerAware"/>
- </service>
- <reference name="IListenRoutingUpdates"
- bind="setListenRoutingUpdates"
- unbind="unsetRoutingUpdates"
- cardinality="0..n"
- policy="dynamic"
- interface="org.opendaylight.controller.sal.routing.IListenRoutingUpdates"/>
-</scr:component>
enable: true,
type: 'Native',
onMouseEnter: function(node, eventInfo, e) {
- if (node.id != undefined) // if node
+ // if node
+ if (node.id != undefined) {
one.topology.graph.canvas.getElement().style.cursor = 'move';
- else if (eventInfo.edge != undefined && eventInfo.edge.nodeTo.data["$type"] == "swtch" && eventInfo.edge.nodeFrom.data["$type"] == "swtch")
+ } else if (eventInfo.edge != undefined &&
+ eventInfo.edge.nodeTo.data["$type"] == "swtch" &&
+ eventInfo.edge.nodeFrom.data["$type"] == "swtch") {
one.topology.graph.canvas.getElement().style.cursor = 'pointer';
+ }
},
onMouseLeave: function(node, eventInfo, e) {
one.topology.graph.canvas.getElement().style.cursor = '';
$.post('/controller/web/topology/node/' + did, data);
},
onClick: function(node, eventInfo, e) {
- return false;
+ if(one.f.topology === undefined) {
+ return false;
+ } else {
+ one.f.topology.Events.onClick(node, eventInfo);
+ }
}
},
iterations: 200,
style.textAlign = "center";
}
});
+
one.topology.graph.loadJSON(json);
// compute positions incrementally and animate.
one.topology.graph.computeIncremental({
node.setPos(new $jit.Complex(x, y), "end");
}
}
- console.log('done');
+ console.log('done');
one.topology.graph.animate({
modes: ['linear'],
transition: $jit.Trans.Elastic.easeOut,
/** INIT */
$.getJSON(one.global.remoteAddress+"controller/web/topology/visual.json", function(data) {
one.topology.init(data);
-});
\ No newline at end of file
+});