├── .gitignore ├── v7.3-6-pwt3.5.5 ├── patches │ ├── Makefile │ ├── proxmoxlib.js.patch │ ├── Nodes.pm.patch │ ├── pvemanagerlib.js.patch │ └── pvemanager-mobile.js.patch └── Makefile ├── v7.4-13-pwt3.7.3 ├── patches │ ├── Makefile │ ├── proxmoxlib.js.patch │ ├── Nodes.pm.patch │ ├── pvemanagerlib.js.patch │ └── pvemanager-mobile.js.patch └── Makefile ├── v7.4-16-pwt3.7.3 ├── patches │ ├── Makefile │ ├── proxmoxlib.js.patch │ ├── Nodes.pm.patch │ ├── pvemanagerlib.js.patch │ └── pvemanager-mobile.js.patch └── Makefile ├── v7.4-3-pwt3.6.3 ├── patches │ ├── Makefile │ ├── Nodes.pm.patch │ ├── proxmoxlib.js.patch │ ├── pvemanagerlib.js.patch │ └── pvemanager-mobile.js.patch └── Makefile ├── v7.4-3-pwt3.6.4 ├── patches │ ├── Makefile │ ├── proxmoxlib.js.patch │ ├── Nodes.pm.patch │ ├── pvemanagerlib.js.patch │ └── pvemanager-mobile.js.patch └── Makefile ├── v7.4-3-pwt3.6.5 ├── patches │ ├── Makefile │ ├── proxmoxlib.js.patch │ ├── Nodes.pm.patch │ ├── pvemanagerlib.js.patch │ └── pvemanager-mobile.js.patch └── Makefile ├── v7.4-3-pwt3.7.0 ├── patches │ ├── Makefile │ ├── proxmoxlib.js.patch │ ├── Nodes.pm.patch │ ├── pvemanagerlib.js.patch │ └── pvemanager-mobile.js.patch └── Makefile ├── v8.0.4-pwt4.0.6 ├── patches │ ├── Makefile │ ├── proxmoxlib.js.patch │ ├── Nodes.pm.patch │ ├── pvemanagerlib.js.patch │ └── pvemanager-mobile.js.patch └── Makefile ├── defines.mk ├── common.mk └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | *.pm 3 | -------------------------------------------------------------------------------- /v7.3-6-pwt3.5.5/patches/Makefile: -------------------------------------------------------------------------------- 1 | include ../../defines.mk 2 | include ../../common.mk 3 | 4 | all: proxmoxlib.js.patch Nodes.pm.patch pvemanagerlib.js.patch pvemanager-mobile.js.patch 5 | 6 | .PHONY: clean 7 | clean: 8 | -rm -f *.patch 9 | -------------------------------------------------------------------------------- /v7.4-13-pwt3.7.3/patches/Makefile: -------------------------------------------------------------------------------- 1 | include ../../defines.mk 2 | include ../../common.mk 3 | 4 | all: proxmoxlib.js.patch Nodes.pm.patch pvemanagerlib.js.patch pvemanager-mobile.js.patch 5 | 6 | .PHONY: clean 7 | clean: 8 | -rm -f *.patch 9 | -------------------------------------------------------------------------------- /v7.4-16-pwt3.7.3/patches/Makefile: -------------------------------------------------------------------------------- 1 | include ../../defines.mk 2 | include ../../common.mk 3 | 4 | all: proxmoxlib.js.patch Nodes.pm.patch pvemanagerlib.js.patch pvemanager-mobile.js.patch 5 | 6 | .PHONY: clean 7 | clean: 8 | -rm -f *.patch 9 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.6.3/patches/Makefile: -------------------------------------------------------------------------------- 1 | include ../../defines.mk 2 | include ../../common.mk 3 | 4 | all: proxmoxlib.js.patch Nodes.pm.patch pvemanagerlib.js.patch pvemanager-mobile.js.patch 5 | 6 | .PHONY: clean 7 | clean: 8 | -rm -f *.patch 9 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.6.4/patches/Makefile: -------------------------------------------------------------------------------- 1 | include ../../defines.mk 2 | include ../../common.mk 3 | 4 | all: proxmoxlib.js.patch Nodes.pm.patch pvemanagerlib.js.patch pvemanager-mobile.js.patch 5 | 6 | .PHONY: clean 7 | clean: 8 | -rm -f *.patch 9 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.6.5/patches/Makefile: -------------------------------------------------------------------------------- 1 | include ../../defines.mk 2 | include ../../common.mk 3 | 4 | all: proxmoxlib.js.patch Nodes.pm.patch pvemanagerlib.js.patch pvemanager-mobile.js.patch 5 | 6 | .PHONY: clean 7 | clean: 8 | -rm -f *.patch 9 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.7.0/patches/Makefile: -------------------------------------------------------------------------------- 1 | include ../../defines.mk 2 | include ../../common.mk 3 | 4 | all: proxmoxlib.js.patch Nodes.pm.patch pvemanagerlib.js.patch pvemanager-mobile.js.patch 5 | 6 | .PHONY: clean 7 | clean: 8 | -rm -f *.patch 9 | -------------------------------------------------------------------------------- /v8.0.4-pwt4.0.6/patches/Makefile: -------------------------------------------------------------------------------- 1 | include ../../defines.mk 2 | include ../../common.mk 3 | 4 | all: proxmoxlib.js.patch Nodes.pm.patch pvemanagerlib.js.patch pvemanager-mobile.js.patch 5 | 6 | .PHONY: clean 7 | clean: 8 | -rm -f *.patch 9 | -------------------------------------------------------------------------------- /defines.mk: -------------------------------------------------------------------------------- 1 | SRCDIR=.. 2 | BUILDDIR=.. 3 | 4 | DESTDIR= 5 | TOOLKITDIR=${DESTDIR}/usr/share/javascript/proxmox-widget-toolkit 6 | WWWBASEDIR=${DESTDIR}/usr/share/pve-manager 7 | WWWJSDIR=${WWWBASEDIR}/js 8 | WWWTOUCHDIR=${WWWBASEDIR}/touch 9 | PERLLIBDIR=${DESTDIR}/usr/share/perl5 10 | 11 | DIFFCMD=git diff -U20 --no-index 12 | -------------------------------------------------------------------------------- /common.mk: -------------------------------------------------------------------------------- 1 | proxmoxlib.js: 2 | $(MAKE) -C ${SRCDIR}/proxmox-widget-toolkit/src clean $@ 3 | cp -a ${SRCDIR}/proxmox-widget-toolkit/src/$@ $@ 4 | 5 | Nodes.pm: 6 | cp -a ${SRCDIR}/pve-manager/PVE/API2/$@ $@ 7 | 8 | pvemanagerlib.js: 9 | $(MAKE) -C ${SRCDIR}/pve-manager/www/manager6 clean $@ 10 | cp -a ${SRCDIR}/pve-manager/www/manager6/$@ $@ 11 | 12 | pvemanager-mobile.js: 13 | $(MAKE) -C ${SRCDIR}/pve-manager/www/mobile clean $@ 14 | cp -a ${SRCDIR}/pve-manager/www/mobile/$@ $@ 15 | 16 | proxmoxlib.js.patch: 17 | -${DIFFCMD} ${TOOLKITDIR}/proxmoxlib.js ${BUILDDIR}/proxmoxlib.js > $@ 18 | 19 | Nodes.pm.patch: 20 | -${DIFFCMD} ${PERLLIBDIR}/PVE/API2/Nodes.pm ${BUILDDIR}/Nodes.pm > $@ 21 | 22 | pvemanagerlib.js.patch: 23 | -${DIFFCMD} ${WWWJSDIR}/pvemanagerlib.js ${BUILDDIR}/pvemanagerlib.js > $@ 24 | 25 | pvemanager-mobile.js.patch: 26 | -${DIFFCMD} ${WWWTOUCHDIR}/pvemanager-mobile.js ${BUILDDIR}/pvemanager-mobile.js > $@ 27 | -------------------------------------------------------------------------------- /v7.3-6-pwt3.5.5/Makefile: -------------------------------------------------------------------------------- 1 | include ../defines.mk 2 | include ../common.mk 3 | 4 | SRCDIR=../.. 5 | 6 | all: proxmoxlib.js Nodes.pm pvemanagerlib.js pvemanager-mobile.js 7 | 8 | .PHONY: install 9 | install: 10 | install -d ${TOOLKITDIR} 11 | install -m 0644 proxmoxlib.js ${TOOLKITDIR} 12 | install -d ${PERLLIBDIR}/PVE/API2 13 | install -m 0644 Nodes.pm ${PERLLIBDIR}/PVE/API2 14 | install -d ${WWWJSDIR} 15 | install -m 0644 pvemanagerlib.js ${WWWJSDIR} 16 | install -d ${WWWTOUCHDIR} 17 | install -m 0644 pvemanager-mobile.js ${WWWTOUCHDIR} 18 | 19 | .PHONY: clean 20 | clean: 21 | -rm -f proxmoxlib.js Nodes.pm pvemanagerlib.js pvemanager-mobile.js 22 | 23 | .PHONY: backup 24 | backup: 25 | mkdir -p orig 26 | cp -a ${TOOLKITDIR}/proxmoxlib.js orig/ 27 | cp -a ${PERLLIBDIR}/PVE/API2/Nodes.pm orig/ 28 | cp -a ${WWWJSDIR}/pvemanagerlib.js orig/ 29 | cp -a ${WWWTOUCHDIR}/pvemanager-mobile.js orig/ 30 | 31 | .PHONY: restore 32 | restore: 33 | install -d ${TOOLKITDIR} 34 | install -m 0644 orig/proxmoxlib.js ${TOOLKITDIR} 35 | install -d ${PERLLIBDIR}/PVE/API2 36 | install -m 0644 orig/Nodes.pm ${PERLLIBDIR}/PVE/API2 37 | install -d ${WWWJSDIR} 38 | install -m 0644 orig/pvemanagerlib.js ${WWWJSDIR} 39 | install -d ${WWWTOUCHDIR} 40 | install -m 0644 orig/pvemanager-mobile.js ${WWWTOUCHDIR} 41 | 42 | .PHONY: cleanbackup 43 | cleanbackup: 44 | -rm -f orig/proxmoxlib.js orig/Nodes.pm orig/pvemanagerlib.js orig/pvemanager-mobile.js 45 | -------------------------------------------------------------------------------- /v7.4-13-pwt3.7.3/Makefile: -------------------------------------------------------------------------------- 1 | include ../defines.mk 2 | include ../common.mk 3 | 4 | SRCDIR=../.. 5 | 6 | all: proxmoxlib.js Nodes.pm pvemanagerlib.js pvemanager-mobile.js 7 | 8 | .PHONY: install 9 | install: 10 | install -d ${TOOLKITDIR} 11 | install -m 0644 proxmoxlib.js ${TOOLKITDIR} 12 | install -d ${PERLLIBDIR}/PVE/API2 13 | install -m 0644 Nodes.pm ${PERLLIBDIR}/PVE/API2 14 | install -d ${WWWJSDIR} 15 | install -m 0644 pvemanagerlib.js ${WWWJSDIR} 16 | install -d ${WWWTOUCHDIR} 17 | install -m 0644 pvemanager-mobile.js ${WWWTOUCHDIR} 18 | 19 | .PHONY: clean 20 | clean: 21 | -rm -f proxmoxlib.js Nodes.pm pvemanagerlib.js pvemanager-mobile.js 22 | 23 | .PHONY: backup 24 | backup: 25 | mkdir -p orig 26 | cp -a ${TOOLKITDIR}/proxmoxlib.js orig/ 27 | cp -a ${PERLLIBDIR}/PVE/API2/Nodes.pm orig/ 28 | cp -a ${WWWJSDIR}/pvemanagerlib.js orig/ 29 | cp -a ${WWWTOUCHDIR}/pvemanager-mobile.js orig/ 30 | 31 | .PHONY: restore 32 | restore: 33 | install -d ${TOOLKITDIR} 34 | install -m 0644 orig/proxmoxlib.js ${TOOLKITDIR} 35 | install -d ${PERLLIBDIR}/PVE/API2 36 | install -m 0644 orig/Nodes.pm ${PERLLIBDIR}/PVE/API2 37 | install -d ${WWWJSDIR} 38 | install -m 0644 orig/pvemanagerlib.js ${WWWJSDIR} 39 | install -d ${WWWTOUCHDIR} 40 | install -m 0644 orig/pvemanager-mobile.js ${WWWTOUCHDIR} 41 | 42 | .PHONY: cleanbackup 43 | cleanbackup: 44 | -rm -f orig/proxmoxlib.js orig/Nodes.pm orig/pvemanagerlib.js orig/pvemanager-mobile.js 45 | -------------------------------------------------------------------------------- /v7.4-16-pwt3.7.3/Makefile: -------------------------------------------------------------------------------- 1 | include ../defines.mk 2 | include ../common.mk 3 | 4 | SRCDIR=../.. 5 | 6 | all: proxmoxlib.js Nodes.pm pvemanagerlib.js pvemanager-mobile.js 7 | 8 | .PHONY: install 9 | install: 10 | install -d ${TOOLKITDIR} 11 | install -m 0644 proxmoxlib.js ${TOOLKITDIR} 12 | install -d ${PERLLIBDIR}/PVE/API2 13 | install -m 0644 Nodes.pm ${PERLLIBDIR}/PVE/API2 14 | install -d ${WWWJSDIR} 15 | install -m 0644 pvemanagerlib.js ${WWWJSDIR} 16 | install -d ${WWWTOUCHDIR} 17 | install -m 0644 pvemanager-mobile.js ${WWWTOUCHDIR} 18 | 19 | .PHONY: clean 20 | clean: 21 | -rm -f proxmoxlib.js Nodes.pm pvemanagerlib.js pvemanager-mobile.js 22 | 23 | .PHONY: backup 24 | backup: 25 | mkdir -p orig 26 | cp -a ${TOOLKITDIR}/proxmoxlib.js orig/ 27 | cp -a ${PERLLIBDIR}/PVE/API2/Nodes.pm orig/ 28 | cp -a ${WWWJSDIR}/pvemanagerlib.js orig/ 29 | cp -a ${WWWTOUCHDIR}/pvemanager-mobile.js orig/ 30 | 31 | .PHONY: restore 32 | restore: 33 | install -d ${TOOLKITDIR} 34 | install -m 0644 orig/proxmoxlib.js ${TOOLKITDIR} 35 | install -d ${PERLLIBDIR}/PVE/API2 36 | install -m 0644 orig/Nodes.pm ${PERLLIBDIR}/PVE/API2 37 | install -d ${WWWJSDIR} 38 | install -m 0644 orig/pvemanagerlib.js ${WWWJSDIR} 39 | install -d ${WWWTOUCHDIR} 40 | install -m 0644 orig/pvemanager-mobile.js ${WWWTOUCHDIR} 41 | 42 | .PHONY: cleanbackup 43 | cleanbackup: 44 | -rm -f orig/proxmoxlib.js orig/Nodes.pm orig/pvemanagerlib.js orig/pvemanager-mobile.js 45 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.6.3/Makefile: -------------------------------------------------------------------------------- 1 | include ../defines.mk 2 | include ../common.mk 3 | 4 | SRCDIR=../.. 5 | 6 | all: proxmoxlib.js Nodes.pm pvemanagerlib.js pvemanager-mobile.js 7 | 8 | .PHONY: install 9 | install: 10 | install -d ${TOOLKITDIR} 11 | install -m 0644 proxmoxlib.js ${TOOLKITDIR} 12 | install -d ${PERLLIBDIR}/PVE/API2 13 | install -m 0644 Nodes.pm ${PERLLIBDIR}/PVE/API2 14 | install -d ${WWWJSDIR} 15 | install -m 0644 pvemanagerlib.js ${WWWJSDIR} 16 | install -d ${WWWTOUCHDIR} 17 | install -m 0644 pvemanager-mobile.js ${WWWTOUCHDIR} 18 | 19 | .PHONY: clean 20 | clean: 21 | -rm -f proxmoxlib.js Nodes.pm pvemanagerlib.js pvemanager-mobile.js 22 | 23 | .PHONY: backup 24 | backup: 25 | mkdir -p orig 26 | cp -a ${TOOLKITDIR}/proxmoxlib.js orig/ 27 | cp -a ${PERLLIBDIR}/PVE/API2/Nodes.pm orig/ 28 | cp -a ${WWWJSDIR}/pvemanagerlib.js orig/ 29 | cp -a ${WWWTOUCHDIR}/pvemanager-mobile.js orig/ 30 | 31 | .PHONY: restore 32 | restore: 33 | install -d ${TOOLKITDIR} 34 | install -m 0644 orig/proxmoxlib.js ${TOOLKITDIR} 35 | install -d ${PERLLIBDIR}/PVE/API2 36 | install -m 0644 orig/Nodes.pm ${PERLLIBDIR}/PVE/API2 37 | install -d ${WWWJSDIR} 38 | install -m 0644 orig/pvemanagerlib.js ${WWWJSDIR} 39 | install -d ${WWWTOUCHDIR} 40 | install -m 0644 orig/pvemanager-mobile.js ${WWWTOUCHDIR} 41 | 42 | .PHONY: cleanbackup 43 | cleanbackup: 44 | -rm -f orig/proxmoxlib.js orig/Nodes.pm orig/pvemanagerlib.js orig/pvemanager-mobile.js 45 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.6.4/Makefile: -------------------------------------------------------------------------------- 1 | include ../defines.mk 2 | include ../common.mk 3 | 4 | SRCDIR=../.. 5 | 6 | all: proxmoxlib.js Nodes.pm pvemanagerlib.js pvemanager-mobile.js 7 | 8 | .PHONY: install 9 | install: 10 | install -d ${TOOLKITDIR} 11 | install -m 0644 proxmoxlib.js ${TOOLKITDIR} 12 | install -d ${PERLLIBDIR}/PVE/API2 13 | install -m 0644 Nodes.pm ${PERLLIBDIR}/PVE/API2 14 | install -d ${WWWJSDIR} 15 | install -m 0644 pvemanagerlib.js ${WWWJSDIR} 16 | install -d ${WWWTOUCHDIR} 17 | install -m 0644 pvemanager-mobile.js ${WWWTOUCHDIR} 18 | 19 | .PHONY: clean 20 | clean: 21 | -rm -f proxmoxlib.js Nodes.pm pvemanagerlib.js pvemanager-mobile.js 22 | 23 | .PHONY: backup 24 | backup: 25 | mkdir -p orig 26 | cp -a ${TOOLKITDIR}/proxmoxlib.js orig/ 27 | cp -a ${PERLLIBDIR}/PVE/API2/Nodes.pm orig/ 28 | cp -a ${WWWJSDIR}/pvemanagerlib.js orig/ 29 | cp -a ${WWWTOUCHDIR}/pvemanager-mobile.js orig/ 30 | 31 | .PHONY: restore 32 | restore: 33 | install -d ${TOOLKITDIR} 34 | install -m 0644 orig/proxmoxlib.js ${TOOLKITDIR} 35 | install -d ${PERLLIBDIR}/PVE/API2 36 | install -m 0644 orig/Nodes.pm ${PERLLIBDIR}/PVE/API2 37 | install -d ${WWWJSDIR} 38 | install -m 0644 orig/pvemanagerlib.js ${WWWJSDIR} 39 | install -d ${WWWTOUCHDIR} 40 | install -m 0644 orig/pvemanager-mobile.js ${WWWTOUCHDIR} 41 | 42 | .PHONY: cleanbackup 43 | cleanbackup: 44 | -rm -f orig/proxmoxlib.js orig/Nodes.pm orig/pvemanagerlib.js orig/pvemanager-mobile.js 45 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.6.5/Makefile: -------------------------------------------------------------------------------- 1 | include ../defines.mk 2 | include ../common.mk 3 | 4 | SRCDIR=../.. 5 | 6 | all: proxmoxlib.js Nodes.pm pvemanagerlib.js pvemanager-mobile.js 7 | 8 | .PHONY: install 9 | install: 10 | install -d ${TOOLKITDIR} 11 | install -m 0644 proxmoxlib.js ${TOOLKITDIR} 12 | install -d ${PERLLIBDIR}/PVE/API2 13 | install -m 0644 Nodes.pm ${PERLLIBDIR}/PVE/API2 14 | install -d ${WWWJSDIR} 15 | install -m 0644 pvemanagerlib.js ${WWWJSDIR} 16 | install -d ${WWWTOUCHDIR} 17 | install -m 0644 pvemanager-mobile.js ${WWWTOUCHDIR} 18 | 19 | .PHONY: clean 20 | clean: 21 | -rm -f proxmoxlib.js Nodes.pm pvemanagerlib.js pvemanager-mobile.js 22 | 23 | .PHONY: backup 24 | backup: 25 | mkdir -p orig 26 | cp -a ${TOOLKITDIR}/proxmoxlib.js orig/ 27 | cp -a ${PERLLIBDIR}/PVE/API2/Nodes.pm orig/ 28 | cp -a ${WWWJSDIR}/pvemanagerlib.js orig/ 29 | cp -a ${WWWTOUCHDIR}/pvemanager-mobile.js orig/ 30 | 31 | .PHONY: restore 32 | restore: 33 | install -d ${TOOLKITDIR} 34 | install -m 0644 orig/proxmoxlib.js ${TOOLKITDIR} 35 | install -d ${PERLLIBDIR}/PVE/API2 36 | install -m 0644 orig/Nodes.pm ${PERLLIBDIR}/PVE/API2 37 | install -d ${WWWJSDIR} 38 | install -m 0644 orig/pvemanagerlib.js ${WWWJSDIR} 39 | install -d ${WWWTOUCHDIR} 40 | install -m 0644 orig/pvemanager-mobile.js ${WWWTOUCHDIR} 41 | 42 | .PHONY: cleanbackup 43 | cleanbackup: 44 | -rm -f orig/proxmoxlib.js orig/Nodes.pm orig/pvemanagerlib.js orig/pvemanager-mobile.js 45 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.7.0/Makefile: -------------------------------------------------------------------------------- 1 | include ../defines.mk 2 | include ../common.mk 3 | 4 | SRCDIR=../.. 5 | 6 | all: proxmoxlib.js Nodes.pm pvemanagerlib.js pvemanager-mobile.js 7 | 8 | .PHONY: install 9 | install: 10 | install -d ${TOOLKITDIR} 11 | install -m 0644 proxmoxlib.js ${TOOLKITDIR} 12 | install -d ${PERLLIBDIR}/PVE/API2 13 | install -m 0644 Nodes.pm ${PERLLIBDIR}/PVE/API2 14 | install -d ${WWWJSDIR} 15 | install -m 0644 pvemanagerlib.js ${WWWJSDIR} 16 | install -d ${WWWTOUCHDIR} 17 | install -m 0644 pvemanager-mobile.js ${WWWTOUCHDIR} 18 | 19 | .PHONY: clean 20 | clean: 21 | -rm -f proxmoxlib.js Nodes.pm pvemanagerlib.js pvemanager-mobile.js 22 | 23 | .PHONY: backup 24 | backup: 25 | mkdir -p orig 26 | cp -a ${TOOLKITDIR}/proxmoxlib.js orig/ 27 | cp -a ${PERLLIBDIR}/PVE/API2/Nodes.pm orig/ 28 | cp -a ${WWWJSDIR}/pvemanagerlib.js orig/ 29 | cp -a ${WWWTOUCHDIR}/pvemanager-mobile.js orig/ 30 | 31 | .PHONY: restore 32 | restore: 33 | install -d ${TOOLKITDIR} 34 | install -m 0644 orig/proxmoxlib.js ${TOOLKITDIR} 35 | install -d ${PERLLIBDIR}/PVE/API2 36 | install -m 0644 orig/Nodes.pm ${PERLLIBDIR}/PVE/API2 37 | install -d ${WWWJSDIR} 38 | install -m 0644 orig/pvemanagerlib.js ${WWWJSDIR} 39 | install -d ${WWWTOUCHDIR} 40 | install -m 0644 orig/pvemanager-mobile.js ${WWWTOUCHDIR} 41 | 42 | .PHONY: cleanbackup 43 | cleanbackup: 44 | -rm -f orig/proxmoxlib.js orig/Nodes.pm orig/pvemanagerlib.js orig/pvemanager-mobile.js 45 | -------------------------------------------------------------------------------- /v8.0.4-pwt4.0.6/Makefile: -------------------------------------------------------------------------------- 1 | include ../defines.mk 2 | include ../common.mk 3 | 4 | SRCDIR=../.. 5 | 6 | all: proxmoxlib.js Nodes.pm pvemanagerlib.js pvemanager-mobile.js 7 | 8 | .PHONY: install 9 | install: 10 | install -d ${TOOLKITDIR} 11 | install -m 0644 proxmoxlib.js ${TOOLKITDIR} 12 | install -d ${PERLLIBDIR}/PVE/API2 13 | install -m 0644 Nodes.pm ${PERLLIBDIR}/PVE/API2 14 | install -d ${WWWJSDIR} 15 | install -m 0644 pvemanagerlib.js ${WWWJSDIR} 16 | install -d ${WWWTOUCHDIR} 17 | install -m 0644 pvemanager-mobile.js ${WWWTOUCHDIR} 18 | 19 | .PHONY: clean 20 | clean: 21 | -rm -f proxmoxlib.js Nodes.pm pvemanagerlib.js pvemanager-mobile.js 22 | 23 | .PHONY: backup 24 | backup: 25 | mkdir -p orig 26 | cp -a ${TOOLKITDIR}/proxmoxlib.js orig/ 27 | cp -a ${PERLLIBDIR}/PVE/API2/Nodes.pm orig/ 28 | cp -a ${WWWJSDIR}/pvemanagerlib.js orig/ 29 | cp -a ${WWWTOUCHDIR}/pvemanager-mobile.js orig/ 30 | 31 | .PHONY: restore 32 | restore: 33 | install -d ${TOOLKITDIR} 34 | install -m 0644 orig/proxmoxlib.js ${TOOLKITDIR} 35 | install -d ${PERLLIBDIR}/PVE/API2 36 | install -m 0644 orig/Nodes.pm ${PERLLIBDIR}/PVE/API2 37 | install -d ${WWWJSDIR} 38 | install -m 0644 orig/pvemanagerlib.js ${WWWJSDIR} 39 | install -d ${WWWTOUCHDIR} 40 | install -m 0644 orig/pvemanager-mobile.js ${WWWTOUCHDIR} 41 | 42 | .PHONY: cleanbackup 43 | cleanbackup: 44 | -rm -f orig/proxmoxlib.js orig/Nodes.pm orig/pvemanagerlib.js orig/pvemanager-mobile.js 45 | -------------------------------------------------------------------------------- /v7.3-6-pwt3.5.5/patches/proxmoxlib.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js b/../proxmoxlib.js 2 | index 34a0d1e..8e3059c 100644 3 | --- a/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js 4 | +++ b/../proxmoxlib.js 5 | @@ -1000,40 +1000,44 @@ utilities: { 6 | if (!Ext.isNumeric(value)) { 7 | return ''; 8 | } 9 | return Proxmox.Utils.format_size(value); 10 | }, 11 | 12 | render_cpu_model: function(cpu) { 13 | let socketText = cpu.sockets > 1 ? gettext('Sockets') : gettext('Socket'); 14 | return `${cpu.cpus} x ${cpu.model} (${cpu.sockets.toString()} ${socketText})`; 15 | }, 16 | 17 | /* this is different for nodes */ 18 | render_node_cpu_usage: function(value, record) { 19 | return Proxmox.Utils.render_cpu_usage(value, record.cpus); 20 | }, 21 | 22 | render_node_size_usage: function(record) { 23 | return Proxmox.Utils.render_size_usage(record.used, record.total); 24 | }, 25 | 26 | + render_node_temp: function(record) { 27 | + return record.used.toFixed(1) + '°C (crit: ' + record.total.toFixed(1) + '°C)'; 28 | + }, 29 | + 30 | loadTextFromFile: function(file, callback, maxBytes) { 31 | let maxSize = maxBytes || 8192; 32 | if (file.size > maxSize) { 33 | Ext.Msg.alert(gettext('Error'), gettext("Invalid file size: ") + file.size); 34 | return; 35 | } 36 | let reader = new FileReader(); 37 | reader.onload = evt => callback(evt.target.result); 38 | reader.readAsText(file); 39 | }, 40 | 41 | parsePropertyString: function(value, defaultKey) { 42 | var res = {}, 43 | error; 44 | 45 | if (typeof value !== 'string' || value === '') { 46 | return res; 47 | } 48 | 49 | Ext.Array.each(value.split(','), function(p) { 50 | -------------------------------------------------------------------------------- /v7.4-13-pwt3.7.3/patches/proxmoxlib.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js b/../proxmoxlib.js 2 | index 91bf878..5565ac7 100644 3 | --- a/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js 4 | +++ b/../proxmoxlib.js 5 | @@ -1027,40 +1027,44 @@ utilities: { 6 | if (!Ext.isNumeric(value)) { 7 | return ''; 8 | } 9 | return Proxmox.Utils.format_size(value); 10 | }, 11 | 12 | render_cpu_model: function(cpu) { 13 | let socketText = cpu.sockets > 1 ? gettext('Sockets') : gettext('Socket'); 14 | return `${cpu.cpus} x ${cpu.model} (${cpu.sockets.toString()} ${socketText})`; 15 | }, 16 | 17 | /* this is different for nodes */ 18 | render_node_cpu_usage: function(value, record) { 19 | return Proxmox.Utils.render_cpu_usage(value, record.cpus); 20 | }, 21 | 22 | render_node_size_usage: function(record) { 23 | return Proxmox.Utils.render_size_usage(record.used, record.total); 24 | }, 25 | 26 | + render_node_temp: function(record) { 27 | + return record.used.toFixed(1) + '°C (crit: ' + record.total.toFixed(1) + '°C)'; 28 | + }, 29 | + 30 | loadTextFromFile: function(file, callback, maxBytes) { 31 | let maxSize = maxBytes || 8192; 32 | if (file.size > maxSize) { 33 | Ext.Msg.alert(gettext('Error'), gettext("Invalid file size: ") + file.size); 34 | return; 35 | } 36 | let reader = new FileReader(); 37 | reader.onload = evt => callback(evt.target.result); 38 | reader.readAsText(file); 39 | }, 40 | 41 | parsePropertyString: function(value, defaultKey) { 42 | var res = {}, 43 | error; 44 | 45 | if (typeof value !== 'string' || value === '') { 46 | return res; 47 | } 48 | 49 | Ext.Array.each(value.split(','), function(p) { 50 | -------------------------------------------------------------------------------- /v7.4-16-pwt3.7.3/patches/proxmoxlib.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js b/../proxmoxlib.js 2 | index 91bf878..134f5cd 100644 3 | --- a/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js 4 | +++ b/../proxmoxlib.js 5 | @@ -1027,40 +1027,44 @@ utilities: { 6 | if (!Ext.isNumeric(value)) { 7 | return ''; 8 | } 9 | return Proxmox.Utils.format_size(value); 10 | }, 11 | 12 | render_cpu_model: function(cpu) { 13 | let socketText = cpu.sockets > 1 ? gettext('Sockets') : gettext('Socket'); 14 | return `${cpu.cpus} x ${cpu.model} (${cpu.sockets.toString()} ${socketText})`; 15 | }, 16 | 17 | /* this is different for nodes */ 18 | render_node_cpu_usage: function(value, record) { 19 | return Proxmox.Utils.render_cpu_usage(value, record.cpus); 20 | }, 21 | 22 | render_node_size_usage: function(record) { 23 | return Proxmox.Utils.render_size_usage(record.used, record.total); 24 | }, 25 | 26 | + render_node_temp: function(record) { 27 | + return record.used.toFixed(1) + '°C (crit: ' + record.total.toFixed(1) + '°C)'; 28 | + }, 29 | + 30 | loadTextFromFile: function(file, callback, maxBytes) { 31 | let maxSize = maxBytes || 8192; 32 | if (file.size > maxSize) { 33 | Ext.Msg.alert(gettext('Error'), gettext("Invalid file size: ") + file.size); 34 | return; 35 | } 36 | let reader = new FileReader(); 37 | reader.onload = evt => callback(evt.target.result); 38 | reader.readAsText(file); 39 | }, 40 | 41 | parsePropertyString: function(value, defaultKey) { 42 | var res = {}, 43 | error; 44 | 45 | if (typeof value !== 'string' || value === '') { 46 | return res; 47 | } 48 | 49 | Ext.Array.each(value.split(','), function(p) { 50 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.6.4/patches/proxmoxlib.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js b/../proxmoxlib.js 2 | index d3e2d44..1b9665a 100644 3 | --- a/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js 4 | +++ b/../proxmoxlib.js 5 | @@ -1027,40 +1027,44 @@ utilities: { 6 | if (!Ext.isNumeric(value)) { 7 | return ''; 8 | } 9 | return Proxmox.Utils.format_size(value); 10 | }, 11 | 12 | render_cpu_model: function(cpu) { 13 | let socketText = cpu.sockets > 1 ? gettext('Sockets') : gettext('Socket'); 14 | return `${cpu.cpus} x ${cpu.model} (${cpu.sockets.toString()} ${socketText})`; 15 | }, 16 | 17 | /* this is different for nodes */ 18 | render_node_cpu_usage: function(value, record) { 19 | return Proxmox.Utils.render_cpu_usage(value, record.cpus); 20 | }, 21 | 22 | render_node_size_usage: function(record) { 23 | return Proxmox.Utils.render_size_usage(record.used, record.total); 24 | }, 25 | 26 | + render_node_temp: function(record) { 27 | + return record.used.toFixed(1) + '°C (crit: ' + record.total.toFixed(1) + '°C)'; 28 | + }, 29 | + 30 | loadTextFromFile: function(file, callback, maxBytes) { 31 | let maxSize = maxBytes || 8192; 32 | if (file.size > maxSize) { 33 | Ext.Msg.alert(gettext('Error'), gettext("Invalid file size: ") + file.size); 34 | return; 35 | } 36 | let reader = new FileReader(); 37 | reader.onload = evt => callback(evt.target.result); 38 | reader.readAsText(file); 39 | }, 40 | 41 | parsePropertyString: function(value, defaultKey) { 42 | var res = {}, 43 | error; 44 | 45 | if (typeof value !== 'string' || value === '') { 46 | return res; 47 | } 48 | 49 | Ext.Array.each(value.split(','), function(p) { 50 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.6.5/patches/proxmoxlib.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js b/../proxmoxlib.js 2 | index afa4a36..b549034 100644 3 | --- a/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js 4 | +++ b/../proxmoxlib.js 5 | @@ -1027,40 +1027,44 @@ utilities: { 6 | if (!Ext.isNumeric(value)) { 7 | return ''; 8 | } 9 | return Proxmox.Utils.format_size(value); 10 | }, 11 | 12 | render_cpu_model: function(cpu) { 13 | let socketText = cpu.sockets > 1 ? gettext('Sockets') : gettext('Socket'); 14 | return `${cpu.cpus} x ${cpu.model} (${cpu.sockets.toString()} ${socketText})`; 15 | }, 16 | 17 | /* this is different for nodes */ 18 | render_node_cpu_usage: function(value, record) { 19 | return Proxmox.Utils.render_cpu_usage(value, record.cpus); 20 | }, 21 | 22 | render_node_size_usage: function(record) { 23 | return Proxmox.Utils.render_size_usage(record.used, record.total); 24 | }, 25 | 26 | + render_node_temp: function(record) { 27 | + return record.used.toFixed(1) + '°C (crit: ' + record.total.toFixed(1) + '°C)'; 28 | + }, 29 | + 30 | loadTextFromFile: function(file, callback, maxBytes) { 31 | let maxSize = maxBytes || 8192; 32 | if (file.size > maxSize) { 33 | Ext.Msg.alert(gettext('Error'), gettext("Invalid file size: ") + file.size); 34 | return; 35 | } 36 | let reader = new FileReader(); 37 | reader.onload = evt => callback(evt.target.result); 38 | reader.readAsText(file); 39 | }, 40 | 41 | parsePropertyString: function(value, defaultKey) { 42 | var res = {}, 43 | error; 44 | 45 | if (typeof value !== 'string' || value === '') { 46 | return res; 47 | } 48 | 49 | Ext.Array.each(value.split(','), function(p) { 50 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.7.0/patches/proxmoxlib.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js b/../proxmoxlib.js 2 | index 15a0257..9acd610 100644 3 | --- a/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js 4 | +++ b/../proxmoxlib.js 5 | @@ -1027,40 +1027,44 @@ utilities: { 6 | if (!Ext.isNumeric(value)) { 7 | return ''; 8 | } 9 | return Proxmox.Utils.format_size(value); 10 | }, 11 | 12 | render_cpu_model: function(cpu) { 13 | let socketText = cpu.sockets > 1 ? gettext('Sockets') : gettext('Socket'); 14 | return `${cpu.cpus} x ${cpu.model} (${cpu.sockets.toString()} ${socketText})`; 15 | }, 16 | 17 | /* this is different for nodes */ 18 | render_node_cpu_usage: function(value, record) { 19 | return Proxmox.Utils.render_cpu_usage(value, record.cpus); 20 | }, 21 | 22 | render_node_size_usage: function(record) { 23 | return Proxmox.Utils.render_size_usage(record.used, record.total); 24 | }, 25 | 26 | + render_node_temp: function(record) { 27 | + return record.used.toFixed(1) + '°C (crit: ' + record.total.toFixed(1) + '°C)'; 28 | + }, 29 | + 30 | loadTextFromFile: function(file, callback, maxBytes) { 31 | let maxSize = maxBytes || 8192; 32 | if (file.size > maxSize) { 33 | Ext.Msg.alert(gettext('Error'), gettext("Invalid file size: ") + file.size); 34 | return; 35 | } 36 | let reader = new FileReader(); 37 | reader.onload = evt => callback(evt.target.result); 38 | reader.readAsText(file); 39 | }, 40 | 41 | parsePropertyString: function(value, defaultKey) { 42 | var res = {}, 43 | error; 44 | 45 | if (typeof value !== 'string' || value === '') { 46 | return res; 47 | } 48 | 49 | Ext.Array.each(value.split(','), function(p) { 50 | -------------------------------------------------------------------------------- /v8.0.4-pwt4.0.6/patches/proxmoxlib.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js b/../proxmoxlib.js 2 | index 21eeff9..bdaf5db 100644 3 | --- a/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js 4 | +++ b/../proxmoxlib.js 5 | @@ -1030,40 +1030,47 @@ utilities: { 6 | if (!Ext.isNumeric(value)) { 7 | return ''; 8 | } 9 | return Proxmox.Utils.format_size(value); 10 | }, 11 | 12 | render_cpu_model: function(cpu) { 13 | let socketText = cpu.sockets > 1 ? gettext('Sockets') : gettext('Socket'); 14 | return `${cpu.cpus} x ${cpu.model} (${cpu.sockets.toString()} ${socketText})`; 15 | }, 16 | 17 | /* this is different for nodes */ 18 | render_node_cpu_usage: function(value, record) { 19 | return Proxmox.Utils.render_cpu_usage(value, record.cpus); 20 | }, 21 | 22 | render_node_size_usage: function(record) { 23 | return Proxmox.Utils.render_size_usage(record.used, record.total); 24 | }, 25 | 26 | + render_node_temp: function(record) { 27 | + if (!record || !Ext.isNumeric(record.used) || !Ext.isNumeric(record.total)) { 28 | + return '-'; 29 | + } 30 | + return record.used.toFixed(1) + '°C (crit: ' + record.total.toFixed(1) + '°C)'; 31 | + }, 32 | + 33 | loadTextFromFile: function(file, callback, maxBytes) { 34 | let maxSize = maxBytes || 8192; 35 | if (file.size > maxSize) { 36 | Ext.Msg.alert(gettext('Error'), gettext("Invalid file size: ") + file.size); 37 | return; 38 | } 39 | let reader = new FileReader(); 40 | reader.onload = evt => callback(evt.target.result); 41 | reader.readAsText(file); 42 | }, 43 | 44 | parsePropertyString: function(value, defaultKey) { 45 | var res = {}, 46 | error; 47 | 48 | if (typeof value !== 'string' || value === '') { 49 | return res; 50 | } 51 | 52 | Ext.Array.each(value.split(','), function(p) { 53 | -------------------------------------------------------------------------------- /v7.3-6-pwt3.5.5/patches/Nodes.pm.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/perl5/PVE/API2/Nodes.pm b/../Nodes.pm 2 | index 47c2d74..63e3efb 100644 3 | --- a/usr/share/perl5/PVE/API2/Nodes.pm 4 | +++ b/../Nodes.pm 5 | @@ -395,40 +395,99 @@ __PACKAGE__->register_method({ 6 | }; 7 | 8 | $res->{swap} = { 9 | free => $meminfo->{swapfree}, 10 | total => $meminfo->{swaptotal}, 11 | used => $meminfo->{swapused}, 12 | }; 13 | 14 | $res->{pveversion} = PVE::pvecfg::package() . "/" . 15 | PVE::pvecfg::version_text(); 16 | 17 | my $dinfo = df('/', 1); # output is bytes 18 | 19 | $res->{rootfs} = { 20 | total => $dinfo->{blocks}, 21 | avail => $dinfo->{bavail}, 22 | used => $dinfo->{used}, 23 | free => $dinfo->{blocks} - $dinfo->{used}, 24 | }; 25 | 26 | + my %sensors_config = ( 27 | + cputemp => { 28 | + jsonpath => ['coretemp-isa-0000', 'Package id 0'], 29 | + valkey => 'temp1_input', 30 | + critkey => 'temp1_crit', 31 | + }, 32 | + pchtemp => { 33 | + jsonpath => ['pch_cannonlake-virtual-0', 'temp1'], 34 | + valkey => 'temp1_input', 35 | + }, 36 | + nvmetemp => { 37 | + jsonpath => ['nvme-pci-0100', 'Composite'], 38 | + valkey => 'temp1_input', 39 | + critkey => 'temp1_crit', 40 | + }, 41 | + hd1temp => { 42 | + jsonpath => ['drivetemp-scsi-0-0', 'temp1'], 43 | + valkey => 'temp1_input', 44 | + critkey => 'temp1_crit', 45 | + }, 46 | + hd2temp => { 47 | + jsonpath => ['drivetemp-scsi-1-0', 'temp1'], 48 | + valkey => 'temp1_input', 49 | + critkey => 'temp1_crit', 50 | + }, 51 | + hd3temp => { 52 | + jsonpath => ['drivetemp-scsi-2-0', 'temp1'], 53 | + valkey => 'temp1_input', 54 | + critkey => 'temp1_crit', 55 | + }, 56 | + ); 57 | + my $temp_default_val = 0; 58 | + my $temp_default_crit = 80; 59 | + 60 | + my $sensors = eval { decode_json(`sensors -j`); }; 61 | + if (defined($sensors)) { 62 | + keys %sensors_config; 63 | + while (my ($k, $v) = each %sensors_config) { 64 | + if (!defined($v->{jsonpath})) { next; } 65 | + my $currref = $sensors; 66 | + my $pathdefined = 1; 67 | + for my $pathseg (@{$v->{jsonpath}}) { 68 | + if (defined($currref->{$pathseg})) { 69 | + $currref = $currref->{$pathseg} 70 | + } else { 71 | + $pathdefined = 0; 72 | + last; 73 | + } 74 | + } 75 | + if (!$pathdefined) { next; } 76 | + $res->{$k} = { 77 | + used => defined($v->{valkey}) && defined($currref->{$v->{valkey}}) 78 | + ? $currref->{$v->{valkey}} : $temp_default_val, 79 | + total => defined($v->{critkey}) && defined($currref->{$v->{critkey}}) 80 | + ? $currref->{$v->{critkey}} : $temp_default_crit, 81 | + }; 82 | + } 83 | + } 84 | + 85 | return $res; 86 | }}); 87 | 88 | __PACKAGE__->register_method({ 89 | name => 'netstat', 90 | path => 'netstat', 91 | method => 'GET', 92 | permissions => { 93 | check => ['perm', '/nodes/{node}', [ 'Sys.Audit' ]], 94 | }, 95 | description => "Read tap/vm network device interface counters", 96 | proxyto => 'node', 97 | parameters => { 98 | additionalProperties => 0, 99 | properties => { 100 | node => get_standard_option('pve-node'), 101 | }, 102 | }, 103 | returns => { 104 | type => "array", 105 | -------------------------------------------------------------------------------- /v7.4-13-pwt3.7.3/patches/Nodes.pm.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/perl5/PVE/API2/Nodes.pm b/../Nodes.pm 2 | index bfe5c40..22fc451 100644 3 | --- a/usr/share/perl5/PVE/API2/Nodes.pm 4 | +++ b/../Nodes.pm 5 | @@ -396,40 +396,99 @@ __PACKAGE__->register_method({ 6 | }; 7 | 8 | $res->{swap} = { 9 | free => $meminfo->{swapfree}, 10 | total => $meminfo->{swaptotal}, 11 | used => $meminfo->{swapused}, 12 | }; 13 | 14 | $res->{pveversion} = PVE::pvecfg::package() . "/" . 15 | PVE::pvecfg::version_text(); 16 | 17 | my $dinfo = df('/', 1); # output is bytes 18 | 19 | $res->{rootfs} = { 20 | total => $dinfo->{blocks}, 21 | avail => $dinfo->{bavail}, 22 | used => $dinfo->{used}, 23 | free => $dinfo->{blocks} - $dinfo->{used}, 24 | }; 25 | 26 | + my %sensors_config = ( 27 | + cputemp => { 28 | + jsonpath => ['coretemp-isa-0000', 'Package id 0'], 29 | + valkey => 'temp1_input', 30 | + critkey => 'temp1_crit', 31 | + }, 32 | + pchtemp => { 33 | + jsonpath => ['pch_cannonlake-virtual-0', 'temp1'], 34 | + valkey => 'temp1_input', 35 | + }, 36 | + nvmetemp => { 37 | + jsonpath => ['nvme-pci-0100', 'Composite'], 38 | + valkey => 'temp1_input', 39 | + critkey => 'temp1_crit', 40 | + }, 41 | + hd1temp => { 42 | + jsonpath => ['drivetemp-scsi-0-0', 'temp1'], 43 | + valkey => 'temp1_input', 44 | + critkey => 'temp1_crit', 45 | + }, 46 | + hd2temp => { 47 | + jsonpath => ['drivetemp-scsi-1-0', 'temp1'], 48 | + valkey => 'temp1_input', 49 | + critkey => 'temp1_crit', 50 | + }, 51 | + hd3temp => { 52 | + jsonpath => ['drivetemp-scsi-2-0', 'temp1'], 53 | + valkey => 'temp1_input', 54 | + critkey => 'temp1_crit', 55 | + }, 56 | + ); 57 | + my $temp_default_val = 0; 58 | + my $temp_default_crit = 80; 59 | + 60 | + my $sensors = eval { decode_json(`sensors -j`); }; 61 | + if (defined($sensors)) { 62 | + keys %sensors_config; 63 | + while (my ($k, $v) = each %sensors_config) { 64 | + if (!defined($v->{jsonpath})) { next; } 65 | + my $currref = $sensors; 66 | + my $pathdefined = 1; 67 | + for my $pathseg (@{$v->{jsonpath}}) { 68 | + if (defined($currref->{$pathseg})) { 69 | + $currref = $currref->{$pathseg} 70 | + } else { 71 | + $pathdefined = 0; 72 | + last; 73 | + } 74 | + } 75 | + if (!$pathdefined) { next; } 76 | + $res->{$k} = { 77 | + used => defined($v->{valkey}) && defined($currref->{$v->{valkey}}) 78 | + ? $currref->{$v->{valkey}} : $temp_default_val, 79 | + total => defined($v->{critkey}) && defined($currref->{$v->{critkey}}) 80 | + ? $currref->{$v->{critkey}} : $temp_default_crit, 81 | + }; 82 | + } 83 | + } 84 | + 85 | return $res; 86 | }}); 87 | 88 | __PACKAGE__->register_method({ 89 | name => 'netstat', 90 | path => 'netstat', 91 | method => 'GET', 92 | permissions => { 93 | check => ['perm', '/nodes/{node}', [ 'Sys.Audit' ]], 94 | }, 95 | description => "Read tap/vm network device interface counters", 96 | proxyto => 'node', 97 | parameters => { 98 | additionalProperties => 0, 99 | properties => { 100 | node => get_standard_option('pve-node'), 101 | }, 102 | }, 103 | returns => { 104 | type => "array", 105 | -------------------------------------------------------------------------------- /v7.4-16-pwt3.7.3/patches/Nodes.pm.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/perl5/PVE/API2/Nodes.pm b/../Nodes.pm 2 | index bfe5c40..8d1a745 100644 3 | --- a/usr/share/perl5/PVE/API2/Nodes.pm 4 | +++ b/../Nodes.pm 5 | @@ -396,40 +396,99 @@ __PACKAGE__->register_method({ 6 | }; 7 | 8 | $res->{swap} = { 9 | free => $meminfo->{swapfree}, 10 | total => $meminfo->{swaptotal}, 11 | used => $meminfo->{swapused}, 12 | }; 13 | 14 | $res->{pveversion} = PVE::pvecfg::package() . "/" . 15 | PVE::pvecfg::version_text(); 16 | 17 | my $dinfo = df('/', 1); # output is bytes 18 | 19 | $res->{rootfs} = { 20 | total => $dinfo->{blocks}, 21 | avail => $dinfo->{bavail}, 22 | used => $dinfo->{used}, 23 | free => $dinfo->{blocks} - $dinfo->{used}, 24 | }; 25 | 26 | + my %sensors_config = ( 27 | + cputemp => { 28 | + jsonpath => ['coretemp-isa-0000', 'Package id 0'], 29 | + valkey => 'temp1_input', 30 | + critkey => 'temp1_crit', 31 | + }, 32 | + pchtemp => { 33 | + jsonpath => ['pch_cannonlake-virtual-0', 'temp1'], 34 | + valkey => 'temp1_input', 35 | + }, 36 | + nvme1temp => { 37 | + jsonpath => ['nvme-pci-0100', 'Composite'], 38 | + valkey => 'temp1_input', 39 | + critkey => 'temp1_crit', 40 | + }, 41 | + nvme2temp => { 42 | + jsonpath => ['nvme-pci-0200', 'Composite'], 43 | + valkey => 'temp1_input', 44 | + critkey => 'temp1_crit', 45 | + }, 46 | + hd1temp => { 47 | + jsonpath => ['drivetemp-scsi-1-0', 'temp1'], 48 | + valkey => 'temp1_input', 49 | + critkey => 'temp1_crit', 50 | + }, 51 | + hd2temp => { 52 | + jsonpath => ['drivetemp-scsi-2-0', 'temp1'], 53 | + valkey => 'temp1_input', 54 | + critkey => 'temp1_crit', 55 | + }, 56 | + ); 57 | + my $temp_default_val = 0; 58 | + my $temp_default_crit = 80; 59 | + 60 | + my $sensors = eval { decode_json(`sensors -j`); }; 61 | + if (defined($sensors)) { 62 | + keys %sensors_config; 63 | + while (my ($k, $v) = each %sensors_config) { 64 | + if (!defined($v->{jsonpath})) { next; } 65 | + my $currref = $sensors; 66 | + my $pathdefined = 1; 67 | + for my $pathseg (@{$v->{jsonpath}}) { 68 | + if (defined($currref->{$pathseg})) { 69 | + $currref = $currref->{$pathseg} 70 | + } else { 71 | + $pathdefined = 0; 72 | + last; 73 | + } 74 | + } 75 | + if (!$pathdefined) { next; } 76 | + $res->{$k} = { 77 | + used => defined($v->{valkey}) && defined($currref->{$v->{valkey}}) 78 | + ? $currref->{$v->{valkey}} : $temp_default_val, 79 | + total => defined($v->{critkey}) && defined($currref->{$v->{critkey}}) 80 | + ? $currref->{$v->{critkey}} : $temp_default_crit, 81 | + }; 82 | + } 83 | + } 84 | + 85 | return $res; 86 | }}); 87 | 88 | __PACKAGE__->register_method({ 89 | name => 'netstat', 90 | path => 'netstat', 91 | method => 'GET', 92 | permissions => { 93 | check => ['perm', '/nodes/{node}', [ 'Sys.Audit' ]], 94 | }, 95 | description => "Read tap/vm network device interface counters", 96 | proxyto => 'node', 97 | parameters => { 98 | additionalProperties => 0, 99 | properties => { 100 | node => get_standard_option('pve-node'), 101 | }, 102 | }, 103 | returns => { 104 | type => "array", 105 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.6.3/patches/Nodes.pm.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/perl5/PVE/API2/Nodes.pm b/../Nodes.pm 2 | index bfe5c40..22fc451 100644 3 | --- a/usr/share/perl5/PVE/API2/Nodes.pm 4 | +++ b/../Nodes.pm 5 | @@ -396,40 +396,99 @@ __PACKAGE__->register_method({ 6 | }; 7 | 8 | $res->{swap} = { 9 | free => $meminfo->{swapfree}, 10 | total => $meminfo->{swaptotal}, 11 | used => $meminfo->{swapused}, 12 | }; 13 | 14 | $res->{pveversion} = PVE::pvecfg::package() . "/" . 15 | PVE::pvecfg::version_text(); 16 | 17 | my $dinfo = df('/', 1); # output is bytes 18 | 19 | $res->{rootfs} = { 20 | total => $dinfo->{blocks}, 21 | avail => $dinfo->{bavail}, 22 | used => $dinfo->{used}, 23 | free => $dinfo->{blocks} - $dinfo->{used}, 24 | }; 25 | 26 | + my %sensors_config = ( 27 | + cputemp => { 28 | + jsonpath => ['coretemp-isa-0000', 'Package id 0'], 29 | + valkey => 'temp1_input', 30 | + critkey => 'temp1_crit', 31 | + }, 32 | + pchtemp => { 33 | + jsonpath => ['pch_cannonlake-virtual-0', 'temp1'], 34 | + valkey => 'temp1_input', 35 | + }, 36 | + nvmetemp => { 37 | + jsonpath => ['nvme-pci-0100', 'Composite'], 38 | + valkey => 'temp1_input', 39 | + critkey => 'temp1_crit', 40 | + }, 41 | + hd1temp => { 42 | + jsonpath => ['drivetemp-scsi-0-0', 'temp1'], 43 | + valkey => 'temp1_input', 44 | + critkey => 'temp1_crit', 45 | + }, 46 | + hd2temp => { 47 | + jsonpath => ['drivetemp-scsi-1-0', 'temp1'], 48 | + valkey => 'temp1_input', 49 | + critkey => 'temp1_crit', 50 | + }, 51 | + hd3temp => { 52 | + jsonpath => ['drivetemp-scsi-2-0', 'temp1'], 53 | + valkey => 'temp1_input', 54 | + critkey => 'temp1_crit', 55 | + }, 56 | + ); 57 | + my $temp_default_val = 0; 58 | + my $temp_default_crit = 80; 59 | + 60 | + my $sensors = eval { decode_json(`sensors -j`); }; 61 | + if (defined($sensors)) { 62 | + keys %sensors_config; 63 | + while (my ($k, $v) = each %sensors_config) { 64 | + if (!defined($v->{jsonpath})) { next; } 65 | + my $currref = $sensors; 66 | + my $pathdefined = 1; 67 | + for my $pathseg (@{$v->{jsonpath}}) { 68 | + if (defined($currref->{$pathseg})) { 69 | + $currref = $currref->{$pathseg} 70 | + } else { 71 | + $pathdefined = 0; 72 | + last; 73 | + } 74 | + } 75 | + if (!$pathdefined) { next; } 76 | + $res->{$k} = { 77 | + used => defined($v->{valkey}) && defined($currref->{$v->{valkey}}) 78 | + ? $currref->{$v->{valkey}} : $temp_default_val, 79 | + total => defined($v->{critkey}) && defined($currref->{$v->{critkey}}) 80 | + ? $currref->{$v->{critkey}} : $temp_default_crit, 81 | + }; 82 | + } 83 | + } 84 | + 85 | return $res; 86 | }}); 87 | 88 | __PACKAGE__->register_method({ 89 | name => 'netstat', 90 | path => 'netstat', 91 | method => 'GET', 92 | permissions => { 93 | check => ['perm', '/nodes/{node}', [ 'Sys.Audit' ]], 94 | }, 95 | description => "Read tap/vm network device interface counters", 96 | proxyto => 'node', 97 | parameters => { 98 | additionalProperties => 0, 99 | properties => { 100 | node => get_standard_option('pve-node'), 101 | }, 102 | }, 103 | returns => { 104 | type => "array", 105 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.6.4/patches/Nodes.pm.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/perl5/PVE/API2/Nodes.pm b/../Nodes.pm 2 | index bfe5c40..22fc451 100644 3 | --- a/usr/share/perl5/PVE/API2/Nodes.pm 4 | +++ b/../Nodes.pm 5 | @@ -396,40 +396,99 @@ __PACKAGE__->register_method({ 6 | }; 7 | 8 | $res->{swap} = { 9 | free => $meminfo->{swapfree}, 10 | total => $meminfo->{swaptotal}, 11 | used => $meminfo->{swapused}, 12 | }; 13 | 14 | $res->{pveversion} = PVE::pvecfg::package() . "/" . 15 | PVE::pvecfg::version_text(); 16 | 17 | my $dinfo = df('/', 1); # output is bytes 18 | 19 | $res->{rootfs} = { 20 | total => $dinfo->{blocks}, 21 | avail => $dinfo->{bavail}, 22 | used => $dinfo->{used}, 23 | free => $dinfo->{blocks} - $dinfo->{used}, 24 | }; 25 | 26 | + my %sensors_config = ( 27 | + cputemp => { 28 | + jsonpath => ['coretemp-isa-0000', 'Package id 0'], 29 | + valkey => 'temp1_input', 30 | + critkey => 'temp1_crit', 31 | + }, 32 | + pchtemp => { 33 | + jsonpath => ['pch_cannonlake-virtual-0', 'temp1'], 34 | + valkey => 'temp1_input', 35 | + }, 36 | + nvmetemp => { 37 | + jsonpath => ['nvme-pci-0100', 'Composite'], 38 | + valkey => 'temp1_input', 39 | + critkey => 'temp1_crit', 40 | + }, 41 | + hd1temp => { 42 | + jsonpath => ['drivetemp-scsi-0-0', 'temp1'], 43 | + valkey => 'temp1_input', 44 | + critkey => 'temp1_crit', 45 | + }, 46 | + hd2temp => { 47 | + jsonpath => ['drivetemp-scsi-1-0', 'temp1'], 48 | + valkey => 'temp1_input', 49 | + critkey => 'temp1_crit', 50 | + }, 51 | + hd3temp => { 52 | + jsonpath => ['drivetemp-scsi-2-0', 'temp1'], 53 | + valkey => 'temp1_input', 54 | + critkey => 'temp1_crit', 55 | + }, 56 | + ); 57 | + my $temp_default_val = 0; 58 | + my $temp_default_crit = 80; 59 | + 60 | + my $sensors = eval { decode_json(`sensors -j`); }; 61 | + if (defined($sensors)) { 62 | + keys %sensors_config; 63 | + while (my ($k, $v) = each %sensors_config) { 64 | + if (!defined($v->{jsonpath})) { next; } 65 | + my $currref = $sensors; 66 | + my $pathdefined = 1; 67 | + for my $pathseg (@{$v->{jsonpath}}) { 68 | + if (defined($currref->{$pathseg})) { 69 | + $currref = $currref->{$pathseg} 70 | + } else { 71 | + $pathdefined = 0; 72 | + last; 73 | + } 74 | + } 75 | + if (!$pathdefined) { next; } 76 | + $res->{$k} = { 77 | + used => defined($v->{valkey}) && defined($currref->{$v->{valkey}}) 78 | + ? $currref->{$v->{valkey}} : $temp_default_val, 79 | + total => defined($v->{critkey}) && defined($currref->{$v->{critkey}}) 80 | + ? $currref->{$v->{critkey}} : $temp_default_crit, 81 | + }; 82 | + } 83 | + } 84 | + 85 | return $res; 86 | }}); 87 | 88 | __PACKAGE__->register_method({ 89 | name => 'netstat', 90 | path => 'netstat', 91 | method => 'GET', 92 | permissions => { 93 | check => ['perm', '/nodes/{node}', [ 'Sys.Audit' ]], 94 | }, 95 | description => "Read tap/vm network device interface counters", 96 | proxyto => 'node', 97 | parameters => { 98 | additionalProperties => 0, 99 | properties => { 100 | node => get_standard_option('pve-node'), 101 | }, 102 | }, 103 | returns => { 104 | type => "array", 105 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.6.5/patches/Nodes.pm.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/perl5/PVE/API2/Nodes.pm b/../Nodes.pm 2 | index bfe5c40..22fc451 100644 3 | --- a/usr/share/perl5/PVE/API2/Nodes.pm 4 | +++ b/../Nodes.pm 5 | @@ -396,40 +396,99 @@ __PACKAGE__->register_method({ 6 | }; 7 | 8 | $res->{swap} = { 9 | free => $meminfo->{swapfree}, 10 | total => $meminfo->{swaptotal}, 11 | used => $meminfo->{swapused}, 12 | }; 13 | 14 | $res->{pveversion} = PVE::pvecfg::package() . "/" . 15 | PVE::pvecfg::version_text(); 16 | 17 | my $dinfo = df('/', 1); # output is bytes 18 | 19 | $res->{rootfs} = { 20 | total => $dinfo->{blocks}, 21 | avail => $dinfo->{bavail}, 22 | used => $dinfo->{used}, 23 | free => $dinfo->{blocks} - $dinfo->{used}, 24 | }; 25 | 26 | + my %sensors_config = ( 27 | + cputemp => { 28 | + jsonpath => ['coretemp-isa-0000', 'Package id 0'], 29 | + valkey => 'temp1_input', 30 | + critkey => 'temp1_crit', 31 | + }, 32 | + pchtemp => { 33 | + jsonpath => ['pch_cannonlake-virtual-0', 'temp1'], 34 | + valkey => 'temp1_input', 35 | + }, 36 | + nvmetemp => { 37 | + jsonpath => ['nvme-pci-0100', 'Composite'], 38 | + valkey => 'temp1_input', 39 | + critkey => 'temp1_crit', 40 | + }, 41 | + hd1temp => { 42 | + jsonpath => ['drivetemp-scsi-0-0', 'temp1'], 43 | + valkey => 'temp1_input', 44 | + critkey => 'temp1_crit', 45 | + }, 46 | + hd2temp => { 47 | + jsonpath => ['drivetemp-scsi-1-0', 'temp1'], 48 | + valkey => 'temp1_input', 49 | + critkey => 'temp1_crit', 50 | + }, 51 | + hd3temp => { 52 | + jsonpath => ['drivetemp-scsi-2-0', 'temp1'], 53 | + valkey => 'temp1_input', 54 | + critkey => 'temp1_crit', 55 | + }, 56 | + ); 57 | + my $temp_default_val = 0; 58 | + my $temp_default_crit = 80; 59 | + 60 | + my $sensors = eval { decode_json(`sensors -j`); }; 61 | + if (defined($sensors)) { 62 | + keys %sensors_config; 63 | + while (my ($k, $v) = each %sensors_config) { 64 | + if (!defined($v->{jsonpath})) { next; } 65 | + my $currref = $sensors; 66 | + my $pathdefined = 1; 67 | + for my $pathseg (@{$v->{jsonpath}}) { 68 | + if (defined($currref->{$pathseg})) { 69 | + $currref = $currref->{$pathseg} 70 | + } else { 71 | + $pathdefined = 0; 72 | + last; 73 | + } 74 | + } 75 | + if (!$pathdefined) { next; } 76 | + $res->{$k} = { 77 | + used => defined($v->{valkey}) && defined($currref->{$v->{valkey}}) 78 | + ? $currref->{$v->{valkey}} : $temp_default_val, 79 | + total => defined($v->{critkey}) && defined($currref->{$v->{critkey}}) 80 | + ? $currref->{$v->{critkey}} : $temp_default_crit, 81 | + }; 82 | + } 83 | + } 84 | + 85 | return $res; 86 | }}); 87 | 88 | __PACKAGE__->register_method({ 89 | name => 'netstat', 90 | path => 'netstat', 91 | method => 'GET', 92 | permissions => { 93 | check => ['perm', '/nodes/{node}', [ 'Sys.Audit' ]], 94 | }, 95 | description => "Read tap/vm network device interface counters", 96 | proxyto => 'node', 97 | parameters => { 98 | additionalProperties => 0, 99 | properties => { 100 | node => get_standard_option('pve-node'), 101 | }, 102 | }, 103 | returns => { 104 | type => "array", 105 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.7.0/patches/Nodes.pm.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/perl5/PVE/API2/Nodes.pm b/../Nodes.pm 2 | index bfe5c40..22fc451 100644 3 | --- a/usr/share/perl5/PVE/API2/Nodes.pm 4 | +++ b/../Nodes.pm 5 | @@ -396,40 +396,99 @@ __PACKAGE__->register_method({ 6 | }; 7 | 8 | $res->{swap} = { 9 | free => $meminfo->{swapfree}, 10 | total => $meminfo->{swaptotal}, 11 | used => $meminfo->{swapused}, 12 | }; 13 | 14 | $res->{pveversion} = PVE::pvecfg::package() . "/" . 15 | PVE::pvecfg::version_text(); 16 | 17 | my $dinfo = df('/', 1); # output is bytes 18 | 19 | $res->{rootfs} = { 20 | total => $dinfo->{blocks}, 21 | avail => $dinfo->{bavail}, 22 | used => $dinfo->{used}, 23 | free => $dinfo->{blocks} - $dinfo->{used}, 24 | }; 25 | 26 | + my %sensors_config = ( 27 | + cputemp => { 28 | + jsonpath => ['coretemp-isa-0000', 'Package id 0'], 29 | + valkey => 'temp1_input', 30 | + critkey => 'temp1_crit', 31 | + }, 32 | + pchtemp => { 33 | + jsonpath => ['pch_cannonlake-virtual-0', 'temp1'], 34 | + valkey => 'temp1_input', 35 | + }, 36 | + nvmetemp => { 37 | + jsonpath => ['nvme-pci-0100', 'Composite'], 38 | + valkey => 'temp1_input', 39 | + critkey => 'temp1_crit', 40 | + }, 41 | + hd1temp => { 42 | + jsonpath => ['drivetemp-scsi-0-0', 'temp1'], 43 | + valkey => 'temp1_input', 44 | + critkey => 'temp1_crit', 45 | + }, 46 | + hd2temp => { 47 | + jsonpath => ['drivetemp-scsi-1-0', 'temp1'], 48 | + valkey => 'temp1_input', 49 | + critkey => 'temp1_crit', 50 | + }, 51 | + hd3temp => { 52 | + jsonpath => ['drivetemp-scsi-2-0', 'temp1'], 53 | + valkey => 'temp1_input', 54 | + critkey => 'temp1_crit', 55 | + }, 56 | + ); 57 | + my $temp_default_val = 0; 58 | + my $temp_default_crit = 80; 59 | + 60 | + my $sensors = eval { decode_json(`sensors -j`); }; 61 | + if (defined($sensors)) { 62 | + keys %sensors_config; 63 | + while (my ($k, $v) = each %sensors_config) { 64 | + if (!defined($v->{jsonpath})) { next; } 65 | + my $currref = $sensors; 66 | + my $pathdefined = 1; 67 | + for my $pathseg (@{$v->{jsonpath}}) { 68 | + if (defined($currref->{$pathseg})) { 69 | + $currref = $currref->{$pathseg} 70 | + } else { 71 | + $pathdefined = 0; 72 | + last; 73 | + } 74 | + } 75 | + if (!$pathdefined) { next; } 76 | + $res->{$k} = { 77 | + used => defined($v->{valkey}) && defined($currref->{$v->{valkey}}) 78 | + ? $currref->{$v->{valkey}} : $temp_default_val, 79 | + total => defined($v->{critkey}) && defined($currref->{$v->{critkey}}) 80 | + ? $currref->{$v->{critkey}} : $temp_default_crit, 81 | + }; 82 | + } 83 | + } 84 | + 85 | return $res; 86 | }}); 87 | 88 | __PACKAGE__->register_method({ 89 | name => 'netstat', 90 | path => 'netstat', 91 | method => 'GET', 92 | permissions => { 93 | check => ['perm', '/nodes/{node}', [ 'Sys.Audit' ]], 94 | }, 95 | description => "Read tap/vm network device interface counters", 96 | proxyto => 'node', 97 | parameters => { 98 | additionalProperties => 0, 99 | properties => { 100 | node => get_standard_option('pve-node'), 101 | }, 102 | }, 103 | returns => { 104 | type => "array", 105 | -------------------------------------------------------------------------------- /v8.0.4-pwt4.0.6/patches/Nodes.pm.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/perl5/PVE/API2/Nodes.pm b/../Nodes.pm 2 | index 9269694..9353d0b 100644 3 | --- a/usr/share/perl5/PVE/API2/Nodes.pm 4 | +++ b/../Nodes.pm 5 | @@ -397,40 +397,99 @@ __PACKAGE__->register_method({ 6 | }; 7 | 8 | $res->{swap} = { 9 | free => $meminfo->{swapfree}, 10 | total => $meminfo->{swaptotal}, 11 | used => $meminfo->{swapused}, 12 | }; 13 | 14 | $res->{pveversion} = PVE::pvecfg::package() . "/" . 15 | PVE::pvecfg::version_text(); 16 | 17 | my $dinfo = df('/', 1); # output is bytes 18 | 19 | $res->{rootfs} = { 20 | total => $dinfo->{blocks}, 21 | avail => $dinfo->{bavail}, 22 | used => $dinfo->{used}, 23 | free => $dinfo->{blocks} - $dinfo->{used}, 24 | }; 25 | 26 | + my %sensors_config = ( 27 | + cputemp => { 28 | + jsonpath => ['coretemp-isa-0000', 'Package id 0'], 29 | + valkey => 'temp1_input', 30 | + critkey => 'temp1_crit', 31 | + }, 32 | + pchtemp => { 33 | + jsonpath => ['pch_cannonlake-virtual-0', 'temp1'], 34 | + valkey => 'temp1_input', 35 | + }, 36 | + nvme1temp => { 37 | + jsonpath => ['nvme-pci-0100', 'Composite'], 38 | + valkey => 'temp1_input', 39 | + critkey => 'temp1_crit', 40 | + }, 41 | + nvme2temp => { 42 | + jsonpath => ['nvme-pci-0200', 'Composite'], 43 | + valkey => 'temp1_input', 44 | + critkey => 'temp1_crit', 45 | + }, 46 | + hd1temp => { 47 | + jsonpath => ['drivetemp-scsi-1-0', 'temp1'], 48 | + valkey => 'temp1_input', 49 | + critkey => 'temp1_crit', 50 | + }, 51 | + hd2temp => { 52 | + jsonpath => ['drivetemp-scsi-2-0', 'temp1'], 53 | + valkey => 'temp1_input', 54 | + critkey => 'temp1_crit', 55 | + }, 56 | + ); 57 | + my $temp_default_val = 0; 58 | + my $temp_default_crit = 80; 59 | + 60 | + my $sensors = eval { decode_json(`sensors -j`); }; 61 | + if (defined($sensors)) { 62 | + keys %sensors_config; 63 | + while (my ($k, $v) = each %sensors_config) { 64 | + if (!defined($v->{jsonpath})) { next; } 65 | + my $currref = $sensors; 66 | + my $pathdefined = 1; 67 | + for my $pathseg (@{$v->{jsonpath}}) { 68 | + if (defined($currref->{$pathseg})) { 69 | + $currref = $currref->{$pathseg} 70 | + } else { 71 | + $pathdefined = 0; 72 | + last; 73 | + } 74 | + } 75 | + if (!$pathdefined) { next; } 76 | + $res->{$k} = { 77 | + used => defined($v->{valkey}) && defined($currref->{$v->{valkey}}) 78 | + ? $currref->{$v->{valkey}} : $temp_default_val, 79 | + total => defined($v->{critkey}) && defined($currref->{$v->{critkey}}) 80 | + ? $currref->{$v->{critkey}} : $temp_default_crit, 81 | + }; 82 | + } 83 | + } 84 | + 85 | return $res; 86 | }}); 87 | 88 | __PACKAGE__->register_method({ 89 | name => 'netstat', 90 | path => 'netstat', 91 | method => 'GET', 92 | permissions => { 93 | check => ['perm', '/nodes/{node}', [ 'Sys.Audit' ]], 94 | }, 95 | description => "Read tap/vm network device interface counters", 96 | proxyto => 'node', 97 | parameters => { 98 | additionalProperties => 0, 99 | properties => { 100 | node => get_standard_option('pve-node'), 101 | }, 102 | }, 103 | returns => { 104 | type => "array", 105 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.6.3/patches/proxmoxlib.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js b/../proxmoxlib.js 2 | index 631a0a9..3fb21ae 100644 3 | --- a/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js 4 | +++ b/../proxmoxlib.js 5 | @@ -1027,40 +1027,44 @@ utilities: { 6 | if (!Ext.isNumeric(value)) { 7 | return ''; 8 | } 9 | return Proxmox.Utils.format_size(value); 10 | }, 11 | 12 | render_cpu_model: function(cpu) { 13 | let socketText = cpu.sockets > 1 ? gettext('Sockets') : gettext('Socket'); 14 | return `${cpu.cpus} x ${cpu.model} (${cpu.sockets.toString()} ${socketText})`; 15 | }, 16 | 17 | /* this is different for nodes */ 18 | render_node_cpu_usage: function(value, record) { 19 | return Proxmox.Utils.render_cpu_usage(value, record.cpus); 20 | }, 21 | 22 | render_node_size_usage: function(record) { 23 | return Proxmox.Utils.render_size_usage(record.used, record.total); 24 | }, 25 | 26 | + render_node_temp: function(record) { 27 | + return record.used.toFixed(1) + '°C (crit: ' + record.total.toFixed(1) + '°C)'; 28 | + }, 29 | + 30 | loadTextFromFile: function(file, callback, maxBytes) { 31 | let maxSize = maxBytes || 8192; 32 | if (file.size > maxSize) { 33 | Ext.Msg.alert(gettext('Error'), gettext("Invalid file size: ") + file.size); 34 | return; 35 | } 36 | let reader = new FileReader(); 37 | reader.onload = evt => callback(evt.target.result); 38 | reader.readAsText(file); 39 | }, 40 | 41 | parsePropertyString: function(value, defaultKey) { 42 | var res = {}, 43 | error; 44 | 45 | if (typeof value !== 'string' || value === '') { 46 | return res; 47 | } 48 | 49 | Ext.Array.each(value.split(','), function(p) { 50 | @@ -1467,44 +1471,45 @@ Ext.define('Proxmox.Async', { 51 | // response on failure 52 | api2: function(reqOpts) { 53 | return new Promise((resolve, reject) => { 54 | delete reqOpts.callback; // not allowed in this api 55 | reqOpts.success = response => resolve(response); 56 | reqOpts.failure = response => reject(response); 57 | Proxmox.Utils.API2Request(reqOpts); 58 | }); 59 | }, 60 | 61 | // Delay for a number of milliseconds. 62 | sleep: function(millis) { 63 | return new Promise((resolve, _reject) => setTimeout(resolve, millis)); 64 | }, 65 | }); 66 | 67 | Ext.override(Ext.data.Store, { 68 | // If the store's proxy is changed while it is waiting for an AJAX 69 | // response, `onProxyLoad` will still be called for the outdated response. 70 | // To avoid displaying inconsistent information, only process responses 71 | - // belonging to the current proxy. 72 | + // belonging to the current proxy. However, do not apply this workaround 73 | + // to the mobile UI, as Sencha Touch has an incompatible internal API. 74 | onProxyLoad: function(operation) { 75 | let me = this; 76 | - if (operation.getProxy() === me.getProxy()) { 77 | + if (Proxmox.Utils.toolkit === 'touch' || operation.getProxy() === me.getProxy()) { 78 | me.callParent(arguments); 79 | } else { 80 | console.log(`ignored outdated response: ${operation.getRequest().getUrl()}`); 81 | } 82 | }, 83 | }); 84 | Ext.define('Proxmox.Schema', { // a singleton 85 | singleton: true, 86 | 87 | authDomains: { 88 | pam: { 89 | name: 'Linux PAM', 90 | add: false, 91 | edit: false, 92 | pwchange: true, 93 | sync: false, 94 | }, 95 | openid: { 96 | name: gettext('OpenID Connect Server'), 97 | ipanel: 'pmxAuthOpenIDPanel', 98 | -------------------------------------------------------------------------------- /v7.3-6-pwt3.5.5/patches/pvemanagerlib.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/pve-manager/js/pvemanagerlib.js b/../pvemanagerlib.js 2 | index 68eef10..6204a24 100644 3 | --- a/usr/share/pve-manager/js/pvemanagerlib.js 4 | +++ b/../pvemanagerlib.js 5 | @@ -38699,41 +38699,41 @@ Ext.define('PVE.node.LVMThinList', { 6 | ], 7 | proxy: { 8 | type: 'proxmox', 9 | url: `/api2/json/nodes/${me.nodename}/disks/lvmthin`, 10 | }, 11 | sorters: 'lv', 12 | }, 13 | }); 14 | 15 | me.callParent(); 16 | 17 | Proxmox.Utils.monStoreErrors(me, me.getStore(), true); 18 | me.reload(); 19 | }, 20 | }); 21 | 22 | Ext.define('PVE.node.StatusView', { 23 | extend: 'Proxmox.panel.StatusView', 24 | alias: 'widget.pveNodeStatus', 25 | 26 | - height: 300, 27 | + height: 420, 28 | bodyPadding: '15 5 15 5', 29 | 30 | layout: { 31 | type: 'table', 32 | columns: 2, 33 | tableAttrs: { 34 | style: { 35 | width: '100%', 36 | }, 37 | }, 38 | }, 39 | 40 | defaults: { 41 | xtype: 'pmxInfoWidget', 42 | padding: '0 10 5 10', 43 | }, 44 | 45 | items: [ 46 | { 47 | itemId: 'cpu', 48 | @@ -38785,40 +38785,93 @@ Ext.define('PVE.node.StatusView', { 49 | itemId: 'rootfs', 50 | title: '/ ' + gettext('HD space'), 51 | valueField: 'rootfs', 52 | maxField: 'rootfs', 53 | renderer: Proxmox.Utils.render_node_size_usage, 54 | }, 55 | { 56 | iconCls: 'fa fa-fw fa-refresh', 57 | itemId: 'swap', 58 | printSize: true, 59 | title: gettext('SWAP usage'), 60 | valueField: 'swap', 61 | maxField: 'swap', 62 | renderer: Proxmox.Utils.render_node_size_usage, 63 | }, 64 | { 65 | xtype: 'box', 66 | colspan: 2, 67 | padding: '0 0 20 0', 68 | }, 69 | + { 70 | + itemId: 'cputemp', 71 | + iconCls: 'fa fa-fw fa-thermometer-half', 72 | + title: gettext('CPU temp'), 73 | + valueField: 'cputemp', 74 | + maxField: 'cputemp', 75 | + renderer: Proxmox.Utils.render_node_temp, 76 | + }, 77 | + { 78 | + itemId: 'hd1temp', 79 | + iconCls: 'fa fa-fw fa-thermometer-half', 80 | + title: gettext('HD1 temp'), 81 | + valueField: 'hd1temp', 82 | + maxField: 'hd1temp', 83 | + renderer: Proxmox.Utils.render_node_temp, 84 | + }, 85 | + { 86 | + itemId: 'pchtemp', 87 | + iconCls: 'fa fa-fw fa-thermometer-half', 88 | + title: gettext('PCH temp'), 89 | + valueField: 'pchtemp', 90 | + maxField: 'pchtemp', 91 | + renderer: Proxmox.Utils.render_node_temp, 92 | + }, 93 | + { 94 | + itemId: 'hd2temp', 95 | + iconCls: 'fa fa-fw fa-thermometer-half', 96 | + title: gettext('HD2 temp'), 97 | + valueField: 'hd2temp', 98 | + maxField: 'hd2temp', 99 | + renderer: Proxmox.Utils.render_node_temp, 100 | + }, 101 | + { 102 | + itemId: 'nvmetemp', 103 | + iconCls: 'fa fa-fw fa-thermometer-half', 104 | + title: gettext('NVMe temp'), 105 | + valueField: 'nvmetemp', 106 | + maxField: 'nvmetemp', 107 | + renderer: Proxmox.Utils.render_node_temp, 108 | + }, 109 | + { 110 | + itemId: 'hd3temp', 111 | + iconCls: 'fa fa-fw fa-thermometer-half', 112 | + title: gettext('HD3 temp'), 113 | + valueField: 'hd3temp', 114 | + maxField: 'hd3temp', 115 | + renderer: Proxmox.Utils.render_node_temp, 116 | + }, 117 | + { 118 | + xtype: 'box', 119 | + colspan: 2, 120 | + padding: '0 0 20 0', 121 | + }, 122 | { 123 | itemId: 'cpus', 124 | colspan: 2, 125 | printBar: false, 126 | title: gettext('CPU(s)'), 127 | textField: 'cpuinfo', 128 | renderer: Proxmox.Utils.render_cpu_model, 129 | value: '', 130 | }, 131 | { 132 | itemId: 'kversion', 133 | colspan: 2, 134 | title: gettext('Kernel Version'), 135 | printBar: false, 136 | textField: 'kversion', 137 | value: '', 138 | }, 139 | { 140 | itemId: 'version', 141 | colspan: 2, 142 | -------------------------------------------------------------------------------- /v7.4-13-pwt3.7.3/patches/pvemanagerlib.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/pve-manager/js/pvemanagerlib.js b/../pvemanagerlib.js 2 | index 8b282b1..2b84e1d 100644 3 | --- a/usr/share/pve-manager/js/pvemanagerlib.js 4 | +++ b/../pvemanagerlib.js 5 | @@ -39303,41 +39303,41 @@ Ext.define('PVE.node.LVMThinList', { 6 | ], 7 | proxy: { 8 | type: 'proxmox', 9 | url: `/api2/json/nodes/${me.nodename}/disks/lvmthin`, 10 | }, 11 | sorters: 'lv', 12 | }, 13 | }); 14 | 15 | me.callParent(); 16 | 17 | Proxmox.Utils.monStoreErrors(me, me.getStore(), true); 18 | me.reload(); 19 | }, 20 | }); 21 | 22 | Ext.define('PVE.node.StatusView', { 23 | extend: 'Proxmox.panel.StatusView', 24 | alias: 'widget.pveNodeStatus', 25 | 26 | - height: 300, 27 | + height: 420, 28 | bodyPadding: '15 5 15 5', 29 | 30 | layout: { 31 | type: 'table', 32 | columns: 2, 33 | tableAttrs: { 34 | style: { 35 | width: '100%', 36 | }, 37 | }, 38 | }, 39 | 40 | defaults: { 41 | xtype: 'pmxInfoWidget', 42 | padding: '0 10 5 10', 43 | }, 44 | 45 | items: [ 46 | { 47 | itemId: 'cpu', 48 | @@ -39389,40 +39389,93 @@ Ext.define('PVE.node.StatusView', { 49 | itemId: 'rootfs', 50 | title: '/ ' + gettext('HD space'), 51 | valueField: 'rootfs', 52 | maxField: 'rootfs', 53 | renderer: Proxmox.Utils.render_node_size_usage, 54 | }, 55 | { 56 | iconCls: 'fa fa-fw fa-refresh', 57 | itemId: 'swap', 58 | printSize: true, 59 | title: gettext('SWAP usage'), 60 | valueField: 'swap', 61 | maxField: 'swap', 62 | renderer: Proxmox.Utils.render_node_size_usage, 63 | }, 64 | { 65 | xtype: 'box', 66 | colspan: 2, 67 | padding: '0 0 20 0', 68 | }, 69 | + { 70 | + itemId: 'cputemp', 71 | + iconCls: 'fa fa-fw fa-thermometer-half', 72 | + title: gettext('CPU temp'), 73 | + valueField: 'cputemp', 74 | + maxField: 'cputemp', 75 | + renderer: Proxmox.Utils.render_node_temp, 76 | + }, 77 | + { 78 | + itemId: 'hd1temp', 79 | + iconCls: 'fa fa-fw fa-thermometer-half', 80 | + title: gettext('HD1 temp'), 81 | + valueField: 'hd1temp', 82 | + maxField: 'hd1temp', 83 | + renderer: Proxmox.Utils.render_node_temp, 84 | + }, 85 | + { 86 | + itemId: 'pchtemp', 87 | + iconCls: 'fa fa-fw fa-thermometer-half', 88 | + title: gettext('PCH temp'), 89 | + valueField: 'pchtemp', 90 | + maxField: 'pchtemp', 91 | + renderer: Proxmox.Utils.render_node_temp, 92 | + }, 93 | + { 94 | + itemId: 'hd2temp', 95 | + iconCls: 'fa fa-fw fa-thermometer-half', 96 | + title: gettext('HD2 temp'), 97 | + valueField: 'hd2temp', 98 | + maxField: 'hd2temp', 99 | + renderer: Proxmox.Utils.render_node_temp, 100 | + }, 101 | + { 102 | + itemId: 'nvmetemp', 103 | + iconCls: 'fa fa-fw fa-thermometer-half', 104 | + title: gettext('NVMe temp'), 105 | + valueField: 'nvmetemp', 106 | + maxField: 'nvmetemp', 107 | + renderer: Proxmox.Utils.render_node_temp, 108 | + }, 109 | + { 110 | + itemId: 'hd3temp', 111 | + iconCls: 'fa fa-fw fa-thermometer-half', 112 | + title: gettext('HD3 temp'), 113 | + valueField: 'hd3temp', 114 | + maxField: 'hd3temp', 115 | + renderer: Proxmox.Utils.render_node_temp, 116 | + }, 117 | + { 118 | + xtype: 'box', 119 | + colspan: 2, 120 | + padding: '0 0 20 0', 121 | + }, 122 | { 123 | itemId: 'cpus', 124 | colspan: 2, 125 | printBar: false, 126 | title: gettext('CPU(s)'), 127 | textField: 'cpuinfo', 128 | renderer: Proxmox.Utils.render_cpu_model, 129 | value: '', 130 | }, 131 | { 132 | itemId: 'kversion', 133 | colspan: 2, 134 | title: gettext('Kernel Version'), 135 | printBar: false, 136 | textField: 'kversion', 137 | value: '', 138 | }, 139 | { 140 | itemId: 'version', 141 | colspan: 2, 142 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.6.3/patches/pvemanagerlib.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/pve-manager/js/pvemanagerlib.js b/../pvemanagerlib.js 2 | index 8470957..24b8c02 100644 3 | --- a/usr/share/pve-manager/js/pvemanagerlib.js 4 | +++ b/../pvemanagerlib.js 5 | @@ -39295,41 +39295,41 @@ Ext.define('PVE.node.LVMThinList', { 6 | ], 7 | proxy: { 8 | type: 'proxmox', 9 | url: `/api2/json/nodes/${me.nodename}/disks/lvmthin`, 10 | }, 11 | sorters: 'lv', 12 | }, 13 | }); 14 | 15 | me.callParent(); 16 | 17 | Proxmox.Utils.monStoreErrors(me, me.getStore(), true); 18 | me.reload(); 19 | }, 20 | }); 21 | 22 | Ext.define('PVE.node.StatusView', { 23 | extend: 'Proxmox.panel.StatusView', 24 | alias: 'widget.pveNodeStatus', 25 | 26 | - height: 300, 27 | + height: 420, 28 | bodyPadding: '15 5 15 5', 29 | 30 | layout: { 31 | type: 'table', 32 | columns: 2, 33 | tableAttrs: { 34 | style: { 35 | width: '100%', 36 | }, 37 | }, 38 | }, 39 | 40 | defaults: { 41 | xtype: 'pmxInfoWidget', 42 | padding: '0 10 5 10', 43 | }, 44 | 45 | items: [ 46 | { 47 | itemId: 'cpu', 48 | @@ -39381,40 +39381,93 @@ Ext.define('PVE.node.StatusView', { 49 | itemId: 'rootfs', 50 | title: '/ ' + gettext('HD space'), 51 | valueField: 'rootfs', 52 | maxField: 'rootfs', 53 | renderer: Proxmox.Utils.render_node_size_usage, 54 | }, 55 | { 56 | iconCls: 'fa fa-fw fa-refresh', 57 | itemId: 'swap', 58 | printSize: true, 59 | title: gettext('SWAP usage'), 60 | valueField: 'swap', 61 | maxField: 'swap', 62 | renderer: Proxmox.Utils.render_node_size_usage, 63 | }, 64 | { 65 | xtype: 'box', 66 | colspan: 2, 67 | padding: '0 0 20 0', 68 | }, 69 | + { 70 | + itemId: 'cputemp', 71 | + iconCls: 'fa fa-fw fa-thermometer-half', 72 | + title: gettext('CPU temp'), 73 | + valueField: 'cputemp', 74 | + maxField: 'cputemp', 75 | + renderer: Proxmox.Utils.render_node_temp, 76 | + }, 77 | + { 78 | + itemId: 'hd1temp', 79 | + iconCls: 'fa fa-fw fa-thermometer-half', 80 | + title: gettext('HD1 temp'), 81 | + valueField: 'hd1temp', 82 | + maxField: 'hd1temp', 83 | + renderer: Proxmox.Utils.render_node_temp, 84 | + }, 85 | + { 86 | + itemId: 'pchtemp', 87 | + iconCls: 'fa fa-fw fa-thermometer-half', 88 | + title: gettext('PCH temp'), 89 | + valueField: 'pchtemp', 90 | + maxField: 'pchtemp', 91 | + renderer: Proxmox.Utils.render_node_temp, 92 | + }, 93 | + { 94 | + itemId: 'hd2temp', 95 | + iconCls: 'fa fa-fw fa-thermometer-half', 96 | + title: gettext('HD2 temp'), 97 | + valueField: 'hd2temp', 98 | + maxField: 'hd2temp', 99 | + renderer: Proxmox.Utils.render_node_temp, 100 | + }, 101 | + { 102 | + itemId: 'nvmetemp', 103 | + iconCls: 'fa fa-fw fa-thermometer-half', 104 | + title: gettext('NVMe temp'), 105 | + valueField: 'nvmetemp', 106 | + maxField: 'nvmetemp', 107 | + renderer: Proxmox.Utils.render_node_temp, 108 | + }, 109 | + { 110 | + itemId: 'hd3temp', 111 | + iconCls: 'fa fa-fw fa-thermometer-half', 112 | + title: gettext('HD3 temp'), 113 | + valueField: 'hd3temp', 114 | + maxField: 'hd3temp', 115 | + renderer: Proxmox.Utils.render_node_temp, 116 | + }, 117 | + { 118 | + xtype: 'box', 119 | + colspan: 2, 120 | + padding: '0 0 20 0', 121 | + }, 122 | { 123 | itemId: 'cpus', 124 | colspan: 2, 125 | printBar: false, 126 | title: gettext('CPU(s)'), 127 | textField: 'cpuinfo', 128 | renderer: Proxmox.Utils.render_cpu_model, 129 | value: '', 130 | }, 131 | { 132 | itemId: 'kversion', 133 | colspan: 2, 134 | title: gettext('Kernel Version'), 135 | printBar: false, 136 | textField: 'kversion', 137 | value: '', 138 | }, 139 | { 140 | itemId: 'version', 141 | colspan: 2, 142 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.6.4/patches/pvemanagerlib.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/pve-manager/js/pvemanagerlib.js b/../pvemanagerlib.js 2 | index 8470957..24b8c02 100644 3 | --- a/usr/share/pve-manager/js/pvemanagerlib.js 4 | +++ b/../pvemanagerlib.js 5 | @@ -39295,41 +39295,41 @@ Ext.define('PVE.node.LVMThinList', { 6 | ], 7 | proxy: { 8 | type: 'proxmox', 9 | url: `/api2/json/nodes/${me.nodename}/disks/lvmthin`, 10 | }, 11 | sorters: 'lv', 12 | }, 13 | }); 14 | 15 | me.callParent(); 16 | 17 | Proxmox.Utils.monStoreErrors(me, me.getStore(), true); 18 | me.reload(); 19 | }, 20 | }); 21 | 22 | Ext.define('PVE.node.StatusView', { 23 | extend: 'Proxmox.panel.StatusView', 24 | alias: 'widget.pveNodeStatus', 25 | 26 | - height: 300, 27 | + height: 420, 28 | bodyPadding: '15 5 15 5', 29 | 30 | layout: { 31 | type: 'table', 32 | columns: 2, 33 | tableAttrs: { 34 | style: { 35 | width: '100%', 36 | }, 37 | }, 38 | }, 39 | 40 | defaults: { 41 | xtype: 'pmxInfoWidget', 42 | padding: '0 10 5 10', 43 | }, 44 | 45 | items: [ 46 | { 47 | itemId: 'cpu', 48 | @@ -39381,40 +39381,93 @@ Ext.define('PVE.node.StatusView', { 49 | itemId: 'rootfs', 50 | title: '/ ' + gettext('HD space'), 51 | valueField: 'rootfs', 52 | maxField: 'rootfs', 53 | renderer: Proxmox.Utils.render_node_size_usage, 54 | }, 55 | { 56 | iconCls: 'fa fa-fw fa-refresh', 57 | itemId: 'swap', 58 | printSize: true, 59 | title: gettext('SWAP usage'), 60 | valueField: 'swap', 61 | maxField: 'swap', 62 | renderer: Proxmox.Utils.render_node_size_usage, 63 | }, 64 | { 65 | xtype: 'box', 66 | colspan: 2, 67 | padding: '0 0 20 0', 68 | }, 69 | + { 70 | + itemId: 'cputemp', 71 | + iconCls: 'fa fa-fw fa-thermometer-half', 72 | + title: gettext('CPU temp'), 73 | + valueField: 'cputemp', 74 | + maxField: 'cputemp', 75 | + renderer: Proxmox.Utils.render_node_temp, 76 | + }, 77 | + { 78 | + itemId: 'hd1temp', 79 | + iconCls: 'fa fa-fw fa-thermometer-half', 80 | + title: gettext('HD1 temp'), 81 | + valueField: 'hd1temp', 82 | + maxField: 'hd1temp', 83 | + renderer: Proxmox.Utils.render_node_temp, 84 | + }, 85 | + { 86 | + itemId: 'pchtemp', 87 | + iconCls: 'fa fa-fw fa-thermometer-half', 88 | + title: gettext('PCH temp'), 89 | + valueField: 'pchtemp', 90 | + maxField: 'pchtemp', 91 | + renderer: Proxmox.Utils.render_node_temp, 92 | + }, 93 | + { 94 | + itemId: 'hd2temp', 95 | + iconCls: 'fa fa-fw fa-thermometer-half', 96 | + title: gettext('HD2 temp'), 97 | + valueField: 'hd2temp', 98 | + maxField: 'hd2temp', 99 | + renderer: Proxmox.Utils.render_node_temp, 100 | + }, 101 | + { 102 | + itemId: 'nvmetemp', 103 | + iconCls: 'fa fa-fw fa-thermometer-half', 104 | + title: gettext('NVMe temp'), 105 | + valueField: 'nvmetemp', 106 | + maxField: 'nvmetemp', 107 | + renderer: Proxmox.Utils.render_node_temp, 108 | + }, 109 | + { 110 | + itemId: 'hd3temp', 111 | + iconCls: 'fa fa-fw fa-thermometer-half', 112 | + title: gettext('HD3 temp'), 113 | + valueField: 'hd3temp', 114 | + maxField: 'hd3temp', 115 | + renderer: Proxmox.Utils.render_node_temp, 116 | + }, 117 | + { 118 | + xtype: 'box', 119 | + colspan: 2, 120 | + padding: '0 0 20 0', 121 | + }, 122 | { 123 | itemId: 'cpus', 124 | colspan: 2, 125 | printBar: false, 126 | title: gettext('CPU(s)'), 127 | textField: 'cpuinfo', 128 | renderer: Proxmox.Utils.render_cpu_model, 129 | value: '', 130 | }, 131 | { 132 | itemId: 'kversion', 133 | colspan: 2, 134 | title: gettext('Kernel Version'), 135 | printBar: false, 136 | textField: 'kversion', 137 | value: '', 138 | }, 139 | { 140 | itemId: 'version', 141 | colspan: 2, 142 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.6.5/patches/pvemanagerlib.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/pve-manager/js/pvemanagerlib.js b/../pvemanagerlib.js 2 | index 8470957..24b8c02 100644 3 | --- a/usr/share/pve-manager/js/pvemanagerlib.js 4 | +++ b/../pvemanagerlib.js 5 | @@ -39295,41 +39295,41 @@ Ext.define('PVE.node.LVMThinList', { 6 | ], 7 | proxy: { 8 | type: 'proxmox', 9 | url: `/api2/json/nodes/${me.nodename}/disks/lvmthin`, 10 | }, 11 | sorters: 'lv', 12 | }, 13 | }); 14 | 15 | me.callParent(); 16 | 17 | Proxmox.Utils.monStoreErrors(me, me.getStore(), true); 18 | me.reload(); 19 | }, 20 | }); 21 | 22 | Ext.define('PVE.node.StatusView', { 23 | extend: 'Proxmox.panel.StatusView', 24 | alias: 'widget.pveNodeStatus', 25 | 26 | - height: 300, 27 | + height: 420, 28 | bodyPadding: '15 5 15 5', 29 | 30 | layout: { 31 | type: 'table', 32 | columns: 2, 33 | tableAttrs: { 34 | style: { 35 | width: '100%', 36 | }, 37 | }, 38 | }, 39 | 40 | defaults: { 41 | xtype: 'pmxInfoWidget', 42 | padding: '0 10 5 10', 43 | }, 44 | 45 | items: [ 46 | { 47 | itemId: 'cpu', 48 | @@ -39381,40 +39381,93 @@ Ext.define('PVE.node.StatusView', { 49 | itemId: 'rootfs', 50 | title: '/ ' + gettext('HD space'), 51 | valueField: 'rootfs', 52 | maxField: 'rootfs', 53 | renderer: Proxmox.Utils.render_node_size_usage, 54 | }, 55 | { 56 | iconCls: 'fa fa-fw fa-refresh', 57 | itemId: 'swap', 58 | printSize: true, 59 | title: gettext('SWAP usage'), 60 | valueField: 'swap', 61 | maxField: 'swap', 62 | renderer: Proxmox.Utils.render_node_size_usage, 63 | }, 64 | { 65 | xtype: 'box', 66 | colspan: 2, 67 | padding: '0 0 20 0', 68 | }, 69 | + { 70 | + itemId: 'cputemp', 71 | + iconCls: 'fa fa-fw fa-thermometer-half', 72 | + title: gettext('CPU temp'), 73 | + valueField: 'cputemp', 74 | + maxField: 'cputemp', 75 | + renderer: Proxmox.Utils.render_node_temp, 76 | + }, 77 | + { 78 | + itemId: 'hd1temp', 79 | + iconCls: 'fa fa-fw fa-thermometer-half', 80 | + title: gettext('HD1 temp'), 81 | + valueField: 'hd1temp', 82 | + maxField: 'hd1temp', 83 | + renderer: Proxmox.Utils.render_node_temp, 84 | + }, 85 | + { 86 | + itemId: 'pchtemp', 87 | + iconCls: 'fa fa-fw fa-thermometer-half', 88 | + title: gettext('PCH temp'), 89 | + valueField: 'pchtemp', 90 | + maxField: 'pchtemp', 91 | + renderer: Proxmox.Utils.render_node_temp, 92 | + }, 93 | + { 94 | + itemId: 'hd2temp', 95 | + iconCls: 'fa fa-fw fa-thermometer-half', 96 | + title: gettext('HD2 temp'), 97 | + valueField: 'hd2temp', 98 | + maxField: 'hd2temp', 99 | + renderer: Proxmox.Utils.render_node_temp, 100 | + }, 101 | + { 102 | + itemId: 'nvmetemp', 103 | + iconCls: 'fa fa-fw fa-thermometer-half', 104 | + title: gettext('NVMe temp'), 105 | + valueField: 'nvmetemp', 106 | + maxField: 'nvmetemp', 107 | + renderer: Proxmox.Utils.render_node_temp, 108 | + }, 109 | + { 110 | + itemId: 'hd3temp', 111 | + iconCls: 'fa fa-fw fa-thermometer-half', 112 | + title: gettext('HD3 temp'), 113 | + valueField: 'hd3temp', 114 | + maxField: 'hd3temp', 115 | + renderer: Proxmox.Utils.render_node_temp, 116 | + }, 117 | + { 118 | + xtype: 'box', 119 | + colspan: 2, 120 | + padding: '0 0 20 0', 121 | + }, 122 | { 123 | itemId: 'cpus', 124 | colspan: 2, 125 | printBar: false, 126 | title: gettext('CPU(s)'), 127 | textField: 'cpuinfo', 128 | renderer: Proxmox.Utils.render_cpu_model, 129 | value: '', 130 | }, 131 | { 132 | itemId: 'kversion', 133 | colspan: 2, 134 | title: gettext('Kernel Version'), 135 | printBar: false, 136 | textField: 'kversion', 137 | value: '', 138 | }, 139 | { 140 | itemId: 'version', 141 | colspan: 2, 142 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.7.0/patches/pvemanagerlib.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/pve-manager/js/pvemanagerlib.js b/../pvemanagerlib.js 2 | index 8470957..24b8c02 100644 3 | --- a/usr/share/pve-manager/js/pvemanagerlib.js 4 | +++ b/../pvemanagerlib.js 5 | @@ -39295,41 +39295,41 @@ Ext.define('PVE.node.LVMThinList', { 6 | ], 7 | proxy: { 8 | type: 'proxmox', 9 | url: `/api2/json/nodes/${me.nodename}/disks/lvmthin`, 10 | }, 11 | sorters: 'lv', 12 | }, 13 | }); 14 | 15 | me.callParent(); 16 | 17 | Proxmox.Utils.monStoreErrors(me, me.getStore(), true); 18 | me.reload(); 19 | }, 20 | }); 21 | 22 | Ext.define('PVE.node.StatusView', { 23 | extend: 'Proxmox.panel.StatusView', 24 | alias: 'widget.pveNodeStatus', 25 | 26 | - height: 300, 27 | + height: 420, 28 | bodyPadding: '15 5 15 5', 29 | 30 | layout: { 31 | type: 'table', 32 | columns: 2, 33 | tableAttrs: { 34 | style: { 35 | width: '100%', 36 | }, 37 | }, 38 | }, 39 | 40 | defaults: { 41 | xtype: 'pmxInfoWidget', 42 | padding: '0 10 5 10', 43 | }, 44 | 45 | items: [ 46 | { 47 | itemId: 'cpu', 48 | @@ -39381,40 +39381,93 @@ Ext.define('PVE.node.StatusView', { 49 | itemId: 'rootfs', 50 | title: '/ ' + gettext('HD space'), 51 | valueField: 'rootfs', 52 | maxField: 'rootfs', 53 | renderer: Proxmox.Utils.render_node_size_usage, 54 | }, 55 | { 56 | iconCls: 'fa fa-fw fa-refresh', 57 | itemId: 'swap', 58 | printSize: true, 59 | title: gettext('SWAP usage'), 60 | valueField: 'swap', 61 | maxField: 'swap', 62 | renderer: Proxmox.Utils.render_node_size_usage, 63 | }, 64 | { 65 | xtype: 'box', 66 | colspan: 2, 67 | padding: '0 0 20 0', 68 | }, 69 | + { 70 | + itemId: 'cputemp', 71 | + iconCls: 'fa fa-fw fa-thermometer-half', 72 | + title: gettext('CPU temp'), 73 | + valueField: 'cputemp', 74 | + maxField: 'cputemp', 75 | + renderer: Proxmox.Utils.render_node_temp, 76 | + }, 77 | + { 78 | + itemId: 'hd1temp', 79 | + iconCls: 'fa fa-fw fa-thermometer-half', 80 | + title: gettext('HD1 temp'), 81 | + valueField: 'hd1temp', 82 | + maxField: 'hd1temp', 83 | + renderer: Proxmox.Utils.render_node_temp, 84 | + }, 85 | + { 86 | + itemId: 'pchtemp', 87 | + iconCls: 'fa fa-fw fa-thermometer-half', 88 | + title: gettext('PCH temp'), 89 | + valueField: 'pchtemp', 90 | + maxField: 'pchtemp', 91 | + renderer: Proxmox.Utils.render_node_temp, 92 | + }, 93 | + { 94 | + itemId: 'hd2temp', 95 | + iconCls: 'fa fa-fw fa-thermometer-half', 96 | + title: gettext('HD2 temp'), 97 | + valueField: 'hd2temp', 98 | + maxField: 'hd2temp', 99 | + renderer: Proxmox.Utils.render_node_temp, 100 | + }, 101 | + { 102 | + itemId: 'nvmetemp', 103 | + iconCls: 'fa fa-fw fa-thermometer-half', 104 | + title: gettext('NVMe temp'), 105 | + valueField: 'nvmetemp', 106 | + maxField: 'nvmetemp', 107 | + renderer: Proxmox.Utils.render_node_temp, 108 | + }, 109 | + { 110 | + itemId: 'hd3temp', 111 | + iconCls: 'fa fa-fw fa-thermometer-half', 112 | + title: gettext('HD3 temp'), 113 | + valueField: 'hd3temp', 114 | + maxField: 'hd3temp', 115 | + renderer: Proxmox.Utils.render_node_temp, 116 | + }, 117 | + { 118 | + xtype: 'box', 119 | + colspan: 2, 120 | + padding: '0 0 20 0', 121 | + }, 122 | { 123 | itemId: 'cpus', 124 | colspan: 2, 125 | printBar: false, 126 | title: gettext('CPU(s)'), 127 | textField: 'cpuinfo', 128 | renderer: Proxmox.Utils.render_cpu_model, 129 | value: '', 130 | }, 131 | { 132 | itemId: 'kversion', 133 | colspan: 2, 134 | title: gettext('Kernel Version'), 135 | printBar: false, 136 | textField: 'kversion', 137 | value: '', 138 | }, 139 | { 140 | itemId: 'version', 141 | colspan: 2, 142 | -------------------------------------------------------------------------------- /v7.4-16-pwt3.7.3/patches/pvemanagerlib.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/pve-manager/js/pvemanagerlib.js b/../pvemanagerlib.js 2 | index 8b282b1..b720532 100644 3 | --- a/usr/share/pve-manager/js/pvemanagerlib.js 4 | +++ b/../pvemanagerlib.js 5 | @@ -39303,41 +39303,41 @@ Ext.define('PVE.node.LVMThinList', { 6 | ], 7 | proxy: { 8 | type: 'proxmox', 9 | url: `/api2/json/nodes/${me.nodename}/disks/lvmthin`, 10 | }, 11 | sorters: 'lv', 12 | }, 13 | }); 14 | 15 | me.callParent(); 16 | 17 | Proxmox.Utils.monStoreErrors(me, me.getStore(), true); 18 | me.reload(); 19 | }, 20 | }); 21 | 22 | Ext.define('PVE.node.StatusView', { 23 | extend: 'Proxmox.panel.StatusView', 24 | alias: 'widget.pveNodeStatus', 25 | 26 | - height: 300, 27 | + height: 420, 28 | bodyPadding: '15 5 15 5', 29 | 30 | layout: { 31 | type: 'table', 32 | columns: 2, 33 | tableAttrs: { 34 | style: { 35 | width: '100%', 36 | }, 37 | }, 38 | }, 39 | 40 | defaults: { 41 | xtype: 'pmxInfoWidget', 42 | padding: '0 10 5 10', 43 | }, 44 | 45 | items: [ 46 | { 47 | itemId: 'cpu', 48 | @@ -39389,40 +39389,93 @@ Ext.define('PVE.node.StatusView', { 49 | itemId: 'rootfs', 50 | title: '/ ' + gettext('HD space'), 51 | valueField: 'rootfs', 52 | maxField: 'rootfs', 53 | renderer: Proxmox.Utils.render_node_size_usage, 54 | }, 55 | { 56 | iconCls: 'fa fa-fw fa-refresh', 57 | itemId: 'swap', 58 | printSize: true, 59 | title: gettext('SWAP usage'), 60 | valueField: 'swap', 61 | maxField: 'swap', 62 | renderer: Proxmox.Utils.render_node_size_usage, 63 | }, 64 | { 65 | xtype: 'box', 66 | colspan: 2, 67 | padding: '0 0 20 0', 68 | }, 69 | + { 70 | + itemId: 'cputemp', 71 | + iconCls: 'fa fa-fw fa-thermometer-half', 72 | + title: gettext('CPU temp'), 73 | + valueField: 'cputemp', 74 | + maxField: 'cputemp', 75 | + renderer: Proxmox.Utils.render_node_temp, 76 | + }, 77 | + { 78 | + itemId: 'pchtemp', 79 | + iconCls: 'fa fa-fw fa-thermometer-half', 80 | + title: gettext('PCH temp'), 81 | + valueField: 'pchtemp', 82 | + maxField: 'pchtemp', 83 | + renderer: Proxmox.Utils.render_node_temp, 84 | + }, 85 | + { 86 | + itemId: 'nvme1temp', 87 | + iconCls: 'fa fa-fw fa-thermometer-half', 88 | + title: gettext('NVMe1 temp'), 89 | + valueField: 'nvme1temp', 90 | + maxField: 'nvme1temp', 91 | + renderer: Proxmox.Utils.render_node_temp, 92 | + }, 93 | + { 94 | + itemId: 'nvme2temp', 95 | + iconCls: 'fa fa-fw fa-thermometer-half', 96 | + title: gettext('NVMe2 temp'), 97 | + valueField: 'nvme2temp', 98 | + maxField: 'nvme2temp', 99 | + renderer: Proxmox.Utils.render_node_temp, 100 | + }, 101 | + { 102 | + itemId: 'hd1temp', 103 | + iconCls: 'fa fa-fw fa-thermometer-half', 104 | + title: gettext('HD1 temp'), 105 | + valueField: 'hd1temp', 106 | + maxField: 'hd1temp', 107 | + renderer: Proxmox.Utils.render_node_temp, 108 | + }, 109 | + { 110 | + itemId: 'hd2temp', 111 | + iconCls: 'fa fa-fw fa-thermometer-half', 112 | + title: gettext('HD2 temp'), 113 | + valueField: 'hd2temp', 114 | + maxField: 'hd2temp', 115 | + renderer: Proxmox.Utils.render_node_temp, 116 | + }, 117 | + { 118 | + xtype: 'box', 119 | + colspan: 2, 120 | + padding: '0 0 20 0', 121 | + }, 122 | { 123 | itemId: 'cpus', 124 | colspan: 2, 125 | printBar: false, 126 | title: gettext('CPU(s)'), 127 | textField: 'cpuinfo', 128 | renderer: Proxmox.Utils.render_cpu_model, 129 | value: '', 130 | }, 131 | { 132 | itemId: 'kversion', 133 | colspan: 2, 134 | title: gettext('Kernel Version'), 135 | printBar: false, 136 | textField: 'kversion', 137 | value: '', 138 | }, 139 | { 140 | itemId: 'version', 141 | colspan: 2, 142 | -------------------------------------------------------------------------------- /v8.0.4-pwt4.0.6/patches/pvemanagerlib.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/pve-manager/js/pvemanagerlib.js b/../pvemanagerlib.js 2 | index c7a8f54..2aeb1d6 100644 3 | --- a/usr/share/pve-manager/js/pvemanagerlib.js 4 | +++ b/../pvemanagerlib.js 5 | @@ -41768,41 +41768,41 @@ Ext.define('PVE.node.LVMThinList', { 6 | ], 7 | proxy: { 8 | type: 'proxmox', 9 | url: `/api2/json/nodes/${me.nodename}/disks/lvmthin`, 10 | }, 11 | sorters: 'lv', 12 | }, 13 | }); 14 | 15 | me.callParent(); 16 | 17 | Proxmox.Utils.monStoreErrors(me, me.getStore(), true); 18 | me.reload(); 19 | }, 20 | }); 21 | 22 | Ext.define('PVE.node.StatusView', { 23 | extend: 'Proxmox.panel.StatusView', 24 | alias: 'widget.pveNodeStatus', 25 | 26 | - height: 300, 27 | + height: 420, 28 | bodyPadding: '15 5 15 5', 29 | 30 | layout: { 31 | type: 'table', 32 | columns: 2, 33 | tableAttrs: { 34 | style: { 35 | width: '100%', 36 | }, 37 | }, 38 | }, 39 | 40 | defaults: { 41 | xtype: 'pmxInfoWidget', 42 | padding: '0 10 5 10', 43 | }, 44 | 45 | items: [ 46 | { 47 | itemId: 'cpu', 48 | @@ -41854,40 +41854,93 @@ Ext.define('PVE.node.StatusView', { 49 | itemId: 'rootfs', 50 | title: '/ ' + gettext('HD space'), 51 | valueField: 'rootfs', 52 | maxField: 'rootfs', 53 | renderer: Proxmox.Utils.render_node_size_usage, 54 | }, 55 | { 56 | iconCls: 'fa fa-fw fa-refresh', 57 | itemId: 'swap', 58 | printSize: true, 59 | title: gettext('SWAP usage'), 60 | valueField: 'swap', 61 | maxField: 'swap', 62 | renderer: Proxmox.Utils.render_node_size_usage, 63 | }, 64 | { 65 | xtype: 'box', 66 | colspan: 2, 67 | padding: '0 0 20 0', 68 | }, 69 | + { 70 | + itemId: 'cputemp', 71 | + iconCls: 'fa fa-fw fa-thermometer-half', 72 | + title: gettext('CPU temp'), 73 | + valueField: 'cputemp', 74 | + maxField: 'cputemp', 75 | + renderer: Proxmox.Utils.render_node_temp, 76 | + }, 77 | + { 78 | + itemId: 'pchtemp', 79 | + iconCls: 'fa fa-fw fa-thermometer-half', 80 | + title: gettext('PCH temp'), 81 | + valueField: 'pchtemp', 82 | + maxField: 'pchtemp', 83 | + renderer: Proxmox.Utils.render_node_temp, 84 | + }, 85 | + { 86 | + itemId: 'nvme1temp', 87 | + iconCls: 'fa fa-fw fa-thermometer-half', 88 | + title: gettext('NVMe1 temp'), 89 | + valueField: 'nvme1temp', 90 | + maxField: 'nvme1temp', 91 | + renderer: Proxmox.Utils.render_node_temp, 92 | + }, 93 | + { 94 | + itemId: 'nvme2temp', 95 | + iconCls: 'fa fa-fw fa-thermometer-half', 96 | + title: gettext('NVMe2 temp'), 97 | + valueField: 'nvme2temp', 98 | + maxField: 'nvme2temp', 99 | + renderer: Proxmox.Utils.render_node_temp, 100 | + }, 101 | + { 102 | + itemId: 'hd1temp', 103 | + iconCls: 'fa fa-fw fa-thermometer-half', 104 | + title: gettext('HD1 temp'), 105 | + valueField: 'hd1temp', 106 | + maxField: 'hd1temp', 107 | + renderer: Proxmox.Utils.render_node_temp, 108 | + }, 109 | + { 110 | + itemId: 'hd2temp', 111 | + iconCls: 'fa fa-fw fa-thermometer-half', 112 | + title: gettext('HD2 temp'), 113 | + valueField: 'hd2temp', 114 | + maxField: 'hd2temp', 115 | + renderer: Proxmox.Utils.render_node_temp, 116 | + }, 117 | + { 118 | + xtype: 'box', 119 | + colspan: 2, 120 | + padding: '0 0 20 0', 121 | + }, 122 | { 123 | itemId: 'cpus', 124 | colspan: 2, 125 | printBar: false, 126 | title: gettext('CPU(s)'), 127 | textField: 'cpuinfo', 128 | renderer: Proxmox.Utils.render_cpu_model, 129 | value: '', 130 | }, 131 | { 132 | itemId: 'kversion', 133 | colspan: 2, 134 | title: gettext('Kernel Version'), 135 | printBar: false, 136 | textField: 'kversion', 137 | value: '', 138 | }, 139 | { 140 | itemId: 'version', 141 | colspan: 2, 142 | -------------------------------------------------------------------------------- /v7.3-6-pwt3.5.5/patches/pvemanager-mobile.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/pve-manager/touch/pvemanager-mobile.js b/../pvemanager-mobile.js 2 | index 53b897c..ff6a3a8 100644 3 | --- a/usr/share/pve-manager/touch/pvemanager-mobile.js 4 | +++ b/../pvemanager-mobile.js 5 | @@ -3816,56 +3816,74 @@ Ext.define('PVE.Datacenter', { 6 | 7 | me.reload(); 8 | } 9 | 10 | }); 11 | 12 | Ext.define('PVE.NodeInfo', { 13 | extend: 'Ext.Component', 14 | alias: 'widget.pveNodeInfo', 15 | 16 | config: { 17 | style: 'background-color: white;', 18 | styleHtmlContent: true, 19 | data: [], 20 | tpl: [ 21 | '', 22 | '', 23 | '', 24 | '', 25 | '', 26 | + '', 27 | + '', 28 | + '', 29 | + '', 30 | + '', 31 | + '', 32 | '
Version:{pveversion}
Memory:{[this.meminfo(values)]}
CPU:{[this.cpuinfo(values)]}
Uptime:{[Proxmox.Utils.format_duration_long(values.uptime)]}
CPU temp:{[this.cputemp(values)]}
PCH temp:{[this.pchtemp(values)]}
NVMe temp:{[this.nvmetemp(values)]}
HD1 temp:{[this.hd1temp(values)]}
HD2 temp:{[this.hd2temp(values)]}
HD3 temp:{[this.hd3temp(values)]}
', 33 | { 34 | meminfo: function(values) { 35 | var d = values.memory; 36 | if (!d) { 37 | return '-'; 38 | } 39 | return Proxmox.Utils.format_size(d.used || 0) + " of " + Proxmox.Utils.format_size(d.total); 40 | }, 41 | cpuinfo: function(values) { 42 | if (!values.cpuinfo) { 43 | return '-'; 44 | } 45 | var per = values.cpu * 100; 46 | return per.toFixed(2) + "% (" + values.cpuinfo.cpus + " CPUs)"; 47 | - } 48 | + }, 49 | + rendertemp: function(temp) { 50 | + if (!temp) { 51 | + return '-'; 52 | + } 53 | + return temp.used.toFixed(1) + '°C (crit: ' + temp.total.toFixed(1) + '°C)'; 54 | + }, 55 | + cputemp: function(values) { return this.rendertemp(values.cputemp); }, 56 | + pchtemp: function(values) { return this.rendertemp(values.pchtemp); }, 57 | + nvmetemp: function(values) { return this.rendertemp(values.nvmetemp); }, 58 | + hd1temp: function(values) { return this.rendertemp(values.hd1temp); }, 59 | + hd2temp: function(values) { return this.rendertemp(values.hd2temp); }, 60 | + hd3temp: function(values) { return this.rendertemp(values.hd3temp); } 61 | } 62 | ] 63 | }, 64 | }); 65 | 66 | Ext.define('PVE.NodeSummary', { 67 | extend: 'PVE.Page', 68 | alias: 'widget.pveNodeSummary', 69 | 70 | statics: { 71 | pathMatch: function(loc) { 72 | return loc.match(/^nodes\/([^\s\/]+)$/); 73 | } 74 | }, 75 | 76 | nodename: undefined, 77 | 78 | config: { 79 | items: [ 80 | { 81 | @@ -3963,60 +3981,86 @@ Ext.define('PVE.NodeSummary', { 82 | }); 83 | 84 | Proxmox.Utils.API2Request({ 85 | url: '/nodes/' + me.nodename + '/qemu', 86 | method: 'GET', 87 | success: function(response) { 88 | var d = response.result.data; 89 | d.forEach(function(el) { el.type = 'qemu'; el.nodename = me.nodename }); 90 | me.store.each(function(rec) { 91 | if (rec.get('type') === 'qemu') { 92 | rec.destroy(); 93 | } 94 | }); 95 | me.store.add(d); 96 | }, 97 | failure: error_handler 98 | }); 99 | 100 | }, 101 | 102 | + autoRefreshTask: null, 103 | + setMenuItems: function() { 104 | + var me = this; 105 | + if (me.autoRefreshTask === null) { 106 | + var refreshButton = { 107 | + text: gettext('Enable Auto-refresh'), 108 | + handler: function() { 109 | + me.autoRefreshTask = setInterval(function() { me.reload(); }, 3000); 110 | + me.setMenuItems(); 111 | + } 112 | + } 113 | + } else { 114 | + var refreshButton = { 115 | + text: gettext('Disable Auto-refresh'), 116 | + handler: function() { 117 | + clearInterval(me.autoRefreshTask); 118 | + me.autoRefreshTask = null; 119 | + me.setMenuItems(); 120 | + } 121 | + } 122 | + }; 123 | + 124 | + me.down('pveMenuButton').setMenuItems([ 125 | + { 126 | + text: gettext('Tasks'), 127 | + handler: function() { 128 | + PVE.Workspace.gotoPage('nodes/' + me.nodename + '/tasks'); 129 | + } 130 | + }, 131 | + refreshButton 132 | + ]); 133 | + }, 134 | + 135 | initialize: function() { 136 | var me = this; 137 | 138 | var match = me.self.pathMatch(me.getAppUrl()); 139 | if (!match) { 140 | throw "pathMatch failed"; 141 | } 142 | 143 | me.nodename = match[1]; 144 | 145 | me.down('titlebar').setTitle(gettext('Node') + ': ' + me.nodename); 146 | 147 | - me.down('pveMenuButton').setMenuItems([ 148 | - { 149 | - text: gettext('Tasks'), 150 | - handler: function() { 151 | - PVE.Workspace.gotoPage('nodes/' + me.nodename + '/tasks'); 152 | - } 153 | - }, 154 | - ]); 155 | + me.setMenuItems(); 156 | 157 | me.store = Ext.create('Ext.data.Store', { 158 | fields: [ 'name', 'vmid', 'nodename', 'type', 'memory', 'uptime', 'mem', 'maxmem', 'cpu', 'cpus'], 159 | sorters: ['vmid'], 160 | grouper: { 161 | groupFn: function(record) { 162 | return record.get('type'); 163 | } 164 | }, 165 | }); 166 | 167 | var list = me.down('list'); 168 | list.setStore(me.store); 169 | 170 | me.reload(); 171 | 172 | this.callParent(); 173 | } 174 | }); 175 | Ext.define('PVE.MigrateBase', { 176 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.6.3/patches/pvemanager-mobile.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/pve-manager/touch/pvemanager-mobile.js b/../pvemanager-mobile.js 2 | index 9f55939..0f2710c 100644 3 | --- a/usr/share/pve-manager/touch/pvemanager-mobile.js 4 | +++ b/../pvemanager-mobile.js 5 | @@ -3749,56 +3749,74 @@ Ext.define('PVE.Datacenter', { 6 | 7 | me.reload(); 8 | } 9 | 10 | }); 11 | 12 | Ext.define('PVE.NodeInfo', { 13 | extend: 'Ext.Component', 14 | alias: 'widget.pveNodeInfo', 15 | 16 | config: { 17 | style: 'background-color: white;', 18 | styleHtmlContent: true, 19 | data: [], 20 | tpl: [ 21 | '', 22 | '', 23 | '', 24 | '', 25 | '', 26 | + '', 27 | + '', 28 | + '', 29 | + '', 30 | + '', 31 | + '', 32 | '
Version:{pveversion}
Memory:{[this.meminfo(values)]}
CPU:{[this.cpuinfo(values)]}
Uptime:{[Proxmox.Utils.format_duration_long(values.uptime)]}
CPU temp:{[this.cputemp(values)]}
PCH temp:{[this.pchtemp(values)]}
NVMe temp:{[this.nvmetemp(values)]}
HD1 temp:{[this.hd1temp(values)]}
HD2 temp:{[this.hd2temp(values)]}
HD3 temp:{[this.hd3temp(values)]}
', 33 | { 34 | meminfo: function(values) { 35 | var d = values.memory; 36 | if (!d) { 37 | return '-'; 38 | } 39 | return Proxmox.Utils.format_size(d.used || 0) + " of " + Proxmox.Utils.format_size(d.total); 40 | }, 41 | cpuinfo: function(values) { 42 | if (!values.cpuinfo) { 43 | return '-'; 44 | } 45 | var per = values.cpu * 100; 46 | return per.toFixed(2) + "% (" + values.cpuinfo.cpus + " CPUs)"; 47 | - } 48 | + }, 49 | + rendertemp: function(temp) { 50 | + if (!temp) { 51 | + return '-'; 52 | + } 53 | + return temp.used.toFixed(1) + '°C (crit: ' + temp.total.toFixed(1) + '°C)'; 54 | + }, 55 | + cputemp: function(values) { return this.rendertemp(values.cputemp); }, 56 | + pchtemp: function(values) { return this.rendertemp(values.pchtemp); }, 57 | + nvmetemp: function(values) { return this.rendertemp(values.nvmetemp); }, 58 | + hd1temp: function(values) { return this.rendertemp(values.hd1temp); }, 59 | + hd2temp: function(values) { return this.rendertemp(values.hd2temp); }, 60 | + hd3temp: function(values) { return this.rendertemp(values.hd3temp); } 61 | } 62 | ] 63 | }, 64 | }); 65 | 66 | Ext.define('PVE.NodeSummary', { 67 | extend: 'PVE.Page', 68 | alias: 'widget.pveNodeSummary', 69 | 70 | statics: { 71 | pathMatch: function(loc) { 72 | return loc.match(/^nodes\/([^\s\/]+)$/); 73 | } 74 | }, 75 | 76 | nodename: undefined, 77 | 78 | config: { 79 | items: [ 80 | { 81 | @@ -3896,60 +3914,86 @@ Ext.define('PVE.NodeSummary', { 82 | }); 83 | 84 | Proxmox.Utils.API2Request({ 85 | url: '/nodes/' + me.nodename + '/qemu', 86 | method: 'GET', 87 | success: function(response) { 88 | var d = response.result.data; 89 | d.forEach(function(el) { el.type = 'qemu'; el.nodename = me.nodename }); 90 | me.store.each(function(rec) { 91 | if (rec.get('type') === 'qemu') { 92 | rec.destroy(); 93 | } 94 | }); 95 | me.store.add(d); 96 | }, 97 | failure: error_handler 98 | }); 99 | 100 | }, 101 | 102 | + autoRefreshTask: null, 103 | + setMenuItems: function() { 104 | + var me = this; 105 | + if (me.autoRefreshTask === null) { 106 | + var refreshButton = { 107 | + text: gettext('Enable Auto-refresh'), 108 | + handler: function() { 109 | + me.autoRefreshTask = setInterval(function() { me.reload(); }, 3000); 110 | + me.setMenuItems(); 111 | + } 112 | + } 113 | + } else { 114 | + var refreshButton = { 115 | + text: gettext('Disable Auto-refresh'), 116 | + handler: function() { 117 | + clearInterval(me.autoRefreshTask); 118 | + me.autoRefreshTask = null; 119 | + me.setMenuItems(); 120 | + } 121 | + } 122 | + }; 123 | + 124 | + me.down('pveMenuButton').setMenuItems([ 125 | + { 126 | + text: gettext('Tasks'), 127 | + handler: function() { 128 | + PVE.Workspace.gotoPage('nodes/' + me.nodename + '/tasks'); 129 | + } 130 | + }, 131 | + refreshButton 132 | + ]); 133 | + }, 134 | + 135 | initialize: function() { 136 | var me = this; 137 | 138 | var match = me.self.pathMatch(me.getAppUrl()); 139 | if (!match) { 140 | throw "pathMatch failed"; 141 | } 142 | 143 | me.nodename = match[1]; 144 | 145 | me.down('titlebar').setTitle(gettext('Node') + ': ' + me.nodename); 146 | 147 | - me.down('pveMenuButton').setMenuItems([ 148 | - { 149 | - text: gettext('Tasks'), 150 | - handler: function() { 151 | - PVE.Workspace.gotoPage('nodes/' + me.nodename + '/tasks'); 152 | - } 153 | - }, 154 | - ]); 155 | + me.setMenuItems(); 156 | 157 | me.store = Ext.create('Ext.data.Store', { 158 | fields: [ 'name', 'vmid', 'nodename', 'type', 'memory', 'uptime', 'mem', 'maxmem', 'cpu', 'cpus'], 159 | sorters: ['vmid'], 160 | grouper: { 161 | groupFn: function(record) { 162 | return record.get('type'); 163 | } 164 | }, 165 | }); 166 | 167 | var list = me.down('list'); 168 | list.setStore(me.store); 169 | 170 | me.reload(); 171 | 172 | this.callParent(); 173 | } 174 | }); 175 | Ext.define('PVE.MigrateBase', { 176 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.6.4/patches/pvemanager-mobile.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/pve-manager/touch/pvemanager-mobile.js b/../pvemanager-mobile.js 2 | index 9f55939..0f2710c 100644 3 | --- a/usr/share/pve-manager/touch/pvemanager-mobile.js 4 | +++ b/../pvemanager-mobile.js 5 | @@ -3749,56 +3749,74 @@ Ext.define('PVE.Datacenter', { 6 | 7 | me.reload(); 8 | } 9 | 10 | }); 11 | 12 | Ext.define('PVE.NodeInfo', { 13 | extend: 'Ext.Component', 14 | alias: 'widget.pveNodeInfo', 15 | 16 | config: { 17 | style: 'background-color: white;', 18 | styleHtmlContent: true, 19 | data: [], 20 | tpl: [ 21 | '', 22 | '', 23 | '', 24 | '', 25 | '', 26 | + '', 27 | + '', 28 | + '', 29 | + '', 30 | + '', 31 | + '', 32 | '
Version:{pveversion}
Memory:{[this.meminfo(values)]}
CPU:{[this.cpuinfo(values)]}
Uptime:{[Proxmox.Utils.format_duration_long(values.uptime)]}
CPU temp:{[this.cputemp(values)]}
PCH temp:{[this.pchtemp(values)]}
NVMe temp:{[this.nvmetemp(values)]}
HD1 temp:{[this.hd1temp(values)]}
HD2 temp:{[this.hd2temp(values)]}
HD3 temp:{[this.hd3temp(values)]}
', 33 | { 34 | meminfo: function(values) { 35 | var d = values.memory; 36 | if (!d) { 37 | return '-'; 38 | } 39 | return Proxmox.Utils.format_size(d.used || 0) + " of " + Proxmox.Utils.format_size(d.total); 40 | }, 41 | cpuinfo: function(values) { 42 | if (!values.cpuinfo) { 43 | return '-'; 44 | } 45 | var per = values.cpu * 100; 46 | return per.toFixed(2) + "% (" + values.cpuinfo.cpus + " CPUs)"; 47 | - } 48 | + }, 49 | + rendertemp: function(temp) { 50 | + if (!temp) { 51 | + return '-'; 52 | + } 53 | + return temp.used.toFixed(1) + '°C (crit: ' + temp.total.toFixed(1) + '°C)'; 54 | + }, 55 | + cputemp: function(values) { return this.rendertemp(values.cputemp); }, 56 | + pchtemp: function(values) { return this.rendertemp(values.pchtemp); }, 57 | + nvmetemp: function(values) { return this.rendertemp(values.nvmetemp); }, 58 | + hd1temp: function(values) { return this.rendertemp(values.hd1temp); }, 59 | + hd2temp: function(values) { return this.rendertemp(values.hd2temp); }, 60 | + hd3temp: function(values) { return this.rendertemp(values.hd3temp); } 61 | } 62 | ] 63 | }, 64 | }); 65 | 66 | Ext.define('PVE.NodeSummary', { 67 | extend: 'PVE.Page', 68 | alias: 'widget.pveNodeSummary', 69 | 70 | statics: { 71 | pathMatch: function(loc) { 72 | return loc.match(/^nodes\/([^\s\/]+)$/); 73 | } 74 | }, 75 | 76 | nodename: undefined, 77 | 78 | config: { 79 | items: [ 80 | { 81 | @@ -3896,60 +3914,86 @@ Ext.define('PVE.NodeSummary', { 82 | }); 83 | 84 | Proxmox.Utils.API2Request({ 85 | url: '/nodes/' + me.nodename + '/qemu', 86 | method: 'GET', 87 | success: function(response) { 88 | var d = response.result.data; 89 | d.forEach(function(el) { el.type = 'qemu'; el.nodename = me.nodename }); 90 | me.store.each(function(rec) { 91 | if (rec.get('type') === 'qemu') { 92 | rec.destroy(); 93 | } 94 | }); 95 | me.store.add(d); 96 | }, 97 | failure: error_handler 98 | }); 99 | 100 | }, 101 | 102 | + autoRefreshTask: null, 103 | + setMenuItems: function() { 104 | + var me = this; 105 | + if (me.autoRefreshTask === null) { 106 | + var refreshButton = { 107 | + text: gettext('Enable Auto-refresh'), 108 | + handler: function() { 109 | + me.autoRefreshTask = setInterval(function() { me.reload(); }, 3000); 110 | + me.setMenuItems(); 111 | + } 112 | + } 113 | + } else { 114 | + var refreshButton = { 115 | + text: gettext('Disable Auto-refresh'), 116 | + handler: function() { 117 | + clearInterval(me.autoRefreshTask); 118 | + me.autoRefreshTask = null; 119 | + me.setMenuItems(); 120 | + } 121 | + } 122 | + }; 123 | + 124 | + me.down('pveMenuButton').setMenuItems([ 125 | + { 126 | + text: gettext('Tasks'), 127 | + handler: function() { 128 | + PVE.Workspace.gotoPage('nodes/' + me.nodename + '/tasks'); 129 | + } 130 | + }, 131 | + refreshButton 132 | + ]); 133 | + }, 134 | + 135 | initialize: function() { 136 | var me = this; 137 | 138 | var match = me.self.pathMatch(me.getAppUrl()); 139 | if (!match) { 140 | throw "pathMatch failed"; 141 | } 142 | 143 | me.nodename = match[1]; 144 | 145 | me.down('titlebar').setTitle(gettext('Node') + ': ' + me.nodename); 146 | 147 | - me.down('pveMenuButton').setMenuItems([ 148 | - { 149 | - text: gettext('Tasks'), 150 | - handler: function() { 151 | - PVE.Workspace.gotoPage('nodes/' + me.nodename + '/tasks'); 152 | - } 153 | - }, 154 | - ]); 155 | + me.setMenuItems(); 156 | 157 | me.store = Ext.create('Ext.data.Store', { 158 | fields: [ 'name', 'vmid', 'nodename', 'type', 'memory', 'uptime', 'mem', 'maxmem', 'cpu', 'cpus'], 159 | sorters: ['vmid'], 160 | grouper: { 161 | groupFn: function(record) { 162 | return record.get('type'); 163 | } 164 | }, 165 | }); 166 | 167 | var list = me.down('list'); 168 | list.setStore(me.store); 169 | 170 | me.reload(); 171 | 172 | this.callParent(); 173 | } 174 | }); 175 | Ext.define('PVE.MigrateBase', { 176 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.6.5/patches/pvemanager-mobile.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/pve-manager/touch/pvemanager-mobile.js b/../pvemanager-mobile.js 2 | index 9f55939..0f2710c 100644 3 | --- a/usr/share/pve-manager/touch/pvemanager-mobile.js 4 | +++ b/../pvemanager-mobile.js 5 | @@ -3749,56 +3749,74 @@ Ext.define('PVE.Datacenter', { 6 | 7 | me.reload(); 8 | } 9 | 10 | }); 11 | 12 | Ext.define('PVE.NodeInfo', { 13 | extend: 'Ext.Component', 14 | alias: 'widget.pveNodeInfo', 15 | 16 | config: { 17 | style: 'background-color: white;', 18 | styleHtmlContent: true, 19 | data: [], 20 | tpl: [ 21 | '', 22 | '', 23 | '', 24 | '', 25 | '', 26 | + '', 27 | + '', 28 | + '', 29 | + '', 30 | + '', 31 | + '', 32 | '
Version:{pveversion}
Memory:{[this.meminfo(values)]}
CPU:{[this.cpuinfo(values)]}
Uptime:{[Proxmox.Utils.format_duration_long(values.uptime)]}
CPU temp:{[this.cputemp(values)]}
PCH temp:{[this.pchtemp(values)]}
NVMe temp:{[this.nvmetemp(values)]}
HD1 temp:{[this.hd1temp(values)]}
HD2 temp:{[this.hd2temp(values)]}
HD3 temp:{[this.hd3temp(values)]}
', 33 | { 34 | meminfo: function(values) { 35 | var d = values.memory; 36 | if (!d) { 37 | return '-'; 38 | } 39 | return Proxmox.Utils.format_size(d.used || 0) + " of " + Proxmox.Utils.format_size(d.total); 40 | }, 41 | cpuinfo: function(values) { 42 | if (!values.cpuinfo) { 43 | return '-'; 44 | } 45 | var per = values.cpu * 100; 46 | return per.toFixed(2) + "% (" + values.cpuinfo.cpus + " CPUs)"; 47 | - } 48 | + }, 49 | + rendertemp: function(temp) { 50 | + if (!temp) { 51 | + return '-'; 52 | + } 53 | + return temp.used.toFixed(1) + '°C (crit: ' + temp.total.toFixed(1) + '°C)'; 54 | + }, 55 | + cputemp: function(values) { return this.rendertemp(values.cputemp); }, 56 | + pchtemp: function(values) { return this.rendertemp(values.pchtemp); }, 57 | + nvmetemp: function(values) { return this.rendertemp(values.nvmetemp); }, 58 | + hd1temp: function(values) { return this.rendertemp(values.hd1temp); }, 59 | + hd2temp: function(values) { return this.rendertemp(values.hd2temp); }, 60 | + hd3temp: function(values) { return this.rendertemp(values.hd3temp); } 61 | } 62 | ] 63 | }, 64 | }); 65 | 66 | Ext.define('PVE.NodeSummary', { 67 | extend: 'PVE.Page', 68 | alias: 'widget.pveNodeSummary', 69 | 70 | statics: { 71 | pathMatch: function(loc) { 72 | return loc.match(/^nodes\/([^\s\/]+)$/); 73 | } 74 | }, 75 | 76 | nodename: undefined, 77 | 78 | config: { 79 | items: [ 80 | { 81 | @@ -3896,60 +3914,86 @@ Ext.define('PVE.NodeSummary', { 82 | }); 83 | 84 | Proxmox.Utils.API2Request({ 85 | url: '/nodes/' + me.nodename + '/qemu', 86 | method: 'GET', 87 | success: function(response) { 88 | var d = response.result.data; 89 | d.forEach(function(el) { el.type = 'qemu'; el.nodename = me.nodename }); 90 | me.store.each(function(rec) { 91 | if (rec.get('type') === 'qemu') { 92 | rec.destroy(); 93 | } 94 | }); 95 | me.store.add(d); 96 | }, 97 | failure: error_handler 98 | }); 99 | 100 | }, 101 | 102 | + autoRefreshTask: null, 103 | + setMenuItems: function() { 104 | + var me = this; 105 | + if (me.autoRefreshTask === null) { 106 | + var refreshButton = { 107 | + text: gettext('Enable Auto-refresh'), 108 | + handler: function() { 109 | + me.autoRefreshTask = setInterval(function() { me.reload(); }, 3000); 110 | + me.setMenuItems(); 111 | + } 112 | + } 113 | + } else { 114 | + var refreshButton = { 115 | + text: gettext('Disable Auto-refresh'), 116 | + handler: function() { 117 | + clearInterval(me.autoRefreshTask); 118 | + me.autoRefreshTask = null; 119 | + me.setMenuItems(); 120 | + } 121 | + } 122 | + }; 123 | + 124 | + me.down('pveMenuButton').setMenuItems([ 125 | + { 126 | + text: gettext('Tasks'), 127 | + handler: function() { 128 | + PVE.Workspace.gotoPage('nodes/' + me.nodename + '/tasks'); 129 | + } 130 | + }, 131 | + refreshButton 132 | + ]); 133 | + }, 134 | + 135 | initialize: function() { 136 | var me = this; 137 | 138 | var match = me.self.pathMatch(me.getAppUrl()); 139 | if (!match) { 140 | throw "pathMatch failed"; 141 | } 142 | 143 | me.nodename = match[1]; 144 | 145 | me.down('titlebar').setTitle(gettext('Node') + ': ' + me.nodename); 146 | 147 | - me.down('pveMenuButton').setMenuItems([ 148 | - { 149 | - text: gettext('Tasks'), 150 | - handler: function() { 151 | - PVE.Workspace.gotoPage('nodes/' + me.nodename + '/tasks'); 152 | - } 153 | - }, 154 | - ]); 155 | + me.setMenuItems(); 156 | 157 | me.store = Ext.create('Ext.data.Store', { 158 | fields: [ 'name', 'vmid', 'nodename', 'type', 'memory', 'uptime', 'mem', 'maxmem', 'cpu', 'cpus'], 159 | sorters: ['vmid'], 160 | grouper: { 161 | groupFn: function(record) { 162 | return record.get('type'); 163 | } 164 | }, 165 | }); 166 | 167 | var list = me.down('list'); 168 | list.setStore(me.store); 169 | 170 | me.reload(); 171 | 172 | this.callParent(); 173 | } 174 | }); 175 | Ext.define('PVE.MigrateBase', { 176 | -------------------------------------------------------------------------------- /v7.4-3-pwt3.7.0/patches/pvemanager-mobile.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/pve-manager/touch/pvemanager-mobile.js b/../pvemanager-mobile.js 2 | index 9f55939..0f2710c 100644 3 | --- a/usr/share/pve-manager/touch/pvemanager-mobile.js 4 | +++ b/../pvemanager-mobile.js 5 | @@ -3749,56 +3749,74 @@ Ext.define('PVE.Datacenter', { 6 | 7 | me.reload(); 8 | } 9 | 10 | }); 11 | 12 | Ext.define('PVE.NodeInfo', { 13 | extend: 'Ext.Component', 14 | alias: 'widget.pveNodeInfo', 15 | 16 | config: { 17 | style: 'background-color: white;', 18 | styleHtmlContent: true, 19 | data: [], 20 | tpl: [ 21 | '', 22 | '', 23 | '', 24 | '', 25 | '', 26 | + '', 27 | + '', 28 | + '', 29 | + '', 30 | + '', 31 | + '', 32 | '
Version:{pveversion}
Memory:{[this.meminfo(values)]}
CPU:{[this.cpuinfo(values)]}
Uptime:{[Proxmox.Utils.format_duration_long(values.uptime)]}
CPU temp:{[this.cputemp(values)]}
PCH temp:{[this.pchtemp(values)]}
NVMe temp:{[this.nvmetemp(values)]}
HD1 temp:{[this.hd1temp(values)]}
HD2 temp:{[this.hd2temp(values)]}
HD3 temp:{[this.hd3temp(values)]}
', 33 | { 34 | meminfo: function(values) { 35 | var d = values.memory; 36 | if (!d) { 37 | return '-'; 38 | } 39 | return Proxmox.Utils.format_size(d.used || 0) + " of " + Proxmox.Utils.format_size(d.total); 40 | }, 41 | cpuinfo: function(values) { 42 | if (!values.cpuinfo) { 43 | return '-'; 44 | } 45 | var per = values.cpu * 100; 46 | return per.toFixed(2) + "% (" + values.cpuinfo.cpus + " CPUs)"; 47 | - } 48 | + }, 49 | + rendertemp: function(temp) { 50 | + if (!temp) { 51 | + return '-'; 52 | + } 53 | + return temp.used.toFixed(1) + '°C (crit: ' + temp.total.toFixed(1) + '°C)'; 54 | + }, 55 | + cputemp: function(values) { return this.rendertemp(values.cputemp); }, 56 | + pchtemp: function(values) { return this.rendertemp(values.pchtemp); }, 57 | + nvmetemp: function(values) { return this.rendertemp(values.nvmetemp); }, 58 | + hd1temp: function(values) { return this.rendertemp(values.hd1temp); }, 59 | + hd2temp: function(values) { return this.rendertemp(values.hd2temp); }, 60 | + hd3temp: function(values) { return this.rendertemp(values.hd3temp); } 61 | } 62 | ] 63 | }, 64 | }); 65 | 66 | Ext.define('PVE.NodeSummary', { 67 | extend: 'PVE.Page', 68 | alias: 'widget.pveNodeSummary', 69 | 70 | statics: { 71 | pathMatch: function(loc) { 72 | return loc.match(/^nodes\/([^\s\/]+)$/); 73 | } 74 | }, 75 | 76 | nodename: undefined, 77 | 78 | config: { 79 | items: [ 80 | { 81 | @@ -3896,60 +3914,86 @@ Ext.define('PVE.NodeSummary', { 82 | }); 83 | 84 | Proxmox.Utils.API2Request({ 85 | url: '/nodes/' + me.nodename + '/qemu', 86 | method: 'GET', 87 | success: function(response) { 88 | var d = response.result.data; 89 | d.forEach(function(el) { el.type = 'qemu'; el.nodename = me.nodename }); 90 | me.store.each(function(rec) { 91 | if (rec.get('type') === 'qemu') { 92 | rec.destroy(); 93 | } 94 | }); 95 | me.store.add(d); 96 | }, 97 | failure: error_handler 98 | }); 99 | 100 | }, 101 | 102 | + autoRefreshTask: null, 103 | + setMenuItems: function() { 104 | + var me = this; 105 | + if (me.autoRefreshTask === null) { 106 | + var refreshButton = { 107 | + text: gettext('Enable Auto-refresh'), 108 | + handler: function() { 109 | + me.autoRefreshTask = setInterval(function() { me.reload(); }, 3000); 110 | + me.setMenuItems(); 111 | + } 112 | + } 113 | + } else { 114 | + var refreshButton = { 115 | + text: gettext('Disable Auto-refresh'), 116 | + handler: function() { 117 | + clearInterval(me.autoRefreshTask); 118 | + me.autoRefreshTask = null; 119 | + me.setMenuItems(); 120 | + } 121 | + } 122 | + }; 123 | + 124 | + me.down('pveMenuButton').setMenuItems([ 125 | + { 126 | + text: gettext('Tasks'), 127 | + handler: function() { 128 | + PVE.Workspace.gotoPage('nodes/' + me.nodename + '/tasks'); 129 | + } 130 | + }, 131 | + refreshButton 132 | + ]); 133 | + }, 134 | + 135 | initialize: function() { 136 | var me = this; 137 | 138 | var match = me.self.pathMatch(me.getAppUrl()); 139 | if (!match) { 140 | throw "pathMatch failed"; 141 | } 142 | 143 | me.nodename = match[1]; 144 | 145 | me.down('titlebar').setTitle(gettext('Node') + ': ' + me.nodename); 146 | 147 | - me.down('pveMenuButton').setMenuItems([ 148 | - { 149 | - text: gettext('Tasks'), 150 | - handler: function() { 151 | - PVE.Workspace.gotoPage('nodes/' + me.nodename + '/tasks'); 152 | - } 153 | - }, 154 | - ]); 155 | + me.setMenuItems(); 156 | 157 | me.store = Ext.create('Ext.data.Store', { 158 | fields: [ 'name', 'vmid', 'nodename', 'type', 'memory', 'uptime', 'mem', 'maxmem', 'cpu', 'cpus'], 159 | sorters: ['vmid'], 160 | grouper: { 161 | groupFn: function(record) { 162 | return record.get('type'); 163 | } 164 | }, 165 | }); 166 | 167 | var list = me.down('list'); 168 | list.setStore(me.store); 169 | 170 | me.reload(); 171 | 172 | this.callParent(); 173 | } 174 | }); 175 | Ext.define('PVE.MigrateBase', { 176 | -------------------------------------------------------------------------------- /v7.4-13-pwt3.7.3/patches/pvemanager-mobile.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/pve-manager/touch/pvemanager-mobile.js b/../pvemanager-mobile.js 2 | index d19b4f8..be6050d 100644 3 | --- a/usr/share/pve-manager/touch/pvemanager-mobile.js 4 | +++ b/../pvemanager-mobile.js 5 | @@ -5165,56 +5165,74 @@ Ext.define('PVE.Datacenter', { 6 | 7 | me.reload(); 8 | }, 9 | 10 | }); 11 | 12 | Ext.define('PVE.NodeInfo', { 13 | extend: 'Ext.Component', 14 | alias: 'widget.pveNodeInfo', 15 | 16 | config: { 17 | style: 'background-color: white;', 18 | styleHtmlContent: true, 19 | data: [], 20 | tpl: [ 21 | '', 22 | '', 23 | '', 24 | '', 25 | '', 26 | + '', 27 | + '', 28 | + '', 29 | + '', 30 | + '', 31 | + '', 32 | '
Version:{pveversion}
Memory:{[this.meminfo(values)]}
CPU:{[this.cpuinfo(values)]}
Uptime:{[Proxmox.Utils.format_duration_long(values.uptime)]}
CPU temp:{[this.cputemp(values)]}
PCH temp:{[this.pchtemp(values)]}
NVMe temp:{[this.nvmetemp(values)]}
HD1 temp:{[this.hd1temp(values)]}
HD2 temp:{[this.hd2temp(values)]}
HD3 temp:{[this.hd3temp(values)]}
', 33 | { 34 | meminfo: function(values) { 35 | var d = values.memory; 36 | if (!d) { 37 | return '-'; 38 | } 39 | return Proxmox.Utils.format_size(d.used || 0) + " of " + Proxmox.Utils.format_size(d.total); 40 | }, 41 | cpuinfo: function(values) { 42 | if (!values.cpuinfo) { 43 | return '-'; 44 | } 45 | var per = values.cpu * 100; 46 | return per.toFixed(2) + "% (" + values.cpuinfo.cpus + " CPUs)"; 47 | }, 48 | + rendertemp: function(temp) { 49 | + if (!temp) { 50 | + return '-'; 51 | + } 52 | + return temp.used.toFixed(1) + '°C (crit: ' + temp.total.toFixed(1) + '°C)'; 53 | + }, 54 | + cputemp: function(values) { return this.rendertemp(values.cputemp); }, 55 | + pchtemp: function(values) { return this.rendertemp(values.pchtemp); }, 56 | + nvmetemp: function(values) { return this.rendertemp(values.nvmetemp); }, 57 | + hd1temp: function(values) { return this.rendertemp(values.hd1temp); }, 58 | + hd2temp: function(values) { return this.rendertemp(values.hd2temp); }, 59 | + hd3temp: function(values) { return this.rendertemp(values.hd3temp); }, 60 | }, 61 | ], 62 | }, 63 | }); 64 | 65 | Ext.define('PVE.NodeSummary', { 66 | extend: 'PVE.Page', 67 | alias: 'widget.pveNodeSummary', 68 | 69 | statics: { 70 | pathMatch: function(loc) { 71 | return loc.match(/^nodes\/([^\s/]+)$/); 72 | }, 73 | }, 74 | 75 | nodename: undefined, 76 | 77 | config: { 78 | items: [ 79 | { 80 | @@ -5311,60 +5329,86 @@ Ext.define('PVE.NodeSummary', { 81 | failure: error_handler, 82 | }); 83 | 84 | Proxmox.Utils.API2Request({ 85 | url: '/nodes/' + me.nodename + '/qemu', 86 | method: 'GET', 87 | success: function(response) { 88 | var d = response.result.data; 89 | d.forEach(function(el) { el.type = 'qemu'; el.nodename = me.nodename; }); 90 | me.store.each(function(rec) { 91 | if (rec.get('type') === 'qemu') { 92 | rec.destroy(); 93 | } 94 | }); 95 | me.store.add(d); 96 | }, 97 | failure: error_handler, 98 | }); 99 | }, 100 | 101 | + autoRefreshTask: null, 102 | + setMenuItems: function() { 103 | + var me = this; 104 | + if (me.autoRefreshTask === null) { 105 | + var refreshButton = { 106 | + text: gettext('Enable Auto-refresh'), 107 | + handler: function() { 108 | + me.autoRefreshTask = setInterval(function() { me.reload(); }, 3000); 109 | + me.setMenuItems(); 110 | + } 111 | + } 112 | + } else { 113 | + var refreshButton = { 114 | + text: gettext('Disable Auto-refresh'), 115 | + handler: function() { 116 | + clearInterval(me.autoRefreshTask); 117 | + me.autoRefreshTask = null; 118 | + me.setMenuItems(); 119 | + } 120 | + } 121 | + }; 122 | + 123 | + me.down('pveMenuButton').setMenuItems([ 124 | + { 125 | + text: gettext('Tasks'), 126 | + handler: function() { 127 | + PVE.Workspace.gotoPage('nodes/' + me.nodename + '/tasks'); 128 | + }, 129 | + }, 130 | + refreshButton, 131 | + ]); 132 | + }, 133 | + 134 | initialize: function() { 135 | var me = this; 136 | 137 | var match = me.self.pathMatch(me.getAppUrl()); 138 | if (!match) { 139 | throw "pathMatch failed"; 140 | } 141 | 142 | me.nodename = match[1]; 143 | 144 | me.down('titlebar').setTitle(gettext('Node') + ': ' + me.nodename); 145 | 146 | - me.down('pveMenuButton').setMenuItems([ 147 | - { 148 | - text: gettext('Tasks'), 149 | - handler: function() { 150 | - PVE.Workspace.gotoPage('nodes/' + me.nodename + '/tasks'); 151 | - }, 152 | - }, 153 | - ]); 154 | + me.setMenuItems(); 155 | 156 | me.store = Ext.create('Ext.data.Store', { 157 | fields: ['name', 'vmid', 'nodename', 'type', 'memory', 'uptime', 'mem', 'maxmem', 'cpu', 'cpus'], 158 | sorters: ['vmid'], 159 | grouper: { 160 | groupFn: function(record) { 161 | return record.get('type'); 162 | }, 163 | }, 164 | }); 165 | 166 | var list = me.down('list'); 167 | list.setStore(me.store); 168 | 169 | me.reload(); 170 | 171 | this.callParent(); 172 | }, 173 | }); 174 | Ext.define('PVE.MigrateBase', { 175 | -------------------------------------------------------------------------------- /v7.4-16-pwt3.7.3/patches/pvemanager-mobile.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/pve-manager/touch/pvemanager-mobile.js b/../pvemanager-mobile.js 2 | index d19b4f8..716650f 100644 3 | --- a/usr/share/pve-manager/touch/pvemanager-mobile.js 4 | +++ b/../pvemanager-mobile.js 5 | @@ -5165,56 +5165,74 @@ Ext.define('PVE.Datacenter', { 6 | 7 | me.reload(); 8 | }, 9 | 10 | }); 11 | 12 | Ext.define('PVE.NodeInfo', { 13 | extend: 'Ext.Component', 14 | alias: 'widget.pveNodeInfo', 15 | 16 | config: { 17 | style: 'background-color: white;', 18 | styleHtmlContent: true, 19 | data: [], 20 | tpl: [ 21 | '', 22 | '', 23 | '', 24 | '', 25 | '', 26 | + '', 27 | + '', 28 | + '', 29 | + '', 30 | + '', 31 | + '', 32 | '
Version:{pveversion}
Memory:{[this.meminfo(values)]}
CPU:{[this.cpuinfo(values)]}
Uptime:{[Proxmox.Utils.format_duration_long(values.uptime)]}
CPU temp:{[this.cputemp(values)]}
PCH temp:{[this.pchtemp(values)]}
NVMe1 temp:{[this.nvme1temp(values)]}
NVMe2 temp:{[this.nvme2temp(values)]}
HD1 temp:{[this.hd1temp(values)]}
HD2 temp:{[this.hd2temp(values)]}
', 33 | { 34 | meminfo: function(values) { 35 | var d = values.memory; 36 | if (!d) { 37 | return '-'; 38 | } 39 | return Proxmox.Utils.format_size(d.used || 0) + " of " + Proxmox.Utils.format_size(d.total); 40 | }, 41 | cpuinfo: function(values) { 42 | if (!values.cpuinfo) { 43 | return '-'; 44 | } 45 | var per = values.cpu * 100; 46 | return per.toFixed(2) + "% (" + values.cpuinfo.cpus + " CPUs)"; 47 | }, 48 | + rendertemp: function(temp) { 49 | + if (!temp) { 50 | + return '-'; 51 | + } 52 | + return temp.used.toFixed(1) + '°C (crit: ' + temp.total.toFixed(1) + '°C)'; 53 | + }, 54 | + cputemp: function(values) { return this.rendertemp(values.cputemp); }, 55 | + pchtemp: function(values) { return this.rendertemp(values.pchtemp); }, 56 | + nvme1temp: function(values) { return this.rendertemp(values.nvme1temp); }, 57 | + nvme2temp: function(values) { return this.rendertemp(values.nvme2temp); }, 58 | + hd1temp: function(values) { return this.rendertemp(values.hd1temp); }, 59 | + hd2temp: function(values) { return this.rendertemp(values.hd2temp); }, 60 | }, 61 | ], 62 | }, 63 | }); 64 | 65 | Ext.define('PVE.NodeSummary', { 66 | extend: 'PVE.Page', 67 | alias: 'widget.pveNodeSummary', 68 | 69 | statics: { 70 | pathMatch: function(loc) { 71 | return loc.match(/^nodes\/([^\s/]+)$/); 72 | }, 73 | }, 74 | 75 | nodename: undefined, 76 | 77 | config: { 78 | items: [ 79 | { 80 | @@ -5311,60 +5329,86 @@ Ext.define('PVE.NodeSummary', { 81 | failure: error_handler, 82 | }); 83 | 84 | Proxmox.Utils.API2Request({ 85 | url: '/nodes/' + me.nodename + '/qemu', 86 | method: 'GET', 87 | success: function(response) { 88 | var d = response.result.data; 89 | d.forEach(function(el) { el.type = 'qemu'; el.nodename = me.nodename; }); 90 | me.store.each(function(rec) { 91 | if (rec.get('type') === 'qemu') { 92 | rec.destroy(); 93 | } 94 | }); 95 | me.store.add(d); 96 | }, 97 | failure: error_handler, 98 | }); 99 | }, 100 | 101 | + autoRefreshTask: null, 102 | + setMenuItems: function() { 103 | + var me = this; 104 | + if (me.autoRefreshTask === null) { 105 | + var refreshButton = { 106 | + text: gettext('Enable Auto-refresh'), 107 | + handler: function() { 108 | + me.autoRefreshTask = setInterval(function() { me.reload(); }, 3000); 109 | + me.setMenuItems(); 110 | + } 111 | + } 112 | + } else { 113 | + var refreshButton = { 114 | + text: gettext('Disable Auto-refresh'), 115 | + handler: function() { 116 | + clearInterval(me.autoRefreshTask); 117 | + me.autoRefreshTask = null; 118 | + me.setMenuItems(); 119 | + } 120 | + } 121 | + }; 122 | + 123 | + me.down('pveMenuButton').setMenuItems([ 124 | + { 125 | + text: gettext('Tasks'), 126 | + handler: function() { 127 | + PVE.Workspace.gotoPage('nodes/' + me.nodename + '/tasks'); 128 | + }, 129 | + }, 130 | + refreshButton, 131 | + ]); 132 | + }, 133 | + 134 | initialize: function() { 135 | var me = this; 136 | 137 | var match = me.self.pathMatch(me.getAppUrl()); 138 | if (!match) { 139 | throw "pathMatch failed"; 140 | } 141 | 142 | me.nodename = match[1]; 143 | 144 | me.down('titlebar').setTitle(gettext('Node') + ': ' + me.nodename); 145 | 146 | - me.down('pveMenuButton').setMenuItems([ 147 | - { 148 | - text: gettext('Tasks'), 149 | - handler: function() { 150 | - PVE.Workspace.gotoPage('nodes/' + me.nodename + '/tasks'); 151 | - }, 152 | - }, 153 | - ]); 154 | + me.setMenuItems(); 155 | 156 | me.store = Ext.create('Ext.data.Store', { 157 | fields: ['name', 'vmid', 'nodename', 'type', 'memory', 'uptime', 'mem', 'maxmem', 'cpu', 'cpus'], 158 | sorters: ['vmid'], 159 | grouper: { 160 | groupFn: function(record) { 161 | return record.get('type'); 162 | }, 163 | }, 164 | }); 165 | 166 | var list = me.down('list'); 167 | list.setStore(me.store); 168 | 169 | me.reload(); 170 | 171 | this.callParent(); 172 | }, 173 | }); 174 | Ext.define('PVE.MigrateBase', { 175 | -------------------------------------------------------------------------------- /v8.0.4-pwt4.0.6/patches/pvemanager-mobile.js.patch: -------------------------------------------------------------------------------- 1 | diff --git a/usr/share/pve-manager/touch/pvemanager-mobile.js b/../pvemanager-mobile.js 2 | index 63c2b3c..5e9b44f 100644 3 | --- a/usr/share/pve-manager/touch/pvemanager-mobile.js 4 | +++ b/../pvemanager-mobile.js 5 | @@ -5183,56 +5183,74 @@ Ext.define('PVE.Datacenter', { 6 | 7 | me.reload(); 8 | }, 9 | 10 | }); 11 | 12 | Ext.define('PVE.NodeInfo', { 13 | extend: 'Ext.Component', 14 | alias: 'widget.pveNodeInfo', 15 | 16 | config: { 17 | style: 'background-color: white;', 18 | styleHtmlContent: true, 19 | data: [], 20 | tpl: [ 21 | '', 22 | '', 23 | '', 24 | '', 25 | '', 26 | + '', 27 | + '', 28 | + '', 29 | + '', 30 | + '', 31 | + '', 32 | '
Version:{pveversion}
Memory:{[this.meminfo(values)]}
CPU:{[this.cpuinfo(values)]}
Uptime:{[Proxmox.Utils.format_duration_long(values.uptime)]}
CPU temp:{[this.cputemp(values)]}
PCH temp:{[this.pchtemp(values)]}
NVMe1 temp:{[this.nvme1temp(values)]}
NVMe2 temp:{[this.nvme2temp(values)]}
HD1 temp:{[this.hd1temp(values)]}
HD2 temp:{[this.hd2temp(values)]}
', 33 | { 34 | meminfo: function(values) { 35 | var d = values.memory; 36 | if (!d) { 37 | return '-'; 38 | } 39 | return Proxmox.Utils.format_size(d.used || 0) + " of " + Proxmox.Utils.format_size(d.total); 40 | }, 41 | cpuinfo: function(values) { 42 | if (!values.cpuinfo) { 43 | return '-'; 44 | } 45 | var per = values.cpu * 100; 46 | return per.toFixed(2) + "% (" + values.cpuinfo.cpus + " CPUs)"; 47 | }, 48 | + rendertemp: function(temp) { 49 | + if (!temp) { 50 | + return '-'; 51 | + } 52 | + return temp.used.toFixed(1) + '°C (crit: ' + temp.total.toFixed(1) + '°C)'; 53 | + }, 54 | + cputemp: function(values) { return this.rendertemp(values.cputemp); }, 55 | + pchtemp: function(values) { return this.rendertemp(values.pchtemp); }, 56 | + nvme1temp: function(values) { return this.rendertemp(values.nvme1temp); }, 57 | + nvme2temp: function(values) { return this.rendertemp(values.nvme2temp); }, 58 | + hd1temp: function(values) { return this.rendertemp(values.hd1temp); }, 59 | + hd2temp: function(values) { return this.rendertemp(values.hd2temp); }, 60 | }, 61 | ], 62 | }, 63 | }); 64 | 65 | Ext.define('PVE.NodeSummary', { 66 | extend: 'PVE.Page', 67 | alias: 'widget.pveNodeSummary', 68 | 69 | statics: { 70 | pathMatch: function(loc) { 71 | return loc.match(/^nodes\/([^\s/]+)$/); 72 | }, 73 | }, 74 | 75 | nodename: undefined, 76 | 77 | config: { 78 | items: [ 79 | { 80 | @@ -5329,60 +5347,86 @@ Ext.define('PVE.NodeSummary', { 81 | failure: error_handler, 82 | }); 83 | 84 | Proxmox.Utils.API2Request({ 85 | url: '/nodes/' + me.nodename + '/qemu', 86 | method: 'GET', 87 | success: function(response) { 88 | var d = response.result.data; 89 | d.forEach(function(el) { el.type = 'qemu'; el.nodename = me.nodename; }); 90 | me.store.each(function(rec) { 91 | if (rec.get('type') === 'qemu') { 92 | rec.destroy(); 93 | } 94 | }); 95 | me.store.add(d); 96 | }, 97 | failure: error_handler, 98 | }); 99 | }, 100 | 101 | + autoRefreshTask: null, 102 | + setMenuItems: function() { 103 | + var me = this; 104 | + if (me.autoRefreshTask === null) { 105 | + var refreshButton = { 106 | + text: gettext('Enable Auto-refresh'), 107 | + handler: function() { 108 | + me.autoRefreshTask = setInterval(function() { me.reload(); }, 3000); 109 | + me.setMenuItems(); 110 | + } 111 | + } 112 | + } else { 113 | + var refreshButton = { 114 | + text: gettext('Disable Auto-refresh'), 115 | + handler: function() { 116 | + clearInterval(me.autoRefreshTask); 117 | + me.autoRefreshTask = null; 118 | + me.setMenuItems(); 119 | + } 120 | + } 121 | + }; 122 | + 123 | + me.down('pveMenuButton').setMenuItems([ 124 | + { 125 | + text: gettext('Tasks'), 126 | + handler: function() { 127 | + PVE.Workspace.gotoPage('nodes/' + me.nodename + '/tasks'); 128 | + }, 129 | + }, 130 | + refreshButton, 131 | + ]); 132 | + }, 133 | + 134 | initialize: function() { 135 | var me = this; 136 | 137 | var match = me.self.pathMatch(me.getAppUrl()); 138 | if (!match) { 139 | throw "pathMatch failed"; 140 | } 141 | 142 | me.nodename = match[1]; 143 | 144 | me.down('titlebar').setTitle(gettext('Node') + ': ' + me.nodename); 145 | 146 | - me.down('pveMenuButton').setMenuItems([ 147 | - { 148 | - text: gettext('Tasks'), 149 | - handler: function() { 150 | - PVE.Workspace.gotoPage('nodes/' + me.nodename + '/tasks'); 151 | - }, 152 | - }, 153 | - ]); 154 | + me.setMenuItems(); 155 | 156 | me.store = Ext.create('Ext.data.Store', { 157 | fields: ['name', 'vmid', 'nodename', 'type', 'memory', 'uptime', 'mem', 'maxmem', 'cpu', 'cpus'], 158 | sorters: ['vmid'], 159 | grouper: { 160 | groupFn: function(record) { 161 | return record.get('type'); 162 | }, 163 | }, 164 | }); 165 | 166 | var list = me.down('list'); 167 | list.setStore(me.store); 168 | 169 | me.reload(); 170 | 171 | this.callParent(); 172 | }, 173 | }); 174 | Ext.define('PVE.MigrateBase', { 175 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pve-mods 2 | 3 | Modifications to [Proxmox Virtual Environment](https://www.proxmox.com/en/proxmox-ve) in 4 | order to add CPU and hard drive temperature readings (powered by 5 | [lm-sensors](https://github.com/lm-sensors/lm-sensors)) to the PVE web-based management 6 | interface. 7 | 8 | Temperature readings on the desktop version of the management interface: 9 | 10 | ![PVE GUI desktop screenshot](https://github.com/alexleigh/pve-mods/blob/docs/desktop.png?raw=true) 11 | 12 | Temperature readings on the mobile version of the management interface: 13 | 14 | ![PVE GUI mobile screenshot](https://github.com/alexleigh/pve-mods/blob/docs/mobile.png?raw=true) 15 | 16 | Since the mobile version does not auto-refresh statuses, another enhancement included in these 17 | mods is the addition of an Auto-refresh on/off toggle in the mobile Node status view. 18 | 19 | ## Disclaimer 20 | 21 | These enhancements involve modifying files distributed by Proxmox packages. As such, they 22 | should be used on hobby projects only. Also, any updates to the affected Proxmox packages 23 | will erase the modifications. 24 | 25 | ## Requirements 26 | 27 | lm-sensors needs to be installed on the hypervisor for the probes to work. To install 28 | lm-sensors, run the following on the hypervisor: 29 | 30 | ```shell 31 | apt install lm-sensors 32 | ``` 33 | 34 | To show hard drive temperatures, the `drivetemp` module must be loaded for lm-sensors to 35 | report SMART temperature readings. To manually load the `drivetemp` module, run the following 36 | on the hypervisor: 37 | 38 | ```shell 39 | modprobe drivetemp 40 | ``` 41 | 42 | To confirm the SMART temperature readings are working, run the sensors command on the 43 | hypervisor: 44 | 45 | ```shell 46 | sensors 47 | ``` 48 | 49 | Once the hard drive temperature sensors are confirmed to be working, you can configure the 50 | system to load the `drivetemp` module at boot. 51 | 52 | ## Usage 53 | 54 | The simple way to apply these modifications is by examining the patch files in one of the patches 55 | directories. Caution: directly applying these patches to the PVE distribution files should only be 56 | done if the PVE packages on your system match the version these patches were generated against. The 57 | patch directories and the versions of the Proxmox packages they were generated against are: 58 | 59 | [v7.3-6-pwt3.5.5](v7.3-6-pwt3.5.5/patches) 60 | * pve-manager 7.3-6 61 | * proxmox-widget-toolkit 3.5.5 62 | 63 | [v7.4-3-pwt3.6.3](v7.4-3-pwt3.6.3/patches) 64 | * pve-manager 7.4-3 65 | * proxmox-widget-toolkit 3.6.3 66 | 67 | [v7.4-3-pwt3.6.4](v7.4-3-pwt3.6.4/patches) 68 | * pve-manager 7.4-3 69 | * proxmox-widget-toolkit 3.6.4 70 | 71 | [v7.4-3-pwt3.6.5](v7.4-3-pwt3.6.5/patches) 72 | * pve-manager 7.4-3 73 | * proxmox-widget-toolkit 3.6.5 74 | 75 | [v7.4-3-pwt3.7.0](v7.4-3-pwt3.7.0/patches) 76 | * pve-manager 7.4-3 77 | * proxmox-widget-toolkit 3.7.0 78 | 79 | [v7.4-13-pwt3.7.3](v7.4-13-pwt3.7.3/patches) 80 | * pve-manager 7.4-13 81 | * proxmox-widget-toolkit 3.7.3 82 | 83 | [v7.4-16-pwt3.7.3](v7.4-16-pwt3.7.3/patches) 84 | * pve-manager 7.4-16 85 | * proxmox-widget-toolkit 3.7.3 86 | 87 | [v8.0.4-pwt4.0.6](v8.0.4-pwt4.0.6/patches) 88 | * pve-manager 8.0.4 89 | * proxmox-widget-toolkit 4.0.6 90 | 91 | > **Warning** 92 | > If the package versions installed on your system are different from these, the patches should not 93 | > be applied. Instead, use the patches as a reference to make manual modifications to the affected 94 | > files. 95 | 96 | > **Note** 97 | > The patches also hardcode the names of various lm-sensors probes to extract temperature readings. 98 | > On your system, the probes you'd like to display and their corresponding names are likely 99 | > different. This is another reason why you might want to make manual modifications rather than 100 | > apply the patch files. 101 | 102 | ### Making manual modifications 103 | 104 | To make manual modifications, using the patch files as a reference, first take a look at each of the 105 | patch files, and note the path to the file being patched shown in the first line of each patch file. 106 | These paths correspond to the files you will need to modify on your system. For each path, open the 107 | file in your preferred editor, for example by running the following command on your hypervisor: 108 | 109 | ```shell 110 | nano /usr/share/perl5/PVE/API2/Nodes.pm 111 | ``` 112 | 113 | With the file open, inspect the corresponding change in the patch file, and make the same changes 114 | on your system file. 115 | 116 | Of the four patched files, 117 | [pvemanager-mobile.js.patch](v7.4-3-pwt3.6.5/patches/pvemanager-mobile.js.patch) is an optional 118 | change that only needs to be applied if you are interested in adding the temperature readings to the 119 | mobile site. The other three files must be modified in order for the temperature readings to work. 120 | 121 | Several of the patched files deal with names of lm-sensors probes. To determine how to make the 122 | correct changes for your system, first run the `sensors` command in JSON mode to inspect 123 | the JSON output: 124 | 125 | ```shell 126 | sensors -j 127 | ``` 128 | 129 | For each probe whose value you wish to display, take note of the JSON path to reach the dictionary 130 | containing the temperature values, as well as the keys of the current reading and critical value. 131 | The path and key names go into the `%sensors_config` hash in 132 | [Nodes.pm](v7.4-3-pwt3.6.5/patches/Nodes.pm.patch). The keys of the `%sensors_config` can be any 133 | string as long as they are unique and do not collide with any existing keys in the `$res` hash. 134 | These key names in `%sensors_config` will be referenced by the JavaScript files used to display the 135 | temperatures. 136 | 137 | With `%sensors_config` configured, modify 138 | [pvemanagerlib.js](v7.4-3-pwt3.6.5/patches/pvemanagerlib.js.patch) to reference the configured 139 | probes. For each item, the `valueField` and `maxField` refer to one of the configured keys in 140 | `%sensors_config`. If you wish to enhance the mobile site as well, modify 141 | [pvemanager-mobile.js](v7.4-3-pwt3.6.5/patches/pvemanager-mobile.js.patch) to also reference the 142 | configured probes. 143 | 144 | Depending on the number of probes you have configured, you may need to adjust the height of the 145 | status area in [pvemanagerlib.js](v7.4-3-pwt3.6.5/patches/pvemanagerlib.js.patch). Also, if an odd 146 | number of probes was added, you may need to add a spacer to preserve the layout of items lower on 147 | the status panel. 148 | 149 | After all the modifications have been completed, restart the pve-proxy service for your changes to 150 | take effect: 151 | 152 | ```shell 153 | systemctl restart pveproxy.service 154 | ``` 155 | 156 | If you have the pve-manager web interface open in a browser, you may need to refresh the page after 157 | restarting the pve-proxy service. 158 | 159 | ### Build from source 160 | 161 | Alternatively, the modified files can be built from Proxmox sources. The modifications have 162 | been committed to the following repositories: 163 | 164 | * [pve-manager](https://github.com/alexleigh/pve-manager) 165 | * [proxmox-widget-toolkit](https://github.com/alexleigh/proxmox-widget-toolkit) 166 | 167 | To build the modified files in the [v7.3-6-pwt3.5.5](v7.3-6-pwt3.5.5) directory, use the following 168 | branches: 169 | 170 | * [pve-manager/v7.3-6](https://github.com/alexleigh/pve-manager/tree/v7.3-6) 171 | * [proxmox-widget-toolkit/v3.5.5](https://github.com/alexleigh/proxmox-widget-toolkit/tree/v3.5.5) 172 | 173 | To build the modified files in the [v7.4-3-pwt3.6.3](v7.4-3-pwt3.6.3) directory, use the following 174 | branches: 175 | 176 | * [pve-manager/v7.4-3](https://github.com/alexleigh/pve-manager/tree/v7.4-3) 177 | * [proxmox-widget-toolkit/v3.6.3](https://github.com/alexleigh/proxmox-widget-toolkit/tree/v3.6.3) 178 | 179 | To build the modified files in the [v7.4-3-pwt3.6.4](v7.4-3-pwt3.6.4) directory, use the following 180 | branches: 181 | 182 | * [pve-manager/v7.4-3](https://github.com/alexleigh/pve-manager/tree/v7.4-3) 183 | * [proxmox-widget-toolkit/v3.6.4](https://github.com/alexleigh/proxmox-widget-toolkit/tree/v3.6.4) 184 | 185 | To build the modified files in the [v7.4-3-pwt3.6.5](v7.4-3-pwt3.6.5) directory, use the following 186 | branches: 187 | 188 | * [pve-manager/v7.4-3](https://github.com/alexleigh/pve-manager/tree/v7.4-3) 189 | * [proxmox-widget-toolkit/v3.6.5](https://github.com/alexleigh/proxmox-widget-toolkit/tree/v3.6.5) 190 | 191 | To build the modified files in the [v7.4-3-pwt3.7.0](v7.4-3-pwt3.7.0) directory, use the following 192 | branches: 193 | 194 | * [pve-manager/v7.4-3](https://github.com/alexleigh/pve-manager/tree/v7.4-3) 195 | * [proxmox-widget-toolkit/v3.7.0](https://github.com/alexleigh/proxmox-widget-toolkit/tree/v3.7.0) 196 | 197 | To build the modified files in the [v7.4-13-pwt3.7.3](v7.4-13-pwt3.7.3) directory, use the following 198 | branches: 199 | 200 | * [pve-manager/v7.4-13](https://github.com/alexleigh/pve-manager/tree/v7.4-13) 201 | * [proxmox-widget-toolkit/v3.7.3](https://github.com/alexleigh/proxmox-widget-toolkit/tree/v3.7.3) 202 | 203 | To build the modified files in the [v7.4-16-pwt3.7.3](v7.4-16-pwt3.7.3) directory, use the following 204 | branches: 205 | 206 | * [pve-manager/v7.4-16](https://github.com/alexleigh/pve-manager/tree/v7.4-16) 207 | * [proxmox-widget-toolkit/v3.7.3](https://github.com/alexleigh/proxmox-widget-toolkit/tree/v3.7.3) 208 | 209 | To build the modified files in the [v8.0.4-pwt4.0.6](v8.0.4-pwt4.0.6) directory, use the following 210 | branches: 211 | 212 | * [pve-manager/v8.0.4](https://github.com/alexleigh/pve-manager/tree/v8.0.4) 213 | * [proxmox-widget-toolkit/v4.0.6](https://github.com/alexleigh/proxmox-widget-toolkit/tree/v4.0.6) 214 | 215 | Cloning the above two repositories and this repository in the same parent directory, and invoking 216 | `make all` in one of the versioned subdirectories, will generate all the modified files within the 217 | versioned subdirectory. Building these files requires a development environment where, at a minimum, 218 | the Proxmox packages `pve-manager`, `proxmox-widget-toolkit`, and 219 | [`pve-docs`](https://github.com/proxmox/pve-docs) can be successfully built. 220 | 221 | If you're making modifications on top of official Proxmox repositories, for the purpose of installing 222 | the modified files on a real system, make sure to check out the revision in the Proxmox repository 223 | which matches the version of the Proxmox package installed on the system being modified. For example, 224 | if you are modifying [`pve-manager`](https://git.proxmox.com/?p=pve-manager.git;a=summary), and 225 | the system you are targeting is running `pve-manager` 7.3-6, make sure to check out revision 226 | `723bb6e` "bump version to 7.3-6" prior to making any changes. Otherwise, the modified file will contain 227 | changes other than the changes you intended. 228 | 229 | Once the modified files have been built, running `make install` will install the files to the 230 | current system, replacing PVE distributed files. Prior to running `make install`, it is a good 231 | idea to run `make backup` to make a copy of the PVE distributed files. Running `make restore` 232 | will restore the backed up files, replacing the modified ones (`make backup` must have already 233 | been run for `make restore` to work.) 234 | --------------------------------------------------------------------------------