mirror of https://github.com/apache/nifi.git
[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
This commit is contained in:
parent
11fdc44fb9
commit
2dd7cf7f92
|
@ -35,17 +35,17 @@ export class RegistryService {
|
||||||
}
|
}
|
||||||
|
|
||||||
getBuckets(registryId: string, branch?: string): Observable<any> {
|
getBuckets(registryId: string, branch?: string): Observable<any> {
|
||||||
const params: HttpParams = new HttpParams();
|
let params: HttpParams = new HttpParams();
|
||||||
if (branch) {
|
if (branch) {
|
||||||
params.set('branch', branch);
|
params = params.set('branch', branch);
|
||||||
}
|
}
|
||||||
return this.httpClient.get(`${RegistryService.API}/flow/registries/${registryId}/buckets`, { params });
|
return this.httpClient.get(`${RegistryService.API}/flow/registries/${registryId}/buckets`, { params });
|
||||||
}
|
}
|
||||||
|
|
||||||
getFlows(registryId: string, bucketId: string, branch?: string): Observable<any> {
|
getFlows(registryId: string, bucketId: string, branch?: string): Observable<any> {
|
||||||
const params: HttpParams = new HttpParams();
|
let params: HttpParams = new HttpParams();
|
||||||
if (branch) {
|
if (branch) {
|
||||||
params.set('branch', branch);
|
params = params.set('branch', branch);
|
||||||
}
|
}
|
||||||
return this.httpClient.get(`${RegistryService.API}/flow/registries/${registryId}/buckets/${bucketId}/flows`, {
|
return this.httpClient.get(`${RegistryService.API}/flow/registries/${registryId}/buckets/${bucketId}/flows`, {
|
||||||
params
|
params
|
||||||
|
@ -53,9 +53,9 @@ export class RegistryService {
|
||||||
}
|
}
|
||||||
|
|
||||||
getFlowVersions(registryId: string, bucketId: string, flowId: string, branch?: string): Observable<any> {
|
getFlowVersions(registryId: string, bucketId: string, flowId: string, branch?: string): Observable<any> {
|
||||||
const params: HttpParams = new HttpParams();
|
let params: HttpParams = new HttpParams();
|
||||||
if (branch) {
|
if (branch) {
|
||||||
params.set('branch', branch);
|
params = params.set('branch', branch);
|
||||||
}
|
}
|
||||||
return this.httpClient.get(
|
return this.httpClient.get(
|
||||||
`${RegistryService.API}/flow/registries/${registryId}/buckets/${bucketId}/flows/${flowId}/versions`,
|
`${RegistryService.API}/flow/registries/${registryId}/buckets/${bucketId}/flows/${flowId}/versions`,
|
||||||
|
|
|
@ -200,7 +200,8 @@ export class ImportFromRegistry extends CloseOnEscapeDialog implements OnInit {
|
||||||
bucketChanged(bucketId: string): void {
|
bucketChanged(bucketId: string): void {
|
||||||
this.clearFlows();
|
this.clearFlows();
|
||||||
const registryId = this.importFromRegistryForm.get('registry')?.value;
|
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() {
|
private clearFlows() {
|
||||||
|
@ -212,7 +213,8 @@ export class ImportFromRegistry extends CloseOnEscapeDialog implements OnInit {
|
||||||
flowChanged(flowId: string): void {
|
flowChanged(flowId: string): void {
|
||||||
const registryId = this.importFromRegistryForm.get('registry')?.value;
|
const registryId = this.importFromRegistryForm.get('registry')?.value;
|
||||||
const bucketId = this.importFromRegistryForm.get('bucket')?.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 {
|
loadBranches(registryId: string): void {
|
||||||
|
|
Loading…
Reference in New Issue