Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NIFI-13535] - Fix: Issues selecting GitHub branch on version control screens in new UI #9087

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,27 @@ 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
});
}

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`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there is a similar function for bucketChanged which then calls loadFlows(registryId, bucketId) and I think that would need to include the branch as well right?

}

loadBranches(registryId: string): void {
Expand Down