mirror of
https://github.com/prometheus/prometheus.git
synced 2026-03-07 06:31:03 +01:00
build: add option to build with only the mantine UI
This adds the `--mantine-ui` switch to `web/ui/build_ui.sh` which allows to build without the old react UI. If built with only the mantine ui and started with `--enable-features=old-ui` the user will get a 404 response on th web port. Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
This commit is contained in:
parent
f5fe1573ba
commit
b7435e675c
5
Makefile
5
Makefile
@ -17,6 +17,7 @@ DOCKERFILE_ARCH_EXCLUSIONS ?= Dockerfile.distroless:riscv64
|
||||
DOCKER_REGISTRY_ARCH_EXCLUSIONS ?= quay.io:riscv64
|
||||
|
||||
UI_PATH = web/ui
|
||||
BUILD_UI ?= all
|
||||
UI_NODE_MODULES_PATH = $(UI_PATH)/node_modules
|
||||
REACT_APP_NPM_LICENSES_TARBALL = "npm_licenses.tar.bz2"
|
||||
|
||||
@ -63,7 +64,11 @@ ui-install:
|
||||
|
||||
.PHONY: ui-build
|
||||
ui-build:
|
||||
ifeq ($(BUILD_UI),mantine)
|
||||
cd $(UI_PATH) && CI="" npm run build:mantine-ui
|
||||
else
|
||||
cd $(UI_PATH) && CI="" npm run build
|
||||
endif
|
||||
|
||||
.PHONY: ui-build-module
|
||||
ui-build-module:
|
||||
|
||||
@ -58,5 +58,10 @@ for i in "$@"; do
|
||||
buildModule
|
||||
shift
|
||||
;;
|
||||
--mantine-ui)
|
||||
buildModule
|
||||
buildMantineUI
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "bash build_ui.sh --all",
|
||||
"build:mantine-ui": "bash build_ui.sh --mantine-ui",
|
||||
"build:module": "bash build_ui.sh --build-module",
|
||||
"start": "npm run start -w mantine-ui",
|
||||
"test": "npm run test --workspaces",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user