Skip to content
/ kibana Public
forked from elastic/kibana

Commit

Permalink
Don't fetch service map data if no license (elastic#62071)
Browse files Browse the repository at this point in the history
  • Loading branch information
smith committed Apr 6, 2020
1 parent 81eb048 commit 246e223
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ export function ServiceMap({ serviceName }: ServiceMapProps) {
const license = useLicense();
const { urlParams } = useUrlParams();

const { data } = useFetcher(() => {
const { data = { elements: [] } } = useFetcher(() => {
// When we don't have a license or a valid license, don't make the request.
if (!license || !isValidPlatinumLicense(license)) {
return;
}

const { start, end, environment } = urlParams;
if (start && end) {
return callApmApi({
Expand All @@ -48,7 +53,7 @@ export function ServiceMap({ serviceName }: ServiceMapProps) {
}
});
}
}, [serviceName, urlParams]);
}, [license, serviceName, urlParams]);

const { ref, height, width } = useRefDimensions();

Expand Down

0 comments on commit 246e223

Please sign in to comment.