Skip to content

Commit

Permalink
add more info to oncall page
Browse files Browse the repository at this point in the history
  • Loading branch information
BenTheElder committed Jul 24, 2020
1 parent a68fa47 commit cfbb81b
Showing 1 changed file with 56 additions and 9 deletions.
65 changes: 56 additions & 9 deletions maintenance/oncall.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@
<!-- To "deploy": gsutil cp -Z oncall.html gs://test-infra-oncall/ -->
<html lang="en">
<script>
var rotationsMetadata = {
"google-build-admin": {
"prettyName": "Google Build Admin",
"slack": "@google-build-admin",
"timezone": '<a href="https://time.is/PT">PT</a>',
"description": 'Debian / RPM package build & publishing for releases',
},
"testinfra": {
"prettyName": "Test Infra",
"slack": "@test-infra-oncall",
"timezone": '<a href="https://time.is/PT">PT</a>',
"description": "Prow, TestGrid, and other Google hosted infrastructure"
},
"scalability": {
"prettyName": "Scalability",
"timezone": '<a href="https://time.is/CET">CET</a>',
// TODO: description
}
};
// extracted/modified from kubernetes/test-infra/gubernator/static/build.js
function get(uri, callback) {
if (uri[0] === '/') {
Expand All @@ -28,16 +47,40 @@

var html = '';
html += '<table>';
html += '<thead> <tr> <th> Rotation </th> <th colspan=2> GitHub </th> </tr>';
html += '<thead> <tr> <th> Rotation </th> <th> Slack </th> <th colspan=2> Current </th> <th> Time Zone </th> <th> Description </th> </tr>';
html += '<tbody>';
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var person = oncall[key];
// get info about this rotation
var rotationInfo = rotationsMetadata[key];
var name = key;
var description = "";
var timezone = "";
var slack = "";
if (rotationInfo) {
if ("prettyName" in rotationInfo) {
name = rotationInfo["prettyName"];
}
if ("slack" in rotationInfo) {
slack = rotationInfo["slack"];
}
if ("description" in rotationInfo) {
description = rotationInfo["description"];
}
if ("timezone" in rotationInfo) {
timezone = rotationInfo["timezone"];
}
}
// add to table
html += '<tr>';
html += '<td>' + key + '</td>';
html += '<td style="font-weight: bold">' + name + '</td>';
if (person) {
html += '<td><code>' + slack + '</code></td>';
html += '<td> <a href="https://github.com/' + person + '">' + person + ' </td>';
html += '<td> <img src="https://github.com/' + person + '.png?size=125" alt=""></a> </td>';
html += '<td>' + timezone + '</td>';
html += '<td>' + description + '</td>';
} else {
html += 'None';
}
Expand All @@ -54,11 +97,13 @@

get('/kubernetes-jenkins/oncall.json', build_table);
</script>
<title>K8S Oncall Rotation</title>
<title>K8s Oncall Rotations</title>
<style>
body {
background-color: #eee;
padding-left: 30%;
margin-left: auto;
margin-right: auto;
text-align: center;
}

img {
Expand All @@ -74,14 +119,16 @@
padding: 5px;
text-align: center;
}

#oncall {
display: inline-block;
}
</style>
<body>
<h1>Kubernetes Oncall Rotation</h1>
<h1>Kubernetes Oncall Rotations</h1>
<p>Updated: <span id="updated">Never</span>
<h2>NOTE: Rotations are Google-staffed, volunteer, best-effort during business-hours.</h2>
<div id="oncall">Loading...</div>
<div><h2>release managers: <a
href="https://git.k8s.io/sig-release/release-managers.md#release-managers">on GitHub</a></h2>
</div>
<sub><a href="https://storage.googleapis.com/kubernetes-jenkins/oncall.json">data source</a></sub>
<div><a href="https://storage.googleapis.com/kubernetes-jenkins/oncall.json">data source</a></div>
</body>
</html>

0 comments on commit cfbb81b

Please sign in to comment.