Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
display only job having more than 8800 executed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasferraina committed Apr 27, 2023
1 parent dee9621 commit ba21adc
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,17 @@ <h1>Are We ESM Yet?</h1>
if (typeof stringToFormat !== "string") return stringToFormat;
const date = new Date(stringToFormat);
return (
"le " + date.toLocaleDateString() + " vers " + date.getHours() + "h"
"le " +
date.toLocaleDateString() +
" vers " +
date.getHours() +
"h" +
(date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes())
);
}

function displayChart(results) {
const ctx = document.getElementById("chart");
console.log(results);
new Chart(ctx, {
data: {
labels: results
Expand All @@ -74,31 +78,27 @@ <h1>Are We ESM Yet?</h1>
data: results.map((r) => r.failed),
borderWidth: 1,
yAxisID: "A",
borderColor:'red'
borderColor: "red",
},
{
type: "bar",
label: "Executed tests",
data: results.map((r) => r.total),
yAxisID: "B",
borderColor: 'grey',
borderColor: "grey",
},
],
},
options: {
scales: {
y: [
yAxis: [
{
id: "A",
type: "linear",
position: "left",
beginAtZero: true,
},
{
id: "B",
type: "linear",
position: "right",
beginAtZero: true,
},
],
},
Expand Down Expand Up @@ -141,6 +141,7 @@ <h1>Are We ESM Yet?</h1>
).then((result) => {
return result
.filter((r) => r.failed !== -1)
.filter((r) => r.total > 8800)
.filter(
(r) => !["canceled", "failing"].includes(r.lastWorkflow.status)
);
Expand Down

0 comments on commit ba21adc

Please sign in to comment.