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

further ui fixes

parent cbf3b71f
<mat-list-item>
<!--<mat-card-title>{{ jobdata.name }}</mat-card-title>-->
<div style="width: 100%">
<div *ngIf="jobdata.connectionState == 0">
<div gdAreas="name name name name|
status resources space buttons"
gdColumns="20% 60% auto 20%"
>
<div gdArea="name">
{{ jobdata.name }} {{ jobdata.desc }}
</div>
<div gdArea="status">
{{ jobdata.state }}
</div>
<div gdArea="buttons">
<div fxLayout="row">
<div fxFlex *ngIf="!nocancel">
<button mat-button (click)="onCancel()" >
Cancel
</button>
</div>
<div fxFlex *ngIf="jobdata.state == 'RUNNING' && jobdata.app !== null && jobdata.app.client !== null">
<button mat-button (click)="onConnect()">
Connect
</button>
</div>
</div>
</div>
<div gdArea="resources">
<div fxLayout="column">
<div>
{{ resources }}
</div>
<div>
{{ timeremaining }}
</div>
</div>
</div>
</div>
</div>
<!-- <table>
<tr>
<td width="100%">
{{ jobdata.desc }}
</td>
<td width="20%">
{{ jobdata.state }}
</td>
<td withdt="10%">
<div *ngIf="!nocancel">
<button mat-button (click)="onCancel()" >
Cancel
</button>
</div>
</td>
<td width="10%">
<div *ngIf="available">
<button mat-button (click)="onConnect()" [disabled]="busy">
Connect
</button>
</div>
</td>
</tr>
</table> -->
<div *ngIf="jobdata.connectionState == 1">
<div gdArea="status">
Getting app parameters
<mat-list-item style="height: auto; width: auto">
<div fxLayout="column" style="width: 100%">
<div style="text-align: left"> {{ jobdata.name }} </div>
<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 fxFlex="20%" fxLayout="column">
<div> {{ resources }} </div>
<div> {{ timeremaining }} </div>
</div>
<div gdArea="resources">
<mat-progress-bar mode="determinate" value=30></mat-progress-bar>
<div fxFlex></div>
<div fxFlex="10%" fxLayout="row">
<div fxFlex *ngIf="!nocancel"> <button mat-button (click)="onCancel()" > Cancel </button> </div>
<div fxFlex *ngIf="jobdata.state == 'RUNNING' && jobdata.app !== null && jobdata.app.client !== null"> <button mat-button (click)="onConnect()"> Connect </button> </div>
</div>
</div>
<div *ngIf="jobdata.connectionState == 2">
<div gdArea="status">
Creating secure tunnels
</div>
<div gdArea="resources">
<mat-progress-bar mode="determinate" value=60></mat-progress-bar>
</div>
<div fxLayout="row" *ngIf="jobdata.connectionState == 1">
<div fxFlex="20%"> Getting app parameters </div>
<div fxFlex="80%"> <mat-progress-bar mode="determinate" value=30></mat-progress-bar> </div>
</div>
<div *ngIf="jobdata.connectionState == 3">
<div gdArea="status">
Determining correct URL
</div>
<div gdArea="resources">
<mat-progress-bar mode="determinate" value=90></mat-progress-bar>
</div>
<div fxLayout="row" *ngIf="jobdata.connectionState == 2">
<div fxFlex="20%"> Creating secure tunnels </div>
<div fxFlex="80%"> <mat-progress-bar mode="determinate" value=60></mat-progress-bar> </div>
</div>
<div fxLayout="row" *ngIf="jobdata.connectionState == 3">
<div fxFlex="20%"> Determining correct URL </div>
<div fxFlex="80%"> <mat-progress-bar mode="determinate" value=90></mat-progress-bar> </div>
</div>
</div>
</mat-list-item>
<!--<mat-list-item>
<div fxLayout="column" fxLayoutAlign="space-around none" style="width: 100%; background-color: red">
<div fxLayout="row" style="background-color: green">
<div>
{{ jobdata.name }}
</div>
<div fxFlex>
</div>
</div>
<div *ngIf="jobdata.connectionState == 0" fxLayout="row" style="background-color: blue">
<div>
{{ jobdata.state }}
</div>
<div></div>
<div fxLayout="column">
<div> {{ resources }} </div>
<div> {{ timeremaining }} </div>
</div>
</div>
</div>
</mat-list-item>-->
......@@ -3,9 +3,10 @@
</div>-->
<div *ngIf="(identitySubject | async) !== null" >
<mat-list>
<div *ngFor="let job of ((identitySubject | async).joblist | async)">
<div *ngFor="let job of ((identitySubject | async).joblist | async) ; let lastItem = last">
<div *ngIf="job.state != 'Finished'">
<app-job [jobdata]=job></app-job>
<mat-divider></mat-divider>
</div>
</div>
</mat-list>
......
......@@ -18,21 +18,22 @@
<div *ngFor="let id of (computeSitesService.appidentities | async)">
<mat-expansion-panel (opened)="selectId(id)">
<mat-expansion-panel-header>
<mat-panel-title>
<button mat-button style="width: 100%">
<mat-panel-title>
<!--<button mat-button style="width: 100%">-->
<div fxLayout="row">
<div style="width: 10px;"></div>
<div style="width: 20px;"></div>
<div fxFlex fxLayout="column">
<div style="height: 10px"></div>
<div style="height: 15px"></div>
<span fxFlex matBadge="{{ (id.healthalerts | async).length }}"
[matBadgeHidden]= "(id.healthalerts | async).length == 0"
matBadgePosition="above before"
matBadgeColor="warn" style=" text-align: left">
matBadgeColor="warn" style=" text-align: left" matBadgeOverlap="false" matBadgeSize="small">
{{ id.displayName() }}
</span>
</div>
</div>
</button>
<!--</button>-->
</mat-panel-title>
</mat-expansion-panel-header>
<app-strudelapplist [applist]=id.site.appCatalog [identity]="id" (appChange)="selectApp($event)"></app-strudelapplist>
......
<div fxLayout="column" style="height: 100%">
<mat-toolbar color="primary" style="width: 100%">
<mat-toolbar-row>
<button mat-icon-button ><mat-icon>menu</mat-icon></button>
......@@ -7,11 +7,11 @@
<span class="fill-horizontal-space"></span>
</mat-toolbar-row>
</mat-toolbar>
<mat-sidenav-container style="height: 100%; width: 100%">
<mat-sidenav>
<mat-sidenav-container fxFlex style=" width: 100%;">
<mat-sidenav >
</mat-sidenav>
<mat-sidenav-content>
<div fxFlex style="flex: 1 1 0%; box-sizing: border-box">
<mat-sidenav-content style="height: 100%">
<!--<div fxFlex style="flex: 1 1 0%; box-sizing: border-box">-->
<div fxLayout="column" fxLayoutAlign="space-around stretch" style="height: 100%; width: 100%" >
<div fxLayout="row">
<div fxFlex></div>
......@@ -41,6 +41,7 @@
<div fxFlex></div>
<button mat-icon-button routerLink="/settings"><mat-icon>settings</mat-icon></button>
</div>
</div>
<!--</div>-->
</mat-sidenav-content>
</mat-sidenav-container>
</div>
......@@ -156,7 +156,7 @@ public setStatusMsg(statusMsg: BehaviorSubject<any>) {
}
joblist = joblist.sort((a,b) => (a.jobid < b.jobid)? 1:-1);
identity.joblist.next(joblist);
this.statusMsg.next(null);
//this.statusMsg.next(null);
}
private getBatchInterfaceError(error: any) {
......@@ -379,6 +379,7 @@ addUserHealth(identity,resp) {
params.set('cmd',JSON.stringify(job.app.paramscmd));
let paramstr = params.toString();
job.connectionState = 1;
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) },
......@@ -512,9 +513,13 @@ private httperror(errorstr: string) {
private handleAppInstanceError(job: Job, error: any) {
console.log('in handle app instance error');
console.log(error);
job.connectionState=0;
if (error.error !== undefined && error.error.message !== undefined) {
this.statusMsg.next(error.error.message);
} else if (error.error !== undefined && error.error.error !== undefined) {
this.statusMsg.next(error.error.error.msg);
} else {
this.statusMsg.next(error);
}
......
[
{
"url": "http://localhost:5000/",
"url": "https://strudel2-api-dev.cloud.cvl.org.au/m3/",
"name": "M3",
"host": "m3-login2.massive.org.au",
"host": "m3-login1.massive.org.au",
"dtn": "m3-dtn1.massive.org.au",
"cafingerprint": "RSA SHA256:cmDxHrZQSPlBMUUcI/BWmruXho1XOzfXPDHSqVTwV2I",
"appCatalog": [],
......
[
{ "url": null,
"name": "Desktop",
"startscript": "#!/bin/bash\n/usr/local/sv2/dev/desktop/desktop.slurm\n ",
"paramscmd": "/usr/local/sv2/dev/desktop/params.py",
"startscript": "#!/bin/bash\n#SBATCH -w m3a002\n/usr/local/sv2/dev/desktop/desktop.slurm\n ",
"paramscmd": "/usr/local/sv2/dev/desktop/params.py {jobid}",
"client": {"cmd": null, "redir": "vnc.html?password={password}" },
"localbind": true,
"applist": null
......
[
{ "url": null,
"name": "Desktop",
"startscript": "#!/bin/bash\n/usr/local/sv2/desktop/desktop.slurm\n ",
"paramscmd": "/usr/local/sv2/desktop/params.py",
"startscript": "#!/bin/bash\n#SBATCH -w m3a002\n/usr/local/sv2/dev/desktop/desktop.slurm\n ",
"paramscmd": "/usr/local/sv2/dev/desktop/params.py {jobid}",
"client": {"cmd": null, "redir": "vnc.html?password={password}" },
"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