Commit c49850a9 authored by Daniel Smith's avatar Daniel Smith

fix add job formatting diagnostics

parent 918463e3
......@@ -646,7 +646,7 @@ def lookupCommitByRef(ref, module=""):
try:
# Get the fetch addresses so we can pull and check out the revision.
for item in commitJSON["revisions"]:
if patchset == item["_number"]:
if patchset == commitJSON["revisions"][item]["_number"]:
return (commitJSON["revisions"][item]["fetch"]["anonymous http"]["url"], module)
except Exception:
print(f"Unable to get fetch URL for desired patchset {patchset}")
......
......@@ -129,7 +129,7 @@ function jobFormatter(job, hosts, callback) {
}/logs/${job.test_hosts[0]}/${job.jobHash}.txt'">View Log</button>`;
}
if (job.status != "failed" && job.status != "cancelled") {
if (job.status != "failed" && job.status != "cancelled" && job.status != "finished") {
view.cancelButton =
`<button onclick="doCancel('${job.jobHash}')" ${
job.status == "cancelling" ? "disabled" : ""}>Cancel</button>`;
......@@ -138,6 +138,7 @@ function jobFormatter(job, hosts, callback) {
if (view.timeEstimate)
view.timeEstimate = `<br>${view.timeEstimate}`
console.log(job, view);
// Return a formatted HTML string of the job to insert into the page.
fetch(`http://${domain}:${webPort}/templates/job.mustache`)
.then((response) => response.text())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment