From cc46a3a311a25afffe67fc723b4a81cece9a83a9 Mon Sep 17 00:00:00 2001 From: Radhika Vissamsetty Date: Thu, 1 Aug 2024 19:18:17 +0530 Subject: [PATCH] Show tooltip for pipeline runs when run.records.ttl is present. --- .../RunLevelInfo/CurrentRunIndex.tsx | 13 ++++++++++++- app/cdap/text/text-en.yaml | 1 + server/express.js | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/cdap/components/PipelineDetails/RunLevelInfo/CurrentRunIndex.tsx b/app/cdap/components/PipelineDetails/RunLevelInfo/CurrentRunIndex.tsx index 8c1b6bde15a..e1847eb5219 100644 --- a/app/cdap/components/PipelineDetails/RunLevelInfo/CurrentRunIndex.tsx +++ b/app/cdap/components/PipelineDetails/RunLevelInfo/CurrentRunIndex.tsx @@ -86,6 +86,8 @@ const CurrentRunIndex = ({ runsCount - (runs.length - currentRunIndex) ); + const runLimit = Number(window.CDAP_CONFIG.cdap.runRecordsTtl) || 0; + const pipelineLink = getHydratorUrl({ stateName: 'hydrator.detail', stateParams: { @@ -192,7 +194,16 @@ const CurrentRunIndex = ({ return (
-

+

0 + ? T.translate(`${PREFIX}.tooltipRunLimit`, { + runLimit, + }).toString() + : '' + } + > {T.translate(`${PREFIX}.currentRunIndex`, { currentRunIndex: runIndexInTotalRunsCount + 1, numRuns: runsCount, diff --git a/app/cdap/text/text-en.yaml b/app/cdap/text/text-en.yaml index 1bdf52a0f8f..ba117d14ae1 100644 --- a/app/cdap/text/text-en.yaml +++ b/app/cdap/text/text-en.yaml @@ -2505,6 +2505,7 @@ features: noInfo: Profile information unavailable runsCurrentlyRunning: Runs currently running - select one to view status: Status + tooltipRunLimit: Pipeline runs for only the last {runLimit} days are displayed warnings: Warnings startTime: Start time TopPanel: diff --git a/server/express.js b/server/express.js index ca4e63acafe..2b1286b2cb7 100644 --- a/server/express.js +++ b/server/express.js @@ -257,6 +257,7 @@ function makeApp(authAddress, cdapConfig, uiSettings) { hstsMaxAge: cdapConfig['hsts.max.age'], hstsIncludeSubDomains: cdapConfig['hsts.include.sub.domains'], hstsPreload: cdapConfig['hsts.preload'], + runRecordsTtl: cdapConfig['app.run.records.ttl.days'], }, hydrator: { previewEnabled: cdapConfig['enable.preview'] === 'true',