-
-
- |
-
-
-
- |
-
-
-END
-
-&Header::closebox();
-
-&Header::openbox('100%', 'left', "$Lang::tr{'traffics'}");
+&Header::openbox('100%', 'center', "$Lang::tr{'traffics'}");
-my $dateWidth = '20%';
-my $netWidth = '34%';
-my $inOutWidth = '17%';
+# Display internal network
+display_vnstat($netsettings{'GREEN_DEV'});
-# 4 networks
-if ($netsettings{'CONFIG_TYPE'} =~ /^(4)$/) {
- $dateWidth = '12%';
- $netWidth = '22%';
- $inOutWidth = '11%';
+# Display external network / check if it is PPP or ETH
+# and dont display if RED_DEV=GREEN_DEV (green only mode)
+if ($netsettings{'RED_TYPE'} ne 'PPPOE') {
+ if ($netsettings{'RED_DEV'} ne $netsettings{'GREEN_DEV'}) {
+ display_vnstat($netsettings{'RED_DEV'});
+ }
+} else {
+ display_vnstat("ppp0");
}
-# 3 networks
-if ($netsettings{'CONFIG_TYPE'} =~ /^(2|3)$/) {
- $dateWidth = '16%';
- $netWidth = '28%';
- $inOutWidth = '14%';
-}
-
-print <