Commit graph

11526 commits

Author SHA1 Message Date
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
Dirk Brenken
ee28798aff
luci-app-banip: sync with 0.1.5
* add new extra options to control auto-addons to
  blacklist & whitelist ('ban_autoblacklist' & 'ban_autowhitelist')

Signed-off-by: Dirk Brenken <dev@brenken.org>
2019-08-06 15:51:23 +02:00
Jo-Philipp Wich
1fc8d021ed protocols: fix contains_interface() implementation in several backends
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-06 15:19:50 +02:00
Jo-Philipp Wich
d73553e530 luci-lib-ip: support specifying source address in route()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-06 15:19:50 +02:00
Florian Eckert
2bc03f86de
Merge pull request #2966 from TsLenMo/master
Fix a software page style issue for rosy, Fix #2965.
2019-08-06 12:06:12 +02:00
TsLenMo
0623b5362c luci-theme-rosy: fix a software page style issue
The software page is out of the parent box, and the same is true in chrome and firefox.

Signed-off-by: TsLenMo <2013319822@qq.com>
2019-08-06 17:31:29 +08:00
Hannu Nyman
0cf9d53fff
Merge pull request #2964 from musashino205/l10n/base-upd-ja
luci-base: update Japanese translation
2019-08-05 20:55:22 +03:00
INAGAKI Hiroshi
6b8532c8e8 luci-base: update Japanese translation
Updated Japanese translations.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2019-08-06 02:52:54 +09:00
Jo-Philipp Wich
07aedbf129
Merge pull request #2962 from TDT-AG/pr/20190802-luci-app-openvpn
luci-app-openvpn: replace tls_cipher and tls_ciphersuites with DynamicList
2019-08-05 09:28:29 +02:00
Lars Kruse
7863ff7272 luci-app-olsr: handle empty result for non-status tables
The response of the jsoninfo request may be non-empty (e.g. a linebreak
or just whitespace), but still yield "nil" after "json.decode".
This situation was already handled for the "status" request, but it
leads to a dictionary access against a "nil" value for all other tables.

Signed-off-by: Lars Kruse <lists@sumpfralle.de>
2019-08-02 22:31:03 +02:00
Florian Eckert
6a847fea04 luci-app-openvpn: use DynamicList for tls_ciphersuites
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-08-02 15:49:00 +02:00
Florian Eckert
7880a9276b luci-app-openvpn: use DynamicList for tls_cipher
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-08-02 15:48:56 +02:00
Florian Eckert
07dbee37f8
Merge pull request #2643 from kuoruan/aria2
luci-app-aria2: Refactor, new views and more options
2019-08-02 11:22:55 +02:00
Florian Eckert
e647a60b9d
Merge pull request #2961 from castillofrancodamian/udpxy
luci-app-udpxy: add template
2019-08-02 10:24:35 +02:00
Florian Eckert
bd76519971
Merge pull request #2960 from castillofrancodamian/travel
luci-app-travelmate: update Spanish translation
2019-08-02 10:24:11 +02:00
Florian Eckert
f595819235
Merge pull request #2959 from castillofrancodamian/stat
luci-app-statistics: update Spanish translation
2019-08-02 10:23:50 +02:00