ccoverstreet / Jablko

Smart Home Interface powered by Go.
MIT License
1 stars 0 forks source link

Config Editor Behavior #87

Closed ccoverstreet closed 2 years ago

ccoverstreet commented 3 years ago

The config-editor on the admin panel currently just displays the config. The actual configuration changing process could be as follows:

  1. User makes edits in config-editor
  2. User clicks "Apply" button
  3. Admin panel sends request with new config and mod name to an admin route (ex. "/admin/updateJMODConfig")
  4. Jablko checks if the JSON is valid
  5. Jablko then sets the config of the jmod (in Subprocess struct) and triggers a restart for that jmod.

To make sure users can troubleshoot invalid config settings, the output of each mod should be save in separate files using a rotating log system to control file sizes. In the admin panel, the outputs of each log could be viewed.