mirror of https://github.com/mikaku/Monitorix.git
added new 'limit' functionality to 'nvidia' graph
This commit is contained in:
parent
8e1e192587
commit
56af232c9c
|
@ -235,6 +235,8 @@ sub nvidia_cgi {
|
|||
my ($package, $config, $cgi) = @_;
|
||||
|
||||
my $nvidia = $config->{nvidia};
|
||||
my @rigid = split(',', ($nvidia->{rigid} || ""));
|
||||
my @limit = split(',', ($nvidia->{limit} || ""));
|
||||
my $tf = $cgi->{tf};
|
||||
my $colors = $cgi->{colors};
|
||||
my $graph = $cgi->{graph};
|
||||
|
@ -244,6 +246,7 @@ sub nvidia_cgi {
|
|||
my $u = "";
|
||||
my $width;
|
||||
my $height;
|
||||
my @riglim;
|
||||
my $temp_scale = "Celsius";
|
||||
my @tmp;
|
||||
my @tmpz;
|
||||
|
@ -363,6 +366,7 @@ sub nvidia_cgi {
|
|||
main::graph_header($title, 2);
|
||||
}
|
||||
|
||||
@riglim = @{setup_riglim($rigid[0], $limit[0])};
|
||||
for($n = 0; $n < 9; $n++) {
|
||||
if($n < $nvidia->{max}) {
|
||||
push(@tmp, "LINE2:temp_" . $n . $LC[$n] . ":Card $n");
|
||||
|
@ -420,7 +424,7 @@ sub nvidia_cgi {
|
|||
"--vertical-label=$temp_scale",
|
||||
"--width=$width",
|
||||
"--height=$height",
|
||||
"--lower-limit=0",
|
||||
@riglim,
|
||||
$zoom,
|
||||
@{$cgi->{version12}},
|
||||
@{$colors->{graph_colors}},
|
||||
|
@ -449,7 +453,7 @@ sub nvidia_cgi {
|
|||
"--vertical-label=$temp_scale",
|
||||
"--width=$width",
|
||||
"--height=$height",
|
||||
"--lower-limit=0",
|
||||
@riglim,
|
||||
@{$cgi->{version12}},
|
||||
@{$colors->{graph_colors}},
|
||||
"DEF:temp0=$rrd:nvidia_temp0:AVERAGE",
|
||||
|
@ -484,6 +488,7 @@ sub nvidia_cgi {
|
|||
print(" </td>\n");
|
||||
print(" <td valign='top' bgcolor='" . $colors->{title_bg_color} . "'>\n");
|
||||
}
|
||||
@riglim = @{setup_riglim($rigid[1], $limit[1])};
|
||||
undef(@tmp);
|
||||
undef(@tmpz);
|
||||
undef(@CDEF);
|
||||
|
@ -533,9 +538,7 @@ sub nvidia_cgi {
|
|||
"--vertical-label=Percent",
|
||||
"--width=$width",
|
||||
"--height=$height",
|
||||
"--upper-limit=100",
|
||||
"--lower-limit=0",
|
||||
"--rigid",
|
||||
@riglim,
|
||||
$zoom,
|
||||
@{$cgi->{version12}},
|
||||
@{$cgi->{version12_small}},
|
||||
|
@ -564,9 +567,7 @@ sub nvidia_cgi {
|
|||
"--vertical-label=Percent",
|
||||
"--width=$width",
|
||||
"--height=$height",
|
||||
"--upper-limit=100",
|
||||
"--lower-limit=0",
|
||||
"--rigid",
|
||||
@riglim,
|
||||
@{$cgi->{version12}},
|
||||
@{$cgi->{version12_small}},
|
||||
@{$colors->{graph_colors}},
|
||||
|
@ -598,6 +599,7 @@ sub nvidia_cgi {
|
|||
}
|
||||
}
|
||||
|
||||
@riglim = @{setup_riglim($rigid[2], $limit[2])};
|
||||
undef(@tmp);
|
||||
undef(@tmpz);
|
||||
undef(@CDEF);
|
||||
|
@ -647,9 +649,7 @@ sub nvidia_cgi {
|
|||
"--vertical-label=Percent",
|
||||
"--width=$width",
|
||||
"--height=$height",
|
||||
"--upper-limit=100",
|
||||
"--lower-limit=0",
|
||||
"--rigid",
|
||||
@riglim,
|
||||
@{$cgi->{version12}},
|
||||
$zoom,
|
||||
@{$cgi->{version12_small}},
|
||||
|
@ -678,9 +678,7 @@ sub nvidia_cgi {
|
|||
"--vertical-label=Percent",
|
||||
"--width=$width",
|
||||
"--height=$height",
|
||||
"--upper-limit=100",
|
||||
"--lower-limit=0",
|
||||
"--rigid",
|
||||
@riglim,
|
||||
@{$cgi->{version12}},
|
||||
@{$cgi->{version12_small}},
|
||||
@{$colors->{graph_colors}},
|
||||
|
|
Loading…
Reference in New Issue