-
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
Exposed common EuiExpressions to separate components be able to reuse for building new for Alert Types #56466
Exposed common EuiExpressions to separate components be able to reuse for building new for Alert Types #56466
Conversation
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
…mon-alert-type-expressions # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
…mon-alert-type-expressions # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
…mon-alert-type-expressions # Conflicts: # x-pack/legacy/plugins/triggers_actions_ui/np_ready/public/application/components/builtin_alert_types/threshold/expression.tsx # x-pack/legacy/plugins/triggers_actions_ui/np_ready/public/application/sections/alert_add/alert_add.tsx
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.
Looking good 👍
Just a few typing issue, but overall LGTM.
...ers_actions_ui/np_ready/public/application/components/builtin_alert_types/threshold/index.ts
Outdated
Show resolved
Hide resolved
@@ -226,7 +230,7 @@ export const ThresholdVisualization: React.FunctionComponent<Props> = ({ alert } | |||
const dateFormatter = (d: number) => { | |||
return moment(d) | |||
.tz(timezone) | |||
.format(getTimeBuckets(alert.params).getScaledDateFormat()); | |||
.format(getTimeBuckets(alertParams).getScaledDateFormat()); | |||
}; |
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.
Is it possible to avoid any
and the as number[][][]
here?
For the any
: Looking at the underlying type, it looks like it uses number
explicitly, so we shouldn't need to cast this here. 🤔
For the number[][][]
: Looks the core issue is the any
in getThresholdAlertVisualizationData
, so can we perhaps validate the result of the API call in getThresholdAlertVisualizationData
and avoid the any
there too?
...cy/plugins/triggers_actions_ui/np_ready/public/application/sections/alert_add/alert_form.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/triggers_actions_ui/np_ready/public/common/constants/comparators.ts
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/triggers_actions_ui/np_ready/public/types.ts
Outdated
Show resolved
Hide resolved
…mon-alert-type-expressions # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
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! Just a few nits / comments.
...gins/triggers_actions_ui/np_ready/public/application/components/builtin_alert_types/types.ts
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/triggers_actions_ui/np_ready/public/common/constants/comparators.ts
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/triggers_actions_ui/np_ready/public/common/constants/group_by_types.ts
Outdated
Show resolved
Hide resolved
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
💔 Build FailedTest FailuresKibana Pipeline / x-pack-intake-agent / X-Pack Jest Tests.x-pack/plugins/spaces/server/lib/request_interceptors.onPostAuthInterceptor requests proxied to the legacy platform redirects to the space selector screen when accessing an app within a non-existent spaceStandard Out
Stack Trace
Kibana Pipeline / x-pack-intake-agent / X-Pack Jest Tests.x-pack/plugins/spaces/server/lib/request_interceptors.onPostAuthInterceptor requests proxied to the legacy platform when accessing the kibana app it always allows the request to continueStandard Out
Stack Trace
History
To update your PR or re-run it, just comment with: |
…mon-alert-type-expressions # Conflicts: # x-pack/legacy/plugins/triggers_actions_ui/np_ready/public/application/components/builtin_alert_types/threshold/constants/aggregation_types.ts # x-pack/legacy/plugins/triggers_actions_ui/np_ready/public/application/components/builtin_alert_types/threshold/constants/comparators.ts # x-pack/legacy/plugins/triggers_actions_ui/np_ready/public/application/components/builtin_alert_types/threshold/constants/index.ts # x-pack/legacy/plugins/triggers_actions_ui/np_ready/public/application/components/builtin_alert_types/threshold/types.ts # x-pack/legacy/plugins/triggers_actions_ui/np_ready/public/application/lib/get_time_options.test.ts # x-pack/legacy/plugins/triggers_actions_ui/np_ready/public/application/lib/get_time_options.ts # x-pack/legacy/plugins/triggers_actions_ui/np_ready/public/application/lib/get_time_unit_label.ts # x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/constants/aggregation_types.ts # x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/constants/comparators.ts # x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/constants/index.ts # x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/types.ts # x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/visualization.tsx # x-pack/plugins/triggers_actions_ui/public/application/lib/get_time_options.test.ts # x-pack/plugins/triggers_actions_ui/public/application/lib/get_time_options.ts # x-pack/plugins/triggers_actions_ui/public/application/lib/get_time_unit_label.ts # x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_connector_form.test.tsx # x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_type_menu.test.tsx # x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_add_modal.test.tsx # x-pack/plugins/triggers_actions_ui/public/common/constants/index.ts # x-pack/plugins/triggers_actions_ui/public/common/expression_items/index.ts # x-pack/plugins/triggers_actions_ui/public/common/index.ts # x-pack/plugins/triggers_actions_ui/public/common/lib/get_time_options.test.ts # x-pack/plugins/triggers_actions_ui/public/common/lib/get_time_options.ts # x-pack/plugins/triggers_actions_ui/public/common/lib/get_time_unit_label.ts # x-pack/plugins/triggers_actions_ui/public/common/types.ts
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
…b.com:jloleysens/kibana into console/feature/text-objects-in-saved-objects * 'console/feature/text-objects-in-saved-objects' of github.com:jloleysens/kibana: (103 commits) fix auto closing new vis modal when navigating to lens or when navigating away with browser history (elastic#56998) TS of esKuery\node_types (elastic#56857) Kibana app migration: Move static code dependencies into kibana_legacy plugin, part 1 (elastic#56408) Retry ES API calls that fail with 410/Gone (elastic#56950) [APM] Show missing permissions message to the user on the Services overview (elastic#56374) Fixing flaky CI tests for custom appRoutes (elastic#55763) [State Management][Docs] State syncing utils docs (elastic#56479) [Index management] Remove index mapper setting in tests (elastic#57066) Exposed common EuiExpressions to separate components be able to reuse for building new for Alert Types (elastic#56466) [SIEM] update url state between page if date is relative (elastic#56813) fix for chart_types test (elastic#57056) chore(NA): remove compress from dll minimizer (elastic#57023) [File upload] Migrate routing to NP & add route validation (elastic#52313) Adding docs for grouped nav advanced setting (elastic#57013) Use i18n titles for field formatters, human names for numeral locales (elastic#56348) [Maps] Remove EMS catalogue url from docs (elastic#57020) [Endpoint] ERT-82 ERT-83 ERT-84: Alert list API with pagination (elastic#56538) [DOCS] Adds Apple notarization info to install doc (elastic#57042) [ML] New Platform server shim: update results service routes to use new platform router (elastic#56886) Fix typo on detection engine rule (elastic#56993) ...
… for building new for Alert Types (elastic#56466) * Exposed common Expression to separate components be able to reuse * Expressions with unit tests * Fixed type check * Fixed merge issues * Fixed due to review * Cleaned up some not used params and added position popover definition * fixed type check * Unbinded alerting reusable components from application context * Added consumer and alertTypeId with enable change alert type button props * Fixed case for default alert type id was set * Fixed chart visualization issues * Exposed registry in triggers and actions ui * Fixed alert_list to enable charts * Fixed due to comments and simplified props
… reuse for building new for Alert Types (#56466) (#57224) * Exposed common EuiExpressions to separate components be able to reuse for building new for Alert Types (#56466) * Exposed common Expression to separate components be able to reuse * Expressions with unit tests * Fixed type check * Fixed merge issues * Fixed due to review * Cleaned up some not used params and added position popover definition * fixed type check * Unbinded alerting reusable components from application context * Added consumer and alertTypeId with enable change alert type button props * Fixed case for default alert type id was set * Fixed chart visualization issues * Exposed registry in triggers and actions ui * Fixed alert_list to enable charts * Fixed due to comments and simplified props * Fixed type check issue * type check error
Summary
#47758
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.