Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #544 from eharris369/CW1520-useAppBaseURLForMetrics
Browse files Browse the repository at this point in the history
CW Issue #1520: use the appBaseURL for remote metrics
  • Loading branch information
eharris369 authored Jan 22, 2020
2 parents 75a351e + 6d96539 commit eda24f8
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,13 @@ public URL getRootUrl() {
public URL getMetricsUrl() {
try {
if ((!this.injectMetrics) && this.metricsAvailable) {
return new URL(getBaseUrl(), projectLanguage.getMetricsRoot());
URL appUrl = null;
if (appBaseUrl != null && !appBaseUrl.isEmpty()) {
appUrl = new URL(appBaseUrl);
}
URL metricsBaseUrl = appUrl != null ? appUrl : baseUrl;
URL metricsUrl = new URL(metricsBaseUrl, projectLanguage.getMetricsRoot());
return metricsUrl;
} else {
return (connection.getBaseURI().resolve(CoreConstants.PERF_METRICS_DASH + "/" + projectLanguage.getId() + "?theme=dark&projectID=" + projectID)).toURL();
}
Expand Down Expand Up @@ -554,4 +560,3 @@ public String toString() {
projectID, name, projectType, fullLocalPath.toOSString());
}
}

0 comments on commit eda24f8

Please sign in to comment.