Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/app/profiles/profiles.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,9 @@ <h3 class="flex justify-center">{{ 'profiles.noData.value' | translate }}</h3>
<button mat-icon-button data-cy="delete" (click)="delete(row.profileName)">
<mat-icon>delete</mat-icon>
</button>
@if (!cloudMode) {
<button mat-icon-button data-cy="export" (click)="export(row.profileName)">
<mat-icon>download</mat-icon>
</button>
}
<button mat-icon-button data-cy="export" (click)="export(row.profileName)">
<mat-icon>download</mat-icon>
</button>
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
Expand Down
8 changes: 4 additions & 4 deletions src/app/profiles/profiles.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ export class ProfilesComponent implements OnInit {
return !this.isLoading() && this.totalCount() === 0
}

export(name: string): void {
const profile = this.profiles.data.find((p) => p.profileName === name)
export(profileName: string): void {
const profile = this.profiles.data.find((p) => p.profileName === profileName)
if (!profile) {
const msg: string = this.translate.instant('profiles.failExportProfile.value')

Expand All @@ -139,11 +139,11 @@ export class ProfilesComponent implements OnInit {

dialogRef.afterClosed().subscribe((selectedDomain) => {
if (selectedDomain) {
this.exportProfile(name, selectedDomain !== 'none' ? selectedDomain : '')
this.exportProfile(profile.profileName, selectedDomain !== 'none' ? selectedDomain : '')
}
})
} else {
this.exportProfile(name, '')
this.exportProfile(profile.profileName, '')
}
}

Expand Down
Loading