From 7ea4668ff732f22c0d686ed35fd6ff1a0c431736 Mon Sep 17 00:00:00 2001 From: guerler Date: Tue, 2 Feb 2016 11:53:38 -0500 Subject: [PATCH] Remove former populate_state --- .../scripts/mvc/form/form-parameters.js | 103 ++-- .../galaxy/scripts/mvc/form/form-section.js | 1 - client/galaxy/scripts/utils/utils.js | 13 +- lib/galaxy/tools/__init__.py | 482 +++++------------- lib/galaxy/tools/parameters/__init__.py | 60 +-- lib/galaxy/tools/parameters/basic.py | 6 - lib/galaxy/webapps/galaxy/api/tools.py | 2 +- lib/galaxy/workflow/modules.py | 16 +- static/maps/mvc/form/form-parameters.js.map | 2 +- static/maps/mvc/form/form-section.js.map | 2 +- static/maps/utils/utils.js.map | 2 +- static/scripts/bundled/analysis.bundled.js | 10 +- .../scripts/bundled/analysis.bundled.js.map | 2 +- static/scripts/bundled/libs.bundled.js | 2 +- static/scripts/bundled/libs.bundled.js.map | 2 +- static/scripts/mvc/form/form-parameters.js | 2 +- static/scripts/mvc/form/form-section.js | 2 +- static/scripts/utils/utils.js | 2 +- test/qunit/tests/masthead_tests.js | 1 - 19 files changed, 231 insertions(+), 481 deletions(-) diff --git a/client/galaxy/scripts/mvc/form/form-parameters.js b/client/galaxy/scripts/mvc/form/form-parameters.js index 72d2220579c..567adce09a1 100644 --- a/client/galaxy/scripts/mvc/form/form-parameters.js +++ b/client/galaxy/scripts/mvc/form/form-parameters.js @@ -7,7 +7,7 @@ define(['utils/utils', 'mvc/ui/ui-select-library', 'mvc/ui/ui-select-ftp', 'mvc/ui/ui-color-picker'], - function(Utils, Ui, SelectContent, SelectLibrary, SelectFtp, ColorPicker) { + function( Utils, Ui, SelectContent, SelectLibrary, SelectFtp, ColorPicker ) { // create form view return Backbone.Model.extend({ @@ -31,50 +31,30 @@ define(['utils/utils', 'ftpfile' : '_fieldFtp' }, - // initialize - initialize: function(app, options) { + initialize: function( app, options ) { this.app = app; }, /** Returns an input field for a given field type */ - create: function(input_def) { - // add regular/default value if missing - if (input_def.value === undefined) { - input_def.value = null; - } - if (input_def.default_value === undefined) { - input_def.default_value = input_def.value; - } - - // create field wrapper - var field = null; - var fieldClass = this.types[input_def.type]; - if (fieldClass && typeof(this[fieldClass]) === 'function') { - field = this[fieldClass].call(this, input_def); - } - - // match unavailable field types - if (!field) { + create: function( input_def ) { + var fieldClass = this.types[ input_def.type ]; + var field = typeof( this[ fieldClass ] ) === 'function' ? this[ fieldClass ].call( this, input_def ) : null; + if ( !field ) { this.app.incompatible = true; - if (input_def.options) { - field = this._fieldSelect(input_def); - } else { - field = this._fieldText(input_def); - } + field = input_def.options ? this._fieldSelect( input_def ) : this._fieldText( input_def ); Galaxy.emit.debug('form-parameters::_addRow()', 'Auto matched field type (' + input_def.type + ').'); } - - // set initial field value - input_def.value !== undefined && ( field.value( input_def.value ) ); + input_def.value === undefined && ( input_def.value = null ); + field.value( input_def.value ); return field; }, /** Data input field */ - _fieldData: function(input_def) { + _fieldData: function( input_def ) { var self = this; - return new SelectContent.View(this.app, { + return new SelectContent.View( this.app, { id : 'field-' + input_def.id, extensions : input_def.extensions, optional : input_def.optional, @@ -82,37 +62,33 @@ define(['utils/utils', type : input_def.type, data : input_def.options, onchange : function() { - self.app.trigger('change'); + self.app.trigger( 'change' ); } }); }, /** Select/Checkbox/Radio options field */ - _fieldSelect: function (input_def) { + _fieldSelect: function ( input_def ) { // show text field e.g. in workflow editor if( input_def.is_workflow ) { return this._fieldText( input_def ); } // customize properties - if (input_def.type == 'data_column') { + if ( input_def.type == 'data_column' ) { input_def.error_text = 'Missing columns in referenced dataset.' } // configure options fields var options = []; - for (var i in input_def.options) { - var option = input_def.options[i]; - options.push({ - label: option[0], - value: option[1] - }); - } + _.each( input_def.options, function( option ) { + options.push( { label: option[ 0 ], value: option[ 1 ] } ); + }); // identify display type var SelectClass = Ui.Select; - switch (input_def.display) { + switch ( input_def.display ) { case 'checkboxes': SelectClass = Ui.Checkbox; break; @@ -127,19 +103,18 @@ define(['utils/utils', id : 'field-' + input_def.id, data : options, error_text : input_def.error_text || 'No options available', - optional : input_def.optional && input_def.default_value === null, multiple : input_def.multiple, optional : input_def.optional, searchable : input_def.searchable, onchange : function() { - self.app.trigger('change'); + self.app.trigger( 'change' ); } }); }, /** Drill down options field */ - _fieldDrilldown: function (input_def) { + _fieldDrilldown: function ( input_def ) { // show text field e.g. in workflow editor if( input_def.is_workflow ) { return this._fieldText( input_def ); @@ -152,25 +127,25 @@ define(['utils/utils', data : input_def.options, display : input_def.display, onchange : function() { - self.app.trigger('change'); + self.app.trigger( 'change' ); } }); }, /** Text input field */ - _fieldText: function(input_def) { + _fieldText: function( input_def ) { // field replaces e.g. a select field - if (input_def.options) { + if ( input_def.options ) { input_def.area = input_def.multiple; - if (!Utils.validate(input_def.value)) { + if ( !Utils.validate( input_def.value ) ) { input_def.value = null; } else { - if ($.isArray(input_def.value)) { + if ( $.isArray( input_def.value ) ) { var str_value = ''; - for (var i in input_def.value) { - str_value += String(input_def.value[i]); - if (!input_def.multiple) { + for ( var i in input_def.value ) { + str_value += String( input_def.value[ i ] ); + if ( !input_def.multiple ) { break; } str_value += '\n'; @@ -192,7 +167,7 @@ define(['utils/utils', /** Slider field */ - _fieldSlider: function(input_def) { + _fieldSlider: function( input_def ) { var self = this; return new Ui.Slider.View({ id : 'field-' + input_def.id, @@ -201,14 +176,14 @@ define(['utils/utils', min : input_def.min, max : input_def.max, onchange : function() { - self.app.trigger('change'); + self.app.trigger( 'change' ); } }); }, /** Hidden field */ - _fieldHidden: function(input_def) { + _fieldHidden: function( input_def ) { return new Ui.Hidden({ id : 'field-' + input_def.id, info : input_def.info @@ -217,54 +192,54 @@ define(['utils/utils', /** Boolean field */ - _fieldBoolean: function(input_def) { + _fieldBoolean: function( input_def ) { var self = this; return new Ui.RadioButton.View({ id : 'field-' + input_def.id, data : [ { label : 'Yes', value : 'true' }, { label : 'No', value : 'false' }], onchange : function() { - self.app.trigger('change'); + self.app.trigger( 'change' ); } }); }, /** Color picker field */ - _fieldColor: function(input_def) { + _fieldColor: function( input_def ) { var self = this; return new ColorPicker({ id : 'field-' + input_def.id, onchange : function() { - self.app.trigger('change'); + self.app.trigger( 'change' ); } }); }, /** Library dataset field */ - _fieldLibrary: function(input_def) { + _fieldLibrary: function( input_def ) { var self = this; return new SelectLibrary.View({ id : 'field-' + input_def.id, optional : input_def.optional, multiple : input_def.multiple, onchange : function() { - self.app.trigger('change'); + self.app.trigger( 'change' ); } }); }, /** FTP file field */ - _fieldFtp: function(input_def) { + _fieldFtp: function( input_def ) { var self = this; return new SelectFtp.View({ id : 'field-' + input_def.id, optional : input_def.optional, multiple : input_def.multiple, onchange : function() { - self.app.trigger('change'); + self.app.trigger( 'change' ); } }); } diff --git a/client/galaxy/scripts/mvc/form/form-section.js b/client/galaxy/scripts/mvc/form/form-section.js index f3a37dad204..88c9653f478 100644 --- a/client/galaxy/scripts/mvc/form/form-section.js +++ b/client/galaxy/scripts/mvc/form/form-section.js @@ -231,7 +231,6 @@ define(['utils/utils', name : input_def.name, label : input_def.label || input_def.name, value : input_def.value, - default_value : input_def.default_value, text_value : input_def.text_value || input_def.value, collapsible_value : input_def.collapsible_value, collapsible_preview : input_def.collapsible_preview, diff --git a/client/galaxy/scripts/utils/utils.js b/client/galaxy/scripts/utils/utils.js index e581fbea5bb..cc5e05aa19b 100644 --- a/client/galaxy/scripts/utils/utils.js +++ b/client/galaxy/scripts/utils/utils.js @@ -48,15 +48,12 @@ function sanitize(content) { * usually used for selectable options * @param{String} value - Value or list to be validated */ -function validate (value) { - if (!(value instanceof Array)) { - value = [value]; +function validate ( value ) { + if ( !( value instanceof Array ) ) { + value = [ value ]; } - if (value.length === 0) { - return false; - } - for (var i in value) { - if (['__null__', '__undefined__', null, undefined].indexOf(value[i]) > -1) { + for( var i in value ) { + if ( [ '__null__', '__undefined__', null, undefined ].indexOf( value[ i ] ) > -1 ) { return false; } } diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index aa58c698ed3..a0d1be510ae 100755 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -1108,7 +1108,7 @@ class Tool( object, Dictifiable ): else: input.visit_inputs( "", value[input.name], callback ) - def handle_input( self, trans, incoming, history=None, source='html' ): + def handle_input( self, trans, incoming, history=None ): """ Process incoming parameters for this tool from the dict `incoming`, update the tool state (or create if none existed), and either return @@ -1135,32 +1135,31 @@ class Tool( object, Dictifiable ): if rerun_remap_job_id and len( expanded_incomings ) > 1: raise exceptions.MessageException( 'Failure executing tool (cannot create multiple jobs when remapping existing job).' ) + # Process incoming data validation_timer = ExecutionTimer() all_errors = [] all_params = [] - validate_input = self.get_hook( 'validate_input' ) for expanded_incoming in expanded_incomings: - expanded_state = self.new_state( request_context ) - # Process incoming data + params = {} + errors = {} if not self.check_values: # If `self.check_values` is false we don't do any checking or # processing on input This is used to pass raw values # through to/from external sites. - errors = {} - params = expanded_incoming + state_inputs = expanded_incoming else: # Update state for all inputs on the current page taking new # values from `incoming`. - errors = self.populate_state( request_context, self.inputs, expanded_state.inputs, expanded_incoming, source=source ) + self._populate_state( request_context, self.inputs, expanded_incoming, params, errors ) + # If the tool provides a `validate_input` hook, call it. + validate_input = self.get_hook( 'validate_input' ) if validate_input: - validate_input( trans, errors, expanded_state.inputs, self.inputs ) - params = expanded_state.inputs + validate_input( request_context, errors, params, self.inputs ) all_errors.append( errors ) all_params.append( params ) - log.debug("Validated and populated state for tool request %s" % validation_timer) - # If there were errors, we stay on the same page and display - # error messages + log.debug( 'Validated and populated state for tool request %s' % validation_timer ) + # If there were errors, we stay on the same page and display them if any( all_errors ): raise exceptions.MessageException( err_data=all_errors[ 0 ] ) else: @@ -1175,6 +1174,7 @@ class Tool( object, Dictifiable ): else: raise exceptions.MessageException( execution_tracker.execution_errors[ 0 ] ) + def handle_single_execution( self, trans, rerun_remap_job_id, params, history, mapping_over_collection, execution_cache=None ): """ Return a pair with whether execution is successful as well as either @@ -1199,6 +1199,7 @@ class Tool( object, Dictifiable ): message = 'Failure executing tool (invalid data returned from tool execution)' return False, message + def find_fieldstorage( self, x ): if isinstance( x, FieldStorage ): raise InterruptedUpload( None ) @@ -1207,145 +1208,6 @@ class Tool( object, Dictifiable ): elif isinstance(x, list): [ self.find_fieldstorage( y ) for y in x ] - def populate_state( self, trans, inputs, state, incoming, source="html", prefix="", context=None ): - errors = dict() - # Push this level onto the context stack - context = ExpressionContext( state, context ) - for input in inputs.itervalues(): - key = prefix + input.name - if isinstance( input, Repeat ): - group_state = state[input.name] - # Create list of empty errors for each previously existing state - group_errors = [ ] - any_group_errors = False - rep_index = 0 - del group_state[:] # Clear prepopulated defaults if repeat.min set. - while True: - rep_name = "%s_%d" % ( key, rep_index ) - if not any( [ incoming_key.startswith(rep_name) for incoming_key in incoming.keys() ] ): - break - if rep_index < input.max: - new_state = {} - new_state['__index__'] = rep_index - self.fill_in_new_state( trans, input.inputs, new_state, context ) - group_state.append( new_state ) - group_errors.append( {} ) - rep_errors = self.populate_state( trans, - input.inputs, - new_state, - incoming, - source, - prefix=rep_name + "|", - context=context ) - if rep_errors: - any_group_errors = True - group_errors[rep_index].update( rep_errors ) - - else: - group_errors[-1] = { '__index__': 'Cannot add repeat (max size=%i).' % input.max } - any_group_errors = True - rep_index += 1 - if any_group_errors: - errors[ input.name ] = group_errors - elif isinstance( input, Conditional ): - group_state = state[input.name] - group_prefix = "%s|" % ( key ) - # Deal with the 'test' element and see if its value changed - if input.value_ref and not input.value_ref_in_group: - # We are referencing an existent parameter, which is not - # part of this group - test_param_key = prefix + input.test_param.name - else: - test_param_key = group_prefix + input.test_param.name - # Get value of test param and determine current case - value, test_param_error = check_param_from_incoming( trans, - group_state, - input.test_param, - incoming, - test_param_key, - context, - source ) - - if test_param_error: - errors[ input.name ] = [ test_param_error ] - # Store the value of the test element - group_state[ input.test_param.name ] = value - else: - current_case = input.get_current_case( value, trans ) - # Current case has changed, throw away old state - group_state = state[input.name] = {} - # TODO: we should try to preserve values if we can - self.fill_in_new_state( trans, input.cases[current_case].inputs, group_state, context ) - group_errors = self.populate_state( trans, - input.cases[current_case].inputs, - group_state, - incoming, - source, - prefix=group_prefix, - context=context) - if group_errors: - errors[ input.name ] = group_errors - # Store the current case in a special value - group_state['__current_case__'] = current_case - # Store the value of the test element - group_state[ input.test_param.name ] = value - elif isinstance( input, Section ): - group_state = state[input.name] - group_prefix = "%s|" % ( key ) - self.fill_in_new_state( trans, input.inputs, group_state, context ) - group_errors = self.populate_state( trans, - input.inputs, - group_state, - incoming, - source, - prefix=group_prefix, - context=context ) - if group_errors: - errors[ input.name ] = group_errors - elif isinstance( input, UploadDataset ): - group_state = state[input.name] - group_errors = [] - any_group_errors = False - d_type = input.get_datatype( trans, context ) - writable_files = d_type.writable_files - # remove extra files - while len( group_state ) > len( writable_files ): - del group_state[-1] - - # Add new fileupload as needed - while len( writable_files ) > len( group_state ): - new_state = {} - new_state['__index__'] = len( group_state ) - self.fill_in_new_state( trans, input.inputs, new_state, context ) - group_state.append( new_state ) - if any_group_errors: - group_errors.append( {} ) - - # Update state - for i, rep_state in enumerate( group_state ): - rep_index = rep_state['__index__'] - rep_prefix = "%s_%d|" % ( key, rep_index ) - rep_errors = self.populate_state( trans, - input.inputs, - rep_state, - incoming, - source, - prefix=rep_prefix, - context=context) - if rep_errors: - any_group_errors = True - group_errors.append( rep_errors ) - else: - group_errors.append( {} ) - # Were there *any* errors for any repetition? - if any_group_errors: - errors[input.name] = group_errors - else: - value, error = check_param_from_incoming( trans, state, input, incoming, key, context, source ) - if error: - errors[ input.name ] = error - state[ input.name ] = value - return errors def update_state( self, trans, inputs, state, incoming, source='html', prefix="", context=None, update_only=False, old_errors={}, item_callback=None ): @@ -1663,7 +1525,7 @@ class Tool( object, Dictifiable ): if input.min: messages[ input.name ] = [] for i in range( input.min ): - rep_prefix = prefix + "%s %d > " % ( input.title, i + 1 ) + rep_prefix = prefix + '%s %d > ' % ( input.title, i + 1 ) rep_dict = dict() messages[ input.name ].append( rep_dict ) self.check_and_update_param_values_helper( input.inputs, {}, trans, rep_dict, context, rep_prefix, update_values=update_values ) @@ -1677,13 +1539,13 @@ class Tool( object, Dictifiable ): else: if isinstance( input, Repeat ): for i, d in enumerate( values[ input.name ] ): - rep_prefix = prefix + "%s %d > " % ( input.title, i + 1 ) + rep_prefix = prefix + '%s %d > ' % ( input.title, i + 1 ) self.check_and_update_param_values_helper( input.inputs, d, trans, messages, context, rep_prefix, update_values=update_values ) elif isinstance( input, Conditional ): group_values = values[ input.name ] use_initial_value = False if '__current_case__' in group_values: - if int( group_values['__current_case__'] ) >= len( input.cases ): + if int( group_values[ '__current_case__' ] ) >= len( input.cases ): use_initial_value = True else: use_initial_value = True @@ -1691,11 +1553,11 @@ class Tool( object, Dictifiable ): # No test param invalidates the whole conditional values[ input.name ] = group_values = input.get_initial_value( trans, context ) messages[ input.test_param.name ] = "No value found for '%s%s', using default" % ( prefix, input.test_param.label ) - current_case = group_values['__current_case__'] + current_case = group_values[ '__current_case__' ] for child_input in input.cases[current_case].inputs.itervalues(): messages[ child_input.name ] = "Value no longer valid for '%s%s', replacing with default" % ( prefix, child_input.label ) else: - current = group_values["__current_case__"] + current = group_values[ '__current_case__' ] self.check_and_update_param_values_helper( input.cases[current].inputs, group_values, trans, messages, context, prefix, update_values=update_values ) elif isinstance( input, Section ): messages[ input.name ] = {} @@ -1710,14 +1572,14 @@ class Tool( object, Dictifiable ): else: # skip check if is workflow parameters ck_param = True - search = input.type in ["text"] + search = input.type in [ 'text' ] if trans.workflow_building_mode and contains_workflow_parameter( values[ input.name ], search=search ): ck_param = False # this will fail when a parameter's type has changed to a non-compatible one: e.g. conditional group changed to dataset input if ck_param: input.value_from_basic( input.value_to_basic( value, self.app ), self.app, ignore_errors=False ) except: - log.info("Parameter validation failed.", exc_info=True) + log.info( "Parameter validation failed.", exc_info=True ) messages[ input.name ] = "Value no longer valid for '%s%s', replacing with default" % ( prefix, input.label ) if update_values: values[ input.name ] = input.get_initial_value( trans, context ) @@ -2018,7 +1880,7 @@ class Tool( object, Dictifiable ): # If an admin user, expose the path to the actual tool config XML file. if trans.user_is_admin(): - tool_dict['config_file'] = os.path.abspath(self.config_file) + tool_dict[ 'config_file' ] = os.path.abspath( self.config_file ) # Add link details. if link_details: @@ -2042,11 +1904,11 @@ class Tool( object, Dictifiable ): return tool_dict - def to_json(self, trans, kwd={}, job=None, workflow_mode=False): + def to_json( self, trans, kwd={}, job=None, workflow_mode=False ): """ Recursively creates a tool dictionary containing repeats, dynamic options and updated states. """ - history_id = kwd.get('history_id', None) + history_id = kwd.get( 'history_id', None ) history = None try: if history_id is not None: @@ -2070,7 +1932,7 @@ class Tool( object, Dictifiable ): self._map_source_to_history( request_context, self.inputs, job_params ) tool_message = self._compare_tool_version( job ) params_to_incoming( kwd, self.inputs, job_params, self.app ) - except Exception, e: + except Exception as e: raise exceptions.MessageException( str( e ) ) # create parameter object @@ -2116,7 +1978,7 @@ class Tool( object, Dictifiable ): return None # ensures that input dictionary is jsonifiable - def sanitize(dict, key='value'): + def sanitize( dict, key='value' ): # get current value value = dict[key] if key in dict else None @@ -2138,142 +2000,52 @@ class Tool( object, Dictifiable ): # update and return dict[key] = value - # check the current state of a value and update it if necessary - def check_state( input, value, context ): - error = 'State validation failed.' - if isinstance( value, galaxy.tools.parameters.basic.DummyDataset ): - return [ None, None ] - elif isinstance( value, galaxy.tools.parameters.basic.RuntimeValue ): - return [ { '__class__' : 'RuntimeValue' }, None ] - elif isinstance( value, dict ): - if value.get( '__class__' ) == 'RuntimeValue': - return [ value, None ] - try: - value, error = check_param( request_context, input, value, context, boolean_fix=True ) - except Exception, err: - log.error( 'Checking parameter %s failed. %s', input.name, str( err ) ) - pass - return [ value, error ] - - # populates state with incoming url parameters - def populate_state( inputs, state, errors, incoming, prefix="", context=None ): - context = ExpressionContext(state, context) - for input in inputs.itervalues(): - state[input.name] = input.get_initial_value( request_context, context ) - key = prefix + input.name - if input.type == 'repeat': - group_state = state[input.name] - rep_index = 0 - del group_state[:] - while True: - rep_name = "%s_%d" % (key, rep_index) - if not any([incoming_key.startswith(rep_name) for incoming_key in incoming.keys()]) and rep_index >= input.min: - break - if rep_index < input.max: - new_state = {} - new_state['__index__'] = rep_index - group_state.append(new_state) - populate_state( input.inputs, new_state, errors, incoming, prefix=rep_name + "|", context=context ) - rep_index += 1 - elif input.type == 'conditional': - group_state = state[input.name] - group_prefix = "%s|" % ( key ) - test_param_key = group_prefix + input.test_param.name - default_value = incoming.get(test_param_key, group_state.get(input.test_param.name, None)) - value, error = check_state( input.test_param, default_value, context ) - if error: - errors[test_param_key] = error - else: - try: - current_case = input.get_current_case( value, request_context ) - group_state = state[input.name] = {} - populate_state( input.cases[current_case].inputs, group_state, errors, incoming, prefix=group_prefix, context=context ) - group_state['__current_case__'] = current_case - except Exception: - errors[test_param_key] = 'The selected case is unavailable/invalid.' - pass - group_state[input.test_param.name] = value - elif input.type == 'section': - group_state = state[input.name] - group_prefix = "%s|" % ( key ) - populate_state( input.inputs, group_state, errors, incoming, prefix=group_prefix, context=context ) - else: - default_value = incoming.get(key, state.get(input.name, None)) - value, error = check_state( input, default_value, context ) - if error: - errors[key] = error - state[input.name] = value - - # builds tool model including all attributes - def iterate( group_inputs, inputs, state_inputs, other_values=None ): + # populates model from state + def populate_model( inputs, state_inputs, group_inputs, other_values=None ): other_values = ExpressionContext( state_inputs, other_values ) for input_index, input in enumerate( inputs.itervalues() ): tool_dict = None - group_state = state_inputs.get(input.name, {}) + group_state = state_inputs.get( input.name, {} ) if input.type == 'repeat': tool_dict = input.to_dict( request_context ) - group_cache = tool_dict['cache'] = {} + group_cache = tool_dict[ 'cache' ] = {} for i in range( len( group_state ) ): - group_cache[i] = {} - iterate( group_cache[i], input.inputs, group_state[i], other_values ) + group_cache[ i ] = {} + populate_model( input.inputs, group_state[ i ], group_cache[ i ], other_values ) elif input.type == 'conditional': tool_dict = input.to_dict( request_context ) if 'test_param' in tool_dict: - test_param = tool_dict['test_param'] - test_param['default_value'] = jsonify( input.test_param.get_initial_value( request_context, other_values ) ) - test_param['value'] = jsonify(group_state.get(test_param['name'], test_param['default_value'])) - test_param['text_value'] = input.test_param.value_to_display_text(test_param['value'], self.app) - for i in range(len( tool_dict['cases'] ) ): + test_param = tool_dict[ 'test_param' ] + test_param[ 'value' ] = jsonify( group_state.get( test_param[ 'name' ], input.test_param.get_initial_value( request_context, other_values ) ) ) + test_param[ 'text_value' ] = input.test_param.value_to_display_text( test_param[ 'value' ], self.app ) + for i in range( len( tool_dict['cases'] ) ): current_state = {} - if i == group_state.get('__current_case__', None): + if i == group_state.get( '__current_case__' ): current_state = group_state - iterate( tool_dict['cases'][i]['inputs'], input.cases[i].inputs, current_state, other_values ) + populate_model( input.cases[ i ].inputs, current_state, tool_dict[ 'cases' ][ i ][ 'inputs' ], other_values ) elif input.type == 'section': tool_dict = input.to_dict( request_context ) - iterate( tool_dict['inputs'], input.inputs, group_state, other_values ) + populate_model( tool_dict[ 'inputs' ], input.inputs, group_state, other_values ) else: - # expand input dictionary, resolve dynamic parameters - try: - tool_dict = input.to_dict( request_context, other_values=other_values ) - except Exception: - tool_dict = input.to_dict( request_context ) - log.exception('tools::to_json() - Skipping parameter expansion for %s.' % input.name) - pass - - # backup default value - try: - tool_dict['default_value'] = input.get_initial_value( request_context, other_values ) - except Exception: - tool_dict['default_value'] = None - log.exception('tools::to_json() - Getting initial value failed %s.' % input.name) - pass - - # update input value from tool state - tool_dict['value'] = state_inputs.get(input.name, tool_dict['default_value']) - - # add text value + tool_dict = input.to_dict( request_context, other_values=other_values ) + tool_dict[ 'value' ] = state_inputs.get( input.name, input.get_initial_value( request_context, other_values ) ) tool_dict[ 'text_value' ] = input.value_to_display_text( tool_dict[ 'value' ], self.app ) + sanitize( tool_dict, 'value' ) + group_inputs[ input_index ] = tool_dict - # sanitize values - sanitize(tool_dict, 'value') - sanitize(tool_dict, 'default_value') - - # backup final input dictionary - group_inputs[input_index] = tool_dict - - # sanatization for the final tool state - def sanitize_state(state): + # sanatizes tool state + def sanitize_state( state ): keys = None - if isinstance(state, dict): + if isinstance( state, dict ): keys = state - elif isinstance(state, list): - keys = range( len(state) ) + elif isinstance( state, list ): + keys = range( len( state ) ) if keys: for k in keys: - if isinstance(state[k], dict) or isinstance(state[k], list): - sanitize_state(state[k]) + if isinstance( state[ k ], dict ) or isinstance( state[ k ], list ): + sanitize_state( state[ k ] ) else: - state[k] = jsonify(state[k]) + state[ k ] = jsonify( state[ k ] ) # expand incoming parameters (parameters might trigger multiple tool executions, # here we select the first execution only in order to resolve dynamic parameters) @@ -2284,75 +2056,110 @@ class Tool( object, Dictifiable ): if self.input_translator: self.input_translator.translate( params ) - # initialize and populate tool state + # create tool state state_inputs = {} state_errors = {} - populate_state( self.inputs, state_inputs, state_errors, params.__dict__ ) + self._populate_state( request_context, self.inputs, params.__dict__, state_inputs, state_errors ) - # create basic tool model + # create tool model tool_model = self.to_dict( request_context ) - tool_model['inputs'] = {} - - # build tool model and tool state - iterate( tool_model['inputs'], self.inputs, state_inputs, '' ) + tool_model[ 'inputs' ] = {} + populate_model( self.inputs, state_inputs, tool_model[ 'inputs' ] ) # sanitize tool state - sanitize_state(state_inputs) + sanitize_state( state_inputs ) - # load tool help + # create tool help tool_help = '' if self.help: - tool_help = self.help - tool_help = tool_help.render( static_path=url_for( '/static' ), host_url=url_for('/', qualified=True) ) + tool_help = self.help.render( static_path=url_for( '/static' ), host_url=url_for( '/', qualified=True ) ) if type( tool_help ) is not unicode: - tool_help = unicode( tool_help, 'utf-8') + tool_help = unicode( tool_help, 'utf-8' ) - # check if citations exist - tool_citations = False - if self.citations: - tool_citations = True - - # get tool versions + # create tool versions tool_versions = [] - tools = self.app.toolbox.get_loaded_tools_by_lineage(self.id) + tools = self.app.toolbox.get_loaded_tools_by_lineage( self.id ) for t in tools: if t.version not in tool_versions: - tool_versions.append(t.version) + tool_versions.append( t.version ) - # add information with underlying requirements and their versions - tool_requirements = [] - if self.requirements: - for requirement in self.requirements: - tool_requirements.append({ - 'name' : requirement.name, - 'version' : requirement.version - }) - - # add toolshed url - sharable_url = None - if self.tool_shed_repository: - sharable_url = self.tool_shed_repository.get_sharable_url( self.app ) - - # add additional properties + # update tool model tool_model.update({ 'id' : self.id, 'help' : tool_help, - 'citations' : tool_citations, + 'citations' : bool( self.citations ), 'biostar_url' : self.app.config.biostar_url, - 'sharable_url' : sharable_url, + 'sharable_url' : self.tool_shed_repository.get_sharable_url( self.app ) if self.tool_shed_repository else None, 'message' : tool_message, 'versions' : tool_versions, - 'requirements' : tool_requirements, + 'requirements' : [ { 'name' : r.name, 'version' : r.version } for r in self.requirements ], 'errors' : state_errors, 'state_inputs' : state_inputs, 'job_id' : trans.security.encode_id( job.id ) if job else None, 'job_remap' : self._get_job_remap( job ), 'history_id' : trans.security.encode_id( history.id ) }) - - # return enriched tool model return tool_model + # populates state from incoming parameters + def _populate_state( self, request_context, inputs, incoming, state, errors, prefix='', context=None ): + context = ExpressionContext( state, context ) + for input in inputs.itervalues(): + state[ input.name ] = input.get_initial_value( request_context, context ) + key = prefix + input.name + group_state = state[ input.name ] + group_prefix = '%s|' % ( key ) + if input.type == 'repeat': + rep_index = 0 + del group_state[:] + while True: + rep_prefix = '%s_%d' % ( key, rep_index ) + if not any( [ incoming_key.startswith( rep_prefix ) for incoming_key in incoming.keys() ] ) and rep_index >= input.min: + break + if rep_index < input.max: + new_state = { '__index__' : rep_index } + group_state.append( new_state ) + self._populate_state( request_context, input.inputs, incoming, new_state, errors, prefix=rep_prefix + '|', context=context ) + rep_index += 1 + elif input.type == 'conditional': + test_param_key = group_prefix + input.test_param.name + test_param_value = incoming.get( test_param_key, group_state.get( input.test_param.name ) ) + value, error = check_param( request_context, input.test_param, test_param_value, context ) + if error: + errors[ test_param_key ] = error + else: + try: + current_case = input.get_current_case( value, request_context ) + group_state = state[ input.name ] = {} + self._populate_state( request_context, input.cases[ current_case ].inputs, incoming, group_state, errors, prefix=group_prefix, context=context ) + group_state[ '__current_case__' ] = current_case + except Exception: + errors[ test_param_key ] = 'The selected case is unavailable/invalid.' + pass + group_state[ input.test_param.name ] = value + elif input.type == 'section': + self._populate_state( request_context, input.inputs, incoming, group_state, errors, prefix=group_prefix, context=context ) + elif input.type == 'upload_dataset': + d_type = input.get_datatype( request_context, context=context ) + writable_files = d_type.writable_files + while len( group_state ) > len( writable_files ): + del group_state[ -1 ] + while len( writable_files ) > len( group_state ): + new_state = { '__index__' : len( group_state ) } + for upload_item in input.inputs.itervalues(): + new_state[ upload_item.name ] = upload_item.get_initial_value( request_context, context ) + group_state.append( new_state ) + for i, rep_state in enumerate( group_state ): + rep_index = rep_state[ '__index__' ] + rep_prefix = '%s_%d|' % ( key, rep_index ) + self._populate_state( request_context, input.inputs, incoming, rep_state, errors, prefix=rep_prefix, context=context ) + else: + param_value = incoming.get( key, state.get( input.name ) ) + value, error = check_param( request_context, input, param_value, context ) + if error: + errors[ key ] = error + state[ input.name ] = value + def _get_job_remap( self, job): if job: if job.state == job.states.ERROR: @@ -2373,28 +2180,28 @@ class Tool( object, Dictifiable ): # Create index for hdas. hda_source_dict = {} for hda in history.datasets: - key = '%s_%s' % (hda.hid, hda.dataset.id) + key = '%s_%s' % ( hda.hid, hda.dataset.id ) hda_source_dict[ hda.dataset.id ] = hda_source_dict[ key ] = hda # Ditto for dataset collections. hdca_source_dict = {} for hdca in history.dataset_collections: - key = '%s_%s' % (hdca.hid, hdca.collection.id) + key = '%s_%s' % ( hdca.hid, hdca.collection.id ) hdca_source_dict[ hdca.collection.id ] = hdca_source_dict[ key ] = hdca # Map dataset or collection to current history - def map_to_history(value): + def map_to_history( value ): id = None source = None - if isinstance(value, self.app.model.HistoryDatasetAssociation): + if isinstance( value, self.app.model.HistoryDatasetAssociation ): id = value.dataset.id source = hda_source_dict - elif isinstance(value, self.app.model.HistoryDatasetCollectionAssociation): + elif isinstance( value, self.app.model.HistoryDatasetCollectionAssociation ): id = value.collection.id source = hdca_source_dict else: return None - key = '%s_%s' % (value.hid, id) + key = '%s_%s' % ( value.hid, id ) if key in source: return source[ key ] elif id in source: @@ -2442,16 +2249,15 @@ class Tool( object, Dictifiable ): else: message += 'You can re-run the job with this tool version, which is a different version of the original tool.' else: - new_tool_shed_url = tool.tool_shed_repository.get_sharable_url( tool.app ) + '/%s/' % tool.tool_shed_repository.changeset_revision - old_tool_shed = tool_id.split( "/repos/" )[0] - old_tool_shed_url = common_util.get_tool_shed_url_from_tool_shed_registry( self.app, old_tool_shed ) - old_tool_shed_url = old_tool_shed_url + "/view/%s/%s/" % (tool.repository_owner, tool.repository_name) - message = 'This job was run with tool id \"%s\", version "%s", which is not available. ' % (old_tool_shed_url, tool_id, tool_version) + new_tool_shed_url = '%s/%s/' % ( tool.tool_shed_repository.get_sharable_url( tool.app ), tool.tool_shed_repository.changeset_revision ) + old_tool_shed_url = common_util.get_tool_shed_url_from_tool_shed_registry( self.app, tool_id.split( '/repos/' )[ 0 ] ) + old_tool_shed_url = '%s/view/%s/%s/' % ( old_tool_shed_url, tool.repository_owner, tool.repository_name ) + message = 'This job was run with tool id \"%s\", version "%s", which is not available. ' % ( old_tool_shed_url, tool_id, tool_version ) if len( tools ) > 1: - message += 'You can re-run the job with the selected tool id \"%s\" or choose another derivation of the tool.' % (new_tool_shed_url, self.id) + message += 'You can re-run the job with the selected tool id \"%s\" or choose another derivation of the tool.' % ( new_tool_shed_url, self.id ) else: - message += 'You can re-run the job with tool id \"%s\", which is a derivation of the original tool.' % (new_tool_shed_url, self.id) - except Exception, e: + message += 'You can re-run the job with tool id \"%s\", which is a derivation of the original tool.' % ( new_tool_shed_url, self.id ) + except Exception as e: raise exceptions.MessageException( str( e ) ) return message @@ -2787,18 +2593,6 @@ def json_fix( val ): return val -def check_param_from_incoming( trans, state, input, incoming, key, context, source ): - """ - Unlike "update" state, this preserves default if no incoming value found. - This lets API user specify just a subset of params and allow defaults to be - used when available. - """ - default_input_value = state.get( input.name, None ) - incoming_value = get_incoming_value( incoming, key, default_input_value ) - value, error = check_param( trans, input, incoming_value, context, source=source ) - return value, error - - def get_incoming_value( incoming, key, default ): """ Fetch value from incoming dict directly or check special nginx upload diff --git a/lib/galaxy/tools/parameters/__init__.py b/lib/galaxy/tools/parameters/__init__.py index c05063b7d82..534a5a66159 100644 --- a/lib/galaxy/tools/parameters/__init__.py +++ b/lib/galaxy/tools/parameters/__init__.py @@ -19,47 +19,43 @@ def visit_input_values( inputs, input_values, callback, name_prefix="", label_pr and a display label. If the callback returns a value, it will be replace the old value. - - FIXME: There is redundancy between this and the visit_inputs methods of - Repeat and Group. This tracks labels and those do not. It would - be nice to unify all the places that recursively visit inputs. """ context = ExpressionContext( input_values, context ) for input in inputs.itervalues(): if isinstance( input, Repeat ) or isinstance( input, UploadDataset ): for i, d in enumerate( input_values[ input.name ] ): index = d['__index__'] - new_name_prefix = name_prefix + "%s_%d|" % ( input.name, index ) - new_label_prefix = label_prefix + "%s %d > " % ( input.title, i + 1 ) + new_name_prefix = name_prefix + '%s_%d|' % ( input.name, index ) + new_label_prefix = label_prefix + '%s %d > ' % ( input.title, i + 1 ) visit_input_values( input.inputs, d, callback, new_name_prefix, new_label_prefix, no_replacement_value=no_replacement_value, context=context, details=details ) elif isinstance( input, Conditional ): values = input_values[ input.name ] - current = values["__current_case__"] - new_name_prefix = name_prefix + input.name + "|" + current = values[ '__current_case__' ] + new_name_prefix = name_prefix + input.name + '|' visit_input_values( input.cases[current].inputs, values, callback, new_name_prefix, label_prefix, no_replacement_value=no_replacement_value, context=context, details=details ) elif isinstance( input, Section ): values = input_values[ input.name ] - new_name_prefix = name_prefix + input.name + "|" + new_name_prefix = name_prefix + input.name + '|' visit_input_values( input.inputs, values, callback, new_name_prefix, label_prefix, no_replacement_value=no_replacement_value, context=context, details=details ) else: args = { 'input' : input, 'value' : input_values.get( input.name ), - 'prefixed_name' : "%s%s" % ( name_prefix, input.name ), - 'prefixed_label' : "%s%s" % ( label_prefix, input.label ) + 'prefixed_name' : '%s%s' % ( name_prefix, input.name ), + 'prefixed_label' : '%s%s' % ( label_prefix, input.label ) } if details: args[ 'context' ] = context new_value = callback( **args ) if no_replacement_value is REPLACE_ON_TRUTHY: - replace = bool(new_value) + replace = bool( new_value ) else: replace = new_value != no_replacement_value if replace: - input_values[input.name] = new_value + input_values[ input.name ] = new_value -def check_param( trans, param, incoming_value, param_values, source='html', boolean_fix=False ): +def check_param( trans, param, incoming_value, param_values ): """ Check the value of a single parameter `param`. The value in `incoming_value` is converted from its HTML encoding and validated. @@ -70,20 +66,16 @@ def check_param( trans, param, incoming_value, param_values, source='html', bool value = incoming_value error = None try: - # resolves the inconsistent definition of boolean parameters (see base.py) without modifying shared code - if boolean_fix and param.type == 'boolean' and isinstance( value, basestring ): - return [ string_as_bool( value ), None ] - if value is not None or isinstance( param, DataToolParameter ) or isinstance( param, DataCollectionToolParameter ): - # Convert value from HTML representation - if source == 'html': - value = param.from_html( value, trans, param_values ) - else: - value = param.from_json( value, trans, param_values ) - # Then do any further validation on the value - param.validate( value, trans ) - elif value is None and isinstance( param, SelectToolParameter ): - # An empty select list or column list - param.validate( value, trans ) + if trans.workflow_building_mode: + if isinstance( value, galaxy.tools.parameters.basic.DummyDataset ): + return [ None, None ] + if isinstance( value, galaxy.tools.parameters.basic.RuntimeValue ): + return [ { '__class__' : 'RuntimeValue' }, None ] + if isinstance( value, dict ): + if value.get( '__class__' ) == 'RuntimeValue': + return [ value, None ] + value = param.from_html( value, trans, param_values ) + param.validate( value, trans ) except ValueError, e: error = str( e ) return value, error @@ -116,7 +108,7 @@ def params_from_strings( params, param_values, app, ignore_errors=False ): for key, value in param_values.iteritems(): value = json_fix( loads( value ) ) if key in params: - value = params[key].value_from_basic( value, app, ignore_errors ) + value = params[ key ].value_from_basic( value, app, ignore_errors ) rval[ key ] = value return rval @@ -131,18 +123,18 @@ def params_to_incoming( incoming, inputs, input_values, app, name_prefix="" ): for input in inputs.itervalues(): if isinstance( input, Repeat ) or isinstance( input, UploadDataset ): for d in input_values[ input.name ]: - index = d['__index__'] - new_name_prefix = name_prefix + "%s_%d|" % ( input.name, index ) + index = d[ '__index__' ] + new_name_prefix = name_prefix + '%s_%d|' % ( input.name, index ) params_to_incoming( incoming, input.inputs, d, app, new_name_prefix ) elif isinstance( input, Conditional ): values = input_values[ input.name ] - current = values["__current_case__"] - new_name_prefix = name_prefix + input.name + "|" + current = values[ '__current_case__' ] + new_name_prefix = name_prefix + input.name + '|' incoming[ new_name_prefix + input.test_param.name ] = values[ input.test_param.name ] params_to_incoming( incoming, input.cases[current].inputs, values, app, new_name_prefix ) elif isinstance( input, Section ): values = input_values[ input.name ] - new_name_prefix = name_prefix + input.name + "|" + new_name_prefix = name_prefix + input.name + '|' params_to_incoming( incoming, input.inputs, values, app, new_name_prefix ) else: value = input_values.get( input.name ) diff --git a/lib/galaxy/tools/parameters/basic.py b/lib/galaxy/tools/parameters/basic.py index 55889d268a9..6c72f719de5 100644 --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -111,9 +111,6 @@ class ToolParameter( object, Dictifiable ): """ return value - def from_json( self, value, trans=None, other_values={} ): - return self.from_html( value, trans, other_values ) - def get_initial_value( self, trans, other_values ): """ Return the starting value of the parameter @@ -481,9 +478,6 @@ class BooleanToolParameter( ToolParameter ): return form_builder.CheckboxField( self.name, checked, refresh_on_change=self.refresh_on_change ) def from_html( self, value, trans=None, other_values={} ): - return form_builder.CheckboxField.is_checked( value ) - - def from_json( self, value, trans=None, other_values={} ): return string_as_bool( value ) def to_python( self, value, app ): diff --git a/lib/galaxy/webapps/galaxy/api/tools.py b/lib/galaxy/webapps/galaxy/api/tools.py index dfa2febb1e8..7c40846f87e 100644 --- a/lib/galaxy/webapps/galaxy/api/tools.py +++ b/lib/galaxy/webapps/galaxy/api/tools.py @@ -255,7 +255,7 @@ class ToolsController( BaseAPIController, UsesVisualizationMixin ): # TODO: handle dbkeys params = util.Params( inputs, sanitize=False ) incoming = params.__dict__ - vars = tool.handle_input( trans, incoming, history=target_history, source='json' ) + vars = tool.handle_input( trans, incoming, history=target_history ) # TODO: check for errors and ensure that output dataset(s) are available. output_datasets = vars.get( 'out_data', [] ) diff --git a/lib/galaxy/workflow/modules.py b/lib/galaxy/workflow/modules.py index 7d1ccda8892..9ca51130579 100644 --- a/lib/galaxy/workflow/modules.py +++ b/lib/galaxy/workflow/modules.py @@ -163,7 +163,7 @@ class WorkflowModule( object ): """ raise TypeError( "Abstract method" ) - def compute_runtime_state( self, trans, step_updates=None, source="html" ): + def compute_runtime_state( self, trans, step_updates=None ): """ Determine the runtime state (potentially different from self.state which describes configuration state). This (again unlike self.state) is currently always a `DefaultToolState` object. @@ -278,7 +278,7 @@ class SimpleWorkflowModule( WorkflowModule ): errors[ name ] = error return errors - def compute_runtime_state( self, trans, step_updates=None, source="html" ): + def compute_runtime_state( self, trans, step_updates=None ): if step_updates and "tool_state" in step_updates: # Fix this for multiple inputs state = self.decode_runtime_state( trans, step_updates.pop( "tool_state" ) ) @@ -441,7 +441,7 @@ class SubWorkflowModule( WorkflowModule ): errors[ name ] = error return errors - def compute_runtime_state( self, trans, step_updates=None, source="html" ): + def compute_runtime_state( self, trans, step_updates=None ): state = self.get_runtime_state() step_errors = {} return state, step_errors @@ -1084,7 +1084,7 @@ class ToolModule( WorkflowModule ): inputs = self.state.inputs return self.tool.check_and_update_param_values( inputs, self.trans, workflow_building_mode=True ) - def compute_runtime_state( self, trans, step_updates=None, source="html" ): + def compute_runtime_state( self, trans, step_updates=None ): # Warning: This method destructively modifies existing step state. step_errors = None state = self.state @@ -1097,7 +1097,7 @@ class ToolModule( WorkflowModule ): # Update the state self.runtime_post_job_actions = step_updates.get(RUNTIME_POST_JOB_ACTIONS_KEY, {}) step_errors = tool.update_state( trans, tool.inputs, state.inputs, step_updates, - update_only=True, old_errors=old_errors, source=source ) + update_only=True, old_errors=old_errors ) step_metadata_runtime_state = self.__step_meta_runtime_state() if step_metadata_runtime_state: state.inputs[ RUNTIME_STEP_META_STATE_KEY ] = step_metadata_runtime_state @@ -1385,7 +1385,7 @@ class WorkflowModuleInjector(object): self.trans = trans self.allow_tool_state_corrections = allow_tool_state_corrections - def inject( self, step, step_args=None, source="html" ): + def inject( self, step, step_args=None ): """ Pre-condition: `step` is an ORM object coming from the database, if supplied `step_args` is the representation of the inputs for that step supplied via web form. @@ -1421,7 +1421,7 @@ class WorkflowModuleInjector(object): # are not persisted so we need to do it every time) module.add_dummy_datasets( connections=step.input_connections ) - state, step_errors = module.compute_runtime_state( trans, step_args, source=source ) + state, step_errors = module.compute_runtime_state( trans, step_args ) step.state = state @@ -1440,7 +1440,7 @@ def populate_module_and_state( trans, workflow, param_map, allow_tool_state_corr module_injector = WorkflowModuleInjector( trans, allow_tool_state_corrections ) for step in workflow.steps: step_args = param_map.get( step.id, {} ) - step_errors = module_injector.inject( step, step_args=step_args, source="json" ) + step_errors = module_injector.inject( step, step_args=step_args ) if step.type == 'tool' or step.type is None: if step_errors: message = "Workflow cannot be run because of validation errors in some steps: %s" % step_errors diff --git a/static/maps/mvc/form/form-parameters.js.map b/static/maps/mvc/form/form-parameters.js.map index 7c07a7da0cf..2f621eea3f7 100644 --- a/static/maps/mvc/form/form-parameters.js.map +++ b/static/maps/mvc/form/form-parameters.js.map @@ -1 +1 @@ -{"version":3,"file":"form-parameters.js","sources":["../../../src/mvc/form/form-parameters.js"],"names":["define","Utils","Ui","SelectContent","SelectLibrary","SelectFtp","ColorPicker","Backbone","Model","extend","types","text","select","data_column","genomebuild","data","data_collection","integer","float","boolean","drill_down","color","hidden","hidden_data","baseurl","library_data","ftpfile","initialize","app","this","create","input_def","undefined","value","default_value","field","fieldClass","type","call","incompatible","options","_fieldSelect","_fieldText","Galaxy","emit","debug","_fieldData","self","View","id","extensions","optional","multiple","onchange","trigger","is_workflow","error_text","i","option","push","label","SelectClass","Select","display","Checkbox","Radio","searchable","_fieldDrilldown","Drilldown","area","validate","$","isArray","str_value","String","Input","new_value","_fieldSlider","Slider","precise","min","max","_fieldHidden","Hidden","info","_fieldBoolean","RadioButton","_fieldColor","_fieldLibrary","_fieldFtp"],"mappings":"AA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AUkB,GACnCE,SAAcpB,EAAUoB,SACxBC,SAAcrB,EAAUqB,SACxBC,SAAc,WACVN,EAAKnB,IAAI0B,QAAQ"} \ No newline at end of file +{"version":3,"file":"form-parameters.js","sources":["../../../src/mvc/form/form-parameters.js"],"names":["define","Utils","Ui","SelectContent","SelectLibrary","SelectFtp","ColorPicker","Backbone","Model","extend","types","text","select","data_column","genomebuild","data","data_collection","integer","float","boolean","drill_down","color","hidden","hidden_data","baseurl","library_data","ftpfile","initialize","app","this","create","input_def","fieldClass","type","field","call","incompatible","options","_fieldSelect","_fieldText","Galaxy","emit","debug","undefined","value","_fieldData","self","View","id","extensions","optional","multiple","onchange","trigger","is_workflow","error_text","_","each","option","push","label","SelectClass","Select","display","Checkbox","Radio","searchable","_fieldDrilldown","Drilldown","area","validate","$","isArray","str_value","i","String","Input","new_value","_fieldSlider","Slider","precise","min","max","_fieldHidden","Hidden","info","_fieldBoolean","RadioButton","_fieldColor","_fieldLibrary","_fieldFtp"],"mappings":"AAGAA,QAAQ,cACA,iBACA,+BACA,2BACA,uBACA,0BACJ,SAAUC,EAAOC,EAAIC,EAAeC,EAAeC,EAAWC,GAG9D,MAAOC,UAASC,MAAMC,QAElBC,OACIC,KAAsB,aACtBC,OAAsB,eACtBC,YAAsB,eACtBC,YAAsB,eACtBC,KAAsB,aACtBC,gBAAsB,aACtBC,QAAsB,eACtBC,QAAsB,eACtBC,UAAsB,gBACtBC,WAAsB,kBACtBC,MAAsB,cACtBC,OAAsB,eACtBC,YAAsB,eACtBC,QAAsB,eACtBC,aAAsB,gBACtBC,QAAsB,aAG1BC,WAAY,SAAUC,GAClBC,KAAKD,IAAMA,GAKfE,OAAQ,SAAUC,GACd,GAAIC,GAAaH,KAAKnB,MAAOqB,EAAUE,MACnCC,EAAyC,kBAAzBL,MAAMG,GAAgCH,KAAMG,GAAaG,KAAMN,KAAME,GAAc,IAQvG,OAPMG,KACFL,KAAKD,IAAIQ,cAAe,EACxBF,EAAQH,EAAUM,QAAU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,QAAS,cAO9BmC,YAAa,SAAUzD,GACnB,GAAIe,GAAOjB,IACX,OAAO,IAAIvB,IACP0C,GAAc,SAAWjB,EAAUiB,GACnCI,SAAc,WACVN,EAAKlB,IAAIyB,QAAS,cAO9BoC,cAAe,SAAU1D,GACrB,GAAIe,GAAOjB,IACX,OAAO,IAAIzB,GAAc2C,MACrBC,GAAc,SAAWjB,EAAUiB,GACnCE,SAAcnB,EAAUmB,SACxBC,SAAcpB,EAAUoB,SACxBC,SAAc,WACVN,EAAKlB,IAAIyB,QAAS,cAO9BqC,UAAW,SAAU3D,GACjB,GAAIe,GAAOjB,IACX,OAAO,IAAIxB,GAAU0C,MACjBC,GAAc,SAAWjB,EAAUiB,GACnCE,SAAcnB,EAAUmB,SACxBC,SAAcpB,EAAUoB,SACxBC,SAAc,WACVN,EAAKlB,IAAIyB,QAAS"} \ No newline at end of file diff --git a/static/maps/mvc/form/form-section.js.map b/static/maps/mvc/form/form-section.js.map index 192e36e2419..f18c53f849b 100644 --- a/static/maps/mvc/form/form-section.js.map +++ b/static/maps/mvc/form/form-section.js.map @@ -1 +1 @@ -{"version":3,"file":"form-section.js","sources":["../../../src/mvc/form/form-section.js"],"names":["define","Utils","Table","Ui","Portlet","Repeat","InputElement","Parameters","View","Backbone","extend","initialize","app","options","this","inputs","cls","cls_tr","table","parameters","setElement","$el","render","delAll","i","add","input","input_def","jQuery","id","uid","input_list","type","_addConditional","_addRepeat","_addSection","_addRow","self","test_param","sustain_conditionals","disabled","field","onchange","value","selectedCase","data","matchCase","cases","case_def","section_id","section_row","get","nonhidden","j","hidden","fadeIn","hide","trigger","sub_section_id","sub_section","addClass","append","create","block_index","repeat","ondel","del","title","title_new","min","max","onnew","n_cache","_","size","cache","Math","default","sustain_repeats","hideOptions","input_element","label","name","help","button_visible","ButtonIcon","icon","tooltip","portlet","collapsible","collapsed","operations","$","html","setOperation","expand","collapse","on","setIcon","input_id","length","expanded","field_list","default_value","text_value","collapsible_value","collapsible_preview","argument","element_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AKF,IAAI0F,WAAWzE,GAAMY,CAC1B,IAAIuC,GAAgB,GAAI1E,GAAaQ,KAAKF,KACtCsE,KAAsBvD,EAAUuD,KAChCD,MAAsBtD,EAAUsD,OAAStD,EAAUuD,KACnDvC,MAAsBhB,EAAUgB,MAChC4D,cAAsB5E,EAAU4E,cAChCC,WAAsB7E,EAAU6E,YAAc7E,EAAUgB,MACxD8D,kBAAsB9E,EAAU8E,kBAChCC,oBAAsB/E,EAAU+E,oBAChCvB,KAAsBxD,EAAUwD,KAChCwB,SAAsBhF,EAAUgF,SAChCnE,SAAsBb,EAAUa,SAChCC,MAAsBA,GAM1B,OAJA3B,MAAKF,IAAIgG,aAAa/E,GAAMmD,EAC5BlE,KAAKI,MAAMO,IAAIuD,EAAc3D,KAC7BP,KAAKI,MAAM2C,OAAOhC,GAClBF,EAAU2B,QAAUxC,KAAKI,MAAMiC,IAAItB,GAAI2B,OAChCf,IAIf,QACIjC,KAAMA"} \ No newline at end of file +{"version":3,"file":"form-section.js","sources":["../../../src/mvc/form/form-section.js"],"names":["define","Utils","Table","Ui","Portlet","Repeat","InputElement","Parameters","View","Backbone","extend","initialize","app","options","this","inputs","cls","cls_tr","table","parameters","setElement","$el","render","delAll","i","add","input","input_def","jQuery","id","uid","input_list","type","_addConditional","_addRepeat","_addSection","_addRow","self","test_param","sustain_conditionals","disabled","field","onchange","value","selectedCase","data","matchCase","cases","case_def","section_id","section_row","get","nonhidden","j","hidden","fadeIn","hide","trigger","sub_section_id","sub_section","addClass","append","create","block_index","repeat","ondel","del","title","title_new","min","max","onnew","n_cache","_","size","cache","Math","default","sustain_repeats","hideOptions","input_element","label","name","help","button_visible","ButtonIcon","icon","tooltip","portlet","collapsible","collapsed","operations","$","html","setOperation","expand","collapse","on","setIcon","input_id","length","expanded","field_list","text_value","collapsible_value","collapsible_preview","argument","element_list"],"mappings":"AAGAA,QAAQ,cACA,kBACA,iBACA,oBACA,uBACA,sBACA,4BACJ,SAASC,EAAOC,EAAOC,EA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vD,EAAUuD,KAChCD,MAAsBtD,EAAUsD,OAAStD,EAAUuD,KACnDvC,MAAsBhB,EAAUgB,MAChC4D,WAAsB5E,EAAU4E,YAAc5E,EAAUgB,MACxD6D,kBAAsB7E,EAAU6E,kBAChCC,oBAAsB9E,EAAU8E,oBAChCtB,KAAsBxD,EAAUwD,KAChCuB,SAAsB/E,EAAU+E,SAChClE,SAAsBb,EAAUa,SAChCC,MAAsBA,GAM1B,OAJA3B,MAAKF,IAAI+F,aAAa9E,GAAMmD,EAC5BlE,KAAKI,MAAMO,IAAIuD,EAAc3D,KAC7BP,KAAKI,MAAM2C,OAAOhC,GAClBF,EAAU2B,QAAUxC,KAAKI,MAAMiC,IAAItB,GAAI2B,OAChCf,IAIf,QACIjC,KAAMA"} \ No newline at end of file diff --git a/static/maps/utils/utils.js.map b/static/maps/utils/utils.js.map index 3b46288c0db..da7ae9a3fb8 100644 --- a/static/maps/utils/utils.js.map +++ b/static/maps/utils/utils.js.map @@ -1 +1 @@ -{"version":3,"file":"utils.js","sources":["../../src/utils/utils.js"],"names":["define","iframe","src","deepeach","dict","callback","i","d","_","isObject","new_dict","isJSON","text","test","replace","sanitize","content","$","html","validate","value","Array","length","undefined","indexOf","textify","lst","toString","pos","lastIndexOf","substr","get","options","top","__utils__get__","cache","url","success","console","debug","request","data","response","error","ajaxConfig","contentType","type","isEmptyObject","param","dataType","JSON","stringify","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,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/utils.js"],"names":["define","iframe","src","deepeach","dict","callback","i","d","_","isObject","new_dict","isJSON","text","test","replace","sanitize","content","$","html","validate","value","Array","undefined","indexOf","textify","lst","toString","pos","lastIndexOf","substr","get","options","top","__utils__get__","cache","url","success","console","debug","request","data","response","error","ajaxConfig","contentType","type","isEmptyObject","param","dataType","JSON","stringify","ajax","done","jQuery","parseJSON","e","fail","response_text","responseText","always","complete","cssGetAttribute","classname","name","el","appendTo","css","remove","cssLoadFile","length","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,KASzB,QAASM,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,GAAWC,GACRA,YAAiBC,SACrBD,GAAUA,GAEd,KAAK,GAAId,KAAKc,GACV,IAAO,WAAY,gBAAiB,KAAME,QAAYC,QAASH,EAAOd,IAAQ,GAC1E,OAAO,CAGf,QAAO,EAOX,QAASkB,GAAQC,GACb,GAAIA,GAAMA,EAAIC,UACd,IAAID,EAAK,CACLA,EAAMA,EAAIX,QAAQ,KAAM,KACxB,IAAIa,GAAMF,EAAIG,YAAY,KAI1B,OAHW,IAAPD,IACAF,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AEyF,WAAa,GAAK,IAAM,IAAMzF,EAAEyF,WAC3CC,GAAW1F,EAAE2F,aAAe,GAAK,IAAM,IAAM3F,EAAE2F,YACnD,OAAOC,UAAW5F,EAAE6F,UAAY,KACjB7F,EAAE8F,WAAa,GAAM,IACtB9F,EAAE+F,cAAgB,KAClBP,EAAQ,IACRE,EA/ClB,GAAIR,GAAK,KACLD,EAAKC,EAAKA,EACVF,EAAKC,EAAKC,EACVH,EAAKC,EAAKE,CA+Cd,QACIrB,YAAaA,EACbP,gBAAiBA,EACjB/B,IAAKA,EACL0C,MAAOA,EACPvE,OAAQA,EACRgF,cAAeA,EACfU,IAAKA,EACLE,KAAMA,EACNtD,QAASA,EACTxB,SAAUA,EACVS,QAASA,EACTL,SAAUA,EACVhB,SAAUA,EACVQ,OAAQA"} \ No newline at end of file diff --git a/static/scripts/bundled/analysis.bundled.js b/static/scripts/bundled/analysis.bundled.js index 8df6c3d90c0..329b43464ce 100644 --- a/static/scripts/bundled/analysis.bundled.js +++ b/static/scripts/bundled/analysis.bundled.js @@ -1,11 +1,11 @@ webpackJsonp([3,1],[function(t,e,i){(function(t,e){var n=i(1),s=n,o=i(60).GalaxyApp,a=i(58),r=i(10),l=i(89),c=i(88),d=i(62),h=i(19),u=i(47);window.app=function(i,n){window.Galaxy=new o(i,n),Galaxy.debug("analysis app");var p=i.config,g=new l({el:"#left",userIsAnonymous:Galaxy.user.isAnonymous(),search_url:p.search_url,toolbox:p.toolbox,toolbox_in_panel:p.toolbox_in_panel,stored_workflow_menu_entries:p.stored_workflow_menu_entries,nginx_upload_path:p.nginx_upload_path,ftp_upload_site:p.ftp_upload_site,default_genome:p.default_genome,default_extension:p.default_extension}),f=new r.CenterPanel({el:"#center"}),m=new c({el:"#right",galaxyRoot:Galaxy.root,userIsAnonymous:Galaxy.user.isAnonymous(),allow_user_dataset_purge:p.allow_user_dataset_purge}),v=new d.PageLayoutView(t.extend(i,{el:"body",left:g,center:f,right:m}));Galaxy.page=v,Galaxy.params=Galaxy.config.params,Galaxy.toolPanel=g.tool_panel,Galaxy.upload=g.uploadButton,Galaxy.currHistoryPanel=m.historyView,Galaxy.currHistoryPanel.listenToGalaxy(Galaxy),Galaxy.app={display:function(t,e){s(".select2-hidden-accessible").remove(),f.display(t)}};new(e.Router.extend({initialize:function(t){this.options=t},execute:function(t,e,i){Galaxy.debug("router execute:",t,e,i);var n=a.parse(e.pop());e.push(n),t&&t.apply(this,e)},routes:{"(/)":"home","(/)root*":"home","(/)tours(/:tour_id)":"show_tours"},show_tours:function(t){t?u.giveTour(t):f.display(new u.ToursView)},home:function(t){(t.tool_id||t.job_id)&&"upload1"!==t.tool_id?this._loadToolForm(t):t.workflow_id?this._loadCenterIframe("workflow/run?id="+t.workflow_id):t.m_c?this._loadCenterIframe(t.m_c+"/"+t.m_a):this._loadCenterIframe("welcome")},_loadToolForm:function(t){t.id=t.tool_id,f.display(new h.View(t))},_loadCenterIframe:function(t,e){e=e||Galaxy.root,t=e+t,f.$("#galaxy_main").prop("src",t)}}))(i);s(function(){v.render().right.historyView.loadCurrentHistory(),Galaxy.listenTo(v.right.historyView,"history-size-change",function(){Galaxy.user.fetch({url:Galaxy.user.urlRoot()+"/"+(Galaxy.user.id||"current")})}),v.right.historyView.connectToQuotaMeter(v.masthead.quotaMeter),e.history.start({root:Galaxy.root,pushState:!0})})}}).call(e,i(3),i(2))},,,,,,,function(t,e,i){var n,s;(function(o,a){n=[i(4),i(51),i(54),i(22),i(50),i(13),i(8)],s=function(t,e,i,n,s,r,l){var c=o.View.extend({tagName:"label",initialize:function(t){this.model=t&&t.model||new o.Model(t),this.tagName=t.tagName||this.tagName,this.setElement(a("<"+this.tagName+"/>")),this.listenTo(this.model,"change",this.render,this),this.render()},title:function(t){this.model.set("title",t)},value:function(){return this.model.get("title")},render:function(){return this.$el.removeClass().addClass("ui-label").addClass(this.model.get("cls")).html(this.model.get("title")),this}}),d=o.View.extend({initialize:function(t){this.model=t&&t.model||new o.Model({message:null,status:"info",cls:"",persistent:!1}).set(t),this.listenTo(this.model,"change",this.render,this),this.render()},update:function(t){this.model.set(t)},render:function(){this.$el.removeClass().addClass("ui-message").addClass(this.model.get("cls"));var t=this.model.get("status");if(this.model.get("large")?this.$el.addClass(("success"==t&&"done"||"danger"==t&&"error"||t)+"messagelarge"):this.$el.addClass("alert").addClass("alert-"+t),this.model.get("message")){if(this.$el.html(this.model.get("message")),this.$el.fadeIn(),this.timeout&&window.clearTimeout(this.timeout),!this.model.get("persistent")){var e=this;this.timeout=window.setTimeout(function(){e.$el.fadeOut()},3e3)}}else this.$el.fadeOut();return this}}),h=o.View.extend({initialize:function(t){this.model=t&&t.model||new o.Model({type:"text",placeholder:"",disabled:!1,visible:!0,cls:"",area:!1}).set(t),this.tagName=this.model.get("area")?"textarea":"input",this.setElement(a("<"+this.tagName+"/>")),this.listenTo(this.model,"change",this.render,this),this.render()},events:{input:"_onchange"},value:function(t){return void 0!==t&&this.model.set("value","string"==typeof t?t:""),this.model.get("value")},render:function(){return this.$el.removeClass().addClass("ui-"+this.tagName).addClass(this.model.get("cls")).attr("id",this.model.id).attr("type",this.model.get("type")).attr("placeholder",this.model.get("placeholder")).val(this.model.get("value")),this.model.get("disabled")?this.$el.attr("disabled",!0):this.$el.removeAttr("disabled"),this.$el[this.model.get("visible")?"show":"hide"](),this},_onchange:function(){this.value(this.$el.val()),this.model.get("onchange")&&this.model.get("onchange")(this.model.get("value"))}}),u=o.View.extend({initialize:function(t){this.model=t&&t.model||new o.Model(t),this.setElement(a("
").append(this.$info=a("
")).append(this.$hidden=a("
"))),this.listenTo(this.model,"change",this.render,this),this.render()},value:function(t){return void 0!==t&&this.model.set("value",t),this.model.get("value")},render:function(){return this.$el.attr("id",this.model.id),this.$hidden.val(this.model.get("value")),this.model.get("info")?this.$info.show().html(this.model.get("info")):this.$info.hide(),this}});return{Button:r.ButtonDefault,ButtonIcon:r.ButtonIcon,ButtonCheck:r.ButtonCheck,ButtonMenu:r.ButtonMenu,ButtonLink:r.ButtonLink,Input:h,Label:c,Message:d,Modal:l,RadioButton:n.RadioButton,Checkbox:n.Checkbox,Radio:n.Radio,Select:e,Hidden:u,Slider:i,Drilldown:s}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2),i(1))},,function(t,e,i){var n,s;(function(o,a){n=[i(4)],s=function(t){var e=o.View.extend({visible:!1,initialize:function(e){var i=this;this.options=t.merge(e,{id:t.uid(),title:"",icon:"",buttons:null,body:null,scrollable:!0,nopadding:!1,operations:null,placement:"bottom",cls:"ui-portlet",operations_flt:"right",collapsible:!1,collapsed:!1}),this.setElement(this._template(this.options)),this.$body=this.$(".portlet-body"),this.$title=this.$(".portlet-title-text"),this.$header=this.$(".portlet-header"),this.$content=this.$(".portlet-content"),this.$footer=this.$(".portlet-footer"),this.options.nopadding&&(this.$content.css("padding","0px"),this.$body.css("padding","0px")),this.$buttons=this.$(".portlet-buttons"),this.options.buttons?a.each(this.options.buttons,function(t,e){e.$el.prop("id",t),i.$buttons.append(e.$el)}):this.$buttons.remove(),this.$operations=this.$(".portlet-operations"),this.options.operations&&a.each(this.options.operations,function(t,e){e.$el.prop("id",t),i.$operations.append(e.$el)}),this.options.body&&this.append(this.options.body),this.collapsed=!1,this.options.collapsible&&(this.$title.addClass("no-highlight").css({cursor:"pointer","text-decoration":"underline"}),this.$title.on("click",function(){i.collapsed?i.expand():i.collapse()}),this.options.collapsed&&this.collapse())},append:function(t){this.$body.append(t)},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.fadeOut("fast")},enableButton:function(t){this.$buttons.find("#"+t).prop("disabled",!1)},disableButton:function(t){this.$buttons.find("#"+t).prop("disabled",!0)},hideOperation:function(t){this.$operations.find("#"+t).hide()},showOperation:function(t){this.$operations.find("#"+t).show()},setOperation:function(t,e){var i=this.$operations.find("#"+t);i.off("click"),i.on("click",e)},title:function(t){var e=this.$title;return t&&e.html(t),e.html()},collapse:function(){this.collapsed=!0,this.$content.height("0%"),this.$body.hide(),this.$footer.hide(),this.trigger("collapsed")},expand:function(){this.collapsed=!1,this.$content.height("100%"),this.$body.fadeIn("fast"),this.$footer.fadeIn("fast"),this.trigger("expanded")},disable:function(){this.$(".portlet-backdrop").show()},enable:function(){this.$(".portlet-backdrop").hide()},_template:function(t){var e='
';return t.title&&(e+='
',t.icon&&(e+=' '),e+=''+t.title+"
"),e+='
',"top"==t.placement&&(e+='
'),e+='
',"bottom"==t.placement&&(e+='
'),e+='