Commit aa83589b authored by Chris Hines's avatar Chris Hines
Browse files

add in job history and view logs for comleted jobs

parent ad197a6a
Pipeline #7742 passed with stages
in 3 minutes
......@@ -4,7 +4,7 @@
<div *ngIf="jobdata.connectionState == 0" fxLayout="row" fxLayoutAlign="space-between">
<div fxFlex="10%"> {{ jobdata.state }}</div>
<div fxFlex="10%"> {{ jobdata.jobid }}</div>
<div fxFlex="10%"> {{ jobdata.batch_host }}</div>
<div *ngIf="jobdata.batch_host != 'localhost'" fxFlex="10%"> {{ jobdata.batch_host }}</div>
<div fxFlex="20%" fxLayout="column">
<div> {{ resources }} </div>
<div> {{ timeremaining }} </div>
......
......@@ -57,6 +57,9 @@ export class JobComponent implements OnInit, OnDestroy {
} else {
this.nocancel = false;
}
if (this.jobdata.state == "Finished") {
this.nocancel = true;
}
this.resources="";
if (this.jobdata.cpus != undefined) {
this.resources = this.resources+"CPUs: "+this.jobdata.cpus;
......
......@@ -20,6 +20,13 @@
<mat-divider></mat-divider>
</div>
</div>
<mat-divider></mat-divider>
<div *ngFor="let job of ((identitySubject | async).joblist | async) ; let lastItem = last">
<div *ngIf="(appSubject | async).name == job.name && job.state == 'Finished'">
<app-job [jobdata]=job></app-job>
<mat-divider></mat-divider>
</div>
</div>
</mat-list>
<button mat-button (click)="refreshJobs()" style="width: 100%; text-align: right">Refresh Job list</button>
......
......@@ -396,7 +396,7 @@ addUserHealth(identity,resp) {
console.log('in getAppInstance');
this.http.get<string>(this.Base+'/appinstance/'+username+'/'+loginhost+'/'+batchhost+'/'+jobid+'?'+paramstr, options)
// .pipe(catchError(this.handleError))
.subscribe(resp => { job.appinst = resp; this.createTunnel(job, action) },
.subscribe(resp => { job.appinst = resp; if (action.client != null) { this.createTunnel(job, action) } else { job.connectionState = 0} },
error => { this.handleAppInstanceError(job,error) })
// let paramstr = this.buildParams(job.app,job.identity,this.batchinterface[job.identity.repr()]);
// let headers = new HttpHeaders();
......
......@@ -13,7 +13,13 @@
"name": "View log",
"paramscmd": "/usr/local/sv2/dev/desktop/logparams.py {jobid}",
"client": {"cmd": null, "redir": "index.html?token={token}" },
"states": ["RUNNING","COMPLETED"]
"states": ["RUNNING","Finished"]
},
{
"name": "Remove log",
"paramscmd": "/usr/local/sv2/dev/rmlog.py {jobid}",
"client": null,
"states": ["Finished"]
}
],
"localbind": true,
......@@ -29,7 +35,20 @@
"paramscmd": "/usr/local/sv2/dev/jupyter/jupyter_params.py {jobid}",
"client": {"cmd": null, "redir": "?token={token}"},
"states": ["RUNNING"]
},
{
"name": "View log",
"paramscmd": "/usr/local/sv2/dev/desktop/logparams.py {jobid}",
"client": {"cmd": null, "redir": "index.html?token={token}" },
"states": ["RUNNING","Finished"]
},
{
"name": "Remove log",
"paramscmd": "/usr/local/sv2/dev/rmlog.py {jobid}",
"client": null,
"states": ["Finished"]
}
],
"localbind": true,
"applist": null
......
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