Commit graph

2750 commits

Author SHA1 Message Date
Jo-Philipp Wich
15cc74c6b4 luci-mod-network: interfaces.js: derive status from layer 3 device
Align the status column device selection logic with the approach used for
rendering the interface status boxes; first try to obtain the active
layer3 device as reported by ubus, only then fall back to the protocol
specific device hint which might or might not point to an existing device.

Fixes: #3076
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-18 07:33:25 +02:00
Jo-Philipp Wich
10880b565f luci-base: network.js: get low level device details from getifaddr() info
Fixes: #3078
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-18 07:19:18 +02:00
Jo-Philipp Wich
a67175cab1 luci-mod-system: disable redundant page actions in crontab, startup views
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-18 07:23:01 +02:00
Franco Castillo
0183eed288 luci-base and apps: update Spanish translation
Update of the Spanish translation of luci-base and some LuCI applications.

* luci-base
* adblock
* advanced-reboot
* aria2
* banip
* ddns
* firewall
* mjpg-streamer
* mwan3
* ntpc
* simple-adblock
* travelmate
* vpnbypass
* wifischedule
* wireguard

Signed-off-by: Franco Castillo <castillofrancodamian@gmail.com>
2019-09-17 23:40:37 -03:00
Jo-Philipp Wich
f878b21c8c luci-mod-system: remplement dropbear settings as client side view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-17 07:43:48 +02:00
Martin Schiller
2cdcec29ff luci-base: fix german translation for factory reset hint
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2019-09-16 09:32:25 +02:00
Jo-Philipp Wich
9ae9657a85 luci-mod-system: remplement password change as client side view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-16 07:54:25 +02:00
Jo-Philipp Wich
a31d1d10e0 luci-mod-system: reimplement SSH key mgmt as client side view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-15 20:00:36 +02:00
Jo-Philipp Wich
3e1cf14ad1 luci-base: add luci/setPassword rpc method, dropbear feature flag
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-16 07:49:05 +02:00
Jo-Philipp Wich
9ecfe33edd luci-base: luci.js: render view buttons depending on available functions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-17 07:03:27 +02:00
Jo-Philipp Wich
96fbca76c8 luci-base: form.js: implement JSONMap
Implement a new map type JSONMap which uses a JSON data structure instead
of uci as configuration data backend.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-16 07:55:45 +02:00
INAGAKI Hiroshi
f206c01844 luci-base: update Japanese translation
Updated Japanese translations.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2019-09-15 20:08:14 +09:00
INAGAKI Hiroshi
ec631c4960 i18n: sync translations
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2019-09-15 19:15:17 +09:00
Jo-Philipp Wich
2e206861ae luci-base: luci.js: append version when dynamically loading classes
This allows for some naive cache busting when the LuCI version changes,
to avoid loading outdated classes from cache.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-14 17:44:32 +02:00
Jo-Philipp Wich
208bf47a33 luci-base: cbi.js: update dependencies after widgets have been rendered
Fixes: #3066
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-14 17:20:41 +02:00
Jo-Philipp Wich
7c9d1a259c luci-base: network.js: register "none" protocol
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-14 17:04:02 +02:00
Jo-Philipp Wich
88c16e17d9 luci-mod-network: wireless.js: restore mac hints in mac list widget
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-13 14:19:33 +02:00
Jo-Philipp Wich
2dd17fad6c luci-base: network.js: implement Hosts.getMACHints()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-13 14:18:43 +02:00
Jo-Philipp Wich
3734f88c35 luci-base: fix ip6hint option dependencies and validation
Ref: https://forum.openwrt.org/t/odhcpd-make-lease-file-persistent/44118/8
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-13 12:57:08 +02:00
Jo-Philipp Wich
b384683d14
Merge pull request #3060 from tano-systems/pr/update-ru-i18n
luci-base: Update Russian translation
2019-09-13 11:06:30 +02:00
Anton Kikin
8e171a9f3d luci-base: Update Russian translation
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
2019-09-13 00:13:04 +03:00
Franco Castillo
da2ec04075 luci-base: update Spanish translation
Signed-off-by: Franco Castillo <castillofrancodamian@gmail.com>
2019-09-12 16:34:11 -03:00
Franco Castillo
37efc4f918 luci-base: update Spanish translation
Signed-off-by: Franco Castillo <castillofrancodamian@gmail.com>
2019-09-12 16:06:32 -03:00
Jo-Philipp Wich
af19ebb706 luci-mod-system: improve LED configuration page
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12 19:22:59 +02:00
Jo-Philipp Wich
fad01ae1a4 luci-base: sys.lua: fix init script enable action
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12 18:56:24 +02:00
Jo-Philipp Wich
53516cc302 luci-mod-system: add heading to startup page, improve error reporting
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12 18:55:50 +02:00
Jo-Philipp Wich
0e5be0d68a luci-mod-system: reimplent system/crontab as client side view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12 18:48:58 +02:00
Jo-Philipp Wich
8178ac15b6 luci-base: whitelist file/write actions on /etc/rc.local
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12 14:42:12 +02:00
Jo-Philipp Wich
0eb5661e8c luci-mod-system: restore rc.local editing functionality
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12 14:41:30 +02:00
Jo-Philipp Wich
113e2c0217 luci-mod-system: reimplent system/startup as client side view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12 14:16:06 +02:00
Jo-Philipp Wich
473bd2741b luci-base: rpc.js: fix list requests, handle aborted http requests
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12 14:02:06 +02:00
Jo-Philipp Wich
cc81d5a0d4 luci-base: fix list method handling in ubus-rpc protocol proxy
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12 14:00:47 +02:00
Jo-Philipp Wich
2cc6ff7f6b luci-base: drop unused tools.status.switch_status() call
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12 11:09:57 +02:00
Jo-Philipp Wich
82743b3bd4 luci-mod-network: reimplement switch configuration as client side view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12 11:09:57 +02:00
Jo-Philipp Wich
5fd21bc9ef luci-base: add luci/getSwconfigFeatures and luci/getSwconfigPortState
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12 11:09:57 +02:00
Jo-Philipp Wich
9be42e29e7 luci-base: form.js: handle non-string values in stripTags()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12 11:09:57 +02:00
Jo-Philipp Wich
441bd24d07
Merge pull request #3056 from musashino205/l10n/base-upd-ja
luci-base: update Japanese translation
2019-09-12 10:12:33 +02:00
INAGAKI Hiroshi
3b4c4bf415 luci-base: update Japanese translation
Updated Japanese translations.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2019-09-12 16:55:38 +09:00
Yurii
2faa39cee3
luci-base: update Ukrainian translation
Update Ukrainian translation according the latest translation resync. Сorrections and additions.

