From 055d63ddf6cf89c1aa1e7eba6758a6fce5b304af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20G=C3=B3mez?= Date: Mon, 9 Aug 2021 18:39:20 +0200 Subject: [PATCH] [Observability RAC] Leave the severity of the alerts empty if it's unknown (#107029) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # x-pack/plugins/translations/translations/ja-JP.json # x-pack/plugins/translations/translations/zh-CN.json --- .../public/pages/alerts/severity_badge.tsx | 12 +++--- .../translations/translations/ja-JP.json | 1 - .../translations/translations/zh-CN.json | 39 +++++++++---------- 3 files changed, 24 insertions(+), 28 deletions(-) diff --git a/x-pack/plugins/observability/public/pages/alerts/severity_badge.tsx b/x-pack/plugins/observability/public/pages/alerts/severity_badge.tsx index 931b9396f912a5..34cab3ec7abeb3 100644 --- a/x-pack/plugins/observability/public/pages/alerts/severity_badge.tsx +++ b/x-pack/plugins/observability/public/pages/alerts/severity_badge.tsx @@ -6,7 +6,6 @@ */ import { EuiBadge } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; import React from 'react'; export interface SeverityBadgeProps { @@ -19,12 +18,11 @@ const colorMap: { [key: string]: string } = { }; export function SeverityBadge({ severityLevel }: SeverityBadgeProps) { + if (!severityLevel) { + return null; + } + return ( - - {severityLevel ?? - i18n.translate('xpack.observability.severityBadge.unknownDescription', { - defaultMessage: 'unknown', - })} - + {severityLevel} ); } diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index d36a601cbe0928..0cdae2350c9fbc 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -18797,7 +18797,6 @@ "xpack.observability.section.apps.uptime.title": "アップタイム", "xpack.observability.section.errorPanel": "データの取得時にエラーが発生しました。再試行してください", "xpack.observability.seriesEditor.clone": "系列をコピー", - "xpack.observability.severityBadge.unknownDescription": "不明", "xpack.observability.transactionRateLabel": "{value} tpm", "xpack.observability.ux.coreVitals.average": "平均", "xpack.observability.ux.coreVitals.averageMessage": " {bad}未満", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index e0abb1fd28e5d8..0c23135ac63b6c 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -1892,6 +1892,25 @@ "expressions.functions.varset.val.help": "指定变量的值。如果未指定,则使用输入上下文。", "expressions.types.number.fromStringConversionErrorMessage": "无法将“{string}”字符串的类型转换为数字", "flot.pie.unableToDrawLabelsInsideCanvasErrorMessage": "无法用画布内包含的标签绘制饼图", + "flot.time.aprLabel": "四月", + "flot.time.augLabel": "八月", + "flot.time.decLabel": "十二月", + "flot.time.febLabel": "二月", + "flot.time.friLabel": "周五", + "flot.time.janLabel": "一月", + "flot.time.julLabel": "七月", + "flot.time.junLabel": "六月", + "flot.time.marLabel": "三月", + "flot.time.mayLabel": "五月", + "flot.time.monLabel": "周一", + "flot.time.novLabel": "十一月", + "flot.time.octLabel": "十月", + "flot.time.satLabel": "周六", + "flot.time.sepLabel": "九月", + "flot.time.sunLabel": "周日", + "flot.time.thuLabel": "周四", + "flot.time.tueLabel": "周二", + "flot.time.wedLabel": "周三", "fieldFormats.advancedSettings.shortenFieldsText": "缩短长字段,例如,不显示 foo.bar.baz,而显示 f.b.baz", "fieldFormats.advancedSettings.shortenFieldsTitle": "缩短字段", "fieldFormats.advancedSettings.format.bytesFormat.numeralFormatLinkText": "数值格式", @@ -1967,25 +1986,6 @@ "fieldFormats.url.types.audio": "音频", "fieldFormats.url.types.img": "图像", "fieldFormats.url.types.link": "链接", - "flot.time.aprLabel": "四月", - "flot.time.augLabel": "八月", - "flot.time.decLabel": "十二月", - "flot.time.febLabel": "二月", - "flot.time.friLabel": "周五", - "flot.time.janLabel": "一月", - "flot.time.julLabel": "七月", - "flot.time.junLabel": "六月", - "flot.time.marLabel": "三月", - "flot.time.mayLabel": "五月", - "flot.time.monLabel": "周一", - "flot.time.novLabel": "十一月", - "flot.time.octLabel": "十月", - "flot.time.satLabel": "周六", - "flot.time.sepLabel": "九月", - "flot.time.sunLabel": "周日", - "flot.time.thuLabel": "周四", - "flot.time.tueLabel": "周二", - "flot.time.wedLabel": "周三", "home.addData.sampleDataButtonLabel": "试用我们的样例数据", "home.addData.sectionTitle": "采集您的数据", "home.breadcrumbs.addDataTitle": "添加数据", @@ -19040,7 +19040,6 @@ "xpack.observability.section.apps.uptime.title": "运行时间", "xpack.observability.section.errorPanel": "尝试提取数据时发生错误。请重试", "xpack.observability.seriesEditor.clone": "复制序列", - "xpack.observability.severityBadge.unknownDescription": "未知", "xpack.observability.transactionRateLabel": "{value} tpm", "xpack.observability.ux.coreVitals.average": "平均值", "xpack.observability.ux.coreVitals.averageMessage": " 且小于 {bad}",