summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-admin-full/luasrc
AgeCommit message (Collapse)Author
2018-07-09luci-mod-admin-full: rework connection status table handlingJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-09treewide: always include cbi.jsJo-Philipp Wich
Include cbi.js in the main header template like it is done for xhr.js and remove the page specific includes. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-09luci-mod-admin-full: use sans-serif fonts for realtime graph legendsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-09luci-mod-admin-full: small markup fixes for placeholder textsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-09luci-mod-admin-full: style and script fixes for realtime bandwidth graphJo-Philipp Wich
- add Math.log2() polyfill for IE 11 - use sans-serif font for time axis Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-03luci-mod-admin-full: rework flashops page markupJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-03luci-mod-admin-full: fix flashops url generation for config tabFlorian Eckert
If a firmware image is not valid then url generation for the config tab is wrong. To fix this use the luci.dispatcher.build_url function. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-07-03luci-mod-admin-full: check backup.tar.gz on applyFlorian Eckert
If an uploaded backup.tar.gz is not valid we will not get a respond from LuCI. The system will perform a reboot without applying the "tar.gz" even though the backup import failed. To fix this check if the backup archive is valid with the command "gunzip -t <archive>" and if the validation fails render the flashops page with a hint. On the other hand apply the backup archive and perform a reboot as before. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-07-03luci-mod-admin-full: improve reboot pageAnsuel Smith
This fix problem with empty controller, the check function will never stop to check if the device finish to reboot and we set more tries to wait the router for a longer times. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> [reworked markup, simplified logic, removed superfluous alert] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-03luci-mod-admin-full: improve Y-axis scaling in bandwidth graphJo-Philipp Wich
Calculate a peak that causes the vertical scale to use even values. Fixes #1424. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-02luci-mod-admin-full: fix uci revert success messageJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-02luci-mod-admin-full: cleanup markup on flashops pageJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-02luci-mod-admin-full: rework wireless network status indicatorJo-Philipp Wich
Rework markup and logic of the wireless network status indicator to match that of the interface status widget. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-28luci-mod-admin-full: unify DHCP lease status codeJo-Philipp Wich
Merge the DHCP lease status code of the status overview and DHCP/DNS pages into a single shared partial template. Also remove some redundant markup on the index page and wireless assoc list templates. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-26luci-mod-admin-full: properly remap ports in switch status displayJo-Philipp Wich
Fixes: 60c5d15e9 ("luci-mod-admin-full: fix possible switch status layout bug") Fixes: bbf096c79 ("luci-mod-admin-full: cleanup markup") Reported-at: https://forum.lede-project.org/t/x/15897/19 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-26luci-mod-admin-full: fix possible switch status layout bugJo-Philipp Wich
In some cases we might get status information for more ports than which are actually usable, prevent overflowing the port status row in this case. Reported-at: https://forum.lede-project.org/t/x/15897/14 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-26Merge pull request #1912 from Ansuel/fixassociJo-Philipp Wich
luci-mod-admin-full: fix missing wifi_assoclist
2018-06-26luci-mod-admin-full: fix missing wifi_assoclistAnsuel Smith
With #e5ba594d77eed77d31d4b9b8c0e86026eb5a5fac the list of the connected device broke up. This fix this problem by creating a proper request link. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2018-06-25Merge pull request #1881 from ↵Jo-Philipp Wich
TDT-AG/pr/20180614-luci-mod-admin-full-fix-ssh-key-textarea luci-mod-admin-full: fix empty SSH-Keys textarea issue
2018-06-25luci-mod-admin-full: report SNR unit as dB, not dBmzjw
Fixes: #1880 Reported-by: "zjw" Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-25luci-mod-admin-full: fix average traffic calculation in realtime bandwidthJo-Philipp Wich
Fixes #1908. Suggested-by: "mgalyean" Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-25luci-mod-admin-full: fix initializing realtime graphsJo-Philipp Wich
Commit 69782ccbc ("luci-base: xhr.js: defer starting poll queue") changed the way XHR poll queues are started which broke the timing on the realtime graph pages. Fix the problem by manually starting the poller after registering the request handlers. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-25luci-base, luci-mod-admin-full: unify wifi assoclist codeJo-Philipp Wich
Merge the assoclist code of the status overview and wireless overview pages into a single shared partial template. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-25luci-mod-admin-full: replace status page legend tags with h3 (#1907)Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-23luci-mod-admin-full: packages: display available packages by defaultJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-23luci-mod-admin-full: cleanup markupJo-Philipp Wich
Globally cleanup template markup to support responsive design changes in OpenWrt theme. Rework handling of dynamic status tables, consolidate hand-written markup, fix small render bugs in various places and annotate tables where needed. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-14luci-mod-admin-full: fix empty SSH-Keys issueFlorian Eckert
If you delete all ssh keys in the textarea then LuCI will rais an error. So if you added one ssh-key to the textarea and then you want to delete them again that is not possbile in LuCI. To fix this remove "rmempty" attribute and add a remove function which will called if the textarea is empty. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-06-08luci-mod-admin-full: add suggested italian translationsJo-Philipp Wich
Merge two italian translations suggested in #1870 and add back two missing dots accidentially removed from the translations in a previous commit. Fixes: 588c8618b ("luci-mod-admin-full: fix translation interpolation in JS confirm() calls") Suggested-by: Ansuel Smith <ansuelsmth@gmail.com> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-08luci-mod-admin-full: fix translation interpolation in JS confirm() callsJo-Philipp Wich
Use luci.http.write_json() in conjunction with translate() to write out unescaped translation strings in a manner suitable for interpolation inside JavaScript. Fixes #1870 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-08luci-mod-admin-full: git rid of embedded newlines in translation stringsJo-Philipp Wich
Also switch one usage of raw '<%_ ... %>' interpolation to '<%: ... %>' in order to avoid issues with translations using apostrophes. Globally resnyc translations after the fix. Fixes #1866. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-08treewide: switch firewall zone, network and iface lists to dropdown codeJo-Philipp Wich
Also switch the weekday and monthday lists in the firewall rule details to cbi dropdowns, vastly uncluttering the form. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-31luci-mod-admin-full: use common alert message markupJo-Philipp Wich
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-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-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-18Merge pull request #1769 from jow-/masterJo-Philipp Wich
UCI apply/rollback workflow
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-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-02Fixing small typoRicardo Lamego
indentifies > identifies
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-02Merge pull request #1705 from Mushoz/add-igmp-snoopingJo-Philipp Wich
luci-mod-admin-full: add igmp snooping option
2018-04-09luci-mod-admin-full: limit dns cachesize to 10000Marc Benoit
The value of cachesize is hardcoded to 10000 in dnsmasq-2.79/src/option.c to 10000 max case 'c': /* --cache-size */ { int size; if (!atoi_check(arg, &size)) ret_err(gen_err); else { /* zero is OK, and means no caching. */ if (size < 0) size = 0; else if (size > 10000) size = 10000; daemon->cachesize = size; } break; } Tested on Netgear R7800 Signed-off-by: Marc Benoit <marcb62185@gmail.com>
2018-04-09luci-mod-admin-full: allow setting dns cachesizeMarc Benoit
In the case of more powerful routers the default cachesize value == 150 is too small and can easily be extended to 1,000's and 10,000's of entries. It makes sense to make it easy configurable. Tested on Netgear R7800 Signed-off-by: Marc Benoit <marcb62185@gmail.com> Fix whitespace, edit the proposed help text. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>