summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-admin-full
AgeCommit message (Collapse)Author
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>
2018-09-19modules: Split luci-mod-fullDaniel F. Dickinson
Move some common elements to luci-base, and otherwise make three packages out of status, system, and network. They were mostly separated already, but there were some shared elements between status and network that are now in luci-base. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2018-09-19modules: Make luci-base sufficient to use luci appsDaniel F. Dickinson
Per the discussion in https://github.com/openwrt/luci/issues/869, make luci-base sufficient to login, logout, and review and apply or revert uci changes. This allows most luci-app-xxx to work without having luci-mod-admin-full installed. It has been tested with some apps and not luci-mod-admin-full, as well as with luci-mod-admin-full (to make sure the usual case doesn't break). Instead of creating a new module namespace (e.g. 'Base') we reduce the opportunities for breakage by having luci-base take over the 'shell' of the 'Administration' (admin/....) namespace. Since admin is assumed by all current building LuCI components (including Freifunk), this doesn't introduce the 'Administration' tab into any situation where it would not already be present (but includes it where it was before). We also add a "Component not installed" page to avoid fatal errors and backtrace when e.g. luci-mod-admin-full is not installed. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2018-09-19Merge pull request #2140 from kristrev/multiple-upstream-interfaces-statusJo-Philipp Wich
luci-base: Show multiple upstream interface
2018-09-19luci-base: Show multiple upstream interfaceKristian Evensen
Several devices have multiple upstream interfaces, for example a fixed and a mobile broadband connection. Currently, only one upstream interface is shown per address family in Luci. So in my example, one of the interfaces would not appear on the Status-page. This PR introduces support for showing multiple upstream interfaces on the Status-page. The code is not very complicated. get_status_by_route() has been extended to return a list of all routes, and get_wannet()/get_wan6net() now returns all upstream interfaces. I could not find any other (active) users of these three functions than calls triggered from the Status-page, so changing the default behavior should be fine. get_wandev()/get_wan6dev() called get_status_by_route(), but I could not find any place where those functions were called. I removed the dev-functions instead of keeping the old get_status_by_route(). On the status page, the wan/wan6-variables have been replaced with arrays. When populating the html, we now iterate through these arrays and create one element for each interface. I have tested the code with different interface types, v4, v6, as well as disconnecting and connecting interfaces. The status is updated and the correct interfaces (or sometimes none at all) are shown. Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
2018-09-18luci-mod-admin-full: fix diagnostic page glitchJo-Philipp Wich
Slightly restructure markup to avoid inconsistent button rendering. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-09-18Merge pull request #2121 from jokdarius/feature/0001-performace-fixJo-Philipp Wich
luci-mod-admin-full: performance fix
2018-09-08modules: add backup module for mtdblock devicesRosy Song
Signed-off-by: Rosy Song <rosysong@rosinson.com>
2018-08-31luci-mod-admin-full: performance fixDarius
* uci:get replaced with direct access of value (functions has 3x better performance in that way) Signed-off-by: Darius Joksas <jok.darius@gmail.com>
2018-08-20luci-mod-admin-full: fix forced upgradeDirk Brenken
* fix logical glitch in forced upgrade logic Signed-off-by: Dirk Brenken <dev@brenken.org>
2018-08-17luci-mod-admin-full: allow forced upgrade (revised)Dirk Brenken
* allow 'forced' firmware upgrades, even if the image format check fails. Useful where flashing back to the OEM versions or switching between ar71xx and ath79 builds * option is only visible after first/failed image check * added warning info (see screenshots below) Signed-off-by: Dirk Brenken <dev@brenken.org>
2018-08-13luci-mod-admin-full: applyreboot doesn't reload pageAnsuel Smith
The applyreboot page doesn't reload the page onload of the loding gif. This adds the right function. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2018-08-13treewide: rework uci change displayJo-Philipp Wich
- Use native rpcd uci changes format instead of incompletely converting back and forth between the old and the new format - Rework uci changelog template to print the equivalent uci commands for the various changes - Rework theme headers to properly count the uncomitted changes - Rework theme CSS to properly style new changelog Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-08-08luci-mod-admin-full: fix broken applyreboot pageAnsuel Smith
This improve applyreboot page and fix problem with luci-nginx that doesn't refresh the page when the router reboot. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2018-08-04luci-mod-admin-full: Fix DSL Stats display of dB statisticsAlan Swanson
Line attenuation, signal attenuation, noise margin and aggregate transmit power really need to show decimal digits. Fixes commit 88713f6 from issue #2003 due to excess changes from %s to %d.
2018-07-29luci-mod-admin-full: rework DSL Status displayJo-Philipp Wich
Fixes #2003. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-28luci-mod-admin-full: fix style glitch on packages pageJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-27treewide: rework rollback/apply workflowJo-Philipp Wich
Rework the apply confirmation mechanism to be session agnostic in order to circumvent cross domain restrictions which prevent the JS code from issuing apply confirm requests in some cases, e.g. when changing the LAN IP. Confirmation calls may now be done from unauthenticated pages, as long as a matching confirmation token is sent along with the request. The reasoning behind this is that there is little security impact in confirming pending apply sessions, especially since those sessions can only be initiated while being authenticated. After this change, LuCI will now launch a confirmation process on every rendered page when a rollback is pending. The confirmation will happen regardless of whether the user is logged in or not, or if the current page is a CBI form or static template. A confirmation request now also requires a random one-time token which is rendered along with the confirmation JavaScript code in order to succeed. This token is not meant to provide security but to ensure that the confirm was triggered from an interactive browser session and not some background HTTP requests that happened to end up in the admin ui. As a consequence, the different apply/confirm/rollback code paths in CBI maps and the UCI change/revert pages have been consolidated into one common implementation residing in the common global theme agnostic footer template. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-26luci-mod-admin-full: abbreviate "MAC-Address" as "MAC" to align with restJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-26luci-mod-admin-full: fix wifi overview display when no networks are definedJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-22luci-mod-admin-full: unify "Alias interface" and "Alias Interface" stringsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-21luci-mod-admin-full: fix check for traceroute6Jo-Philipp Wich
Since busybox has moved traceroute6 from /usr/bin/ to /bin/, we need to check both locations. Fixes #1973. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-18luci-admin-full: add further wifi optionsAnsuel Smith
This commit adds option to disable scan for 40mhz channel, permit to tweak beacon interval and other advanced settings. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> [fix whitespace, add range constraint to dtim_period, add dtim_period to local vars, reword commit message] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-18Merge pull request #1961 from Ansuel/dnsmasqJo-Philipp Wich
luci-admin-full: add dnsmasq allservers option
2018-07-18luci-admin-full: add dnsmasq allservers optionAnsuel Smith
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2018-07-18luci-mod-admin-full: use incremental background scanning for wireless joinJo-Philipp Wich
The previous approach of synchroneously scanning while building the result page was suboptimal since it frequently led to connection resets when accessing LuCI via wireless. It also exhibited problems when accessed via SSL on recent Firefox versions where the page were only loaded partially. Rework the wireless scanning to gather scan results in a background process and put them into the ubus session data area where they can be readily accessed without causing network interruptions. Subsequently rebuild the wireless join page to use XHR polling to incrementally fetch updated scan results. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-18luci-mod-admin-full: properly reset internal device form fieldJo-Philipp Wich
In some cases the hidden internal device field was not reset, e.g. after aborting a wifi scan and using the browser back buttons to navigate to the overview page again. In such a case, the previous device hidden field was still present and a new one getting created, causing further wireless scan attempts to get invoked with multiple radio names as parameter which fails. Fix this issue by using the new generic cbi_submit() helper any by dropping the faulty wifi_action() function. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-18luci-mod-admin-full: offer "Cancel" button in iface add dialogJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-15luci-mod-admin-full: fix changing alias interface ifnamesJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-15luci-mod-admin-full: improve interface overview displayJo-Philipp Wich
Remove the guessing of primary interfaces for now as we cannot yet properly track parent / child interface relations. Instead, add tooltips to the interface icons displaying detailed physical layer information per netdev. For dynamic or true alias interfaces (using "@" notation), skip the reporting of MAC and traffic stats. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-15luci-mod-admin-full: fix wifi add and scan actionsJo-Philipp Wich
Due to conversion to CBI, the inline forms are now nested and thus do not work anymore. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-13luci-mod-admin-full: differentiate between disabled and not associated wirelessJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-13luci-mod-admin-full: tweak interface and wireless overview markupJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12luci-mod-admin-full: small wifi overview markup fixJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12luci-mod-admin-full: produce valid JSON in status/realtime/connections_statusJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12luci-mod-admin-full: rework interface overview pageJo-Philipp Wich
Convert interface enable, disable and delete actions to proper cbi operations so that we can benefit from the apply/rollback workflow when performing critical interface operations. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12luci-mod-admin-full: expose errors, description and up state in net statusJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12luci-mod-admin-full: reimplement wireless overview page as cbi modelJo-Philipp Wich
This will offer apply/rollback workflow for tasks like deleting or shutting down wireless networks. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-11luci-mod-admin-full: improve text contrast in realtime graphsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
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>