log.dat: Add NUT entry for System Logs - Fixes bug#12921

Message ID 20220919131518.2779-1-adolf.belka@ipfire.org
State Accepted
Commit a15c20fde98a4ab34242dd3cefd9bbb890394188
Headers
Series log.dat: Add NUT entry for System Logs - Fixes bug#12921 |

Commit Message

Adolf Belka Sept. 19, 2022, 1:15 p.m. UTC
  - Also aligned all the code entries in %sections and %trsections

Suggested-by: Michael <ip.fire@die-fritzens.de>
Tested-by: Michael <ip.fire@die-fritzens.de>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 html/cgi-bin/logs.cgi/log.dat | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
  

Comments

Bernhard Bitsch Sept. 19, 2022, 1:21 p.m. UTC | #1
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>

Am 19.09.2022 um 15:15 schrieb Adolf Belka:
> - Also aligned all the code entries in %sections and %trsections
> 
> Suggested-by: Michael <ip.fire@die-fritzens.de>
> Tested-by: Michael <ip.fire@die-fritzens.de>
> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
> ---
>   html/cgi-bin/logs.cgi/log.dat | 14 ++++++++------
>   1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat
> index 20f61d4ea..5fb1fcd5d 100644
> --- a/html/cgi-bin/logs.cgi/log.dat
> +++ b/html/cgi-bin/logs.cgi/log.dat
> @@ -50,7 +50,7 @@ $cgiparams{'SECTION'} = 'ipfire';
>   
>   my %sections = (
>           'auth' => '(\w+\(pam_unix\)\[.*\]: )',
> -		'wio' => '(wio:|wio\[.*\])',
> +        'wio' => '(wio:|wio\[.*\])',
>           'captive' => '(Captive:)',
>           'clamav' => '(clamd\[.*\]: |freshclam\[.*\]: )',
>           'collectd' => '(collectd\[.*\]: )',
> @@ -65,11 +65,12 @@ my %sections = (
>           'kernel' => '(kernel: (?!DROP_))',
>           'monit' => '(monit\[.*?\]: )',
>           'ntp' => '(ntpd(?:ate)?\[.*\]: )',
> -	'oinkmaster' => '(oinkmaster\[.*\]: )',
> +        'nut' => '(upsmon\[.*?\]: )',
> +        'oinkmaster' => '(oinkmaster\[.*\]: )',
>           'openvpn' => '(openvpnserver\[.*\]: |.*n2n\[.*\]: )',
>           'pakfire' => '(pakfire:)',
>           'red' => '(red:|pppd\[.*\]: |chat\[.*\]|pppoe\[.*\]|pptp\[.*\]|pppoa\[.*\]|pppoa3\[.*\]|pppoeci\[.*\]|ipppd|ipppd\[.*\]|kernel: ippp\d|kernel: isdn.*|ibod\[.*\]|dhcpcd\[.*\]|modem_run\[.*\])',
> -	'samba' => '(nmbd|smbd|winbind)\[\d+\]:',
> +        'samba' => '(nmbd|smbd|winbind)\[\d+\]:',
>           'suricata' => '(suricata: )',
>           'squid' => '(squid\[.*\]: |squid: )',
>           'ssh' => '(sshd(?:\(.*\))?\[.*\]: )',
> @@ -81,7 +82,7 @@ my %sections = (
>   # Translations for the %sections array.
>   my %trsections = (
>           'auth' => "$Lang::tr{'loginlogout'}",
> -		'wio' => 'Who Is Online?',
> +        'wio' => 'Who Is Online?',
>           'captive' => $Lang::tr{'Captive'},
>           'clamav' => 'ClamAV',
>           'collectd' => 'Collectd',
> @@ -96,11 +97,12 @@ my %trsections = (
>           'kernel' => "$Lang::tr{'kernel'}",
>           'monit' => 'Monit',
>           'ntp' => 'NTP',
> -	'oinkmaster' => 'Oinkmaster',
> +        'nut' => 'NUT',
> +        'oinkmaster' => 'Oinkmaster',
>           'openvpn' => 'OpenVPN',
>           'pakfire' => 'Pakfire',
>           'red' => 'RED',
> -	'samba' => $Lang::tr{'samba'},
> +        'samba' => $Lang::tr{'samba'},
>           'suricata' => "$Lang::tr{'intrusion detection'}",
>           'squid' => "$Lang::tr{'web proxy'}",
>           'ssh' => 'SSH',
  

Patch

diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat
index 20f61d4ea..5fb1fcd5d 100644
--- a/html/cgi-bin/logs.cgi/log.dat
+++ b/html/cgi-bin/logs.cgi/log.dat
@@ -50,7 +50,7 @@  $cgiparams{'SECTION'} = 'ipfire';
 
 my %sections = (
         'auth' => '(\w+\(pam_unix\)\[.*\]: )',
-		'wio' => '(wio:|wio\[.*\])',
+        'wio' => '(wio:|wio\[.*\])',
         'captive' => '(Captive:)',
         'clamav' => '(clamd\[.*\]: |freshclam\[.*\]: )',
         'collectd' => '(collectd\[.*\]: )',
@@ -65,11 +65,12 @@  my %sections = (
         'kernel' => '(kernel: (?!DROP_))',
         'monit' => '(monit\[.*?\]: )',
         'ntp' => '(ntpd(?:ate)?\[.*\]: )',
-	'oinkmaster' => '(oinkmaster\[.*\]: )',
+        'nut' => '(upsmon\[.*?\]: )',
+        'oinkmaster' => '(oinkmaster\[.*\]: )',
         'openvpn' => '(openvpnserver\[.*\]: |.*n2n\[.*\]: )',
         'pakfire' => '(pakfire:)',
         'red' => '(red:|pppd\[.*\]: |chat\[.*\]|pppoe\[.*\]|pptp\[.*\]|pppoa\[.*\]|pppoa3\[.*\]|pppoeci\[.*\]|ipppd|ipppd\[.*\]|kernel: ippp\d|kernel: isdn.*|ibod\[.*\]|dhcpcd\[.*\]|modem_run\[.*\])',
-	'samba' => '(nmbd|smbd|winbind)\[\d+\]:',
+        'samba' => '(nmbd|smbd|winbind)\[\d+\]:',
         'suricata' => '(suricata: )',
         'squid' => '(squid\[.*\]: |squid: )',
         'ssh' => '(sshd(?:\(.*\))?\[.*\]: )',
@@ -81,7 +82,7 @@  my %sections = (
 # Translations for the %sections array.
 my %trsections = (
         'auth' => "$Lang::tr{'loginlogout'}",
-		'wio' => 'Who Is Online?',
+        'wio' => 'Who Is Online?',
         'captive' => $Lang::tr{'Captive'},
         'clamav' => 'ClamAV',
         'collectd' => 'Collectd',
@@ -96,11 +97,12 @@  my %trsections = (
         'kernel' => "$Lang::tr{'kernel'}",
         'monit' => 'Monit',
         'ntp' => 'NTP',
-	'oinkmaster' => 'Oinkmaster',
+        'nut' => 'NUT',
+        'oinkmaster' => 'Oinkmaster',
         'openvpn' => 'OpenVPN',
         'pakfire' => 'Pakfire',
         'red' => 'RED',
-	'samba' => $Lang::tr{'samba'},
+        'samba' => $Lang::tr{'samba'},
         'suricata' => "$Lang::tr{'intrusion detection'}",
         'squid' => "$Lang::tr{'web proxy'}",
         'ssh' => 'SSH',