mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-01-19 11:15:53 +08:00
Remove processed, succeeded, failed columns from QueuesOverviewTable
This commit is contained in:
parent
c3869abfbb
commit
26e5890a4e
@ -42,7 +42,7 @@ const useStyles = makeStyles((theme) => ({
|
|||||||
actionIconsContainer: {
|
actionIconsContainer: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
width: "100px",
|
minWidth: "100px",
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@ -64,9 +64,6 @@ enum SortBy {
|
|||||||
Scheduled,
|
Scheduled,
|
||||||
Retry,
|
Retry,
|
||||||
Dead,
|
Dead,
|
||||||
Processed,
|
|
||||||
Succeeded,
|
|
||||||
Failed,
|
|
||||||
|
|
||||||
None, // no sort support
|
None, // no sort support
|
||||||
}
|
}
|
||||||
@ -96,19 +93,6 @@ const colConfigs: ColumnConfig[] = [
|
|||||||
},
|
},
|
||||||
{ label: "Retry", key: "retry", sortBy: SortBy.Retry, align: "right" },
|
{ label: "Retry", key: "retry", sortBy: SortBy.Retry, align: "right" },
|
||||||
{ label: "Dead", key: "dead", sortBy: SortBy.Dead, align: "right" },
|
{ label: "Dead", key: "dead", sortBy: SortBy.Dead, align: "right" },
|
||||||
{
|
|
||||||
label: "Processed",
|
|
||||||
key: "processed",
|
|
||||||
sortBy: SortBy.Processed,
|
|
||||||
align: "right",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Succeeded",
|
|
||||||
key: "Succeeded",
|
|
||||||
sortBy: SortBy.Succeeded,
|
|
||||||
align: "right",
|
|
||||||
},
|
|
||||||
{ label: "Failed", key: "failed", sortBy: SortBy.Failed, align: "right" },
|
|
||||||
{ label: "Actions", key: "actions", sortBy: SortBy.None, align: "center" },
|
{ label: "Actions", key: "actions", sortBy: SortBy.None, align: "center" },
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -173,20 +157,6 @@ export default function QueuesOverviewTable(props: Props) {
|
|||||||
if (q1.dead === q2.dead) return 0;
|
if (q1.dead === q2.dead) return 0;
|
||||||
isQ1Smaller = q1.dead < q2.dead;
|
isQ1Smaller = q1.dead < q2.dead;
|
||||||
break;
|
break;
|
||||||
case SortBy.Processed:
|
|
||||||
if (q1.processed === q2.processed) return 0;
|
|
||||||
isQ1Smaller = q1.processed < q2.processed;
|
|
||||||
break;
|
|
||||||
case SortBy.Succeeded:
|
|
||||||
const q1Succeeded = q1.processed - q1.failed;
|
|
||||||
const q2Succeeded = q2.processed - q2.failed;
|
|
||||||
if (q1Succeeded === q2Succeeded) return 0;
|
|
||||||
isQ1Smaller = q1Succeeded < q2Succeeded;
|
|
||||||
break;
|
|
||||||
case SortBy.Failed:
|
|
||||||
if (q1.failed === q2.failed) return 0;
|
|
||||||
isQ1Smaller = q1.failed < q2.failed;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
// eslint-disable-next-line no-throw-literal
|
// eslint-disable-next-line no-throw-literal
|
||||||
throw `Unexpected order by value: ${sortBy}`;
|
throw `Unexpected order by value: ${sortBy}`;
|
||||||
@ -284,11 +254,6 @@ export default function QueuesOverviewTable(props: Props) {
|
|||||||
{q.dead}
|
{q.dead}
|
||||||
</Link>
|
</Link>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell align="right" className={classes.boldCell}>
|
|
||||||
{q.processed}
|
|
||||||
</TableCell>
|
|
||||||
<TableCell align="right">{q.processed - q.failed}</TableCell>
|
|
||||||
<TableCell align="right">{q.failed}</TableCell>
|
|
||||||
<TableCell align="center">
|
<TableCell align="center">
|
||||||
<div className={classes.actionIconsContainer}>
|
<div className={classes.actionIconsContainer}>
|
||||||
{activeRowIndex === i ? (
|
{activeRowIndex === i ? (
|
||||||
@ -349,15 +314,6 @@ export default function QueuesOverviewTable(props: Props) {
|
|||||||
<TableCell className={classes.footerCell} align="right">
|
<TableCell className={classes.footerCell} align="right">
|
||||||
{total.dead}
|
{total.dead}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell className={classes.footerCell} align="right">
|
|
||||||
{total.processed}
|
|
||||||
</TableCell>
|
|
||||||
<TableCell className={classes.footerCell} align="right">
|
|
||||||
{total.succeeded}
|
|
||||||
</TableCell>
|
|
||||||
<TableCell className={classes.footerCell} align="right">
|
|
||||||
{total.failed}
|
|
||||||
</TableCell>
|
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableFooter>
|
</TableFooter>
|
||||||
</Table>
|
</Table>
|
||||||
@ -372,9 +328,6 @@ interface AggregateCounts {
|
|||||||
scheduled: number;
|
scheduled: number;
|
||||||
retry: number;
|
retry: number;
|
||||||
dead: number;
|
dead: number;
|
||||||
processed: number;
|
|
||||||
succeeded: number;
|
|
||||||
failed: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAggregateCounts(queues: Queue[]): AggregateCounts {
|
function getAggregateCounts(queues: Queue[]): AggregateCounts {
|
||||||
@ -385,9 +338,6 @@ function getAggregateCounts(queues: Queue[]): AggregateCounts {
|
|||||||
scheduled: 0,
|
scheduled: 0,
|
||||||
retry: 0,
|
retry: 0,
|
||||||
dead: 0,
|
dead: 0,
|
||||||
processed: 0,
|
|
||||||
succeeded: 0,
|
|
||||||
failed: 0,
|
|
||||||
};
|
};
|
||||||
queues.forEach((q) => {
|
queues.forEach((q) => {
|
||||||
total.size += q.size;
|
total.size += q.size;
|
||||||
@ -396,9 +346,6 @@ function getAggregateCounts(queues: Queue[]): AggregateCounts {
|
|||||||
total.scheduled += q.scheduled;
|
total.scheduled += q.scheduled;
|
||||||
total.retry += q.retry;
|
total.retry += q.retry;
|
||||||
total.dead += q.dead;
|
total.dead += q.dead;
|
||||||
total.processed += q.processed;
|
|
||||||
total.succeeded += q.processed - q.failed;
|
|
||||||
total.failed += q.failed;
|
|
||||||
});
|
});
|
||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user