Skip to content

Commit

Permalink
[REFORMAT] using a path to a serverside file for forwarding now
Browse files Browse the repository at this point in the history
  • Loading branch information
anjestephens committed Oct 11, 2017
1 parent df8bf25 commit 409d85b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 16 deletions.
5 changes: 5 additions & 0 deletions app/assets/ui/app/jobmodel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,10 @@ window.JobModel = {
} else {
return "";
}
},
setParamValue: function(param : string, value : any) : void {
console.log("[JobModel.setParamValue]", param, value);
window.JobModel.paramValues[param] = value;
m.redraw(true);
}
};
2 changes: 1 addition & 1 deletion app/assets/ui/app/jobview/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
id: "jobview"
}, [
m(JobLineComponent, { job: args.job }),
m(JobTabsComponent, { job: args.job, owner: args.owner })
m(JobTabsComponent, { job: args.job })
]);
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/assets/ui/app/jobview/submission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
view: function(ctrl : any, args : any) {
return m("div", { "class": "submitbuttons", config: JobSubmissionComponent.hide(ctrl, args) }, [
m("div", {
"class": "reveal",
"class": "reveal",
"data-reveal": "data-reveal",
"data-animation-in": "fade-in",
"data-overlay": "true",
Expand Down Expand Up @@ -228,7 +228,7 @@
style: "float: right;",
onclick: ctrl.submit.bind(ctrl, true)
}),
JobSubmissionComponent.jobIDComponent(ctrl), m(ProjectComponent, {})
JobSubmissionComponent.jobIDComponent(ctrl)
])
}
};
1 change: 0 additions & 1 deletion app/views/jobs/resultpanels/hhpred/forward.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<script>
function tomodeller() {
localStorage.setItem('resultcookie', $("#pir").text());
localStorage.setItem('parentid', '@jobID');
m.route("/tools/modeller");
}
</script>
10 changes: 1 addition & 9 deletions app/views/jobs/resultpanels/psiblast/hitlist.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,7 @@ <h5 id="refTitle">References</h5>
$.LoadingOverlay("hide")
}
}).done(function (data_) {
$.ajax({
type: 'GET',
url: 'files/'+jobID+'/'+filename+'.fa',
error: function(){
$.LoadingOverlay("hide")
}
}).done(function (data_) {
forward(selectedTool, data_.toString());
})
forwardPath(selectedTool, 'files/'+jobID+'/'+filename+'.fa');
})
}
}
Expand Down
5 changes: 2 additions & 3 deletions public/javascripts/blast-visualization.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ function forward(tool, forwardData){


function forwardPath(tool, forwardPath){
window.location.href = "/#/tools/" + tool;

m.route("/tools/" + tool);
$.ajax({
type: 'GET',
url: forwardPath,
Expand All @@ -135,7 +134,7 @@ function forwardPath(tool, forwardPath){
}
}).done(function (data) {
console.log("data", data);
$("#alignment").val(data.toString());
window.JobModel.setParamValue("alignment", data);
$.LoadingOverlay("hide")
})
}
Expand Down

0 comments on commit 409d85b

Please sign in to comment.