VictoriaMetrics/app/vmui/packages/vmui
Yury Molodov fcef2ff6b2
vmui: correctly display range results in Table view (#3657)
* fix: properly display range results

* fix: set range values to empty array

* wip

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2023-01-17 21:03:28 -08:00
..
nginx app/vmui: move source code from https://github.com/VictoriaMetrics/vmui to app/vmui 2021-07-09 17:15:23 +03:00
public app/vmui: define custom path for dashboards json file (#3545) 2023-01-11 23:06:07 -08:00
src vmui: correctly display range results in Table view (#3657) 2023-01-17 21:03:28 -08:00
web all: make fmt via the upcoming Go1.19 2022-07-11 19:22:15 +03:00
.dockerignore app/vmui: move source code from https://github.com/VictoriaMetrics/vmui to app/vmui 2021-07-09 17:15:23 +03:00
.env vmui: add explore tab for exploration of metrics, which belong to a particular job/instance (#3470) 2022-12-22 15:24:40 -08:00
.eslintrc.js vmui/refactor (#3298) 2022-11-17 01:09:14 +02:00
.gitignore app/vmui: move source code from https://github.com/VictoriaMetrics/vmui to app/vmui 2021-07-09 17:15:23 +03:00
config-overrides.js vmui: switching to Preact (#2053) 2022-01-11 10:32:17 +02:00
package-lock.json vmui: minor enhancements (#3471) 2022-12-12 17:44:13 -08:00
package.json vmui/refactor (#3298) 2022-11-17 01:09:14 +02:00
README.md vmui: add explore tab for exploration of metrics, which belong to a particular job/instance (#3470) 2022-12-22 15:24:40 -08:00
TESTCASES.md vmui/refactor (#3298) 2022-11-17 01:09:14 +02:00
tsconfig.json vmui: update dependencies (#1754) 2021-10-26 19:31:20 +03:00

Getting Started with Create React App

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
Open http://localhost:3000/#/icons to view the icons used in the project.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you cant go back!

If you arent satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point youre on your own.

You dont have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldnt feel obligated to use this feature. However we understand that this tool wouldnt be useful if you couldnt customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.


VMUI config options

VMUI can be used to paste into other applications

  1. Go to file index.html
  2. Find root element <div id="root"></div>
  3. Add data-params with the options

Options (JSON):

Name Default Description
serverURL domain name Can't be changed from the UI
inputTenantID - If the flag is present, the "Tenant ID" field is displayed
headerStyles.background #FFFFFF Header background color
headerStyles.color #3F51B5 Header font color
palette.primary #3F51B5 used to represent primary interface elements for a user
palette.secondary #F50057 used to represent secondary interface elements for a user
palette.error #FF4141 used to represent interface elements that the user should be made aware of
palette.warning #FF9800 used to represent potentially dangerous actions or important messages
palette.success #4CAF50 used to indicate the successful completion of an action that user triggered
palette.info #03A9F4 used to present information to the user that is neutral and not necessarily important

JSON example:

{
  "serverURL": "http://localhost:8428",
  "inputTenantID": "true",
  "headerStyles": {
    "background": "#FFFFFF",
    "color": "#538DE8"
  },
  "palette": {
    "primary": "#538DE8",
    "secondary": "#F76F8E",
    "error": "#FD151B",
    "warning": "#FFB30F",
    "success": "#7BE622",
    "info": "#0F5BFF"
  }
}

HTML example:

<div id="root" data-params='{"serverURL":"http://localhost:8428","inputTenantID":"true","headerStyles":{"background":"#FFFFFF","color":"#538DE8"},"palette":{"primary":"#538DE8","secondary":"#F76F8E","error":"#FD151B","warning":"#FFB30F","success":"#7BE622","info":"#0F5BFF"}}'></div>