Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change troubleshooting page to be Tab orientated and driven by JSON config #1797

Open
OnlineDynamic opened this issue Feb 15, 2024 · 4 comments
Assignees

Comments

@OnlineDynamic
Copy link
Collaborator

OnlineDynamic commented Feb 15, 2024

Change troubleshooting page to be Tab orientated and driven by JSON config implemented by PR #1802

This has the benefits of:

  • an easy to edit JSON config which allows the addition of new groups and commands by platform
  • only shows commands on UI relevant to the fpp platform executing it
  • only runs the trouble shooting commands on the selected tab - reduces number of backend calls
  • gives UI flexibility to show descriptions of commands
@darylc
Copy link
Contributor

darylc commented Feb 18, 2024

@OnlineDynamic I love the new look of the page. I fixed a couple of small things, this is the remaining list:

  1. API call /api/files/zip/logs returns a mostly empty troubleshootingCommands.txt incorrectly

  2. Default Gateway
    Command Description:
    Command: for gateway in $(netstat -rn | grep '^0.0.0.0' | awk '{print $2};' ); do ping -c 1 $gateway; done;
    sh: 1: ); do ping -c 1 $gateway; done;: not found

  3. RTC
    Command Description:
    Command: hwclock -r -f "$rtcDevice"
    hwclock: Cannot access the Hardware Clock via any known method.
    hwclock: Use the --verbose option to see the details of our search for an access method.

  4. 2cdetect
    Command Description:
    Command: i2cdetect -y -r . "$i2cDevice"

Error: I2C bus name doesn't match any bus present!
Usage: i2cdetect [-y] [-a] [-q|-r] I2CBUS [FIRST LAST]
i2cdetect -F I2CBUS
i2cdetect -l
I2CBUS is an integer or an I2C bus name
If provided, FIRST and LAST limit the probing range.

  1. If you load the troubleshooting page, and press the down arrow the page doesn't scroll down, instead it moves to the next troubleshooting tab. This is different to the behavior on the similarly structured FPP Settings page.

@OnlineDynamic
Copy link
Collaborator Author

OnlineDynamic commented Feb 18, 2024

@darylc fixed 1-4 in latest PR #1807
will have a think on 5

@darylc
Copy link
Contributor

darylc commented Feb 19, 2024

@OnlineDynamic Thanks!

I notice DT Details is very very large and takes a long time to load, is it worth doing anything about that? Eg move it to its own tab, or require a button press to run it, or something else or nothing?

For this one, the awk doesn't work with the "'s, it needed the ''s

Default Gateway
Command Description:
Command: for gateway in $(netstat -rn | grep "^0.0.0.0" | awk "{print $2};" ); do ping -c 1 $gateway; done;

PING 0.0.0.0 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.030 ms

--- 0.0.0.0 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.030/0.030/0.030/0.000 ms
PING 192.168.34.1 (192.168.34.1) 56(84) bytes of data.
64 bytes from 192.168.34.1: icmp_seq=1 ttl=255 time=0.437 ms

--- 192.168.34.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.437/0.437/0.437/0.000 ms
PING 0.0.0.0 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.036 ms

--- 0.0.0.0 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.036/0.036/0.036/0.000 ms
ping: UG: Name or service not known
PING 0 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.018 ms

--- 0 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.018/0.018/0.018/0.000 ms
PING 0 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.017 ms

--- 0 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.017/0.017/0.017/0.000 ms
PING 0 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.015 ms

--- 0 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.015/0.015/0.015/0.000 ms
ping: eth0: Name or service not known

@OnlineDynamic
Copy link
Collaborator Author

OnlineDynamic commented Feb 19, 2024

fixed the default gateway command in latest #1810 - awk was being a pain so did it a different way ;) will have a think on the long running commands and also seen a comment changing some of the layout so might have a play with at at some time

@OnlineDynamic OnlineDynamic self-assigned this Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants