Skip to content

Commit 03f9c64

Browse files
committed
fix: update the logic for last snapshot time
1 parent 2172f3d commit 03f9c64

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

src/components/app/details/appDetails/AppDetails.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,9 +492,6 @@ export const Details: React.FC<DetailsType> = ({
492492
deploymentTriggerTime: deploymentStatusDetailRes.result.deploymentStartedOn,
493493
deploymentEndTime: deploymentStatusDetailRes.result.deploymentFinishedOn,
494494
triggeredBy: deploymentStatusDetailRes.result.triggeredBy,
495-
statusLastFetchedAt: deploymentStatusDetailRes.result.statusLastFetchedAt
496-
? handleUTCTime(deploymentStatusDetailRes.result.statusLastFetchedAt, true)
497-
: '',
498495
})
499496
} else {
500497
processDeploymentStatusData(deploymentStatusDetailRes.result)

src/components/app/details/appDetails/SourceInfo.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
ConditionalWrap,
2323
DeploymentAppTypes,
2424
getIsManualApprovalConfigured,
25+
handleUTCTime,
2526
ReleaseMode,
2627
showError,
2728
Tooltip,
@@ -169,6 +170,10 @@ export const SourceInfo = ({
169170
const renderDevtronAppsEnvironmentSelector = (environment) => {
170171
// If moving to a component then move getIsApprovalConfigured with it as well with memoization.
171172
const isApprovalConfigured = getIsApprovalConfigured()
173+
const lastSnapshotTime = appDetails?.resourceTree?.lastSnapshotTime ? handleUTCTime(
174+
appDetails.resourceTree.lastSnapshotTime,
175+
true,
176+
) : ''
172177

173178
return (
174179
<div className="flex left w-100">
@@ -197,14 +202,12 @@ export const SourceInfo = ({
197202
</div>
198203
)}
199204
{/* Last snapshot time */}
200-
{isAirGappedIsolatedEnv && deploymentStatusDetailsBreakdownData?.statusLastFetchedAt && (
205+
{isAirGappedIsolatedEnv && lastSnapshotTime && (
201206
<Tooltip
202207
content={
203208
<div className="fw-4 lh-18 flexbox-col dc__ga-2">
204209
<h6 className="fs-12 fw-6 cn-0 m-0">Last snapshot received</h6>
205-
<p className="m-0 fs-12 cn-50">
206-
{deploymentStatusDetailsBreakdownData.statusLastFetchedAt}
207-
</p>
210+
<p className="m-0 fs-12 cn-50">{lastSnapshotTime}</p>
208211
</div>
209212
}
210213
alwaysShowTippyOnHover

src/components/app/details/appDetails/appDetails.type.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ export interface DeploymentStatusDetailsBreakdownDataType {
112112
APP_HEALTH?: DeploymentStatusDetailRow
113113
HELM_PACKAGE_GENERATED?: DeploymentStatusDetailRow
114114
}
115-
statusLastFetchedAt?: string
116115
}
117116

118117
export interface DeploymentStatusDetailModalType {

0 commit comments

Comments
 (0)