Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions polyphemus/lib/client/jsx/workflow/run-pane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import InputAdornment from '@material-ui/core/InputAdornment';
import {makeStyles} from '@material-ui/core/styles';
import WorkflowPane, {WorkflowPaneHeader} from './workflow-pane';
import Autocomplete from '@material-ui/lab/Autocomplete';
import ReportProblemOutlinedIcon from '@material-ui/icons/ReportProblemOutlined';

import {
RUN_NEVER,
Expand Down Expand Up @@ -274,6 +275,11 @@ const RunPane = ({
);
}, [savePayload, params, param_opts]);

const dryRun = useMemo(() => {
const nextParams = {...params, ...newParams}
return 'commit' in nextParams && !nextParams['commit']
}, [param_opts, params, newParams])

return (
<WorkflowPane mode='run' selected={selected}>
<WorkflowPaneHeader title='Run'>
Expand Down Expand Up @@ -323,6 +329,20 @@ const RunPane = ({
</span>
</Tooltip>
</Grid>
{ dryRun &&
<Grid item>
<Tooltip title="Parsed updates will not be committed to the database">
<Grid item container alignItems='center' spacing={0}>
<Grid item>
<ReportProblemOutlinedIcon/>
</Grid>
<Grid item>
<Typography>Dry Run Mode</Typography>
</Grid>
</Grid>
</Tooltip>
</Grid>
}
{(error || message) && (
<Grid item className={error ? classes.error : classes.completed}>
<Typography>{error || message}</Typography>
Expand Down