[ 
https://issues.apache.org/jira/browse/NIFI-16496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18131095#comment-18131095
 ] 

ASF subversion and git services commented on NIFI-16496:
--------------------------------------------------------

Commit a05146aa003b13c8dce972acd5bfa9cf2f75149a in nifi's branch 
refs/heads/main from Matt Gilman
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=a05146aa003 ]

NIFI-16496: Show disabled Drain on the connector canvas with the reason it is 
unavailable (#11839)

Keep Drain visible when the user can operate the connector, replace it with 
Cancel Drain while a drain can be cancelled, and surface the server reason on 
hover. Reload the connector entity on every canvas flow load, including polling 
and Refresh, so that reason stays current.

This closes #11839

> Show disabled Drain on the connector canvas with the reason it is unavailable
> -----------------------------------------------------------------------------
>
>                 Key: NIFI-16496
>                 URL: https://issues.apache.org/jira/browse/NIFI-16496
>             Project: Apache NiFi
>          Issue Type: Task
>          Components: Core UI
>            Reporter: Matt Gilman
>            Assignee: Matt Gilman
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The connector canvas operate panel hides Drain unless DRAIN_FLOWFILES is 
> currently allowed. Operators cannot tell that Drain exists, or why it is 
> unavailable.
> On connector-info-control:
> * Show Drain when the user can operate the connector. Hide it when they 
> cannot.
> * Disable Drain when DRAIN_FLOWFILES is not allowed, and show 
> reasonNotAllowed in a tooltip (for example "Connector must be stopped" or "No 
> data is queued"). Use getConnectorActionDisabledReason.
> * When CANCEL_DRAIN_FLOWFILES is allowed, show Cancel Drain instead of Drain. 
> These actions are mutually exclusive: cancel is allowed only while the 
> connector is draining, and drain is allowed only when the connector is 
> stopped with data queued.
> * Decide which control is mounted from isConnectorActionAllowed, not from 
> canDrain() / canCancelDrain(). Those helpers are also false while the entity 
> is saving. Saving should disable the mounted button so the label does not 
> swap mid-request. While a request is in flight, reasonNotAllowed is empty 
> because the action is still allowed, so use a separate tooltip such as 
> "Request in progress".
> * Put the tooltip on a wrapper that still receives pointer events. A tooltip 
> on the disabled button itself does not show, because Angular Material sets 
> pointer-events: none on disabled buttons. Keep the button's real disabled 
> attribute.
> Surface the server reason as returned. In troubleshooting that reason is 
> "Connector must be stopped".
> Leave the canvas context menu and the connector listing row menu unchanged. 
> They can keep hiding Drain when it is not allowed.



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

Reply via email to