-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[RAM] Remove isSnoozeUntil and calculate on the fly for get/find #136148
Conversation
@elasticmachine merge upstream |
…snooze_possible_occ
Pinging @elastic/response-ops (Team:ResponseOps) |
return ( | ||
<FormattedMessage | ||
id="xpack.triggersActionsUI.sections.ruleDetails.ruleStateFilter.disabledOptionText" | ||
defaultMessage="Rule is disabled" |
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.
nitpick save id and defaultMessage in a variable, set the value depending on each case and return the component once to avoid repeating code
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.
I tried but I can NOT because https://github.com/elastic/kibana/issues/81862
LGTM! wasn't able to break it locally :P |
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.
LGTM!
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.
Let's take a look at the copy in another PR. I think it would also be good take another look at this filter and perhaps break it apart into two separate options.
return ( | ||
<FormattedMessage | ||
id="xpack.triggersActionsUI.sections.ruleDetails.ruleStateFilter.enabledOptionText" | ||
defaultMessage="Rule is enabled" |
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.
IMO this can be shortened:
defaultMessage="Rule is enabled" | |
defaultMessage="Enabled" |
return ( | ||
<FormattedMessage | ||
id="xpack.triggersActionsUI.sections.ruleDetails.ruleStateFilter.disabledOptionText" | ||
defaultMessage="Rule is disabled" |
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.
Ditto re shorter is better, though we'll need to revisit this term in the future:
defaultMessage="Rule is disabled" | |
defaultMessage="Disabled" |
return ( | ||
<FormattedMessage | ||
id="xpack.triggersActionsUI.sections.ruleDetails.ruleStateFilter.snoozedOptionText" | ||
defaultMessage="Rule has snoozed" |
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.
Though there seems to be complexity around whether the snooze is active or not, perhaps it's sufficient to just say there's a snooze schedule. If it's also supposed to cover snoozes that happened in the past (and are not recurring), perhaps "Snooze configured"?:
defaultMessage="Rule has snoozed" | |
defaultMessage="Snooze scheduled" |
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.
it is also possible to just have a relative snooze like I only want to snooze this rule for two hours.
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.
To me a relative snooze is still something you schedule, so IMO that text would work for both. We can pursue further options in a subsequent PR.
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
Saved Objects .kibana field count
History
To update your PR or re-run it, just comment with: |
Summary
Refactor to avoid multiple call on the rule's SO and avoid some OCC's issue in the task runner
FIX: #135846 & #123584