NIFI-15908: Disabling the Apply button in the Connector wizard when t…#11222
Open
mcgilman wants to merge 1 commit intoapache:mainfrom
Open
NIFI-15908: Disabling the Apply button in the Connector wizard when t…#11222mcgilman wants to merge 1 commit intoapache:mainfrom
mcgilman wants to merge 1 commit intoapache:mainfrom
Conversation
…here are no pending edits.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…here are no pending edits.
Summary
NIFI-15908
Disables the Connector wizard's Apply button when the backend reports there
is nothing to apply (e.g. no pending working-configuration changes, or a prior
apply still in progress) and surfaces the backend-supplied reason as a tooltip
on hover so the user can discover why the action is unavailable.
Background
The connector entity exposes an
availableActionsarray; theAPPLY_UPDATESaction carries
allowed: booleanandreasonNotAllowed: string. The frameworkalready populates these correctly:
"No pending changes"when the working configuration matches the activeconfiguration.
"Connector is updating"while a previous apply isPREPARING_FOR_UPDATEorUPDATING.Until now the wizard ignored the action and only gated Apply on local UI state
(loading / applying / verifying / verification-passed). This PR threads the
backend signal through the wizard store into the summary step, then surfaces
the reason as a tooltip on the disabled button.
Changes
Wizard state plumbing
with-connector-wizard.feature.ts— derivesapplyUpdatesAllowedandapplyUpdatesDisabledReasoncomputedsignals from the connector'sAPPLY_UPDATESaction via the existinggetConnectorAction()helper.connector-wizard.store.ts— adds the two new signals to the abstractConnectorWizardStorecontract.connector-wizard.component.html— passes the signals down to the summarystep as
[applyAllowed]/[applyDisabledReason]inputs.Summary step UI
connector-configuration-summary-step.component.ts— addsapplyAllowed(default
true, preserving existing callers) andapplyDisabledReasonsignal inputs; updates
applyDisabledandapplyTooltipcomputed signalsso the backend reason takes precedence over the verify-required hint.
connector-configuration-summary-step.component.html— binds[matTooltip]="applyTooltip()"plus a local[matTooltipShowDelay]="500".The tooltip lives directly on the
<button>rather than on a wrapping<span>, made possible by the SCSS rule below.connector-configuration-summary-step.component.scss— re-enablespointer-events: autoonbutton[disabled]inside this component so theMaterial tooltip directive receives the hover events the browser would
otherwise suppress on a native disabled button. Adds
cursor: not-allowedfor visual affordance.Test coverage
connector-configuration-summary-step.component.spec.ts— 5 new testscovering: disable state when
applyAllowed=falseoverridesverificationPassed=true; tooltip surfacing the backend reason verbatim;the verify-required hint still wins when no backend reason is present;
default values preserve existing-caller behavior.
connector-wizard.store.spec.ts— 5 new tests against theapplyUpdatesAllowed/applyUpdatesDisabledReasonselectors covering:no connector / missing action /
allowed=true/allowed=falsewithreason /
allowed=falsewithout reason (verifies the?? ''fallback).connector-wizard.component.spec.ts—createMockStorefactory updatedto expose the two new signals so the mock continues to fully implement
the abstract
ConnectorWizardStorecontract (prevents a future"is not a function" failure in tests that render the summary step).
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-15908NIFI-15908VerifiedstatusPull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
./mvnw clean install -P contrib-checknx test shared(725/725 passing) andnx lint shared(clean) fromnifi-frontend/src/main/frontendLicensing
LICENSE/NOTICEupdates requiredDocumentation