Signed-off-by: Yurii <yuripet@gmail.com>
2019-09-12 02:46:17 +03:00
Jo-Philipp Wich
5e7e9b58cf luci-base: restore some lost translations and update german
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-11 14:03:11 +02:00
Jo-Philipp Wich
16bcd1a364 luci-base: resync translations
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-11 12:58:18 +02:00
Jo-Philipp Wich
34e73fd983 luci-base: widgets.js: fix display quirk in tools.widgets.DeviceSelect
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-11 12:44:34 +02:00
Jo-Philipp Wich
c96de72043 luci-base: validation.js: implement length() datatype validator
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-11 12:28:58 +02:00
Jo-Philipp Wich
f32f42bc25 luci-mod-network: add missing dependency on rpcd-mod-iwinfo
Fixes: 963b7636b ("luci-mod-network: switch to client side wifi configuration pages")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-11 12:27:02 +02:00
Jo-Philipp Wich
34f2c0acdb luci-base: view.htm: catch and render exceptions on view instantiation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-11 12:21:51 +02:00
Jo-Philipp Wich
a0d1294566 luci-base: luci.js: register rpc interceptor to catch expired sessions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-11 12:21:24 +02:00
Jo-Philipp Wich
c3ddcbb542 luci-base: luci.js: rework error handling
- Capture stack trace in L.raise() if passed type is not an Error instance
 - Use L.ui.addNotification in L.error() to render the error message
 - Prevent duplicate error reporting in the ui

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-11 12:21:05 +02:00
Jo-Philipp Wich
f141433f5e luci-base: rpc.js: revamp error handling, add interceptor support
Add two new functions L.rpc.addInterceptor() and L.rpc.removeInterceptor()
which allow to register and remove interceptor functions which are invoked
before the rpc reply result promise is fulfilled.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-11 09:25:11 +02:00
Jo-Philipp Wich
94a9f600d3 luci-base: ui.js: implement addNotification() helper
The L.ui.addNotification() function pushes a dismissable banner message to
the top of the view.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-11 09:22:13 +02:00
Jo-Philipp Wich
5dc61be746 luci-base: replace luci/getHostname with generic file/read rpc operation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:29:15 +02:00
Jo-Philipp Wich
9cae3b9e67 protocols: replace luci/getTTYDevices calls with generic file/list ones
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:29:04 +02:00
Jo-Philipp Wich
5697ebbef5 luci-base: add hostapd/wpa_supplicant cli feature flags
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
963b7636b4 luci-mod-network: switch to client side wifi configuration pages
Rewrite the wireless network management views in client side JS using ubus
rpc calls for the router communication.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
dab0a11b73 luci-base: form.js: store pointer to parent map in modal overlay map
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
03f9528847 luci-base: form.js: pass-through promise in handleAdd
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
18e6b17911 luci-base: network.js: add getHostHints() api
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
3f93650901 luci-base: use cgi-io and rpcd-mod-file to handle file upload and browsing
Remove the old server side support for file browsing and file uploading
and switch to a client side widget instead which uses XMLHTTPRequests to
upload files via cgi-io and RPC calls for file listing and status queries.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
1fcf34510a luci-base: cbi.js: handle ui elements which return a promise in render()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
6d9a23af60 luci-base: cbi.js: fix unintended number sign overflow in format
Fixes: #3003
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
642b8277df luci-base: form.js: use createHandlerFn() for click actions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
eac8316e0d luci-base: luci.js: use createHandlerFn() for page actions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
e14b884771 luci-base: form.js: do not consider inactive fields for dependency checks
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
aef4bc3a23 luci-base: rpc.js: add getStatusText() call
The new function allows translating an ubus return code into a human
readable error message.

