Skip to content

Commit

Permalink
[RAC][Observability] temporarily hide severity column (elastic#109004)
Browse files Browse the repository at this point in the history
* [RAC][Observability] temporarily hide severity column

* remove severity from flyout & rename Trigerred to last updated

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
mgiota and kibanamachine committed Aug 19, 2021
1 parent 2770db2 commit a503b7c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import type {
ALERT_DURATION as ALERT_DURATION_TYPED,
ALERT_EVALUATION_THRESHOLD as ALERT_EVALUATION_THRESHOLD_TYPED,
ALERT_EVALUATION_VALUE as ALERT_EVALUATION_VALUE_TYPED,
ALERT_SEVERITY_LEVEL as ALERT_SEVERITY_LEVEL_TYPED,
ALERT_UUID as ALERT_UUID_TYPED,
ALERT_RULE_CATEGORY as ALERT_RULE_CATEGORY_TYPED,
ALERT_RULE_NAME as ALERT_RULE_NAME_TYPED,
Expand All @@ -33,7 +32,6 @@ import {
ALERT_DURATION as ALERT_DURATION_NON_TYPED,
ALERT_EVALUATION_THRESHOLD as ALERT_EVALUATION_THRESHOLD_NON_TYPED,
ALERT_EVALUATION_VALUE as ALERT_EVALUATION_VALUE_NON_TYPED,
ALERT_SEVERITY_LEVEL as ALERT_SEVERITY_LEVEL_NON_TYPED,
ALERT_UUID as ALERT_UUID_NON_TYPED,
ALERT_RULE_CATEGORY as ALERT_RULE_CATEGORY_NON_TYPED,
ALERT_RULE_NAME as ALERT_RULE_NAME_NON_TYPED,
Expand All @@ -46,7 +44,6 @@ import { useKibana, useUiSetting } from '../../../../../../../src/plugins/kibana
import { asDuration } from '../../../../common/utils/formatters';
import type { ObservabilityRuleTypeRegistry } from '../../../rules/create_observability_rule_type_registry';
import { parseAlert } from '../parse_alert';
import { SeverityBadge } from '../severity_badge';

type AlertsFlyoutProps = {
alert?: TopAlert;
Expand All @@ -59,7 +56,6 @@ type AlertsFlyoutProps = {
const ALERT_DURATION: typeof ALERT_DURATION_TYPED = ALERT_DURATION_NON_TYPED;
const ALERT_EVALUATION_THRESHOLD: typeof ALERT_EVALUATION_THRESHOLD_TYPED = ALERT_EVALUATION_THRESHOLD_NON_TYPED;
const ALERT_EVALUATION_VALUE: typeof ALERT_EVALUATION_VALUE_TYPED = ALERT_EVALUATION_VALUE_NON_TYPED;
const ALERT_SEVERITY_LEVEL: typeof ALERT_SEVERITY_LEVEL_TYPED = ALERT_SEVERITY_LEVEL_NON_TYPED;
const ALERT_UUID: typeof ALERT_UUID_TYPED = ALERT_UUID_NON_TYPED;
const ALERT_RULE_CATEGORY: typeof ALERT_RULE_CATEGORY_TYPED = ALERT_RULE_CATEGORY_NON_TYPED;
const ALERT_RULE_NAME: typeof ALERT_RULE_NAME_TYPED = ALERT_RULE_NAME_NON_TYPED;
Expand Down Expand Up @@ -97,14 +93,8 @@ export function AlertsFlyout({
description: alertData.active ? 'Active' : 'Recovered',
},
{
title: i18n.translate('xpack.observability.alertsFlyout.severityLabel', {
defaultMessage: 'Severity',
}),
description: <SeverityBadge severityLevel={alertData.fields[ALERT_SEVERITY_LEVEL]} />,
},
{
title: i18n.translate('xpack.observability.alertsFlyout.triggeredLabel', {
defaultMessage: 'Triggered',
title: i18n.translate('xpack.observability.alertsFlyout.lastUpdatedLabel', {
defaultMessage: 'Last updated',
}),
description: (
<span title={alertData.start.toString()}>{moment(alertData.start).format(dateFormat)}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@
import {
AlertConsumers as AlertConsumersTyped,
ALERT_DURATION as ALERT_DURATION_TYPED,
ALERT_SEVERITY_LEVEL as ALERT_SEVERITY_LEVEL_TYPED,
ALERT_STATUS as ALERT_STATUS_TYPED,
ALERT_RULE_NAME as ALERT_RULE_NAME_TYPED,
ALERT_RULE_CONSUMER,
} from '@kbn/rule-data-utils';
import {
ALERT_DURATION as ALERT_DURATION_NON_TYPED,
ALERT_SEVERITY_LEVEL as ALERT_SEVERITY_LEVEL_NON_TYPED,
ALERT_STATUS as ALERT_STATUS_NON_TYPED,
ALERT_RULE_NAME as ALERT_RULE_NAME_NON_TYPED,
TIMESTAMP,
Expand Down Expand Up @@ -66,7 +64,6 @@ import { CoreStart } from '../../../../../../src/core/public';

const AlertConsumers: typeof AlertConsumersTyped = AlertConsumersNonTyped;
const ALERT_DURATION: typeof ALERT_DURATION_TYPED = ALERT_DURATION_NON_TYPED;
const ALERT_SEVERITY_LEVEL: typeof ALERT_SEVERITY_LEVEL_TYPED = ALERT_SEVERITY_LEVEL_NON_TYPED;
const ALERT_STATUS: typeof ALERT_STATUS_TYPED = ALERT_STATUS_NON_TYPED;
const ALERT_RULE_NAME: typeof ALERT_RULE_NAME_TYPED = ALERT_RULE_NAME_NON_TYPED;

Expand Down Expand Up @@ -134,14 +131,6 @@ export const columns: Array<
id: ALERT_DURATION,
initialWidth: 116,
},
{
columnHeaderType: 'not-filtered',
displayAsText: i18n.translate('xpack.observability.alertsTGrid.severityColumnDescription', {
defaultMessage: 'Severity',
}),
id: ALERT_SEVERITY_LEVEL,
initialWidth: 102,
},
{
columnHeaderType: 'not-filtered',
displayAsText: i18n.translate('xpack.observability.alertsTGrid.reasonColumnDescription', {
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -18412,9 +18412,7 @@
"xpack.observability.alertsFlyout.durationLabel": "期間",
"xpack.observability.alertsFlyout.expectedValueLabel": "想定された値",
"xpack.observability.alertsFlyout.ruleTypeLabel": "ルールタイプ",
"xpack.observability.alertsFlyout.severityLabel": "深刻度",
"xpack.observability.alertsFlyout.statusLabel": "ステータス",
"xpack.observability.alertsFlyout.triggeredLabel": "実行済み",
"xpack.observability.alertsLinkTitle": "アラート",
"xpack.observability.alertsTitle": "アラート",
"xpack.observability.breadcrumbs.alertsLinkText": "アラート",
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -18649,9 +18649,7 @@
"xpack.observability.alertsFlyout.durationLabel": "持续时间",
"xpack.observability.alertsFlyout.expectedValueLabel": "预期值",
"xpack.observability.alertsFlyout.ruleTypeLabel": "规则类型",
"xpack.observability.alertsFlyout.severityLabel": "严重性",
"xpack.observability.alertsFlyout.statusLabel": "状态",
"xpack.observability.alertsFlyout.triggeredLabel": "已触发",
"xpack.observability.alertsLinkTitle": "告警",
"xpack.observability.alertsTitle": "告警",
"xpack.observability.breadcrumbs.alertsLinkText": "告警",
Expand Down

0 comments on commit a503b7c

Please sign in to comment.