summaryrefslogtreecommitdiffhomepage
path: root/modules
AgeCommit message (Collapse)Author
2019-07-07luci-base: form.js: default to unlimited dropdown sizeJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: ui.js: improve dropdown behaviourJo-Philipp Wich
- 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-07luci-mod-network: replace DHCP & DNS view with client side implementationJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: implement lease status ubus callJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: rpc.js: drop batch apiJo-Philipp Wich
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-07luci-mod-system: rework leds.js and system.js viewsJo-Philipp Wich
- Drop manual RPC batch usage - Use LuCI.Poll for status updates Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: luci.js: auto-coalesce ubus requestsJo-Philipp Wich
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-07luci-base: rpc.js: make base URL configurableJo-Philipp Wich
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-07luci-base: luci.js: introduce generic LuCI.PollJo-Philipp Wich
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-07luci-base: luci.js: enable strict modeJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: luci.js: handle postprocessed sourcesJo-Philipp Wich
- 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-07luci-mod-system: use client side cbi forms for system and led configJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: add sys.init.reload() and sys.init.restart() actionsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: add rpcd backend pluginJo-Philipp Wich
Add an rpcd executable plugin containing procedures required by client side views. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: luci.js: catch base class loading errorsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: introduce form.jsJo-Philipp Wich
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-07luci-base: switch from server side to client side widget markupJo-Philipp Wich
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-07luci-base: cbi.js, ui.js: add custom validation callbacks, new ui widgetsJo-Philipp Wich
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-07luci-base: add client based view actionsJo-Philipp Wich
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-07luci-base: luci.js: tweak error handlingJo-Philipp Wich
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-07luci-base: replace uci change pages with client side modal dialogJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: add uci.js and rpc.js classesJo-Philipp Wich
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-07luci-base: add ubus-http gatewayJo-Philipp Wich
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-07luci-base: move dropdown, combox and dynlist widget code to L.uiJo-Philipp Wich
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-07luci-base: luci.js: add L.dom.data()Jo-Philipp Wich
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-07luci-base: cbi.js: support field validation for formless inputsJo-Philipp Wich
JS CBI fields have no parent form element anymore. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: cbi.js: untangle dropdown and dynlists from dependency updateJo-Philipp Wich
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-07luci-base: luci.js: add L.bind() helperJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: luci.js: consolidate error handlingJo-Philipp Wich
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-07luci-base: luci.js: convert LuCI.dom to Class instanceJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: luci.js: split ui helper functions into external ui.jsJo-Philipp Wich
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-07luci-base: luci.js: add dynamic class loaderJo-Philipp Wich
Introduce L.require() to fetch additional JavaScript classes. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: luci.js: convert LuCI to Class instanceJo-Philipp Wich
Also hijack cbi_init() and call it after the LuCI DOM setup. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: luci.js: add HTTP request functionsJo-Philipp Wich
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-07luci-base: luci.js: add class construction helperJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: add ES6 Promise polyfill for IE < EdgeJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: luci.js: add Object.assign polyfillJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-06luci-base: hide autocomplete-preventing password input with bigger offsetYousong Zhou
Fixes openwrt/luci#2624 Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-07-06luci-base: nowrap for password input and reveal buttonYousong Zhou
Fixes openwrt/luci#2624 Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-07-05timezone data: update to 2019bHannu Nyman
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-02luci-base: fix typo in german translationMartin Schiller
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2019-07-01luci-base: add german translations for led triggerMartin Schiller
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2019-07-01luci-mod-system: fix flash activity trigger nameMartin Schiller
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-06-29system-wide: fix escaping of magic charsDirk Brenken
* 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-28luci-base: show niced processes on Status/Processes pageHannu Nyman
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-28luci-mod-system: fix some led trigger name translationsMartin Schiller
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2019-06-28Merge pull request #2061 from Ansuel/improveconnFlorian Eckert
luci-mod-admin-full: improve connection page lookup loop
2019-06-26luci-mod-network: os-release variables have been renamed to OPENWRT_Bjørn Mork
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-22luci-base: Update Spanish translationFranco Castillo
Update Spanish translation Signed-off-by: Franco Castillo <castillofrancodamian@gmail.com>
2019-06-12luci-mod-system: prevent clearing rc.local on unrelated submit actionsJo-Philipp Wich
Fixes: #2760 Fixes: 1c09ee5e4 ("luci-mod-system: fix SimpleForm usage on file editing pages") Signed-off-by: Jo-Philipp Wich <jo@mein.io>