Bug 489318
Summary: | TPS "List Activites" - does not list activities after 20 entries?? | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] Dogtag Certificate System | Reporter: | Kashyap Chamarthy <kchamart> | ||||||
Component: | TPS | Assignee: | Ade Lee <alee> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Chandrasekar Kannan <ckannan> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | urgent | ||||||||
Version: | unspecified | CC: | alee, awnuk, benl, cfu, jgalipea, jmagne | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2009-07-22 23:32:57 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 443788 | ||||||||
Attachments: |
|
Description
Kashyap Chamarthy
2009-03-09 13:48:39 UTC
Created attachment 335625 [details]
patch to fix
Fix this simply as follows:
1. Allow to return a maximum of 100 results for a non-search return (instead of 20).
2. Add pagination (25 entries per page)
3. Return the latest 100 activity logs (now in reverse order) for non-search.
cfu, please review.
attachment (id=335625) +awnuk (under assumption "doCancel()" is removed) [builder@dhcp231-124 tps-ui]$ svn ci -m "Bugzilla 489318 TPS does not list more than 20 activities" Sending tps-ui/dogtag-pki-tps-ui.spec Sending tps-ui/shared/docroot/tokendb/editUser.template Sending tps-ui/shared/docroot/tokendb/searchActivityAdminResults.template Sending tps-ui/shared/docroot/tokendb/searchActivityResults.template Sending tps-ui/shared/docroot/tokendb/searchAdminResults.template Sending tps-ui/shared/docroot/tokendb/searchCertificateResults.template Sending tps-ui/shared/docroot/tokendb/searchResults.template Sending tps-ui/shared/docroot/tokendb/searchUserResults.template Transmitting file data ........ Committed revision 314. [builder@dhcp231-124 tps]$ svn ci -m "Bugzilla 489318 TPS does not list more than 20 activities" pki-tps.spec ../../base/tps/ Sending base/tps/src/modules/tokendb/mod_tokendb.cpp Sending dogtag/tps/pki-tps.spec Transmitting file data .. Committed revision 315. I was doing some searches. - main menu - agent operations - search activities - max count : 200 - 1st page returned: 200 of 504 ( I guess I have 504 total activities as max) - 2nd page returned: 200 of 504. .. .. .. - 6th page(last page shown )returned: 164 of 504. The number reported seems bogus to me. Created attachment 347606 [details]
patch to fix2
patch to finally fix pagination.
In the past, there was no pagination and so the size of the buffer injection was set by a heuristic as follows:
After the first entry is added to the injection - determine the size of the injection and multiply that by the total number of entries (up to a maximum size)
So, if the total number of entries was 10 000, then the size of the buffer would be roughly 10 000 * sizeof(one entry + header)
We now have pagination - so we do not return all the entries at once. So the above algorithm makes no sense. Instead, we check after each entry and grow the buffer (up to a maximum size) as needed.
Before, the variable "limited" made sense because the number of entries returned was limited by the largest buffer size. If there were 10000 entries, but the max buffer size only allowed the display of 2000 entries, then we needed to say "2000 of 10000" entries. The downside of course was that it was not possible to find the remaining entries..
With pagination, this is no longer a limitation. The number of entries per page is limited to 25 - so we can display all of them - albeit in little batches at a time. "limited" now refers to the size of maxReturns as defined by the user. ie. if I do a search on certificates, and the search returns 100 certs and I have designated a maxReturn of 50 , then it will say 50 of 100.
Obviously, if the number of max returns is less than the number of search results -- it will just list the number of search results.
This does not work for searches on tokens, where maxReturns is used to limit the size of the search results returned. Thats probably the right thing to do for other searches -- but I'm not going to touch that now.
awnuk, please review
attachment (id=347606) +awnuk It would even nicer to have an option to enter page size from UI. CA is already handling page size this way. Will add UI option in later bug. [builder@dhcp231-124 pki]$ svn ci -m "Bugzilla Bug #489318 - TPS List Activites - does not list activities after 20 entries - fix pagination" Sending base/tps/src/modules/tokendb/mod_tokendb.cpp Sending dogtag/tps/pki-tps.spec Transmitting file data .. Committed revision 586. Verified: Listing activities max is 100 and displays 25 per page Searching activies with 516 activities: max 100 - displays 100 - 25 per page - 100 of 516 displayed at bottom of each page max 525 - displays all - 25 per page - last page displays last 16 - Total:516 displayed at bottom of each page |