[
https://issues.apache.org/jira/browse/NIFI-16496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matt Gilman updated NIFI-16496:
-------------------------------
Status: Patch Available (was: In Progress)
> 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: 10m
> 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)