Allows monitoring of instrument PVs via a web page.
Frontend: NextJS using React, Tailwind CSS
Backend: pvws - with our configuration here
Install NodeJS - we are using nvm-windows for installing on windows, and the lts version of node.
To install all dependencies, use:
npm ciThis web dashboard relies on a PVWS instance to forward EPICS data via a websocket. If you don't want to point your instance to the deployed websocket on NDAEXTWEB, you may point your web dashboard at a local instance for dev work.
Running PVWS locally for development
To run a PVWS instance locally, the Tomcat 9 binaries need to be downloaded. After this:
- Download the nightly webapp
pvws.warfrom the PVWS homepage and place it inwebapps\of your tomcat download - Create a file called
setenv.batin thebin\folder of tomcat with yourEPICS_CA_ADDR_LISTandEPICS_CA_AUTO_ADDR_LIST(you can get these by doingset EPICS_CAin anepicsterm.bat) ie this, where 1.2.3.4 is your CA gateway address:
set EPICS_CA_ADDR_LIST=127.255.255.255 1.2.3.4
set EPICS_CA_AUTO_ADDR_LIST=NOcdtobin\and runcatalina.bat startto start the tomcat server. you can verify this is working by going tohttp://localhost:8080/pvws/- you should see a summary webpage.- Create an
.env.localfile withNEXT_PUBLIC_WS_URLset to the pvws URL you are using. For example:
NEXT_PUBLIC_WS_URL=ws://<hostname>:<port>/pvws/pv
To start in dev mode, use:
npm run devTo build and start in prod mode, use:
npm run build && npx serve@latest outNote
Images will not work properly here as a basePath has not been injected (as per the CI actions)