diff options
author | Ashlee Young <ashlee@wildernessvoice.com> | 2015-11-12 16:20:47 -0800 |
---|---|---|
committer | Ashlee Young <ashlee@wildernessvoice.com> | 2015-11-12 16:20:47 -0800 |
commit | 3455cb5df0de8612d074198b55e1ecec8a8db123 (patch) | |
tree | a27ea5bcccee4f3705d9f9e512353537aaac4c58 /framework/src/onos/web/gui/src/main/webapp/app/view/topo | |
parent | 03974824abae35128f53f5a4af9a4ed8f573601a (diff) |
ONOS update to commit id "761f0040f3ce4f33a38377c7f737145b603aa334
Change-Id: Ib76e3935c50fc275f803f17cffbc511e0a91f5d1
Signed-off-by: Ashlee Young <ashlee@wildernessvoice.com>
Diffstat (limited to 'framework/src/onos/web/gui/src/main/webapp/app/view/topo')
-rw-r--r-- | framework/src/onos/web/gui/src/main/webapp/app/view/topo/topoEvent.js | 1 | ||||
-rw-r--r-- | framework/src/onos/web/gui/src/main/webapp/app/view/topo/topoForce.js | 30 |
2 files changed, 31 insertions, 0 deletions
diff --git a/framework/src/onos/web/gui/src/main/webapp/app/view/topo/topoEvent.js b/framework/src/onos/web/gui/src/main/webapp/app/view/topo/topoEvent.js index 2957629a..9b07f878 100644 --- a/framework/src/onos/web/gui/src/main/webapp/app/view/topo/topoEvent.js +++ b/framework/src/onos/web/gui/src/main/webapp/app/view/topo/topoEvent.js @@ -55,6 +55,7 @@ removeDevice: tfs, addHost: tfs, updateHost: tfs, + moveHost: tfs, removeHost: tfs, addLink: tfs, updateLink: tfs, diff --git a/framework/src/onos/web/gui/src/main/webapp/app/view/topo/topoForce.js b/framework/src/onos/web/gui/src/main/webapp/app/view/topo/topoForce.js index 844d7dc9..175ee796 100644 --- a/framework/src/onos/web/gui/src/main/webapp/app/view/topo/topoForce.js +++ b/framework/src/onos/web/gui/src/main/webapp/app/view/topo/topoForce.js @@ -187,6 +187,35 @@ } } + function moveHost(data) { + var id = data.id, + d = lu[id], + lnk; + if (d) { + // first remove the old host link + removeLinkElement(d.linkData); + + // merge new data + angular.extend(d, data); + if (tms.positionNode(d, true)) { + sendUpdateMeta(d); + } + + // now create a new host link + lnk = tms.createHostLink(data); + if (lnk) { + d.linkData = lnk; + network.links.push(lnk); + lu[d.ingress] = lnk; + lu[d.egress] = lnk; + } + + updateNodes(); + updateLinks(); + fResume(); + } + } + function removeHost(data) { var id = data.id, d = lu[id]; @@ -1142,6 +1171,7 @@ removeDevice: removeDevice, addHost: addHost, updateHost: updateHost, + moveHost: moveHost, removeHost: removeHost, addLink: addLink, updateLink: updateLink, |