mcgilman opened a new pull request, #11168: URL: https://github.com/apache/nifi/pull/11168
…ors in the connector canvas. - Moving all configuration dialogs into top level ui components. # Summary [NIFI-15822](https://issues.apache.org/jira/browse/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 - [x] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI-15822) issue created ### Pull Request Tracking - [x] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-15822` - [x] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-15822` - [x] Pull request contains [commits signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) with a registered key indicating `Verified` status ### Pull Request Formatting - [x] Pull Request based on current revision of the `main` branch - [x] 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 - [x] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html) - [x] New dependencies are documented in applicable `LICENSE` and `NOTICE` files ### Documentation - [x] Documentation formatting appears as expected in rendered files -- 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]
