summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs
AgeCommit message (Collapse)Author
2019-09-11luci-base: widgets.js: fix display quirk in tools.widgets.DeviceSelectJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-11luci-base: validation.js: implement length() datatype validatorJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-11luci-base: luci.js: register rpc interceptor to catch expired sessionsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-11luci-base: luci.js: rework error handlingJo-Philipp Wich
- 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-11luci-base: rpc.js: revamp error handling, add interceptor supportJo-Philipp Wich
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-11luci-base: ui.js: implement addNotification() helperJo-Philipp Wich
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-10luci-base: replace luci/getHostname with generic file/read rpc operationJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: form.js: store pointer to parent map in modal overlay mapJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: form.js: pass-through promise in handleAddJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: network.js: add getHostHints() apiJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: use cgi-io and rpcd-mod-file to handle file upload and browsingJo-Philipp Wich
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-10luci-base: cbi.js: handle ui elements which return a promise in render()Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: cbi.js: fix unintended number sign overflow in formatJo-Philipp Wich
Fixes: #3003 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: form.js: use createHandlerFn() for click actionsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: luci.js: use createHandlerFn() for page actionsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: form.js: do not consider inactive fields for dependency checksJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: rpc.js: add getStatusText() callJo-Philipp Wich
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-10luci-base: network.js: fix, rework and improve wireless state handlingJo-Philipp Wich
- 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-10luci-base: luci.js: support passing FormData as request payloadJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: luci.js: support registering request progress handlersJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: luci.js: fix L.Poll.remove()Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: form.js: use createHandlerFn() for modal button actionsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: form.js: disable write/remove actions for DummyValue widgetsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10protocols: add client side protocol handler implementationsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: network.js: add hacks to enable relay protocol supportJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: ui.js: update tabs after initial renderJo-Philipp Wich
This ensures that the error badges are properly set. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: form.js: rework section add/remove event handlingJo-Philipp Wich
- 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-10luci-base: ui.js: also handle failed promises in createHandlerFn()Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: ui.js: ignore description when checking for empty tab panesJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: luci.js: support custom filter function in dom.isEmpty()Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-19luci-base: form.js: implement Textfield widgetJo-Philipp Wich
Port the CBI Textfield (textarea) widget type to client side form.js Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-19luci-base: ui.js: implement Textarea widgetJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-16luci-base: network.js: fix inverted logic in registerErrorCode()Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-16luci-base: widgets.js: CBINetworkSelect: honour exclude optionJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14luci-base: widgets.js: support alias interfaces in CBIDeviceSelectJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14luci-base: ui.js: add createHandlerFn() helperJo-Philipp Wich
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-14luci-base: network.js: overhaul codeJo-Philipp Wich
- 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-14luci-app-firewall: honour global default policies in per-zone settingsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14luci-base: firewall.js: fix addZone()Jo-Philipp Wich
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-14luci-base: luci.js: introduce hasSystemFeature() apiJo-Philipp Wich
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-14luci-base: form.js: support passing a callback to Map.save()Jo-Philipp Wich
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-14luci-base: form.js: implement support for tabbed mapsJo-Philipp Wich
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-14luci-base: form.js: improve ui tab interactionJo-Philipp Wich
- 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-14luci-base: ui.js: rework tab state handlingJo-Philipp Wich
Properly preserve the selection state of nested tabs. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14luci-base: form.js: CBISectionValue: properly forward dependency checksJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14luci-base: ui.js: UISelect: fix check for empty choicesJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14luci-base: form.js: allow overriding empty section placeholder renderingJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14luci-base: form.js: harmonize title property handlingJo-Philipp Wich
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-14luci-base: form.js: inherit uci config overrides from parent sectionsJo-Philipp Wich
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-14luci-base: form.js: fix rendering of button widgetsJo-Philipp Wich
Also introduce an `onclick` property to allow registering custom button action handler. Signed-off-by: Jo-Philipp Wich <jo@mein.io>