Commit 49f0687f authored by Alicja Reniewicz's avatar Alicja Reniewicz
Browse files

info for strong password, fix problem with missing ip by SSH connection

parent 3661f649
......@@ -16,6 +16,7 @@ export class ByonListCommonComponent implements OnInit {
protected snackBar: MatSnackBar;
protected byonService: ByonService;
returnedValueForMissingInformation = 'UNKNOWN';
byonLoadingInProgress = false;
data: MatTableDataSource<Byon>;
displayedColumns: string[];
......@@ -45,7 +46,7 @@ export class ByonListCommonComponent implements OnInit {
const publicIP = byon.ipAddresses
.find(value => (value.ipAddressType.toString() === IpAddressType[IpAddressType.PUBLIC_IP]
&& value.ipVersion.toString() === IpVersion[IpVersion.V4]));
return publicIP ? publicIP.value : 'UNKNOWN';
return publicIP ? publicIP.value : this.returnedValueForMissingInformation;
}
getSystemWithVersion(byon: Byon): string {
......@@ -59,7 +60,7 @@ export class ByonListCommonComponent implements OnInit {
getProviderName(byon: Byon): string {
const provider = this.cloudsList
.find(value => value.id === byon.nodeProperties.providerId);
return provider ? provider.api.providerName : 'UNKNOWN';
return provider ? provider.api.providerName : this.returnedValueForMissingInformation;
}
protected updateByonTableData(byonDefValue: Array<Byon>) {
......
......@@ -93,7 +93,8 @@
<ng-container matColumnDef="sshConnection">
<th mat-header-cell *matHeaderCellDef>SSH connection</th>
<td mat-cell *matCellDef="let row">
<button mat-raised-button color="primary" (click)="onSshConnectionClick(row)">
<button mat-raised-button color="primary" (click)="onSshConnectionClick(row)"
[disabled]="!isSshConnectionPossible(row)">
SSH connection
</button>
</td>
......
......@@ -58,6 +58,10 @@ export class ByonListComponent extends ByonListCommonComponent implements OnInit
this.openByonDefinitionDialog();
}
isSshConnectionPossible(byon: Byon): boolean {
return byon.loginCredential !== null && this.getPublicIpV4(byon) !== this.returnedValueForMissingInformation;
}
onSshConnectionClick(byon: Byon) {
this.webSshService.createSshConnection(byon.loginCredential, this.getPublicIpV4(byon), byon.name);
}
......
......@@ -20,6 +20,6 @@ mat-card-actions {
transform: translate(-50%, -50%);
}
.example-tooltip-red {
.tooltip-primary {
background: var(--color-primary);
}
......@@ -28,9 +28,7 @@
</mat-form-field>
<mat-form-field class="fullWidthControl">
<mat-icon matPrefix
matTooltip="Strong password: min 8 signs length, min 1 uppercase letter, min 1 small letter and min 1 digit, no white signs"
matTooltipClass="example-tooltip-red">
<mat-icon matPrefix>
{{'lock'}}
</mat-icon>
<input formControlName="newPassword" name="newPassword" matInput placeholder="New password" required
......@@ -41,6 +39,11 @@
{{validation.message}}
</mat-error>
</mat-error>
<mat-icon matSuffix
matTooltip="Strong password: min 8 signs length, min 1 uppercase letter, min 1 small letter and min 1 digit, no white signs"
matTooltipClass="tooltip-primary">
{{'info'}}
</mat-icon>
<mat-icon matSuffix (click)="newPasswordHide = !newPasswordHide">{{newPasswordHide ? 'visibility_off' :
'visibility'}}
</mat-icon>
......
Supports Markdown
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