Skip to content

Commit 008e60c

Browse files
authored
feat: allow export of profile for cloud mode (#2960)
1 parent ef10e76 commit 008e60c

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/app/profiles/profiles.component.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,9 @@ <h3 class="flex justify-center">{{ 'profiles.noData.value' | translate }}</h3>
5757
<button mat-icon-button data-cy="delete" (click)="delete(row.profileName)">
5858
<mat-icon>delete</mat-icon>
5959
</button>
60-
@if (!cloudMode) {
61-
<button mat-icon-button data-cy="export" (click)="export(row.profileName)">
62-
<mat-icon>download</mat-icon>
63-
</button>
64-
}
60+
<button mat-icon-button data-cy="export" (click)="export(row.profileName)">
61+
<mat-icon>download</mat-icon>
62+
</button>
6563
</mat-cell>
6664
</ng-container>
6765
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>

src/app/profiles/profiles.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ export class ProfilesComponent implements OnInit {
122122
return !this.isLoading() && this.totalCount() === 0
123123
}
124124

125-
export(name: string): void {
126-
const profile = this.profiles.data.find((p) => p.profileName === name)
125+
export(profileName: string): void {
126+
const profile = this.profiles.data.find((p) => p.profileName === profileName)
127127
if (!profile) {
128128
const msg: string = this.translate.instant('profiles.failExportProfile.value')
129129

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

140140
dialogRef.afterClosed().subscribe((selectedDomain) => {
141141
if (selectedDomain) {
142-
this.exportProfile(name, selectedDomain !== 'none' ? selectedDomain : '')
142+
this.exportProfile(profile.profileName, selectedDomain !== 'none' ? selectedDomain : '')
143143
}
144144
})
145145
} else {
146-
this.exportProfile(name, '')
146+
this.exportProfile(profile.profileName, '')
147147
}
148148
}
149149

0 commit comments

Comments
 (0)