Skip to content

Commit

Permalink
decodeURI text in branch filter (#1068)
Browse files Browse the repository at this point in the history
* decodeURI text in branch filter that is being applied from the url get param

* fix undefined issue when no branch param present
  • Loading branch information
NicuPascu authored May 18, 2017
1 parent 20368a9 commit b2dd365
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion blueocean-dashboard/src/main/js/components/Activity.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ export class Activity extends Component {
const duration = t(`${head}.duration`, { defaultValue: 'Duration' });
const completed = t(`${head}.completed`, { defaultValue: 'Completed' });
const branchText = t(`${head}.branch`, { defaultValue: 'Branch' });
const decodedBranchName = branch ? decodeURIComponent(branch) : branch;

const branchFilter = isMultiBranchPipeline && (<ColumnFilter placeholder={branchText} value={branch}
const branchFilter = isMultiBranchPipeline && (<ColumnFilter placeholder={branchText} value={decodedBranchName}
onChange={b => this.navigateToBranch(b)}
options={pipeline.branchNames.map(b => decodeURIComponent(b))}
/>);
Expand Down

0 comments on commit b2dd365

Please sign in to comment.