From d0c22dd6d11c8d13c1edf73a4df54fac83069a28 Mon Sep 17 00:00:00 2001 From: Abdul Zahid Date: Tue, 23 Aug 2022 15:19:51 +0200 Subject: [PATCH] Show specific tooltip when only private locations are available. --- .../components/monitor_management/action_bar/action_bar.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/action_bar/action_bar.tsx b/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/action_bar/action_bar.tsx index 2cf9c699cc8d3..0cae34a05e35b 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/action_bar/action_bar.tsx +++ b/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/action_bar/action_bar.tsx @@ -72,6 +72,7 @@ export const ActionBar = ({ const isReadOnly = monitor[ConfigKey.MONITOR_SOURCE_TYPE] === SourceType.PROJECT; const hasServiceManagedLocation = monitor.locations?.some((loc) => loc.isServiceManaged); + const isOnlyPrivateLocations = !locations.some((loc) => loc.isServiceManaged); const { data, status } = useFetcher(() => { if (!isSaving || !isValid) { @@ -192,7 +193,7 @@ export const ActionBar = ({

{isTestRunInProgress ? TEST_SCHEDULED_LABEL - : isValid && !hasServiceManagedLocation + : isOnlyPrivateLocations || (isValid && !hasServiceManagedLocation) ? PRIVATE_AVAILABLE_LABEL : TEST_NOW_DESCRIPTION}