Also report the called object and method on ubus rpc errors.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
93af8a3af8 luci-base: network.js: fix, rework and improve wireless state handling
- Use new getWirelessDevices rpc method to optimize data fetching
 - Implement further getters to access iwinfo information
 - Implement assoc- and scan list functions
 - Simplify internal data model

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
8cd40eb1e6 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>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
8481330e42 luci-base: luci.js: support passing FormData as request payload
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
d5e6688072 luci-base: luci.js: support registering request progress handlers
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
88969529f1 luci-base: luci.js: fix L.Poll.remove()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
14b6ea6ea7 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>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
ac56dc057d luci-base: form.js: use createHandlerFn() for modal button actions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
c352fbf5e9 luci-base: form.js: disable write/remove actions for DummyValue widgets
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
06f4feca1d protocols: drop server side cbi implementations of protocol handlers
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
e4bc192012 luci-mod-network: switch to client side interface configuration pages
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
6a2a53a829 protocols: add client side protocol handler implementations
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
0674fc2041 luci-base: rpcd: add getHostname and getTTYDevices calls
Also add IPv6 feature indication.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
55b1ae6c9b luci-base: network.js: add hacks to enable relay protocol support
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
d905dacf97 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>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
745878d6cd 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>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
b0dde567ca luci-base: ui.js: also handle failed promises in createHandlerFn()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
3500562d5e luci-base: ui.js: ignore description when checking for empty tab panes
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
6b1003cd50 luci-base: luci.js: support custom filter function in dom.isEmpty()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
muink
6221b1bdaa
luci-base: hosts.js: Update chinese translations
Signed-off-by: muink <hukk1996@gmail.com>
2019-09-06 21:33:30 +08:00
Jo-Philipp Wich
f9074ad68b
Merge pull request #3010 from TDT-AG/pr/20190826-dsl-status-FECS
luci-mod-status: xDSL Status: use new var names dsl.errors_fecs_*
2019-09-03 19:28:53 +02:00
Yurii
5f056678a2
luci-base: fix some Ukrainian translations
Signed-off-by: Yurii <yuripet@gmail.com>
2019-08-26 13:26:36 +03:00
Martin Schiller
5c4a5525c5 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>
2019-08-26 12:03:07 +02:00
Martin Schiller
38d2b31b94 luci-base: fix some german translations
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2019-08-26 09:05:07 +02:00
INAGAKI Hiroshi
a4c95f6647 luci-base: update Japanese translation
Updated Japanese translations.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2019-08-21 23:44:48 +09:00
INAGAKI Hiroshi
4b40b0d6fc i18n: sync translations
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2019-08-21 23:07:14 +09:00
Jo-Philipp Wich
2aab85814d 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>
2019-08-19 15:06:31 +02:00
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
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
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
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
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
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
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
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
eb9051c307 luci-base: form.js: add modal dialog hook
Add a new `addModalOptions()` hook which allows to supply additional
cbi options the modal map before the dialog is rendered.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-01 16:48:50 +02:00
Jo-Philipp Wich
5e67b8b72b luci-base: form.js: update tab state on dependency checks
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-01 16:47:33 +02:00
Jo-Philipp Wich
89bcae20d0 luci-base: ui.js: tabs: fix empty pane checking, allow alternative query root
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-01 16:47:19 +02:00
Jo-Philipp Wich
27e4146461 luci-base: luci.js: add L.dom.isEmpty() helper
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-01 16:47:19 +02:00
Jo-Philipp Wich
360e9769d6 luci-base: ui.js: mark widget optional if empty choice is present
Fixes: #2943
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-01 16:45:54 +02:00
Jo-Philipp Wich
1fe45a9344 luci-base: index.html: add extend cache-control directive
Fixes: #2942
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-01 15:43:35 +02:00
Hannu Nyman
15088a31b8
Merge pull request #2935 from YuriPet/patch-1
luci-base: update Ukrainian translation
2019-07-30 18:51:13 +03:00
Hannu Nyman
9217742d0a
Merge pull request #2934 from antoinedeschenes/patch-1
luci-mod-network: 802.11w config in station mode
2019-07-30 18:50:08 +03:00
Antoine Deschênes
011d9d0176 luci-mod-network: 802.11w config in station mode
802.11w has to be enabled in station mode to be effective. If the AP is using WPA3-SAE or requires 11w, station will not connect unless 11w is enabled via this option.

Signed-off-by: Antoine Deschênes <adeschenes@kronostechnologies.com>
2019-07-30 08:50:13 -04:00
Jo-Philipp Wich
8a947ea550 luci-base: ui.js: do not save invalid dynlist values
Fixes: 3880c3f22 ("luci-base: ui.js: save filled out but not added dynlist items on submit")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-30 13:33:46 +02:00
Jo-Philipp Wich
3880c3f22f luci-base: ui.js: save filled out but not added dynlist items on submit
Fixes: #2938
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-30 13:29:11 +02:00
Yurii
66cdd4363a
luci-base: update Ukrainian translation
Signed-off-by: Yurii <yuripet@gmail.com>
2019-07-30 02:26:21 +03:00
Florian Eckert
78b4ccb5b1
Merge pull request #2929 from tano-systems/pr/luci-base-i18n-ru
luci-base: update Russian translation
2019-07-29 09:53:16 +02:00
Franco Castillo
e699eb9759 luci-base: update Spanish translation
Update Spanish translation.

Signed-off-by: Franco Castillo <castillofrancodamian@gmail.com>
2019-07-27 20:50:18 -03:00
Jo-Philipp Wich
2d3470b700 luci-base: don't treat .rmempty flag as optional for ListValue widgets
Restore the old CBI behaviour of not automatically rendering empty
selection choices in ListValue select dropdowns when .rmempty is
specified.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-27 22:33:36 +02:00
Anton Kikin
7bf0e71e60 luci-base: update Russian translation
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
2019-07-27 23:19:45 +03:00
Jo-Philipp Wich
b949c02624
Merge pull request #2923 from tano-systems/pr/multi-fix
luci-base: fix multiple parameter in cbi templates
2019-07-27 20:21:08 +02:00
INAGAKI Hiroshi
be275fd42a i18n: sync translations
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2019-07-27 02:30:20 +09:00
Anton Kikin
aeba90032f luci-base: fix multiple parameter in cbi templates
In the dc0211803e commit, the parameter "multi" in ui.js is
replaced with "multiple" everywhere. Thus, it must also be changed
in the cbi templates.

Fixes: dc0211803e
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
2019-07-26 18:18:42 +03:00
Jo-Philipp Wich
b4129640b4 luci-base: keep polling confirmation endpoint on XHR failures
Fixes: #2912
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-26 12:25:46 +02:00
Jo-Philipp Wich
28aafc0dd4 luci-base: form.js: pass-through placeholder option of CBIListValue
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-26 10:22:05 +02:00
Jo-Philipp Wich
c67f052d91 luci-base: ui.js: HTML escape uci changelog values
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-26 10:22:05 +02:00
Jo-Philipp Wich
a6c538a776 luci-base: ui.js: HTML escape custom dropdown values
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-26 10:22:05 +02:00
Jo-Philipp Wich
86fcf91633 luci-base: ui.js: fix event binding for UISelect
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-26 10:22:05 +02:00
Jo-Philipp Wich
fd35e9a226 luci-mod-system: leds.js: fix crash when no usb devices or ports are present
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-25 08:49:18 +02:00
Jo-Philipp Wich
f5919a990f luci-base: remove accidentally committed code
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-22 16:48:35 +02:00
Jo-Philipp Wich
b2aada6c82 luci-base: add conntrack_helpers ubus procedure
Also move firewall specific ACLs into separate group.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-22 16:35:58 +02:00
Jo-Philipp Wich
ac96b8be43 luci-base: widgets.js: implement CBIDeviceSelect netdev picker
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-22 16:31:25 +02:00
Jo-Philipp Wich
3c332c6075 luci-base: widgets.js: handle devices or subnets in CBIZoneForwards
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-22 16:30:33 +02:00
Jo-Philipp Wich
b63576bbe7 luci-base: firewall.js: add zone.getDevices() and zone.getSubnets() getters
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-22 16:29:42 +02:00
Jo-Philipp Wich
e6ff0f39bb luci-base: widgets.js: CBIZoneSelect: improve initial rendering
Ref: https://github.com/openwrt/luci/issues/2889
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-22 08:58:59 +02:00
Jo-Philipp Wich
d1841af2f0 luci-base: widgets.js: CBIZoneSelect: fix availability of "device" choice
Ref: https://github.com/openwrt/luci/issues/2889
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-22 08:40:38 +02:00
Jo-Philipp Wich
0be4ad51a0 luci-app-firewall: fix cbi form for rules
- Set src/dest defaults only in initial section create state, otherwise it
   is impossible to specify output rules
 - Get rid of dest_remote/dest_local widget switching and implement change
   logic directly in tools.widgets.CBIZoneSelect
 - Remove leftover debug code

