Skip to content

Commit d9855dc

Browse files
authored
Merge pull request #17 from SciCatProject/add-frontend-config
Add more details on the Frontend Configuration
2 parents ca96df1 + 4b83917 commit d9855dc

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

docs/backendconfig/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,10 @@ ES_REFRESH=<"wait_for"|"false">
498498
LOGGERS_CONFIG_FILE="loggers.json"
499499
DATASET_TYPES_FILE="datasetTypes.json"
500500
PROPOSAL_TYPES_FILE="proposalTypes.json"
501+
502+
FRONTEND_CONFIG_FILE="src/config/frontend.config.json"
503+
FRONTEND_THEME_FILE="src/config/frontend.theme.json"
504+
501505
```
502506
### How to configure to connect the backend to other services
503507
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).

docs/frontendconfig/index.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
# Frontend configuration
22

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

5-
1. [frontend.config.json](https://github.com/SciCatProject/scicat-backend-next/blob/master/src/config/frontend.config.json) and
6-
2. [frontend.theme.json](https://github.com/SciCatProject/scicat-backend-next/blob/master/src/config/frontend.theme.json)
5+
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 definitions see [here](https://www.scicatproject.org/backend/main/frontend-config-guide/frontend-config/)
6+
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.
7+
8+
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)
79

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

1311
# Default List & Filter Configuration Pattern - Frontend Configuration Guide
1412

@@ -61,4 +59,8 @@ Defines predefined condition filter in the side panel (currently supported only
6159
| `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"` |
6260
| `rhs` | `string` | Value to compare against | `"3.1e4"` |
6361
| `unit` | `string` | **Optional** unit for the value | `"mbar l/s/cm^2"` |
64-
| `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"]`
62+
| `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"]`
63+
64+
# Dynamic Dataset Detail Component
65+
66+
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/)

0 commit comments

Comments
 (0)