diff --git a/.eslintrc.js b/.eslintrc.js index f92ffbe056153..9f57ba4249e84 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -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', }, diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 041ae25f1d7f4..7995d5d5bba25 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -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 diff --git a/api_docs/alerts.json b/api_docs/alerting.json similarity index 76% rename from api_docs/alerts.json rename to api_docs/alerting.json index 371fc2b6472f5..239aa1c8dffec 100644 --- a/api_docs/alerts.json +++ b/api_docs/alerting.json @@ -1,5 +1,5 @@ { - "id": "alerts", + "id": "alerting", "client": { "classes": [], "functions": [], @@ -21,16 +21,16 @@ "label": "registerNavigation", "description": [], "source": { - "path": "x-pack/plugins/alerts/public/plugin.ts", + "path": "x-pack/plugins/alerting/public/plugin.ts", "lineNumber": 15, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/public/plugin.ts#L15" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/public/plugin.ts#L15" }, "signature": [ "(consumer: string, alertType: string, handler: ", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "public", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-public.AlertNavigationHandler", "text": "AlertNavigationHandler" }, @@ -44,16 +44,16 @@ "label": "registerDefaultNavigation", "description": [], "source": { - "path": "x-pack/plugins/alerts/public/plugin.ts", + "path": "x-pack/plugins/alerting/public/plugin.ts", "lineNumber": 20, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/public/plugin.ts#L20" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/public/plugin.ts#L20" }, "signature": [ "(consumer: string, handler: ", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "public", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-public.AlertNavigationHandler", "text": "AlertNavigationHandler" }, @@ -62,9 +62,9 @@ } ], "source": { - "path": "x-pack/plugins/alerts/public/plugin.ts", + "path": "x-pack/plugins/alerting/public/plugin.ts", "lineNumber": 14, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/public/plugin.ts#L14" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/public/plugin.ts#L14" }, "lifecycle": "setup", "initialIsOpen": true @@ -83,24 +83,24 @@ "label": "getNavigation", "description": [], "source": { - "path": "x-pack/plugins/alerts/public/plugin.ts", + "path": "x-pack/plugins/alerting/public/plugin.ts", "lineNumber": 23, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/public/plugin.ts#L23" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/public/plugin.ts#L23" }, "signature": [ "(alertId: string) => Promise<", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.AlertUrlNavigation", "text": "AlertUrlNavigation" }, " | ", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.AlertStateNavigation", "text": "AlertStateNavigation" }, @@ -109,9 +109,9 @@ } ], "source": { - "path": "x-pack/plugins/alerts/public/plugin.ts", + "path": "x-pack/plugins/alerting/public/plugin.ts", "lineNumber": 22, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/public/plugin.ts#L22" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/public/plugin.ts#L22" }, "lifecycle": "start", "initialIsOpen": true @@ -138,18 +138,18 @@ ], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/parse_duration.ts", + "path": "x-pack/plugins/alerting/common/parse_duration.ts", "lineNumber": 14, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/parse_duration.ts#L14" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/parse_duration.ts#L14" } } ], "tags": [], "returnComment": [], "source": { - "path": "x-pack/plugins/alerts/common/parse_duration.ts", + "path": "x-pack/plugins/alerting/common/parse_duration.ts", "lineNumber": 14, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/parse_duration.ts#L14" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/parse_duration.ts#L14" }, "initialIsOpen": false } @@ -169,9 +169,9 @@ "label": "name", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/types.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "lineNumber": 106, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/types.ts#L106" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/types.ts#L106" } }, { @@ -181,9 +181,9 @@ "label": "description", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/types.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "lineNumber": 107, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/types.ts#L107" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/types.ts#L107" } }, { @@ -193,9 +193,9 @@ "label": "useWithTripleBracesInTemplates", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/types.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "lineNumber": 108, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/types.ts#L108" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/types.ts#L108" }, "signature": [ "boolean | undefined" @@ -203,9 +203,9 @@ } ], "source": { - "path": "x-pack/plugins/alerts/server/types.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "lineNumber": 105, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/types.ts#L105" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/types.ts#L105" }, "initialIsOpen": false }, @@ -215,9 +215,9 @@ "label": "AlertType", "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "server", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-server.AlertType", "text": "AlertType" }, @@ -233,9 +233,9 @@ "label": "id", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/types.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "lineNumber": 132, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/types.ts#L132" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/types.ts#L132" } }, { @@ -245,9 +245,9 @@ "label": "name", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/types.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "lineNumber": 133, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/types.ts#L133" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/types.ts#L133" } }, { @@ -257,16 +257,16 @@ "label": "validate", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/types.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "lineNumber": 134, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/types.ts#L134" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/types.ts#L134" }, "signature": [ "{ params?: ", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "server", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-server.AlertTypeParamsValidator", "text": "AlertTypeParamsValidator" }, @@ -280,15 +280,15 @@ "label": "actionGroups", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/types.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "lineNumber": 137, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/types.ts#L137" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/types.ts#L137" }, "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.ActionGroup", "text": "ActionGroup" }, @@ -302,9 +302,9 @@ "label": "defaultActionGroupId", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/types.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "lineNumber": 138, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/types.ts#L138" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/types.ts#L138" }, "signature": [ "ActionGroupIds" @@ -317,15 +317,15 @@ "label": "recoveryActionGroup", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/types.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "lineNumber": 139, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/types.ts#L139" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/types.ts#L139" }, "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.ActionGroup", "text": "ActionGroup" }, @@ -339,23 +339,23 @@ "label": "executor", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/types.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "lineNumber": 140, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/types.ts#L140" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/types.ts#L140" }, "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "server", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-server.ExecutorType", "text": "ExecutorType" }, " Pick<", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "server", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-server.AlertInstance", "text": "AlertInstance" }, @@ -791,9 +791,9 @@ } ], "source": { - "path": "x-pack/plugins/alerts/server/types.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "lineNumber": 74, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/types.ts#L74" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/types.ts#L74" }, "initialIsOpen": false }, @@ -813,16 +813,16 @@ "label": "getAlertsClient", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/types.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "lineNumber": 47, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/types.ts#L47" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/types.ts#L47" }, "signature": [ "() => ", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "server", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-server.AlertsClient", "text": "AlertsClient" } @@ -835,16 +835,16 @@ "label": "listTypes", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/types.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "lineNumber": 48, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/types.ts#L48" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/types.ts#L48" }, "signature": [ "() => Set<", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "server", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-server.RegistryAlertType", "text": "RegistryAlertType" }, @@ -858,16 +858,16 @@ "label": "getFrameworkHealth", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/types.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "lineNumber": 49, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/types.ts#L49" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/types.ts#L49" }, "signature": [ "() => Promise<", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.AlertsHealth", "text": "AlertsHealth" }, @@ -876,9 +876,9 @@ } ], "source": { - "path": "x-pack/plugins/alerts/server/types.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "lineNumber": 46, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/types.ts#L46" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/types.ts#L46" }, "initialIsOpen": false }, @@ -896,9 +896,9 @@ "signature": [ " = Record, State extends Record = Record, InstanceState extends { [x: string]: unknown; } = { [x: string]: unknown; }, InstanceContext extends { [x: string]: unknown; } = { [x: string]: unknown; }, ActionGroupIds extends string = never, RecoveryActionGroupId extends string = never>(alertType: ", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "server", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-server.AlertType", "text": "AlertType" }, @@ -912,9 +912,9 @@ "isRequired": true, "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "server", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-server.AlertType", "text": "AlertType" }, @@ -922,25 +922,25 @@ ], "description": [], "source": { - "path": "x-pack/plugins/alerts/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/plugin.ts", "lineNumber": 112, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/plugin.ts#L112" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/plugin.ts#L112" } } ], "tags": [], "returnComment": [], "source": { - "path": "x-pack/plugins/alerts/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/plugin.ts", "lineNumber": 104, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/plugin.ts#L104" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/plugin.ts#L104" } } ], "source": { - "path": "x-pack/plugins/alerts/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/plugin.ts", "lineNumber": 103, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/plugin.ts#L103" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/plugin.ts#L103" }, "initialIsOpen": false }, @@ -958,16 +958,16 @@ "label": "listTypes", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/plugin.ts", "lineNumber": 124, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/plugin.ts#L124" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/plugin.ts#L124" }, "signature": [ "() => Set<", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "server", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-server.RegistryAlertType", "text": "RegistryAlertType" }, @@ -989,9 +989,9 @@ }, ") => Pick<", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "server", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-server.AlertsClient", "text": "AlertsClient" }, @@ -1015,18 +1015,18 @@ ], "description": [], "source": { - "path": "x-pack/plugins/alerts/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/plugin.ts", "lineNumber": 125, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/plugin.ts#L125" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/plugin.ts#L125" } } ], "tags": [], "returnComment": [], "source": { - "path": "x-pack/plugins/alerts/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/plugin.ts", "lineNumber": 125, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/plugin.ts#L125" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/plugin.ts#L125" } }, { @@ -1036,16 +1036,16 @@ "label": "getFrameworkHealth", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/plugin.ts", "lineNumber": 126, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/plugin.ts#L126" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/plugin.ts#L126" }, "signature": [ "() => Promise<", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.AlertsHealth", "text": "AlertsHealth" }, @@ -1054,9 +1054,9 @@ } ], "source": { - "path": "x-pack/plugins/alerts/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/plugin.ts", "lineNumber": 123, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/plugin.ts#L123" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/plugin.ts#L123" }, "initialIsOpen": false }, @@ -1066,9 +1066,9 @@ "label": "FindResult", "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "server", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-server.FindResult", "text": "FindResult" }, @@ -1084,9 +1084,9 @@ "label": "page", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/alerts_client/alerts_client.ts", + "path": "x-pack/plugins/alerting/server/alerts_client/alerts_client.ts", "lineNumber": 131, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/alerts_client/alerts_client.ts#L131" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/alerts_client/alerts_client.ts#L131" } }, { @@ -1096,9 +1096,9 @@ "label": "perPage", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/alerts_client/alerts_client.ts", + "path": "x-pack/plugins/alerting/server/alerts_client/alerts_client.ts", "lineNumber": 132, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/alerts_client/alerts_client.ts#L132" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/alerts_client/alerts_client.ts#L132" } }, { @@ -1108,9 +1108,9 @@ "label": "total", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/alerts_client/alerts_client.ts", + "path": "x-pack/plugins/alerting/server/alerts_client/alerts_client.ts", "lineNumber": 133, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/alerts_client/alerts_client.ts#L133" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/alerts_client/alerts_client.ts#L133" } }, { @@ -1120,16 +1120,16 @@ "label": "data", "description": [], "source": { - "path": "x-pack/plugins/alerts/server/alerts_client/alerts_client.ts", + "path": "x-pack/plugins/alerting/server/alerts_client/alerts_client.ts", "lineNumber": 134, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/alerts_client/alerts_client.ts#L134" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/alerts_client/alerts_client.ts#L134" }, "signature": [ "Pick<", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.Alert", "text": "Alert" }, @@ -1138,9 +1138,9 @@ } ], "source": { - "path": "x-pack/plugins/alerts/server/alerts_client/alerts_client.ts", + "path": "x-pack/plugins/alerting/server/alerts_client/alerts_client.ts", "lineNumber": 130, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/alerts_client/alerts_client.ts#L130" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/alerts_client/alerts_client.ts#L130" }, "initialIsOpen": false } @@ -1154,16 +1154,16 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/server/index.ts", + "path": "x-pack/plugins/alerting/server/index.ts", "lineNumber": 15, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/index.ts#L15" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/index.ts#L15" }, "signature": [ "{ get: ({ id, }: { id: string; }) => Promise) => Promise<", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.Alert", "text": "Alert" }, @@ -1181,9 +1181,9 @@ "FindOptions", " | undefined; }) => Promise<", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "server", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-server.FindResult", "text": "FindResult" } @@ -1197,9 +1197,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_type.ts", + "path": "x-pack/plugins/alerting/common/alert_type.ts", "lineNumber": 30, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_type.ts#L30" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_type.ts#L30" }, "signature": [ "T extends ActionGroup ? groups : T extends Readonly> ? groups : never" @@ -1213,9 +1213,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 40, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L40" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L40" }, "signature": [ "SavedObjectAttributes" @@ -1229,9 +1229,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 11, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L11" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L11" }, "signature": [ "{ [x: string]: unknown; }" @@ -1245,9 +1245,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; }" @@ -1261,9 +1261,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/server/types.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "lineNumber": 190, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/types.ts#L190" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/types.ts#L190" }, "signature": [ "Pick, \"id\"> & Partial, \"enabled\" | \"name\" | \"params\" | \"actions\" | \"muteAll\" | \"apiKey\" | \"tags\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"throttle\" | \"notifyWhen\" | \"mutedInstanceIds\" | \"executionStatus\">>" @@ -1277,9 +1277,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance.ts", + "path": "x-pack/plugins/alerting/common/alert_instance.ts", "lineNumber": 25, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance.ts#L25" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance.ts#L25" }, "signature": [ "{ [x: string]: unknown; }" @@ -1293,9 +1293,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance.ts", + "path": "x-pack/plugins/alerting/common/alert_instance.ts", "lineNumber": 28, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance.ts#L28" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance.ts#L28" }, "signature": [ "{ [x: string]: unknown; }" @@ -1309,9 +1309,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/server/alert_instance/alert_instance.ts", + "path": "x-pack/plugins/alerting/server/alert_instance/alert_instance.ts", "lineNumber": 30, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/server/alert_instance/alert_instance.ts#L30" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/server/alert_instance/alert_instance.ts#L30" }, "signature": [ "{ getState: () => State; replaceState: (state: State) => AlertInstance; scheduleActions: (actionGroup: ActionGroupIds, context?: Context) => AlertInstance; scheduleActionsWithSubGroup: (actionGroup: ActionGroupIds, subgroup: string, context?: Context) => AlertInstance; }" @@ -1331,25 +1331,25 @@ "signature": [ "(customRecoveryGroup: ", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.ActionGroup", "text": "ActionGroup" }, " | undefined) => [", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.ActionGroup", "text": "ActionGroup" }, "<", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.ReservedActionGroups", "text": "ReservedActionGroups" }, @@ -1363,9 +1363,9 @@ "isRequired": false, "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.ActionGroup", "text": "ActionGroup" }, @@ -1373,18 +1373,18 @@ ], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/builtin_action_groups.ts", + "path": "x-pack/plugins/alerting/common/builtin_action_groups.ts", "lineNumber": 31, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/builtin_action_groups.ts#L31" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/builtin_action_groups.ts#L31" } } ], "tags": [], "returnComment": [], "source": { - "path": "x-pack/plugins/alerts/common/builtin_action_groups.ts", + "path": "x-pack/plugins/alerting/common/builtin_action_groups.ts", "lineNumber": 30, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/builtin_action_groups.ts#L30" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/builtin_action_groups.ts#L30" }, "initialIsOpen": false }, @@ -1406,9 +1406,9 @@ ], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/disabled_action_groups.ts", + "path": "x-pack/plugins/alerting/common/disabled_action_groups.ts", "lineNumber": 19, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/disabled_action_groups.ts#L19" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/disabled_action_groups.ts#L19" } }, { @@ -1420,18 +1420,18 @@ ], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/disabled_action_groups.ts", + "path": "x-pack/plugins/alerting/common/disabled_action_groups.ts", "lineNumber": 20, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/disabled_action_groups.ts#L20" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/disabled_action_groups.ts#L20" } } ], "tags": [], "returnComment": [], "source": { - "path": "x-pack/plugins/alerts/common/disabled_action_groups.ts", + "path": "x-pack/plugins/alerting/common/disabled_action_groups.ts", "lineNumber": 18, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/disabled_action_groups.ts#L18" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/disabled_action_groups.ts#L18" }, "initialIsOpen": false }, @@ -1453,18 +1453,18 @@ ], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_notify_when_type.ts", + "path": "x-pack/plugins/alerting/common/alert_notify_when_type.ts", "lineNumber": 15, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_notify_when_type.ts#L15" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_notify_when_type.ts#L15" } } ], "tags": [], "returnComment": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_notify_when_type.ts", + "path": "x-pack/plugins/alerting/common/alert_notify_when_type.ts", "lineNumber": 15, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_notify_when_type.ts#L15" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_notify_when_type.ts#L15" }, "initialIsOpen": false }, @@ -1486,18 +1486,18 @@ ], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/parse_duration.ts", + "path": "x-pack/plugins/alerting/common/parse_duration.ts", "lineNumber": 14, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/parse_duration.ts#L14" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/parse_duration.ts#L14" } } ], "tags": [], "returnComment": [], "source": { - "path": "x-pack/plugins/alerts/common/parse_duration.ts", + "path": "x-pack/plugins/alerting/common/parse_duration.ts", "lineNumber": 14, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/parse_duration.ts#L14" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/parse_duration.ts#L14" }, "initialIsOpen": false }, @@ -1519,18 +1519,18 @@ ], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/parse_duration.ts", + "path": "x-pack/plugins/alerting/common/parse_duration.ts", "lineNumber": 30, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/parse_duration.ts#L30" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/parse_duration.ts#L30" } } ], "tags": [], "returnComment": [], "source": { - "path": "x-pack/plugins/alerts/common/parse_duration.ts", + "path": "x-pack/plugins/alerting/common/parse_duration.ts", "lineNumber": 30, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/parse_duration.ts#L30" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/parse_duration.ts#L30" }, "initialIsOpen": false }, @@ -1552,18 +1552,18 @@ ], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/parse_duration.ts", + "path": "x-pack/plugins/alerting/common/parse_duration.ts", "lineNumber": 34, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/parse_duration.ts#L34" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/parse_duration.ts#L34" } } ], "tags": [], "returnComment": [], "source": { - "path": "x-pack/plugins/alerts/common/parse_duration.ts", + "path": "x-pack/plugins/alerting/common/parse_duration.ts", "lineNumber": 34, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/parse_duration.ts#L34" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/parse_duration.ts#L34" }, "initialIsOpen": false }, @@ -1585,18 +1585,18 @@ ], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/parse_duration.ts", + "path": "x-pack/plugins/alerting/common/parse_duration.ts", "lineNumber": 39, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/parse_duration.ts#L39" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/parse_duration.ts#L39" } } ], "tags": [], "returnComment": [], "source": { - "path": "x-pack/plugins/alerts/common/parse_duration.ts", + "path": "x-pack/plugins/alerting/common/parse_duration.ts", "lineNumber": 39, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/parse_duration.ts#L39" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/parse_duration.ts#L39" }, "initialIsOpen": false } @@ -1616,9 +1616,9 @@ "label": "isSufficientlySecure", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/index.ts", + "path": "x-pack/plugins/alerting/common/index.ts", "lineNumber": 22, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/index.ts#L22" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/index.ts#L22" } }, { @@ -1628,9 +1628,9 @@ "label": "hasPermanentEncryptionKey", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/index.ts", + "path": "x-pack/plugins/alerting/common/index.ts", "lineNumber": 23, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/index.ts#L23" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/index.ts#L23" } }, { @@ -1640,15 +1640,15 @@ "label": "alertingFrameworkHeath", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/index.ts", + "path": "x-pack/plugins/alerting/common/index.ts", "lineNumber": 24, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/index.ts#L24" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/index.ts#L24" }, "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.AlertsHealth", "text": "AlertsHealth" } @@ -1656,9 +1656,9 @@ } ], "source": { - "path": "x-pack/plugins/alerts/common/index.ts", + "path": "x-pack/plugins/alerting/common/index.ts", "lineNumber": 21, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/index.ts#L21" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/index.ts#L21" }, "initialIsOpen": false }, @@ -1668,9 +1668,9 @@ "label": "IntervalSchedule", "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.IntervalSchedule", "text": "IntervalSchedule" }, @@ -1687,16 +1687,16 @@ "label": "interval", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 15, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L15" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L15" } } ], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 14, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L14" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L14" }, "initialIsOpen": false }, @@ -1714,9 +1714,9 @@ "label": "status", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 32, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L32" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L32" }, "signature": [ "\"unknown\" | \"error\" | \"pending\" | \"ok\" | \"active\"" @@ -1729,9 +1729,9 @@ "label": "lastExecutionDate", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 33, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L33" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L33" }, "signature": [ "Date" @@ -1744,16 +1744,16 @@ "label": "error", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 34, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L34" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L34" }, "signature": [ "{ reason: ", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.AlertExecutionStatusErrorReasons", "text": "AlertExecutionStatusErrorReasons" }, @@ -1762,9 +1762,9 @@ } ], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 31, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L31" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L31" }, "initialIsOpen": false }, @@ -1782,9 +1782,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" } }, { @@ -1794,9 +1794,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" } }, { @@ -1806,9 +1806,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" } }, { @@ -1818,9 +1818,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": [ { @@ -1834,9 +1834,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 }, @@ -1854,9 +1854,9 @@ "label": "alertExecutionStatus", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 51, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L51" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L51" }, "signature": [ "{ [status: string]: number; }" @@ -1864,9 +1864,9 @@ } ], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 50, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L50" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L50" }, "initialIsOpen": false }, @@ -1876,9 +1876,9 @@ "label": "Alert", "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.Alert", "text": "Alert" }, @@ -1894,9 +1894,9 @@ "label": "id", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 55, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L55" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L55" } }, { @@ -1906,9 +1906,9 @@ "label": "enabled", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 56, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L56" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L56" } }, { @@ -1918,9 +1918,9 @@ "label": "name", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 57, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L57" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L57" } }, { @@ -1930,9 +1930,9 @@ "label": "tags", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 58, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L58" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L58" }, "signature": [ "string[]" @@ -1945,9 +1945,9 @@ "label": "alertTypeId", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 59, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L59" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L59" } }, { @@ -1957,9 +1957,9 @@ "label": "consumer", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 60, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L60" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L60" } }, { @@ -1969,15 +1969,15 @@ "label": "schedule", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 61, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L61" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L61" }, "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.IntervalSchedule", "text": "IntervalSchedule" } @@ -1990,15 +1990,15 @@ "label": "actions", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 62, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L62" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L62" }, "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.AlertAction", "text": "AlertAction" }, @@ -2012,9 +2012,9 @@ "label": "params", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 63, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L63" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L63" }, "signature": [ "Params" @@ -2027,9 +2027,9 @@ "label": "scheduledTaskId", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 64, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L64" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L64" }, "signature": [ "string | undefined" @@ -2042,9 +2042,9 @@ "label": "createdBy", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 65, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L65" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L65" }, "signature": [ "string | null" @@ -2057,9 +2057,9 @@ "label": "updatedBy", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 66, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L66" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L66" }, "signature": [ "string | null" @@ -2072,9 +2072,9 @@ "label": "createdAt", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 67, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L67" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L67" }, "signature": [ "Date" @@ -2087,9 +2087,9 @@ "label": "updatedAt", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 68, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L68" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L68" }, "signature": [ "Date" @@ -2102,9 +2102,9 @@ "label": "apiKey", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 69, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L69" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L69" }, "signature": [ "string | null" @@ -2117,9 +2117,9 @@ "label": "apiKeyOwner", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 70, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L70" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L70" }, "signature": [ "string | null" @@ -2132,9 +2132,9 @@ "label": "throttle", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 71, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L71" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L71" }, "signature": [ "string | null" @@ -2147,9 +2147,9 @@ "label": "notifyWhen", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 72, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L72" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L72" }, "signature": [ "\"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\" | null" @@ -2162,9 +2162,9 @@ "label": "muteAll", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 73, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L73" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L73" } }, { @@ -2174,9 +2174,9 @@ "label": "mutedInstanceIds", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 74, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L74" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L74" }, "signature": [ "string[]" @@ -2189,15 +2189,15 @@ "label": "executionStatus", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 75, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L75" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L75" }, "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.AlertExecutionStatus", "text": "AlertExecutionStatus" } @@ -2205,9 +2205,9 @@ } ], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 54, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L54" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L54" }, "initialIsOpen": false }, @@ -2225,16 +2225,16 @@ "label": "decryptionHealth", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 87, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L87" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L87" }, "signature": [ "{ status: ", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.HealthStatus", "text": "HealthStatus" }, @@ -2248,16 +2248,16 @@ "label": "executionHealth", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 91, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L91" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L91" }, "signature": [ "{ status: ", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.HealthStatus", "text": "HealthStatus" }, @@ -2271,16 +2271,16 @@ "label": "readHealth", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 95, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L95" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L95" }, "signature": [ "{ status: ", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.HealthStatus", "text": "HealthStatus" }, @@ -2289,9 +2289,9 @@ } ], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 86, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L86" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L86" }, "initialIsOpen": false }, @@ -2301,9 +2301,9 @@ "label": "AlertType", "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.AlertType", "text": "AlertType" }, @@ -2319,9 +2319,9 @@ "label": "id", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_type.ts", + "path": "x-pack/plugins/alerting/common/alert_type.ts", "lineNumber": 15, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_type.ts#L15" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_type.ts#L15" } }, { @@ -2331,9 +2331,9 @@ "label": "name", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_type.ts", + "path": "x-pack/plugins/alerting/common/alert_type.ts", "lineNumber": 16, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_type.ts#L16" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_type.ts#L16" } }, { @@ -2343,15 +2343,15 @@ "label": "actionGroups", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_type.ts", + "path": "x-pack/plugins/alerting/common/alert_type.ts", "lineNumber": 17, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_type.ts#L17" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_type.ts#L17" }, "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.ActionGroup", "text": "ActionGroup" }, @@ -2365,15 +2365,15 @@ "label": "recoveryActionGroup", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_type.ts", + "path": "x-pack/plugins/alerting/common/alert_type.ts", "lineNumber": 18, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_type.ts#L18" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_type.ts#L18" }, "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.ActionGroup", "text": "ActionGroup" }, @@ -2387,9 +2387,9 @@ "label": "actionVariables", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_type.ts", + "path": "x-pack/plugins/alerting/common/alert_type.ts", "lineNumber": 19, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_type.ts#L19" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_type.ts#L19" }, "signature": [ "string[]" @@ -2402,9 +2402,9 @@ "label": "defaultActionGroupId", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_type.ts", + "path": "x-pack/plugins/alerting/common/alert_type.ts", "lineNumber": 20, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_type.ts#L20" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_type.ts#L20" }, "signature": [ "ActionGroupIds" @@ -2417,9 +2417,9 @@ "label": "producer", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_type.ts", + "path": "x-pack/plugins/alerting/common/alert_type.ts", "lineNumber": 21, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_type.ts#L21" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_type.ts#L21" } }, { @@ -2429,9 +2429,9 @@ "label": "minimumLicenseRequired", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_type.ts", + "path": "x-pack/plugins/alerting/common/alert_type.ts", "lineNumber": 22, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_type.ts#L22" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_type.ts#L22" }, "signature": [ "\"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\"" @@ -2439,9 +2439,9 @@ } ], "source": { - "path": "x-pack/plugins/alerts/common/alert_type.ts", + "path": "x-pack/plugins/alerting/common/alert_type.ts", "lineNumber": 11, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_type.ts#L11" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_type.ts#L11" }, "initialIsOpen": false }, @@ -2451,9 +2451,9 @@ "label": "ActionGroup", "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.ActionGroup", "text": "ActionGroup" }, @@ -2469,9 +2469,9 @@ "label": "id", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_type.ts", + "path": "x-pack/plugins/alerting/common/alert_type.ts", "lineNumber": 26, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_type.ts#L26" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_type.ts#L26" }, "signature": [ "ActionGroupIds" @@ -2484,16 +2484,16 @@ "label": "name", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_type.ts", + "path": "x-pack/plugins/alerting/common/alert_type.ts", "lineNumber": 27, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_type.ts#L27" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_type.ts#L27" } } ], "source": { - "path": "x-pack/plugins/alerts/common/alert_type.ts", + "path": "x-pack/plugins/alerting/common/alert_type.ts", "lineNumber": 25, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_type.ts#L25" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_type.ts#L25" }, "initialIsOpen": false }, @@ -2511,16 +2511,16 @@ "label": "path", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_navigation.ts", + "path": "x-pack/plugins/alerting/common/alert_navigation.ts", "lineNumber": 11, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_navigation.ts#L11" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_navigation.ts#L11" } } ], "source": { - "path": "x-pack/plugins/alerts/common/alert_navigation.ts", + "path": "x-pack/plugins/alerting/common/alert_navigation.ts", "lineNumber": 10, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_navigation.ts#L10" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_navigation.ts#L10" }, "initialIsOpen": false }, @@ -2538,9 +2538,9 @@ "label": "state", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_navigation.ts", + "path": "x-pack/plugins/alerting/common/alert_navigation.ts", "lineNumber": 14, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_navigation.ts#L14" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_navigation.ts#L14" }, "signature": [ { @@ -2554,9 +2554,9 @@ } ], "source": { - "path": "x-pack/plugins/alerts/common/alert_navigation.ts", + "path": "x-pack/plugins/alerting/common/alert_navigation.ts", "lineNumber": 13, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_navigation.ts#L13" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_navigation.ts#L13" }, "initialIsOpen": false }, @@ -2574,9 +2574,9 @@ "label": "id", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance_summary.ts", + "path": "x-pack/plugins/alerting/common/alert_instance_summary.ts", "lineNumber": 12, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance_summary.ts#L12" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance_summary.ts#L12" } }, { @@ -2586,9 +2586,9 @@ "label": "name", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance_summary.ts", + "path": "x-pack/plugins/alerting/common/alert_instance_summary.ts", "lineNumber": 13, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance_summary.ts#L13" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance_summary.ts#L13" } }, { @@ -2598,9 +2598,9 @@ "label": "tags", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance_summary.ts", + "path": "x-pack/plugins/alerting/common/alert_instance_summary.ts", "lineNumber": 14, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance_summary.ts#L14" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance_summary.ts#L14" }, "signature": [ "string[]" @@ -2613,9 +2613,9 @@ "label": "alertTypeId", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance_summary.ts", + "path": "x-pack/plugins/alerting/common/alert_instance_summary.ts", "lineNumber": 15, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance_summary.ts#L15" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance_summary.ts#L15" } }, { @@ -2625,9 +2625,9 @@ "label": "consumer", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance_summary.ts", + "path": "x-pack/plugins/alerting/common/alert_instance_summary.ts", "lineNumber": 16, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance_summary.ts#L16" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance_summary.ts#L16" } }, { @@ -2637,9 +2637,9 @@ "label": "muteAll", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance_summary.ts", + "path": "x-pack/plugins/alerting/common/alert_instance_summary.ts", "lineNumber": 17, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance_summary.ts#L17" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance_summary.ts#L17" } }, { @@ -2649,9 +2649,9 @@ "label": "throttle", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance_summary.ts", + "path": "x-pack/plugins/alerting/common/alert_instance_summary.ts", "lineNumber": 18, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance_summary.ts#L18" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance_summary.ts#L18" }, "signature": [ "string | null" @@ -2664,9 +2664,9 @@ "label": "enabled", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance_summary.ts", + "path": "x-pack/plugins/alerting/common/alert_instance_summary.ts", "lineNumber": 19, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance_summary.ts#L19" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance_summary.ts#L19" } }, { @@ -2676,9 +2676,9 @@ "label": "statusStartDate", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance_summary.ts", + "path": "x-pack/plugins/alerting/common/alert_instance_summary.ts", "lineNumber": 20, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance_summary.ts#L20" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance_summary.ts#L20" } }, { @@ -2688,9 +2688,9 @@ "label": "statusEndDate", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance_summary.ts", + "path": "x-pack/plugins/alerting/common/alert_instance_summary.ts", "lineNumber": 21, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance_summary.ts#L21" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance_summary.ts#L21" } }, { @@ -2700,15 +2700,15 @@ "label": "status", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance_summary.ts", + "path": "x-pack/plugins/alerting/common/alert_instance_summary.ts", "lineNumber": 22, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance_summary.ts#L22" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance_summary.ts#L22" }, "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.AlertStatusValues", "text": "AlertStatusValues" } @@ -2721,9 +2721,9 @@ "label": "lastRun", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance_summary.ts", + "path": "x-pack/plugins/alerting/common/alert_instance_summary.ts", "lineNumber": 23, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance_summary.ts#L23" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance_summary.ts#L23" }, "signature": [ "string | undefined" @@ -2736,9 +2736,9 @@ "label": "errorMessages", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance_summary.ts", + "path": "x-pack/plugins/alerting/common/alert_instance_summary.ts", "lineNumber": 24, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance_summary.ts#L24" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance_summary.ts#L24" }, "signature": [ "{ date: string; message: string; }[]" @@ -2751,16 +2751,16 @@ "label": "instances", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance_summary.ts", + "path": "x-pack/plugins/alerting/common/alert_instance_summary.ts", "lineNumber": 25, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance_summary.ts#L25" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance_summary.ts#L25" }, "signature": [ "Record ? groups : T extends Readonly> ? groups : never" @@ -3053,9 +3053,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance.ts", + "path": "x-pack/plugins/alerting/common/alert_instance.ts", "lineNumber": 22, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance.ts#L22" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance.ts#L22" }, "signature": [ "{ lastScheduledActions?: ({ subgroup?: string | undefined; } & { group: string; date: Date; }) | undefined; }" @@ -3069,9 +3069,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance.ts", + "path": "x-pack/plugins/alerting/common/alert_instance.ts", "lineNumber": 25, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance.ts#L25" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance.ts#L25" }, "signature": [ "{ [x: string]: unknown; }" @@ -3085,9 +3085,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance.ts", + "path": "x-pack/plugins/alerting/common/alert_instance.ts", "lineNumber": 28, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance.ts#L28" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance.ts#L28" }, "signature": [ "{ [x: string]: unknown; }" @@ -3101,9 +3101,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance.ts", + "path": "x-pack/plugins/alerting/common/alert_instance.ts", "lineNumber": 34, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance.ts#L34" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance.ts#L34" }, "signature": [ "{ state?: { [x: string]: unknown; } | undefined; meta?: { lastScheduledActions?: ({ subgroup?: string | undefined; } & { group: string; date: Date; }) | undefined; } | undefined; }" @@ -3117,9 +3117,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_task_instance.ts", + "path": "x-pack/plugins/alerting/common/alert_task_instance.ts", "lineNumber": 18, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_task_instance.ts#L18" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_task_instance.ts#L18" }, "signature": [ "{ alertTypeState?: { [x: string]: unknown; } | undefined; alertInstances?: { [x: string]: { state?: { [x: string]: unknown; } | undefined; meta?: { lastScheduledActions?: ({ subgroup?: string | undefined; } & { group: string; date: Date; }) | undefined; } | undefined; }; } | undefined; previousStartedAt?: Date | null | undefined; }" @@ -3133,9 +3133,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_task_instance.ts", + "path": "x-pack/plugins/alerting/common/alert_task_instance.ts", "lineNumber": 28, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_task_instance.ts#L28" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_task_instance.ts#L28" }, "signature": [ "{ alertId: string; } & { spaceId?: string | undefined; }" @@ -3149,23 +3149,23 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_navigation.ts", + "path": "x-pack/plugins/alerting/common/alert_navigation.ts", "lineNumber": 16, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_navigation.ts#L16" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_navigation.ts#L16" }, "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.AlertUrlNavigation", "text": "AlertUrlNavigation" }, " | ", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.AlertStateNavigation", "text": "AlertStateNavigation" } @@ -3179,9 +3179,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance_summary.ts", + "path": "x-pack/plugins/alerting/common/alert_instance_summary.ts", "lineNumber": 8, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance_summary.ts#L8" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance_summary.ts#L8" }, "signature": [ "\"OK\" | \"Active\" | \"Error\"" @@ -3195,9 +3195,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance_summary.ts", + "path": "x-pack/plugins/alerting/common/alert_instance_summary.ts", "lineNumber": 9, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance_summary.ts#L9" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance_summary.ts#L9" }, "signature": [ "\"OK\" | \"Active\"" @@ -3211,9 +3211,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/builtin_action_groups.ts", + "path": "x-pack/plugins/alerting/common/builtin_action_groups.ts", "lineNumber": 11, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/builtin_action_groups.ts#L11" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/builtin_action_groups.ts#L11" }, "signature": [ "\"default\"" @@ -3227,9 +3227,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/builtin_action_groups.ts", + "path": "x-pack/plugins/alerting/common/builtin_action_groups.ts", "lineNumber": 13, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/builtin_action_groups.ts#L13" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/builtin_action_groups.ts#L13" }, "signature": [ "\"recovered\"" @@ -3243,9 +3243,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/builtin_action_groups.ts", + "path": "x-pack/plugins/alerting/common/builtin_action_groups.ts", "lineNumber": 21, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/builtin_action_groups.ts#L21" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/builtin_action_groups.ts#L21" }, "signature": [ "RecoveryActionGroupId | \"recovered\"" @@ -3259,9 +3259,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/builtin_action_groups.ts", + "path": "x-pack/plugins/alerting/common/builtin_action_groups.ts", "lineNumber": 25, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/builtin_action_groups.ts#L25" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/builtin_action_groups.ts#L25" }, "signature": [ "ActionGroupIds extends ReservedActionGroups ? never : ActionGroupIds" @@ -3275,9 +3275,9 @@ "tags": [], "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_notify_when_type.ts", + "path": "x-pack/plugins/alerting/common/alert_notify_when_type.ts", "lineNumber": 13, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_notify_when_type.ts#L13" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_notify_when_type.ts#L13" }, "signature": [ "\"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"" @@ -3293,9 +3293,9 @@ "label": "AlertExecutionStatusValues", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert.ts", + "path": "x-pack/plugins/alerting/common/alert.ts", "lineNumber": 20, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert.ts#L20" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert.ts#L20" }, "signature": [ "readonly [\"ok\", \"active\", \"error\", \"pending\", \"unknown\"]" @@ -3309,9 +3309,9 @@ "label": "rawAlertInstance", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_instance.ts", + "path": "x-pack/plugins/alerting/common/alert_instance.ts", "lineNumber": 30, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_instance.ts#L30" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_instance.ts#L30" }, "signature": [ "PartialC", @@ -3333,9 +3333,9 @@ "label": "alertStateSchema", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_task_instance.ts", + "path": "x-pack/plugins/alerting/common/alert_task_instance.ts", "lineNumber": 12, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_task_instance.ts#L12" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_task_instance.ts#L12" }, "signature": [ "PartialC", @@ -3357,9 +3357,9 @@ "label": "alertParamsSchema", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/alert_task_instance.ts", + "path": "x-pack/plugins/alerting/common/alert_task_instance.ts", "lineNumber": 20, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/alert_task_instance.ts#L20" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/alert_task_instance.ts#L20" }, "signature": [ "IntersectionC", @@ -3381,16 +3381,16 @@ "label": "RecoveredActionGroup", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/builtin_action_groups.ts", + "path": "x-pack/plugins/alerting/common/builtin_action_groups.ts", "lineNumber": 14, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/builtin_action_groups.ts#L14" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/builtin_action_groups.ts#L14" }, "signature": [ "Readonly<", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.ActionGroup", "text": "ActionGroup" }, @@ -3405,9 +3405,9 @@ "label": "DisabledActionTypeIdsForActionGroup", "description": [], "source": { - "path": "x-pack/plugins/alerts/common/disabled_action_groups.ts", + "path": "x-pack/plugins/alerting/common/disabled_action_groups.ts", "lineNumber": 14, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerts/common/disabled_action_groups.ts#L14" + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/alerting/common/disabled_action_groups.ts#L14" }, "signature": [ "Map" diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx new file mode 100644 index 0000000000000..a0294a02d9f10 --- /dev/null +++ b/api_docs/alerting.mdx @@ -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 + + +### Start + + +## Server + +### Functions + + +### Interfaces + + +### Consts, variables and types + + +## Common + +### Objects + + +### Functions + + +### Interfaces + + +### Enums + + +### Consts, variables and types + + diff --git a/api_docs/alerts.mdx b/api_docs/alerts.mdx deleted file mode 100644 index 7dffe418963fd..0000000000000 --- a/api_docs/alerts.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -id: kibAlertsPluginApi -slug: /kibana-dev-docs/alertsPluginApi -title: alerts -image: https://source.unsplash.com/400x175/?github -summary: API docs for the alerts plugin -date: 2020-11-16 -tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerts'] -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 alertsObj from './alerts.json'; - -## Client - -### Setup - - -### Start - - -## Server - -### Functions - - -### Interfaces - - -### Consts, variables and types - - -## Common - -### Objects - - -### Functions - - -### Interfaces - - -### Enums - - -### Consts, variables and types - - diff --git a/api_docs/apm.json b/api_docs/apm.json index 316b49cb562be..a873a05a8e3ea 100644 --- a/api_docs/apm.json +++ b/api_docs/apm.json @@ -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", @@ -373,9 +373,9 @@ }, "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "server", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-server.PluginSetupContract", "text": "PluginSetupContract" }, diff --git a/api_docs/triggers_actions_ui.json b/api_docs/triggers_actions_ui.json index 17f0e2232b84d..dde960b0fe708 100644 --- a/api_docs/triggers_actions_ui.json +++ b/api_docs/triggers_actions_ui.json @@ -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" } }, { @@ -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" } }, { @@ -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" } }, { @@ -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": [ { @@ -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 }, @@ -1304,9 +1304,9 @@ "signature": [ "(key: Prop, value: Pick<", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.Alert", "text": "Alert" }, @@ -1359,9 +1359,9 @@ }, "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.ActionGroup", "text": "ActionGroup" }, @@ -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", @@ -1626,9 +1626,9 @@ }, "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "public", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-public.PluginStartContract", "text": "PluginStartContract" }, @@ -2119,17 +2119,17 @@ }, "signature": [ { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.ActionGroup", "text": "ActionGroup" }, " & { conditions?: T | undefined; isRequired?: false | undefined; } | ", { - "pluginId": "alerts", + "pluginId": "alerting", "scope": "common", - "docId": "kibAlertsPluginApi", + "docId": "kibAlertingPluginApi", "section": "def-common.ActionGroup", "text": "ActionGroup" }, @@ -2151,17 +2151,17 @@ "signature": [ "{ enabled: boolean; id: string; name: string; params: Record; 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" }, @@ -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; }" diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index f175c50939771..877026ef313ba 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -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: @@ -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. diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 57a24c6dc06bc..f228f5e93e5ce 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -1,6 +1,6 @@ pageLoadAssetSize: advancedSettings: 27596 - alerts: 106936 + alerting: 106936 apm: 64385 apmOss: 18996 beatsManagement: 188135 diff --git a/rfcs/text/0003_handler_interface.md b/rfcs/text/0003_handler_interface.md index 197f2a2012376..51e78cf7c9f54 100644 --- a/rfcs/text/0003_handler_interface.md +++ b/rfcs/text/0003_handler_interface.md @@ -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'); diff --git a/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker b/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker index bac44f6b9c221..9617a556e2cdd 100755 --- a/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker +++ b/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker @@ -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 diff --git a/tsconfig.refs.json b/tsconfig.refs.json index 428460e0bfeb5..5ffbd9d400985 100644 --- a/tsconfig.refs.json +++ b/tsconfig.refs.json @@ -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" }, diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index 9c779ddab5cf5..24d837708e9f7 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -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", diff --git a/x-pack/examples/alerting_example/common/constants.ts b/x-pack/examples/alerting_example/common/constants.ts index 58b208e50c706..14342e3381531 100644 --- a/x-pack/examples/alerting_example/common/constants.ts +++ b/x-pack/examples/alerting_example/common/constants.ts @@ -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'; diff --git a/x-pack/examples/alerting_example/kibana.json b/x-pack/examples/alerting_example/kibana.json index 0ddb3d2412f6d..f2950db96ba2c 100644 --- a/x-pack/examples/alerting_example/kibana.json +++ b/x-pack/examples/alerting_example/kibana.json @@ -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"] } diff --git a/x-pack/examples/alerting_example/public/alert_types/astros.tsx b/x-pack/examples/alerting_example/public/alert_types/astros.tsx index 946a631b29954..39be40540c1f4 100644 --- a/x-pack/examples/alerting_example/public/alert_types/astros.tsx +++ b/x-pack/examples/alerting_example/public/alert_types/astros.tsx @@ -20,12 +20,12 @@ import { import { i18n } from '@kbn/i18n'; import { flatten } from 'lodash'; import { ALERTING_EXAMPLE_APP_ID, Craft, Operator } from '../../common/constants'; -import { SanitizedAlert } from '../../../../plugins/alerts/common'; -import { PluginSetupContract as AlertingSetup } from '../../../../plugins/alerts/public'; +import { SanitizedAlert } from '../../../../plugins/alerting/common'; +import { PluginSetupContract as AlertingSetup } from '../../../../plugins/alerting/public'; import { AlertTypeModel } from '../../../../plugins/triggers_actions_ui/public'; -export function registerNavigation(alerts: AlertingSetup) { - alerts.registerNavigation( +export function registerNavigation(alerting: AlertingSetup) { + alerting.registerNavigation( ALERTING_EXAMPLE_APP_ID, 'example.people-in-space', (alert: SanitizedAlert) => `/astros/${alert.id}` diff --git a/x-pack/examples/alerting_example/public/alert_types/index.ts b/x-pack/examples/alerting_example/public/alert_types/index.ts index b611e574c2d81..dc900c325c67e 100644 --- a/x-pack/examples/alerting_example/public/alert_types/index.ts +++ b/x-pack/examples/alerting_example/public/alert_types/index.ts @@ -7,15 +7,15 @@ import { registerNavigation as registerPeopleInSpaceNavigation } from './astros'; import { ALERTING_EXAMPLE_APP_ID } from '../../common/constants'; -import { SanitizedAlert } from '../../../../plugins/alerts/common'; -import { PluginSetupContract as AlertingSetup } from '../../../../plugins/alerts/public'; +import { SanitizedAlert } from '../../../../plugins/alerting/common'; +import { PluginSetupContract as AlertingSetup } from '../../../../plugins/alerting/public'; -export function registerNavigation(alerts: AlertingSetup) { +export function registerNavigation(alerting: AlertingSetup) { // register default navigation - alerts.registerDefaultNavigation( + alerting.registerDefaultNavigation( ALERTING_EXAMPLE_APP_ID, (alert: SanitizedAlert) => `/alert/${alert.id}` ); - registerPeopleInSpaceNavigation(alerts); + registerPeopleInSpaceNavigation(alerting); } diff --git a/x-pack/examples/alerting_example/public/components/view_alert.tsx b/x-pack/examples/alerting_example/public/components/view_alert.tsx index bca129407b5b0..12f0eb6f35701 100644 --- a/x-pack/examples/alerting_example/public/components/view_alert.tsx +++ b/x-pack/examples/alerting_example/public/components/view_alert.tsx @@ -21,7 +21,7 @@ import { import { withRouter, RouteComponentProps } from 'react-router-dom'; import { CoreStart } from 'kibana/public'; import { isEmpty } from 'lodash'; -import { Alert, AlertTaskState, BASE_ALERT_API_PATH } from '../../../../plugins/alerts/common'; +import { Alert, AlertTaskState, BASE_ALERT_API_PATH } from '../../../../plugins/alerting/common'; import { ALERTING_EXAMPLE_APP_ID } from '../../common/constants'; type Props = RouteComponentProps & { diff --git a/x-pack/examples/alerting_example/public/components/view_astros_alert.tsx b/x-pack/examples/alerting_example/public/components/view_astros_alert.tsx index 91bb320af8cda..1d8bf4e3a71dd 100644 --- a/x-pack/examples/alerting_example/public/components/view_astros_alert.tsx +++ b/x-pack/examples/alerting_example/public/components/view_astros_alert.tsx @@ -23,7 +23,7 @@ import { import { withRouter, RouteComponentProps } from 'react-router-dom'; import { CoreStart } from 'kibana/public'; import { isEmpty } from 'lodash'; -import { Alert, AlertTaskState, BASE_ALERT_API_PATH } from '../../../../plugins/alerts/common'; +import { Alert, AlertTaskState, BASE_ALERT_API_PATH } from '../../../../plugins/alerting/common'; import { ALERTING_EXAMPLE_APP_ID, AlwaysFiringParams } from '../../common/constants'; type Props = RouteComponentProps & { diff --git a/x-pack/examples/alerting_example/public/plugin.tsx b/x-pack/examples/alerting_example/public/plugin.tsx index d65d71648f674..c8f69b21b4ee4 100644 --- a/x-pack/examples/alerting_example/public/plugin.tsx +++ b/x-pack/examples/alerting_example/public/plugin.tsx @@ -11,7 +11,7 @@ import { AppMountParameters, AppNavLinkStatus, } from '../../../../src/core/public'; -import { PluginSetupContract as AlertingSetup } from '../../../plugins/alerts/public'; +import { PluginSetupContract as AlertingSetup } from '../../../plugins/alerting/public'; import { ChartsPluginStart } from '../../../../src/plugins/charts/public'; import { TriggersAndActionsUIPublicPluginSetup, @@ -27,13 +27,13 @@ export type Setup = void; export type Start = void; export interface AlertingExamplePublicSetupDeps { - alerts: AlertingSetup; + alerting: AlertingSetup; triggersActionsUi: TriggersAndActionsUIPublicPluginSetup; developerExamples: DeveloperExamplesSetup; } export interface AlertingExamplePublicStartDeps { - alerts: AlertingSetup; + alerting: AlertingSetup; triggersActionsUi: TriggersAndActionsUIPublicPluginStart; charts: ChartsPluginStart; data: DataPublicPluginStart; @@ -42,7 +42,7 @@ export interface AlertingExamplePublicStartDeps { export class AlertingExamplePlugin implements Plugin { public setup( core: CoreSetup, - { alerts, triggersActionsUi, developerExamples }: AlertingExamplePublicSetupDeps + { alerting, triggersActionsUi, developerExamples }: AlertingExamplePublicSetupDeps ) { core.application.register({ id: 'AlertingExample', @@ -58,7 +58,7 @@ export class AlertingExamplePlugin implements Plugin { - public setup(core: CoreSetup, { alerts, features }: AlertingExampleDeps) { - alerts.registerType(alwaysFiringAlert); - alerts.registerType(peopleInSpaceAlert); + public setup(core: CoreSetup, { alerting, features }: AlertingExampleDeps) { + alerting.registerType(alwaysFiringAlert); + alerting.registerType(peopleInSpaceAlert); features.registerKibanaFeature({ id: ALERTING_EXAMPLE_APP_ID, diff --git a/x-pack/plugins/alerts/README.md b/x-pack/plugins/alerting/README.md similarity index 98% rename from x-pack/plugins/alerts/README.md rename to x-pack/plugins/alerting/README.md index 057d86e4c0f31..806d10b14ded1 100644 --- a/x-pack/plugins/alerts/README.md +++ b/x-pack/plugins/alerting/README.md @@ -64,8 +64,8 @@ When we update, enable, or disable an alert, we must invalidate the old API key To manage the invalidation process for API keys, we use the saved object `api_key_pending_invalidation`. This object stores all API keys that were marked for invalidation when alerts were updated. For security plugin invalidation, we schedule a task to check if the`api_key_pending_invalidation` saved object contains new API keys that are marked for invalidation earlier than the configured delay. The default value for running the task is 5 mins. -To change the schedule for the invalidation task, use the kibana.yml configuration option `xpack.alerts.invalidateApiKeysTask.interval`. -To change the default delay for the API key invalidation, use the kibana.yml configuration option `xpack.alerts.invalidateApiKeysTask.removalDelay`. +To change the schedule for the invalidation task, use the kibana.yml configuration option `xpack.alerting.invalidateApiKeysTask.interval`. +To change the default delay for the API key invalidation, use the kibana.yml configuration option `xpack.alerting.invalidateApiKeysTask.removalDelay`. ## Limitations @@ -100,13 +100,13 @@ core.status.set( ) ); ``` -To check for framework decryption failures, we use the task `alerting_health_check`, which runs every 60 minutes by default. To change the default schedule, use the kibana.yml configuration option `xpack.alerts.healthCheck.interval`. +To check for framework decryption failures, we use the task `alerting_health_check`, which runs every 60 minutes by default. To change the default schedule, use the kibana.yml configuration option `xpack.alerting.healthCheck.interval`. ## Alert types ### Methods -**server.newPlatform.setup.plugins.alerts.registerType(options)** +**server.newPlatform.setup.plugins.alerting.registerType(options)** The following table describes the properties of the `options` object. @@ -186,13 +186,13 @@ This example receives server and threshold as parameters. It will read the CPU u ```typescript import { schema } from '@kbn/config-schema'; -import { AlertType, AlertExecutorOptions } from '../../../alerts/server'; +import { AlertType, AlertExecutorOptions } from '../../../alerting/server'; import { AlertTypeParams, AlertTypeState, AlertInstanceState, AlertInstanceContext, -} from '../../../alerts/common'; +} from '../../../alerting/common'; ... interface MyAlertTypeParams extends AlertTypeParams { server: string; @@ -298,7 +298,7 @@ const myAlertType: AlertType< producer: 'alerting', }; -server.newPlatform.setup.plugins.alerts.registerType(myAlertType); +server.newPlatform.setup.plugins.alerting.registerType(myAlertType); ``` ## Role Based Access-Control diff --git a/x-pack/plugins/alerts/common/alert.ts b/x-pack/plugins/alerting/common/alert.ts similarity index 100% rename from x-pack/plugins/alerts/common/alert.ts rename to x-pack/plugins/alerting/common/alert.ts diff --git a/x-pack/plugins/alerts/common/alert_instance.ts b/x-pack/plugins/alerting/common/alert_instance.ts similarity index 100% rename from x-pack/plugins/alerts/common/alert_instance.ts rename to x-pack/plugins/alerting/common/alert_instance.ts diff --git a/x-pack/plugins/alerts/common/alert_instance_summary.ts b/x-pack/plugins/alerting/common/alert_instance_summary.ts similarity index 100% rename from x-pack/plugins/alerts/common/alert_instance_summary.ts rename to x-pack/plugins/alerting/common/alert_instance_summary.ts diff --git a/x-pack/plugins/alerts/common/alert_navigation.ts b/x-pack/plugins/alerting/common/alert_navigation.ts similarity index 100% rename from x-pack/plugins/alerts/common/alert_navigation.ts rename to x-pack/plugins/alerting/common/alert_navigation.ts diff --git a/x-pack/plugins/alerts/common/alert_notify_when_type.test.ts b/x-pack/plugins/alerting/common/alert_notify_when_type.test.ts similarity index 100% rename from x-pack/plugins/alerts/common/alert_notify_when_type.test.ts rename to x-pack/plugins/alerting/common/alert_notify_when_type.test.ts diff --git a/x-pack/plugins/alerts/common/alert_notify_when_type.ts b/x-pack/plugins/alerting/common/alert_notify_when_type.ts similarity index 100% rename from x-pack/plugins/alerts/common/alert_notify_when_type.ts rename to x-pack/plugins/alerting/common/alert_notify_when_type.ts diff --git a/x-pack/plugins/alerts/common/alert_task_instance.ts b/x-pack/plugins/alerting/common/alert_task_instance.ts similarity index 100% rename from x-pack/plugins/alerts/common/alert_task_instance.ts rename to x-pack/plugins/alerting/common/alert_task_instance.ts diff --git a/x-pack/plugins/alerts/common/alert_type.ts b/x-pack/plugins/alerting/common/alert_type.ts similarity index 100% rename from x-pack/plugins/alerts/common/alert_type.ts rename to x-pack/plugins/alerting/common/alert_type.ts diff --git a/x-pack/plugins/alerts/common/builtin_action_groups.ts b/x-pack/plugins/alerting/common/builtin_action_groups.ts similarity index 94% rename from x-pack/plugins/alerts/common/builtin_action_groups.ts rename to x-pack/plugins/alerting/common/builtin_action_groups.ts index 9a73958903758..ada5f08e85d92 100644 --- a/x-pack/plugins/alerts/common/builtin_action_groups.ts +++ b/x-pack/plugins/alerting/common/builtin_action_groups.ts @@ -13,7 +13,7 @@ export type DefaultActionGroupId = 'default'; export type RecoveredActionGroupId = typeof RecoveredActionGroup['id']; export const RecoveredActionGroup: Readonly> = Object.freeze({ id: 'recovered', - name: i18n.translate('xpack.alerts.builtinActionGroups.recovered', { + name: i18n.translate('xpack.alerting.builtinActionGroups.recovered', { defaultMessage: 'Recovered', }), }); diff --git a/x-pack/plugins/alerts/common/date_from_string.test.ts b/x-pack/plugins/alerting/common/date_from_string.test.ts similarity index 100% rename from x-pack/plugins/alerts/common/date_from_string.test.ts rename to x-pack/plugins/alerting/common/date_from_string.test.ts diff --git a/x-pack/plugins/alerts/common/date_from_string.ts b/x-pack/plugins/alerting/common/date_from_string.ts similarity index 100% rename from x-pack/plugins/alerts/common/date_from_string.ts rename to x-pack/plugins/alerting/common/date_from_string.ts diff --git a/x-pack/plugins/alerts/common/disabled_action_groups.test.ts b/x-pack/plugins/alerting/common/disabled_action_groups.test.ts similarity index 100% rename from x-pack/plugins/alerts/common/disabled_action_groups.test.ts rename to x-pack/plugins/alerting/common/disabled_action_groups.test.ts diff --git a/x-pack/plugins/alerts/common/disabled_action_groups.ts b/x-pack/plugins/alerting/common/disabled_action_groups.ts similarity index 100% rename from x-pack/plugins/alerts/common/disabled_action_groups.ts rename to x-pack/plugins/alerting/common/disabled_action_groups.ts diff --git a/x-pack/plugins/alerts/common/index.ts b/x-pack/plugins/alerting/common/index.ts similarity index 100% rename from x-pack/plugins/alerts/common/index.ts rename to x-pack/plugins/alerting/common/index.ts diff --git a/x-pack/plugins/alerts/common/parse_duration.test.ts b/x-pack/plugins/alerting/common/parse_duration.test.ts similarity index 100% rename from x-pack/plugins/alerts/common/parse_duration.test.ts rename to x-pack/plugins/alerting/common/parse_duration.test.ts diff --git a/x-pack/plugins/alerts/common/parse_duration.ts b/x-pack/plugins/alerting/common/parse_duration.ts similarity index 100% rename from x-pack/plugins/alerts/common/parse_duration.ts rename to x-pack/plugins/alerting/common/parse_duration.ts diff --git a/x-pack/plugins/alerts/jest.config.js b/x-pack/plugins/alerting/jest.config.js similarity index 87% rename from x-pack/plugins/alerts/jest.config.js rename to x-pack/plugins/alerting/jest.config.js index 848b17b63b109..1f34005415cca 100644 --- a/x-pack/plugins/alerts/jest.config.js +++ b/x-pack/plugins/alerting/jest.config.js @@ -8,5 +8,5 @@ module.exports = { preset: '@kbn/test', rootDir: '../../..', - roots: ['/x-pack/plugins/alerts'], + roots: ['/x-pack/plugins/alerting'], }; diff --git a/x-pack/plugins/alerts/kibana.json b/x-pack/plugins/alerting/kibana.json similarity index 86% rename from x-pack/plugins/alerts/kibana.json rename to x-pack/plugins/alerting/kibana.json index a2cb237467f11..af2d08e69f597 100644 --- a/x-pack/plugins/alerts/kibana.json +++ b/x-pack/plugins/alerting/kibana.json @@ -1,10 +1,10 @@ { - "id": "alerts", + "id": "alerting", "server": true, "ui": true, "version": "8.0.0", "kibanaVersion": "kibana", - "configPath": ["xpack", "alerts"], + "configPath": ["xpack", "alerting"], "requiredPlugins": [ "actions", "encryptedSavedObjects", diff --git a/x-pack/plugins/alerts/public/alert_api.test.ts b/x-pack/plugins/alerting/public/alert_api.test.ts similarity index 100% rename from x-pack/plugins/alerts/public/alert_api.test.ts rename to x-pack/plugins/alerting/public/alert_api.test.ts diff --git a/x-pack/plugins/alerts/public/alert_api.ts b/x-pack/plugins/alerting/public/alert_api.ts similarity index 94% rename from x-pack/plugins/alerts/public/alert_api.ts rename to x-pack/plugins/alerting/public/alert_api.ts index fc37ba59ad4c3..6eb2e29a7e8e5 100644 --- a/x-pack/plugins/alerts/public/alert_api.ts +++ b/x-pack/plugins/alerting/public/alert_api.ts @@ -26,7 +26,7 @@ export async function loadAlertType({ )) as AlertType[]).find((type) => type.id === id); if (!maybeAlertType) { throw new Error( - i18n.translate('xpack.alerts.loadAlertType.missingAlertTypeError', { + i18n.translate('xpack.alerting.loadAlertType.missingAlertTypeError', { defaultMessage: 'Alert type "{id}" is not registered.', values: { id, diff --git a/x-pack/plugins/alerts/public/alert_navigation_registry/alert_navigation_registry.mock.ts b/x-pack/plugins/alerting/public/alert_navigation_registry/alert_navigation_registry.mock.ts similarity index 100% rename from x-pack/plugins/alerts/public/alert_navigation_registry/alert_navigation_registry.mock.ts rename to x-pack/plugins/alerting/public/alert_navigation_registry/alert_navigation_registry.mock.ts diff --git a/x-pack/plugins/alerts/public/alert_navigation_registry/alert_navigation_registry.test.ts b/x-pack/plugins/alerting/public/alert_navigation_registry/alert_navigation_registry.test.ts similarity index 100% rename from x-pack/plugins/alerts/public/alert_navigation_registry/alert_navigation_registry.test.ts rename to x-pack/plugins/alerting/public/alert_navigation_registry/alert_navigation_registry.test.ts diff --git a/x-pack/plugins/alerts/public/alert_navigation_registry/alert_navigation_registry.ts b/x-pack/plugins/alerting/public/alert_navigation_registry/alert_navigation_registry.ts similarity index 90% rename from x-pack/plugins/alerts/public/alert_navigation_registry/alert_navigation_registry.ts rename to x-pack/plugins/alerting/public/alert_navigation_registry/alert_navigation_registry.ts index 0815e6434fded..21f3917f2f077 100644 --- a/x-pack/plugins/alerts/public/alert_navigation_registry/alert_navigation_registry.ts +++ b/x-pack/plugins/alerting/public/alert_navigation_registry/alert_navigation_registry.ts @@ -37,7 +37,7 @@ export class AlertNavigationRegistry { public registerDefault(consumer: string, handler: AlertNavigationHandler) { if (this.hasDefaultHandler(consumer)) { throw new Error( - i18n.translate('xpack.alerts.alertNavigationRegistry.register.duplicateDefaultError', { + i18n.translate('xpack.alerting.alertNavigationRegistry.register.duplicateDefaultError', { defaultMessage: 'Default Navigation within "{consumer}" is already registered.', values: { consumer, @@ -55,7 +55,7 @@ export class AlertNavigationRegistry { public register(consumer: string, alertType: AlertType, handler: AlertNavigationHandler) { if (this.hasTypedHandler(consumer, alertType)) { throw new Error( - i18n.translate('xpack.alerts.alertNavigationRegistry.register.duplicateNavigationError', { + i18n.translate('xpack.alerting.alertNavigationRegistry.register.duplicateNavigationError', { defaultMessage: 'Navigation for Alert type "{alertType}" within "{consumer}" is already registered.', values: { @@ -79,7 +79,7 @@ export class AlertNavigationRegistry { } throw new Error( - i18n.translate('xpack.alerts.alertNavigationRegistry.get.missingNavigationError', { + i18n.translate('xpack.alerting.alertNavigationRegistry.get.missingNavigationError', { defaultMessage: 'Navigation for Alert type "{alertType}" within "{consumer}" is not registered.', values: { diff --git a/x-pack/plugins/alerts/public/alert_navigation_registry/index.ts b/x-pack/plugins/alerting/public/alert_navigation_registry/index.ts similarity index 100% rename from x-pack/plugins/alerts/public/alert_navigation_registry/index.ts rename to x-pack/plugins/alerting/public/alert_navigation_registry/index.ts diff --git a/x-pack/plugins/alerts/public/alert_navigation_registry/types.ts b/x-pack/plugins/alerting/public/alert_navigation_registry/types.ts similarity index 100% rename from x-pack/plugins/alerts/public/alert_navigation_registry/types.ts rename to x-pack/plugins/alerting/public/alert_navigation_registry/types.ts diff --git a/x-pack/plugins/alerts/public/index.ts b/x-pack/plugins/alerting/public/index.ts similarity index 100% rename from x-pack/plugins/alerts/public/index.ts rename to x-pack/plugins/alerting/public/index.ts diff --git a/x-pack/plugins/alerts/public/mocks.ts b/x-pack/plugins/alerting/public/mocks.ts similarity index 100% rename from x-pack/plugins/alerts/public/mocks.ts rename to x-pack/plugins/alerting/public/mocks.ts diff --git a/x-pack/plugins/alerts/public/plugin.ts b/x-pack/plugins/alerting/public/plugin.ts similarity index 100% rename from x-pack/plugins/alerts/public/plugin.ts rename to x-pack/plugins/alerting/public/plugin.ts diff --git a/x-pack/plugins/alerts/server/alert_instance/alert_instance.test.ts b/x-pack/plugins/alerting/server/alert_instance/alert_instance.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alert_instance/alert_instance.test.ts rename to x-pack/plugins/alerting/server/alert_instance/alert_instance.test.ts diff --git a/x-pack/plugins/alerts/server/alert_instance/alert_instance.ts b/x-pack/plugins/alerting/server/alert_instance/alert_instance.ts similarity index 100% rename from x-pack/plugins/alerts/server/alert_instance/alert_instance.ts rename to x-pack/plugins/alerting/server/alert_instance/alert_instance.ts diff --git a/x-pack/plugins/alerts/server/alert_instance/create_alert_instance_factory.test.ts b/x-pack/plugins/alerting/server/alert_instance/create_alert_instance_factory.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alert_instance/create_alert_instance_factory.test.ts rename to x-pack/plugins/alerting/server/alert_instance/create_alert_instance_factory.test.ts diff --git a/x-pack/plugins/alerts/server/alert_instance/create_alert_instance_factory.ts b/x-pack/plugins/alerting/server/alert_instance/create_alert_instance_factory.ts similarity index 100% rename from x-pack/plugins/alerts/server/alert_instance/create_alert_instance_factory.ts rename to x-pack/plugins/alerting/server/alert_instance/create_alert_instance_factory.ts diff --git a/x-pack/plugins/alerts/server/alert_instance/index.ts b/x-pack/plugins/alerting/server/alert_instance/index.ts similarity index 100% rename from x-pack/plugins/alerts/server/alert_instance/index.ts rename to x-pack/plugins/alerting/server/alert_instance/index.ts diff --git a/x-pack/plugins/alerts/server/alert_type_registry.mock.ts b/x-pack/plugins/alerting/server/alert_type_registry.mock.ts similarity index 100% rename from x-pack/plugins/alerts/server/alert_type_registry.mock.ts rename to x-pack/plugins/alerting/server/alert_type_registry.mock.ts diff --git a/x-pack/plugins/alerts/server/alert_type_registry.test.ts b/x-pack/plugins/alerting/server/alert_type_registry.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alert_type_registry.test.ts rename to x-pack/plugins/alerting/server/alert_type_registry.test.ts diff --git a/x-pack/plugins/alerts/server/alert_type_registry.ts b/x-pack/plugins/alerting/server/alert_type_registry.ts similarity index 96% rename from x-pack/plugins/alerts/server/alert_type_registry.ts rename to x-pack/plugins/alerting/server/alert_type_registry.ts index 11e01dd5139ec..21feb76926791 100644 --- a/x-pack/plugins/alerts/server/alert_type_registry.ts +++ b/x-pack/plugins/alerting/server/alert_type_registry.ts @@ -148,7 +148,7 @@ export class AlertTypeRegistry { ) { if (this.has(alertType.id)) { throw new Error( - i18n.translate('xpack.alerts.alertTypeRegistry.register.duplicateAlertTypeError', { + i18n.translate('xpack.alerting.alertTypeRegistry.register.duplicateAlertTypeError', { defaultMessage: 'Alert type "{id}" is already registered.', values: { id: alertType.id, @@ -214,7 +214,7 @@ export class AlertTypeRegistry { > { if (!this.has(id)) { throw Boom.badRequest( - i18n.translate('xpack.alerts.alertTypeRegistry.get.missingAlertTypeError', { + i18n.translate('xpack.alerting.alertTypeRegistry.get.missingAlertTypeError', { defaultMessage: 'Alert type "{id}" is not registered.', values: { id, @@ -314,7 +314,7 @@ function augmentActionGroupsWithReserved< if (recoveryActionGroup && activeActionGroups.has(recoveryActionGroup.id)) { throw new Error( i18n.translate( - 'xpack.alerts.alertTypeRegistry.register.customRecoveryActionGroupUsageError', + 'xpack.alerting.alertTypeRegistry.register.customRecoveryActionGroupUsageError', { defaultMessage: 'Alert type [id="{id}"] cannot be registered. Action group [{actionGroup}] cannot be used as both a recovery and an active action group.', @@ -327,7 +327,7 @@ function augmentActionGroupsWithReserved< ); } else if (intersectingReservedActionGroups.length > 0) { throw new Error( - i18n.translate('xpack.alerts.alertTypeRegistry.register.reservedActionGroupUsageError', { + i18n.translate('xpack.alerting.alertTypeRegistry.register.reservedActionGroupUsageError', { defaultMessage: 'Alert type [id="{id}"] cannot be registered. Action groups [{actionGroups}] are reserved by the framework.', values: { diff --git a/x-pack/plugins/alerts/server/alerts_client.mock.ts b/x-pack/plugins/alerting/server/alerts_client.mock.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client.mock.ts rename to x-pack/plugins/alerting/server/alerts_client.mock.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/alerts_client.ts b/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts similarity index 99% rename from x-pack/plugins/alerts/server/alerts_client/alerts_client.ts rename to x-pack/plugins/alerting/server/alerts_client/alerts_client.ts index 8ec7b36f595c7..d8604827ae3a4 100644 --- a/x-pack/plugins/alerts/server/alerts_client/alerts_client.ts +++ b/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts @@ -1415,7 +1415,7 @@ export class AlertsClient { ); if (invalidActionGroups.length) { throw Boom.badRequest( - i18n.translate('xpack.alerts.alertsClient.validateActions.invalidGroups', { + i18n.translate('xpack.alerting.alertsClient.validateActions.invalidGroups', { defaultMessage: 'Invalid action groups: {groups}', values: { groups: invalidActionGroups.join(', '), @@ -1493,7 +1493,7 @@ function parseDate(dateString: string | undefined, propertyName: string, default const parsedDate = parseIsoOrRelativeDate(dateString); if (parsedDate === undefined) { throw Boom.badRequest( - i18n.translate('xpack.alerts.alertsClient.invalidDate', { + i18n.translate('xpack.alerting.alertsClient.invalidDate', { defaultMessage: 'Invalid date for parameter {field}: "{dateValue}"', values: { field: propertyName, diff --git a/x-pack/plugins/alerts/server/alerts_client/audit_events.test.ts b/x-pack/plugins/alerting/server/alerts_client/audit_events.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/audit_events.test.ts rename to x-pack/plugins/alerting/server/alerts_client/audit_events.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/audit_events.ts b/x-pack/plugins/alerting/server/alerts_client/audit_events.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/audit_events.ts rename to x-pack/plugins/alerting/server/alerts_client/audit_events.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/index.ts b/x-pack/plugins/alerting/server/alerts_client/index.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/index.ts rename to x-pack/plugins/alerting/server/alerts_client/index.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/tests/aggregate.test.ts b/x-pack/plugins/alerting/server/alerts_client/tests/aggregate.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/tests/aggregate.test.ts rename to x-pack/plugins/alerting/server/alerts_client/tests/aggregate.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/tests/create.test.ts b/x-pack/plugins/alerting/server/alerts_client/tests/create.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/tests/create.test.ts rename to x-pack/plugins/alerting/server/alerts_client/tests/create.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/tests/delete.test.ts b/x-pack/plugins/alerting/server/alerts_client/tests/delete.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/tests/delete.test.ts rename to x-pack/plugins/alerting/server/alerts_client/tests/delete.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/tests/disable.test.ts b/x-pack/plugins/alerting/server/alerts_client/tests/disable.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/tests/disable.test.ts rename to x-pack/plugins/alerting/server/alerts_client/tests/disable.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/tests/enable.test.ts b/x-pack/plugins/alerting/server/alerts_client/tests/enable.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/tests/enable.test.ts rename to x-pack/plugins/alerting/server/alerts_client/tests/enable.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/tests/find.test.ts b/x-pack/plugins/alerting/server/alerts_client/tests/find.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/tests/find.test.ts rename to x-pack/plugins/alerting/server/alerts_client/tests/find.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/tests/get.test.ts b/x-pack/plugins/alerting/server/alerts_client/tests/get.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/tests/get.test.ts rename to x-pack/plugins/alerting/server/alerts_client/tests/get.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/tests/get_alert_instance_summary.test.ts b/x-pack/plugins/alerting/server/alerts_client/tests/get_alert_instance_summary.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/tests/get_alert_instance_summary.test.ts rename to x-pack/plugins/alerting/server/alerts_client/tests/get_alert_instance_summary.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/tests/get_alert_state.test.ts b/x-pack/plugins/alerting/server/alerts_client/tests/get_alert_state.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/tests/get_alert_state.test.ts rename to x-pack/plugins/alerting/server/alerts_client/tests/get_alert_state.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/tests/lib.ts b/x-pack/plugins/alerting/server/alerts_client/tests/lib.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/tests/lib.ts rename to x-pack/plugins/alerting/server/alerts_client/tests/lib.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/tests/list_alert_types.test.ts b/x-pack/plugins/alerting/server/alerts_client/tests/list_alert_types.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/tests/list_alert_types.test.ts rename to x-pack/plugins/alerting/server/alerts_client/tests/list_alert_types.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/tests/mute_all.test.ts b/x-pack/plugins/alerting/server/alerts_client/tests/mute_all.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/tests/mute_all.test.ts rename to x-pack/plugins/alerting/server/alerts_client/tests/mute_all.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/tests/mute_instance.test.ts b/x-pack/plugins/alerting/server/alerts_client/tests/mute_instance.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/tests/mute_instance.test.ts rename to x-pack/plugins/alerting/server/alerts_client/tests/mute_instance.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/tests/unmute_all.test.ts b/x-pack/plugins/alerting/server/alerts_client/tests/unmute_all.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/tests/unmute_all.test.ts rename to x-pack/plugins/alerting/server/alerts_client/tests/unmute_all.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/tests/unmute_instance.test.ts b/x-pack/plugins/alerting/server/alerts_client/tests/unmute_instance.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/tests/unmute_instance.test.ts rename to x-pack/plugins/alerting/server/alerts_client/tests/unmute_instance.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/tests/update.test.ts b/x-pack/plugins/alerting/server/alerts_client/tests/update.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/tests/update.test.ts rename to x-pack/plugins/alerting/server/alerts_client/tests/update.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client/tests/update_api_key.test.ts b/x-pack/plugins/alerting/server/alerts_client/tests/update_api_key.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client/tests/update_api_key.test.ts rename to x-pack/plugins/alerting/server/alerts_client/tests/update_api_key.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client_conflict_retries.test.ts b/x-pack/plugins/alerting/server/alerts_client_conflict_retries.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client_conflict_retries.test.ts rename to x-pack/plugins/alerting/server/alerts_client_conflict_retries.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client_factory.test.ts b/x-pack/plugins/alerting/server/alerts_client_factory.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client_factory.test.ts rename to x-pack/plugins/alerting/server/alerts_client_factory.test.ts diff --git a/x-pack/plugins/alerts/server/alerts_client_factory.ts b/x-pack/plugins/alerting/server/alerts_client_factory.ts similarity index 100% rename from x-pack/plugins/alerts/server/alerts_client_factory.ts rename to x-pack/plugins/alerting/server/alerts_client_factory.ts diff --git a/x-pack/plugins/alerts/server/authorization/__snapshots__/alerts_authorization.test.ts.snap b/x-pack/plugins/alerting/server/authorization/__snapshots__/alerts_authorization.test.ts.snap similarity index 100% rename from x-pack/plugins/alerts/server/authorization/__snapshots__/alerts_authorization.test.ts.snap rename to x-pack/plugins/alerting/server/authorization/__snapshots__/alerts_authorization.test.ts.snap diff --git a/x-pack/plugins/alerts/server/authorization/__snapshots__/alerts_authorization_kuery.test.ts.snap b/x-pack/plugins/alerting/server/authorization/__snapshots__/alerts_authorization_kuery.test.ts.snap similarity index 100% rename from x-pack/plugins/alerts/server/authorization/__snapshots__/alerts_authorization_kuery.test.ts.snap rename to x-pack/plugins/alerting/server/authorization/__snapshots__/alerts_authorization_kuery.test.ts.snap diff --git a/x-pack/plugins/alerts/server/authorization/alerts_authorization.mock.ts b/x-pack/plugins/alerting/server/authorization/alerts_authorization.mock.ts similarity index 100% rename from x-pack/plugins/alerts/server/authorization/alerts_authorization.mock.ts rename to x-pack/plugins/alerting/server/authorization/alerts_authorization.mock.ts diff --git a/x-pack/plugins/alerts/server/authorization/alerts_authorization.test.ts b/x-pack/plugins/alerting/server/authorization/alerts_authorization.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/authorization/alerts_authorization.test.ts rename to x-pack/plugins/alerting/server/authorization/alerts_authorization.test.ts diff --git a/x-pack/plugins/alerts/server/authorization/alerts_authorization.ts b/x-pack/plugins/alerting/server/authorization/alerts_authorization.ts similarity index 100% rename from x-pack/plugins/alerts/server/authorization/alerts_authorization.ts rename to x-pack/plugins/alerting/server/authorization/alerts_authorization.ts diff --git a/x-pack/plugins/alerts/server/authorization/alerts_authorization_kuery.test.ts b/x-pack/plugins/alerting/server/authorization/alerts_authorization_kuery.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/authorization/alerts_authorization_kuery.test.ts rename to x-pack/plugins/alerting/server/authorization/alerts_authorization_kuery.test.ts diff --git a/x-pack/plugins/alerts/server/authorization/alerts_authorization_kuery.ts b/x-pack/plugins/alerting/server/authorization/alerts_authorization_kuery.ts similarity index 100% rename from x-pack/plugins/alerts/server/authorization/alerts_authorization_kuery.ts rename to x-pack/plugins/alerting/server/authorization/alerts_authorization_kuery.ts diff --git a/x-pack/plugins/alerts/server/authorization/audit_logger.mock.ts b/x-pack/plugins/alerting/server/authorization/audit_logger.mock.ts similarity index 100% rename from x-pack/plugins/alerts/server/authorization/audit_logger.mock.ts rename to x-pack/plugins/alerting/server/authorization/audit_logger.mock.ts diff --git a/x-pack/plugins/alerts/server/authorization/audit_logger.test.ts b/x-pack/plugins/alerting/server/authorization/audit_logger.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/authorization/audit_logger.test.ts rename to x-pack/plugins/alerting/server/authorization/audit_logger.test.ts diff --git a/x-pack/plugins/alerts/server/authorization/audit_logger.ts b/x-pack/plugins/alerting/server/authorization/audit_logger.ts similarity index 100% rename from x-pack/plugins/alerts/server/authorization/audit_logger.ts rename to x-pack/plugins/alerting/server/authorization/audit_logger.ts diff --git a/x-pack/plugins/alerts/server/authorization/index.ts b/x-pack/plugins/alerting/server/authorization/index.ts similarity index 100% rename from x-pack/plugins/alerts/server/authorization/index.ts rename to x-pack/plugins/alerting/server/authorization/index.ts diff --git a/x-pack/plugins/alerts/server/config.test.ts b/x-pack/plugins/alerting/server/config.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/config.test.ts rename to x-pack/plugins/alerting/server/config.test.ts diff --git a/x-pack/plugins/alerts/server/config.ts b/x-pack/plugins/alerting/server/config.ts similarity index 100% rename from x-pack/plugins/alerts/server/config.ts rename to x-pack/plugins/alerting/server/config.ts diff --git a/x-pack/plugins/alerts/server/constants/plugin.ts b/x-pack/plugins/alerting/server/constants/plugin.ts similarity index 85% rename from x-pack/plugins/alerts/server/constants/plugin.ts rename to x-pack/plugins/alerting/server/constants/plugin.ts index ee2e75387b470..4c5cc39c1512e 100644 --- a/x-pack/plugins/alerts/server/constants/plugin.ts +++ b/x-pack/plugins/alerting/server/constants/plugin.ts @@ -8,12 +8,12 @@ import { LicenseType } from '../../../licensing/server'; export const PLUGIN = { - ID: 'alerts', + ID: 'alerting', MINIMUM_LICENSE_REQUIRED: 'basic' as LicenseType, // TODO: supposed to be changed up on requirements // all plugins seem to use getI18nName with any // eslint-disable-next-line @typescript-eslint/no-explicit-any getI18nName: (i18n: any): string => - i18n.translate('xpack.alerts.appName', { - defaultMessage: 'Alerts', + i18n.translate('xpack.alerting.appName', { + defaultMessage: 'Alerting', }), }; diff --git a/x-pack/plugins/alerts/server/health/get_health.test.ts b/x-pack/plugins/alerting/server/health/get_health.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/health/get_health.test.ts rename to x-pack/plugins/alerting/server/health/get_health.test.ts diff --git a/x-pack/plugins/alerts/server/health/get_health.ts b/x-pack/plugins/alerting/server/health/get_health.ts similarity index 100% rename from x-pack/plugins/alerts/server/health/get_health.ts rename to x-pack/plugins/alerting/server/health/get_health.ts diff --git a/x-pack/plugins/alerts/server/health/get_state.test.ts b/x-pack/plugins/alerting/server/health/get_state.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/health/get_state.test.ts rename to x-pack/plugins/alerting/server/health/get_state.test.ts diff --git a/x-pack/plugins/alerts/server/health/get_state.ts b/x-pack/plugins/alerting/server/health/get_state.ts similarity index 95% rename from x-pack/plugins/alerts/server/health/get_state.ts rename to x-pack/plugins/alerting/server/health/get_state.ts index 49604462662d5..5bd80f2c6d29f 100644 --- a/x-pack/plugins/alerts/server/health/get_state.ts +++ b/x-pack/plugins/alerting/server/health/get_state.ts @@ -33,19 +33,19 @@ async function getLatestTaskState(taskManager: TaskManagerStartContract) { const LEVEL_SUMMARY = { [ServiceStatusLevels.available.toString()]: i18n.translate( - 'xpack.alerts.server.healthStatus.available', + 'xpack.alerting.server.healthStatus.available', { defaultMessage: 'Alerting framework is available', } ), [ServiceStatusLevels.degraded.toString()]: i18n.translate( - 'xpack.alerts.server.healthStatus.degraded', + 'xpack.alerting.server.healthStatus.degraded', { defaultMessage: 'Alerting framework is degraded', } ), [ServiceStatusLevels.unavailable.toString()]: i18n.translate( - 'xpack.alerts.server.healthStatus.unavailable', + 'xpack.alerting.server.healthStatus.unavailable', { defaultMessage: 'Alerting framework is unavailable', } diff --git a/x-pack/plugins/alerts/server/health/index.ts b/x-pack/plugins/alerting/server/health/index.ts similarity index 100% rename from x-pack/plugins/alerts/server/health/index.ts rename to x-pack/plugins/alerting/server/health/index.ts diff --git a/x-pack/plugins/alerts/server/health/task.ts b/x-pack/plugins/alerting/server/health/task.ts similarity index 100% rename from x-pack/plugins/alerts/server/health/task.ts rename to x-pack/plugins/alerting/server/health/task.ts diff --git a/x-pack/plugins/alerts/server/index.ts b/x-pack/plugins/alerting/server/index.ts similarity index 77% rename from x-pack/plugins/alerts/server/index.ts rename to x-pack/plugins/alerting/server/index.ts index 449957bed0f1a..71cfad52b0f19 100644 --- a/x-pack/plugins/alerts/server/index.ts +++ b/x-pack/plugins/alerting/server/index.ts @@ -39,4 +39,15 @@ export const plugin = (initContext: PluginInitializerContext) => new AlertingPlu export const config: PluginConfigDescriptor = { schema: configSchema, + deprecations: ({ renameFromRoot }) => [ + renameFromRoot('xpack.alerts.healthCheck', 'xpack.alerting.healthCheck'), + renameFromRoot( + 'xpack.alerts.invalidateApiKeysTask.interval', + 'xpack.alerting.invalidateApiKeysTask.interval' + ), + renameFromRoot( + 'xpack.alerts.invalidateApiKeysTask.removalDelay', + 'xpack.alerting.invalidateApiKeysTask.removalDelay' + ), + ], }; diff --git a/x-pack/plugins/alerts/server/invalidate_pending_api_keys/mark_api_key_for_invalidation.test.ts b/x-pack/plugins/alerting/server/invalidate_pending_api_keys/mark_api_key_for_invalidation.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/invalidate_pending_api_keys/mark_api_key_for_invalidation.test.ts rename to x-pack/plugins/alerting/server/invalidate_pending_api_keys/mark_api_key_for_invalidation.test.ts diff --git a/x-pack/plugins/alerts/server/invalidate_pending_api_keys/mark_api_key_for_invalidation.ts b/x-pack/plugins/alerting/server/invalidate_pending_api_keys/mark_api_key_for_invalidation.ts similarity index 100% rename from x-pack/plugins/alerts/server/invalidate_pending_api_keys/mark_api_key_for_invalidation.ts rename to x-pack/plugins/alerting/server/invalidate_pending_api_keys/mark_api_key_for_invalidation.ts diff --git a/x-pack/plugins/alerts/server/invalidate_pending_api_keys/task.ts b/x-pack/plugins/alerting/server/invalidate_pending_api_keys/task.ts similarity index 100% rename from x-pack/plugins/alerts/server/invalidate_pending_api_keys/task.ts rename to x-pack/plugins/alerting/server/invalidate_pending_api_keys/task.ts diff --git a/x-pack/plugins/alerts/server/lib/alert_execution_status.test.ts b/x-pack/plugins/alerting/server/lib/alert_execution_status.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/alert_execution_status.test.ts rename to x-pack/plugins/alerting/server/lib/alert_execution_status.test.ts diff --git a/x-pack/plugins/alerts/server/lib/alert_execution_status.ts b/x-pack/plugins/alerting/server/lib/alert_execution_status.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/alert_execution_status.ts rename to x-pack/plugins/alerting/server/lib/alert_execution_status.ts diff --git a/x-pack/plugins/alerts/server/lib/alert_instance_summary_from_event_log.test.ts b/x-pack/plugins/alerting/server/lib/alert_instance_summary_from_event_log.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/alert_instance_summary_from_event_log.test.ts rename to x-pack/plugins/alerting/server/lib/alert_instance_summary_from_event_log.test.ts diff --git a/x-pack/plugins/alerts/server/lib/alert_instance_summary_from_event_log.ts b/x-pack/plugins/alerting/server/lib/alert_instance_summary_from_event_log.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/alert_instance_summary_from_event_log.ts rename to x-pack/plugins/alerting/server/lib/alert_instance_summary_from_event_log.ts diff --git a/x-pack/plugins/alerts/server/lib/error_with_reason.test.ts b/x-pack/plugins/alerting/server/lib/error_with_reason.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/error_with_reason.test.ts rename to x-pack/plugins/alerting/server/lib/error_with_reason.test.ts diff --git a/x-pack/plugins/alerts/server/lib/error_with_reason.ts b/x-pack/plugins/alerting/server/lib/error_with_reason.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/error_with_reason.ts rename to x-pack/plugins/alerting/server/lib/error_with_reason.ts diff --git a/x-pack/plugins/alerts/server/lib/errors/alert_type_disabled.ts b/x-pack/plugins/alerting/server/lib/errors/alert_type_disabled.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/errors/alert_type_disabled.ts rename to x-pack/plugins/alerting/server/lib/errors/alert_type_disabled.ts diff --git a/x-pack/plugins/alerts/server/lib/errors/types.ts b/x-pack/plugins/alerting/server/lib/errors/types.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/errors/types.ts rename to x-pack/plugins/alerting/server/lib/errors/types.ts diff --git a/x-pack/plugins/alerts/server/lib/get_alert_notify_when_type.test.ts b/x-pack/plugins/alerting/server/lib/get_alert_notify_when_type.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/get_alert_notify_when_type.test.ts rename to x-pack/plugins/alerting/server/lib/get_alert_notify_when_type.test.ts diff --git a/x-pack/plugins/alerts/server/lib/get_alert_notify_when_type.ts b/x-pack/plugins/alerting/server/lib/get_alert_notify_when_type.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/get_alert_notify_when_type.ts rename to x-pack/plugins/alerting/server/lib/get_alert_notify_when_type.ts diff --git a/x-pack/plugins/alerts/server/lib/get_alert_type_feature_usage_name.ts b/x-pack/plugins/alerting/server/lib/get_alert_type_feature_usage_name.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/get_alert_type_feature_usage_name.ts rename to x-pack/plugins/alerting/server/lib/get_alert_type_feature_usage_name.ts diff --git a/x-pack/plugins/alerts/server/lib/get_cadence.ts b/x-pack/plugins/alerting/server/lib/get_cadence.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/get_cadence.ts rename to x-pack/plugins/alerting/server/lib/get_cadence.ts diff --git a/x-pack/plugins/alerts/server/lib/index.ts b/x-pack/plugins/alerting/server/lib/index.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/index.ts rename to x-pack/plugins/alerting/server/lib/index.ts diff --git a/x-pack/plugins/alerts/server/lib/is_alert_not_found_error.test.ts b/x-pack/plugins/alerting/server/lib/is_alert_not_found_error.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/is_alert_not_found_error.test.ts rename to x-pack/plugins/alerting/server/lib/is_alert_not_found_error.test.ts diff --git a/x-pack/plugins/alerts/server/lib/is_alert_not_found_error.ts b/x-pack/plugins/alerting/server/lib/is_alert_not_found_error.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/is_alert_not_found_error.ts rename to x-pack/plugins/alerting/server/lib/is_alert_not_found_error.ts diff --git a/x-pack/plugins/alerts/server/lib/iso_or_relative_date.test.ts b/x-pack/plugins/alerting/server/lib/iso_or_relative_date.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/iso_or_relative_date.test.ts rename to x-pack/plugins/alerting/server/lib/iso_or_relative_date.test.ts diff --git a/x-pack/plugins/alerts/server/lib/iso_or_relative_date.ts b/x-pack/plugins/alerting/server/lib/iso_or_relative_date.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/iso_or_relative_date.ts rename to x-pack/plugins/alerting/server/lib/iso_or_relative_date.ts diff --git a/x-pack/plugins/alerts/server/lib/license_api_access.ts b/x-pack/plugins/alerting/server/lib/license_api_access.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/license_api_access.ts rename to x-pack/plugins/alerting/server/lib/license_api_access.ts diff --git a/x-pack/plugins/alerts/server/lib/license_state.mock.ts b/x-pack/plugins/alerting/server/lib/license_state.mock.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/license_state.mock.ts rename to x-pack/plugins/alerting/server/lib/license_state.mock.ts diff --git a/x-pack/plugins/alerts/server/lib/license_state.test.ts b/x-pack/plugins/alerting/server/lib/license_state.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/license_state.test.ts rename to x-pack/plugins/alerting/server/lib/license_state.test.ts diff --git a/x-pack/plugins/alerts/server/lib/license_state.ts b/x-pack/plugins/alerting/server/lib/license_state.ts similarity index 94% rename from x-pack/plugins/alerts/server/lib/license_state.ts rename to x-pack/plugins/alerting/server/lib/license_state.ts index 238b2e97c4cdf..dc5d9d278b6b5 100644 --- a/x-pack/plugins/alerts/server/lib/license_state.ts +++ b/x-pack/plugins/alerting/server/lib/license_state.ts @@ -102,7 +102,7 @@ export class LicenseState { showAppLink: true, enableAppLink: false, message: i18n.translate( - 'xpack.alerts.serverSideErrors.unavailableLicenseInformationErrorMessage', + 'xpack.alerting.serverSideErrors.unavailableLicenseInformationErrorMessage', { defaultMessage: 'Alerts is unavailable - license information is not available at this time.', @@ -169,7 +169,7 @@ export class LicenseState { switch (check.reason) { case 'unavailable': throw new AlertTypeDisabledError( - i18n.translate('xpack.alerts.serverSideErrors.unavailableLicenseErrorMessage', { + i18n.translate('xpack.alerting.serverSideErrors.unavailableLicenseErrorMessage', { defaultMessage: 'Alert type {alertTypeId} is disabled because license information is not available at this time.', values: { @@ -180,7 +180,7 @@ export class LicenseState { ); case 'expired': throw new AlertTypeDisabledError( - i18n.translate('xpack.alerts.serverSideErrors.expirerdLicenseErrorMessage', { + i18n.translate('xpack.alerting.serverSideErrors.expirerdLicenseErrorMessage', { defaultMessage: 'Alert type {alertTypeId} is disabled because your {licenseType} license has expired.', values: { alertTypeId: alertType.id, licenseType: this.license!.type }, @@ -189,7 +189,7 @@ export class LicenseState { ); case 'invalid': throw new AlertTypeDisabledError( - i18n.translate('xpack.alerts.serverSideErrors.invalidLicenseErrorMessage', { + i18n.translate('xpack.alerting.serverSideErrors.invalidLicenseErrorMessage', { defaultMessage: 'Alert {alertTypeId} is disabled because it requires a {licenseType} license. Go to License Management to view upgrade options.', values: { diff --git a/x-pack/plugins/alerts/server/lib/result_type.ts b/x-pack/plugins/alerting/server/lib/result_type.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/result_type.ts rename to x-pack/plugins/alerting/server/lib/result_type.ts diff --git a/x-pack/plugins/alerts/server/lib/retry_if_conflicts.test.ts b/x-pack/plugins/alerting/server/lib/retry_if_conflicts.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/retry_if_conflicts.test.ts rename to x-pack/plugins/alerting/server/lib/retry_if_conflicts.test.ts diff --git a/x-pack/plugins/alerts/server/lib/retry_if_conflicts.ts b/x-pack/plugins/alerting/server/lib/retry_if_conflicts.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/retry_if_conflicts.ts rename to x-pack/plugins/alerting/server/lib/retry_if_conflicts.ts diff --git a/x-pack/plugins/alerts/server/lib/types.test.ts b/x-pack/plugins/alerting/server/lib/types.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/types.test.ts rename to x-pack/plugins/alerting/server/lib/types.test.ts diff --git a/x-pack/plugins/alerts/server/lib/types.ts b/x-pack/plugins/alerting/server/lib/types.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/types.ts rename to x-pack/plugins/alerting/server/lib/types.ts diff --git a/x-pack/plugins/alerts/server/lib/validate_alert_type_params.test.ts b/x-pack/plugins/alerting/server/lib/validate_alert_type_params.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/validate_alert_type_params.test.ts rename to x-pack/plugins/alerting/server/lib/validate_alert_type_params.test.ts diff --git a/x-pack/plugins/alerts/server/lib/validate_alert_type_params.ts b/x-pack/plugins/alerting/server/lib/validate_alert_type_params.ts similarity index 100% rename from x-pack/plugins/alerts/server/lib/validate_alert_type_params.ts rename to x-pack/plugins/alerting/server/lib/validate_alert_type_params.ts diff --git a/x-pack/plugins/alerts/server/manual_tests/action_param_templates.sh b/x-pack/plugins/alerting/server/manual_tests/action_param_templates.sh similarity index 100% rename from x-pack/plugins/alerts/server/manual_tests/action_param_templates.sh rename to x-pack/plugins/alerting/server/manual_tests/action_param_templates.sh diff --git a/x-pack/plugins/alerts/server/mocks.ts b/x-pack/plugins/alerting/server/mocks.ts similarity index 100% rename from x-pack/plugins/alerts/server/mocks.ts rename to x-pack/plugins/alerting/server/mocks.ts diff --git a/x-pack/plugins/alerts/server/plugin.test.ts b/x-pack/plugins/alerting/server/plugin.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/plugin.test.ts rename to x-pack/plugins/alerting/server/plugin.test.ts diff --git a/x-pack/plugins/alerts/server/plugin.ts b/x-pack/plugins/alerting/server/plugin.ts similarity index 100% rename from x-pack/plugins/alerts/server/plugin.ts rename to x-pack/plugins/alerting/server/plugin.ts diff --git a/x-pack/plugins/alerts/server/routes/_mock_handler_arguments.ts b/x-pack/plugins/alerting/server/routes/_mock_handler_arguments.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/_mock_handler_arguments.ts rename to x-pack/plugins/alerting/server/routes/_mock_handler_arguments.ts diff --git a/x-pack/plugins/alerts/server/routes/aggregate.test.ts b/x-pack/plugins/alerting/server/routes/aggregate.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/aggregate.test.ts rename to x-pack/plugins/alerting/server/routes/aggregate.test.ts diff --git a/x-pack/plugins/alerts/server/routes/aggregate.ts b/x-pack/plugins/alerting/server/routes/aggregate.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/aggregate.ts rename to x-pack/plugins/alerting/server/routes/aggregate.ts diff --git a/x-pack/plugins/alerts/server/routes/create.test.ts b/x-pack/plugins/alerting/server/routes/create.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/create.test.ts rename to x-pack/plugins/alerting/server/routes/create.test.ts diff --git a/x-pack/plugins/alerts/server/routes/create.ts b/x-pack/plugins/alerting/server/routes/create.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/create.ts rename to x-pack/plugins/alerting/server/routes/create.ts diff --git a/x-pack/plugins/alerts/server/routes/delete.test.ts b/x-pack/plugins/alerting/server/routes/delete.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/delete.test.ts rename to x-pack/plugins/alerting/server/routes/delete.test.ts diff --git a/x-pack/plugins/alerts/server/routes/delete.ts b/x-pack/plugins/alerting/server/routes/delete.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/delete.ts rename to x-pack/plugins/alerting/server/routes/delete.ts diff --git a/x-pack/plugins/alerts/server/routes/disable.test.ts b/x-pack/plugins/alerting/server/routes/disable.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/disable.test.ts rename to x-pack/plugins/alerting/server/routes/disable.test.ts diff --git a/x-pack/plugins/alerts/server/routes/disable.ts b/x-pack/plugins/alerting/server/routes/disable.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/disable.ts rename to x-pack/plugins/alerting/server/routes/disable.ts diff --git a/x-pack/plugins/alerts/server/routes/enable.test.ts b/x-pack/plugins/alerting/server/routes/enable.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/enable.test.ts rename to x-pack/plugins/alerting/server/routes/enable.test.ts diff --git a/x-pack/plugins/alerts/server/routes/enable.ts b/x-pack/plugins/alerting/server/routes/enable.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/enable.ts rename to x-pack/plugins/alerting/server/routes/enable.ts diff --git a/x-pack/plugins/alerts/server/routes/find.test.ts b/x-pack/plugins/alerting/server/routes/find.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/find.test.ts rename to x-pack/plugins/alerting/server/routes/find.test.ts diff --git a/x-pack/plugins/alerts/server/routes/find.ts b/x-pack/plugins/alerting/server/routes/find.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/find.ts rename to x-pack/plugins/alerting/server/routes/find.ts diff --git a/x-pack/plugins/alerts/server/routes/get.test.ts b/x-pack/plugins/alerting/server/routes/get.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/get.test.ts rename to x-pack/plugins/alerting/server/routes/get.test.ts diff --git a/x-pack/plugins/alerts/server/routes/get.ts b/x-pack/plugins/alerting/server/routes/get.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/get.ts rename to x-pack/plugins/alerting/server/routes/get.ts diff --git a/x-pack/plugins/alerts/server/routes/get_alert_instance_summary.test.ts b/x-pack/plugins/alerting/server/routes/get_alert_instance_summary.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/get_alert_instance_summary.test.ts rename to x-pack/plugins/alerting/server/routes/get_alert_instance_summary.test.ts diff --git a/x-pack/plugins/alerts/server/routes/get_alert_instance_summary.ts b/x-pack/plugins/alerting/server/routes/get_alert_instance_summary.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/get_alert_instance_summary.ts rename to x-pack/plugins/alerting/server/routes/get_alert_instance_summary.ts diff --git a/x-pack/plugins/alerts/server/routes/get_alert_state.test.ts b/x-pack/plugins/alerting/server/routes/get_alert_state.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/get_alert_state.test.ts rename to x-pack/plugins/alerting/server/routes/get_alert_state.test.ts diff --git a/x-pack/plugins/alerts/server/routes/get_alert_state.ts b/x-pack/plugins/alerting/server/routes/get_alert_state.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/get_alert_state.ts rename to x-pack/plugins/alerting/server/routes/get_alert_state.ts diff --git a/x-pack/plugins/alerts/server/routes/health.test.ts b/x-pack/plugins/alerting/server/routes/health.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/health.test.ts rename to x-pack/plugins/alerting/server/routes/health.test.ts diff --git a/x-pack/plugins/alerts/server/routes/health.ts b/x-pack/plugins/alerting/server/routes/health.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/health.ts rename to x-pack/plugins/alerting/server/routes/health.ts diff --git a/x-pack/plugins/alerts/server/routes/index.ts b/x-pack/plugins/alerting/server/routes/index.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/index.ts rename to x-pack/plugins/alerting/server/routes/index.ts diff --git a/x-pack/plugins/alerts/server/routes/lib/error_handler.ts b/x-pack/plugins/alerting/server/routes/lib/error_handler.ts similarity index 93% rename from x-pack/plugins/alerts/server/routes/lib/error_handler.ts rename to x-pack/plugins/alerting/server/routes/lib/error_handler.ts index e56001d5db829..0699a43ef42be 100644 --- a/x-pack/plugins/alerts/server/routes/lib/error_handler.ts +++ b/x-pack/plugins/alerting/server/routes/lib/error_handler.ts @@ -16,7 +16,7 @@ export const handleDisabledApiKeysError: RequestHandlerWrapper = (handler) => { if (isApiKeyDisabledError(e)) { return response.badRequest({ body: new Error( - i18n.translate('xpack.alerts.api.error.disabledApiKeys', { + i18n.translate('xpack.alerting.api.error.disabledApiKeys', { defaultMessage: 'Alerting relies upon API keys which appear to be disabled', }) ), diff --git a/x-pack/plugins/alerts/server/routes/lib/rename_keys.ts b/x-pack/plugins/alerting/server/routes/lib/rename_keys.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/lib/rename_keys.ts rename to x-pack/plugins/alerting/server/routes/lib/rename_keys.ts diff --git a/x-pack/plugins/alerts/server/routes/list_alert_types.test.ts b/x-pack/plugins/alerting/server/routes/list_alert_types.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/list_alert_types.test.ts rename to x-pack/plugins/alerting/server/routes/list_alert_types.test.ts diff --git a/x-pack/plugins/alerts/server/routes/list_alert_types.ts b/x-pack/plugins/alerting/server/routes/list_alert_types.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/list_alert_types.ts rename to x-pack/plugins/alerting/server/routes/list_alert_types.ts diff --git a/x-pack/plugins/alerts/server/routes/mute_all.test.ts b/x-pack/plugins/alerting/server/routes/mute_all.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/mute_all.test.ts rename to x-pack/plugins/alerting/server/routes/mute_all.test.ts diff --git a/x-pack/plugins/alerts/server/routes/mute_all.ts b/x-pack/plugins/alerting/server/routes/mute_all.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/mute_all.ts rename to x-pack/plugins/alerting/server/routes/mute_all.ts diff --git a/x-pack/plugins/alerts/server/routes/mute_instance.test.ts b/x-pack/plugins/alerting/server/routes/mute_instance.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/mute_instance.test.ts rename to x-pack/plugins/alerting/server/routes/mute_instance.test.ts diff --git a/x-pack/plugins/alerts/server/routes/mute_instance.ts b/x-pack/plugins/alerting/server/routes/mute_instance.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/mute_instance.ts rename to x-pack/plugins/alerting/server/routes/mute_instance.ts diff --git a/x-pack/plugins/alerts/server/routes/unmute_all.test.ts b/x-pack/plugins/alerting/server/routes/unmute_all.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/unmute_all.test.ts rename to x-pack/plugins/alerting/server/routes/unmute_all.test.ts diff --git a/x-pack/plugins/alerts/server/routes/unmute_all.ts b/x-pack/plugins/alerting/server/routes/unmute_all.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/unmute_all.ts rename to x-pack/plugins/alerting/server/routes/unmute_all.ts diff --git a/x-pack/plugins/alerts/server/routes/unmute_instance.test.ts b/x-pack/plugins/alerting/server/routes/unmute_instance.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/unmute_instance.test.ts rename to x-pack/plugins/alerting/server/routes/unmute_instance.test.ts diff --git a/x-pack/plugins/alerts/server/routes/unmute_instance.ts b/x-pack/plugins/alerting/server/routes/unmute_instance.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/unmute_instance.ts rename to x-pack/plugins/alerting/server/routes/unmute_instance.ts diff --git a/x-pack/plugins/alerts/server/routes/update.test.ts b/x-pack/plugins/alerting/server/routes/update.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/update.test.ts rename to x-pack/plugins/alerting/server/routes/update.test.ts diff --git a/x-pack/plugins/alerts/server/routes/update.ts b/x-pack/plugins/alerting/server/routes/update.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/update.ts rename to x-pack/plugins/alerting/server/routes/update.ts diff --git a/x-pack/plugins/alerts/server/routes/update_api_key.test.ts b/x-pack/plugins/alerting/server/routes/update_api_key.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/update_api_key.test.ts rename to x-pack/plugins/alerting/server/routes/update_api_key.test.ts diff --git a/x-pack/plugins/alerts/server/routes/update_api_key.ts b/x-pack/plugins/alerting/server/routes/update_api_key.ts similarity index 100% rename from x-pack/plugins/alerts/server/routes/update_api_key.ts rename to x-pack/plugins/alerting/server/routes/update_api_key.ts diff --git a/x-pack/plugins/alerts/server/saved_objects/index.ts b/x-pack/plugins/alerting/server/saved_objects/index.ts similarity index 100% rename from x-pack/plugins/alerts/server/saved_objects/index.ts rename to x-pack/plugins/alerting/server/saved_objects/index.ts diff --git a/x-pack/plugins/alerts/server/saved_objects/mappings.json b/x-pack/plugins/alerting/server/saved_objects/mappings.json similarity index 100% rename from x-pack/plugins/alerts/server/saved_objects/mappings.json rename to x-pack/plugins/alerting/server/saved_objects/mappings.json diff --git a/x-pack/plugins/alerts/server/saved_objects/migrations.test.ts b/x-pack/plugins/alerting/server/saved_objects/migrations.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/saved_objects/migrations.test.ts rename to x-pack/plugins/alerting/server/saved_objects/migrations.test.ts diff --git a/x-pack/plugins/alerts/server/saved_objects/migrations.ts b/x-pack/plugins/alerting/server/saved_objects/migrations.ts similarity index 100% rename from x-pack/plugins/alerts/server/saved_objects/migrations.ts rename to x-pack/plugins/alerting/server/saved_objects/migrations.ts diff --git a/x-pack/plugins/alerts/server/saved_objects/partially_update_alert.test.ts b/x-pack/plugins/alerting/server/saved_objects/partially_update_alert.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/saved_objects/partially_update_alert.test.ts rename to x-pack/plugins/alerting/server/saved_objects/partially_update_alert.test.ts diff --git a/x-pack/plugins/alerts/server/saved_objects/partially_update_alert.ts b/x-pack/plugins/alerting/server/saved_objects/partially_update_alert.ts similarity index 100% rename from x-pack/plugins/alerts/server/saved_objects/partially_update_alert.ts rename to x-pack/plugins/alerting/server/saved_objects/partially_update_alert.ts diff --git a/x-pack/plugins/alerts/server/task_runner/alert_task_instance.test.ts b/x-pack/plugins/alerting/server/task_runner/alert_task_instance.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/task_runner/alert_task_instance.test.ts rename to x-pack/plugins/alerting/server/task_runner/alert_task_instance.test.ts diff --git a/x-pack/plugins/alerts/server/task_runner/alert_task_instance.ts b/x-pack/plugins/alerting/server/task_runner/alert_task_instance.ts similarity index 100% rename from x-pack/plugins/alerts/server/task_runner/alert_task_instance.ts rename to x-pack/plugins/alerting/server/task_runner/alert_task_instance.ts diff --git a/x-pack/plugins/alerts/server/task_runner/create_execution_handler.test.ts b/x-pack/plugins/alerting/server/task_runner/create_execution_handler.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/task_runner/create_execution_handler.test.ts rename to x-pack/plugins/alerting/server/task_runner/create_execution_handler.test.ts diff --git a/x-pack/plugins/alerts/server/task_runner/create_execution_handler.ts b/x-pack/plugins/alerting/server/task_runner/create_execution_handler.ts similarity index 100% rename from x-pack/plugins/alerts/server/task_runner/create_execution_handler.ts rename to x-pack/plugins/alerting/server/task_runner/create_execution_handler.ts diff --git a/x-pack/plugins/alerts/server/task_runner/index.ts b/x-pack/plugins/alerting/server/task_runner/index.ts similarity index 100% rename from x-pack/plugins/alerts/server/task_runner/index.ts rename to x-pack/plugins/alerting/server/task_runner/index.ts diff --git a/x-pack/plugins/alerts/server/task_runner/inject_action_params.test.ts b/x-pack/plugins/alerting/server/task_runner/inject_action_params.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/task_runner/inject_action_params.test.ts rename to x-pack/plugins/alerting/server/task_runner/inject_action_params.test.ts diff --git a/x-pack/plugins/alerts/server/task_runner/inject_action_params.ts b/x-pack/plugins/alerting/server/task_runner/inject_action_params.ts similarity index 91% rename from x-pack/plugins/alerts/server/task_runner/inject_action_params.ts rename to x-pack/plugins/alerting/server/task_runner/inject_action_params.ts index 42869da6aa10b..177622867565c 100644 --- a/x-pack/plugins/alerts/server/task_runner/inject_action_params.ts +++ b/x-pack/plugins/alerting/server/task_runner/inject_action_params.ts @@ -26,7 +26,7 @@ export function injectActionParams({ ...actionParams, kibanaFooterLink: { path: `/app/management/insightsAndAlerting/triggersActions/alert/${alertId}`, - text: i18n.translate('xpack.alerts.injectActionParams.email.kibanaFooterLinkText', { + text: i18n.translate('xpack.alerting.injectActionParams.email.kibanaFooterLinkText', { defaultMessage: 'View alert in Kibana', }), }, diff --git a/x-pack/plugins/alerts/server/task_runner/task_runner.test.ts b/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/task_runner/task_runner.test.ts rename to x-pack/plugins/alerting/server/task_runner/task_runner.test.ts diff --git a/x-pack/plugins/alerts/server/task_runner/task_runner.ts b/x-pack/plugins/alerting/server/task_runner/task_runner.ts similarity index 100% rename from x-pack/plugins/alerts/server/task_runner/task_runner.ts rename to x-pack/plugins/alerting/server/task_runner/task_runner.ts diff --git a/x-pack/plugins/alerts/server/task_runner/task_runner_factory.test.ts b/x-pack/plugins/alerting/server/task_runner/task_runner_factory.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/task_runner/task_runner_factory.test.ts rename to x-pack/plugins/alerting/server/task_runner/task_runner_factory.test.ts diff --git a/x-pack/plugins/alerts/server/task_runner/task_runner_factory.ts b/x-pack/plugins/alerting/server/task_runner/task_runner_factory.ts similarity index 100% rename from x-pack/plugins/alerts/server/task_runner/task_runner_factory.ts rename to x-pack/plugins/alerting/server/task_runner/task_runner_factory.ts diff --git a/x-pack/plugins/alerts/server/task_runner/transform_action_params.test.ts b/x-pack/plugins/alerting/server/task_runner/transform_action_params.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/task_runner/transform_action_params.test.ts rename to x-pack/plugins/alerting/server/task_runner/transform_action_params.test.ts diff --git a/x-pack/plugins/alerts/server/task_runner/transform_action_params.ts b/x-pack/plugins/alerting/server/task_runner/transform_action_params.ts similarity index 100% rename from x-pack/plugins/alerts/server/task_runner/transform_action_params.ts rename to x-pack/plugins/alerting/server/task_runner/transform_action_params.ts diff --git a/x-pack/plugins/alerts/server/test_utils/index.ts b/x-pack/plugins/alerting/server/test_utils/index.ts similarity index 100% rename from x-pack/plugins/alerts/server/test_utils/index.ts rename to x-pack/plugins/alerting/server/test_utils/index.ts diff --git a/x-pack/plugins/alerts/server/types.ts b/x-pack/plugins/alerting/server/types.ts similarity index 100% rename from x-pack/plugins/alerts/server/types.ts rename to x-pack/plugins/alerting/server/types.ts diff --git a/x-pack/plugins/alerts/server/usage/alerts_telemetry.test.ts b/x-pack/plugins/alerting/server/usage/alerts_telemetry.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/usage/alerts_telemetry.test.ts rename to x-pack/plugins/alerting/server/usage/alerts_telemetry.test.ts diff --git a/x-pack/plugins/alerts/server/usage/alerts_telemetry.ts b/x-pack/plugins/alerting/server/usage/alerts_telemetry.ts similarity index 100% rename from x-pack/plugins/alerts/server/usage/alerts_telemetry.ts rename to x-pack/plugins/alerting/server/usage/alerts_telemetry.ts diff --git a/x-pack/plugins/alerts/server/usage/alerts_usage_collector.test.ts b/x-pack/plugins/alerting/server/usage/alerts_usage_collector.test.ts similarity index 100% rename from x-pack/plugins/alerts/server/usage/alerts_usage_collector.test.ts rename to x-pack/plugins/alerting/server/usage/alerts_usage_collector.test.ts diff --git a/x-pack/plugins/alerts/server/usage/alerts_usage_collector.ts b/x-pack/plugins/alerting/server/usage/alerts_usage_collector.ts similarity index 100% rename from x-pack/plugins/alerts/server/usage/alerts_usage_collector.ts rename to x-pack/plugins/alerting/server/usage/alerts_usage_collector.ts diff --git a/x-pack/plugins/alerts/server/usage/index.ts b/x-pack/plugins/alerting/server/usage/index.ts similarity index 100% rename from x-pack/plugins/alerts/server/usage/index.ts rename to x-pack/plugins/alerting/server/usage/index.ts diff --git a/x-pack/plugins/alerts/server/usage/task.ts b/x-pack/plugins/alerting/server/usage/task.ts similarity index 100% rename from x-pack/plugins/alerts/server/usage/task.ts rename to x-pack/plugins/alerting/server/usage/task.ts diff --git a/x-pack/plugins/alerts/server/usage/types.ts b/x-pack/plugins/alerting/server/usage/types.ts similarity index 100% rename from x-pack/plugins/alerts/server/usage/types.ts rename to x-pack/plugins/alerting/server/usage/types.ts diff --git a/x-pack/plugins/alerts/tsconfig.json b/x-pack/plugins/alerting/tsconfig.json similarity index 100% rename from x-pack/plugins/alerts/tsconfig.json rename to x-pack/plugins/alerting/tsconfig.json diff --git a/x-pack/plugins/apm/common/alert_types.ts b/x-pack/plugins/apm/common/alert_types.ts index 052c4d06791b3..62bd07ce6f500 100644 --- a/x-pack/plugins/apm/common/alert_types.ts +++ b/x-pack/plugins/apm/common/alert_types.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { ValuesType } from 'utility-types'; -import { ActionGroup } from '../../alerts/common'; +import { ActionGroup } from '../../alerting/common'; import { ANOMALY_SEVERITY, ANOMALY_THRESHOLD } from '../../ml/common'; export enum AlertType { diff --git a/x-pack/plugins/apm/kibana.json b/x-pack/plugins/apm/kibana.json index fe9294a48893a..a9a0149e72ce7 100644 --- a/x-pack/plugins/apm/kibana.json +++ b/x-pack/plugins/apm/kibana.json @@ -16,7 +16,7 @@ "usageCollection", "taskManager", "actions", - "alerts", + "alerting", "observability", "security", "ml", diff --git a/x-pack/plugins/apm/public/plugin.ts b/x-pack/plugins/apm/public/plugin.ts index a1b3af6a9f943..4ddd10ecc1476 100644 --- a/x-pack/plugins/apm/public/plugin.ts +++ b/x-pack/plugins/apm/public/plugin.ts @@ -27,7 +27,7 @@ import { HomePublicPluginSetup } from '../../../../src/plugins/home/public'; import { PluginSetupContract as AlertingPluginPublicSetup, PluginStartContract as AlertingPluginPublicStart, -} from '../../alerts/public'; +} from '../../alerting/public'; import { FeaturesPluginSetup } from '../../features/public'; import { LicensingPluginSetup } from '../../licensing/public'; import { @@ -45,7 +45,7 @@ export type ApmPluginSetup = void; export type ApmPluginStart = void; export interface ApmPluginSetupDeps { - alerts?: AlertingPluginPublicSetup; + alerting?: AlertingPluginPublicSetup; ml?: MlPluginSetup; data: DataPublicPluginSetup; features: FeaturesPluginSetup; @@ -56,7 +56,7 @@ export interface ApmPluginSetupDeps { } export interface ApmPluginStartDeps { - alerts?: AlertingPluginPublicStart; + alerting?: AlertingPluginPublicStart; ml?: MlPluginStart; data: DataPublicPluginStart; home: void; diff --git a/x-pack/plugins/apm/server/lib/alerts/alerting_es_client.ts b/x-pack/plugins/apm/server/lib/alerts/alerting_es_client.ts index 42b159f9d603c..727b0c1f04cf4 100644 --- a/x-pack/plugins/apm/server/lib/alerts/alerting_es_client.ts +++ b/x-pack/plugins/apm/server/lib/alerts/alerting_es_client.ts @@ -14,7 +14,7 @@ import { AlertInstanceContext, AlertInstanceState, AlertServices, -} from '../../../../alerts/server'; +} from '../../../../alerting/server'; export function alertingEsClient( services: AlertServices< diff --git a/x-pack/plugins/apm/server/lib/alerts/register_apm_alerts.ts b/x-pack/plugins/apm/server/lib/alerts/register_apm_alerts.ts index 882eb719ba61b..a9824c130faa5 100644 --- a/x-pack/plugins/apm/server/lib/alerts/register_apm_alerts.ts +++ b/x-pack/plugins/apm/server/lib/alerts/register_apm_alerts.ts @@ -6,7 +6,7 @@ */ import { Observable } from 'rxjs'; -import { AlertingPlugin } from '../../../../alerts/server'; +import { AlertingPlugin } from '../../../../alerting/server'; import { ActionsPlugin } from '../../../../actions/server'; import { registerTransactionDurationAlertType } from './register_transaction_duration_alert_type'; import { registerTransactionDurationAnomalyAlertType } from './register_transaction_duration_anomaly_alert_type'; @@ -16,7 +16,7 @@ import { MlPluginSetup } from '../../../../ml/server'; import { registerTransactionErrorRateAlertType } from './register_transaction_error_rate_alert_type'; interface Params { - alerts: AlertingPlugin['setup']; + alerting: AlertingPlugin['setup']; actions: ActionsPlugin['setup']; ml?: MlPluginSetup; config$: Observable; @@ -24,20 +24,20 @@ interface Params { export function registerApmAlerts(params: Params) { registerTransactionDurationAlertType({ - alerts: params.alerts, + alerting: params.alerting, config$: params.config$, }); registerTransactionDurationAnomalyAlertType({ - alerts: params.alerts, + alerting: params.alerting, ml: params.ml, config$: params.config$, }); registerErrorCountAlertType({ - alerts: params.alerts, + alerting: params.alerting, config$: params.config$, }); registerTransactionErrorRateAlertType({ - alerts: params.alerts, + alerting: params.alerting, config$: params.config$, }); } diff --git a/x-pack/plugins/apm/server/lib/alerts/register_error_count_alert_type.test.ts b/x-pack/plugins/apm/server/lib/alerts/register_error_count_alert_type.test.ts index 106104fd406cf..4d403be84a2b2 100644 --- a/x-pack/plugins/apm/server/lib/alerts/register_error_count_alert_type.test.ts +++ b/x-pack/plugins/apm/server/lib/alerts/register_error_count_alert_type.test.ts @@ -9,7 +9,7 @@ import { Observable } from 'rxjs'; import * as Rx from 'rxjs'; import { toArray, map } from 'rxjs/operators'; -import { AlertingPlugin } from '../../../../alerts/server'; +import { AlertingPlugin } from '../../../../alerting/server'; import { APMConfig } from '../..'; import { registerErrorCountAlertType } from './register_error_count_alert_type'; @@ -30,14 +30,14 @@ const mockedConfig$ = (Rx.of('apm_oss.errorIndices').pipe( describe('Error count alert', () => { it("doesn't send an alert when error count is less than threshold", async () => { let alertExecutor: any; - const alerts = { + const alerting = { registerType: ({ executor }) => { alertExecutor = executor; }, } as AlertingPlugin['setup']; registerErrorCountAlertType({ - alerts, + alerting, config$: mockedConfig$, }); expect(alertExecutor).toBeDefined(); @@ -60,14 +60,14 @@ describe('Error count alert', () => { it('sends alerts with service name and environment', async () => { let alertExecutor: any; - const alerts = { + const alerting = { registerType: ({ executor }) => { alertExecutor = executor; }, } as AlertingPlugin['setup']; registerErrorCountAlertType({ - alerts, + alerting, config$: mockedConfig$, }); expect(alertExecutor).toBeDefined(); @@ -144,14 +144,14 @@ describe('Error count alert', () => { }); it('sends alerts with service name', async () => { let alertExecutor: any; - const alerts = { + const alerting = { registerType: ({ executor }) => { alertExecutor = executor; }, } as AlertingPlugin['setup']; registerErrorCountAlertType({ - alerts, + alerting, config$: mockedConfig$, }); expect(alertExecutor).toBeDefined(); diff --git a/x-pack/plugins/apm/server/lib/alerts/register_error_count_alert_type.ts b/x-pack/plugins/apm/server/lib/alerts/register_error_count_alert_type.ts index cf31ff69bad27..70b41da6917ef 100644 --- a/x-pack/plugins/apm/server/lib/alerts/register_error_count_alert_type.ts +++ b/x-pack/plugins/apm/server/lib/alerts/register_error_count_alert_type.ts @@ -15,7 +15,7 @@ import { AlertInstanceContext, AlertInstanceState, AlertTypeState, -} from '../../../../alerts/server'; +} from '../../../../alerting/server'; import { AlertType, ALERT_TYPES_CONFIG, @@ -33,7 +33,7 @@ import { apmActionVariables } from './action_variables'; import { alertingEsClient } from './alerting_es_client'; interface RegisterAlertParams { - alerts: AlertingPlugin['setup']; + alerting: AlertingPlugin['setup']; config$: Observable; } @@ -48,10 +48,10 @@ const paramsSchema = schema.object({ const alertTypeConfig = ALERT_TYPES_CONFIG[AlertType.ErrorCount]; export function registerErrorCountAlertType({ - alerts, + alerting, config$, }: RegisterAlertParams) { - alerts.registerType< + alerting.registerType< TypeOf, AlertTypeState, AlertInstanceState, diff --git a/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_alert_type.ts b/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_alert_type.ts index 6de9ca6db8c12..bb8e67574e9ad 100644 --- a/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_alert_type.ts +++ b/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_alert_type.ts @@ -9,7 +9,7 @@ import { schema } from '@kbn/config-schema'; import { Observable } from 'rxjs'; import { take } from 'rxjs/operators'; import { APMConfig } from '../..'; -import { AlertingPlugin } from '../../../../alerts/server'; +import { AlertingPlugin } from '../../../../alerting/server'; import { AlertType, ALERT_TYPES_CONFIG } from '../../../common/alert_types'; import { PROCESSOR_EVENT, @@ -26,7 +26,7 @@ import { apmActionVariables } from './action_variables'; import { alertingEsClient } from './alerting_es_client'; interface RegisterAlertParams { - alerts: AlertingPlugin['setup']; + alerting: AlertingPlugin['setup']; config$: Observable; } @@ -47,10 +47,10 @@ const paramsSchema = schema.object({ const alertTypeConfig = ALERT_TYPES_CONFIG[AlertType.TransactionDuration]; export function registerTransactionDurationAlertType({ - alerts, + alerting, config$, }: RegisterAlertParams) { - alerts.registerType({ + alerting.registerType({ id: AlertType.TransactionDuration, name: alertTypeConfig.name, actionGroups: alertTypeConfig.actionGroups, diff --git a/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_anomaly_alert_type.test.ts b/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_anomaly_alert_type.test.ts index c30ddd0a2dc31..5f6c07cae4b8f 100644 --- a/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_anomaly_alert_type.test.ts +++ b/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_anomaly_alert_type.test.ts @@ -8,7 +8,7 @@ import { Observable } from 'rxjs'; import * as Rx from 'rxjs'; import { toArray, map } from 'rxjs/operators'; -import { AlertingPlugin } from '../../../../alerts/server'; +import { AlertingPlugin } from '../../../../alerting/server'; import { registerTransactionDurationAnomalyAlertType } from './register_transaction_duration_anomaly_alert_type'; import { APMConfig } from '../..'; import { ANOMALY_SEVERITY } from '../../../../ml/common'; @@ -35,14 +35,14 @@ describe('Transaction duration anomaly alert', () => { describe("doesn't send alert", () => { it('ml is not defined', async () => { let alertExecutor: any; - const alerts = { + const alerting = { registerType: ({ executor }) => { alertExecutor = executor; }, } as AlertingPlugin['setup']; registerTransactionDurationAnomalyAlertType({ - alerts, + alerting, ml: undefined, config$: mockedConfig$, }); @@ -66,7 +66,7 @@ describe('Transaction duration anomaly alert', () => { let alertExecutor: any; - const alerts = { + const alerting = { registerType: ({ executor }) => { alertExecutor = executor; }, @@ -78,7 +78,7 @@ describe('Transaction duration anomaly alert', () => { } as unknown) as MlPluginSetup; registerTransactionDurationAnomalyAlertType({ - alerts, + alerting, ml, config$: mockedConfig$, }); @@ -104,7 +104,7 @@ describe('Transaction duration anomaly alert', () => { let alertExecutor: any; - const alerts = { + const alerting = { registerType: ({ executor }) => { alertExecutor = executor; }, @@ -120,7 +120,7 @@ describe('Transaction duration anomaly alert', () => { } as unknown) as MlPluginSetup; registerTransactionDurationAnomalyAlertType({ - alerts, + alerting, ml, config$: mockedConfig$, }); @@ -163,7 +163,7 @@ describe('Transaction duration anomaly alert', () => { let alertExecutor: any; - const alerts = { + const alerting = { registerType: ({ executor }) => { alertExecutor = executor; }, @@ -199,7 +199,7 @@ describe('Transaction duration anomaly alert', () => { } as unknown) as MlPluginSetup; registerTransactionDurationAnomalyAlertType({ - alerts, + alerting, ml, config$: mockedConfig$, }); @@ -262,7 +262,7 @@ describe('Transaction duration anomaly alert', () => { let alertExecutor: any; - const alerts = { + const alerting = { registerType: ({ executor }) => { alertExecutor = executor; }, @@ -286,7 +286,7 @@ describe('Transaction duration anomaly alert', () => { } as unknown) as MlPluginSetup; registerTransactionDurationAnomalyAlertType({ - alerts, + alerting, ml, config$: mockedConfig$, }); diff --git a/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_anomaly_alert_type.ts b/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_anomaly_alert_type.ts index bf161da37617c..84c3ec7325fd2 100644 --- a/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_anomaly_alert_type.ts +++ b/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_anomaly_alert_type.ts @@ -16,14 +16,14 @@ import { ALERT_TYPES_CONFIG, ANOMALY_ALERT_SEVERITY_TYPES, } from '../../../common/alert_types'; -import { AlertingPlugin } from '../../../../alerts/server'; +import { AlertingPlugin } from '../../../../alerting/server'; import { APMConfig } from '../..'; import { MlPluginSetup } from '../../../../ml/server'; import { getMLJobs } from '../service_map/get_service_anomalies'; import { apmActionVariables } from './action_variables'; interface RegisterAlertParams { - alerts: AlertingPlugin['setup']; + alerting: AlertingPlugin['setup']; ml?: MlPluginSetup; config$: Observable; } @@ -46,11 +46,11 @@ const alertTypeConfig = ALERT_TYPES_CONFIG[AlertType.TransactionDurationAnomaly]; export function registerTransactionDurationAnomalyAlertType({ - alerts, + alerting, ml, config$, }: RegisterAlertParams) { - alerts.registerType({ + alerting.registerType({ id: AlertType.TransactionDurationAnomaly, name: alertTypeConfig.name, actionGroups: alertTypeConfig.actionGroups, diff --git a/x-pack/plugins/apm/server/lib/alerts/register_transaction_error_rate_alert_type.test.ts b/x-pack/plugins/apm/server/lib/alerts/register_transaction_error_rate_alert_type.test.ts index a4b2889afaf73..068eb9b1ccef4 100644 --- a/x-pack/plugins/apm/server/lib/alerts/register_transaction_error_rate_alert_type.test.ts +++ b/x-pack/plugins/apm/server/lib/alerts/register_transaction_error_rate_alert_type.test.ts @@ -8,7 +8,7 @@ import { Observable } from 'rxjs'; import * as Rx from 'rxjs'; import { toArray, map } from 'rxjs/operators'; -import { AlertingPlugin } from '../../../../alerts/server'; +import { AlertingPlugin } from '../../../../alerting/server'; import { APMConfig } from '../..'; import { registerTransactionErrorRateAlertType } from './register_transaction_error_rate_alert_type'; @@ -28,14 +28,14 @@ const mockedConfig$ = (Rx.of('apm_oss.errorIndices').pipe( describe('Transaction error rate alert', () => { it("doesn't send an alert when rate is less than threshold", async () => { let alertExecutor: any; - const alerts = { + const alerting = { registerType: ({ executor }) => { alertExecutor = executor; }, } as AlertingPlugin['setup']; registerTransactionErrorRateAlertType({ - alerts, + alerting, config$: mockedConfig$, }); expect(alertExecutor).toBeDefined(); @@ -58,14 +58,14 @@ describe('Transaction error rate alert', () => { it('sends alerts with service name, transaction type and environment', async () => { let alertExecutor: any; - const alerts = { + const alerting = { registerType: ({ executor }) => { alertExecutor = executor; }, } as AlertingPlugin['setup']; registerTransactionErrorRateAlertType({ - alerts, + alerting, config$: mockedConfig$, }); expect(alertExecutor).toBeDefined(); @@ -163,14 +163,14 @@ describe('Transaction error rate alert', () => { }); it('sends alerts with service name and transaction type', async () => { let alertExecutor: any; - const alerts = { + const alerting = { registerType: ({ executor }) => { alertExecutor = executor; }, } as AlertingPlugin['setup']; registerTransactionErrorRateAlertType({ - alerts, + alerting, config$: mockedConfig$, }); expect(alertExecutor).toBeDefined(); @@ -237,14 +237,14 @@ describe('Transaction error rate alert', () => { it('sends alerts with service name', async () => { let alertExecutor: any; - const alerts = { + const alerting = { registerType: ({ executor }) => { alertExecutor = executor; }, } as AlertingPlugin['setup']; registerTransactionErrorRateAlertType({ - alerts, + alerting, config$: mockedConfig$, }); expect(alertExecutor).toBeDefined(); diff --git a/x-pack/plugins/apm/server/lib/alerts/register_transaction_error_rate_alert_type.ts b/x-pack/plugins/apm/server/lib/alerts/register_transaction_error_rate_alert_type.ts index b9923cc339ac2..ef5407500349d 100644 --- a/x-pack/plugins/apm/server/lib/alerts/register_transaction_error_rate_alert_type.ts +++ b/x-pack/plugins/apm/server/lib/alerts/register_transaction_error_rate_alert_type.ts @@ -10,7 +10,7 @@ import { isEmpty } from 'lodash'; import { Observable } from 'rxjs'; import { take } from 'rxjs/operators'; import { APMConfig } from '../..'; -import { AlertingPlugin } from '../../../../alerts/server'; +import { AlertingPlugin } from '../../../../alerting/server'; import { AlertType, ALERT_TYPES_CONFIG } from '../../../common/alert_types'; import { EVENT_OUTCOME, @@ -28,7 +28,7 @@ import { apmActionVariables } from './action_variables'; import { alertingEsClient } from './alerting_es_client'; interface RegisterAlertParams { - alerts: AlertingPlugin['setup']; + alerting: AlertingPlugin['setup']; config$: Observable; } @@ -44,10 +44,10 @@ const paramsSchema = schema.object({ const alertTypeConfig = ALERT_TYPES_CONFIG[AlertType.TransactionErrorRate]; export function registerTransactionErrorRateAlertType({ - alerts, + alerting, config$, }: RegisterAlertParams) { - alerts.registerType({ + alerting.registerType({ id: AlertType.TransactionErrorRate, name: alertTypeConfig.name, actionGroups: alertTypeConfig.actionGroups, diff --git a/x-pack/plugins/apm/server/plugin.ts b/x-pack/plugins/apm/server/plugin.ts index 8804941914529..f556374179c51 100644 --- a/x-pack/plugins/apm/server/plugin.ts +++ b/x-pack/plugins/apm/server/plugin.ts @@ -23,7 +23,7 @@ import { HomeServerPluginSetup } from '../../../../src/plugins/home/server'; import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/server'; import { UI_SETTINGS } from '../../../../src/plugins/data/common'; import { ActionsPlugin } from '../../actions/server'; -import { AlertingPlugin } from '../../alerts/server'; +import { AlertingPlugin } from '../../alerting/server'; import { CloudSetup } from '../../cloud/server'; import { PluginSetupContract as FeaturesPluginSetup } from '../../features/server'; import { LicensingPluginSetup } from '../../licensing/server'; @@ -71,7 +71,7 @@ export class APMPlugin implements Plugin { cloud?: CloudSetup; usageCollection?: UsageCollectionSetup; taskManager?: TaskManagerSetupContract; - alerts?: AlertingPlugin['setup']; + alerting?: AlertingPlugin['setup']; actions?: ActionsPlugin['setup']; observability?: ObservabilityPluginSetup; features: FeaturesPluginSetup; @@ -90,9 +90,9 @@ export class APMPlugin implements Plugin { core.uiSettings.register(uiSettings); - if (plugins.actions && plugins.alerts) { + if (plugins.actions && plugins.alerting) { registerApmAlerts({ - alerts: plugins.alerts, + alerting: plugins.alerting, actions: plugins.actions, ml: plugins.ml, config$: mergedConfig$, diff --git a/x-pack/plugins/apm/tsconfig.json b/x-pack/plugins/apm/tsconfig.json index bb2e0e06679a2..ea1602d916822 100644 --- a/x-pack/plugins/apm/tsconfig.json +++ b/x-pack/plugins/apm/tsconfig.json @@ -29,7 +29,7 @@ { "path": "../../../src/plugins/kibana_utils/tsconfig.json" }, { "path": "../../../src/plugins/usage_collection/tsconfig.json" }, { "path": "../actions/tsconfig.json" }, - { "path": "../alerts/tsconfig.json" }, + { "path": "../alerting/tsconfig.json" }, { "path": "../cloud/tsconfig.json" }, { "path": "../features/tsconfig.json" }, { "path": "../infra/tsconfig.json" }, diff --git a/x-pack/plugins/infra/kibana.json b/x-pack/plugins/infra/kibana.json index c892f7017da33..c0d567ef83ced 100644 --- a/x-pack/plugins/infra/kibana.json +++ b/x-pack/plugins/infra/kibana.json @@ -10,7 +10,7 @@ "data", "dataEnhanced", "visTypeTimeseries", - "alerts", + "alerting", "triggersActionsUi" ], "optionalPlugins": ["ml", "observability", "home", "embeddable"], diff --git a/x-pack/plugins/infra/public/alerting/common/components/alert_preview.tsx b/x-pack/plugins/infra/public/alerting/common/components/alert_preview.tsx index 010d8bd84bf34..410ad15b356ea 100644 --- a/x-pack/plugins/infra/public/alerting/common/components/alert_preview.tsx +++ b/x-pack/plugins/infra/public/alerting/common/components/alert_preview.tsx @@ -21,7 +21,7 @@ import { } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; -import { AlertNotifyWhenType } from '../../../../../alerts/common'; +import { AlertNotifyWhenType } from '../../../../../alerting/common'; import { useKibana } from '../../../../../../../src/plugins/kibana_react/public'; import { FORMATTERS } from '../../../../common/formatters'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths diff --git a/x-pack/plugins/infra/public/alerting/inventory/index.ts b/x-pack/plugins/infra/public/alerting/inventory/index.ts index de4fcd41d2688..b66bd94553d3c 100644 --- a/x-pack/plugins/infra/public/alerting/inventory/index.ts +++ b/x-pack/plugins/infra/public/alerting/inventory/index.ts @@ -14,7 +14,7 @@ import { } from '../../../server/lib/alerting/inventory_metric_threshold/types'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { AlertTypeModel } from '../../../../triggers_actions_ui/public/types'; -import { AlertTypeParams } from '../../../../alerts/common'; +import { AlertTypeParams } from '../../../../alerting/common'; import { validateMetricThreshold } from './components/validation'; interface InventoryMetricAlertTypeParams extends AlertTypeParams { diff --git a/x-pack/plugins/infra/public/alerting/metric_anomaly/index.ts b/x-pack/plugins/infra/public/alerting/metric_anomaly/index.ts index a235f308a7e61..f8dbd46a0776c 100644 --- a/x-pack/plugins/infra/public/alerting/metric_anomaly/index.ts +++ b/x-pack/plugins/infra/public/alerting/metric_anomaly/index.ts @@ -10,7 +10,7 @@ import React from 'react'; import { METRIC_ANOMALY_ALERT_TYPE_ID } from '../../../common/alerting/metrics'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { AlertTypeModel } from '../../../../triggers_actions_ui/public/types'; -import { AlertTypeParams } from '../../../../alerts/common'; +import { AlertTypeParams } from '../../../../alerting/common'; import { validateMetricAnomaly } from './components/validation'; interface MetricAnomalyAlertTypeParams extends AlertTypeParams { diff --git a/x-pack/plugins/infra/public/alerting/metric_threshold/index.ts b/x-pack/plugins/infra/public/alerting/metric_threshold/index.ts index 51fc3d04b4105..efd38ef0bb13b 100644 --- a/x-pack/plugins/infra/public/alerting/metric_threshold/index.ts +++ b/x-pack/plugins/infra/public/alerting/metric_threshold/index.ts @@ -10,7 +10,7 @@ import React from 'react'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { AlertTypeModel } from '../../../../triggers_actions_ui/public/types'; import { validateMetricThreshold } from './components/validation'; -import { AlertTypeParams } from '../../../../alerts/common'; +import { AlertTypeParams } from '../../../../alerting/common'; import { MetricExpressionParams, METRIC_THRESHOLD_ALERT_TYPE_ID, diff --git a/x-pack/plugins/infra/server/lib/adapters/framework/adapter_types.ts b/x-pack/plugins/infra/server/lib/adapters/framework/adapter_types.ts index 3617fa7b9a8f2..542413118b330 100644 --- a/x-pack/plugins/infra/server/lib/adapters/framework/adapter_types.ts +++ b/x-pack/plugins/infra/server/lib/adapters/framework/adapter_types.ts @@ -17,7 +17,7 @@ import { HomeServerPluginSetup } from '../../../../../../../src/plugins/home/ser import { VisTypeTimeseriesSetup } from '../../../../../../../src/plugins/vis_type_timeseries/server'; import { PluginSetupContract as FeaturesPluginSetup } from '../../../../../../plugins/features/server'; import { SpacesPluginSetup } from '../../../../../../plugins/spaces/server'; -import { PluginSetupContract as AlertingPluginContract } from '../../../../../alerts/server'; +import { PluginSetupContract as AlertingPluginContract } from '../../../../../alerting/server'; import { MlPluginSetup } from '../../../../../ml/server'; import { JsonArray, JsonValue } from '../../../../../../../src/plugins/kibana_utils/common'; @@ -28,7 +28,7 @@ export interface InfraServerPluginSetupDeps { usageCollection: UsageCollectionSetup; visTypeTimeseries: VisTypeTimeseriesSetup; features: FeaturesPluginSetup; - alerts: AlertingPluginContract; + alerting: AlertingPluginContract; ml?: MlPluginSetup; } diff --git a/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/evaluate_condition.ts b/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/evaluate_condition.ts index ea37f7adda7c4..6b6cf5f1d563c 100644 --- a/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/evaluate_condition.ts +++ b/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/evaluate_condition.ts @@ -17,7 +17,7 @@ import { CallWithRequestParams, } from '../../adapters/framework/adapter_types'; import { Comparator, InventoryMetricConditions } from './types'; -import { AlertServices } from '../../../../../alerts/server'; +import { AlertServices } from '../../../../../alerting/server'; import { InventoryItemType, SnapshotMetricType } from '../../../../common/inventory_models/types'; import { InfraTimerangeInput, SnapshotRequest } from '../../../../common/http_api/snapshot_api'; import { InfraSource } from '../../sources'; diff --git a/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts b/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts index 17a6761a8b8b7..f4fadd09efdf5 100644 --- a/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts +++ b/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts @@ -16,8 +16,8 @@ import { AlertInstanceContext, AlertInstanceState, RecoveredActionGroup, -} from '../../../../../alerts/common'; -import { AlertExecutorOptions } from '../../../../../alerts/server'; +} from '../../../../../alerting/common'; +import { AlertExecutorOptions } from '../../../../../alerting/server'; import { InventoryItemType, SnapshotMetricType } from '../../../../common/inventory_models/types'; import { InfraBackendLibs } from '../../infra_types'; import { METRIC_FORMATTERS } from '../../../../common/formatters/snapshot_metric_formats'; diff --git a/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/register_inventory_metric_threshold_alert_type.ts b/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/register_inventory_metric_threshold_alert_type.ts index 6c439225d9d00..81204c7b71a68 100644 --- a/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/register_inventory_metric_threshold_alert_type.ts +++ b/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/register_inventory_metric_threshold_alert_type.ts @@ -12,7 +12,7 @@ import { AlertInstanceState, AlertInstanceContext, ActionGroupIdsOf, -} from '../../../../../alerts/server'; +} from '../../../../../alerting/server'; import { createInventoryMetricThresholdExecutor, FIRED_ACTIONS, diff --git a/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.test.ts b/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.test.ts index 1e3e301bc867c..d2533fb4d79bc 100644 --- a/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.test.ts +++ b/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.test.ts @@ -23,7 +23,7 @@ import { UngroupedSearchQueryResponse, GroupedSearchQueryResponse, } from '../../../../common/alerting/logs/log_threshold/types'; -import { alertsMock } from '../../../../../alerts/server/mocks'; +import { alertsMock } from '../../../../../alerting/server/mocks'; // Mocks // const numericField = { diff --git a/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts b/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts index aa5339a5bc40c..565dfa6d6d2aa 100644 --- a/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts +++ b/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts @@ -16,7 +16,7 @@ import { AlertInstanceState, ActionGroup, ActionGroupIdsOf, -} from '../../../../../alerts/server'; +} from '../../../../../alerting/server'; import { AlertStates, Comparator, diff --git a/x-pack/plugins/infra/server/lib/alerting/log_threshold/register_log_threshold_alert_type.ts b/x-pack/plugins/infra/server/lib/alerting/log_threshold/register_log_threshold_alert_type.ts index 3f32313aa1fba..b7c6881b20390 100644 --- a/x-pack/plugins/infra/server/lib/alerting/log_threshold/register_log_threshold_alert_type.ts +++ b/x-pack/plugins/infra/server/lib/alerting/log_threshold/register_log_threshold_alert_type.ts @@ -13,7 +13,7 @@ import { AlertInstanceContext, AlertInstanceState, ActionGroupIdsOf, -} from '../../../../../alerts/server'; +} from '../../../../../alerting/server'; import { createLogThresholdExecutor, FIRED_ACTIONS } from './log_threshold_executor'; import { LOG_DOCUMENT_COUNT_ALERT_TYPE_ID, diff --git a/x-pack/plugins/infra/server/lib/alerting/metric_anomaly/metric_anomaly_executor.ts b/x-pack/plugins/infra/server/lib/alerting/metric_anomaly/metric_anomaly_executor.ts index 7a4c93438027a..2282a7ff255d1 100644 --- a/x-pack/plugins/infra/server/lib/alerting/metric_anomaly/metric_anomaly_executor.ts +++ b/x-pack/plugins/infra/server/lib/alerting/metric_anomaly/metric_anomaly_executor.ts @@ -16,8 +16,8 @@ import { ActionGroup, AlertInstanceContext, AlertInstanceState, -} from '../../../../../alerts/common'; -import { AlertExecutorOptions } from '../../../../../alerts/server'; +} from '../../../../../alerting/common'; +import { AlertExecutorOptions } from '../../../../../alerting/server'; import { getIntervalInSeconds } from '../../../utils/get_interval_in_seconds'; import { MetricAnomalyAllowedActionGroups } from './register_metric_anomaly_alert_type'; import { MlPluginSetup } from '../../../../../ml/server'; diff --git a/x-pack/plugins/infra/server/lib/alerting/metric_anomaly/register_metric_anomaly_alert_type.ts b/x-pack/plugins/infra/server/lib/alerting/metric_anomaly/register_metric_anomaly_alert_type.ts index d5333f155b5c3..2adf37c60cf3a 100644 --- a/x-pack/plugins/infra/server/lib/alerting/metric_anomaly/register_metric_anomaly_alert_type.ts +++ b/x-pack/plugins/infra/server/lib/alerting/metric_anomaly/register_metric_anomaly_alert_type.ts @@ -8,7 +8,11 @@ import { schema } from '@kbn/config-schema'; import { i18n } from '@kbn/i18n'; import { MlPluginSetup } from '../../../../../ml/server'; -import { AlertType, AlertInstanceState, AlertInstanceContext } from '../../../../../alerts/server'; +import { + AlertType, + AlertInstanceState, + AlertInstanceContext, +} from '../../../../../alerting/server'; import { createMetricAnomalyExecutor, FIRED_ACTIONS, @@ -18,7 +22,7 @@ import { METRIC_ANOMALY_ALERT_TYPE_ID } from '../../../../common/alerting/metric import { InfraBackendLibs } from '../../infra_types'; import { oneOfLiterals, validateIsStringElasticsearchJSONFilter } from '../common/utils'; import { alertStateActionVariableDescription } from '../common/messages'; -import { RecoveredActionGroupId } from '../../../../../alerts/common'; +import { RecoveredActionGroupId } from '../../../../../alerting/common'; export type MetricAnomalyAllowedActionGroups = typeof FIRED_ACTIONS_ID; diff --git a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/lib/evaluate_alert.ts b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/lib/evaluate_alert.ts index 029445a441eea..3f6bb075c8f92 100644 --- a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/lib/evaluate_alert.ts +++ b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/lib/evaluate_alert.ts @@ -13,7 +13,7 @@ import { import { InfraSource } from '../../../../../common/http_api/source_api'; import { InfraDatabaseSearchResponse } from '../../../adapters/framework/adapter_types'; import { createAfterKeyHandler } from '../../../../utils/create_afterkey_handler'; -import { AlertServices } from '../../../../../../alerts/server'; +import { AlertServices } from '../../../../../../alerting/server'; import { getAllCompositeData } from '../../../../utils/get_all_composite_data'; import { DOCUMENT_COUNT_I18N } from '../../common/messages'; import { UNGROUPED_FACTORY_KEY } from '../../common/utils'; diff --git a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.test.ts b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.test.ts index fa435f8cfe2c4..8d052f725fe20 100644 --- a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.test.ts +++ b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.test.ts @@ -8,12 +8,12 @@ import { createMetricThresholdExecutor, FIRED_ACTIONS } from './metric_threshold_executor'; import { Comparator } from './types'; import * as mocks from './test_mocks'; -// import { RecoveredActionGroup } from '../../../../../alerts/common'; +// import { RecoveredActionGroup } from '../../../../../alerting/common'; import { alertsMock, AlertServicesMock, AlertInstanceMock, -} from '../../../../../alerts/server/mocks'; +} from '../../../../../alerting/server/mocks'; import { InfraSources } from '../../sources'; import { MetricThresholdAlertExecutorOptions } from './register_metric_threshold_alert_type'; diff --git a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts index f9a09429942ee..934d6cc4293ad 100644 --- a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts +++ b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts @@ -8,7 +8,7 @@ import { first, last } from 'lodash'; import { i18n } from '@kbn/i18n'; import moment from 'moment'; -import { RecoveredActionGroup } from '../../../../../alerts/common'; +import { RecoveredActionGroup } from '../../../../../alerting/common'; import { InfraBackendLibs } from '../../infra_types'; import { buildErrorAlertReason, diff --git a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/preview_metric_threshold_alert.test.ts b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/preview_metric_threshold_alert.test.ts index c9616377acf8f..551116ddac091 100644 --- a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/preview_metric_threshold_alert.test.ts +++ b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/preview_metric_threshold_alert.test.ts @@ -7,7 +7,7 @@ import * as mocks from './test_mocks'; import { Comparator, Aggregators, MetricExpressionParams } from './types'; -import { alertsMock, AlertServicesMock } from '../../../../../alerts/server/mocks'; +import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; import { previewMetricThresholdAlert } from './preview_metric_threshold_alert'; describe('Previewing the metric threshold alert type', () => { diff --git a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/register_metric_threshold_alert_type.ts b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/register_metric_threshold_alert_type.ts index e5e3a7bff329e..7dbae03f20fbd 100644 --- a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/register_metric_threshold_alert_type.ts +++ b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/register_metric_threshold_alert_type.ts @@ -13,7 +13,7 @@ import { AlertInstanceContext, AlertExecutorOptions, ActionGroupIdsOf, -} from '../../../../../alerts/server'; +} from '../../../../../alerting/server'; import { METRIC_EXPLORER_AGGREGATIONS } from '../../../../common/http_api/metrics_explorer'; import { createMetricThresholdExecutor, diff --git a/x-pack/plugins/infra/server/lib/alerting/register_alert_types.ts b/x-pack/plugins/infra/server/lib/alerting/register_alert_types.ts index 11fbe269b854d..b5e6f714de77e 100644 --- a/x-pack/plugins/infra/server/lib/alerting/register_alert_types.ts +++ b/x-pack/plugins/infra/server/lib/alerting/register_alert_types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { PluginSetupContract } from '../../../../alerts/server'; +import { PluginSetupContract } from '../../../../alerting/server'; import { registerMetricThresholdAlertType } from './metric_threshold/register_metric_threshold_alert_type'; import { registerMetricInventoryThresholdAlertType } from './inventory_metric_threshold/register_inventory_metric_threshold_alert_type'; import { registerMetricAnomalyAlertType } from './metric_anomaly/register_metric_anomaly_alert_type'; diff --git a/x-pack/plugins/infra/server/plugin.ts b/x-pack/plugins/infra/server/plugin.ts index 0ac49e05b36b9..c80e012844c1e 100644 --- a/x-pack/plugins/infra/server/plugin.ts +++ b/x-pack/plugins/infra/server/plugin.ts @@ -137,7 +137,7 @@ export class InfraServerPlugin implements Plugin { ]); initInfraServer(this.libs); - registerAlertTypes(plugins.alerts, this.libs, plugins.ml); + registerAlertTypes(plugins.alerting, this.libs, plugins.ml); core.http.registerRouteHandlerContext( 'infra', diff --git a/x-pack/plugins/infra/tsconfig.json b/x-pack/plugins/infra/tsconfig.json index a8a0e2c7119a9..026da311192d2 100644 --- a/x-pack/plugins/infra/tsconfig.json +++ b/x-pack/plugins/infra/tsconfig.json @@ -25,7 +25,7 @@ { "path": "../../../src/plugins/usage_collection/tsconfig.json" }, { "path": "../../../src/plugins/vis_type_timeseries/tsconfig.json" }, { "path": "../data_enhanced/tsconfig.json" }, - { "path": "../alerts/tsconfig.json" }, + { "path": "../alerting/tsconfig.json" }, { "path": "../features/tsconfig.json" }, { "path": "../license_management/tsconfig.json" }, { "path": "../ml/tsconfig.json" }, diff --git a/x-pack/plugins/ml/common/constants/alerts.ts b/x-pack/plugins/ml/common/constants/alerts.ts index 55d0d0cc0cc56..53b8fa7d5fea7 100644 --- a/x-pack/plugins/ml/common/constants/alerts.ts +++ b/x-pack/plugins/ml/common/constants/alerts.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { ActionGroup } from '../../../alerts/common'; +import { ActionGroup } from '../../../alerting/common'; import { MINIMUM_FULL_LICENSE } from '../license'; import { PLUGIN_ID } from './app'; diff --git a/x-pack/plugins/ml/common/types/alerts.ts b/x-pack/plugins/ml/common/types/alerts.ts index 7e6e9d89c5a65..8d515536c8819 100644 --- a/x-pack/plugins/ml/common/types/alerts.ts +++ b/x-pack/plugins/ml/common/types/alerts.ts @@ -7,7 +7,7 @@ import { AnomalyResultType } from './anomalies'; import { ANOMALY_RESULT_TYPE } from '../constants/anomalies'; -import { AlertTypeParams } from '../../../alerts/common'; +import { AlertTypeParams } from '../../../alerting/common'; export type PreviewResultsKeys = 'record_results' | 'bucket_results' | 'influencer_results'; export type TopHitsResultsKeys = 'top_record_hits' | 'top_bucket_hits' | 'top_influencer_hits'; diff --git a/x-pack/plugins/ml/kibana.json b/x-pack/plugins/ml/kibana.json index d13920b084183..4955c1af5674d 100644 --- a/x-pack/plugins/ml/kibana.json +++ b/x-pack/plugins/ml/kibana.json @@ -21,7 +21,7 @@ "triggersActionsUi" ], "optionalPlugins": [ - "alerts", + "alerting", "home", "security", "spaces", diff --git a/x-pack/plugins/ml/server/lib/alerts/register_anomaly_detection_alert_type.ts b/x-pack/plugins/ml/server/lib/alerts/register_anomaly_detection_alert_type.ts index 30a92c02cefc3..37e9d27cf1578 100644 --- a/x-pack/plugins/ml/server/lib/alerts/register_anomaly_detection_alert_type.ts +++ b/x-pack/plugins/ml/server/lib/alerts/register_anomaly_detection_alert_type.ts @@ -24,7 +24,7 @@ import { AlertInstanceContext, AlertInstanceState, AlertTypeState, -} from '../../../../alerts/common'; +} from '../../../../alerting/common'; const alertTypeConfig = ML_ALERT_TYPES_CONFIG[ML_ALERT_TYPES.ANOMALY_DETECTION]; @@ -42,11 +42,11 @@ export type AnomalyDetectionAlertContext = { } & AlertInstanceContext; export function registerAnomalyDetectionAlertType({ - alerts, + alerting, mlSharedServices, publicBaseUrl, }: RegisterAlertParams) { - alerts.registerType< + alerting.registerType< MlAnomalyDetectionAlertParams, AlertTypeState, AlertInstanceState, diff --git a/x-pack/plugins/ml/server/lib/alerts/register_ml_alerts.ts b/x-pack/plugins/ml/server/lib/alerts/register_ml_alerts.ts index 371c5435f91de..c34de3ad12f26 100644 --- a/x-pack/plugins/ml/server/lib/alerts/register_ml_alerts.ts +++ b/x-pack/plugins/ml/server/lib/alerts/register_ml_alerts.ts @@ -6,12 +6,12 @@ */ import { Logger } from 'kibana/server'; -import { AlertingPlugin } from '../../../../alerts/server'; +import { AlertingPlugin } from '../../../../alerting/server'; import { registerAnomalyDetectionAlertType } from './register_anomaly_detection_alert_type'; import { SharedServices } from '../../shared_services'; export interface RegisterAlertParams { - alerts: AlertingPlugin['setup']; + alerting: AlertingPlugin['setup']; logger: Logger; mlSharedServices: SharedServices; publicBaseUrl: string | undefined; diff --git a/x-pack/plugins/ml/server/plugin.ts b/x-pack/plugins/ml/server/plugin.ts index 24fac9184cc27..62641fb2e0081 100644 --- a/x-pack/plugins/ml/server/plugin.ts +++ b/x-pack/plugins/ml/server/plugin.ts @@ -208,9 +208,9 @@ export class MlServerPlugin () => this.isMlReady ); - if (plugins.alerts) { + if (plugins.alerting) { registerMlAlerts({ - alerts: plugins.alerts, + alerting: plugins.alerting, logger: this.log, mlSharedServices: sharedServices, publicBaseUrl: coreSetup.http.basePath.publicBaseUrl, diff --git a/x-pack/plugins/ml/server/types.ts b/x-pack/plugins/ml/server/types.ts index 3927f2cfc72f3..2109685f5dcc2 100644 --- a/x-pack/plugins/ml/server/types.ts +++ b/x-pack/plugins/ml/server/types.ts @@ -15,7 +15,7 @@ import type { SpacesPluginSetup, SpacesPluginStart } from '../../spaces/server'; import type { MlLicense } from '../common/license'; import type { ResolveMlCapabilities } from '../common/types/capabilities'; import type { RouteGuard } from './lib/route_guard'; -import type { AlertingPlugin } from '../../alerts/server'; +import type { AlertingPlugin } from '../../alerting/server'; import type { ActionsPlugin } from '../../actions/server'; export interface LicenseCheckResult { @@ -45,7 +45,7 @@ export interface PluginsSetup { licensing: LicensingPluginSetup; security?: SecurityPluginSetup; spaces?: SpacesPluginSetup; - alerts?: AlertingPlugin['setup']; + alerting?: AlertingPlugin['setup']; actions?: ActionsPlugin['setup']; } diff --git a/x-pack/plugins/ml/tsconfig.json b/x-pack/plugins/ml/tsconfig.json index ed520aa80401b..6b396b1c59642 100644 --- a/x-pack/plugins/ml/tsconfig.json +++ b/x-pack/plugins/ml/tsconfig.json @@ -31,7 +31,7 @@ { "path": "../lens/tsconfig.json" }, { "path": "../security/tsconfig.json" }, { "path": "../spaces/tsconfig.json" }, - { "path": "../alerts/tsconfig.json" }, + { "path": "../alerting/tsconfig.json" }, { "path": "../triggers_actions_ui/tsconfig.json" } ] } diff --git a/x-pack/plugins/monitoring/common/types/alerts.ts b/x-pack/plugins/monitoring/common/types/alerts.ts index 649b92cb7ac82..33c571110303f 100644 --- a/x-pack/plugins/monitoring/common/types/alerts.ts +++ b/x-pack/plugins/monitoring/common/types/alerts.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Alert, AlertTypeParams, SanitizedAlert } from '../../../alerts/common'; +import { Alert, AlertTypeParams, SanitizedAlert } from '../../../alerting/common'; import { AlertParamType, AlertMessageTokenType, diff --git a/x-pack/plugins/monitoring/kibana.json b/x-pack/plugins/monitoring/kibana.json index d7784465d4519..7d82006c6b999 100644 --- a/x-pack/plugins/monitoring/kibana.json +++ b/x-pack/plugins/monitoring/kibana.json @@ -17,11 +17,11 @@ "home", "cloud", "triggersActionsUi", - "alerts", + "alerting", "actions", "encryptedSavedObjects" ], "server": true, "ui": true, - "requiredBundles": ["kibanaUtils", "home", "alerts", "kibanaReact", "licenseManagement"] + "requiredBundles": ["kibanaUtils", "home", "alerting", "kibanaReact", "licenseManagement"] } diff --git a/x-pack/plugins/monitoring/public/alerts/ccr_read_exceptions_alert/index.tsx b/x-pack/plugins/monitoring/public/alerts/ccr_read_exceptions_alert/index.tsx index 3088e2a75c349..16d58c8655383 100644 --- a/x-pack/plugins/monitoring/public/alerts/ccr_read_exceptions_alert/index.tsx +++ b/x-pack/plugins/monitoring/public/alerts/ccr_read_exceptions_alert/index.tsx @@ -14,7 +14,7 @@ import { ALERT_DETAILS, ALERT_REQUIRES_APP_CONTEXT, } from '../../../common/constants'; -import { AlertTypeParams } from '../../../../alerts/common'; +import { AlertTypeParams } from '../../../../alerting/common'; interface ValidateOptions extends AlertTypeParams { duration: string; diff --git a/x-pack/plugins/monitoring/public/alerts/components/param_details_form/validation.tsx b/x-pack/plugins/monitoring/public/alerts/components/param_details_form/validation.tsx index 97c4d1531f21f..c8107e0f063bc 100644 --- a/x-pack/plugins/monitoring/public/alerts/components/param_details_form/validation.tsx +++ b/x-pack/plugins/monitoring/public/alerts/components/param_details_form/validation.tsx @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { AlertTypeParams } from '../../../../../alerts/common'; +import { AlertTypeParams } from '../../../../../alerting/common'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { ValidationResult } from '../../../../../triggers_actions_ui/public/types'; diff --git a/x-pack/plugins/monitoring/public/alerts/configuration.tsx b/x-pack/plugins/monitoring/public/alerts/configuration.tsx index 77393a9da0761..59411d431d83a 100644 --- a/x-pack/plugins/monitoring/public/alerts/configuration.tsx +++ b/x-pack/plugins/monitoring/public/alerts/configuration.tsx @@ -12,7 +12,7 @@ import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiSwitch } from '@elastic/eui'; import { CommonAlert } from '../../common/types/alerts'; import { Legacy } from '../legacy_shims'; import { hideBottomBar, showBottomBar } from '../lib/setup_mode'; -import { BASE_ALERT_API_PATH } from '../../../alerts/common'; +import { BASE_ALERT_API_PATH } from '../../../alerting/common'; interface Props { alert: CommonAlert; diff --git a/x-pack/plugins/monitoring/public/alerts/large_shard_size_alert/index.tsx b/x-pack/plugins/monitoring/public/alerts/large_shard_size_alert/index.tsx index 528372bd67dec..01b812568ff58 100644 --- a/x-pack/plugins/monitoring/public/alerts/large_shard_size_alert/index.tsx +++ b/x-pack/plugins/monitoring/public/alerts/large_shard_size_alert/index.tsx @@ -14,7 +14,7 @@ import { ALERT_DETAILS, ALERT_REQUIRES_APP_CONTEXT, } from '../../../common/constants'; -import { AlertTypeParams } from '../../../../alerts/common'; +import { AlertTypeParams } from '../../../../alerting/common'; interface ValidateOptions extends AlertTypeParams { indexPattern: string; diff --git a/x-pack/plugins/monitoring/public/alerts/lib/get_alert_panels_by_category.test.tsx b/x-pack/plugins/monitoring/public/alerts/lib/get_alert_panels_by_category.test.tsx index 89e1d3ee4a33b..95f53efe09544 100644 --- a/x-pack/plugins/monitoring/public/alerts/lib/get_alert_panels_by_category.test.tsx +++ b/x-pack/plugins/monitoring/public/alerts/lib/get_alert_panels_by_category.test.tsx @@ -20,7 +20,7 @@ import { ALERT_MEMORY_USAGE, } from '../../../common/constants'; import { AlertsByName } from '../types'; -import { AlertExecutionStatusValues } from '../../../../alerts/common'; +import { AlertExecutionStatusValues } from '../../../../alerting/common'; import { AlertState } from '../../../common/types/alerts'; jest.mock('../../legacy_shims', () => ({ diff --git a/x-pack/plugins/monitoring/public/alerts/lib/get_alert_panels_by_node.test.tsx b/x-pack/plugins/monitoring/public/alerts/lib/get_alert_panels_by_node.test.tsx index 159d286ea21d3..bd39cced549f7 100644 --- a/x-pack/plugins/monitoring/public/alerts/lib/get_alert_panels_by_node.test.tsx +++ b/x-pack/plugins/monitoring/public/alerts/lib/get_alert_panels_by_node.test.tsx @@ -18,7 +18,7 @@ import { ALERT_DISK_USAGE, ALERT_MEMORY_USAGE, } from '../../../common/constants'; -import { AlertExecutionStatusValues } from '../../../../alerts/common'; +import { AlertExecutionStatusValues } from '../../../../alerting/common'; import { AlertState } from '../../../common/types/alerts'; jest.mock('../../legacy_shims', () => ({ diff --git a/x-pack/plugins/monitoring/server/alerts/alerts_factory.ts b/x-pack/plugins/monitoring/server/alerts/alerts_factory.ts index 5a67d8c423c37..0bb8fe39fd9a0 100644 --- a/x-pack/plugins/monitoring/server/alerts/alerts_factory.ts +++ b/x-pack/plugins/monitoring/server/alerts/alerts_factory.ts @@ -38,8 +38,8 @@ import { ALERT_CCR_READ_EXCEPTIONS, ALERT_LARGE_SHARD_SIZE, } from '../../common/constants'; -import { AlertsClient } from '../../../alerts/server'; -import { Alert } from '../../../alerts/common'; +import { AlertsClient } from '../../../alerting/server'; +import { Alert } from '../../../alerting/common'; const BY_TYPE = { [ALERT_CLUSTER_HEALTH]: ClusterHealthAlert, diff --git a/x-pack/plugins/monitoring/server/alerts/base_alert.ts b/x-pack/plugins/monitoring/server/alerts/base_alert.ts index e79eb78f7f66b..9a2efade7b44f 100644 --- a/x-pack/plugins/monitoring/server/alerts/base_alert.ts +++ b/x-pack/plugins/monitoring/server/alerts/base_alert.ts @@ -13,8 +13,8 @@ import { AlertInstance, AlertsClient, AlertServices, -} from '../../../alerts/server'; -import { Alert, AlertTypeParams, RawAlertInstance, SanitizedAlert } from '../../../alerts/common'; +} from '../../../alerting/server'; +import { Alert, AlertTypeParams, RawAlertInstance, SanitizedAlert } from '../../../alerting/common'; import { ActionsClient } from '../../../actions/server'; import { AlertState, @@ -34,7 +34,7 @@ import { INDEX_PATTERN_ELASTICSEARCH } from '../../common/constants'; import { AlertSeverity } from '../../common/enums'; import { mbSafeQuery } from '../lib/mb_safe_query'; import { appendMetricbeatIndex } from '../lib/alerts/append_mb_index'; -import { parseDuration } from '../../../alerts/common/parse_duration'; +import { parseDuration } from '../../../alerting/common/parse_duration'; import { Globals } from '../static_globals'; type ExecutedState = diff --git a/x-pack/plugins/monitoring/server/alerts/ccr_read_exceptions_alert.ts b/x-pack/plugins/monitoring/server/alerts/ccr_read_exceptions_alert.ts index 9ebeba2426e65..b089b466564e4 100644 --- a/x-pack/plugins/monitoring/server/alerts/ccr_read_exceptions_alert.ts +++ b/x-pack/plugins/monitoring/server/alerts/ccr_read_exceptions_alert.ts @@ -20,7 +20,7 @@ import { CommonAlertFilter, CCRReadExceptionsStats, } from '../../common/types/alerts'; -import { AlertInstance } from '../../../alerts/server'; +import { AlertInstance } from '../../../alerting/server'; import { INDEX_PATTERN_ELASTICSEARCH, ALERT_CCR_READ_EXCEPTIONS, @@ -29,8 +29,8 @@ import { import { fetchCCRReadExceptions } from '../lib/alerts/fetch_ccr_read_exceptions'; import { getCcsIndexPattern } from '../lib/alerts/get_ccs_index_pattern'; import { AlertMessageTokenType, AlertSeverity } from '../../common/enums'; -import { parseDuration } from '../../../alerts/common/parse_duration'; -import { SanitizedAlert, RawAlertInstance } from '../../../alerts/common'; +import { parseDuration } from '../../../alerting/common/parse_duration'; +import { SanitizedAlert, RawAlertInstance } from '../../../alerting/common'; import { AlertingDefaults, createLink } from './alert_helpers'; import { appendMetricbeatIndex } from '../lib/alerts/append_mb_index'; import { Globals } from '../static_globals'; diff --git a/x-pack/plugins/monitoring/server/alerts/cluster_health_alert.ts b/x-pack/plugins/monitoring/server/alerts/cluster_health_alert.ts index c4e5de3d55356..15b3a7b486fa2 100644 --- a/x-pack/plugins/monitoring/server/alerts/cluster_health_alert.ts +++ b/x-pack/plugins/monitoring/server/alerts/cluster_health_alert.ts @@ -17,7 +17,7 @@ import { AlertClusterHealth, AlertInstanceState, } from '../../common/types/alerts'; -import { AlertInstance } from '../../../alerts/server'; +import { AlertInstance } from '../../../alerting/server'; import { ALERT_CLUSTER_HEALTH, LEGACY_ALERT_DETAILS, @@ -25,7 +25,7 @@ import { } from '../../common/constants'; import { AlertMessageTokenType, AlertClusterHealthType, AlertSeverity } from '../../common/enums'; import { AlertingDefaults } from './alert_helpers'; -import { SanitizedAlert } from '../../../alerts/common'; +import { SanitizedAlert } from '../../../alerting/common'; import { Globals } from '../static_globals'; import { getCcsIndexPattern } from '../lib/alerts/get_ccs_index_pattern'; import { appendMetricbeatIndex } from '../lib/alerts/append_mb_index'; diff --git a/x-pack/plugins/monitoring/server/alerts/cpu_usage_alert.ts b/x-pack/plugins/monitoring/server/alerts/cpu_usage_alert.ts index a344c97660526..e95c4402c0f90 100644 --- a/x-pack/plugins/monitoring/server/alerts/cpu_usage_alert.ts +++ b/x-pack/plugins/monitoring/server/alerts/cpu_usage_alert.ts @@ -21,7 +21,7 @@ import { CommonAlertParams, CommonAlertFilter, } from '../../common/types/alerts'; -import { AlertInstance } from '../../../alerts/server'; +import { AlertInstance } from '../../../alerting/server'; import { INDEX_PATTERN_ELASTICSEARCH, ALERT_CPU_USAGE, @@ -32,8 +32,8 @@ import { ROUNDED_FLOAT } from '../../common/formatting'; import { fetchCpuUsageNodeStats } from '../lib/alerts/fetch_cpu_usage_node_stats'; import { getCcsIndexPattern } from '../lib/alerts/get_ccs_index_pattern'; import { AlertMessageTokenType, AlertSeverity } from '../../common/enums'; -import { RawAlertInstance, SanitizedAlert } from '../../../alerts/common'; -import { parseDuration } from '../../../alerts/common/parse_duration'; +import { RawAlertInstance, SanitizedAlert } from '../../../alerting/common'; +import { parseDuration } from '../../../alerting/common/parse_duration'; import { AlertingDefaults, createLink } from './alert_helpers'; import { appendMetricbeatIndex } from '../lib/alerts/append_mb_index'; import { Globals } from '../static_globals'; diff --git a/x-pack/plugins/monitoring/server/alerts/disk_usage_alert.ts b/x-pack/plugins/monitoring/server/alerts/disk_usage_alert.ts index 56e45c75d8fc7..3503195e51b82 100644 --- a/x-pack/plugins/monitoring/server/alerts/disk_usage_alert.ts +++ b/x-pack/plugins/monitoring/server/alerts/disk_usage_alert.ts @@ -21,7 +21,7 @@ import { AlertDiskUsageNodeStats, CommonAlertFilter, } from '../../common/types/alerts'; -import { AlertInstance } from '../../../alerts/server'; +import { AlertInstance } from '../../../alerting/server'; import { INDEX_PATTERN_ELASTICSEARCH, ALERT_DISK_USAGE, @@ -32,7 +32,7 @@ import { ROUNDED_FLOAT } from '../../common/formatting'; import { fetchDiskUsageNodeStats } from '../lib/alerts/fetch_disk_usage_node_stats'; import { getCcsIndexPattern } from '../lib/alerts/get_ccs_index_pattern'; import { AlertMessageTokenType, AlertSeverity } from '../../common/enums'; -import { RawAlertInstance, SanitizedAlert } from '../../../alerts/common'; +import { RawAlertInstance, SanitizedAlert } from '../../../alerting/common'; import { AlertingDefaults, createLink } from './alert_helpers'; import { appendMetricbeatIndex } from '../lib/alerts/append_mb_index'; import { Globals } from '../static_globals'; diff --git a/x-pack/plugins/monitoring/server/alerts/elasticsearch_version_mismatch_alert.ts b/x-pack/plugins/monitoring/server/alerts/elasticsearch_version_mismatch_alert.ts index e8e93e4b3afec..735e1c43f569a 100644 --- a/x-pack/plugins/monitoring/server/alerts/elasticsearch_version_mismatch_alert.ts +++ b/x-pack/plugins/monitoring/server/alerts/elasticsearch_version_mismatch_alert.ts @@ -16,7 +16,7 @@ import { CommonAlertParams, AlertVersions, } from '../../common/types/alerts'; -import { AlertInstance } from '../../../alerts/server'; +import { AlertInstance } from '../../../alerting/server'; import { ALERT_ELASTICSEARCH_VERSION_MISMATCH, LEGACY_ALERT_DETAILS, @@ -24,7 +24,7 @@ import { } from '../../common/constants'; import { AlertSeverity } from '../../common/enums'; import { AlertingDefaults } from './alert_helpers'; -import { SanitizedAlert } from '../../../alerts/common'; +import { SanitizedAlert } from '../../../alerting/common'; import { Globals } from '../static_globals'; import { getCcsIndexPattern } from '../lib/alerts/get_ccs_index_pattern'; import { appendMetricbeatIndex } from '../lib/alerts/append_mb_index'; diff --git a/x-pack/plugins/monitoring/server/alerts/kibana_version_mismatch_alert.ts b/x-pack/plugins/monitoring/server/alerts/kibana_version_mismatch_alert.ts index f1f8959787003..04ee29f5e47fc 100644 --- a/x-pack/plugins/monitoring/server/alerts/kibana_version_mismatch_alert.ts +++ b/x-pack/plugins/monitoring/server/alerts/kibana_version_mismatch_alert.ts @@ -16,7 +16,7 @@ import { CommonAlertParams, AlertVersions, } from '../../common/types/alerts'; -import { AlertInstance } from '../../../alerts/server'; +import { AlertInstance } from '../../../alerting/server'; import { ALERT_KIBANA_VERSION_MISMATCH, LEGACY_ALERT_DETAILS, @@ -24,7 +24,7 @@ import { } from '../../common/constants'; import { AlertSeverity } from '../../common/enums'; import { AlertingDefaults } from './alert_helpers'; -import { SanitizedAlert } from '../../../alerts/common'; +import { SanitizedAlert } from '../../../alerting/common'; import { Globals } from '../static_globals'; import { getCcsIndexPattern } from '../lib/alerts/get_ccs_index_pattern'; import { appendMetricbeatIndex } from '../lib/alerts/append_mb_index'; diff --git a/x-pack/plugins/monitoring/server/alerts/large_shard_size_alert.ts b/x-pack/plugins/monitoring/server/alerts/large_shard_size_alert.ts index d8bec1724cf4c..b0cbd0edb64f7 100644 --- a/x-pack/plugins/monitoring/server/alerts/large_shard_size_alert.ts +++ b/x-pack/plugins/monitoring/server/alerts/large_shard_size_alert.ts @@ -20,7 +20,7 @@ import { CommonAlertFilter, IndexShardSizeStats, } from '../../common/types/alerts'; -import { AlertInstance } from '../../../alerts/server'; +import { AlertInstance } from '../../../alerting/server'; import { INDEX_PATTERN_ELASTICSEARCH, ALERT_LARGE_SHARD_SIZE, @@ -29,7 +29,7 @@ import { import { fetchIndexShardSize } from '../lib/alerts/fetch_index_shard_size'; import { getCcsIndexPattern } from '../lib/alerts/get_ccs_index_pattern'; import { AlertMessageTokenType, AlertSeverity } from '../../common/enums'; -import { SanitizedAlert, RawAlertInstance } from '../../../alerts/common'; +import { SanitizedAlert, RawAlertInstance } from '../../../alerting/common'; import { AlertingDefaults, createLink } from './alert_helpers'; import { appendMetricbeatIndex } from '../lib/alerts/append_mb_index'; import { Globals } from '../static_globals'; diff --git a/x-pack/plugins/monitoring/server/alerts/license_expiration_alert.ts b/x-pack/plugins/monitoring/server/alerts/license_expiration_alert.ts index 24fbd98ef2e8b..9cf50f372ce4f 100644 --- a/x-pack/plugins/monitoring/server/alerts/license_expiration_alert.ts +++ b/x-pack/plugins/monitoring/server/alerts/license_expiration_alert.ts @@ -19,7 +19,7 @@ import { AlertLicense, AlertLicenseState, } from '../../common/types/alerts'; -import { AlertExecutorOptions, AlertInstance } from '../../../alerts/server'; +import { AlertExecutorOptions, AlertInstance } from '../../../alerting/server'; import { ALERT_LICENSE_EXPIRATION, LEGACY_ALERT_DETAILS, @@ -27,7 +27,7 @@ import { } from '../../common/constants'; import { AlertMessageTokenType, AlertSeverity } from '../../common/enums'; import { AlertingDefaults } from './alert_helpers'; -import { SanitizedAlert } from '../../../alerts/common'; +import { SanitizedAlert } from '../../../alerting/common'; import { Globals } from '../static_globals'; import { getCcsIndexPattern } from '../lib/alerts/get_ccs_index_pattern'; import { appendMetricbeatIndex } from '../lib/alerts/append_mb_index'; diff --git a/x-pack/plugins/monitoring/server/alerts/logstash_version_mismatch_alert.ts b/x-pack/plugins/monitoring/server/alerts/logstash_version_mismatch_alert.ts index d903dd49600ad..99080b8230ff3 100644 --- a/x-pack/plugins/monitoring/server/alerts/logstash_version_mismatch_alert.ts +++ b/x-pack/plugins/monitoring/server/alerts/logstash_version_mismatch_alert.ts @@ -16,7 +16,7 @@ import { CommonAlertParams, AlertVersions, } from '../../common/types/alerts'; -import { AlertInstance } from '../../../alerts/server'; +import { AlertInstance } from '../../../alerting/server'; import { ALERT_LOGSTASH_VERSION_MISMATCH, LEGACY_ALERT_DETAILS, @@ -24,7 +24,7 @@ import { } from '../../common/constants'; import { AlertSeverity } from '../../common/enums'; import { AlertingDefaults } from './alert_helpers'; -import { SanitizedAlert } from '../../../alerts/common'; +import { SanitizedAlert } from '../../../alerting/common'; import { Globals } from '../static_globals'; import { getCcsIndexPattern } from '../lib/alerts/get_ccs_index_pattern'; import { appendMetricbeatIndex } from '../lib/alerts/append_mb_index'; diff --git a/x-pack/plugins/monitoring/server/alerts/memory_usage_alert.ts b/x-pack/plugins/monitoring/server/alerts/memory_usage_alert.ts index a6ff0acc50cd9..05dc0271cf3f7 100644 --- a/x-pack/plugins/monitoring/server/alerts/memory_usage_alert.ts +++ b/x-pack/plugins/monitoring/server/alerts/memory_usage_alert.ts @@ -21,7 +21,7 @@ import { AlertMemoryUsageNodeStats, CommonAlertFilter, } from '../../common/types/alerts'; -import { AlertInstance } from '../../../alerts/server'; +import { AlertInstance } from '../../../alerting/server'; import { INDEX_PATTERN_ELASTICSEARCH, ALERT_MEMORY_USAGE, @@ -32,10 +32,10 @@ import { ROUNDED_FLOAT } from '../../common/formatting'; import { fetchMemoryUsageNodeStats } from '../lib/alerts/fetch_memory_usage_node_stats'; import { getCcsIndexPattern } from '../lib/alerts/get_ccs_index_pattern'; import { AlertMessageTokenType, AlertSeverity } from '../../common/enums'; -import { RawAlertInstance, SanitizedAlert } from '../../../alerts/common'; +import { RawAlertInstance, SanitizedAlert } from '../../../alerting/common'; import { AlertingDefaults, createLink } from './alert_helpers'; import { appendMetricbeatIndex } from '../lib/alerts/append_mb_index'; -import { parseDuration } from '../../../alerts/common/parse_duration'; +import { parseDuration } from '../../../alerting/common/parse_duration'; import { Globals } from '../static_globals'; export class MemoryUsageAlert extends BaseAlert { diff --git a/x-pack/plugins/monitoring/server/alerts/missing_monitoring_data_alert.ts b/x-pack/plugins/monitoring/server/alerts/missing_monitoring_data_alert.ts index df0e6fcea99b3..adf10e4e56dbc 100644 --- a/x-pack/plugins/monitoring/server/alerts/missing_monitoring_data_alert.ts +++ b/x-pack/plugins/monitoring/server/alerts/missing_monitoring_data_alert.ts @@ -17,7 +17,7 @@ import { CommonAlertParams, CommonAlertFilter, } from '../../common/types/alerts'; -import { AlertInstance } from '../../../alerts/server'; +import { AlertInstance } from '../../../alerting/server'; import { INDEX_PATTERN, ALERT_MISSING_MONITORING_DATA, @@ -25,8 +25,8 @@ import { } from '../../common/constants'; import { getCcsIndexPattern } from '../lib/alerts/get_ccs_index_pattern'; import { AlertMessageTokenType, AlertSeverity } from '../../common/enums'; -import { RawAlertInstance, SanitizedAlert } from '../../../alerts/common'; -import { parseDuration } from '../../../alerts/common/parse_duration'; +import { RawAlertInstance, SanitizedAlert } from '../../../alerting/common'; +import { parseDuration } from '../../../alerting/common/parse_duration'; import { appendMetricbeatIndex } from '../lib/alerts/append_mb_index'; import { fetchMissingMonitoringData } from '../lib/alerts/fetch_missing_monitoring_data'; import { AlertingDefaults, createLink } from './alert_helpers'; diff --git a/x-pack/plugins/monitoring/server/alerts/nodes_changed_alert.ts b/x-pack/plugins/monitoring/server/alerts/nodes_changed_alert.ts index 63b3ef672405e..d040ce1a890ae 100644 --- a/x-pack/plugins/monitoring/server/alerts/nodes_changed_alert.ts +++ b/x-pack/plugins/monitoring/server/alerts/nodes_changed_alert.ts @@ -18,14 +18,14 @@ import { AlertInstanceState, AlertNodesChangedState, } from '../../common/types/alerts'; -import { AlertInstance } from '../../../alerts/server'; +import { AlertInstance } from '../../../alerting/server'; import { ALERT_NODES_CHANGED, LEGACY_ALERT_DETAILS, INDEX_PATTERN_ELASTICSEARCH, } from '../../common/constants'; import { AlertingDefaults } from './alert_helpers'; -import { SanitizedAlert } from '../../../alerts/common'; +import { SanitizedAlert } from '../../../alerting/common'; import { Globals } from '../static_globals'; import { fetchNodesFromClusterStats } from '../lib/alerts/fetch_nodes_from_cluster_stats'; import { getCcsIndexPattern } from '../lib/alerts/get_ccs_index_pattern'; diff --git a/x-pack/plugins/monitoring/server/alerts/thread_pool_rejections_alert_base.ts b/x-pack/plugins/monitoring/server/alerts/thread_pool_rejections_alert_base.ts index 01adeb2393139..cee319504e461 100644 --- a/x-pack/plugins/monitoring/server/alerts/thread_pool_rejections_alert_base.ts +++ b/x-pack/plugins/monitoring/server/alerts/thread_pool_rejections_alert_base.ts @@ -17,12 +17,12 @@ import { ThreadPoolRejectionsAlertParams, CommonAlertFilter, } from '../../common/types/alerts'; -import { AlertInstance } from '../../../alerts/server'; +import { AlertInstance } from '../../../alerting/server'; import { INDEX_PATTERN_ELASTICSEARCH } from '../../common/constants'; import { fetchThreadPoolRejectionStats } from '../lib/alerts/fetch_thread_pool_rejections_stats'; import { getCcsIndexPattern } from '../lib/alerts/get_ccs_index_pattern'; import { AlertMessageTokenType, AlertSeverity } from '../../common/enums'; -import { Alert, RawAlertInstance } from '../../../alerts/common'; +import { Alert, RawAlertInstance } from '../../../alerting/common'; import { AlertingDefaults, createLink } from './alert_helpers'; import { appendMetricbeatIndex } from '../lib/alerts/append_mb_index'; import { Globals } from '../static_globals'; diff --git a/x-pack/plugins/monitoring/server/alerts/thread_pool_search_rejections_alert.ts b/x-pack/plugins/monitoring/server/alerts/thread_pool_search_rejections_alert.ts index 3358cf8e4817e..38b99fb2c6ead 100644 --- a/x-pack/plugins/monitoring/server/alerts/thread_pool_search_rejections_alert.ts +++ b/x-pack/plugins/monitoring/server/alerts/thread_pool_search_rejections_alert.ts @@ -7,7 +7,7 @@ import { ThreadPoolRejectionsAlertBase } from './thread_pool_rejections_alert_base'; import { ALERT_THREAD_POOL_SEARCH_REJECTIONS, ALERT_DETAILS } from '../../common/constants'; -import { Alert } from '../../../alerts/common'; +import { Alert } from '../../../alerting/common'; export class ThreadPoolSearchRejectionsAlert extends ThreadPoolRejectionsAlertBase { private static TYPE = ALERT_THREAD_POOL_SEARCH_REJECTIONS; diff --git a/x-pack/plugins/monitoring/server/alerts/thread_pool_write_rejections_alert.ts b/x-pack/plugins/monitoring/server/alerts/thread_pool_write_rejections_alert.ts index 5fe450d84be18..6df8411e1ec86 100644 --- a/x-pack/plugins/monitoring/server/alerts/thread_pool_write_rejections_alert.ts +++ b/x-pack/plugins/monitoring/server/alerts/thread_pool_write_rejections_alert.ts @@ -7,7 +7,7 @@ import { ThreadPoolRejectionsAlertBase } from './thread_pool_rejections_alert_base'; import { ALERT_THREAD_POOL_WRITE_REJECTIONS, ALERT_DETAILS } from '../../common/constants'; -import { Alert } from '../../../alerts/common'; +import { Alert } from '../../../alerting/common'; export class ThreadPoolWriteRejectionsAlert extends ThreadPoolRejectionsAlertBase { private static TYPE = ALERT_THREAD_POOL_WRITE_REJECTIONS; diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_status.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_status.ts index 3ccb4d3a9c4d5..620f32014dae6 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_status.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_status.ts @@ -6,7 +6,7 @@ */ import { AlertInstanceState } from '../../../common/types/alerts'; -import { AlertsClient } from '../../../../alerts/server'; +import { AlertsClient } from '../../../../alerting/server'; import { AlertsFactory } from '../../alerts'; import { CommonAlertStatus, diff --git a/x-pack/plugins/monitoring/server/plugin.test.ts b/x-pack/plugins/monitoring/server/plugin.test.ts index 08224980a558f..5ce62e9587e8b 100644 --- a/x-pack/plugins/monitoring/server/plugin.test.ts +++ b/x-pack/plugins/monitoring/server/plugin.test.ts @@ -40,7 +40,7 @@ describe('Monitoring plugin', () => { makeStatsCollector: jest.fn(), registerCollector: jest.fn(), }, - alerts: { + alerting: { registerType: jest.fn(), }, }; @@ -59,7 +59,7 @@ describe('Monitoring plugin', () => { const initializerContext = coreMock.createPluginInitializerContext(defaultConfig); afterEach(() => { - (setupPlugins.alerts.registerType as jest.Mock).mockReset(); + (setupPlugins.alerting.registerType as jest.Mock).mockReset(); (coreSetup.status.overall$.subscribe as jest.Mock).mockReset(); }); @@ -73,6 +73,6 @@ describe('Monitoring plugin', () => { const alerts = AlertsFactory.getAll(); const plugin = new MonitoringPlugin(initializerContext as any); await plugin.setup(coreSetup as any, setupPlugins as any); - expect(setupPlugins.alerts.registerType).toHaveBeenCalledTimes(alerts.length); + expect(setupPlugins.alerting.registerType).toHaveBeenCalledTimes(alerts.length); }); }); diff --git a/x-pack/plugins/monitoring/server/plugin.ts b/x-pack/plugins/monitoring/server/plugin.ts index 4fada2d17bf5d..a3fc82109849a 100644 --- a/x-pack/plugins/monitoring/server/plugin.ts +++ b/x-pack/plugins/monitoring/server/plugin.ts @@ -118,7 +118,7 @@ export class MonitoringPlugin const serverInfo = core.http.getServerInfo(); const alerts = AlertsFactory.getAll(); for (const alert of alerts) { - plugins.alerts?.registerType(alert.getAlertType()); + plugins.alerting?.registerType(alert.getAlertType()); } // Register collector objects for stats to show up in the APIs @@ -319,7 +319,7 @@ export class MonitoringPlugin getActionTypeRegistry: () => context.actions?.listTypes(), getAlertsClient: () => { try { - return plugins.alerts.getAlertsClientWithRequest(req); + return plugins.alerting.getAlertsClientWithRequest(req); } catch (err) { // If security is disabled, this call will throw an error unless a certain config is set for dist builds return null; diff --git a/x-pack/plugins/monitoring/server/routes/api/v1/alerts/enable.ts b/x-pack/plugins/monitoring/server/routes/api/v1/alerts/enable.ts index 901ea96d525e8..b452d22506a1c 100644 --- a/x-pack/plugins/monitoring/server/routes/api/v1/alerts/enable.ts +++ b/x-pack/plugins/monitoring/server/routes/api/v1/alerts/enable.ts @@ -13,7 +13,7 @@ import { ALERT_ACTION_TYPE_LOG } from '../../../../../common/constants'; import { ActionResult } from '../../../../../../actions/common'; import { AlertingSecurity } from '../../../../lib/elasticsearch/verify_alerting_security'; import { disableWatcherClusterAlerts } from '../../../../lib/alerts/disable_watcher_cluster_alerts'; -import { Alert, AlertTypeParams } from '../../../../../../alerts/common'; +import { Alert, AlertTypeParams } from '../../../../../../alerting/common'; const DEFAULT_SERVER_LOG_NAME = 'Monitoring: Write to Kibana log'; diff --git a/x-pack/plugins/monitoring/server/types.ts b/x-pack/plugins/monitoring/server/types.ts index bb0b616d37eac..4a8aba0de6bba 100644 --- a/x-pack/plugins/monitoring/server/types.ts +++ b/x-pack/plugins/monitoring/server/types.ts @@ -19,11 +19,11 @@ import type { PluginStartContract as ActionsPluginsStartContact, ActionsApiRequestHandlerContext, } from '../../actions/server'; -import type { AlertingApiRequestHandlerContext } from '../../alerts/server'; +import type { AlertingApiRequestHandlerContext } from '../../alerting/server'; import { PluginStartContract as AlertingPluginStartContract, PluginSetupContract as AlertingPluginSetupContract, -} from '../../alerts/server'; +} from '../../alerting/server'; import { InfraPluginSetup } from '../../infra/server'; import { LicensingPluginSetup } from '../../licensing/server'; import { PluginSetupContract as FeaturesPluginSetupContract } from '../../features/server'; @@ -49,7 +49,7 @@ export interface PluginsSetup { usageCollection?: UsageCollectionSetup; licensing: LicensingPluginSetup; features: FeaturesPluginSetupContract; - alerts?: AlertingPluginSetupContract; + alerting?: AlertingPluginSetupContract; infra: InfraPluginSetup; cloud?: CloudSetup; } @@ -60,7 +60,7 @@ export interface RequestHandlerContextMonitoringPlugin extends RequestHandlerCon } export interface PluginsStart { - alerts: AlertingPluginStartContract; + alerting: AlertingPluginStartContract; actions: ActionsPluginsStartContact; } diff --git a/x-pack/plugins/monitoring/tsconfig.json b/x-pack/plugins/monitoring/tsconfig.json index 1835c4a75d9d4..d0fb7e1a88dcf 100644 --- a/x-pack/plugins/monitoring/tsconfig.json +++ b/x-pack/plugins/monitoring/tsconfig.json @@ -21,7 +21,7 @@ { "path": "../../../src/plugins/kibana_react/tsconfig.json" }, { "path": "../../../src/plugins/kibana_utils/tsconfig.json" }, { "path": "../../../src/plugins/usage_collection/tsconfig.json" }, - { "path": "../alerts/tsconfig.json" }, + { "path": "../alerting/tsconfig.json" }, { "path": "../actions/tsconfig.json" }, { "path": "../cloud/tsconfig.json" }, { "path": "../encrypted_saved_objects/tsconfig.json" }, diff --git a/x-pack/plugins/observability/public/components/app/empty_sections/index.tsx b/x-pack/plugins/observability/public/components/app/empty_sections/index.tsx index 74fc75b6263cb..f7ce8675d8a45 100644 --- a/x-pack/plugins/observability/public/components/app/empty_sections/index.tsx +++ b/x-pack/plugins/observability/public/components/app/empty_sections/index.tsx @@ -8,7 +8,7 @@ import { EuiFlexGrid, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import React, { useContext } from 'react'; import { ThemeContext } from 'styled-components'; -import { Alert } from '../../../../../alerts/common'; +import { Alert } from '../../../../../alerting/common'; import { FETCH_STATUS } from '../../../hooks/use_fetcher'; import { useHasData } from '../../../hooks/use_has_data'; import { usePluginContext } from '../../../hooks/use_plugin_context'; diff --git a/x-pack/plugins/observability/public/components/app/section/alerts/index.tsx b/x-pack/plugins/observability/public/components/app/section/alerts/index.tsx index b6b94a73a680c..96dc1221630e8 100644 --- a/x-pack/plugins/observability/public/components/app/section/alerts/index.tsx +++ b/x-pack/plugins/observability/public/components/app/section/alerts/index.tsx @@ -20,7 +20,7 @@ import moment from 'moment'; import React, { useState } from 'react'; import { EuiSelect } from '@elastic/eui'; import { uniqBy } from 'lodash'; -import { Alert } from '../../../../../../alerts/common'; +import { Alert } from '../../../../../../alerting/common'; import { usePluginContext } from '../../../../hooks/use_plugin_context'; import { SectionContainer } from '..'; diff --git a/x-pack/plugins/observability/public/context/has_data_context.tsx b/x-pack/plugins/observability/public/context/has_data_context.tsx index afefe93586978..085b7fd7ba028 100644 --- a/x-pack/plugins/observability/public/context/has_data_context.tsx +++ b/x-pack/plugins/observability/public/context/has_data_context.tsx @@ -7,7 +7,7 @@ import { uniqueId } from 'lodash'; import React, { createContext, useEffect, useState } from 'react'; -import { Alert } from '../../../alerts/common'; +import { Alert } from '../../../alerting/common'; import { getDataHandler } from '../data_handler'; import { FETCH_STATUS } from '../hooks/use_fetcher'; import { usePluginContext } from '../hooks/use_plugin_context'; diff --git a/x-pack/plugins/observability/public/pages/overview/index.tsx b/x-pack/plugins/observability/public/pages/overview/index.tsx index 46230a67b7102..7aa473d0ebee9 100644 --- a/x-pack/plugins/observability/public/pages/overview/index.tsx +++ b/x-pack/plugins/observability/public/pages/overview/index.tsx @@ -9,7 +9,7 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React, { useContext } from 'react'; import { ThemeContext } from 'styled-components'; import { useTrackPageview } from '../..'; -import { Alert } from '../../../../alerts/common'; +import { Alert } from '../../../../alerting/common'; import { EmptySections } from '../../components/app/empty_sections'; import { WithHeaderLayout } from '../../components/app/layout/with_header'; import { NewsFeed } from '../../components/app/news_feed'; diff --git a/x-pack/plugins/observability/public/services/get_observability_alerts.ts b/x-pack/plugins/observability/public/services/get_observability_alerts.ts index b7d397e4e0267..2cb30ca004c86 100644 --- a/x-pack/plugins/observability/public/services/get_observability_alerts.ts +++ b/x-pack/plugins/observability/public/services/get_observability_alerts.ts @@ -6,7 +6,7 @@ */ import { CoreStart } from 'kibana/public'; -import { Alert } from '../../../alerts/common'; +import { Alert } from '../../../alerting/common'; const allowedConsumers = ['apm', 'uptime', 'logs', 'infrastructure', 'alerts']; diff --git a/x-pack/plugins/observability/tsconfig.json b/x-pack/plugins/observability/tsconfig.json index 62aecc1e0899f..5c7528610a0b1 100644 --- a/x-pack/plugins/observability/tsconfig.json +++ b/x-pack/plugins/observability/tsconfig.json @@ -15,7 +15,7 @@ { "path": "../../../src/plugins/kibana_react/tsconfig.json" }, { "path": "../../../src/plugins/kibana_utils/tsconfig.json" }, { "path": "../../../src/plugins/usage_collection/tsconfig.json" }, - { "path": "../alerts/tsconfig.json" }, + { "path": "../alerting/tsconfig.json" }, { "path": "../licensing/tsconfig.json" }, { "path": "../translations/tsconfig.json" } ] diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/common/schemas.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/common/schemas.ts index a5398f291627c..f12a401934e49 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/common/schemas.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/common/schemas.ts @@ -90,7 +90,7 @@ export const saved_object_attributes: t.Type = t.recursio /** * Params is an "object", since it is a type of AlertActionParams which is action templates. - * @see x-pack/plugins/alerts/common/alert.ts + * @see x-pack/plugins/alerting/common/alert.ts */ export const action_group = t.string; export const action_id = t.string; diff --git a/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts b/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts index 6da8a11f639ef..5f89f66e9bc0a 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AlertAction } from '../../../alerts/common'; +import { AlertAction } from '../../../alerting/common'; import { RuleAlertAction } from './types'; export const transformRuleToAlertAction = ({ diff --git a/x-pack/plugins/security_solution/common/detection_engine/types.ts b/x-pack/plugins/security_solution/common/detection_engine/types.ts index b8bdfb37b0cd0..0c390353e4e07 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/types.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AlertAction } from '../../../alerts/common'; +import { AlertAction } from '../../../alerting/common'; export type RuleAlertAction = Omit & { action_type_id: string; diff --git a/x-pack/plugins/security_solution/kibana.json b/x-pack/plugins/security_solution/kibana.json index e7dbe6e46686e..d4551f76ae390 100644 --- a/x-pack/plugins/security_solution/kibana.json +++ b/x-pack/plugins/security_solution/kibana.json @@ -6,7 +6,7 @@ "configPath": ["xpack", "securitySolution"], "requiredPlugins": [ "actions", - "alerts", + "alerting", "data", "dataEnhanced", "embeddable", diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/actions_description.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/actions_description.tsx index 342e462b6d4f5..43b703512d6e6 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/actions_description.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/actions_description.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { startCase } from 'lodash/fp'; -import { AlertAction } from '../../../../../../alerts/common'; +import { AlertAction } from '../../../../../../alerting/common'; const ActionsDescription = ({ actions }: { actions: AlertAction[] }) => { if (!actions.length) return null; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_field/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_field/index.tsx index 9fd9e910ee0f8..9ecf3333279eb 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_field/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_field/index.tsx @@ -20,7 +20,7 @@ import { loadActionTypes, ActionVariables, } from '../../../../../../triggers_actions_ui/public'; -import { AlertAction } from '../../../../../../alerts/common'; +import { AlertAction } from '../../../../../../alerting/common'; import { useKibana } from '../../../../common/lib/kibana'; import { FORM_ERRORS_TITLE } from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts index b8f6c4bde3e8f..ca7c45cd625e3 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts @@ -37,7 +37,7 @@ import { /** * Params is an "record", since it is a type of AlertActionParams which is action templates. - * @see x-pack/plugins/alerts/common/alert.ts + * @see x-pack/plugins/alerting/common/alert.ts */ export const action = t.exact( t.type({ diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/types.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/types.ts index b6ea18d0494e5..8eb26073e52d2 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/types.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/types.ts @@ -6,7 +6,7 @@ */ import { RuleAlertAction } from '../../../../../common/detection_engine/types'; -import { AlertAction } from '../../../../../../alerts/common'; +import { AlertAction } from '../../../../../../alerting/common'; import { Filter } from '../../../../../../../../src/plugins/data/common'; import { FieldValueQueryBar } from '../../../components/rules/query_bar'; import { FieldValueTimeline } from '../../../components/rules/pick_timeline'; diff --git a/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts b/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts index 0a95090cdce83..2de4ac626e8c9 100644 --- a/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts +++ b/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts @@ -20,7 +20,7 @@ import { AgentPolicyServiceInterface, PackagePolicyServiceInterface, } from '../../../fleet/server'; -import { PluginStartContract as AlertsPluginStartContract } from '../../../alerts/server'; +import { PluginStartContract as AlertsPluginStartContract } from '../../../alerting/server'; import { getPackagePolicyCreateCallback, getPackagePolicyUpdateCallback, @@ -88,7 +88,7 @@ export type EndpointAppContextServiceStartContract = Partial< manifestManager?: ManifestManager; appClientFactory: AppClientFactory; security: SecurityPluginSetup; - alerts: AlertsPluginStartContract; + alerting: AlertsPluginStartContract; config: ConfigType; registerIngestCallback?: FleetStartContract['registerExternalCallback']; savedObjectsStart: SavedObjectsServiceStart; @@ -125,7 +125,7 @@ export class EndpointAppContextService { dependencies.appClientFactory, dependencies.config.maxTimelineImportExportSize, dependencies.security, - dependencies.alerts, + dependencies.alerting, dependencies.licenseService, dependencies.exceptionListsClient ) diff --git a/x-pack/plugins/security_solution/server/endpoint/ingest_integration.test.ts b/x-pack/plugins/security_solution/server/endpoint/ingest_integration.test.ts index 733e25947347a..f16f1f6402818 100644 --- a/x-pack/plugins/security_solution/server/endpoint/ingest_integration.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/ingest_integration.test.ts @@ -81,7 +81,7 @@ describe('ingest_integration tests ', () => { endpointAppContextMock.appClientFactory, maxTimelineImportExportSize, endpointAppContextMock.security, - endpointAppContextMock.alerts, + endpointAppContextMock.alerting, licenseService, exceptionListClient ); diff --git a/x-pack/plugins/security_solution/server/endpoint/ingest_integration.ts b/x-pack/plugins/security_solution/server/endpoint/ingest_integration.ts index 080a8474da54e..a70ec4b215a81 100644 --- a/x-pack/plugins/security_solution/server/endpoint/ingest_integration.ts +++ b/x-pack/plugins/security_solution/server/endpoint/ingest_integration.ts @@ -6,7 +6,7 @@ */ import { ExceptionListClient } from '../../../lists/server'; -import { PluginStartContract as AlertsStartContract } from '../../../alerts/server'; +import { PluginStartContract as AlertsStartContract } from '../../../alerting/server'; import { SecurityPluginSetup } from '../../../security/server'; import { ExternalCallback } from '../../../fleet/server'; import { KibanaRequest, Logger, RequestHandlerContext } from '../../../../../src/core/server'; diff --git a/x-pack/plugins/security_solution/server/endpoint/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/mocks.ts index 8375dbdcc5fc7..be6289dcf6a7f 100644 --- a/x-pack/plugins/security_solution/server/endpoint/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/mocks.ts @@ -9,7 +9,7 @@ import { ILegacyScopedClusterClient, SavedObjectsClientContract } from 'kibana/s import { loggingSystemMock, savedObjectsServiceMock } from 'src/core/server/mocks'; import { listMock } from '../../../lists/server/mocks'; import { securityMock } from '../../../security/server/mocks'; -import { alertsMock } from '../../../alerts/server/mocks'; +import { alertsMock } from '../../../alerting/server/mocks'; import { xpackMocks } from '../../../../mocks'; import { FleetStartContract, ExternalCallback, PackageService } from '../../../fleet/server'; import { @@ -75,7 +75,7 @@ export const createMockEndpointAppContextServiceStartContract = (): jest.Mocked< manifestManager: getManifestManagerMock(), appClientFactory: factory, security: securityMock.createSetup(), - alerts: alertsMock.createStart(), + alerting: alertsMock.createStart(), config, licenseService: new LicenseService(), registerIngestCallback: jest.fn< diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/README.md b/x-pack/plugins/security_solution/server/lib/detection_engine/README.md index fa0716ec08285..d383413088b9b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/README.md +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/README.md @@ -152,7 +152,7 @@ logging.events: ``` See these two README.md's pages for more references on the alerting and actions API: -https://github.com/elastic/kibana/blob/master/x-pack/plugins/alerts/README.md +https://github.com/elastic/kibana/blob/master/x-pack/plugins/alerting/README.md https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions ### Signals API diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/create_notifications.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/create_notifications.test.ts index 2cc57f93a998f..f9244add61651 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/create_notifications.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/create_notifications.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { alertsClientMock } from '../../../../../alerts/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { createNotifications } from './create_notifications'; describe('createNotifications', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/create_notifications.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/create_notifications.ts index 1984005718967..b82e3052c3935 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/create_notifications.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/create_notifications.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Alert } from '../../../../../alerts/common'; +import { Alert } from '../../../../../alerting/common'; import { SERVER_APP_ID, NOTIFICATIONS_ID } from '../../../../common/constants'; import { CreateNotificationParams, RuleNotificationAlertTypeParams } from './types'; import { addTags } from './add_tags'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/delete_notifications.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/delete_notifications.test.ts index 7c2635e515d67..d277f04fb4826 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/delete_notifications.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/delete_notifications.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { alertsClientMock } from '../../../../../alerts/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { deleteNotifications } from './delete_notifications'; import { readNotifications } from './read_notifications'; jest.mock('./read_notifications'); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/find_notifications.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/find_notifications.ts index abc15398af0e1..6f8b1de1d9325 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/find_notifications.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/find_notifications.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AlertTypeParams, FindResult } from '../../../../../alerts/server'; +import { AlertTypeParams, FindResult } from '../../../../../alerting/server'; import { NOTIFICATIONS_ID } from '../../../../common/constants'; import { FindNotificationParams } from './types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/get_signals.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/get_signals.ts index 3d7b860316006..b716771d20ac3 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/get_signals.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/get_signals.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AlertServices } from '../../../../../alerts/server'; +import { AlertServices } from '../../../../../alerting/server'; import { SignalSearchResponse } from '../signals/types'; import { buildSignalsSearchQuery } from './build_signals_query'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/get_signals_count.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/get_signals_count.ts index d366dae3a3842..9811e5ce21086 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/get_signals_count.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/get_signals_count.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AlertServices } from '../../../../../alerts/server'; +import { AlertServices } from '../../../../../alerting/server'; import { buildSignalsSearchQuery } from './build_signals_query'; interface GetSignalsCount { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/read_notifications.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/read_notifications.test.ts index c89180bc2471b..0ee09dd4074c8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/read_notifications.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/read_notifications.test.ts @@ -6,7 +6,7 @@ */ import { readNotifications } from './read_notifications'; -import { alertsClientMock } from '../../../../../alerts/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { getNotificationResult, getFindNotificationsResultWithSingleHit, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/read_notifications.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/read_notifications.ts index e9a45dcd3e151..2f14f36fc5e0a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/read_notifications.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/read_notifications.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AlertTypeParams, SanitizedAlert } from '../../../../../alerts/common'; +import { AlertTypeParams, SanitizedAlert } from '../../../../../alerting/common'; import { ReadNotificationParams, isAlertType } from './types'; import { findNotifications } from './find_notifications'; import { INTERNAL_RULE_ALERT_ID_KEY } from '../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/rules_notification_alert_type.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/rules_notification_alert_type.test.ts index a7c6fc97e9bd6..4923aa3d1223e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/rules_notification_alert_type.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/rules_notification_alert_type.test.ts @@ -9,7 +9,7 @@ import { loggingSystemMock } from 'src/core/server/mocks'; import { getResult } from '../routes/__mocks__/request_responses'; import { rulesNotificationAlertType } from './rules_notification_alert_type'; import { buildSignalsSearchQuery } from './build_signals_query'; -import { alertsMock, AlertServicesMock } from '../../../../../alerts/server/mocks'; +import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; import { NotificationExecutorOptions } from './types'; import { sampleDocSearchResultsNoSortIdNoVersion, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.ts index dfb53be6c3f0e..729de70b5f9c4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.ts @@ -6,7 +6,7 @@ */ import { mapKeys, snakeCase } from 'lodash/fp'; -import { AlertInstance } from '../../../../../alerts/server'; +import { AlertInstance } from '../../../../../alerting/server'; import { SignalSource } from '../signals/types'; import { RuleTypeParams } from '../types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/types.ts index 463d073316b6b..0a32e0c21a075 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/types.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/types.ts @@ -14,8 +14,8 @@ import { AlertInstanceState, AlertInstanceContext, AlertExecutorOptions, -} from '../../../../../alerts/server'; -import { Alert } from '../../../../../alerts/common'; +} from '../../../../../alerting/server'; +import { Alert } from '../../../../../alerting/common'; import { NOTIFICATIONS_ID } from '../../../../common/constants'; import { RuleAlertAction } from '../../../../common/detection_engine/types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/update_notifications.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/update_notifications.test.ts index 5428b44685d33..0d4af8cd029a0 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/update_notifications.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/update_notifications.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { alertsClientMock } from '../../../../../alerts/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { updateNotifications } from './update_notifications'; import { readNotifications } from './read_notifications'; import { createNotifications } from './create_notifications'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/update_notifications.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/update_notifications.ts index 75abdbaa050df..40c2845abb607 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/update_notifications.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/update_notifications.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { PartialAlert } from '../../../../../alerts/server'; +import { PartialAlert } from '../../../../../alerting/server'; import { readNotifications } from './read_notifications'; import { RuleNotificationAlertTypeParams, UpdateNotificationParams } from './types'; import { addTags } from './add_tags'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts index 02843eec01e28..533b3f86728f1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts @@ -11,7 +11,7 @@ import { elasticsearchServiceMock, savedObjectsClientMock, } from '../../../../../../../../src/core/server/mocks'; -import { alertsClientMock } from '../../../../../../alerts/server/mocks'; +import { alertsClientMock } from '../../../../../../alerting/server/mocks'; import { licensingMock } from '../../../../../../licensing/server/mocks'; import { siemMock } from '../../../../mocks'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts index 09f738d416c32..b151b9e20e5fc 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts @@ -33,7 +33,7 @@ import { getRulesToUpdate } from '../../rules/get_rules_to_update'; import { getExistingPrepackagedRules } from '../../rules/get_existing_prepackaged_rules'; import { transformError, buildSiemResponse } from '../utils'; -import { AlertsClient } from '../../../../../../alerts/server'; +import { AlertsClient } from '../../../../../../alerting/server'; import { FrameworkRequest } from '../../../framework'; import { ExceptionListClient } from '../../../../../../lists/server'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts index 9c6ec0e7baf62..6b85c7a40743a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts @@ -24,7 +24,7 @@ import { transformBulkError, createBulkErrorObject, buildSiemResponse } from '.. import { updateRulesNotifications } from '../../rules/update_rules_notifications'; import { convertCreateAPIToInternalSchema } from '../../schemas/rule_converters'; import { RuleTypeParams } from '../../types'; -import { Alert } from '../../../../../../alerts/common'; +import { Alert } from '../../../../../../alerting/common'; export const createRulesBulkRoute = ( router: SecuritySolutionPluginRouter, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.ts index b817021cacddb..309d1bdbb1471 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.ts @@ -21,7 +21,7 @@ import { newTransformValidate } from './validate'; import { createRuleValidateTypeDependents } from '../../../../../common/detection_engine/schemas/request/create_rules_type_dependents'; import { convertCreateAPIToInternalSchema } from '../../schemas/rule_converters'; import { RuleTypeParams } from '../../types'; -import { Alert } from '../../../../../../alerts/common'; +import { Alert } from '../../../../../../alerting/common'; export const createRulesRoute = ( router: SecuritySolutionPluginRouter, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts index fc01eea130b88..33d566ab6f0c7 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts @@ -10,7 +10,7 @@ import { getFindResultStatus, ruleStatusRequest, getResult } from '../__mocks__/ import { serverMock, requestContextMock, requestMock } from '../__mocks__'; import { findRulesStatusesRoute } from './find_rules_status_route'; import { RuleStatusResponse } from '../../rules/types'; -import { AlertExecutionStatusErrorReasons } from '../../../../../../alerts/common'; +import { AlertExecutionStatusErrorReasons } from '../../../../../../alerting/common'; jest.mock('../../signals/rule_status_service'); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.test.ts index a07a4b05181c2..cf7d2e9eea2fa 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.test.ts @@ -26,8 +26,8 @@ import { INTERNAL_IDENTIFIER } from '../../../../../common/constants'; import { PartialFilter, RuleTypeParams } from '../../types'; import { BulkError, ImportSuccessError } from '../utils'; import { getOutputRuleAlertForRest } from '../__mocks__/utils'; -import { PartialAlert } from '../../../../../../alerts/server'; -import { SanitizedAlert } from '../../../../../../alerts/server/types'; +import { PartialAlert } from '../../../../../../alerting/server'; +import { SanitizedAlert } from '../../../../../../alerting/server/types'; import { createRulesStreamFromNdJson } from '../../rules/create_rules_stream_from_ndjson'; import { RuleAlertType } from '../../rules/types'; import { ImportRulesSchemaDecoded } from '../../../../../common/detection_engine/schemas/request/import_rules_schema'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.ts index 45665c61ea3f0..a28cc9bcb9b69 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.ts @@ -12,7 +12,7 @@ import uuid from 'uuid'; import { RulesSchema } from '../../../../../common/detection_engine/schemas/response/rules_schema'; import { ImportRulesSchemaDecoded } from '../../../../../common/detection_engine/schemas/request/import_rules_schema'; import { CreateRulesBulkSchema } from '../../../../../common/detection_engine/schemas/request/create_rules_bulk_schema'; -import { PartialAlert, FindResult } from '../../../../../../alerts/server'; +import { PartialAlert, FindResult } from '../../../../../../alerting/server'; import { INTERNAL_IDENTIFIER } from '../../../../../common/constants'; import { RuleAlertType, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.test.ts index ab0521c4cbb00..5bb63ada7f9a4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.test.ts @@ -10,7 +10,7 @@ import { transformValidateFindAlerts, transformValidateBulkError, } from './validate'; -import { FindResult } from '../../../../../../alerts/server'; +import { FindResult } from '../../../../../../alerting/server'; import { BulkError } from '../utils'; import { RulesSchema } from '../../../../../common/detection_engine/schemas/response'; import { getResult, getFindResultStatus } from '../__mocks__/request_responses'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.ts index 395587bbd32e4..cff7413308a4c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.ts @@ -22,7 +22,7 @@ import { } from '../../../../../common/detection_engine/schemas/response/rules_schema'; import { formatErrors } from '../../../../../common/format_errors'; import { exactCheck } from '../../../../../common/exact_check'; -import { PartialAlert, FindResult } from '../../../../../../alerts/server'; +import { PartialAlert, FindResult } from '../../../../../../alerting/server'; import { isAlertType, IRuleSavedAttributesSavedObjectAttributes, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.test.ts index 4e9c68a574fa3..43fba889c04d5 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.test.ts @@ -10,7 +10,7 @@ import { errors } from '@elastic/elasticsearch'; import { SavedObjectsFindResponse } from 'kibana/server'; -import { alertsClientMock } from '../../../../../alerts/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { IRuleSavedAttributesSavedObjectAttributes, IRuleStatusSOAttributes } from '../rules/types'; import { BadRequestError } from '../errors/bad_request_error'; import { @@ -29,7 +29,7 @@ import { import { responseMock } from './__mocks__'; import { exampleRuleStatus, exampleFindRuleStatusResponse } from '../signals/__mocks__/es_results'; import { getResult } from './__mocks__/request_responses'; -import { AlertExecutionStatusErrorReasons } from '../../../../../alerts/common'; +import { AlertExecutionStatusErrorReasons } from '../../../../../alerting/common'; let alertsClient: ReturnType; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.ts index 1f2ec245e215a..34f40012f00b4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.ts @@ -9,7 +9,7 @@ import Boom from '@hapi/boom'; import Joi from 'joi'; import { errors } from '@elastic/elasticsearch'; import { has, snakeCase } from 'lodash/fp'; -import { SanitizedAlert } from '../../../../../alerts/common'; +import { SanitizedAlert } from '../../../../../alerting/common'; import { RouteValidationFunction, @@ -17,7 +17,7 @@ import { CustomHttpResponseOptions, SavedObjectsFindResult, } from '../../../../../../../src/core/server'; -import { AlertsClient } from '../../../../../alerts/server'; +import { AlertsClient } from '../../../../../alerting/server'; import { BadRequestError } from '../errors/bad_request_error'; import { RuleStatusResponse, IRuleStatusSOAttributes } from '../rules/types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts index a778bd0f1a8b4..14498fa41d4b2 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts @@ -6,7 +6,7 @@ */ import { RuleAlertAction } from '../../../../common/detection_engine/types'; -import { AlertServices } from '../../../../../alerts/server'; +import { AlertServices } from '../../../../../alerting/server'; import { ruleActionsSavedObjectType } from './saved_object_mappings'; import { IRuleActionsAttributesSavedObjectAttributes } from './types'; import { getThrottleOptions, getRuleActionsFromSavedObject } from './utils'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/delete_rule_actions_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/delete_rule_actions_saved_object.ts index 101c44e36a784..8ef2b8ffb72ae 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/delete_rule_actions_saved_object.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/delete_rule_actions_saved_object.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AlertServices } from '../../../../../alerts/server'; +import { AlertServices } from '../../../../../alerting/server'; import { ruleActionsSavedObjectType } from './saved_object_mappings'; import { getRuleActionsSavedObject } from './get_rule_actions_saved_object'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts index 372ff569519a6..aa15617aab4ca 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts @@ -6,7 +6,7 @@ */ import { RuleAlertAction } from '../../../../common/detection_engine/types'; -import { AlertServices } from '../../../../../alerts/server'; +import { AlertServices } from '../../../../../alerting/server'; import { ruleActionsSavedObjectType } from './saved_object_mappings'; import { IRuleActionsAttributesSavedObjectAttributes } from './types'; import { getRuleActionsFromSavedObject } from './utils'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts index d0947f7800f74..32f7198594bfc 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AlertServices } from '../../../../../alerts/server'; +import { AlertServices } from '../../../../../alerting/server'; import { RuleAlertAction } from '../../../../common/detection_engine/types'; import { getRuleActionsSavedObject } from './get_rule_actions_saved_object'; import { createRuleActionsSavedObject } from './create_rule_actions_saved_object'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts index 94d8dbd7eba15..98767f24b5bb4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AlertServices } from '../../../../../alerts/server'; +import { AlertServices } from '../../../../../alerting/server'; import { ruleActionsSavedObjectType } from './saved_object_mappings'; import { RulesActionsSavedObject } from './get_rule_actions_saved_object'; import { RuleAlertAction } from '../../../../common/detection_engine/types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules.mock.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules.mock.ts index 1232971c7baf8..86feed1f39cef 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules.mock.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules.mock.ts @@ -6,7 +6,7 @@ */ import { CreateRulesOptions } from './types'; -import { alertsClientMock } from '../../../../../alerts/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; export const getCreateRulesOptionsMock = (): CreateRulesOptions => ({ author: ['Elastic'], diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules.ts index 3683cd377e672..e020810b6d03a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules.ts @@ -6,7 +6,7 @@ */ import { transformRuleToAlertAction } from '../../../../common/detection_engine/transform_actions'; -import { Alert } from '../../../../../alerts/common'; +import { Alert } from '../../../../../alerting/common'; import { SERVER_APP_ID, SIGNALS_ID } from '../../../../common/constants'; import { CreateRulesOptions } from './types'; import { addTags } from './add_tags'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/delete_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/delete_rules.test.ts index 4177d93302146..e7a4df790d62d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/delete_rules.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/delete_rules.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { alertsClientMock } from '../../../../../alerts/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { deleteRules } from './delete_rules'; import { readRules } from './read_rules'; jest.mock('./read_rules'); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/find_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/find_rules.ts index 3ee215951cd49..26151745b00d9 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/find_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/find_rules.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FindResult } from '../../../../../alerts/server'; +import { FindResult } from '../../../../../alerting/server'; import { SIGNALS_ID } from '../../../../common/constants'; import { RuleTypeParams } from '../types'; import { FindRuleOptions } from './types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_existing_prepackaged_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_existing_prepackaged_rules.test.ts index 201a8fb762ab2..ead4fac811372 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_existing_prepackaged_rules.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_existing_prepackaged_rules.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { alertsClientMock } from '../../../../../alerts/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { getResult, getFindResultWithSingleHit, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts index 724dbb3b93b44..a8c1d7aeb8eb1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts @@ -6,7 +6,7 @@ */ import { INTERNAL_IMMUTABLE_KEY } from '../../../../common/constants'; -import { AlertsClient } from '../../../../../alerts/server'; +import { AlertsClient } from '../../../../../alerting/server'; import { RuleAlertType, isAlertTypes } from './types'; import { findRules } from './find_rules'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.test.ts index 48a669a28728b..8ead079c9502e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.test.ts @@ -10,7 +10,7 @@ import { getFindResultWithSingleHit, FindHit, } from '../routes/__mocks__/request_responses'; -import { alertsClientMock } from '../../../../../alerts/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { getExportAll } from './get_export_all'; import { getListArrayMock } from '../../../../common/detection_engine/schemas/types/lists.mock'; import { getThreatMock } from '../../../../common/detection_engine/schemas/types/threat.mock'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.ts index de9a805abb98d..c0e893b8aea96 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AlertsClient } from '../../../../../alerts/server'; +import { AlertsClient } from '../../../../../alerting/server'; import { getNonPackagedRules } from './get_existing_prepackaged_rules'; import { getExportDetailsNdjson } from './get_export_details_ndjson'; import { transformAlertsToRules } from '../routes/rules/utils'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts index 29124b9e6e615..537a45115e83e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts @@ -12,7 +12,7 @@ import { FindHit, } from '../routes/__mocks__/request_responses'; import * as readRules from './read_rules'; -import { alertsClientMock } from '../../../../../alerts/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { getListArrayMock } from '../../../../common/detection_engine/schemas/types/lists.mock'; import { getThreatMock } from '../../../../common/detection_engine/schemas/types/threat.mock'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.ts index 420bf08049b04..f763fbfc41eae 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.ts @@ -6,7 +6,7 @@ */ import { RulesSchema } from '../../../../common/detection_engine/schemas/response/rules_schema'; -import { AlertsClient } from '../../../../../alerts/server'; +import { AlertsClient } from '../../../../../alerting/server'; import { getExportDetailsNdjson } from './get_export_details_ndjson'; import { isAlertType } from '../rules/types'; import { readRules } from './read_rules'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/install_prepacked_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/install_prepacked_rules.ts index 0d046bb6ab211..31df1dd4193a4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/install_prepacked_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/install_prepacked_rules.ts @@ -6,8 +6,8 @@ */ import { AddPrepackagedRulesSchemaDecoded } from '../../../../common/detection_engine/schemas/request/add_prepackaged_rules_schema'; -import { Alert, AlertTypeParams } from '../../../../../alerts/common'; -import { AlertsClient } from '../../../../../alerts/server'; +import { Alert, AlertTypeParams } from '../../../../../alerting/common'; +import { AlertsClient } from '../../../../../alerting/server'; import { createRules } from './create_rules'; import { PartialFilter } from '../types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/patch_rules.mock.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/patch_rules.mock.ts index 22c7dcc3a8616..796496e20809c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/patch_rules.mock.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/patch_rules.mock.ts @@ -6,10 +6,10 @@ */ import { PatchRulesOptions } from './types'; -import { alertsClientMock } from '../../../../../alerts/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { savedObjectsClientMock } from '../../../../../../../src/core/server/mocks'; import { INTERNAL_RULE_ID_KEY, INTERNAL_IMMUTABLE_KEY } from '../../../../common/constants'; -import { SanitizedAlert } from '../../../../../alerts/common'; +import { SanitizedAlert } from '../../../../../alerting/common'; import { RuleTypeParams } from '../types'; const rule: SanitizedAlert = { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/patch_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/patch_rules.ts index 00941419cb0b7..755a8cd6f1e58 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/patch_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/patch_rules.ts @@ -7,7 +7,7 @@ import { defaults } from 'lodash/fp'; import { validate } from '../../../../common/validate'; -import { PartialAlert } from '../../../../../alerts/server'; +import { PartialAlert } from '../../../../../alerting/server'; import { transformRuleToAlertAction } from '../../../../common/detection_engine/transform_actions'; import { PatchRulesOptions } from './types'; import { addTags } from './add_tags'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/read_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/read_rules.test.ts index c0b9decd60502..21e7ba5bc626f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/read_rules.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/read_rules.test.ts @@ -6,7 +6,7 @@ */ import { readRules } from './read_rules'; -import { alertsClientMock } from '../../../../../alerts/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { getResult, getFindResultWithSingleHit } from '../routes/__mocks__/request_responses'; export class TestError extends Error { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/read_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/read_rules.ts index 60b23a6cc5c62..ed84c1a0aba43 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/read_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/read_rules.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SanitizedAlert } from '../../../../../alerts/common'; +import { SanitizedAlert } from '../../../../../alerting/common'; import { INTERNAL_RULE_ID_KEY } from '../../../../common/constants'; import { RuleTypeParams } from '../types'; import { findRules } from './find_rules'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/types.ts index e8be32111a0e1..13a255d1b56d4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/types.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/types.ts @@ -99,8 +99,8 @@ import { ThreatIndicatorPathOrUndefined, } from '../../../../common/detection_engine/schemas/types/threat_mapping'; -import { AlertsClient, PartialAlert } from '../../../../../alerts/server'; -import { Alert, SanitizedAlert } from '../../../../../alerts/common'; +import { AlertsClient, PartialAlert } from '../../../../../alerting/server'; +import { Alert, SanitizedAlert } from '../../../../../alerting/common'; import { SIGNALS_ID } from '../../../../common/constants'; import { RuleTypeParams, PartialFilter } from '../types'; import { ListArrayOrUndefined, ListArray } from '../../../../common/detection_engine/schemas/types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_prepacked_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_prepacked_rules.test.ts index fd648bd8dfc35..1f75aa5a19a98 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_prepacked_rules.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_prepacked_rules.test.ts @@ -6,7 +6,7 @@ */ import { savedObjectsClientMock } from '../../../../../../../src/core/server/mocks'; -import { alertsClientMock } from '../../../../../alerts/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { getFindResultWithSingleHit } from '../routes/__mocks__/request_responses'; import { updatePrepackagedRules } from './update_prepacked_rules'; import { patchRules } from './patch_rules'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_prepacked_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_prepacked_rules.ts index ab2e7b613975b..ff4028c4c4e74 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_prepacked_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_prepacked_rules.ts @@ -7,7 +7,7 @@ import { SavedObjectsClientContract } from 'kibana/server'; import { AddPrepackagedRulesSchemaDecoded } from '../../../../common/detection_engine/schemas/request/add_prepackaged_rules_schema'; -import { AlertsClient } from '../../../../../alerts/server'; +import { AlertsClient } from '../../../../../alerting/server'; import { patchRules } from './patch_rules'; import { readRules } from './read_rules'; import { PartialFilter } from '../types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.mock.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.mock.ts index 1859de7ecc556..fd18ac7f7b6bc 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.mock.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.mock.ts @@ -6,7 +6,7 @@ */ import { UpdateRulesOptions } from './types'; -import { alertsClientMock } from '../../../../../alerts/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { savedObjectsClientMock } from '../../../../../../../src/core/server/mocks'; import { getUpdateRulesSchemaMock, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.test.ts index 665ba1c06f29e..083191329878b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.test.ts @@ -8,7 +8,7 @@ import { getResult, getMlResult } from '../routes/__mocks__/request_responses'; import { updateRules } from './update_rules'; import { getUpdateRulesOptionsMock, getUpdateMlRulesOptionsMock } from './update_rules.mock'; -import { AlertsClientMock } from '../../../../../alerts/server/alerts_client.mock'; +import { AlertsClientMock } from '../../../../../alerting/server/alerts_client.mock'; describe('updateRules', () => { it('should call alertsClient.disable if the rule was enabled and enabled is false', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.ts index 40900fdccdb28..fc9c32bca1c4c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.ts @@ -9,7 +9,7 @@ import { DEFAULT_MAX_SIGNALS } from '../../../../common/constants'; import { transformRuleToAlertAction } from '../../../../common/detection_engine/transform_actions'; -import { PartialAlert } from '../../../../../alerts/server'; +import { PartialAlert } from '../../../../../alerting/server'; import { readRules } from './read_rules'; import { UpdateRulesOptions } from './types'; import { addTags } from './add_tags'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules_notifications.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules_notifications.ts index 41453bd87dd8e..60e448e3058c8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules_notifications.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules_notifications.ts @@ -6,7 +6,7 @@ */ import { RuleAlertAction } from '../../../../common/detection_engine/types'; -import { AlertsClient, AlertServices } from '../../../../../alerts/server'; +import { AlertsClient, AlertServices } from '../../../../../alerting/server'; import { updateOrCreateRuleActionsSavedObject } from '../rule_actions/update_or_create_rule_actions_saved_object'; import { updateNotifications } from '../notifications/update_notifications'; import { RuleActions } from '../rule_actions/types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_alert_instances.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_alert_instances.sh index 9df17ecefa9c1..f5df0c368300c 100755 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_alert_instances.sh +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_alert_instances.sh @@ -11,7 +11,7 @@ set -e ./check_env_variables.sh # Example: ./get_alert_instances.sh -# https://github.com/elastic/kibana/blob/master/x-pack/plugins/alerts/README.md#get-apialert_find-find-alerts +# https://github.com/elastic/kibana/blob/master/x-pack/plugins/alerting/README.md#get-apialert_find-find-alerts curl -s -k \ -u ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD} \ -X GET ${KIBANA_URL}${SPACE_URL}/api/alerts/_find \ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_alert_types.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_alert_types.sh index a25f85385d865..46659766bce16 100755 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_alert_types.sh +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_alert_types.sh @@ -11,7 +11,7 @@ set -e ./check_env_variables.sh # Example: ./get_alert_types.sh -# https://github.com/elastic/kibana/blob/master/x-pack/plugins/alerts/README.md#get-apialerttypes-list-alert-types +# https://github.com/elastic/kibana/blob/master/x-pack/plugins/alerting/README.md#get-apialerttypes-list-alert-types curl -s -k \ -u ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD} \ -X GET ${KIBANA_URL}${SPACE_URL}/api/alerts/list_alert_types \ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/bulk_create_ml_signals.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/bulk_create_ml_signals.ts index 9f111d15b6806..c6a8c211417b8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/bulk_create_ml_signals.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/bulk_create_ml_signals.ts @@ -13,7 +13,7 @@ import { AlertInstanceContext, AlertInstanceState, AlertServices, -} from '../../../../../alerts/server'; +} from '../../../../../alerting/server'; import { RuleAlertAction } from '../../../../common/detection_engine/types'; import { RuleTypeParams, RefreshTypes } from '../types'; import { singleBulkCreate, SingleBulkCreateResponse } from './single_bulk_create'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.test.ts index b3c8175171de7..55cd7b942b3d8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.test.ts @@ -6,7 +6,7 @@ */ import { getFilter } from './get_filter'; -import { alertsMock, AlertServicesMock } from '../../../../../alerts/server/mocks'; +import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; import { getExceptionListItemSchemaMock } from '../../../../../lists/common/schemas/response/exception_list_item_schema.mock'; describe('get_filter', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.ts index e6d1a274bd78d..d8ee4619fb4da 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.ts @@ -20,7 +20,7 @@ import { AlertInstanceContext, AlertInstanceState, AlertServices, -} from '../../../../../alerts/server'; +} from '../../../../../alerting/server'; import { PartialFilter } from '../types'; import { BadRequestError } from '../errors/bad_request_error'; import { QueryFilter } from './types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.test.ts index a51624c47c74b..9c4bf37aca789 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { alertsMock, AlertServicesMock } from '../../../../../alerts/server/mocks'; +import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; import { DEFAULT_INDEX_KEY, DEFAULT_INDEX_PATTERN } from '../../../../common/constants'; import { getInputIndex } from './get_input_output_index'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.ts index 6ab50ffb3545c..f0c62bee7aec9 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.ts @@ -10,7 +10,7 @@ import { AlertInstanceContext, AlertInstanceState, AlertServices, -} from '../../../../../alerts/server'; +} from '../../../../../alerting/server'; export const getInputIndex = async ( services: AlertServices, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.test.ts index 50823ebd85d05..ead9da533d775 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.test.ts @@ -18,7 +18,7 @@ import { import { searchAfterAndBulkCreate } from './search_after_bulk_create'; import { buildRuleMessageFactory } from './rule_messages'; import { DEFAULT_SIGNALS_INDEX } from '../../../../common/constants'; -import { alertsMock, AlertServicesMock } from '../../../../../alerts/server/mocks'; +import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; import uuid from 'uuid'; import { listMock } from '../../../../../lists/server/mocks'; import { getExceptionListItemSchemaMock } from '../../../../../lists/common/schemas/response/exception_list_item_schema.mock'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/siem_rule_action_groups.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/siem_rule_action_groups.ts index dc621c2f2509d..f401e3bd228ce 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/siem_rule_action_groups.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/siem_rule_action_groups.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { ActionGroup } from '../../../../../alerts/common'; +import { ActionGroup } from '../../../../../alerting/common'; export const siemRuleActionGroups: Array> = [ { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts index d3d82682cbb4a..0b85ff8c4fa32 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts @@ -14,7 +14,7 @@ import { getEqlResult, } from '../routes/__mocks__/request_responses'; import { signalRulesAlertType } from './signal_rule_alert_type'; -import { alertsMock, AlertServicesMock } from '../../../../../alerts/server/mocks'; +import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; import { ruleStatusServiceFactory } from './rule_status_service'; import { getListsClient, getExceptions, sortExceptionItems, checkPrivileges } from './utils'; import { parseScheduleDates } from '../../../../common/detection_engine/parse_schedule_dates'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_bulk_create.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_bulk_create.test.ts index 19aba907f0c84..8ade6460cbffc 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_bulk_create.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_bulk_create.test.ts @@ -19,7 +19,7 @@ import { } from './__mocks__/es_results'; import { DEFAULT_SIGNALS_INDEX } from '../../../../common/constants'; import { singleBulkCreate, filterDuplicateRules } from './single_bulk_create'; -import { alertsMock, AlertServicesMock } from '../../../../../alerts/server/mocks'; +import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; import { buildRuleMessageFactory } from './rule_messages'; const buildRuleMessage = buildRuleMessageFactory({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_bulk_create.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_bulk_create.ts index 15261ab5fad01..4d66a1fe7de92 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_bulk_create.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_bulk_create.ts @@ -11,7 +11,7 @@ import { AlertInstanceContext, AlertInstanceState, AlertServices, -} from '../../../../../alerts/server'; +} from '../../../../../alerting/server'; import { SignalSearchResponse, BulkResponse, SignalHit, WrappedSignalHit } from './types'; import { RuleAlertAction } from '../../../../common/detection_engine/types'; import { RuleTypeParams, RefreshTypes } from '../types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.test.ts index 7246a219d3b06..c3fb5a2b0a739 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.test.ts @@ -11,7 +11,7 @@ import { sampleDocSearchResultsWithSortId, } from './__mocks__/es_results'; import { singleSearchAfter } from './single_search_after'; -import { alertsMock, AlertServicesMock } from '../../../../../alerts/server/mocks'; +import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; import { ShardError } from '../../types'; import { buildRuleMessageFactory } from './rule_messages'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.ts index 9c58bba296ad3..f7b30cd7f2e83 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.ts @@ -10,7 +10,7 @@ import { AlertInstanceContext, AlertInstanceState, AlertServices, -} from '../../../../../alerts/server'; +} from '../../../../../alerting/server'; import { Logger } from '../../../../../../../src/core/server'; import { SignalSearchResponse } from './types'; import { BuildRuleMessage } from './rule_messages'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/types.ts index 14763f3493c14..7d0ab3a2b6d25 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/types.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/types.ts @@ -27,7 +27,7 @@ import { AlertInstanceContext, AlertInstanceState, AlertServices, -} from '../../../../../../alerts/server'; +} from '../../../../../../alerting/server'; import { ExceptionListItemSchema } from '../../../../../../lists/common/schemas'; import { ILegacyScopedClusterClient, Logger } from '../../../../../../../../src/core/server'; import { RuleAlertAction } from '../../../../../common/detection_engine/types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/bulk_create_threshold_signals.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/bulk_create_threshold_signals.ts index 880a73f08b990..c226b63a0b9ac 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/bulk_create_threshold_signals.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/bulk_create_threshold_signals.ts @@ -18,7 +18,7 @@ import { AlertInstanceContext, AlertInstanceState, AlertServices, -} from '../../../../../../alerts/server'; +} from '../../../../../../alerting/server'; import { BaseHit, RuleAlertAction } from '../../../../../common/detection_engine/types'; import { TermAggregationBucket } from '../../../types'; import { RuleTypeParams, RefreshTypes } from '../../types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_previous_threshold_signals.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_previous_threshold_signals.ts index 9b7521fe9a122..06e718b646ffa 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_previous_threshold_signals.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_previous_threshold_signals.ts @@ -10,7 +10,7 @@ import { AlertInstanceContext, AlertInstanceState, AlertServices, -} from '../../../../../../alerts/server'; +} from '../../../../../../alerting/server'; import { Logger } from '../../../../../../../../src/core/server'; import { BuildRuleMessage } from '../rule_messages'; import { singleSearchAfter } from '../single_search_after'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_threshold_signals.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_threshold_signals.test.ts index c7536a2d081bf..622e77309765f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_threshold_signals.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_threshold_signals.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { alertsMock, AlertServicesMock } from '../../../../../../alerts/server/mocks'; +import { alertsMock, AlertServicesMock } from '../../../../../../alerting/server/mocks'; import { getQueryFilter } from '../../../../../common/detection_engine/get_query_filter'; import { mockLogger } from '../__mocks__/es_results'; import { buildRuleMessageFactory } from '../rule_messages'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_threshold_signals.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_threshold_signals.ts index 2f6e43d9c8f1e..7dda263dd9f0a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_threshold_signals.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_threshold_signals.ts @@ -16,7 +16,7 @@ import { AlertInstanceContext, AlertInstanceState, AlertServices, -} from '../../../../../../alerts/server'; +} from '../../../../../../alerting/server'; import { Logger } from '../../../../../../../../src/core/server'; import { BuildRuleMessage } from '../rule_messages'; import { singleSearchAfter } from '../single_search_after'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/get_threshold_signal_history.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/get_threshold_signal_history.ts index 133e71dd8e208..b93d8423c0259 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/get_threshold_signal_history.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/get_threshold_signal_history.ts @@ -11,7 +11,7 @@ import { AlertInstanceContext, AlertInstanceState, AlertServices, -} from '../../../../../../alerts/server'; +} from '../../../../../../alerting/server'; import { Logger } from '../../../../../../../../src/core/server'; import { ThresholdSignalHistory } from '../types'; import { BuildRuleMessage } from '../rule_messages'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/types.ts index 5d07c86bab4f1..013d4a07cbeb7 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/types.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/types.ts @@ -16,7 +16,7 @@ import { AlertInstanceContext, AlertExecutorOptions, AlertServices, -} from '../../../../../alerts/server'; +} from '../../../../../alerting/server'; import { BaseSearchResponse, SearchHit, SearchResponse, TermAggregationBucket } from '../../types'; import { EqlSearchResponse, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.test.ts index 5478c0dd16f4d..3a1dde3f5c28c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.test.ts @@ -9,7 +9,7 @@ import moment from 'moment'; import sinon from 'sinon'; import { ApiResponse, Context } from '@elastic/elasticsearch/lib/Transport'; -import { alertsMock, AlertServicesMock } from '../../../../../alerts/server/mocks'; +import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; import { listMock } from '../../../../../lists/server/mocks'; import { buildRuleMessageFactory } from './rule_messages'; import { ExceptionListClient } from '../../../../../lists/server'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts index 7e3a426e335c3..2d98f4f6a8a69 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts @@ -22,7 +22,7 @@ import { AlertInstanceState, AlertServices, parseDuration, -} from '../../../../../alerts/server'; +} from '../../../../../alerting/server'; import { ExceptionListClient, ListClient, ListPluginSetup } from '../../../../../lists/server'; import { ExceptionListItemSchema } from '../../../../../lists/common/schemas'; import { ListArray } from '../../../../common/detection_engine/schemas/types/lists'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/tags/read_tags.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/tags/read_tags.test.ts index 5e7d43c5283b8..918857b976bea 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/tags/read_tags.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/tags/read_tags.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { alertsClientMock } from '../../../../../alerts/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { getResult, getFindResultWithMultiHits } from '../routes/__mocks__/request_responses'; import { INTERNAL_RULE_ID_KEY, INTERNAL_IDENTIFIER } from '../../../../common/constants'; import { readRawTags, readTags, convertTagsToSet, convertToTags, isTags } from './read_tags'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/tags/read_tags.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/tags/read_tags.ts index bb9ce433e3929..2d1966917d287 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/tags/read_tags.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/tags/read_tags.ts @@ -7,7 +7,7 @@ import { has } from 'lodash/fp'; import { INTERNAL_IDENTIFIER } from '../../../../common/constants'; -import { AlertsClient } from '../../../../../alerts/server'; +import { AlertsClient } from '../../../../../alerting/server'; import { findRules } from '../rules/find_rules'; export interface TagType { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/types.ts index a8721d82285f2..5bac992fd8da4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/types.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/types.ts @@ -53,7 +53,7 @@ import { import { LegacyCallAPIOptions } from '../../../../../../src/core/server'; import { Filter } from '../../../../../../src/plugins/data/server'; import { ListArrayOrUndefined } from '../../../common/detection_engine/schemas/types'; -import { AlertTypeParams } from '../../../../alerts/common'; +import { AlertTypeParams } from '../../../../alerting/common'; export type PartialFilter = Partial; diff --git a/x-pack/plugins/security_solution/server/plugin.ts b/x-pack/plugins/security_solution/server/plugin.ts index b675920977df1..905078f676eef 100644 --- a/x-pack/plugins/security_solution/server/plugin.ts +++ b/x-pack/plugins/security_solution/server/plugin.ts @@ -26,7 +26,7 @@ import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/s import { PluginSetupContract as AlertingSetup, PluginStartContract as AlertPluginStartContract, -} from '../../alerts/server'; +} from '../../alerting/server'; import { SecurityPluginSetup as SecuritySetup } from '../../security/server'; import { PluginSetupContract as FeaturesSetup } from '../../features/server'; import { MlPluginSetup as MlSetup } from '../../ml/server'; @@ -79,7 +79,7 @@ import { PolicyWatcher } from './endpoint/lib/policy/license_watch'; import { securitySolutionTimelineEqlSearchStrategyProvider } from './search_strategy/timeline/eql'; export interface SetupPlugins { - alerts: AlertingSetup; + alerting: AlertingSetup; data: DataPluginSetup; encryptedSavedObjects?: EncryptedSavedObjectsSetup; features: FeaturesSetup; @@ -93,7 +93,7 @@ export interface SetupPlugins { } export interface StartPlugins { - alerts: AlertPluginStartContract; + alerting: AlertPluginStartContract; data: DataPluginStart; fleet?: FleetStartContract; licensing: LicensingPluginStart; @@ -264,7 +264,7 @@ export class Plugin implements IPlugin { return { diff --git a/x-pack/plugins/stack_alerts/server/alert_types/es_query/action_context.ts b/x-pack/plugins/stack_alerts/server/alert_types/es_query/action_context.ts index 7461d7faf5450..617da80bcc8d7 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/es_query/action_context.ts +++ b/x-pack/plugins/stack_alerts/server/alert_types/es_query/action_context.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { AlertExecutorOptions, AlertInstanceContext } from '../../../../alerts/server'; +import { AlertExecutorOptions, AlertInstanceContext } from '../../../../alerting/server'; import { EsQueryAlertParams } from './alert_type_params'; import { ESSearchHit } from '../../../../../typings/elasticsearch'; diff --git a/x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type.ts b/x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type.ts index acc61c147f915..bad25a0d1d09c 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type.ts +++ b/x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type.ts @@ -17,7 +17,7 @@ import { } from './alert_type_params'; import { STACK_ALERTS_FEATURE_ID } from '../../../common'; import { ComparatorFns, getHumanReadableComparator } from '../lib'; -import { parseDuration } from '../../../../alerts/server'; +import { parseDuration } from '../../../../alerting/server'; import { buildSortedEventsQuery } from '../../../common/build_sorted_events_query'; import { ESSearchHit } from '../../../../../typings/elasticsearch'; diff --git a/x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type_params.ts b/x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type_params.ts index 23f314b521511..58d9c725cfd1b 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type_params.ts +++ b/x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type_params.ts @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; import { schema, TypeOf } from '@kbn/config-schema'; import { ComparatorFnNames } from '../lib'; import { validateTimeWindowUnits } from '../../../../triggers_actions_ui/server'; -import { AlertTypeState } from '../../../../alerts/server'; +import { AlertTypeState } from '../../../../alerting/server'; export const ES_QUERY_MAX_HITS_PER_EXECUTION = 10000; diff --git a/x-pack/plugins/stack_alerts/server/alert_types/es_query/index.ts b/x-pack/plugins/stack_alerts/server/alert_types/es_query/index.ts index d4b231e0c2116..ffe0388e64216 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/es_query/index.ts +++ b/x-pack/plugins/stack_alerts/server/alert_types/es_query/index.ts @@ -11,10 +11,10 @@ import { getAlertType } from './alert_type'; interface RegisterParams { logger: Logger; - alerts: AlertingSetup; + alerting: AlertingSetup; } export function register(params: RegisterParams) { - const { logger, alerts } = params; - alerts.registerType(getAlertType(logger)); + const { logger, alerting } = params; + alerting.registerType(getAlertType(logger)); } diff --git a/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/alert_type.ts b/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/alert_type.ts index 4f93f2839730a..6015881270405 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/alert_type.ts +++ b/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/alert_type.ts @@ -16,7 +16,7 @@ import { AlertInstanceState, AlertInstanceContext, AlertTypeParams, -} from '../../../../alerts/server'; +} from '../../../../alerting/server'; import { Query } from '../../../../../../src/plugins/data/common/query'; export const GEO_CONTAINMENT_ID = '.geo-containment'; diff --git a/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/geo_containment.ts b/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/geo_containment.ts index aadd4c418e1c2..3f2421529c346 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/geo_containment.ts +++ b/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/geo_containment.ts @@ -9,7 +9,7 @@ import _ from 'lodash'; import { SearchResponse } from 'elasticsearch'; import { Logger } from 'src/core/server'; import { executeEsQueryFactory, getShapesFilters, OTHER_CATEGORY } from './es_query_builder'; -import { AlertServices } from '../../../../alerts/server'; +import { AlertServices } from '../../../../alerting/server'; import { ActionGroupId, GEO_CONTAINMENT_ID, diff --git a/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/index.ts b/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/index.ts index 0ad5c8f8df986..ee0b36bcd1766 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/index.ts +++ b/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/index.ts @@ -19,12 +19,12 @@ import { interface RegisterParams { logger: Logger; - alerts: AlertingSetup; + alerting: AlertingSetup; } export function register(params: RegisterParams) { - const { logger, alerts } = params; - alerts.registerType< + const { logger, alerting } = params; + alerting.registerType< GeoContainmentParams, GeoContainmentState, GeoContainmentInstanceState, diff --git a/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/tests/geo_containment.test.ts b/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/tests/geo_containment.test.ts index 02e70d6b05b40..62d95e4ed88d8 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/tests/geo_containment.test.ts +++ b/x-pack/plugins/stack_alerts/server/alert_types/geo_containment/tests/geo_containment.test.ts @@ -11,7 +11,7 @@ import sampleJsonResponseWithNesting from './es_sample_response_with_nesting.jso import { getActiveEntriesAndGenerateAlerts, transformResults } from '../geo_containment'; import { SearchResponse } from 'elasticsearch'; import { OTHER_CATEGORY } from '../es_query_builder'; -import { alertsMock } from '../../../../../alerts/server/mocks'; +import { alertsMock } from '../../../../../alerting/server/mocks'; import { GeoContainmentInstanceContext, GeoContainmentInstanceState } from '../alert_type'; describe('geo_containment', () => { diff --git a/x-pack/plugins/stack_alerts/server/alert_types/index.ts b/x-pack/plugins/stack_alerts/server/alert_types/index.ts index 7351fdfc67352..219ccad2ece63 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/index.ts +++ b/x-pack/plugins/stack_alerts/server/alert_types/index.ts @@ -13,7 +13,7 @@ import { register as registerEsQuery } from './es_query'; interface RegisterAlertTypesParams { logger: Logger; data: Promise; - alerts: AlertingSetup; + alerting: AlertingSetup; } export function registerBuiltInAlertTypes(params: RegisterAlertTypesParams) { diff --git a/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/action_context.ts b/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/action_context.ts index 03525ff67d819..69ca1c2700ebe 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/action_context.ts +++ b/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/action_context.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { Params } from './alert_type_params'; -import { AlertExecutorOptions, AlertInstanceContext } from '../../../../alerts/server'; +import { AlertExecutorOptions, AlertInstanceContext } from '../../../../alerting/server'; // alert type context provided to actions diff --git a/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/index.ts b/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/index.ts index 5dba176b43d64..e9016e8cc6a18 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/index.ts +++ b/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/index.ts @@ -17,10 +17,10 @@ export const DEFAULT_GROUPS = 100; interface RegisterParams { logger: Logger; data: Promise; - alerts: AlertingSetup; + alerting: AlertingSetup; } export function register(params: RegisterParams) { - const { logger, data, alerts } = params; - alerts.registerType(getAlertType(logger, data)); + const { logger, data, alerting } = params; + alerting.registerType(getAlertType(logger, data)); } diff --git a/x-pack/plugins/stack_alerts/server/plugin.test.ts b/x-pack/plugins/stack_alerts/server/plugin.test.ts index 7ad1bdec15eaf..3560a849e1ec5 100644 --- a/x-pack/plugins/stack_alerts/server/plugin.test.ts +++ b/x-pack/plugins/stack_alerts/server/plugin.test.ts @@ -7,7 +7,7 @@ import { AlertingBuiltinsPlugin } from './plugin'; import { coreMock } from '../../../../src/core/server/mocks'; -import { alertsMock } from '../../alerts/server/mocks'; +import { alertsMock } from '../../alerting/server/mocks'; import { featuresPluginMock } from '../../features/server/mocks'; import { BUILT_IN_ALERTS_FEATURE } from './feature'; @@ -26,7 +26,7 @@ describe('AlertingBuiltins Plugin', () => { it('should register built-in alert types', async () => { const alertingSetup = alertsMock.createSetup(); const featuresSetup = featuresPluginMock.createSetup(); - await plugin.setup(coreSetup, { alerts: alertingSetup, features: featuresSetup }); + await plugin.setup(coreSetup, { alerting: alertingSetup, features: featuresSetup }); expect(alertingSetup.registerType).toHaveBeenCalledTimes(3); diff --git a/x-pack/plugins/stack_alerts/server/plugin.ts b/x-pack/plugins/stack_alerts/server/plugin.ts index 1343c46ecdd72..0a73186996852 100644 --- a/x-pack/plugins/stack_alerts/server/plugin.ts +++ b/x-pack/plugins/stack_alerts/server/plugin.ts @@ -19,7 +19,7 @@ export class AlertingBuiltinsPlugin this.logger = ctx.logger.get(); } - public setup(core: CoreSetup, { alerts, features }: StackAlertsDeps) { + public setup(core: CoreSetup, { alerting, features }: StackAlertsDeps) { features.registerKibanaFeature(BUILT_IN_ALERTS_FEATURE); registerBuiltInAlertTypes({ @@ -27,7 +27,7 @@ export class AlertingBuiltinsPlugin data: core .getStartServices() .then(async ([, { triggersActionsUi }]) => triggersActionsUi.data), - alerts, + alerting, }); } diff --git a/x-pack/plugins/stack_alerts/server/types.ts b/x-pack/plugins/stack_alerts/server/types.ts index f0e79a0c03d71..9725d90138300 100644 --- a/x-pack/plugins/stack_alerts/server/types.ts +++ b/x-pack/plugins/stack_alerts/server/types.ts @@ -6,18 +6,18 @@ */ import { PluginStartContract as TriggersActionsUiStartContract } from '../../triggers_actions_ui/server'; -import { PluginSetupContract as AlertingSetup } from '../../alerts/server'; +import { PluginSetupContract as AlertingSetup } from '../../alerting/server'; export { PluginSetupContract as AlertingSetup, AlertType, AlertExecutorOptions, -} from '../../alerts/server'; +} from '../../alerting/server'; import { PluginSetupContract as FeaturesPluginSetup } from '../../features/server'; // this plugin's dependendencies export interface StackAlertsDeps { - alerts: AlertingSetup; + alerting: AlertingSetup; features: FeaturesPluginSetup; } diff --git a/x-pack/plugins/stack_alerts/tsconfig.json b/x-pack/plugins/stack_alerts/tsconfig.json index ad047001f8d89..c83935945c67b 100644 --- a/x-pack/plugins/stack_alerts/tsconfig.json +++ b/x-pack/plugins/stack_alerts/tsconfig.json @@ -15,7 +15,7 @@ ], "references": [ { "path": "../../../src/core/tsconfig.json" }, - { "path": "../alerts/tsconfig.json" }, + { "path": "../alerting/tsconfig.json" }, { "path": "../features/tsconfig.json" }, { "path": "../triggers_actions_ui/tsconfig.json" }, { "path": "../../../src/plugins/kibana_react/tsconfig.json" }, diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 6daf76144253b..413f0d54afca9 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -4776,25 +4776,25 @@ "xpack.actions.serverSideErrors.unavailableLicenseErrorMessage": "現時点でライセンス情報を入手できないため、アクションタイプ {actionTypeId} は無効です。", "xpack.actions.serverSideErrors.unavailableLicenseInformationErrorMessage": "グラフを利用できません。現在ライセンス情報が利用できません。", "xpack.actions.urlAllowedHostsConfigurationError": "ターゲット{field}「{value}」はKibana構成xpack.actions.allowedHostsに追加されていません", - "xpack.alerts.alertNavigationRegistry.get.missingNavigationError": "「{consumer}」内のアラートタイプ「{alertType}」のナビゲーションは登録されていません。", - "xpack.alerts.alertNavigationRegistry.register.duplicateDefaultError": "「{consumer}」内のデフォルトナビゲーションはすでに登録されています。", - "xpack.alerts.alertNavigationRegistry.register.duplicateNavigationError": "「{consumer}」内のアラートタイプ「{alertType}」のナビゲーションはすでに登録されています。", - "xpack.alerts.alertsClient.invalidDate": "パラメーター{field}の無効な日付:「{dateValue}」", - "xpack.alerts.alertsClient.validateActions.invalidGroups": "無効なアクショングループ:{groups}", - "xpack.alerts.alertTypeRegistry.get.missingAlertTypeError": "アラートタイプ「{id}」は登録されていません。", - "xpack.alerts.alertTypeRegistry.register.customRecoveryActionGroupUsageError": "アラートタイプ [id=\"{id}\"] を登録できません。アクショングループ [{actionGroup}] は、復元とアクティブなアクショングループの両方として使用できません。", - "xpack.alerts.alertTypeRegistry.register.duplicateAlertTypeError": "アラートタイプ\"{id}\"はすでに登録されています。", - "xpack.alerts.api.error.disabledApiKeys": "アラートは API キーに依存しますがキーが無効になっているようです", - "xpack.alerts.appName": "アラート", - "xpack.alerts.builtinActionGroups.recovered": "回復済み", - "xpack.alerts.injectActionParams.email.kibanaFooterLinkText": "Kibana でアラートを表示", - "xpack.alerts.loadAlertType.missingAlertTypeError": "アラートタイプ「{id}」は登録されていません。", - "xpack.alerts.server.healthStatus.available": "アラートフレームワークを使用できます", - "xpack.alerts.server.healthStatus.degraded": "アラートフレームワークは劣化しました", - "xpack.alerts.server.healthStatus.unavailable": "アラートフレームワークを使用できません", - "xpack.alerts.serverSideErrors.expirerdLicenseErrorMessage": "{licenseType} ライセンスの期限が切れたのでアラートタイプ {alertTypeId} は無効です。", - "xpack.alerts.serverSideErrors.unavailableLicenseErrorMessage": "現時点でライセンス情報を入手できないため、アラートタイプ {alertTypeId} は無効です。", - "xpack.alerts.serverSideErrors.unavailableLicenseInformationErrorMessage": "アラートを利用できません。現在ライセンス情報が利用できません。", + "xpack.alerting.alertNavigationRegistry.get.missingNavigationError": "「{consumer}」内のアラートタイプ「{alertType}」のナビゲーションは登録されていません。", + "xpack.alerting.alertNavigationRegistry.register.duplicateDefaultError": "「{consumer}」内のデフォルトナビゲーションはすでに登録されています。", + "xpack.alerting.alertNavigationRegistry.register.duplicateNavigationError": "「{consumer}」内のアラートタイプ「{alertType}」のナビゲーションはすでに登録されています。", + "xpack.alerting.alertsClient.invalidDate": "パラメーター{field}の無効な日付:「{dateValue}」", + "xpack.alerting.alertsClient.validateActions.invalidGroups": "無効なアクショングループ:{groups}", + "xpack.alerting.alertTypeRegistry.get.missingAlertTypeError": "アラートタイプ「{id}」は登録されていません。", + "xpack.alerting.alertTypeRegistry.register.customRecoveryActionGroupUsageError": "アラートタイプ [id=\"{id}\"] を登録できません。アクショングループ [{actionGroup}] は、復元とアクティブなアクショングループの両方として使用できません。", + "xpack.alerting.alertTypeRegistry.register.duplicateAlertTypeError": "アラートタイプ\"{id}\"はすでに登録されています。", + "xpack.alerting.api.error.disabledApiKeys": "アラートは API キーに依存しますがキーが無効になっているようです", + "xpack.alerting.appName": "アラート", + "xpack.alerting.builtinActionGroups.recovered": "回復済み", + "xpack.alerting.injectActionParams.email.kibanaFooterLinkText": "Kibana でアラートを表示", + "xpack.alerting.loadAlertType.missingAlertTypeError": "アラートタイプ「{id}」は登録されていません。", + "xpack.alerting.server.healthStatus.available": "アラートフレームワークを使用できます", + "xpack.alerting.server.healthStatus.degraded": "アラートフレームワークは劣化しました", + "xpack.alerting.server.healthStatus.unavailable": "アラートフレームワークを使用できません", + "xpack.alerting.serverSideErrors.expirerdLicenseErrorMessage": "{licenseType} ライセンスの期限が切れたのでアラートタイプ {alertTypeId} は無効です。", + "xpack.alerting.serverSideErrors.unavailableLicenseErrorMessage": "現時点でライセンス情報を入手できないため、アラートタイプ {alertTypeId} は無効です。", + "xpack.alerting.serverSideErrors.unavailableLicenseInformationErrorMessage": "アラートを利用できません。現在ライセンス情報が利用できません。", "xpack.apm.a.thresholdMet": "しきい値一致", "xpack.apm.addDataButtonLabel": "データの追加", "xpack.apm.agentConfig.allOptionLabel": "すべて", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 83dc1397d3b12..0b4428b562574 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -4781,26 +4781,26 @@ "xpack.actions.serverSideErrors.unavailableLicenseErrorMessage": "操作类型 {actionTypeId} 已禁用,因为许可证信息当前不可用。", "xpack.actions.serverSideErrors.unavailableLicenseInformationErrorMessage": "操作不可用 - 许可信息当前不可用。", "xpack.actions.urlAllowedHostsConfigurationError": "目标 {field} 的“{value}”未添加到 Kibana 配置 xpack.actions.allowedHosts", - "xpack.alerts.alertNavigationRegistry.get.missingNavigationError": "在“{consumer}”内针对告警类型“{alertType}”的导航未注册。", - "xpack.alerts.alertNavigationRegistry.register.duplicateDefaultError": "“{consumer}”内的默认导航已注册。", - "xpack.alerts.alertNavigationRegistry.register.duplicateNavigationError": "在“{consumer}”内针对告警类型“{alertType}”的导航已注册。", - "xpack.alerts.alertsClient.invalidDate": "参数 {field} 的日期无效:“{dateValue}”", - "xpack.alerts.alertsClient.validateActions.invalidGroups": "无效操作组:{groups}", - "xpack.alerts.alertTypeRegistry.get.missingAlertTypeError": "未注册告警类型“{id}”。", - "xpack.alerts.alertTypeRegistry.register.customRecoveryActionGroupUsageError": "无法注册告警类型 [id=\"{id}\"]。操作组 [{actionGroup}] 无法同时用作恢复和活动操作组。", - "xpack.alerts.alertTypeRegistry.register.duplicateAlertTypeError": "已注册告警类型“{id}”。", - "xpack.alerts.alertTypeRegistry.register.reservedActionGroupUsageError": "无法注册告警类型 [id=\"{id}\"]。操作组 [{actionGroups}] 由框架保留。", - "xpack.alerts.api.error.disabledApiKeys": "Alerting 依赖的 API 密钥似乎已禁用", - "xpack.alerts.appName": "告警", - "xpack.alerts.builtinActionGroups.recovered": "已恢复", - "xpack.alerts.injectActionParams.email.kibanaFooterLinkText": "在 Kibana 中查看告警", - "xpack.alerts.loadAlertType.missingAlertTypeError": "未注册告警类型“{id}”。", - "xpack.alerts.server.healthStatus.available": "告警框架可用", - "xpack.alerts.server.healthStatus.degraded": "告警框架已降级", - "xpack.alerts.server.healthStatus.unavailable": "告警框架不可用", - "xpack.alerts.serverSideErrors.expirerdLicenseErrorMessage": "告警类型 {alertTypeId} 已禁用,因为您的{licenseType}许可证已过期。", - "xpack.alerts.serverSideErrors.unavailableLicenseErrorMessage": "告警类型 {alertTypeId} 已禁用,因为许可证信息当前不可用。", - "xpack.alerts.serverSideErrors.unavailableLicenseInformationErrorMessage": "告警不可用 - 许可信息当前不可用。", + "xpack.alerting.alertNavigationRegistry.get.missingNavigationError": "在“{consumer}”内针对告警类型“{alertType}”的导航未注册。", + "xpack.alerting.alertNavigationRegistry.register.duplicateDefaultError": "“{consumer}”内的默认导航已注册。", + "xpack.alerting.alertNavigationRegistry.register.duplicateNavigationError": "在“{consumer}”内针对告警类型“{alertType}”的导航已注册。", + "xpack.alerting.alertsClient.invalidDate": "参数 {field} 的日期无效:“{dateValue}”", + "xpack.alerting.alertsClient.validateActions.invalidGroups": "无效操作组:{groups}", + "xpack.alerting.alertTypeRegistry.get.missingAlertTypeError": "未注册告警类型“{id}”。", + "xpack.alerting.alertTypeRegistry.register.customRecoveryActionGroupUsageError": "无法注册告警类型 [id=\"{id}\"]。操作组 [{actionGroup}] 无法同时用作恢复和活动操作组。", + "xpack.alerting.alertTypeRegistry.register.duplicateAlertTypeError": "已注册告警类型“{id}”。", + "xpack.alerting.alertTypeRegistry.register.reservedActionGroupUsageError": "无法注册告警类型 [id=\"{id}\"]。操作组 [{actionGroups}] 由框架保留。", + "xpack.alerting.api.error.disabledApiKeys": "Alerting 依赖的 API 密钥似乎已禁用", + "xpack.alerting.appName": "告警", + "xpack.alerting.builtinActionGroups.recovered": "已恢复", + "xpack.alerting.injectActionParams.email.kibanaFooterLinkText": "在 Kibana 中查看告警", + "xpack.alerting.loadAlertType.missingAlertTypeError": "未注册告警类型“{id}”。", + "xpack.alerting.server.healthStatus.available": "告警框架可用", + "xpack.alerting.server.healthStatus.degraded": "告警框架已降级", + "xpack.alerting.server.healthStatus.unavailable": "告警框架不可用", + "xpack.alerting.serverSideErrors.expirerdLicenseErrorMessage": "告警类型 {alertTypeId} 已禁用,因为您的{licenseType}许可证已过期。", + "xpack.alerting.serverSideErrors.unavailableLicenseErrorMessage": "告警类型 {alertTypeId} 已禁用,因为许可证信息当前不可用。", + "xpack.alerting.serverSideErrors.unavailableLicenseInformationErrorMessage": "告警不可用 - 许可信息当前不可用。", "xpack.apm.a.thresholdMet": "已达到阈值", "xpack.apm.addDataButtonLabel": "添加数据", "xpack.apm.agentConfig.allOptionLabel": "全部", diff --git a/x-pack/plugins/triggers_actions_ui/README.md b/x-pack/plugins/triggers_actions_ui/README.md index 54e627d384936..dc1da533af374 100644 --- a/x-pack/plugins/triggers_actions_ui/README.md +++ b/x-pack/plugins/triggers_actions_ui/README.md @@ -256,7 +256,7 @@ Each alert type should be defined as `AlertTypeModel` object with the these prop |requiresAppContext|Define if alert type is enabled for create and edit in the alerting management UI.| IMPORTANT: The current UI supports a single action group only. -Action groups are mapped from the server API result for [GET /api/alerts/list_alert_types: List alert types](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerts#get-apialerttypes-list-alert-types). +Action groups are mapped from the server API result for [GET /api/alerts/list_alert_types: List alert types](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting#get-apialerttypes-list-alert-types). Server side alert type model: ``` export interface AlertType { @@ -294,7 +294,7 @@ triggersActionsUi.alertTypeRegistry.register(getSomeNewAlertType()); ## Create and register new alert type UI example -Before registering a UI for a new Alert Type, you should first register the type on the server-side by following the Alerting guide: https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerts#example +Before registering a UI for a new Alert Type, you should first register the type on the server-side by following the Alerting guide: https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting#example Alert type UI is expected to be defined as `AlertTypeModel` object. diff --git a/x-pack/plugins/triggers_actions_ui/kibana.json b/x-pack/plugins/triggers_actions_ui/kibana.json index 2938d94bf426a..a302673c2ec08 100644 --- a/x-pack/plugins/triggers_actions_ui/kibana.json +++ b/x-pack/plugins/triggers_actions_ui/kibana.json @@ -3,9 +3,9 @@ "version": "kibana", "server": true, "ui": true, - "optionalPlugins": ["alerts", "features", "home", "spaces"], + "optionalPlugins": ["alerting", "features", "home", "spaces"], "requiredPlugins": ["management", "charts", "data", "kibanaReact", "kibanaUtils", "savedObjects"], "configPath": ["xpack", "trigger_actions_ui"], "extraPublicDirs": ["public/common", "public/common/constants"], - "requiredBundles": ["home", "alerts", "esUiShared", "kibanaReact", "kibanaUtils"] + "requiredBundles": ["home", "alerting", "esUiShared", "kibanaReact", "kibanaUtils"] } diff --git a/x-pack/plugins/triggers_actions_ui/public/application/app.tsx b/x-pack/plugins/triggers_actions_ui/public/application/app.tsx index 0afb81031e3bc..162e161378690 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/app.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/app.tsx @@ -16,7 +16,7 @@ import { Section, routeToAlertDetails } from './constants'; import { ActionTypeRegistryContract, AlertTypeRegistryContract } from '../types'; import { ChartsPluginStart } from '../../../../../src/plugins/charts/public'; import { DataPublicPluginStart } from '../../../../../src/plugins/data/public'; -import { PluginStartContract as AlertingStart } from '../../../alerts/public'; +import { PluginStartContract as AlertingStart } from '../../../alerting/public'; import type { SpacesPluginStart } from '../../../spaces/public'; import { suspendedComponentWithProps } from './lib/suspended_component_with_props'; @@ -34,7 +34,7 @@ const AlertDetailsRoute = lazy( export interface TriggersAndActionsUiServices extends CoreStart { data: DataPublicPluginStart; charts: ChartsPluginStart; - alerts?: AlertingStart; + alerting?: AlertingStart; spaces?: SpacesPluginStart; storage?: Storage; setBreadcrumbs: (crumbs: ChromeBreadcrumb[]) => void; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/constants/index.ts b/x-pack/plugins/triggers_actions_ui/public/application/constants/index.ts index fac8f60bffffa..e5db5a45975af 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/constants/index.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/constants/index.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; -export { BASE_ALERT_API_PATH } from '../../../../alerts/common'; +export { BASE_ALERT_API_PATH } from '../../../../alerting/common'; export { BASE_ACTION_API_PATH } from '../../../../actions/common'; export type Section = 'connectors' | 'alerts'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.test.ts index 0dca49ea5353d..8a72cdb0d6145 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.test.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.test.ts @@ -7,7 +7,7 @@ import { AlertType, ActionVariables } from '../../types'; import { transformActionVariables } from './action_variables'; -import { ALERTS_FEATURE_ID } from '../../../../alerts/common'; +import { ALERTS_FEATURE_ID } from '../../../../alerting/common'; beforeEach(() => jest.resetAllMocks()); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.ts index 92be6a8685c7c..03524bbb45188 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.ts @@ -35,7 +35,7 @@ function prefixKeys(actionVariables: ActionVariable[], prefix: string): ActionVa } // this list should be the same as in: -// x-pack/plugins/alerts/server/task_runner/transform_action_params.ts +// x-pack/plugins/alerting/server/task_runner/transform_action_params.ts function getAlwaysProvidedActionVariables(): ActionVariable[] { const result: ActionVariable[] = []; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/alert_api.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/alert_api.test.ts index 6ea4377d8df90..495363f8e55b9 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/alert_api.test.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/alert_api.test.ts @@ -30,7 +30,7 @@ import { mapFiltersToKql, } from './alert_api'; import uuid from 'uuid'; -import { AlertNotifyWhenType, ALERTS_FEATURE_ID } from '../../../../alerts/common'; +import { AlertNotifyWhenType, ALERTS_FEATURE_ID } from '../../../../alerting/common'; const http = httpServiceMock.createStartContract(); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/alert_api.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/alert_api.ts index 69352544979ad..e0ef7dbe08412 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/alert_api.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/alert_api.ts @@ -10,7 +10,7 @@ import { Errors, identity } from 'io-ts'; import { pipe } from 'fp-ts/lib/pipeable'; import { fold } from 'fp-ts/lib/Either'; import { pick } from 'lodash'; -import { alertStateSchema, AlertingFrameworkHealth } from '../../../../alerts/common'; +import { alertStateSchema, AlertingFrameworkHealth } from '../../../../alerting/common'; import { BASE_ALERT_API_PATH } from '../constants'; import { Alert, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/get_defaults_for_action_params.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/get_defaults_for_action_params.test.ts index 4eeb3d9a4451c..9928e3bcc38a4 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/get_defaults_for_action_params.test.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/get_defaults_for_action_params.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { RecoveredActionGroup } from '../../../../alerts/common'; +import { RecoveredActionGroup } from '../../../../alerting/common'; import { AlertProvidedActionVariables } from './action_variables'; import { getDefaultsForActionParams } from './get_defaults_for_action_params'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/get_defaults_for_action_params.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/get_defaults_for_action_params.ts index 1c7c4e454108c..6a4c7dccf9617 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/get_defaults_for_action_params.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/get_defaults_for_action_params.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AlertActionParam } from '../../../../alerts/common'; +import { AlertActionParam } from '../../../../alerting/common'; import { EventActionOptions } from '../components/builtin_action_types/types'; import { AlertProvidedActionVariables } from './action_variables'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.test.tsx index 7f9b12beb074b..26a101cedf955 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.test.tsx @@ -23,7 +23,7 @@ import { useKibana } from '../../../common/lib/kibana'; import { RecoveredActionGroup, isActionGroupDisabledForActionTypeId, -} from '../../../../../alerts/common'; +} from '../../../../../alerting/common'; jest.mock('../../../common/lib/kibana'); jest.mock('../../lib/action_connector_api', () => ({ diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx index d382459d325ec..2dcc875a169c4 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx @@ -40,7 +40,7 @@ import { DEFAULT_HIDDEN_ACTION_TYPES, DEFAULT_HIDDEN_ONLY_ON_ALERTS_ACTION_TYPES, } from '../../../common/constants'; -import { ActionGroup, AlertActionParam } from '../../../../../alerts/common'; +import { ActionGroup, AlertActionParam } from '../../../../../alerting/common'; import { useKibana } from '../../../common/lib/kibana'; import { DefaultActionParamsGetter } from '../../lib/get_defaults_for_action_params'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_type_form.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_type_form.tsx index ebd449c30c83d..9a42a48e98a0d 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_type_form.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_type_form.tsx @@ -27,7 +27,7 @@ import { EuiErrorBoundary, } from '@elastic/eui'; import { pick } from 'lodash'; -import { AlertActionParam } from '../../../../../alerts/common'; +import { AlertActionParam } from '../../../../../alerting/common'; import { IErrorObject, AlertAction, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.test.tsx index e64c867ee2bb0..a41708f052dc8 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.test.tsx @@ -16,7 +16,7 @@ import { ActionGroup, AlertExecutionStatusErrorReasons, ALERTS_FEATURE_ID, -} from '../../../../../../alerts/common'; +} from '../../../../../../alerting/common'; import { useKibana } from '../../../../common/lib/kibana'; import { alertTypeRegistryMock } from '../../../alert_type_registry.mock'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.tsx index 4a863fdad6714..d425566d8f3df 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.tsx @@ -27,7 +27,7 @@ import { EuiButton, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -import { AlertExecutionStatusErrorReasons } from '../../../../../../alerts/common'; +import { AlertExecutionStatusErrorReasons } from '../../../../../../alerting/common'; import { hasAllPrivilege, hasExecuteActionsCapability } from '../../../lib/capabilities'; import { getAlertingSectionBreadcrumb, getAlertDetailsBreadcrumb } from '../../../lib/breadcrumb'; import { getCurrentDocTitle } from '../../../lib/doc_title'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_instances.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_instances.tsx index 12cb1f27c1011..1074c2da954a0 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_instances.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_instances.tsx @@ -12,7 +12,7 @@ import { EuiBasicTable, EuiHealth, EuiSpacer, EuiSwitch, EuiToolTip } from '@ela // @ts-ignore import { RIGHT_ALIGNMENT, CENTER_ALIGNMENT } from '@elastic/eui/lib/services'; import { padStart, chunk } from 'lodash'; -import { ActionGroup, AlertInstanceStatusValues } from '../../../../../../alerts/common'; +import { ActionGroup, AlertInstanceStatusValues } from '../../../../../../alerting/common'; import { Alert, AlertInstanceSummary, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/view_in_app.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/view_in_app.test.tsx index 46e9c831fdb42..f787ad76fd1bf 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/view_in_app.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/view_in_app.test.tsx @@ -23,7 +23,7 @@ describe('view in app', () => { describe('link to the app that created the alert', () => { it('is disabled when there is no navigation', async () => { const alert = mockAlert(); - const { alerts } = useKibana().services; + const { alerting } = useKibana().services; let component: ReactWrapper; await act(async () => { // use mount as we need useEffect to run @@ -34,7 +34,7 @@ describe('view in app', () => { expect(component!.find('button').prop('disabled')).toBe(true); expect(component!.text()).toBe('View in app'); - expect(alerts!.getNavigation).toBeCalledWith(alert.id); + expect(alerting!.getNavigation).toBeCalledWith(alert.id); }); }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/view_in_app.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/view_in_app.tsx index 1e541ed35ac20..1e7903545ab2c 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/view_in_app.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/view_in_app.tsx @@ -16,7 +16,7 @@ import { AlertNavigation, AlertStateNavigation, AlertUrlNavigation, -} from '../../../../../../alerts/common'; +} from '../../../../../../alerting/common'; import { Alert } from '../../../../types'; import { useKibana } from '../../../../common/lib/kibana'; @@ -31,7 +31,7 @@ type AlertNavigationLoadingState = AlertNavigation | false | null; export const ViewInApp: React.FunctionComponent = ({ alert }) => { const { application: { navigateToApp }, - alerts: maybeAlerting, + alerting: maybeAlerting, } = useKibana().services; const [alertNavigation, setAlertNavigation] = useState(null); @@ -44,8 +44,8 @@ export const ViewInApp: React.FunctionComponent = ({ alert }) => * navigation isn't supported */ () => setAlertNavigation(NO_NAVIGATION), - (alerts) => { - return alerts + (alerting) => { + return alerting .getNavigation(alert.id) .then((nav) => (nav ? setAlertNavigation(nav) : setAlertNavigation(NO_NAVIGATION))) .catch(() => { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_add.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_add.test.tsx index bf94b0a2f3f0a..a2463d785a3eb 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_add.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_add.test.tsx @@ -24,7 +24,7 @@ import { } from '../../../types'; import { alertTypeRegistryMock } from '../../alert_type_registry.mock'; import { ReactWrapper } from 'enzyme'; -import { ALERTS_FEATURE_ID } from '../../../../../alerts/common'; +import { ALERTS_FEATURE_ID } from '../../../../../alerting/common'; import { useKibana } from '../../../common/lib/kibana'; jest.mock('../../../common/lib/kibana'); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_conditions.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_conditions.tsx index ad33b5815261d..e12c7f98bc9ba 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_conditions.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_conditions.tsx @@ -9,7 +9,7 @@ import React, { PropsWithChildren } from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiFlexItem, EuiText, EuiFlexGroup, EuiTitle, EuiButtonEmpty } from '@elastic/eui'; import { partition } from 'lodash'; -import { ActionGroup, getBuiltinActionGroups } from '../../../../../alerts/common'; +import { ActionGroup, getBuiltinActionGroups } from '../../../../../alerting/common'; const BUILT_IN_ACTION_GROUPS: Set = new Set(getBuiltinActionGroups().map(({ id }) => id)); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_edit.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_edit.test.tsx index e5b9f6f76a3c9..0736e28f193b8 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_edit.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_edit.test.tsx @@ -20,7 +20,7 @@ import { alertTypeRegistryMock } from '../../alert_type_registry.mock'; import { ReactWrapper } from 'enzyme'; import AlertEdit from './alert_edit'; import { useKibana } from '../../../common/lib/kibana'; -import { ALERTS_FEATURE_ID } from '../../../../../alerts/common'; +import { ALERTS_FEATURE_ID } from '../../../../../alerting/common'; jest.mock('../../../common/lib/kibana'); const actionTypeRegistry = actionTypeRegistryMock.create(); const alertTypeRegistry = alertTypeRegistryMock.create(); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_form.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_form.test.tsx index cb23f01449176..8113a1f64af51 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_form.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_form.test.tsx @@ -20,7 +20,7 @@ import { } from '../../../types'; import { AlertForm } from './alert_form'; import { coreMock } from 'src/core/public/mocks'; -import { ALERTS_FEATURE_ID, RecoveredActionGroup } from '../../../../../alerts/common'; +import { ALERTS_FEATURE_ID, RecoveredActionGroup } from '../../../../../alerting/common'; import { useKibana } from '../../../common/lib/kibana'; const actionTypeRegistry = actionTypeRegistryMock.create(); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_form.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_form.tsx index 06eaa8285991c..7756f9e92a2cb 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_form.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_form.tsx @@ -40,7 +40,7 @@ import { KibanaFeature } from '../../../../../features/public'; import { getDurationNumberInItsUnit, getDurationUnitValue, -} from '../../../../../alerts/common/parse_duration'; +} from '../../../../../alerting/common/parse_duration'; import { loadAlertTypes } from '../../lib/alert_api'; import { AlertReducerAction, InitialAlert } from './alert_reducer'; import { @@ -61,7 +61,7 @@ import { ALERTS_FEATURE_ID, RecoveredActionGroup, isActionGroupDisabledForActionTypeId, -} from '../../../../../alerts/common'; +} from '../../../../../alerting/common'; import { hasAllPrivilege, hasShowActionsCapability } from '../../lib/capabilities'; import { SolutionFilter } from './solution_filter'; import './alert_form.scss'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_notify_when.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_notify_when.test.tsx index 3093dbb7d5d9d..fc5b7a0925e77 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_notify_when.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_notify_when.test.tsx @@ -10,7 +10,7 @@ import { mountWithIntl, nextTick } from '@kbn/test/jest'; import { ReactWrapper } from 'enzyme'; import { act } from 'react-dom/test-utils'; import { Alert } from '../../../types'; -import { ALERTS_FEATURE_ID } from '../../../../../alerts/common'; +import { ALERTS_FEATURE_ID } from '../../../../../alerting/common'; import { AlertNotifyWhen } from './alert_notify_when'; describe('alert_notify_when', () => { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_reducer.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_reducer.ts index 346998f6c73dc..4f32a5013cbbe 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_reducer.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_reducer.ts @@ -8,7 +8,7 @@ import { SavedObjectAttribute } from 'kibana/public'; import { isEqual } from 'lodash'; import { Reducer } from 'react'; -import { AlertActionParam, IntervalSchedule } from '../../../../../alerts/common'; +import { AlertActionParam, IntervalSchedule } from '../../../../../alerting/common'; import { Alert, AlertAction } from '../../../types'; export type InitialAlert = Partial & diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alert_status_filter.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alert_status_filter.tsx index 40c2b68deda5e..38343116825dd 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alert_status_filter.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alert_status_filter.tsx @@ -17,7 +17,7 @@ import { import { AlertExecutionStatuses, AlertExecutionStatusValues, -} from '../../../../../../alerts/common'; +} from '../../../../../../alerting/common'; import { alertsStatusesTranslationsMapping } from '../translations'; interface AlertStatusFilterProps { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.test.tsx index fc41022dfb7b0..4756001c71a75 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.test.tsx @@ -17,7 +17,7 @@ import { ValidationResult } from '../../../../types'; import { AlertExecutionStatusErrorReasons, ALERTS_FEATURE_ID, -} from '../../../../../../alerts/common'; +} from '../../../../../../alerting/common'; import { useKibana } from '../../../../common/lib/kibana'; jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx index ac85557c2c163..f98b3f03dfade 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx @@ -54,7 +54,7 @@ import { AlertExecutionStatusValues, ALERTS_FEATURE_ID, AlertExecutionStatusErrorReasons, -} from '../../../../../../alerts/common'; +} from '../../../../../../alerting/common'; import { hasAllPrivilege } from '../../../lib/capabilities'; import { alertsStatusesTranslationsMapping, ALERT_STATUS_LICENSE_ERROR } from '../translations'; import { useKibana } from '../../../../common/lib/kibana'; diff --git a/x-pack/plugins/triggers_actions_ui/public/common/lib/kibana/kibana_react.mock.ts b/x-pack/plugins/triggers_actions_ui/public/common/lib/kibana/kibana_react.mock.ts index ec0fb91a12ec4..d20eb6a5cfe3d 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/lib/kibana/kibana_react.mock.ts +++ b/x-pack/plugins/triggers_actions_ui/public/common/lib/kibana/kibana_react.mock.ts @@ -26,7 +26,7 @@ export const createStartServicesMock = (): TriggersAndActionsUiServices => { } as AlertTypeRegistryContract, dataPlugin: jest.fn(), navigateToApp: jest.fn(), - alerts: { + alerting: { getNavigation: jest.fn(async (id) => id === 'alert-with-nav' ? { path: '/alert' } : undefined ), diff --git a/x-pack/plugins/triggers_actions_ui/public/plugin.ts b/x-pack/plugins/triggers_actions_ui/public/plugin.ts index 7c3c273c1f384..0d6089038c5ad 100644 --- a/x-pack/plugins/triggers_actions_ui/public/plugin.ts +++ b/x-pack/plugins/triggers_actions_ui/public/plugin.ts @@ -22,7 +22,7 @@ import { HomePublicPluginSetup, } from '../../../../src/plugins/home/public'; import { ChartsPluginStart } from '../../../../src/plugins/charts/public'; -import { PluginStartContract as AlertingStart } from '../../alerts/public'; +import { PluginStartContract as AlertingStart } from '../../alerting/public'; import { DataPublicPluginStart } from '../../../../src/plugins/data/public'; import { Storage } from '../../../../src/plugins/kibana_utils/public'; import type { SpacesPluginStart } from '../../spaces/public'; @@ -68,7 +68,7 @@ interface PluginsSetup { interface PluginsStart { data: DataPublicPluginStart; charts: ChartsPluginStart; - alerts?: AlertingStart; + alerting?: AlertingStart; spaces?: SpacesPluginStart; navigateToApp: CoreStart['application']['navigateToApp']; features: FeaturesPluginStart; @@ -143,7 +143,7 @@ export class Plugin ...coreStart, data: pluginsStart.data, charts: pluginsStart.charts, - alerts: pluginsStart.alerts, + alerting: pluginsStart.alerting, spaces: pluginsStart.spaces, element: params.element, storage: new Storage(window.localStorage), diff --git a/x-pack/plugins/triggers_actions_ui/public/types.ts b/x-pack/plugins/triggers_actions_ui/public/types.ts index 017ce70b838a7..f48c708555bb6 100644 --- a/x-pack/plugins/triggers_actions_ui/public/types.ts +++ b/x-pack/plugins/triggers_actions_ui/public/types.ts @@ -12,7 +12,7 @@ import { ChartsPluginSetup } from 'src/plugins/charts/public'; import { DataPublicPluginStart } from 'src/plugins/data/public'; import { ActionType } from '../../actions/common'; import { TypeRegistry } from './application/type_registry'; -import { AlertType as CommonAlertType } from '../../alerts/common'; +import { AlertType as CommonAlertType } from '../../alerting/common'; import { ActionGroup, AlertActionParam, @@ -26,7 +26,7 @@ import { AlertingFrameworkHealth, AlertNotifyWhenType, AlertTypeParams, -} from '../../alerts/common'; +} from '../../alerting/common'; // In Triggers and Actions we treat all `Alert`s as `SanitizedAlert` // so the `Params` is a black-box of Record diff --git a/x-pack/plugins/triggers_actions_ui/server/data/lib/date_range_info.ts b/x-pack/plugins/triggers_actions_ui/server/data/lib/date_range_info.ts index 554c6d930aad5..116abffc2ca2c 100644 --- a/x-pack/plugins/triggers_actions_ui/server/data/lib/date_range_info.ts +++ b/x-pack/plugins/triggers_actions_ui/server/data/lib/date_range_info.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { times } from 'lodash'; -import { parseDuration } from '../../../../alerts/server'; +import { parseDuration } from '../../../../alerting/server'; import { MAX_INTERVALS } from '../index'; // dates as numbers are epoch millis diff --git a/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_types.ts b/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_types.ts index 0f2c395416e5a..f6a1950c0fd97 100644 --- a/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_types.ts +++ b/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_types.ts @@ -11,7 +11,7 @@ import { i18n } from '@kbn/i18n'; import { schema, TypeOf } from '@kbn/config-schema'; -import { parseDuration } from '../../../../alerts/server'; +import { parseDuration } from '../../../../alerting/server'; import { MAX_INTERVALS } from '../index'; import { CoreQueryParamsSchemaProperties, validateCoreQueryBody } from './core_query_types'; import { diff --git a/x-pack/plugins/triggers_actions_ui/server/plugin.ts b/x-pack/plugins/triggers_actions_ui/server/plugin.ts index 3933751105cb4..a5751c1a8abf0 100644 --- a/x-pack/plugins/triggers_actions_ui/server/plugin.ts +++ b/x-pack/plugins/triggers_actions_ui/server/plugin.ts @@ -6,7 +6,7 @@ */ import { Logger, Plugin, CoreSetup, PluginInitializerContext } from 'src/core/server'; -import { PluginSetupContract as AlertsPluginSetup } from '../../alerts/server'; +import { PluginSetupContract as AlertsPluginSetup } from '../../alerting/server'; import { EncryptedSavedObjectsPluginSetup } from '../../encrypted_saved_objects/server'; import { getService, register as registerDataService } from './data'; import { createHealthRoute } from './routes/health'; @@ -18,7 +18,7 @@ export interface PluginStartContract { interface PluginsSetup { encryptedSavedObjects?: EncryptedSavedObjectsPluginSetup; - alerts?: AlertsPluginSetup; + alerting?: AlertsPluginSetup; } export class TriggersActionsPlugin implements Plugin { @@ -39,7 +39,7 @@ export class TriggersActionsPlugin implements Plugin baseRoute: BASE_ROUTE, }); - createHealthRoute(this.logger, router, BASE_ROUTE, plugins.alerts !== undefined); + createHealthRoute(this.logger, router, BASE_ROUTE, plugins.alerting !== undefined); } public start(): PluginStartContract { diff --git a/x-pack/plugins/triggers_actions_ui/tsconfig.json b/x-pack/plugins/triggers_actions_ui/tsconfig.json index 715ed6848d9b7..8202449b22298 100644 --- a/x-pack/plugins/triggers_actions_ui/tsconfig.json +++ b/x-pack/plugins/triggers_actions_ui/tsconfig.json @@ -16,7 +16,7 @@ ], "references": [ { "path": "../../../src/core/tsconfig.json" }, - { "path": "../alerts/tsconfig.json" }, + { "path": "../alerting/tsconfig.json" }, { "path": "../features/tsconfig.json" }, { "path": "../../../src/plugins/data/tsconfig.json" }, { "path": "../../../src/plugins/saved_objects/tsconfig.json" }, diff --git a/x-pack/plugins/uptime/common/constants/alerts.ts b/x-pack/plugins/uptime/common/constants/alerts.ts index 46ce0b27e406b..37258fca3bc4d 100644 --- a/x-pack/plugins/uptime/common/constants/alerts.ts +++ b/x-pack/plugins/uptime/common/constants/alerts.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ActionGroup } from '../../../alerts/common'; +import { ActionGroup } from '../../../alerting/common'; export type MonitorStatusActionGroup = ActionGroup<'xpack.uptime.alerts.actionGroups.monitorStatus'>; export type TLSActionGroup = ActionGroup<'xpack.uptime.alerts.actionGroups.tls'>; diff --git a/x-pack/plugins/uptime/kibana.json b/x-pack/plugins/uptime/kibana.json index 79ab7943d72a7..aea4ce947511e 100644 --- a/x-pack/plugins/uptime/kibana.json +++ b/x-pack/plugins/uptime/kibana.json @@ -4,7 +4,7 @@ "kibanaVersion": "kibana", "optionalPlugins": ["data", "home", "observability", "ml"], "requiredPlugins": [ - "alerts", + "alerting", "embeddable", "features", "licensing", diff --git a/x-pack/plugins/uptime/public/state/actions/types.ts b/x-pack/plugins/uptime/public/state/actions/types.ts index 83f50dcca0734..b830f81624046 100644 --- a/x-pack/plugins/uptime/public/state/actions/types.ts +++ b/x-pack/plugins/uptime/public/state/actions/types.ts @@ -7,7 +7,7 @@ import { Action } from 'redux-actions'; import { IHttpFetchError } from 'src/core/public'; -import { Alert } from '../../../../alerts/common'; +import { Alert } from '../../../../alerting/common'; import { UptimeAlertTypeParams } from '../alerts/alerts'; export interface AsyncAction { diff --git a/x-pack/plugins/uptime/public/state/alerts/alerts.ts b/x-pack/plugins/uptime/public/state/alerts/alerts.ts index f328bd5b9a5a7..ac41e1ac6934d 100644 --- a/x-pack/plugins/uptime/public/state/alerts/alerts.ts +++ b/x-pack/plugins/uptime/public/state/alerts/alerts.ts @@ -22,7 +22,7 @@ import { NewAlertParams, } from '../api/alerts'; import { ActionConnector as RawActionConnector } from '../../../../triggers_actions_ui/public'; -import { Alert } from '../../../../alerts/common'; +import { Alert } from '../../../../alerting/common'; import { kibanaService } from '../kibana_service'; import { monitorIdSelector } from '../selectors'; import { AlertsResult, MonitorIdParam } from '../actions/types'; diff --git a/x-pack/plugins/uptime/public/state/api/alerts.ts b/x-pack/plugins/uptime/public/state/api/alerts.ts index b89f4d5e71f58..ae203797982de 100644 --- a/x-pack/plugins/uptime/public/state/api/alerts.ts +++ b/x-pack/plugins/uptime/public/state/api/alerts.ts @@ -12,7 +12,7 @@ import { ActionConnector } from '../alerts/alerts'; import { AlertsResult, MonitorIdParam } from '../actions/types'; import { ActionType, AlertAction } from '../../../../triggers_actions_ui/public'; import { API_URLS } from '../../../common/constants'; -import { Alert, AlertTypeParams } from '../../../../alerts/common'; +import { Alert, AlertTypeParams } from '../../../../alerting/common'; import { AtomicStatusCheckParams } from '../../../common/runtime_types/alerts'; import { populateAlertActions } from './alert_actions'; diff --git a/x-pack/plugins/uptime/server/lib/adapters/framework/adapter_types.ts b/x-pack/plugins/uptime/server/lib/adapters/framework/adapter_types.ts index aacad73bf1103..d1bbbc1d18567 100644 --- a/x-pack/plugins/uptime/server/lib/adapters/framework/adapter_types.ts +++ b/x-pack/plugins/uptime/server/lib/adapters/framework/adapter_types.ts @@ -35,7 +35,7 @@ export interface UptimeCoreSetup { export interface UptimeCorePlugins { features: PluginSetupContract; - alerts: any; + alerting: any; elasticsearch: any; usageCollection: UsageCollectionSetup; ml: MlSetup; diff --git a/x-pack/plugins/uptime/server/lib/alerts/duration_anomaly.ts b/x-pack/plugins/uptime/server/lib/alerts/duration_anomaly.ts index 0c9f9dd849341..b3262976b0cac 100644 --- a/x-pack/plugins/uptime/server/lib/alerts/duration_anomaly.ts +++ b/x-pack/plugins/uptime/server/lib/alerts/duration_anomaly.ts @@ -8,7 +8,7 @@ import { KibanaRequest, SavedObjectsClientContract } from 'kibana/server'; import moment from 'moment'; import { schema } from '@kbn/config-schema'; -import { ActionGroupIdsOf } from '../../../../alerts/common'; +import { ActionGroupIdsOf } from '../../../../alerting/common'; import { updateState } from './common'; import { DURATION_ANOMALY } from '../../../common/constants/alerts'; import { commonStateTranslations, durationAnomalyTranslations } from './translations'; diff --git a/x-pack/plugins/uptime/server/lib/alerts/status_check.test.ts b/x-pack/plugins/uptime/server/lib/alerts/status_check.test.ts index 02bc5a31aff19..ada8a1c8ce235 100644 --- a/x-pack/plugins/uptime/server/lib/alerts/status_check.test.ts +++ b/x-pack/plugins/uptime/server/lib/alerts/status_check.test.ts @@ -18,11 +18,11 @@ import { AlertTypeState, AlertInstanceState, AlertInstanceContext, -} from '../../../../alerts/server'; +} from '../../../../alerting/server'; import { UMServerLibs } from '../lib'; import { UptimeCorePlugins, UptimeCoreSetup } from '../adapters'; import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../common/constants'; -import { alertsMock, AlertServicesMock } from '../../../../alerts/server/mocks'; +import { alertsMock, AlertServicesMock } from '../../../../alerting/server/mocks'; import { GetMonitorStatusResult } from '../requests/get_monitor_status'; import { makePing } from '../../../common/runtime_types/ping'; import { GetMonitorAvailabilityResult } from '../requests/get_monitor_availability'; @@ -50,7 +50,7 @@ const bootstrapDependencies = (customRequests?: any) => { * This function aims to provide an easy way to give mock props that will * reduce boilerplate for tests. * @param params the params received at alert creation time - * @param services the core services provided by kibana/alerts platforms + * @param services the core services provided by kibana/alerting platforms * @param state the state the alert maintains */ const mockOptions = ( diff --git a/x-pack/plugins/uptime/server/lib/alerts/status_check.ts b/x-pack/plugins/uptime/server/lib/alerts/status_check.ts index cee20d113c256..f68c63a0eb435 100644 --- a/x-pack/plugins/uptime/server/lib/alerts/status_check.ts +++ b/x-pack/plugins/uptime/server/lib/alerts/status_check.ts @@ -8,7 +8,7 @@ import { schema } from '@kbn/config-schema'; import { i18n } from '@kbn/i18n'; import Mustache from 'mustache'; -import { ActionGroupIdsOf } from '../../../../alerts/common'; +import { ActionGroupIdsOf } from '../../../../alerting/common'; import { UptimeAlertTypeFactory } from './types'; import { esKuery } from '../../../../../../src/plugins/data/server'; import { JsonObject } from '../../../../../../src/plugins/kibana_utils/common'; diff --git a/x-pack/plugins/uptime/server/lib/alerts/tls.ts b/x-pack/plugins/uptime/server/lib/alerts/tls.ts index 7bc4c36b98e8b..2a2406a3629d0 100644 --- a/x-pack/plugins/uptime/server/lib/alerts/tls.ts +++ b/x-pack/plugins/uptime/server/lib/alerts/tls.ts @@ -15,7 +15,7 @@ import { Cert, CertResult } from '../../../common/runtime_types'; import { commonStateTranslations, tlsTranslations } from './translations'; import { DEFAULT_FROM, DEFAULT_TO } from '../../rest_api/certs/certs'; import { uptimeAlertWrapper } from './uptime_alert_wrapper'; -import { ActionGroupIdsOf } from '../../../../alerts/common'; +import { ActionGroupIdsOf } from '../../../../alerting/common'; export type ActionGroupIds = ActionGroupIdsOf; diff --git a/x-pack/plugins/uptime/server/lib/alerts/types.ts b/x-pack/plugins/uptime/server/lib/alerts/types.ts index 69776034d1b0a..6f9ca42e54adc 100644 --- a/x-pack/plugins/uptime/server/lib/alerts/types.ts +++ b/x-pack/plugins/uptime/server/lib/alerts/types.ts @@ -7,7 +7,7 @@ import { UptimeCorePlugins, UptimeCoreSetup } from '../adapters'; import { UMServerLibs } from '../lib'; -import { AlertType, AlertInstanceState, AlertInstanceContext } from '../../../../alerts/server'; +import { AlertType, AlertInstanceState, AlertInstanceContext } from '../../../../alerting/server'; export type UptimeAlertTypeParam = Record; export type UptimeAlertTypeState = Record; diff --git a/x-pack/plugins/uptime/server/lib/alerts/uptime_alert_wrapper.ts b/x-pack/plugins/uptime/server/lib/alerts/uptime_alert_wrapper.ts index 475937c12e894..97e8b0614a354 100644 --- a/x-pack/plugins/uptime/server/lib/alerts/uptime_alert_wrapper.ts +++ b/x-pack/plugins/uptime/server/lib/alerts/uptime_alert_wrapper.ts @@ -10,7 +10,7 @@ import { AlertExecutorOptions, AlertInstanceState, AlertInstanceContext, -} from '../../../../alerts/server'; +} from '../../../../alerting/server'; import { savedObjectsAdapter } from '../saved_objects'; import { DynamicSettings } from '../../../common/runtime_types'; import { createUptimeESClient, UptimeESClient } from '../lib'; diff --git a/x-pack/plugins/uptime/server/types.ts b/x-pack/plugins/uptime/server/types.ts index 76803b3044d10..9f649b0263d3c 100644 --- a/x-pack/plugins/uptime/server/types.ts +++ b/x-pack/plugins/uptime/server/types.ts @@ -6,7 +6,7 @@ */ import type { IRouter, RequestHandlerContext } from 'src/core/server'; -import type { AlertingApiRequestHandlerContext } from '../../alerts/server'; +import type { AlertingApiRequestHandlerContext } from '../../alerting/server'; import type { LicensingApiRequestHandlerContext } from '../../licensing/server'; /** * @internal diff --git a/x-pack/plugins/uptime/server/uptime_server.ts b/x-pack/plugins/uptime/server/uptime_server.ts index 9d9469adb09d3..39e5c9bff202e 100644 --- a/x-pack/plugins/uptime/server/uptime_server.ts +++ b/x-pack/plugins/uptime/server/uptime_server.ts @@ -20,6 +20,6 @@ export const initUptimeServer = ( ); uptimeAlertTypeFactories.forEach((alertTypeFactory) => - plugins.alerts.registerType(alertTypeFactory(server, libs, plugins)) + plugins.alerting.registerType(alertTypeFactory(server, libs, plugins)) ); }; diff --git a/x-pack/plugins/uptime/tsconfig.json b/x-pack/plugins/uptime/tsconfig.json index 5a195f6c2df25..531ee2ecd8d2b 100644 --- a/x-pack/plugins/uptime/tsconfig.json +++ b/x-pack/plugins/uptime/tsconfig.json @@ -16,7 +16,7 @@ "../../../typings/**/*" ], "references": [ - { "path": "../alerts/tsconfig.json" }, + { "path": "../alerting/tsconfig.json" }, { "path": "../ml/tsconfig.json" }, { "path": "../triggers_actions_ui/tsconfig.json" }, { "path": "../observability/tsconfig.json" } diff --git a/x-pack/test/alerting_api_integration/common/config.ts b/x-pack/test/alerting_api_integration/common/config.ts index 385edbc66a6d8..560ff6c0b317f 100644 --- a/x-pack/test/alerting_api_integration/common/config.ts +++ b/x-pack/test/alerting_api_integration/common/config.ts @@ -101,7 +101,7 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions) ...(options.publicBaseUrl ? ['--server.publicBaseUrl=https://localhost:5601'] : []), `--xpack.actions.allowedHosts=${JSON.stringify(['localhost', 'some.non.existent.com'])}`, '--xpack.encryptedSavedObjects.encryptionKey="wuGNaIhoMpk5sO4UBxgr3NyW1sFcLgIf"', - '--xpack.alerts.invalidateApiKeysTask.interval="15s"', + '--xpack.alerting.invalidateApiKeysTask.interval="15s"', `--xpack.actions.enabledActionTypes=${JSON.stringify(enabledActionTypes)}`, `--xpack.actions.rejectUnauthorized=${rejectUnauthorized}`, ...actionsProxyUrl, diff --git a/x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts/kibana.json b/x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts/kibana.json index df61fde6518d0..bab4517850e91 100644 --- a/x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts/kibana.json +++ b/x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts/kibana.json @@ -3,7 +3,7 @@ "version": "1.0.0", "kibanaVersion": "kibana", "configPath": ["xpack"], - "requiredPlugins": ["taskManager", "features", "actions", "alerts", "encryptedSavedObjects"], + "requiredPlugins": ["taskManager", "features", "actions", "alerting", "encryptedSavedObjects"], "optionalPlugins": ["security", "spaces"], "server": true, "ui": false diff --git a/x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts/server/alert_types.ts b/x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts/server/alert_types.ts index e2c6e72a9c522..1847b3fbbce2a 100644 --- a/x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts/server/alert_types.ts +++ b/x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts/server/alert_types.ts @@ -16,7 +16,7 @@ import { AlertInstanceContext, AlertTypeState, AlertTypeParams, -} from '../../../../../../../plugins/alerts/server'; +} from '../../../../../../../plugins/alerting/server'; export const EscapableStrings = { escapableBold: '*bold*', @@ -459,7 +459,7 @@ function getPatternFiringAlertType() { export function defineAlertTypes( core: CoreSetup, - { alerts }: Pick + { alerting }: Pick ) { const noopAlertType: AlertType<{}, {}, {}, {}, 'default'> = { id: 'test.noop', @@ -536,17 +536,17 @@ export function defineAlertTypes( }, }; - alerts.registerType(getAlwaysFiringAlertType()); - alerts.registerType(getCumulativeFiringAlertType()); - alerts.registerType(getNeverFiringAlertType()); - alerts.registerType(getFailingAlertType()); - alerts.registerType(getValidationAlertType()); - alerts.registerType(getAuthorizationAlertType(core)); - alerts.registerType(noopAlertType); - alerts.registerType(onlyContextVariablesAlertType); - alerts.registerType(onlyStateVariablesAlertType); - alerts.registerType(getPatternFiringAlertType()); - alerts.registerType(throwAlertType); - alerts.registerType(longRunningAlertType); - alerts.registerType(goldNoopAlertType); + alerting.registerType(getAlwaysFiringAlertType()); + alerting.registerType(getCumulativeFiringAlertType()); + alerting.registerType(getNeverFiringAlertType()); + alerting.registerType(getFailingAlertType()); + alerting.registerType(getValidationAlertType()); + alerting.registerType(getAuthorizationAlertType(core)); + alerting.registerType(noopAlertType); + alerting.registerType(onlyContextVariablesAlertType); + alerting.registerType(onlyStateVariablesAlertType); + alerting.registerType(getPatternFiringAlertType()); + alerting.registerType(throwAlertType); + alerting.registerType(longRunningAlertType); + alerting.registerType(goldNoopAlertType); } diff --git a/x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts/server/plugin.ts b/x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts/server/plugin.ts index 01aa1ed56a348..972cb05c99766 100644 --- a/x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts/server/plugin.ts +++ b/x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts/server/plugin.ts @@ -7,7 +7,7 @@ import { Plugin, CoreSetup } from 'kibana/server'; import { PluginSetupContract as ActionsPluginSetup } from '../../../../../../../plugins/actions/server/plugin'; -import { PluginSetupContract as AlertingPluginSetup } from '../../../../../../../plugins/alerts/server/plugin'; +import { PluginSetupContract as AlertingPluginSetup } from '../../../../../../../plugins/alerting/server/plugin'; import { EncryptedSavedObjectsPluginStart } from '../../../../../../../plugins/encrypted_saved_objects/server'; import { PluginSetupContract as FeaturesPluginSetup } from '../../../../../../../plugins/features/server'; import { defineAlertTypes } from './alert_types'; @@ -19,7 +19,7 @@ import { SecurityPluginStart } from '../../../../../../../plugins/security/serve export interface FixtureSetupDeps { features: FeaturesPluginSetup; actions: ActionsPluginSetup; - alerts: AlertingPluginSetup; + alerting: AlertingPluginSetup; } export interface FixtureStartDeps { @@ -29,7 +29,10 @@ export interface FixtureStartDeps { } export class FixturePlugin implements Plugin { - public setup(core: CoreSetup, { features, actions, alerts }: FixtureSetupDeps) { + public setup( + core: CoreSetup, + { features, actions, alerting }: FixtureSetupDeps + ) { features.registerKibanaFeature({ id: 'alertsFixture', name: 'Alerts', @@ -105,7 +108,7 @@ export class FixturePlugin implements Plugin, - { alerts }: Pick + { alerting }: Pick ) { const noopRestrictedAlertType: AlertType<{}, {}, {}, {}, 'default', 'restrictedRecovered'> = { id: 'test.restricted-noop', @@ -32,6 +32,6 @@ export function defineAlertTypes( minimumLicenseRequired: 'basic', async executor() {}, }; - alerts.registerType(noopRestrictedAlertType); - alerts.registerType(noopUnrestrictedAlertType); + alerting.registerType(noopRestrictedAlertType); + alerting.registerType(noopUnrestrictedAlertType); } diff --git a/x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts_restricted/server/plugin.ts b/x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts_restricted/server/plugin.ts index 95addf231f565..df1878c4fc4cf 100644 --- a/x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts_restricted/server/plugin.ts +++ b/x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts_restricted/server/plugin.ts @@ -7,7 +7,7 @@ import { Plugin, CoreSetup } from 'kibana/server'; import { PluginSetupContract as ActionsPluginSetup } from '../../../../../../../plugins/actions/server/plugin'; -import { PluginSetupContract as AlertingPluginSetup } from '../../../../../../../plugins/alerts/server/plugin'; +import { PluginSetupContract as AlertingPluginSetup } from '../../../../../../../plugins/alerting/server/plugin'; import { EncryptedSavedObjectsPluginStart } from '../../../../../../../plugins/encrypted_saved_objects/server'; import { PluginSetupContract as FeaturesPluginSetup } from '../../../../../../../plugins/features/server'; import { defineAlertTypes } from './alert_types'; @@ -15,7 +15,7 @@ import { defineAlertTypes } from './alert_types'; export interface FixtureSetupDeps { features: FeaturesPluginSetup; actions: ActionsPluginSetup; - alerts: AlertingPluginSetup; + alerting: AlertingPluginSetup; } export interface FixtureStartDeps { @@ -23,7 +23,7 @@ export interface FixtureStartDeps { } export class FixturePlugin implements Plugin { - public setup(core: CoreSetup, { features, alerts }: FixtureSetupDeps) { + public setup(core: CoreSetup, { features, alerting }: FixtureSetupDeps) { features.registerKibanaFeature({ id: 'alertsRestrictedFixture', name: 'AlertRestricted', @@ -56,7 +56,7 @@ export class FixturePlugin implements Plugin { - public setup(core: CoreSetup, { alerts, triggersActionsUi }: AlertingExamplePublicSetupDeps) { - alerts.registerNavigation( + public setup(core: CoreSetup, { alerting, triggersActionsUi }: AlertingExamplePublicSetupDeps) { + alerting.registerNavigation( 'alerting_fixture', 'test.noop', (alert: SanitizedAlert, alertType: AlertType) => `/alert/${alert.id}` diff --git a/x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/server/plugin.ts b/x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/server/plugin.ts index b024a0fd19870..d51cc3f9f9938 100644 --- a/x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/server/plugin.ts +++ b/x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/server/plugin.ts @@ -9,12 +9,12 @@ import { Plugin, CoreSetup } from 'kibana/server'; import { PluginSetupContract as AlertingSetup, AlertType, -} from '../../../../../../plugins/alerts/server'; +} from '../../../../../../plugins/alerting/server'; import { PluginSetupContract as FeaturesPluginSetup } from '../../../../../../plugins/features/server'; // this plugin's dependendencies export interface AlertingExampleDeps { - alerts: AlertingSetup; + alerting: AlertingSetup; features: FeaturesPluginSetup; } @@ -82,10 +82,10 @@ export const failingAlertType: AlertType { - public setup(core: CoreSetup, { alerts, features }: AlertingExampleDeps) { - alerts.registerType(noopAlertType); - alerts.registerType(alwaysFiringAlertType); - alerts.registerType(failingAlertType); + public setup(core: CoreSetup, { alerting, features }: AlertingExampleDeps) { + alerting.registerType(noopAlertType); + alerting.registerType(alwaysFiringAlertType); + alerting.registerType(failingAlertType); features.registerKibanaFeature({ id: 'alerting_fixture', name: 'alerting_fixture', diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json index 4589efa191851..2f137a305b230 100644 --- a/x-pack/test/tsconfig.json +++ b/x-pack/test/tsconfig.json @@ -38,7 +38,7 @@ { "path": "../../src/plugins/url_forwarding/tsconfig.json" }, { "path": "../../src/plugins/usage_collection/tsconfig.json" }, { "path": "../plugins/actions/tsconfig.json" }, - { "path": "../plugins/alerts/tsconfig.json" }, + { "path": "../plugins/alerting/tsconfig.json" }, { "path": "../plugins/apm/tsconfig.json" }, { "path": "../plugins/banners/tsconfig.json" }, { "path": "../plugins/beats_management/tsconfig.json" }, diff --git a/x-pack/tsconfig.json b/x-pack/tsconfig.json index 08a746bca88bb..b8014572d1bfb 100644 --- a/x-pack/tsconfig.json +++ b/x-pack/tsconfig.json @@ -56,7 +56,7 @@ { "path": "../src/plugins/url_forwarding/tsconfig.json" }, { "path": "../src/plugins/usage_collection/tsconfig.json" }, { "path": "./plugins/actions/tsconfig.json" }, - { "path": "./plugins/alerts/tsconfig.json" }, + { "path": "./plugins/alerting/tsconfig.json" }, { "path": "./plugins/apm/tsconfig.json" }, { "path": "./plugins/beats_management/tsconfig.json" }, { "path": "./plugins/canvas/tsconfig.json" },