From 8e75ea54afdf0fd648642a2bfc45ce64385a5aa7 Mon Sep 17 00:00:00 2001 From: Mike Date: Tue, 27 May 2025 14:10:17 -0700 Subject: [PATCH] feat: allow export of profile for cloud mode --- src/app/profiles/profiles.component.html | 8 +++----- src/app/profiles/profiles.component.ts | 12 +++--------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/app/profiles/profiles.component.html b/src/app/profiles/profiles.component.html index 6662e545c..27b5b3a8d 100644 --- a/src/app/profiles/profiles.component.html +++ b/src/app/profiles/profiles.component.html @@ -57,11 +57,9 @@

{{ 'profiles.noData.value' | translate }}

- @if (!cloudMode) { - - } + diff --git a/src/app/profiles/profiles.component.ts b/src/app/profiles/profiles.component.ts index e59a51108..48185a20b 100644 --- a/src/app/profiles/profiles.component.ts +++ b/src/app/profiles/profiles.component.ts @@ -119,13 +119,7 @@ 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) - if (!profile) { - this.snackBar.open($localize`Unable to export profile`, undefined, SnackbarDefaults.defaultError) - return - } - + export(profile: Profile): void { if (profile.activation === 'acmactivate') { const dialogRef = this.dialog.open(ExportDialogComponent, { width: '400px', @@ -134,11 +128,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, '') } }