mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-02-23 04:10:11 +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}
|
||||
/>
|
||||
</div>
|
||||
{props.tasks.length > 0 && selectedGroup !== null ? (
|
||||
<>
|
||||
{!window.READ_ONLY && (
|
||||
<TableActions
|
||||
showIconButtons={numSelected > 0}
|
||||
@ -307,7 +309,9 @@ function AggregatingTasksTable(
|
||||
>
|
||||
<IconButton>
|
||||
<Checkbox
|
||||
indeterminate={numSelected > 0 && numSelected < rowCount}
|
||||
indeterminate={
|
||||
numSelected > 0 && numSelected < rowCount
|
||||
}
|
||||
checked={rowCount > 0 && numSelected === rowCount}
|
||||
onChange={handleSelectAllClick}
|
||||
inputProps={{
|
||||
@ -336,7 +340,7 @@ function AggregatingTasksTable(
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
<TableBody>
|
||||
{props.group === selectedGroup?.group &&
|
||||
{props.group === selectedGroup.group &&
|
||||
props.tasks.map((task) => (
|
||||
<Row
|
||||
key={task.id}
|
||||
@ -403,6 +407,17 @@ function AggregatingTasksTable(
|
||||
</TableFooter>
|
||||
</Table>
|
||||
</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>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user