diff options
author | Kristian Lyngstol <kly@kly.no> | 2019-01-06 15:40:16 +0100 |
---|---|---|
committer | Kristian Lyngstol <kly@kly.no> | 2019-01-06 15:40:16 +0100 |
commit | 0bd74cf3010de984d36eed04b6318b7b30e25373 (patch) | |
tree | 196b81faba14e54f8a8f14eae03c5248550dacc9 /web/js/nms-ui-boxes.js | |
parent | 8d63fa675264ae0d809f86ee036e081519b88299 (diff) |
Extenstive frontend work on box/type/switch editing
Still not very visible, but the nmsModSwitch() class is starting to look
very interesting.
This introduces a big thing: A type system. So far it is "only" used to
provide generic validation-services for all fields that will be edited, but
the scope can extend further into other uses.
The implementation as it is does shallow validation for IP addresses,
JSON-input (tags,placement), durations/intervals (poll frequency), sysname
references (checks that distro_name is a valid system), and networks
(verifying that mgmt_vlan / traffic_vlan exists). This is expected to
improve over time, and should eventually lead to things like "if it doesn't
exist, then please make it."
As the big comment in nms-ui-switch.js now suggests: This is still just a
proof of concept and while the fundamental concepts of nmsBox seems to work
well, I still feel like I have a lot to iron out in nmsModSwitch, which
really should be generic for networks and switches at the very least.
But we're getting there.
Diffstat (limited to 'web/js/nms-ui-boxes.js')
-rw-r--r-- | web/js/nms-ui-boxes.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/js/nms-ui-boxes.js b/web/js/nms-ui-boxes.js index 3ed65cd..ac4445e 100644 --- a/web/js/nms-ui-boxes.js +++ b/web/js/nms-ui-boxes.js @@ -166,7 +166,7 @@ class nmsPanel extends nmsBox{ /* Mainly just to make the constructor more readable. */ makeHeading(title) { var titleObject = new nmsBox("div",{html:{classList: ["panel-heading"]}}); - this._titleText = new nmsBox("p",{html:{textContent: title}}); + this._titleText = new nmsBox("h4",{html:{textContent: title}}); var closeButton = new nmsBox("button"); closeButton.html.className = "close"; closeButton.panel = this; |