fix switch color update logic bug
diff --git a/web/ons-demo/js/debug.js b/web/ons-demo/js/debug.js
index 7b66912..3d3b302 100644
--- a/web/ons-demo/js/debug.js
+++ b/web/ons-demo/js/debug.js
@@ -9,4 +9,23 @@
}
});
return links;
+}
+
+function debug_findswitch(model, dpid) {
+ var sw;
+
+ model.edgeSwitches.forEach(function (s) {
+ if (s.dpid == dpid)
+ sw = s;
+ });
+ model.aggregationSwitches.forEach(function (s) {
+ if (s.dpid == dpid)
+ sw = s;
+ });
+ model.coreSwitches.forEach(function (s) {
+ if (s.dpid == dpid)
+ sw = s;
+ });
+
+ return sw;
}
\ No newline at end of file