Ref: https://github.com/openwrt/luci/issues/2889
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-21 22:35:24 +02:00
Yurii
6a1db0171f
luci-base: correct spelling mistake in Ukrainian translation
Signed-off-by: Yurii <yuripet@gmail.com>
2019-07-21 13:27:19 +03:00
Jo-Philipp Wich
140456f07a luci-mod-network: fix typo in wifi scan JS code
Fixes: 8dd2df29c ("luci-mod-network: improve wifi scan status reporting")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-21 09:42:48 +02:00
Yurii
2cf70faf8d
luci-base: Update Ukrainian translation
Update Ukrainian translation according the latest translation resync.

Signed-off-by: Yurii <yuripet@gmail.com>
2019-07-20 23:51:31 +03:00
Anton Kikin
780af6b9e6 luci-base: update Russian translation
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
2019-07-20 15:32:10 +03:00
Franco Castillo
b3461cd4dd luci-base: Update Spanish translation
Update Spanish translation.

Signed-off-by: Franco Castillo <castillofrancodamian@gmail.com>
2019-07-19 17:25:25 -03:00
Jo-Philipp Wich
e50edeeb03 luci-mod-status: luci-bwc: use 64bit traffic counters
Fixes: #2659
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-19 21:56:53 +02:00
Jo-Philipp Wich
8aad613f1a luci-base: update german translation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-19 18:18:25 +02:00
Jo-Philipp Wich
9070fbc146 luci-base: resync base translations
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-19 18:07:04 +02:00
Jo-Philipp Wich
8dd2df29c4 luci-mod-network: improve wifi scan status reporting
Attempt to properly report the scan status by treating 404 replies as
not yet completed scans and empty array replies as successful scans
that did not yield any results.

Fixes: #2874
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-19 17:59:05 +02:00
Jo-Philipp Wich
5510bdae39 luci-base: render default values for all server side cbi map widgets
Fixes: 9c7eb1dec ("luci-base: switch from server side to client side widget markup")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-19 17:28:36 +02:00
Jo-Philipp Wich
dc0211803e luci-base: ui.js: fix multi vs. multiple keyword confusion
The "luci.form" and "luci.tools.widgets" classes use the "multiple"
keyword while ui.js uses "multi" internally, leading to single-value
dropdowns widget values getting stored as uci lists.

Fix the issue by using "multiple" everywhere.

Fixes: #2871
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-19 10:39:54 +02:00
Yurii
3635a32c56
luci-base: update Ukrainian translation
Updates, fixes and additions.

Signed-off-by: Yurii <yuripet@gmail.com>
2019-07-16 21:16:53 +03:00
Anton Kikin
82e20d437c luci-base: fix Russian translation
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
2019-07-15 15:50:45 +03:00
Florian Eckert
97c8ed26b5
Merge pull request #2859 from castillofrancodamian/base
luci-base: Update Spanish translation
2019-07-14 13:51:44 +02:00
Franco Castillo
8a73115ca3 luci-base: Update Spanish translation
Update Spanish translation.

Signed-off-by: Franco Castillo <castillofrancodamian@gmail.com>
2019-07-13 22:55:39 -03:00
Anton Kikin
be28d9c9bf luci-base: update Russian translation
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
2019-07-13 23:03:09 +03:00
INAGAKI Hiroshi
7b1aabc29c luci-base: update Japanese translation
Updated Japanese translations.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2019-07-13 19:23:18 +08:00
INAGAKI Hiroshi
19c4b71af4 i18n: sync translations
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2019-07-13 19:23:18 +08:00
INAGAKI Hiroshi
48b61ca2c4 luci-base: fix translatable text in ui.js
Removed unnecessary symbols ("%>") at the end of the text.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2019-07-13 19:23:18 +08:00
Jo-Philipp Wich
7c9d845d9b luci-base: luci.js: add Promise.finally polyfill
Fixes: #2854
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-12 10:42:41 +02:00
Yurii
91194f42c4 luci-base: update Ukrainian translation
Updates, fixes and additions.

Signed-off-by: Yurii <yuripet@gmail.com>
2019-07-12 09:22:08 +02:00
Jo-Philipp Wich
3dcb061dcc luci-base: ui.js: fix UISelect.setValue()
Fixes: #2852
Fixes: ce04d7f ("luci-base: fix label-to-input association in js cbi maps")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-12 09:17:14 +02:00
Jo-Philipp Wich
4b941bce40 luci-base: luci.js: only use overrideMimeType when supported
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-11 15:06:13 +02:00
Jo-Philipp Wich
a7bfaf9b0b luci-base: validation.js: fix nested function declarations
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-11 15:04:54 +02:00
Jo-Philipp Wich
43043a46a3 luci-base: ui.js: fix UISelect.getValue()
Fixes: #2852
Fixes: ce04d7f04 ("luci-base: fix label-to-input association in js cbi maps")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-11 14:40:51 +02:00
Jo-Philipp Wich
69e5488c13 luci-base: luci.js: fix undefined "this" when /ubus/ is unavailable
Fixes: #2850
Fixes: 66dfe64ca ("luci-base: luci.js: cache determined RPC base url in session storage")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-10 13:30:52 +02:00
Jo-Philipp Wich
b5895e7c63 luci-mod-status: show all interface addresses on index page
Insteado f displaying only the primary/delegated address, display all
configured IP addresses in the upstream interface boxes, similar to
the interface overview page.

