mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-02-23 12:20:12 +08:00
(ui): Add empty group UI
This commit is contained in:
parent
c8d7da05eb
commit
5d9e4aec9c
@ -249,6 +249,8 @@ function AggregatingTasksTable(
|
|||||||
error={props.groupsError}
|
error={props.groupsError}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
{props.tasks.length > 0 && selectedGroup !== null ? (
|
||||||
|
<>
|
||||||
{!window.READ_ONLY && (
|
{!window.READ_ONLY && (
|
||||||
<TableActions
|
<TableActions
|
||||||
showIconButtons={numSelected > 0}
|
showIconButtons={numSelected > 0}
|
||||||
@ -307,7 +309,9 @@ function AggregatingTasksTable(
|
|||||||
>
|
>
|
||||||
<IconButton>
|
<IconButton>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
indeterminate={numSelected > 0 && numSelected < rowCount}
|
indeterminate={
|
||||||
|
numSelected > 0 && numSelected < rowCount
|
||||||
|
}
|
||||||
checked={rowCount > 0 && numSelected === rowCount}
|
checked={rowCount > 0 && numSelected === rowCount}
|
||||||
onChange={handleSelectAllClick}
|
onChange={handleSelectAllClick}
|
||||||
inputProps={{
|
inputProps={{
|
||||||
@ -336,7 +340,7 @@ function AggregatingTasksTable(
|
|||||||
</TableRow>
|
</TableRow>
|
||||||
</TableHead>
|
</TableHead>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{props.group === selectedGroup?.group &&
|
{props.group === selectedGroup.group &&
|
||||||
props.tasks.map((task) => (
|
props.tasks.map((task) => (
|
||||||
<Row
|
<Row
|
||||||
key={task.id}
|
key={task.id}
|
||||||
@ -403,6 +407,17 @@ function AggregatingTasksTable(
|
|||||||
</TableFooter>
|
</TableFooter>
|
||||||
</Table>
|
</Table>
|
||||||
</TableContainer>
|
</TableContainer>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<Alert severity="info" className={classes.alert}>
|
||||||
|
<AlertTitle>Info</AlertTitle>
|
||||||
|
{selectedGroup === null ? (
|
||||||
|
<div>Please select group</div>
|
||||||
|
) : (
|
||||||
|
<div>Group {selectedGroup.group} is empty</div>
|
||||||
|
)}
|
||||||
|
</Alert>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user