Skip to content

Commit

Permalink
Merge branch 'hotfix/2.1.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-yuen committed Jul 10, 2018
2 parents 56a4b0c + adb9d75 commit 71eb2ea
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions src/app/workflow/workflow.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export class WorkflowComponent extends Entry {
public wdlHasHttpImports: boolean;
public wdlHasFileImports: boolean;
public enableLaunchWithFireCloud = Dockstore.FEATURES.enableLaunchWithFireCloud;
private lastWorkflow: ExtendedWorkflow;
private lastVersion: WorkflowVersion;
public workflow;
public missingWarning: boolean;
public title: string;
Expand Down Expand Up @@ -144,18 +146,22 @@ export class WorkflowComponent extends Entry {
if (this.isWdl(workflowRef)) {
const version: WorkflowVersion = this.selectedVersion;
if (version) {
this.workflowsService.secondaryWdl(workflowRef.id, version.name).subscribe((sourceFiles: Array<SourceFile>) => {
if (!sourceFiles || sourceFiles.length === 0) {
this.workflowsService.wdl(workflowRef.id, version.name).subscribe((sourceFile) => {
this.wdlHasHttpImports = importHttpRegEx.test(sourceFile.content);
});
if (this.enableLaunchWithFireCloud) {
this.fireCloudURL = `${Dockstore.FIRECLOUD_IMPORT_URL}/${workflowRef.full_workflow_path}:${version.name}`;
if (version !== this.lastVersion || this.lastWorkflow !== workflowRef) {
this.lastVersion = version;
this.lastWorkflow = workflowRef;
this.workflowsService.secondaryWdl(workflowRef.id, version.name).subscribe((sourceFiles: Array<SourceFile>) => {
if (!sourceFiles || sourceFiles.length === 0) {
this.workflowsService.wdl(workflowRef.id, version.name).subscribe((sourceFile) => {
this.wdlHasHttpImports = importHttpRegEx.test(sourceFile.content);
});
if (this.enableLaunchWithFireCloud) {
this.fireCloudURL = `${Dockstore.FIRECLOUD_IMPORT_URL}/${workflowRef.full_workflow_path}:${version.name}`;
}
} else {
this.wdlHasFileImports = true;
}
} else {
this.wdlHasFileImports = true;
}
});
});
}
}
}
}
Expand Down Expand Up @@ -206,6 +212,7 @@ export class WorkflowComponent extends Entry {
this.workflowService.setWorkflow(workflow);
this.selectedVersion = this.selectVersion(this.workflow.workflowVersions, this.urlVersion,
this.workflow.defaultVersion);
this.checkWdlForImportsAndSetFirecloudUrl(workflow);

this.selectTab(this.validTabs.indexOf(this.currentTab));
if (this.workflow != null) {
Expand Down

0 comments on commit 71eb2ea

Please sign in to comment.