Skip to content

Commit

Permalink
[Dashboards listing] fix listing limit (#4021)
Browse files Browse the repository at this point in the history
Initial page size was passed to the search function instead
of the listing limit causing the max amount received to be
significantly less than the previously implementation.

Saved objects per page is `20` by default and the listing
limit per page is `1000` by default.

Issue:
#4017

Signed-off-by: Kawika Avilla <[email protected]>
  • Loading branch information
kavilla authored May 15, 2023
1 parent 0188d05 commit 8121c9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [Console] Fix dev tool console autocomplete not loading issue ([#3775](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3775))
- [Console] Fix dev tool console run command with query parameter error ([#3813](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3813))
- Add clarifying tooltips to header navigation ([#3573](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3573))
- [Dashboards Listing] Fix listing limit to utilize `savedObjects:listingLimit` instead of `savedObjects:perPage` ([#4021](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4021))

### 🚞 Infrastructure

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/dashboard/public/application/legacy_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export function initDashboardApp(app, deps) {
type: $scope.dashboardListTypes,
search: search ? `${search}*` : undefined,
fields: ['title', 'type', 'description', 'updated_at'],
perPage: $scope.initialPageSize,
perPage: $scope.listingLimit,
page: 1,
searchFields: ['title^3', 'type', 'description'],
defaultSearchOperator: 'AND',
Expand Down

0 comments on commit 8121c9d

Please sign in to comment.