diff --git a/x-pack/plugins/alerting/server/rules_client/lib/validate_actions.test.ts b/x-pack/plugins/alerting/server/rules_client/lib/validate_actions.test.ts index 229c009df3eec..04236b9ecc1cc 100644 --- a/x-pack/plugins/alerting/server/rules_client/lib/validate_actions.test.ts +++ b/x-pack/plugins/alerting/server/rules_client/lib/validate_actions.test.ts @@ -164,7 +164,7 @@ describe('validateActions', () => { false ) ).rejects.toThrowErrorMatchingInlineSnapshot( - '"Failed to validate actions due to the following error: Action throttle cannot be shorter than the schedule interval of 1m: default (1s)"' + '"Failed to validate actions due to the following error: Action frequency cannot be shorter than the schedule interval of 1m: default (1s)"' ); }); diff --git a/x-pack/plugins/alerting/server/rules_client/lib/validate_actions.ts b/x-pack/plugins/alerting/server/rules_client/lib/validate_actions.ts index b86e30556f090..54a0f42dd6924 100644 --- a/x-pack/plugins/alerting/server/rules_client/lib/validate_actions.ts +++ b/x-pack/plugins/alerting/server/rules_client/lib/validate_actions.ts @@ -175,7 +175,7 @@ export async function validateActions( errors.push( i18n.translate('xpack.alerting.rulesClient.validateActions.actionsWithInvalidThrottles', { defaultMessage: - 'Action throttle cannot be shorter than the schedule interval of {scheduleIntervalText}: {groups}', + 'Action frequency cannot be shorter than the schedule interval of {scheduleIntervalText}: {groups}', values: { scheduleIntervalText: data.schedule.interval, groups: actionsWithInvalidThrottles diff --git a/x-pack/plugins/alerting/server/rules_client/tests/create.test.ts b/x-pack/plugins/alerting/server/rules_client/tests/create.test.ts index aedf130e1f846..7e21881410e74 100644 --- a/x-pack/plugins/alerting/server/rules_client/tests/create.test.ts +++ b/x-pack/plugins/alerting/server/rules_client/tests/create.test.ts @@ -3045,7 +3045,7 @@ describe('create()', () => { ], }); await expect(rulesClient.create({ data })).rejects.toThrowErrorMatchingInlineSnapshot( - `"Failed to validate actions due to the following error: Action throttle cannot be shorter than the schedule interval of 3h: default (1h), group2 (3m)"` + `"Failed to validate actions due to the following error: Action frequency cannot be shorter than the schedule interval of 3h: default (1h), group2 (3m)"` ); expect(unsecuredSavedObjectsClient.create).not.toHaveBeenCalled(); expect(taskManager.schedule).not.toHaveBeenCalled(); @@ -3122,7 +3122,7 @@ describe('create()', () => { await expect(rulesClient.create({ data })).rejects.toThrowErrorMatchingInlineSnapshot(` "Failed to validate actions due to the following 2 errors: - Actions missing frequency parameters: group3 - - Action throttle cannot be shorter than the schedule interval of 3h: default (1h), group2 (3m)" + - Action frequency cannot be shorter than the schedule interval of 3h: default (1h), group2 (3m)" `); expect(unsecuredSavedObjectsClient.create).not.toHaveBeenCalled(); expect(taskManager.schedule).not.toHaveBeenCalled(); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_alerts_filter_query.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_alerts_filter_query.tsx index 3cd22cc70a429..682bdbb52d81d 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_alerts_filter_query.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_alerts_filter_query.tsx @@ -61,7 +61,7 @@ export const ActionAlertsFilterQuery: React.FC = ( label={i18n.translate( 'xpack.triggersActionsUI.sections.actionTypeForm.ActionAlertsFilterQueryToggleLabel', { - defaultMessage: 'Send alert notification only if alert fields match a query', + defaultMessage: 'if alert matches a query', } )} checked={queryEnabled} diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_alerts_filter_timeframe.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_alerts_filter_timeframe.tsx index 05fcd8fba77a7..fa58e8d0c3f25 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_alerts_filter_timeframe.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_alerts_filter_timeframe.tsx @@ -49,7 +49,7 @@ const useDefaultTimezone = () => { const useTimeframe = (initialTimeframe?: AlertsFilterTimeframe) => { const timezone = useDefaultTimezone(); const DEFAULT_TIMEFRAME = { - days: [], + days: ISO_WEEKDAYS, timezone, hours: { start: '00:00', @@ -114,7 +114,9 @@ export const ActionAlertsFilterTimeframe: React.FC d !== day) : [...timeframe.days, day]; - updateTimeframe({ days: newDays }); + if (newDays.length !== 0) { + updateTimeframe({ days: newDays }); + } }, [timeframe, updateTimeframe] ); @@ -144,7 +146,7 @@ export const ActionAlertsFilterTimeframe: React.FC {