diff --git a/src/app/job.ts b/src/app/job.ts index 0f5d7f75f27c65b11d034b5ab1a86bca1adc8695..8619e5d344e076b128d9dd7de086d8b0c752702b 100644 --- a/src/app/job.ts +++ b/src/app/job.ts @@ -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; diff --git a/src/app/job/job.component.ts b/src/app/job/job.component.ts index 2bf08ca7a99b576a531297b6f0c19d9b5c4c63b9..15a74fa647203afab81b1cc2a3183325045fa3ba 100644 --- a/src/app/job/job.component.ts +++ b/src/app/job/job.component.ts @@ -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) {