oweals/luci.git
4 years agoluci-base: add getWirelessDevices() rpc method
Jo-Philipp Wich [Tue, 3 Sep 2019 14:49:25 +0000 (16:49 +0200)]
luci-base: add getWirelessDevices() rpc method

The getWirelessDevices() method merges the results of the
network.wireless/status call with corresponding per-radio and
per-network iwinfo data.

This allows to simplify the client side network state model
implementation and saves extraneous rpc roundtrips to fetch
iwinfo data after discovering the wireless devices.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: luci.js: support passing FormData as request payload
Jo-Philipp Wich [Tue, 3 Sep 2019 14:48:31 +0000 (16:48 +0200)]
luci-base: luci.js: support passing FormData as request payload

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: luci.js: support registering request progress handlers
Jo-Philipp Wich [Tue, 3 Sep 2019 14:48:03 +0000 (16:48 +0200)]
luci-base: luci.js: support registering request progress handlers

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: luci.js: fix L.Poll.remove()
Jo-Philipp Wich [Tue, 3 Sep 2019 14:47:19 +0000 (16:47 +0200)]
luci-base: luci.js: fix L.Poll.remove()

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-mod-network: slightly improve static lease config
Jo-Philipp Wich [Wed, 21 Aug 2019 16:27:38 +0000 (18:27 +0200)]
luci-mod-network: slightly improve static lease config

 - Autoselect the matching IPv4 address when initially picking a MAC
 - Add hostname hints in the MAC/IP dropdowns

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: form.js: use createHandlerFn() for modal button actions
Jo-Philipp Wich [Wed, 21 Aug 2019 15:59:58 +0000 (17:59 +0200)]
luci-base: form.js: use createHandlerFn() for modal button actions

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: form.js: disable write/remove actions for DummyValue widgets
Jo-Philipp Wich [Wed, 21 Aug 2019 10:50:07 +0000 (12:50 +0200)]
luci-base: form.js: disable write/remove actions for DummyValue widgets

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-app-fireall: remove unused templates
Jo-Philipp Wich [Wed, 21 Aug 2019 10:48:50 +0000 (12:48 +0200)]
luci-app-fireall: remove unused templates

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-app-firewall: filter alias interfaces in zone device selection
Jo-Philipp Wich [Wed, 21 Aug 2019 10:12:12 +0000 (12:12 +0200)]
luci-app-firewall: filter alias interfaces in zone device selection

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoprotocols: drop server side cbi implementations of protocol handlers
Jo-Philipp Wich [Tue, 20 Aug 2019 13:41:41 +0000 (15:41 +0200)]
protocols: drop server side cbi implementations of protocol handlers

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-mod-network: switch to client side interface configuration pages
Jo-Philipp Wich [Tue, 20 Aug 2019 13:39:16 +0000 (15:39 +0200)]
luci-mod-network: switch to client side interface configuration pages

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoprotocols: add client side protocol handler implementations
Jo-Philipp Wich [Tue, 20 Aug 2019 13:31:35 +0000 (15:31 +0200)]
protocols: add client side protocol handler implementations

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: rpcd: add getHostname and getTTYDevices calls
Jo-Philipp Wich [Tue, 20 Aug 2019 13:33:48 +0000 (15:33 +0200)]
luci-base: rpcd: add getHostname and getTTYDevices calls

Also add IPv6 feature indication.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: network.js: add hacks to enable relay protocol support
Jo-Philipp Wich [Tue, 20 Aug 2019 13:17:24 +0000 (15:17 +0200)]
luci-base: network.js: add hacks to enable relay protocol support

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: ui.js: update tabs after initial render
Jo-Philipp Wich [Tue, 20 Aug 2019 13:15:12 +0000 (15:15 +0200)]
luci-base: ui.js: update tabs after initial render

