Matt Gilman created NIFI-16642:
----------------------------------

             Summary: Add Manage Remote Ports to the Connector canvas for 
Remote Process Groups
                 Key: NIFI-16642
                 URL: https://issues.apache.org/jira/browse/NIFI-16642
             Project: Apache NiFi
          Issue Type: Task
          Components: Core UI
            Reporter: Matt Gilman


The Connector canvas lets a user in Troubleshooting mode work with a Remote 
Process Group (RPG). The RPG context menu offers View Configuration and Refresh 
Remote. It has no equivalent of the Flow Designer's Manage Remote Ports, so a 
user cannot see the RPG's remote input and output ports or control them from 
the Connector canvas. Specifically, they cannot enable or disable transmission 
for each port, or change a port's settings such as concurrent tasks, 
compression, and batch options.

In the Flow Designer, Manage Remote Ports is opened from the RPG context menu. 
It has its own route, component, state, and service 
(pages/flow-designer/ui/manage-remote-ports, state/manage-remote-ports, and 
ManageRemotePortService).

This ticket adds the equivalent to the Connector canvas, available only in 
Troubleshooting mode.

Server support

The REST API already handles Connector-managed RPGs. Each of these endpoints 
finds the RPG through StandardRemoteProcessGroupDAO.locateRemoteProcessGroup, 
which searches Connector active flows:
- GET /remote-process-groups/\{id}
- PUT /remote-process-groups/\{id}/input-ports/\{port-id} and 
/output-ports/\{port-id}
- PUT /remote-process-groups/\{id}/input-ports/\{port-id}/run-status and 
/output-ports/\{port-id}/run-status

Outside Troubleshooting, all of them are rejected with 
ConnectorManagedAccessException (via verifyAccessibleForComponentOperation). No 
back-end change is expected, but this should be confirmed during implementation.

Scope

- Add a "Manage Remote Ports" entry to the RPG context menu on the Connector 
canvas. Show it only when the Connector is in Troubleshooting and the user can 
read the RPG, matching the Flow Designer condition.
- Add a Connector-scoped route and page, or a dialog, for listing remote ports, 
editing their settings, and toggling transmission. Reuse or share the Flow 
Designer's component, state, and service rather than copying them. The 
Connector page must not depend on Flow Designer state such as the flow slice.
- Build API URLs with the existing ConnectorEditService / safeApiPath pattern.
- Handle the Connector leaving Troubleshooting while the page is open: stop any 
polling or loading, and either leave the page or show it as read-only. The RPG 
refresh polling added in NIFI-16403 already handles this and can serve as the 
model.
- Reload the RPG and its connections after a port change.
- Add unit tests for the new state, effects, menu condition, and component.

Open questions

- Should the ports be viewable, read-only, outside Troubleshooting? Today GET 
/remote-process-groups/\{id} is also rejected outside Troubleshooting, so 
viewing would need a back-end change. The default for this ticket is 
Troubleshooting only.
- Should this reuse the Flow Designer module through a shared library, or live 
separately under pages/connectors?

Out of scope

- The RPG's own configuration (View Configuration already exists).
- Back-end troubleshooting enforcement changes.
- Changes to the Flow Designer's Manage Remote Ports.

Related

- NIFI-15880: Connector Troubleshooting mode
- NIFI-16403: Align, RPG refresh, and replay gating on the Connector canvas



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to