aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/nms-ui-boxes.js
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly.no>2019-01-12 21:23:46 +0100
committerKristian Lyngstol <kly@kly.no>2019-01-12 21:23:46 +0100
commit9cf888fd6345642e47d750e1872aa82ad32985a8 (patch)
treebe733f33290c55a7f0703eb4f9aa6b177765bd38 /web/js/nms-ui-boxes.js
parente5db805157b2c7118ddfd3916e0427b2156e6e49 (diff)
front: Implement new network/switch and more
Fixes #183 References #182 It's now possible to add new networks and switches, and it's also possible to edit networks, but since I haven't exposed it in the UI yet, I can't really close the bug. This is also a major step in stripping nms-info-box apart. Next up is listing existing networks, possibly linking to them. I think that might be a decent first-step towards a new core nms-info-box since it doesn't alreay exist.
Diffstat (limited to 'web/js/nms-ui-boxes.js')
-rw-r--r--web/js/nms-ui-boxes.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/web/js/nms-ui-boxes.js b/web/js/nms-ui-boxes.js
index 3de8ff2..ee4dc98 100644
--- a/web/js/nms-ui-boxes.js
+++ b/web/js/nms-ui-boxes.js
@@ -247,7 +247,7 @@ class nmsTable extends nmsBox {
*/
class nmsPanel extends nmsBox{
constructor(title){
- super("div",{html: { className: "col-sm-8 col-md-6 col-lg-5 genericBox"}});
+ super("div",{html:{style:{gridColumn: 2}}});
this._topBox = new nmsBox("div",{ html: { className: "panel panel-default"}});
this._body = new nmsBox("div",{html:{className: "panel-body"}});
this.nav = new nmsBox("div",{html:{className: "panel-body"}});
@@ -256,7 +256,12 @@ class nmsPanel extends nmsBox{
this._topBox.add(this._body);
super.add(this._topBox);
}
- attach(root = document.getElementById("metaContainer")) {
+ attach(root = document.getElementById("genericPanelContainer")) {
+ try {
+ var x = parseInt(root.lastElementChild.style.gridColumnStart);
+ this.html.style.gridColumnStart = x+1;
+ } catch(e) {
+ }
super.attach(root)
}
show() {