-
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
Initial alerting UI and actions list #47843
Conversation
Pinging @elastic/kibana-stack-services (Team:Stack Services) |
…kers in the UI the action type column (from id to name)
…rieved from server action types list
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.
Some minor things. I will be pulling this down and testing it for a11y and UX soon.
*/ | ||
|
||
export const BASE_PATH = '/management/kibana/alerting'; | ||
export const BASE_ACTION_API_PATH = '../api/action'; |
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.
We should be building this up with chrome.getBasePath()
instead I think.
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 removed the prefix ../
in 70e8606 but I think the http
service now takes care of the base path handling. It works for me while having the 3 character base path enabled.
x-pack/legacy/plugins/alerting_ui/np_ready/public/application/context/app_context.tsx
Outdated
Show resolved
Hide resolved
...ns/alerting_ui/np_ready/public/application/sections/actions_list/components/actions_list.tsx
Outdated
Show resolved
Hide resolved
...ns/alerting_ui/np_ready/public/application/sections/actions_list/components/actions_list.tsx
Outdated
Show resolved
Hide resolved
...ns/alerting_ui/np_ready/public/application/sections/actions_list/components/actions_list.tsx
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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 in general. I have proposal to change plugin name to AlertingUiPlugin, because the current one came up historically.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…feature/alerting_ui_plugin
This comment has been minimized.
This comment has been minimized.
...ns/alerting_ui/np_ready/public/application/sections/actions_list/components/actions_list.tsx
Outdated
Show resolved
Hide resolved
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.
Just reviewed to get familiar with what building a UI for Kibana entails, left a few nit comments.
selectMessage: i18n.translate( | ||
'xpack.alertingUI.sections.actions.emailAction.selectMessageText', | ||
{ | ||
defaultMessage: 'Send an email from your server.', |
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.
not sure "from your server" is required here
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 file is for the next upcoming PR (#48191) to create / edit actions. We decided instead of cleaning it up that we'll leave it there until the next PR lands. In order to avoid merge conflicts, we'll address this feedback in the next PR cc @YulNaumenko.
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.
The code looks good; Although i believe there are many any
types that could be typed; these will be very useful for future refactors.
I'm also curious why you've decided for a separate plugin for the UI instead of baking it in alerting
?
Not all the i18n ids are following the naming convension outlined in this guide: https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/GUIDELINE.md I've suggested edits on many of them
x-pack/legacy/plugins/alerting_ui/np_ready/public/application/app.tsx
Outdated
Show resolved
Hide resolved
<EuiSpacer size="s" /> | ||
|
||
<Switch> | ||
{canShowActions && <Route exact path={routeToActions} component={ActionsList} />} |
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'm not sure about this but maybe canShowActions
should be wrapping the <Switch>
?
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.
There will be more routes added later on and only the one above will be related to canShowActions
x-pack/legacy/plugins/alerting_ui/np_ready/public/application/lib/doc_title.ts
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/actions/server/builtin_action_types/slack.ts
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/actions/server/builtin_action_types/email.ts
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/actions/server/builtin_action_types/server_log.ts
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/actions/server/builtin_action_types/webhook.ts
Outdated
Show resolved
Hide resolved
...ugins/alerting_ui/np_ready/public/application/components/page_error/page_error_forbidden.tsx
Outdated
Show resolved
Hide resolved
...ugins/alerting_ui/np_ready/public/application/components/page_error/page_error_not_exist.tsx
Outdated
Show resolved
Hide resolved
...ugins/alerting_ui/np_ready/public/application/components/page_error/page_error_not_exist.tsx
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
@Bamieh thanks for the review. The removal of the The UI is developed in a separate plugin due to it containing Thanks for the link to naming conventions, will give it a read! |
💚 Build Succeeded |
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!
PR is marked merged automatically due to us now only using |
In this PR, we're adding a new plugin "alertingUI" that will handle the rendering of alerts and actions. The reason for a separate plugin is to still be able to render the UI when alerting plugin is disabled but actions plugin is still enabled.
This PR includes a new top level tabs that will eventually have Actions, Alerts, Activity Log and Notifications as per mock ups. This PR also includes the actions list with delete functionality.
Note: This merges into a feature branch that will later on be merged into master.
Resolves #47754
Resolves #47755
Screenshot: