Adds Navigation APIs to Alerting.
Parts to this PR:
Adds a client side (Public) plugin to Alerting, including two APIs: registerNavigation & registerDefaultNavigation. These allow a plugin to register navigation handlers for any alerts which it is the consumer of- one for specific AlertTypes and one for a default handler for all AlertTypes created by the plugin.
The Alert Details page now uses these navigation handlers for the View In App button. If there's an AlertType specific handler it uses that, otherwise it uses a default one and if the consumer has not registered a handler - it remains disabled.
A generic Alerting Example plugin that demonstrates usage of these APIs including two AlertTypes - one that always fires, and another that checks how many people are in Outer Space and allows you to trigger based on that. 😉 To enable the plugin run yarn start --ssl --run-examples
18 lines
357 B
JSON
18 lines
357 B
JSON
{
|
|
"name": "alerting_example",
|
|
"version": "1.0.0",
|
|
"main": "target/examples/alerting_example",
|
|
"kibana": {
|
|
"version": "kibana",
|
|
"templateVersion": "1.0.0"
|
|
},
|
|
"license": "Apache-2.0",
|
|
"scripts": {
|
|
"kbn": "node ../../scripts/kbn.js",
|
|
"build": "rm -rf './target' && tsc"
|
|
},
|
|
"devDependencies": {
|
|
"typescript": "3.7.2"
|
|
}
|
|
}
|