From fd9d25ad9d6975b6ab5a11cf3466b5e4b5b23c39 Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Thu, 28 May 2020 09:58:45 +0200 Subject: [PATCH] added the ability to change the size of the graphs in 'port.pm' --- lib/port.pm | 3 ++- man/man5/monitorix.conf.5 | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/port.pm b/lib/port.pm index b0c57c5..a528c4e 100644 --- a/lib/port.pm +++ b/lib/port.pm @@ -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"; diff --git a/man/man5/monitorix.conf.5 b/man/man5/monitorix.conf.5 index 7b275ed..e5b9b02 100644 --- a/man/man5/monitorix.conf.5 +++ b/man/man5/monitorix.conf.5 @@ -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)