Skip to content

Conversation

@rezib
Copy link
Contributor

@rezib rezib commented Nov 20, 2025

Pending tasks:

  • Fix frontend unit tests
  • Fix backend unit tests
  • Add unit tests to cover ui module
  • Reword commit message
  • Add entries in changelog

fix #388

@rezib rezib added this to the v6.0.0 milestone Nov 20, 2025
@rezib rezib self-assigned this Nov 20, 2025
@rezib rezib marked this pull request as draft November 20, 2025 20:56
@rezib rezib force-pushed the pr/feat-388 branch 3 times, most recently from 0de065d to 52048e9 Compare November 21, 2025 09:56
@rezib rezib marked this pull request as ready for review November 21, 2025 09:56
Add possibility to define frontend application base path (prefix of all
routes) with VITE_BASE_PATH environment variable. By default, it stays /
in development mode. In production mode (w/ npm run build), the default
is /__SLURMWEB_BASE__ placeholder designed to be replaced at gateway
runtime.
rezib added 10 commits November 21, 2025 15:49
Replace at runtime base path placeholder in pre-built UI assets by URL
path extracted from configured UI public host to support running under
under a subfolder prefix on HTTP server

The UI prebuilt assets are first copied the source frontend UI assets to
a target directory, the placeholder base paths are then replaced in the
UI assets files in the target directory.

The target directory is created in the system's systemd runtime
directory, typically /run/slurm-web-gateway/ui, or in a temporary
directory if the RUNTIME_DIRECTORY environment variable is not set.

The placeholder base path, set at frontend application build time, is
replaced with the path configured in the public URL prefix. This makes
the same build usable under any path without rebuilding the frontend
application.

This approach is not great, to say the least, but considering the limits
of the frontend application build process, it's the best we have found
so far.

fix #388
Wrap all gateway endpoints under the configured UI public URL path
prefix when defined. By default, the path prefix is empty and the
endpoints are at root path of HTTP server.
Update documentation of [ui]>host gateway parameter to explain its role
in frontend application.
Add catch-all route to report page not found with button to clusters.
@rezib rezib merged commit 89c4ef6 into main Nov 21, 2025
24 of 26 checks passed
@rezib rezib deleted the pr/feat-388 branch November 21, 2025 15:14
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support hosting under a subdirectory

2 participants