This ensures that the error badges are properly set.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: form.js: rework section add/remove event handling
Jo-Philipp Wich [Tue, 20 Aug 2019 13:04:13 +0000 (15:04 +0200)]
luci-base: form.js: rework section add/remove event handling

 - Redraw map even when it could not be saved due to validation errors
 - Use createHandlerFn() for attaching event handlers
 - Convert buttons to <button> element to allow use of spinning class

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: ui.js: also handle failed promises in createHandlerFn()
Jo-Philipp Wich [Tue, 20 Aug 2019 13:02:36 +0000 (15:02 +0200)]
luci-base: ui.js: also handle failed promises in createHandlerFn()

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: ui.js: ignore description when checking for empty tab panes
Jo-Philipp Wich [Tue, 20 Aug 2019 11:33:08 +0000 (13:33 +0200)]
luci-base: ui.js: ignore description when checking for empty tab panes

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: luci.js: support custom filter function in dom.isEmpty()
Jo-Philipp Wich [Tue, 20 Aug 2019 11:31:07 +0000 (13:31 +0200)]
luci-base: luci.js: support custom filter function in dom.isEmpty()

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoMerge pull request #3052 from dibdot/banIP
Dirk Brenken [Mon, 9 Sep 2019 19:26:03 +0000 (21:26 +0200)]
Merge pull request #3052 from dibdot/banIP

luci-app-banip: sync with banIP 0.2.0

4 years agoluci-app-banip: sync with banIP 0.2.0 3052/head
Dirk Brenken [Mon, 9 Sep 2019 14:51:42 +0000 (16:51 +0200)]
luci-app-banip: sync with banIP 0.2.0

* see details in package PR

Signed-off-by: Dirk Brenken <dev@brenken.org>
4 years agoMerge pull request #3044 from stangri/master-luci-app-vpnbypass
Florian Eckert [Sun, 8 Sep 2019 10:26:52 +0000 (12:26 +0200)]
Merge pull request #3044 from stangri/master-luci-app-vpnbypass

luci-app-vpnbypass: better start/stop controls, create entry in the VPN menu if it exists

4 years agoMerge pull request #3048 from musashino205/l10n/fw-fix-uk
Hannu Nyman [Sun, 8 Sep 2019 07:38:15 +0000 (10:38 +0300)]
Merge pull request #3048 from musashino205/l10n/fw-fix-uk

luci-app-firewall: remove unnecessary quotation in Ukrainian translation

4 years agoMerge pull request #3047 from musashino205/l10n/adblk-upd-ja
Hannu Nyman [Sun, 8 Sep 2019 07:37:38 +0000 (10:37 +0300)]
Merge pull request #3047 from musashino205/l10n/adblk-upd-ja

luci-app-adblock: update Japanese translation

4 years agoluci-app-firewall: remove unnecessary quotation in Ukrainian translation 3048/head
INAGAKI Hiroshi [Sun, 8 Sep 2019 07:19:57 +0000 (16:19 +0900)]
luci-app-firewall: remove unnecessary quotation in Ukrainian translation

Removed unnecessary double quotation at the end of the line. It was
reported as an error by i18n-sync.sh script.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
4 years agoluci-app-adblock: update Japanese translation 3047/head
INAGAKI Hiroshi [Sun, 8 Sep 2019 07:15:38 +0000 (16:15 +0900)]
luci-app-adblock: update Japanese translation

Updated Japanese translations.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
4 years agoluci-app-adblock: sync translations
INAGAKI Hiroshi [Sun, 8 Sep 2019 07:02:58 +0000 (16:02 +0900)]
luci-app-adblock: sync translations

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
4 years agoluci-app-vpnbypass: better start/stop controls, create entry in the VPN menu if it... 3044/head
Stan Grishin [Sat, 7 Sep 2019 17:36:32 +0000 (10:36 -0700)]
luci-app-vpnbypass: better start/stop controls, create entry in the VPN menu if it exists

Signed-off-by: Stan Grishin <stangri@melmac.net>
4 years agoMerge pull request #3041 from dibdot/adblock
Dirk Brenken [Fri, 6 Sep 2019 18:54:29 +0000 (20:54 +0200)]
Merge pull request #3041 from dibdot/adblock

luci-app-adblock: sync with adblock 3.8.5

4 years agoluci-app-adblock: sync with adblock 3.8.5 3041/head
Dirk Brenken [Fri, 6 Sep 2019 09:10:48 +0000 (11:10 +0200)]
luci-app-adblock: sync with adblock 3.8.5

* support the new extra options 'TLD Compression Threshold',
 'Local FW/DNS Ports' and 'DNS Inotify', see packages PR for details.

Signed-off-by: Dirk Brenken <dev@brenken.org>
4 years agoMerge pull request #3010 from TDT-AG/pr/20190826-dsl-status-FECS
Jo-Philipp Wich [Tue, 3 Sep 2019 17:28:53 +0000 (19:28 +0200)]
Merge pull request #3010 from TDT-AG/pr/20190826-dsl-status-FECS

