Skip to content

Commit

Permalink
[Uptime]Alerting UI text in case filter is selected (#62570)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
shahzad31 and elasticmachine committed Apr 8, 2020
1 parent bfdccfd commit 8cacbdf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface Props {

export const UptimeAlertsFlyoutWrapper = ({ alertTypeId, canChangeTrigger }: Props) => {
const dispatch = useDispatch();
const setAddFlyoutVisiblity = (value: React.SetStateAction<boolean>) =>
const setAddFlyoutVisibility = (value: React.SetStateAction<boolean>) =>
// @ts-ignore the value here is a boolean, and it works with the action creator function
dispatch(setAlertFlyoutVisible(value));

Expand All @@ -28,7 +28,7 @@ export const UptimeAlertsFlyoutWrapper = ({ alertTypeId, canChangeTrigger }: Pro
alertFlyoutVisible={alertFlyoutVisible}
alertTypeId={alertTypeId}
canChangeTrigger={canChangeTrigger}
setAlertFlyoutVisibility={setAddFlyoutVisiblity}
setAlertFlyoutVisibility={setAddFlyoutVisibility}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,21 @@ export const AlertMonitorStatusComponent: React.FC<AlertMonitorStatusProps> = pr
/>
}
data-test-subj="xpack.uptime.alerts.monitorStatus.numTimesExpression"
description="any monitor is down >"
description={
filters
? i18n.translate(
'xpack.uptime.alerts.monitorStatus.numTimesExpression.matchingMonitors.description',
{
defaultMessage: 'matching monitors are down >',
}
)
: i18n.translate(
'xpack.uptime.alerts.monitorStatus.numTimesExpression.anyMonitors.description',
{
defaultMessage: 'any monitor is down >',
}
)
}
id="ping-count"
value={`${numTimes} times`}
/>
Expand Down

0 comments on commit 8cacbdf

Please sign in to comment.