mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
added alerting to app directory (#81902)
Adds a link to the Alerts & Actions from the app directory
This commit is contained in:
parent
13fe95b400
commit
d1344b6ecd
2 changed files with 30 additions and 5 deletions
|
@ -3,9 +3,9 @@
|
|||
"version": "kibana",
|
||||
"server": true,
|
||||
"ui": true,
|
||||
"optionalPlugins": ["alerts", "stackAlerts"],
|
||||
"optionalPlugins": ["home", "alerts", "stackAlerts"],
|
||||
"requiredPlugins": ["management", "charts", "data", "kibanaReact"],
|
||||
"configPath": ["xpack", "trigger_actions_ui"],
|
||||
"extraPublicDirs": ["public/common", "public/common/constants"],
|
||||
"requiredBundles": ["alerts", "esUiShared"]
|
||||
"requiredBundles": ["home", "alerts", "esUiShared"]
|
||||
}
|
||||
|
|
|
@ -20,6 +20,10 @@ import {
|
|||
ManagementAppMountParams,
|
||||
ManagementSetup,
|
||||
} from '../../../../src/plugins/management/public';
|
||||
import {
|
||||
FeatureCatalogueCategory,
|
||||
HomePublicPluginSetup,
|
||||
} from '../../../../src/plugins/home/public';
|
||||
import { ChartsPluginStart } from '../../../../src/plugins/charts/public';
|
||||
import { PluginStartContract as AlertingStart } from '../../alerts/public';
|
||||
import { DataPublicPluginStart } from '../../../../src/plugins/data/public';
|
||||
|
@ -40,6 +44,7 @@ export interface TriggersAndActionsUIPublicPluginStart {
|
|||
|
||||
interface PluginsSetup {
|
||||
management: ManagementSetup;
|
||||
home?: HomePublicPluginSetup;
|
||||
}
|
||||
|
||||
interface PluginsStart {
|
||||
|
@ -73,11 +78,31 @@ export class Plugin
|
|||
const actionTypeRegistry = this.actionTypeRegistry;
|
||||
const alertTypeRegistry = this.alertTypeRegistry;
|
||||
|
||||
const featureTitle = i18n.translate('xpack.triggersActionsUI.managementSection.displayName', {
|
||||
defaultMessage: 'Alerts and Actions',
|
||||
});
|
||||
const featureDescription = i18n.translate(
|
||||
'xpack.triggersActionsUI.managementSection.displayDescription',
|
||||
{
|
||||
defaultMessage: 'Detect conditions using alerts, and take actions using connectors.',
|
||||
}
|
||||
);
|
||||
|
||||
if (plugins.home) {
|
||||
plugins.home.featureCatalogue.register({
|
||||
id: 'triggersActions',
|
||||
title: featureTitle,
|
||||
description: featureDescription,
|
||||
icon: 'watchesApp',
|
||||
path: '/app/management/insightsAndAlerting/triggersActions',
|
||||
showOnHomePage: false,
|
||||
category: FeatureCatalogueCategory.ADMIN,
|
||||
});
|
||||
}
|
||||
|
||||
plugins.management.sections.section.insightsAndAlerting.registerApp({
|
||||
id: 'triggersActions',
|
||||
title: i18n.translate('xpack.triggersActionsUI.managementSection.displayName', {
|
||||
defaultMessage: 'Alerts and Actions',
|
||||
}),
|
||||
title: featureTitle,
|
||||
order: 0,
|
||||
async mount(params: ManagementAppMountParams) {
|
||||
const [coreStart, pluginsStart] = (await core.getStartServices()) as [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue