Fix: Resolve MAC presentation issue caused by broken split method
Javascript's String.split() method is broken.
selArray[1] will not show the full MAC address, instead, it only
shows the first two digits of MAC which is not what we expected.
Change-Id: I4251fd4553d027ae7fb46daf95702bdacc8eeb1e
diff --git a/web/gui/src/main/webapp/app/view/flow/flow.js b/web/gui/src/main/webapp/app/view/flow/flow.js
index c0f0346..1d2ceaa 100644
--- a/web/gui/src/main/webapp/app/view/flow/flow.js
+++ b/web/gui/src/main/webapp/app/view/flow/flow.js
@@ -145,13 +145,13 @@
});
selectors.forEach(function (sel) {
- var selArray = sel.split(':');
- populateTable(topSelTablebody, selArray[0], selArray[1]);
+ var selArray = sel.match(/^([^:]*):([\s\S]*)/);
+ populateTable(topSelTablebody, selArray[1], selArray[2]);
});
treatment.forEach(function (sel) {
- var selArray = sel.split(':');
- populateTable(topTrmtTable, selArray[0], selArray[1]);
+ var selArray = sel.match(/^([^:]*):([\s\S]*)/);
+ populateTable(topTrmtTable, selArray[1], selArray[2]);
});
}