-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathteam.html
More file actions
212 lines (198 loc) · 8.12 KB
/
Copy pathteam.html
File metadata and controls
212 lines (198 loc) · 8.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>SciJava team status</title>
<link type="text/css" rel="stylesheet" href="status.css">
<link rel="icon" type="image/png" href="favicon.png">
<script type="text/javascript" src="sorttable.js"></script>
<style>
td.nonzero { color: firebrick; font-weight: bold; }
td.zero { color: #999; }
td.total-cell { font-weight: bold; border-left: 1px solid gray; }
th.role-header { text-align: center; }
td.has-popup { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
td.has-popup:hover { filter: brightness(1.3); }
#team-modal { display: none; position: fixed; inset: 0; z-index: 9999; align-items: center; justify-content: center; }
#team-modal.open { display: flex; }
#team-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); }
#team-box { position: relative; z-index: 1; background: #fff; border-radius: 6px; max-width: 700px; width: 90vw; max-height: 80vh; display: flex; flex-direction: column; box-shadow: 0 8px 32px rgba(0,0,0,.3); overflow: hidden; }
#team-header { display: flex; align-items: center; gap: .5em; padding: .6em 1em; background: #f5f5f5; border-bottom: 1px solid #ddd; }
#team-title { flex: 1; font-weight: bold; font-size: .95em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#team-close { background: none; border: none; color: #888; font-size: 1.4em; line-height: 1; cursor: pointer; padding: 0 .15em; flex-shrink: 0; }
#team-close:hover { color: #333; }
#team-list { margin: 0; padding: .75em 1em; overflow-y: auto; flex: 1; list-style: none; }
#team-list li { padding: .3em 0; border-bottom: 1px solid #f0f0f0; font-size: .9em; }
#team-list li:last-child { border-bottom: none; }
#team-list li a { color: #0366d6; text-decoration: none; }
#team-list li a:hover { text-decoration: underline; }
.popup-repo { color: #888; font-size: .85em; margin-left: .4em; }
</style>
</head>
<body>
<!-- Generated via https://codepo8.github.io/css-fork-on-github-ribbon/ -->
<span id="forkongithub"><a href="https://github.com/scijava/status.scijava.org">Fix me on GitHub</a></span>
<style>
#site-nav {
display: flex;
gap: .4em;
padding: .6em 1em;
background: #2e2e2e;
border-bottom: 1px solid #333;
}
#site-nav a {
padding: .3em .9em;
border-radius: 1em;
text-decoration: none;
font-size: .9em;
color: #bbb;
}
#site-nav a:hover { background: #333; color: #fff; }
#site-nav a.active {
background: #444;
color: #fff;
font-weight: bold;
cursor: default;
}
</style>
<nav id="site-nav">
<a href="/">Status</a>
<a class="active">Team</a>
</nav>
<p id="generated" style="margin: 0.5em 1em; font-size: 0.85em; color: #555;"></p>
<table id="team-table">
<thead>
<tr>
<th>Team Member</th>
<th class="role-header" title="Open PRs awaiting review (reviewer role)">PRs</th>
<th class="role-header" title="Open issues needing response, excluding "question" label (support role)">Issues</th>
<th class="role-header" title="Open issues labeled "bug" (debugger role)">Bugs</th>
<th class="role-header" title="Open issues labeled "enhancement", excluding unscheduled milestone (developer role)">Features</th>
<th class="role-header" title="Components with unreleased commits (maintainer role)">Releases</th>
<th class="role-header" title="Sum of all role columns">Total</th>
<th class="role-header" title="Number of BOM components this developer is involved with (click for list)">Components</th>
</tr>
</thead>
<tbody id="team-body"></tbody>
</table>
<p style="margin: 1em; font-size: 0.8em; color: #777;">
<b>Note:</b> GitHub data excludes draft PRs and issues labeled “question”.
Enhancement counts exclude issues with milestone “unscheduled”.
Click any nonzero cell to see the contributing items; click the Components count to see all associated components.
</p>
<hr>
👍
<div id="team-modal">
<div id="team-backdrop"></div>
<div id="team-box">
<div id="team-header">
<span id="team-title"></span>
<button id="team-close">×</button>
</div>
<ul id="team-list"></ul>
</div>
</div>
<script>
(function(){
var modal = document.getElementById('team-modal');
var titleEl = document.getElementById('team-title');
var list = document.getElementById('team-list');
var table = document.getElementById('team-table');
var tbody = document.getElementById('team-body');
var COL_LABELS = {
reviewer_prs: 'PRs',
support_issues: 'Issues',
debugger_bugs: 'Bugs',
developer_features: 'Features',
maintainer_releases: 'Releases',
components: 'Components'
};
// Role columns rendered in order, with their popup key.
var ROLE_COLS = [
'reviewer_prs', 'support_issues', 'debugger_bugs',
'developer_features', 'maintainer_releases'
];
function escHtml(s) {
return String(s).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"');
}
function show(row, col) {
var items = row.popups && row.popups[col];
if (!items || !items.length) return;
titleEl.textContent = row.dev_name + ' — ' + COL_LABELS[col] + ' (' + items.length + ')';
list.innerHTML = '';
items.forEach(function(item) {
var li = document.createElement('li');
if (col === 'maintainer_releases' || col === 'components') {
li.innerHTML = item.url
? '<a href="' + (col === 'maintainer_releases' ? item.url + '/commits' : item.url) + '" target="_blank">' + escHtml(item.ga) + '</a>'
: escHtml(item.ga);
} else {
li.innerHTML = '<a href="' + item.url + '" target="_blank">#' + item.number + ' – ' + escHtml(item.title) + '</a>'
+ '<span class="popup-repo">' + escHtml(item.repo) + '</span>';
}
list.appendChild(li);
});
modal.classList.add('open');
}
function hide() { modal.classList.remove('open'); }
function popupCell(row, col, count) {
var td = document.createElement('td');
td.setAttribute('data-col', col);
if (count > 0) {
td.className = 'nonzero has-popup';
td.addEventListener('click', function(){ show(row, col); });
} else {
td.className = 'zero';
}
td.textContent = count;
return td;
}
function buildRow(row) {
var tr = document.createElement('tr');
var nameTd = document.createElement('td');
var a = document.createElement('a');
a.href = row.dev_url;
a.textContent = row.dev_name;
nameTd.appendChild(a);
tr.appendChild(nameTd);
ROLE_COLS.forEach(function(col) {
tr.appendChild(popupCell(row, col, row[col]));
});
var totalTd = document.createElement('td');
totalTd.className = 'total-cell';
totalTd.textContent = row.total;
tr.appendChild(totalTd);
var compTd = document.createElement('td');
compTd.setAttribute('data-col', 'components');
compTd.textContent = row.component_count;
if (row.component_count > 0) {
compTd.className = 'has-popup';
compTd.addEventListener('click', function(){ show(row, 'components'); });
}
tr.appendChild(compTd);
return tr;
}
document.getElementById('team-close').addEventListener('click', hide);
document.getElementById('team-backdrop').addEventListener('click', hide);
document.addEventListener('keydown', function(e) { if (e.key === 'Escape') hide(); });
fetch('team.json').then(function(r){ return r.json(); }).then(function(data){
if (data.generated) {
document.getElementById('generated').textContent = 'Generated: ' + data.generated;
}
// Default view: highest total workload first.
var rows = (data.rows || []).slice().sort(function(a, b){ return b.total - a.total; });
var frag = document.createDocumentFragment();
rows.forEach(function(row){ frag.appendChild(buildRow(row)); });
tbody.appendChild(frag);
// Initialize sorttable now that the body is populated, so it detects the
// numeric columns correctly (it guesses each column's type from the first
// body row, which would be missing if it ran on the empty table at load).
if (window.sorttable && typeof sorttable.makeSortable === 'function') {
table.className = 'sortable';
sorttable.makeSortable(table);
}
});
})();
</script>
</body>
</html>