Conversation
adaudon
marked this pull request as draft
February 24, 2026 18:01
adaudon
force-pushed
the
116-Stop_Polling_Config
branch
from
February 25, 2026 17:34
5891d60 to
83ec738
Compare
adaudon
marked this pull request as ready for review
March 4, 2026 12:14
added 9 commits
July 20, 2026 14:54
adaudon
force-pushed
the
116-Stop_Polling_Config
branch
from
July 20, 2026 15:43
1921d15 to
1c2dadd
Compare
These headings sit on the page and card backgrounds, not on a primary coloured surface, so primary.contrastText was wrong: it resolves to #ffffff in both schemes, leaving white text on the #fff paper of the light scheme. text.primary is scheme aware, so the headings stay readable in both.
* Pinning pnpm version * Pinned --------- Co-authored-by: Tamoor Shahid <tamoor.shahid@diamond.ac.uk>
* Pinning pnpm version * Pinned * Added pnpm workspace to docker --------- Co-authored-by: Tamoor Shahid <tamoor.shahid@diamond.ac.uk>
The blueapi base URL is the origin-relative /api, so in dev it resolved against the dev server itself (localhost:5173/api/...) and 404'd. Proxy it to VITE_BLUEAPI_SOCKET_DEV instead, stripping the /api prefix. Production is unchanged and still relies on upstream routing. The config becomes a function so loadEnv can read .env, which is not otherwise visible as process.env inside a vite config. The README still described the arrangement that predates all of this - set VITE_BLUEAPI_SOCKET, which nothing has read since blueapi.ts was pointed at /api - so say instead what each variable in .env is read by, and which one is now inert.
The IOC advertises its MJPG stream over http, and a page served over https will not load an image over http - the browser blocks it as mixed content, so the viewer is blank wherever the app is deployed behind TLS, which is every deployment on the cluster. So ask for the stream at /oav-stream on our own origin, and proxy it on to the MJPG server: nginx does it in the built image, the dev server does it otherwise. MJPG_URL_RBV still chooses which stream is shown; only the server it is fetched from is named by the proxies. nginx has no way to read the environment itself, but the entrypoint of the image we deploy runs envsubst over /etc/nginx/templates at start up, so the location block is a template with the upstream left in it. OAV_STREAM_SERVER defaults, in the Dockerfile, to i24's MJPG server, and a deployment that wants another one now says so rather than needing its own image. Unset or empty, nginx refuses to start. The upstream is named through a variable rather than written into proxy_pass literally, because a literal is resolved while the configuration is read: an OAV server that was down, or whose name would not resolve, stopped nginx starting at all - taking the whole UI with it over a video stream. Deferring the lookup to the request needs a resolver, which the entrypoint reads from the container's own /etc/resolv.conf when NGINX_ENTRYPOINT_LOCAL_RESOLVERS is set. A stream from a server that is down is now a 502 and a broken image, and starts working when the server does, without a restart. Since a proxy_pass with a variable in it passes the URI on untouched, the location's prefix is stripped by an explicit rewrite.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #116
Changed polling from 500ms to false so it doesn't poll automatically for new values unless specifically requested. Instead, it now refetches values every time there's a change by pressing one of the OAV buttons.