fix go to classic link in the pipeline editor (#1731)
This commit is contained in:
parent
118e690ae5
commit
8a2e2b5017
|
@ -229,7 +229,13 @@ export function toClassicJobPage(currentPageUrl, isMultibranch = false) {
|
|||
pageUrlTokens.shift();
|
||||
|
||||
// The next token is the "full" job name, URL encoded.
|
||||
const fullJobName = decodeURIComponent(pageUrlTokens.shift());
|
||||
let fullJobName = decodeURIComponent(pageUrlTokens.shift());
|
||||
|
||||
// If the URL comes from pipeline-editor then the "full" job name is the next token
|
||||
if (fullJobName === 'pipeline-editor' && pageUrlTokens.length === 2) {
|
||||
fullJobName = decodeURIComponent(pageUrlTokens.shift());
|
||||
}
|
||||
|
||||
const fullJobNameTokens = fullJobName.split('/');
|
||||
if (fullJobName !== 'pipelines' && pageUrlTokens.length > 0) {
|
||||
classicJobFullName = classicJobFullName + '/job/' + fullJobNameTokens.join('/job/');
|
||||
|
|
Loading…
Reference in New Issue