Freedom9339 commented on code in PR #8965:
URL: https://github.com/apache/nifi/pull/8965#discussion_r1975694395
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/state/controller-services/controller-services.effects.ts:
##########
@@ -658,6 +659,86 @@ export class ControllerServicesEffects {
{ dispatch: false }
);
+ openMoveControllerServiceDialog$ = createEffect(
+ () =>
+ this.actions$.pipe(
+
ofType(ControllerServicesActions.openMoveControllerServiceDialog),
+ map((action) => action.request),
+ switchMap((request) =>
+
from(this.controllerServiceService.getMoveOptions(request.controllerService.id)).pipe(
+ map((response: SelectOption[]) => {
+ const moveDialogReference =
this.dialog.open(MoveControllerService, {
+ ...LARGE_DIALOG,
+ data: {
+ controllerService:
request.controllerService,
+ options: response
+ }
+ });
+
+
moveDialogReference.componentInstance.goToReferencingComponent = (
+ component:
ControllerServiceReferencingComponent
+ ) => {
+ const route: string[] =
this.getRouteForReference(component);
+ this.router.navigate(route);
+ };
+
+
moveDialogReference.afterClosed().subscribe((response) => {
+ if (response != 'ROUTED') {
+ this.store.dispatch(
+
ControllerServicesActions.loadControllerServices({
+ request: {
+ processGroupId:
request.controllerService.parentGroupId!
+ }
+ })
+ );
+ }
+ });
+ }),
+ catchError((errorResponse: HttpErrorResponse) => {
+ this.dialog.closeAll();
+ return of(
+ ErrorActions.snackBarError({ error:
this.errorHelper.getErrorString(errorResponse) })
+ );
Review Comment:
Changed this to tap and used store.dispatch. Error show up correctly now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]