Skip to content

Commit baac806

Browse files
committed
fix: update isOpen on the basis of searchKey
1 parent ec06938 commit baac806

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "0.1.8-beta-9",
3+
"version": "0.1.8-beta-10",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Shared/Components/CICDHistory/LogsRenderer.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ export const LogsRenderer = ({
304304
isOpen: getIsStageOpen(
305305
StageStatusType.PROGRESSING,
306306
previousExistingStage.isOpen,
307+
// Wont be present in case of start stage since no logs are present yet
307308
!!searchKeyStatusMap[stage]?.[startTime],
308309
!!targetSearchKey,
309310
),
@@ -327,6 +328,13 @@ export const LogsRenderer = ({
327328
const lastStage = acc[acc.length - 1]
328329
lastStage.logs.push(__html)
329330
if (isSearchKeyPresent) {
331+
lastStage.isOpen = getIsStageOpen(
332+
lastStage.status,
333+
previousStageMap[lastStage.stage]?.[lastStage.startTime]?.isOpen,
334+
true,
335+
!!targetSearchKey,
336+
)
337+
330338
if (!searchKeyStatusMap[lastStage.stage]) {
331339
searchKeyStatusMap[lastStage.stage] = {}
332340
}

0 commit comments

Comments
 (0)