Compare commits
	
		
			1 Commits
		
	
	
		
			master
			...
			add-temper
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| dab566cc73 | 
@@ -563,7 +563,7 @@ utilities: {
 | 
			
		||||
		    let res = response.result;
 | 
			
		||||
		    if (res === null || res === undefined || !res || res
 | 
			
		||||
			.data.status.toLowerCase() !== 'active') {
 | 
			
		||||
			Ext.Msg.show({
 | 
			
		||||
			void({ //Ext.Msg.show({
 | 
			
		||||
			    title: gettext('No valid subscription'),
 | 
			
		||||
			    icon: Ext.Msg.WARNING,
 | 
			
		||||
			    message: Proxmox.Utils.getNoSubKeyHtml(res.data.url),
 | 
			
		||||
 
 | 
			
		||||
@@ -561,6 +561,17 @@ __PACKAGE__->register_method({
 | 
			
		||||
	$res->{pveversion} = PVE::pvecfg::package() . "/" .
 | 
			
		||||
	    PVE::pvecfg::version_text();
 | 
			
		||||
 | 
			
		||||
	my $net_eno1 = `ethtool eno1 | grep Speed`;
 | 
			
		||||
	my $net_enp4s0 = `ethtool enp4s0 | grep Speed`;
 | 
			
		||||
	my $net_enp5s0 = `ethtool enp5s0 | grep Speed`;
 | 
			
		||||
	my $net_enp7s0 = `ethtool enp7s0 | grep Speed`;
 | 
			
		||||
	my $net_enp8s0 = `ethtool enp8s0 | grep Speed`;
 | 
			
		||||
	$res->{networksp} = [ $net_eno1, $net_enp4s0, $net_enp5s0, $net_enp7s0, $net_enp8s0 ];
 | 
			
		||||
 | 
			
		||||
	my $temps = `sensors -j`; # add temps
 | 
			
		||||
	my $gpus = `nvidia-smi | awk '{print \$3}' | sed -n '10p' | sed 's/C\$//'`;
 | 
			
		||||
	$res->{thermal} = [ $temps, $gpus ];
 | 
			
		||||
 | 
			
		||||
	my $dinfo = df('/', 1);     # output is bytes
 | 
			
		||||
 | 
			
		||||
	$res->{rootfs} = {
 | 
			
		||||
 
 | 
			
		||||
@@ -44913,7 +44913,7 @@ Ext.define('PVE.node.StatusView', {
 | 
			
		||||
    extend: 'Proxmox.panel.StatusView',
 | 
			
		||||
    alias: 'widget.pveNodeStatus',
 | 
			
		||||
 | 
			
		||||
    height: 350,
 | 
			
		||||
    height: 390,
 | 
			
		||||
    bodyPadding: '15 5 15 5',
 | 
			
		||||
 | 
			
		||||
    layout: {
 | 
			
		||||
@@ -45048,6 +45048,38 @@ Ext.define('PVE.node.StatusView', {
 | 
			
		||||
	    textField: 'pveversion',
 | 
			
		||||
	    value: '',
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
	    itemId: 'thermal',
 | 
			
		||||
	    colspan: 2,
 | 
			
		||||
	    printBar: false,
 | 
			
		||||
	    title: gettext('Thermal'),
 | 
			
		||||
	    textField: 'thermal',
 | 
			
		||||
	    renderer: function (value) {
 | 
			
		||||
			if (!Array.isArray(value)) {
 | 
			
		||||
				return '';
 | 
			
		||||
			}
 | 
			
		||||
			const temp = JSON.parse(value[0]);
 | 
			
		||||
			const cpu0 = temp['coretemp-isa-0000']['Package id 0']['temp1_input'].toFixed(1);
 | 
			
		||||
			// const board = temp['acpitz-acpi-0']['temp1']['temp1_input'].toFixed(1);
 | 
			
		||||
			const nvme = temp['nvme-pci-0c00']['Composite']['temp1_input'].toFixed(1);
 | 
			
		||||
			const gpu = Number(value[1]).toFixed(1);
 | 
			
		||||
			return `CPU: ${cpu0}\xb0C | GPU: ${gpu}\xb0C | NVME: ${nvme}\xb0C`;
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
	    itemId: 'networksp',
 | 
			
		||||
	    colspan: 2,
 | 
			
		||||
	    printBar: false,
 | 
			
		||||
	    title: gettext('Network Speed'),
 | 
			
		||||
	    textField: 'networksp',
 | 
			
		||||
	    renderer: function (sp) {
 | 
			
		||||
			if (!Array.isArray(sp)) {
 | 
			
		||||
				return '';
 | 
			
		||||
			}
 | 
			
		||||
			const sps = sp.map(function (s) { return String(s).match(/(?<=:\s+)(.+)/g)?.[0] });
 | 
			
		||||
			return sps.join(' | ');
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
    ],
 | 
			
		||||
 | 
			
		||||
    updateTitle: function() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user