This is an automated email from the ASF dual-hosted git repository.
rfellows 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 3192bc85ef [NIFI-13132] show banner error in import flow dialog when
registry is… (#8737)
3192bc85ef is described below
commit 3192bc85ef212775753637bdba80496da8fa68f6
Author: Scott Aslan <[email protected]>
AuthorDate: Fri May 3 16:31:43 2024 -0400
[NIFI-13132] show banner error in import flow dialog when registry is…
(#8737)
* [NIFI-13132] show banner error in import flow dialog when registry is
configured but unreachable
* address review comments
This closes #8737
---
.../pages/flow-designer/state/flow/flow.effects.ts | 44 ++++++++++++++++++++--
1 file changed, 40 insertions(+), 4 deletions(-)
diff --git
a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.effects.ts
b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.effects.ts
index 2d71be11a5..c35dc570d4 100644
---
a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.effects.ts
+++
b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.effects.ts
@@ -805,7 +805,16 @@ export class FlowEffects {
): Observable<BucketEntity[]> => {
return
this.registryService.getBuckets(registryId).pipe(
take(1),
- map((response) => response.buckets)
+ map((response) => response.buckets),
+ tap({
+ error: (errorResponse: HttpErrorResponse)
=> {
+ this.store.dispatch(
+ FlowActions.flowBannerError({
+ error:
this.errorHelper.getErrorString(errorResponse)
+ })
+ );
+ }
+ })
);
};
@@ -815,7 +824,16 @@ export class FlowEffects {
): Observable<VersionedFlowEntity[]> => {
return this.registryService.getFlows(registryId,
bucketId).pipe(
take(1),
- map((response) => response.versionedFlows)
+ map((response) => response.versionedFlows),
+ tap({
+ error: (errorResponse: HttpErrorResponse)
=> {
+ this.store.dispatch(
+ FlowActions.flowBannerError({
+ error:
this.errorHelper.getErrorString(errorResponse)
+ })
+ );
+ }
+ })
);
};
@@ -826,7 +844,16 @@ export class FlowEffects {
): Observable<VersionedFlowSnapshotMetadataEntity[]>
=> {
return
this.registryService.getFlowVersions(registryId, bucketId, flowId).pipe(
take(1),
- map((response) =>
response.versionedFlowSnapshotMetadataSet)
+ map((response) =>
response.versionedFlowSnapshotMetadataSet),
+ tap({
+ error: (errorResponse: HttpErrorResponse)
=> {
+ this.store.dispatch(
+ FlowActions.flowBannerError({
+ error:
this.errorHelper.getErrorString(errorResponse)
+ })
+ );
+ }
+ })
);
};
@@ -3096,7 +3123,16 @@ export class FlowEffects {
dialogReference.componentInstance.getBuckets =
(registryId: string): Observable<BucketEntity[]> => {
return
this.registryService.getBuckets(registryId).pipe(
take(1),
- map((response) => response.buckets)
+ map((response) => response.buckets),
+ tap({
+ error: (errorResponse: HttpErrorResponse) => {
+ this.store.dispatch(
+ FlowActions.flowBannerError({
+ error:
this.errorHelper.getErrorString(errorResponse)
+ })
+ );
+ }
+ })
);
};