@@ -378,7 +378,7 @@ export const ApplicationSummary = (props: ApplicationSummaryProps) => {
378378 try {
379379 setChangeSync ( true ) ;
380380 const updatedApp = JSON . parse ( JSON . stringify ( props . app ) ) as models . Application ;
381- if ( ! updatedApp . spec . syncPolicy ) {
381+ if ( ! updatedApp . spec . syncPolicy ) {
382382 updatedApp . spec . syncPolicy = { } ;
383383 }
384384 //preserve the current enabled state when modifying prune or self heal
@@ -556,7 +556,8 @@ export const ApplicationSummary = (props: ApplicationSummaryProps) => {
556556 await updateApp ( updatedApp , { validate : false } ) ;
557557 }
558558 } }
559- checked = { app . spec . syncPolicy ?. automated ? ( app . spec . syncPolicy . automated . enabled !== false ) : false } id = 'enable-auto-sync'
559+ checked = { app . spec . syncPolicy ?. automated ? app . spec . syncPolicy . automated . enabled !== false : false }
560+ id = 'enable-auto-sync'
560561 />
561562 < label htmlFor = 'enable-auto-sync' > ENABLE AUTO-SYNC</ label >
562563 < HelpIcon title = 'If checked, application will automatically sync when changes are detected' />
@@ -575,7 +576,8 @@ export const ApplicationSummary = (props: ApplicationSummaryProps) => {
575576 'Disable Prune Resources?' ,
576577 'Are you sure you want to disable resource pruning during automated application synchronization?' ,
577578 false ,
578- app . spec . syncPolicy . automated . selfHeal
579+ app . spec . syncPolicy . automated . selfHeal ,
580+ app . spec . syncPolicy . automated . enabled
579581 )
580582 } >
581583 Disable
@@ -589,7 +591,8 @@ export const ApplicationSummary = (props: ApplicationSummaryProps) => {
589591 'Enable Prune Resources?' ,
590592 'Are you sure you want to enable resource pruning during automated application synchronization?' ,
591593 true ,
592- app . spec . syncPolicy . automated . selfHeal
594+ app . spec . syncPolicy . automated . selfHeal ,
595+ app . spec . syncPolicy . automated . enabled
593596 )
594597 } >
595598 Enable
@@ -609,7 +612,8 @@ export const ApplicationSummary = (props: ApplicationSummaryProps) => {
609612 'Disable Self Heal?' ,
610613 'Are you sure you want to disable automated self healing?' ,
611614 app . spec . syncPolicy . automated . prune ,
612- false
615+ false ,
616+ app . spec . syncPolicy . automated . enabled
613617 )
614618 } >
615619 Disable
@@ -623,7 +627,8 @@ export const ApplicationSummary = (props: ApplicationSummaryProps) => {
623627 'Enable Self Heal?' ,
624628 'Are you sure you want to enable automated self healing?' ,
625629 app . spec . syncPolicy . automated . prune ,
626- true
630+ true ,
631+ app . spec . syncPolicy . automated . enabled
627632 )
628633 } >
629634 Enable
0 commit comments