Commit 6480cf16 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'djadmin-hot-fix-scanner-profile-id' into 'master'

Fix redirection for DAST Scanner Profile

See merge request gitlab-org/gitlab!64175
parents 1fbed94b d6dbe845
...@@ -25,12 +25,10 @@ export default () => { ...@@ -25,12 +25,10 @@ export default () => {
props.profile = convertObjectPropsToCamelCase(JSON.parse(el.dataset.scannerProfile)); props.profile = convertObjectPropsToCamelCase(JSON.parse(el.dataset.scannerProfile));
} }
const returnToPreviousPage = ({ id } = {}) => { const factoryParams = {
returnToPreviousPageFactory({ allowedPaths: [onDemandScansPath, dastConfigurationPath],
allowedPaths: [onDemandScansPath, dastConfigurationPath], profilesLibraryPath,
profilesLibraryPath, urlParamKey: 'scanner_profile_id',
urlParamKey: 'scanner_profile_id',
})(id);
}; };
return new Vue({ return new Vue({
...@@ -40,8 +38,8 @@ export default () => { ...@@ -40,8 +38,8 @@ export default () => {
return h(DastScannerProfileForm, { return h(DastScannerProfileForm, {
props, props,
on: { on: {
success: returnToPreviousPage, success: returnToPreviousPageFactory(factoryParams),
cancel: returnToPreviousPage, cancel: returnToPreviousPageFactory(factoryParams),
}, },
}); });
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment