Skip to content

Commit

Permalink
fix: #138
Browse files Browse the repository at this point in the history
fix: #113
  • Loading branch information
urz9999 committed Jul 1, 2021
1 parent c210316 commit d461737
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [0.6.0](https://github.com/Noovolari/leapp/compare/v0.5.3...v0.6.0) (2021-06-30)
### [0.6.0](https://github.com/Noovolari/leapp/compare/v0.5.3...v0.6.0) (2021-06-30)

### Features

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,13 @@
<ng-select bindLabel="region" bindValue="region" [items]="awsRegions" [(ngModel)]="selectedSsmRegion" placeholder="Select a Region for finding instances" (change)="changeSsmRegion($event, session);"></ng-select>

<div class="loader" *ngIf="ssmLoading"><i class="fa fa-spinner fa-spin"></i></div>
<div class="list-of-ssm" *ngIf="!ssmLoading && instances.length > 0">
<b>Select an EC2 Instance:</b><br>
<input class="form-control" type="text" placeholder="search by..." (keyup)="searchSSMInstance($event)" />
<ul class="ssm-ul">
<div class="list-of-ssm" *ngIf="!ssmLoading">
<ng-container *ngIf="!ssmLoading && !firstTimeSsm">
<b>Select an EC2 Instance:</b><br>
<input class="form-control" type="text" placeholder="search by..." (keyup)="searchSSMInstance($event)" />
</ng-container>

<ul class="ssm-ul" *ngIf="instances.length > 0">
<li *ngFor="let instance of instances" class="ssm-card">
<div>
<span><b>{{instance.Name.length >= 24 ? instance.Name.substr(0, 21) + '...' : instance.Name}}</b> - {{instance.IPAddress}}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export class SessionCardComponent implements OnInit {
selectedSsmRegion;
selectedDefaultRegion;
openSsm = false;
firstTimeSsm = true;
awsRegions = [];
regionOrLocations = [];
instances = [];
Expand Down Expand Up @@ -181,6 +182,8 @@ export class SessionCardComponent implements OnInit {
// Reset things before opening the modal
this.instances = [];
this.ssmLoading = false;
this.firstTimeSsm = true;
this.selectedSsmRegion = null;
this.modalRef = this.modalService.show(this.ssmModalTemplate, { class: 'ssm-modal'});
}

Expand All @@ -205,12 +208,14 @@ export class SessionCardComponent implements OnInit {
if (this.selectedSsmRegion) {
// Start process
this.ssmLoading = true;
this.firstTimeSsm = true;
// Generate valid temporary credentials for the SSM and EC2 client
const credentials = await (this.sessionService as AwsSessionService).generateCredentials(session.sessionId);
// Get the instances
this.instances = await this.ssmService.getSsmInstances(credentials, this.selectedSsmRegion);
this.duplicateInstances = this.instances;
this.ssmLoading = false;
this.firstTimeSsm = false;
}
}

Expand Down
Binary file added src/assets/images/Archive.zip
Binary file not shown.
Binary file modified src/assets/images/home-offline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/icon-offline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/user-offline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d461737

Please sign in to comment.