mcgilman commented on code in PR #8398:
URL: https://github.com/apache/nifi/pull/8398#discussion_r1488195104


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.effects.ts:
##########
@@ -1250,6 +1255,54 @@ export class FlowEffects {
         { dispatch: false }
     );
 
+    openEditRemoteProcessGroupDialog$ = createEffect(
+        () =>
+            this.actions$.pipe(
+                ofType(FlowActions.openEditRemoteProcessGroupDialog),
+                map((action) => action.request),
+                tap((request) => {
+                    const editDialogReference = 
this.dialog.open(EditRemoteProcessGroup, {
+                        data: request,
+                        panelClass: 'large-dialog'
+                    });
+
+                    editDialogReference.componentInstance.saving$ = 
this.store.select(selectSaving);
+
+                    
editDialogReference.componentInstance.editRemoteProcessGroup
+                        .pipe(takeUntil(editDialogReference.afterClosed()))
+                        .subscribe((payload: any) => {
+                            this.store.dispatch(
+                                FlowActions.updateComponent({
+                                    request: {
+                                        id: request.entity.id,
+                                        uri: request.uri,
+                                        type: request.type,
+                                        payload
+                                    }
+                                })
+                            );
+                        });
+
+                    editDialogReference.afterClosed().subscribe(() => {
+                        this.store.dispatch(FlowActions.clearFlowApiError());
+                        this.store.dispatch(
+                            FlowActions.selectComponents({
+                                request: {
+                                    components: [
+                                        {
+                                            id: request.entity.id,
+                                            componentType: request.type
+                                        }
+                                    ]
+                                }
+                            })
+                        );

Review Comment:
   We should conditionally dispatch this action like we do in other `EditXyz` 
dialogs if the user isn't routed elsewhere. We have an interceptor that may 
forward to an error page. If that happens we have a fallback to ensure that all 
dialogs are closed and the close payload will be `ROUTED`. If this were to 
occur we wouldn't want `selectComponents` to be dispatched.



##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/remote-process-group/edit-remote-process-group/edit-remote-process-group.component.html:
##########
@@ -0,0 +1,123 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<h2 mat-dialog-title>Edit Remote Process Group</h2>
+<form class="edit-remote-process-group-form" 
[formGroup]="editRemoteProcessGroupForm">
+    <error-banner></error-banner>
+    <mat-dialog-content>
+        <div class="flex flex-col mb-6">
+            <div>Name</div>
+            <div class="value">{{ request.entity.component.name }}</div>
+        </div>
+        <div class="flex flex-col mb-6">
+            <div>Id</div>
+            <div class="value">{{ request.entity.component.id }}</div>
+        </div>
+        <div class="tab-content py-4 flex gap-x-4">
+            <div class="w-full">
+                <mat-form-field>
+                    <mat-label>URLs</mat-label>
+                    <input matInput formControlName="urls" type="text" 
placeholder="https://remotehost:8443/nifi"; />
+                </mat-form-field>
+            </div>
+        </div>
+        <div class="flex gap-x-4">
+            <div class="w-full">
+                <mat-form-field>
+                    <mat-label>Transport Protocol</mat-label>
+                    <mat-select formControlName="transportProtocol">
+                        <mat-option
+                            value="RAW"
+                            nifiTooltip
+                            [tooltipComponentType]="TextTip"
+                            [tooltipInputData]="getOptionTipData('RAW')"
+                            [delayClose]="false">
+                            RAW
+                        </mat-option>
+                        <mat-option
+                            value="HTTP"
+                            nifiTooltip
+                            [tooltipComponentType]="TextTip"
+                            [tooltipInputData]="getOptionTipData('HTTP')"
+                            [delayClose]="false">
+                            HTTP
+                        </mat-option>

Review Comment:
   Thus far we've only used a tooltip on `mat-option` when they have additional 
description beyond the option text.



-- 
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]

Reply via email to