Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions web/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,15 @@
if(xhr.readyState !== XMLHttpRequest.DONE) return;
if(xhr.status !== 200) {
console.log("Received status: ", xhr.status);
var run = dir.replace("logs_", "");
var run = dir;
var errMsg = '<strong>Error: could not locate result for "' + run + '" run</strong>';
document.getElementById("run-selection-msg").innerHTML = errMsg;
var refresh = window.location.protocol + "//" + window.location.host + window.location.pathname + "?run=" + run;
window.history.pushState(null, null, refresh);
return;
}
var result = xhr.response;
var selectedRun = result.log_dir.replace("logs_", "");
var selectedRun = result.log_dir;
var refresh = window.location.protocol + "//" + window.location.host + window.location.pathname + "?run=" + selectedRun;
window.history.pushState(null, null, refresh);
process(result);
Expand All @@ -301,7 +301,7 @@
// if the request used a specific run (like ?run=123), then
// load that specifc one
selectedRun = queryParams.get("run")
load("logs_" + selectedRun);
load(selectedRun);
} else {
load("latest");
}
Expand All @@ -319,7 +319,7 @@
var s = document.createElement("select");
xhr.response.reverse().forEach(function(el) {
var opt = document.createElement("option");
opt.innerHTML = el.replace("logs_", "");
opt.innerHTML = el;
opt.value = el;
s.appendChild(opt);
});
Expand All @@ -330,7 +330,7 @@
if (selectedRun != null) {
// just set the selected run, no need to trigger "change"
// event here
s.value = "logs_" + selectedRun;
s.value = selectedRun;
}
};
xhr.send();
Expand Down