Skip to content

Host activity webhooks: Hosts page gear menu and Activity automations modal #50219

Description

@nulmete

Related user story

#40493

Task

On the Hosts page, group the existing "Custom host vitals" and "Enroll secrets" header buttons into a gear-icon dropdown with a third option, "Activity automations", which opens a modal to enable/disable a per-fleet webhook and set its destination URL. Disabled on "All fleets" and on Fleet Free (with tooltips).

Condition of satisfaction

Gear menu:

  • Global admin on a selected fleet sees all three items; "Activity automations" opens the modal.
  • "All fleets" selected → "Activity automations" disabled with tooltip; other items unaffected.
  • Fleet Free → "Activity automations" disabled with Premium tooltip; Enroll secrets / Custom host vitals behavior identical to today for every role (admin, maintainer, technician, observer; global and fleet-scoped).
  • Users with no visible items see no gear button.
  • Keyboard and screen-reader accessible (menu focus management per ActionsDropdown).

Modal:

  • Shows stored settings on open (enabled + URL) for the selected fleet, including "No fleet".
  • Enabling with invalid/empty URL blocks submit with the same inline error style as the global modal; disabling clears the error.
  • Save PATCHes only webhook_settings.host_activities_webhook, shows success toast, closes; server 4xx shows error toast.
  • Example payload renders a host activity with details.host_id and no activity_id envelope field.
  • GitOps mode: inputs disabled with the standard GitOps messaging.
  • yarn test passes with new component tests (render states: free, all-fleets, gitops, error, success).

Metadata

Metadata

Assignees

Labels

#g-orchestrationOrchestration product group~frontendFrontend-related issue.~sub-taskA technical sub-task that is part of a story. (Not QA'd. Not estimated.)

Type

Projects

Status
✔️Awaiting QA

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions