diff --git a/workspaces/orchestrator/plugins/orchestrator/src/components/InfoDialog.tsx b/workspaces/orchestrator/plugins/orchestrator/src/components/InfoDialog.tsx index e147bf64f..b2411a1ba 100644 --- a/workspaces/orchestrator/plugins/orchestrator/src/components/InfoDialog.tsx +++ b/workspaces/orchestrator/plugins/orchestrator/src/components/InfoDialog.tsx @@ -43,6 +43,10 @@ const useStyles = makeStyles(_theme => ({ right: 8, top: 8, }, + dialogActions: { + justifyContent: 'flex-start', + paddingLeft: _theme.spacing(2), + }, })); export const RefForwardingInfoDialog: ForwardRefRenderFunction< @@ -69,7 +73,9 @@ export const RefForwardingInfoDialog: ForwardRefRenderFunction< {children} - {dialogActions} + + {dialogActions} + ); }; diff --git a/workspaces/orchestrator/plugins/orchestrator/src/components/WorkflowInstancePage.tsx b/workspaces/orchestrator/plugins/orchestrator/src/components/WorkflowInstancePage.tsx index 734d4ff90..58bb9c8ce 100644 --- a/workspaces/orchestrator/plugins/orchestrator/src/components/WorkflowInstancePage.tsx +++ b/workspaces/orchestrator/plugins/orchestrator/src/components/WorkflowInstancePage.tsx @@ -28,6 +28,7 @@ import { } from '@backstage/core-plugin-api'; import { + Box, Button, CircularProgress, Grid, @@ -37,7 +38,7 @@ import { import Snackbar from '@material-ui/core/Snackbar'; import { createStyles, makeStyles, Theme } from '@material-ui/core/styles'; import CloseIcon from '@material-ui/icons/Close'; -import ErrorOutlineIcon from '@material-ui/icons/ErrorOutline'; +import ErrorIcon from '@material-ui/icons/Error'; import Alert from '@material-ui/lab/Alert'; import { @@ -87,9 +88,11 @@ export type AbortAlertDialogContentProps = { const AbortConfirmationDialogContent = () => (
- Are you sure you want to abort this workflow run?

- Aborting will stop all in-progress and pending steps immediately. Any - incomplete tasks will not be saved. + + Are you sure you want to abort this workflow run?

+ Aborting will stop all in-progress and pending steps immediately. Any + incomplete tasks will not be saved. +
); @@ -109,11 +112,11 @@ export const WorkflowInstancePage = ({ useState(false); const [isAborting, setIsAborting] = React.useState(false); - const [open, setOpen] = React.useState(false); + const [isAbortSnackbarOpen, setIsAbortSnackbarOpen] = React.useState(false); const [abortError, setAbortError] = React.useState(''); const handleClose = () => { - setOpen(false); + setIsAbortSnackbarOpen(false); }; const AbortConfirmationDialogActions = ( @@ -195,8 +198,8 @@ export const WorkflowInstancePage = ({ await orchestratorApi.abortWorkflowInstance(value.instance.id); restart(); } catch (e) { - setAbortError(`Running again has failed: ${(e as Error).message}`); - setOpen(true); + setAbortError(`Abort failed: ${(e as Error).message}`); + setIsAbortSnackbarOpen(true); } finally { setIsAborting(false); toggleAbortConfirmationDialog(); @@ -232,10 +235,10 @@ export const WorkflowInstancePage = ({ - {' '} - Abort workflow {value?.instance.processId} - + + + Abort workflow + } onClose={toggleAbortConfirmationDialog} open={isAbortConfirmationDialogOpen} @@ -255,10 +258,10 @@ export const WorkflowInstancePage = ({ disableHoverListener={permittedToUse.allowed} > @@ -283,7 +286,7 @@ export const WorkflowInstancePage = ({