Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
Actually disable edit menu item on orphaned plans
Browse files Browse the repository at this point in the history
  • Loading branch information
mturley committed Sep 21, 2018
1 parent d895f0f commit 6d513bc
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ class MigrationsNotStartedList extends React.Component {
const migrationScheduled = plan.schedules && plan.schedules[0].run_at.start_time;
const isMissingMapping = !plan.infraMappingName;

const editPlanDisabled = isMissingMapping || loading === plan.href;

return (
<ListView.Item
stacked
Expand Down Expand Up @@ -128,9 +130,9 @@ class MigrationsNotStartedList extends React.Component {
<MenuItem
onClick={e => {
e.stopPropagation();
showPlanWizardEditModeAction(plan.id);
if (!editPlanDisabled) showPlanWizardEditModeAction(plan.id);
}}
disabled={isMissingMapping || loading === plan.href}
disabled={editPlanDisabled}
>
{__('Edit')}
</MenuItem>
Expand Down

0 comments on commit 6d513bc

Please sign in to comment.