@@ -27,24 +27,23 @@ Currently, datahub depends on:
## Installation procedure
1.Download the source code from [gitlab](https://gitlab.esrf.fr/icat/E-DataPortal) repository
2. Install dependencies
1.Clone or download the project from [GitLab](https://gitlab.esrf.fr/icat/E-DataPortal)
2. Install the dependencies
```bash
npm install
```
3. Configure datahub app. See this [section](#configuration).
```bash
npm install
```
4. Run the app
3.[Configure the app](#configuration)
4. Start the app
```bash
npm start
```
```bash
npm start
```
# Configuration
Datahub configuration is spread among different files located in the folder **src/config**. These files are:
Datahub configuration is spread among different files located in <kbd>src/config</kbd>. These files are:
-[icat.js](#icatjs) : configure access to the metadata catalogue.
-[icatPlus.js](#icatplusjs) : configure access to the ICAT+ server
...
...
@@ -52,13 +51,14 @@ Datahub configuration is spread among different files located in the folder **sr
-[gui.config.js](#guiconfigjs) : configuration file for the logbook (to be moved to config.js)
-[config.js](#configjs) : UI general configuration of the GUI
Example files for [icat.js](src/config/icat/icat.example.js) and [icatPlus.js](src/config/icat/icatPlus.example.js) are provided and needs to be copied in configuration file:
Some of the configuration options in these files are stored in [environment variables](#environment-variables).
Example file for [icat.js](src/config/icat/icat.example.js) is provided and needs to be copied in configuration file:
Environment variables are loaded automatically from [environment files](https://create-react-app.dev/docs/adding-custom-environment-variables/#what-other-env-files-can-be-used)(`.env`,`.env.test`, etc.) Create React App reads the files based on the Node environment (`NODE_ENV`).
The following variable is currently loaded from the environment:
-`REACT_APP_ICATPLUS_URL` - the URL of the ICAT+ server (cf. <kbd>src/config/icatPlus.js</kbd>)
In development, you can override any of the portal variables defined in `.env` by creating a file called `.env.local`. This file will not be committed to version control.
## icat.js
Edit the file **icat.js** with your favorite text editor and set the configuration to access the metadata catalogue following the indications below.
...
...
@@ -123,26 +133,6 @@ export default ICAT;
<!--END configurationICAT -->
## icatPlus.js
Edit the file **icatPlus.js** with your favorite text editor and set the configuration to access the ICAT+ application following the indications below.
<!--START configurationICATPlus -->
```js
/**
* icatPlus.example.js configuration file
*/
varICATPLUS={
/** URL of ICAT+ server */
server:'https://icatplus.esrf.fr',
};
exportdefaultICATPLUS;
```
<!--END configurationICATPlus -->
## techniques.js
The file [techniques.js](src/config/techniques/techniques.js) complements short named techniques as stored in ICAT metadata catalogue. It maps a short name to a description and display settings.
"doc":"npm run Readme:ConfigDoc:ICAT && npm run Readme:ConfigDoc:ICAT:ReplaceCodeSection && npm run Readme:ConfigDoc:ICATPlus && npm run Readme:ConfigDoc:ICATPlus:ReplaceCodeSection && npm run Readme:ConfigDoc:Config && npm run Readme:ConfigDoc:Config:ReplaceCodeSection",