iPSK-Manager icon indicating copy to clipboard operation
iPSK-Manager copied to clipboard

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

Open David00 opened this issue 2 years ago • 6 comments

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.

David00 avatar Apr 24 '22 18:04 David00

@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

nclavric avatar Jun 01 '22 17:06 nclavric

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.

David00 avatar Jun 01 '22 18:06 David00

@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!

nclavric avatar Jun 03 '22 06:06 nclavric

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

David00 avatar Jun 21 '22 21:06 David00

@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

nclavric avatar Jun 22 '22 16:06 nclavric

Thanks for letting me know!

David00 avatar Jun 22 '22 16:06 David00

@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.

ismavislb avatar May 16 '23 20:05 ismavislb

@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.

ciesinsn avatar Oct 19 '23 15:10 ciesinsn

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

David00 avatar Oct 19 '23 20:10 David00

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.

David00 avatar Jan 19 '24 19:01 David00