mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-16 15:45:04 +08:00
Parse dictionary, avoid unnecessary string conversion
This commit is contained in:
@@ -806,7 +806,7 @@ EditorFormView = Backbone.View.extend({
|
||||
}
|
||||
},
|
||||
|
||||
showToolForm: function ( text, node ) {
|
||||
showToolForm: function ( content, node ) {
|
||||
// initialize tags and identifiers
|
||||
var cls = 'right-content';
|
||||
var id = cls + '-' + node.id;
|
||||
@@ -824,15 +824,15 @@ EditorFormView = Backbone.View.extend({
|
||||
if ($container.find('#' + id).length == 0) {
|
||||
var $el = $('<div id="' + id + '" class="' + cls + '"/>');
|
||||
var formView = null;
|
||||
if (node.type == 'tool' && Utils.isJSON(text)) {
|
||||
var options = JSON.parse(text);
|
||||
if (node.type == 'tool') {
|
||||
var options = content;
|
||||
options.node = node;
|
||||
options.workflow = this.workflow;
|
||||
options.datatypes = this.datatypes;
|
||||
formView = new ToolForm.View(options);
|
||||
} else {
|
||||
var options = {
|
||||
html: text,
|
||||
html: content,
|
||||
node: node,
|
||||
workflowView: this
|
||||
};
|
||||
|
||||
@@ -761,9 +761,7 @@ class ToolModule( WorkflowModule ):
|
||||
self.add_dummy_datasets()
|
||||
incoming = {}
|
||||
params_to_incoming( incoming, self.tool.inputs, self.state.inputs, self.trans.app )
|
||||
return dumps( self.tool.to_json( self.trans, incoming, workflow_building_mode=True ) )
|
||||
else:
|
||||
return "Tool missing. Parameters cannot be edited."
|
||||
return self.tool.to_json( self.trans, incoming, workflow_building_mode=True )
|
||||
|
||||
def check_and_update_state( self ):
|
||||
if self.tool:
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user