Removed a possibility to define two different names for Alert types on API and UI level. (#86236)
* Removed a possibility to define two different names for Alert types on API and UI level * fixed typechecks * fixed typechecks * fixed due to comments * fixed typechecks * fixed jest tests * fixed typechecks
This commit is contained in:
parent
cb704a29a6
commit
396018fd4d
|
@ -32,7 +32,6 @@ import {
|
|||
export function getAlertType(): AlertTypeModel {
|
||||
return {
|
||||
id: 'example.always-firing',
|
||||
name: 'Always Fires',
|
||||
description: 'Alert when called',
|
||||
iconClass: 'bolt',
|
||||
documentationUrl: null,
|
||||
|
|
|
@ -44,7 +44,6 @@ function isValueInEnum(enumeratin: Record<string, any>, value: any): boolean {
|
|||
export function getAlertType(): AlertTypeModel {
|
||||
return {
|
||||
id: 'example.people-in-space',
|
||||
name: 'People Are In Space Right Now',
|
||||
description: 'Alert when people are in space right now',
|
||||
iconClass: 'globe',
|
||||
documentationUrl: null,
|
||||
|
|
|
@ -14,9 +14,6 @@ export function registerApmAlerts(
|
|||
) {
|
||||
alertTypeRegistry.register({
|
||||
id: AlertType.ErrorCount,
|
||||
name: i18n.translate('xpack.apm.alertTypes.errorCount', {
|
||||
defaultMessage: 'Error count threshold',
|
||||
}),
|
||||
description: i18n.translate('xpack.apm.alertTypes.errorCount.description', {
|
||||
defaultMessage:
|
||||
'Alert when the number of errors in a service exceeds a defined threshold.',
|
||||
|
@ -45,9 +42,6 @@ export function registerApmAlerts(
|
|||
|
||||
alertTypeRegistry.register({
|
||||
id: AlertType.TransactionDuration,
|
||||
name: i18n.translate('xpack.apm.alertTypes.transactionDuration', {
|
||||
defaultMessage: 'Transaction duration threshold',
|
||||
}),
|
||||
description: i18n.translate(
|
||||
'xpack.apm.alertTypes.transactionDuration.description',
|
||||
{
|
||||
|
@ -82,9 +76,6 @@ export function registerApmAlerts(
|
|||
|
||||
alertTypeRegistry.register({
|
||||
id: AlertType.TransactionErrorRate,
|
||||
name: i18n.translate('xpack.apm.alertTypes.transactionErrorRate', {
|
||||
defaultMessage: 'Transaction error rate threshold',
|
||||
}),
|
||||
description: i18n.translate(
|
||||
'xpack.apm.alertTypes.transactionErrorRate.description',
|
||||
{
|
||||
|
@ -119,9 +110,6 @@ export function registerApmAlerts(
|
|||
|
||||
alertTypeRegistry.register({
|
||||
id: AlertType.TransactionDurationAnomaly,
|
||||
name: i18n.translate('xpack.apm.alertTypes.transactionDurationAnomaly', {
|
||||
defaultMessage: 'Transaction duration anomaly',
|
||||
}),
|
||||
description: i18n.translate(
|
||||
'xpack.apm.alertTypes.transactionDurationAnomaly.description',
|
||||
{
|
||||
|
|
|
@ -14,9 +14,6 @@ import { validateMetricThreshold } from './components/validation';
|
|||
export function createInventoryMetricAlertType(): AlertTypeModel {
|
||||
return {
|
||||
id: METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID,
|
||||
name: i18n.translate('xpack.infra.metrics.inventory.alertFlyout.alertName', {
|
||||
defaultMessage: 'Inventory',
|
||||
}),
|
||||
description: i18n.translate('xpack.infra.metrics.inventory.alertFlyout.alertDescription', {
|
||||
defaultMessage: 'Alert when the inventory exceeds a defined threshold.',
|
||||
}),
|
||||
|
|
|
@ -12,9 +12,6 @@ import { validateExpression } from './validation';
|
|||
export function getAlertType(): AlertTypeModel {
|
||||
return {
|
||||
id: LOG_DOCUMENT_COUNT_ALERT_TYPE_ID,
|
||||
name: i18n.translate('xpack.infra.logs.alertFlyout.alertName', {
|
||||
defaultMessage: 'Log threshold',
|
||||
}),
|
||||
description: i18n.translate('xpack.infra.logs.alertFlyout.alertDescription', {
|
||||
defaultMessage: 'Alert when the log aggregation exceeds the threshold.',
|
||||
}),
|
||||
|
|
|
@ -14,9 +14,6 @@ import { METRIC_THRESHOLD_ALERT_TYPE_ID } from '../../../server/lib/alerting/met
|
|||
export function createMetricThresholdAlertType(): AlertTypeModel {
|
||||
return {
|
||||
id: METRIC_THRESHOLD_ALERT_TYPE_ID,
|
||||
name: i18n.translate('xpack.infra.metrics.alertFlyout.alertName', {
|
||||
defaultMessage: 'Metric threshold',
|
||||
}),
|
||||
description: i18n.translate('xpack.infra.metrics.alertFlyout.alertDescription', {
|
||||
defaultMessage: 'Alert when the metrics aggregation exceeds the threshold.',
|
||||
}),
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
import { schema } from '@kbn/config-schema';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { AlertType } from '../../../../../alerts/server';
|
||||
import {
|
||||
createInventoryMetricThresholdExecutor,
|
||||
|
@ -41,7 +42,9 @@ const condition = schema.object({
|
|||
|
||||
export const registerMetricInventoryThresholdAlertType = (libs: InfraBackendLibs): AlertType => ({
|
||||
id: METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID,
|
||||
name: 'Inventory',
|
||||
name: i18n.translate('xpack.infra.metrics.inventory.alertName', {
|
||||
defaultMessage: 'Inventory',
|
||||
}),
|
||||
validate: {
|
||||
params: schema.object(
|
||||
{
|
||||
|
|
|
@ -81,7 +81,9 @@ export async function registerLogThresholdAlertType(
|
|||
|
||||
alertingPlugin.registerType({
|
||||
id: LOG_DOCUMENT_COUNT_ALERT_TYPE_ID,
|
||||
name: 'Log threshold',
|
||||
name: i18n.translate('xpack.infra.logs.alertName', {
|
||||
defaultMessage: 'Log threshold',
|
||||
}),
|
||||
validate: {
|
||||
params: {
|
||||
validate: (params) => decodeOrThrow(AlertParamsRT)(params),
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
import { schema } from '@kbn/config-schema';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { AlertType } from '../../../../../alerts/server';
|
||||
import { METRIC_EXPLORER_AGGREGATIONS } from '../../../../common/http_api/metrics_explorer';
|
||||
import { createMetricThresholdExecutor, FIRED_ACTIONS } from './metric_threshold_executor';
|
||||
|
@ -42,7 +43,9 @@ export function registerMetricThresholdAlertType(libs: InfraBackendLibs): AlertT
|
|||
|
||||
return {
|
||||
id: METRIC_THRESHOLD_ALERT_TYPE_ID,
|
||||
name: 'Metric threshold',
|
||||
name: i18n.translate('xpack.infra.metrics.alertName', {
|
||||
defaultMessage: 'Metric threshold',
|
||||
}),
|
||||
validate: {
|
||||
params: schema.object(
|
||||
{
|
||||
|
|
|
@ -71,7 +71,6 @@ describe('alert_form', () => {
|
|||
const alertType = {
|
||||
id: 'alert-type',
|
||||
iconClass: 'test',
|
||||
name: 'test-alert',
|
||||
description: 'Testing',
|
||||
documentationUrl: 'https://...',
|
||||
validate: validationMethod,
|
||||
|
|
|
@ -33,7 +33,6 @@ const validate = (inputValues: ValidateOptions): ValidationResult => {
|
|||
export function createCCRReadExceptionsAlertType(): AlertTypeModel {
|
||||
return {
|
||||
id: ALERT_CCR_READ_EXCEPTIONS,
|
||||
name: ALERT_DETAILS[ALERT_CCR_READ_EXCEPTIONS].label,
|
||||
description: ALERT_DETAILS[ALERT_CCR_READ_EXCEPTIONS].description,
|
||||
iconClass: 'bell',
|
||||
documentationUrl(docLinks) {
|
||||
|
|
|
@ -13,7 +13,6 @@ import { Expression, Props } from '../components/duration/expression';
|
|||
export function createCpuUsageAlertType(): AlertTypeModel {
|
||||
return {
|
||||
id: ALERT_CPU_USAGE,
|
||||
name: ALERT_DETAILS[ALERT_CPU_USAGE].label,
|
||||
description: ALERT_DETAILS[ALERT_CPU_USAGE].description,
|
||||
iconClass: 'bell',
|
||||
documentationUrl(docLinks) {
|
||||
|
|
|
@ -15,7 +15,6 @@ import { ALERT_DISK_USAGE, ALERT_DETAILS } from '../../../common/constants';
|
|||
export function createDiskUsageAlertType(): AlertTypeModel {
|
||||
return {
|
||||
id: ALERT_DISK_USAGE,
|
||||
name: ALERT_DETAILS[ALERT_DISK_USAGE].label,
|
||||
description: ALERT_DETAILS[ALERT_DISK_USAGE].description,
|
||||
iconClass: 'bell',
|
||||
documentationUrl(docLinks) {
|
||||
|
|
|
@ -15,7 +15,6 @@ export function createLegacyAlertTypes(): AlertTypeModel[] {
|
|||
return LEGACY_ALERTS.map((legacyAlert) => {
|
||||
return {
|
||||
id: legacyAlert,
|
||||
name: LEGACY_ALERT_DETAILS[legacyAlert].label,
|
||||
description: LEGACY_ALERT_DETAILS[legacyAlert].description,
|
||||
iconClass: 'bell',
|
||||
documentationUrl(docLinks) {
|
||||
|
|
|
@ -15,7 +15,6 @@ import { ALERT_MEMORY_USAGE, ALERT_DETAILS } from '../../../common/constants';
|
|||
export function createMemoryUsageAlertType(): AlertTypeModel {
|
||||
return {
|
||||
id: ALERT_MEMORY_USAGE,
|
||||
name: ALERT_DETAILS[ALERT_MEMORY_USAGE].label,
|
||||
description: ALERT_DETAILS[ALERT_MEMORY_USAGE].description,
|
||||
iconClass: 'bell',
|
||||
documentationUrl(docLinks) {
|
||||
|
|
|
@ -13,7 +13,6 @@ import { Expression } from './expression';
|
|||
export function createMissingMonitoringDataAlertType(): AlertTypeModel {
|
||||
return {
|
||||
id: ALERT_MISSING_MONITORING_DATA,
|
||||
name: ALERT_DETAILS[ALERT_MISSING_MONITORING_DATA].label,
|
||||
description: ALERT_DETAILS[ALERT_MISSING_MONITORING_DATA].description,
|
||||
iconClass: 'bell',
|
||||
documentationUrl(docLinks) {
|
||||
|
|
|
@ -28,7 +28,6 @@ export function createThreadPoolRejectionsAlertType(
|
|||
): AlertTypeModel {
|
||||
return {
|
||||
id: alertId,
|
||||
name: threadPoolAlertDetails.label,
|
||||
description: threadPoolAlertDetails.description,
|
||||
iconClass: 'bell',
|
||||
documentationUrl(docLinks) {
|
||||
|
|
|
@ -12,9 +12,6 @@ import { AlertTypeModel } from '../../../../triggers_actions_ui/public';
|
|||
export function getAlertType(): AlertTypeModel<GeoContainmentAlertParams> {
|
||||
return {
|
||||
id: '.geo-containment',
|
||||
name: i18n.translate('xpack.stackAlerts.geoContainment.name.trackingContainment', {
|
||||
defaultMessage: 'Tracking containment',
|
||||
}),
|
||||
description: i18n.translate('xpack.stackAlerts.geoContainment.descriptionText', {
|
||||
defaultMessage: 'Alert when an entity is contained within a geo boundary.',
|
||||
}),
|
||||
|
|
|
@ -12,9 +12,6 @@ import { AlertTypeModel } from '../../../../triggers_actions_ui/public';
|
|||
export function getAlertType(): AlertTypeModel<GeoThresholdAlertParams> {
|
||||
return {
|
||||
id: '.geo-threshold',
|
||||
name: i18n.translate('xpack.stackAlerts.geoThreshold.name.trackingThreshold', {
|
||||
defaultMessage: 'Tracking threshold',
|
||||
}),
|
||||
description: i18n.translate('xpack.stackAlerts.geoThreshold.descriptionText', {
|
||||
defaultMessage: 'Alert when an entity enters or leaves a geo boundary.',
|
||||
}),
|
||||
|
|
|
@ -12,9 +12,6 @@ import { AlertTypeModel } from '../../../../triggers_actions_ui/public';
|
|||
export function getAlertType(): AlertTypeModel<IndexThresholdAlertParams> {
|
||||
return {
|
||||
id: '.index-threshold',
|
||||
name: i18n.translate('xpack.stackAlerts.threshold.ui.alertType.nameText', {
|
||||
defaultMessage: 'Index threshold',
|
||||
}),
|
||||
description: i18n.translate('xpack.stackAlerts.threshold.ui.alertType.descriptionText', {
|
||||
defaultMessage: 'Alert when an aggregated query meets the threshold.',
|
||||
}),
|
||||
|
|
|
@ -114,7 +114,7 @@ export interface GeoContainmentParams {
|
|||
|
||||
export function getAlertType(logger: Logger): AlertType<GeoContainmentParams> {
|
||||
const alertTypeName = i18n.translate('xpack.stackAlerts.geoContainment.alertTypeTitle', {
|
||||
defaultMessage: 'Geo tracking containment',
|
||||
defaultMessage: 'Tracking containment',
|
||||
});
|
||||
|
||||
const actionGroupName = i18n.translate(
|
||||
|
|
|
@ -14,7 +14,7 @@ describe('alertType', () => {
|
|||
|
||||
it('alert type creation structure is the expected value', async () => {
|
||||
expect(alertType.id).toBe('.geo-containment');
|
||||
expect(alertType.name).toBe('Geo tracking containment');
|
||||
expect(alertType.name).toBe('Tracking containment');
|
||||
expect(alertType.actionGroups).toEqual([
|
||||
{ id: 'Tracked entity contained', name: 'Tracking containment met' },
|
||||
]);
|
||||
|
|
|
@ -174,7 +174,7 @@ export interface GeoThresholdParams {
|
|||
|
||||
export function getAlertType(logger: Logger): AlertType<GeoThresholdParams> {
|
||||
const alertTypeName = i18n.translate('xpack.stackAlerts.geoThreshold.alertTypeTitle', {
|
||||
defaultMessage: 'Geo tracking threshold',
|
||||
defaultMessage: 'Tracking threshold',
|
||||
});
|
||||
|
||||
const actionGroupName = i18n.translate(
|
||||
|
|
|
@ -14,7 +14,7 @@ describe('alertType', () => {
|
|||
|
||||
it('alert type creation structure is the expected value', async () => {
|
||||
expect(alertType.id).toBe('.geo-threshold');
|
||||
expect(alertType.name).toBe('Geo tracking threshold');
|
||||
expect(alertType.name).toBe('Tracking threshold');
|
||||
expect(alertType.actionGroups).toEqual([
|
||||
{ id: 'tracking threshold met', name: 'Tracking threshold met' },
|
||||
]);
|
||||
|
|
|
@ -63,7 +63,7 @@ describe('AlertingBuiltins Plugin', () => {
|
|||
},
|
||||
],
|
||||
"id": ".geo-threshold",
|
||||
"name": "Geo tracking threshold",
|
||||
"name": "Tracking threshold",
|
||||
}
|
||||
`);
|
||||
|
||||
|
|
|
@ -4742,13 +4742,9 @@
|
|||
"xpack.apm.alerts.anomalySeverity.minor": "マイナー",
|
||||
"xpack.apm.alerts.anomalySeverity.scoreDetailsDescription": "スコア{value}以上",
|
||||
"xpack.apm.alerts.anomalySeverity.warningLabel": "警告",
|
||||
"xpack.apm.alertTypes.errorCount": "エラー数しきい値",
|
||||
"xpack.apm.alertTypes.errorCount.defaultActionMessage": "次の条件のため、\\{\\{alertName\\}\\}アラートが実行されています。\n\n- サービス名:\\{\\{context.serviceName\\}\\}\n- 環境:\\{\\{context.environment\\}\\}\n- しきい値\\{\\{context.threshold\\}\\}エラー\n- トリガーされた値:過去\\{\\{context.interval\\}\\}に\\{\\{context.triggerValue\\}\\}件のエラー",
|
||||
"xpack.apm.alertTypes.transactionDuration": "トランザクション期間のしきい値",
|
||||
"xpack.apm.alertTypes.transactionDuration.defaultActionMessage": "次の条件のため、\\{\\{alertName\\}\\}アラートが実行されています。\n\n- サービス名:\\{\\{context.serviceName\\}\\}\n- タイプ:\\{\\{context.transactionType\\}\\}\n- 環境:\\{\\{context.environment\\}\\}\n- しきい値:\\{\\{context.threshold\\}\\}ミリ秒\n- トリガーされた値:過去\\{\\{context.interval\\}\\}に\\{\\{context.triggerValue\\}\\}",
|
||||
"xpack.apm.alertTypes.transactionDurationAnomaly": "トランザクション期間異常",
|
||||
"xpack.apm.alertTypes.transactionDurationAnomaly.defaultActionMessage": "次の条件のため、\\{\\{alertName\\}\\}アラートが実行されています。\n\n- サービス名:\\{\\{context.serviceName\\}\\}\n- タイプ:\\{\\{context.transactionType\\}\\}\n- 環境:\\{\\{context.environment\\}\\}\n- 重要度しきい値:\\{\\{context.threshold\\}\\}%\n- 重要度値:\\{\\{context.thresholdValue\\}\\}\n",
|
||||
"xpack.apm.alertTypes.transactionErrorRate": "トランザクションエラー率しきい値",
|
||||
"xpack.apm.alertTypes.transactionErrorRate.defaultActionMessage": "次の条件のため、\\{\\{alertName\\}\\}アラートが実行されています。\n\n- サービス名:\\{\\{context.serviceName\\}\\}\n- タイプ:\\{\\{context.transactionType\\}\\}\n- 環境:\\{\\{context.environment\\}\\}\n- しきい値:\\{\\{context.threshold\\}\\}%\n- トリガーされた値:過去\\{\\{context.interval\\}\\}にエラーの\\{\\{context.triggerValue\\}\\}%",
|
||||
"xpack.apm.anomaly_detection.error.invalid_license": "異常検知を使用するには、Elastic Platinumライセンスのサブスクリプションが必要です。このライセンスがあれば、機械学習を活用して、サービスを監視できます。",
|
||||
"xpack.apm.anomaly_detection.error.missing_read_privileges": "異常検知ジョブを表示するには、機械学習およびAPMの「読み取り」権限が必要です",
|
||||
|
@ -9280,7 +9276,6 @@
|
|||
"xpack.infra.logFlyout.setFilterTooltip": "フィルターでイベントを表示",
|
||||
"xpack.infra.logFlyout.valueColumnLabel": "値",
|
||||
"xpack.infra.logs.alertFlyout.addCondition": "条件を追加",
|
||||
"xpack.infra.logs.alertFlyout.alertName": "ログしきい値",
|
||||
"xpack.infra.logs.alertFlyout.criterionComparatorValueTitle": "比較:値",
|
||||
"xpack.infra.logs.alertFlyout.criterionFieldTitle": "フィールド",
|
||||
"xpack.infra.logs.alertFlyout.error.criterionComparatorRequired": "コンパレーターが必要です。",
|
||||
|
@ -9611,7 +9606,6 @@
|
|||
"xpack.infra.metrics.alertFlyout.aggregationText.p99": "99パーセンタイル",
|
||||
"xpack.infra.metrics.alertFlyout.aggregationText.rate": "レート",
|
||||
"xpack.infra.metrics.alertFlyout.aggregationText.sum": "合計",
|
||||
"xpack.infra.metrics.alertFlyout.alertName": "メトリックしきい値",
|
||||
"xpack.infra.metrics.alertFlyout.alertOnNoData": "データがない場合に通知する",
|
||||
"xpack.infra.metrics.alertFlyout.alertPreviewError": "このアラート条件をプレビューするときにエラーが発生しました",
|
||||
"xpack.infra.metrics.alertFlyout.alertPreviewErrorDesc": "しばらくたってから再試行するか、詳細を確認してください。",
|
||||
|
@ -9700,7 +9694,6 @@
|
|||
"xpack.infra.metrics.expressionItems.components.closablePopoverTitle.closeLabel": "閉じる",
|
||||
"xpack.infra.metrics.invalidNodeErrorDescription": "構成をよく確認してください",
|
||||
"xpack.infra.metrics.invalidNodeErrorTitle": "{nodeName} がメトリックデータを収集していないようです",
|
||||
"xpack.infra.metrics.inventory.alertFlyout.alertName": "インベントリ",
|
||||
"xpack.infra.metrics.loadingNodeDataText": "データを読み込み中",
|
||||
"xpack.infra.metrics.missingTSVBModelError": "{nodeType}では{metricId}のTSVBモデルが存在しません",
|
||||
"xpack.infra.metrics.pluginTitle": "メトリック",
|
||||
|
@ -19118,7 +19111,6 @@
|
|||
"xpack.stackAlerts.geoThreshold.indexLabel": "インデックス",
|
||||
"xpack.stackAlerts.geoThreshold.indexPatternSelectLabel": "インデックスパターン",
|
||||
"xpack.stackAlerts.geoThreshold.indexPatternSelectPlaceholder": "インデックスパターンを選択",
|
||||
"xpack.stackAlerts.geoThreshold.name.trackingThreshold": "追跡しきい値",
|
||||
"xpack.stackAlerts.geoThreshold.noIndexPattern.doThisLinkTextDescription": "インデックスパターンを作成します",
|
||||
"xpack.stackAlerts.geoThreshold.noIndexPattern.doThisPrefixDescription": "次のことが必要です ",
|
||||
"xpack.stackAlerts.geoThreshold.noIndexPattern.doThisSuffixDescription": " 地理空間フィールドを含む",
|
||||
|
@ -19493,7 +19485,6 @@
|
|||
"xpack.triggersActionsUI.sections.alertForm.renotifyFieldLabel": "通知間隔",
|
||||
"xpack.triggersActionsUI.sections.alertForm.renotifyWithTooltip": "アラートがアクティブな間にアクションを繰り返す頻度を定義します。",
|
||||
"xpack.triggersActionsUI.sections.alertForm.selectAlertActionTypeTitle": "アクションタイプを選択してください",
|
||||
"xpack.triggersActionsUI.sections.alertForm.selectedAlertTypeTitle": "{alertType}",
|
||||
"xpack.triggersActionsUI.sections.alertForm.unableToAddAction": "デフォルトアクショングループの定義がないのでアクションを追加できません",
|
||||
"xpack.triggersActionsUI.sections.alertForm.unableToLoadActionsMessage": "コネクターを読み込めません",
|
||||
"xpack.triggersActionsUI.sections.alertForm.unableToLoadActionTypesMessage": "アクションタイプを読み込めません",
|
||||
|
@ -20137,7 +20128,6 @@
|
|||
"xpack.uptime.alerts.monitorStatus.timerangeValueField.ariaLabel": "アラートの範囲のための時間単位の数を入力してください",
|
||||
"xpack.uptime.alerts.monitorStatus.timerangeValueField.expression": "within",
|
||||
"xpack.uptime.alerts.monitorStatus.timerangeValueField.value": "最終{value}",
|
||||
"xpack.uptime.alerts.monitorStatus.title.label": "稼働状況の監視ステータス",
|
||||
"xpack.uptime.alerts.settings.createConnector": "コネクターを作成",
|
||||
"xpack.uptime.alerts.timerangeUnitSelectable.daysOption.ariaLabel": "「日」の時間範囲選択項目",
|
||||
"xpack.uptime.alerts.timerangeUnitSelectable.hoursOption.ariaLabel": "「時間」の時間範囲選択項目",
|
||||
|
|
|
@ -4744,13 +4744,9 @@
|
|||
"xpack.apm.alerts.anomalySeverity.minor": "轻微",
|
||||
"xpack.apm.alerts.anomalySeverity.scoreDetailsDescription": "{value} 及以上分数",
|
||||
"xpack.apm.alerts.anomalySeverity.warningLabel": "警告",
|
||||
"xpack.apm.alertTypes.errorCount": "错误计数阈值",
|
||||
"xpack.apm.alertTypes.errorCount.defaultActionMessage": "由于以下条件 \\{\\{alertName\\}\\} 告警触发:\n\n- 服务名称:\\{\\{context.serviceName\\}\\}\n- 环境:\\{\\{context.environment\\}\\}\n- 阈值:\\{\\{context.threshold\\}\\} 个错误\n- 已触发的值:在过去 \\{\\{context.interval\\}\\}有 \\{\\{context.triggerValue\\}\\} 个错误",
|
||||
"xpack.apm.alertTypes.transactionDuration": "事务持续时间阈值",
|
||||
"xpack.apm.alertTypes.transactionDuration.defaultActionMessage": "由于以下条件 \\{\\{alertName\\}\\} 告警触发:\n\n- 服务名称:\\{\\{context.serviceName\\}\\}\n- 类型:\\{\\{context.transactionType\\}\\}\n- 环境:\\{\\{context.environment\\}\\}\n- 阈值:\\{\\{context.threshold\\}\\}ms\n- 已触发的值:在过去 \\{\\{context.interval\\}\\}为 \\{\\{context.triggerValue\\}\\}",
|
||||
"xpack.apm.alertTypes.transactionDurationAnomaly": "事务持续时间异常",
|
||||
"xpack.apm.alertTypes.transactionDurationAnomaly.defaultActionMessage": "由于以下条件 \\{\\{alertName\\}\\} 告警触发:\n\n- 服务名称:\\{\\{context.serviceName\\}\\}\n- 类型:\\{\\{context.transactionType\\}\\}\n- 环境:\\{\\{context.environment\\}\\}\n- 严重性阈值:\\{\\{context.threshold\\}\\}\n- 严重性值:\\{\\{context.thresholdValue\\}\\}\n",
|
||||
"xpack.apm.alertTypes.transactionErrorRate": "事务错误率阈值",
|
||||
"xpack.apm.alertTypes.transactionErrorRate.defaultActionMessage": "由于以下条件 \\{\\{alertName\\}\\} 告警触发:\n\n- 服务名称:\\{\\{context.serviceName\\}\\}\n- 类型:\\{\\{context.transactionType\\}\\}\n- 环境:\\{\\{context.environment\\}\\}\n- 阈值:\\{\\{context.threshold\\}\\}%\n- 已触发的值:在过去 \\{\\{context.interval\\}\\}有 \\{\\{context.triggerValue\\}\\}% 的错误",
|
||||
"xpack.apm.anomaly_detection.error.invalid_license": "要使用异常检测,必须订阅 Elastic 白金级许可证。有了该许可证,您便可借助 Machine Learning 监测服务。",
|
||||
"xpack.apm.anomaly_detection.error.missing_read_privileges": "必须对 Machine Learning 和 APM 具有“读”权限,才能查看“异常检测”作业",
|
||||
|
@ -9289,7 +9285,6 @@
|
|||
"xpack.infra.logFlyout.setFilterTooltip": "使用筛选查看事件",
|
||||
"xpack.infra.logFlyout.valueColumnLabel": "值",
|
||||
"xpack.infra.logs.alertFlyout.addCondition": "添加条件",
|
||||
"xpack.infra.logs.alertFlyout.alertName": "日志阈值",
|
||||
"xpack.infra.logs.alertFlyout.criterionComparatorValueTitle": "对比:值",
|
||||
"xpack.infra.logs.alertFlyout.criterionFieldTitle": "字段",
|
||||
"xpack.infra.logs.alertFlyout.error.criterionComparatorRequired": "比较运算符必填。",
|
||||
|
@ -9621,7 +9616,6 @@
|
|||
"xpack.infra.metrics.alertFlyout.aggregationText.p99": "第 99 个百分位",
|
||||
"xpack.infra.metrics.alertFlyout.aggregationText.rate": "比率",
|
||||
"xpack.infra.metrics.alertFlyout.aggregationText.sum": "求和",
|
||||
"xpack.infra.metrics.alertFlyout.alertName": "指标阈值",
|
||||
"xpack.infra.metrics.alertFlyout.alertOnNoData": "没数据时提醒我",
|
||||
"xpack.infra.metrics.alertFlyout.alertPreviewError": "尝试预览此告警条件时发生错误",
|
||||
"xpack.infra.metrics.alertFlyout.alertPreviewErrorDesc": "请稍后重试或查看详情了解更多信息。",
|
||||
|
@ -9713,7 +9707,6 @@
|
|||
"xpack.infra.metrics.expressionItems.components.closablePopoverTitle.closeLabel": "关闭",
|
||||
"xpack.infra.metrics.invalidNodeErrorDescription": "反复检查您的配置",
|
||||
"xpack.infra.metrics.invalidNodeErrorTitle": "似乎 {nodeName} 未在收集任何指标数据",
|
||||
"xpack.infra.metrics.inventory.alertFlyout.alertName": "库存",
|
||||
"xpack.infra.metrics.loadingNodeDataText": "正在加载数据",
|
||||
"xpack.infra.metrics.missingTSVBModelError": "{nodeType} 的 {metricId} TSVB 模型不存在",
|
||||
"xpack.infra.metrics.pluginTitle": "指标",
|
||||
|
@ -19136,7 +19129,6 @@
|
|||
"xpack.stackAlerts.geoThreshold.indexLabel": "索引",
|
||||
"xpack.stackAlerts.geoThreshold.indexPatternSelectLabel": "索引模式",
|
||||
"xpack.stackAlerts.geoThreshold.indexPatternSelectPlaceholder": "选择索引模式",
|
||||
"xpack.stackAlerts.geoThreshold.name.trackingThreshold": "跟踪阈值",
|
||||
"xpack.stackAlerts.geoThreshold.noIndexPattern.doThisLinkTextDescription": "创建索引模式",
|
||||
"xpack.stackAlerts.geoThreshold.noIndexPattern.doThisPrefixDescription": "您将需要 ",
|
||||
"xpack.stackAlerts.geoThreshold.noIndexPattern.doThisSuffixDescription": " (包含地理空间字段)。",
|
||||
|
@ -19512,7 +19504,6 @@
|
|||
"xpack.triggersActionsUI.sections.alertForm.renotifyFieldLabel": "通知频率",
|
||||
"xpack.triggersActionsUI.sections.alertForm.renotifyWithTooltip": "定义告警处于活动状态时重复操作的频率。",
|
||||
"xpack.triggersActionsUI.sections.alertForm.selectAlertActionTypeTitle": "选择操作类型",
|
||||
"xpack.triggersActionsUI.sections.alertForm.selectedAlertTypeTitle": "{alertType}",
|
||||
"xpack.triggersActionsUI.sections.alertForm.unableToAddAction": "无法添加操作,因为未定义默认操作组",
|
||||
"xpack.triggersActionsUI.sections.alertForm.unableToLoadActionsMessage": "无法加载连接器",
|
||||
"xpack.triggersActionsUI.sections.alertForm.unableToLoadActionTypesMessage": "无法加载操作类型",
|
||||
|
@ -20156,7 +20147,6 @@
|
|||
"xpack.uptime.alerts.monitorStatus.timerangeValueField.ariaLabel": "输入告警范围的时间单位数目",
|
||||
"xpack.uptime.alerts.monitorStatus.timerangeValueField.expression": "之内",
|
||||
"xpack.uptime.alerts.monitorStatus.timerangeValueField.value": "上一 {value}",
|
||||
"xpack.uptime.alerts.monitorStatus.title.label": "运行时间监测状态",
|
||||
"xpack.uptime.alerts.settings.createConnector": "创建连接器",
|
||||
"xpack.uptime.alerts.timerangeUnitSelectable.daysOption.ariaLabel": "“天”时间范围选择项",
|
||||
"xpack.uptime.alerts.timerangeUnitSelectable.hoursOption.ariaLabel": "“小时”时间范围选择项",
|
||||
|
|
|
@ -30,7 +30,6 @@ test('should sort groups by containing enabled alert types first and then by nam
|
|||
alertTypeItem: {
|
||||
id: 'my-alert-type',
|
||||
iconClass: 'test',
|
||||
name: 'test-alert',
|
||||
description: 'Alert when testing',
|
||||
documentationUrl: 'https://localhost.local/docs',
|
||||
validate: () => {
|
||||
|
@ -52,7 +51,6 @@ test('should sort groups by containing enabled alert types first and then by nam
|
|||
alertTypeItem: {
|
||||
id: 'my-alert-type',
|
||||
iconClass: 'test',
|
||||
name: 'test-alert',
|
||||
description: 'Alert when testing',
|
||||
documentationUrl: 'https://localhost.local/docs',
|
||||
validate: () => {
|
||||
|
@ -69,7 +67,6 @@ test('should sort groups by containing enabled alert types first and then by nam
|
|||
alertTypeItem: {
|
||||
id: 'disabled-alert-type',
|
||||
iconClass: 'test',
|
||||
name: 'test-alert',
|
||||
description: 'Alert when testing',
|
||||
documentationUrl: 'https://localhost.local/docs',
|
||||
validate: () => {
|
||||
|
@ -91,7 +88,6 @@ test('should sort groups by containing enabled alert types first and then by nam
|
|||
alertTypeItem: {
|
||||
id: 'my-alert-type',
|
||||
iconClass: 'test',
|
||||
name: 'test-alert',
|
||||
description: 'Alert when testing',
|
||||
documentationUrl: 'https://localhost.local/docs',
|
||||
validate: () => {
|
||||
|
@ -130,7 +126,6 @@ test('should sort alert types by enabled first and then by name', async () => {
|
|||
alertTypeItem: {
|
||||
id: 'my-alert-type',
|
||||
iconClass: 'test',
|
||||
name: 'test-alert',
|
||||
description: 'Alert when testing',
|
||||
documentationUrl: 'https://localhost.local/docs',
|
||||
validate: () => {
|
||||
|
@ -147,7 +142,6 @@ test('should sort alert types by enabled first and then by name', async () => {
|
|||
alertTypeItem: {
|
||||
id: 'my-alert-type',
|
||||
iconClass: 'test',
|
||||
name: 'test-alert',
|
||||
description: 'Alert when testing',
|
||||
documentationUrl: 'https://localhost.local/docs',
|
||||
validate: () => {
|
||||
|
@ -164,7 +158,6 @@ test('should sort alert types by enabled first and then by name', async () => {
|
|||
alertTypeItem: {
|
||||
id: 'disabled-alert-type',
|
||||
iconClass: 'test',
|
||||
name: 'test-alert',
|
||||
description: 'Alert when testing',
|
||||
documentationUrl: 'https://localhost.local/docs',
|
||||
validate: () => {
|
||||
|
|
|
@ -657,7 +657,6 @@ describe('edit button', () => {
|
|||
const alertTypeR: AlertTypeModel = {
|
||||
id: 'my-alert-type',
|
||||
iconClass: 'test',
|
||||
name: 'test-alert',
|
||||
description: 'Alert when testing',
|
||||
documentationUrl: 'https://localhost.local/docs',
|
||||
validate: () => {
|
||||
|
|
|
@ -94,7 +94,6 @@ describe('alert_add', () => {
|
|||
const alertType = {
|
||||
id: 'my-alert-type',
|
||||
iconClass: 'test',
|
||||
name: 'test-alert',
|
||||
description: 'test',
|
||||
documentationUrl: null,
|
||||
validate: (): ValidationResult => {
|
||||
|
|
|
@ -52,7 +52,6 @@ describe('alert_edit', () => {
|
|||
const alertType = {
|
||||
id: 'my-alert-type',
|
||||
iconClass: 'test',
|
||||
name: 'test-alert',
|
||||
description: 'test',
|
||||
documentationUrl: null,
|
||||
validate: (): ValidationResult => {
|
||||
|
|
|
@ -26,7 +26,6 @@ describe('alert_form', () => {
|
|||
const alertType = {
|
||||
id: 'my-alert-type',
|
||||
iconClass: 'test',
|
||||
name: 'test-alert',
|
||||
description: 'Alert when testing',
|
||||
documentationUrl: 'https://localhost.local/docs',
|
||||
validate: (): ValidationResult => {
|
||||
|
@ -54,7 +53,6 @@ describe('alert_form', () => {
|
|||
const alertTypeNonEditable = {
|
||||
id: 'non-edit-alert-type',
|
||||
iconClass: 'test',
|
||||
name: 'non edit alert',
|
||||
description: 'test',
|
||||
documentationUrl: null,
|
||||
validate: (): ValidationResult => {
|
||||
|
@ -67,7 +65,6 @@ describe('alert_form', () => {
|
|||
const disabledByLicenseAlertType = {
|
||||
id: 'disabled-by-license',
|
||||
iconClass: 'test',
|
||||
name: 'test-alert',
|
||||
description: 'Alert when testing',
|
||||
documentationUrl: 'https://localhost.local/docs',
|
||||
validate: (): ValidationResult => {
|
||||
|
@ -306,7 +303,6 @@ describe('alert_form', () => {
|
|||
{
|
||||
id: 'same-consumer-producer-alert-type',
|
||||
iconClass: 'test',
|
||||
name: 'test-alert',
|
||||
description: 'test',
|
||||
documentationUrl: null,
|
||||
validate: (): ValidationResult => {
|
||||
|
@ -318,7 +314,6 @@ describe('alert_form', () => {
|
|||
{
|
||||
id: 'other-consumer-producer-alert-type',
|
||||
iconClass: 'test',
|
||||
name: 'test-alert',
|
||||
description: 'test',
|
||||
documentationUrl: null,
|
||||
validate: (): ValidationResult => {
|
||||
|
|
|
@ -289,10 +289,7 @@ export const AlertForm = ({
|
|||
)
|
||||
.filter((alertTypeItem) =>
|
||||
searchValue
|
||||
? alertTypeItem.alertTypeModel.name
|
||||
.toString()
|
||||
.toLocaleLowerCase()
|
||||
.includes(searchValue) ||
|
||||
? alertTypeItem.alertType.name.toString().toLocaleLowerCase().includes(searchValue) ||
|
||||
alertTypeItem.alertType!.producer.toLocaleLowerCase().includes(searchValue) ||
|
||||
alertTypeItem.alertTypeModel.description.toLocaleLowerCase().includes(searchValue)
|
||||
: alertTypeItem
|
||||
|
@ -378,10 +375,7 @@ export const AlertForm = ({
|
|||
hasDisabledByLicenseAlertTypes = true;
|
||||
}
|
||||
(result[producer] = result[producer] || []).push({
|
||||
name:
|
||||
typeof alertTypeValue.alertTypeModel.name === 'string'
|
||||
? alertTypeValue.alertTypeModel.name
|
||||
: alertTypeValue.alertTypeModel.name.props.defaultMessage,
|
||||
name: alertTypeValue.alertType.name,
|
||||
id: alertTypeValue.alertTypeModel.id,
|
||||
checkEnabledResult,
|
||||
alertTypeItem: alertTypeValue.alertTypeModel,
|
||||
|
@ -475,11 +469,9 @@ export const AlertForm = ({
|
|||
<EuiFlexItem>
|
||||
<EuiTitle size="s" data-test-subj="selectedAlertTypeTitle">
|
||||
<h5 id="selectedAlertTypeTitle">
|
||||
<FormattedMessage
|
||||
defaultMessage="{alertType}"
|
||||
id="xpack.triggersActionsUI.sections.alertForm.selectedAlertTypeTitle"
|
||||
values={{ alertType: alertTypeModel ? alertTypeModel.name : '' }}
|
||||
/>
|
||||
{alert.alertTypeId && alertTypesIndex && alertTypesIndex.has(alert.alertTypeId)
|
||||
? alertTypesIndex.get(alert.alertTypeId)!.name
|
||||
: ''}
|
||||
</h5>
|
||||
</EuiTitle>
|
||||
</EuiFlexItem>
|
||||
|
|
|
@ -43,7 +43,6 @@ const alertTypeRegistry = alertTypeRegistryMock.create();
|
|||
|
||||
const alertType = {
|
||||
id: 'test_alert_type',
|
||||
name: 'some alert type',
|
||||
description: 'test',
|
||||
iconClass: 'test',
|
||||
documentationUrl: null,
|
||||
|
|
|
@ -11,10 +11,9 @@ export const ExpressionComponent: React.FunctionComponent = () => {
|
|||
return null;
|
||||
};
|
||||
|
||||
const getTestAlertType = (id?: string, name?: string, iconClass?: string) => {
|
||||
const getTestAlertType = (id?: string, iconClass?: string) => {
|
||||
return {
|
||||
id: id || 'test-alet-type',
|
||||
name: name || 'Test alert type',
|
||||
description: 'Test description',
|
||||
iconClass: iconClass || 'icon',
|
||||
documentationUrl: null,
|
||||
|
|
|
@ -187,7 +187,6 @@ export interface AlertTypeParamsExpressionProps<
|
|||
|
||||
export interface AlertTypeModel<AlertParamsType = any> {
|
||||
id: string;
|
||||
name: string | JSX.Element;
|
||||
description: string;
|
||||
iconClass: string;
|
||||
documentationUrl: string | ((docLinks: DocLinksStart) => string) | null;
|
||||
|
|
|
@ -207,11 +207,6 @@ describe('monitor status alert type', () => {
|
|||
"documentationUrl": [Function],
|
||||
"iconClass": "uptimeApp",
|
||||
"id": "xpack.uptime.alerts.monitorStatus",
|
||||
"name": <FormattedMessage
|
||||
defaultMessage="Uptime monitor status"
|
||||
id="xpack.uptime.alerts.monitorStatus.title.label"
|
||||
values={Object {}}
|
||||
/>,
|
||||
"requiresAppContext": false,
|
||||
"validate": [Function],
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import { CLIENT_ALERT_TYPES } from '../../../common/constants/alerts';
|
|||
import { DurationAnomalyTranslations } from './translations';
|
||||
import { AlertTypeInitializer } from '.';
|
||||
|
||||
const { name, defaultActionMessage, description } = DurationAnomalyTranslations;
|
||||
const { defaultActionMessage, description } = DurationAnomalyTranslations;
|
||||
const DurationAnomalyAlert = React.lazy(() => import('./lazy_wrapper/duration_anomaly'));
|
||||
|
||||
export const initDurationAnomalyAlertType: AlertTypeInitializer = ({
|
||||
|
@ -25,7 +25,6 @@ export const initDurationAnomalyAlertType: AlertTypeInitializer = ({
|
|||
alertParamsExpression: (params: unknown) => (
|
||||
<DurationAnomalyAlert core={core} plugins={plugins} params={params} />
|
||||
),
|
||||
name,
|
||||
description,
|
||||
validate: () => ({ errors: {} }),
|
||||
defaultActionMessage,
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
import { AlertTypeModel, ValidationResult } from '../../../../triggers_actions_ui/public';
|
||||
import { AlertTypeInitializer } from '.';
|
||||
|
||||
|
@ -23,12 +22,6 @@ export const initMonitorStatusAlertType: AlertTypeInitializer = ({
|
|||
plugins,
|
||||
}): AlertTypeModel => ({
|
||||
id: CLIENT_ALERT_TYPES.MONITOR_STATUS,
|
||||
name: (
|
||||
<FormattedMessage
|
||||
id="xpack.uptime.alerts.monitorStatus.title.label"
|
||||
defaultMessage="Uptime monitor status"
|
||||
/>
|
||||
),
|
||||
description,
|
||||
iconClass: 'uptimeApp',
|
||||
documentationUrl(docLinks) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import { CLIENT_ALERT_TYPES } from '../../../common/constants/alerts';
|
|||
import { TlsTranslations } from './translations';
|
||||
import { AlertTypeInitializer } from '.';
|
||||
|
||||
const { name, defaultActionMessage, description } = TlsTranslations;
|
||||
const { defaultActionMessage, description } = TlsTranslations;
|
||||
const TLSAlert = React.lazy(() => import('./lazy_wrapper/tls_alert'));
|
||||
export const initTlsAlertType: AlertTypeInitializer = ({ core, plugins }): AlertTypeModel => ({
|
||||
id: CLIENT_ALERT_TYPES.TLS,
|
||||
|
@ -21,7 +21,6 @@ export const initTlsAlertType: AlertTypeInitializer = ({ core, plugins }): Alert
|
|||
alertParamsExpression: (params: any) => (
|
||||
<TLSAlert core={core} plugins={plugins} params={params} />
|
||||
),
|
||||
name,
|
||||
description,
|
||||
validate: () => ({ errors: {} }),
|
||||
defaultActionMessage,
|
||||
|
|
|
@ -28,7 +28,6 @@ export class AlertingFixturePlugin implements Plugin<Setup, Start, AlertingExamp
|
|||
|
||||
triggersActionsUi.alertTypeRegistry.register({
|
||||
id: 'test.always-firing',
|
||||
name: 'Test Always Firing',
|
||||
description: 'Always fires',
|
||||
iconClass: 'alert',
|
||||
documentationUrl: null,
|
||||
|
@ -41,7 +40,6 @@ export class AlertingFixturePlugin implements Plugin<Setup, Start, AlertingExamp
|
|||
|
||||
triggersActionsUi.alertTypeRegistry.register({
|
||||
id: 'test.noop',
|
||||
name: 'Test Noop',
|
||||
description: `Doesn't do anything`,
|
||||
iconClass: 'alert',
|
||||
documentationUrl: null,
|
||||
|
|
Loading…
Reference in a new issue