aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/nms-ui-boxes.js
Commit message (Collapse)AuthorAgeLines
* Upgrade bootstrap and rewrite API (#230)HEADmasterOle Mathias Aa. Heggem2025-04-13-255/+257
|
* front: Implement new network/switch and moreKristian Lyngstol2019-01-12-2/+7
| | | | | | | | | | | | | | | 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.
* Move the info summary in the info-box into nmsBox-logicKristian Lyngstol2019-01-11-4/+0
| | | | | | | Also some other random drive-by fixes :D Fixes #180 References #181
* Expose new-style edit-stuff in old-style panelKristian Lyngstol2019-01-09-0/+6
| | | | | | | | | | | The integration is a hack, but a first step. I will eventually remove all the code in nms-info-box, but I needed a simple test. This also demonstrates how to add a new switch.... simply hit edit, then change the name. It aint pretty, and shouldn't work like it does today, but it's a decent example. Also, had to fix the backend again now that I actually tested the write-api :D
* Fix switch-edit-thing after I changed nms-ui-boxKristian Lyngstol2019-01-09-11/+8
|
* Re-introduce the use-name-box and tweak styleKristian Lyngstol2019-01-08-10/+18
| | | | | | Turns out the style-diff was because the old implementation with hard-coded HTML had indentation == white space, which rendered as white-space between the elements.... This SHOULD be a CSS fix, but in the meanwhile....
* More big stuff: Re-do the oplogKristian Lyngstol2019-01-07-14/+109
| | | | | This is still a bit of a mess, but I'm establishing a new way of doing things, it'll be awesome, I swear...
* Extenstive frontend work on box/type/switch editingKristian Lyngstol2019-01-06-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Introduce nms-ui-boxes, a big step for GUIKristian Lyngstol2019-01-06-0/+191
nmsBox is a new class for generic HTML-based elements, and will eventually be used to replace nms-info-box. The idea is simple: a generic way to deal with containers that are usually represented in HTML too. To test it, I've re-implemented the GUI for the oplog. This rewrite didn't really utilize the new benefits of the framework, but was a small step. I've also added nms-ui-switch, which isn't exposed anywhere yet and isn't done, but is a good start. nms-ui-switch will be the new way to add and edit switches in the future, it will probably be made more generic over time and thus can be reused for networks too. Note how x = nmsUiSwitch() will allow you to do x.row["community"].value to both get and set the value, and setting will visually update and run any verifier that will be relevant, and alert the parent. This can then be used for simple stuff like json-verification, but also for stuff like auto-complete or whatnot. God only knows. Obviously I will continue to work on this over the next few days...