https://github.com/metricq/metricq-webview
📈 A visualization of MetricQ data exploiting the advantages of the HTA db backend
https://github.com/metricq/metricq-webview
metricq websocket
Last synced: about 1 year ago
JSON representation
📈 A visualization of MetricQ data exploiting the advantages of the HTA db backend
- Host: GitHub
- URL: https://github.com/metricq/metricq-webview
- Owner: metricq
- License: gpl-3.0
- Created: 2020-07-31T12:45:48.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-25T14:53:02.000Z (over 1 year ago)
- Last Synced: 2024-10-25T17:11:06.985Z (over 1 year ago)
- Topics: metricq, websocket
- Language: JavaScript
- Homepage:
- Size: 3.49 MB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# metricq-webview
Graphing interface for MetricQ
## Development
### Installation
Update your global yarn installation (we need support for project-based yarn)
````shell
npm install -g yarn
````
Then the build system and the dependencies can be installed
```shell
yarn install
```
### dev server
Use the automatically reloading dev server during development
```shell
yarn serve
```
#### override backend URL and authentication while developing
You can create a `.env.development.local` file in the repository root to override the MetricQ backend url and authentication. This file is ignored by git and should never be committed.
```shell
VUE_APP_METRICQ_BACKEND=https://metricq-grafana/
VUE_APP_METRICQ_BACKEND_AUTH=user:pass
```
### code style
We use [standardJS](https://standardjs.com), but since we need some global variables, the linter should be called like this:
```shell
yarn lint [--fix]
```
### build for production
You can build the production version yourself download it as GitHub Actions artifacts
```shell
yarn build
```
Move the `dist` folder content respectively the artifact content to your web server and make it available at `/webview`.
#### override backend URL and authentication in production environment
You can edit the `configuration.json` file next to the `index.html` in the `dist` folder to change the runtime configuration. At the moment the following fields are supported:
```json
{
"backend": "",
"user": "",
"password": ""
}
```
For example:
```json
{
"backend": "http://metricq-grafana",
"user": "webview",
"password": "SuperSecretPassword!"
}
```
The fields `user` and `password` are optional and can be omitted. The default for all fields is the build time configuration.
For the docker image, you can use the environment variables METRICQ_BACKEND, METRICQ_BACKEND_USER, and METRICQ_BACKEND_PASS to override the backend URL.
Note though, that if you want to override METRICQ_BACKEND_USER and METRICQ_BACKEND_PASS, METRICQ_BACKEND has to be set as well.