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 {
//Verify that the state matched the nonce we used when initiating login
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) {
return
}
......@@ -169,11 +174,11 @@ export class AuthorisationService {
// this.backendSelectionService.apiserver.pipe(take(1)).subscribe(() => this.getCert())
// return
//}
if (token.token === undefined || token.token === '' || token.token == null) {
this.token.pipe(take(1)).subscribe(() => this.getCert())
if (token === null || token === undefined || token.token === undefined || token.token === '' || token.token === null) {
this.token.pipe(skip(1),take(1)).subscribe(() => this.getCert())
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())
return
}
......
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, AfterViewInit } from '@angular/core';
import { Router, NavigationStart } from '@angular/router';
import { AuthorisationService } from '../authorisation.service';
......@@ -10,7 +10,7 @@ import { AuthorisationService } from '../authorisation.service';
templateUrl: './keygen.component.html',
styleUrls: ['./keygen.component.css']
})
export class KeygenComponent implements OnInit {
export class KeygenComponent implements OnInit, AfterViewInit {
constructor(private router: Router, private authService: AuthorisationService) { }
......@@ -19,6 +19,9 @@ export class KeygenComponent implements OnInit {
// 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
this.authService.readyToNavigate.subscribe(readyToNavigate => this.navigate(readyToNavigate));
}
ngAfterViewInit() {
this.authService.getCert();
}
......
......@@ -81,28 +81,26 @@
</div>
</mat-list-item>
</div>
<!--<div *ngIf="h.type == 'table'">
<div *ngIf="h.type == 'table'">
<table mat-table [dataSource]="h.data">
<div *ngFor="let c of h.cols">
<ng-container *matColumnDef="c.key">
<ng-container *ngFor="let c of h.cols" matColumnDef="{{c.key}}">
<th mat-header-cell *matHeaderCellDef>{{c.name}}</th>
<th mat-cell *matCellDef="let row;"> {{row[c.key]}}</th>
</ng-container>
</div>
<ng-container matColumnDef="usage">
<!--<ng-container matColumnDef="usage">
<th mat-header-cell *matHeaderCellDef> Usage </th>
<td mat-cell *matCellDef="let row"> {{row.pu}} </td>
</ng-container>
<ng-container matColumnDef="quota">
<th mat-header-cell *matHeaderCellDef> Quota </th>
<td mat-cell *matCellDef="let row"> {{row.pq}} </td>
</ng-container>
</ng-container>-->
<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>
</table>
</div>-->
</div>
</div>
</mat-list>
......
......@@ -55,7 +55,7 @@ export class LauncherComponent implements OnInit {
private launchwindowWatcher: any;
private subscriptions: Subscription[];
public quotas: BehaviorSubject<any[]>;
displayedColumns: string[] = ['usage'];
displayedColumns: string[] = ['pu','pq'];
constructor( public dialog: MatDialog,
......
......@@ -21,7 +21,7 @@
"appCatalog": [],
"appCatalogUri": "./assets/config/cvluwaapps.test.json",
"cancelcmd": "/usr/local/sv2/sv2scancel.sh {jobid}",
"statcmd": "/usr/local/sv2/sv2stat.py",
"statcmd": "/usr/local/sv2/sv2stat.py"
},
{
"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