added the ability to change the size of the graphs in 'port.pm'

This commit is contained in:
Jordi Sanfeliu 2020-05-28 09:58:45 +02:00
parent 891f8477ac
commit fd9d25ad9d
2 changed files with 9 additions and 1 deletions

View File

@ -622,7 +622,8 @@ sub port_cgi {
push(@tmpz, "AREA:wrongdata#$colors->{gap}:");
push(@CDEF, "CDEF:wrongdata=allvalues,UN,INF,UNKN,IF");
}
($width, $height) = split('x', $config->{graph_size}->{mini});
$port->{size} = "mini" if !defined($port->{size});
($width, $height) = split('x', $config->{graph_size}->{$port->{size}});
if($silent =~ /imagetag/) {
($width, $height) = split('x', $config->{graph_size}->{remote}) if $silent eq "imagetag";
($width, $height) = split('x', $config->{graph_size}->{main}) if $silent eq "imagetagbig";

View File

@ -2110,6 +2110,13 @@ This is the number of graphs that will be put in a row. Consider the interaction
.P
Default value: \fI3\fP
.RE
.P
.BI size
.RS
This is the size of the graphs of the ports. It currently accepts up to 8 different size names: \fImain\fP, \fImedium\fP, \fImedium2\fP, \fIsmall\fP, \fImini\fP, \fItiny\fP, \fIzoom\fP and \fIremote\fP. You can check the resolution of each size in the configuration file, inside the list named \fBgraph_size\fP.
.P
Default value: \fImini\fP
.RE
.SS Users using the system (user.pm)
Only the limit and rigid values can be set here.
.SS FTP statistics (ftp.pm)