luci-mod-network: refactor device configuration
authorJo-Philipp Wich <[email protected]>
Thu, 17 Jun 2021 10:28:51 +0000 (12:28 +0200)
committerJo-Philipp Wich <[email protected]>
Thu, 1 Jul 2021 19:15:04 +0000 (21:15 +0200)
commitccf7c1e0363177f92e1a38b128b4a388c6e0e96d
treeb91e22f929892d81294bd17e02f3564886470532
parent0eb87ea65e706f4f9c92c29c983f289d3ce5ca29
luci-mod-network: refactor device configuration

Since all netifd device types inherit generic device settings, we can
simplify various aspects of the device configuration ui and drop unused
code while we're at it.

 - Remove setIfActive() helper, superseded by commit
   f3f74bd0fe ("luci-base: form.js: consider aliased options in AbstractValue.remove()")

 - Remove most dependency constraints to make all generic device settings
   available for all device types

 - Add MTU value validation to disallow exceeding parent device MTU for
   VLAN interfaces

 - Dynamically update placeholder values when changing base or parent
   device options

 - Undo VLAN network config hack since all options are available now.
   Reverts commit
   3c6b59504a ("luci-mod-interfaces: simplify configuring MAC address of 802.1q devices")

 - Do not suggest inactive wireless networks as existing device or base
   device choices

 - Disallow specifying names of already existing network devices when
   creating new device settings

 - Fix a number of multicast dependency specifications

 - Drop now unused functions

Signed-off-by: Jo-Philipp Wich <[email protected]>
(cherry picked from commit f689d0d208acbf9934da5a2d49c8717c054be585)
modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js
modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js