From: Alex Koch <ipfire@starkstromkonsument.de>
To: development@lists.ipfire.org
Subject: [PATCH 2/2] zoneconf: Add status output of "brctl show" and "ip addr"
Date: Tue, 03 Sep 2019 23:46:24 +0200 [thread overview]
Message-ID: <20190903214624.2280-3-ipfire@starkstromkonsument.de> (raw)
In-Reply-To: <20190903214624.2280-1-ipfire@starkstromkonsument.de>
[-- Attachment #1: Type: text/plain, Size: 3577 bytes --]
Signed-off-by: Alex Koch <ipfire(a)starkstromkonsument.de>
---
html/cgi-bin/zoneconf.cgi | 23 +++++++++++++++++++++++
langs/de/cgi-bin/de.pl | 5 ++++-
langs/en/cgi-bin/en.pl | 5 ++++-
3 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/html/cgi-bin/zoneconf.cgi b/html/cgi-bin/zoneconf.cgi
index bb24347df..71b5c1550 100644
--- a/html/cgi-bin/zoneconf.cgi
+++ b/html/cgi-bin/zoneconf.cgi
@@ -97,6 +97,10 @@ my $css = <<END
width: 4em;
}
+ p.notice {
+ color: red;
+ }
+
#submit-container {
width: 100%;
padding-top: 20px;
@@ -456,5 +460,24 @@ END
### END OF TABLE ###
&Header::closebox();
+
+&Header::openbox('100%', 'left', $Lang::tr{"zoneconf brctl show"});
+print <<END
+ <p class="notice">$Lang::tr{"zoneconf notice uptodate"}</p>
+END
+;
+my $br_config = `brctl show`;
+print "<pre>$br_config</pre>";
+&Header::closebox();
+
+&Header::openbox('100%', 'left', $Lang::tr{"zoneconf ip addr"});
+print <<END
+ <p class="notice">$Lang::tr{"zoneconf notice uptodate"}</p>
+END
+;
+my $if_config = `ip addr`;
+print "<pre>$if_config</pre>";
+&Header::closebox();
+
&Header::closebigbox();
&Header::closepage();
diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl
index 2e67e495f..363f11213 100644
--- a/langs/de/cgi-bin/de.pl
+++ b/langs/de/cgi-bin/de.pl
@@ -1,4 +1,4 @@
-%tr = (
+%tr = (
%tr,
'24 hours' => '24 Stunden',
@@ -2905,11 +2905,14 @@
'zoneconf access native' => 'Nativ',
'zoneconf access none' => 'Keine',
'zoneconf access vlan' => 'VLAN',
+'zoneconf brctl show' => 'Status: Netzwerkbrücken',
+'zoneconf ip addr' => 'Status: Netzwerkkarten',
'zoneconf nic assignment' => 'Netzwerkkartenzuordnung',
'zoneconf nicmode bridge' => 'Brücke',
'zoneconf nicmode default' => 'Normal',
'zoneconf nicmode macvtap' => 'MacVTap',
'zoneconf notice reboot' => 'Bitte einen Neustart durchführen, um die Änderungen zu übernehmen.',
+'zoneconf notice uptodate' => 'ACHTUNG: Falls Änderungen an der Netzwerkkartenzuordnung vorgenommen wurden, werden diese hier erst nach einem Neustart angezeigt!',
'zoneconf title' => 'Zonen einrichten',
'zoneconf val native assignment error' => 'Eine Netzwerkkarte kann nicht von mehreren Zonen nativ verwendet werden.',
'zoneconf val ppp assignment error' => 'Die Netzwerkkarte, die von RED im PPP-Modus verwendet wird, kann keiner anderen Zone zugeordnet werden.',
diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl
index 8b7e63cb8..d440d0528 100644
--- a/langs/en/cgi-bin/en.pl
+++ b/langs/en/cgi-bin/en.pl
@@ -1,4 +1,4 @@
-%tr = (
+%tr = (
%tr,
'24 hours' => '24 Hours',
@@ -2951,11 +2951,14 @@
'zoneconf access native' => 'Native',
'zoneconf access none' => 'None',
'zoneconf access vlan' => 'VLAN',
+'zoneconf brctl show' => 'Status: Bridges',
+'zoneconf ip addr' => 'Status: Interfaces',
'zoneconf nic assignment' => 'NIC Assignment',
'zoneconf nicmode bridge' => 'Bridge',
'zoneconf nicmode default' => 'Default',
'zoneconf nicmode macvtap' => 'MacVTtap',
'zoneconf notice reboot' => 'Please reboot to apply your changes.',
+'zoneconf notice uptodate' => 'Attention: If you changed your NIC Assignment, a reboot is required for the changes to be shown!',
'zoneconf title' => 'Zone Configuration',
'zoneconf val native assignment error' => 'A NIC cannot be accessed natively by more than one zone.',
'zoneconf val ppp assignment error' => 'The NIC used for RED in PPP mode cannot be accessed by any other zone.',
--
2.17.1
prev parent reply other threads:[~2019-09-03 21:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-03 21:46 [PATCH 0/2] zonconf: replace the nic-names with eth... and wlan... or not? Alex Koch
2019-09-03 21:46 ` [PATCH 1/2] zoneconf: Show real names of NICs in the WUI Alex Koch
2019-09-03 21:46 ` Alex Koch [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190903214624.2280-3-ipfire@starkstromkonsument.de \
--to=ipfire@starkstromkonsument.de \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox