gisaia / ARLAS-wui-builder

Builder of ARLAS-wui
Other
0 stars 0 forks source link

Import config.json file with existing preview ID could crash all the hub app #967

Closed mbarbet closed 2 months ago

mbarbet commented 3 months ago

If someone create a dashboard from an existing config.json file with a preview ID. On saving, the readers/writers of the existing preview will be override. If the new dashboard does not have the same readers/writers that the original, the hub will crash and the only solution to fix it is to share the new dashboard or delete the preview resource in database.

Solution:

  1. When an user import a config.json file, if a preview Id resource is present, copy the ressource with a new uuid and replace the uuid in the config. => but if the user does not save the dashboard we will have useless ressources in database
  2. When an user import a config.json file, if a preview Id resource is present, delete the previewId properties