Skip to content

Commit

Permalink
bugfix: #150,#158, #166
Browse files Browse the repository at this point in the history
  • Loading branch information
urz9999 committed Sep 7, 2021
1 parent ffc75a6 commit fbcf00d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/app/components/session/session-card/detail.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ export class DetailPipe implements PipeTransform {
transform(session: Session): string {
switch (session.type) {
case(SessionType.awsIamRoleFederated):
return ' - ' + (session as AwsIamRoleFederatedSession).roleArn.split('/')[1];
return ' - ' + (session as AwsIamRoleFederatedSession).roleArn.split('role/')[1];
case(SessionType.azure):
return ' - ' + (session as AzureSession).subscriptionId;
case(SessionType.awsIamUser):
return ''; // (session as AwsIamUserSession).sessionName;
case(SessionType.awsSsoRole):
return ' - ' + (session as AwsSsoRoleSession).roleArn.split('/')[1];
return ' - ' + (session as AwsSsoRoleSession).roleArn.split('role/')[1];
case(SessionType.awsIamRoleChained):
return ' - ' + (session as AwsIamRoleChainedSession).roleArn.split('/')[1];
return ' - ' + (session as AwsIamRoleChainedSession).roleArn.split('role/')[1];
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h4 class="modal-title"><i class="fa fa-stars"></i> New version available</h4>
<h3>Version: <span>{{version}}</span></h3>
<h3>Release Date: <span>{{releaseDate | date }}</span></h3>
<br>
<div class="html-content" [innerHTML]="releaseNotes"></div>
<div class="html-content" [innerHTML]="releaseNotes" (click)="$event.preventDefault()"></div>
<br>

<div class="button-equalizer">
Expand Down
2 changes: 1 addition & 1 deletion src/app/services/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ export class AppService extends NativeService {
}

this.getCurrentWindow().show();
this.newNotification('MFA Token needed', 'Please insert MFA Token for Leapp Session');
this.newNotification('MFA Token needed', message);
this.modalService.show(InputDialogComponent, { backdrop: 'static', animated: false, class: 'confirm-modal', initialState: { title, placeholder, message, callback}});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class AwsIamUserService extends AwsSessionService {
// eslint-disable-next-line @typescript-eslint/naming-convention
private generateSessionTokenCallingMfaModal( session: Session, sts: AWS.STS, params: { DurationSeconds: number }): Promise<CredentialsInfo> {
return new Promise((resolve, reject) => {
this.appService.inputDialog('MFA Code insert', 'Insert MFA Code', 'please insert MFA code from your app or device', (value) => {
this.appService.inputDialog('MFA Code insert', 'Insert MFA Code', `please insert MFA code from your app or device for ${session.sessionName}`, (value) => {
if (value !== Constants.confirmClosed) {
params['SerialNumber'] = (session as AwsIamUserSession).mfaDevice;
params['TokenCode'] = value;
Expand Down

0 comments on commit fbcf00d

Please sign in to comment.