Skip to content

Commit 8ac3cb2

Browse files
authored
Add 'days since last Hubris bug' to website subfolder (#1918)
The `gh-pages` branch is autogenerated from this folder, so our previous changes were blown away.
1 parent fad1769 commit 8ac3cb2

File tree

3 files changed

+158
-41
lines changed

3 files changed

+158
-41
lines changed

website/bugs/index.html

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Days since the last Hubris kernel bug</title>
6+
<link rel="preload" href="https://oxide.computer/fonts/NeueHaasGrotDisp-Roman.woff2" as="font" type="font/woff2" crossorigin="true">
7+
<link rel="stylesheet" href="/style.css">
8+
<style>
9+
td {
10+
padding: 5px;
11+
}
12+
td.delta {
13+
color: #7e8385;
14+
}
15+
td.bar {
16+
position: relative;
17+
}
18+
/* Vertical line */
19+
td.bar::before {
20+
content: '';
21+
position: absolute;
22+
top: 0;
23+
bottom: 0;
24+
left: 7%;
25+
width: 2px;
26+
height: 10px;
27+
background-color: #7e8385;
28+
}
29+
p#days {
30+
font-size: 4.5rem;
31+
line-height: 1.05;
32+
letter-spacing: 0.02em;
33+
font-weight: 300;
34+
margin: 0px;
35+
color: #F5B944;
36+
}
37+
38+
hr {
39+
border: 1px solid #2D3335;
40+
}
41+
</style>
42+
</head>
43+
44+
<body>
45+
46+
<p>It has been</p>
47+
<p id="days"></p>
48+
<p>since the last Hubris kernel bug:</p>
49+
<table id="bugs"></table>
50+
<hr>
51+
<p><a href="/">Back</a></p>
52+
53+
<script>
54+
const bugs = [
55+
["issues/1876", "2024-09-20T13:54Z", "Stack scribbling does not work for tasks with pow2 stack"],
56+
["issues/1672", "2024-04-20T18:41Z", "Leases cannot span MPU regions"],
57+
["issues/1193", "2023-03-08T17:41Z", "Hard fault during MPU configuration"],
58+
["issues/1134", "2023-02-08T17:31Z", "Stack overflow on SVC entry performs SVC from the wrong task"],
59+
["issues/1017", "2022-12-22T14:58Z", "Off-by-one in ARMv8 MPU RLAR programming"],
60+
["pull/569/commits/023e4eaa0", "2022-05-25T17:57Z", "Incorrect task pointer in context saving sequence"],
61+
["issues/367", "2022-01-18T12:51Z", "Can't use IRQ #0 on ARMv7M"],
62+
]
63+
const prefix = "https://github.com/oxidecomputer/hubris"
64+
65+
let now = new Date();
66+
let days = document.getElementById("days");
67+
function update() {
68+
const dt = daysBetween(new Date(), new Date(bugs[0][1]));
69+
const p = document.getElementById("days");
70+
p.innerHTML = `${dt} days`
71+
setTimeout(update, 60 * 1000);
72+
}
73+
update();
74+
75+
// Function to calculate the difference in days between two dates
76+
function daysBetween(date1, date2) {
77+
const oneDay = 1000 * 60 * 60 * 24;
78+
const diffInTime = new Date(date1) - new Date(date2);
79+
return Math.round(diffInTime / oneDay);
80+
}
81+
82+
const bugsContainer = document.getElementById("bugs");
83+
const barElement = document.createElement("tr");
84+
barElement.innerHTML = `<td><td class="bar">`
85+
86+
// Loop through the bugs array and add each bug and the days between to the div
87+
for (let i = 0; i < bugs.length; i++) {
88+
const bugLink = bugs[i][0];
89+
const bugDate = bugs[i][1];
90+
const bugDesc = bugs[i][2];
91+
let daysSinceLastBug = "";
92+
93+
// Calculate days between this bug and the previous one, if applicable
94+
if (i > 0) {
95+
const deltaElement = document.createElement("tr");
96+
const previousBugDate = bugs[i - 1][1];
97+
const daysDiff = daysBetween(previousBugDate, bugDate);
98+
deltaElement.innerHTML = `<td><td class="delta">${daysDiff} days`;
99+
100+
bugsContainer.appendChild(barElement.cloneNode(true));
101+
bugsContainer.appendChild(deltaElement);
102+
bugsContainer.appendChild(barElement.cloneNode(true));
103+
}
104+
105+
const etcElement = document.createElement("tr");
106+
etcElement.innerHTML = `<td>${new Date(bugDate).toLocaleDateString()}<td><a href="https://github.com/oxidecomputer/hubris/${bugLink}">${bugDesc}</a>`
107+
bugsContainer.appendChild(etcElement);
108+
}
109+
110+
bugsContainer.appendChild(barElement);
111+
const bugElement = document.createElement("tr");
112+
bugElement.innerHTML = `<td><td class="delta">...and so on`;
113+
bugsContainer.appendChild(bugElement);
114+
115+
</script>
116+
117+
</body>
118+
</html>