Fixes: #2757
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-10 07:15:02 +02:00
Jo-Philipp Wich
66dfe64ca1 luci-base: luci.js: cache determined RPC base url in session storage
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-10 07:15:02 +02:00
Jo-Philipp Wich
ffdafd4800 luci-base: properly handle getWifiNetidBySid() return value
The getWifiNetidBySid() helper returns an array containing the network id
and the corresponding radio name, not just the id.

Fixes: #2846.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-09 17:50:21 +02:00
Jo-Philipp Wich
ce04d7f040 luci-base: fix label-to-input association in js cbi maps
Fixes: #2845
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-09 14:09:22 +02:00
Jo-Philipp Wich
006f7c7932 luci-base: use native ubus HTTP gateway if available
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-08 17:39:24 +02:00
Jo-Philipp Wich
acbc031a6d luci-base,luci-mod-system: split ubus localtime into get and set call
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-08 17:07:11 +02:00
Jo-Philipp Wich
abee9138de luci-base: add rpcd ACL rules
Add required ACL rules to allow access to the native ubus HTTP
interface directly.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-08 16:25:30 +02:00
Jo-Philipp Wich
8055ed4c46 Revert "luci-base: luasrcdiet: switch to scm clone and fix tarball name"
This reverts commit faa5f0eacd.

Fixes: #2834
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 22:03:28 +02:00
Jo-Philipp Wich
f4c87f4dc4 luci-base: mvalue.htm: fix reading back multi value options
Fixes: 2a229e50c ("luci-base: fix cbi mvalue templates")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 21:27:00 +02:00
Jo-Philipp Wich
2a229e50cf luci-base: fix cbi mvalue templates
Fixes: 9c7eb1dec ("luci-base: switch from server side to client side widget markup")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 21:13:02 +02:00
Jo-Philipp Wich
875a96f653 luci-mod-network: switch hostname configuration to client side js
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 20:14:18 +02:00
Jo-Philipp Wich
91afb6fae2 luci-base: network.js: dynamically calculate IPv4 netmasks
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 20:12:42 +02:00
Jo-Philipp Wich
f970c485cf treewide: switch to shared isObject(), toArray() and sortedKeys() helpers
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 20:11:35 +02:00
Jo-Philipp Wich
37ca6fe6d6 luci-base: luci.js: add isObject(), toArray() and sortedKeys() helper
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 20:10:13 +02:00
Jo-Philipp Wich
d6aa68ae0d luci-mod-network: switch route configuration page to client side view
Also implement extended route attributes via modal dialog.

