Jackysi / advancedtomato

AdvancedTomato firmware repository (Tomato by Shibby fork)
https://advancedtomato.com/
Other
280 stars 71 forks source link

Failure to display all Devices/IPs in '24h IP Traffic History' and 'Real Time IP Traffic' #405

Closed uniqueeunike closed 6 years ago

uniqueeunike commented 6 years ago

AdvancedTomato appears to be unable to display all Devices (IP or Hostname) in '24h IP Traffic History' and 'Real Time IP Traffic' views: screenshot 2018-04-16 13 08 58

Only about 10 devices can be displayed on a 1080p monitor on Firefox or Chrome. This is caused by AdvancedTomato trying to display all devices/IPs in one row, whereas the old TomatoShibby UI displays multiple rows when necessary.

Please fix by displaying multiple rows of devices/IPs/hostnames!


As a temporary workaround, you can zoom out to display more devices/IPs on one row, but even this will fail at around 20 devices/IPs: screenshot 2018-04-16 13 10 12

Environment:

OpticNerve75 commented 6 years ago

This issue has been reported and closed a couple of times - the fix is already checked into the code, the problem is that he hasn't released a new version since then so the issue will remain until a new version is released.

I managed to work out what the issue was and find the fix that the author has already checked-in to his code. The problem is in the CSS file. You can actually fix it temporarily yourself by making the same fix in a custom.css file and telling AdvancedTomato to use that file. You then need to store this file somewhere (I store it on a USB stick plugged into my router) and then I trigger the file to be copied back into place each time the router reboots.

Anyway the whole thing is a little convoluted but it does fix the issue until such a time as a new version is released which has the fix compiled into it. Let me know if you want more information on how to do this (and I can supply my custom.css file if you like).

TheFatherMind commented 6 years ago

I also have this issue. I have directions on a temporary solution until Jacky posts the changes into the code. Here is what I did step by step...

Note: I have bricked the GUI on 2 routers doing this exact same procedure. And I have 2 routers that work perfectly with it. I have no idea why. SSH still works. I am currently working on it and will revise this post and remove this note when I have it figured out.

I reverted my firmware back to v3.4-138 before the bug was introduced. I ssh'ed into the router and created a tar file of the working interface by inserting a thumb drive and on the thumb drive executing: tar -cvf www.tar www/

I then switched back to the current broken firmware. For what I am doing many of my routers do not have a thumb drive so I placed the file on my web server and then in the "Admininstration / Scripts / Init" box I typed/pasted the following...

cd /tmp
wget http://www.desktopmasters.com/Stuff/ATGUI/www.tar
tar -xf www.tar
rm www.tar

(Remember to [Save])

I also like to go to "Tools" at the top and then "System Commands" and past and execute the above code in that box. This way I do not have to reboot the router to get it working.

Once this is done you have now put a good copy of the AdvancedTomato GUI into the /tmp/www/ folder. You only need to go to the "Administrator / Admin Access" menu and set "Web GUI directory" to "Custom: /tmp/www (Experts Only!)". (Remember to [Save])

This should fix the problem. Now.. there is a better way to do this. That is to take the current /www/ folder and copy it over then import the single .css file that needs to be changed. However, I do not know what CSS needs to be changed so I did not go that far. If someone else does... I will revise my directions to something much cleaner.

OpticNerve75 commented 6 years ago

The actual bug is in /www/css/interface.css. This is how I fix it. First, take a copy of the CSS file:

cp /www/css/interface.css /var/wwwext/custom.css

Now you need to edit custom.css. Go to line 1269 and you'll see this section:

.btn-group { white-space: nowrap; font-size: 0; }

This needs to be modified to:

.btn-group { white-space: pre-wrap; font-size: 0; }

I used "vi" to go to 1269 and make the required edit. I then go to "Admin Access" and modify the "Interface Theme" to "Custom (ext/custom.css)". This tells the Tomato firmware just to use the modified CSS, rather than the entire Web GUI like you were doing.

I then copied the modified custom.css file to a USB stick which I leave plugged into the router and I use the "Run after mounting" setting to copy the custom.css file back to /var/wwwext on every reboot - but there are many different ways of achieving this step depending on how you want to do it.

TheFatherMind commented 6 years ago

I like this much better. Thank you for sharing. (: I did fix my chrashing the GUI problem by doing nvram set nginx_docroot=/tmp/www && nvram commit But I am going to switch to yours.

Jackysi commented 6 years ago

Fixed for new releases. https://github.com/Jackysi/advancedtomato/issues/390 Old submission.