parent
af3e62131d
commit
ab776d4577
|
@ -13,8 +13,8 @@ import {
|
|||
EuiLink,
|
||||
} from '@elastic/eui';
|
||||
|
||||
export function FormattedMessage({ prefix, suffix, message, metadata, changeUrl }) {
|
||||
const formattedMessage = (() => {
|
||||
export function FormattedAlert({ prefix, suffix, message, metadata, changeUrl }) {
|
||||
const formattedAlert = (() => {
|
||||
if (metadata && metadata.link) {
|
||||
if (metadata.link.startsWith('https')) {
|
||||
return (
|
||||
|
@ -60,7 +60,7 @@ export function FormattedMessage({ prefix, suffix, message, metadata, changeUrl
|
|||
return (
|
||||
<span data-test-subj="alertText">
|
||||
{ formattedPrefix }
|
||||
{ formattedMessage }
|
||||
{ formattedAlert }
|
||||
{ formattedSuffix }
|
||||
</span>
|
||||
);
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { FormattedMessage } from 'plugins/monitoring/components/alerts/formatted_message';
|
||||
import { FormattedAlert } from 'plugins/monitoring/components/alerts/formatted_alert';
|
||||
import { mapSeverity } from 'plugins/monitoring/components/alerts/map_severity';
|
||||
import { formatTimestampToDuration } from '../../../../common/format_timestamp_to_duration';
|
||||
import { CALCULATE_DURATION_SINCE } from '../../../../common/constants';
|
||||
|
@ -50,7 +50,7 @@ export function AlertsPanel({ alerts, changeUrl }) {
|
|||
color={severityIcon.color}
|
||||
title={severityIcon.title}
|
||||
>
|
||||
<FormattedMessage
|
||||
<FormattedAlert
|
||||
prefix={item.prefix}
|
||||
suffix={item.suffix}
|
||||
message={item.message}
|
||||
|
|
|
@ -13,7 +13,7 @@ import { KuiTableRowCell, KuiTableRow } from '@kbn/ui-framework/components';
|
|||
import { MonitoringTable } from 'plugins/monitoring/components/table';
|
||||
import { CALCULATE_DURATION_SINCE, SORT_DESCENDING } from '../../../common/constants';
|
||||
import { Tooltip } from 'plugins/monitoring/components/tooltip';
|
||||
import { FormattedMessage } from 'plugins/monitoring/components/alerts/formatted_message';
|
||||
import { FormattedAlert } from 'plugins/monitoring/components/alerts/formatted_alert';
|
||||
import { mapSeverity } from 'plugins/monitoring/components/alerts/map_severity';
|
||||
import { formatTimestampToDuration } from '../../../common/format_timestamp_to_duration';
|
||||
import { formatDateTimeLocal } from '../../../common/formatting';
|
||||
|
@ -65,7 +65,7 @@ const alertRowFactory = (scope, kbnUrl) => {
|
|||
{ resolution.icon } { resolution.text }
|
||||
</KuiTableRowCell>
|
||||
<KuiTableRowCell tabIndex="0">
|
||||
<FormattedMessage
|
||||
<FormattedAlert
|
||||
prefix={props.prefix}
|
||||
suffix={props.suffix}
|
||||
message={props.message}
|
||||
|
|
Loading…
Reference in a new issue