jpatokal / openflights

Website for storing flight information, rendering paths on a zoomable world map and calculating statistics, with plenty of free airline, airport and route data.
http://openflights.org
GNU Affero General Public License v3.0
1.37k stars 387 forks source link

Top10 does not show all records #1468

Closed Peter0090 closed 3 months ago

Peter0090 commented 3 months ago

Screenshot_20240303_183419_Samsung Internet

It shows only top 10 list, although I click all from few months ago

corywright commented 3 months ago

I came here to report this bug as well. When logged in, and after clicking on "Top 10", if you change the "Show" dropdown to be "All" then the page only displays the Top 10. There is currently no way to view all stats from this page.

reedy commented 3 months ago

I'm guessing the limit isn't being passed across correctly

corywright commented 3 months ago

I'm guessing the limit isn't being passed across correctly

I opened the Firefox web developer tools, inspected the dropdown element, and changed the value from "-1" to "9999" for the "All" option and that works. The problem might be here?

https://github.com/jpatokal/openflights/blob/master/php/top10.php#L50-L53

reedy commented 3 months ago

The limit isn't being passed at all when it's on -1 (confirmed by watching the web requests).

https://github.com/jpatokal/openflights/blame/master/openflights.js#L2801-L2815

Peter0090 commented 3 months ago

The issue hansn't been cleared. What does close mean?

reedy commented 3 months ago

It's fixed in the code repo, so the issue gets closed. That's how it is in most places.

I can't deploy changes.

Peter0090 commented 3 months ago

How can I check it fixed? I found nothing still has been changed yet

reedy commented 3 months ago

As I said, I can't deploy changes to openflights.org. So it won't be live on that site until Jani has chance.

https://github.com/jpatokal/openflights/commit/5234b5b72fafc727040cac42d2bb67d2a1d71f89 is the commit that should fix it.

You could run openflights locally if you wanted to test it.