Line

You are reading the unreleased docs (next). See latest (v0.9)

ui/client/features/rules/hooks/usePreset

Cockpit client (features), next. Source: ui/client/features/rules/hooks/usePreset.ts.

Functions#

usePreset()#

usePreset(active, onSaved): PresetApi

Defined in: ui/client/features/rules/hooks/usePreset.ts:11

Switching to a named preset as a reviewable diff: preview the per-rule severity changes it would make, then confirm to save (or cancel). onSaved re-reads the rules list and project settings so severities and the active-preset label reflect the change immediately.

Parameters#

active

string

onSaved

() => void

Returns#

PresetApi