openwrt / luci

LuCI - OpenWrt Configuration Interface
Apache License 2.0
6.36k stars 2.53k forks source link

luci-mod-dashboard: 4 Features and additions for each panel... #5907

Open aphorise opened 2 years ago

aphorise commented 2 years ago

Some customisation or configuration would be nice for a few features which I'll strive to draw using the attached image as well.

  1. Wireless DHCP devices set via alternative bridge devices / connection and not wireless interfaces on OpenWRT device itself. Allow for selecting Wireless devices based on complete connection pool.

  2. Show WAN IP via dig / other lookup if not in WAN DHCP mode and already with a Public IP. There could be an @ symbol next to the IPv6 & IPv4 addresses to the signify look up vs without meaning direct WAN DHCP IP.

  3. Allow for device specific logo or renaming to better distinguish larger networks.

  4. Additional system stats like RAM, Storage & Last down / since Online as well as total SLA / uptime overall in %.

It would be nice if there's a configuration page where some of these could be enabled and set. DashboardLuci_ideas

Actual behavior:

Does not correctly populate Wireless area with devices not directly set via OpenWRT / Wireless NIC on OpenWRT (related to: #4472))

Expected behavior:

Allow for user customisation and further option as detailed already.

jow- commented 2 years ago

Please provide minimal proof of concepts on command line, e.g. on how you think how "actual wifi devices" can be distinguished from other ARP neighbors if the router itself has no wireless interface. Likewise describe, ideally in terms of cli commands, the "dig" feature you propose. It is totally unclear what is meant with it.

@ZoZhang - maybe you could look into those as you did the dashboard implementation?

aphorise commented 2 years ago

.. how you think how "actual wifi devices" can be distinguished from other ARP neighbors if the router itself has no wireless interface.

Leave the distinction to user by way of a configuration page where known devices (by MAC) can be selected via a checkbox next to each known session.

What would be good is also to allow for disable wifi panel stats as per the related request (#4472).

It should also be possible to rename devices on the same listed device configuration page which will help where devices are actually listed as ? (as per my image). Ideally it would also be possible to set a small logo (like iphone, android, etc) for each particular device (irrespective of whether its WiFi or not).

dig

to determine WAN IPs if lookup is required as per:

# // if DHCP address is in private range: 10.0.0.0/8, 192.168.0.0/16, 172.16.0.0/16, 169.254.0.0/16, 127.0.0.0/8
# // then perform dig to find WAN
WANv4_IP=$(dig +short @1.1.1.1 ch txt whoami.cloudflare |  cut -d'"' -f2) ;
echo "WANv4 IP == @${WANv4_IP}" ;
# // ^^^ repeat with IPv6
WANv6_IP=$(dig +short @2606:4700:4700::1111 -6 ch txt whoami.cloudflare|  cut -d'"' -f2) ;
echo "WANv6 IP == @${WANv6_IP}" ;
# // ...

# do unconditional reverse DNS lookup:
echo "RDNS WANv4 IP == $(dig +short -x ${WANv4_IP})" ;
  # 77-66-55-44.cable.dynamic.v4.ziggo.nl.
echo "RDNS WANv6 IP == $(dig +short -x ${WANv6_IP})" ;
jow- commented 2 years ago

Leave the distinction to user by way of a configuration page where known devices (by MAC) can be selected via a checkbox next to each known session.

The wifi list is supposed to show details like signal strength. This information is not available in this case and would lead to incomplete records. Not sure if it is worth it.

to determine WAN IPs if lookup is required as per:

The above might be an unexpected privacy violation (especially with IPv6) if internal hosts suddenly query public name servers without explicit user consent. It would also query hardcoded cloudflare nameservers which were not configured by the user. Far from ideal imho.

aphorise commented 2 years ago

The wifi list is supposed to show details like signal strength. This information is not available in this case and would lead to incomplete records. Not sure if it is worth it.

Sure - but in my case as you can see in the initial image I shared that there's no device distinction for those clients which I've highlighted that are DHCP set by OpenWRT but using other wireless devices. IMO - it would be better to have the panel populated with known and user selectable wireless devices than with nothing - as well just offering to disable this panel too.

Also having both OpenWRT and non-Openwrt wireless devices with the differentiator of no-signals vs signals or some other subtly like that could be a great way to have an aggregate and complete view of all devices not just some.

The above might be an unexpected privacy violation (especially with IPv6) if internal hosts suddenly query public name servers without explicit user consent.

I agree. However if the user is willing to opt in to it then why not? it surely cannot be worse than a HTTP / Web request for the same :-D - what's more it would only be conditional to those router / devices that are in NAT and not in Public WAN / IP ranges.

It would also query hardcoded cloudflare nameservers which were not configured by the user. Far from ideal imho.

Why hard coded and not user settable? - the Cloudflare could be a template suggestion when user enable it - and any others that the user may wish to have configure instead they could do so as part of that enable / save process.

ZoZhang commented 2 years ago

Hello, I will be a bit busy because I have a new job recently. …

@aphorise maybe we can add a simply text stating that no device is currently connected to wifi ?

I agree to add more current router information on the "system" card. However, when it comes to more professional information, I may not be able to deal with it, because I have no router equipment available at the moment. I was under the impression that I could only get basic network data when I was developing...

@jow - this does probably take a while to process, especially once I need the job to stabilize...

aphorise commented 2 years ago

Hey @ZoZhang I can contribute €400 for these features requested - would that help? :-)

If some or 2 out of 4 of the issues can be addressed with some customisation or framework for it in the code then maybe I can help with the rest and it would give me a lead into Luci. Anyway happy to help and thank you for your efforts.

ZoZhang commented 2 years ago

Hey @aphorise Thank you for your trust and help, I think it's really nice !

However, I am busy this month and I use the sharing connection with my phone. I think if you can help me a router OpenWrt, that will be enough for me and I'm also glad that I can do useful things on Luci. So, I will continue on this subject when I have more time than now.

Finally, thank you ! ^ ^

aphorise commented 2 years ago

@ZoZhang sure! - can you pls reach out using the same handle at g-mail? - I'll be happy to get a NanoPi R5S or FastRhino R68s to you or any other variant as you see fit - those also dont have wireless devices by default and in my case for example I use a few bridged devices that are driven by Wireless (Qualcomm IP4xxx) Powerline adaptors / via AC outlet connected to my OpenWRT router.

ZoZhang commented 1 year ago

@aphorise Can you tell me how to do this? I don't seem to have used it like that. Thank you very much for your trust and support! But I have a very important thing recently, I will plan my trip later, if I can continue. I'll talk to you then.

aphorise commented 1 year ago

@ZoZhang hey man - tell me what you're in need of? - are you after a few example devices? - you have my email right? same handle at gmail dot com :-)

ZoZhang commented 1 year ago

@aphorise hey man, I sent an email to your Gmail last Saturday, but it didn't seem to work. Actually, I've had some problems with reality lately and I need to take some time to adjust myself. Sorry about the improvements on the router, I can only put it on hold for now. ;(

aphorise commented 1 year ago

In the latest rebuild I did of an identical host / setup it does look as I'd expect where the WiFi panel is not present - maybe in my prior install I configured things differently?

image

aphorise commented 1 year ago

After installing a new WiFi device the panel then appears - I still dont get what's different from my earlier install / device which does not have a WiFi module at all.

Anyway this may be another issue separate to the original features request.

image