-
Notifications
You must be signed in to change notification settings - Fork 3
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
Problem: Packages count only ever counts packages listed on current page #988
Comments
Fixing the total package count is going to require changes to the Enduro API - the current |
Thanks for the context, @djjuhasz! |
Refs #988, #514 To address #988 and provide a count of the total number of packages in the dashboard the API GET /package endpoint to provide total number of packages in a result set. Because we need to update the API and the underlying database calls, this is a good opportunity to also address issue #514 and add a general search implementation that allows filtering, ordering and paging results. This PR adds this general search filtering implementation with paging and ordering, and also provides a count of the total number of records matching the search criteria before paging. - Add a persistence package filter stub implementation - Add persistence Page and Sort structs - Add an entgo query filter implementation - Add methods to add page, sort, and column value filters to the ent filter implementation - Add a timerange package for representing time ranges (i.e. a time period with a start and end time)
Refs #988, #514 To address #988 and provide a count of the total number of packages in the dashboard the API GET /package endpoint to provide total number of packages in a result set. Because we need to update the API and the underlying database calls, this is a good opportunity to also address issue #514 and add a general search implementation that allows filtering, ordering and paging results. This PR adds this general search filtering implementation with paging and ordering, and also provides a count of the total number of records matching the search criteria before paging. - Add a persistence package filter stub implementation - Add persistence Page and Sort structs - Add an entgo query filter implementation - Add methods to add page, sort, and column value filters to the ent filter implementation - Add a timerange package for representing time ranges (i.e. a time period with a start and end time)
Refs #988 This continues the work toward #988 by adding a `ListPackages()` method to the persistence service that includes a count of the total search results returned (before paging), as well as allowing filtering, sorting, and paging of the search. This commit also: - Add a telemetry wrapper for the `ListPackages()` method to enable extra reporting and debugging data - Additonal comments for the `Filter.Page()` method - Many unit tests for the `ListPackages()` functionality
Refs #988 This continues the work toward #988 by adding a `ListPackages()` method to the persistence service that includes a count of the total search results returned (before paging), as well as allowing filtering, sorting, and paging of the search. Other changes: - Add a telemetry wrapper for the `ListPackages()` method to provide extra performance and debugging data - Add additonal commentary for the `Filter.Page()` method - Add many unit tests for the `ListPackages()` functionality
Refs #988 This continues the work toward #988 by adding a `ListPackages()` method to the persistence service that includes a count of the total search results returned (before paging), as well as allowing filtering, sorting, and paging of the search. Other changes: - Add a telemetry wrapper for the `ListPackages()` method to provide extra performance and debugging data - Add additional commentary for the `Filter.Page()` method - Add many unit tests for the `ListPackages()` functionality
Refs #988 This continues the work toward #988 by adding a `ListPackages()` method to the persistence service that includes a count of the total search results returned (before paging), as well as allowing filtering, sorting, and paging of the search. Other changes: - Add a telemetry wrapper for the `ListPackages()` method to provide extra performance and debugging data - Add additional commentary for the `Filter.Page()` method - Add many unit tests for the `ListPackages()` functionality
Refs #988 This continues the work toward #988 by adding a `ListPackages()` method to the persistence service that includes a count of the total search results returned (before paging), as well as allowing filtering, sorting, and paging of the search. Other changes: - Add a telemetry wrapper for the `ListPackages()` method to provide extra performance and debugging data - Add additional commentary for the `Filter.Page()` method - Add many unit tests for the `ListPackages()` functionality
Refs #988 This continues the work toward #988 by adding a `ListPackages()` method to the persistence service that includes a count of the total search results returned (before paging), as well as allowing filtering, sorting, and paging of the search. Other changes: - Add a telemetry wrapper for the `ListPackages()` method to provide extra performance and debugging data - Add additional commentary for the `Filter.Page()` method - Add many unit tests for the `ListPackages()` functionality
Refs #988 This continues the work toward #988 by adding a `ListPackages()` method to the persistence service that includes a count of the total search results returned (before paging), as well as allowing filtering, sorting, and paging of the search. Other changes: - Add a telemetry wrapper for the `ListPackages()` method to provide extra performance and debugging data - Add additional commentary for the `Filter.Page()` method - Add many unit tests for the `ListPackages()` functionality
Refs #988 This commit connects the API "GET /package" endpoint to the persistence layer `ListPackages()` method. It also adds the current page limit and offset as well as the total package count (before paging) to the API response. These changes will break the existing cursor-based pagination in the API and Enduro dashboard. I will fix paging in a subsequent commit. - Add page limit, offset, and total fields to API GET /package results - Use `persistence.ListPackages()` to populate API results - Add an adapter to convert goa `package_.ListPayload` search filters to `persistence.Filter` filters - Add tests for API package search filters
Refs #988 This commit connects the API "GET /package" endpoint to the persistence layer `ListPackages()` method. It also adds the current page limit and offset as well as the total package count (before paging) to the API response. These changes will break the existing cursor-based pagination in the API and Enduro dashboard. I will fix paging in a subsequent commit. - Add page limit, offset, and total fields to API GET /package results - Use `persistence.ListPackages()` to populate API results - Add an adapter to convert goa `package_.ListPayload` search filters to `persistence.Filter` filters - Add tests for API package search filters
Refs #988 This commit connects the API "GET /package" endpoint to the persistence layer `ListPackages()` method. The cursor request parameter is replaced by the optional limit and offset parameters. The response now returns the current page limit and offset, and the total number of results found before paging, instead of a cursor value. These changes will break the existing cursor-based pagination in the Enduro Dashboard. I will fix the Dashboard paging in a subsequent commit. - Add optional `limit` and `offset` parameters to the GET /package request - Add page `limit`, `offset`, and `total` fields to GET /package response - Use `persistence.ListPackages()` to populate API results - Add an adapter to convert goa `package_.ListPayload` search filters to `persistence.Filter` filters - Add tests for the conversion of the package API parameters to persistence layer parameters, and the persistence search results to API response results
Refs #988 This commit connects the API "GET /package" endpoint to the persistence layer `ListPackages()` method. The cursor request parameter is replaced by the optional limit and offset parameters. The response now returns the current page limit and offset, and the total number of results found before paging, instead of a cursor value. These changes will break the existing cursor-based pagination in the Enduro Dashboard. I will fix the Dashboard paging in a subsequent commit. - Add optional `limit` and `offset` parameters to the GET /package request - Add page `limit`, `offset`, and `total` fields to GET /package response - Use `persistence.ListPackages()` to populate API results - Add an adapter to convert goa `package_.ListPayload` search filters to `persistence.Filter` filters - Add tests for the conversion of the package API parameters to persistence layer parameters, and the persistence search results to API response results
Refs #988 This commit connects the API "GET /package" endpoint to the persistence layer `ListPackages()` method. The cursor request parameter is replaced by the optional limit and offset parameters. The response now returns the current page limit and offset, and the total number of results found before paging, instead of a cursor value. These changes will break the existing cursor-based pagination in the Enduro Dashboard. I will fix the Dashboard paging in a subsequent commit. - Add optional `limit` and `offset` parameters to the GET /package request - Add page `limit`, `offset`, and `total` fields to GET /package response - Use `persistence.ListPackages()` to populate API results - Add an adapter to convert goa `package_.ListPayload` search filters to `persistence.Filter` filters - Add tests for the conversion of the package API parameters to persistence layer parameters, and the persistence search results to API response results
Fixes #988: Adds the total number of packages found, before paging Other changes: - The package list subtitle now indicates which packages are currently displayed as well as the total number of results, e.g. "Showing 1 - 20 of 228" - The pager is only shown if there are more results than the page limit, i.e. if 27 results are returned an the page limit is 20 - The pager includes individual page links for up to 11 pages - If more than 11 pages of results are returned, "First" and "Last" page links are shown - The pager page list includes ellipses to indicate when their are more pages then the indivdual page links shown. I.e. if 15 pages of results are returned and the current page is page 1, then an list item containing an ellipsis is shown after the list item for page 11.
Fixes #988: The package list shows the total number of packages found, before paging. Other changes: - The package list subtitle now indicates which packages are currently displayed as well as the total number of results, e.g. "Showing 1 - 20 of 228" - The pager is only shown if there are more results than the page limit, i.e. if 27 results are returned an the page limit is 20 - The pager includes individual page links for up to 11 pages - If more than 11 pages of results are returned, "First" and "Last" page links are shown - The pager page list includes ellipses to indicate when their are more pages then the indivdual page links shown. I.e. if 15 pages of results are returned and the current page is page 1, then an list item containing an ellipsis is shown after the list item for page 11.
Fixes #988: The package list shows the total number of packages found, before paging. Other changes: - The package list subtitle now indicates which packages are currently displayed as well as the total number of results, e.g. "Showing 1 - 20 of 228" - The pager is only shown if there are more results than the page limit, i.e. if 27 results are returned an the page limit is 20 - The pager includes individual page links for up to 11 pages - If more than 11 pages of results are returned, "First" and "Last" page links are shown - The pager page list includes ellipses to indicate when their are more pages then the indivdual page links shown. I.e. if 15 pages of results are returned and the current page is page 1, then an list item containing an ellipsis is shown after the list item for page 11.
Fixes #988: The package list shows the total number of packages found, before paging. Other changes: - The package list subtitle now indicates which packages are currently displayed as well as the total number of results, e.g. "Showing 1 - 20 of 228" - The pager is only shown if there are more results than the page limit, i.e. if 27 results are returned an the page limit is 20 - The pager includes individual page links for up to 11 pages - If more than 11 pages of results are returned, "First" and "Last" page links are shown - The pager page list includes ellipses to indicate when their are more pages then the indivdual page links shown. I.e. if 15 pages of results are returned and the current page is page 1, then an list item containing an ellipsis is shown after the list item for page 11.
Fixes #988: The package list shows the total number of packages found, before paging. Other changes: - The package list subtitle now indicates which packages are currently displayed as well as the total number of results, e.g. "Showing 1 - 20 of 228" - The pager is only shown if there are more results than the page limit, i.e. if 27 results are returned an the page limit is 20 - The pager includes individual page links for up to 11 pages - If more than 11 pages of results are returned, "First" and "Last" page links are shown - The pager page list includes ellipses to indicate when their are more pages then the indivdual page links shown. I.e. if 15 pages of results are returned and the current page is page 1, then an list item containing an ellipsis is shown after the list item for page 11.
Fixes #988: The package list shows the total number of packages found, before paging. Other changes: - Show text indicating which packages are currently displayed as well as the total number of results, e.g. "Showing 1 - 20 of 228" - Show the pager only when there are more results than the page limit, e.g. if 27 results are returned an the page limit is 20 - Include individual page links for up to 7 pages - Show "first" and "last" page links when more than 7 pages of results are returned - Show an ellipsis before or after the page links to indicated there are more pages than the page links show - Hide page links and ellipses on narrow screens
👍 LGTM! Also, I personally did end up liking have the results count both at the top and the bottom of the page. Even on a relatively large monitor, , the 20 results regularly went beyond my screen, so having that count repeated at the bottom by the pager (esp given that the pager doesn't reload the page fully and bring you back to the top) works well. |
Description
The Packages browse page in Enduro includes a count of page results and total packages, just below the page header. However, this counter constantly only ever reads
20/20
- it is currently only ever listing the total package count as the current total page count.To Reproduce
Steps to reproduce the behavior:
Error encountered
Package count reads:
Expected outcome
This counter should:
The text was updated successfully, but these errors were encountered: