@hackerrank/astra-cli 0.1.12 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/report.html +11 -2
package/package.json
CHANGED
package/src/report.html
CHANGED
|
@@ -315,7 +315,12 @@
|
|
|
315
315
|
var selector = document.getElementById("verifier-model-select");
|
|
316
316
|
if (!container) return;
|
|
317
317
|
var matrix = DATA.verifier_matrix || { models: [], criteria: [] };
|
|
318
|
-
|
|
318
|
+
// Prefer a model with actual verifier evidence. Alphabetical-first often
|
|
319
|
+
// selects an unscored gateway failure and makes a healthy report appear
|
|
320
|
+
// empty on first open.
|
|
321
|
+
var selected = matrix.models.find(function (model) {
|
|
322
|
+
return matrix.criteria.some(function (criterion) { return criterion.cells[model]; });
|
|
323
|
+
}) || matrix.models[0] || "";
|
|
319
324
|
function draw() {
|
|
320
325
|
container.innerHTML = '<thead><tr><th>Test case</th><th>Available</th><th>Earned</th><th>Result</th></tr></thead><tbody>' + matrix.criteria.map(function (criterion) {
|
|
321
326
|
var cell = criterion.cells[selected];
|
|
@@ -325,7 +330,11 @@
|
|
|
325
330
|
return '<tr><td>' + esc(criterion.title || criterion.id) + '</td><td>' + fmt1(max) + '</td><td>' + fmt1(earned) + '</td><td>' + esc(status) + '</td></tr>';
|
|
326
331
|
}).join('') + '</tbody>';
|
|
327
332
|
}
|
|
328
|
-
matrix.models.forEach(function (model) {
|
|
333
|
+
matrix.models.forEach(function (model) {
|
|
334
|
+
var option = el("option", { value: model }, esc(model));
|
|
335
|
+
if (model === selected) option.selected = true;
|
|
336
|
+
selector.appendChild(option);
|
|
337
|
+
});
|
|
329
338
|
selector.addEventListener("change", function () { selected = selector.value; draw(); });
|
|
330
339
|
if (!matrix.criteria.length) {
|
|
331
340
|
container.innerHTML = '<tbody><tr><td class="muted">No verifier criteria have produced results yet.</td></tr></tbody>';
|