Skip to content
Snippets Groups Projects
Commit b5d82c9b authored by Chris Hines's avatar Chris Hines
Browse files

Support username in the URL path as well as site name to differentiate if you...

Support username in the URL path as well as site name to differentiate if you have multiple accounts on one site
parent 83230d1d
No related branches found
No related tags found
2 merge requests!21New css dev,!19Dev
Pipeline #7849 passed
......@@ -6,7 +6,7 @@
<mat-accordion style="width: 100%" [displayMode]="flat">
<div *ngFor="let id of (computeSitesService.appidentities | async)">
<!--<mat-expansion-panel (afterExpand)="selectId(id)" (closed)="selectId(id)" style="width: 100%">-->
<mat-expansion-panel style="width: 100%">
<mat-expansion-panel style="width: 100%" [expanded]="(identity$ | async) === id">
<mat-expansion-panel-header>
<mat-panel-title>
<span fxFlex matBadge="{{ countErrors((id.systemalerts | async), (id.accountalerts | async)) }}"
......@@ -23,7 +23,7 @@
<mat-list-item>
<button mat-button style="width: 100%; text-align: left"
[routerLink]="['/launch',id.site.name,'accountinfo']"
[routerLink]="['/launch',id.displayName(),'accountinfo']"
routerLinkActive #rla="routerLinkActive">
Account Info
</button>
......@@ -42,7 +42,7 @@
<nav mat-tab-nav-bar color="accent" backgroundColor="primary">
<a mat-tab-link
*ngFor="let id of (computeSitesService.appidentities | async)"
[routerLink]="['/launch',id.site.name]"
[routerLink]="['/launch',id.displayName()]"
routerLinkActive #rla="routerLinkActive"
[routerLinkActiveOptions]="{'exact': false}"
[active]="rla.isActive">
......@@ -59,14 +59,14 @@
<div *ngIf="(identity$ | async) !== null" style="width: 100%" class=darker-theme>
<nav mat-tab-nav-bar color=accent backgroundColor=primary>
<a mat-tab-link
[routerLink]="['/launch',identity$.value.site.name,'accountinfo']"
[routerLink]="['/launch',identity$.value.displayName(),'accountinfo']"
routerLinkActive #rla="routerLinkActive"
[active]="rla.isActive">
Account Info
</a>
<a mat-tab-link
*ngFor="let app of (identity$.value.site.appCatalog | async)"
[routerLink]="['/launch',identity$.value.site.name,app.name]"
[routerLink]="['/launch',identity$.value.displayName(),app.name]"
routerLinkActive #rla="routerLinkActive"
[active]="rla.isActive">
{{ app.name }}
......
......@@ -225,10 +225,26 @@ export class LauncherComponent implements OnInit {
}
for ( let id of this.computeSitesService.appidentities.value) {
if (v == id.site.name) {
if (v == id.displayName()) {
return id
}
}
var idx: number;
idx = v.indexOf('@');
var sitename: string;
if (idx > 0) {
sitename = v.substring(idx+1);
} else {
sitename = v;
}
for ( let id of this.computeSitesService.appidentities.value) {
if (sitename == id.site.name) {
return id
}
}
console.error('didnt find a matching id');
console.log(v);
console.log(this.computeSitesService.appidentities.value);
......
<div *ngFor="let app of applist | async" >
<mat-list-item *ngIf="app.startscript != null" style="width: 100%">
<button mat-button style="width: 100%; text-align: left"
[routerLink]="['/launch',identity.site.name,app.name]"
[routerLink]="['/launch',identity.displayName(),app.name]"
routerLinkActive #rla="routerLinkActive">
{{ app.name }}</button>
</mat-list-item>
......
......@@ -14,15 +14,15 @@
"desc": "<div><div>Don't have an account?</div><div style=\"height:25px\"></div><div><a href=signup style=\"text-decoration: none\">Signup</a></div><div style=\"height:25px\"></div><div>The Characterisation Virtual Laboratory focuses on providing tools necessary for processing various experimental data such as MRI, CT and EM imaging techniques.<p>By Authenticating to the CVL you will gain access to the CVL@MASSIVE cluster at Monash University</div></div>"
},
{
"authorise": "https://sshauthz.cloud.cvl.org.au/pysshauthz/oauth2/oauth/authorize/choose",
"base": "https://sshauthz.cloud.cvl.org.au/pysshauthz/oauth2/",
"authorise": "http://localhost:5000/oauth2/oauth/authorize/choose",
"base": "http://localhost:5000/oauth2/",
"client_id": "Q96kt2Vtw6S78dpORktM81DH",
"sign": "https://sshauthz.cloud.cvl.org.au/pysshauthz/sign/monash_hpcid/api/v1/sign_key",
"logout": "https://sshauthz.cloud.cvl.org.au/pysshauthz/oauth2/logout",
"sign": "http://localhost:5000/sign/monash_hpcid/api/v1/sign_key",
"logout": "http://localhost:5000/oauth2/logout",
"name": "Don't select me",
"icon": null,
"scope": "user:email",
"cafp": "RSA SHA256:NOTAREALFP",
"cafp": "RSA SHA256:cmDxHrZQSPlBMUUcI/BWmruXho1XOzfXPDHSqVTwV2I",
"signup": "https://docs.massive.org.au/M3/requesting-an-account.html",
"desc": "This is a bogus authorisation server. It exists so that we can see the proposed position of various links in the test environment.<p> If you use this server it functions exactly the same as the CVL Option"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment