This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".
The branch, next has been updated
via 9207afd8832f5245c566518fdb8264e15d79ad69 (commit)
via d7eb312d0ff6be1dcb1ca98f76233db71709981f (commit)
via 17ef83f2232d6d495b69e944aeeaf85ac17e3db6 (commit)
via ba8a6d83bdb0e6874c09e0d20317ba94170decd0 (commit)
via a561a1d866459971875922bd718b3e9bdde794d5 (commit)
via cc0304b7bdbd339f37c156bbc5a53ae1c0b64956 (commit)
via 590dcf8703dc0931f1ca9ca5056428db6f3d9465 (commit)
via 0a8800657dab08d94f00a27407c595a1799ab3d2 (commit)
via 9984ed3d5af9a0170f196545f7a2bccd4204fb16 (commit)
via 828f2bdd44047581dd6f0b3480d6a9bb70ebcdb6 (commit)
via 3fb7849c210958e94541ec5061f7b668eaa93fb9 (commit)
via 234fd050d44ccaede71194255db38bc759e6f53f (commit)
from 8ead2ddf3d0f1521c2a99b509373615f77a754a0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9207afd8832f5245c566518fdb8264e15d79ad69
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Aug 21 16:17:22 2024 +0200
core188: Ship lang.pl
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit d7eb312d0ff6be1dcb1ca98f76233db71709981f
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Aug 21 16:14:40 2024 +0200
guardian.cgi: Use the new service widget
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit 17ef83f2232d6d495b69e944aeeaf85ac17e3db6
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Aug 21 16:02:42 2024 +0200
header.pl: Fix language loading
We have been importing the language files many times when they are
actually rather slow. This just tidies this up.
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit ba8a6d83bdb0e6874c09e0d20317ba94170decd0
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Aug 21 16:02:13 2024 +0200
header.pl: Remove an unused variable
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit a561a1d866459971875922bd718b3e9bdde794d5
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Aug 21 16:01:40 2024 +0200
lang.pl: Fix all sorts of whitespace issues
No functional changes.
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit cc0304b7bdbd339f37c156bbc5a53ae1c0b64956
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Aug 21 15:47:08 2024 +0200
index.cgi: Improve the warning box
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit 590dcf8703dc0931f1ca9ca5056428db6f3d9465
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Aug 21 15:25:13 2024 +0200
samba.cgi: Fix styling of the configuration form
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit 0a8800657dab08d94f00a27407c595a1799ab3d2
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Aug 21 15:20:51 2024 +0200
samba.cgi: Use the new service status widget
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit 9984ed3d5af9a0170f196545f7a2bccd4204fb16
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Aug 21 15:11:59 2024 +0200
firewall.cgi: Fix messy table striping
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit 828f2bdd44047581dd6f0b3480d6a9bb70ebcdb6
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Aug 21 12:35:55 2024 +0200
CSS: Make the black less agressive
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit 3fb7849c210958e94541ec5061f7b668eaa93fb9
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Aug 21 12:24:24 2024 +0200
services.cgi: Search for suricata by its PID
suricata renames itself and therefore we cannot find the process by its
name.
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit 234fd050d44ccaede71194255db38bc759e6f53f
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Aug 21 12:22:40 2024 +0200
vpnmain.cgi: Fix colouring of the connection status when disconnected
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
-----------------------------------------------------------------------
Summary of changes:
config/cfgroot/header.pl | 53 ++++-----
config/cfgroot/lang.pl | 66 ++++++-----
config/rootfiles/core/188/filelists/files | 1 +
doc/language_issues.de | 1 +
doc/language_issues.en | 2 +-
doc/language_issues.es | 2 +
doc/language_issues.fr | 2 +
doc/language_issues.it | 2 +
doc/language_issues.nl | 2 +
doc/language_issues.pl | 2 +
doc/language_issues.ru | 2 +
doc/language_issues.tr | 2 +
doc/language_missings | 7 ++
html/cgi-bin/firewall.cgi | 29 ++---
html/cgi-bin/guardian.cgi | 115 +++----------------
html/cgi-bin/index.cgi | 14 +--
html/cgi-bin/samba.cgi | 153 +++++++++-----------------
html/cgi-bin/services.cgi | 2 +-
html/cgi-bin/vpnmain.cgi | 8 +-
html/html/themes/ipfire/include/css/style.css | 53 +++++++--
langs/de/cgi-bin/de.pl | 1 +
langs/en/cgi-bin/en.pl | 1 +
22 files changed, 206 insertions(+), 314 deletions(-)
Difference in files:
diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl
index 4b7672efb..a90a6f481 100644
--- a/config/cfgroot/header.pl
+++ b/config/cfgroot/header.pl
@@ -104,45 +104,14 @@ if ($ENV{'SERVER_ADDR'} && $ENV{'HTTPS'} ne 'on') {
### Initialize environment
&General::readhash("${swroot}/main/settings", \%settings);
$hostname = $settings{'HOSTNAME'};
-$hostnameintitle = 0;
### Initialize language
require "${swroot}/lang.pl";
-$language = &Lang::FindWebLanguage($settings{"LANGUAGE"});
-
-### Read English Files
-if ( -d "/var/ipfire/langs/en/" ) {
- opendir(DIR, "/var/ipfire/langs/en/");
- @names = readdir(DIR) or die "Cannot Read Directory: $!\n";
- foreach $name(@names) {
- next if ($name eq ".");
- next if ($name eq "..");
- next if (!($name =~ /\.pl$/));
- require "${swroot}/langs/en/${name}";
- };
-};
-
-
-### Enable Language Files
-if ( -d "/var/ipfire/langs/${language}/" ) {
- opendir(DIR, "/var/ipfire/langs/${language}/");
- @names = readdir(DIR) or die "Cannot Read Directory: $!\n";
- foreach $name(@names) {
- next if ($name eq ".");
- next if ($name eq "..");
- next if (!($name =~ /\.pl$/));
- require "${swroot}/langs/${language}/${name}";
- };
-};
### Initialize user manual
my %manualpages = ();
&_read_manualpage_hash("${General::swroot}/main/manualpages");
-### Load selected language and theme functions
-require "${swroot}/langs/en.pl";
-require "${swroot}/langs/${language}.pl";
-
###############################################################################
#
# print menu html elements for submenu entries
@@ -220,7 +189,7 @@ sub openpage {
print <<END;
<!DOCTYPE html>
-<html lang="$language">
+<html lang="$Lang::language">
<head>
<title>$headline - $title</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
@@ -405,6 +374,26 @@ sub errorbox($) {
&closebox();
}
+sub warningbox($) {
+ my @warnings = grep { $_ ne "" } @_;
+
+ # Do nothing if there are no errors
+ return unless (@warnings);
+
+ # Open a new box
+ &openbox('100%', 'left', $Lang::tr{'warning'}, "is-warning");
+
+ # Print all warning messages
+ print "<ul>\n";
+ foreach my $warning (@warnings) {
+ print "<li>$warning</li>\n";
+ }
+ print "</ul>\n";
+
+ # Close the box again
+ &closebox();
+}
+
sub graph($) {
my $title = shift;
diff --git a/config/cfgroot/lang.pl b/config/cfgroot/lang.pl
index 2b09c4a9f..4e39cd8da 100644
--- a/config/cfgroot/lang.pl
+++ b/config/cfgroot/lang.pl
@@ -9,7 +9,7 @@
#
package Lang;
-require 'CONFIG_ROOT/general-functions.pl';
+require '/var/ipfire/general-functions.pl';
use strict;
### A cache file to avoid long recalculation
@@ -25,7 +25,7 @@ $Lang::CacheLang = '/var/ipfire/langs/cache-lang.pl';
# The file content has to start with (of course without the leading #):
# --------- CODE ---------
#%tr = (%tr,
-# 'key1' => 'value', # add all your entries key/values here
+# 'key1' => 'value', # add all your entries key/values here
# 'key2' => 'value' # and end with (of course without the leading #):
#);
# --------- CODE END---------
@@ -37,13 +37,14 @@ $Lang::CacheLang = '/var/ipfire/langs/cache-lang.pl';
### Initialize language
%Lang::tr = ();
+
my %settings = ();
&General::readhash("${General::swroot}/main/settings", \%settings);
+
+# Load the selected language
reload($settings{'LANGUAGE'});
-# language variable used by makegraphs script
-our $language;
-$language = $settings{'LANGUAGE'};
+our $language = $settings{'LANGUAGE'};
#
# Load requested language file from cachefile. If cachefile doesn't exist, build on the fly.
@@ -54,35 +55,32 @@ sub reload {
%Lang::tr = (); # start with a clean array
- # Use CacheLang if present & not empty.
- if (-s "$Lang::CacheLang.$LG" ) {
- ##fix: need to put a lock_shared on it in case rebuild is active ?
- do "$Lang::CacheLang.$LG";
- #&General::log ("cachelang file used [$LG]");
- return;
- }
-
- #&General::log("Building on the fly cachelang file for [$LG]");
- do "${General::swroot}/langs/en.pl";
- do "${General::swroot}/langs/$LG.pl" if ($LG ne 'en');
+ # Use CacheLang if present & not empty.
+ if (-s "$Lang::CacheLang.$LG" ) {
+ do "$Lang::CacheLang.$LG";
+ return;
+ }
- my $AddonDir = ${General::swroot}.'/addon-lang';
+ do "${General::swroot}/langs/en.pl";
+ do "${General::swroot}/langs/$LG.pl" if ($LG ne 'en');
- opendir (DIR, $AddonDir);
- my @files = readdir (DIR);
- closedir (DIR);
+ my $AddonDir = ${General::swroot}.'/addon-lang';
+
+ opendir (DIR, $AddonDir);
+ my @files = readdir (DIR);
+ closedir (DIR);
# default is to load english first
- foreach my $file ( grep (/.*\.en.pl$/,@files)) {
- do "$AddonDir/$file";
- }
+ foreach my $file ( grep (/.*\.en.pl$/,@files)) {
+ do "$AddonDir/$file";
+ }
- # read again, overwriting 'en' with choosed lang
- if ($LG ne 'en') {
- foreach my $file (grep (/.*\.$LG\.pl$/,@files) ) {
- do "$AddonDir/$file";
+ # read again, overwriting 'en' with choosed lang
+ if ($LG ne 'en') {
+ foreach my $file (grep (/.*\.$LG\.pl$/,@files)) {
+ do "$AddonDir/$file";
+ }
}
- }
}
#
@@ -93,7 +91,7 @@ sub reload {
sub BuildUniqueCacheLang {
my ($LG) = @_;
-
+
# Make CacheLang empty so that it won't be used by Lang::reload
open (FILE, ">$Lang::CacheLang.$LG") or return 1;
flock (FILE, 2) or return 1;
@@ -101,7 +99,7 @@ sub BuildUniqueCacheLang {
# Load languages files
&Lang::reload ($LG);
-
+
# Write the unique %tr=('key'=>'value') array
open (FILE, ">$Lang::CacheLang.$LG") or return 1;
flock (FILE, 2) or return 1;
@@ -112,7 +110,7 @@ sub BuildUniqueCacheLang {
}
print FILE ');';
close (FILE);
-
+
# Make nobody:nobody file's owner
# Will work when called by root/rc.sysinit
chown (0,0,"$Lang::CacheLang.$LG");
@@ -126,7 +124,7 @@ sub BuildUniqueCacheLang {
sub BuildCacheLang {
my $AddonDir = ${General::swroot}.'/addon-lang';
-
+
# Correct permission in case addon-installer did not do it
opendir (DIR, $AddonDir);
my @files = readdir (DIR);
@@ -140,7 +138,7 @@ sub BuildCacheLang {
my $selected = '';;
my $missed = '';
my $error = 0;
-
+
open (LANGS, "${General::swroot}/langs/list");
while (<LANGS>) {
($selected) = split (':');
@@ -153,7 +151,7 @@ sub BuildCacheLang {
if ($missed) { # collision with current cache lang being used ?
$error = &BuildUniqueCacheLang ($missed);
}
-
+
&General::log ("WARNING: cannot build cachelang file for [$missed].") if ($error);
return $error;
}
diff --git a/config/rootfiles/core/188/filelists/files b/config/rootfiles/core/188/filelists/files
index 702deefc1..05235c2f4 100644
--- a/config/rootfiles/core/188/filelists/files
+++ b/config/rootfiles/core/188/filelists/files
@@ -13,4 +13,5 @@ var/ipfire/backup/bin/backup.pl
var/ipfire/general-functions.pl
var/ipfire/graphs.pl
var/ipfire/header.pl
+var/ipfire/lang.pl
var/ipfire/network-functions.pl
diff --git a/doc/language_issues.de b/doc/language_issues.de
index bdedb13c5..3241f8dea 100644
--- a/doc/language_issues.de
+++ b/doc/language_issues.de
@@ -113,6 +113,7 @@ WARNING: translation string unused: age ssecond
WARNING: translation string unused: alcatelusb help
WARNING: translation string unused: alcatelusb upload
WARNING: translation string unused: all interfaces
+WARNING: translation string unused: all services
WARNING: translation string unused: all updates installed
WARNING: translation string unused: allmsg
WARNING: translation string unused: alt information
diff --git a/doc/language_issues.en b/doc/language_issues.en
index e196bd640..a1a1e15dd 100644
--- a/doc/language_issues.en
+++ b/doc/language_issues.en
@@ -313,7 +313,6 @@ WARNING: untranslated string: aliases = Aliases
WARNING: untranslated string: aliases default interface = - Default Interface -
WARNING: untranslated string: aliases not active = Aliases will not be active unless your RED interface is STATIC
WARNING: untranslated string: all = All
-WARNING: untranslated string: all services = All Services
WARNING: untranslated string: alt dialup = Dialup
WARNING: untranslated string: alt home = Home
WARNING: untranslated string: alt logs = Logs
@@ -2148,6 +2147,7 @@ WARNING: untranslated string: vpn weak = Weak
WARNING: untranslated string: vulnerability = Vulnerability
WARNING: untranslated string: vulnerable = Vulnerable
WARNING: untranslated string: waiting to synchronize clock = Waiting to synchronize clock
+WARNING: untranslated string: warning = Warning
WARNING: untranslated string: warning messages = Warning messages
WARNING: untranslated string: was deleted = was deleted
WARNING: untranslated string: web hits = Total number of websites matching selected criteria for
diff --git a/doc/language_issues.es b/doc/language_issues.es
index 4ff53b155..42652aea6 100644
--- a/doc/language_issues.es
+++ b/doc/language_issues.es
@@ -115,6 +115,7 @@ WARNING: translation string unused: age ssecond
WARNING: translation string unused: alcatelusb help
WARNING: translation string unused: alcatelusb upload
WARNING: translation string unused: all interfaces
+WARNING: translation string unused: all services
WARNING: translation string unused: all updates installed
WARNING: translation string unused: allmsg
WARNING: translation string unused: alt information
@@ -1053,6 +1054,7 @@ WARNING: untranslated string: spec rstack overflow = Speculative Return Stack Ov
WARNING: untranslated string: system time = System Time (as of last page load)
WARNING: untranslated string: timeformat = %Y-%m-%d at %H:%M:%S %Z
WARNING: untranslated string: transport mode does not support vti = VTI is not support in transport mode
+WARNING: untranslated string: warning = Warning
WARNING: untranslated string: wio = unknown string
WARNING: untranslated string: wio checked = unknown string
WARNING: untranslated string: wio cron = unknown string
diff --git a/doc/language_issues.fr b/doc/language_issues.fr
index c21cb0067..212f2abb7 100644
--- a/doc/language_issues.fr
+++ b/doc/language_issues.fr
@@ -118,6 +118,7 @@ WARNING: translation string unused: age ssecond
WARNING: translation string unused: alcatelusb help
WARNING: translation string unused: alcatelusb upload
WARNING: translation string unused: all interfaces
+WARNING: translation string unused: all services
WARNING: translation string unused: all updates installed
WARNING: translation string unused: allmsg
WARNING: translation string unused: alt information
@@ -991,6 +992,7 @@ WARNING: untranslated string: routing config added = unknown string
WARNING: untranslated string: routing config changed = unknown string
WARNING: untranslated string: system time = System Time (as of last page load)
WARNING: untranslated string: timeformat = %Y-%m-%d at %H:%M:%S %Z
+WARNING: untranslated string: warning = Warning
WARNING: untranslated string: wio = unknown string
WARNING: untranslated string: wio checked = unknown string
WARNING: untranslated string: wio cron = unknown string
diff --git a/doc/language_issues.it b/doc/language_issues.it
index 9974b34f3..d5e7b3e89 100644
--- a/doc/language_issues.it
+++ b/doc/language_issues.it
@@ -88,6 +88,7 @@ WARNING: translation string unused: age ssecond
WARNING: translation string unused: alcatelusb help
WARNING: translation string unused: alcatelusb upload
WARNING: translation string unused: all interfaces
+WARNING: translation string unused: all services
WARNING: translation string unused: all updates installed
WARNING: translation string unused: allmsg
WARNING: translation string unused: alt information
@@ -1341,6 +1342,7 @@ WARNING: untranslated string: vpn wait = WAITING
WARNING: untranslated string: vpn weak = Weak
WARNING: untranslated string: vulnerability = Vulnerability
WARNING: untranslated string: vulnerable = Vulnerable
+WARNING: untranslated string: warning = Warning
WARNING: untranslated string: whois results from = WHOIS results from
WARNING: untranslated string: winbind daemon = Winbind Daemon
WARNING: untranslated string: wio = unknown string
diff --git a/doc/language_issues.nl b/doc/language_issues.nl
index 452dd5b33..607bfc9f1 100644
--- a/doc/language_issues.nl
+++ b/doc/language_issues.nl
@@ -88,6 +88,7 @@ WARNING: translation string unused: age ssecond
WARNING: translation string unused: alcatelusb help
WARNING: translation string unused: alcatelusb upload
WARNING: translation string unused: all interfaces
+WARNING: translation string unused: all services
WARNING: translation string unused: all updates installed
WARNING: translation string unused: allmsg
WARNING: translation string unused: alt information
@@ -1364,6 +1365,7 @@ WARNING: untranslated string: vpn wait = WAITING
WARNING: untranslated string: vpn weak = Weak
WARNING: untranslated string: vulnerability = Vulnerability
WARNING: untranslated string: vulnerable = Vulnerable
+WARNING: untranslated string: warning = Warning
WARNING: untranslated string: whois results from = WHOIS results from
WARNING: untranslated string: winbind daemon = Winbind Daemon
WARNING: untranslated string: wio = unknown string
diff --git a/doc/language_issues.pl b/doc/language_issues.pl
index 8afc26cab..d6fbb79cf 100644
--- a/doc/language_issues.pl
+++ b/doc/language_issues.pl
@@ -83,6 +83,7 @@ WARNING: translation string unused: again
WARNING: translation string unused: alcatelusb help
WARNING: translation string unused: alcatelusb upload
WARNING: translation string unused: all interfaces
+WARNING: translation string unused: all services
WARNING: translation string unused: all updates installed
WARNING: translation string unused: allmsg
WARNING: translation string unused: alt information
@@ -1605,6 +1606,7 @@ WARNING: untranslated string: vpn wait = WAITING
WARNING: untranslated string: vpn weak = Weak
WARNING: untranslated string: vulnerability = Vulnerability
WARNING: untranslated string: vulnerable = Vulnerable
+WARNING: untranslated string: warning = Warning
WARNING: untranslated string: whois results from = WHOIS results from
WARNING: untranslated string: winbind daemon = Winbind Daemon
WARNING: untranslated string: wio = unknown string
diff --git a/doc/language_issues.ru b/doc/language_issues.ru
index 3719cd63a..6b7253718 100644
--- a/doc/language_issues.ru
+++ b/doc/language_issues.ru
@@ -83,6 +83,7 @@ WARNING: translation string unused: again
WARNING: translation string unused: alcatelusb help
WARNING: translation string unused: alcatelusb upload
WARNING: translation string unused: all interfaces
+WARNING: translation string unused: all services
WARNING: translation string unused: all updates installed
WARNING: translation string unused: allmsg
WARNING: translation string unused: alt information
@@ -1598,6 +1599,7 @@ WARNING: untranslated string: vpn wait = WAITING
WARNING: untranslated string: vpn weak = Weak
WARNING: untranslated string: vulnerability = Vulnerability
WARNING: untranslated string: vulnerable = Vulnerable
+WARNING: untranslated string: warning = Warning
WARNING: untranslated string: whois results from = WHOIS results from
WARNING: untranslated string: winbind daemon = Winbind Daemon
WARNING: untranslated string: wio = unknown string
diff --git a/doc/language_issues.tr b/doc/language_issues.tr
index 5d5c13cf8..df9eb58bb 100644
--- a/doc/language_issues.tr
+++ b/doc/language_issues.tr
@@ -110,6 +110,7 @@ WARNING: translation string unused: age ssecond
WARNING: translation string unused: alcatelusb help
WARNING: translation string unused: alcatelusb upload
WARNING: translation string unused: all interfaces
+WARNING: translation string unused: all services
WARNING: translation string unused: all updates installed
WARNING: translation string unused: allmsg
WARNING: translation string unused: alt information
@@ -1225,6 +1226,7 @@ WARNING: untranslated string: vpn subjectaltname missing = SubjectAlternativeNam
WARNING: untranslated string: vpn wait = WAITING
WARNING: untranslated string: vulnerability = Vulnerability
WARNING: untranslated string: vulnerable = Vulnerable
+WARNING: untranslated string: warning = Warning
WARNING: untranslated string: whois results from = WHOIS results from
WARNING: untranslated string: winbind daemon = Winbind Daemon
WARNING: untranslated string: wio = unknown string
diff --git a/doc/language_missings b/doc/language_missings
index de2217c60..98856b0e8 100644
--- a/doc/language_missings
+++ b/doc/language_missings
@@ -155,6 +155,7 @@
< system time
< timeformat
< transport mode does not support vti
+< warning
< wireguard
< wlanap
< wlanap psk
@@ -183,6 +184,7 @@
< system time
< timeformat
< upload fcdsl.o
+< warning
< wireguard
< wlanap psk
< wlanap wireless mode
@@ -664,6 +666,7 @@
< vpn weak
< vulnerability
< vulnerable
+< warning
< Weekly
< whois results from
< winbind daemon
@@ -1224,6 +1227,7 @@
< vpn weak
< vulnerability
< vulnerable
+< warning
< Weekly
< whois results from
< winbind daemon
@@ -2199,6 +2203,7 @@
< vpn weak
< vulnerability
< vulnerable
+< warning
< Weekly
< whois results from
< winbind daemon
@@ -3210,6 +3215,7 @@
< vpn weak
< vulnerability
< vulnerable
+< warning
< week-graph
< Weekly
< whois results from
@@ -3600,6 +3606,7 @@
< vpn wait
< vulnerability
< vulnerable
+< warning
< Weekly
< whois results from
< winbind daemon
diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi
index 6d983cb23..e87a7fed0 100644
--- a/html/cgi-bin/firewall.cgi
+++ b/html/cgi-bin/firewall.cgi
@@ -2484,7 +2484,8 @@ sub viewtablenew
&General::readhasharray("$configsrvgrp", \%customservicegrp);
&Header::openbox('100%', 'left', $title);
- print "<table width='100%' cellspacing='0' class='tbl'>";
+
+ print "<table class='tbl'>";
if (! -z $config) {
my $count=0;
@@ -2581,19 +2582,20 @@ END
}
$$hash{'ACTIVE'}=$$hash{$key}[2];
$count++;
- if($coloryellow eq 'on'){
- $color="$color{'color14'}";
+
+ if ($coloryellow eq 'on') {
+ $color="is-warning";
$coloryellow='';
- }elsif($coloryellow eq ''){
- if ($count % 2){
- $color="$color{'color22'}";
- }
- else{
- $color="$color{'color20'}";
+ } elsif($coloryellow eq '') {
+ if ($count % 2) {
+ $color="is-even";
+ } else {
+ $color="is-odd";
}
}
+
print<<END;
- <tr bgcolor='$color'>
+ <tr class="$color">
END
#RULETYPE (A,R,D)
@@ -2851,9 +2853,8 @@ END
#REMARK
if ($optionsfw{'SHOWREMARK'} eq 'on' && $$hash{$key}[16] ne ''){
print <<END;
- <tr bgcolor='$color'>
- <td> </td>
- <td bgcolor='$rulecolor'></td>
+ <tr class="$color">
+ <td class='$rulecolor'></td>
<td colspan='10'>
<em>$$hash{$key}[16]</em>
</td>
@@ -2874,7 +2875,7 @@ END
if($$hash{$key}[25] ne ''){push (@days,$Lang::tr{'fwdfw wd_sun'});}
my $weekdays=join(",",@days);
if (@days){
- print"<tr bgcolor='$color'>";
+ print"<tr class='$color'>";
print"<td> </td><td bgcolor='$rulecolor'></td><td align='left' colspan='10'> $weekdays $$hash{$key}[26] - $$hash{$key}[27]</td></tr>";
}
}
diff --git a/html/cgi-bin/guardian.cgi b/html/cgi-bin/guardian.cgi
index 8ffe57f11..9441ac53b 100644
--- a/html/cgi-bin/guardian.cgi
+++ b/html/cgi-bin/guardian.cgi
@@ -93,10 +93,6 @@ my $errormessage = '';
# Get GUI values.
&Header::getcgihash(\%settings);
-# Check if guardian is running and grab some stats.
-&daemonstats();
-my $pid = $pid[0];
-
## Perform input checks and save settings.
#
if ($settings{'ACTION'} eq $Lang::tr{'save'}) {
@@ -191,11 +187,8 @@ if ($settings{'ACTION'} eq $Lang::tr{'save'}) {
&GenerateIgnoreFile();
}
- # Check if guardian is running.
- if ($pid > 0) {
- # Send reload command through socket connection.
- &Guardian::Socket::Client("reload-ignore-list");
- }
+ # Send reload command through socket connection.
+ &Guardian::Socket::Client("reload-ignore-list");
## Toggle Enabled/Disabled for an existing entry on the ignore list.
#
@@ -233,11 +226,8 @@ if ($settings{'ACTION'} eq $Lang::tr{'save'}) {
# Regenerate the ignore file.
&GenerateIgnoreFile();
- # Check if guardian is running.
- if ($pid > 0) {
- # Send reload command through socket connection.
- &Guardian::Socket::Client("reload-ignore-list");
- }
+ # Send reload command through socket connection.
+ &Guardian::Socket::Client("reload-ignore-list");
}
## Remove entry from ignore list.
@@ -260,11 +250,8 @@ if ($settings{'ACTION'} eq $Lang::tr{'save'}) {
# Regenerate the ignore file.
&GenerateIgnoreFile();
- # Check if guardian is running.
- if ($pid > 0) {
- # Send reload command through socket connection.
- &Guardian::Socket::Client("reload-ignore-list");
- }
+ # Send reload command through socket connection.
+ &Guardian::Socket::Client("reload-ignore-list");
## Block a user given address or subnet.
#
@@ -355,11 +342,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'save'}) {
# Call functions to generate whole page.
&showMainBox();
&showIgnoreBox();
-
-# Display area only if guardian is running.
-if ( ($memory != 0) && ($pid > 0) ) {
- &showBlockedBox();
-}
+&showBlockedBox();
# Function to display the status of guardian and allow base configuration.
sub showMainBox() {
@@ -437,54 +420,15 @@ sub showMainBox() {
</script>
END
+ &Header::opensection();
+ &Header::ServiceStatus({
+ $Lang::tr{'guardian service'} => {
+ "process" => "guardian",
+ }
+ });
- # Draw current guardian state.
- &Header::openbox('100%', 'center', $Lang::tr{'guardian'});
-
- # Get current status of guardian.
- &daemonstats();
- $pid = $pid[0];
-
- # Display some useful information related to guardian, if daemon is running.
- if ( ($memory != 0) && ($pid > 0) ){
- print <<END;
- <table width='95%' cellspacing='0' class='tbl'>
- <tr>
- <th bgcolor='$color{'color20'}' colspan='3' align='left'><strong>$Lang::tr{'guardian service'}</strong></th>
- </tr>
- <tr>
- <td class='base'>$Lang::tr{'guardian daemon'}</td>
- <td align='center' colspan='2' width='75%' bgcolor='${Header::colourgreen}'><font color='white'><strong>$Lang::tr{'running'}</strong></font></td>
- </tr>
- <tr>
- <td class='base'></td>
- <td bgcolor='$color{'color20'}' align='center'><strong>PID</strong></td>
- <td bgcolor='$color{'color20'}' align='center'><strong>$Lang::tr{'memory'}</strong></td>
- </tr>
- <tr>
- <td class='base'></td>
- <td bgcolor='$color{'color22'}' align='center'>$pid</td>
- <td bgcolor='$color{'color22'}' align='center'>$memory KB</td>
- </tr>
- </table>
-END
- } else {
- # Otherwise display a hint that the service is not launched.
- print <<END;
- <table width='95%' cellspacing='0' class='tbl'>
- <tr>
- <th bgcolor='$color{'color20'}' colspan='3' align='left'><strong>$Lang::tr{'guardian service'}</strong></th>
- </tr>
- <tr>
- <td class='base'>$Lang::tr{'guardian daemon'}</td>
- <td align='center' width='75%' bgcolor='${Header::colourred}'><font color='white'><strong>$Lang::tr{'stopped'}</strong></font></td>
- </tr>
- </table>
-END
- }
-
- &Header::closebox();
+ &Header::closesection();
# Draw elements for guardian configuration.
&Header::openbox('100%', 'center', $Lang::tr{'guardian configuration'});
@@ -801,29 +745,6 @@ END
&Header::closebigbox();
&Header::closepage();
-# Function to check if guardian has been started.
-# Grab process id and consumed memory if the daemon is running.
-sub daemonstats() {
- $memory = 0;
- # for pid and memory
- open(FILE, '/usr/local/bin/addonctrl guardian status | ');
- @guardian = <FILE>;
- close(FILE);
- $string = join("", @guardian);
- $string =~ s/[a-z_]//gi;
- $string =~ s/\[[0-1]\;[0-9]+//gi;
- $string =~ s/[\(\)\.]//gi;
- $string =~ s/ //gi;
- $string =~ s/\e//gi;
- @pid = split(/\s/,$string);
- if (open(FILE, "/proc/$pid[0]/statm")){
- my $temp = <FILE>;
- @memory = split(/ /,$temp);
- close(FILE);
- }
- $memory+=$memory[0];
-}
-
sub GetBlockedHosts() {
# Create new, empty array.
my @hosts;
@@ -935,13 +856,7 @@ sub BuildConfiguration() {
# Check if guardian should be started or stopped.
if($settings{'GUARDIAN_ENABLED'} eq 'on') {
- if($pid > 0) {
- # Send reload command through socket connection.
- &Guardian::Socket::Client("reload");
- } else {
- # Launch guardian.
- &General::system("/usr/local/bin/addonctrl", "guardian", "start");
- }
+ &General::system("/usr/local/bin/addonctrl", "guardian", "restart");
} else {
# Stop the daemon.
&General::system("/usr/local/bin/addonctrl", "guardian", "stop");
diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi
index ed186cd1f..a3b1589aa 100644
--- a/html/cgi-bin/index.cgi
+++ b/html/cgi-bin/index.cgi
@@ -588,19 +588,7 @@ if ( `/bin/grep -c "reiserfs" /proc/self/mounts` > 0 ) {
}
# Show any warnings
-if (@warnings) {
- &Header::opensection();
-
- print "<ul class=\"notes\">\n";
-
- foreach my $warning (@warnings) {
- print "<li class=\"is-warning\">$warning</li>\n";
- }
-
- print "</ul>\n";
-
- &Header::closesection();
-}
+&Header::warningbox(@warnings);
&Header::closebigbox();
&Header::closepage();
diff --git a/html/cgi-bin/samba.cgi b/html/cgi-bin/samba.cgi
index c60dca1d4..5736ef0b8 100644
--- a/html/cgi-bin/samba.cgi
+++ b/html/cgi-bin/samba.cgi
@@ -180,35 +180,23 @@ $selected{'MAPTOGUEST'}{$sambasettings{'MAPTOGUEST'}} = "selected='selected'";
############################################################################################################################
################################### Aufbau der HTML Seite fr globale Sambaeinstellungen ###################################
-&Header::openbox('100%', 'center', $Lang::tr{'samba'});
+&Header::opensection();
-my %servicenames = (
- "nmbd" => $Lang::tr{'netbios nameserver daemon'},
- "smbd" => $Lang::tr{'smb daemon'},
- "winbindd" => $Lang::tr{'winbind daemon'},
-);
+&Header::ServiceStatus({
+ $Lang::tr{'netbios nameserver daemon'} => {
+ "process" => "nmbd",
+ },
-print <<END;
- <table class="tbl" width='100%' cellspacing='0'>
- <tr bgcolor='$color{'color20'}'>
- <td colspan='2' align='left'><b>$Lang::tr{'all services'}</b></td>
- </tr>
-END
+ $Lang::tr{'smb daemon'} => {
+ "process" => "smbd",
+ },
-foreach my $service (sort keys %servicenames) {
- my $status = &isrunning($service);
-
- print <<END;
- <tr>
- <td align='left' width='40%'>$servicenames{$service}</td>
- $status
- </tr>
-END
-}
-
-print <<END
- </table>
+ $Lang::tr{'winbind daemon'} => {
+ "process" => "winbindd",
+ },
+});
+print <<END;
<br>
<table width="100%">
@@ -233,40 +221,41 @@ print <<END
</form>
</td>
</table>
+END
- <br>
+&Header::closesection();
+
+&Header::openbox('100%', 'center', $Lang::tr{'samba'});
+print <<END
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
- <table class="tbl" width='100%' cellspacing='0'>
- <tr bgcolor='$color{'color20'}'>
- <td colspan='2' align='left'><b>$Lang::tr{'basic options'}</b></td>
- </tr>
+ <h6>$Lang::tr{'basic options'}</h6>
+
+ <table class="form">
<tr>
- <td align='left' width='40%'>$Lang::tr{'workgroup'}</td>
- <td align='left'>
+ <td>$Lang::tr{'workgroup'}</td>
+ <td>
<input type='text' name='WORKGRP' value='$sambasettings{'WORKGRP'}' size="30" />
</td>
</tr>
+ </table>
+
+ <h6>$Lang::tr{'security options'}</h6>
+
+ <table class="form">
<tr>
- <td align='left'><br /></td>
- <td></td>
- </tr>
- <tr bgcolor='$color{'color20'}'>
- <td colspan='2' align='left'><b>$Lang::tr{'security options'}</b></td>
- </tr>
- <tr>
- <td align='left' width='40%'>$Lang::tr{'security'}</td>
- <td align='left'>
- <select name='ROLE' style="width: 165px">
+ <td>$Lang::tr{'security'}</td>
+ <td>
+ <select name='ROLE'>
<option value='standalone' $selected{'ROLE'}{'standalone'}>$Lang::tr{'samba server role standalone'}</option>
<option value='member' $selected{'ROLE'}{'member'}>$Lang::tr{'samba server role member'}</option>
</select>
</td>
</tr>
<tr>
- <td align='left' width='40%'>$Lang::tr{'encryption'}</td>
- <td align='left'>
- <select name='ENCRYPTION' style="width: 165px">
+ <td>$Lang::tr{'encryption'}</td>
+ <td>
+ <select name='ENCRYPTION'>
<option value='optional' $selected{'ENCRYPTION'}{'optional'}>$Lang::tr{'optional'}</option>
<option value='desired' $selected{'ENCRYPTION'}{'desired'}>$Lang::tr{'desired'}</option>
<option value='required' $selected{'ENCRYPTION'}{'required'}>$Lang::tr{'required'}</option>
@@ -274,44 +263,36 @@ print <<END
</td>
</tr>
<tr>
- <td align='left' width='40%'>$Lang::tr{'map to guest'}</td>
- <td align='left'>
- <select name='MAPTOGUEST' style="width: 165px">
+ <td>$Lang::tr{'map to guest'}</td>
+ <td>
+ <select name='MAPTOGUEST'>
<option value='Bad User' $selected{'MAPTOGUEST'}{'Bad User'}>Bad User</option>
<option value='Bad Password' $selected{'MAPTOGUEST'}{'Bad Password'}>Bad Password</option>
</select>
</td>
</tr>
+ </table>
+
+ <h6>$Lang::tr{'network options'}</h6>
+
+ <table class="form">
<tr>
- <td align='left'><br /></td>
- <td></td>
- </tr>
- <tr bgcolor='$color{'color20'}'>
- <td colspan='2' align='left'><b>$Lang::tr{'network options'}</b></td>
- </tr>
- <tr>
- <td align='left' width='40%'>$Lang::tr{'remote announce'}</td>
- <td align='left'>
+ <td>$Lang::tr{'remote announce'}</td>
+ <td>
<input type='text' name='REMOTEANNOUNCE' value='$sambasettings{'REMOTEANNOUNCE'}' size="30" />
</td>
</tr>
<tr>
- <td align='left' width='40%'>$Lang::tr{'remote browse sync'}</td>
- <td align='left'>
+ <td>$Lang::tr{'remote browse sync'}</td>
+ <td>
<input type='text' name='REMOTESYNC' value='$sambasettings{'REMOTESYNC'}' size="30" />
</td>
</tr>
- </table>
-
- <br>
- <table width='100%' cellspacing='0'>
- <tr>
- <td align='center'>
- <form method='POST' action='$ENV{'SCRIPT_NAME'}'>
- <input type='hidden' name='ACTION' value="$Lang::tr{'save'}">
- <input type='submit' value="$Lang::tr{'save'}">
- </form>
+ <tr class="action">
+ <td colspan="2">
+ <input type='hidden' name='ACTION' value="$Lang::tr{'save'}">
+ <input type='submit' value="$Lang::tr{'save'}">
</td>
</tr>
</table>
@@ -738,40 +719,6 @@ close FILE;
&General::system("/usr/local/bin/sambactrl", "smbreload");
}
-sub isrunning
- {
- my $cmd = $_[0];
- my $status = "<td align='center' bgcolor='${Header::colourred}'><font color='white'><b>$Lang::tr{'stopped'}</b></font></td>";
- my $pid = '';
- my $testcmd = '';
- my $exename;
-
- $cmd =~ /(^[a-z]+)/;
- $exename = $1;
-
- if (open(FILE, "/var/run/${cmd}.pid"))
- {
- $pid = <FILE>; chomp $pid;
- close FILE;
- if (open(FILE, "/proc/${pid}/status"))
- {
- while (<FILE>)
- {
- if (/^Name:\W+(.*)/)
- {
- $testcmd = $1;
- }
- }
- close FILE;
- if ($testcmd =~ /$exename/)
- {
- $status = "<td align='center' bgcolor='${Header::colourgreen}'><font color='white'><b>$Lang::tr{'running'}</b></font></td>";
- }
- }
- }
- return $status;
- }
-
sub writeconfiguration() {
open (FILE, ">${General::swroot}/samba/global") or die "Can't save the global settings: $!";
flock (FILE, 2);
diff --git a/html/cgi-bin/services.cgi b/html/cgi-bin/services.cgi
index 4b929c716..a3ae13c78 100644
--- a/html/cgi-bin/services.cgi
+++ b/html/cgi-bin/services.cgi
@@ -108,7 +108,7 @@ $querry[1] = 'hour' unless defined $querry[1];
# IPS
$Lang::tr{'intrusion prevention system'} => {
- "process" => "suricata",
+ "pidfile" => "/var/run/suricata.pid",
},
# OpenVPN Roadwarrior
diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi
index 4423a29a8..55a7eff05 100644
--- a/html/cgi-bin/vpnmain.cgi
+++ b/html/cgi-bin/vpnmain.cgi
@@ -3393,11 +3393,11 @@ END
print "<td align='left' $col> </td>";
}
print "<td align='center' $col>$confighash{$key}[25]</td>";
- my $col1="bgcolor='${Header::colourred}'";
- my $active = "<b><font color='#FFFFFF'>$Lang::tr{'capsclosed'}</font></b>";
+ my $col1="class='status is-disconnected'";
+ my $active = "$Lang::tr{'capsclosed'}";
if ($confighash{$key}[33] eq "add") {
- $col1="bgcolor='${Header::colourorange}'";
- $active = "<b><font color='#FFFFFF'>$Lang::tr{'vpn wait'}</font></b>";
+ $col1="class='status is-connecting'";
+ $active = "$Lang::tr{'vpn wait'}";
}
foreach my $line (@status) {
if (($line =~ /\"$confighash{$key}[1]\".*IPsec SA established/) ||
diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css
index 54d0f12e5..56e6f26df 100644
--- a/html/html/themes/ipfire/include/css/style.css
+++ b/html/html/themes/ipfire/include/css/style.css
@@ -7,7 +7,9 @@
--color-blue-invert : #ffffff;
--color-orange : #ff9933;
--color-orange-invert : #ffffff;
- --color-black : #000000;
+ --color-yellow : #ffbe00;
+ --color-yellow-invert : #ffffff;
+ --color-black : #363636;
--color-black-invert : #ffffff;
--color-grey : #d6d6d6;
--color-light-grey : #f0f0f0;
@@ -203,15 +205,37 @@ section.is-error {
border: 1px solid var(--color-red);
}
-section.is-error ul {
+section.is-warning {
+ color: var(--color-yellow);
+ border: 1px solid var(--color-yellow);
+}
+
+section.is-error a, section.is-warning a {
+ color: inherit;
+}
+
+section.is-error ul, section.is-warning ul {
+ padding: 0;
margin-bottom: 0 !important;
}
+section.is-error ul li, section.is-warning ul li {
+ list-style-type: none
+}
+
section .title {
margin-bottom: 1rem;
border-bottom: 1px solid var(--color-grey);
}
+section.is-error .title {
+ border-bottom: 1px solid var(--color-red);
+}
+
+section.is-warning .title {
+ border-bottom: 1px solid var(--color-yellow);
+}
+
#main_inner {
padding-bottom: 1.5em;
}
@@ -390,6 +414,21 @@ table.form tr.action td form {
background-color: var(--color-light-grey);
}
+/*
+ Classes to overwrite the automatic colouring
+*/
+.tbl tr.is-odd td {
+ background-color: var(--color-grey);
+}
+
+.tbl tr.is-even td {
+ background-color: var(--color-light-grey);
+}
+
+.tbl tr.is-warning td {
+ background-color: var(--color-yellow);
+}
+
.tbl th:first-child {
border-left: 1px solid #363636;
border-top: 1px solid #363636;
@@ -524,16 +563,6 @@ table.form tr.action td form {
color: var(--color-black-invert);
}
-/* Notes */
-
-.notes .is-warning {
- color: var(--color-yellow);
-}
-
-.notes a {
- color: inherit;
-}
-
table.fw-nat tbody tr td {
height: 2.25em;
}
diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl
index 3888ef743..a718228bc 100644
--- a/langs/de/cgi-bin/de.pl
+++ b/langs/de/cgi-bin/de.pl
@@ -2922,6 +2922,7 @@
'vulnerable' => 'Verwundbar',
'waiting to synchronize clock' => 'Bitte warten, die Uhr wird synchronisiert',
'warn when traffic reaches' => 'Warnen wenn Traffic x % erreicht',
+'warning' => 'Warning',
'warning messages' => 'Warnhinweise',
'was deleted' => 'wurde gelöscht',
'web hits' => 'Gesamtanzahl der Websites zum ausgewählten Kriterium',
diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl
index 0004685a7..dca9f1645 100644
--- a/langs/en/cgi-bin/en.pl
+++ b/langs/en/cgi-bin/en.pl
@@ -3006,6 +3006,7 @@
'vulnerable' => 'Vulnerable',
'waiting to synchronize clock' => 'Waiting to synchronize clock',
'warn when traffic reaches' => 'Warn when traffic reaches x %',
+'warning' => 'Warning',
'warning messages' => 'Warning messages',
'was deleted' => 'was deleted',
'web hits' => 'Total number of websites matching selected criteria for',
hooks/post-receive
--
IPFire 2.x development tree