Minor fixes

This commit is contained in:
Ken Hibino 2021-01-29 22:25:01 -08:00
parent 747ff21218
commit 30f64efd09
7 changed files with 47 additions and 26 deletions

View File

@ -50,6 +50,10 @@ const useStyles = makeStyles((theme) => ({
iconCell: { iconCell: {
width: "70px", width: "70px",
}, },
alert: {
borderTopLeftRadius: 0,
borderTopRightRadius: 0,
},
})); }));
function mapStateToProps(state: AppState) { function mapStateToProps(state: AppState) {
@ -136,7 +140,7 @@ function ActiveTasksTable(props: Props & ReduxProps) {
if (props.error.length > 0) { if (props.error.length > 0) {
return ( return (
<Alert severity="error"> <Alert severity="error" className={classes.alert}>
<AlertTitle>Error</AlertTitle> <AlertTitle>Error</AlertTitle>
{props.error} {props.error}
</Alert> </Alert>
@ -145,7 +149,7 @@ function ActiveTasksTable(props: Props & ReduxProps) {
if (props.tasks.length === 0) { if (props.tasks.length === 0) {
return ( return (
<Alert severity="info"> <Alert severity="info" className={classes.alert}>
<AlertTitle>Info</AlertTitle> <AlertTitle>Info</AlertTitle>
No active tasks at this time. No active tasks at this time.
</Alert> </Alert>

View File

@ -52,23 +52,12 @@ const useStyles = makeStyles((theme) => ({
stickyHeaderCell: { stickyHeaderCell: {
background: theme.palette.background.paper, background: theme.palette.background.paper,
}, },
alert: {
borderTopLeftRadius: 0,
borderTopRightRadius: 0,
},
})); }));
const useRowStyles = makeStyles({
root: {
"& > *": {
borderBottom: "unset",
},
},
actionCell: {
width: "96px",
},
activeActionCell: {
display: "flex",
justifyContent: "space-between",
},
});
function mapStateToProps(state: AppState) { function mapStateToProps(state: AppState) {
return { return {
loading: state.tasks.archivedTasks.loading, loading: state.tasks.archivedTasks.loading,
@ -159,7 +148,7 @@ function ArchivedTasksTable(props: Props & ReduxProps) {
if (props.error.length > 0) { if (props.error.length > 0) {
return ( return (
<Alert severity="error"> <Alert severity="error" className={classes.alert}>
<AlertTitle>Error</AlertTitle> <AlertTitle>Error</AlertTitle>
{props.error} {props.error}
</Alert> </Alert>
@ -167,7 +156,7 @@ function ArchivedTasksTable(props: Props & ReduxProps) {
} }
if (props.tasks.length === 0) { if (props.tasks.length === 0) {
return ( return (
<Alert severity="info"> <Alert severity="info" className={classes.alert}>
<AlertTitle>Info</AlertTitle> <AlertTitle>Info</AlertTitle>
No archived tasks at this time. No archived tasks at this time.
</Alert> </Alert>
@ -301,6 +290,21 @@ function ArchivedTasksTable(props: Props & ReduxProps) {
); );
} }
const useRowStyles = makeStyles({
root: {
"& > *": {
borderBottom: "unset",
},
},
actionCell: {
width: "96px",
},
activeActionCell: {
display: "flex",
justifyContent: "space-between",
},
});
interface RowProps { interface RowProps {
task: ArchivedTaskExtended; task: ArchivedTaskExtended;
isSelected: boolean; isSelected: boolean;

View File

@ -52,6 +52,10 @@ const useStyles = makeStyles((theme) => ({
stickyHeaderCell: { stickyHeaderCell: {
background: theme.palette.background.paper, background: theme.palette.background.paper,
}, },
alert: {
borderTopLeftRadius: 0,
borderTopRightRadius: 0,
},
})); }));
function mapStateToProps(state: AppState) { function mapStateToProps(state: AppState) {
@ -144,7 +148,7 @@ function PendingTasksTable(props: Props & ReduxProps) {
if (props.error.length > 0) { if (props.error.length > 0) {
return ( return (
<Alert severity="error"> <Alert severity="error" className={classes.alert}>
<AlertTitle>Error</AlertTitle> <AlertTitle>Error</AlertTitle>
{props.error} {props.error}
</Alert> </Alert>
@ -152,7 +156,7 @@ function PendingTasksTable(props: Props & ReduxProps) {
} }
if (props.tasks.length === 0) { if (props.tasks.length === 0) {
return ( return (
<Alert severity="info"> <Alert severity="info" className={classes.alert}>
<AlertTitle>Info</AlertTitle> <AlertTitle>Info</AlertTitle>
No pending tasks at this time. No pending tasks at this time.
</Alert> </Alert>

View File

@ -56,6 +56,10 @@ const useStyles = makeStyles((theme) => ({
stickyHeaderCell: { stickyHeaderCell: {
background: theme.palette.background.paper, background: theme.palette.background.paper,
}, },
alert: {
borderTopLeftRadius: 0,
borderTopRightRadius: 0,
},
})); }));
function mapStateToProps(state: AppState) { function mapStateToProps(state: AppState) {
@ -161,7 +165,7 @@ function RetryTasksTable(props: Props & ReduxProps) {
if (props.error.length > 0) { if (props.error.length > 0) {
return ( return (
<Alert severity="error"> <Alert severity="error" className={classes.alert}>
<AlertTitle>Error</AlertTitle> <AlertTitle>Error</AlertTitle>
{props.error} {props.error}
</Alert> </Alert>
@ -169,7 +173,7 @@ function RetryTasksTable(props: Props & ReduxProps) {
} }
if (props.tasks.length === 0) { if (props.tasks.length === 0) {
return ( return (
<Alert severity="info"> <Alert severity="info" className={classes.alert}>
<AlertTitle>Info</AlertTitle> <AlertTitle>Info</AlertTitle>
No retry tasks at this time. No retry tasks at this time.
</Alert> </Alert>

View File

@ -56,6 +56,10 @@ const useStyles = makeStyles((theme) => ({
stickyHeaderCell: { stickyHeaderCell: {
background: theme.palette.background.paper, background: theme.palette.background.paper,
}, },
alert: {
borderTopLeftRadius: 0,
borderTopRightRadius: 0,
},
})); }));
function mapStateToProps(state: AppState) { function mapStateToProps(state: AppState) {
@ -161,7 +165,7 @@ function ScheduledTasksTable(props: Props & ReduxProps) {
if (props.error.length > 0) { if (props.error.length > 0) {
return ( return (
<Alert severity="error"> <Alert severity="error" className={classes.alert}>
<AlertTitle>Error</AlertTitle> <AlertTitle>Error</AlertTitle>
{props.error} {props.error}
</Alert> </Alert>
@ -169,7 +173,7 @@ function ScheduledTasksTable(props: Props & ReduxProps) {
} }
if (props.tasks.length === 0) { if (props.tasks.length === 0) {
return ( return (
<Alert severity="info"> <Alert severity="info" className={classes.alert}>
<AlertTitle>Info</AlertTitle> <AlertTitle>Info</AlertTitle>
No scheduled tasks at this time. No scheduled tasks at this time.
</Alert> </Alert>

View File

@ -124,6 +124,7 @@ function TasksTable(props: Props & ReduxProps) {
<div> <div>
{chips.map((c) => ( {chips.map((c) => (
<Chip <Chip
key={c.key}
className={classes.chip} className={classes.chip}
label={ label={
<div> <div>

View File

@ -61,7 +61,7 @@ function TasksView(props: ConnectedProps<typeof connector>) {
return ( return (
<Container maxWidth="lg"> <Container maxWidth="lg">
<Grid container spacing={0} className={classes.container}> <Grid container spacing={0} className={classes.container}>
<Grid xs={12} className={classes.breadcrumbs}> <Grid item xs={12} className={classes.breadcrumbs}>
<QueueBreadCrumb queues={props.queues} selectedQueue={qname} /> <QueueBreadCrumb queues={props.queues} selectedQueue={qname} />
</Grid> </Grid>
<Grid item xs={12} className={classes.banner}> <Grid item xs={12} className={classes.banner}>