Skip to content
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

Create UI for alerting and actions plugin #48959

Merged
merged 360 commits into from
Jan 14, 2020
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
360 commits
Select commit Hold shift + click to select a range
f570e42
Merge remote-tracking branch 'upstream/master' into feature/alerting_ui
YulNaumenko Nov 12, 2019
6bf1baa
Refactored reducers type definitions
YulNaumenko Nov 14, 2019
cda5c24
Fixed dependancy objects
YulNaumenko Nov 14, 2019
68c1958
Merge branch 'master' into feature/alerting_ui
YulNaumenko Nov 14, 2019
d47238e
Fixed action add
YulNaumenko Nov 14, 2019
298ee20
Fixed logging app icon
YulNaumenko Nov 14, 2019
9c4abbb
Added action types params fields
YulNaumenko Nov 15, 2019
b656a49
Added fields for check and re-notify alert
YulNaumenko Nov 15, 2019
1a631a2
Add tags to alert list
mikecote Nov 19, 2019
bf85dee
Adjusted threshold expression with validation, added visualization
YulNaumenko Nov 19, 2019
5243ebe
Merge branch 'feature/alerting_ui' of github.com:elastic/kibana into …
YulNaumenko Nov 19, 2019
e5c43d4
Merge branch 'master' of github.com:elastic/kibana into feature/alert…
YulNaumenko Nov 19, 2019
d181322
Move delete button to the left and hide when no selection
mikecote Nov 19, 2019
ff24e96
Rename action list title column to name
mikecote Nov 19, 2019
91d28f1
Merge branch 'feature/alerting_ui' of github.com:elastic/kibana into …
mikecote Nov 19, 2019
4ca5289
fixed request
YulNaumenko Nov 19, 2019
00a7e46
Merge branch 'feature/alerting_ui' of github.com:elastic/kibana into …
YulNaumenko Nov 19, 2019
a6ec116
Removed watcher labels
YulNaumenko Nov 19, 2019
9b41eb1
Design cleanup
snide Nov 19, 2019
5973bfb
Added expression default values
YulNaumenko Nov 20, 2019
4ee5a27
Merge branch 'feature/alerting_ui' of github.com:elastic/kibana into …
YulNaumenko Nov 20, 2019
2bad656
Added visualization for index threshold alert
YulNaumenko Nov 20, 2019
9b83805
Merge branch 'master' of github.com:elastic/kibana into feature/alert…
mikecote Nov 20, 2019
cb64de5
Merge branch 'feature/alerting_ui' of github.com:elastic/kibana into …
mikecote Nov 20, 2019
ae9757a
Rename Actions tab to Connectors
mikecote Nov 20, 2019
155f38e
Rename "create action" to "create connector"
mikecote Nov 20, 2019
5ed0b68
Remove actions column name
mikecote Nov 20, 2019
3fb9efd
Add count per action type
mikecote Nov 20, 2019
84e90cc
Hide checkboxes when user can't delete
mikecote Nov 20, 2019
3d57815
Add title to home, rename Alerting UI breadcrumb (remove UI part)
mikecote Nov 20, 2019
f3f55b8
Added correct binding for interval and throttle
YulNaumenko Nov 20, 2019
d3b37e9
Added tags support for create Alert UI
YulNaumenko Nov 20, 2019
04443a2
Added server error display in UI on save alert
YulNaumenko Nov 20, 2019
5473f02
Added connectors for action forms
YulNaumenko Nov 21, 2019
4fd6783
Update button styles
mdefazio Nov 21, 2019
c6f2218
Switch inputs to compressed forms
mdefazio Nov 21, 2019
ba3172e
Fixed some fields for add alert form
YulNaumenko Nov 21, 2019
2b3cb2d
Fixed updating action by index
YulNaumenko Nov 21, 2019
88ee52e
Fixed filter for index/fields api requests
YulNaumenko Nov 21, 2019
a0560dd
Remove the test alert type that was in the init function
mikecote Nov 22, 2019
bb43d39
Fixed action type icon on add connector form and did small refactorin…
YulNaumenko Nov 25, 2019
2281c23
Rename alerting UI plugin to triggers and actions UI (or something el…
YulNaumenko Nov 25, 2019
966352c
Implemented action connector edit UI
YulNaumenko Nov 26, 2019
577806e
Add bulk actions to alerts list
mikecote Nov 26, 2019
2a4a8b4
Merge branch 'master' of github.com:elastic/kibana into feature/alert…
mikecote Nov 26, 2019
13531c3
Update home title spacing
mdefazio Nov 26, 2019
abb18d1
Fixed editing secrets action property
YulNaumenko Nov 26, 2019
2c0dfe1
Changing behaviour of bulk actions and disable buttons during request
mikecote Nov 26, 2019
dfb44e4
Merge branch 'feature/alerting_ui' of github.com:elastic/kibana into …
mikecote Nov 26, 2019
01dcba6
Refactored plugin definition with appdependency interface
YulNaumenko Nov 27, 2019
13372fa
Moved add dependencies to the separate file
YulNaumenko Nov 27, 2019
c59868c
Enable visualization if only hasExpressionErrors passed
YulNaumenko Nov 27, 2019
dc9c442
Fixed add action twice on click card
YulNaumenko Nov 27, 2019
09f5701
Fix actions column in alert list
mikecote Nov 27, 2019
fcc6e4a
Fixed action canSave capability
YulNaumenko Nov 27, 2019
ee04144
Renamed Actions to ActionConnectors in appropriate UI files
YulNaumenko Nov 27, 2019
dcaa961
Renamed alertTypeParams to params in UI code
YulNaumenko Nov 27, 2019
303ed70
Add filter for tags
mikecote Nov 27, 2019
c0c82e8
Merge branch 'feature/alerting_ui' of github.com:elastic/kibana into …
mikecote Nov 27, 2019
a9785aa
Cleanup previous commit
mikecote Nov 27, 2019
ce60ff8
Fix alert type filter
mikecote Nov 27, 2019
59655bc
Refactored edit form to use ActionTableItem
YulNaumenko Nov 27, 2019
7abe75e
Renamed ActionTableItem to ActionConnectorTableItem
YulNaumenko Nov 27, 2019
114b4f1
Fixed missing button key error for alerts list filter
YulNaumenko Nov 27, 2019
c00175c
Renamed translation labels for connectors
YulNaumenko Nov 27, 2019
a60f5e1
Merge branch 'master' of github.com:elastic/kibana into feature/alert…
mikecote Nov 28, 2019
c2a3a64
Merge branch 'master' of github.com:elastic/kibana into feature/alert…
mikecote Nov 28, 2019
9f2dfba
Enable UI plugin by default
mikecote Nov 28, 2019
2b70b71
Rename buildin to builtin
mikecote Nov 28, 2019
4a24c94
Fix some type checks
mikecote Nov 28, 2019
b9d8804
Add API tests
mikecote Nov 28, 2019
466f847
Split API file into smaller files
mikecote Nov 28, 2019
f6daeb3
Rename plugin id
mikecote Nov 28, 2019
d567dae
Remove dependency on actions plugin (should be optional dep in NP)
mikecote Nov 28, 2019
e1f7095
Fix some translation ids
mikecote Nov 28, 2019
c059b15
Merge branch 'master' of github.com:elastic/kibana into feature/alert…
mikecote Dec 2, 2019
48fd098
Revert "Rename plugin id"
mikecote Dec 2, 2019
75679d2
Rename method for loading connectors
YulNaumenko Dec 2, 2019
5a91c86
Added functional tests base
YulNaumenko Dec 2, 2019
5bd6278
Fix functional test type filter
mikecote Dec 2, 2019
9fc0bfb
Add test alert type for now
mikecote Dec 3, 2019
c86e99e
Initial connectors functional tests
mikecote Dec 3, 2019
b3cdc17
Merge branch 'master' of github.com:elastic/kibana into feature/alert…
mikecote Dec 3, 2019
570a358
Rename description to name
mikecote Dec 3, 2019
b043787
Use unique connector names to allow re-running tests
mikecote Dec 3, 2019
fba026f
Assert on more things
mikecote Dec 3, 2019
a48bb41
Update alert/action menu items. Flyout width. Add index.scss file
mdefazio Dec 3, 2019
fbb80f9
Merge branch 'feature/alerting_ui' of github.com:elastic/kibana into …
mdefazio Dec 3, 2019
3c9ddb8
Added action connector list unit tests
YulNaumenko Dec 4, 2019
365367e
Add bulk delete functional test
mikecote Dec 4, 2019
27bd7f1
Move tests to SSL functional environment
mikecote Dec 4, 2019
ef3ae58
Merge branch 'feature/alerting_ui' of github.com:elastic/kibana into …
mikecote Dec 4, 2019
e3cf18b
Fix tests
mikecote Dec 4, 2019
cbafbee
Added unit tests for actionTypeRegistry and alertTypeRegistry
YulNaumenko Dec 5, 2019
5751d38
Fixed update connector with only properties
YulNaumenko Dec 5, 2019
baed2f6
Added some functional tests for alerts with TODOs
mikecote Dec 5, 2019
0d36eee
Merge branch 'feature/alerting_ui' of github.com:elastic/kibana into …
mikecote Dec 5, 2019
ffb7e70
Merge branch 'master' of github.com:elastic/kibana into feature/alert…
mikecote Dec 5, 2019
f3531f4
connectors list page cleanup
snide Dec 5, 2019
16fbe36
empty state cleanup
snide Dec 5, 2019
01d9141
Added connector edit flyout unit test
YulNaumenko Dec 6, 2019
411fee5
Fix functional tests
mikecote Dec 6, 2019
898efbe
text cleanup
snide Dec 6, 2019
6b0cbf4
zindex fix for index threshold trigger
snide Dec 6, 2019
be93011
Merge with master
mikecote Dec 6, 2019
40f10e6
Expand the functional tests, add assertions
mikecote Dec 6, 2019
2dc2ec6
Fixed edit connector from the Name column, and removed pencil button
YulNaumenko Dec 6, 2019
d6e46fb
Remove tags filter, use search bar instead
mikecote Dec 9, 2019
b182b7c
Finalize functional tests
mikecote Dec 9, 2019
55bf039
Merge branch 'master' of github.com:elastic/kibana into feature/alert…
mikecote Dec 10, 2019
ec93614
Support filtering alerts by action type
mikecote Dec 10, 2019
072c171
Rename plugin name for translations
mikecote Dec 10, 2019
a142566
Rename default breadcrumb title to alerts and actions
mikecote Dec 10, 2019
ac30692
Added unit tests for connectors empty prompt, fixed api tests
YulNaumenko Dec 10, 2019
b1a398a
Added unit test for select action type menu for create connector; Fix…
YulNaumenko Dec 10, 2019
eb3663b
Added unit test for edit connector flyout
YulNaumenko Dec 10, 2019
4a7af57
Added alerts list unit tests
YulNaumenko Dec 10, 2019
0c4bbe8
Added connector form unit tests
YulNaumenko Dec 10, 2019
e4dfa1a
Added connector reducer unit tests
YulNaumenko Dec 10, 2019
1e59182
Fixed some failing unit tests
YulNaumenko Dec 10, 2019
b6d5f4e
Fixed alerts list unit tests
YulNaumenko Dec 10, 2019
da11d0a
Set alert tab default if it is available
YulNaumenko Dec 11, 2019
8ecccba
Added doc_title and get_time_units unit tests
YulNaumenko Dec 11, 2019
9d01113
Added some test fixes
YulNaumenko Dec 11, 2019
bc39d52
Fixed index threshold expression to display only index and fields
YulNaumenko Dec 11, 2019
c839bd2
Added email building action unit tests
YulNaumenko Dec 12, 2019
68f7f55
Added unit tests for builtin action types
YulNaumenko Dec 13, 2019
6e74238
Remove test alert type
mikecote Dec 13, 2019
a6b482c
Merge branch 'feature/alerting_ui' of github.com:elastic/kibana into …
mikecote Dec 13, 2019
e193caa
Move create alert UI behind feature flag 'createAlertUiEnabled'
mikecote Dec 13, 2019
1ff33bd
Merge branch 'master' of github.com:elastic/kibana into feature/alert…
mikecote Dec 13, 2019
80deb10
Merge with master
mikecote Dec 13, 2019
8bf5e45
Fix functional tests
mikecote Dec 13, 2019
5b32203
Update codeowners
mikecote Dec 13, 2019
800b2de
Update codeowners for tests
mikecote Dec 13, 2019
976b9e6
Merge with master
mikecote Dec 16, 2019
9afd07a
Revert watcher changes
mikecote Dec 16, 2019
283da53
Fix type check failure
mikecote Dec 16, 2019
cafd43a
Fix unit test failures
mikecote Dec 16, 2019
7a8f191
Fixed typecheck failures
YulNaumenko Dec 16, 2019
dfe9adf
Fixed language check errors
YulNaumenko Dec 16, 2019
95a16e2
Merge
mikecote Dec 16, 2019
b7710c7
Did some text/type fixes
YulNaumenko Dec 16, 2019
b81cefb
Fixed typecheck
YulNaumenko Dec 16, 2019
17500c0
Fixed unit tests warning
YulNaumenko Dec 16, 2019
f5b6bce
Merge remote-tracking branch 'upstream/master' into feature/alerting_ui
YulNaumenko Dec 16, 2019
5eae8c4
Merge branch 'master' of github.com:elastic/kibana into feature/alert…
mikecote Dec 17, 2019
62dd2ba
Fix failing functional tests
mikecote Dec 17, 2019
1eb9730
Merge branch 'feature/alerting_ui' of github.com:elastic/kibana into …
mikecote Dec 17, 2019
476c7e4
Merge branch 'master' into feature/alerting_ui
elasticmachine Dec 17, 2019
2175d2f
Merge with master
mikecote Dec 18, 2019
91ef622
Merge branch 'feature/alerting_ui' of github.com:elastic/kibana into …
mikecote Dec 18, 2019
8717324
Fix registry tests to have cleaner diff when it fails
mikecote Dec 18, 2019
b47e464
Make DEFAULT_SECTION a Section type
mikecote Dec 18, 2019
3ed00b9
Remove unused constructor
mikecote Dec 18, 2019
731de1f
Make app dependency error string same line
mikecote Dec 18, 2019
6b23551
Remove unused error pages
mikecote Dec 18, 2019
79b0e3f
Set interface to alerts context
mikecote Dec 18, 2019
bd68e93
Fix action_connector_form.tsx label
mikecote Dec 18, 2019
87e35e8
Fix label in connector_add_flyout.tsx
mikecote Dec 18, 2019
f484f39
Fix label in alert_add.tsx
mikecote Dec 18, 2019
016442f
Move alert_types to builtin_alert_types
mikecote Dec 18, 2019
2a77efe
Move some threshold constants into threshold folder
mikecote Dec 18, 2019
391659d
Move api.ts within threshold folder
mikecote Dec 18, 2019
7e6c7ce
Removed duplication logic from action type and alert type registry list
YulNaumenko Dec 18, 2019
8eadea7
Fixed email action type test and adjusted validation to support array…
YulNaumenko Dec 18, 2019
c505ec5
Added missing connector fields for email action type
YulNaumenko Dec 18, 2019
9c252ce
Fixed building action types issues due to comments
YulNaumenko Dec 18, 2019
cc92af3
Merge remote-tracking branch 'upstream/master' into feature/alerting_ui
YulNaumenko Dec 20, 2019
fe88d50
Refactored with more new platform structure; fixed some comments from…
YulNaumenko Dec 20, 2019
44e10ab
Capitalize Actions in 'Alerts and Actions' labels
mikecote Dec 20, 2019
6802121
Skip flaky tests
mikecote Dec 20, 2019
4827d42
Fix failing functional test
mikecote Dec 20, 2019
e9e6a72
Fixed failing unit tests, added new deps
YulNaumenko Dec 20, 2019
74ac9c7
Fixed type checks
YulNaumenko Dec 20, 2019
db14343
Fixed language check failing
YulNaumenko Dec 20, 2019
7640f8f
Fix broken functional tests
mikecote Dec 20, 2019
b8bafc7
Merge branch 'feature/alerting_ui' of github.com:elastic/kibana into …
mikecote Dec 20, 2019
bd27411
Refactored actionConnectors and alerting context
YulNaumenko Dec 20, 2019
69da968
Removed doc title service
YulNaumenko Dec 20, 2019
f67df65
added get time options type definitions
YulNaumenko Dec 20, 2019
007bdcd
removed obsolete code
YulNaumenko Dec 20, 2019
95488ea
Made generic registry type for actionTypes and alert types
YulNaumenko Dec 20, 2019
6aafd1b
Fixed some enum types
YulNaumenko Dec 20, 2019
23e2226
fixed type check CI
YulNaumenko Dec 20, 2019
e827726
Merge branch 'master' into feature/alerting_ui
elasticmachine Dec 31, 2019
0b48b65
Convert EuiSearchBar to normal text field
mikecote Dec 31, 2019
e61c5b9
Fix typo
mikecote Dec 31, 2019
3f4bdc5
Fix conditional rendering
mikecote Dec 31, 2019
0b4fc6a
Fix bug where selection doesn't reset
mikecote Dec 31, 2019
a1ef419
Fix broken functional test, wait for ENTER key to search alerts
mikecote Dec 31, 2019
986b6be
Make app section hide from menu when user doesn't have access
mikecote Dec 31, 2019
84bd617
Fixed connector name validation (error due to renaming from description)
YulNaumenko Jan 2, 2020
e55c177
Merge branch 'master' into feature/alerting_ui
elasticmachine Jan 2, 2020
7eb158b
Removed obsolete useEffect
YulNaumenko Jan 2, 2020
efde341
Removed unused ShareRouter
YulNaumenko Jan 2, 2020
60ff7f7
Fixed key validation error
YulNaumenko Jan 2, 2020
62f3fce
Mobed wrongly wrapped objects
YulNaumenko Jan 2, 2020
54d44e7
Removed useEffect from connectors form
YulNaumenko Jan 2, 2020
db0aa95
Replaced error forms with eui controls props
YulNaumenko Jan 2, 2020
70703a6
Merge remote-tracking branch 'upstream/master' into feature/alerting_ui
YulNaumenko Jan 3, 2020
75de8ef
Added delete confirmation dialog for connectors list
YulNaumenko Jan 3, 2020
fcb6369
Fixed build errors
YulNaumenko Jan 3, 2020
f16b6d5
Fixed failing test
YulNaumenko Jan 3, 2020
8a1e52c
Skip flaky tests
mikecote Jan 3, 2020
c2b6b0e
Merge remote-tracking branch 'upstream/master' into feature/alerting_ui
YulNaumenko Jan 6, 2020
95006d5
Added null check for app context - render components tree only if it …
YulNaumenko Jan 6, 2020
072ec10
Fixed type check eror
YulNaumenko Jan 6, 2020
1d2a59a
Did changes on the UX and text/labels commnets
YulNaumenko Jan 6, 2020
3618cf1
Fixed failing tests
YulNaumenko Jan 7, 2020
3004376
Fixed error handling
YulNaumenko Jan 7, 2020
91728db
Refactored Webhook form http headers due to the mockup
YulNaumenko Jan 8, 2020
526bb77
Merge remote-tracking branch 'upstream/master' into feature/alerting_ui
YulNaumenko Jan 8, 2020
5f77632
Fixed build
YulNaumenko Jan 8, 2020
b41fe8c
Fix labels issue
YulNaumenko Jan 8, 2020
f094111
Fix spacing and form row alignment
mdefazio Jan 8, 2020
3e2041c
Merge branch 'feature/alerting_ui' of github.com:elastic/kibana into …
mdefazio Jan 8, 2020
a708f36
Merge remote-tracking branch 'upstream/master' into feature/alerting_ui
YulNaumenko Jan 8, 2020
b77fe1f
Fixed failing type check
YulNaumenko Jan 8, 2020
5acaa1a
put ownfocus on popover in actions list
snide Dec 6, 2019
3b9fdc6
fix spacing and flex
snide Jan 9, 2020
38c2101
fix color on conectors list
snide Jan 9, 2020
45c4349
clean up webhook headers form
snide Jan 9, 2020
9f9a178
fix logic check for headers
snide Jan 9, 2020
dded831
Merge remote-tracking branch 'upstream/master' into feature/alerting_ui
YulNaumenko Jan 9, 2020
e424285
Made changes due to review comments
YulNaumenko Jan 10, 2020
dd816ac
Fixed delete connector test
YulNaumenko Jan 10, 2020
982e840
Fixed all flaky test for delete connectors 53956
YulNaumenko Jan 10, 2020
3ffa5c5
Merge remote-tracking branch 'upstream/master' into feature/alerting_ui
YulNaumenko Jan 10, 2020
17f41b3
Merge remote-tracking branch 'upstream/master' into feature/alerting_ui
YulNaumenko Jan 10, 2020
440f5de
Fixed type check due to NP changes
YulNaumenko Jan 10, 2020
6175139
Disable plugin by default
YulNaumenko Jan 10, 2020
fd464ef
Added configuration props for functional tests to enable triggers and…
YulNaumenko Jan 11, 2020
96eecb3
Merge remote-tracking branch 'upstream/master' into feature/alerting_ui
YulNaumenko Jan 11, 2020
bc68537
removed timeout from test
YulNaumenko Jan 11, 2020
aa3cadf
added enable triggers and actions to functional/config.js
YulNaumenko Jan 11, 2020
efc01b2
fix the build
YulNaumenko Jan 11, 2020
9b4c918
Merge branch 'master' into feature/alerting_ui
Jan 11, 2020
a78ebcd
Changed ci group and disabled plugin
YulNaumenko Jan 12, 2020
4d531b7
Merge remote-tracking branch 'upstream/master' into feature/alerting_ui
YulNaumenko Jan 12, 2020
7352c20
changed config setting to root
YulNaumenko Jan 12, 2020
6f30661
Changed disable approach
YulNaumenko Jan 12, 2020
be1e127
Experiment with index managment
YulNaumenko Jan 12, 2020
87165be
Set back configuration settings for triggers and actions
YulNaumenko Jan 13, 2020
3b9d9b8
Enable plugins
YulNaumenko Jan 13, 2020
8690d22
Set index management to disabled to see the failing issue
YulNaumenko Jan 13, 2020
c8a1325
Merge branch 'master' into feature/alerting_ui
elasticmachine Jan 13, 2020
7431dca
Revert experimental back for index_managment
YulNaumenko Jan 13, 2020
af3b544
Merge branch 'feature/alerting_ui' of github.com:elastic/kibana into …
YulNaumenko Jan 13, 2020
14f5ab5
Fixed type check
YulNaumenko Jan 13, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@
/x-pack/test/alerting_api_integration @elastic/kibana-alerting-services
/x-pack/test/plugin_api_integration/plugins/task_manager @elastic/kibana-alerting-services
/x-pack/test/plugin_api_integration/test_suites/task_manager @elastic/kibana-alerting-services
/x-pack/legacy/plugins/triggers_actions_ui @elastic/kibana-alerting-services
YulNaumenko marked this conversation as resolved.
Show resolved Hide resolved
/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui @elastic/kibana-alerting-services
/x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts @elastic/kibana-alerting-services

# Design
**/*.scss @elastic/kibana-design
Expand Down
1 change: 1 addition & 0 deletions x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"xpack.actions": "legacy/plugins/actions",
"xpack.advancedUiActions": "plugins/advanced_ui_actions",
"xpack.alerting": "legacy/plugins/alerting",
"xpack.triggersActionsUI": "legacy/plugins/triggers_actions_ui",
"xpack.apm": "legacy/plugins/apm",
"xpack.beatsManagement": "legacy/plugins/beats_management",
"xpack.canvas": "legacy/plugins/canvas",
Expand Down
2 changes: 2 additions & 0 deletions x-pack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import { transform } from './legacy/plugins/transform';
import { actions } from './legacy/plugins/actions';
import { alerting } from './legacy/plugins/alerting';
import { lens } from './legacy/plugins/lens';
import { triggersActionsUI } from './legacy/plugins/triggers_actions_ui';

module.exports = function(kibana) {
return [
Expand Down Expand Up @@ -83,5 +84,6 @@ module.exports = function(kibana) {
snapshotRestore(kibana),
actions(kibana),
alerting(kibana),
triggersActionsUI(kibana),
];
};
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ beforeEach(() => {
describe('actionTypeRegistry.get() works', () => {
test('action type static data is as expected', () => {
expect(actionType.id).toEqual(ACTION_TYPE_ID);
expect(actionType.name).toEqual('email');
expect(actionType.name).toEqual('Email');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ export function getActionType(params: GetActionTypeParams): ActionType {
const { logger, configurationUtilities } = params;
return {
id: '.email',
name: 'email',
name: i18n.translate('xpack.actions.builtin.emailTitle', {
defaultMessage: 'Email',
}),
validate: {
config: schema.object(ConfigSchemaProps, {
validate: curry(validateConfig)(configurationUtilities),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ beforeEach(() => {
describe('actionTypeRegistry.get() works', () => {
test('action type static data is as expected', () => {
expect(actionType.id).toEqual(ACTION_TYPE_ID);
expect(actionType.name).toEqual('index');
expect(actionType.name).toEqual('Index');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ const ParamsSchema = schema.object({
export function getActionType({ logger }: { logger: Logger }): ActionType {
return {
id: '.index',
name: 'index',
name: i18n.translate('xpack.actions.builtin.esIndexTitle', {
defaultMessage: 'Index',
}),
validate: {
config: ConfigSchema,
params: ParamsSchema,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ beforeAll(() => {
describe('get()', () => {
test('should return correct action type', () => {
expect(actionType.id).toEqual(ACTION_TYPE_ID);
expect(actionType.name).toEqual('pagerduty');
expect(actionType.name).toEqual('PagerDuty');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ export function getActionType({
}): ActionType {
return {
id: '.pagerduty',
name: 'pagerduty',
name: i18n.translate('xpack.actions.builtin.pagerdutyTitle', {
defaultMessage: 'PagerDuty',
}),
validate: {
config: schema.object(configSchemaProps, {
validate: curry(valdiateActionTypeConfig)(configurationUtilities),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ beforeAll(() => {
describe('get()', () => {
test('returns action type', () => {
expect(actionType.id).toEqual(ACTION_TYPE_ID);
expect(actionType.name).toEqual('server-log');
expect(actionType.name).toEqual('Server log');
});
});

Expand Down Expand Up @@ -98,6 +98,6 @@ describe('execute()', () => {
config: {},
secrets: {},
});
expect(mockedLogger.info).toHaveBeenCalledWith('server-log: message text here');
expect(mockedLogger.info).toHaveBeenCalledWith('Server log: message text here');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Logger } from '../../../../../../src/core/server';
import { ActionType, ActionTypeExecutorOptions, ActionTypeExecutorResult } from '../types';
import { withoutControlCharacters } from './lib/string_utils';

const ACTION_NAME = 'server-log';
const ACTION_NAME = 'Server log';

// params definition

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ beforeAll(() => {
describe('action registeration', () => {
test('returns action type', () => {
expect(actionType.id).toEqual(ACTION_TYPE_ID);
expect(actionType.name).toEqual('slack');
expect(actionType.name).toEqual('Slack');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export function getActionType({
}): ActionType {
return {
id: '.slack',
name: 'slack',
name: i18n.translate('xpack.actions.builtin.slackTitle', {
defaultMessage: 'Slack',
}),
validate: {
secrets: schema.object(secretsSchemaProps, {
validate: curry(valdiateActionTypeConfig)(configurationUtilities),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ beforeAll(() => {
describe('actionType', () => {
test('exposes the action as `webhook` on its Id and Name', () => {
expect(actionType.id).toEqual('.webhook');
expect(actionType.name).toEqual('webhook');
expect(actionType.name).toEqual('Webhook');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ export function getActionType({
}): ActionType {
return {
id: '.webhook',
name: 'webhook',
name: i18n.translate('xpack.actions.builtin.webhookTitle', {
defaultMessage: 'Webhook',
}),
validate: {
config: schema.object(configSchemaProps, {
validate: curry(valdiateActionTypeConfig)(configurationUtilities),
Expand Down
20 changes: 18 additions & 2 deletions x-pack/legacy/plugins/siem/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,15 @@ export class Plugin {
],
read: ['config'],
},
ui: ['show'],
ui: [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing stack monitoring would need the same sort of settings, but they don't actually need it right now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it was discussed here #52286 (comment) that they would take on the changes required for feature controls within their feature branch.

'show',
'alerting:show',
'actions:show',
'alerting:save',
'actions:save',
'alerting:delete',
'actions:delete',
],
},
read: {
api: ['siem', 'actions-read', 'actions-all', 'alerting-read', 'alerting-all'],
Expand All @@ -73,7 +81,15 @@ export class Plugin {
timelineSavedObjectType,
],
},
ui: ['show'],
ui: [
'show',
'alerting:show',
'actions:show',
'alerting:save',
'actions:save',
'alerting:delete',
'actions:delete',
],
},
},
});
Expand Down
43 changes: 43 additions & 0 deletions x-pack/legacy/plugins/triggers_actions_ui/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { Legacy } from 'kibana';
import { Root } from 'joi';
import { resolve } from 'path';

export function triggersActionsUI(kibana: any) {
return new kibana.Plugin({
id: 'triggers_actions_ui',
mikecote marked this conversation as resolved.
Show resolved Hide resolved
configPrefix: 'xpack.triggers_actions_ui',
publicDir: resolve(__dirname, 'public'),
require: ['kibana'],
isEnabled(config: Legacy.KibanaConfig) {
return (
config.get('xpack.triggers_actions_ui.enabled') &&
(config.get('xpack.actions.enabled') || config.get('xpack.alerting.enabled'))
);
},
config(Joi: Root) {
return Joi.object()
.keys({
enabled: Joi.boolean().default(true),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plugin should be disabled by default for now.

createAlertUiEnabled: Joi.boolean().default(false),
})
.default();
},
uiExports: {
hacks: ['plugins/triggers_actions_ui/hacks/register'],
managementSections: ['plugins/triggers_actions_ui/legacy'],
styleSheetPaths: resolve(__dirname, 'public/index.scss'),
injectDefaultVars(server: Legacy.Server) {
const serverConfig = server.config();
return {
createAlertUiEnabled: serverConfig.get('xpack.triggers_actions_ui.createAlertUiEnabled'),
};
},
},
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"id": "triggers_actions_ui",
"version": "kibana",
"server": false,
"ui": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { ActionTypeRegistryContract } from '../types';

const createActionTypeRegistryMock = () => {
const mocked: jest.Mocked<ActionTypeRegistryContract> = {
has: jest.fn(x => true),
register: jest.fn(),
get: jest.fn(),
list: jest.fn(),
};
return mocked;
};

export const actionTypeRegistryMock = {
create: createActionTypeRegistryMock,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { AlertTypeRegistryContract } from '../types';

const createAlertTypeRegistryMock = () => {
const mocked: jest.Mocked<AlertTypeRegistryContract> = {
has: jest.fn(),
register: jest.fn(),
get: jest.fn(),
list: jest.fn(),
};
return mocked;
};

export const alertTypeRegistryMock = {
create: createAlertTypeRegistryMock,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import React from 'react';
import { Switch, Route, Redirect, HashRouter } from 'react-router-dom';
import {
ChromeStart,
DocLinksStart,
ToastsSetup,
HttpSetup,
IUiSettingsClient,
} from 'kibana/public';
import { BASE_PATH, Section } from './constants';
import { TriggersActionsUIHome } from './home';
import { AppContextProvider, useAppDependencies } from './app_context';
import { hasShowAlertsCapability } from './lib/capabilities';
import { LegacyDependencies, ActionTypeModel, AlertTypeModel } from '../types';
import { TypeRegistry } from './type_registry';

export interface AppDeps {
chrome: ChromeStart;
docLinks: DocLinksStart;
toastNotifications: ToastsSetup;
injectedMetadata: any;
http: HttpSetup;
uiSettings: IUiSettingsClient;
legacy: LegacyDependencies;
actionTypeRegistry: TypeRegistry<ActionTypeModel>;
alertTypeRegistry: TypeRegistry<AlertTypeModel>;
}

export const App = (appDeps: AppDeps) => {
const sections: Section[] = ['alerts', 'connectors'];

const sectionsRegex = sections.join('|');

return (
<HashRouter>
<AppContextProvider appDeps={appDeps}>
<AppWithoutRouter sectionsRegex={sectionsRegex} />
</AppContextProvider>
</HashRouter>
);
};

export const AppWithoutRouter = ({ sectionsRegex }: any) => {
const {
legacy: { capabilities },
} = useAppDependencies();
const canShowAlerts = hasShowAlertsCapability(capabilities.get());
const DEFAULT_SECTION: Section = canShowAlerts ? 'alerts' : 'connectors';
return (
<Switch>
<Route
exact
path={`${BASE_PATH}/:section(${sectionsRegex})`}
component={TriggersActionsUIHome}
/>
<Redirect from={`${BASE_PATH}`} to={`${BASE_PATH}/${DEFAULT_SECTION}`} />
</Switch>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import React, { createContext, useContext } from 'react';
import { AppDeps } from './app';

const AppContext = createContext<AppDeps | null>(null);

export const AppContextProvider = ({
children,
appDeps,
}: {
appDeps: AppDeps | null;
children: React.ReactNode;
}) => {
return appDeps ? <AppContext.Provider value={appDeps}>{children}</AppContext.Provider> : null;
};

export const useAppDependencies = (): AppDeps => {
const ctx = useContext(AppContext);
if (!ctx) {
throw new Error(
'The app dependencies Context has not been set. Use the "setAppDependencies()" method when bootstrapping the app.'
);
}
return ctx;
};
Loading