PiBrewing / craftbeerpi4

GNU General Public License v3.0
57 stars 29 forks source link

moves cbpi_dashboard_*.json to subfolder dashboard. #69

Closed prash3r closed 1 year ago

prash3r commented 1 year ago

I didnt realize that the cbpi_dashboard_n.json files were stored in the main config folder, i thought i broke it with my config folder location and repaired it.

now on every start inside the check_for_setup() function the following happens

  1. check if cbpi_dashboard_1.json is where it belongs (config subfolder dashboard).
  2. if not then move all cbpidashboard*.json files from the main config folder to the configs subfolder dashboard

this results in 2 things:

  1. we should be able to automatically migrate from the old dashboard files location to the new one with existing configurations and dashboards.
  2. we should also be able to restore old config zip files via ui and automatically migrate them

I also removed the default cbpi_dashboard_1.json file from the config template (and the dev config) because an empty file is not needed. the file will be created if content is added and saved via the ui.