Commit 547ae2cb authored by Chris Hines's avatar Chris Hines
Browse files

still got login errors

parent 2b1fc21f
Pipeline #7521 passed with stages
in 3 minutes and 7 seconds
...@@ -152,6 +152,11 @@ export class AuthorisationService { ...@@ -152,6 +152,11 @@ export class AuthorisationService {
//Verify that the state matched the nonce we used when initiating login //Verify that the state matched the nonce we used when initiating login
let tuple = JSON.parse(localStorage.getItem('authservice')); let tuple = JSON.parse(localStorage.getItem('authservice'));
if (tuple == null) {
console.log('unable to get the authservice from localStorage');
console.log(localStorage.getItem('authservice'));
return
}
if (tuple[1] != state) { if (tuple[1] != state) {
return return
} }
...@@ -169,11 +174,11 @@ export class AuthorisationService { ...@@ -169,11 +174,11 @@ export class AuthorisationService {
// this.backendSelectionService.apiserver.pipe(take(1)).subscribe(() => this.getCert()) // this.backendSelectionService.apiserver.pipe(take(1)).subscribe(() => this.getCert())
// return // return
//} //}
if (token.token === undefined || token.token === '' || token.token == null) { if (token === null || token === undefined || token.token === undefined || token.token === '' || token.token === null) {
this.token.pipe(take(1)).subscribe(() => this.getCert()) this.token.pipe(skip(1),take(1)).subscribe(() => this.getCert())
return return
} }
if (this.backendSelectionService.apiserver.value === null || this.backendSelectionService.apiserver.value == undefined) { if (this.backendSelectionService.apiserver.value === null || this.backendSelectionService.apiserver.value === undefined) {
this.backendSelectionService.apiserver.pipe(skip(1),take(1)).subscribe(() => this.getCert()) this.backendSelectionService.apiserver.pipe(skip(1),take(1)).subscribe(() => this.getCert())
return return
} }
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit, AfterViewInit } from '@angular/core';
import { Router, NavigationStart } from '@angular/router'; import { Router, NavigationStart } from '@angular/router';
import { AuthorisationService } from '../authorisation.service'; import { AuthorisationService } from '../authorisation.service';
...@@ -10,7 +10,7 @@ import { AuthorisationService } from '../authorisation.service'; ...@@ -10,7 +10,7 @@ import { AuthorisationService } from '../authorisation.service';
templateUrl: './keygen.component.html', templateUrl: './keygen.component.html',
styleUrls: ['./keygen.component.css'] styleUrls: ['./keygen.component.css']
}) })
export class KeygenComponent implements OnInit { export class KeygenComponent implements OnInit, AfterViewInit {
constructor(private router: Router, private authService: AuthorisationService) { } constructor(private router: Router, private authService: AuthorisationService) { }
...@@ -19,6 +19,9 @@ export class KeygenComponent implements OnInit { ...@@ -19,6 +19,9 @@ export class KeygenComponent implements OnInit {
// We hold here while the authService extract the token from the URI and generates keys // We hold here while the authService extract the token from the URI and generates keys
// Once the keys are generated we can navigate away from this callback component // Once the keys are generated we can navigate away from this callback component
this.authService.readyToNavigate.subscribe(readyToNavigate => this.navigate(readyToNavigate)); this.authService.readyToNavigate.subscribe(readyToNavigate => this.navigate(readyToNavigate));
}
ngAfterViewInit() {
this.authService.getCert(); this.authService.getCert();
} }
......
...@@ -81,28 +81,26 @@ ...@@ -81,28 +81,26 @@
</div> </div>
</mat-list-item> </mat-list-item>
</div> </div>
<!--<div *ngIf="h.type == 'table'"> <div *ngIf="h.type == 'table'">
<table mat-table [dataSource]="h.data"> <table mat-table [dataSource]="h.data">
<div *ngFor="let c of h.cols"> <ng-container *ngFor="let c of h.cols" matColumnDef="{{c.key}}">
<ng-container *matColumnDef="c.key">
<th mat-header-cell *matHeaderCellDef>{{c.name}}</th> <th mat-header-cell *matHeaderCellDef>{{c.name}}</th>
<th mat-cell *matCellDef="let row;"> {{row[c.key]}}</th> <th mat-cell *matCellDef="let row;"> {{row[c.key]}}</th>
</ng-container> </ng-container>
</div> <!--<ng-container matColumnDef="usage">
<ng-container matColumnDef="usage">
<th mat-header-cell *matHeaderCellDef> Usage </th> <th mat-header-cell *matHeaderCellDef> Usage </th>
<td mat-cell *matCellDef="let row"> {{row.pu}} </td> <td mat-cell *matCellDef="let row"> {{row.pu}} </td>
</ng-container> </ng-container>
<ng-container matColumnDef="quota"> <ng-container matColumnDef="quota">
<th mat-header-cell *matHeaderCellDef> Quota </th> <th mat-header-cell *matHeaderCellDef> Quota </th>
<td mat-cell *matCellDef="let row"> {{row.pq}} </td> <td mat-cell *matCellDef="let row"> {{row.pq}} </td>
</ng-container> </ng-container>-->
<tr mat-header-row *matHeaderRowDef="displayedColumns" ></tr> <tr mat-header-row *matHeaderRowDef="displayedColumns" ></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;" [ngClass]="quotaClass(row)"></tr> <!--<tr mat-row *matRowDef="let row; columns: displayedColumns;" [ngClass]="quotaClass(row)"></tr>-->
<tr mat-row *matRowDef="let row; columns: displayedColumns" ></tr> <tr mat-row *matRowDef="let row; columns: displayedColumns" ></tr>
</table> </table>
</div>--> </div>
</div> </div>
</mat-list> </mat-list>
......
...@@ -55,7 +55,7 @@ export class LauncherComponent implements OnInit { ...@@ -55,7 +55,7 @@ export class LauncherComponent implements OnInit {
private launchwindowWatcher: any; private launchwindowWatcher: any;
private subscriptions: Subscription[]; private subscriptions: Subscription[];
public quotas: BehaviorSubject<any[]>; public quotas: BehaviorSubject<any[]>;
displayedColumns: string[] = ['usage']; displayedColumns: string[] = ['pu','pq'];
constructor( public dialog: MatDialog, constructor( public dialog: MatDialog,
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
"appCatalog": [], "appCatalog": [],
"appCatalogUri": "./assets/config/cvluwaapps.test.json", "appCatalogUri": "./assets/config/cvluwaapps.test.json",
"cancelcmd": "/usr/local/sv2/sv2scancel.sh {jobid}", "cancelcmd": "/usr/local/sv2/sv2scancel.sh {jobid}",
"statcmd": "/usr/local/sv2/sv2stat.py", "statcmd": "/usr/local/sv2/sv2stat.py"
}, },
{ {
"url": null , "url": 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