diff --git a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/service/registry.service.ts b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/service/registry.service.ts index b18583d2ca..1ca7566241 100644 --- a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/service/registry.service.ts +++ b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/service/registry.service.ts @@ -35,17 +35,17 @@ export class RegistryService { } getBuckets(registryId: string, branch?: string): Observable { - const params: HttpParams = new HttpParams(); + let params: HttpParams = new HttpParams(); if (branch) { - params.set('branch', branch); + params = params.set('branch', branch); } return this.httpClient.get(`${RegistryService.API}/flow/registries/${registryId}/buckets`, { params }); } getFlows(registryId: string, bucketId: string, branch?: string): Observable { - const params: HttpParams = new HttpParams(); + let params: HttpParams = new HttpParams(); if (branch) { - params.set('branch', branch); + params = params.set('branch', branch); } return this.httpClient.get(`${RegistryService.API}/flow/registries/${registryId}/buckets/${bucketId}/flows`, { params @@ -53,9 +53,9 @@ export class RegistryService { } getFlowVersions(registryId: string, bucketId: string, flowId: string, branch?: string): Observable { - const params: HttpParams = new HttpParams(); + let params: HttpParams = new HttpParams(); if (branch) { - params.set('branch', branch); + params = params.set('branch', branch); } return this.httpClient.get( `${RegistryService.API}/flow/registries/${registryId}/buckets/${bucketId}/flows/${flowId}/versions`, diff --git a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/import-from-registry/import-from-registry.component.ts b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/import-from-registry/import-from-registry.component.ts index 1e5cfd69b2..02b8383534 100644 --- a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/import-from-registry/import-from-registry.component.ts +++ b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/import-from-registry/import-from-registry.component.ts @@ -200,7 +200,8 @@ export class ImportFromRegistry extends CloseOnEscapeDialog implements OnInit { bucketChanged(bucketId: string): void { this.clearFlows(); const registryId = this.importFromRegistryForm.get('registry')?.value; - this.loadFlows(registryId, bucketId); + const branch = this.importFromRegistryForm.get('branch')?.value; + this.loadFlows(registryId, bucketId, branch); } private clearFlows() { @@ -212,7 +213,8 @@ export class ImportFromRegistry extends CloseOnEscapeDialog implements OnInit { flowChanged(flowId: string): void { const registryId = this.importFromRegistryForm.get('registry')?.value; const bucketId = this.importFromRegistryForm.get('bucket')?.value; - this.loadVersions(registryId, bucketId, flowId); + const branch = this.importFromRegistryForm.get('branch')?.value; + this.loadVersions(registryId, bucketId, flowId, branch); } loadBranches(registryId: string): void {