Commit graph

102 commits

Author SHA1 Message Date
Ansuel Smith
2a97d5533c
luci-mod-status: cosmetic fix for isWPSEnabled in wifi status
Drop isWPSEnabled table as it's really not needed and can directly
included in the network table.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-09-18 16:17:27 +02:00
Florian Eckert
1d26eb4200 luci-mod-status: move index acl into own file
The ACL file luci-mod-status.json is already quite long.
It is also a separate menu item in LuCI, so in my view it makes sense to
move it to a separate file. An additional positive effect is that the
file then becomes clearer.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-09-03 13:25:21 +02:00
Florian Eckert
4e29821a4e luci-mod-status: set default value if no route records found
If no entries for the status tables are available. Then add the
following default entry

'No entries available'

This looks better, because not only the table header is displayed.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-09-03 13:17:24 +02:00
Vladislav Grigoryev
c71dc1cccf luci-mod-status: optimize view/formatting for status/routing
Optimize view and formatting for the status/routing page.
Remove redundant style and header abbreviations.
Consolidate terminology for IPv4 and IPv6 categories.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
2021-09-01 13:05:59 +03:00
Vladislav Grigoryev
a62a6c0f3b luci-mod-status: merge status/dmesg with status/syslog
Merge "Kernel Log" with "System Log" as an extra tab.
Consolidate logging facilities for more intuitive navigation.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
2021-08-26 06:15:04 +03:00
Fritz D. Ansel
61425793a7 status: make buffered conditional
when buffered could not be read, there is
just a questionmark (on e8450 non-ubi)

Signed-off-by: Fritz D. Ansel <fdansel@yandex.ru>
2021-08-11 09:25:48 +02:00
Jo-Philipp Wich
57303e6483
Merge pull request #5235 from vgaetera/status-routing
luci-mod-status: status/routing support for pbr
2021-08-09 19:51:09 +02:00
Vladislav Grigoryev
fb7e48b752 luci-mod-status: fix description for luci-mod-status-channel_analysis
Update "modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json".
Fix incorrect description for "luci-mod-status-channel_analysis".

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
2021-08-08 20:34:45 +03:00
Vladislav Grigoryev
5cd9209636 luci-mod-status: status/routing support for pbr
Provide comprehensive status information for routing.
Rename the "Status > Routes" page to "Status > Routing".
Unify sorting for the "Status" and "Network" menus.
Add tabs for IPv4 and IPv6 and reorganize the contents.
Display routing rules and their priorities for each protocol.

Policy-based routing is an increasingly popular problem.
Netifd natively supports policy-based routing:
* The interface-specific options "ip4table" and "ip6table".
* The routing rules using the "rule" and "rule6" sections.
LuCI is missing the information about routing rules.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
2021-08-07 10:51:38 +03:00
Jo-Philipp Wich
a6d957d6f5 luci-mod-status: disable "Set static" lease action on readonly view
Fixes: f6b6a12927 ("luci-mod-status: add support for one-click static lease")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-07-07 17:15:37 +02:00
Jo-Philipp Wich
e3357deb7d luci-mod-status: don't set '-' hostname when creating static lease
Fixes: #5153
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-30 17:26:07 +02:00
Florian Eckert
8f8ce8613f luci-mod-status: switch to html table for wlan channel analysis
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-06-21 12:18:25 +02:00
Lukasz Baj
c6a5c809ed luci-mod-status: fix NaN errors in realtime graphs
When I use Realtime Graphs I see following NaN errors:

    Error: <polyline> attribute points: Expected number, "0,298 0,NaN 5,NaN 10,NaN…".
    Error: <polyline> attribute points: Expected number, "0,298 0,NaN 5,NaN 10,NaN…".
    wireless.js?v=git-21.105.40538-2da37c2:19 Error: <polyline> attribute points: Expected number, "0,298 0,NaN 5,NaN 10,NaN…".
    eval @ wireless.js?v=git-21.105.40538-2da37c2:19
    Promise.then (async)
    eval @ wireless.js?v=git-21.105.40538-2da37c2:8
    step @ luci.js?v=git-21.105.40538-2da37c2:91
    start @ luci.js?v=git-21.105.40538-2da37c2:87
    add @ luci.js?v=git-21.105.40538-2da37c2:82
    pollData @ wireless.js?v=git-21.105.40538-2da37c2:7
    render @ wireless.js?v=git-21.105.40538-2da37c2:24
    Promise.then (async)
    __init__ @ luci.js?v=git-21.105.40538-2da37c2:148
    super @ luci.js?v=git-21.105.40538-2da37c2:22
    Anonymous42Class @ luci.js?v=git-21.105.40538-2da37c2:12
    (anonymous) @ luci.js?v=git-21.105.40538-2da37c2:181
    Promise.then (async)
    compileClass @ luci.js?v=git-21.105.40538-2da37c2:177
    Promise.then (async)
    require @ luci.js?v=git-21.105.40538-2da37c2:183
    instantiateView @ ui.js?v=git-21.105.40538-2da37c2:311
    (anonymous) @ wireless:47
    Promise.then (async)
    (anonymous) @ wireless:46

