Skip to content

NIFI-15822: Adding support to view read only configuration of connect…#11168

Merged
rfellows merged 1 commit intoapache:mainfrom
mcgilman:NIFI-15822
Apr 24, 2026
Merged

NIFI-15822: Adding support to view read only configuration of connect…#11168
rfellows merged 1 commit intoapache:mainfrom
mcgilman:NIFI-15822

Conversation

@mcgilman
Copy link
Copy Markdown
Contributor

…ors in the connector canvas.

  • Moving all configuration dialogs into top level ui components.

Summary

NIFI-15822

Adds support for viewing the read-only configuration of components in the Connector canvas, and refactors the existing flow-designer configuration dialogs into a shared, reusable location.

Read-only configuration view (Connector canvas)

  • Adds a viewComponentConfiguration action and effect that opens the appropriate configuration dialog (EditProcessor, EditConnection, EditPort, EditLabel, EditProcessGroup, EditRemoteProcessGroup) in a strictly read-only mode for the Connector canvas. Permissions on the entity are forced to read-only-without-write before the dialog is opened.
  • Wires the new action into the canvas via component double-click and a "View Configuration" entry in the context menu, with a Funnel guard so unsupported types are no-ops.
  • Wires the dialogs in read-only mode by leaving edit-only callbacks unset (e.g. getConnectionSourceComponentId, calculateCollisionBends) and stubbing helper callbacks (createNewProperty, createNewService, convertToParameter, goToParameter, goToService) so users cannot trigger edit affordances. Each dialog component already guards against absent callbacks.

Dialog reorganization

  • Moves the configuration dialog components from pages/flow-designer/ui/canvas/items/ into a shared ui/common/component-dialogs/ location so they can be consumed by both the flow designer and the connector canvas:
    • edit-connection
    • edit-port
    • edit-label
    • edit-processor
    • edit-process-group
    • edit-remote-process-group
  • Decouples each promoted dialog from direct NgRx Store injections. Data flows in via @Input() observables (saving$, currentUser$, availablePrioritizers$, breadcrumbs$, propertyVerification*$, etc.) and user actions flow out via @Output() event emitters (editProcessor, editConnection, editPort, editLabel, editProcessGroup, editRemoteProcessGroup, openNewParameterContext, verify, plus the start/stop/enable/disable ComponentRequest outputs on the processor dialog).
  • Promotes dialog request and update types (EditComponentDialogRequest, EditConnectionDialogRequest, UpdateComponentRequest, UpdateProcessorRequest, UpdateConnectionRequest, StartComponentRequest, StopComponentRequest, EnableComponentRequest, DisableComponentRequest) and the ConvertToParameterResponse interface to state/shared so all dialog consumers depend on canonical types rather than feature-page services.
  • Removes the now-unused type re-exports from pages/flow-designer/state/flow/index.ts and pages/flow-designer/state/shared/index.ts and updates all consumers to import directly from the canonical state/shared location.

Utility extraction

  • Extracts five helpers from CanvasUtils to a standalone ui/common/utils/component-state.utils.ts so the promoted dialogs do not depend on the flow-designer CanvasUtils service:
    • runnableSupportsModification
    • remoteProcessGroupSupportsModification
    • getComponentTypeForSource
    • getComponentTypeForDestination
    • getConnectableTypeForDestination
  • The runnableSupportsModification and remoteProcessGroupSupportsModification helpers use optional chaining and nullish coalescing so they handle entities lacking nested status fields without throwing.
  • Converts getConnectionSourceComponentId (lookup) and calculateCollisionBends (positioning) into @Input callbacks on EditConnection so the dialog no longer reaches into CanvasUtils.

Test additions

  • New connector-canvas.effects.spec.ts coverage for viewComponentConfiguration$ exercising every supported component type, the read-only permission overrides, and the Funnel no-op guard.
  • New component-state.utils.spec.ts (25 cases) covering all five extracted helpers including the missing-status fallback.
  • New edit-process-group.component.spec.ts covering the parameter-context permission table and the visibility of the Create Parameter Context button under different currentUser.parameterContextPermissions.canWrite values.
  • New edit-remote-process-group.component.spec.ts covering the relocated dialog.
  • Updates to the existing flow-designer effect, controller-services, footer, graph-controls, and canvas specs to reflect the moved imports.

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-15822
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-15822
  • Pull request contains commits signed with a registered key indicating Verified status

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using ./mvnw clean install -P contrib-check
    • JDK 21
    • JDK 25

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

@mcgilman mcgilman added the ui Pull requests for work relating to the user interface label Apr 21, 2026
…ors in the connector canvas.

- Moving all configuration dialogs into top level ui components.
@rfellows
Copy link
Copy Markdown
Contributor

Reviewing...

Copy link
Copy Markdown
Contributor

@rfellows rfellows left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks @mcgilman 👍

@rfellows rfellows merged commit 2fa3286 into apache:main Apr 24, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui Pull requests for work relating to the user interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants