Skip to content

Commit 1fc00f7

Browse files
committed
add some text alongside jenkins jobs
1 parent e540d2e commit 1fc00f7

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

app/components/JenkinsJobs.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ const jenkinsColourToWebDashColour = new Map<string, string>([
2828
], // build aborted but now running
2929
]);
3030

31+
const jenkinsColourToStatus = new Map<string, string>([
32+
["red", "fail"], // build broken
33+
["blue", "success"], // build success
34+
["aborted", "aborted"], // build aborted
35+
36+
["yellow", "unstable"],
37+
["yellow_anime", "unstable-running"], // build running but was broken
38+
["red_anime", "fail-running"], // build running but was broken
39+
["blue_anime", "success-running"], // build running but was successful
40+
["aborted_anime", "aborted-running"], // build aborted but now running
41+
]);
42+
3143
export default function JenkinsJobs() {
3244
const [data, setData] = useState<Array<IfcWallDisplayJob>>([]);
3345

@@ -79,7 +91,7 @@ export default function JenkinsJobs() {
7991
}
8092
target={"_blank"}
8193
>
82-
{job["name"]}
94+
{job["name"]} {`(${jenkinsColourToStatus.get(job["color"])})`}
8395
</a>
8496
))}
8597
</div>

0 commit comments

Comments
 (0)