This is an automated email from the ASF dual-hosted git repository.

mcgilman pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new 2dd7cf7f92 [NIFI-13535] - Fix: Issues selecting GitHub branch on 
version control screens in new UI (#9087)
2dd7cf7f92 is described below

commit 2dd7cf7f92facf8c083d97c845541e5c535825a9
Author: Rob Fellows <[email protected]>
AuthorDate: Wed Jul 24 09:28:54 2024 -0400

    [NIFI-13535] - Fix: Issues selecting GitHub branch on version control 
screens in new UI (#9087)
    
    * [NIFI-13535] - Fix: Issues selecting GitHub branch on version control 
screens in new UI
    
    * ensure branch is provided when querying flow versions in import from 
registry dialog
    
    * add branch to loadFlows call on bucketChange
    
    This closes #9087
---
 .../src/app/pages/flow-designer/service/registry.service.ts  | 12 ++++++------
 .../import-from-registry/import-from-registry.component.ts   |  6 ++++--
 2 files changed, 10 insertions(+), 8 deletions(-)

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<any> {
-        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<any> {
-        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<any> {
-        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 {

Reply via email to