GUI -- Completed ONOS Instance panel, and handling of updateInstance and removeInstance.
- minor refactorings and other cleanup.
Change-Id: I4d0e467f71269f7fb91175e78d2c6af750bf9aad
diff --git a/web/gui/src/main/webapp/onos2.js b/web/gui/src/main/webapp/onos2.js
index 2405988..6db968b 100644
--- a/web/gui/src/main/webapp/onos2.js
+++ b/web/gui/src/main/webapp/onos2.js
@@ -785,8 +785,14 @@
function pxHide() {
return (-20 - widthVal()) + 'px';
}
+ function noPx(what) {
+ return el.style(what).replace(/px$/, '');
+ }
function widthVal() {
- return el.style('width').replace(/px$/, '');
+ return noPx('width');
+ }
+ function heightVal() {
+ return noPx('height');
}
fp = {
@@ -822,6 +828,12 @@
return widthVal();
}
el.style('width', w + 'px');
+ },
+ height: function (h) {
+ if (h === undefined) {
+ return heightVal();
+ }
+ el.style('height', h + 'px');
}
};
fpanels[id] = fp;