Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public navigateToAdvancedForm() {
let template = 'project/{project}/create/fromimage?' +
'imageStream={imageStream}&' +
'imageTag={imageTag}&' +
'namespace={namespace}&' +
'displayName={displayName}&' +
'name={name}&' +
'sourceURI={sourceURI}&' +
'sourceRef={sourceRef}&' +
'contextDir={contextDir}&' +
'advanced=true';
let target = URI.expand(template, {
project: this.ctrl.selectedProject.metadata.name,
imageStream: this.ctrl.imageStream.resource.metadata.name,
imageTag: this.ctrl.istag.name,
namespace: this.ctrl.imageStream.resource.metadata.namespace,
displayName: this.ctrl.imageStream.name,
name: this.ctrl.name || '',
sourceURI: this.ctrl.repository || '',
sourceRef: this.gitRef || '',
contextDir: this.contextDir || ''
}).toString();
// TODO: Handle configurable base URLs.
// let base = 'https://localhost:9000/dev-console/';
// if (base) {
// window.location.href = base + target;
// return;