fix: idp style field, idp redirect, table (#883)

This commit is contained in:
Max Peintner 2020-10-20 16:49:18 +02:00 committed by GitHub
parent 57a3ccc91b
commit cfd119924f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 11 deletions

View File

@ -29,7 +29,7 @@ tr {
outline: none;
&.disabled * {
color: var(--grey);
opacity: .8;
}
button {

View File

@ -170,7 +170,13 @@ export class IdpTableComponent implements OnInit {
if (row.id) {
switch (this.serviceType) {
case PolicyComponentServiceType.MGMT:
return ['/org', 'idp', row.id];
switch ((row as MgmtIdpView.AsObject).providerType) {
case IdpProviderType.IDPPROVIDERTYPE_SYSTEM:
return ['/iam', 'idp', row.id];
case IdpProviderType.IDPPROVIDERTYPE_ORG:
return ['/org', 'idp', row.id];
}
break;
case PolicyComponentServiceType.ADMIN:
return ['/iam', 'idp', row.id];
}

View File

@ -12,6 +12,14 @@
<mat-label>{{ 'IDP.NAME' | translate }}</mat-label>
<input matInput formControlName="name" />
</mat-form-field>
<mat-form-field class="formfield" appearance="outline">
<mat-label>{{ 'IDP.STYLE' | translate }}</mat-label>
<mat-select formControlName="stylingType">
<mat-option *ngFor="let field of styleFields" [value]="field">
{{ 'IDP.STYLEFIELD.'+field | translate }}
</mat-option>
</mat-select>
</mat-form-field>
</div>
</ng-container>
@ -75,14 +83,6 @@
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="formfield" appearance="outline">
<mat-label>{{ 'IDP.STYLE' | translate }}</mat-label>
<mat-select formControlName="usernameMapping">
<mat-option *ngFor="let field of styleFields" [value]="field">
{{ 'IDP.STYLEFIELD.'+field | translate }}
</mat-option>
</mat-select>
</mat-form-field>
</div>
</ng-container>

View File

@ -66,7 +66,6 @@ export class IdpComponent implements OnInit, OnDestroy {
});
this.route.data.pipe(switchMap(data => {
console.log(data.serviceType);
this.serviceType = data.serviceType;
switch (this.serviceType) {
case PolicyComponentServiceType.MGMT: