Merge pull request #461 from marcel-sch/patch-1
[project/luci.git] / modules / luci-mod-admin-full / luasrc / model / cbi / admin_network / vlan.lua
index fbea03a..ce3c3ef 100644 (file)
@@ -1,16 +1,6 @@
---[[
-LuCI - Lua Configuration Interface
-
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2010-2011 Jo-Philipp Wich <xm@subsignal.org>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-]]--
+-- Copyright 2008 Steven Barth <steven@midlink.org>
+-- Copyright 2010-2011 Jo-Philipp Wich <jow@openwrt.org>
+-- Licensed to the public under the Apache License 2.0.
 
 m = Map("network", translate("Switch"), translate("The network ports on this device can be combined to several <abbr title=\"Virtual Local Area Network\">VLAN</abbr>s in which computers can communicate directly with each other. <abbr title=\"Virtual Local Area Network\">VLAN</abbr>s are often used to separate different network segments. Often there is by default one Uplink port for a connection to the next greater network like the internet and other ports for a local network."))
 
@@ -117,6 +107,12 @@ m.uci:foreach("network", "switch",
                        local sp = s:option(ListValue, "mirror_source_port", translate("Mirror source port"))
                        local mp = s:option(ListValue, "mirror_monitor_port", translate("Mirror monitor port"))
 
+                       sp:depends("enable_mirror_tx", "1")
+                       sp:depends("enable_mirror_rx", "1")
+
+                       mp:depends("enable_mirror_tx", "1")
+                       mp:depends("enable_mirror_rx", "1")
+
                        local pt
                        for pt = 0, num_ports - 1 do
                                local name