-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scheduling reports to Lookout UI (#4144)
Add scheduling reports to a new sidebar tab for jobs which in a queuing state. This tab displays the time the job has spent in the queue, scheduling reports for the job (reports for the queue and overall are also available, but initially hidden), and parameters which are significant in the context of scheduling - the priority and resource requests.
- Loading branch information
1 parent
f89883c
commit d146bb2
Showing
47 changed files
with
1,591 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { useState } from "react" | ||
|
||
import { Chat, ChatBubbleOutline } from "@mui/icons-material" | ||
import { Rating, styled, Typography } from "@mui/material" | ||
|
||
import { SPACING } from "../styling/spacing" | ||
|
||
const OuterContainer = styled("div")(({ theme }) => ({ | ||
display: "flex", | ||
flexDirection: "column", | ||
gap: theme.spacing(SPACING.xs), | ||
})) | ||
|
||
const RatingAndLabelContainer = styled("div")(({ theme }) => ({ | ||
display: "flex", | ||
alignItems: "center", | ||
gap: theme.spacing(SPACING.sm), | ||
})) | ||
|
||
const StyledRating = styled(Rating)(({ theme }) => ({ | ||
"& .MuiRating-iconFilled": { | ||
color: theme.palette.secondary.light, | ||
}, | ||
"& .MuiRating-iconHover": { | ||
color: theme.palette.secondary.main, | ||
}, | ||
})) | ||
|
||
export interface VerbositySelectorProps { | ||
name: string | ||
legendLabel: string | ||
max: number | ||
verbosity: number | ||
onChange: (verbosity: number) => void | ||
disabled?: boolean | ||
} | ||
|
||
export const VerbositySelector = ({ | ||
name, | ||
legendLabel, | ||
max, | ||
verbosity, | ||
onChange, | ||
disabled, | ||
}: VerbositySelectorProps) => { | ||
const [hoverValue, setHoverValue] = useState(-1) | ||
return ( | ||
<OuterContainer> | ||
<Typography component="legend" variant="caption"> | ||
{legendLabel} | ||
</Typography> | ||
<RatingAndLabelContainer> | ||
<StyledRating | ||
name={name} | ||
value={verbosity} | ||
onChangeActive={(_, value) => { | ||
setHoverValue(value) | ||
}} | ||
onChange={(_, value) => onChange(value ?? 0)} | ||
max={max} | ||
getLabelText={(value) => value.toString()} | ||
icon={<Chat fontSize="inherit" />} | ||
emptyIcon={<ChatBubbleOutline fontSize="inherit" />} | ||
disabled={disabled} | ||
/> | ||
<Typography>Level {hoverValue !== -1 ? hoverValue.toString() : verbosity.toString()}</Typography> | ||
</RatingAndLabelContainer> | ||
</OuterContainer> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.