glass-isc-dhcp icon indicating copy to clipboard operation
glass-isc-dhcp copied to clipboard

"Leases" panel does not populate until you enter a search string

Open Fohdeesha opened this issue 6 years ago • 6 comments

First off, amazing project. I was amazed to find not many ISC-DHCP front ends, until I found this, and it's great. Is there anywhere I can donate a few dollars?

One naggle I've found is I'd like to just click "leases" and get a nice big list of all leases. However it just pulls up a blank page. If I want to get a list populated with everything, I have to click in the box and hit enter (search for a blank string).

I'm assuming the intention here is to not auto-populate with potentially thousands of leases on large infrastructure (and maybe overwhelm the browser)? I can understand that, but is there any possibility of having it auto-populate if leases < 500 or something similar, or even just have an auto-populate-leases config option in glass_config.json ? Thanks!

If this is a simple add and you can point me in the right direction I can probably attempt a PR myself

Fohdeesha avatar Oct 06 '18 09:10 Fohdeesha

Love this project, i can't help with above, but i think the search string is broken, or i'm confused how to use it.. I figured i could type in any IP and have it list just that IP.. It just doesn't list anything if i type in a valid IP

djamp42 avatar Oct 12 '18 18:10 djamp42

I am experiencing the same issue when entering a valid IP Address.

jdtinsley88 avatar Jan 30 '19 19:01 jdtinsley88

Same here as @Fohdeesha reported. Would be very nice if the leases tab lists all leases without "searching".

mhoffmann75 avatar Mar 25 '19 13:03 mhoffmann75

One workaround for this might be starting the search on page load: https://github.com/Akkadius/glass-isc-dhcp/pull/39/commits/0f7476be8dbed6dc5030d68140c0e31209c47e47 There might be other ways that are cleaner to accomplish this.

mhoffmann75 avatar Mar 27 '19 09:03 mhoffmann75

@mhoffmann75 thanks for this!

Fohdeesha avatar Mar 27 '19 23:03 Fohdeesha

We've found an error in routes/dhcp_lease_search.js file, row 33 should be:

if(!matcher.test(JSON.stringify(dhcp_lease_data[key])) && !matcher.test(key)) and not if(!matcher.test(JSON.stringify(dhcp_lease_data[key])))

This fix solves IP search problem.

romanmm avatar Jul 29 '19 12:07 romanmm