Skip to content

Commit

Permalink
[Observability RAC] Leave the severity of the alerts empty if it's un…
Browse files Browse the repository at this point in the history
…known (elastic#107029) (elastic#108014)

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
  • Loading branch information
Alejandro Fernández Gómez committed Aug 10, 2021
1 parent 78dd7d5 commit 9731876
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

import { EuiBadge } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';

export interface SeverityBadgeProps {
Expand All @@ -19,12 +18,11 @@ const colorMap: { [key: string]: string } = {
};

export function SeverityBadge({ severityLevel }: SeverityBadgeProps) {
if (!severityLevel) {
return null;
}

return (
<EuiBadge color={severityLevel ? colorMap[severityLevel] : 'default'}>
{severityLevel ??
i18n.translate('xpack.observability.severityBadge.unknownDescription', {
defaultMessage: 'unknown',
})}
</EuiBadge>
<EuiBadge color={severityLevel ? colorMap[severityLevel] : 'default'}>{severityLevel}</EuiBadge>
);
}
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}未満",
Expand Down
39 changes: 19 additions & 20 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "数值格式",
Expand Down Expand Up @@ -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": "添加数据",
Expand Down Expand Up @@ -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}",
Expand Down

0 comments on commit 9731876

Please sign in to comment.