summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs
AgeCommit message (Collapse)Author
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>
2019-08-14luci-base: form.js: add further caption propertiesJo-Philipp Wich
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-14luci-base: network.js: add getL2Device(), getMTU() helpersJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14luci-base: network.js: support dynamically loaded protocol classesJo-Philipp Wich
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-14luci-base: network.js: expose prefixToMask() and maskToPrefix()Jo-Philipp Wich
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-14luci-base: network.js: return mac addresses in upper caseJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14luci-base: network.js: extend ifnameOf() and expose as getIfnameOf()Jo-Philipp Wich
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-14luci-base: network.js: add ability to flush the internal cacheJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14luci-base: ui.js: do not forcibly sort synamic list itemsJo-Philipp Wich
Ref: https://forum.openwrt.org/t/cannot-save-certain-fields/42738/2 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-01luci-base: form.js: add modal dialog hookJo-Philipp Wich
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-01luci-base: form.js: update tab state on dependency checksJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-01luci-base: ui.js: tabs: fix empty pane checking, allow alternative query rootJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-01luci-base: luci.js: add L.dom.isEmpty() helperJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-01luci-base: ui.js: mark widget optional if empty choice is presentJo-Philipp Wich
Fixes: #2943 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-30luci-base: ui.js: do not save invalid dynlist valuesJo-Philipp Wich
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-30luci-base: ui.js: save filled out but not added dynlist items on submitJo-Philipp Wich
Fixes: #2938 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-27luci-base: don't treat .rmempty flag as optional for ListValue widgetsJo-Philipp Wich
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>