Initial implementation adding tool input ids to rename action. Whole thing needs some prettification and refactoring, still, but this will at least make it usable for folks.

This commit is contained in:
Dannon Baker
2014-07-10 14:31:35 -04:00
parent 1c5d3e5657
commit b186bc96ba
3 changed files with 11 additions and 2 deletions
+9
View File
@@ -215,6 +215,15 @@ class RenameDatasetAction(DefaultJobAction):
p_str += "<label for='pja__"+pja.output_name+"__RenameDatasetAction__newname'>New output name:</label>\
<input type='text' name='pja__"+pja.output_name+"__RenameDatasetAction__newname' value=''/>";
}
inputlist = [];
$.each(node.input_terminals, function(i, v){
inputlist.push(v.name);
});
if (inputlist !== []){
p_str += "Available inputs are: <strong>" + inputlist.join(', ') + "</strong>";
}else{
p_str += "No inputs are available for templating into this action.";
}
"""
return get_form_template(cls.name, cls.verbose_name, form, "This action will rename the result dataset.")
+1 -1
View File
@@ -361,7 +361,7 @@ function add_node_for_module( type, title ) {
// This function preloads how to display known pja's.
function display_pja(pja, node) {
// DBTODO SANITIZE INPUTS.
$("#pja_container").append( get_pja_form(pja) );
$("#pja_container").append( get_pja_form(pja, node) );
$("#pja_container>.toolForm:last>.toolFormTitle>.buttons").click(function (){
action_to_rem = $(this).closest(".toolForm", ".action_tag").children(".action_tag:first").text();
$(this).closest(".toolForm").remove();
@@ -65,7 +65,7 @@
%>
// Post-job action vars.
var pja_list = "${ActionBox.get_add_list()}",
get_pja_form = function(pja) {
get_pja_form = function(pja, node) {
var p_str = '';
// FIXME: this writes JS code; this logic should be codified in galaxy.workflows.js
${ActionBox.get_forms(trans)}