From bf3c2c10dcb6a6a49b1bb8ec0b486139a52b7c3f Mon Sep 17 00:00:00 2001 From: guerler Date: Fri, 6 Mar 2015 18:56:57 -0500 Subject: [PATCH] ToolForm: Add remap options --- client/galaxy/scripts/mvc/tools/tools-form.js | 13 +++++++++++++ static/scripts/mvc/tools/tools-form.js | 13 +++++++++++++ static/scripts/packed/mvc/tools/tools-form.js | 2 +- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/client/galaxy/scripts/mvc/tools/tools-form.js b/client/galaxy/scripts/mvc/tools/tools-form.js index 8cb59b07895..98623628718 100644 --- a/client/galaxy/scripts/mvc/tools/tools-form.js +++ b/client/galaxy/scripts/mvc/tools/tools-form.js @@ -8,6 +8,19 @@ define(['utils/utils', 'mvc/ui/ui-misc', 'mvc/tools/tools-form-base', 'mvc/tools var View = ToolFormBase.extend({ // initialize initialize: function(options) { + // add remap button + if (options.job_id && options.job_remap) { + options.inputs['rerun_remap_job_id'] = { + label : 'Resume dependencies from this job', + name : 'rerun_remap_job_id', + type : 'select', + display : 'radio', + ignore : '__ignore__', + value : '__ignore__', + options : [['Yes', options.job_id], ['No', '__ignore__']], + help : 'The previous run of this tool failed and other tools were waiting for it to finish successfully, use this option to resume those tools using the outputs of this tool run.' + } + } // create options dictionary var self = this; options = Utils.merge(options, { diff --git a/static/scripts/mvc/tools/tools-form.js b/static/scripts/mvc/tools/tools-form.js index 8cb59b07895..98623628718 100644 --- a/static/scripts/mvc/tools/tools-form.js +++ b/static/scripts/mvc/tools/tools-form.js @@ -8,6 +8,19 @@ define(['utils/utils', 'mvc/ui/ui-misc', 'mvc/tools/tools-form-base', 'mvc/tools var View = ToolFormBase.extend({ // initialize initialize: function(options) { + // add remap button + if (options.job_id && options.job_remap) { + options.inputs['rerun_remap_job_id'] = { + label : 'Resume dependencies from this job', + name : 'rerun_remap_job_id', + type : 'select', + display : 'radio', + ignore : '__ignore__', + value : '__ignore__', + options : [['Yes', options.job_id], ['No', '__ignore__']], + help : 'The previous run of this tool failed and other tools were waiting for it to finish successfully, use this option to resume those tools using the outputs of this tool run.' + } + } // create options dictionary var self = this; options = Utils.merge(options, { diff --git a/static/scripts/packed/mvc/tools/tools-form.js b/static/scripts/packed/mvc/tools/tools-form.js index fd8cdb28a1e..12d05dc475e 100644 --- a/static/scripts/packed/mvc/tools/tools-form.js +++ b/static/scripts/packed/mvc/tools/tools-form.js @@ -1 +1 @@ -define(["utils/utils","mvc/ui/ui-misc","mvc/tools/tools-form-base","mvc/tools/tools-jobs"],function(c,e,b,a){var d=b.extend({initialize:function(g){var f=this;g=c.merge(g,{update_url:galaxy_config.root+"api/tools/"+g.id+"/build",buttons:{execute:new e.Button({icon:"fa-check",tooltip:"Execute: "+g.name,title:"Execute",cls:"btn btn-primary",floating:"clear",onclick:function(){a.submit(f.form,g)}})}});b.prototype.initialize.call(this,g)}});return{View:d}}); \ No newline at end of file +define(["utils/utils","mvc/ui/ui-misc","mvc/tools/tools-form-base","mvc/tools/tools-jobs"],function(c,e,b,a){var d=b.extend({initialize:function(g){if(g.job_id&&g.job_remap){g.inputs.rerun_remap_job_id={label:"Resume dependencies from this job",name:"rerun_remap_job_id",type:"select",display:"radio",ignore:"__ignore__",value:"__ignore__",options:[["Yes",g.job_id],["No","__ignore__"]],help:"The previous run of this tool failed and other tools were waiting for it to finish successfully, use this option to resume those tools using the outputs of this tool run."}}var f=this;g=c.merge(g,{update_url:galaxy_config.root+"api/tools/"+g.id+"/build",buttons:{execute:new e.Button({icon:"fa-check",tooltip:"Execute: "+g.name,title:"Execute",cls:"btn btn-primary",floating:"clear",onclick:function(){a.submit(f.form,g)}})}});b.prototype.initialize.call(this,g)}});return{View:d}}); \ No newline at end of file