Signed-off-by: Lukasz Baj <l.baj@celerway.com>
[adjust subject]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-09 11:08:36 +02:00
Jo-Philipp Wich
88b9d84388 treewide: consolidate {IPv4,IPv6,MAC} {address,gateway} spellings
- Turn IPv4-Address into IPv4 address
 - Turn IPv4-Gateway into IPv4 gateway
 - Turn IPv6-Address into IPv6 address
 - Turn IPv6-Gateway into IPv6 gateway
 - Turn MAC-Address into MAC address

Also remove related duplicate translation entries.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-07 12:48:08 +02:00
Jo-Philipp Wich
3c66c5b165 luci-mod-status: fix potential XSS via specially crafted DNS names
When an upstream NS returns PTR domain names containing HTML, it is
added verbatim to the connection status table.

Prevent this issue by HTML escaping any values in the source and
destination columns.

Fixes: CVE-2021-32019
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-05-12 11:57:21 +02:00
Jo-Philipp Wich
d24e3295f0 luci-mod-status: iptables: always make tab pane visible
When ip6tables is not present, the tab group was not initialized,
causing the iptables status display to be empty with certain themes.

Manually mark the pane active in this case to avoid the problem.

Fixes: #5040
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-05-07 19:16:34 +02:00
Wojciech Jowsa
ead64c0195 luci-mod-status: check if center_chan1 is defined
Signed-off-by: Wojciech Jowsa <wojciech.jowsa@gmail.com>
2021-05-05 16:01:01 +02:00
Jo-Philipp Wich
1dc16d9d3f luci-mod-status: fix raw ipt counter buton style
Fixes: #4928
Fixes: b39b7fc0d2 ("luci-mod-status: allow displaying raw iptables counter values")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-17 09:12:09 +01:00
Jo-Philipp Wich
b39b7fc0d2 luci-mod-status: allow displaying raw iptables counter values
Fixes: #4852
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-01 19:02:32 +01:00
Jo-Philipp Wich
d3ba6ae3bd Revert "luci-mod-status: allow displaying raw iptables counter values"
This reverts commit 52caa1dc96 since it
contained unrelated changes.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-01 19:01:54 +01:00
Jo-Philipp Wich
52caa1dc96 luci-mod-status: allow displaying raw iptables counter values
Fixes: #4852
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-01 18:56:27 +01:00
Andre Heider
8051510732 luci-mod-status: use the new ubus dsl metrics
This is significantly faster.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Tested-by: Martin Schiller <ms@dev.tdt.de>
2021-01-26 07:10:19 +01:00
Giovanni Giacobbi
af422b1924 treewide: removed trailing whitespaces and extra newlines in 'modules'
Signed-off-by: Giovanni Giacobbi <giovanni@giacobbi.net>
2021-01-20 17:48:16 +02:00
Giovanni Giacobbi
dfa82b4494 luci-mod-status,luci-app-statistics: Fix case for 'Bit/s' to 'bit/s'
Signed-off-by: Giovanni Giacobbi <giovanni@giacobbi.net>
[fix conflict, reword commit title]
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-01-19 23:11:33 +02:00
Ansuel Smith
ea4119f25c luci-mod-status: fix bugs in channel analysis
- Add check for missing ht_operation data
- Add support for radio that both support 5 and 2.4 band
- Hide wireless station that doesn't belong to the graph band

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-01-11 23:01:06 +02:00
Hannu Nyman
cb454de3e1 luci-mod-status: realtime graph - find suffixed libiwinfo.so
Change the libiwinfo filename handling to match the current
version suffixed .so file.

Copy solution from bc121a5a4

Fixes #4721

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-01-09 19:02:30 +02:00
Hannu Nyman
c49d33f6cb
Merge pull request #4598 from Ansuel/wifi_chan
luci-mod-status: add new channel analysis page
2021-01-07 19:02:57 +02:00
Ansuel Smith
91a0008457
luci-mod-status: add channel analysis support
Add channel analysis support. This can be very useful as a user can directly use the webui to check wifi channel utilization without using external tool. This use data already provided by iwinfo.

