Skip to content
Snippets Groups Projects
Commit adc3e3c2 authored by Chris Hines's avatar Chris Hines
Browse files

Merge branch 'issue34' into 'dev'

fixes issue 34: jobs were showing a time for completion when they were still scheduling

See merge request !36
parents 1f0caa77 5aeaeabd
No related branches found
No related tags found
4 merge requests!106if stat fails, display the error instead of immediately refreshing...,!99Dev,!37Dev,!36fixes issue 34: jobs were showing a time for completion when they were still scheduling
Pipeline #8930 passed
......@@ -9,6 +9,7 @@ export class Job {
public desc: string;
public state: string;
public endtime: string;
public starttime: string;
public mem: string;
public cpus: string;
public batch_host: string;
......
......@@ -75,7 +75,16 @@ export class JobComponent implements OnInit, OnDestroy {
let end = this.parseDate(this.jobdata.endtime);
let remaining = end.valueOf() - Date.now().valueOf();
this.timeremaining = this.secondsToHms(remaining/1000);
}
} else {
if (this.jobdata.state == "PENDING") {
if (this.jobdata.starttime != undefined && this.jobdata.starttime != null) {
this.timeremaining = "Estimated start at "+this.jobdata.starttime;
} else {
this.timeremaining = "Job is scheduling";
}
}
}
}
secondsToHms(d: number) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment