-
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.
Visual improvements to the job sidebar (#4133)
This change makes the sidebar for viewing a job's information visually more consistent across its tabs and the rest of the application. We also migrate to using styled components using emotion JS, which is provided by MUI, instead of separate CSS files. This provides better type-safety and keeps styles in the same place as the components. Note that this has necessitated an upgrade to vitest, and the installation and use of @emotion/babel-plugin.
- Loading branch information
1 parent
419484d
commit b2d99ad
Showing
26 changed files
with
1,782 additions
and
2,249 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
17 changes: 0 additions & 17 deletions
17
internal/lookout/ui/src/components/lookoutV2/sidebar/ContainerDetails.module.css
This file was deleted.
Oops, something went wrong.
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
5 changes: 0 additions & 5 deletions
5
internal/lookout/ui/src/components/lookoutV2/sidebar/KeyValuePairTable.module.css
This file was deleted.
Oops, something went wrong.
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
23 changes: 23 additions & 0 deletions
23
internal/lookout/ui/src/components/lookoutV2/sidebar/NoRunsAlert.tsx
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,23 @@ | ||
import { Alert } from "@mui/material" | ||
|
||
import { JobState } from "../../../models/lookoutV2Models" | ||
|
||
const jobStatusMayRunInFuture: Record<JobState, boolean> = { | ||
[JobState.Queued]: true, | ||
[JobState.Leased]: true, | ||
[JobState.Pending]: true, | ||
[JobState.Running]: true, | ||
[JobState.Succeeded]: false, | ||
[JobState.Failed]: false, | ||
[JobState.Cancelled]: false, | ||
[JobState.Preempted]: false, | ||
[JobState.Rejected]: false, | ||
} | ||
|
||
export interface NoRunsAlertProps { | ||
jobState: JobState | ||
} | ||
|
||
export const NoRunsAlert = ({ jobState }: NoRunsAlertProps) => ( | ||
<Alert severity="info">{jobStatusMayRunInFuture[jobState] ? "This job has not run." : "This job did not run."}</Alert> | ||
) |
70 changes: 0 additions & 70 deletions
70
internal/lookout/ui/src/components/lookoutV2/sidebar/Sidebar.module.css
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.