Skip to content

Commit

Permalink
docs: [SDCOSMO-1901] add miscellaneous doc file with dataset filter p…
Browse files Browse the repository at this point in the history
…recisions
  • Loading branch information
nborde-CSM committed Jun 13, 2024
1 parent c68d11e commit d5534b0
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
40 changes: 40 additions & 0 deletions doc/miscellaneous.md
Original file line number Diff line number Diff line change
@@ -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_

<details>
<summary>JSON Workspace file example</summary>

```json
{
"webApp": {
"url": "https://sample.app.cosmotech.com",
"iframes": null,
"options": {
"datasetFilter": ["d-77w1eq1mmd5"]
}
}
}
```

</details>

> **Warning**
>
> **Potential weird behavior**: If a dataset is set in both attributes, it will be displayed twice
3 changes: 3 additions & 0 deletions doc/workspaceConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d5534b0

Please sign in to comment.