Skip to content

Commit fddda8c

Browse files
committed
tc
1 parent 6ba4b7d commit fddda8c

File tree

1 file changed

+20
-27
lines changed

1 file changed

+20
-27
lines changed

torchci/components/commit/WorkflowBox.tsx

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Button, styled } from "@mui/material";
1+
import { Button, Stack, styled, Typography } from "@mui/material";
22
import { TestInfo } from "components/additionalTestInfo/TestInfo";
33
import styles from "components/commit/commit.module.css";
44
import LogViewer, { SearchLogViewer } from "components/common/log/LogViewer";
@@ -182,16 +182,22 @@ export default function WorkflowBox({
182182
className={workflowClass}
183183
style={wide ? { gridColumn: "1 / -1" } : {}}
184184
>
185-
<h3>{workflowName}</h3>
186-
<div>
187-
<div
188-
// Similar styling to an h4
189-
style={{ float: "left", marginBottom: "1.33em", fontWeight: "bold" }}
190-
>
191-
Job Status
192-
</div>
193-
<div style={{ float: "right" }}>
194-
<div style={{ margin: ".5em 0em" }}>
185+
<Stack direction="row" spacing={1} justifyContent={"space-between"}>
186+
<Stack direction="column" spacing={1}>
187+
<Typography
188+
variant="h6"
189+
fontWeight="bold"
190+
paddingTop={2}
191+
paddingBottom={2}
192+
>
193+
{workflowName}
194+
</Typography>
195+
<Typography fontWeight="bold" paddingBottom={2}>
196+
Job Status
197+
</Typography>
198+
</Stack>
199+
<Stack direction="column" spacing={1} paddingTop={6}>
200+
<div>
195201
{repoFullName == "pytorch/pytorch" && (
196202
<button
197203
onClick={() => {
@@ -206,7 +212,6 @@ export default function WorkflowBox({
206212
)}
207213
</div>
208214
<form
209-
style={{ float: "right", paddingBottom: ".5em" }}
210215
onSubmit={(e: React.FormEvent<HTMLFormElement>) => {
211216
e.preventDefault();
212217
// @ts-ignore
@@ -221,21 +226,9 @@ export default function WorkflowBox({
221226
></input>
222227
<input type="submit" value="Search"></input>
223228
</form>
224-
<div
225-
style={{
226-
// Ensures elements after this div are actually below it (due to float)
227-
clear: "both",
228-
}}
229-
></div>
230-
{searchString && <div>{searchRes.info}</div>}
231-
</div>
232-
<div
233-
style={{
234-
// Ensures elements after this div are actually below it (due to float)
235-
clear: "both",
236-
}}
237-
></div>
238-
</div>
229+
<div>{searchRes.info}</div>
230+
</Stack>
231+
</Stack>
239232
{wide && (
240233
<TestInfo workflowId={workflowId!} runAttempt={"1"} jobs={jobs} />
241234
)}

0 commit comments

Comments
 (0)