f99c58f7bb
* build(deps): bump @fortawesome/react-fontawesome from 0.1.17 to 0.2.0 in /web/ui * build(deps): bump go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp Bumps [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib) from 0.36.0 to 0.36.4. - [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.36.0...zpages/v0.36.4) --- updated-dependencies: - dependency-name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * update snapshots Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Matthieu MOREL <matthieu.morel35@gmail.com> * build(deps-dev): bump sinon from 13.0.2 to 14.0.1 in /web/ui Bumps [sinon](https://github.com/sinonjs/sinon) from 13.0.2 to 14.0.1. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md) - [Commits](https://github.com/sinonjs/sinon/compare/v13.0.2...v14.0.1) --- updated-dependencies: - dependency-name: sinon dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump @codemirror/view from 6.3.0 to 6.4.0 in /web/ui Bumps [@codemirror/view](https://github.com/codemirror/view) from 6.3.0 to 6.4.0. - [Release notes](https://github.com/codemirror/view/releases) - [Changelog](https://github.com/codemirror/view/blob/main/CHANGELOG.md) - [Commits](https://github.com/codemirror/view/compare/6.3.0...6.4.0) --- updated-dependencies: - dependency-name: "@codemirror/view" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump actions/cache from 3.0.9 to 3.0.11 Bumps [actions/cache](https://github.com/actions/cache) from 3.0.9 to 3.0.11. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3.0.9...v3.0.11) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump bufbuild/buf-setup-action from 1.8.0 to 1.9.0 Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.8.0 to 1.9.0. - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.8.0...v1.9.0) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update dependabot.yml Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> * build(deps): bump github.com/prometheus/client_golang Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.13.0 to 1.13.1. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/v1.13.1/CHANGELOG.md) - [Commits](https://github.com/prometheus/client_golang/compare/v1.13.0...v1.13.1) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/stretchr/testify Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.0...v1.8.1) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/ovh/go-ovh from 1.1.0 to 1.3.0 Bumps [github.com/ovh/go-ovh](https://github.com/ovh/go-ovh) from 1.1.0 to 1.3.0. - [Release notes](https://github.com/ovh/go-ovh/releases) - [Commits](https://github.com/ovh/go-ovh/compare/v1.1.0...v1.3.0) --- updated-dependencies: - dependency-name: github.com/ovh/go-ovh dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump @lezer/highlight from 1.1.1 to 1.1.2 in /web/ui Bumps [@lezer/highlight](https://github.com/lezer-parser/highlight) from 1.1.1 to 1.1.2. - [Release notes](https://github.com/lezer-parser/highlight/releases) - [Changelog](https://github.com/lezer-parser/highlight/blob/main/CHANGELOG.md) - [Commits](https://github.com/lezer-parser/highlight/compare/1.1.1...1.1.2) --- updated-dependencies: - dependency-name: "@lezer/highlight" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump @forevolve/bootstrap-dark in /web/ui Bumps [@forevolve/bootstrap-dark](https://github.com/ForEvolve/bootstrap-dark) from 1.1.0 to 2.1.1. - [Release notes](https://github.com/ForEvolve/bootstrap-dark/releases) - [Commits](https://github.com/ForEvolve/bootstrap-dark/compare/v1.1.0...v2.1.1) --- updated-dependencies: - dependency-name: "@forevolve/bootstrap-dark" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/digitalocean/godo from 1.88.0 to 1.89.0 Bumps [github.com/digitalocean/godo](https://github.com/digitalocean/godo) from 1.88.0 to 1.89.0. - [Release notes](https://github.com/digitalocean/godo/releases) - [Changelog](https://github.com/digitalocean/godo/blob/main/CHANGELOG.md) - [Commits](https://github.com/digitalocean/godo/compare/v1.88.0...v1.89.0) --- updated-dependencies: - dependency-name: github.com/digitalocean/godo dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump sanitize-html from 2.7.2 to 2.7.3 in /web/ui Bumps [sanitize-html](https://github.com/apostrophecms/sanitize-html) from 2.7.2 to 2.7.3. - [Release notes](https://github.com/apostrophecms/sanitize-html/releases) - [Changelog](https://github.com/apostrophecms/sanitize-html/blob/main/CHANGELOG.md) - [Commits](https://github.com/apostrophecms/sanitize-html/compare/2.7.2...2.7.3) --- updated-dependencies: - dependency-name: sanitize-html dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps-dev): bump ts-jest from 27.1.5 to 29.0.3 in /web/ui (#70) Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 27.1.5 to 29.0.3. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v27.1.5...v29.0.3) --- updated-dependencies: - dependency-name: ts-jest dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump moment-timezone from 0.5.37 to 0.5.38 in /web/ui Bumps [moment-timezone](https://github.com/moment/moment-timezone) from 0.5.37 to 0.5.38. - [Release notes](https://github.com/moment/moment-timezone/releases) - [Changelog](https://github.com/moment/moment-timezone/blob/develop/changelog.md) - [Commits](https://github.com/moment/moment-timezone/compare/0.5.37...0.5.38) --- updated-dependencies: - dependency-name: moment-timezone dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump downshift from 6.1.12 to 7.0.1 in /web/ui Bumps [downshift](https://github.com/downshift-js/downshift) from 6.1.12 to 7.0.1. - [Release notes](https://github.com/downshift-js/downshift/releases) - [Changelog](https://github.com/downshift-js/downshift/blob/master/CHANGELOG.md) - [Commits](https://github.com/downshift-js/downshift/compare/v6.1.12...v7.0.1) --- updated-dependencies: - dependency-name: downshift dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump @codemirror/commands from 6.1.1 to 6.1.2 in /web/ui Bumps [@codemirror/commands](https://github.com/codemirror/commands) from 6.1.1 to 6.1.2. - [Release notes](https://github.com/codemirror/commands/releases) - [Changelog](https://github.com/codemirror/commands/blob/main/CHANGELOG.md) - [Commits](https://github.com/codemirror/commands/compare/6.1.1...6.1.2) --- updated-dependencies: - dependency-name: "@codemirror/commands" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump @fortawesome/fontawesome-svg-core in /web/ui Bumps [@fortawesome/fontawesome-svg-core](https://github.com/FortAwesome/Font-Awesome) from 6.1.1 to 6.2.0. - [Release notes](https://github.com/FortAwesome/Font-Awesome/releases) - [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md) - [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.1.1...6.2.0) --- updated-dependencies: - dependency-name: "@fortawesome/fontawesome-svg-core" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump sass from 1.54.9 to 1.56.0 in /web/ui Bumps [sass](https://github.com/sass/dart-sass) from 1.54.9 to 1.56.0. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.54.9...1.56.0) --- updated-dependencies: - dependency-name: sass dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump @codemirror/search from 6.2.1 to 6.2.2 in /web/ui Bumps [@codemirror/search](https://github.com/codemirror/search) from 6.2.1 to 6.2.2. - [Release notes](https://github.com/codemirror/search/releases) - [Changelog](https://github.com/codemirror/search/blob/main/CHANGELOG.md) - [Commits](https://github.com/codemirror/search/compare/6.2.1...6.2.2) --- updated-dependencies: - dependency-name: "@codemirror/search" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps-dev): bump @types/jest from 27.5.2 to 29.2.1 in /web/ui Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 27.5.2 to 29.2.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) --- updated-dependencies: - dependency-name: "@types/jest" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump @codemirror/language from 6.2.1 to 6.3.0 in /web/ui Bumps [@codemirror/language](https://github.com/codemirror/language) from 6.2.1 to 6.3.0. - [Release notes](https://github.com/codemirror/language/releases) - [Changelog](https://github.com/codemirror/language/blob/main/CHANGELOG.md) - [Commits](https://github.com/codemirror/language/compare/6.2.1...6.3.0) --- updated-dependencies: - dependency-name: "@codemirror/language" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump react-resize-detector from 6.7.8 to 7.1.2 in /web/ui * build(deps): bump react-resize-detector from 6.7.8 to 7.1.2 in /web/ui Bumps [react-resize-detector](https://github.com/maslianok/react-resize-detector) from 6.7.8 to 7.1.2. - [Release notes](https://github.com/maslianok/react-resize-detector/releases) - [Commits](https://github.com/maslianok/react-resize-detector/commits) --- updated-dependencies: - dependency-name: react-resize-detector dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * remove @types/react-resize-detector Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> * npm i --package-lock-only Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Matthieu MOREL <matthieu.morel35@gmail.com> * build(deps): bump @fortawesome/free-solid-svg-icons from 6.1.1 to 6.2.0 in /web/ui * build(deps): bump go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp Bumps [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib) from 0.36.0 to 0.36.4. - [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.36.0...zpages/v0.36.4) --- updated-dependencies: - dependency-name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * update snapshot Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Matthieu MOREL <matthieu.morel35@gmail.com> * build(deps): bump github.com/aws/aws-sdk-go from 1.44.128 to 1.44.131 Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.128 to 1.44.131. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.128...v1.44.131) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/envoyproxy/protoc-gen-validate Bumps [github.com/envoyproxy/protoc-gen-validate](https://github.com/envoyproxy/protoc-gen-validate) from 0.6.13 to 0.8.0. - [Release notes](https://github.com/envoyproxy/protoc-gen-validate/releases) - [Changelog](https://github.com/bufbuild/protoc-gen-validate/blob/main/.goreleaser.yaml) - [Commits](https://github.com/envoyproxy/protoc-gen-validate/compare/v0.6.13...v0.8.0) --- updated-dependencies: - dependency-name: github.com/envoyproxy/protoc-gen-validate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps-dev): bump @types/jest from 29.2.1 to 29.2.2 in /web/ui Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 29.2.1 to 29.2.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) --- updated-dependencies: - dependency-name: "@types/jest" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * rollback to default value for open-pull-requests-limit Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
---|---|---|
.. | ||
module | ||
react-app | ||
static | ||
.gitignore | ||
.nvmrc | ||
assets_embed.go | ||
build_ui.sh | ||
embed.go.tmpl | ||
package-lock.json | ||
package.json | ||
README.md | ||
ui.go |
Overview
The ui
directory contains static files and templates used in the web UI. For
easier distribution they are compressed (c.f. Makefile) and statically compiled
into the Prometheus binary using the embed package.
During development it is more convenient to always use the files on disk to
directly see changes without recompiling.
To make this work, remove the builtinassets
build tag in the flags
entry
in .promu.yml
, and then make build
(or build Prometheus using
go build ./cmd/prometheus
).
This will serve all files from your local filesystem. This is for development purposes only.
React-app
Introduction
The react application is a monorepo composed by multiple different npm packages. The main one is react-app
which
contains the code of the react application.
Then you have different npm packages located in the folder modules
. These packages are supposed to be used by the
react-app and also by others consumers (like Thanos)
Pre-requisite
To be able to build the react application you need:
- npm >= v7
- node >= v16
Installing npm dependencies
The React UI depends on a large number of npm packages. These are not checked in, so you will
need to move to the directory web/ui
and then download and install them locally via the npm package manager:
npm install
npm consults the package.json
and package-lock.json
files for dependencies to install. It creates a node_modules
directory with all installed dependencies.
NOTE: Do not run npm install
in the react-app
folder or in any sub folder of the module
directory.
Upgrading npm dependencies
As it is a monorepo, when upgrading a dependency, you have to upgrade it in every packages that composed this monorepo (
aka, in all sub folder of module
and in react-app
)
Then you have to run the command npm install
in web/ui
and not in a sub folder / sub package. It won't simply work.
Running a local development server
You can start a development server for the React UI outside of a running Prometheus server by running:
npm start
This will open a browser window with the React app running on http://localhost:3000/. The page will reload if you make edits to the source code. You will also see any lint errors in the console.
NOTE: It will reload only if you change the code in react-app
folder. Any code changes in the folder module
is
not considered by the command npm start
. In order to see the changes in the react-app you will have to
run npm run build:module
Due to a "proxy": "http://localhost:9090"
setting in the package.json
file, any API requests from the React UI are
proxied to localhost
on port 9090
by the development server. This allows you to run a normal Prometheus server to
handle API requests, while iterating separately on the UI.
[browser] ----> [localhost:3000 (dev server)] --(proxy API requests)--> [localhost:9090 (Prometheus)]
Running tests
To run the test for the react-app and for all modules, you can simply run:
npm test
if you want to run the test only for a specific module, you need to go to the folder of the module and run
again npm test
.
For example, in case you only want to run the test of the react-app, go to web/ui/react-app
and run npm test
To generate an HTML-based test coverage report, run:
CI=true npm test:coverage
This creates a coverage
subdirectory with the generated report. Open coverage/lcov-report/index.html
in the browser
to view it.
The CI=true
environment variable prevents the tests from being run in interactive / watching mode.
See the Create React App documentation for more information about running tests.
Building the app for production
To build a production-optimized version of the React app to a build
subdirectory, run:
npm run build
NOTE: You will likely not need to do this directly. Instead, this is taken care of by the build
target in the main
Prometheus Makefile
when building the full binary.
Integration into Prometheus
To build a Prometheus binary that includes a compiled-in version of the production build of the React app, change to the root of the repository and run:
make build
This installs dependencies via npm, builds a production build of the React app, and then finally compiles in all web assets into the Prometheus binary.