[JENKINS-36613] fix a bug where multi-branch pipelines with a slash in branch name would not load steps on Run Details -> Pipeline; also tweak filter syntax to make things easier to debug

This commit is contained in:
Cliff Meyers 2016-07-12 15:42:14 -04:00
parent 07c80ed822
commit 34ee8f2df3
2 changed files with 6 additions and 3 deletions

View File

@ -85,8 +85,11 @@ class RunDetails extends Component {
const baseUrl = buildRunDetailsUrl(organization, name, branch, runId);
const currentRun = this.props.runs.filter(
(run) => run.id === runId && decodeURIComponent(run.pipeline) === branch)[0];
/* eslint-disable arrow-body-style */
const currentRun = this.props.runs.filter((run) => {
return run.id === runId &&
decodeURIComponent(run.pipeline) === branch;
})[0];
currentRun.name = name;

View File

@ -80,7 +80,7 @@ export function calculateStepsBaseUrl(config) {
`${_appURLBase}/rest/organizations/jenkins/` +
`pipelines/${name}`;
if (isMultiBranch) {
baseUrl = `${baseUrl}/branches/${branch}`;
baseUrl = `${baseUrl}/branches/${uriString(branch)}`;
}
if (node && node !== null) {
return `${baseUrl}/runs/${runId}/nodes/${node}/steps`;