luci-mod-status: xDSL Status: use new var names dsl.errors_fecs_*

4 years agoMerge pull request #3029 from musashino205/l10n/tmate-upd-ja
Hannu Nyman [Sat, 31 Aug 2019 14:11:45 +0000 (17:11 +0300)]
Merge pull request #3029 from musashino205/l10n/tmate-upd-ja

luci-app-travelmate: update Japanese translation

4 years agoluci-app-travelmate: update Japanese translation 3029/head
INAGAKI Hiroshi [Sat, 31 Aug 2019 11:00:05 +0000 (20:00 +0900)]
luci-app-travelmate: update Japanese translation

Updated Japanese translations.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
4 years agoluci-app-travelmate: sync translations
INAGAKI Hiroshi [Sat, 31 Aug 2019 10:52:42 +0000 (19:52 +0900)]
luci-app-travelmate: sync translations

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
4 years agoMerge pull request #3025 from dibdot/travelmate
Dirk Brenken [Thu, 29 Aug 2019 18:04:07 +0000 (20:04 +0200)]
Merge pull request #3025 from dibdot/travelmate

luci-app-travelmate: sync with 1.4.12

4 years agoMerge pull request #3026 from stangri/master-luci-app-simple-adblock
Dirk Brenken [Thu, 29 Aug 2019 13:24:56 +0000 (15:24 +0200)]
Merge pull request #3026 from stangri/master-luci-app-simple-adblock

