Topo2: Implemented Link Labels
JIRA-Tasks; ONOS-6387
Change-Id: I6d0292846349d73d6d274ae806d14736b2d3eb7c
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2Traffic.js b/web/gui/src/main/webapp/app/view/topo2/topo2Traffic.js
index 6ca4d5e..1cb703f 100644
--- a/web/gui/src/main/webapp/app/view/topo2/topo2Traffic.js
+++ b/web/gui/src/main/webapp/app/view/topo2/topo2Traffic.js
@@ -35,6 +35,7 @@
// internal state
var mode = null,
+ currentIndex = 0,
allIndex = 0;
// === -----------------------------------------------------
@@ -59,9 +60,14 @@
trafficType: allTrafficTypes[allIndex]
});
flash.flash(allTrafficMsgs[allIndex]);
+ currentIndex = allIndex;
allIndex = (allIndex + 1) % 3;
}
+ function selectedTrafficOverlay() {
+ return allTrafficTypes[currentIndex];
+ }
+
// === -----------------------------------------------------
angular.module('ovTopo2')
@@ -80,7 +86,8 @@
// invoked from toolbar overlay buttons or keystrokes
cancelTraffic: cancelTraffic,
- showAllTraffic: showAllTraffic
+ showAllTraffic: showAllTraffic,
+ selectedTrafficOverlay: selectedTrafficOverlay
}
}
]);