Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
luci-base: Show multiple upstream interface
|
|
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>
|
|
Slightly restructure markup to avoid inconsistent button rendering.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
luci-mod-admin-full: performance fix
|
|
Signed-off-by: Rosy Song <rosysong@rosinson.com>
|
|
* 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>
|
|
* fix logical glitch in forced upgrade logic
Signed-off-by: Dirk Brenken <dev@brenken.org>
|
|
* 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>
|
|
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>
|
|
- 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>
|
|
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>
|
|
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.
|
|
Fixes #2003.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
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>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
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>
|
|
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>
|
|
luci-admin-full: add dnsmasq allservers option
|
|
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
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>
|
|
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>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
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>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
This will offer apply/rollback workflow for tasks like deleting or shutting
down wireless networks.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
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>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- add Math.log2() polyfill for IE 11
- use sans-serif font for time axis
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
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>
|
|
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>
|
|
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>
|
|
Calculate a peak that causes the vertical scale to use even values.
Fixes #1424.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|