Skip to content

Commit 98af447

Browse files
authored
Use the provided jenkins URL instead of guessing
1 parent fcb75e7 commit 98af447

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

static/js/dashboard.v2.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,11 @@ function renderSingleBadge (key, field, envLabel, envLink, branchLink, badge_url
344344
var badgeClass = "ci-label-environment-prerelease";
345345
nightlyLabel = "(nightly build)"
346346
}
347+
348+
if ( envLink == "internal") {
349+
envLink = json.jenkinsURL
350+
}
351+
347352
badgeText = '<span class="ci-label">'
348353
if (envLink != null) {
349354
badgeText += '<a href="' + envLink + '"><span class="' + badgeClass + '"><i class="ci-icon fas fa-fw fa-brands fa-git-alt" aria-hidden="true"></i>' + envLabel + ' ' + nightlyLabel + '</span></a>'
@@ -372,7 +377,7 @@ function renderBadges (badges, field, value, links) {
372377
badgeText = '<div class="pf-l-flex">'
373378
pBadges.forEach(b => {
374379
if ( links == "internal") {
375-
envLink = encodeURI(b.getJenkinsURI())
380+
envLink = "internal"
376381
branchLink = encodeURI(b.getJiraSearch());
377382
} else {
378383
envLink = encodeURI(b.getURI())

0 commit comments

Comments
 (0)