chriscareycode / nagiostv-react

Monitor your Nagios server on a wall mounted TV (or a phone or desktop). Installation instructions are below in the README.md
https://nagiostv.com
GNU General Public License v2.0
69 stars 13 forks source link

settings cookie should be sorted #6

Closed ghost closed 4 years ago

ghost commented 5 years ago

When new settings are introduced, easiest way to use them is copy cookie from browser and modify client-settings.json file in configuration (we use saltstack). When settings are not sorted, they sometimes change their order and that makes update of json harder. nagiostv-json

chriscareycode commented 5 years ago

I think I'm understanding your use case but I am hesitant to make this a global change just yet. I do like the settings to be grouped in an order that keeps related options together, and the alphabetical sorting will scramble the related options away from each other. I will have to think more about this one.

The other thing worth noting is that you only need to add settings to your client-settings.json that you want to override. If the setting is to remain default, then no need to add it there. So you do not need to constantly update your client-settings with new options - only if you want to customize them away from default.

ghost commented 5 years ago

Alphabetical order was just an example. Clue is to avoid reordering like with "versionCheckDays" in my screenshot. I didn't look into implementation of creating that json - my guess was, that was created from unordered collection, so I suggested alphabetical order. In fact any order will do.

Other thing: easiest way to know about configuration options is... looking into cookie :). I don't update it each-new-version, but if I would like to update one setting, then it's good moment to update all defaults - maybe it's good to change any other setting, or... just to know the defaults.

chriscareycode commented 5 years ago

One other option is at the very bottom of the settings screen it has the raw JSON. The application will take the default settings, new ones as well, then loads your client-settings.json and will overlay your client-settings over top. So you could just copy that raw JSON and it should be exactly what you need - no need to merge manually.