Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/backendconfig/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,10 @@ ES_REFRESH=<"wait_for"|"false">
LOGGERS_CONFIG_FILE="loggers.json"
DATASET_TYPES_FILE="datasetTypes.json"
PROPOSAL_TYPES_FILE="proposalTypes.json"

FRONTEND_CONFIG_FILE="src/config/frontend.config.json"
FRONTEND_THEME_FILE="src/config/frontend.theme.json"

```
### How to configure to connect the backend to other services
In [scicatlive](https://www.scicatproject.org/scicatlive/latest/services/backend/) you find documentation on how to integrate your SciCat system with services providing identities, (e.g. KeyCloak) and authentication (OpenLDAP).
Expand Down
18 changes: 10 additions & 8 deletions docs/frontendconfig/index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# Frontend configuration

In only two json files SciCat's frontend configuration is managed, both as part of the backend configuration:
SciCat's frontend configuration is managed in two configuration file, both served through the backend configuration:

1. [frontend.config.json](https://github.com/SciCatProject/scicat-backend-next/blob/master/src/config/frontend.config.json) and
2. [frontend.theme.json](https://github.com/SciCatProject/scicat-backend-next/blob/master/src/config/frontend.theme.json)
1. Frontend Config: [frontend.config.json](https://github.com/SciCatProject/backend/blob/master/src/config/frontend.config.json) defines the setup of the UI componets. For more information on the Frontedend Config definisions see [here](https://www.scicatproject.org/backend/main/frontend-config-guide/frontend-config/)
2. Frontend Theme Config: [frontend.theme.json](https://github.com/SciCatProject/backend/blob/master/src/config/frontend.theme.json) defines the theming (color, font color etc) of the UI components.

The two frontend configs are served through the backend API so that it can be updated with ease. Adding these configs to the frontend would require a build step everytime the configuration file changed. To find out how to add the frontend configuration files to the backend please see [here](../backendconfig/index.md/#central-configuration-of-backend-env)

Please write about
- Why the frontend config is in the backend config?
- What the scope is of these two files?
- Please provide code snippets examples for enabling/disabling buttons. Add ideally screenshots.

# Default List & Filter Configuration Pattern - Frontend Configuration Guide

Expand Down Expand Up @@ -61,4 +59,8 @@ Defines predefined condition filter in the side panel (currently supported only
| `relation` | `string` | Comparison operator:<br>• `GREATER_THAN`<br>• `GREATER_THAN_OR_EQUAL`<br>• `LESS_THAN`<br>• `LESS_THAN_OR_EQUAL`<br>• `EQUAL_TO`<br>• `RANGE` | `"EQUAL_TO"` |
| `rhs` | `string` | Value to compare against | `"3.1e4"` |
| `unit` | `string` | **Optional** unit for the value | `"mbar l/s/cm^2"` |
| `unitsOptions`| `string[]`| **Optional** A list of allowed units for this condition. When provided, the unit dropdown will be restricted to only these options | `["mbar l/s/cm^2", "Pa m^3/s/m^2"]`
| `unitsOptions`| `string[]`| **Optional** A list of allowed units for this condition. When provided, the unit dropdown will be restricted to only these options | `["mbar l/s/cm^2", "Pa m^3/s/m^2"]`

# Dynamic Dataset Detail Component

The Dynamic Dataset Detail component can be customized to display dataset information in various templates and layouts based on your needs. It is an extra configuration file used in the Frontend Config. For more information on how to set this up please see [here](https://www.scicatproject.org/backend/main/frontend-config-guide/dynamic-dataset-detail-component/)