-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[RAM] Add data model for scheduled and recurring snoozes #131019
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 55 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
a98faba
[RAM] Add data model for scheduled and recurring snoozes
Zacqary fdbe1b5
Merge remote-tracking branch 'upstream/main' into 130724-snooze-sched…
Zacqary bc20443
Update migration tests
Zacqary de7a37f
Make snoozeIndefinitely required
Zacqary 7fec109
Fix remaining muteAlls
Zacqary ab4f21b
Replace snoozeEndTime with snoozeSchedule
Zacqary 27c5702
Merge remote-tracking branch 'upstream/main' into 130724-snooze-sched…
Zacqary 29173d8
Fix typecheck
Zacqary 0822788
Merge branch 'main' into 130724-snooze-sched-datamodel
Zacqary 274c0c0
Fix typecheck
Zacqary cabd5c3
Merge branch '130724-snooze-sched-datamodel' of https://github.com/Za…
Zacqary 7c918a5
Revert muteAll => snoozeIndefinitely rename
Zacqary 5b57cb8
Revert more snoozeIndefinitely refs
Zacqary 5df3868
Revert README
Zacqary 7f8acf1
Merge remote-tracking branch 'upstream/main' into 130724-snooze-sched…
Zacqary d128eac
Restore updated taskrunner test
Zacqary 59c5a1b
Fix RuleStatusDropdown test
Zacqary 03d2d29
Add timeZone to SO
Zacqary 32344fe
Merge remote-tracking branch 'upstream/main' into 130724-snooze-sched…
Zacqary e3c28e8
Update timezone usage
Zacqary b93d460
Implement RRule
Zacqary f9dfc6e
Merge remote-tracking branch 'upstream/main' into 130724-snooze-sched…
Zacqary 370fd45
Fix task runner test
Zacqary 6dda9a2
Add rrule types
Zacqary 128950f
Push snoozeEndTime from server and fix unsnooze
Zacqary 8f3546f
Fix Jest Tests 5
Zacqary 8b69fad
Fix rulestatusdropdown test
Zacqary 01ae2b2
Fix jest tests 1
Zacqary 3af6c23
Fix snooze_end_time refs in functional tests
Zacqary c526de9
Fix snooze API integration tests
Zacqary 6527c36
Move isRuleSnoozed to server
Zacqary 0f9826b
Merge remote-tracking branch 'upstream/main' into 130724-snooze-sched…
Zacqary 7eec7af
Update x-pack/plugins/alerting/server/lib/is_rule_snoozed.ts
Zacqary 41414cb
Require timeZone in rulesnooze
Zacqary fda4b4b
Merge remote-tracking branch 'upstream/main' into 130724-snooze-sched…
Zacqary d2542a5
Merge remote-tracking branch 'upstream/main' into 130724-snooze-sched…
Zacqary fadb744
Merge remote-tracking branch 'upstream/main' into 130724-snooze-sched…
Zacqary 0603855
Add automatic isSnoozedUntil savedobject flag
Zacqary fc99605
Check isSnoozedUntil against now
Zacqary 857c36f
Fix jest
Zacqary 4e1cc32
Merge remote-tracking branch 'upstream/main' into 130724-snooze-sched…
Zacqary 52f281f
Fix typecheck
Zacqary 92511d2
Merge remote-tracking branch 'upstream/main' into 130724-snooze-sched…
Zacqary 2434080
Fix jest
Zacqary 70a2aa7
Fix snoozedUntil date parsing
Zacqary 3646458
Fix rewriterule
Zacqary 2c53cb7
Add error handling for RRule
Zacqary ed75133
Fix re-snoozing
Zacqary 20c37dc
Merge remote-tracking branch 'upstream/main' into 130724-snooze-sched…
Zacqary 083782c
Add comments to rulesnoozetype
Zacqary f11125d
Restructure data model to use rRule for everything
Zacqary 409c606
Fix functional tests
Zacqary eb1f391
Fix jest
Zacqary ffeb94d
Fix functional tests
Zacqary f8fe600
Fix functional tests
Zacqary 22e839e
Fix functional tests
Zacqary 25f8f7d
Clarify isRuleSnoozed
Zacqary 3edaa0c
Merge remote-tracking branch 'upstream/main' into 130724-snooze-sched…
Zacqary 02baeea
Use rrule to parse byweekday
Zacqary 07bb7e9
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| import type { WeekdayStr } from 'rrule'; | ||
|
|
||
| export type RuleSnooze = Array<{ | ||
|
pmuellr marked this conversation as resolved.
|
||
| duration: number; | ||
| rRule: Partial<RRuleRecord> & Pick<RRuleRecord, 'dtstart' | 'tzid'>; | ||
| // For scheduled/recurring snoozes, `id` uniquely identifies them so that they can be displayed, modified, and deleted individually | ||
| id?: string; | ||
| }>; | ||
|
|
||
| // An iCal RRULE to define a recurrence schedule, see https://github.com/jakubroztocil/rrule for the spec | ||
| export interface RRuleRecord { | ||
| dtstart: string; | ||
| tzid: string; | ||
| freq?: 0 | 1 | 2 | 3 | 4 | 5 | 6; | ||
| until?: string; | ||
| count?: number; | ||
| interval?: number; | ||
| wkst?: WeekdayStr; | ||
| byweekday?: Array<string | number>; | ||
| bymonth?: number[]; | ||
| bysetpos?: number[]; | ||
| bymonthday: number; | ||
| byyearday: number[]; | ||
| byweekno: number[]; | ||
| byhour: number[]; | ||
| byminute: number[]; | ||
| bysecond: number[]; | ||
| } | ||
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a peer dependency of
rrule