mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-14 01:24:04 -08:00
e8027ba515
This makes React UI URLs look nicer than the previous /static/graph-new/app.html, but internally still serves all React UI files from the compiled-in static assets directory. Also, to allow future usage of the React / Reach router, we need to serve the main React app's index.html on certain sub-paths that correspond to current Prometheus's UI pages, instead of trying to serve actual files that match the provided path name. Signed-off-by: Julius Volz <julius.volz@gmail.com>
19 lines
315 B
Bash
Executable file
19 lines
315 B
Bash
Executable file
#!/usr/bin/env bash
|
|
#
|
|
# Build React web UI.
|
|
# Run from repository root.
|
|
set -e
|
|
set -u
|
|
|
|
if ! [[ "$0" =~ "scripts/build_react_app.sh" ]]; then
|
|
echo "must be run from repository root"
|
|
exit 255
|
|
fi
|
|
|
|
cd web/ui/react-app
|
|
|
|
echo "building React app"
|
|
PUBLIC_URL=. yarn build
|
|
rm -rf ../static/react
|
|
mv build ../static/react
|