Skip to content

Commit

Permalink
fix: don't disable buttons for multi-source apps (#20446) (#20447)
Browse files Browse the repository at this point in the history
With #20381 multi-source apps were not taken into account 🤦

Fixes #20445.

Signed-off-by: Blake Pettersson <[email protected]>
Co-authored-by: Blake Pettersson <[email protected]>
  • Loading branch information
1 parent 5c595d8 commit 2076b4f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -920,19 +920,19 @@ export class ApplicationDetails extends React.Component<RouteComponentProps<{app
iconClassName: 'fa fa-info-circle',
title: <ActionMenuItem actionLabel='Details' />,
action: () => this.selectNode(fullName),
disabled: !app.spec.source
disabled: !app.spec.source && (!app.spec.sources || app.spec.sources.length === 0)
},
{
iconClassName: 'fa fa-file-medical',
title: <ActionMenuItem actionLabel='Diff' />,
action: () => this.selectNode(fullName, 0, 'diff'),
disabled: app.status.sync.status === appModels.SyncStatuses.Synced || !app.spec.source
disabled: app.status.sync.status === appModels.SyncStatuses.Synced || (!app.spec.source && (!app.spec.sources || app.spec.sources.length === 0))
},
{
iconClassName: 'fa fa-sync',
title: <ActionMenuItem actionLabel='Sync' />,
action: () => AppUtils.showDeploy('all', null, this.appContext.apis),
disabled: !app.spec.source
disabled: !app.spec.source && (!app.spec.sources || app.spec.sources.length === 0)
},
{
iconClassName: 'fa fa-info-circle',
Expand Down

0 comments on commit 2076b4f

Please sign in to comment.