From 9c5f86c51de3a9a6d806cc1a76c0dd9d2e635038 Mon Sep 17 00:00:00 2001 From: GnsP Date: Tue, 26 May 2026 11:12:21 +0530 Subject: [PATCH] add support for configurable entities limit for the connections browser --- .../Connections/Browser/GenericBrowser/apiHelpers.ts | 4 +++- server/config/development/cdap.json | 3 ++- server/express.js | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/cdap/components/Connections/Browser/GenericBrowser/apiHelpers.ts b/app/cdap/components/Connections/Browser/GenericBrowser/apiHelpers.ts index f0cde816347..dea557aa35e 100644 --- a/app/cdap/components/Connections/Browser/GenericBrowser/apiHelpers.ts +++ b/app/cdap/components/Connections/Browser/GenericBrowser/apiHelpers.ts @@ -17,8 +17,10 @@ import { ConnectionsApi } from 'api/connections'; import DataprepApi from 'api/dataprep'; import { getCurrentNamespace } from 'services/NamespaceStore'; +import { getCdapConfig } from 'services/helpers'; -export const ENTITY_TRUNCATION_LIMIT = 1000; +export const ENTITY_TRUNCATION_LIMIT_SETTING = 'defaultWranglerBrowseEntitiesLimit'; +export const ENTITY_TRUNCATION_LIMIT = getCdapConfig(ENTITY_TRUNCATION_LIMIT_SETTING, 2000); export function exploreConnection({ connectionid, path = '/' }) { const body = { diff --git a/server/config/development/cdap.json b/server/config/development/cdap.json index 7d3fae63ab5..9c9d6db3e64 100644 --- a/server/config/development/cdap.json +++ b/server/config/development/cdap.json @@ -23,5 +23,6 @@ "hsts.max.age": 31536000, "hsts.include.sub.domains": "true", "hsts.preload": "true", - "ui.default.poll.interval.millis": "10000" + "ui.default.poll.interval.millis": "10000", + "ui.wrangler.connections.browse.entities.limit": "2000" } diff --git a/server/express.js b/server/express.js index 15ce228824c..a0b705c7731 100644 --- a/server/express.js +++ b/server/express.js @@ -259,6 +259,7 @@ function makeApp(authAddress, cdapConfig, uiSettings) { hstsPreload: cdapConfig['hsts.preload'], runRecordsTtl: cdapConfig['app.run.records.ttl.days'], defaultPollIntervalMs: parseInt(cdapConfig['ui.default.poll.interval.millis'], 10) || 10000, + defaultWranglerBrowseEntitiesLimit: parseInt(cdapConfig['ui.wrangler.connections.browse.entities.limit'], 10) || 2000, }, hydrator: { previewEnabled: cdapConfig['enable.preview'] === 'true',