glances/glances/outputs/static/README.md

1.1 KiB

Focus on the Glances Web User Interface

In order to build the assets of the Web UI, you'll need NPM.

NPM is a package manager for JavaScript related to Node.js.

NodeJS should be installed/updated on your system.

Pre-requisites

Install NodeJS

Example on Ubuntu OS:

sudo apt install nodejs

Upgrade NodeJS

Example on Ubuntu OS:

sudo apt update
sudo apt install nodejs
sudo npm install -g n
sudo n lts
hash -r

Build Glances WebUI

You must run the following command from the glances/outputs/static/ directory.

Install dependencies

$ npm ci

Build assets

Run the build command to build assets once :

$ npm run build

or use the watch command to rebuild only modified files :

$ npm run watch

Anatomy

static
|
|--- css
|
|--- images
|
|--- js
|
|--- public # path where builds are put
|
|--- templates

Data

Each plugin receives the data in the following format:

  • stats
  • views
  • isBsd
  • isLinux
  • isMac
  • isWindows