Commit graph

11340 commits

Author SHA1 Message Date
Jo-Philipp Wich
afd361e368 luci-base: ui.js: implement Textarea widget
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-19 15:04:16 +02:00
Hannu Nyman
276aa89be3
Merge pull request #2990 from stangri/master-luci-app-simple-adblock
luci-app-simple-adblock: support for varios DNS resolvers/options
2019-08-18 20:14:06 +03:00
Hannu Nyman
07e2fc565c
Merge pull request #2989 from stangri/master-luci-app-advanced-reboot
luci-app-advanced-reboot: support for Linksys EA8300
2019-08-18 20:12:50 +03:00
Stan Grishin
80b95042e9 luci-app-simple-adblock: support for varios DNS resolvers/options
Signed-off-by: Stan Grishin <stangri@melmac.net>
2019-08-17 06:15:10 -07:00
Stan Grishin
0d0a8b882d luci-app-advanced-reboot: support for Linksys EA8300
Signed-off-by: Stan Grishin <stangri@melmac.net>
2019-08-17 04:29:01 -07:00
Jo-Philipp Wich
f3bcb918bf luci-base: network.js: fix inverted logic in registerErrorCode()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-16 12:01:09 +02:00
Jo-Philipp Wich
24aa675a46 luci-base: widgets.js: CBINetworkSelect: honour exclude option
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-16 09:49:11 +02:00
Dirk Brenken
c2d6770801
Merge pull request #2983 from dibdot/adblock
luci-app-adblock: sync with adblock 3.8.0
2019-08-16 06:15:32 +02:00
Jo-Philipp Wich
acc2c8d277 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>
2019-08-15 16:10:42 +02:00
Jo-Philipp Wich
438d4b95c3 luci-base: add rpc feature tests for sysntpd and zram
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-15 16:10:42 +02:00
Jo-Philipp Wich
42bd5aa9c4 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>
2019-08-15 15:40:46 +02:00
Dirk Brenken
9400fc7536
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>
2019-08-15 11:36:48 +02:00
Jo-Philipp Wich
d19e97bcb0 luci-base: widgets.js: support alias interfaces in CBIDeviceSelect
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14 23:02:25 +02:00
Jo-Philipp Wich
7179d2e6dd 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>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
0d0882aea0 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>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
ed8f1c4c1c luci-app-firewall: honour global default policies in per-zone settings
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
7610f1d9cf 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>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
167ad7bb12 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>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
9f032e02e4 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>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
a4621c9520 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>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
3b335f2764 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>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
082fd9ff10 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>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
b391387ce7 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>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
c2eba00a10 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>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
fb18c278a4 luci-base: form.js: CBISectionValue: properly forward dependency checks
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
43a8c12f04 luci-base: ui.js: UISelect: fix check for empty choices
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
5628329434 luci-base: form.js: allow overriding empty section placeholder rendering
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
a90bf384b2 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>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
a36e1e976b 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>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
46861a527e 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>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
3789148fc9 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>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
f7a3546989 luci-base: network.js: add getL2Device(), getMTU() helpers
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
d528a96947 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>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
00ec399fa1 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>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
e64b0c3c0d luci-base: network.js: return mac addresses in upper case
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
227fae8a37 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>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
3e5ef065df luci-base: network.js: add ability to flush the internal cache
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
d1e9841e86 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>
2019-08-14 22:46:19 +02:00
Hannu Nyman
24c0e7ca4c 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>
2019-08-14 19:00:09 +03:00
Jo-Philipp Wich
f929298318
Merge pull request #2976 from aaronmdjones/master
luci-app-firewall: rules: allow ICMPv6 ND types and sort alphabetically
2019-08-11 11:21:25 +02:00
Aaron Jones
f7cb913d10
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>
2019-08-11 06:13:15 +00:00
Aaron Jones
17f3e03930
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>
2019-08-11 06:10:47 +00:00
Yousong Zhou
9def6faa4e 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>
2019-08-10 09:53:14 +08:00
Florian Eckert
15e9526089
Merge pull request #2969 from TDT-AG/pr/20190806-luci-base
luci-base: add new VPN toplevel menu entry
2019-08-09 14:46:29 +02:00
Dirk Brenken
b11a25dcb9
Merge pull request #2968 from dibdot/banIP
luci-app-banip: sync with 0.1.5
2019-08-07 05:45:28 +02:00
Dirk Brenken
c6eb79387a
Merge pull request #2967 from dibdot/travelmate
luci-app-travelmate: sync with 1.4.10
2019-08-07 05:45:06 +02:00
Florian Eckert
7af8043a75 luci-app-ocserv: move to new vpn menu section
Move the app ocserv to the new vpn menu section.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-08-06 16:23:08 +02:00
Florian Eckert
a63b465adb luci-app-openvpn: move to new vpn menu section
Move the app openvpn to the new vpn menu section.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-08-06 16:22:44 +02:00
Florian Eckert
d3e060ae6c luci-base: add vpn menu section
There is always more vpn services. To make the LuCI menu look cleaner, a
new top level menu "VPN" will be added with this commit. All luci-app-*
that have something to do with VPN should move to this new menu entry.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-08-06 16:20:17 +02:00
Dirk Brenken
4e75e3710c
luci-app-travelmate: sync with 1.4.10
* wifi add/edit: add a select box to reference an external script
  for automated captive portal logins
* fix a visual issue with material theme

Signed-off-by: Dirk Brenken <dev@brenken.org>
2019-08-06 16:01:53 +02:00