Skip to content

Commit

Permalink
[7.x] [Uptime]Alerting UI text in case filter is selected (#62… (#63340)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
shahzad31 and elasticmachine authored Apr 13, 2020
1 parent 436df91 commit 13dd79c
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 13dd79c

Please sign in to comment.