Skip to content

Commit

Permalink
Rename alerts plugin to alerting (#92898)
Browse files Browse the repository at this point in the history
* Rename alerts plugin to alerting

* Deprecate old config values

* Few more renames

* Update plugin list

* Rename xpack.alerts -> xpack.alerting

* Fix some ESLint rules

* Fix typecheck

* Fix some test failures

* Some more renames

* Fix ESLint

* Fix some test failures

* Fix failing jest test

* Undo exclusive test

* Fix APM deps

* Fix docs

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
mikecote and kibanamachine authored Mar 5, 2021
1 parent 02be8c1 commit 23ce8dc
Show file tree
Hide file tree
Showing 470 changed files with 1,131 additions and 1,108 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,9 @@ module.exports = {
*/
{
// typescript for front and back end
files: ['x-pack/plugins/{alerts,stack_alerts,actions,task_manager,event_log}/**/*.{ts,tsx}'],
files: [
'x-pack/plugins/{alerting,stack_alerts,actions,task_manager,event_log}/**/*.{ts,tsx}',
],
rules: {
'@typescript-eslint/no-explicit-any': 'error',
},
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ x-pack/plugins/telemetry_collection_xpack/schema/ @elastic/kibana-core @elastic/
#CC# /x-pack/plugins/security/ @elastic/kibana-security

# Kibana Alerting Services
/x-pack/plugins/alerts/ @elastic/kibana-alerting-services
/x-pack/plugins/alerting/ @elastic/kibana-alerting-services
/x-pack/plugins/actions/ @elastic/kibana-alerting-services
/x-pack/plugins/event_log/ @elastic/kibana-alerting-services
/x-pack/plugins/task_manager/ @elastic/kibana-alerting-services
Expand Down
1,010 changes: 505 additions & 505 deletions api_docs/alerts.json → api_docs/alerting.json

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions api_docs/alerting.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
id: kibAlertingPluginApi
slug: /kibana-dev-docs/alertingPluginApi
title: alerting
image: https://source.unsplash.com/400x175/?github
summary: API docs for the alerting plugin
date: 2020-11-16
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---

import alertingObj from './alerting.json';

## Client

### Setup
<DocDefinitionList data={[alertingObj.client.setup]}/>

### Start
<DocDefinitionList data={[alertingObj.client.start]}/>

## Server

### Functions
<DocDefinitionList data={alertingObj.server.functions}/>

### Interfaces
<DocDefinitionList data={alertingObj.server.interfaces}/>

### Consts, variables and types
<DocDefinitionList data={alertingObj.server.misc}/>

## Common

### Objects
<DocDefinitionList data={alertingObj.common.objects}/>

### Functions
<DocDefinitionList data={alertingObj.common.functions}/>

### Interfaces
<DocDefinitionList data={alertingObj.common.interfaces}/>

### Enums
<DocDefinitionList data={alertingObj.common.enums}/>

### Consts, variables and types
<DocDefinitionList data={alertingObj.common.misc}/>

49 changes: 0 additions & 49 deletions api_docs/alerts.mdx

This file was deleted.

8 changes: 4 additions & 4 deletions api_docs/apm.json
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,9 @@
},
{
"tags": [],
"id": "def-server.APMPlugin.setup.plugins.alerts",
"id": "def-server.APMPlugin.setup.plugins.alerting",
"type": "Object",
"label": "alerts",
"label": "alerting",
"description": [],
"source": {
"path": "x-pack/plugins/apm/server/plugin.ts",
Expand All @@ -373,9 +373,9 @@
},
"signature": [
{
"pluginId": "alerts",
"pluginId": "alerting",
"scope": "server",
"docId": "kibAlertsPluginApi",
"docId": "kibAlertingPluginApi",
"section": "def-server.PluginSetupContract",
"text": "PluginSetupContract"
},
Expand Down
56 changes: 28 additions & 28 deletions api_docs/triggers_actions_ui.json
Original file line number Diff line number Diff line change
Expand Up @@ -900,9 +900,9 @@
"label": "group",
"description": [],
"source": {
"path": "x-pack/plugins/alerts/common/alert.ts",
"path": "x-pack/plugins/alerting/common/alert.ts",
"lineNumber": 44,
"link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L44"
"link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L44"
}
},
{
Expand All @@ -912,9 +912,9 @@
"label": "id",
"description": [],
"source": {
"path": "x-pack/plugins/alerts/common/alert.ts",
"path": "x-pack/plugins/alerting/common/alert.ts",
"lineNumber": 45,
"link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L45"
"link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L45"
}
},
{
Expand All @@ -924,9 +924,9 @@
"label": "actionTypeId",
"description": [],
"source": {
"path": "x-pack/plugins/alerts/common/alert.ts",
"path": "x-pack/plugins/alerting/common/alert.ts",
"lineNumber": 46,
"link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L46"
"link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L46"
}
},
{
Expand All @@ -936,9 +936,9 @@
"label": "params",
"description": [],
"source": {
"path": "x-pack/plugins/alerts/common/alert.ts",
"path": "x-pack/plugins/alerting/common/alert.ts",
"lineNumber": 47,
"link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L47"
"link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L47"
},
"signature": [
{
Expand All @@ -952,9 +952,9 @@
}
],
"source": {
"path": "x-pack/plugins/alerts/common/alert.ts",
"path": "x-pack/plugins/alerting/common/alert.ts",
"lineNumber": 43,
"link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L43"
"link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L43"
},
"initialIsOpen": false
},
Expand Down Expand Up @@ -1304,9 +1304,9 @@
"signature": [
"<Prop extends \"enabled\" | \"id\" | \"name\" | \"params\" | \"actions\" | \"muteAll\" | \"tags\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"throttle\" | \"notifyWhen\" | \"mutedInstanceIds\" | \"executionStatus\">(key: Prop, value: Pick<",
{
"pluginId": "alerts",
"pluginId": "alerting",
"scope": "common",
"docId": "kibAlertsPluginApi",
"docId": "kibAlertingPluginApi",
"section": "def-common.Alert",
"text": "Alert"
},
Expand Down Expand Up @@ -1359,9 +1359,9 @@
},
"signature": [
{
"pluginId": "alerts",
"pluginId": "alerting",
"scope": "common",
"docId": "kibAlertsPluginApi",
"docId": "kibAlertingPluginApi",
"section": "def-common.ActionGroup",
"text": "ActionGroup"
},
Expand Down Expand Up @@ -1615,9 +1615,9 @@
},
{
"tags": [],
"id": "def-public.TriggersAndActionsUiServices.alerts",
"id": "def-public.TriggersAndActionsUiServices.alerting",
"type": "Object",
"label": "alerts",
"label": "alerting",
"description": [],
"source": {
"path": "x-pack/plugins/triggers_actions_ui/public/application/app.tsx",
Expand All @@ -1626,9 +1626,9 @@
},
"signature": [
{
"pluginId": "alerts",
"pluginId": "alerting",
"scope": "public",
"docId": "kibAlertsPluginApi",
"docId": "kibAlertingPluginApi",
"section": "def-public.PluginStartContract",
"text": "PluginStartContract"
},
Expand Down Expand Up @@ -2119,17 +2119,17 @@
},
"signature": [
{
"pluginId": "alerts",
"pluginId": "alerting",
"scope": "common",
"docId": "kibAlertsPluginApi",
"docId": "kibAlertingPluginApi",
"section": "def-common.ActionGroup",
"text": "ActionGroup"
},
"<ActionGroupIds> & { conditions?: T | undefined; isRequired?: false | undefined; } | ",
{
"pluginId": "alerts",
"pluginId": "alerting",
"scope": "common",
"docId": "kibAlertsPluginApi",
"docId": "kibAlertingPluginApi",
"section": "def-common.ActionGroup",
"text": "ActionGroup"
},
Expand All @@ -2151,17 +2151,17 @@
"signature": [
"{ enabled: boolean; id: string; name: string; params: Record<string, unknown>; actions: AlertAction[]; muteAll: boolean; tags: string[]; alertTypeId: string; consumer: string; schedule: ",
{
"pluginId": "alerts",
"pluginId": "alerting",
"scope": "common",
"docId": "kibAlertsPluginApi",
"docId": "kibAlertingPluginApi",
"section": "def-common.IntervalSchedule",
"text": "IntervalSchedule"
},
"; scheduledTaskId?: string | undefined; createdBy: string | null; updatedBy: string | null; createdAt: Date; updatedAt: Date; apiKeyOwner: string | null; throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\" | null; mutedInstanceIds: string[]; executionStatus: ",
{
"pluginId": "alerts",
"pluginId": "alerting",
"scope": "common",
"docId": "kibAlertsPluginApi",
"docId": "kibAlertingPluginApi",
"section": "def-common.AlertExecutionStatus",
"text": "AlertExecutionStatus"
},
Expand Down Expand Up @@ -2243,9 +2243,9 @@
"tags": [],
"description": [],
"source": {
"path": "x-pack/plugins/alerts/common/alert.ts",
"path": "x-pack/plugins/alerting/common/alert.ts",
"lineNumber": 12,
"link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L12"
"link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L12"
},
"signature": [
"{ [x: string]: unknown; }"
Expand Down
4 changes: 2 additions & 2 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ which will load the visualization's editor.
|The Kibana actions plugin provides a framework to create executable actions. You can:
|{kib-repo}blob/{branch}/x-pack/plugins/alerts/README.md[alerts]
|{kib-repo}blob/{branch}/x-pack/plugins/alerting/README.md[alerting]
|The Kibana alerting plugin provides a common place to set up alerts. You can:
Expand Down Expand Up @@ -519,7 +519,7 @@ Kibana.
|{kib-repo}blob/{branch}/x-pack/plugins/stack_alerts/README.md[stackAlerts]
|This plugin provides alertTypes shipped with Kibana for use with the
the alerts plugin. When enabled, it will register
the alerting plugin. When enabled, it will register
the alertTypes by the Stack in the alerting plugin, register associated HTTP
routes, etc.
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pageLoadAssetSize:
advancedSettings: 27596
alerts: 106936
alerting: 106936
apm: 64385
apmOss: 18996
beatsManagement: 188135
Expand Down
2 changes: 1 addition & 1 deletion rfcs/text/0003_handler_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ application.registerApp({
});

// Alerting
alerts.registerType({
alerting.registerType({
id: 'myAlert',
async execute(context, params, state) {
const indexPatterns = await context.core.savedObjects.find('indexPattern');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ kibana_vars=(
xpack.alerts.healthCheck.interval
xpack.alerts.invalidateApiKeysTask.interval
xpack.alerts.invalidateApiKeysTask.removalDelay
xpack.alerting.healthCheck.interval
xpack.alerting.invalidateApiKeysTask.interval
xpack.alerting.invalidateApiKeysTask.removalDelay
xpack.apm.enabled
xpack.apm.serviceMapEnabled
xpack.apm.ui.enabled
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.refs.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
{ "path": "./src/plugins/visualize/tsconfig.json" },
{ "path": "./src/plugins/index_pattern_management/tsconfig.json" },
{ "path": "./x-pack/plugins/actions/tsconfig.json" },
{ "path": "./x-pack/plugins/alerts/tsconfig.json" },
{ "path": "./x-pack/plugins/alerting/tsconfig.json" },
{ "path": "./x-pack/plugins/apm/tsconfig.json" },
{ "path": "./x-pack/plugins/beats_management/tsconfig.json" },
{ "path": "./x-pack/plugins/canvas/tsconfig.json" },
Expand Down
2 changes: 1 addition & 1 deletion x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"paths": {
"xpack.actions": "plugins/actions",
"xpack.uiActionsEnhanced": "plugins/ui_actions_enhanced",
"xpack.alerts": "plugins/alerts",
"xpack.alerting": "plugins/alerting",
"xpack.eventLog": "plugins/event_log",
"xpack.stackAlerts": "plugins/stack_alerts",
"xpack.apm": "plugins/apm",
Expand Down
2 changes: 1 addition & 1 deletion x-pack/examples/alerting_example/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { AlertTypeParams } from '../../../plugins/alerts/common';
import { AlertTypeParams } from '../../../plugins/alerting/common';

export const ALERTING_EXAMPLE_APP_ID = 'AlertingExample';

Expand Down
2 changes: 1 addition & 1 deletion x-pack/examples/alerting_example/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"kibanaVersion": "kibana",
"server": true,
"ui": true,
"requiredPlugins": ["triggersActionsUi", "charts", "data", "alerts", "actions", "kibanaReact", "features", "developerExamples"],
"requiredPlugins": ["triggersActionsUi", "charts", "data", "alerting", "actions", "kibanaReact", "features", "developerExamples"],
"optionalPlugins": [],
"requiredBundles": ["kibanaReact"]
}
Loading

0 comments on commit 23ce8dc

Please sign in to comment.