luci-app-simple-adblock: dns resolver value bugfix (#3000)

4 years agoluci-app-simple-adblock: dns resolver value bugfix (#3000) 3026/head
Stan Grishin [Thu, 29 Aug 2019 13:21:20 +0000 (06:21 -0700)]
luci-app-simple-adblock: dns resolver value bugfix (#3000)

Signed-off-by: Stan Grishin <stangri@melmac.net>
4 years agoluci-app-travelmate: sync with 1.4.12 3025/head
Dirk Brenken [Thu, 29 Aug 2019 10:02:04 +0000 (12:02 +0200)]
luci-app-travelmate: sync with 1.4.12

* option to add open uplinks to your wireless config,
  e.g. hotel captive portals (disabled by default)

Signed-off-by: Dirk Brenken <dev@brenken.org>
4 years agoMerge pull request #3008 from TDT-AG/pr/20190826-firewall-german-translation
Florian Eckert [Wed, 28 Aug 2019 11:01:11 +0000 (13:01 +0200)]
Merge pull request #3008 from TDT-AG/pr/20190826-firewall-german-translation

luci-app-firewall: Use more appropriate terms in german translations

4 years agoMerge pull request #3014 from stangri/master-luci-app-advanced-reboot
Hannu Nyman [Tue, 27 Aug 2019 13:55:44 +0000 (16:55 +0300)]
Merge pull request #3014 from stangri/master-luci-app-advanced-reboot

luci-app-advanced-reboot: bugfix for when network.lan.ipaddr is a table

4 years agoMerge pull request #3017 from stangri/master-luci-app-simple-adblock
Hannu Nyman [Tue, 27 Aug 2019 13:54:41 +0000 (16:54 +0300)]
Merge pull request #3017 from stangri/master-luci-app-simple-adblock

luci-app-simple-adblock: delete extra file

4 years agoluci-app-simple-adblock: delete extra file 3017/head
Stan Grishin [Tue, 27 Aug 2019 06:18:46 +0000 (23:18 -0700)]
luci-app-simple-adblock: delete extra file

Signed-off-by: Stan Grishin <stangri@melmac.net>
4 years agoluci-app-advanced-reboot: bugfix for when network.lan.ipaddr is a table 3014/head
Stan Grishin [Tue, 27 Aug 2019 06:07:37 +0000 (23:07 -0700)]
luci-app-advanced-reboot: bugfix for when network.lan.ipaddr is a table

Signed-off-by: Stan Grishin <stangri@melmac.net>
4 years agoMerge pull request #3012 from dibdot/adblock
Dirk Brenken [Mon, 26 Aug 2019 18:09:58 +0000 (20:09 +0200)]
Merge pull request #3012 from dibdot/adblock

luci-app-adblock: sync with adblock 3.8.3

4 years agoluci-app-adblock: sync with adblock 3.8.3 3012/head
Dirk Brenken [Mon, 26 Aug 2019 09:46:33 +0000 (11:46 +0200)]
luci-app-adblock: sync with adblock 3.8.3

* fix a suspend/resume issue
* format overall domains with a thousands separator

Signed-off-by: Dirk Brenken <dev@brenken.org>
4 years agoMerge pull request #3011 from YuriPet/master
Jo-Philipp Wich [Mon, 26 Aug 2019 11:01:55 +0000 (13:01 +0200)]
Merge pull request #3011 from YuriPet/master

luci-base: fix some Ukrainian translations

4 years agoluci-base: fix some Ukrainian translations 3011/head
Yurii [Mon, 26 Aug 2019 10:26:36 +0000 (13:26 +0300)]
luci-base: fix some Ukrainian translations

Signed-off-by: Yurii <yuripet@gmail.com>
4 years agoluci-mod-status: xDSL Status: use new var names dsl.errors_fecs_* 3010/head
Martin Schiller [Mon, 26 Aug 2019 10:03:07 +0000 (12:03 +0200)]
luci-mod-status: xDSL Status: use new var names dsl.errors_fecs_*

This is part of the FECS counter fix.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
4 years agoluci-app-firewall: Use more appropriate terms in german translations 3008/head
Martin Schiller [Mon, 26 Aug 2019 07:16:01 +0000 (09:16 +0200)]
luci-app-firewall: Use more appropriate terms in german translations

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
4 years agoMerge pull request #3007 from TDT-AG/pr/20190826-base-german-translation
Jo-Philipp Wich [Mon, 26 Aug 2019 07:12:56 +0000 (09:12 +0200)]
Merge pull request #3007 from TDT-AG/pr/20190826-base-german-translation

luci-base: fix some german translations

4 years agoluci-base: fix some german translations 3007/head
Martin Schiller [Mon, 26 Aug 2019 07:05:07 +0000 (09:05 +0200)]
luci-base: fix some german translations

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
4 years agoMerge pull request #3005 from musashino205/l10n/adblk-upd-ja
Hannu Nyman [Mon, 26 Aug 2019 06:16:00 +0000 (09:16 +0300)]
Merge pull request #3005 from musashino205/l10n/adblk-upd-ja

luci-app-adblock: update Japanese translation

4 years agoluci-app-adblock: update Japanese translation 3005/head
INAGAKI Hiroshi [Mon, 26 Aug 2019 05:00:20 +0000 (14:00 +0900)]
luci-app-adblock: update Japanese translation

Updated Japanese translations.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
4 years agoMerge pull request #2996 from musashino205/l10n/base-upd-ja
Hannu Nyman [Sun, 25 Aug 2019 16:14:30 +0000 (19:14 +0300)]
Merge pull request #2996 from musashino205/l10n/base-upd-ja

luci-base: update Japanese translation

4 years agoluci-base: update Japanese translation 2996/head
INAGAKI Hiroshi [Wed, 21 Aug 2019 14:44:48 +0000 (23:44 +0900)]
luci-base: update Japanese translation

Updated Japanese translations.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
4 years agoi18n: sync translations
INAGAKI Hiroshi [Wed, 21 Aug 2019 14:07:14 +0000 (23:07 +0900)]
i18n: sync translations

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
4 years agoluci-base: form.js: implement Textfield widget
Jo-Philipp Wich [Mon, 19 Aug 2019 13:06:31 +0000 (15:06 +0200)]
luci-base: form.js: implement Textfield widget

Port the CBI Textfield (textarea) widget type to client side form.js

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: ui.js: implement Textarea widget
Jo-Philipp Wich [Mon, 19 Aug 2019 13:04:16 +0000 (15:04 +0200)]
luci-base: ui.js: implement Textarea widget

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoMerge pull request #2990 from stangri/master-luci-app-simple-adblock
Hannu Nyman [Sun, 18 Aug 2019 17:14:06 +0000 (20:14 +0300)]
Merge pull request #2990 from stangri/master-luci-app-simple-adblock

luci-app-simple-adblock: support for varios DNS resolvers/options

4 years agoMerge pull request #2989 from stangri/master-luci-app-advanced-reboot
Hannu Nyman [Sun, 18 Aug 2019 17:12:50 +0000 (20:12 +0300)]
Merge pull request #2989 from stangri/master-luci-app-advanced-reboot

luci-app-advanced-reboot: support for Linksys EA8300

4 years agoluci-app-simple-adblock: support for varios DNS resolvers/options 2990/head
Stan Grishin [Sat, 17 Aug 2019 13:15:10 +0000 (06:15 -0700)]
luci-app-simple-adblock: support for varios DNS resolvers/options

Signed-off-by: Stan Grishin <stangri@melmac.net>
4 years agoluci-app-advanced-reboot: support for Linksys EA8300 2989/head
Stan Grishin [Sat, 17 Aug 2019 11:29:01 +0000 (04:29 -0700)]
luci-app-advanced-reboot: support for Linksys EA8300

Signed-off-by: Stan Grishin <stangri@melmac.net>
4 years agoluci-base: network.js: fix inverted logic in registerErrorCode()
Jo-Philipp Wich [Fri, 16 Aug 2019 10:00:50 +0000 (12:00 +0200)]
luci-base: network.js: fix inverted logic in registerErrorCode()

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: widgets.js: CBINetworkSelect: honour exclude option
Jo-Philipp Wich [Fri, 16 Aug 2019 07:49:11 +0000 (09:49 +0200)]
luci-base: widgets.js: CBINetworkSelect: honour exclude option

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoMerge pull request #2983 from dibdot/adblock
Dirk Brenken [Fri, 16 Aug 2019 04:15:32 +0000 (06:15 +0200)]
Merge pull request #2983 from dibdot/adblock

luci-app-adblock: sync with adblock 3.8.0

4 years agoluci-base: use native ubus-rpc authorization protocol
Jo-Philipp Wich [Thu, 15 Aug 2019 14:07:48 +0000 (16:07 +0200)]
luci-base: use native ubus-rpc authorization protocol

Instead of granting complete ubus access under the active sysauth session,
implement the ubus-rpc authorization mechanism and make the ubus proxy
endpoint unauthenticated.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: add rpc feature tests for sysntpd and zram
Jo-Philipp Wich [Thu, 15 Aug 2019 14:06:46 +0000 (16:06 +0200)]
luci-base: add rpc feature tests for sysntpd and zram

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-app-firewall: fix zone overview page after rpc procedure renaming
Jo-Philipp Wich [Thu, 15 Aug 2019 13:40:46 +0000 (15:40 +0200)]
luci-app-firewall: fix zone overview page after rpc procedure renaming

The "conntrack_helpers" method has been renamed to "getConntrackHelpers".

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-app-adblock: sync with adblock 3.8.0 2983/head
Dirk Brenken [Thu, 15 Aug 2019 08:32:59 +0000 (10:32 +0200)]
luci-app-adblock: sync with adblock 3.8.0

* add support for the 'null' blocking variant in dnsmasq
  (via addn-hosts), see new select box 'DNS Variant'
* add support for 'DNS File Reset', where the final DNS blockfile
  will be purged after DNS backend loading (save storage space)
* Provide additional Runtime information:
  'DNS Variant' and 'Backup Directory'
* add E-Mail notification options to LuCI

Signed-off-by: Dirk Brenken <dev@brenken.org>
4 years agoluci-base: widgets.js: support alias interfaces in CBIDeviceSelect
Jo-Philipp Wich [Wed, 14 Aug 2019 21:02:06 +0000 (23:02 +0200)]
luci-base: widgets.js: support alias interfaces in CBIDeviceSelect

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: ui.js: add createHandlerFn() helper
Jo-Philipp Wich [Wed, 14 Aug 2019 20:54:59 +0000 (22:54 +0200)]
luci-base: ui.js: add createHandlerFn() helper

The createHandlerFn() helper function is useful to construct onclick
or similar event handling functions. It will add a "spinning" CSS
class on the event target element and disable the element, wrap the
given function with Promise.resolv() and re-enable the target element
once the promise is settled.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: network.js: overhaul code
Jo-Philipp Wich [Wed, 14 Aug 2019 16:17:10 +0000 (18:17 +0200)]
luci-base: network.js: overhaul code

 - Rework internal state management
 - Implement new utility functions such as getL3Device() or getModemType()
 - Fix bugs in various functions

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-app-firewall: honour global default policies in per-zone settings
Jo-Philipp Wich [Wed, 14 Aug 2019 15:07:55 +0000 (17:07 +0200)]
luci-app-firewall: honour global default policies in per-zone settings

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: firewall.js: fix addZone()
Jo-Philipp Wich [Wed, 14 Aug 2019 15:04:45 +0000 (17:04 +0200)]
luci-base: firewall.js: fix addZone()

When checking for an existing zone with the same name internally,
addZone() must use the nonblocking lookupZone() instead of the
promise returning public getZone() call.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: rpc: drop offload_support call
Jo-Philipp Wich [Wed, 14 Aug 2019 15:02:49 +0000 (17:02 +0200)]
luci-base: rpc: drop offload_support call

It is superseded by the more generic getFeatures method.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-app-firewall: drop usage of getOffloadSupport()
Jo-Philipp Wich [Wed, 14 Aug 2019 15:00:04 +0000 (17:00 +0200)]
luci-app-firewall: drop usage of getOffloadSupport()

Rely on the more generic L.hasSystemFeature() from now on.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: luci.js: introduce hasSystemFeature() api
Jo-Philipp Wich [Wed, 14 Aug 2019 14:42:55 +0000 (16:42 +0200)]
luci-base: luci.js: introduce hasSystemFeature() api

The new function allows querying the presence of certain system features
such as dnsmasq or firewall availability or the compile time features
of hostapd and wpa_supplicant.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: form.js: support passing a callback to Map.save()
Jo-Philipp Wich [Mon, 12 Aug 2019 17:45:18 +0000 (19:45 +0200)]
luci-base: form.js: support passing a callback to Map.save()

The given callback function will be executed after the map is parsed,
but before the uci is saved. This is useful to add further uci changes
before the map is re-rendered.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: form.js: implement support for tabbed maps
Jo-Philipp Wich [Mon, 12 Aug 2019 17:44:00 +0000 (19:44 +0200)]
luci-base: form.js: implement support for tabbed maps

When .tabbed is set to true on a map, all enclosed sections will be
put into separate tabs.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: form.js: improve ui tab interaction
Jo-Philipp Wich [Sun, 11 Aug 2019 19:01:12 +0000 (21:01 +0200)]
luci-base: form.js: improve ui tab interaction

 - Delay initialization of tab groups
 - Tag section nodes with IDs to store per-section tab state

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: ui.js: rework tab state handling
Jo-Philipp Wich [Sun, 11 Aug 2019 18:59:45 +0000 (20:59 +0200)]
luci-base: ui.js: rework tab state handling

Properly preserve the selection state of nested tabs.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: form.js: CBISectionValue: properly forward dependency checks
Jo-Philipp Wich [Sun, 11 Aug 2019 18:54:49 +0000 (20:54 +0200)]
luci-base: form.js: CBISectionValue: properly forward dependency checks

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: ui.js: UISelect: fix check for empty choices
Jo-Philipp Wich [Sun, 11 Aug 2019 18:52:51 +0000 (20:52 +0200)]
luci-base: ui.js: UISelect: fix check for empty choices

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: form.js: allow overriding empty section placeholder rendering
Jo-Philipp Wich [Thu, 8 Aug 2019 11:31:47 +0000 (13:31 +0200)]
luci-base: form.js: allow overriding empty section placeholder rendering

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: form.js: harmonize title property handling
Jo-Philipp Wich [Thu, 8 Aug 2019 07:39:58 +0000 (09:39 +0200)]
luci-base: form.js: harmonize title property handling

Some title properties were expected to be functions, some strings.

Refactor the code to support both string or function values for all
title properties.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: form.js: inherit uci config overrides from parent sections
Jo-Philipp Wich [Thu, 8 Aug 2019 06:36:04 +0000 (08:36 +0200)]
luci-base: form.js: inherit uci config overrides from parent sections

When the parent section of an option object specifes an alternative
uci configuration name, enclosed option elements should honour it.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: form.js: fix rendering of button widgets
Jo-Philipp Wich [Thu, 8 Aug 2019 06:34:27 +0000 (08:34 +0200)]
luci-base: form.js: fix rendering of button widgets

Also introduce an `onclick` property to allow registering custom button
action handler.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: form.js: add further caption properties
Jo-Philipp Wich [Thu, 8 Aug 2019 06:24:02 +0000 (08:24 +0200)]
luci-base: form.js: add further caption properties

Introduce properties `addbtntitle`, `removebtntitle` and `modaltitle` to
allow overriding the captions of section add buttons, remove buttons and
modal dialog titles respectively.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: network.js: add getL2Device(), getMTU() helpers
Jo-Philipp Wich [Wed, 31 Jul 2019 18:01:11 +0000 (20:01 +0200)]
luci-base: network.js: add getL2Device(), getMTU() helpers

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: network.js: support dynamically loaded protocol classes
Jo-Philipp Wich [Wed, 31 Jul 2019 07:14:51 +0000 (09:14 +0200)]
luci-base: network.js: support dynamically loaded protocol classes

Port the existing server side protocol support framework to the client
side network.js.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: network.js: expose prefixToMask() and maskToPrefix()
Jo-Philipp Wich [Wed, 31 Jul 2019 06:41:53 +0000 (08:41 +0200)]
luci-base: network.js: expose prefixToMask() and maskToPrefix()

Expose the prefixToMask() and maskToPrefix() helper functions for use by
other modules, e.g. the datatype validator.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: network.js: return mac addresses in upper case
Jo-Philipp Wich [Wed, 31 Jul 2019 06:41:03 +0000 (08:41 +0200)]
luci-base: network.js: return mac addresses in upper case

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: network.js: extend ifnameOf() and expose as getIfnameOf()
Jo-Philipp Wich [Wed, 31 Jul 2019 06:39:10 +0000 (08:39 +0200)]
luci-base: network.js: extend ifnameOf() and expose as getIfnameOf()

Extend the ifnameOf() helper function to cover all object types used by
network.js and expose it as public getIfnameOf() api function for use by
other modules.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: network.js: add ability to flush the internal cache
Jo-Philipp Wich [Wed, 31 Jul 2019 06:33:52 +0000 (08:33 +0200)]
luci-base: network.js: add ability to flush the internal cache

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: ui.js: do not forcibly sort synamic list items
Jo-Philipp Wich [Wed, 14 Aug 2019 20:44:54 +0000 (22:44 +0200)]
luci-base: ui.js: do not forcibly sort synamic list items

Ref: https://forum.openwrt.org/t/cannot-save-certain-fields/42738/2
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-app-statistics: cpufreq: tweak graphs
Hannu Nyman [Wed, 14 Aug 2019 15:53:03 +0000 (18:53 +0300)]
luci-app-statistics: cpufreq: tweak graphs

* Frequency usage percentage stats are by kHz instead of Hz.
  Correct the labels. (Linux natively uses kHz for CPU frequency stats,
  but collectd scales the current frequency stats item to Hz.)

* Show frequency usage percentage graph before the transition counts,
  as it is more descriptive.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
4 years agoMerge pull request #2976 from aaronmdjones/master
Jo-Philipp Wich [Sun, 11 Aug 2019 09:21:25 +0000 (11:21 +0200)]
Merge pull request #2976 from aaronmdjones/master

luci-app-firewall: rules: allow ICMPv6 ND types and sort alphabetically

4 years agoluci-app-firewall: rules: sort ICMP types alphabetically 2976/head
Aaron Jones [Sun, 11 Aug 2019 06:13:15 +0000 (06:13 +0000)]
luci-app-firewall: rules: sort ICMP types alphabetically

This just makes it easier to find the type one would want.
No types were added or removed, only re-arranged.

Signed-off-by: Aaron Jones <aaronmdjones@gmail.com>
4 years agoluci-app-firewall: rules: allow ICMPv6 ND types
Aaron Jones [Sun, 11 Aug 2019 06:08:07 +0000 (06:08 +0000)]
luci-app-firewall: rules: allow ICMPv6 ND types

The "Match ICMP Type" dropdown had entries for router
solicitation & router advertisements, but not the more
generic neighbour solicitation & neighbour advertisements.

A LAN cannot function without Neighbour Discovery; this
means that setting a LAN interface default input policy to
REJECT breaks IPv6 WAN access for all hosts on that LAN;
as they can no longer discover their gateway's MAC address.
This can be fixed with appropriate rules allowing ND input,
which this patch allows one to do in LuCI.

The spelling is the same as in [1].

[1] <https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/network/config/firewall/files/firewall.config>

Signed-off-by: Aaron Jones <aaronmdjones@gmail.com>
4 years agoluci-app-statistics: scale up ping_droprate to range 0-100
Yousong Zhou [Fri, 9 Aug 2019 10:05:02 +0000 (10:05 +0000)]
luci-app-statistics: scale up ping_droprate to range 0-100

In original collectd, values of this metric are in range 0-1.  OpenWrt
previously have a custom patch scaling them up to range 0-100.  That
patch has been removed to align with possibly other deployments.

Ref: https://github.com/openwrt/packages/pull/9677
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>