Skip to content

Commit 410cc31

Browse files
authored
Merge pull request #126 from ISISComputingGroup/text_alongside_jenkins_jobs
add some text alongside jenkins jobs
2 parents e540d2e + 3a6cc84 commit 410cc31

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

app/components/JenkinsJobs.tsx

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

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

@@ -79,7 +90,7 @@ export default function JenkinsJobs() {
7990
}
8091
target={"_blank"}
8192
>
82-
{job["name"]}
93+
{job["name"]} {`(${jenkinsColourToStatus.get(job["color"])})`}
8394
</a>
8495
))}
8596
</div>

0 commit comments

Comments
 (0)