From bfe8a01040c8a74f38818195620f069f5bc10c5c Mon Sep 17 00:00:00 2001 From: Anton Kikin Date: Tue, 6 Apr 2021 04:21:01 +0300 Subject: luci-mod-network: Support for disabling routes Support for disabling routes in netifd was added in commit [1]. This commit adds support for disabling routes through the LuCI interface. Additionally hidden the route options descriptions in the header of the routes table (they are still available in the modal view). [1]: https://git.openwrt.org/?p=project/netifd.git;a=commit;h=327da9895327bc56b23413ee91a6e6b6e0e4329d Signed-off-by: Anton Kikin --- .../htdocs/luci-static/resources/view/network/routes.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/luci-mod-network/htdocs/luci-static') diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js index b218daac34..7e11a3cb41 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js @@ -20,6 +20,7 @@ return view.extend({ s.anonymous = true; s.addremove = true; s.sortable = true; + s.nodescriptions = true; s.tab('general', _('General Settings')); s.tab('advanced', _('Advanced Settings')); @@ -28,6 +29,10 @@ return view.extend({ o.rmempty = false; o.nocreate = true; + o = s.taboption('general', form.Flag, 'disabled', _('Disable'), _('Disable this route')); + o.rmempty = true; + o.default = o.disabled; + o = s.taboption('general', form.Value, 'target', _('Target'), (i == 4) ? _('Host-IP or Network') : _('IPv6-Address or Network (CIDR)')); o.datatype = (i == 4) ? 'ip4addr' : 'ip6addr'; o.rmempty = false; -- cgit v1.2.3