diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.tsx
index 019a8c3972d65..90822b63dccfa 100644
--- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.tsx
+++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.tsx
@@ -235,7 +235,12 @@ export function ActionsPopover({
},
},
{
- name: monitor.isStatusAlertEnabled ? disableAlertLabel : enableMonitorAlertLabel,
+ name: (
+
+ {monitor.isStatusAlertEnabled ? disableAlertLabel : enableMonitorAlertLabel}
+
+ ),
+ disabled: !canEditSynthetics,
icon: alertLoading ? (
) : monitor.isStatusAlertEnabled ? (
diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/metric_item_icon.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/metric_item_icon.tsx
index a1fdf1e734d5c..7534d94ebe1b2 100644
--- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/metric_item_icon.tsx
+++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/metric_item_icon.tsx
@@ -27,7 +27,7 @@ import { useRef } from 'react';
import { selectErrorPopoverState, toggleErrorPopoverOpen } from '../../../../state';
import { useErrorDetailsLink } from '../../../common/links/error_details_link';
import { MonitorOverviewItem, OverviewPing } from '../../../../../../../common/runtime_types';
-import { manualTestRunSelector } from '../../../../state/manual_test_runs';
+import { manualTestRunSelector, isTestRunning } from '../../../../state/manual_test_runs';
import { useFormatTestRunAt } from '../../../../utils/monitor_test_result/test_time_formats';
const Container = styled.div`
@@ -62,7 +62,7 @@ export const MetricItemIcon = ({
dispatch(toggleErrorPopoverOpen(configIdByLocation));
};
- const inProgress = testNowRun?.status === 'in-progress' || testNowRun?.status === 'loading';
+ const inProgress = isTestRunning(testNowRun);
const errorLink = useErrorDetailsLink({
configId: monitor.configId,
@@ -75,9 +75,11 @@ export const MetricItemIcon = ({
if (inProgress) {
return (
-
-
-
+
+
+
+
+
);
}
@@ -164,6 +166,10 @@ const ERROR_DETAILS = i18n.translate('xpack.synthetics.errorDetails.label', {
defaultMessage: 'Error details',
});
+const TEST_IN_PROGRESS = i18n.translate('xpack.synthetics.inProgress.label', {
+ defaultMessage: 'Manual test run is in progress.',
+});
+
const StyledIcon = euiStyled.div<{ boxShadow: string }>`
box-sizing: border-box;
display: flex;
diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/manual_test_runs/index.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/manual_test_runs/index.ts
index 9f1d5a3296f00..936efc6ada6ca 100644
--- a/x-pack/plugins/synthetics/public/apps/synthetics/state/manual_test_runs/index.ts
+++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/manual_test_runs/index.ts
@@ -31,6 +31,9 @@ export enum TestRunStatus {
COMPLETED = 'completed',
}
+export const isTestRunning = (testRun?: ManualTestRun) =>
+ testRun?.status === TestRunStatus.IN_PROGRESS || testRun?.status === TestRunStatus.LOADING;
+
export interface ManualTestRun {
configId: string;
name: string;