From 8121c9df29db8e04d2b188ec29408c0e0ce02a6d Mon Sep 17 00:00:00 2001 From: Kawika Avilla Date: Mon, 15 May 2023 11:21:18 -0700 Subject: [PATCH] [Dashboards listing] fix listing limit (#4021) 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: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/4017 Signed-off-by: Kawika Avilla --- CHANGELOG.md | 1 + src/plugins/dashboard/public/application/legacy_app.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef17eb77691e..bf7df824e532 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/plugins/dashboard/public/application/legacy_app.js b/src/plugins/dashboard/public/application/legacy_app.js index baacc69f7802..0c10653d7f41 100644 --- a/src/plugins/dashboard/public/application/legacy_app.js +++ b/src/plugins/dashboard/public/application/legacy_app.js @@ -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',