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

JS TypeError vlan search view #696

Closed
fkaempfer opened this issue Jan 24, 2020 · 3 comments
Closed

JS TypeError vlan search view #696

fkaempfer opened this issue Jan 24, 2020 · 3 comments

Comments

@fkaempfer
Copy link

fkaempfer commented Jan 24, 2020

I'm not sure what the reason behind is, but in my fresh installation with a couple of devices with VLAN in it, the VLAN search view (/search?tab=vlan&q=MyVLAN) causes a JS TypeError on load causing the datatable to be stuck on "Processing".

A bit of debugging shows that it is caused by the pcount column which does not exist in the result set (thus is undefined): toString() called on undefined data. As a workaround I changed share/views/ajax/search/vlan.tt line 39 data.toString() to (data || '?').toString()

Probably it would be best to make sure the pcount column is returned in lib/App/Netdisco/Web/Plugin/Search/VLAN.pm but as I said I do not know what is supposed to be returned here or what causes it to be missing.

ollyg added a commit that referenced this issue Jan 25, 2020
@ollyg
Copy link
Member

ollyg commented Jan 25, 2020

Hi @fkaempfer thanks for the bug report! Actually this was caused by adding a feature in the previous release but not taking enough care. Sorry about that. I have fixed and issued a new version of Netdisco.

[master db6e896] #696 complete implementation of #688

@ollyg ollyg closed this as completed Jan 25, 2020
@fkaempfer
Copy link
Author

Thanks, it's working fine with the latest release.

@ollyg
Copy link
Member

ollyg commented Jan 27, 2020

super, thanks for the confirmation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants