|
@@ -94,6 +94,13 @@ if sysconfig.lan_ifname then
|
|
|
o.rmempty = false
|
|
|
end
|
|
|
|
|
|
+if uci:get('system', 'gpio_switch_poe_passthrough') then
|
|
|
+ s = f:section(SimpleSection, nil, nil)
|
|
|
+ o = s:option(Flag, "poe_passthrough", translate("Enable PoE passthrough"))
|
|
|
+ o.default = uci:get_bool("system", "gpio_switch_poe_passthrough", "value") and o.enabled or o.disabled
|
|
|
+ o.rmempty = false
|
|
|
+end
|
|
|
+
|
|
|
|
|
|
function f.handle(self, state, data)
|
|
|
if state == FORM_VALID then
|
|
@@ -137,6 +144,12 @@ function f.handle(self, state, data)
|
|
|
uci:save("network")
|
|
|
uci:commit("network")
|
|
|
|
|
|
+ if uci:get('system', 'gpio_switch_poe_passthrough') then
|
|
|
+ uci:set('system', 'gpio_switch_poe_passthrough', 'value', data.poe_passthrough)
|
|
|
+ uci:save('system')
|
|
|
+ uci:commit('system')
|
|
|
+ end
|
|
|
+
|
|
|
if dns then
|
|
|
if #data.dns > 0 then
|
|
|
uci:set("gluon-wan-dnsmasq", dns, "server", data.dns)
|