To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit dae1ce6e authored by Xuqian Yan's avatar Xuqian Yan
Browse files

Added a note on how to synchronize data from output DB to web server

parent 799e093f
......@@ -30,6 +30,15 @@ After the postprocessed data has been uploaded to the output database, the data
2. https://nexus-e.org/results/**JOB-SUBMISSION-DATE**, e.g. https://nexus-e.org/results/01-dec-2020. This will retrieve and visualize the data from **all** the MySQL schemas whose name start with "JOB-SUBMISSION-DATE". In other words, results from all simulations submitted on the same day will be shown on the website.
3. https://nexus-e.org/results/**MANUALLY_DEFINED_URL**, e.g. https://nexus-e.org/results/project. This will retrieve and visualize the results from **all** simulations associated with the MANUALLY_DEFINED_URL. This is particularly useful if we run multiple scenarios for one project. The mapping of URL and simulations is specified in the `constants.py` in the [repository for the webviewer](https://gitlab.ethz.ch/nexus-e/nexus-homepage-dash).
```eval_rst
.. note::
**Synchronizing data between the web server and the database**
Not all changes in the output database will be automatically sychronized to the webviewer. The reason lies in how the data is downloaded from the database to the web server: based on the given URL, the webviewer checks the output database and decides which simulation(s) will be shown, i.e., which schema(s) should be downloaded to the web server; the webviewer then checks (by comparing the existing folder names and the schema name) whether the needed schema has already been downloaded; if the viewer finds a folder with the same name as the needed schema, it won't re-download the schema.
Therefore, to show a changed data in the output database (e.g., after changing the postprocess script, added new data), you need to **first delete the corresponding data folder on the web server** so that the webviewer will re-download the data from the database.
```
#### Embed the webviewer into the homepage
The webviewer itself is plainly a Python Dash application without much Nexus-e branding. To change this, it is embedded into the homepage with [iframe](https://www.w3schools.com/html/html_iframe.asp) - a html element to display a nested webpage within another webpage. By doing so, we can easily have the same header, footer and menubar for the visualization tool as in other Nexus-e webpages.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment