From patchwork Wed Oct 18 21:30:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v11,4/6] fff-web: Include new options into settings.html From: Adrian Schmutzler X-Patchwork-Id: 602 Message-Id: <1508362258-8918-4-git-send-email-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Date: Wed, 18 Oct 2017 23:30:56 +0200 This includes the new options introduced due to the /etc/config/fff file into the WebUI. Changes in v11: - Readjusted to KeyXchangeV2 Signed-off-by: Adrian Schmutzler Tested-by: Adrian Schmutzler --- .../fff-web/files/www/ssl/cgi-bin/settings.html | 72 ++++++++++++++++++++-- 1 file changed, 67 insertions(+), 5 deletions(-) diff --git a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/settings.html b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/settings.html index b785aed..99d8c7a 100755 --- a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/settings.html +++ b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/settings.html @@ -37,7 +37,33 @@ if [ "$REQUEST_METHOD" == "POST" ] ; then uci -q set "simple-tc.example.ifname=wan" uci -q set "simple-tc.example.limit_ingress=${POST_limit_ingress}" uci -q set "simple-tc.example.limit_egress=${POST_limit_egress}" - + + # Restliche Einstellungen + uci -q set "fff.notifyupdate=webui" + if [ "$POST_upgrade_notification" == "on" ] ; then + uci -q set "fff.notifyupdate.value=1" + else + uci -q set "fff.notifyupdate.value=0" + rm -f /tmp/fwcheck + rm -f /tmp/isupdate + fi + if [ "$POST_upgrade_reset" == "on" ] ; then + uci -q set "fff.notifyupdate.resetonupgrade=1" + else + uci -q set "fff.notifyupdate.resetonupgrade=0" + fi + + if uci -q get system.poe_passthrough > /dev/null ; then + uci -q set "fff.poe_passthrough=fff" + if [ "$POST_poe_passthrough" == "on" ] ; then + uci -q set "fff.poe_passthrough.active=1" + uci -q set "system.poe_passthrough.value=1" + else + uci -q set "fff.poe_passthrough.active=0" + uci -q set "system.poe_passthrough.value=0" + fi + fi + uci -q commit MSG='Daten gespeichert! - Bitte Router neustarten.' @@ -48,11 +74,22 @@ fi <%in /www/ssl/cgi-bin/helpers %> <% # read -if [ "$(uci -q get 'fff.trafficcontrol.enabled')" == "1" ] ; then - traffic_checked='checked="checked" ' +chkd='checked="checked" ' +if [ "$(uci -q get 'fff.trafficcontrol.enabled')" == "1" ] ; then # not set=0 + traffic_checked="$chkd" else traffic_checked="" fi +if [ "$(uci -q get 'fff.notifyupdate.value')" == "0" ] ; then # not set=1 + upgrade_checked="" +else + upgrade_checked="$chkd" +fi +if [ "$(uci -q get 'fff.notifyupdate.resetonupgrade')" == "0" ] ; then # not set=1 + upgrade_reset_checked="" +else + upgrade_reset_checked="$chkd" +fi %> <% show_msg %>
@@ -74,8 +111,9 @@ fi E-Mail Adresse: +

-
+
Bitratenbegrenzung
Aktiviert: @@ -85,8 +123,32 @@ fi
Freifunk Upload:kbit/s
+
+ Weitere Einstellungen + + + + + <% + if uci -q get system.poe_passthrough > /dev/null ; then + if [ "$(uci -q get 'fff.poe_passthrough.active')" == "1" ] ; then # not set=0 + poe_pt_checked="$chkd" + else + poe_pt_checked="" + fi + %> + + <% fi %> + +
Show upgrade notification: + /> +
Reset notification setting after upgrade: + /> +
Enable PoE passthrough: + /> +
+
-

<%in /www/ssl/cgi-bin/footer %>