mirror of https://github.com/mikaku/Monitorix.git
Add power graph in Watts to gensens via 'pwr' identifier.
This commit is contained in:
parent
ac1dda2b19
commit
ce912059b4
|
@ -424,13 +424,15 @@ sub gensens_cgi {
|
||||||
foreach my $sg (sort keys %{$gensens->{list}}) {
|
foreach my $sg (sort keys %{$gensens->{list}}) {
|
||||||
my @ls = split(',', $gensens->{list}->{$sg});
|
my @ls = split(',', $gensens->{list}->{$sg});
|
||||||
|
|
||||||
# determine if we are dealing with a 'temp', 'cpu' or 'bat' graph
|
# determine if we are dealing with a 'temp', 'cpu', 'bat' or 'pwr' graph
|
||||||
if(index($ls[0], "temp") == 0) {
|
if(index($ls[0], "temp") == 0) {
|
||||||
$vlabel = $temp_scale;
|
$vlabel = $temp_scale;
|
||||||
} elsif(index($ls[0], "cpu") == 0) {
|
} elsif(index($ls[0], "cpu") == 0) {
|
||||||
$vlabel = "Hz";
|
$vlabel = "Hz";
|
||||||
} elsif(index($ls[0], "bat") == 0) {
|
} elsif(index($ls[0], "bat") == 0) {
|
||||||
$vlabel = "Charge";
|
$vlabel = "Charge";
|
||||||
|
} elsif(index($ls[0], "pwr") == 0) {
|
||||||
|
$vlabel = "Watt";
|
||||||
} else {
|
} else {
|
||||||
# not supported yet
|
# not supported yet
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue