CiscoDevNet / iPSK-Manager

Identity PSK (IPSK) Manager for Cisco ISE provides an example of how to manage the full Life Cycle of Wi-Fi Pre Shared Keys for supported Hardware/Software through Cisco ISE.
Apache License 2.0
31 stars 16 forks source link

Add ability to search endpoint list by any attribute, including name and email. #22

Closed David00 closed 1 year ago

David00 commented 2 years ago

First off, my apologies about the messy PR. I built this feature based on my current production box which is running commit f7f5b7e, then I realized I was behind the commit history, so I pulled the latest master down into my branch and re-tested.

This PR partially addresses issue #19 by adding search functionality to the list of endpoint associations.

I may look at inline/bulk editing in the future, but this should add a nice improvement to the endpoint list.

Note that you can search the table by full name and email, even though these fields are not displayed in the table itself. Displaying these fields in the table is a simple change that most folks should be able to do if needed - simply remove all four instances of display:none; in /supportfiles/adminportals/modules/endpoints/endpoints.inc.php.

I don't have tests to go along with this PR as the changes are trivial UI changes and read-only query modifications.

nclavric commented 2 years ago

@David00 : I just tested your changes! The search feature works without any problems, but it seems that the first endpoint in the DB (asc ordered by mac) is always displayed as suspended and without any detail information when pressing "View". Can you confirm this "bug"?Screenshot 2022-06-01 193004

And is it possible to get the "Description" also searchable and viewable in the table?

Thank you in advance for your commitment and the developments you have made. BR, nclavric

David00 commented 2 years ago

Yes, I see the "suspended" entry too. I was hoping it was just something with my installation but since you see it too, it must be a bug. I'll take a look at it.

And yes, I can add the ability to search by description and show it in the table if needed.

nclavric commented 2 years ago

@David00 Good to hear, that at least we both got the same issue. :) And thank you for checking it again! If I can help/support you please let me know!

David00 commented 2 years ago

I just fixed the issue for the "Suspended" entry that was showing up in the endpoints list, and also made the endpoints table searchable by endpoint description.

I followed the same hidden behavior for the description as I did with the other fields, so if you want to show the description in the table, you'll have to remove the display=none; attribute in two places for the description field:

https://github.com/CiscoDevNet/iPSK-Manager/blob/dd68cc3a05bbed2dbd6361461cff6daba0287bba/supportfiles/adminportals/modules/endpoints/endpoints.inc.php#L85

And:

https://github.com/CiscoDevNet/iPSK-Manager/blob/dd68cc3a05bbed2dbd6361461cff6daba0287bba/supportfiles/adminportals/modules/endpoints/endpoints.inc.php#L112

nclavric commented 2 years ago

@David00 I just tested your changes and everything works like a charm now!!! Thank you very much for your effort and your support! 👍 BR, nclavric

David00 commented 2 years ago

Thanks for letting me know!

ismavislb commented 1 year ago

@David00 Changes working great! It would be great to extend the ability to search endpoint list by any attribute to sponsor portal/manage.php, and make endpoint management easier for sponsors.

ciesinsn commented 1 year ago

@David00, I reviewed your pull request and plan to approve after I push some fixes to the repo for php8. Thanks for your contribution and sorry its taken a bit for them to get pulled in.

David00 commented 1 year ago

Hey @ciesinsn, no worries! Thanks for looking this over.

David00 commented 9 months ago

I just fixed the issue for the "Suspended" entry that was showing up in the endpoints list, and also made the endpoints table searchable by endpoint description.

I just stood up a new iPSK Manager and this issue came back to bite in a different manner. The very first MAC address entry that you create will never be displayed in the table. The root cause is related to this "Suspended" entry that I thought I fixed in the discussion above, but I didn't correctly identify the cause of the "Suspended" entry back then.

@ciesinsn, I will open an issue with more details for this and submit a PR with the fix.