From 5ab62e396dcc12677f4ae8826c205d11a8971e31 Mon Sep 17 00:00:00 2001 From: Evgeny Stepanovych Date: Mon, 7 Oct 2024 09:53:55 +0200 Subject: [PATCH] NAS-131460: UI should use `webui.crypto.csr_profiles` endpoint for CSR profiles (#10797) --- src/app/interfaces/api/api-call-directory.interface.ts | 1 + .../certificates-dash/csr-add/csr-add.component.spec.ts | 2 +- .../csr-identifier-and-type.component.spec.ts | 2 +- .../csr-identifier-and-type.component.ts | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/interfaces/api/api-call-directory.interface.ts b/src/app/interfaces/api/api-call-directory.interface.ts index 2ba0c3f7b09..bcd2a9b56c9 100644 --- a/src/app/interfaces/api/api-call-directory.interface.ts +++ b/src/app/interfaces/api/api-call-directory.interface.ts @@ -912,6 +912,7 @@ export interface ApiCallDirectory { // WebUI Crypto 'webui.crypto.certificate_profiles': { params: void; response: CertificateProfiles }; + 'webui.crypto.csr_profiles': { params: void; response: CertificateProfiles }; 'webui.crypto.get_certificate_domain_names': { params: [number]; response: string[] }; 'webui.crypto.certificateauthority_profiles': { params: void; response: CertificateProfiles }; diff --git a/src/app/pages/credentials/certificates-dash/csr-add/csr-add.component.spec.ts b/src/app/pages/credentials/certificates-dash/csr-add/csr-add.component.spec.ts index 7df2b3847e8..2782f7b7a04 100644 --- a/src/app/pages/credentials/certificates-dash/csr-add/csr-add.component.spec.ts +++ b/src/app/pages/credentials/certificates-dash/csr-add/csr-add.component.spec.ts @@ -72,7 +72,7 @@ describe('CsrAddComponent', () => { ], providers: [ mockWebSocket([ - mockCall('webui.crypto.certificate_profiles', { + mockCall('webui.crypto.csr_profiles', { 'HTTPS RSA Certificate': profile, }), mockCall('certificate.ec_curve_choices', { diff --git a/src/app/pages/credentials/certificates-dash/csr-add/steps/csr-identifier-and-type/csr-identifier-and-type.component.spec.ts b/src/app/pages/credentials/certificates-dash/csr-add/steps/csr-identifier-and-type/csr-identifier-and-type.component.spec.ts index 058c61815cd..af2200925d7 100644 --- a/src/app/pages/credentials/certificates-dash/csr-add/steps/csr-identifier-and-type/csr-identifier-and-type.component.spec.ts +++ b/src/app/pages/credentials/certificates-dash/csr-add/steps/csr-identifier-and-type/csr-identifier-and-type.component.spec.ts @@ -26,7 +26,7 @@ describe('CsrIdentifierAndTypeComponent', () => { ], providers: [ mockWebSocket([ - mockCall('webui.crypto.certificate_profiles', { + mockCall('webui.crypto.csr_profiles', { 'HTTPS ECC Certificate': httpsProfile, 'Openvpn Client Certificate': openvpnProfile, }), diff --git a/src/app/pages/credentials/certificates-dash/csr-add/steps/csr-identifier-and-type/csr-identifier-and-type.component.ts b/src/app/pages/credentials/certificates-dash/csr-add/steps/csr-identifier-and-type/csr-identifier-and-type.component.ts index a7ba41e9646..77c518f5804 100644 --- a/src/app/pages/credentials/certificates-dash/csr-add/steps/csr-identifier-and-type/csr-identifier-and-type.component.ts +++ b/src/app/pages/credentials/certificates-dash/csr-add/steps/csr-identifier-and-type/csr-identifier-and-type.component.ts @@ -89,7 +89,7 @@ export class CsrIdentifierAndTypeComponent implements OnInit, SummaryProvider { } private loadProfiles(): void { - this.ws.call('webui.crypto.certificate_profiles') + this.ws.call('webui.crypto.csr_profiles') .pipe(this.errorHandler.catchError(), untilDestroyed(this)) .subscribe((profiles) => { this.profiles = profiles;