[09/19] ovpnclients.dat: Display a notice if there are no entries.
Commit Message
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
html/cgi-bin/logs.cgi/ovpnclients.dat | 7 ++++++-
langs/en/cgi-bin/en.pl | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
@@ -293,8 +293,13 @@ while(my @row = $statement_handle->fetchrow_array()) {
# Increase lines count.
$lines++;
+}
- }
+# If nothing has been fetched, the amount of lines is still zero.
+# In this case display a hint about no data.
+unless ($lines) {
+ print "<tr><td bgcolor='$color{'color22'}' colspan='5' align='center'>$Lang::tr{'no entries'}</td></tr>\n";
+}
print "</table><br>\n";
@@ -1800,6 +1800,7 @@
'no alcatelusb firmware' => 'No Alcatel USB firmware. Please upload.',
'no cfg upload' => 'No data was uploaded',
'no dhcp lease' => 'No DHCP lease has been acquired',
+'no entries' => 'No entries at the moment.',
'no eciadsl synch.bin file' => 'No ECI ADSL synch.bin file. Please upload.',
'no filter pass' => 'Enter the standard class for non-filtered packets.',
'no fritzdsl driver' => 'No Fritz!DSL driver. Please upload.',