diff --git a/doc/miscellaneous.md b/doc/miscellaneous.md new file mode 100644 index 000000000..a0ac965df --- /dev/null +++ b/doc/miscellaneous.md @@ -0,0 +1,40 @@ +# Miscellaneous + +## Dataset filter + +In order to filter datasets in scenario creation dialog (for scenario master only), there are two options: + +- API (Recommended) +- Dataset filter (Deprecated) + +### API (Recommended) + +All datasets that are needed to be selectable in dataset list must be linked to the matching workspace by using `workspace/link` or `dataset/link` API endpoint. +In the same way, datasets that are needed not to be visible must be unlinked from the workspace by using `workspace/unlink` or `dataset/unlink` API endpoint. + +This consists of using **_workspace/dataset_** `/link` - `/unlink` API endpoint + +### Dataset Filter workspace option (Deprecated) + +Datasets included in the `[workspace].webApp.options.datasetFilter` array attribute will be added in the datasets list in addition to to datasets. So it is recommended to set this attribute to _null_ + +
+JSON Workspace file example + +```json +{ + "webApp": { + "url": "https://sample.app.cosmotech.com", + "iframes": null, + "options": { + "datasetFilter": ["d-77w1eq1mmd5"] + } + } +} +``` + +
+ +> **Warning** +> +> **Potential weird behavior**: If a dataset is set in both attributes, it will be displayed twice diff --git a/doc/workspaceConfiguration.md b/doc/workspaceConfiguration.md index f478e77f6..1ea009819 100644 --- a/doc/workspaceConfiguration.md +++ b/doc/workspaceConfiguration.md @@ -43,3 +43,6 @@ data: represents the id of a dataset; this is a whitelist of datasets to show in the scenario creation pop-up. If the parameter is null or if the list is empty, then the filter is ignored and all datasets with the tag `dataset` will be shown. + > **Warning** + > + > This property `[workspace].webApp.options.datasetFilter` is deprecated. Please use the Cosmo Tech API to link or unlink dataset to the workspace