mcgilman opened a new pull request, #11997:
URL: https://github.com/apache/nifi/pull/11997

   …shooting mode
   
   Configuration
   - Offer Configure on the connector canvas context menu while the Connector 
is troubleshooting and the user can write the component; otherwise keep View 
Configuration, which opens the read-only dialog
   - Gate Configure on the component's run state: processors and ports must not 
be running, Remote Process Groups must not be transmitting, and connections 
must not have a running source or destination in the current group, read from 
the live canvas processor or port entity as in the Flow Designer
   - Offer Configure / View Configuration for the current Process Group from 
the canvas background menu, reloading the group after an edit
   - Show Label configuration only when the Label is configurable and remove 
the read-only Label dialog
   - Open editable Processor, Port, Remote Process Group, Connection, Process 
Group, and Label dialogs, replacing the saved component in place and reloading 
a processor's connections after a successful update
   - Close configuration dialogs when the Connector leaves troubleshooting
   - Ignore a repeated Configure request for a processor whose dialog is open
   
   Errors
   - Show a failed update in the submitting dialog's banner while that dialog 
is open, otherwise on the connector canvas banner, including connection edits
   - Report Go To Service failures and confirm before leaving a dialog with 
unsaved changes
   
   Parameters
   - Leave Go To Parameter and Convert To Parameter unset on connector canvas 
dialogs, since parameters belong to the Connector
   - Add supportsParameters to EditProcessor and EditProcessGroup, hiding the 
parameter context section and omitting its payload fields when false
   - Make convertToParameter optional on PropertyTable, EditProcessor, and 
EditControllerService, hiding Convert To Parameter when it is not provided
   
   Deletion
   - Gate connection deletion on the live run state of its endpoints using the 
same check as configuration
   
   Shared
   - Add isConnectorInTroubleshooting to the connector permission utilities
   
   <!-- 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. -->
   
   # Summary
   
   [NIFI-16654](https://issues.apache.org/jira/browse/NIFI-16654)
   
   While a Connector is in troubleshooting, the connector canvas could only show
   read-only configuration dialogs. This change lets users with write permission
   configure components directly from the connector canvas, using the same
   run-state rules as the Flow Designer.
   
   ### Configuration
   - The component context menu shows **Configure** when the Connector is
     troubleshooting, the user can write the component, and the component can be
     modified. Otherwise it shows **View Configuration**, which opens the 
read-only
     dialog.
   - Whether a component can be modified depends on its run state:
     - Processors and Ports must not be running.
     - Remote Process Groups must not be transmitting.
     - Connections must not have a running source or destination in the current
       group. The check reads the live Processor or Port entity from the canvas,
       as the Flow Designer does, and falls back to the connection's endpoint
       snapshot when the endpoint is not loaded. Endpoints in other groups,
       remote ports, and Funnels never block configuration.
   - The canvas background menu offers Configure / View Configuration for the
     Process Group currently displayed. The group is reloaded after an edit.
   - Labels show the configuration item only when they are configurable. The
     read-only Label dialog is removed because it showed nothing beyond what the
     canvas renders.
   - Editable dialogs are supported for Processors, Ports, Remote Process 
Groups,
     Connections, Process Groups, and Labels. A successful save closes the 
dialog
     and replaces the component in place without reloading the flow. Saving a
     Processor also reloads its connections.
   - Configuration dialogs close when the Connector leaves troubleshooting.
   - A repeated Configure request for a Processor whose dialog is already open 
is
     ignored.
   
   ### Errors
   - A failed update appears in the submitting dialog's banner while that dialog
     is open. Once it has closed, the error appears on the connector canvas
     banner, so it cannot surface later in an unrelated dialog. This applies to
     connection edits as well.
   - Go To Service reports failures and asks for confirmation before leaving a
     dialog that has unsaved changes.
   
   ### Parameters
   - Parameters belong to the Connector, so connector canvas dialogs leave Go To
     Parameter and Convert To Parameter unset. Parameter references still 
render.
   - `EditProcessor` and `EditProcessGroup` accept `supportsParameters`. When it
     is false, the parameter context section is hidden and its fields are left
     out of the update payload.
   - `convertToParameter` is optional on `PropertyTable`, `EditProcessor`, and
     `EditControllerService`. Convert To Parameter is hidden when it is not
     provided.
   
   ### Deletion
   - Connection deletion uses the same live endpoint run-state check as
     configuration, so a connection whose source or destination is running on
     the canvas cannot be deleted.
   
   ### Shared
   - Adds `isConnectorInTroubleshooting` to the connector permission utilities.
   
   ### Testing
   - Added and updated unit tests for the configurability and deletion helpers,
     the context menu, the configuration effects (editable and read-only 
openers,
     error routing, closing on troubleshooting exit, duplicate dialog guard,
     Go To Service), the reducer, and the `EditProcessor`, `EditProcessGroup`,
     and `PropertyTable` components.
   - `npx tsc -p apps/nifi/tsconfig.app.json --noEmit`
   - `npx vitest run --config vitest.config.mts src/app/ui/common 
src/app/pages/connectors src/app/pages/flow-designer`
   - ESLint and Prettier on the changed files.
   - Manually verified on a Connector in troubleshooting: Configure and View
     Configuration for each component type, running endpoint gating, inline and
     canvas error banners, and dialogs closing when troubleshooting ends.
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue 
created
   
   ### Pull Request Tracking
   
   - Pull Request title starts with Apache NiFi Jira issue number, such as 
`NIFI-00000`
   - Pull Request commit message starts with Apache NiFi Jira issue number, as 
such `NIFI-00000`
   - 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
   
   - 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](https://apache.org/licenses/LICENSE-2.0) according to the [License 
Policy](https://www.apache.org/legal/resolved.html)
   - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` 
files
   
   ### Documentation
   
   - [ ] 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]

Reply via email to