Fixes: #2695
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 19:12:59 +02:00
Jo-Philipp Wich
bce291e6c9 luci-base: form.js: reload map data when saving modal forms
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 19:12:59 +02:00
Jo-Philipp Wich
f8e6caf552 luci-base: widgets.js: add textvalude representation for network select
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 19:12:59 +02:00
Jo-Philipp Wich
1fad6c0eed
Merge pull request #2806 from dibdot/magic
system-wide: fix escaping of magic chars
2019-07-07 15:39:56 +02:00
Jo-Philipp Wich
e13822e709 luci-base: uci.js: track packages affected by reorder operations
This is required to properly reload the configurations after applying uci
changes that solely consist of uci section ordering operations.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:26 +02:00
Jo-Philipp Wich
00a3da1fb3 luci-base: fix regular expression in network.Protocol.getDevices()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:26 +02:00
Jo-Philipp Wich
a13dba8071 luci-base: add tools.widgets JS library
Add a tools.widgets library which bundles a number of useful, higher
level CBI widgets like firewall zone list or network interface dropdowns

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:26 +02:00
Jo-Philipp Wich
1bd9ee91af luci-base: validation.js: rework translation labels
Rework validation error translations for compount operators such
as list() or neg() to not rely that much on specific native language
grammar.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:26 +02:00
Jo-Philipp Wich
0560858380 luci-base: uci.js: add extended section syntax support, improve loading
Add support for extended section syntax notation in @type[#] format and
refactor the package loading function to not load configurations twice
when a package load operation is already pending and another load request
is made for the same package.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:26 +02:00
Jo-Philipp Wich
dc2b38cb6f luci-base: {ui,form}.js: allow passing additional CSS classes to modals
Add the ability to pass additional CSS classes to modal dialogs and
make use of this facility in form.js to annotate CBI map modals.

This can be used later by themes to apply additional CSS rules.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:26 +02:00
Jo-Philipp Wich
1605f29b6f luci-base: luci.js: don't abort finished xhr objects
Calling abort() on a finished xhr object will clear properties such
as status which can confuse code relying on legacy LuCI request
helper functions.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:26 +02:00
Jo-Philipp Wich
0bcb9f9f1d luci-base: cbi.js: fix number rounding in string.format()
Ensure that patterns like %d, %x, %o or %b properly truncate their
operands to whole integers.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:26 +02:00
Jo-Philipp Wich
0539e7f6b9 luci-base: form.js: support placeholders for DynamicList widgets
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
1482554de6 luci-base: form.js: fix rendering flag values in modals
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
ff775a69f7 luci-base: form.js: trigger validation before saving cbi map
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
bf3bf6a8a9 luci-base: form.js: prevent section creation on modal cbi save failure
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
4a0f8b5541 luci-base: ui.js: fix rendering of rich dropdown placeholders
Placeholders may be HTML elements instead of plain strings, so do
not use innerHTML to assign them but rely on L.dom.content() instead.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
2f79aa1c35 luci-base: implement further ubus calls
Implement new ubus rpcd backend calls for later use in the frontend:

 - netdevs: dump information about Linux network devices present
 - boardjson: dump /etc/board.json if present
 - offload_support: query whether netfilter offloading is supported

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
c5b6f42943 luci-base: fix handling of large ubus HTTP requests
Properly handle ubus POST requests exceeding the default chunk size
and fix a possible nil dereference when rejecting incoming requests
due to bad JSON message framing.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
79be2d57cd luci-base: add client-side implementation of luci.model.firewall
Introduce firewall.js, a client side reimplementation of the
luci.model.firewall class.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
eecf859b29 luci-base: add client-side implementation of luci.model.network
Introduce network.js, a client side reimplementation of the
luci.model.network class.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
928adb6484 luci-base: add client-side prng library
Introduce a new tools.prng JS library which implements the musl libc
srand() and rand() calls to produce identical pseudo random number
sequences in the browser which is needed for the string to color
conversion later on.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
5950b87dac luci-base: luci.js: make require() failures catcheable
Refactor L.require() to use L.raise() instead of L.error() to signal
class loading failures. This allows callers to handle class loading
errors in a graceful manner.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
6edc057451 luci-base: split off CBI validations into separate class
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
8a6b89c671 luci-base: luci.js: rework L.error()
Factor out an L.raise() function out of L.error() which constructs and
throws an exception object.

Rework the remaining L.error() function to internally use L.raise() to
construct exceptionts to render.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
f302eabd72 luci-base: form.js: default to unlimited dropdown size
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
c2f8bc90ff luci-base: ui.js: improve dropdown behaviour
- Do not artificially cutoff dropdown items, use all available space
 - Close open dropdown when clicking into the preview area

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
a96bec68a0 luci-mod-network: replace DHCP & DNS view with client side implementation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
bfae09e574 luci-base: implement lease status ubus call
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
a31dc6f3c1 luci-base: rpc.js: drop batch api
Now that LuCI.Request is transparently coalescing requests, there
is no need for the rather cumbersome batch()/flush() api in rpc.js.

Also refactor the code to get rid of the rpcRequestRegistry indirection
and remove superfluous promises which simplifies the code a lot.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
5264a943b9 luci-mod-system: rework leds.js and system.js views
- Drop manual RPC batch usage
- Use LuCI.Poll for status updates

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Jo-Philipp Wich
b21a2813b4 luci-base: luci.js: auto-coalesce ubus requests
Extend LuCI.Request to automatically coalesce subsequent requests
to ubus resources into single batch requests.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:24 +02:00
Jo-Philipp Wich
90288b2e2c luci-base: rpc.js: make base URL configurable
Implement setters and getters for the base URL prefix used and also
implement a session ID getter while we're at it.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:24 +02:00
Jo-Philipp Wich
eee323cb66 luci-base: luci.js: introduce generic LuCI.Poll
Introduce a new LuCI.Poll class which is able to repeat any
promise based function and not strictly tied to HTTP request
semantics.

Also rework LuCI.Request.Poll and XHR.Poll as well as
LuCI.start(), LuCI.stop(), LuCI.halt() etc. to redirect to
the new api.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:24 +02:00
Jo-Philipp Wich
8a8e8e0aac luci-base: luci.js: enable strict mode
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:24 +02:00
Jo-Philipp Wich
74ccea6fa2 luci-base: luci.js: handle postprocessed sources
- Fix discovering base url if cache buster is appended to luci.js href
 - Fix extracting require tokens in minified sources

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:24 +02:00
Jo-Philipp Wich
675824e377 luci-mod-system: use client side cbi forms for system and led config
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:24 +02:00
Jo-Philipp Wich
c7a9900c87 luci-base: add sys.init.reload() and sys.init.restart() actions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:24 +02:00
Jo-Philipp Wich
6665a1d78c luci-base: add rpcd backend plugin
Add an rpcd executable plugin containing procedures required by client
side views.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:24 +02:00
Jo-Philipp Wich
3bc73a7d05 luci-base: luci.js: catch base class loading errors
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:24 +02:00
Jo-Philipp Wich
b839ee87f2 luci-base: introduce form.js
Add a new client side form.js library which is a more or less direct
reimplementation of the Lua side cbi.lua in JavaScript.

Due to its client side nature, it supports a number of features which
would be hard to realize on the server side, such as drag&drop sorting,
modal sub-map dialogs, reload-free editing etc.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:24 +02:00
Jo-Philipp Wich
9c7eb1decd luci-base: switch from server side to client side widget markup
Do not render standard widgets like checkboxes, select boxes,
text input fields etc. on the server side anymore but utilize
the ui.js primitives instead.

This avoids logic duplication between server side cbi templates
and JS widgets in the future.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:24 +02:00
Jo-Philipp Wich
808b9f36eb luci-base: cbi.js, ui.js: add custom validation callbacks, new ui widgets
Implement further widget primitives like text inputs or checkboxes and
support custom validation callback functions when instantiating CBI
validators.

Also add support initializing ui.js widgets from the "data-ui-widget"
HTML attribute.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:23 +02:00
Jo-Philipp Wich
2beb9fa16f luci-base: add client based view actions
Introduce a new view() target for CBI dispatch nodes, as long with the
required template and plumbing work in luci.js to allow requiring view
classes.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
5b7924c808 luci-base: luci.js: tweak error handling
If the ui class is loaded, use its modalDialog facility to display runtime
errors, alternatively render them into the maincontent area.

Also prevent duplication of stack trace information and throw a low level
error on session expiration to allow higher layers to properly handle it.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
fda4ba598c luci-base: replace uci change pages with client side modal dialog
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
1dd910148e luci-base: add uci.js and rpc.js classes
Add a new rpc.js class which provides low level facilities to exchanges
messages with the ubus rpc endpoint.

Also introduce a new uci.js class which provides client side uci
manipulation routines.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
c89bbd50fd luci-base: add ubus-http gateway
Add an admin/ubus route mimicking the native uhttpd-mod-ubus protocol.

The main difference to the native protocol is that this gateway requires
no additional per-object/procedure ACL setup on the router side and that
it is located under the same prefix as LuCI itself, allowing the reuse
of the session login cookie.

This route is meant to be a transitional mechanism until client side
RPC calls are eventually migrated to uhttpd-mod-ubus completely.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
558f8c3b2a luci-base: move dropdown, combox and dynlist widget code to L.ui
Move the widget code to the ui class and replace it with compatibility
shims in cbi.js

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
e4c29c6db4 luci-base: luci.js: add L.dom.data()
Add a new data() function which allows to attach arbitrary JS data
to DOM elements.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
4a9f784a2a luci-base: cbi.js: support field validation for formless inputs
JS CBI fields have no parent form element anymore.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
6b8701c7bf luci-base: cbi.js: untangle dropdown and dynlists from dependency update
In order to prepare the move of the dynlist and dropdown widgets into
the LuCI ui class, remove the direct calls to cbi_d_update() and replace
them with custom events instead.

Extend cbi_init() to handle these custom events and to invoke
cbi_d_update() when receiving them.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
1b931e0262 luci-base: luci.js: add L.bind() helper
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
ef187d5238 luci-base: luci.js: consolidate error handling
Add a new function L.error() which creates and throws a custom
error object with stack information and given type.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
26e54bb01f luci-base: luci.js: convert LuCI.dom to Class instance
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
344c4c5119 luci-base: luci.js: split ui helper functions into external ui.js
Use the new class loader infrastructure to move gui specific
functionality out of the luci.js core and dispatch a new event
'luci-loaded' which is fired once all external classes have
been fetched.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
ec6d4094b9 luci-base: luci.js: add dynamic class loader
Introduce L.require() to fetch additional JavaScript classes.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
992638947d luci-base: luci.js: convert LuCI to Class instance
Also hijack cbi_init() and call it after the LuCI DOM setup.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
843031f819 luci-base: luci.js: add HTTP request functions
Add a fetch() inspired HTTP request utility class to luci.js and
replace the old xhr.js class with a stub using the new request api.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
fee8c1fc9c luci-base: luci.js: add class construction helper
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
9be6bb0577 luci-base: add ES6 Promise polyfill for IE < Edge
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
53e20c4925 luci-base: luci.js: add Object.assign polyfill
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Yousong Zhou
3a24c2dbaa luci-base: hide autocomplete-preventing password input with bigger offset
Fixes openwrt/luci#2624

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-07-06 22:48:10 +08:00
Yousong Zhou
609f5290c8 luci-base: nowrap for password input and reveal button
Fixes openwrt/luci#2624

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-07-06 22:48:10 +08:00
Hannu Nyman
2f769ee087 timezone data: update to 2019b
Update timezone data to 2019b

http://mm.icann.org/pipermail/tz-announce/2018-December/000055.html
http://mm.icann.org/pipermail/tz/2019-July/028249.html

2019a:
* Palestine "springs forward" on 2019-03-30 instead of 2019-03-23.
* Brazil no longer observes DST.

2019b:
* Palestine's 2019 spring-forward transition was on 03-29, not 03-30.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2019-07-05 17:56:04 +03:00
Martin Schiller
cc360b94f8 luci-base: fix typo in german translation
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2019-07-02 09:13:15 +02:00
Martin Schiller
001dc0664e luci-base: add german translations for led trigger
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2019-07-01 08:51:17 +02:00
Martin Schiller
19289107dd luci-mod-system: fix flash activity trigger name
The former name "Flashmemory write access" is wrong. The triggers also
indicate read/erase access to the flash memories.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2019-07-01 07:02:42 +02:00
Dirk Brenken
f73da9ca82
system-wide: fix escaping of magic chars
* fix escaping of magic lua chars (#2800)
* fix redundant second gsub line in shellstartsqescape function
* fix return value of shellstartsqescape function

Signed-off-by: Dirk Brenken <dev@brenken.org>
2019-06-29 19:26:07 +02:00
Hannu Nyman
1c80eb1962 luci-base: show niced processes on Status/Processes page
Modify the process status filter to allow also the processes
with a nice value to be visible on the Status/Processes page.

Filter out the top process itself.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2019-06-28 18:56:53 +03:00
Martin Schiller
a8f79f12d6 luci-mod-system: fix some led trigger name translations
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2019-06-28 15:44:26 +02:00
Florian Eckert
977f657791
Merge pull request #2061 from Ansuel/improveconn
luci-mod-admin-full: improve connection page lookup loop
2019-06-28 07:49:37 +02:00
Bjørn Mork
689934196f luci-mod-network: os-release variables have been renamed to OPENWRT_
commit 8a34a54b6aa6 ("base-files: use OPENWRT prefix for os-release
variables") changes the prefix of the os-release variables from LEDE_
to OPENWRT_.  Use the new name.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2019-06-26 14:54:27 +02:00
Franco Castillo
d3bb50dcd8 luci-base: Update Spanish translation
Update Spanish translation

Signed-off-by: Franco Castillo <castillofrancodamian@gmail.com>
2019-06-22 17:41:17 -03:00
Jo-Philipp Wich
1aa13ed51e luci-mod-system: prevent clearing rc.local on unrelated submit actions
Fixes: #2760
Fixes: 1c09ee5e4 ("luci-mod-system: fix SimpleForm usage on file editing pages")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-06-12 17:47:30 +02:00
Perry Thompson
1818499243 luci-base: update Traditional Chinese translation
Signed-off-by: Perry Thompson <contact@ryper.org>
2019-06-12 20:55:47 +08:00
a962702
b93d66d806 luci-base: update Traditional Chinese translation
update Traditional Chinese translations.

Signed-off-by: Andy Yun <a962702@yahoo.com>
2019-06-11 20:43:33 +08:00
Andy
7e27e3f930 luci-base: update Traditional Chinese translation
update Traditional Chinese translation.
Signed-off-by: Andy Yun <a962702@yahoo.com>
2019-06-11 20:43:33 +08:00
Hannu Nyman
0a5579a631 i18n: sync translations
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2019-06-09 19:24:00 +03:00
Anton Kikin
886e0b3eff luci-base: update Russian translation
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
2019-06-05 21:43:17 +03:00
Jo-Philipp Wich
1c09ee5e42 luci-mod-system: fix SimpleForm usage on file editing pages
When a value identical to the stored one is submitted, the CBI framework
will not emit an option write event and therfore not store the value in
the form data dictionary passed to SimpleForm.handle().

This usage pattern usally works be accident for file editor views such
as admin_system/crontab because \r\n windows style line endings are
substituted with unix \n ones before writing the data, defeating the
equality check in CBI.

When a single line without trailing newline is submitted however, the
CBI will not see a difference to the data stored in the file and clear
out the value on subsequent saves.

This commit alignes the logic used by various SimpleForm views to
behave identically and predictable:

 - File data is handled in the SimpleForm.handle() callback
 - The forcewrite property is used to disable equality checks
 - Submission of an empty string empties the backing file

Fixes: #2737
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-06-05 16:15:40 +02:00
Dirk Brenken
64fb538568
luci-base: fix duid_to_mac reference in status.lua
* fix for openwrt/packages#9148

Signed-off-by: Dirk Brenken <dev@brenken.org>
2019-06-04 16:54:24 +02:00
Ansuel Smith
bb34a31e81
luci-base: handle dhcp lease from odhcpd
Currently only the dnsmasq lease file is read for hostname hint. If someone use only odhcpd as dhcp daemon the hostname resolution on wifi_assoc list is broken.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2019-06-03 12:51:33 +02:00
Ansuel Smith
525d62ff33
luci-base: adds duid_to_mac to sys.lua
Move duid_to_mac function from status.lua to sys.lua.
Implement translation from DUID-LL without header to MAC

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2019-06-03 12:48:48 +02:00
Florian Eckert
889e8eec4f
Merge pull request #2670 from TDT-AG/pr/20190410-luci-mod-network
luci-mod-network: move auto option to general tab
2019-05-29 11:10:19 +02:00
Florian Eckert
d1d5471137
Merge pull request #2174 from rosysong/lease-status
luci-base: drop ipv6 lease status when IPV6 is not support
2019-05-25 21:43:50 +02:00
Lars Kruse
ed6a660261 luci-base: Update German translation
The following changes are included:
* properly handle "Präfix" as neuter
* add missing hyphens to many appearances of "Präfix"
* fix spelling
* add few missing translations

Signed-off-by: Lars Kruse <devel@sumpfralle.de>
2019-05-18 00:26:44 +02:00
Hannu Nyman
a7d35ede73
Merge pull request #2716 from castillofrancodamian/base
luci-base: Update Spanish translation
2019-05-17 16:56:26 +03:00
Zheng Qian
3435c5272d luci-base: zh_CN: update Simplified Chinese translation
Signed-off-by: Zheng Qian <sotux82@gmail.com>
2019-05-17 09:21:46 +08:00
Franco Castillo
7681967fcb luci-base: Update Spanish translation
Update Spanish translation

Signed-off-by: Franco Castillo <castillofrancodamian@gmail.com>
2019-05-16 20:14:14 -03:00
Franco Castillo
1df3fe306d luci-base: Update Spanish translation
Update Spanish translation

Signed-off-by: Franco Castillo <castillofrancodamian@gmail.com>
2019-05-15 00:25:07 -03:00
INAGAKI Hiroshi
fef11c2ac1 luci-base: update Japanese translation
Updated Japanese translations.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2019-05-13 18:58:37 +09:00
INAGAKI Hiroshi
b21a425a2c i18n: sync translations
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2019-05-13 18:18:52 +09:00
Jo-Philipp Wich
444f06b1b0
Merge pull request #2687 from HenryGiraldo/master
luci-mod-admin-full: add dependency for channel auto
2019-05-09 13:26:10 +02:00
Jo-Philipp Wich
6b7afabcdd luci-mod-admin-network: fix VLAN "add" button for empty switches
Fixes OpenWrt FS#2270.

Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2270
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-05-07 08:55:22 +02:00
Jo-Philipp Wich
0ac85a440a luci-base: remove interface from zone upon deletion
Fixes: #2690
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-05-06 08:22:39 +02:00
Ansuel Smith
e8bce3db42
luci-mod-admin-full: improve connection page lookup loop
Currently the lookup loop is very inefficient. This improve the lookup loop by moving the entities to a separate array and adds them only one time. Every entities is checked 3 times, after that it will be moved to dns cache as a raw addres (not resolved). This also introduce the Type column to identify common packet using the source port.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2019-05-02 12:50:36 +02:00
Enrique Giraldo
4518c06290 luci-mod-admin-full: add dependency for channel auto
Do not show 'auto' channel option if hostapd is
not compiled with CONFIG_ACS

Signed-off-by: Enrique Giraldo <hgiraldos@gmail.com>
2019-05-02 08:47:06 +02:00
Jo-Philipp Wich
e76caf18bf luci-base: luci.model.network: simplify is_auto()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-04-30 09:06:10 +02:00
Florian Eckert
18cde3535d
Merge pull request #2620 from TDT-AG/pr/20190311-luci-mod-system
luci-mod-system: add button to sync with ntp server
2019-04-30 08:22:50 +02:00
Florian Eckert
2b94060c60 luci-mod-network: add auto start hint
Make the information if the interface is started on boot visible on the
interface overview page.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-04-25 10:18:02 +02:00
Florian Eckert
3ff15a22d5 luci-mod-network: add is_auto option to iface_status
Make interface information is_auto available.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-04-25 10:16:32 +02:00
Florian Eckert
bea3879009 luci-base: add is_auto function
Add missing is_auto getter function.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-04-25 10:15:52 +02:00
Florian Eckert
3ffdf4160f
Merge pull request #2443 from TDT-AG/pr/20190109-luci-mod-system-password
luci-mod-system: add password strength info
2019-04-24 09:40:38 +02:00
Jo-Philipp Wich
3c7b3fa171
Merge pull request #2681 from dibdot/shadowsocks-fix
luci-app-shadowsocks-libev: fix cidr datatype
2019-04-23 17:29:52 +02:00