Add form message if no inputs are available

This commit is contained in:
guerler
2016-12-26 22:33:29 -05:00
parent da6406202e
commit a8caede3f8
14 changed files with 64 additions and 64 deletions
+3 -2
View File
@@ -9,7 +9,8 @@ function( Utils, Portlet, Ui, FormSection, FormData ) {
initial_errors : false,
cls : 'ui-portlet-limited',
icon : null,
always_refresh : true
always_refresh : true,
message_status : 'warning'
});
this.setElement( '<div/>' );
this.render();
@@ -138,7 +139,7 @@ function( Utils, Portlet, Ui, FormSection, FormData ) {
this.portlet.append( this.section.$el );
this.$el.empty();
this.options.inputs && this.$el.append( this.portlet.$el );
this.options.message && this.message.update( { persistent: true, status: 'warning', message: this.options.message } );
this.options.message && this.message.update( { persistent: true, status: this.options.message_status, message: this.options.message } );
Galaxy.emit.debug( 'form-view::initialize()', 'Completed' );
}
});
@@ -348,6 +348,7 @@ function( Connector, Toastr ) {
this.check_changes_in_active_form();
this.app.showForm( node.config_form, node );
}
this.app.showWorkflowParameters();
},
layout : function () {
this.check_changes_in_active_form();
@@ -648,6 +648,7 @@ define([
},
showWorkflowParameters: function () {
//window.console.log( this.workflow.nodes );
/*var parameter_re = /\$\{.+?\}/g;
var workflow_parameters = [];
var wf_parm_container = $("#workflow-parameters-container");
@@ -709,43 +710,46 @@ define([
options.workflow = this.workflow;
options.datatypes = this.datatypes;
form = new ToolForm.View( options );
} else if ( content && content.inputs ) {
} else {
content.cls = 'ui-portlet-narrow';
content.inputs.unshift({
type : 'text',
name : 'label',
label : 'Label',
value : node.label,
help : 'Add a step label.'
});
content.inputs.push({
type : 'text',
name : 'annotation',
label : 'Annotation',
value : node.annotation,
area : true,
help : 'Add an annotation or notes to this step. Annotations are available when a workflow is viewed.'
});
content.onchange = function() {
Utils.request({
type : 'POST',
url : Galaxy.root + 'api/workflows/build_module',
data : {
id : node.id,
type : node.type,
inputs : form.data.create()
},
success : function( data ) {
node.update_field_data( data );
}
if ( content.inputs && content.inputs.length > 0 ) {
content.inputs.unshift({
type : 'text',
name : 'label',
label : 'Label',
value : node.label,
help : 'Add a step label.'
});
};
content.inputs.push({
type : 'text',
name : 'annotation',
label : 'Annotation',
value : node.annotation,
area : true,
help : 'Add an annotation or notes to this step. Annotations are available when a workflow is viewed.'
});
content.onchange = function() {
Utils.request({
type : 'POST',
url : Galaxy.root + 'api/workflows/build_module',
data : {
id : node.id,
type : node.type,
inputs : form.data.create()
},
success : function( data ) {
node.update_field_data( data );
}
});
};
} else {
content.message = 'No inputs available for this module.';
content.message_status = 'info';
}
form = new Form( content );
}
if ( form ) {
$el.append( form.$el );
$container.append( $el );
}
$el.append( form.$el );
$container.append( $el );
}
$( '.' + cls ).hide();
$container.find( '#' + id ).show();
@@ -761,7 +765,7 @@ define([
prebuildNode: function ( type, title_text, content_id ) {
var self = this;
var $f = $("<div class='toolForm toolFormInCanvas'></div>");
var $f = $("<div class='toolForm toolFormInCanvas'/>");
var $title = $("<div class='toolFormTitle unselectable'><span class='nodeTitle'>" + title_text + "</div></div>" );
add_node_icon($title.find('.nodeTitle'), type);
$f.append( $title );
@@ -773,7 +777,7 @@ define([
node.content_id = content_id;
var tmp = "<div><img height='16' align='middle' src='" + Galaxy.root + "static/images/loading_small_white_bg.gif'/> loading tool info...</div>";
$f.find(".toolFormBody").append(tmp);
node.config_form = tmp;
node.config_form = {title: title_text, inputs: []};
// Fix width to computed width
// Now add floats
var buttons = $("<div class='buttons' style='float: right;'></div>");
+12 -12
View File
@@ -366,11 +366,11 @@ class WorkflowsAPIController(BaseAPIController, UsesStoredWorkflowMixin, UsesAnn
tool_version = payload.get( 'tool_version' )
tool = self._get_tool( tool_id, tool_version=tool_version, user=trans.user )
module = module_factory.from_dict( trans, {
'type' : 'tool',
'tool_id' : tool.id,
'tool_state' : None
'type' : 'tool',
'tool_id' : tool.id,
'tool_state' : None
} )
tool_model = module.tool.to_json( trans, tool_inputs, workflow_building_mode=True )
tool_model = module.tool.to_json( trans, inputs, workflow_building_mode=True )
module.recover_state( tool_model[ 'state_inputs' ] )
return {
'tool_model' : tool_model,
@@ -383,17 +383,17 @@ class WorkflowsAPIController(BaseAPIController, UsesStoredWorkflowMixin, UsesAnn
}
else:
module = module_factory.from_dict( trans, {
'type' : type,
'label' : label
'type' : type,
'label' : label
} )
module.recover_state( inputs )
return {
'label' : module.label,
'tool_state' : module.get_state(),
'data_inputs' : module.get_data_inputs(),
'data_outputs' : module.get_data_outputs(),
'config_form' : module.get_config_form(),
'annotation' : annotation
'label' : module.label,
'tool_state' : module.get_state(),
'data_inputs' : module.get_data_inputs(),
'data_outputs' : module.get_data_outputs(),
'config_form' : module.get_config_form(),
'annotation' : annotation
}
#
-6
View File
@@ -140,12 +140,6 @@ class WorkflowModule( object ):
def get_data_outputs( self ):
return []
def get_config_form( self ):
""" Render form that is embedded in workflow editor for modifying the
step state of a node.
"""
raise TypeError( "Abstract method" )
def check_and_update_state( self ):
"""
If the state is not in sync with the current implementation of the
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"form-view.js","sources":["../../../src/mvc/form/form-view.js"],"names":["define","Utils","Portlet","Ui","FormSection","FormData","Backbone","View","extend","initialize","options","this","merge","initial_errors","cls","icon","always_refresh","setElement","render","update","new_model","self","data","matchModel","node","input_id","input","input_list","_","isEqual","field","field_list","new_options","indexOf","type","i","opt","length","push","label","value","trigger","Galaxy","emit","debug","wait","active","is_dynamic","unwait","highlight","message","silent","input_element","element_list","error","portlet","expand","$panel","$el","parents","filter","$","css","first","animate","scrollTop","offset","top","errors","error_messages","matchResponse","off","Manager","_renderForm","create","current_check","checksum","on","refresh_on_change","new_check","onchange","each","reset","remove","Message","section","inputs","title","operations","buttons","collapsible","collapsed","append","empty","persistent","status"],"mappings":"AAGAA,QAAU,cAAe,oBAAqB,iBAAkB,wBAAyB,sBACzF,SAAUC,EAAOC,EAASC,EAAIC,EAAaC,GACvC,MAAOC,UAASC,KAAKC,QACjBC,WAAY,SAAUC,GAClBC,KAAKD,QAAUT,EAAMW,MAAOF,GACxBG,gBAAkB,EAClBC,IAAkB,qBAClBC,KAA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3BwE,MAAc5E,KAAKD,QAAQ6E,MAC3BzE,IAAcH,KAAKD,QAAQI,IAC3B0E,WAAc7E,KAAKD,QAAQ8E,WAC3BC,QAAc9E,KAAKD,QAAQ+E,QAC3BC,YAAc/E,KAAKD,QAAQgF,YAC3BC,UAAchF,KAAKD,QAAQiF,YAE/BhF,KAAK4C,QAAQqC,OAAQjF,KAAKuC,QAAQQ,KAClC/C,KAAK4C,QAAQqC,OAAQjF,KAAK0E,QAAQ3B,KAClC/C,KAAK+C,IAAImC,QACTlF,KAAKD,QAAQ4E,QAAU3E,KAAK+C,IAAIkC,OAAQjF,KAAK4C,QAAQG,KACrD/C,KAAKD,QAAQwC,SAAWvC,KAAKuC,QAAQ/B,QAAU2E,YAAY,EAAMC,OAAQ,UAAW7C,QAASvC,KAAKD,QAAQwC,UAC1GR,OAAOC,KAAKC,MAAO,0BAA2B"}
{"version":3,"file":"form-view.js","sources":["../../../src/mvc/form/form-view.js"],"names":["define","Utils","Portlet","Ui","FormSection","FormData","Backbone","View","extend","initialize","options","this","merge","initial_errors","cls","icon","always_refresh","message_status","setElement","render","update","new_model","self","data","matchModel","node","input_id","input","input_list","_","isEqual","field","field_list","new_options","indexOf","type","i","opt","length","push","label","value","trigger","Galaxy","emit","debug","wait","active","is_dynamic","unwait","highlight","message","silent","input_element","element_list","error","portlet","expand","$panel","$el","parents","filter","$","css","first","animate","scrollTop","offset","top","errors","error_messages","matchResponse","off","Manager","_renderForm","create","current_check","checksum","on","refresh_on_change","new_check","onchange","each","reset","remove","Message","section","inputs","title","operations","buttons","collapsible","collapsed","append","empty","persistent","status"],"mappings":"AAGAA,QAAU,cAAe,oBAAqB,iBAAkB,wBAAyB,sBACzF,SAAUC,EAAOC,EAASC,EAAIC,EAAaC,GACvC,MAAOC,UAASC,KAAKC,QACjBC,WAAY,SAAUC,GAClBC,KAAKD,QAAUT,EAAMW,MAAOF,GACxBG,gBAAkB,EAClBC,IAAkB,qBAClBC,KAAkB,KAClBC,gBAAkB,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3ByE,MAAc7E,KAAKD,QAAQ8E,MAC3B1E,IAAcH,KAAKD,QAAQI,IAC3B2E,WAAc9E,KAAKD,QAAQ+E,WAC3BC,QAAc/E,KAAKD,QAAQgF,QAC3BC,YAAchF,KAAKD,QAAQiF,YAC3BC,UAAcjF,KAAKD,QAAQkF,YAE/BjF,KAAK6C,QAAQqC,OAAQlF,KAAKwC,QAAQQ,KAClChD,KAAK6C,QAAQqC,OAAQlF,KAAK2E,QAAQ3B,KAClChD,KAAKgD,IAAImC,QACTnF,KAAKD,QAAQ6E,QAAU5E,KAAKgD,IAAIkC,OAAQlF,KAAK6C,QAAQG,KACrDhD,KAAKD,QAAQyC,SAAWxC,KAAKwC,QAAQ/B,QAAU2E,YAAY,EAAMC,OAAQrF,KAAKD,QAAQO,eAAgBkC,QAASxC,KAAKD,QAAQyC,UAC5HR,OAAOC,KAAKC,MAAO,0BAA2B"}
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 -1
View File
@@ -1,2 +1,2 @@
define(["utils/utils","mvc/ui/ui-portlet","mvc/ui/ui-misc","mvc/form/form-section","mvc/form/form-data"],function(a,b,c,d,e){return Backbone.View.extend({initialize:function(b){this.options=a.merge(b,{initial_errors:!1,cls:"ui-portlet-limited",icon:null,always_refresh:!0}),this.setElement("<div/>"),this.render()},update:function(a){var b=this;this.data.matchModel(a,function(a,c){var d=b.input_list[c];if(d&&d.options&&!_.isEqual(d.options,a.options)){d.options=a.options;var e=b.field_list[c];if(e.update){var f=[];if(-1!=["data","data_collection","drill_down"].indexOf(d.type))f=d.options;else for(var g in a.options){var h=a.options[g];h.length>2&&f.push({label:h[0],value:h[1]})}e.update(f),e.trigger("change"),Galaxy.emit.debug("form-view::update()","Updating options for "+c)}}})},wait:function(a){for(var b in this.input_list){var c=this.field_list[b],d=this.input_list[b];d.is_dynamic&&c.wait&&c.unwait&&c[a?"wait":"unwait"]()}},highlight:function(a,b,c){var d=this.element_list[a];if(d&&(d.error(b||"Please verify this parameter."),this.portlet.expand(),this.trigger("expand",a),!c)){var e=this.$el.parents().filter(function(){return-1!=["auto","scroll"].indexOf($(this).css("overflow"))}).first();e.animate({scrollTop:e.scrollTop()+d.$el.offset().top-120},500)}},errors:function(a){if(this.trigger("reset"),a&&a.errors){var b=this.data.matchResponse(a.errors);for(var c in this.element_list){{this.element_list[c]}b[c]&&this.highlight(c,b[c],!0)}}},render:function(){var a=this;this.off("change"),this.off("reset"),this.field_list={},this.input_list={},this.element_list={},this.data=new e.Manager(this),this._renderForm(),this.data.create(),this.options.initial_errors&&this.errors(this.options);var b=this.data.checksum();return this.on("change",function(c){var d=a.input_list[c];if(!d||d.refresh_on_change||a.options.always_refresh){var e=a.data.checksum();e!=b&&(b=e,a.options.onchange&&a.options.onchange())}}),this.on("reset",function(){_.each(a.element_list,function(a){a.reset()})}),this},_renderForm:function(){$(".tooltip").remove(),this.message=new c.Message,this.section=new d.View(this,{inputs:this.options.inputs}),this.portlet=new b.View({icon:this.options.icon,title:this.options.title,cls:this.options.cls,operations:this.options.operations,buttons:this.options.buttons,collapsible:this.options.collapsible,collapsed:this.options.collapsed}),this.portlet.append(this.message.$el),this.portlet.append(this.section.$el),this.$el.empty(),this.options.inputs&&this.$el.append(this.portlet.$el),this.options.message&&this.message.update({persistent:!0,status:"warning",message:this.options.message}),Galaxy.emit.debug("form-view::initialize()","Completed")}})});
define(["utils/utils","mvc/ui/ui-portlet","mvc/ui/ui-misc","mvc/form/form-section","mvc/form/form-data"],function(a,b,c,d,e){return Backbone.View.extend({initialize:function(b){this.options=a.merge(b,{initial_errors:!1,cls:"ui-portlet-limited",icon:null,always_refresh:!0,message_status:"warning"}),this.setElement("<div/>"),this.render()},update:function(a){var b=this;this.data.matchModel(a,function(a,c){var d=b.input_list[c];if(d&&d.options&&!_.isEqual(d.options,a.options)){d.options=a.options;var e=b.field_list[c];if(e.update){var f=[];if(-1!=["data","data_collection","drill_down"].indexOf(d.type))f=d.options;else for(var g in a.options){var h=a.options[g];h.length>2&&f.push({label:h[0],value:h[1]})}e.update(f),e.trigger("change"),Galaxy.emit.debug("form-view::update()","Updating options for "+c)}}})},wait:function(a){for(var b in this.input_list){var c=this.field_list[b],d=this.input_list[b];d.is_dynamic&&c.wait&&c.unwait&&c[a?"wait":"unwait"]()}},highlight:function(a,b,c){var d=this.element_list[a];if(d&&(d.error(b||"Please verify this parameter."),this.portlet.expand(),this.trigger("expand",a),!c)){var e=this.$el.parents().filter(function(){return-1!=["auto","scroll"].indexOf($(this).css("overflow"))}).first();e.animate({scrollTop:e.scrollTop()+d.$el.offset().top-120},500)}},errors:function(a){if(this.trigger("reset"),a&&a.errors){var b=this.data.matchResponse(a.errors);for(var c in this.element_list){{this.element_list[c]}b[c]&&this.highlight(c,b[c],!0)}}},render:function(){var a=this;this.off("change"),this.off("reset"),this.field_list={},this.input_list={},this.element_list={},this.data=new e.Manager(this),this._renderForm(),this.data.create(),this.options.initial_errors&&this.errors(this.options);var b=this.data.checksum();return this.on("change",function(c){var d=a.input_list[c];if(!d||d.refresh_on_change||a.options.always_refresh){var e=a.data.checksum();e!=b&&(b=e,a.options.onchange&&a.options.onchange())}}),this.on("reset",function(){_.each(a.element_list,function(a){a.reset()})}),this},_renderForm:function(){$(".tooltip").remove(),this.message=new c.Message,this.section=new d.View(this,{inputs:this.options.inputs}),this.portlet=new b.View({icon:this.options.icon,title:this.options.title,cls:this.options.cls,operations:this.options.operations,buttons:this.options.buttons,collapsible:this.options.collapsible,collapsed:this.options.collapsed}),this.portlet.append(this.message.$el),this.portlet.append(this.section.$el),this.$el.empty(),this.options.inputs&&this.$el.append(this.portlet.$el),this.options.message&&this.message.update({persistent:!0,status:this.options.message_status,message:this.options.message}),Galaxy.emit.debug("form-view::initialize()","Completed")}})});
//# sourceMappingURL=../../../maps/mvc/form/form-view.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long