-
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
[Actionable Observability] o11y rules page #127406
Conversation
…onent,delete, pagination, sorting
@mgiota do you have a follow-up issue for adding search capabilities to the rules view? I wasn't able to find it. |
@katrin-freihofner Good point. I created a new issue to track this #127579 |
@elasticmachine merge upstream |
expected head sha didn’t match current head ref. |
@elasticmachine merge upstream |
@XavierM I just pushed the Screen.Recording.2022-03-14.at.14.49.33.movDo you have an estimate when we can get this PR reviewed? The sooner we get it reviewed and merged the better, because it's gonna get longer and longer. I have quite a few subtickets I need to work on once this is merged. |
useEffect(() => { | ||
fetchRules(); | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, [JSON.stringify(ruleLastResponseFilter), page, sort]); |
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.
that's kind of dangerous, if JSON.stringify
throw an error
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.
@mgiota, How about moving JSON.stringify(ruleLastResponseFilter)
inside the try/catch block where loadRules function is called?
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.
x-pack/plugins/observability/public/pages/rules/components/edit_rule_flyout.tsx
Show resolved
Hide resolved
x-pack/plugins/observability/public/pages/rules/components/last_response_filter.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/observability/public/pages/rules/components/last_response_filter.tsx
Show resolved
Hide resolved
x-pack/plugins/observability/public/pages/rules/components/last_response_filter.tsx
Show resolved
Hide resolved
x-pack/plugins/observability/public/pages/rules/components/name.tsx
Outdated
Show resolved
Hide resolved
@@ -47,7 +50,12 @@ export { Plugin }; | |||
export * from './plugin'; | |||
// TODO remove this import when we expose the Rules tables as a component | |||
export { loadRules } from './application/lib/rule_api/rules'; | |||
export { deleteRules } from './application/lib/rule_api/delete'; |
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 want to check something about this import to avoid our bundle getting bigger
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.
@XavierM Do you have any other suggestion how I could do it differently? I thought creating similar functions under observability that call directly the rules api, but I wanted to avoid duplication as much as possible. In 8.3 plan is to get rid of these imports anyway, right? Let me know what you think and if this is a blocker
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 not a blocker, it is more a mental note for me
@elasticmachine merge upstream |
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.
Great work @mgiota!!
LGTM, with some minor and none-blocking things.
useEffect(() => { | ||
fetchRules(); | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, [JSON.stringify(ruleLastResponseFilter), page, sort]); |
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.
@mgiota, How about moving JSON.stringify(ruleLastResponseFilter)
inside the try/catch block where loadRules function is called?
x-pack/plugins/observability/public/pages/rules/components/delete_modal_confirmation.tsx
Show resolved
Hide resolved
x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_form.tsx
Show resolved
Hide resolved
x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_form.tsx
Show resolved
Hide resolved
x-pack/plugins/observability/public/pages/rules/components/status_context.tsx
Show resolved
Hide resolved
@mgiota The auto refresh is broken, from UI and functionality perspective. |
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 go!!! Nice work!
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
async chunk count
ESLint disabled in files
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @mgiota |
* style rules table, refactor useFetchRules hook, edit_rule_flyout component,delete, pagination, sorting * remove unused import * fix translations * change name column to rule and statusFilter to lastResponse filter * remove unused code * embed create rule flyout & create loadRuleTypesHook that accepts a filteredSolutions param * fix failing tests * fix last failing test * Show rule type name in the Rule column * PR review comments * useMemo for panelItems on status_context * close status context popover when clicking outside of the context menu * refactor useFetchRules to get rid of react-hooks/exhaustive-deps warning * remove console log statement * useCallback for EuiBasicTable onChange * cleanup async fetchRuleTypes Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Friendly reminder: Looks like this PR hasn’t been backported yet. |
5 similar comments
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Fixes #126774
Fixes #126775
Fixes #123581
Fixes #127014
Fixes #127011
Fixes #127433
In order to get the new Rule page you should enable following feature flag
xpack.observability.unsafe.rules.enabled: true
Acceptance criteria
Rule
,Last run
,Last response
,Status
andActions
columns Style EuiBasicTable according to design #126774Rule
column shows the rule name and currently the rule type id (another ticket will show the rule type name)Last run
column reads theexecutionStatus.lastExecutionDate
fieldLast response
column reads theexecutionStatus.status
field. Possible values are:Active
Error
OK
Pending
Unknown
Status
column can beEnabled
,Disabled
andMuted
. (Muted will be added in another ticket)Actions
column should have actions forEdit
andDelete
Screen.Recording.2022-03-09.at.20.57.06.mov
Notes for the reviewer
rulesTable
,useFetchRules
hook and rest sub-components for the table columns inside theobservability
plugin and not the triggers_actions_ui pluginFollow up issues