mirror of
https://github.com/fleetdm/fleet
synced 2026-05-21 07:58:31 +00:00
UI - add missing null handling on team settings (#17548)
This commit is contained in:
parent
14be6a0fc8
commit
eaf8f41dd0
2 changed files with 4 additions and 2 deletions
|
|
@ -214,6 +214,7 @@ export interface IConfig {
|
|||
|
||||
export interface IWebhookSettings {
|
||||
failing_policies_webhook: IWebhookFailingPolicies;
|
||||
// TODO - this can be null
|
||||
host_status_webhook: IWebhookHostStatus;
|
||||
vulnerabilities_webhook: IWebhookSoftwareVulnerabilities;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,7 +190,8 @@ const TeamSettings = ({ location, router }: ITeamSubnavProps) => {
|
|||
setPercentageHostsDropdownOptions(
|
||||
getCustomDropdownOptions(
|
||||
HOST_STATUS_WEBHOOK_HOST_PERCENTAGE_DROPDOWN_OPTIONS,
|
||||
teamConfig?.webhook_settings.host_status_webhook.host_percentage ?? 1,
|
||||
teamConfig?.webhook_settings?.host_status_webhook?.host_percentage ??
|
||||
1,
|
||||
(val) => `${val}%`
|
||||
)
|
||||
);
|
||||
|
|
@ -198,7 +199,7 @@ const TeamSettings = ({ location, router }: ITeamSubnavProps) => {
|
|||
setWindowDropdownOptions(
|
||||
getCustomDropdownOptions(
|
||||
HOST_STATUS_WEBHOOK_WINDOW_DROPDOWN_OPTIONS,
|
||||
teamConfig?.webhook_settings.host_status_webhook.days_count ?? 1,
|
||||
teamConfig?.webhook_settings?.host_status_webhook?.days_count ?? 1,
|
||||
(val) => `${val} day${val !== 1 ? "s" : ""}`
|
||||
)
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue