Skip to content

Commit

Permalink
Show specific tooltip when only private locations are available.
Browse files Browse the repository at this point in the history
  • Loading branch information
awahab07 committed Aug 23, 2022
1 parent 6da8135 commit d0c22dd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -192,7 +193,7 @@ export const ActionBar = ({
<p>
{isTestRunInProgress
? TEST_SCHEDULED_LABEL
: isValid && !hasServiceManagedLocation
: isOnlyPrivateLocations || (isValid && !hasServiceManagedLocation)
? PRIVATE_AVAILABLE_LABEL
: TEST_NOW_DESCRIPTION}
</p>
Expand Down

0 comments on commit d0c22dd

Please sign in to comment.