Fixes: #4572
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-12-06 02:24:05 +01:00
Ansuel Smith
277ffef8ae
luci-mod-status: fix WPS button to wrong interface
Reset the WPS_button variable to correctly add the button to the enabled interface.

Fixes: #4625
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-12-05 23:16:57 +01:00
Andre Heider
150e080682 luci-mod-status: use raw dsl values and format them ourselves
Currently lantiq_dsl.sh performs these formats expensively in a shell
script. Use the raw values so the preformatted onces can be removed to
cut down the runtime or the script.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2020-12-04 12:47:51 +01:00
Jo-Philipp Wich
03c77dafe3 treewide: transition div tables to actual table markup
Modern browsers allow decomposing table markup equally well as nested div
constructs, therefor migrate our <div> table markup to actual <table> tags
but keep the old table/tr/th/td CSS classes for now to allow for a smooth
theme transition.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-11-27 21:36:40 +01:00
Jo-Philipp Wich
61c2361170
Merge pull request #4596 from mikma/routes-proto
luci-mod-status: routes.js: add route protocol
2020-11-18 17:11:30 +01:00
Jo-Philipp Wich
5a0a7cfa74
Merge pull request #4599 from Ansuel/move-svg
luci-mod-status: move svg to dedicated dir
2020-11-18 00:48:43 +01:00
Ansuel Smith
4429594a43
luci-mod-status: move svg to dedicated dir
Move svgs from top dir to a dedicated svgs dir.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-11-18 00:43:44 +01:00
Mikael Magnusson
4799fcead6 luci-mod-status: routes.js: add route protocol
Add protocol column to the active routes tables. The route protocol is
for example helpful when using a dynamic routing daemon, such as bird or
babel.

Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
2020-11-15 20:56:30 +01:00
Ansuel Smith
ef94c52680
luci-mod-status: add support for add device to wifi black/whitelist
Add support for one-click add device to wifi black/whitelist in the status page. If the black/whitelist feature is enabled a combobox is displayed with the disconnect option.
Device already added will display only the disconnect button.

Fixes: #3675

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-10-30 21:46:31 +01:00
Jo-Philipp Wich
ff36d0eb5d
Merge pull request #4499 from Ansuel/clicklease
luci-mod-status: add support for one-click static lease
2020-10-30 21:24:24 +01:00
Ansuel Smith
6cf849bcf6
luci-mod-status: add WPS control for wifi info
Add a way to trigger and get the WPS Push Button status from the webui if supported.

Fixes: #1072

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-10-17 17:47:50 +02:00
Ansuel Smith
f6b6a12927
luci-mod-status: add support for one-click static lease
Introduce a button in the status lease table to quickly add an host as static.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-10-10 13:59:39 +02:00
Jo-Philipp Wich
2dbd9ff245 luci-mod-status: hide DHCP and assoclist on insufficient ACLs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-18 23:25:22 +02:00
Jo-Philipp Wich
a0db2abea3 luci-mod-status: index.js: skip includes which failed loading
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-18 23:25:22 +02:00
Jo-Philipp Wich
f4651cb129 treewide: fix trailing commans in ACL JSON files
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-17 23:40:14 +02:00
Jo-Philipp Wich
8f34e105c0 treewide: add ACL annotations to menu entries
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-17 12:40:31 +02:00
Jo-Philipp Wich
17770e49eb luci-mod-status: assoclist: hide wifi disconnect on insufficient ACLs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-16 15:32:32 +02:00
Jo-Philipp Wich
c099344013 treewide: reorganize base ACLs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-09 23:23:33 +02:00
Jo-Philipp Wich
5fe88f8caf
Merge pull request #3769 from dibdot/logread-fix
luci-base: accept alternative logread location
2020-04-08 09:19:09 +02:00
Jo-Philipp Wich
f9d61213fb luci-mod-status: use LuCI.ui.instantiateView() to load index view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-03 13:27:20 +02:00
Jo-Philipp Wich
3c4bc228a1 treewide: import utility classes explicitly
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-03 10:00:06 +02:00
Jo-Philipp Wich
16f0997bdb luci-mod-status: luci-bwc: skip "." and ".." when finding netdevs
Skip the "." and ".." directory entries of "/sys/class/net/" instead of
passing them on to libiwinfo's probe function. This avoids a situation
where the kernel requests a modprobe of "netdev-." and "netdev-.." over
and over again, resulting in high load on lower end systems.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-01 18:45:18 +02:00
Jo-Philipp Wich
04c73f1613 luci-mod-network, luci-mod-status: allow assoclist wrapping
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit a600ebb5fe14b13cb53669eb73b86f66cc699e94)
2020-03-24 22:14:18 +01:00