Skip to content

Commit

Permalink
only show warning when force termination checkbox is checked (#7157)
Browse files Browse the repository at this point in the history
  • Loading branch information
prha committed Mar 22, 2022
1 parent 2cffa49 commit 35f5f7e
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions js_modules/dagit/packages/core/src/runs/TerminationDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,20 +187,23 @@ export const TerminationDialog = (props: Props) => {
</div>
<div>
{showCheckbox ? (
<Checkbox
checked={state.mustForce}
size="small"
label={
<Box flex={{display: 'flex', direction: 'row', gap: 8}}>
<>
<Checkbox
checked={state.mustForce}
size="small"
label="Force termination immediately"
onChange={onToggleForce}
/>
{state.mustForce ? (
<Box flex={{display: 'flex', direction: 'row', gap: 8}} margin={{top: 8}}>
<IconWIP name="warning" color={ColorsWIP.Yellow500} />
<div>
Force termination immediately. <strong>Warning:</strong> computational
resources created by runs may not be cleaned up.
<strong>Warning:</strong> computational resources created by runs may not be
cleaned up.
</div>
</Box>
}
onChange={onToggleForce}
/>
) : null}
</>
) : (
<Group direction="row" spacing={8}>
<IconWIP name="warning" color={ColorsWIP.Yellow500} />
Expand Down

0 comments on commit 35f5f7e

Please sign in to comment.