aboutsummaryrefslogtreecommitdiffstats
path: root/web/api/write/switches
Commit message (Collapse)AuthorAgeLines
* tag fix in switches writeOle Mathias Aa. Heggem2019-04-15-0/+5
|
* Front + api: Fix parsing of JSON-fields for switchesKristian Lyngstol2019-02-13-1/+3
| | | | | | | | | | | | | | | | | | | | | | | Sort of. It's two issues at once, related: 1. API: The problem here was that the old way of updating tags simply didn't use actual JSON, but just sent "'foo','bar','baz'" as a text string. This seems dumb so I've made it send actual JSON now - just like the "placement" field. This meant updating the API. And it's not pretty, but it works. 2. Front: I've simplified nms-types a bit (hopefully to provide to simple methods: either get/set the raw value, or get/set strings. There was a bug where we sent text-encoded json instead of real json, and the reason was a confusion between when we're dealing with JSON and when we're dealing with strings. Now we are explicit. This makes the nmsEditRow-thing slightly uglier, but it needs to be fixed properly either way. In the future, we should provide renderers and editors based on types, e.g.: Placement-editor could start as a general-purpose JSON-editor, and the "switch reference" should be a drop-down.... etc. Fixes #202
* Expose new-style edit-stuff in old-style panelKristian Lyngstol2019-01-09-18/+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
* First step to major cleanupKristian Lyngstol2019-01-03-0/+128
Fixes #150 Fixe #88 Closes #3 Probably lots of bugs introduced, will fix ASAP.