14
14
* limitations under the License.
15
15
*/
16
16
17
- // @ts -nocheck - @TODO: Remove this by fixing the type issues
18
- import React , { useEffect , useMemo , useState } from 'react'
19
- import { useParams } from 'react-router-dom'
17
+ import { useEffect , useMemo , useState } from 'react'
18
+ import { Link , useParams } from 'react-router-dom'
20
19
import Tippy from '@tippyjs/react'
21
20
import moment from 'moment'
22
21
import {
@@ -48,7 +47,6 @@ import { ReactComponent as RotateIcon } from '../../../../assets/icons/ic-arrows
48
47
import { ReactComponent as LinkIcon } from '../../../../assets/icons/ic-link.svg'
49
48
import { ReactComponent as Trash } from '../../../../assets/icons/ic-delete-dots.svg'
50
49
import { ReactComponent as ScaleDown } from '../../../../assets/icons/ic-scale-down.svg'
51
- import { ConfigApplyStatusCard } from './ConfigApplyStatusCard'
52
50
import HelmAppConfigApplyStatusCard from '@Components/v2/appDetails/sourceInfo/environmentStatus/HelmAppConfigApplyStatusCard'
53
51
54
52
const AppDetailsDownloadCard = importComponentFromFELibrary ( 'AppDetailsDownloadCard' )
@@ -192,7 +190,8 @@ export const SourceInfo = ({
192
190
} `}
193
191
>
194
192
< div className = { `flex ${ ! appDetails . isVirtualEnvironment ? 'ml-16' : '' } ` } >
195
- < DeploymentTypeIcon deploymentAppType = { appDetails ?. deploymentAppType } />
193
+ { /* TODO: verify what appType needs to be passed */ }
194
+ < DeploymentTypeIcon deploymentAppType = { appDetails ?. deploymentAppType } appType = { null } />
196
195
</ div >
197
196
</ Tooltip >
198
197
) }
@@ -210,7 +209,9 @@ export const SourceInfo = ({
210
209
< div className = "fw-4 lh-18 flexbox-col dc__ga-2" >
211
210
< h6 className = "fs-12 fw-6 cn-0 m-0" > Last snapshot received</ h6 >
212
211
< p className = "m-0 fs-12 cn-50" >
213
- { moment ( relativeSnapshotTime ) . format ( DATE_TIME_FORMATS . TWELVE_HOURS_FORMAT ) }
212
+ { moment ( appDetails . resourceTree . lastSnapshotTime ) . format (
213
+ DATE_TIME_FORMATS . TWELVE_HOURS_FORMAT ,
214
+ ) }
214
215
</ p >
215
216
</ div >
216
217
}
@@ -220,9 +221,7 @@ export const SourceInfo = ({
220
221
< div className = "dc__divider h-20 mr-8 ml-8" />
221
222
< div className = "flex left dc__gap-6 px-8 py-4" >
222
223
< ICCamera className = "scn-9 dc__no-shrink icon-dim-16" />
223
- < p className = "m-0 fs-13 fw-4 lh-20 cn-9 dc__truncate" >
224
- { deploymentStatusDetailsBreakdownData . statusLastFetchedAt }
225
- </ p >
224
+ < p className = "m-0 fs-13 fw-4 lh-20 cn-9 dc__truncate" > { relativeSnapshotTime } </ p >
226
225
</ div >
227
226
</ div >
228
227
</ Tooltip >
@@ -264,7 +263,7 @@ export const SourceInfo = ({
264
263
< button
265
264
data-testid = "app-details-rotate-pods-modal-button"
266
265
className = "cta cta-with-img small cancel fs-12 fw-6 mr-6"
267
- onClick = { setRotateModal }
266
+ onClick = { ( ) => setRotateModal ( true ) }
268
267
disabled = { isApprovalConfigured }
269
268
>
270
269
< RotateIcon className = "icon-dim-16 mr-6 icon-color-n7 scn-4" />
@@ -319,13 +318,15 @@ export const SourceInfo = ({
319
318
environment && (
320
319
< div className = "flex left w-100" >
321
320
{ status && (
322
- < AppStatusCard
323
- appDetails = { appDetails }
324
- status = { status }
325
- cardLoading = { cardLoading }
326
- setDetailed = { setDetailed }
327
- message = { message }
328
- />
321
+ < AppStatusCard
322
+ // TODO: Fix and remove
323
+ // @ts -ignore
324
+ appDetails = { appDetails }
325
+ status = { status }
326
+ cardLoading = { cardLoading }
327
+ setDetailed = { setDetailed }
328
+ message = { message }
329
+ />
329
330
) }
330
331
{ ! helmMigratedAppNotTriggered && (
331
332
< >
0 commit comments