Skip to content

Commit 1526a08

Browse files
committed
add web dashboard docs, remove json_bourne docs
1 parent 4bdddf7 commit 1526a08

File tree

4 files changed

+11
-110
lines changed

4 files changed

+11
-110
lines changed

doc/webdashboard/PVWS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
{#pvws}
12
# PVWS (PV Web socket)
23

34
PVWS is a tool which lets you get EPICS PV information and expose it via a websocket. We use this for the [web dashboard.](https://github.com/ISISComputingGroup/WebDashboard?tab=readme-ov-file#web-dashboard)
45

5-
Information on how we run this can be found [here.](https://github.com/ISISComputingGroup/pvws-config?tab=readme-ov-file#pvws-config)
6+
Information on how we run this at ISIS can be found [here.](https://github.com/ISISComputingGroup/pvws-config?tab=readme-ov-file#pvws-config)

doc/webdashboard/Web-Dashboard.md

Lines changed: 9 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,24 @@
11
# Web Dashboard
22

3-
```{important}
4-
This page documents the old web dashboard, also known as `JSON_Bourne`. The [new one](https://github.com/ISISComputingGroup/webdashboard) should have its architecture and how it's run explained in the README of its repository.
5-
```
3+
The web dashboard allows some information about each instrument (currently DAE information and block values) to be viewed in a webpage from both inside and outside the ISIS network.
64

7-
The dataweb service allows some information about each instrument to be viewed in a webpage from both inside and outside the ISIS network.
5+
## Overall architecture
86

9-
## The Overall Architecture
7+
The [Web Dashboard](https://isiscomputinggroup.github.io/WebDashboard/) is very simple in architecture - it uses [PVWS](https://github.com/ornl-epics/pvws) to provide EPICS updates via a websocket, then displays these updates with [NextJS](https://nextjs.org/) as React components.
108

11-
![Architecture](dataweb_architecture.png)
9+
This means the "backend" of the system is just PVWS. Any logic that needs to be done on PVs, for example `CS:INSTLIST` needs parsing as JSON, is done on the user's web browser. This allows us to deploy the web dashboard as purely static html; currently this is deployed to github pages on a push to `main` using [this](https://github.com/ISISComputingGroup/WebDashboard/blob/main/.github/workflows/nextjs.yml) github actions CI/CD workflow.
1210

13-
The dataweb system consists of a number of parts running on each instrument:
14-
15-
---
16-
17-
### The Archive Engine
18-
19-
The archive engine shown in the [high level design](/overview/High-Level-Architectural-Design) produces internal webpages that provides live data on various PVs in HTML format:
20-
21-
* INST (located at http://localhost:4812/group?name=INST&format=json) gives data on the PVs associated with the DAE etc.
22-
* BLOCKS (located at http://localhost:4813/group?name=BLOCKS&format=json) gives data on the current status of all block PVs
23-
* DATAWEB (located at http://localhost:4813/group?name=DATAWEB&format=json) gives data on hidden blocks
24-
25-
### The WebServer
26-
27-
The webserver is run as part of the BlockServer and provides all of the data on the current configuration in JSON format. This is the exact same data that is served on the GET_CURR_CONFIG_DETAILS PV. The webserver is currently serving the data on localhost:8008. Note that the fortinet VPN uses 8008 for internal configuration and so you cannot access this address through the fortinet VPN.
28-
29-
---
30-
31-
### On the Dataweb Server
32-
33-
There are also parts of the system running on a central [webserver](/systems/Webserver), which provides external access.
34-
35-
### JSON Bourne
36-
37-
The program collates all the data from the other sources, on all the EPICS instruments, such as putting the blocks and their values into the relevant groups as given by the configuration. This information is served as JSON to localhost:60000. This runs as a service on the central server and lives in C:\JSON_Bourne.
38-
39-
### The Website
40-
41-
Currently a simple JS script takes the JSON created by JSON Bourne and provides a simple webpage for an external client to view. This can be accessed from http://dataweb.isis.rl.ac.uk/. The code for the website, both the html and javascript are located in the central server at `C:\inetpub\wwwroot\DataWeb\IbexDataweb`.
42-
43-
### Grafana and Journals Setup
11+
### Block history: Grafana and Journals Setup
4412

4513
Docs can be found on the shares at `shares\isis_experiment_controls\web_dashboard_history.docx`
4614

47-
## Deployment
48-
49-
To update the production version of the dashboard:
50-
* Remote desktop into external webserver (for username and password see password page)
51-
* Open a git bash terminal in C:\JSON_Bourne and switch to the [release branch](/deployment/Creating-a-release)
52-
* Run the deploy batch script as admin
53-
* Restart JSON_bourne (see [here](#webdashboard_restart_dataweb))
54-
* Go to (for example) http://dataweb.isis.rl.ac.uk/IbexDataweb/default.html?Instrument=zoom and confirm the webpage is live
55-
56-
## Development/Testing
57-
58-
Clone the repository at https://github.com/ISISComputingGroup/JSON_bourne
59-
60-
To test the blockserver webserver:
61-
* Start your instrument
62-
* Navigate to `localhost:8008` in a browser
63-
64-
To test JSON_Bourne:
65-
* Run webserver.py
66-
* Navigate in a browser to http://localhost:60000/?callback=parseObject&Instrument=[Instrument-Name]&.
67-
Where [Instrument-Name] is replaced by the desired instrument (i.e., ZOOM&) in all capitals.
15+
### PVWS setup
6816

69-
To test the front end on a developer machine:
70-
* Open default.html with the variable of ?Instrument=instrument-name e.g. go to `file:///C:/Instrument/Dev/JSON_bourne/front_end/default.html?Instrument=larmor` in a browser to view Larmor's dashboard. Note that the path is dependant on where you have created the local JSON_bourne repository. This will use the JSON bourne instance running on NDAEXTWEB!
71-
72-
To test the front end and JSON bourne on a developer machine:
73-
* Run `webserver.py`
74-
* Edit display\_blocks.js to look at http://localhost rather than http://dataweb.isis.rl.ac.uk
75-
* Open default.html as above
76-
77-
To be able to see your instrument as well:
78-
* Add your instrument to the `local_inst_list` dictionary in the `webserver.py` e.g. `local_inst_list = {"LOCALHOST": ("localhost")}`
79-
* Run your instrument
80-
* Run JSON Bourne up as above
81-
82-
If you need to update the archive engine then you will need to:
83-
84-
1. Run create_icp_binaries.bat
85-
1. `make clean uninstall install` in `..\EPICS\CSS\master`
17+
See {ref}`pvws`
8618

8719
{#webdashboard_troubleshooting}
8820
## Troubleshooting
8921

90-
### General Investigation
91-
92-
First look at the log to ensure that there are no issues. The log is held in `C:\JSON_Bourne\log`. Issues may be in the front end, in which case error logs are in the web browser, visit the webpage in a browser and open up the web console.
93-
If there are a number of `HTTP Error 503. The service is unavailable` errors, restarting the server completely may be required, but simply restarting the Dataweb should be the first thing to try.
94-
95-
{#webdashboard_restart_dataweb}
96-
### Restart the Dataweb
97-
98-
As admin open the "Task Scheduler" (there is a shortcut for this on the desktop) and end and run the "JSON Bourne" task (in task scheduler library). Make sure that ending the task has killed the Python webserver process.
99-
100-
### New Instrument with No Details
101-
102-
If the instrument archive has never been restarted then the dataweb will fail to show any information and claim that the server hasn't been started. To fix this simple restart the instrument archive.
103-
104-
{#webdashboard_troubleshooting_instrument_page_not_working}
105-
### Instrument Page not Working on Web Dashboard
106-
107-
Several causes
108-
109-
1. Check that the instrument is in the list of Instruments in https://github.com/ISISComputingGroup/JSON_bourne/blob/master/webserver.py and that the version on web server is up-to-date.
110-
111-
1. Issues with MySQL in the moment the IBEX server was started (this seems to affect the archiver start up). Check logs of the MySQL service in the `var` area, fix any issues so that MySQL is running correctly again, then restart the IBEX server.
112-
113-
1. If it works in your browser but not he users they may have a old cached copy (this shouldn't happen but we have seen it in Safari). Clear their browser cache and reload.
114-
115-
1. Try restarting `ARINST` on the instrument. It can happen that the archiver does not pick up all PVs to be archived on server startup. A symptom of this is that the configuration file under `EPICS\CSS\master\ArchiveEngine\inst_config.xml` is very short compared to other machines.
116-
117-
## Future Development Ideas
118-
119-
* We need to improve the unit test coverage of this project. It would be worth looking into the [requests-mock](https://pypi.python.org/pypi/requests-mock) library as this would make it very easy to test server code which makes HTTP requests.
120-
121-
## Overview page
22+
### Web dashboard showing outdated or incorrect information
12223

123-
http://dataweb.isis.rl.ac.uk/IbexDataweb/Overview/ibexOverview.html
24+
If you cannot subscribe directly to a PV by using the [PVWS homepage](https://ndaextweb4/pvws/) ie it gets no update with a value in it, this is likely due to a central gateway issue or an issue with the NDX.

doc/webdashboard/dataweb_ architecture.xml

Lines changed: 0 additions & 1 deletion
This file was deleted.
-36.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)