summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs
AgeCommit message (Collapse)Author
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>
2019-07-26luci-base: keep polling confirmation endpoint on XHR failuresJo-Philipp Wich
Fixes: #2912 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-26luci-base: form.js: pass-through placeholder option of CBIListValueJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-26luci-base: ui.js: HTML escape uci changelog valuesJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-26luci-base: ui.js: HTML escape custom dropdown valuesJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-26luci-base: ui.js: fix event binding for UISelectJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-22luci-base: widgets.js: implement CBIDeviceSelect netdev pickerJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-22luci-base: widgets.js: handle devices or subnets in CBIZoneForwardsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-22luci-base: firewall.js: add zone.getDevices() and zone.getSubnets() gettersJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-22luci-base: widgets.js: CBIZoneSelect: improve initial renderingJo-Philipp Wich
Ref: https://github.com/openwrt/luci/issues/2889 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-22luci-base: widgets.js: CBIZoneSelect: fix availability of "device" choiceJo-Philipp Wich
Ref: https://github.com/openwrt/luci/issues/2889 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-21luci-app-firewall: fix cbi form for rulesJo-Philipp Wich
- 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-19luci-base: ui.js: fix multi vs. multiple keyword confusionJo-Philipp Wich
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-13luci-base: fix translatable text in ui.jsINAGAKI Hiroshi
Removed unnecessary symbols ("%>") at the end of the text. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2019-07-12luci-base: luci.js: add Promise.finally polyfillJo-Philipp Wich
Fixes: #2854 Signed-off-by: Jo-Philipp Wich <jo@mein.io>