vnstat-dashboard
vnstat-dashboard copied to clipboard
interface names under title should reflect config.php
If I define friendly names for interfaces in config.php
, the page main title shows that name in brackets, but the interface names below -- the clickable links, still show the raw names. They should show the friendly names.
Hi @brianjmurrell
Can you confirm that $use_predefined_interfaces is set to false?
Could you perhaps post your config.php?
Thanks.
Can you confirm that $use_predefined_interfaces is set to false?
false
? The comment says: // Set to true to set your own interfaces
and the code says:
if ($use_predefined_interfaces == true) {
$interface_list = ["eth0", "eth1", "tun0", "6to4", "sit0"];
$interface_name['eth0'] = "Internet";
$interface_name['eth1'] = "LAN";
$interface_name['tun0'] = "VPN";
} else {
$interface_list = getVnstatInterfaces($vnstat_bin_dir);
foreach ($interface_list as $interface) {
$interface_name[$interface] = $interface;
}
}
So my $interface_name[*]
s are only being used when $use_predefined_interfaces == true
.
What am I misunderstanding?
Ah, OK I understand what you mean - that's a fair point.
In your case would you rather the link say:
- eth0 (Internet)
- Internet
- some other variant
I think we agree. What I have currently is:
Network Traffic (Internet) eth0, eth1, tun0, 6to4, sit0
It should be
Network Traffic (Internet) Internet, LAN, VPN, 6to4, sit0