diff --git a/app/templates/jobs/job.html.j2 b/app/templates/jobs/job.html.j2 index 2c7d064a..512dc734 100644 --- a/app/templates/jobs/job.html.j2 +++ b/app/templates/jobs/job.html.j2 @@ -31,6 +31,8 @@ this.job = jobs[this.jobId]; } + // End date + this.setEndDate(this.job.end_date); // Status this.setStatus(this.job.status); // End date @@ -73,7 +75,13 @@ } setEndDate(timestamp) { - document.getElementById("end-date").value = new Date(timestamp * 1000).toLocaleString(); + var end_date; + if (timestamp === null) { + end_date = "N.a."; + } else { + end_date = new Date(timestamp * 1000).toLocaleString(); + } + document.getElementById("end-date").value = end_date; M.updateTextFields(); }