djmelik / lndash

A simple web dashboard for lnd.
https://lightninglayer.com
GNU General Public License v3.0
118 stars 16 forks source link

Implement paging for peers/channels #19

Open prusnak opened 5 years ago

prusnak commented 5 years ago

Our node has 500+ channels and it takes quite some time to load the "Channels" page. It makes sense to implement some paging.

djmelik commented 5 years ago

Good idea. We should also add a search bar with a drop down so that we can select/view an individual peer.

prusnak commented 5 years ago

There is a module for this: https://flask-paginate.readthedocs.io/

Maybe it is an overkill and something similar to this is more than enough: http://flask.pocoo.org/snippets/44/

juscamarena commented 5 years ago

Great, mine just times out using it with the bitrefill node.

[2019-01-26 04:05:49 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:371) [2019-01-26 04:05:49 +0000] [371] [INFO] Worker exiting (pid: 371) [2019-01-26 04:05:49 +0000] [558] [INFO] Booting worker with pid: 558 [2019-01-26 04:06:20 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:558) [2019-01-26 04:06:20 +0000] [558] [INFO] Worker exiting (pid: 558) [2019-01-26 04:06:20 +0000] [742] [INFO] Booting worker with pid: 742 [2019-01-26 04:07:17 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:742) [2019-01-26 04:07:17 +0000] [742] [INFO] Worker exiting (pid: 742) [2019-01-26 04:07:17 +0000] [918] [INFO] Booting worker with pid: 918

djmelik commented 5 years ago

How about something like this instead? A lighter table view of all of the channels, we can also add some javascript to the table allowing us to sort/filter the rows. The idea would be to click/select an individual channel to bring up a more detailed view ie. /channels/<chan_id>.

I can push my local branch tomorrow when I'm done for you guys to test/evaluate.

screen shot 2019-01-26 at 3 02 22 am
djmelik commented 5 years ago

Example of filtered/sorted table:

screen shot 2019-01-26 at 3 32 42 am
21isenough commented 5 years ago

This looks awesome. Can you push a branch with these adjustments? Would love to try that out.

juscamarena commented 5 years ago

Awesome, would test it out here as well, /channels doesn't load at me at all, but I'm running it remotely with a node with 420+ channels