summaryrefslogtreecommitdiffhomepage
path: root/modules
AgeCommit message (Collapse)Author
2018-05-31luci-base: add full page overlay during applyJo-Philipp Wich
After applying uci configuration, a full map reload is required in many cases as the anonymous section identifiers might have been rehashed, causing the rendered map to go out of sync. To avoid that, add both a full page overlay preventing further page interaction and let the apply widget forcibly reload the current view once the operation is complete. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-31luci-mod-admin-full: fix status page render glitch on ChromeJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-30luci-base: cbi.js: remove unused serialize functionsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-30luci-base: cbi.js: fix cbi_row_swap() after recent table markup changesJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-30luci-mod-admin-full: rework network and wifi status displaysJo-Philipp Wich
Use a more compact flex layout instead of the tabular display. Also rename "WAN status" to "Upstream" to avoid future confusion about wan interfaces vs. defaultroute interfaces. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-30luci-mod-admin-full: fix revert pageAnsuel Smith
This fix the strange redirect link, a bug with uwsgi where the controller is empty and a bug with the revert page showing the apply content empty. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> [drop unrelated revert.html template change] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-28luci-admin-full: add architecture infoAnsuel Smith
Referring to this, #1698 , we add architecture info and we show Unknown instead of ?. This is usefull if someone needs to install opkg packages manually. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2018-05-28treewide: convert HTML tables to divJo-Philipp Wich
Mostly convert HTML tables to div based markup to allow for easier styling in the future. Also change JS accessor code accordingly. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-28luci-base: add element creation helper to cbi.jsJo-Philipp Wich
Add a new helper function `E()` to cbi.js which can be used to conveniently build HTML markup. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-27Merge pull request #1834 from Ansuel/fixpoHannu Nyman
luci-base: fix broken translation
2018-05-27luci-base: fix broken translationAnsuel Smith
Currently this translation refer to an old string, sync to the new one. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2018-05-27Update base.poYusuf Soyipek
Some of the shortcomings in Turkish were added.
2018-05-25i18n: one more fix for Polish translationHannu Nyman
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-05-25i18n: sync, fix and cleanup translationsHannu Nyman
* sync translations (aiccu removal) * remove some other old strings * fix Polish translation Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-05-23luci-base: fix dispacher failAnsuel Smith
http.getenv("SCRIPT_NAME") fail if it's not provided. This can happen in the login screen when we don't have any script to load. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2018-05-21luci-base: update Japanese translationINAGAKI Hiroshi
Updated Japanese translations. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-05-21i18n: sync translationsINAGAKI Hiroshi
Synchronized translations with sources. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-05-19luci-mod-admin-full: fix crash on wireless when no networks are declaredJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-19luci-mod-admin-full: do not override iface section in wireless cbi mapJo-Philipp Wich
Do override the iface section id upon commit to avoid clobbering the resulting configuration. The manual config sync is not needed anymore after switching to uncached ubus uci operations. Fixes #1770. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-19luci-base: handle potential crash in luci.model.network.interface.get_i18n()Jo-Philipp Wich
Should prevent the crash mentioned in #1779. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-19luci-base: break circular luci.config <> luci.model.uci dependencyJo-Philipp Wich
On certain environments, mainly with the embedded uhttpd interpreter, the luci.config class cannot be loaded due to a circular dependency with the luci.model.uci class. Break up the dependency by deferring the loading of luci.config in luci.model.uci until it is actually needed. Fixes #1803, FS#1553. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-18luci-mod-rpc: fix unresolved controller reference in rpc_auth()Jo-Philipp Wich
Fixes the following error: .../rpc.lua:85: attempt to index global 'ctrl' (a nil value) Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-18Merge pull request #1769 from jow-/masterJo-Philipp Wich
UCI apply/rollback workflow
2018-05-18luci-base: raise maximum POST value size to 100KBJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-18Merge pull request #1748 from hnyman/wifidataHannu Nyman
luci-base: show wifi chip identification on overview
2018-05-15luci-base: update Polish translationRixerx
Signed-off-by: Rixerx <krystian.kozak20@gmail.com>
2018-05-13luci-base: harden cookie sysauth=Yousong Zhou
A simple scan of the code indicates that currently no code in the repo is accessing the sysauth= cookie Closes openwrt/luci#1555 Signed-off-by: Florian Eckert <fe@dev.tdt.de> Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-05-07luci-mod-freifunk: fix redirect urlYousong Zhou
location.hostname lacks port info Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-05-07luci-mod-admin-full: use fs.glob instead nixio.fs.globYousong Zhou
It's how the module was named when "require"d and used by other code in the same function Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-05-07luci-mod-admin-full: no menu entry for leds if "/sys/class/leds" is emptyFlorian Eckert
Signed-off-by: Florian Eckert <fe@dev.tdt.de> Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-05-07luci-mod-admin-full: change supports_reset() test for factory resetFlorian Eckert
The check "supports_reset" only covers /proc/mtd partitions. If we have this the commands checks for names like ubi or rootfs_data. If this is found the system is possible for a factory reset. But on x86 the situation is different. We have no /proc/mtd partitions because this system do not use a bare metall flash. To solve this issue check if we have an overlay and if so we could do a factory reset. This could be applied for system which uses bare metal flash and system which uses FTL or harddisks. Jffs2reset is the current command used for factory reset. It will try to find volume "rootfs_data" and if it's mounted will delete all files under directory /overlay luci-mod-admin-mini also has check for reset available, but we leave it alone for now as it uses "mtd -r erase rootfs_data" Signed-off-by: Florian Eckert <fe@dev.tdt.de> Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-05-07luci-base: reload log on uci system changeFlorian Eckert
If log configuration get changed in uci system no new values are applied until reboot. Add /etc/init.d/log reload to exec option will solve this issue. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-05-07luci-base: fix i18n de typo for rc.localFlorian Eckert
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-05-05luci-base: add transitional /etc/init.d/ucitrackJo-Philipp Wich
Ship an /etc/init.d/ucitrack for spawning a virtual service with the sole purpose to track the configurations and dependencies formerly handled by luci-reload. Once all LuCI supported services ship with procd compatible init scripts, the uci track support can be dropped. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-05luci-mod-admin-full: rework wifi configurationJo-Philipp Wich
- localize variables - get rid of redirects breaking apply workflow - auto-adjust unusable channels when switching country - use apply/rollback workflow when enabling/disabling networks Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-05treewide: rework uci apply workflowJo-Philipp Wich
Switch to rpcd based uci apply/rollback workflow which helps to avoid soft- bricking devices by requiring an explicit confirmation call after config apply. When a user now clicks "Save & Apply", LuCI first issues a call to uci apply which commits and reloads configuration, then goes into a polling countdown mode where it repeatedly attempts to call uci confirm. If the committed configuration is sane, the confirm call will go through and cancel rpcd's pending rollback timer. If the configuration change leads to a loss of connectivity (e.g. due to bad firewall rules or similar), the rollback mechanism will kick in after the timeout and revert configuration files and pending changes to the pre-apply state. In order to cover such rare cases where a lost of connectivity is expected and desired, the user is offered an "unchecked" apply option after timing out, which allows committing and applying the changes anyway, without the extra safety checks. As a consequence of this change, the luci-reload mechanism is now completely unsused since rpcd uses ubus config reload signals to reload affected services, which means that only procd-enabled services will receive proper reload treatment with the new workflow. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-05luci-base: enable uci session isolationJo-Philipp Wich
Switch to per-session save directories to decouple LuCI configuration changes from system wide ones. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-05luci-mod-rpc: more auth/login fixes, expose further librariesJo-Philipp Wich
The previous attempt to fix authentication broke login functionality so rework the code once again, this time with referencing helper functions directly via the controller scope. Furthermore, properly expose luci.sys.wifi.getiwinfo() and luci.ip. For getiwinfo(), the RPC wrapped function accepts one further optional parameter specifying the operation to invoke on the iwinfo instance. If no operation is specified, a summary object containing all info without country and scan list is returned. Example to obtain iwinfo summary object: curl --cookie sysauth=... \ --data '{"method": "wifi.getiwinfo", "params": ["wlan0"]}' \ "http://192.168.1.1/cgi-bin/luci/rpc/sys" Example to obtain iwinfo scan list: curl --cookie sysauth=... \ --data '{"method": "wifi.getiwinfo", "params": ["wlan0", "scanlist"]}' \ "http://192.168.1.1/cgi-bin/luci/rpc/sys" The exposed luci.ip class uses a similar approach to allow invoking instance methods on cidr objects. The new(), IPv4(), IPv6() and MAC() constructors accept two further optional arguments, with the first specifying the instance method to invoke and the second the value to pass to the instance method. Example to get list of IPv4 neighbours (ARP entries): curl --cookie sysauth=... \ --data '{"method": "neighbors", "params": [{"family": 4}]}' \ "http://192.168.1.1/cgi-bin/luci/rpc/ip" Example to add 100 hosts to a network address: curl --cookie sysauth=... \ --data '{"method": "IPv4", "params": ["192.168.0.1", "255.255.255.0", "add", 1000]}' \ "http://192.168.1.1/cgi-bin/luci/rpc/ip" Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-05luci-base: xhr.js: fix timeout setting with IE 11Jo-Philipp Wich
Internet Explorer 11 requires the timeout to be applied after the open() call, otherwise an invlaid state exception will be raised Fixes aa6c97154 ("luci-base: extend xhr.js") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-05luci-base: show wifi chip identification on overviewHannu Nyman
Show the correct wifi chip identification in case iwinfo recognises the chip. So far the wifidev.get_i18n function has practically always returned just "Generic", but use iwinfo.hardware_name to fetch the name. In case iwinfo returns the default "Generic MAC80211", there is a double 80211 in the final string, which is a cosmetic bug. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-05-05luci-mod-rpc: fix authentication via query string parameterJo-Philipp Wich
Localize the `authenticatior()` and `session_retrieve()` functions into the `index()` function scope so that they're retained when extracting the function into the dispatcher bytecode cache. Also allow access to the global scope since upvalues do not work reliably due to the out-of-context byte code caching of index functions. Fixes https://github.com/openwrt/luci/issues/1300#issuecomment-381352765 Fixes feefc600e ("luci-mod-rpc: rework authentication and session handling") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-03luci-base: support hiding the "Back to Overview" button in cbi mapsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-03Revert "luci-base: support hiding the "Back to Overview" button in cbi maps"Jo-Philipp Wich
This reverts commit 52cf265c9d12537d5f37043350328d30ca11bab4. I accidentally committed unrelated changes. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-03luci-base: support hiding the "Back to Overview" button in cbi mapsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-02Fixing small typoRicardo Lamego
indentifies > identifies
2018-05-02Merge pull request #1775 from musashino205/l10n/base-upd-jaHannu Nyman
luci-base: update Japanese translation
2018-05-03luci-base: update Japanese translationINAGAKI Hiroshi
Updated Japanese translations. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-05-02luci-mod-admin-full: canonicalize configured static lease MACJo-Philipp Wich
When reading the configured mac address of the static lease, filter it through luci.ip.checkmac() to canonicalize and uppercase the value for mapping it against the combo box host hints. Fixes #1772. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-02luci-base: sync translationsINAGAKI Hiroshi
Synchronized translations with sources. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-05-02Merge pull request #1705 from Mushoz/add-igmp-snoopingJo-Philipp Wich
luci-mod-admin-full: add igmp snooping option