added new 'separated' visualization mode in 'squid.pm' #217

This commit is contained in:
Jordi Sanfeliu 2020-07-20 09:59:40 +02:00
parent c416002290
commit 031f6e3913
1 changed files with 20 additions and 4 deletions

View File

@ -1473,10 +1473,18 @@ sub squid_cgi {
push(@tmpz, "LINE1:B_in#00EE00");
if(lc($config->{netstats_in_bps}) eq "y") {
push(@CDEF, "CDEF:B_in=in,8,*");
push(@CDEF, "CDEF:B_out=out,8,*");
if(lc($config->{netstats_mode} || "") eq "separated") {
push(@CDEF, "CDEF:B_out=out,8,*,-1,*");
} else {
push(@CDEF, "CDEF:B_out=out,8,*");
}
} else {
push(@CDEF, "CDEF:B_in=in");
push(@CDEF, "CDEF:B_out=out");
if(lc($config->{netstats_mode} || "") eq "separated") {
push(@CDEF, "CDEF:B_out=out,-1,*");
} else {
push(@CDEF, "CDEF:B_out=out");
}
}
if(lc($config->{show_gaps}) eq "y") {
push(@tmp, "AREA:wrongdata#$colors->{gap}:");
@ -1572,10 +1580,18 @@ sub squid_cgi {
push(@tmpz, "LINE1:B_in#00EE00");
if(lc($config->{netstats_in_bps}) eq "y") {
push(@CDEF, "CDEF:B_in=in,8,*");
push(@CDEF, "CDEF:B_out=out,8,*");
if(lc($config->{netstats_mode} || "") eq "separated") {
push(@CDEF, "CDEF:B_out=out,8,*,-1,*");
} else {
push(@CDEF, "CDEF:B_out=out,8,*");
}
} else {
push(@CDEF, "CDEF:B_in=in");
push(@CDEF, "CDEF:B_out=out");
if(lc($config->{netstats_mode} || "") eq "separated") {
push(@CDEF, "CDEF:B_out=out,-1,*");
} else {
push(@CDEF, "CDEF:B_out=out");
}
}
if(lc($config->{show_gaps}) eq "y") {
push(@tmp, "AREA:wrongdata#$colors->{gap}:");