Matt Gilman created NIFI-16401:
----------------------------------
Summary: Add connector canvas component operations and processor
advanced UI access
Key: NIFI-16401
URL: https://issues.apache.org/jira/browse/NIFI-16401
Project: Apache NiFi
Issue Type: Task
Components: Core UI
Reporter: Matt Gilman
h2. Background
Troubleshooting mode requires controlled component operations on the
connector's managed process group. The connector canvas currently lacks the
command layer, operation panel, and processor advanced UI navigation needed to
diagnose and correct component-level problems.
These operations must respect connector state, component state, permissions,
selection, and revision handling.
h2. Goals
* Add troubleshooting-only component run-status operations.
* Provide a reusable operation panel for single, multi, and empty selections.
* Centralize connector canvas command dispatch.
* Keep returned component entities synchronized with connector canvas state.
* Allow access to processor advanced UI when supported.
* Preserve permission and connector-state boundaries.
h2. Scope
h3. Component Commands
Support the following operations:
* Start selected components.
* Stop selected components.
* Enable selected components.
* Disable selected components.
* Run a single processor once.
* Terminate threads for a single processor.
* Start, stop, enable, or disable the current process group when no components
are selected.
Introduce a connector canvas command service that converts selected canvas
targets into typed requests and dispatches the corresponding state actions.
h3. Operation Eligibility
Determine operation availability from:
* Connector troubleshooting state.
* Component type.
* Component run state.
* Component permissions.
* Operate permissions.
* Current selection count.
* Current process-group permissions.
* Whether a component is already being updated.
Use shared pure utilities so context menus and the operation panel apply
identical eligibility rules.
h3. Operation Panel
Add a reusable operation control that:
* Reflects the current canvas selection.
* Shows only operations valid for the complete selection.
* Supports current-process-group operations for an empty selection.
* Distinguishes single-component-only operations.
* Displays saving or disabled treatment while requests are active.
* Emits user intent without directly owning page-specific state.
h3. State and Effects
* Add typed actions and effects for run-status operations.
* Preserve each component's current revision in requests.
* Update connector canvas collections with returned entities.
* Apply revision-aware updates so stale responses do not replace newer state.
* Mark affected components as saving while requests are active.
* Clear saving state on success and failure.
* Surface errors through the connector error context.
* Reload or reconcile state when an operation cannot be safely applied locally.
h3. Context Menu Integration
* Add troubleshooting-only component operations to the connector canvas context
menu.
* Use the same eligibility utilities as the operation panel.
* Keep read-only actions available outside troubleshooting where appropriate.
* Do not expose mutation commands outside troubleshooting mode.
h3. Processor Advanced UI
* Add a context-menu action for processors that advertise advanced UI support.
* Load the required extension-type metadata when the connector canvas
initializes.
* Add a processor advanced UI route under the connector canvas.
* Protect the route with the troubleshooting-state guard.
* Resolve the connector, process-group, and processor parameters required by
the advanced UI.
* Return users to the connector canvas after closing or when activation is
denied.
* Surface resolver and loading failures through existing error handling.
h3. Tests
Add coverage for:
* Operation eligibility by component type, state, and permissions.
* Single, multi, and empty selections.
* Current-process-group operations.
* Run-once and terminate-thread restrictions.
* Typed request construction and revision handling.
* Saving-state lifecycle.
* Success, failure, and stale-response handling.
* Context-menu and operation-panel consistency.
* Advanced UI action visibility.
* Advanced UI parameter resolution.
* Route protection and back navigation.
* Missing extension metadata and unsupported processors.
h2. Out of Scope
* Connector-scoped Controller Service mutation operations.
* Remote Process Group refresh.
* Alignment commands.
* Provenance replay.
* General component configuration editing.
* Changes to backend component operation semantics.
* Operations on the legacy flow-designer canvas.
h2. Acceptance Criteria
* Mutation commands are available only while the connector is in
TROUBLESHOOTING.
* Start, stop, enable, and disable work for valid single and multi-selections.
* Empty-selection operations target the current process group.
* Run once and terminate threads are restricted to one eligible processor.
* Context menus and the operation panel calculate identical operation
availability.
* Requests contain the correct component identifiers, types, and revisions.
* Successful responses update the correct typed entity collections.
* Stale responses do not overwrite newer entity revisions.
* Saving state is applied and cleared for all affected components.
* Failures surface through existing connector error handling.
* Supported processors can open their advanced UI from the connector canvas.
* Unsupported processors do not expose the advanced UI action.
* Advanced UI routes require active troubleshooting mode.
* Frontend lint, strict type-check, unit tests, and production build pass.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)