scalableminds / webknossos

Visualize, share and annotate your large 3D images online
https://webknossos.org
GNU Affero General Public License v3.0
126 stars 23 forks source link

Unify DefaultViewConfiguration & AdminViewConfiguration #6133

Open jstriebel opened 2 years ago

jstriebel commented 2 years ago

Detailed Description

When retrieving the dataset info via /api/datasets/<orga>/<ds>, the view configuration that is edited from the webknossos frontend is shown in the key adminViewConfiguration (e.g. here). However, uploaded datasets and datasets in the datastore use the key defaultViewConfiguration. When applying those in the frontend, it uses the merged version of those two (see here for related backend code). I assume the separation of default and admin view configuration should rather be an implementation detail, which should not be exposed via the dataset info request, which should just include the merged configs as the default view configuration instead. We might also reconsider why those two are stored separately, and how this might be avoided completely.

related issue in wk-libs: https://github.com/scalableminds/webknossos-libs/issues/604, cc @philippotto

fm3 commented 4 days ago

I guess we could delete the defaultViewConfiguration in datasource-properties.json and instead ask those who want to set a viewconfig for their dataset to do so via the API (basically use AdminViewConfiguration – which could then be renamed).

We would have to migrate existing defaultViewConfiguration from all datasource-properties.jsons into the db, and delete them in the json files.