website/index.html

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,7 @@
44
<meta charset="utf-8">
55
<title>Hubris</title>
66
<link rel="preload" href="https://oxide.computer/fonts/NeueHaasGrotDisp-Roman.woff2" as="font" type="font/woff2" crossorigin="true">
7-
8-
<style>
9-
@font-face {
10-
font-family: "Neue Haas Grotesk Display";
11-
src: url("https://oxide.computer/fonts/NeueHaasGrotDisp-Roman.woff2");
12-
}
13-
body {
14-
font-family: Neue Haas Grotesk Display, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
15-
background-color: #0b1418;
16-
color: #FFFFFF;
17-
font-size: 1.1rem;
18-
line-height: 1.4;
19-
letter-spacing: 0.03em;
20-
font-weight: 400;
21-
22-
max-width: 1080px;
23-
margin: 0 auto !important;
24-
float: none !important;
25-
}
26-
.green {
27-
color: #48D597;
28-
}
29-
.yellow {
30-
color: #F5CF65;
31-
}
32-
h1 {
33-
font-size: 4.5rem;
34-
line-height: 1.05;
35-
letter-spacing: 0.02em;
36-
font-weight: 300;
37-
}
38-
h2 {
39-
font-size: 1.6rem;
40-
line-height: 1.3;
41-
letter-spacing: 0.03em;
42-
font-weight: 300;
43-
}
44-
a {
45-
color: #48D597;
46-
}
47-
</style>
7+
<link rel="stylesheet" href="/style.css">
488
</head>
499

5010
<body>
@@ -69,6 +29,7 @@ <h2 class="yellow">A small open-source operating system for deeply-embedded comp
6929
<ul><a href="https://github.com/oxidecomputer/hubris">Hubris source code</a></ul>
7030
<ul><a href="reference/">Hubris reference documentation</a></ul>
7131
<ul><a href="https://github.com/oxidecomputer/humility">Humility source code</a></ul>
32+
<ul><a href="bugs/">Days since the last kernel bug</a></ul>
7233
</p>
7334
</body>
7435
</html>

website/style.css

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@font-face {
2+
font-family: "Neue Haas Grotesk Display";
3+
src: url("https://oxide.computer/fonts/NeueHaasGrotDisp-Roman.woff2");
4+
}
5+
body {
6+
font-family: Neue Haas Grotesk Display, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
7+
background-color: #0b1418;
8+
color: #E7E7E8;
9+
font-size: 1.1rem;
10+
line-height: 1.4;
11+
letter-spacing: 0.03em;
12+
font-weight: 400;
13+
14+
max-width: 1080px;
15+
margin: 0 auto !important;
16+
float: none !important;
17+
}
18+
.green {
19+
color: #48D597;
20+
}
21+
.yellow {
22+
color: #F5CF65;
23+
}
24+
h1 {
25+
font-size: 4.5rem;
26+
line-height: 1.05;
27+
letter-spacing: 0.02em;
28+
font-weight: 300;
29+
}
30+
h2 {
31+
font-size: 1.6rem;
32+
line-height: 1.3;
33+
letter-spacing: 0.03em;
34+
font-weight: 300;
35+
}
36+
a {
37+
color: #48D597;
38+
}

0 commit comments

Comments
 (0)