update README: *-webserver script, rename to 'seweb'

This commit is contained in:
2024-10-25 08:13:14 +02:00
parent e339ef711f
commit 279a658e8a

View File

@ -1,6 +1,6 @@
# SEAWeb # seweb
The WEB GUI client of SEA. **The Web GUI client for Sample Environment at SINQ**
This repository contains the code of the server for the control and graphical parts, plus the client code (HTML, CSS, JS). This repository contains the code of the server for the control and graphical parts, plus the client code (HTML, CSS, JS).
@ -101,7 +101,7 @@ seagraph.py <-- Its content is used if the server is run
1. Clone this repository on the `~` folder on your machine 1. Clone this repository on the `~` folder on your machine
2. If not done yet, activate a Python environnment 2. If not done yet, activate a Python environnment
3. Run the command `cd seaweb` 3. Run the command `cd seweb`
### Configuring the application ### Configuring the application
@ -118,29 +118,33 @@ For the `generic.ini` and `<instrument>.ini` files, go to `./doc/variables_confi
### Starting the application ### Starting the application
1. Run the command `cd ~/seaweb` 1. Run the command `cd ~/seweb`
2. Depending on if you want to start the right part or no, go to the file `./client/jsFiles/SEAWebClientMain.js` 2. Depending on if you want to start the right part or no, go to the file `./client/jsFiles/SEAWebClientMain.js`
3. Edit the line 79 : `(.treat("hideRightPart", "hr", to_bool, <value>))` by replacing `<value>` with `false` to have the right part, or `true` to hide it. 3. Edit the line 79 : `(.treat("hideRightPart", "hr", to_bool, <value>))` by replacing `<value>` with `false` to have the right part, or `true` to hide it.
4. 4.
To start the server without the right part and the history from InfluxDB (NICOS cache), run the command : To start the server the history from InfluxDB (NICOS cache), run the command :
`python ./seaweb.py type=influx port=<port> instrument=<instrument>` `./secop-webserver port=<port> instrument=<instrument> hostport=<host:port>`
With the right part : Dummy server (with dummy graphics):
`python ./seaweb.py type=influxsea port=<port> sea=<sea_address> instrument=<instrument>` `./dummy-webserver port=<port> instrument=<instrument> hostport=<host:port>`
Where : Where :
- `<port>` : the port of the machine to start the server with (for example : 8841) - `<port>` : the port of the machine to start the server with (for example : 8841)
- `<sea_address>` : the address of the SEA server (host:port) in order to have a running right part (for example : samenv:8664) - `<host:port>` : the address of the SECoP server
- `<instrument>` : the name of the instrument (for example : lab4) - `<instrument>` : the name of the instrument (for example : lab4)
### Stopping the application ### Stopping the application
1. Run the command `ps ax | grep seaweb` If the server is started diretly in a Terminal: press ctrl-C
If the server is started in the background (with '&' appended to the command):
1. Run the command `ps ax | grep webserver`
2. In the output of the previous command, identifiy the PID corresponding to the server process 2. In the output of the previous command, identifiy the PID corresponding to the server process
3. Run the command `kill <previously_identified_PID>` 3. Run the command `kill <previously_identified_PID>`