mirror of https://github.com/nicolargo/glances.git
Put WebUI conf generator in a dedicated script
This commit is contained in:
parent
54216c6580
commit
8c8120fb90
2
Makefile
2
Makefile
|
|
@ -236,7 +236,7 @@ install: ## Open a Web Browser to the installation procedure
|
|||
webui webui%: DIR = glances/outputs/static/
|
||||
|
||||
webui-gen-config: ## Generate the Web UI config file
|
||||
$(PYTHON) -c 'import json; from glances.outputs.glances_curses import _GlancesCurses; print(json.dumps({ "leftMenu": [p for p in _GlancesCurses._left_sidebar if p != "now"]}, indent=4))' > ./glances/outputs/static/js/uiconfig.json
|
||||
$(PYTHON) ./generate_webui_conf.py > ./glances/outputs/static/js/uiconfig.json
|
||||
|
||||
webui: webui-gen-config ## Build the Web UI
|
||||
cd $(DIR) && npm ci && npm run build
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ hash -r
|
|||
You must run the following command from the `glances/outputs/static/` directory.
|
||||
|
||||
```bash
|
||||
./venv/bin/python ./generate_webui_conf.py > ./glances/outputs/static/js/uiconfig.json
|
||||
cd glances/outputs/static/
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue