mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #2935 from guerler/strip_run_form_mako
Strip workflow run mako
This commit is contained in:
@@ -16,12 +16,14 @@ define(['utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view',
|
||||
self._buildModel(process, options, true);
|
||||
});
|
||||
}
|
||||
// Listen to history panel
|
||||
// listen to history panel
|
||||
if ( options.listen_to_history && parent.Galaxy && parent.Galaxy.currHistoryPanel ) {
|
||||
this.listenTo( parent.Galaxy.currHistoryPanel.collection, 'change', function() {
|
||||
this.refresh();
|
||||
});
|
||||
}
|
||||
// destroy dom elements
|
||||
this.$el.on( 'remove', function() { self.remove() } );
|
||||
},
|
||||
|
||||
/** Listen to history panel changes and update the tool form */
|
||||
@@ -101,9 +103,9 @@ define(['utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view',
|
||||
Galaxy.emit.debug('tool-form-base::initialize()', 'Initial tool model ready.', new_model);
|
||||
process.resolve();
|
||||
},
|
||||
error : function(response, xhr) {
|
||||
error : function(response, status) {
|
||||
var error_message = ( response && response.err_msg ) || 'Uncaught error.';
|
||||
if ( xhr.status == 401 ) {
|
||||
if ( status == 401 ) {
|
||||
window.location = Galaxy.root + 'user/login?' + $.param({ redirect : Galaxy.root + '?tool_id=' + self.options.id });
|
||||
} else if ( self.$el.is(':empty') ) {
|
||||
self.$el.prepend((new Ui.Message({
|
||||
|
||||
@@ -196,6 +196,15 @@ define([ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view'
|
||||
fade : false
|
||||
} ).$el );
|
||||
}
|
||||
var step_version_changes = this.model.get( 'step_version_changes' );
|
||||
if ( step_version_changes && step_version_changes.length > 0 ) {
|
||||
this.$message.append( new Ui.Message( {
|
||||
message : 'Some tools are being executed with different versions compared to those available when this workflow was last saved because the other versions are not or no longer available on this Galaxy instance. To upgrade your workflow and dismiss this message simply edit the workflow and re-save it.',
|
||||
status : 'warning',
|
||||
persistent : true,
|
||||
fade : false
|
||||
} ).$el );
|
||||
}
|
||||
},
|
||||
|
||||
/** Render workflow parameters */
|
||||
@@ -347,7 +356,7 @@ define([ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view'
|
||||
_submit: function() {
|
||||
var self = this;
|
||||
var job_def = {
|
||||
new_history_name : this.history_form.data.create()[ 'new_history|name' ],
|
||||
new_history_name : this.history_form ? this.history_form.data.create()[ 'new_history|name' ] : {},
|
||||
replacement_params : this.wp_form ? this.wp_form.data.create() : {},
|
||||
inputs : {}
|
||||
};
|
||||
@@ -430,14 +439,14 @@ define([ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view'
|
||||
|
||||
/** Append new dom to body */
|
||||
_append: function( $container, $el ) {
|
||||
$container.append( '<p/>' ).addClass( 'ui-margin-top' ).append( $el );
|
||||
$container.append( '<p/>' ).append( $el );
|
||||
},
|
||||
|
||||
/** Set enabled/disabled state */
|
||||
_enabled: function( enabled ) {
|
||||
this.execute_btn.model.set( { wait: !enabled, wait_text: 'Sending...', percentage: -1 } );
|
||||
this.wp_form && this.wp_form.portlet[ enabled ? 'enable' : 'disable' ]();
|
||||
this.history_form.portlet[ enabled ? 'enable' : 'disable' ]();
|
||||
this.history_form && this.history_form.portlet[ enabled ? 'enable' : 'disable' ]();
|
||||
_.each( this.forms, function( form ) { form && form.portlet[ enabled ? 'enable' : 'disable' ]() } );
|
||||
},
|
||||
|
||||
|
||||
@@ -1,85 +1,59 @@
|
||||
/**
|
||||
This is the workflow tool form.
|
||||
*/
|
||||
define(['utils/utils', 'mvc/tool/tool-form-base'],
|
||||
function(Utils, ToolFormBase) {
|
||||
|
||||
// create form view
|
||||
var View = ToolFormBase.extend({
|
||||
initialize: function(options) {
|
||||
/** This is the workflow tool form. */
|
||||
define( [ 'utils/utils', 'mvc/tool/tool-form-base' ],
|
||||
function( Utils, ToolFormBase ) {
|
||||
var View = Backbone.View.extend({
|
||||
initialize: function( options ) {
|
||||
var self = this;
|
||||
this.workflow = options.workflow;
|
||||
|
||||
// link with node representation in workflow module
|
||||
this.node = options.node;
|
||||
if (!this.node) {
|
||||
Galaxy.emit.debug('tool-form-workflow::initialize()', 'Node not found in workflow.');
|
||||
return;
|
||||
}
|
||||
|
||||
// link actions
|
||||
this.post_job_actions = this.node.post_job_actions || {};
|
||||
|
||||
// initialize parameters
|
||||
options = Utils.merge(options, {
|
||||
// set labels
|
||||
text_enable : 'Set in Advance',
|
||||
text_disable : 'Set at Runtime',
|
||||
|
||||
// configure workflow style
|
||||
narrow : true,
|
||||
initial_errors : true,
|
||||
sustain_version : true,
|
||||
cls : 'ui-portlet-narrow',
|
||||
|
||||
// configure model update
|
||||
update_url : Galaxy.root + 'api/workflows/build_module',
|
||||
update : function(data) {
|
||||
// This hasn't modified the workflow, just returned
|
||||
// module information for the tool to update the workflow
|
||||
// state stored on the client with. User needs to save
|
||||
// for this to take effect.
|
||||
self.node.update_field_data(data);
|
||||
self.errors(data && data.tool_model)
|
||||
}
|
||||
});
|
||||
|
||||
// mark values which can be determined at runtime
|
||||
Utils.deepeach (options.inputs, function( input ) {
|
||||
if ( input.type ) {
|
||||
if ( [ 'data', 'data_collection' ].indexOf( input.type ) != -1 ) {
|
||||
input.type = 'hidden';
|
||||
input.info = 'Data input \'' + input.name + '\' (' + Utils.textify( input.extensions ) + ')';
|
||||
input.value = { '__class__': 'RuntimeValue' };
|
||||
} else {
|
||||
input.collapsible_value = { '__class__': 'RuntimeValue' };
|
||||
input.is_workflow = ( input.options && input.options.length == 0 ) ||
|
||||
( [ 'integer', 'float' ].indexOf( input.type ) != -1 );
|
||||
this.node = options.node;
|
||||
this.setElement( '<div/>' );
|
||||
if ( this.node ) {
|
||||
this.post_job_actions = this.node.post_job_actions || {};
|
||||
Utils.deepeach( options.inputs, function( input ) {
|
||||
if ( input.type ) {
|
||||
if ( [ 'data', 'data_collection' ].indexOf( input.type ) != -1 ) {
|
||||
input.type = 'hidden';
|
||||
input.info = 'Data input \'' + input.name + '\' (' + Utils.textify( input.extensions ) + ')';
|
||||
input.value = { '__class__': 'RuntimeValue' };
|
||||
} else {
|
||||
input.collapsible_value = { '__class__': 'RuntimeValue' };
|
||||
input.is_workflow = ( input.options && input.options.length == 0 ) ||
|
||||
( [ 'integer', 'float' ].indexOf( input.type ) != -1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// declare conditional and data input fields as not collapsible
|
||||
Utils.deepeach(options.inputs, function(item) {
|
||||
item.type == 'conditional' && ( item.test_param.collapsible_value = undefined );
|
||||
});
|
||||
|
||||
// configure custom sections
|
||||
this._makeSections(options);
|
||||
|
||||
// create final tool form
|
||||
ToolFormBase.prototype.initialize.call(this, options);
|
||||
});
|
||||
Utils.deepeach( options.inputs, function( input ) {
|
||||
input.type == 'conditional' && ( input.test_param.collapsible_value = undefined );
|
||||
});
|
||||
this._makeSections( options );
|
||||
this.form = new ToolFormBase( Utils.merge( options, {
|
||||
text_enable : 'Set in Advance',
|
||||
text_disable : 'Set at Runtime',
|
||||
narrow : true,
|
||||
initial_errors : true,
|
||||
sustain_version : true,
|
||||
cls : 'ui-portlet-narrow',
|
||||
update_url : Galaxy.root + 'api/workflows/build_module',
|
||||
update : function( data ) {
|
||||
// This hasn't modified the workflow, just returned
|
||||
// module information for the tool to update the workflow
|
||||
// state stored on the client with. User needs to save
|
||||
// for this to take effect.
|
||||
self.node.update_field_data( data );
|
||||
self.form.errors( data && data.tool_model )
|
||||
}
|
||||
}));
|
||||
this.$el.append( this.form.$el );
|
||||
} else {
|
||||
Galaxy.emit.debug('tool-form-workflow::initialize()', 'Node not found in workflow.');
|
||||
}
|
||||
},
|
||||
|
||||
/** Builds all sub sections
|
||||
*/
|
||||
_makeSections: function(options){
|
||||
// initialize local variables
|
||||
/** Builds all sub sections */
|
||||
_makeSections: function( options ){
|
||||
var inputs = options.inputs;
|
||||
var datatypes = options.datatypes;
|
||||
|
||||
// for annotation
|
||||
inputs[Utils.uid()] = {
|
||||
inputs[ Utils.uid() ] = {
|
||||
label : 'Annotation / Notes',
|
||||
name : 'annotation',
|
||||
type : 'text',
|
||||
@@ -87,65 +61,47 @@ define(['utils/utils', 'mvc/tool/tool-form-base'],
|
||||
help : 'Add an annotation or note for this step. It will be shown with the workflow.',
|
||||
value : this.node.annotation
|
||||
}
|
||||
|
||||
// get first output id
|
||||
var output_id = this.node.output_terminals && Object.keys(this.node.output_terminals)[0];
|
||||
if (output_id) {
|
||||
// send email on job completion
|
||||
inputs[Utils.uid()] = {
|
||||
var output_id = this.node.output_terminals && Object.keys( this.node.output_terminals )[ 0 ];
|
||||
if ( output_id ) {
|
||||
inputs[ Utils.uid() ] = {
|
||||
name : 'pja__' + output_id + '__EmailAction',
|
||||
label : 'Email notification',
|
||||
type : 'boolean',
|
||||
value : String(Boolean(this.post_job_actions['EmailAction' + output_id])),
|
||||
value : String( Boolean( this.post_job_actions[ 'EmailAction' + output_id ] ) ),
|
||||
ignore : 'false',
|
||||
help : 'An email notification will be sent when the job has completed.',
|
||||
payload : {
|
||||
'host' : window.location.host
|
||||
}
|
||||
};
|
||||
|
||||
// delete non-output files
|
||||
inputs[Utils.uid()] = {
|
||||
inputs[ Utils.uid() ] = {
|
||||
name : 'pja__' + output_id + '__DeleteIntermediatesAction',
|
||||
label : 'Output cleanup',
|
||||
type : 'boolean',
|
||||
value : String(Boolean(this.post_job_actions['DeleteIntermediatesAction' + output_id])),
|
||||
value : String( Boolean( this.post_job_actions[ 'DeleteIntermediatesAction' + output_id ] ) ),
|
||||
ignore : 'false',
|
||||
help : 'Delete intermediate outputs if they are not used as input for another job.'
|
||||
};
|
||||
|
||||
// add output specific actions
|
||||
for (var i in this.node.output_terminals) {
|
||||
inputs[Utils.uid()] = this._makeSection(i, datatypes);
|
||||
for ( var i in this.node.output_terminals ) {
|
||||
inputs[ Utils.uid() ] = this._makeSection( i, datatypes );
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/** Builds sub section with step actions/annotation
|
||||
*/
|
||||
_makeSection: function(output_id, datatypes){
|
||||
// format datatypes
|
||||
/** Builds sub section with step actions/annotation */
|
||||
_makeSection: function( output_id, datatypes ){
|
||||
var self = this;
|
||||
var extensions = [];
|
||||
var input_terminal_names = [];
|
||||
|
||||
for (key in datatypes) {
|
||||
extensions.push({
|
||||
0 : datatypes[key],
|
||||
1 : datatypes[key]
|
||||
});
|
||||
for ( key in datatypes ) {
|
||||
extensions.push( { 0 : datatypes[ key ], 1 : datatypes[ key ] } );
|
||||
}
|
||||
|
||||
for (key in this.node.input_terminals){
|
||||
input_terminal_names.push(this.node.input_terminals[key].name);
|
||||
for ( key in this.node.input_terminals ){
|
||||
input_terminal_names.push( this.node.input_terminals[ key ].name );
|
||||
}
|
||||
|
||||
// sort extensions
|
||||
extensions.sort(function(a, b) {
|
||||
extensions.sort( function( a, b ) {
|
||||
return a.label > b.label ? 1 : a.label < b.label ? -1 : 0;
|
||||
});
|
||||
|
||||
// add additional options
|
||||
extensions.unshift({
|
||||
0 : 'Sequences',
|
||||
1 : 'Sequences'
|
||||
@@ -158,8 +114,6 @@ define(['utils/utils', 'mvc/tool/tool-form-base'],
|
||||
0 : 'Leave unchanged',
|
||||
1 : '__empty__'
|
||||
});
|
||||
|
||||
// create custom sub section
|
||||
var input_config = {
|
||||
title : 'Configure Output: \'' + output_id + '\'',
|
||||
type : 'section',
|
||||
@@ -242,53 +196,40 @@ define(['utils/utils', 'mvc/tool/tool-form-base'],
|
||||
};
|
||||
|
||||
// visit input nodes and enrich by name/value pairs from server data
|
||||
function visit (head, head_list) {
|
||||
function visit ( head, head_list ) {
|
||||
head_list = head_list || [];
|
||||
head_list.push(head);
|
||||
for (var i in head.inputs) {
|
||||
var input = head.inputs[i];
|
||||
head_list.push( head );
|
||||
for ( var i in head.inputs ) {
|
||||
var input = head.inputs[ i ];
|
||||
var action = input.action;
|
||||
if (action) {
|
||||
// construct identifier as expected by backend
|
||||
if ( action ) {
|
||||
input.name = 'pja__' + output_id + '__' + input.action;
|
||||
if (input.pja_arg) {
|
||||
if ( input.pja_arg ) {
|
||||
input.name += '__' + input.pja_arg;
|
||||
}
|
||||
|
||||
// modify names of payload arguments
|
||||
if (input.payload) {
|
||||
for (var p_id in input.payload) {
|
||||
var p = input.payload[p_id];
|
||||
input.payload[input.name + '__' + p_id] = p;
|
||||
if ( input.payload ) {
|
||||
for ( var p_id in input.payload ) {
|
||||
var p = input.payload[ p_id ];
|
||||
input.payload[ input.name + '__' + p_id ] = p;
|
||||
delete p;
|
||||
}
|
||||
}
|
||||
|
||||
// access/verify existence of value
|
||||
var d = self.post_job_actions[input.action + output_id];
|
||||
if (d) {
|
||||
// mark as expanded
|
||||
for (var j in head_list) {
|
||||
head_list[j].expanded = true;
|
||||
var d = self.post_job_actions[ input.action + output_id ];
|
||||
if ( d ) {
|
||||
for ( var j in head_list ) {
|
||||
head_list[ j ].expanded = true;
|
||||
}
|
||||
|
||||
// update input field value
|
||||
if (input.pja_arg) {
|
||||
input.value = d.action_arguments && d.action_arguments[input.pja_arg] || input.value;
|
||||
if ( input.pja_arg ) {
|
||||
input.value = d.action_arguments && d.action_arguments[ input.pja_arg ] || input.value;
|
||||
} else {
|
||||
input.value = 'true';
|
||||
}
|
||||
}
|
||||
}
|
||||
// continue with sub section
|
||||
if (input.inputs) {
|
||||
visit(input, head_list.slice(0));
|
||||
}
|
||||
input.inputs && visit( input, head_list.slice( 0 ) );
|
||||
}
|
||||
}
|
||||
visit(input_config);
|
||||
|
||||
// return final configuration
|
||||
visit( input_config );
|
||||
return input_config;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
/**
|
||||
This is the regular tool form.
|
||||
*/
|
||||
/* This is the regular tool form */
|
||||
define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-modal', 'mvc/tool/tool-form-base' ],
|
||||
function( Utils, Ui, Modal, ToolFormBase ) {
|
||||
var View = ToolFormBase.extend({
|
||||
var View = Backbone.View.extend({
|
||||
initialize: function( options ) {
|
||||
var self = this;
|
||||
options.listen_to_history = true;
|
||||
options.always_refresh = false;
|
||||
this.modal = parent.Galaxy.modal || new Modal.View();
|
||||
ToolFormBase.prototype.initialize.call( this, Utils.merge({
|
||||
customize: function( options ) {
|
||||
this.form = new ToolFormBase( Utils.merge({
|
||||
listen_to_history : true,
|
||||
always_refresh : false,
|
||||
customize : function( options ) {
|
||||
// build execute button
|
||||
options.buttons = {
|
||||
execute: execute_btn = new Ui.Button({
|
||||
@@ -21,10 +19,10 @@ define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-modal', 'mvc/tool/tool-form
|
||||
floating : 'clear',
|
||||
onclick : function() {
|
||||
execute_btn.wait();
|
||||
self.portlet.disable();
|
||||
self.form.portlet.disable();
|
||||
self.submit( options, function() {
|
||||
execute_btn.unwait();
|
||||
self.portlet.enable();
|
||||
self.form.portlet.enable();
|
||||
} );
|
||||
}
|
||||
})
|
||||
@@ -44,6 +42,9 @@ define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-modal', 'mvc/tool/tool-form
|
||||
}
|
||||
}
|
||||
}, options ) );
|
||||
this.deferred = this.form.deferred;
|
||||
this.setElement( '<div/>' );
|
||||
this.$el.append( this.form.$el );
|
||||
},
|
||||
|
||||
/** Submit a regular job.
|
||||
@@ -55,9 +56,9 @@ define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-modal', 'mvc/tool/tool-form
|
||||
var job_def = {
|
||||
tool_id : options.id,
|
||||
tool_version : options.version,
|
||||
inputs : this.data.create()
|
||||
inputs : this.form.data.create()
|
||||
}
|
||||
this.trigger( 'reset' );
|
||||
this.form.trigger( 'reset' );
|
||||
if ( !self.validate( job_def ) ) {
|
||||
Galaxy.emit.debug( 'tool-form::submit()', 'Submission canceled. Validation failed.' );
|
||||
callback && callback();
|
||||
@@ -86,9 +87,9 @@ define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-modal', 'mvc/tool/tool-form
|
||||
Galaxy.emit.debug( 'tool-form::submit', 'Submission failed.', response );
|
||||
var input_found = false;
|
||||
if ( response && response.err_data ) {
|
||||
var error_messages = self.data.matchResponse( response.err_data );
|
||||
var error_messages = self.form.data.matchResponse( response.err_data );
|
||||
for (var input_id in error_messages) {
|
||||
self.highlight( input_id, error_messages[ input_id ]);
|
||||
self.form.highlight( input_id, error_messages[ input_id ]);
|
||||
input_found = true;
|
||||
break;
|
||||
}
|
||||
@@ -97,11 +98,7 @@ define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-modal', 'mvc/tool/tool-form
|
||||
self.modal.show({
|
||||
title : 'Job submission failed',
|
||||
body : ( response && response.err_msg ) || self._templateError( job_def ),
|
||||
buttons : {
|
||||
'Close' : function() {
|
||||
self.modal.hide();
|
||||
}
|
||||
}
|
||||
buttons : { 'Close' : function() { self.modal.hide() } }
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -117,15 +114,15 @@ define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-modal', 'mvc/tool/tool-form
|
||||
var batch_src = null;
|
||||
for ( var job_input_id in job_inputs ) {
|
||||
var input_value = job_inputs[ job_input_id ];
|
||||
var input_id = this.data.match( job_input_id );
|
||||
var input_field = this.field_list[ input_id ];
|
||||
var input_def = this.input_list[ input_id ];
|
||||
var input_id = this.form.data.match( job_input_id );
|
||||
var input_field = this.form.field_list[ input_id ];
|
||||
var input_def = this.form.input_list[ input_id ];
|
||||
if ( !input_id || !input_def || !input_field ) {
|
||||
Galaxy.emit.debug('tool-form::validate()', 'Retrieving input objects failed.');
|
||||
continue;
|
||||
}
|
||||
if ( !input_def.optional && input_value == null ) {
|
||||
this.highlight( input_id );
|
||||
this.form.highlight( input_id );
|
||||
return false;
|
||||
}
|
||||
if ( input_value && input_value.batch ) {
|
||||
@@ -135,14 +132,14 @@ define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-modal', 'mvc/tool/tool-form
|
||||
if ( batch_src === null ) {
|
||||
batch_src = src;
|
||||
} else if ( batch_src !== src ) {
|
||||
this.highlight( input_id, 'Please select either dataset or dataset list fields for all batch mode fields.' );
|
||||
this.form.highlight( input_id, 'Please select either dataset or dataset list fields for all batch mode fields.' );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if ( batch_n === -1 ) {
|
||||
batch_n = n;
|
||||
} else if ( batch_n !== n ) {
|
||||
this.highlight( input_id, 'Please make sure that you select the same number of inputs for all batch mode fields. This field contains <b>' + n + '</b> selection(s) while a previous field contains <b>' + batch_n + '</b>.' );
|
||||
this.form.highlight( input_id, 'Please make sure that you select the same number of inputs for all batch mode fields. This field contains <b>' + n + '</b> selection(s) while a previous field contains <b>' + batch_n + '</b>.' );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -155,7 +152,7 @@ define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-modal', 'mvc/tool/tool-form
|
||||
var njobs = response.jobs.length;
|
||||
var njobs_text = njobs == 1 ? '1 job has' : njobs + ' jobs have';
|
||||
var $message = $( '<div/>' ).addClass( 'donemessagelarge' )
|
||||
.append( $( '<p/>' ).text( njobs_text + ' been successfully added to the queue - resulting in the following datasets:' ) );
|
||||
.append( $( '<p/>' ).text( njobs_text + ' been successfully added to the queue - resulting in the following datasets:' ) );
|
||||
_.each( response.outputs, function( output ) {
|
||||
$message.append( $( '<p/>' ).addClass( 'messagerow' ).append( $( '<b/>' ).text( output.hid + ': ' + output.name ) ) );
|
||||
});
|
||||
@@ -168,8 +165,8 @@ define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-modal', 'mvc/tool/tool-form
|
||||
|
||||
_templateError: function( response ) {
|
||||
return $( '<div/>' ).addClass( 'errormessagelarge' )
|
||||
.append( $( '<p/>' ).text( 'The server could not complete the request. Please contact the Galaxy Team if this error persists.' ) )
|
||||
.append( $( '<pre/>' ).text( JSON.stringify( response, null, 4 ) ) );
|
||||
.append( $( '<p/>' ).text( 'The server could not complete the request. Please contact the Galaxy Team if this error persists.' ) )
|
||||
.append( $( '<pre/>' ).text( JSON.stringify( response, null, 4 ) ) );
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ var View = Backbone.View.extend({
|
||||
this.$title_icon = this.$( '.portlet-title-icon' );
|
||||
this.$header = this.$( '.portlet-header' );
|
||||
this.$content = this.$( '.portlet-content' );
|
||||
this.$footer = this.$( '.portlet-footer' );
|
||||
this.$backdrop = this.$( '.portlet-backdrop' );
|
||||
this.$buttons = this.$( '.portlet-buttons' );
|
||||
this.$operations = this.$( '.portlet-operations' );
|
||||
@@ -112,11 +111,6 @@ var View = Backbone.View.extend({
|
||||
return this.$body;
|
||||
},
|
||||
|
||||
/** Return footer element */
|
||||
footer: function() {
|
||||
return this.$footer;
|
||||
},
|
||||
|
||||
/** Show portlet */
|
||||
show: function(){
|
||||
this.visible = true;
|
||||
@@ -165,7 +159,6 @@ var View = Backbone.View.extend({
|
||||
this.collapsed = true;
|
||||
this.$content.height( '0%' );
|
||||
this.$body.hide();
|
||||
this.$footer.hide();
|
||||
this.collapsible_button.setIcon( 'fa-eye-slash' );
|
||||
},
|
||||
|
||||
@@ -174,7 +167,6 @@ var View = Backbone.View.extend({
|
||||
this.collapsed = false;
|
||||
this.$content.height( '100%' );
|
||||
this.$body.fadeIn( 'fast' );
|
||||
this.$footer.fadeIn( 'fast' );
|
||||
this.collapsible_button.setIcon( 'fa-eye' );
|
||||
},
|
||||
|
||||
@@ -197,7 +189,6 @@ var View = Backbone.View.extend({
|
||||
.append( $( '<div/>' ).addClass( 'portlet-content' )
|
||||
.append( $( '<div/>' ).addClass( 'portlet-body' ) )
|
||||
.append( $( '<div/>' ).addClass( 'portlet-buttons' ) ) )
|
||||
.append( $( '<div/>' ).addClass( 'portlet-footer' ) )
|
||||
.append( $( '<div/>' ).addClass( 'portlet-backdrop' ) );
|
||||
}
|
||||
});
|
||||
|
||||
@@ -190,7 +190,7 @@ var View = Backbone.View.extend({
|
||||
var button_width = 0;
|
||||
if ( this.fields.length > 1 ) {
|
||||
this.$el.append( this.button_type.$el );
|
||||
button_width = Math.max( 0, this.fields.length * 35 ) + 'px';
|
||||
button_width = Math.max( 0, this.fields.length * 36 ) + 'px';
|
||||
}
|
||||
_.each( this.fields, function( field ) {
|
||||
self.$el.append( field.$el.css( { 'margin-left': button_width } ) );
|
||||
|
||||
@@ -105,8 +105,8 @@ function get (options) {
|
||||
top.__utils__get__[cache_key] = response;
|
||||
options.success && options.success(response);
|
||||
},
|
||||
error : function(response) {
|
||||
options.error && options.error(response);
|
||||
error : function(response, status) {
|
||||
options.error && options.error(response, status);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -159,7 +159,7 @@ function request (options) {
|
||||
} catch (e) {
|
||||
response_text = response.responseText;
|
||||
}
|
||||
options.error && options.error(response_text, response);
|
||||
options.error && options.error(response_text, response.status);
|
||||
}).always(function() {
|
||||
options.complete && options.complete();
|
||||
});
|
||||
|
||||
@@ -299,6 +299,7 @@
|
||||
margin-top: @ui-margin-vertical;
|
||||
border-color: transparent !important;
|
||||
box-shadow: none !important;
|
||||
height: auto !important;
|
||||
}
|
||||
}
|
||||
.ui-form-element-disabled {
|
||||
@@ -435,11 +436,6 @@
|
||||
.portlet-content.nopadding, .portlet-body.nopadding {
|
||||
padding: 0px;
|
||||
}
|
||||
.portlet-footer {
|
||||
margin-top: 5px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.portlet-backdrop {
|
||||
display: none;
|
||||
z-index: 10;
|
||||
@@ -473,9 +469,6 @@
|
||||
.portlet-content {
|
||||
padding-right: 0px;
|
||||
}
|
||||
.portlet-footer {
|
||||
margin-top: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.ui-portlet-panel {
|
||||
@@ -498,6 +491,7 @@
|
||||
.ui-portlet-narrow {
|
||||
&:extend(.ui-portlet-limited all);
|
||||
border: none;
|
||||
margin-bottom: @ui-margin-vertical-large;
|
||||
.portlet-header {
|
||||
border-radius: @border-radius-base;
|
||||
.portlet-operations {
|
||||
|
||||
@@ -14,15 +14,15 @@ from galaxy import util
|
||||
from galaxy import exceptions
|
||||
from galaxy.model.item_attrs import UsesAnnotations
|
||||
from galaxy.workflow import modules
|
||||
|
||||
from .base import decode_id
|
||||
|
||||
# For WorkflowContentManager
|
||||
from galaxy.util.sanitize_html import sanitize_html
|
||||
from galaxy.workflow.steps import attach_ordered_steps
|
||||
from galaxy.workflow.modules import module_factory, is_tool_module_type, ToolModule
|
||||
from galaxy.tools.parameters.basic import DataToolParameter, DataCollectionToolParameter
|
||||
from galaxy.tools.parameters import visit_input_values
|
||||
from galaxy.workflow.modules import module_factory, is_tool_module_type, ToolModule, WorkflowModuleInjector, MissingToolException
|
||||
from galaxy.tools.parameters.basic import DataToolParameter, DataCollectionToolParameter, workflow_building_modes
|
||||
from galaxy.tools.parameters import visit_input_values, params_to_incoming
|
||||
from galaxy.jobs.actions.post import ActionBox
|
||||
from galaxy.web import url_for
|
||||
|
||||
log = logging.getLogger( __name__ )
|
||||
@@ -334,9 +334,81 @@ class WorkflowContentsManager(UsesAnnotations):
|
||||
return self._workflow_to_dict_instance( stored, legacy=True )
|
||||
elif style == "instance":
|
||||
return self._workflow_to_dict_instance( stored, legacy=False )
|
||||
elif style == "run":
|
||||
return self._workflow_to_dict_run( trans, stored )
|
||||
else:
|
||||
return self._workflow_to_dict_export( trans, stored )
|
||||
|
||||
def _workflow_to_dict_run( self, trans, stored ):
|
||||
"""
|
||||
Builds workflow dictionary used by run workflow form
|
||||
"""
|
||||
workflow = stored.latest_workflow
|
||||
trans.workflow_building_mode = workflow_building_modes.USE_HISTORY
|
||||
module_injector = WorkflowModuleInjector( trans )
|
||||
has_upgrade_messages = False
|
||||
step_version_changes = []
|
||||
missing_tools = []
|
||||
errors = {}
|
||||
for step in workflow.steps:
|
||||
try:
|
||||
module_injector.inject( step, steps=workflow.steps )
|
||||
except MissingToolException:
|
||||
if step.tool_id not in missing_tools:
|
||||
missing_tools.append( step.tool_id )
|
||||
continue
|
||||
if step.upgrade_messages:
|
||||
has_upgrade_messages = True
|
||||
if step.type == 'tool' or step.type is None:
|
||||
if step.module.version_changes:
|
||||
step_version_changes.extend( step.module.version_changes )
|
||||
if step.tool_errors:
|
||||
errors[ step.id ] = step.tool_errors
|
||||
if missing_tools:
|
||||
workflow.annotation = self.get_item_annotation_str( trans.sa_session, trans.user, workflow )
|
||||
raise exceptions.MessageException( 'Following tools missing: %s' % missing_tools )
|
||||
workflow.annotation = self.get_item_annotation_str( trans.sa_session, trans.user, workflow )
|
||||
step_models = []
|
||||
for i, step in enumerate( workflow.steps ):
|
||||
step_model = None
|
||||
if step.type == 'tool':
|
||||
incoming = {}
|
||||
tool = trans.app.toolbox.get_tool( step.tool_id )
|
||||
params_to_incoming( incoming, tool.inputs, step.state.inputs, trans.app )
|
||||
step_model = tool.to_json( trans, incoming, workflow_building_mode=workflow_building_modes.USE_HISTORY )
|
||||
step_model[ 'post_job_actions' ] = [{
|
||||
'short_str' : ActionBox.get_short_str( pja ),
|
||||
'action_type' : pja.action_type,
|
||||
'output_name' : pja.output_name,
|
||||
'action_arguments' : pja.action_arguments
|
||||
} for pja in step.post_job_actions ]
|
||||
else:
|
||||
inputs = step.module.get_runtime_inputs( connections=step.output_connections )
|
||||
step_model = {
|
||||
'name' : step.module.name,
|
||||
'inputs' : [ input.to_dict( trans ) for input in inputs.itervalues() ]
|
||||
}
|
||||
step_model[ 'step_id' ] = step.id
|
||||
step_model[ 'step_type' ] = step.type
|
||||
step_model[ 'output_connections' ] = [ {
|
||||
'input_step_id' : oc.input_step_id,
|
||||
'output_step_id' : oc.output_step_id,
|
||||
'input_name' : oc.input_name,
|
||||
'output_name' : oc.output_name
|
||||
} for oc in step.output_connections ]
|
||||
if step.annotations:
|
||||
step_model[ 'annotation' ] = step.annotations[ 0 ].annotation
|
||||
if step.upgrade_messages:
|
||||
step_model[ 'messages' ] = step.upgrade_messages
|
||||
step_models.append( step_model )
|
||||
return {
|
||||
'id' : trans.app.security.encode_id( stored.id ),
|
||||
'name' : stored.name,
|
||||
'steps' : step_models,
|
||||
'step_version_changes' : step_version_changes,
|
||||
'has_upgrade_messages' : has_upgrade_messages
|
||||
}
|
||||
|
||||
def _workflow_to_dict_editor(self, trans, stored):
|
||||
"""
|
||||
"""
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -49,9 +49,8 @@ class Group( object, Dictifiable ):
|
||||
"""
|
||||
raise TypeError( "Not implemented" )
|
||||
|
||||
def to_dict( self, trans, view='collection', value_mapper=None ):
|
||||
# TODO: need to to_dict conditions.
|
||||
group_dict = super( Group, self ).to_dict( view=view, value_mapper=value_mapper )
|
||||
def to_dict( self, trans ):
|
||||
group_dict = super( Group, self ).to_dict()
|
||||
return group_dict
|
||||
|
||||
|
||||
@@ -120,11 +119,11 @@ class Repeat( Group ):
|
||||
rval.append( rval_dict )
|
||||
return rval
|
||||
|
||||
def to_dict( self, trans, view='collection', value_mapper=None ):
|
||||
repeat_dict = super( Repeat, self ).to_dict( trans, view=view, value_mapper=value_mapper )
|
||||
def to_dict( self, trans ):
|
||||
repeat_dict = super( Repeat, self ).to_dict( trans )
|
||||
|
||||
def input_to_dict( input ):
|
||||
return input.to_dict( trans, view=view, value_mapper=value_mapper )
|
||||
return input.to_dict( trans )
|
||||
|
||||
repeat_dict[ "inputs" ] = map( input_to_dict, self.inputs.values() )
|
||||
return repeat_dict
|
||||
@@ -173,11 +172,11 @@ class Section( Group ):
|
||||
rval[ child_input.name ] = child_input.get_initial_value( trans, child_context )
|
||||
return rval
|
||||
|
||||
def to_dict( self, trans, view='collection', value_mapper=None ):
|
||||
section_dict = super( Section, self ).to_dict( trans, view=view, value_mapper=value_mapper )
|
||||
def to_dict( self, trans ):
|
||||
section_dict = super( Section, self ).to_dict( trans )
|
||||
|
||||
def input_to_dict( input ):
|
||||
return input.to_dict( trans, view=view, value_mapper=value_mapper )
|
||||
return input.to_dict( trans )
|
||||
|
||||
section_dict[ "inputs" ] = map( input_to_dict, self.inputs.values() )
|
||||
return section_dict
|
||||
@@ -586,11 +585,11 @@ class Conditional( Group ):
|
||||
rval[ child_input.name ] = child_input.get_initial_value( trans, child_context )
|
||||
return rval
|
||||
|
||||
def to_dict( self, trans, view='collection', value_mapper=None ):
|
||||
cond_dict = super( Conditional, self ).to_dict( trans, view=view, value_mapper=value_mapper )
|
||||
def to_dict( self, trans ):
|
||||
cond_dict = super( Conditional, self ).to_dict( trans )
|
||||
|
||||
def nested_to_dict( input ):
|
||||
return input.to_dict( trans, view=view, value_mapper=value_mapper )
|
||||
return input.to_dict( trans )
|
||||
|
||||
cond_dict[ "cases" ] = map( nested_to_dict, self.cases )
|
||||
cond_dict[ "test_param" ] = nested_to_dict( self.test_param )
|
||||
@@ -604,11 +603,11 @@ class ConditionalWhen( object, Dictifiable ):
|
||||
self.value = None
|
||||
self.inputs = None
|
||||
|
||||
def to_dict( self, trans, view='collection', value_mapper=None ):
|
||||
when_dict = super( ConditionalWhen, self ).to_dict( view=view, value_mapper=value_mapper )
|
||||
def to_dict( self, trans ):
|
||||
when_dict = super( ConditionalWhen, self ).to_dict()
|
||||
|
||||
def input_to_dict( input ):
|
||||
return input.to_dict( trans, view=view, value_mapper=value_mapper )
|
||||
return input.to_dict( trans )
|
||||
|
||||
when_dict[ "inputs" ] = map( input_to_dict, self.inputs.values() )
|
||||
return when_dict
|
||||
|
||||
@@ -527,7 +527,7 @@ class WorkflowsAPIController(BaseAPIController, UsesStoredWorkflowMixin, UsesAnn
|
||||
|
||||
:raises: exceptions.MessageException, exceptions.ObjectNotFound
|
||||
"""
|
||||
stored_workflow = self.__get_stored_workflow(trans, workflow_id)
|
||||
stored_workflow = self.__get_stored_workflow( trans, workflow_id )
|
||||
results = self.workflow_manager.build_invocations_query( trans, stored_workflow.id )
|
||||
out = []
|
||||
for r in results:
|
||||
|
||||
@@ -15,7 +15,8 @@ from tool_shed.util import encoding_util
|
||||
from galaxy import model
|
||||
from galaxy import util
|
||||
from galaxy import web
|
||||
from galaxy.managers import workflows
|
||||
from galaxy import exceptions
|
||||
from galaxy.managers import workflows, histories
|
||||
from galaxy.model.item_attrs import UsesItemRatings
|
||||
from galaxy.model.mapping import desc
|
||||
from galaxy.util import unicodify, FILENAME_VALID_CHARS
|
||||
@@ -26,13 +27,9 @@ from galaxy.web.framework.formbuilder import form
|
||||
from galaxy.web.framework.helpers import grids, time_ago, to_unicode
|
||||
from galaxy.workflow.extract import extract_workflow
|
||||
from galaxy.workflow.extract import summarize
|
||||
from galaxy.workflow.modules import MissingToolException
|
||||
from galaxy.workflow.modules import module_factory
|
||||
from galaxy.workflow.modules import WorkflowModuleInjector
|
||||
from galaxy.workflow.render import WorkflowCanvas, STANDALONE_SVG_TEMPLATE
|
||||
from galaxy.workflow.run import invoke
|
||||
from galaxy.workflow.run import WorkflowRunConfig
|
||||
from galaxy.tools.parameters.basic import workflow_building_modes
|
||||
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
@@ -1026,154 +1023,24 @@ class WorkflowController( BaseUIController, SharableMixin, UsesStoredWorkflowMix
|
||||
url_for( controller='workflow', action='run', id=workflow_id ) ) )
|
||||
|
||||
@web.expose
|
||||
def run( self, trans, id, history_id=None, hide_fixed_params=False, **kwargs ):
|
||||
stored = self.get_stored_workflow( trans, id, check_ownership=False )
|
||||
user = trans.get_user()
|
||||
if stored.user != user:
|
||||
if trans.sa_session.query( model.StoredWorkflowUserShareAssociation ) \
|
||||
.filter_by( user=user, stored_workflow=stored ).count() == 0:
|
||||
error( "Workflow is not owned by or shared with current user" )
|
||||
# Get the latest revision
|
||||
workflow = stored.latest_workflow
|
||||
# It is possible for a workflow to have 0 steps
|
||||
if len( workflow.steps ) == 0:
|
||||
error( "Workflow cannot be run because it does not have any steps" )
|
||||
if workflow.has_cycles:
|
||||
error( "Workflow cannot be run because it contains cycles" )
|
||||
if workflow.has_errors:
|
||||
error( "Workflow cannot be run because of validation errors in some steps" )
|
||||
# Build the state for each step
|
||||
errors = {}
|
||||
has_upgrade_messages = False
|
||||
step_version_changes = []
|
||||
# has_errors is never used
|
||||
# has_errors = False
|
||||
saved_history = None
|
||||
if history_id is not None:
|
||||
saved_history = trans.get_history()
|
||||
try:
|
||||
decoded_history_id = trans.security.decode_id( history_id )
|
||||
history = trans.sa_session.query(trans.app.model.History).get(decoded_history_id)
|
||||
if history.user != trans.user and not trans.user_is_admin():
|
||||
if trans.sa_session.query(trans.app.model.HistoryUserShareAssociation).filter_by(user=trans.user, history=history).count() == 0:
|
||||
error("History is not owned by or shared with current user")
|
||||
trans.set_history(history)
|
||||
except TypeError:
|
||||
error("Malformed history id ( %s ) specified, unable to decode." % str( history_id ))
|
||||
except:
|
||||
error("That history does not exist.")
|
||||
try: # use a try/finally block to restore the user's current history
|
||||
default_target_history = trans.get_history()
|
||||
module_injector = WorkflowModuleInjector( trans )
|
||||
scheduled = True
|
||||
if kwargs:
|
||||
# If kwargs were provided, the states for each step should have
|
||||
# been POSTed
|
||||
# List to gather values for the template
|
||||
invocations = []
|
||||
for (kwargs, multi_input_keys) in _expand_multiple_inputs(kwargs):
|
||||
for step in workflow.steps:
|
||||
# Extract just the arguments for this step by prefix
|
||||
p = "%s|" % step.id
|
||||
l = len(p)
|
||||
step_args = dict( ( k[l:], v ) for ( k, v ) in kwargs.iteritems() if k.startswith( p ) )
|
||||
step_errors = module_injector.inject( step, step_args )
|
||||
if step.upgrade_messages:
|
||||
has_upgrade_messages = True
|
||||
if step_errors:
|
||||
errors[step.id] = step.state.inputs["__errors__"] = step_errors
|
||||
if 'run_workflow' in kwargs and not errors:
|
||||
new_history = None
|
||||
if 'new_history' in kwargs:
|
||||
if 'new_history_name' in kwargs and kwargs['new_history_name'] != '':
|
||||
nh_name = kwargs['new_history_name']
|
||||
else:
|
||||
nh_name = "History from %s workflow" % workflow.name
|
||||
instance_inputs = [kwargs[multi_input_key] for multi_input_key in multi_input_keys]
|
||||
instance_ds_names = [trans.sa_session.query( trans.app.model.HistoryDatasetAssociation ).get( instance_input ).name
|
||||
for instance_input in instance_inputs]
|
||||
nh_name = '%s%s' % (nh_name, _build_workflow_on_str( instance_ds_names ))
|
||||
new_history = trans.app.model.History( user=trans.user, name=nh_name )
|
||||
new_history.copy_tags_from(trans.user, trans.get_history())
|
||||
trans.sa_session.add( new_history )
|
||||
target_history = new_history
|
||||
else:
|
||||
target_history = default_target_history
|
||||
|
||||
# Build replacement dict for this workflow execution.
|
||||
replacement_dict = {}
|
||||
for k, v in kwargs.iteritems():
|
||||
if k.startswith('wf_parm|'):
|
||||
replacement_dict[k[8:]] = v
|
||||
|
||||
run_config = WorkflowRunConfig(
|
||||
target_history=target_history,
|
||||
replacement_dict=replacement_dict,
|
||||
copy_inputs_to_history=new_history is not None
|
||||
)
|
||||
|
||||
outputs, invocation = invoke(
|
||||
trans=trans,
|
||||
workflow=workflow,
|
||||
workflow_run_config=run_config
|
||||
)
|
||||
invocation_state = invocation.state
|
||||
# Just use last invocation - right now not really
|
||||
# possible to have some invocations scheduled and not
|
||||
# others.
|
||||
scheduled = invocation_state == model.WorkflowInvocation.states.SCHEDULED
|
||||
invocations.append({'outputs': outputs,
|
||||
'new_history': new_history})
|
||||
trans.sa_session.flush()
|
||||
if invocations:
|
||||
return trans.fill_template( "workflow/run_complete.mako",
|
||||
workflow=stored,
|
||||
scheduled=scheduled,
|
||||
invocations=invocations )
|
||||
def run( self, trans, id, history_id=None, **kwargs ):
|
||||
history = None
|
||||
try:
|
||||
if history_id is not None:
|
||||
history_manager = histories.HistoryManager( trans.app )
|
||||
history = history_manager.get_owned( trans.security.decode_id( history_id ), trans.user, current_history=trans.history )
|
||||
else:
|
||||
# Prepare each step
|
||||
missing_tools = []
|
||||
trans.workflow_building_mode = workflow_building_modes.USE_HISTORY
|
||||
for step in workflow.steps:
|
||||
try:
|
||||
module_injector.inject( step, steps=workflow.steps )
|
||||
except MissingToolException:
|
||||
if step.tool_id not in missing_tools:
|
||||
missing_tools.append(step.tool_id)
|
||||
continue
|
||||
if step.upgrade_messages:
|
||||
has_upgrade_messages = True
|
||||
if step.type == 'tool' or step.type is None:
|
||||
if step.module.version_changes:
|
||||
step_version_changes.extend(step.module.version_changes)
|
||||
# Error dict
|
||||
if step.tool_errors:
|
||||
errors[step.id] = step.tool_errors
|
||||
if missing_tools:
|
||||
stored.annotation = self.get_item_annotation_str( trans.sa_session, trans.user, stored )
|
||||
return trans.fill_template(
|
||||
"workflow/missing_tools.mako",
|
||||
workflow=stored,
|
||||
missing_tools=missing_tools
|
||||
)
|
||||
# Render the form
|
||||
stored.annotation = self.get_item_annotation_str( trans.sa_session, trans.user, stored )
|
||||
return trans.fill_template(
|
||||
"workflow/run.mako",
|
||||
steps=workflow.steps,
|
||||
workflow=stored,
|
||||
has_upgrade_messages=has_upgrade_messages,
|
||||
step_version_changes=step_version_changes,
|
||||
errors=errors,
|
||||
incoming=kwargs,
|
||||
history_id=history_id,
|
||||
hide_fixed_params=hide_fixed_params,
|
||||
enable_unique_defaults=trans.app.config.enable_unique_workflow_defaults
|
||||
)
|
||||
finally:
|
||||
# restore the active history
|
||||
if saved_history is not None:
|
||||
trans.set_history(saved_history)
|
||||
history = trans.get_history()
|
||||
if history is None:
|
||||
raise exceptions.MessageException( 'History unavailable. Please specify a valid history id' )
|
||||
except Exception as e:
|
||||
raise exceptions.MessageException( '[history_id=%s] Failed to retrieve history. %s.' % ( history_id, str( e ) ) )
|
||||
trans.history = history
|
||||
workflow_manager = workflows.WorkflowsManager( trans.app )
|
||||
workflow_contents_manager = workflows.WorkflowContentsManager( trans.app )
|
||||
stored = workflow_manager.get_stored_accessible_workflow( trans, id )
|
||||
workflow_dict = workflow_contents_manager.workflow_to_dict( trans, stored, style='run' )
|
||||
return trans.fill_template( 'workflow/run.mako', workflow_dict=workflow_dict )
|
||||
|
||||
def get_item( self, trans, id ):
|
||||
return self.get_stored_workflow( trans, id )
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"version":3,"file":"tool-form-workflow.js","sources":["../../../src/mvc/tool/tool-form-workflow.js"],"names":["define","Utils","ToolFormBase","View","extend","initialize","options","self","this","workflow","node","post_job_actions","merge","text_enable","text_disable","narrow","initial_errors","sustain_version","cls","update_url","Galaxy","root","update","data","update_field_data","errors","tool_model","deepeach","inputs","input","type","indexOf","info","name","textify","extensions","value","__class__","collapsible_value","is_workflow","length","item","test_param","undefined","_makeSections","prototype","call","emit","debug","datatypes","uid","label","area","help","annotation","output_id","output_terminals","Object","keys","String","Boolean","ignore","payload","host","window","location","i","_makeSection","visit","head","head_list","push","action","pja_arg","p_id","p","d","j","expanded","action_arguments","slice","input_terminal_names","key",1,"input_terminals","sort","a","b","unshift","input_config","title","flat","output","getWorkflowOutput","onchange","new_value","attemptUpdateOutputLabel","join"],"mappings":"AAGAA,QAAQ,cAAe,2BACnB,SAASC,EAAOC,GAGhB,GAAIC,GAAOD,EAAaE,QACpBC,WAAY,SAASC,GACjB,GAAIC,GAAOC,IAKX,OAJAA,MAAKC,SAAWH,EAAQG,SAGxBD,KAAKE,KAAOJ,EAAQI,KACfF,KAAKE,MAMVF,KAAKG,iBAAmBH,KAAKE,KAAKC,qBAGlCL,EAAUL,EAAMW,MAAMN,GAElBO,YAAkB,iBAClBC,aAAkB,iBAGlBC,QAAkB,EAClBC,gBAAkB,EAClBC,iBAAkB,EAClBC,IAAkB,oBAGlBC,WAAkBC,OAAOC,KAAO,6BAChCC,OAAkB,SAASC,GAKvBhB,EAAKG,KAAKc,kBAAkBD,GAC5BhB,EAAKkB,OAAOF,GAAQA,EAAKG,eAKjCzB,EAAM0B,SAAUrB,EAAQsB,OAAQ,SAAUC,GACjCA,EAAMC,OACqD,KAArD,OAAQ,mBAAoBC,QAASF,EAAMC,OAC9CD,EAAMC,KAAO,SACbD,EAAMG,KAAO,eAAkBH,EAAMI,KAAO,MAAShC,EAAMiC,QAASL,EAAMM,YAAe,IACzFN,E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,EACV/D,SACIuB,MAAc,QACdrB,KAAc,OACdM,OAAgBwD,OAASpF,KAAKE,KAAKmF,kBAAmBtC,KAAiBqC,OAAOzC,OAAS,GACvFE,KAAc,gGACdyC,SAAc,SAAUC,GACpBxF,EAAKE,SAASuF,yBAA0BzF,EAAKG,KAAM6C,EAAWwC,MAGlEvB,OAAc,sBACdC,QAAc,UACdtB,MAAc,iBACdrB,KAAc,OACdM,MAAc,GACdyB,OAAc,GACdR,KAAc,wLAA0L4B,EAAqBgB,KAAK,MAAQ,eAE1OzB,OAAc,uBACdC,QAAc,UACdtB,MAAc,kBACdrB,KAAc,SACd+B,OAAc,YACdzB,MAAc,YACd9B,QAAc6B,EACdkB,KAAc,+EAEdmB,OAAc,mBACdC,QAAc,OACdtB,MAAc,OACdrB,KAAc,OACdM,MAAc,GACdyB,OAAc,GACdR,KAAc,+CAEdqC,MAAU,iBACV5D,KAAU,UACV6D,MAAU,EACV/D,SACI4C,OAAc,kBACdC,QAAc,WACdtB,MAAc,eACdrB,KAAc,UACdM,MAAc,GACdyB,OAAc,KAEdW,OAAc,kBACdC,QAAc,WACdtB,MAAc,eACdrB,KAAc,UACdM,MAAc,GACdyB,OAAc,KAEdW,OAAc,kBACdC,QAAc,SACdtB,MAAc,aACdrB,KAAc,UACdM,MAAc,GACdyB,OAAc,KAEdW,OAAc,kBACdC,QAAc,YACdtB,MAAc,gBACdrB,KAAc,UACdM,MAAc,GACdyB,OAAc,KAEdW,OAAc,kBACdC,QAAc,UACdtB,MAAc,cACdrB,KAAc,UACdM,MAAc,GACdyB,OAAc,KAElBR,KAAU,6FAoDlB,OAHAe,GAAMqB,GAGCA,IAIf,QACItF,KAAMA"}
|
||||
{"version":3,"file":"tool-form-workflow.js","sources":["../../../src/mvc/tool/tool-form-workflow.js"],"names":["define","Utils","ToolFormBase","View","Backbone","extend","initialize","options","self","this","workflow","node","setElement","post_job_actions","deepeach","inputs","input","type","indexOf","info","name","textify","extensions","value","__class__","collapsible_value","is_workflow","length","test_param","undefined","_makeSections","form","merge","text_enable","text_disable","narrow","initial_errors","sustain_version","cls","update_url","Galaxy","root","update","data","update_field_data","errors","tool_model","$el","append","emit","debug","datatypes","uid","label","area","help","annotation","output_id","output_terminals","Object","keys","String","Boolean","ignore","payload","host","window","location","i","_makeSection","visit","head","head_list","push","action","pja_arg","p_id","p","d","j","expanded","action_arguments","slice","input_terminal_names","key",1,"input_terminals","sort","a","b","unshift","input_config","title","flat","output","getWorkflowOutput","onchange","new_value","attemptUpdateOutputLabel","join"],"mappings":"AACAA,QAAU,cAAe,2BACrB,SAAUC,EAAOC,GACjB,GAAIC,GAAOC,SAASD,KAAKE,QACrBC,WAAY,SAAUC,GAClB,GAAIC,GAAOC,IACXA,MAAKC,SAAWH,EAAQG,SACxBD,KAAKE,KAAWJ,EAAQI,KACxBF,KAAKG,WAAY,UACZH,KAAKE,MACNF,KAAKI,iBAAmBJ,KAAKE,KAAKE,qBAClCZ,EAAMa,SAAUP,EAAQQ,OAAQ,SAAUC,GACjCA,EAAMC,OACqD,KAArD,OAAQ,mBAAoBC,QAASF,EAAMC,OAC9CD,EAAMC,KAAO,SACbD,EAAMG,KAAO,eAAkBH,EAAMI,KAAO,MAASnB,EAAMoB,QAASL,EAAMM,YAAe,IACzFN,EAAMO,OAAUC,UAAa,kBAE7BR,EAAMS,mBAAsBD,UAAa,gBACzCR,EAAMU,YAAgBV,EAAMT,SAAmC,GAAxBS,EAAMT,QAAQoB,QACiB,KAA9C,UAAW,SAAUT,QAASF,EAAMC,UAIxEhB,EAAMa,SAAUP,EAAQQ,OAAQ,SAAUC,GACxB,eAAdA,EAAMC,OAA2BD,EAAMY,WAAWH,kBAAoBI,UAE1EpB,KAAKqB,cAAevB,GACpBE,KAAKsB,KAAO,GAAI7B,GAAcD,EAAM+B,MAAOzB,GACvC0B,YAAkB,iBAClBC,aAAkB,iBAClBC,QAAkB,EAClBC,gBAAkB,EAClBC,iBAAkB,EAClBC,IAAkB,oBAClBC,WAAkBC,OA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KAAM8C,EAAWwC,MAGlEvB,OAAc,sBACdC,QAAc,UACdtB,MAAc,iBACdpC,KAAc,OACdM,MAAc,GACdwC,OAAc,GACdR,KAAc,wLAA0L4B,EAAqBgB,KAAK,MAAQ,eAE1OzB,OAAc,uBACdC,QAAc,UACdtB,MAAc,kBACdpC,KAAc,SACd8C,OAAc,YACdxC,MAAc,YACdhB,QAAce,EACdiC,KAAc,+EAEdmB,OAAc,mBACdC,QAAc,OACdtB,MAAc,OACdpC,KAAc,OACdM,MAAc,GACdwC,OAAc,GACdR,KAAc,+CAEdqC,MAAU,iBACV3E,KAAU,UACV4E,MAAU,EACV9E,SACI2D,OAAc,kBACdC,QAAc,WACdtB,MAAc,eACdpC,KAAc,UACdM,MAAc,GACdwC,OAAc,KAEdW,OAAc,kBACdC,QAAc,WACdtB,MAAc,eACdpC,KAAc,UACdM,MAAc,GACdwC,OAAc,KAEdW,OAAc,kBACdC,QAAc,SACdtB,MAAc,aACdpC,KAAc,UACdM,MAAc,GACdwC,OAAc,KAEdW,OAAc,kBACdC,QAAc,YACdtB,MAAc,gBACdpC,KAAc,UACdM,MAAc,GACdwC,OAAc,KAEdW,OAAc,kBACdC,QAAc,UACdtB,MAAc,cACdpC,KAAc,UACdM,MAAc,GACdwC,OAAc,KAElBR,KAAU,6FAuClB,OADAe,GAAOqB,GACAA,IAIf,QACIxF,KAAMA"}
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"tool-form.js","sources":["../../../src/mvc/tool/tool-form.js"],"names":["define","Utils","Ui","Modal","ToolFormBase","View","extend","initialize","options","self","this","listen_to_history","always_refresh","modal","parent","Galaxy","prototype","call","merge","customize","buttons","execute","execute_btn","Button","icon","tooltip","name","version","title","cls","floating","onclick","wait","portlet","disable","submit","unwait","enable","job_id","job_remap","inputs","label","type","display","ignore","value","help","callback","job_def","tool_id","id","tool_version","data","create","trigger","validate","emit","debug","action","root","$f","$","attr","method","enctype","_","each","key","append","hide","appendTo","remove","request","url","success","response","$el","children","_templateSuccess","currHistoryPanel","refreshContents","error","input_found","err_data","error_messages","matchResponse","input_id","highlight","show","body","err_msg","_templateError","Close","job_inputs","batch_n","batch_src","job_input_id","input_value","match","input_field","field_list","input_def","input_list","optional","batch","n","values","length","src","jobs","njobs","njobs_text","$message","addClass","text","outputs","output","hid","JSON","stringify"],"mappings":"AAGAA,QAAS,cAAe,iBAAkB,kBAAmB,2BACzD,SAAUC,EAAOC,EAAIC,EAAOC,GAC5B,GAAIC,GAAOD,EAAaE,QACpBC,WAAY,SAAUC,GAClB,GAAIC,GAAOC,IACXF,GAAQG,mBAAoB,EAC5BH,EAAQI,gBAAiB,EACzBF,KAAKG,MAAQC,OAAOC,OAAOF,OAAS,GAAIV,GAAME,KAC9CD,EAAaY,UAAUT,WAAWU,KAAMP,KAAMT,EAAMiB,OAChDC,UAAW,SAAUX,GAEjBA,EAAQY,SACJC,QAASC,YAAc,GAAIpB,GAAGqB,QAC1BC,KAAW,WACXC,QAAW,YAAcjB,EAAQkB,KAAO,KAAOlB,EAAQmB,QAAU,IACjEC,MAAW,UACXC,IAAW,4BACXC,SAAW,QACXC,QAAW,WACPT,YAAYU,OACZvB,EAAKwB,QAAQC,UACbzB,EAAK0B,OAAQ3B,EAAS,WAClBc,YAAYc,SACZ3B,EAAKwB,QAAQI,eAMxB7B,EAAQ8B,QAAU9B,EAAQ+B,YAC3B/B,EAAQgC,OAA6B,oBACjCC,MAAc,oCACdf,KAAc,qBACdgB,KAAc,SACdC,QAAc,QACdC,OAAc,aACdC,MAAc,aACdrC,UAAkB,MAAOA,EAAQ8B,SAAY,KAAM,eACnDQ,KAAc,uLAI3BtC,KAOP2B,OAAQ,SAAU3B,EAASuC,GACvB,GAAItC,GAAOC,KACPsC,GACAC,QAAkBzC,EAAQ0C,GAC1BC,aAAkB3C,EAAQmB,QAC1Ba,OAAkB9B,KAAK0C,KAAKC,SAGhC,IADA3C,KAAK4C,QAAS,UACR7C,EAAK8C,SAAUP,GAGjB,MAFAjC,QAAO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WoD,SAAU,qBAC3B7C,OAAQP,EAAG,QAASqD,KAAM,sGAC1B9C,OAAQP,EAAG,UAAWqD,KAAMI,KAAKC,UAAW5C,EAAU,KAAM,OAIzE,QACItE,KAAMA"}
|
||||
{"version":3,"file":"tool-form.js","sources":["../../../src/mvc/tool/tool-form.js"],"names":["define","Utils","Ui","Modal","ToolFormBase","View","Backbone","extend","initialize","options","self","this","modal","parent","Galaxy","form","merge","listen_to_history","always_refresh","customize","buttons","execute","execute_btn","Button","icon","tooltip","name","version","title","cls","floating","onclick","wait","portlet","disable","submit","unwait","enable","job_id","job_remap","inputs","label","type","display","ignore","value","help","deferred","setElement","$el","append","callback","job_def","tool_id","id","tool_version","data","create","trigger","validate","emit","debug","action","root","$f","$","attr","method","enctype","_","each","key","hide","appendTo","remove","request","url","success","response","children","_templateSuccess","currHistoryPanel","refreshContents","error","input_found","err_data","error_messages","matchResponse","input_id","highlight","show","body","err_msg","_templateError","Close","job_inputs","batch_n","batch_src","job_input_id","input_value","match","input_field","field_list","input_def","input_list","optional","batch","n","values","length","src","jobs","njobs","njobs_text","$message","addClass","text","outputs","output","hid","JSON","stringify"],"mappings":"AACAA,QAAS,cAAe,iBAAkB,kBAAmB,2BACzD,SAAUC,EAAOC,EAAIC,EAAOC,GAC5B,GAAIC,GAAOC,SAASD,KAAKE,QACrBC,WAAY,SAAUC,GAClB,GAAIC,GAAOC,IACXA,MAAKC,MAAQC,OAAOC,OAAOF,OAAS,GAAIT,GAAME,KAC9CM,KAAKI,KAAO,GAAIX,GAAcH,EAAMe,OAChCC,mBAAoB,EACpBC,gBAAoB,EACpBC,UAAoB,SAAUV,GAE1BA,EAAQW,SACJC,QAASC,YAAc,GAAIpB,GAAGqB,QAC1BC,KAAW,WACXC,QAAW,YAAchB,EAAQiB,KAAO,KAAOjB,EAAQkB,QAAU,IACjEC,MAAW,UACXC,IAAW,4BACXC,SAAW,QACXC,QAAW,WACPT,YAAYU,OACZtB,EAAKK,KAAKkB,QAAQC,UACl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AAKX,IAAYW,EAEpB,MADAhG,MAAKI,KAAK0E,UAAWD,EAAU,gHAAkHmB,EAAI,wDAA0DX,EAAU,UAClN,OAtBXlF,QAAO8C,KAAKC,MAAM,wBAAyB,oCA0BnD,OAAO,GAGXmB,iBAAkB,SAAUF,GACxB,GAAKA,EAASiC,MAAQjC,EAASiC,KAAKF,OAAS,EAAI,CAC7C,GAAIG,GAAQlC,EAASiC,KAAKF,OACtBI,EAAsB,GAATD,EAAa,YAAcA,EAAQ,aAChDE,EAAWjD,EAAG,UAAWkD,SAAU,oBACVjE,OAAQe,EAAG,QAASmD,KAAMH,EAAa,gFAKpE,OAJA5C,GAAEC,KAAMQ,EAASuC,QAAS,SAAUC,GAChCJ,EAAShE,OAAQe,EAAG,QAASkD,SAAU,cAAejE,OAAQe,EAAG,QAASmD,KAAME,EAAOC,IAAM,KAAOD,EAAO5F,UAE/GwF,EAAShE,OAAQe,EAAG,QAASf,OAAQ,QAASkE,KAAM,yPAC7CF,EAEP,MAAOvG,MAAKkF,eAAgBf,IAIpCe,eAAgB,SAAUf,GACtB,MAAQb,GAAG,UAAWkD,SAAU,qBACVjE,OAAQe,EAAG,QAASmD,KAAM,sGAC1BlE,OAAQe,EAAG,UAAWmD,KAAMI,KAAKC,UAAW3C,EAAU,KAAM,OAI1F,QACIzE,KAAMA"}
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"ui-portlet.js","sources":["../../../src/mvc/ui/ui-portlet.js"],"names":["define","Utils","Ui","View","Backbone","extend","visible","initialize","options","self","this","model","Model","id","uid","cls","title","icon","buttons","body","scrollable","nopadding","operations","collapsible","collapsible_button","collapsed","set","setElement","_template","$body","$","$title_text","$title_icon","$header","$content","$footer","$backdrop","$buttons","$operations","get","append","ButtonIcon","tooltip","onclick","render","attributes","$el","removeClass","addClass","attr","html","_","each","show","hide","off","on","collapse","expand","empty","name","item","prop","header","footer","fadeIn","enableButton","find","disableButton","hideOperation","showOperation","setOperation","callback","new_title","height","setIcon","disable","en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EAAG,UAAWkB,SAAU,qBACpCR,OAAQV,EAAG,UAAWkB,SAAU,mBAChCR,OAAQV,EAAG,UAAWkB,SAAU,uBAG7D,QACI7C,KAAOA"}
|
||||
{"version":3,"file":"ui-portlet.js","sources":["../../../src/mvc/ui/ui-portlet.js"],"names":["define","Utils","Ui","View","Backbone","extend","visible","initialize","options","self","this","model","Model","id","uid","cls","title","icon","buttons","body","scrollable","nopadding","operations","collapsible","collapsible_button","collapsed","set","setElement","_template","$body","$","$title_text","$title_icon","$header","$content","$backdrop","$buttons","$operations","get","append","ButtonIcon","tooltip","onclick","render","attributes","$el","removeClass","addClass","attr","html","_","each","show","hide","off","on","collapse","expand","empty","name","item","prop","header","fadeIn","enableButton","find","disableButton","hideOperation","showOperation","setOperation","callback","new_title","height","setIcon","disable","enable"],"mappings":"AAAAA,QAAS,cAAe,kBAAoB,SAAUC,EAAOC,GAC7D,GAAIC,GAAOC,SAASD,KAAKE,QACrBC,SAAc,EACdC,WAAc,SAAUC,GACpB,GAAIC,GAAOC,IACXA,MAAKC,MAAQH,GAAWA,EAAQG,OAAS,GAAIP,UAASQ,OAClDC,GAAsBZ,EAAMa,MAC5BC,IAAsB,aACtBC,MAAsB,GACtBC,KAAsB,GACtBC,QAAsB,KACtBC,KAAsB,KACtBC,YAAsB,EACtBC,WAAsB,EACtBC,WAAsB,KACtBC,aAAsB,EACtBC,oBAAsB,EACtBC,WAAsB,IACtBC,IAAKlB,GACTE,KAAKiB,WAAYjB,KAAKkB,aAGtBlB,KAAKmB,MAAiBnB,KAAKoB,EAAG,iBAC9BpB,KAAKqB,YAAiBrB,KAAKoB,EAAG,uBAC9BpB,KAAKsB,YAAiBtB,KAAKoB,EAAG,uBAC9BpB,KAAKuB,QAAiBvB,KAAKoB,EAAG,mBAC9BpB,KAAKwB,SAAiBxB,KAAKoB,EAAG,oBAC9BpB,KAAKyB,UAAiBzB,KAAKoB,EAAG,qBAC9BpB,KAAK0B,SAAiB1B,KAAKoB,EAAG,oBAC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yB,UAAUiB,QAInBuB,OAAQ,WACJjE,KAAKyB,UAAUkB,QAGnBzB,UAAW,WACP,MAAOE,GAAG,UAAWS,OAAQT,EAAG,UAAWiB,SAAU,kBAC5BR,OAAQT,EAAG,UAAWiB,SAAU,uBAChCR,OAAQT,EAAG,UAAWiB,SAAU,iBAC5BR,OAAQT,EAAG,QAASiB,SAAU,uBAC9BR,OAAQT,EAAG,WAAYiB,SAAU,yBACzCR,OAAQT,EAAG,UAAWiB,SAAU,mBAC5BR,OAAQT,EAAG,UAAWiB,SAAU,iBAChCR,OAAQT,EAAG,UAAWiB,SAAU,qBACpCR,OAAQT,EAAG,UAAWiB,SAAU,uBAG7D,QACI5C,KAAOA"}
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"utils.js","sources":["../../src/utils/utils.js"],"names":["define","iframe","src","deepeach","dict","callback","i","d","_","isObject","new_dict","clone","obj","JSON","parse","stringify","isJSON","text","test","replace","sanitize","content","$","html","isEmpty","value","Array","length","undefined","indexOf","textify","lst","isArray","toString","pos","lastIndexOf","substr","get","options","top","__utils__get__","cache_key","cache","success","window","console","debug","url","request","data","response","error","ajaxConfig","contentType","type","isEmptyObject","param","dataType","ajax","done","jQuery","parseJSON","e","fail","response_text","responseText","always","complete","cssGetAttribute","classname","name","el","appendTo","css","remove","cssLoadFile","Galaxy","root","merge","optionsDefault","defaults","roundToDecimalPlaces","number","numPlaces","placesMultiplier","Math","round","bytesToString","size","normal_font","numberPlaces","unit","tb","gb","mb","kb","rounded","uid","__utils__uid__","time","Date","hours","getHours","minutes","getMinutes","datetime","getDate","getMonth","getFullYear"],"mappings":"AAMAA,UAAW,WAIX,QAASC,GAAQC,GACb,MAAO,gBAAkBA,EAAM,yDAKnC,QAASC,GAAUC,EAAMC,GACrB,IAAK,GAAIC,KAAKF,GAAO,CACjB,GAAIG,GAAIH,EAAME,EACd,IAAIE,EAAEC,SAAUF,GAAM,CAClB,GAAIG,GAAWL,EAAUE,EACzBG,KAAcN,EAAME,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AAKC,MAAOJ,EAASE,GAAqBA,EAarD,QAASG,GAAeC,EAAMC,EAAaC,GACvCA,EAAgC9D,SAAjB8D,EAA4BA,EAAc,CAEzD,IAAIC,GAAO,EACX,IAAIH,GAAQI,EAAKJ,GAAcI,EAAID,EAAO,SAC1C,IAAIH,GAAQK,EAAKL,GAAcK,EAAIF,EAAO,SAC1C,IAAIH,GAAQM,EAAKN,GAAcM,EAAIH,EAAO,SAC1C,IAAIH,GAAQO,EAAKP,GAAcO,EAAIJ,EAAO,SAC1C,CAAA,KAAIH,EAAQ,GACL,MAAOC,GAAa,MAAO,oBADlBE,GAAO,IAGvB,GAAIK,GAAkB,KAARL,EAAaH,EAAMP,EAAsBO,EAAME,EAC7D,OAAID,GACOO,EAAU,IAAML,EAEhB,WAAaK,EAAU,aAAeL,EAOrD,QAASM,KAEL,MADA1D,KAAI2D,eAAiB3D,IAAI2D,gBAAkB,EACpC,OAAS3D,IAAI2D,iBAMxB,QAASC,KACL,GAAI5F,GAAI,GAAI6F,MACRC,GAAS9F,EAAE+F,WAAa,GAAK,IAAM,IAAM/F,EAAE+F,WAC3CC,GAAWhG,EAAEiG,aAAe,GAAK,IAAM,IAAMjG,EAAEiG,YACnD,OAAOC,UAAWlG,EAAEmG,UAAY,KACjBnG,EAAEoG,WAAa,GAAM,IACtBpG,EAAEqG,cAAgB,KAClBP,EAAQ,IACRE,EA/ClB,GAAIR,GAAK,KACLD,EAAKC,EAAKA,EACVF,EAAKC,EAAKC,EACVH,EAAKC,EAAKE,CA+Cd,QACIpB,YAAaA,EACbP,gBAAiBA,EACjB/B,IAAKA,EACLyC,MAAOA,EACP7E,OAAQA,EACRsF,cAAeA,EACfU,IAAKA,EACLE,KAAMA,EACNnD,QAASA,EACT5B,SAAUA,EACVU,QAASA,EACTN,QAASA,EACTrB,SAAUA,EACVa,OAAQA,EACRL,MAAOA"}
|
||||
{"version":3,"file":"utils.js","sources":["../../src/utils/utils.js"],"names":["define","iframe","src","deepeach","dict","callback","i","d","_","isObject","new_dict","clone","obj","JSON","parse","stringify","isJSON","text","test","replace","sanitize","content","$","html","isEmpty","value","Array","length","undefined","indexOf","textify","lst","isArray","toString","pos","lastIndexOf","substr","get","options","top","__utils__get__","cache_key","cache","success","window","console","debug","url","request","data","response","error","status","ajaxConfig","contentType","type","isEmptyObject","param","dataType","ajax","done","jQuery","parseJSON","e","fail","response_text","responseText","always","complete","cssGetAttribute","classname","name","el","appendTo","css","remove","cssLoadFile","Galaxy","root","merge","optionsDefault","defaults","roundToDecimalPlaces","number","numPlaces","placesMultiplier","Math","round","bytesToString","size","normal_font","numberPlaces","unit","tb","gb","mb","kb","rounded","uid","__utils__uid__","time","Date","hours","getHours","minutes","getMinutes","datetime","getDate","getMonth","getFullYear"],"mappings":"AAMAA,UAAW,WAIX,QAASC,GAAQC,GACb,MAAO,gBAAkBA,EAAM,yDAKnC,QAASC,GAAUC,EAAMC,GACrB,IAAK,GAAIC,KAAKF,GAAO,CACjB,GAAIG,GAAIH,EAAME,EACd,IAAIE,EAAEC,SAAUF,GAAM,CAClB,GAAIG,GAAWL,EAAUE,EACzBG,KAAcN,EAAME,GAAMI,GAC1BP,EAAUI,EAAGF,KAMzB,QAASM,GAAOC,GACZ,MAAOC,MAAKC,MAAOD,KAAKE,UAAWH,IAAS,MAOhD,QAASI,GAAOC,GACZ,MAAO,gBAAgBC,KAAKD,EAAKE,QAAQ,mBAAoB,KACzDA,QAAQ,mEAAoE,KAC5EA,QAAQ,uBAAwB,KAOxC,QAASC,GAASC,GACd,MAAOC,GAAE,UAAUL,KAAKI,GAASE,OAQrC,QAASC,GAAUC,GAIf,GAHQA,YAAiBC,SACrBD,GAAUA,IAEQ,IAAjBA,EAAME,OACP,OAAO,CAEX,KAAK,GAAIrB,KAAKmB,GACV,IAAO,WAAY,gBAAiB,KAAMG,QAAYC,QAASJ,EAAOnB,IAAQ,GAC1E,OAAO,CAGf,QAAO,EAOX,QAASwB,GAASC,GACd,GAAKT,EAAEU,QAASD,GAAQ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AAeL,EAOrD,QAASM,KAEL,MADA3D,KAAI4D,eAAiB5D,IAAI4D,gBAAkB,EACpC,OAAS5D,IAAI4D,iBAMxB,QAASC,KACL,GAAI7F,GAAI,GAAI8F,MACRC,GAAS/F,EAAEgG,WAAa,GAAK,IAAM,IAAMhG,EAAEgG,WAC3CC,GAAWjG,EAAEkG,aAAe,GAAK,IAAM,IAAMlG,EAAEkG,YACnD,OAAOC,UAAWnG,EAAEoG,UAAY,KACjBpG,EAAEqG,WAAa,GAAM,IACtBrG,EAAEsG,cAAgB,KAClBP,EAAQ,IACRE,EA/ClB,GAAIR,GAAK,KACLD,EAAKC,EAAKA,EACVF,EAAKC,EAAKC,EACVH,EAAKC,EAAKE,CA+Cd,QACIpB,YAAaA,EACbP,gBAAiBA,EACjBhC,IAAKA,EACL0C,MAAOA,EACP9E,OAAQA,EACRuF,cAAeA,EACfU,IAAKA,EACLE,KAAMA,EACNpD,QAASA,EACT5B,SAAUA,EACVU,QAASA,EACTN,QAASA,EACTrB,SAAUA,EACVa,OAAQA,EACRL,MAAOA"}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
define(["utils/utils","mvc/tool/tool-form-base"],function(a,b){var c=b.extend({initialize:function(c){var d=this;return this.workflow=c.workflow,this.node=c.node,this.node?(this.post_job_actions=this.node.post_job_actions||{},c=a.merge(c,{text_enable:"Set in Advance",text_disable:"Set at Runtime",narrow:!0,initial_errors:!0,sustain_version:!0,cls:"ui-portlet-narrow",update_url:Galaxy.root+"api/workflows/build_module",update:function(a){d.node.update_field_data(a),d.errors(a&&a.tool_model)}}),a.deepeach(c.inputs,function(b){b.type&&(-1!=["data","data_collection"].indexOf(b.type)?(b.type="hidden",b.info="Data input '"+b.name+"' ("+a.textify(b.extensions)+")",b.value={__class__:"RuntimeValue"}):(b.collapsible_value={__class__:"RuntimeValue"},b.is_workflow=b.options&&0==b.options.length||-1!=["integer","float"].indexOf(b.type)))}),a.deepeach(c.inputs,function(a){"conditional"==a.type&&(a.test_param.collapsible_value=void 0)}),this._makeSections(c),void b.prototype.initialize.call(this,c)):void Galaxy.emit.debug("tool-form-workflow::initialize()","Node not found in workflow.")},_makeSections:function(b){var c=b.inputs,d=b.datatypes;c[a.uid()]={label:"Annotation / Notes",name:"annotation",type:"text",area:!0,help:"Add an annotation or note for this step. It will be shown with the workflow.",value:this.node.annotation};var e=this.node.output_terminals&&Object.keys(this.node.output_terminals)[0];if(e){c[a.uid()]={name:"pja__"+e+"__EmailAction",label:"Email notification",type:"boolean",value:String(Boolean(this.post_job_actions["EmailAction"+e])),ignore:"false",help:"An email notification will be sent when the job has completed.",payload:{host:window.location.host}},c[a.uid()]={name:"pja__"+e+"__DeleteIntermediatesAction",label:"Output cleanup",type:"boolean",value:String(Boolean(this.post_job_actions["DeleteIntermediatesAction"+e])),ignore:"false",help:"Delete intermediate outputs if they are not used as input for another job."};for(var f in this.node.output_terminals)c[a.uid()]=this._makeSection(f,d)}},_makeSection:function(a,b){function c(b,e){e=e||[],e.push(b);for(var f in b.inputs){var g=b.inputs[f],h=g.action;if(h){if(g.name="pja__"+a+"__"+g.action,g.pja_arg&&(g.name+="__"+g.pja_arg),g.payload)for(var i in g.payload){var j=g.payload[i];g.payload[g.name+"__"+i]=j,delete j}var k=d.post_job_actions[g.action+a];if(k){for(var l in e)e[l].expanded=!0;g.value=g.pja_arg?k.action_arguments&&k.action_arguments[g.pja_arg]||g.value:"true"}}g.inputs&&c(g,e.slice(0))}}var d=this,e=[],f=[];for(key in b)e.push({0:b[key],1:b[key]});for(key in this.node.input_terminals)f.push(this.node.input_terminals[key].name);e.sort(function(a,b){return a.label>b.label?1:a.label<b.label?-1:0}),e.unshift({0:"Sequences",1:"Sequences"}),e.unshift({0:"Roadmaps",1:"Roadmaps"}),e.unshift({0:"Leave unchanged",1:"__empty__"});var g={title:"Configure Output: '"+a+"'",type:"section",flat:!0,inputs:[{label:"Label",type:"text",value:(output=this.node.getWorkflowOutput(a))&&output.label||"",help:"This will provide a short name to describe the output - this must be unique across workflows.",onchange:function(b){d.workflow.attemptUpdateOutputLabel(d.node,a,b)}},{action:"RenameDatasetAction",pja_arg:"newname",label:"Rename dataset",type:"text",value:"",ignore:"",help:'This action will rename the output dataset. Click <a href="https://wiki.galaxyproject.org/Learn/AdvancedWorkflow/Variables">here</a> for more information. Valid inputs are: <strong>'+f.join(", ")+"</strong>."},{action:"ChangeDatatypeAction",pja_arg:"newtype",label:"Change datatype",type:"select",ignore:"__empty__",value:"__empty__",options:e,help:"This action will change the datatype of the output to the indicated value."},{action:"TagDatasetAction",pja_arg:"tags",label:"Tags",type:"text",value:"",ignore:"",help:"This action will set tags for the dataset."},{title:"Assign columns",type:"section",flat:!0,inputs:[{action:"ColumnSetAction",pja_arg:"chromCol",label:"Chrom column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",pja_arg:"startCol",label:"Start column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",pja_arg:"endCol",label:"End column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",pja_arg:"strandCol",label:"Strand column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",pja_arg:"nameCol",label:"Name column",type:"integer",value:"",ignore:""}],help:"This action will set column assignments in the output dataset. Blank fields are ignored."}]};return c(g),g}});return{View:c}});
|
||||
define(["utils/utils","mvc/tool/tool-form-base"],function(a,b){var c=Backbone.View.extend({initialize:function(c){var d=this;this.workflow=c.workflow,this.node=c.node,this.setElement("<div/>"),this.node?(this.post_job_actions=this.node.post_job_actions||{},a.deepeach(c.inputs,function(b){b.type&&(-1!=["data","data_collection"].indexOf(b.type)?(b.type="hidden",b.info="Data input '"+b.name+"' ("+a.textify(b.extensions)+")",b.value={__class__:"RuntimeValue"}):(b.collapsible_value={__class__:"RuntimeValue"},b.is_workflow=b.options&&0==b.options.length||-1!=["integer","float"].indexOf(b.type)))}),a.deepeach(c.inputs,function(a){"conditional"==a.type&&(a.test_param.collapsible_value=void 0)}),this._makeSections(c),this.form=new b(a.merge(c,{text_enable:"Set in Advance",text_disable:"Set at Runtime",narrow:!0,initial_errors:!0,sustain_version:!0,cls:"ui-portlet-narrow",update_url:Galaxy.root+"api/workflows/build_module",update:function(a){d.node.update_field_data(a),d.form.errors(a&&a.tool_model)}})),this.$el.append(this.form.$el)):Galaxy.emit.debug("tool-form-workflow::initialize()","Node not found in workflow.")},_makeSections:function(b){var c=b.inputs,d=b.datatypes;c[a.uid()]={label:"Annotation / Notes",name:"annotation",type:"text",area:!0,help:"Add an annotation or note for this step. It will be shown with the workflow.",value:this.node.annotation};var e=this.node.output_terminals&&Object.keys(this.node.output_terminals)[0];if(e){c[a.uid()]={name:"pja__"+e+"__EmailAction",label:"Email notification",type:"boolean",value:String(Boolean(this.post_job_actions["EmailAction"+e])),ignore:"false",help:"An email notification will be sent when the job has completed.",payload:{host:window.location.host}},c[a.uid()]={name:"pja__"+e+"__DeleteIntermediatesAction",label:"Output cleanup",type:"boolean",value:String(Boolean(this.post_job_actions["DeleteIntermediatesAction"+e])),ignore:"false",help:"Delete intermediate outputs if they are not used as input for another job."};for(var f in this.node.output_terminals)c[a.uid()]=this._makeSection(f,d)}},_makeSection:function(a,b){function c(b,e){e=e||[],e.push(b);for(var f in b.inputs){var g=b.inputs[f],h=g.action;if(h){if(g.name="pja__"+a+"__"+g.action,g.pja_arg&&(g.name+="__"+g.pja_arg),g.payload)for(var i in g.payload){var j=g.payload[i];g.payload[g.name+"__"+i]=j,delete j}var k=d.post_job_actions[g.action+a];if(k){for(var l in e)e[l].expanded=!0;g.value=g.pja_arg?k.action_arguments&&k.action_arguments[g.pja_arg]||g.value:"true"}}g.inputs&&c(g,e.slice(0))}}var d=this,e=[],f=[];for(key in b)e.push({0:b[key],1:b[key]});for(key in this.node.input_terminals)f.push(this.node.input_terminals[key].name);e.sort(function(a,b){return a.label>b.label?1:a.label<b.label?-1:0}),e.unshift({0:"Sequences",1:"Sequences"}),e.unshift({0:"Roadmaps",1:"Roadmaps"}),e.unshift({0:"Leave unchanged",1:"__empty__"});var g={title:"Configure Output: '"+a+"'",type:"section",flat:!0,inputs:[{label:"Label",type:"text",value:(output=this.node.getWorkflowOutput(a))&&output.label||"",help:"This will provide a short name to describe the output - this must be unique across workflows.",onchange:function(b){d.workflow.attemptUpdateOutputLabel(d.node,a,b)}},{action:"RenameDatasetAction",pja_arg:"newname",label:"Rename dataset",type:"text",value:"",ignore:"",help:'This action will rename the output dataset. Click <a href="https://wiki.galaxyproject.org/Learn/AdvancedWorkflow/Variables">here</a> for more information. Valid inputs are: <strong>'+f.join(", ")+"</strong>."},{action:"ChangeDatatypeAction",pja_arg:"newtype",label:"Change datatype",type:"select",ignore:"__empty__",value:"__empty__",options:e,help:"This action will change the datatype of the output to the indicated value."},{action:"TagDatasetAction",pja_arg:"tags",label:"Tags",type:"text",value:"",ignore:"",help:"This action will set tags for the dataset."},{title:"Assign columns",type:"section",flat:!0,inputs:[{action:"ColumnSetAction",pja_arg:"chromCol",label:"Chrom column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",pja_arg:"startCol",label:"Start column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",pja_arg:"endCol",label:"End column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",pja_arg:"strandCol",label:"Strand column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",pja_arg:"nameCol",label:"Name column",type:"integer",value:"",ignore:""}],help:"This action will set column assignments in the output dataset. Blank fields are ignored."}]};return c(g),g}});return{View:c}});
|
||||
//# sourceMappingURL=../../../maps/mvc/tool/tool-form-workflow.js.map
|
||||
@@ -1,2 +1,2 @@
|
||||
define(["utils/utils","mvc/ui/ui-misc","mvc/ui/ui-modal","mvc/tool/tool-form-base"],function(a,b,c,d){var e=d.extend({initialize:function(e){var f=this;e.listen_to_history=!0,e.always_refresh=!1,this.modal=parent.Galaxy.modal||new c.View,d.prototype.initialize.call(this,a.merge({customize:function(a){a.buttons={execute:execute_btn=new b.Button({icon:"fa-check",tooltip:"Execute: "+a.name+" ("+a.version+")",title:"Execute",cls:"ui-button btn btn-primary",floating:"clear",onclick:function(){execute_btn.wait(),f.portlet.disable(),f.submit(a,function(){execute_btn.unwait(),f.portlet.enable()})}})},a.job_id&&a.job_remap&&(a.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",a.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 new output(s) of this tool run."})}},e))},submit:function(b,c){var d=this,e={tool_id:b.id,tool_version:b.version,inputs:this.data.create()};if(this.trigger("reset"),!d.validate(e))return Galaxy.emit.debug("tool-form::submit()","Submission canceled. Validation failed."),void(c&&c());if(b.action!==Galaxy.root+"tool_runner/index"){var f=$("<form/>").attr({action:b.action,method:b.method,enctype:b.enctype});return _.each(e.inputs,function(a,b){f.append($("<input/>").attr({name:b,value:a}))}),f.hide().appendTo("body").submit().remove(),void(c&&c())}Galaxy.emit.debug("tool-form::submit()","Validation complete.",e),a.request({type:"POST",url:Galaxy.root+"api/tools",data:e,success:function(a){c&&c(),d.$el.children().hide(),d.$el.append(d._templateSuccess(a)),parent.Galaxy&&parent.Galaxy.currHistoryPanel&&parent.Galaxy.currHistoryPanel.refreshContents()},error:function(a){c&&c(),Galaxy.emit.debug("tool-form::submit","Submission failed.",a);var b=!1;if(a&&a.err_data){var f=d.data.matchResponse(a.err_data);for(var g in f){d.highlight(g,f[g]),b=!0;break}}b||d.modal.show({title:"Job submission failed",body:a&&a.err_msg||d._templateError(e),buttons:{Close:function(){d.modal.hide()}}})}})},validate:function(a){var b=a.inputs,c=-1,d=null;for(var e in b){var f=b[e],g=this.data.match(e),h=this.field_list[g],i=this.input_list[g];if(g&&i&&h){if(!i.optional&&null==f)return this.highlight(g),!1;if(f&&f.batch){var j=f.values.length,k=j>0&&f.values[0]&&f.values[0].src;if(k)if(null===d)d=k;else if(d!==k)return this.highlight(g,"Please select either dataset or dataset list fields for all batch mode fields."),!1;if(-1===c)c=j;else if(c!==j)return this.highlight(g,"Please make sure that you select the same number of inputs for all batch mode fields. This field contains <b>"+j+"</b> selection(s) while a previous field contains <b>"+c+"</b>."),!1}}else Galaxy.emit.debug("tool-form::validate()","Retrieving input objects failed.")}return!0},_templateSuccess:function(a){if(a.jobs&&a.jobs.length>0){var b=a.jobs.length,c=1==b?"1 job has":b+" jobs have",d=$("<div/>").addClass("donemessagelarge").append($("<p/>").text(c+" been successfully added to the queue - resulting in the following datasets:"));return _.each(a.outputs,function(a){d.append($("<p/>").addClass("messagerow").append($("<b/>").text(a.hid+": "+a.name)))}),d.append($("<p/>").append("<b/>").text("You can check the status of queued jobs and view the resulting data by refreshing the History pane. When the job has been run the status will change from 'running' to 'finished' if completed successfully or 'error' if problems were encountered.")),d}return this._templateError(a)},_templateError:function(a){return $("<div/>").addClass("errormessagelarge").append($("<p/>").text("The server could not complete the request. Please contact the Galaxy Team if this error persists.")).append($("<pre/>").text(JSON.stringify(a,null,4)))}});return{View:e}});
|
||||
define(["utils/utils","mvc/ui/ui-misc","mvc/ui/ui-modal","mvc/tool/tool-form-base"],function(a,b,c,d){var e=Backbone.View.extend({initialize:function(e){var f=this;this.modal=parent.Galaxy.modal||new c.View,this.form=new d(a.merge({listen_to_history:!0,always_refresh:!1,customize:function(a){a.buttons={execute:execute_btn=new b.Button({icon:"fa-check",tooltip:"Execute: "+a.name+" ("+a.version+")",title:"Execute",cls:"ui-button btn btn-primary",floating:"clear",onclick:function(){execute_btn.wait(),f.form.portlet.disable(),f.submit(a,function(){execute_btn.unwait(),f.form.portlet.enable()})}})},a.job_id&&a.job_remap&&(a.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",a.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 new output(s) of this tool run."})}},e)),this.deferred=this.form.deferred,this.setElement("<div/>"),this.$el.append(this.form.$el)},submit:function(b,c){var d=this,e={tool_id:b.id,tool_version:b.version,inputs:this.form.data.create()};if(this.form.trigger("reset"),!d.validate(e))return Galaxy.emit.debug("tool-form::submit()","Submission canceled. Validation failed."),void(c&&c());if(b.action!==Galaxy.root+"tool_runner/index"){var f=$("<form/>").attr({action:b.action,method:b.method,enctype:b.enctype});return _.each(e.inputs,function(a,b){f.append($("<input/>").attr({name:b,value:a}))}),f.hide().appendTo("body").submit().remove(),void(c&&c())}Galaxy.emit.debug("tool-form::submit()","Validation complete.",e),a.request({type:"POST",url:Galaxy.root+"api/tools",data:e,success:function(a){c&&c(),d.$el.children().hide(),d.$el.append(d._templateSuccess(a)),parent.Galaxy&&parent.Galaxy.currHistoryPanel&&parent.Galaxy.currHistoryPanel.refreshContents()},error:function(a){c&&c(),Galaxy.emit.debug("tool-form::submit","Submission failed.",a);var b=!1;if(a&&a.err_data){var f=d.form.data.matchResponse(a.err_data);for(var g in f){d.form.highlight(g,f[g]),b=!0;break}}b||d.modal.show({title:"Job submission failed",body:a&&a.err_msg||d._templateError(e),buttons:{Close:function(){d.modal.hide()}}})}})},validate:function(a){var b=a.inputs,c=-1,d=null;for(var e in b){var f=b[e],g=this.form.data.match(e),h=this.form.field_list[g],i=this.form.input_list[g];if(g&&i&&h){if(!i.optional&&null==f)return this.form.highlight(g),!1;if(f&&f.batch){var j=f.values.length,k=j>0&&f.values[0]&&f.values[0].src;if(k)if(null===d)d=k;else if(d!==k)return this.form.highlight(g,"Please select either dataset or dataset list fields for all batch mode fields."),!1;if(-1===c)c=j;else if(c!==j)return this.form.highlight(g,"Please make sure that you select the same number of inputs for all batch mode fields. This field contains <b>"+j+"</b> selection(s) while a previous field contains <b>"+c+"</b>."),!1}}else Galaxy.emit.debug("tool-form::validate()","Retrieving input objects failed.")}return!0},_templateSuccess:function(a){if(a.jobs&&a.jobs.length>0){var b=a.jobs.length,c=1==b?"1 job has":b+" jobs have",d=$("<div/>").addClass("donemessagelarge").append($("<p/>").text(c+" been successfully added to the queue - resulting in the following datasets:"));return _.each(a.outputs,function(a){d.append($("<p/>").addClass("messagerow").append($("<b/>").text(a.hid+": "+a.name)))}),d.append($("<p/>").append("<b/>").text("You can check the status of queued jobs and view the resulting data by refreshing the History pane. When the job has been run the status will change from 'running' to 'finished' if completed successfully or 'error' if problems were encountered.")),d}return this._templateError(a)},_templateError:function(a){return $("<div/>").addClass("errormessagelarge").append($("<p/>").text("The server could not complete the request. Please contact the Galaxy Team if this error persists.")).append($("<pre/>").text(JSON.stringify(a,null,4)))}});return{View:e}});
|
||||
//# sourceMappingURL=../../../maps/mvc/tool/tool-form.js.map
|
||||
@@ -1,2 +1,2 @@
|
||||
define(["utils/utils","mvc/ui/ui-misc"],function(a,b){var c=Backbone.View.extend({visible:!1,initialize:function(c){var d=this;this.model=c&&c.model||new Backbone.Model({id:a.uid(),cls:"ui-portlet",title:"",icon:"",buttons:null,body:null,scrollable:!0,nopadding:!1,operations:null,collapsible:!1,collapsible_button:!1,collapsed:!1}).set(c),this.setElement(this._template()),this.$body=this.$(".portlet-body"),this.$title_text=this.$(".portlet-title-text"),this.$title_icon=this.$(".portlet-title-icon"),this.$header=this.$(".portlet-header"),this.$content=this.$(".portlet-content"),this.$footer=this.$(".portlet-footer"),this.$backdrop=this.$(".portlet-backdrop"),this.$buttons=this.$(".portlet-buttons"),this.$operations=this.$(".portlet-operations"),this.model.get("body")&&this.append(this.model.get("body")),this.collapsible_button=new b.ButtonIcon({icon:"fa-eye",tooltip:"Collapse/Expand",cls:"ui-button-icon-plain",onclick:function(){d[d.collapsed?"expand":"collapse"]()}}),this.render()},render:function(){var a=this,b=this.model.attributes;return this.$el.removeClass().addClass(b.cls).attr("id",b.id),this.$header[b.title?"show":"hide"](),this.$title_text.html(b.title),_.each([this.$content,this.$body],function(a){a[b.nopadding?"addClass":"removeClass"]("no-padding")}),b.icon?this.$title_icon.removeClass().addClass("portlet-title-icon fa").addClass(b.icon).show():this.$title_icon.hide(),this.$title_text[b.collapsible?"addClass":"removeClass"]("no-highlight collapsible").off(),b.collapsible&&(this.$title_text.on("click",function(){a[a.collapsed?"expand":"collapse"]()}),b.collapsed?this.collapse():this.expand()),b.buttons?(this.$buttons.empty().show(),$.each(this.model.get("buttons"),function(b,c){c.$el.prop("id",b),a.$buttons.append(c.$el)})):this.$buttons.hide(),this.$operations.empty,b.collapsible_button&&this.$operations.append(this.collapsible_button.$el),b.operations&&$.each(b.operations,function(b,c){c.$el.prop("id",b),a.$operations.append(c.$el)}),this},append:function(a){this.$body.append(a)},empty:function(){this.$body.empty()},header:function(){return this.$header},body:function(){return this.$body},footer:function(){return this.$footer},show:function(){this.visible=!0,this.$el.fadeIn("fast")},hide:function(){this.visible=!1,this.$el.hide()},enableButton:function(a){this.$buttons.find("#"+a).prop("disabled",!1)},disableButton:function(a){this.$buttons.find("#"+a).prop("disabled",!0)},hideOperation:function(a){this.$operations.find("#"+a).hide()},showOperation:function(a){this.$operations.find("#"+a).show()},setOperation:function(a,b){this.$operations.find("#"+a).off("click").on("click",b)},title:function(a){return a&&this.$title_text.html(a),this.$title_text.html()},collapse:function(){this.collapsed=!0,this.$content.height("0%"),this.$body.hide(),this.$footer.hide(),this.collapsible_button.setIcon("fa-eye-slash")},expand:function(){this.collapsed=!1,this.$content.height("100%"),this.$body.fadeIn("fast"),this.$footer.fadeIn("fast"),this.collapsible_button.setIcon("fa-eye")},disable:function(){this.$backdrop.show()},enable:function(){this.$backdrop.hide()},_template:function(){return $("<div/>").append($("<div/>").addClass("portlet-header").append($("<div/>").addClass("portlet-operations")).append($("<div/>").addClass("portlet-title").append($("<i/>").addClass("portlet-title-icon")).append($("<span/>").addClass("portlet-title-text")))).append($("<div/>").addClass("portlet-content").append($("<div/>").addClass("portlet-body")).append($("<div/>").addClass("portlet-buttons"))).append($("<div/>").addClass("portlet-footer")).append($("<div/>").addClass("portlet-backdrop"))}});return{View:c}});
|
||||
define(["utils/utils","mvc/ui/ui-misc"],function(a,b){var c=Backbone.View.extend({visible:!1,initialize:function(c){var d=this;this.model=c&&c.model||new Backbone.Model({id:a.uid(),cls:"ui-portlet",title:"",icon:"",buttons:null,body:null,scrollable:!0,nopadding:!1,operations:null,collapsible:!1,collapsible_button:!1,collapsed:!1}).set(c),this.setElement(this._template()),this.$body=this.$(".portlet-body"),this.$title_text=this.$(".portlet-title-text"),this.$title_icon=this.$(".portlet-title-icon"),this.$header=this.$(".portlet-header"),this.$content=this.$(".portlet-content"),this.$backdrop=this.$(".portlet-backdrop"),this.$buttons=this.$(".portlet-buttons"),this.$operations=this.$(".portlet-operations"),this.model.get("body")&&this.append(this.model.get("body")),this.collapsible_button=new b.ButtonIcon({icon:"fa-eye",tooltip:"Collapse/Expand",cls:"ui-button-icon-plain",onclick:function(){d[d.collapsed?"expand":"collapse"]()}}),this.render()},render:function(){var a=this,b=this.model.attributes;return this.$el.removeClass().addClass(b.cls).attr("id",b.id),this.$header[b.title?"show":"hide"](),this.$title_text.html(b.title),_.each([this.$content,this.$body],function(a){a[b.nopadding?"addClass":"removeClass"]("no-padding")}),b.icon?this.$title_icon.removeClass().addClass("portlet-title-icon fa").addClass(b.icon).show():this.$title_icon.hide(),this.$title_text[b.collapsible?"addClass":"removeClass"]("no-highlight collapsible").off(),b.collapsible&&(this.$title_text.on("click",function(){a[a.collapsed?"expand":"collapse"]()}),b.collapsed?this.collapse():this.expand()),b.buttons?(this.$buttons.empty().show(),$.each(this.model.get("buttons"),function(b,c){c.$el.prop("id",b),a.$buttons.append(c.$el)})):this.$buttons.hide(),this.$operations.empty,b.collapsible_button&&this.$operations.append(this.collapsible_button.$el),b.operations&&$.each(b.operations,function(b,c){c.$el.prop("id",b),a.$operations.append(c.$el)}),this},append:function(a){this.$body.append(a)},empty:function(){this.$body.empty()},header:function(){return this.$header},body:function(){return this.$body},show:function(){this.visible=!0,this.$el.fadeIn("fast")},hide:function(){this.visible=!1,this.$el.hide()},enableButton:function(a){this.$buttons.find("#"+a).prop("disabled",!1)},disableButton:function(a){this.$buttons.find("#"+a).prop("disabled",!0)},hideOperation:function(a){this.$operations.find("#"+a).hide()},showOperation:function(a){this.$operations.find("#"+a).show()},setOperation:function(a,b){this.$operations.find("#"+a).off("click").on("click",b)},title:function(a){return a&&this.$title_text.html(a),this.$title_text.html()},collapse:function(){this.collapsed=!0,this.$content.height("0%"),this.$body.hide(),this.collapsible_button.setIcon("fa-eye-slash")},expand:function(){this.collapsed=!1,this.$content.height("100%"),this.$body.fadeIn("fast"),this.collapsible_button.setIcon("fa-eye")},disable:function(){this.$backdrop.show()},enable:function(){this.$backdrop.hide()},_template:function(){return $("<div/>").append($("<div/>").addClass("portlet-header").append($("<div/>").addClass("portlet-operations")).append($("<div/>").addClass("portlet-title").append($("<i/>").addClass("portlet-title-icon")).append($("<span/>").addClass("portlet-title-text")))).append($("<div/>").addClass("portlet-content").append($("<div/>").addClass("portlet-body")).append($("<div/>").addClass("portlet-buttons"))).append($("<div/>").addClass("portlet-backdrop"))}});return{View:c}});
|
||||
//# sourceMappingURL=../../../maps/mvc/ui/ui-portlet.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
define([],function(){function a(a){return'<iframe src="'+a+'" frameborder="0" style="width: 100%; height: 100%;"/>'}function b(a,c){for(var d in a){var e=a[d];if(_.isObject(e)){var f=c(e);f&&(a[d]=f),b(e,c)}}}function c(a){return JSON.parse(JSON.stringify(a)||null)}function d(a){return/^[\],:{}\s]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))}function e(a){return $("<div/>").text(a).html()}function f(a){if(a instanceof Array||(a=[a]),0===a.length)return!0;for(var b in a)if(["__null__","__undefined__",null,void 0].indexOf(a[b])>-1)return!0;return!1}function g(a){if($.isArray(a)){var a=a.toString().replace(/,/g,", "),b=a.lastIndexOf(", ");return-1!=b&&(a=a.substr(0,b)+" or "+a.substr(b+2)),a}return""}function h(a){top.__utils__get__=top.__utils__get__||{};var b=JSON.stringify(a);a.cache&&top.__utils__get__[b]?(a.success&&a.success(top.__utils__get__[b]),window.console.debug("utils.js::get() - Fetching from cache ["+a.url+"].")):i({url:a.url,data:a.data,success:function(c){top.__utils__get__[b]=c,a.success&&a.success(c)},error:function(b){a.error&&a.error(b)}})}function i(a){var b={contentType:"application/json",type:a.type||"GET",data:a.data||{},url:a.url};"GET"==b.type||"DELETE"==b.type?($.isEmptyObject(b.data)||(b.url+=-1==b.url.indexOf("?")?"?":"&",b.url+=$.param(b.data,!0)),b.data=null):(b.dataType="json",b.url=b.url,b.data=JSON.stringify(b.data)),$.ajax(b).done(function(b){if("string"==typeof b)try{b=b.replace("Infinity,",'"Infinity",'),b=jQuery.parseJSON(b)}catch(c){console.debug(c)}a.success&&a.success(b)}).fail(function(b){var c=null;try{c=jQuery.parseJSON(b.responseText)}catch(d){c=b.responseText}a.error&&a.error(c,b)}).always(function(){a.complete&&a.complete()})}function j(a,b){var c=$('<div class="'+a+'"></div>');c.appendTo(":eq(0)");var d=c.css(b);return c.remove(),d}function k(a){$('link[href^="'+a+'"]').length||$('<link href="'+Galaxy.root+a+'" rel="stylesheet">').appendTo("head")}function l(a,b){return a?_.defaults(a,b):b}function m(a,b){for(var c=1,d=0;b>d;d++)c*=10;return Math.round(a*c)/c}function n(a,b,c){c=void 0!==c?c:1;var d="";if(a>=t)a/=t,d="TB";else if(a>=s)a/=s,d="GB";else if(a>=r)a/=r,d="MB";else if(a>=q)a/=q,d="KB";else{if(!(a>0))return b?"0 b":"<strong>-</strong>";d="b"}var e="b"==d?a:m(a,c);return b?e+" "+d:"<strong>"+e+"</strong> "+d}function o(){return top.__utils__uid__=top.__utils__uid__||0,"uid-"+top.__utils__uid__++}function p(){var a=new Date,b=(a.getHours()<10?"0":"")+a.getHours(),c=(a.getMinutes()<10?"0":"")+a.getMinutes();return datetime=a.getDate()+"/"+(a.getMonth()+1)+"/"+a.getFullYear()+", "+b+":"+c}var q=1024,r=q*q,s=r*q,t=s*q;return{cssLoadFile:k,cssGetAttribute:j,get:h,merge:l,iframe:a,bytesToString:n,uid:o,time:p,request:i,sanitize:e,textify:g,isEmpty:f,deepeach:b,isJSON:d,clone:c}});
|
||||
define([],function(){function a(a){return'<iframe src="'+a+'" frameborder="0" style="width: 100%; height: 100%;"/>'}function b(a,c){for(var d in a){var e=a[d];if(_.isObject(e)){var f=c(e);f&&(a[d]=f),b(e,c)}}}function c(a){return JSON.parse(JSON.stringify(a)||null)}function d(a){return/^[\],:{}\s]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))}function e(a){return $("<div/>").text(a).html()}function f(a){if(a instanceof Array||(a=[a]),0===a.length)return!0;for(var b in a)if(["__null__","__undefined__",null,void 0].indexOf(a[b])>-1)return!0;return!1}function g(a){if($.isArray(a)){var a=a.toString().replace(/,/g,", "),b=a.lastIndexOf(", ");return-1!=b&&(a=a.substr(0,b)+" or "+a.substr(b+2)),a}return""}function h(a){top.__utils__get__=top.__utils__get__||{};var b=JSON.stringify(a);a.cache&&top.__utils__get__[b]?(a.success&&a.success(top.__utils__get__[b]),window.console.debug("utils.js::get() - Fetching from cache ["+a.url+"].")):i({url:a.url,data:a.data,success:function(c){top.__utils__get__[b]=c,a.success&&a.success(c)},error:function(b,c){a.error&&a.error(b,c)}})}function i(a){var b={contentType:"application/json",type:a.type||"GET",data:a.data||{},url:a.url};"GET"==b.type||"DELETE"==b.type?($.isEmptyObject(b.data)||(b.url+=-1==b.url.indexOf("?")?"?":"&",b.url+=$.param(b.data,!0)),b.data=null):(b.dataType="json",b.url=b.url,b.data=JSON.stringify(b.data)),$.ajax(b).done(function(b){if("string"==typeof b)try{b=b.replace("Infinity,",'"Infinity",'),b=jQuery.parseJSON(b)}catch(c){console.debug(c)}a.success&&a.success(b)}).fail(function(b){var c=null;try{c=jQuery.parseJSON(b.responseText)}catch(d){c=b.responseText}a.error&&a.error(c,b.status)}).always(function(){a.complete&&a.complete()})}function j(a,b){var c=$('<div class="'+a+'"></div>');c.appendTo(":eq(0)");var d=c.css(b);return c.remove(),d}function k(a){$('link[href^="'+a+'"]').length||$('<link href="'+Galaxy.root+a+'" rel="stylesheet">').appendTo("head")}function l(a,b){return a?_.defaults(a,b):b}function m(a,b){for(var c=1,d=0;b>d;d++)c*=10;return Math.round(a*c)/c}function n(a,b,c){c=void 0!==c?c:1;var d="";if(a>=t)a/=t,d="TB";else if(a>=s)a/=s,d="GB";else if(a>=r)a/=r,d="MB";else if(a>=q)a/=q,d="KB";else{if(!(a>0))return b?"0 b":"<strong>-</strong>";d="b"}var e="b"==d?a:m(a,c);return b?e+" "+d:"<strong>"+e+"</strong> "+d}function o(){return top.__utils__uid__=top.__utils__uid__||0,"uid-"+top.__utils__uid__++}function p(){var a=new Date,b=(a.getHours()<10?"0":"")+a.getHours(),c=(a.getMinutes()<10?"0":"")+a.getMinutes();return datetime=a.getDate()+"/"+(a.getMonth()+1)+"/"+a.getFullYear()+", "+b+":"+c}var q=1024,r=q*q,s=r*q,t=s*q;return{cssLoadFile:k,cssGetAttribute:j,get:h,merge:l,iframe:a,bytesToString:n,uid:o,time:p,request:i,sanitize:e,textify:g,isEmpty:f,deepeach:b,isJSON:d,clone:c}});
|
||||
//# sourceMappingURL=../../maps/utils/utils.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -1,715 +1,10 @@
|
||||
<%inherit file="/base.mako"/>
|
||||
|
||||
## TEMPORARY SWITCH FOR THE NEW TOOL FORM
|
||||
%if util.string_as_bool(trans.app.config.get('run_workflow_toolform_upgrade', True)):
|
||||
${h.js("libs/bibtex", "libs/jquery/jquery-ui")}
|
||||
${h.css('jquery-ui/smoothness/jquery-ui')}
|
||||
<%
|
||||
from galaxy.tools.parameters import params_to_incoming
|
||||
from galaxy.jobs.actions.post import ActionBox
|
||||
from galaxy.tools.parameters.basic import workflow_building_modes
|
||||
step_models = []
|
||||
for i, step in enumerate( steps ):
|
||||
step_model = None
|
||||
if step.type == 'tool':
|
||||
incoming = {}
|
||||
tool = trans.app.toolbox.get_tool( step.tool_id )
|
||||
params_to_incoming( incoming, tool.inputs, step.state.inputs, trans.app )
|
||||
step_model = tool.to_json( trans, incoming, workflow_building_mode=workflow_building_modes.USE_HISTORY )
|
||||
step_model[ 'post_job_actions' ] = [{
|
||||
'short_str' : ActionBox.get_short_str( pja ),
|
||||
'action_type' : pja.action_type,
|
||||
'output_name' : pja.output_name,
|
||||
'action_arguments' : pja.action_arguments
|
||||
} for pja in step.post_job_actions ]
|
||||
else:
|
||||
inputs = step.module.get_runtime_inputs( connections=step.output_connections )
|
||||
step_model = {
|
||||
'name' : step.module.name,
|
||||
'inputs' : [ input.to_dict( trans ) for input in inputs.itervalues() ]
|
||||
}
|
||||
step_model[ 'step_id' ] = step.id
|
||||
step_model[ 'step_type' ] = step.type
|
||||
step_model[ 'output_connections' ] = [ {
|
||||
'input_step_id' : oc.input_step_id,
|
||||
'output_step_id' : oc.output_step_id,
|
||||
'input_name' : oc.input_name,
|
||||
'output_name' : oc.output_name
|
||||
} for oc in step.output_connections ]
|
||||
if step.annotations:
|
||||
step_model[ 'annotation' ] = step.annotations[0].annotation
|
||||
if step.upgrade_messages:
|
||||
step_model[ 'messages' ] = step.upgrade_messages
|
||||
step_models.append( step_model )
|
||||
self.form_config = {
|
||||
'id' : app.security.encode_id( workflow.id ),
|
||||
'name' : workflow.name,
|
||||
'history_id' : history_id,
|
||||
'steps' : step_models,
|
||||
'has_upgrade_messages' : has_upgrade_messages
|
||||
}
|
||||
%>
|
||||
<script>
|
||||
require(['mvc/tool/tool-form-composite'], function( ToolForm ) {
|
||||
$(function() {
|
||||
var form = new ToolForm.View(${ h.dumps( self.form_config ) });
|
||||
});
|
||||
});
|
||||
</script>
|
||||
%else:
|
||||
|
||||
<%def name="javascripts()">
|
||||
${parent.javascripts()}
|
||||
<script type="text/javascript">
|
||||
|
||||
// jQuery plugin to prevent double submission of forms
|
||||
// Ref: http://stackoverflow.com/questions/2830542/prevent-double-submission-of-forms-in-jquery
|
||||
jQuery.fn.preventDoubleSubmission = function() {
|
||||
$(this).on('submit',function(e){
|
||||
var $form = $(this);
|
||||
|
||||
if ($form.data('submitted') === true) {
|
||||
// Previously submitted - don't submit again
|
||||
e.preventDefault();
|
||||
} else {
|
||||
// Mark it so that the next submit can be ignored
|
||||
$form.data('submitted', true);
|
||||
}
|
||||
});
|
||||
// Keep chainability
|
||||
return this;
|
||||
};
|
||||
|
||||
$.fn.outerHTML = function(s) {
|
||||
return s ? this.before(s).remove() : jQuery("<p>").append(this.eq(0).clone()).html();
|
||||
};
|
||||
$( function() {
|
||||
function show_tool_body(title){
|
||||
title.parent().show().css('border-bottom-width', '1px');
|
||||
title.next().show('fast');
|
||||
if ('${hide_fixed_params}'.toLowerCase() == 'true') {
|
||||
// show previously hidden parameters
|
||||
title.next().children(".form-row").show();
|
||||
}
|
||||
}
|
||||
function hide_tool_body(title){
|
||||
title.parent().css('border-bottom-width', '0px');
|
||||
title.next().hide('fast');
|
||||
}
|
||||
function toggle_tool_body(title) {
|
||||
if (title.next().is(':visible')){
|
||||
hide_tool_body(title);
|
||||
}else{
|
||||
show_tool_body(title);
|
||||
}
|
||||
}
|
||||
function toggle_multiinput(select) {
|
||||
var placeholder;
|
||||
if (select.attr('multiple')) {
|
||||
$('.multiinput').removeClass('disabled');
|
||||
if (select.val()) {
|
||||
select.val(select.val()[0]);
|
||||
} else {
|
||||
select.val($('option:last', select).val());
|
||||
}
|
||||
select.closest('.form-row').children('label').children('span.mode-icon').hide();
|
||||
select.removeAttr('multiple').removeAttr('size');
|
||||
placeholder = 'type to filter';
|
||||
} else {
|
||||
$('.multiinput', select.closest('.form-row')).removeClass('disabled');
|
||||
select.closest('.form-row').children('label').children('span.mode-icon').show();
|
||||
select.attr('multiple', 'multiple').attr('size', 8);
|
||||
placeholder = 'type to filter, [enter] to select all';
|
||||
}
|
||||
$('input.multiinput-filter', select.parent()).attr(
|
||||
'placeholder', placeholder);
|
||||
}
|
||||
$( "select[refresh_on_change='true']").change( function() {
|
||||
$( "#tool_form" ).submit();
|
||||
});
|
||||
$("div.toolFormTitle").click(function(){
|
||||
toggle_tool_body($(this));
|
||||
});
|
||||
if ('${hide_fixed_params}'.toLowerCase() == 'true') {
|
||||
// hide parameters that are not runtime inputs
|
||||
$("div.form-row:not(:has(select, textarea, input[type!=hidden], .wfpspan))").hide();
|
||||
$("div.toolForm:not(:has(select, textarea, input[type!=hidden], .wfpspan))").hide();
|
||||
}
|
||||
else {
|
||||
// Collapse non-interactive run-workflow panels by default.
|
||||
$("div.toolFormBody:not(:has(.runtime-form-row))").hide().parent().css('border-bottom-width', '0px');
|
||||
}
|
||||
$("#show_all_tool_body").click(function(){
|
||||
$("div.toolFormTitle").each(function(){
|
||||
show_tool_body($(this));
|
||||
});
|
||||
});
|
||||
$("#hide_all_tool_body").click(function(){
|
||||
$("div.toolFormTitle").each(function(){
|
||||
hide_tool_body($(this));
|
||||
});
|
||||
});
|
||||
$("#new_history_cbx").click(function(){
|
||||
$("#new_history_input").toggle(this.checked);
|
||||
});
|
||||
$('span.multiinput_wrap select[name*="|input"]').off('change').removeAttr('multiple').each(function(i, s) {
|
||||
var select = $(s);
|
||||
// The destroy on the following line is temporary and prevents
|
||||
// select2 use on Input Dataset Steps, but allows elsewhere. We
|
||||
// need a new widget to better handle pairwise matching.
|
||||
select.select2("destroy");
|
||||
var new_width = Math.max(200, select.width()) + 20;
|
||||
// Find the label for this element.
|
||||
select.closest('.form-row').children('label').append(
|
||||
$('<span class="icon-button multiinput"></span>').click(function() {
|
||||
if ($(this).hasClass('disabled')) return;
|
||||
toggle_multiinput(select);
|
||||
select.focus();
|
||||
}).attr('title',
|
||||
'Enable/disable selection of multiple input ' +
|
||||
'files. Each selected file will have an ' +
|
||||
'instance of the workflow.').tooltip({placement: 'bottom'})
|
||||
);
|
||||
var filter = $('<input type="text" class="multiinput-filter" ' +
|
||||
'placeholder="type to filter">');
|
||||
var filter_timeout = false;
|
||||
var original_rows = select.find('option');
|
||||
var previous_filter = '';
|
||||
// Todo: might have to choose keypress, depending on browser
|
||||
filter.keydown(function(e) {
|
||||
var filter_select = function() {
|
||||
var f = $.trim(filter.val());
|
||||
var filtered_rows = original_rows;
|
||||
if (f.length >= 1) {
|
||||
filtered_rows = original_rows.filter(function() {
|
||||
return new RegExp(f, 'ig').test($(this).text());
|
||||
});
|
||||
}
|
||||
select.html('');
|
||||
select.html(filtered_rows);
|
||||
};
|
||||
if (e.which == 13) { // 13 = enter key
|
||||
e.preventDefault();
|
||||
multi = select.attr('multiple');
|
||||
if (typeof multi !== 'undefined' && multi !== false) {
|
||||
if (!select.find('option:not(:selected)').length) {
|
||||
select.find('option').removeAttr('selected');
|
||||
} else {
|
||||
select.find('option').attr('selected', 'selected');
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (filter.val() != previous_filter) {
|
||||
if (filter_timeout) clearTimeout(filter_timeout);
|
||||
timeout = setTimeout(filter_select, 300);
|
||||
previous_filter = filter.val();
|
||||
}
|
||||
}).width(new_width).css('display', 'block');
|
||||
select.after(filter);
|
||||
select.width(new_width);
|
||||
});
|
||||
// Editable Workflow
|
||||
|
||||
var readyParameter = function(icon) {
|
||||
icon.attr("name", "edit");
|
||||
icon.attr('title', "Modify default value for this workflow parameter.");
|
||||
icon.removeClass("workflow-edit-button-editing");
|
||||
icon.addClass("workflow-edit-button-ready");
|
||||
icon.addClass("fa-edit");
|
||||
icon.removeClass("fa-undo");
|
||||
};
|
||||
|
||||
var editingParameter = function(icon) {
|
||||
icon.attr("name", "revert");
|
||||
icon.attr('title', "Restore workflow default value for this parameter.");
|
||||
icon.addClass("workflow-edit-button-editing");
|
||||
icon.removeClass("workflow-edit-button-ready");
|
||||
icon.removeClass("fa-edit");
|
||||
icon.addClass("fa-undo");
|
||||
};
|
||||
|
||||
$(".workflow-edit-button").on("click",function(){
|
||||
var state = $(this).attr("name");
|
||||
var stepToolBox = $(this).parent().parent().find('.editable-param').find('input:not([class]):not([type="hidden"]), select:not([class])');
|
||||
var labels = $(this).parent().parent().find('.editable-param').find('label');
|
||||
var split_name = stepToolBox.attr("name").split("|");
|
||||
var step_id = split_name[0];
|
||||
var step_name = split_name.slice(2, split_name.length).join("|");
|
||||
var hidden_html = "<input type='hidden' name='"+step_id+"|__runtime__"+step_name+"' value='true' />";
|
||||
var html = "";
|
||||
if (state === "edit"){
|
||||
stepToolBoxClone = stepToolBox.clone();
|
||||
stepToolBoxClone.each(function(index){$(stepToolBoxClone[index]).attr({"name":step_id+"|"+step_name})});
|
||||
stepToolBoxClone.show();
|
||||
if (labels.length > 0){
|
||||
stepToolBoxClone.each(function(index){
|
||||
html += stepToolBoxClone[index].outerHTML + labels[index].outerHTML + "<br/>"});
|
||||
}
|
||||
else{
|
||||
html = stepToolBoxClone.outerHTML();
|
||||
}
|
||||
$(this).parent().find(".editable").show();
|
||||
$(this).parent().parent().find(".uneditable_field").hide();
|
||||
$(this).parent().find(".editable").html(html+hidden_html);
|
||||
editingParameter($(this));
|
||||
}
|
||||
else{
|
||||
$(this).parent().find(".editable").hide();
|
||||
$(this).parent().find(".editable").empty();
|
||||
$(this).parent().parent().find(".uneditable_field").show();
|
||||
$(this).attr("name", "edit");
|
||||
readyParameter($(this));
|
||||
}
|
||||
}).each(function(i, icon) {
|
||||
var conditionalStart = $(this).closest(".form-row").prev().hasClass("conditional-start");
|
||||
if(! conditionalStart ) {
|
||||
readyParameter($(icon));
|
||||
}
|
||||
});
|
||||
|
||||
// Augment hidden fields with icons.
|
||||
// http://stackoverflow.com/a/2088430
|
||||
$(function(){
|
||||
$(".multi-mode").each(function(){
|
||||
if($(this).val() == "matched") {
|
||||
$(this).closest('.form-row').children('label').append($('<span class="icon-button link mode-icon" title="This input is linked and will be run in matched order with other input datasets (ex: use this for matching forward and reverse reads)."></span>')
|
||||
.attr({id:$(this).attr("id")})
|
||||
.css("display", $(this).css("display"))
|
||||
.tooltip({placement: 'bottom'}));
|
||||
} else {
|
||||
$(this).closest('.form-row').children('label').append($('<span class="icon-button link-broken mode-icon" title="This input is not linked and each selection will be run against *all* other inputs."></span>')
|
||||
.attr({id:$(this).attr("id")})
|
||||
.css("display", $(this).css("display"))
|
||||
.tooltip({placement: 'bottom'}));
|
||||
}
|
||||
});
|
||||
$("span.mode-icon").click(function(){
|
||||
i= $(this).closest('.form-row').find("input[type=hidden]");
|
||||
if($(this).hasClass("link")) {
|
||||
$(this).removeClass("link").addClass("link-broken");
|
||||
$(i).val("product");
|
||||
} else {
|
||||
$(this).removeClass("link-broken").addClass("link");
|
||||
$(i).val("matched");
|
||||
}
|
||||
});
|
||||
});
|
||||
$("#tool_form").preventDoubleSubmission().submit(function(e) {
|
||||
var matchLength = -1;
|
||||
$('span.multiinput_wrap select[name*="|input"]').each(function() {
|
||||
var value = $(this).val();
|
||||
if(value instanceof Array) {
|
||||
// Multi-value
|
||||
if($(this).siblings("input[type=hidden]").val() == "matched") {
|
||||
var length = $(this).val().length;
|
||||
if(matchLength == -1) {
|
||||
matchLength = length;
|
||||
} else if(length != matchLength) {
|
||||
e.preventDefault();
|
||||
alert("Linked inputs must be submitted in equal number.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return true;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
|
||||
<%def name="stylesheets()">
|
||||
${parent.stylesheets()}
|
||||
${h.css( "autocomplete_tagging" )}
|
||||
<style type="text/css">
|
||||
#new_history_p{
|
||||
line-height:2.5em;
|
||||
margin:0em 0em .5em 0em;
|
||||
}
|
||||
#new_history_cbx{
|
||||
margin-right:.5em;
|
||||
}
|
||||
#new_history_input{
|
||||
display:none;
|
||||
line-height:1em;
|
||||
}
|
||||
#ec_button_container{
|
||||
float:right;
|
||||
}
|
||||
div.toolForm{
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
div.toolFormTitle{
|
||||
cursor:pointer;
|
||||
}
|
||||
.title_ul_text{
|
||||
text-decoration:underline;
|
||||
}
|
||||
.step-annotation {
|
||||
margin-top: 0.25em;
|
||||
font-weight: normal;
|
||||
font-size: 97%;
|
||||
}
|
||||
.workflow-annotation {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.editable {
|
||||
display: none;
|
||||
}
|
||||
.editable-param {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.workflow-edit-button-editing {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.workflow-edit-button-default {
|
||||
color: Gray;
|
||||
}
|
||||
|
||||
.workflow-edit-button:hover {
|
||||
color: green; // TODO: Use a history panel green.
|
||||
}
|
||||
|
||||
</style>
|
||||
</%def>
|
||||
|
||||
<%
|
||||
from galaxy.tools.parameters.basic import DataCollectionToolParameter, DataToolParameter, RuntimeValue
|
||||
from galaxy.jobs.actions.post import ActionBox
|
||||
import re
|
||||
import colorsys
|
||||
import random
|
||||
from six import string_types
|
||||
|
||||
def get_wf_parms(v, wf_parms):
|
||||
if isinstance(v, dict):
|
||||
[ get_wf_parms(value, wf_parms) for value in v.values() ]
|
||||
elif isinstance(v, string_types):
|
||||
for rematch in re.findall('\$\{.+?\}', v):
|
||||
if rematch[2:-1] not in wf_parms:
|
||||
wf_parms[rematch[2:-1]] = ""
|
||||
|
||||
used_accumulator = []
|
||||
wf_parms = {}
|
||||
|
||||
for step in steps:
|
||||
for v in [ActionBox.get_short_str(pja) for pja in step.post_job_actions] + step.state.inputs.values():
|
||||
get_wf_parms(v, wf_parms)
|
||||
|
||||
if wf_parms:
|
||||
hue_offset = 1.0 / len(wf_parms)
|
||||
hue = 0.0
|
||||
for k in wf_parms.iterkeys():
|
||||
wf_parms[k] = "#%X%X%X" % tuple([int(x * 255) for x in colorsys.hsv_to_rgb(hue, .1, .9)])
|
||||
hue += hue_offset
|
||||
%>
|
||||
|
||||
<%def name="do_inputs( inputs, values, errors, prefix, step, other_values = None, already_used = None )">
|
||||
<%
|
||||
from galaxy.util.expressions import ExpressionContext
|
||||
other_values = ExpressionContext( values, other_values )
|
||||
%>
|
||||
%for input_index, input in enumerate( inputs.itervalues() ):
|
||||
%if input.type == "repeat":
|
||||
<div class="repeat-group">
|
||||
<div class="form-title-row"><b>${input.title_plural}</b></div>
|
||||
<% repeat_values = values[input.name] %>
|
||||
%for i in range( len( repeat_values ) ):
|
||||
%if input.name in errors:
|
||||
<% rep_errors = errors[input.name][i] %>
|
||||
%else:
|
||||
<% rep_errors = dict() %>
|
||||
%endif
|
||||
<div class="repeat-group-item">
|
||||
<% index = repeat_values[i]['__index__'] %>
|
||||
<div class="form-title-row"><b>${input.title} ${i + 1}</b></div>
|
||||
${do_inputs( input.inputs, repeat_values[ i ], rep_errors, prefix + input.name + "_" + str(index) + "|", step, other_values, already_used )}
|
||||
## <div class="form-row"><input type="submit" name="${step.id}|${prefix}${input.name}_${i}_remove" value="Remove ${input.title} ${i+1}" /></div>
|
||||
</div>
|
||||
%endfor
|
||||
## <div class="form-row"><input type="submit" name="${step.id}|${prefix}${input.name}_add" value="Add new ${input.title}" /></div>
|
||||
</div>
|
||||
%elif input.type == "conditional":
|
||||
%if input.name == '__job_resource':
|
||||
<% continue %>
|
||||
%endif
|
||||
<% group_values = values[input.name] %>
|
||||
<% current_case = group_values['__current_case__'] %>
|
||||
<% new_prefix = prefix + input.name + "|" %>
|
||||
<% group_errors = errors.get( input.name, {} ) %>
|
||||
<span class="conditional-start"></span>
|
||||
${row_for_param( input.test_param, group_values[ input.test_param.name ], other_values, group_errors, prefix, step, already_used )}
|
||||
${do_inputs( input.cases[ current_case ].inputs, group_values, group_errors, new_prefix, step, other_values, already_used )}
|
||||
%elif input.type == "section":
|
||||
<% group_values = values[input.name] %>
|
||||
<% new_prefix = prefix + input.name + "|" %>
|
||||
<% group_errors = errors.get( input.name, {} ) %>
|
||||
<div class="form-title-row"><b>${input.title}:</b></div>
|
||||
<div class="repeat-group">
|
||||
<div class="repeat-group-item">
|
||||
${do_inputs( input.inputs, group_values, group_errors, new_prefix, step, other_values, already_used )}
|
||||
</div>
|
||||
</div>
|
||||
%else:
|
||||
${row_for_param( input, values[ input.name ], other_values, errors, prefix, step, already_used )}
|
||||
%endif
|
||||
%endfor
|
||||
</%def>
|
||||
|
||||
<%def name="row_for_param( param, value, other_values, error_dict, prefix, step, already_used )">
|
||||
## -- ${param.name} -- ${step.state.inputs} --
|
||||
%if error_dict.has_key( param.name ):
|
||||
<% cls = "form-row form-row-error" %>
|
||||
%else:
|
||||
<% cls = "form-row" %>
|
||||
%endif
|
||||
<div class="${cls}">
|
||||
<label>${param.get_label() | h}</label>
|
||||
<div>
|
||||
%if isinstance( param, DataToolParameter ) or isinstance( param, DataCollectionToolParameter ):
|
||||
%if ( prefix + param.name ) in step.input_connections_by_name:
|
||||
<%
|
||||
conns = step.input_connections_by_name[ prefix + param.name ]
|
||||
if not isinstance(conns, list):
|
||||
conns = [conns]
|
||||
vals = ["Output dataset '%s' from step %d" % (conn.output_name, int(conn.output_step.order_index)+1) for conn in conns]
|
||||
%>
|
||||
${",".join(vals)}
|
||||
%else:
|
||||
## FIXME: Initialize in the controller
|
||||
<%
|
||||
if value is None:
|
||||
value = other_values[ param.name ] = param.get_initial_value( t, other_values )
|
||||
if not enable_unique_defaults:
|
||||
del already_used[:]
|
||||
%>
|
||||
%if step.type in [ 'data_input', 'data_collection_input' ]:
|
||||
##Input Dataset Step, wrap for multiinput.
|
||||
<span class="runtime-form-row">
|
||||
<span class='multiinput_wrap'>
|
||||
<input class="multi-mode" type="hidden" name="${str(step.id)}|multi_mode" id="${str(step.id)}|multi_mode" value="matched" />
|
||||
${param.get_html_field( t, value, other_values ).get_html( str(step.id) + "|" + prefix )}
|
||||
</span>
|
||||
</span>
|
||||
%else:
|
||||
<span class="runtime-form-row">
|
||||
${param.get_html_field( t, value, other_values ).get_html( str(step.id) + "|" + prefix )}
|
||||
</span>
|
||||
%endif
|
||||
|
||||
<input type="hidden" name="${step.id}|__force_update__${prefix}${param.name}" value="true" />
|
||||
%endif
|
||||
%elif isinstance( value, RuntimeValue ) or ( str(step.id) + '|__runtime__' + prefix + param.name ) in incoming:
|
||||
## On the first load we may see a RuntimeValue, so we write
|
||||
## an input field using the initial value for the param.
|
||||
## Subsequents posts will no longer have the runtime value
|
||||
## (since an actualy value will be posted) so we add a hidden
|
||||
## field so we know to continue drawing form for this param.
|
||||
## FIXME: This logic shouldn't be in the template. The
|
||||
## controller should go through the inputs on the first
|
||||
## load, fill in initial values where needed, and mark
|
||||
## all that are runtime modifiable in some way.
|
||||
<%
|
||||
value = other_values[ param.name ] = param.get_initial_value( t, other_values )
|
||||
if not enable_unique_defaults:
|
||||
del already_used[:]
|
||||
%>
|
||||
<span class="runtime-form-row">
|
||||
${param.get_html_field( t, value, other_values ).get_html( str(step.id) + "|" + prefix )}
|
||||
<input type="hidden" name="${step.id}|__runtime__${prefix}${param.name}" value="true" />
|
||||
</span>
|
||||
%else:
|
||||
<%
|
||||
p_text = param.value_to_display_text( value, app )
|
||||
replacements = []
|
||||
if isinstance(p_text, basestring):
|
||||
for rematch in re.findall('\$\{.+?\}', p_text):
|
||||
if rematch[2:-1] in wf_parms:
|
||||
replacements.append('wf_parm__%s' % rematch[2:-1])
|
||||
p_text = p_text.replace(rematch, '<span style="background-color:%s" class="runtime-form-row wfpspan wf_parm__%s">%s</span>' % (wf_parms[rematch[2:-1]], rematch[2:-1], rematch[2:-1]))
|
||||
%>
|
||||
%if replacements:
|
||||
<span style="display:none" class="parm_wrap ${' '.join(replacements)}">
|
||||
${param.get_html_field( t, value, other_values ).get_html( str(step.id) + "|" + prefix )}
|
||||
</span>
|
||||
<span class="p_text_wrapper">${p_text}</span>
|
||||
<input type="hidden" name="${step.id}|__runtime__${prefix}${param.name}" value="true" />
|
||||
%else:
|
||||
<span class="workflow_parameters">
|
||||
<span class="uneditable_field">
|
||||
${param.value_to_display_text( value, app ) | h}
|
||||
</span>
|
||||
<span class="editable_field">
|
||||
<span class="editable">
|
||||
</span>
|
||||
|
||||
<i class="fa workflow-edit-button"></i>
|
||||
</span>
|
||||
<span class="editable-param">
|
||||
<!-- Pristine variant of param, this will be cloned
|
||||
and modified when the user opts to make this
|
||||
editable.
|
||||
-->
|
||||
${param.get_html_field( t, value, other_values).get_html( str(step.id) + "|"+ "editable" + "|" + prefix )}
|
||||
</span>
|
||||
</span>
|
||||
%endif
|
||||
%endif
|
||||
</div>
|
||||
%if step.upgrade_messages and param.name in step.upgrade_messages:
|
||||
<div class="warningmark">${step.upgrade_messages[param.name]}</div>
|
||||
%endif
|
||||
%if error_dict.has_key( param.name ):
|
||||
<div style="color: red; font-weight: bold; padding-top: 1px; padding-bottom: 3px;">
|
||||
<div style="width: 300px;"><img style="vertical-align: middle;" src="${h.url_for('/static/style/error_small.png')}"> <span style="vertical-align: middle;">${error_dict[param.name]}</span></div>
|
||||
</div>
|
||||
%endif
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
<div id='ec_button_container'>
|
||||
<span class="action-button" id="show_all_tool_body">Expand All</span>
|
||||
<span class="action-button" id="hide_all_tool_body">Collapse</span>
|
||||
</div>
|
||||
|
||||
<h2>Running workflow "${h.to_unicode( workflow.name ) | h}"</h2>
|
||||
|
||||
%if has_upgrade_messages:
|
||||
<div class="warningmessage">
|
||||
Warning: Some tools in this workflow have changed since it was last saved. The workflow may still run, but any new options will have default values.
|
||||
Please review the messages below to make a decision about whether the changes will affect your analysis.
|
||||
</div>
|
||||
%endif
|
||||
|
||||
%if step_version_changes:
|
||||
<div class="infomessage">
|
||||
The following tools are being executed with a different version from
|
||||
what was available when this workflow was last saved because the
|
||||
previous version is no longer available for use on this galaxy
|
||||
instance.
|
||||
To upgrade your workflow and dismiss this message simply edit the
|
||||
workflow and re-save it to update the stored tool version.
|
||||
<ul>
|
||||
%for vc in step_version_changes:
|
||||
<li>${vc}</li>
|
||||
%endfor
|
||||
</ul>
|
||||
</div>
|
||||
%endif
|
||||
|
||||
%if workflow.annotation:
|
||||
<div class="workflow-annotation">${workflow.annotation}</div>
|
||||
<hr/>
|
||||
%endif
|
||||
|
||||
<form id="tool_form" name="tool_form" method="POST">
|
||||
## <input type="hidden" name="workflow_name" value="${h.to_unicode( workflow.name ) | h}" />
|
||||
|
||||
%if wf_parms:
|
||||
<div class="metadataForm">
|
||||
<div class="metadataFormTitle">Workflow Parameters</div>
|
||||
<div class="metadataFormBody">
|
||||
%for parm in wf_parms:
|
||||
<div class='form-row'><label>${parm}<br/><input size=40 style="border:2px solid ${wf_parms[parm]};border-left-width:8px;" type="text" class='wf_parm_input ptag_${parm}' name="wf_parm|${parm}" value=""/></label></div>
|
||||
%endfor
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
// Set the change hooks for workflow parameters.
|
||||
$(document).ready(function () {
|
||||
$('.wf_parm_input').bind('change keypress keyup', function(event){
|
||||
// DBTODO This is probably not reliable. Ensure we have the right class.
|
||||
var new_text = $(this).val();
|
||||
if (new_text === ''){
|
||||
var tag_id = $(this).attr("class").split(' ')[1].substring(5);
|
||||
// Set text properly.
|
||||
$('.wfpspan.wf_parm__'+tag_id).text(tag_id);
|
||||
}else{
|
||||
var tag_id = $(this).attr("class").split(' ')[1].substring(5);
|
||||
// Set text properly.
|
||||
$('.wfpspan.wf_parm__'+tag_id).text(new_text);
|
||||
// Now set the hidden input to the generated text.
|
||||
$('.wfpspan.wf_parm__'+tag_id).not('.pja_wfp').each(function(){
|
||||
var new_text = $(this).parent().text();
|
||||
$(this).parent().siblings().children().val(new_text);
|
||||
});
|
||||
}
|
||||
${h.js("libs/bibtex", "libs/jquery/jquery-ui")}
|
||||
${h.css('jquery-ui/smoothness/jquery-ui')}
|
||||
<script>
|
||||
require(['mvc/tool/tool-form-composite'], function( ToolForm ) {
|
||||
$(function() {
|
||||
var form = new ToolForm.View(${ h.dumps( workflow_dict ) });
|
||||
});
|
||||
});
|
||||
</script>
|
||||
%endif
|
||||
<%
|
||||
import base64
|
||||
%>
|
||||
%for i, step in enumerate( steps ):
|
||||
<!-- Only way module would be missing is if tool is missing, but
|
||||
that would cause missing_tools.mako to render instead of this
|
||||
template. -->
|
||||
<% module = step.module %>
|
||||
<input type="hidden" name="${step.id}|tool_state" value="${base64.b64encode( module.get_state( step.state ))}">
|
||||
%if step.type == 'tool' or step.type is None:
|
||||
<%
|
||||
tool = trans.app.toolbox.get_tool( step.tool_id )
|
||||
%>
|
||||
<div class="toolForm">
|
||||
<div class="toolFormTitle">
|
||||
<span class='title_ul_text'>Step ${int(step.order_index)+1}: ${tool.name}</span>
|
||||
%if tool.version:
|
||||
(version ${tool.version})
|
||||
%endif
|
||||
% if step.annotations:
|
||||
<div class="step-annotation">${h.to_unicode( step.annotations[0].annotation )}</div>
|
||||
% endif
|
||||
</div>
|
||||
<div class="toolFormBody">
|
||||
${do_inputs( tool.inputs, step.state.inputs, errors.get( step.id, dict() ), "", step, None, used_accumulator )}
|
||||
% if step.post_job_actions:
|
||||
<hr/>
|
||||
<div class='form-row'>
|
||||
% if len(step.post_job_actions) > 1:
|
||||
<label>Actions:</label>
|
||||
% else:
|
||||
<label>Action:</label>
|
||||
% endif
|
||||
<%
|
||||
pja_ss_all = []
|
||||
for pja_ss in [ActionBox.get_short_str(pja) for pja in step.post_job_actions]:
|
||||
for rematch in re.findall('\$\{.+?\}', pja_ss):
|
||||
pja_ss = pja_ss.replace(rematch, '<span style="background-color:%s" class="wfpspan wf_parm__%s pja_wfp">%s</span>' % (wf_parms[rematch[2:-1]],
|
||||
rematch[2:-1],
|
||||
rematch[2:-1]))
|
||||
pja_ss_all.append(pja_ss)
|
||||
%>
|
||||
${'<br/>'.join(pja_ss_all)}
|
||||
</div>
|
||||
% endif
|
||||
</div>
|
||||
</div>
|
||||
%else:
|
||||
<div class="toolForm">
|
||||
<div class="toolFormTitle">
|
||||
<span class='title_ul_text'>Step ${int(step.order_index)+1}: ${module.name | h}</span>
|
||||
% if step.annotations:
|
||||
<div class="step-annotation">${step.annotations[0].annotation}</div>
|
||||
% endif
|
||||
</div>
|
||||
<div class="toolFormBody">
|
||||
${do_inputs( module.get_runtime_inputs( connections=step.output_connections ), step.state.inputs, errors.get( step.id, dict() ), "", step, None, used_accumulator )}
|
||||
</div>
|
||||
</div>
|
||||
%endif
|
||||
%endfor
|
||||
%if history_id is None:
|
||||
<p id='new_history_p'>
|
||||
<input type="checkbox" name='new_history' value="true" id='new_history_cbx'/><label for='new_history_cbx'>Send results to a new history </label>
|
||||
<span id="new_history_input">named: <input type='text' name='new_history_name' value='${ h.to_unicode( workflow.name ) | h }'/></span>
|
||||
</p>
|
||||
%endif
|
||||
<input type="submit" class="btn btn-primary" name="run_workflow" value="Run workflow" />
|
||||
</form>
|
||||
%endif
|
||||
</script>
|
||||
@@ -1,46 +0,0 @@
|
||||
<%inherit file="/base.mako"/>
|
||||
<%page expression_filter="h"/>
|
||||
|
||||
<div class="donemessagelarge">
|
||||
%if scheduled:
|
||||
Successfully ran workflow "${util.unicodify( workflow.name )}". The following datasets have been added to the queue:
|
||||
%for invocation in invocations:
|
||||
<div class="workflow-invocation-complete">
|
||||
%if invocation['new_history']:
|
||||
<%
|
||||
encoded_new_history = trans.security.encode_id(invocation['new_history'].id)
|
||||
%>
|
||||
<p>These datasets will appear in a new history:
|
||||
<a class='new-history-link' data-history-id="${encoded_new_history}" target='_top' href="${h.url_for( controller='history', action='switch_to_history', hist_id=encoded_new_history ) | n}">
|
||||
'${h.to_unicode(invocation['new_history'].name)}'.
|
||||
</a></p>
|
||||
%endif
|
||||
<div style="padding-left: 10px;">
|
||||
%for step_outputs in invocation['outputs'].itervalues():
|
||||
%for data in step_outputs.itervalues():
|
||||
%if not invocation['new_history'] or data.history == invocation['new_history']:
|
||||
<p><strong>${data.hid}</strong>: ${util.unicodify( data.name )}</p>
|
||||
%endif
|
||||
%endfor
|
||||
%endfor
|
||||
</div>
|
||||
</div>
|
||||
%endfor
|
||||
%else:
|
||||
The requested workflows have been queued and datasets will appear
|
||||
as jobs are created - you will need to refresh your history panel
|
||||
to see these.
|
||||
%endif
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
if(parent.Galaxy && parent.Galaxy.currHistoryPanel){
|
||||
parent.Galaxy.currHistoryPanel.refreshContents();
|
||||
}
|
||||
$('a.new-history-link').click(function(event){
|
||||
if(parent.Galaxy && parent.Galaxy.currHistoryPanel){
|
||||
event.preventDefault();
|
||||
parent.Galaxy.currHistoryPanel.switchToHistory($(this).data('history-id'));
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -6,7 +6,7 @@
|
||||
from galaxy.util.expressions import ExpressionContext
|
||||
from galaxy import util
|
||||
from galaxy.tools.parameters.basic import DataToolParameter, ColumnListParameter, GenomeBuildParameter, SelectToolParameter
|
||||
from galaxy.web.form_builder import SelectField
|
||||
from galaxy.web.form_builder import SelectField, TextField
|
||||
%>
|
||||
|
||||
<html>
|
||||
@@ -95,8 +95,8 @@
|
||||
field.add_option( "Dynamically generated from old-style Dynamic Options.", "none" )
|
||||
field_html = field.get_html( prefix )
|
||||
else:
|
||||
field = param.get_html_field( trans, None, other_values )
|
||||
field_html = field.get_html( prefix )
|
||||
field = TextField( param.name, value="Parameter type: %s" % param.type )
|
||||
field_html = field.get_html( prefix, disabled=True )
|
||||
%>
|
||||
<div class="form-row">
|
||||
%if label:
|
||||
|
||||
@@ -12,8 +12,9 @@ define([ 'test-app', 'mvc/form/form-input', 'mvc/ui/ui-misc', 'mvc/form/form-dat
|
||||
} );
|
||||
|
||||
test( 'tool-form', function() {
|
||||
var form = new ToolForm.View( { id: 'test' } );
|
||||
$( 'body' ).prepend( form.$el );
|
||||
var toolform = new ToolForm.View( { id: 'test' } );
|
||||
var form = toolform.form;
|
||||
$( 'body' ).prepend( toolform.$el );
|
||||
window.fakeserver.respond();
|
||||
ok( form.$( '.portlet-title-text' ).html() == '<b>_name</b> _description (Galaxy Version _version)', 'Title correct' );
|
||||
var tour_ids = [];
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import imp
|
||||
import os
|
||||
test_utils = imp.load_source( 'test_utils',
|
||||
os.path.join( os.path.dirname( __file__), '../unittest_utils/utility.py' ) )
|
||||
import galaxy_mock
|
||||
from galaxy import model
|
||||
from galaxy.util import bunch
|
||||
|
||||
from .test_parameter_parsing import BaseParameterTestCase
|
||||
|
||||
|
||||
@@ -35,17 +39,14 @@ class DataToolParameterTestCase( BaseParameterTestCase ):
|
||||
hda2 = MockHistoryDatasetAssociation( name="hda2", id=2 )
|
||||
self.stub_active_datasets( hda1, hda2 )
|
||||
field = self._simple_field()
|
||||
assert len( field.options ) == 2
|
||||
assert field.options[ 0 ][ 0 ] == "1: hda1"
|
||||
assert field.options[ 1 ][ 0 ] == "2: hda2"
|
||||
|
||||
assert field.options[ 1 ][ 2 ] # Last one selected
|
||||
assert not field.options[ 0 ][ 2 ] # Others not selected
|
||||
assert len( field[ 'options' ][ 'hda' ] ) == 2
|
||||
assert field[ 'options' ][ 'hda' ][ 0 ][ 'name' ] == "hda2"
|
||||
assert field[ 'options' ][ 'hda' ][ 1 ][ 'name' ] == "hda1"
|
||||
|
||||
hda2.datatype_matches = False
|
||||
field = self._simple_field()
|
||||
assert len( field.options ) == 1
|
||||
assert field.options[ 0 ][ 2 ] is True # Last one selected
|
||||
assert len( field[ 'options' ][ 'hda' ] ) == 1
|
||||
assert field[ 'options' ][ 'hda' ][ 0 ][ 'name' ] == "hda1"
|
||||
|
||||
def test_field_display_hidden_hdas_only_if_selected( self ):
|
||||
hda1 = MockHistoryDatasetAssociation( name="hda1", id=1 )
|
||||
@@ -53,9 +54,9 @@ class DataToolParameterTestCase( BaseParameterTestCase ):
|
||||
self.stub_active_datasets( hda1, hda2 )
|
||||
hda1.visible = False
|
||||
hda2.visible = False
|
||||
field = self._simple_field( value=hda2 )
|
||||
self.assertEquals( len( field.options ), 1 ) # hda1 not an option, not visible or selected
|
||||
assert field.options[ 0 ][ 0 ] == "2: (hidden) hda2"
|
||||
field = self._simple_field( other_values={ "data2" : hda2 } )
|
||||
self.assertEquals( len( field[ 'options' ][ 'hda' ] ), 1 ) # hda1 not an option, not visible or selected
|
||||
assert field[ 'options' ][ 'hda' ][ 0 ][ 'name' ] == "(unavailable) hda2"
|
||||
|
||||
def test_field_implicit_conversion_new( self ):
|
||||
hda1 = MockHistoryDatasetAssociation( name="hda1", id=1 )
|
||||
@@ -63,9 +64,9 @@ class DataToolParameterTestCase( BaseParameterTestCase ):
|
||||
hda1.conversion_destination = ( "tabular", None )
|
||||
self.stub_active_datasets( hda1 )
|
||||
field = self._simple_field()
|
||||
assert len( field.options ) == 1
|
||||
assert field.options[ 0 ][ 0 ] == "1: (as tabular) hda1"
|
||||
assert field.options[ 0 ][ 1 ] == 1
|
||||
assert len( field[ 'options' ][ 'hda' ] ) == 1
|
||||
assert field[ 'options' ][ 'hda' ][ 0 ][ 'name' ] == "hda1 (as tabular)"
|
||||
assert field[ 'options' ][ 'hda' ][ 0 ][ 'hid' ] == 1
|
||||
|
||||
def test_field_implicit_conversion_existing( self ):
|
||||
hda1 = MockHistoryDatasetAssociation( name="hda1", id=1 )
|
||||
@@ -73,29 +74,26 @@ class DataToolParameterTestCase( BaseParameterTestCase ):
|
||||
hda1.conversion_destination = ( "tabular", MockHistoryDatasetAssociation( name="hda1converted", id=2 ) )
|
||||
self.stub_active_datasets( hda1 )
|
||||
field = self._simple_field()
|
||||
assert len( field.options ) == 1
|
||||
assert field.options[ 0 ][ 0 ] == "1: (as tabular) hda1"
|
||||
assert len( field[ 'options' ][ 'hda' ] ) == 1
|
||||
assert field[ 'options' ][ 'hda' ][ 0 ][ 'name' ] == "hda1 (as tabular)"
|
||||
# This is difference with previous test, value is existing
|
||||
# hda id not new one.
|
||||
assert field.options[ 0 ][ 1 ] == 2
|
||||
assert field[ 'options' ][ 'hda' ][ 0 ][ 'hid' ] == 2
|
||||
|
||||
def test_field_multiple( self ):
|
||||
self.multiple = True
|
||||
field = self._simple_field()
|
||||
assert field.multiple
|
||||
assert field[ 'multiple' ]
|
||||
|
||||
def test_field_empty_selection( self ):
|
||||
field = self._simple_field()
|
||||
assert len( field.options ) == 0
|
||||
assert len( field[ 'options' ][ 'hda' ] ) == 0
|
||||
assert len( field[ 'options' ][ 'hdca' ] ) == 0
|
||||
|
||||
def test_field_empty_selection_optional( self ):
|
||||
self.optional = True
|
||||
field = self._simple_field()
|
||||
assert len( field.options ) == 1
|
||||
option = field.options[ 0 ]
|
||||
assert option[ 0 ] == "Selection is Optional"
|
||||
assert option[ 1 ] == "None"
|
||||
assert option[ 2 ] is True
|
||||
assert field[ 'optional' ]
|
||||
|
||||
def test_get_initial_value( self ):
|
||||
hda1 = MockHistoryDatasetAssociation( name="hda1", id=1 )
|
||||
@@ -146,14 +144,7 @@ class DataToolParameterTestCase( BaseParameterTestCase ):
|
||||
self.test_history = model.History()
|
||||
self.app.model.context.add( self.test_history )
|
||||
self.app.model.context.flush()
|
||||
self.trans = bunch.Bunch(
|
||||
app=self.app,
|
||||
get_history=lambda **k: self.test_history,
|
||||
get_current_user_roles=lambda: [],
|
||||
workflow_building_mode=False,
|
||||
webapp=bunch.Bunch( name="galaxy" ),
|
||||
history=self.test_history,
|
||||
)
|
||||
self.trans = galaxy_mock.MockTrans( history=self.test_history )
|
||||
self.multiple = False
|
||||
self.optional = False
|
||||
self._param = None
|
||||
@@ -162,10 +153,7 @@ class DataToolParameterTestCase( BaseParameterTestCase ):
|
||||
self.test_history._active_datasets_children_and_roles = hdas
|
||||
|
||||
def _simple_field( self, **kwds ):
|
||||
field = self.param.get_html_field( trans=self.trans, **kwds )
|
||||
if hasattr( field, "primary_field" ):
|
||||
field = field.primary_field
|
||||
return field
|
||||
return self.param.to_dict( trans=self.trans, **kwds )
|
||||
|
||||
@property
|
||||
def param( self ):
|
||||
|
||||
@@ -37,13 +37,13 @@ class ParameterParsingTestCase( BaseParameterTestCase ):
|
||||
|
||||
def test_parse_help_and_label(self):
|
||||
param = self._parameter_for(xml="""
|
||||
<param type="text" name="texti" size="8" value="mydefault" label="x" help="y" />
|
||||
<param type="text" name="texti" value="mydefault" label="x" help="y" />
|
||||
""")
|
||||
assert param.label == "x"
|
||||
assert param.help == "y"
|
||||
|
||||
param = self._parameter_for(xml="""
|
||||
<param type="text" name="texti" size="8" value="mydefault">
|
||||
<param type="text" name="texti" value="mydefault">
|
||||
<label>x2</label>
|
||||
<help>y2</help>
|
||||
</param>
|
||||
@@ -53,7 +53,7 @@ class ParameterParsingTestCase( BaseParameterTestCase ):
|
||||
|
||||
def test_parse_sanitizers(self):
|
||||
param = self._parameter_for(xml="""
|
||||
<param type="text" name="texti" size="8" value="mydefault">
|
||||
<param type="text" name="texti" value="mydefault">
|
||||
<sanitizer invalid_char="">
|
||||
<valid initial="string.digits"><add value=","/> </valid>
|
||||
</sanitizer>
|
||||
@@ -66,18 +66,18 @@ class ParameterParsingTestCase( BaseParameterTestCase ):
|
||||
|
||||
def test_parse_optional(self):
|
||||
param = self._parameter_for(xml="""
|
||||
<param type="text" name="texti" size="8" value="mydefault" />
|
||||
<param type="text" name="texti" value="mydefault" />
|
||||
""")
|
||||
assert param.optional is False
|
||||
|
||||
param = self._parameter_for(xml="""
|
||||
<param type="text" name="texti" size="8" value="mydefault" optional="true" />
|
||||
<param type="text" name="texti" value="mydefault" optional="true" />
|
||||
""")
|
||||
assert param.optional is True
|
||||
|
||||
def test_parse_validators(self):
|
||||
param = self._parameter_for(xml="""
|
||||
<param type="text" name="texti" size="8" value="mydefault">
|
||||
<param type="text" name="texti" value="mydefault">
|
||||
<validator type="unspecified_build" message="no genome?" />
|
||||
</param>
|
||||
""")
|
||||
@@ -85,9 +85,8 @@ class ParameterParsingTestCase( BaseParameterTestCase ):
|
||||
|
||||
def test_text_params(self):
|
||||
param = self._parameter_for(xml="""
|
||||
<param type="text" name="texti" size="8" value="mydefault" />
|
||||
<param type="text" name="texti" value="mydefault" />
|
||||
""")
|
||||
assert param.size == "8"
|
||||
assert param.value == "mydefault"
|
||||
assert param.type == "text"
|
||||
assert not param.area
|
||||
@@ -96,7 +95,6 @@ class ParameterParsingTestCase( BaseParameterTestCase ):
|
||||
param = self._parameter_for(xml="""
|
||||
<param type="text" name="textarea" area="true" />
|
||||
""")
|
||||
assert param.size is None
|
||||
assert param.value is None
|
||||
assert param.type == "text"
|
||||
assert param.area
|
||||
@@ -138,11 +136,10 @@ class ParameterParsingTestCase( BaseParameterTestCase ):
|
||||
|
||||
def test_file_params(self):
|
||||
param = self._parameter_for(xml="""
|
||||
<param type="file" name="filep" ajax-upload="true" />
|
||||
<param type="file" name="filep" />
|
||||
""")
|
||||
assert param.name == "filep"
|
||||
assert param.type == "file"
|
||||
assert param.ajax
|
||||
|
||||
def test_ftpfile_params(self):
|
||||
param = self._parameter_for(xml="""
|
||||
|
||||
@@ -110,6 +110,7 @@ class MockTrans( object ):
|
||||
self.model = self.app.model
|
||||
self.webapp = MockWebapp( **kwargs )
|
||||
self.sa_session = self.app.model.session
|
||||
self.workflow_building_mode = False
|
||||
|
||||
self.galaxy_session = None
|
||||
self.__user = user
|
||||
|
||||
Reference in New Issue
Block a user