From 6d513bc6088cf57fedbad9eff66a74316fe32ae3 Mon Sep 17 00:00:00 2001 From: Mike Turley Date: Fri, 14 Sep 2018 09:26:48 -0400 Subject: [PATCH] Actually disable edit menu item on orphaned plans --- .../components/Migrations/MigrationsNotStartedList.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/javascript/react/screens/App/Overview/components/Migrations/MigrationsNotStartedList.js b/app/javascript/react/screens/App/Overview/components/Migrations/MigrationsNotStartedList.js index b07f1d71b1..bb02fac8ad 100644 --- a/app/javascript/react/screens/App/Overview/components/Migrations/MigrationsNotStartedList.js +++ b/app/javascript/react/screens/App/Overview/components/Migrations/MigrationsNotStartedList.js @@ -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 ( { e.stopPropagation(); - showPlanWizardEditModeAction(plan.id); + if (!editPlanDisabled) showPlanWizardEditModeAction(plan.id); }} - disabled={isMissingMapping || loading === plan.href} + disabled={editPlanDisabled} > {__('Edit')}