galaxy-commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
January 2015
- 2 participants
- 248 discussions
Branch: refs/heads/master
Home: https://github.com/galaxyproject/usegalaxy-playbook
Commit: 5171f8218643ed986a76281dd821a0000f605b87
https://github.com/galaxyproject/usegalaxy-playbook/commit/5171f8218643ed98…
Author: Nate Coraor <nate(a)bx.psu.edu>
Date: 2015-01-28 (Wed, 28 Jan 2015)
Changed paths:
M stage/group_vars/all.yml
Log Message:
-----------
Update Test.
1
0
commit/galaxy-central: natefoo: Merged in natefoo/galaxy-central/samtools1_bam_index (pull request #651)
by commits-noreply@bitbucket.org 28 Jan '15
by commits-noreply@bitbucket.org 28 Jan '15
28 Jan '15
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/f0a96002a553/
Changeset: f0a96002a553
User: natefoo
Date: 2015-01-28 18:36:35+00:00
Summary: Merged in natefoo/galaxy-central/samtools1_bam_index (pull request #651)
Allow BAM's set_meta() to use samtools 1 to generate the index, if the samtools found on $PATH is samtools 1.
Affected #: 1 file
diff -r c8ba5ce3b64af0fa6564744c0e45fc4c4ae1d450 -r f0a96002a5538b1b5e2ebafe8f80a64ed299b418 lib/galaxy/datatypes/binary.py
--- a/lib/galaxy/datatypes/binary.py
+++ b/lib/galaxy/datatypes/binary.py
@@ -264,10 +264,23 @@
##$ samtools index
##Usage: samtools index <in.bam> [<out.index>]
stderr_name = tempfile.NamedTemporaryFile( prefix = "bam_index_stderr" ).name
- command = 'samtools index %s %s' % ( dataset.file_name, index_file.file_name )
- proc = subprocess.Popen( args=command, shell=True, stderr=open( stderr_name, 'wb' ) )
+ command = [ 'samtools', 'index', dataset.file_name, index_file.file_name ]
+ proc = subprocess.Popen( args=command, stderr=open( stderr_name, 'wb' ) )
exit_code = proc.wait()
#Did index succeed?
+ if exit_code == -6:
+ # SIGABRT, most likely samtools 1.0+ which does not accept the index name parameter.
+ dataset_symlink = os.path.join( os.path.dirname( index_file.file_name ),
+ '__dataset_%d_%s' % ( dataset.id, os.path.basename( index_file.file_name ) ) )
+ os.symlink( dataset.file_name, dataset_symlink )
+ try:
+ command = [ 'samtools', 'index', dataset_symlink ]
+ exit_code = subprocess.call( args=command, stderr=open( stderr_name, 'wb' ) )
+ shutil.move( dataset_symlink + '.bai', index_file.file_name )
+ except Exception, e:
+ open( stderr_name, 'ab+' ).write( 'Galaxy attempted to build the BAM index with samtools 1.0+ but failed: %s\n' % e)
+ finally:
+ os.unlink( dataset_symlink )
stderr = open( stderr_name ).read().strip()
if stderr:
if exit_code != 0:
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
4 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/402569731d73/
Changeset: 402569731d73
Branch: samtools1_bam_index
User: natefoo
Date: 2015-01-28 15:38:22+00:00
Summary: Allow BAM's set_meta() to use samtools 1 to generate the index, if the samtools found on $PATH is samtools 1.
Affected #: 1 file
diff -r 01c1ca281fba5d2fc38f7fcaec30c7c358bcf268 -r 402569731d731d794f07838388609ad859345fa2 lib/galaxy/datatypes/binary.py
--- a/lib/galaxy/datatypes/binary.py
+++ b/lib/galaxy/datatypes/binary.py
@@ -264,10 +264,19 @@
##$ samtools index
##Usage: samtools index <in.bam> [<out.index>]
stderr_name = tempfile.NamedTemporaryFile( prefix = "bam_index_stderr" ).name
- command = 'samtools index %s %s' % ( dataset.file_name, index_file.file_name )
- proc = subprocess.Popen( args=command, shell=True, stderr=open( stderr_name, 'wb' ) )
+ command = [ 'samtools', 'index', dataset.file_name, index_file.file_name ]
+ proc = subprocess.Popen( args=command, stderr=open( stderr_name, 'wb' ) )
exit_code = proc.wait()
#Did index succeed?
+ if exit_code == -6:
+ # SIGABRT, most likely samtools 1.0+ which does not accept the index name parameter.
+ command = [ 'samtools', 'index', dataset.file_name ]
+ proc = subprocess.Popen( args=command, stderr=open( stderr_name, 'wb' ) )
+ exit_code = proc.wait()
+ if os.path.exists( os.path.join( dataset.file_name, '.bai' ) ):
+ shutil.move( os.path.join( dataset.file_name, '.bai' ), index_file.file_name )
+ else:
+ open( stderr_name, 'ab+' ).write( 'Galaxy attempted to build the BAM index with samtools 1.0+ but failed\n')
stderr = open( stderr_name ).read().strip()
if stderr:
if exit_code != 0:
https://bitbucket.org/galaxy/galaxy-central/commits/b3a163116fac/
Changeset: b3a163116fac
Branch: samtools1_bam_index
User: natefoo
Date: 2015-01-28 16:58:23+00:00
Summary: Use a symlink to the dataset in the same directory as the MetadataTempFile as the input to samtools index so there's no clobber risk. Thanks Dan.
Affected #: 1 file
diff -r 402569731d731d794f07838388609ad859345fa2 -r b3a163116fac6b6b554524e70b3a2f4058fef1e8 lib/galaxy/datatypes/binary.py
--- a/lib/galaxy/datatypes/binary.py
+++ b/lib/galaxy/datatypes/binary.py
@@ -270,13 +270,18 @@
#Did index succeed?
if exit_code == -6:
# SIGABRT, most likely samtools 1.0+ which does not accept the index name parameter.
- command = [ 'samtools', 'index', dataset.file_name ]
- proc = subprocess.Popen( args=command, stderr=open( stderr_name, 'wb' ) )
- exit_code = proc.wait()
- if os.path.exists( os.path.join( dataset.file_name, '.bai' ) ):
- shutil.move( os.path.join( dataset.file_name, '.bai' ), index_file.file_name )
- else:
- open( stderr_name, 'ab+' ).write( 'Galaxy attempted to build the BAM index with samtools 1.0+ but failed\n')
+ dataset_symlink = os.path.join( os.path.dirname( index_file.file_name ),
+ '__dataset_%d_%s' % ( dataset.id, os.path.basename( index_file.file_name ) ) )
+ os.symlink( dataset.file_name, dataset_symlink )
+ try:
+ command = [ 'samtools', 'index', dataset_symlink ]
+ proc = subprocess.Popen( args=command, stderr=open( stderr_name, 'wb' ) )
+ exit_code = proc.wait()
+ shutil.move( dataset_symlink + '.bai', index_file.file_name )
+ except Exception, e:
+ open( stderr_name, 'ab+' ).write( 'Galaxy attempted to build the BAM index with samtools 1.0+ but failed: %s\n' % e)
+ finally:
+ os.unlink( dataset_symlink )
stderr = open( stderr_name ).read().strip()
if stderr:
if exit_code != 0:
https://bitbucket.org/galaxy/galaxy-central/commits/8d9cbbb3374f/
Changeset: 8d9cbbb3374f
Branch: samtools1_bam_index
User: natefoo
Date: 2015-01-28 18:25:11+00:00
Summary: Use subprocess.call() rather than Popen(), thanks Nicola.
Affected #: 1 file
diff -r b3a163116fac6b6b554524e70b3a2f4058fef1e8 -r 8d9cbbb3374f203a15f1c4e8c59e067c05b62cec lib/galaxy/datatypes/binary.py
--- a/lib/galaxy/datatypes/binary.py
+++ b/lib/galaxy/datatypes/binary.py
@@ -275,8 +275,7 @@
os.symlink( dataset.file_name, dataset_symlink )
try:
command = [ 'samtools', 'index', dataset_symlink ]
- proc = subprocess.Popen( args=command, stderr=open( stderr_name, 'wb' ) )
- exit_code = proc.wait()
+ exit_code = subprocess.call( args=command, stderr=open( stderr_name, 'wb' ) )
shutil.move( dataset_symlink + '.bai', index_file.file_name )
except Exception, e:
open( stderr_name, 'ab+' ).write( 'Galaxy attempted to build the BAM index with samtools 1.0+ but failed: %s\n' % e)
https://bitbucket.org/galaxy/galaxy-central/commits/f0a96002a553/
Changeset: f0a96002a553
User: natefoo
Date: 2015-01-28 18:36:35+00:00
Summary: Merged in natefoo/galaxy-central/samtools1_bam_index (pull request #651)
Allow BAM's set_meta() to use samtools 1 to generate the index, if the samtools found on $PATH is samtools 1.
Affected #: 1 file
diff -r c8ba5ce3b64af0fa6564744c0e45fc4c4ae1d450 -r f0a96002a5538b1b5e2ebafe8f80a64ed299b418 lib/galaxy/datatypes/binary.py
--- a/lib/galaxy/datatypes/binary.py
+++ b/lib/galaxy/datatypes/binary.py
@@ -264,10 +264,23 @@
##$ samtools index
##Usage: samtools index <in.bam> [<out.index>]
stderr_name = tempfile.NamedTemporaryFile( prefix = "bam_index_stderr" ).name
- command = 'samtools index %s %s' % ( dataset.file_name, index_file.file_name )
- proc = subprocess.Popen( args=command, shell=True, stderr=open( stderr_name, 'wb' ) )
+ command = [ 'samtools', 'index', dataset.file_name, index_file.file_name ]
+ proc = subprocess.Popen( args=command, stderr=open( stderr_name, 'wb' ) )
exit_code = proc.wait()
#Did index succeed?
+ if exit_code == -6:
+ # SIGABRT, most likely samtools 1.0+ which does not accept the index name parameter.
+ dataset_symlink = os.path.join( os.path.dirname( index_file.file_name ),
+ '__dataset_%d_%s' % ( dataset.id, os.path.basename( index_file.file_name ) ) )
+ os.symlink( dataset.file_name, dataset_symlink )
+ try:
+ command = [ 'samtools', 'index', dataset_symlink ]
+ exit_code = subprocess.call( args=command, stderr=open( stderr_name, 'wb' ) )
+ shutil.move( dataset_symlink + '.bai', index_file.file_name )
+ except Exception, e:
+ open( stderr_name, 'ab+' ).write( 'Galaxy attempted to build the BAM index with samtools 1.0+ but failed: %s\n' % e)
+ finally:
+ os.unlink( dataset_symlink )
stderr = open( stderr_name ).read().strip()
if stderr:
if exit_code != 0:
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dan: Fix for XmlToolSource.parse_command() to return None when a command element does not exist or text is empty.
by commits-noreply@bitbucket.org 28 Jan '15
by commits-noreply@bitbucket.org 28 Jan '15
28 Jan '15
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/c8ba5ce3b64a/
Changeset: c8ba5ce3b64a
User: dan
Date: 2015-01-28 17:09:56+00:00
Summary: Fix for XmlToolSource.parse_command() to return None when a command element does not exist or text is empty.
Affected #: 1 file
diff -r 43c52ed25263e787f922c902590df41929edb0d8 -r c8ba5ce3b64af0fa6564744c0e45fc4c4ae1d450 lib/galaxy/tools/parser/xml.py
--- a/lib/galaxy/tools/parser/xml.py
+++ b/lib/galaxy/tools/parser/xml.py
@@ -79,7 +79,7 @@
def parse_command(self):
command_el = self._command_el
- return (command_el is not None) and command_el.text
+ return ( ( command_el is not None ) and command_el.text ) or None
def parse_interpreter(self):
command_el = self._command_el
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
6 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/a2a8f96e7cb4/
Changeset: a2a8f96e7cb4
User: davebgx
Date: 2015-01-28 16:49:48+00:00
Summary: Remove the alert popups from the repository and tool dependency installation status pages.
Affected #: 2 files
diff -r 01c1ca281fba5d2fc38f7fcaec30c7c358bcf268 -r a2a8f96e7cb49c4799d1ab9d86cc1e866d7e5cec templates/admin/tool_shed_repository/common.mako
--- a/templates/admin/tool_shed_repository/common.mako
+++ b/templates/admin/tool_shed_repository/common.mako
@@ -259,9 +259,6 @@
});
tool_dependency_status_updater( dependency_status_list );
},
- error: function() {
- alert( "tool_dependency_status_updater_callback failed..." );
- }
});
};
</script>
@@ -317,9 +314,6 @@
});
tool_shed_repository_status_updater( repository_status_list );
},
- error: function() {
- alert( "tool_shed_repository_status_updater_callback failed..." );
- }
});
};
</script>
diff -r 01c1ca281fba5d2fc38f7fcaec30c7c358bcf268 -r a2a8f96e7cb49c4799d1ab9d86cc1e866d7e5cec templates/admin/tool_shed_repository/initiate_repository_installation.mako
--- a/templates/admin/tool_shed_repository/initiate_repository_installation.mako
+++ b/templates/admin/tool_shed_repository/initiate_repository_installation.mako
@@ -23,9 +23,6 @@
success : function ( data ) {
//alert( "Initializing repository installation succeeded" );
},
- error: function() {
- alert( "Initializing repository installation failed" );
- },
});
};
</script>
https://bitbucket.org/galaxy/galaxy-central/commits/43c52ed25263/
Changeset: 43c52ed25263
User: davebgx
Date: 2015-01-28 16:50:31+00:00
Summary: Allow a Galaxy admin to configure environment variables (e.g. $PATH) for their local Galaxy installation without altering the environment for their shell.
Affected #: 1 file
diff -r a2a8f96e7cb49c4799d1ab9d86cc1e866d7e5cec -r 43c52ed25263e787f922c902590df41929edb0d8 run.sh
--- a/run.sh
+++ b/run.sh
@@ -10,6 +10,18 @@
. .venv/bin/activate
fi
+# If there is a file that defines a shell environment specific to this
+# instance of Galaxy, source the file.
+if [ -z "$GALAXY_LOCAL_ENV_FILE" ];
+then
+ GALAXY_LOCAL_ENV_FILE='./config/local_env.sh'
+fi
+
+if [ -f $GALAXY_LOCAL_ENV_FILE ];
+then
+ . $GALAXY_LOCAL_ENV_FILE
+fi
+
python ./scripts/check_python.py
[ $? -ne 0 ] && exit 1
https://bitbucket.org/galaxy/galaxy-central/commits/725252d2e51f/
Changeset: 725252d2e51f
Branch: trevorw/add-template_cache_path-to-reports_wsgii-1422042129382
User: davebgx
Date: 2015-01-28 16:53:07+00:00
Summary: Close merged branch trevorw/add-template_cache_path-to-reports_wsgii-1422042129382
Affected #: 0 files
https://bitbucket.org/galaxy/galaxy-central/commits/f24d1447157e/
Changeset: f24d1447157e
Branch: compressed_upload
User: davebgx
Date: 2015-01-28 16:53:35+00:00
Summary: Close merged branch compressed_upload
Affected #: 0 files
https://bitbucket.org/galaxy/galaxy-central/commits/751a0bbe3363/
Changeset: 751a0bbe3363
Branch: snpeff_datatype
User: davebgx
Date: 2015-01-28 16:53:51+00:00
Summary: Close merged branch snpeff_datatype
Affected #: 0 files
https://bitbucket.org/galaxy/galaxy-central/commits/0ead515a64b2/
Changeset: 0ead515a64b2
Branch: toolshed_blacklist_additions
User: davebgx
Date: 2015-01-28 16:54:03+00:00
Summary: Close merged branch toolshed_blacklist_additions
Affected #: 0 files
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: natefoo: Update tag latest_2015.01.13 for changeset 1b96d3a4ff28
by commits-noreply@bitbucket.org 28 Jan '15
by commits-noreply@bitbucket.org 28 Jan '15
28 Jan '15
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/837baf8a92ad/
Changeset: 837baf8a92ad
Branch: stable
User: natefoo
Date: 2015-01-28 14:00:26+00:00
Summary: Update tag latest_2015.01.13 for changeset 1b96d3a4ff28
Affected #: 1 file
diff -r 1b96d3a4ff28da2bd547b65ad86c5ad5a9bbfb90 -r 837baf8a92add3084c7e230cf537016192a78b55 .hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -22,4 +22,4 @@
2092948937ac30ef82f71463a235c66d34987088 release_2014.10.06
9bd6f8b5b8153db752f4e61ed62f2b6c01ae4a11 latest_2014.10.06
2e8dd2949dd3eee0f56f9a3a5ebf1b2baca24aee release_2015.01.13
-4039bfd5584aac053f686197a76ac176253e6f3d latest_2015.01.13
+1b96d3a4ff28da2bd547b65ad86c5ad5a9bbfb90 latest_2015.01.13
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: guerler: ToolForm: Fix configuration flag
by commits-noreply@bitbucket.org 27 Jan '15
by commits-noreply@bitbucket.org 27 Jan '15
27 Jan '15
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/01c1ca281fba/
Changeset: 01c1ca281fba
User: guerler
Date: 2015-01-27 23:31:20+00:00
Summary: ToolForm: Fix configuration flag
Affected #: 2 files
diff -r 98fd2a336caa70166c26e005f7198369b97e1645 -r 01c1ca281fba5d2fc38f7fcaec30c7c358bcf268 config/galaxy.ini.sample
--- a/config/galaxy.ini.sample
+++ b/config/galaxy.ini.sample
@@ -759,7 +759,7 @@
# -- Beta features
# Use new tool form
-#toolform_upgrade = False
+toolform_upgrade = True
# Enable Galaxy to communicate directly with a sequencer
#enable_sequencer_communication = False
diff -r 98fd2a336caa70166c26e005f7198369b97e1645 -r 01c1ca281fba5d2fc38f7fcaec30c7c358bcf268 templates/webapps/galaxy/tool_form.mako
--- a/templates/webapps/galaxy/tool_form.mako
+++ b/templates/webapps/galaxy/tool_form.mako
@@ -4,7 +4,7 @@
${h.css('base', 'jquery-ui/smoothness/jquery-ui')}
## skip new tool form code if disabled
-##%if trans.app.config.get('toolform_upgrade', False):
+##%if util.string_as_bool(trans.app.config.get('toolform_upgrade', False)):
<%
## TEMPORARY: create tool dictionary in mako while both tool forms are in use.
## This avoids making two separate requests since the classic form requires the mako anyway.
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
3 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/6d655c8a1633/
Changeset: 6d655c8a1633
User: martenson
Date: 2015-01-27 23:13:50+00:00
Summary: add pretty_print_time_interval to make time intervals more readable
Affected #: 1 file
diff -r 73a261a75185704a35a05350a31a7d5169cbc9b0 -r 6d655c8a163316b2af7f5fa9f49dbee5bf58073c lib/galaxy/util/__init__.py
--- a/lib/galaxy/util/__init__.py
+++ b/lib/galaxy/util/__init__.py
@@ -24,6 +24,7 @@
import threading
from galaxy.util import json
+from datetime import datetime
from email.MIMEText import MIMEText
@@ -336,6 +337,63 @@
return value
+def pretty_print_time_interval( time = False, precise = False ):
+ """
+ Get a datetime object or a int() Epoch timestamp and return a
+ pretty string like 'an hour ago', 'Yesterday', '3 months ago',
+ 'just now', etc
+ credit: http://stackoverflow.com/questions/1551382/user-friendly-time-format-in-pyt…
+ """
+ now = datetime.now()
+ if type( time ) is int:
+ diff = now - datetime.fromtimestamp( time )
+ elif isinstance( time, datetime ):
+ diff = now - time
+ elif not time:
+ diff = now - now
+ second_diff = diff.seconds
+ day_diff = diff.days
+
+ if day_diff < 0:
+ return ''
+
+ if precise:
+ if day_diff == 0:
+ if second_diff < 10:
+ return "just now"
+ if second_diff < 60:
+ return str(second_diff) + " seconds ago"
+ if second_diff < 120:
+ return "a minute ago"
+ if second_diff < 3600:
+ return str(second_diff / 60) + " minutes ago"
+ if second_diff < 7200:
+ return "an hour ago"
+ if second_diff < 86400:
+ return str(second_diff / 3600) + " hours ago"
+ if day_diff == 1:
+ return "Yesterday"
+ if day_diff < 7:
+ return str( day_diff ) + " days ago"
+ if day_diff < 31:
+ return str( day_diff / 7 ) + " weeks ago"
+ if day_diff < 365:
+ return str( day_diff / 30 ) + " months ago"
+ return str( day_diff / 365 ) + " years ago"
+ else:
+ if day_diff == 0:
+ return "Today"
+ if day_diff == 1:
+ return "Yesterday"
+ if day_diff < 7:
+ return "this week"
+ if day_diff < 31:
+ return "this month"
+ if day_diff < 365:
+ return "this year"
+ return str( day_diff / 365 ) + " years ago"
+
+
def pretty_print_json(json_data, is_json_string=False):
if is_json_string:
json_data = json.loads(json_data)
https://bitbucket.org/galaxy/galaxy-central/commits/39483e4a5cbf/
Changeset: 39483e4a5cbf
User: martenson
Date: 2015-01-27 23:14:27+00:00
Summary: use the new pretty_print_time_interval method from utils
Affected #: 1 file
diff -r 6d655c8a163316b2af7f5fa9f49dbee5bf58073c -r 39483e4a5cbfbec5d0603b3e910a315ed52768dd lib/galaxy/webapps/tool_shed/search/repo_search.py
--- a/lib/galaxy/webapps/tool_shed/search/repo_search.py
+++ b/lib/galaxy/webapps/tool_shed/search/repo_search.py
@@ -1,8 +1,8 @@
"""Module for searching the toolshed repositories"""
import datetime
-import dateutil.relativedelta
from galaxy import exceptions
from galaxy import eggs
+from galaxy.util import pretty_print_time_interval
from galaxy.web.base.controller import BaseAPIController
from galaxy.webapps.tool_shed import model
from tool_shed.util.shed_util_common import generate_sharable_link_for_repository_in_tool_shed
@@ -117,18 +117,9 @@
hit_dict[ 'url'] = generate_sharable_link_for_repository_in_tool_shed( repo )
# Format the time since last update to be nicely readable.
- dt1 = repo.update_time
- dt2 = datetime.datetime.now()
- rd = dateutil.relativedelta.relativedelta (dt2, dt1)
- time_ago = ''
- if rd.years > 0:
- time_ago += str( rd.years ) + 'years'
- if rd.months > 0:
- time_ago += str( rd.months ) + ' months'
- if rd.days > 0:
- time_ago += str( rd.days ) + ' days ago'
+ time_ago = pretty_print_time_interval( repo.update_time )
hit_dict[ 'last_updated' ] = time_ago
-
+ hit_dict[ 'full_last_updated' ] = repo.update_time.strftime( "%Y-%m-%d %I:%M %p" )
hit_dict[ 'times_downloaded' ] = repo.times_downloaded
hit_dict[ 'approved' ] = approved
results[ 'hits' ].append( {'repository': hit_dict, 'matched_terms': hit.matched_terms() } )
https://bitbucket.org/galaxy/galaxy-central/commits/98fd2a336caa/
Changeset: 98fd2a336caa
User: martenson
Date: 2015-01-27 23:15:10+00:00
Summary: Merge
Affected #: 14 files
diff -r 39483e4a5cbfbec5d0603b3e910a315ed52768dd -r 98fd2a336caa70166c26e005f7198369b97e1645 client/galaxy/scripts/mvc/tools/tools-form-base.js
--- a/client/galaxy/scripts/mvc/tools/tools-form-base.js
+++ b/client/galaxy/scripts/mvc/tools/tools-form-base.js
@@ -18,7 +18,9 @@
// shows form in compact view mode
compact : false,
// shows errors on start
- initial_errors : false
+ initial_errors : false,
+ // use default value for disabled fields
+ use_defaults : false
};
// configure options
@@ -280,8 +282,7 @@
// create tool form section
this.section = new ToolSection.View(self, {
- inputs : options.inputs,
- cls : 'ui-table-plain'
+ inputs : options.inputs
});
// switch to classic tool form mako if the form definition is incompatible
diff -r 39483e4a5cbfbec5d0603b3e910a315ed52768dd -r 98fd2a336caa70166c26e005f7198369b97e1645 client/galaxy/scripts/mvc/tools/tools-form-workflow.js
--- a/client/galaxy/scripts/mvc/tools/tools-form-workflow.js
+++ b/client/galaxy/scripts/mvc/tools/tools-form-workflow.js
@@ -21,6 +21,7 @@
// set labels
this.options.text_enable = 'In Advance';
this.options.text_disable = 'At Runtime';
+ this.options.use_defaults = true;
// declare fields as optional
Utils.deepeach(options.inputs, function(item) {
diff -r 39483e4a5cbfbec5d0603b3e910a315ed52768dd -r 98fd2a336caa70166c26e005f7198369b97e1645 client/galaxy/scripts/mvc/tools/tools-section.js
--- a/client/galaxy/scripts/mvc/tools/tools-section.js
+++ b/client/galaxy/scripts/mvc/tools/tools-section.js
@@ -14,10 +14,13 @@
// link inputs
this.inputs = options.inputs;
+ // fix table style
+ options.cls = 'ui-table-plain';
+
// add table class for tr tag
// this assist in transforming the form into a json structure
options.cls_tr = 'section-row';
-
+
// create table
this.table = new Table.View(options);
@@ -132,8 +135,7 @@
// create sub section
var sub_section = new View(this.app, {
- inputs : input_def.cases[i].inputs,
- cls : 'ui-table-plain'
+ inputs : input_def.cases[i].inputs
});
// displays as grouped subsection
@@ -181,8 +183,7 @@
// create sub section
var sub_section = new View(self.app, {
- inputs : inputs,
- cls : 'ui-table-plain'
+ inputs : inputs
});
// add tab
@@ -255,8 +256,7 @@
// create sub section
var sub_section = new View(self.app, {
- inputs : input_def.inputs,
- cls : 'ui-table-plain'
+ inputs : input_def.inputs
});
// delete button
diff -r 39483e4a5cbfbec5d0603b3e910a315ed52768dd -r 98fd2a336caa70166c26e005f7198369b97e1645 client/galaxy/scripts/mvc/tools/tools-tree.js
--- a/client/galaxy/scripts/mvc/tools/tools-tree.js
+++ b/client/galaxy/scripts/mvc/tools/tools-tree.js
@@ -123,8 +123,16 @@
}
// validate value
- if ((field.skip && input.optional) || (field.validate && !field.validate())) {
- value = null;
+ var skipped = field.skip && input.optional;
+ var unvalidated = field.validate && !field.validate();
+ if (!self.app.options.use_defaults) {
+ if (skipped || unvalidated) {
+ value = null;
+ }
+ } else {
+ if (!skipped && unvalidated) {
+ value = null;
+ }
}
// ignore certain values
diff -r 39483e4a5cbfbec5d0603b3e910a315ed52768dd -r 98fd2a336caa70166c26e005f7198369b97e1645 static/scripts/mvc/tools/tools-form-base.js
--- a/static/scripts/mvc/tools/tools-form-base.js
+++ b/static/scripts/mvc/tools/tools-form-base.js
@@ -18,7 +18,9 @@
// shows form in compact view mode
compact : false,
// shows errors on start
- initial_errors : false
+ initial_errors : false,
+ // use default value for disabled fields
+ use_defaults : false
};
// configure options
@@ -280,8 +282,7 @@
// create tool form section
this.section = new ToolSection.View(self, {
- inputs : options.inputs,
- cls : 'ui-table-plain'
+ inputs : options.inputs
});
// switch to classic tool form mako if the form definition is incompatible
diff -r 39483e4a5cbfbec5d0603b3e910a315ed52768dd -r 98fd2a336caa70166c26e005f7198369b97e1645 static/scripts/mvc/tools/tools-form-workflow.js
--- a/static/scripts/mvc/tools/tools-form-workflow.js
+++ b/static/scripts/mvc/tools/tools-form-workflow.js
@@ -21,6 +21,7 @@
// set labels
this.options.text_enable = 'In Advance';
this.options.text_disable = 'At Runtime';
+ this.options.use_defaults = true;
// declare fields as optional
Utils.deepeach(options.inputs, function(item) {
diff -r 39483e4a5cbfbec5d0603b3e910a315ed52768dd -r 98fd2a336caa70166c26e005f7198369b97e1645 static/scripts/mvc/tools/tools-section.js
--- a/static/scripts/mvc/tools/tools-section.js
+++ b/static/scripts/mvc/tools/tools-section.js
@@ -14,10 +14,13 @@
// link inputs
this.inputs = options.inputs;
+ // fix table style
+ options.cls = 'ui-table-plain';
+
// add table class for tr tag
// this assist in transforming the form into a json structure
options.cls_tr = 'section-row';
-
+
// create table
this.table = new Table.View(options);
@@ -132,8 +135,7 @@
// create sub section
var sub_section = new View(this.app, {
- inputs : input_def.cases[i].inputs,
- cls : 'ui-table-plain'
+ inputs : input_def.cases[i].inputs
});
// displays as grouped subsection
@@ -181,8 +183,7 @@
// create sub section
var sub_section = new View(self.app, {
- inputs : inputs,
- cls : 'ui-table-plain'
+ inputs : inputs
});
// add tab
@@ -255,8 +256,7 @@
// create sub section
var sub_section = new View(self.app, {
- inputs : input_def.inputs,
- cls : 'ui-table-plain'
+ inputs : input_def.inputs
});
// delete button
diff -r 39483e4a5cbfbec5d0603b3e910a315ed52768dd -r 98fd2a336caa70166c26e005f7198369b97e1645 static/scripts/mvc/tools/tools-tree.js
--- a/static/scripts/mvc/tools/tools-tree.js
+++ b/static/scripts/mvc/tools/tools-tree.js
@@ -123,8 +123,16 @@
}
// validate value
- if ((field.skip && input.optional) || (field.validate && !field.validate())) {
- value = null;
+ var skipped = field.skip && input.optional;
+ var unvalidated = field.validate && !field.validate();
+ if (!self.app.options.use_defaults) {
+ if (skipped || unvalidated) {
+ value = null;
+ }
+ } else {
+ if (!skipped && unvalidated) {
+ value = null;
+ }
}
// ignore certain values
diff -r 39483e4a5cbfbec5d0603b3e910a315ed52768dd -r 98fd2a336caa70166c26e005f7198369b97e1645 static/scripts/packed/mvc/tools/tools-form-base.js
--- a/static/scripts/packed/mvc/tools/tools-form-base.js
+++ b/static/scripts/packed/mvc/tools/tools-form-base.js
@@ -1,1 +1,1 @@
-define(["utils/utils","utils/deferred","mvc/ui/ui-portlet","mvc/ui/ui-misc","mvc/citation/citation-model","mvc/citation/citation-view","mvc/tools","mvc/tools/tools-template","mvc/tools/tools-content","mvc/tools/tools-section","mvc/tools/tools-tree"],function(g,h,f,k,i,a,d,c,e,j,b){return Backbone.View.extend({initialize:function(l){this.optionsDefault={is_dynamic:true,compact:false,initial_errors:false};this.options=g.merge(l,this.optionsDefault);console.debug(this.options);var m=parent.Galaxy;if(m&&m.modal){this.modal=m.modal}else{this.modal=new k.Modal.View()}if(m&&m.currUser){this.is_admin=m.currUser.get("is_admin")}else{this.is_admin=false}this.container=this.options.container||"body";this.deferred=new h();this.setElement("<div/>");$(this.container).append(this.$el);this._buildForm()},reciept:function(l){$(this.container).empty();$(this.container).append(l)},highlight:function(m,n,l){var o=this.element_list[m];if(o){o.error(n||"Please verify this parameter.");if(!l){$(this.container).animate({scrollTop:o.$el.offset().top-20},500)}}},_errors:function(n){this.trigger("reset");if(n&&n.errors){var o=this.tree.matchResponse(n.errors);for(var m in this.element_list){var l=this.element_list[m];if(o[m]){this.highlight(m,o[m],true)}}}},_buildForm:function(){var l=this;this.off("refresh");this.off("reset");this.field_list={};this.input_list={};this.element_list={};this.tree=new b(this);this.content=new e(this);var m=this.options;this._renderForm(m);this.tree.finalize();if(m.initial_errors){this._errors(m)}this.on("refresh",function(){l.deferred.reset();l.deferred.execute(function(){l._updateModel()})});this.on("reset",function(){for(var n in this.element_list){this.element_list[n].reset()}});this.trigger("refresh")},_renderForm:function(u){var t=this;this.message=new k.Message();var q=new k.ButtonIcon({icon:"fa-info-circle",title:(!u.compact&&"Requirements")||null,tooltip:"Display tool requirements",onclick:function(){if(!this.visible){this.visible=true;t.message.update({persistent:true,message:c.requirements(u),status:"info"})}else{this.visible=false;t.message.update({message:""})}}});if(!u.requirements||u.requirements.length==0){q.$el.hide()}var m=new k.ButtonMenu({icon:"fa-cubes",title:(!u.compact&&"Versions")||null,tooltip:"Select another tool version"});if(u.versions&&u.versions.length>1){for(var o in u.versions){var r=u.versions[o];if(r!=u.version){m.addMenu({title:"Switch to "+r,version:r,icon:"fa-cube",onclick:function(){u.id=u.id.replace(u.version,this.version);u.version=this.version;t.deferred.reset();t.deferred.execute(function(){t._buildModel()})}})}}}else{m.$el.hide()}var p=new k.ButtonMenu({icon:"fa-caret-down",title:(!u.compact&&"Options")||null,tooltip:"View available options"});if(u.biostar_url){p.addMenu({icon:"fa-question-circle",title:"Question?",tooltip:"Ask a question about this tool (Biostar)",onclick:function(){window.open(u.biostar_url+"/p/new/post/")}});p.addMenu({icon:"fa-search",title:"Search",tooltip:"Search help for this tool (Biostar)",onclick:function(){window.open(u.biostar_url+"/t/"+u.id+"/")}})}p.addMenu({icon:"fa-share",title:"Share",tooltip:"Share this tool",onclick:function(){prompt("Copy to clipboard: Ctrl+C, Enter",window.location.origin+galaxy_config.root+"root?tool_id="+u.id)}});if(this.is_admin){p.addMenu({icon:"fa-download",title:"Download",tooltip:"Download this tool",onclick:function(){window.location.href=galaxy_config.root+"api/tools/"+u.id+"/download"}})}this.section=new j.View(t,{inputs:u.inputs,cls:"ui-table-plain"});if(this.incompatible){this.$el.hide();$("#tool-form-classic").show();return}this.portlet=new f.View({icon:"fa-wrench",title:"<b>"+u.name+"</b> "+u.description+" (Galaxy Tool Version "+u.version+")",cls:"ui-portlet-slim",operations:{requirements:q,menu:p,versions:m},buttons:this.buttons});if(u.compact){this.portlet.$content.css("padding","0px")}this.portlet.append(this.message.$el,true);this.portlet.append(this.section.$el);this.$el.empty();this.$el.append(this.portlet.$el);if(u.help!=""){this.$el.append(c.help(u.help))}if(u.citations){var s=$("<div/>");var l=new i.ToolCitationCollection();l.tool_id=u.id;var n=new a.CitationListView({el:s,collection:l});n.render();l.fetch();this.$el.append(s)}if(u.message){this.message.update({persistent:true,status:"warning",message:u.message})}}})});
\ No newline at end of file
+define(["utils/utils","utils/deferred","mvc/ui/ui-portlet","mvc/ui/ui-misc","mvc/citation/citation-model","mvc/citation/citation-view","mvc/tools","mvc/tools/tools-template","mvc/tools/tools-content","mvc/tools/tools-section","mvc/tools/tools-tree"],function(g,h,f,k,i,a,d,c,e,j,b){return Backbone.View.extend({initialize:function(l){this.optionsDefault={is_dynamic:true,compact:false,initial_errors:false,use_defaults:false};this.options=g.merge(l,this.optionsDefault);console.debug(this.options);var m=parent.Galaxy;if(m&&m.modal){this.modal=m.modal}else{this.modal=new k.Modal.View()}if(m&&m.currUser){this.is_admin=m.currUser.get("is_admin")}else{this.is_admin=false}this.container=this.options.container||"body";this.deferred=new h();this.setElement("<div/>");$(this.container).append(this.$el);this._buildForm()},reciept:function(l){$(this.container).empty();$(this.container).append(l)},highlight:function(m,n,l){var o=this.element_list[m];if(o){o.error(n||"Please verify this parameter.");if(!l){$(this.container).animate({scrollTop:o.$el.offset().top-20},500)}}},_errors:function(n){this.trigger("reset");if(n&&n.errors){var o=this.tree.matchResponse(n.errors);for(var m in this.element_list){var l=this.element_list[m];if(o[m]){this.highlight(m,o[m],true)}}}},_buildForm:function(){var l=this;this.off("refresh");this.off("reset");this.field_list={};this.input_list={};this.element_list={};this.tree=new b(this);this.content=new e(this);var m=this.options;this._renderForm(m);this.tree.finalize();if(m.initial_errors){this._errors(m)}this.on("refresh",function(){l.deferred.reset();l.deferred.execute(function(){l._updateModel()})});this.on("reset",function(){for(var n in this.element_list){this.element_list[n].reset()}});this.trigger("refresh")},_renderForm:function(u){var t=this;this.message=new k.Message();var q=new k.ButtonIcon({icon:"fa-info-circle",title:(!u.compact&&"Requirements")||null,tooltip:"Display tool requirements",onclick:function(){if(!this.visible){this.visible=true;t.message.update({persistent:true,message:c.requirements(u),status:"info"})}else{this.visible=false;t.message.update({message:""})}}});if(!u.requirements||u.requirements.length==0){q.$el.hide()}var m=new k.ButtonMenu({icon:"fa-cubes",title:(!u.compact&&"Versions")||null,tooltip:"Select another tool version"});if(u.versions&&u.versions.length>1){for(var o in u.versions){var r=u.versions[o];if(r!=u.version){m.addMenu({title:"Switch to "+r,version:r,icon:"fa-cube",onclick:function(){u.id=u.id.replace(u.version,this.version);u.version=this.version;t.deferred.reset();t.deferred.execute(function(){t._buildModel()})}})}}}else{m.$el.hide()}var p=new k.ButtonMenu({icon:"fa-caret-down",title:(!u.compact&&"Options")||null,tooltip:"View available options"});if(u.biostar_url){p.addMenu({icon:"fa-question-circle",title:"Question?",tooltip:"Ask a question about this tool (Biostar)",onclick:function(){window.open(u.biostar_url+"/p/new/post/")}});p.addMenu({icon:"fa-search",title:"Search",tooltip:"Search help for this tool (Biostar)",onclick:function(){window.open(u.biostar_url+"/t/"+u.id+"/")}})}p.addMenu({icon:"fa-share",title:"Share",tooltip:"Share this tool",onclick:function(){prompt("Copy to clipboard: Ctrl+C, Enter",window.location.origin+galaxy_config.root+"root?tool_id="+u.id)}});if(this.is_admin){p.addMenu({icon:"fa-download",title:"Download",tooltip:"Download this tool",onclick:function(){window.location.href=galaxy_config.root+"api/tools/"+u.id+"/download"}})}this.section=new j.View(t,{inputs:u.inputs});if(this.incompatible){this.$el.hide();$("#tool-form-classic").show();return}this.portlet=new f.View({icon:"fa-wrench",title:"<b>"+u.name+"</b> "+u.description+" (Galaxy Tool Version "+u.version+")",cls:"ui-portlet-slim",operations:{requirements:q,menu:p,versions:m},buttons:this.buttons});if(u.compact){this.portlet.$content.css("padding","0px")}this.portlet.append(this.message.$el,true);this.portlet.append(this.section.$el);this.$el.empty();this.$el.append(this.portlet.$el);if(u.help!=""){this.$el.append(c.help(u.help))}if(u.citations){var s=$("<div/>");var l=new i.ToolCitationCollection();l.tool_id=u.id;var n=new a.CitationListView({el:s,collection:l});n.render();l.fetch();this.$el.append(s)}if(u.message){this.message.update({persistent:true,status:"warning",message:u.message})}}})});
\ No newline at end of file
diff -r 39483e4a5cbfbec5d0603b3e910a315ed52768dd -r 98fd2a336caa70166c26e005f7198369b97e1645 static/scripts/packed/mvc/tools/tools-form-workflow.js
--- a/static/scripts/packed/mvc/tools/tools-form-workflow.js
+++ b/static/scripts/packed/mvc/tools/tools-form-workflow.js
@@ -1,1 +1,1 @@
-define(["utils/utils","mvc/tools/tools-form-base"],function(b,a){var c=a.extend({initialize:function(e){this.node=workflow.active_node;if(!this.node){console.debug("FAILED - tools-form-workflow:initialize() - Node not found in workflow.");return}this.options=e;this.options.text_enable="In Advance";this.options.text_disable="At Runtime";b.deepeach(e.inputs,function(f){if(f.type){f.optional=(["data","data_hidden","hidden","drill_down","repeat","conditional"]).indexOf(f.type)==-1}});b.deepeach(e.inputs,function(f){if(f.type){if(f.type=="conditional"){f.test_param.optional=false}}});var d=this;b.get({url:galaxy_config.root+"api/datatypes",cache:true,success:function(f){d.datatypes=f;d._makeSections(e.inputs);a.prototype.initialize.call(d,e)}})},_makeSections:function(d){d[b.uuid()]={label:"Edit Step Attributes",type:"section",expand:this.node.annotation,inputs:[{label:"Annotation / Notes",name:"annotation",type:"text",area:true,help:"Add an annotation or notes to this step; annotations are available when a workflow is viewed.",value:this.node.annotation}]};this.post_job_actions=this.node.post_job_actions;for(var e in this.node.output_terminals){d[b.uuid()]=this._makeSection(e)}},_makeSection:function(h){var g=[];for(key in this.datatypes){g.push({0:this.datatypes[key],1:this.datatypes[key]})}g.sort(function(j,i){return j.label>i.label?1:j.label<i.label?-1:0});g.unshift({0:"Sequences",1:"Sequences"});g.unshift({0:"Roadmaps",1:"Roadmaps"});g.unshift({0:"Leave unchanged",1:"None"});var f={label:"Edit Step Action: '"+h+"'",type:"section",inputs:[{action:"RenameDatasetAction",argument:"newname",label:"Rename dataset",type:"text",value:"",ignore:"",help:'This action will rename the result dataset. Click <a href="https://wiki.galaxyproject.org/Learn/AdvancedWorkflow/Variables">here</a> for more information.'},{action:"ChangeDatatypeAction",argument:"newtype",label:"Change datatype",type:"select",ignore:"None",options:g,help:"This action will change the datatype of the output to the indicated value."},{action:"TagDatasetAction",argument:"tags",label:"Tags",type:"text",value:"",ignore:"",help:"This action will set tags for the dataset."},{label:"Assign columns",type:"section",inputs:[{action:"ColumnSetAction",argument:"chromCol",label:"Chrom column",type:"text",value:"",ignore:""},{action:"ColumnSetAction",argument:"startCol",label:"Start column",type:"text",value:"",ignore:""},{action:"ColumnSetAction",argument:"endCol",label:"End column",type:"text",value:"",ignore:""},{action:"ColumnSetAction",argument:"strandCol",label:"Strand column",type:"text",value:"",ignore:""},{action:"ColumnSetAction",argument:"nameCol",label:"Name column",type:"text",value:"",ignore:""}],help:"This action will set column assignments in the output dataset. Blank fields are ignored."},{action:"EmailAction",label:"Email notification",type:"boolean",value:"false",ignore:"false",help:"This action will send an email notifying you when the job is done.",payload:{host:window.location.host}},{action:"DeleteIntermediatesAction",label:"Delete non-outputs",type:"boolean",value:"false",ignore:"false",help:"All non-output steps of this workflow will have datasets deleted if they are no longer being used as job inputs when the job this action is attached to is finished. You *must* be using workflow outputs (the snowflake) in your workflow for this to have any effect."}]};var d=this;function e(n,o){o=o||[];o.push(n);for(var m in n.inputs){var k=n.inputs[m];if(k.action){k.name="pja__"+h+"__"+k.action;if(k.argument){k.name+="__"+k.argument}if(k.payload){for(var s in k.payload){var q=k.payload[s];k.payload[k.name+"__"+s]=q;delete q}}var r=d.post_job_actions[k.action+h];if(r){for(var l in o){o[l].expand=true}if(k.argument){k.value=r.action_arguments&&r.action_arguments[k.argument]||k.value}else{k.value="true"}}}if(k.inputs){e(k,o.slice(0))}}}e(f);return f},_buildModel:function(){Galaxy.modal.show({title:"Coming soon...",body:"This feature has not been implemented yet.",buttons:{Close:function(){Galaxy.modal.hide()}}})},_updateModel:function(){var d=this;var e=this.tree.finalize();console.debug("tools-form-workflow::_refreshForm() - Refreshing states.");console.debug(e);var g=this.deferred.register();var f=galaxy_config.root+"workflow/editor_form_post?tool_id="+this.options.id+"&__is_dynamic__=False";b.request({type:"GET",url:f,data:e,success:function(h){d.node.update_field_data(h);d._errors(h&&h.tool_model);d.deferred.done(g);console.debug("tools-form::_refreshForm() - States refreshed.");console.debug(h)},error:function(h){d.deferred.done(g);console.debug("tools-form::_refreshForm() - Refresh request failed.");console.debug(h)}})}});return{View:c}});
\ No newline at end of file
+define(["utils/utils","mvc/tools/tools-form-base"],function(b,a){var c=a.extend({initialize:function(e){this.node=workflow.active_node;if(!this.node){console.debug("FAILED - tools-form-workflow:initialize() - Node not found in workflow.");return}this.options=e;this.options.text_enable="In Advance";this.options.text_disable="At Runtime";this.options.use_defaults=true;b.deepeach(e.inputs,function(f){if(f.type){f.optional=(["data","data_hidden","hidden","drill_down","repeat","conditional"]).indexOf(f.type)==-1}});b.deepeach(e.inputs,function(f){if(f.type){if(f.type=="conditional"){f.test_param.optional=false}}});var d=this;b.get({url:galaxy_config.root+"api/datatypes",cache:true,success:function(f){d.datatypes=f;d._makeSections(e.inputs);a.prototype.initialize.call(d,e)}})},_makeSections:function(d){d[b.uuid()]={label:"Edit Step Attributes",type:"section",expand:this.node.annotation,inputs:[{label:"Annotation / Notes",name:"annotation",type:"text",area:true,help:"Add an annotation or notes to this step; annotations are available when a workflow is viewed.",value:this.node.annotation}]};this.post_job_actions=this.node.post_job_actions;for(var e in this.node.output_terminals){d[b.uuid()]=this._makeSection(e)}},_makeSection:function(h){var g=[];for(key in this.datatypes){g.push({0:this.datatypes[key],1:this.datatypes[key]})}g.sort(function(j,i){return j.label>i.label?1:j.label<i.label?-1:0});g.unshift({0:"Sequences",1:"Sequences"});g.unshift({0:"Roadmaps",1:"Roadmaps"});g.unshift({0:"Leave unchanged",1:"None"});var f={label:"Edit Step Action: '"+h+"'",type:"section",inputs:[{action:"RenameDatasetAction",argument:"newname",label:"Rename dataset",type:"text",value:"",ignore:"",help:'This action will rename the result dataset. Click <a href="https://wiki.galaxyproject.org/Learn/AdvancedWorkflow/Variables">here</a> for more information.'},{action:"ChangeDatatypeAction",argument:"newtype",label:"Change datatype",type:"select",ignore:"None",options:g,help:"This action will change the datatype of the output to the indicated value."},{action:"TagDatasetAction",argument:"tags",label:"Tags",type:"text",value:"",ignore:"",help:"This action will set tags for the dataset."},{label:"Assign columns",type:"section",inputs:[{action:"ColumnSetAction",argument:"chromCol",label:"Chrom column",type:"text",value:"",ignore:""},{action:"ColumnSetAction",argument:"startCol",label:"Start column",type:"text",value:"",ignore:""},{action:"ColumnSetAction",argument:"endCol",label:"End column",type:"text",value:"",ignore:""},{action:"ColumnSetAction",argument:"strandCol",label:"Strand column",type:"text",value:"",ignore:""},{action:"ColumnSetAction",argument:"nameCol",label:"Name column",type:"text",value:"",ignore:""}],help:"This action will set column assignments in the output dataset. Blank fields are ignored."},{action:"EmailAction",label:"Email notification",type:"boolean",value:"false",ignore:"false",help:"This action will send an email notifying you when the job is done.",payload:{host:window.location.host}},{action:"DeleteIntermediatesAction",label:"Delete non-outputs",type:"boolean",value:"false",ignore:"false",help:"All non-output steps of this workflow will have datasets deleted if they are no longer being used as job inputs when the job this action is attached to is finished. You *must* be using workflow outputs (the snowflake) in your workflow for this to have any effect."}]};var d=this;function e(n,o){o=o||[];o.push(n);for(var m in n.inputs){var k=n.inputs[m];if(k.action){k.name="pja__"+h+"__"+k.action;if(k.argument){k.name+="__"+k.argument}if(k.payload){for(var s in k.payload){var q=k.payload[s];k.payload[k.name+"__"+s]=q;delete q}}var r=d.post_job_actions[k.action+h];if(r){for(var l in o){o[l].expand=true}if(k.argument){k.value=r.action_arguments&&r.action_arguments[k.argument]||k.value}else{k.value="true"}}}if(k.inputs){e(k,o.slice(0))}}}e(f);return f},_buildModel:function(){Galaxy.modal.show({title:"Coming soon...",body:"This feature has not been implemented yet.",buttons:{Close:function(){Galaxy.modal.hide()}}})},_updateModel:function(){var d=this;var e=this.tree.finalize();console.debug("tools-form-workflow::_refreshForm() - Refreshing states.");console.debug(e);var g=this.deferred.register();var f=galaxy_config.root+"workflow/editor_form_post?tool_id="+this.options.id+"&__is_dynamic__=False";b.request({type:"GET",url:f,data:e,success:function(h){d.node.update_field_data(h);d._errors(h&&h.tool_model);d.deferred.done(g);console.debug("tools-form::_refreshForm() - States refreshed.");console.debug(h)},error:function(h){d.deferred.done(g);console.debug("tools-form::_refreshForm() - Refresh request failed.");console.debug(h)}})}});return{View:c}});
\ No newline at end of file
diff -r 39483e4a5cbfbec5d0603b3e910a315ed52768dd -r 98fd2a336caa70166c26e005f7198369b97e1645 static/scripts/packed/mvc/tools/tools-section.js
--- a/static/scripts/packed/mvc/tools/tools-section.js
+++ b/static/scripts/packed/mvc/tools/tools-section.js
@@ -1,1 +1,1 @@
-define(["utils/utils","mvc/ui/ui-table","mvc/ui/ui-misc","mvc/ui/ui-portlet","mvc/tools/tools-repeat","mvc/tools/tools-select-content","mvc/tools/tools-input"],function(e,b,h,d,c,a,f){var g=Backbone.View.extend({initialize:function(j,i){this.app=j;this.inputs=i.inputs;i.cls_tr="section-row";this.table=new b.View(i);this.setElement(this.table.$el);this.render()},render:function(){this.table.delAll();for(var j in this.inputs){this.add(this.inputs[j])}},add:function(k){var j=this;var i=jQuery.extend(true,{},k);i.id=k.id=e.uuid();this.app.input_list[i.id]=i;var l=i.type;switch(l){case"conditional":this._addConditional(i);break;case"repeat":this._addRepeat(i);break;case"section":this._addSection(i);break;default:this._addRow(i)}},_addConditional:function(j){var k=this;j.test_param.id=j.id;var n=this._addRow(j.test_param);n.options.onchange=function(w){var v=k.app.tree.matchCase(j,w);for(var u in j.cases){var q=j.cases[u];var t=j.id+"-section-"+u;var p=k.table.get(t);var s=false;for(var r in q.inputs){if(!q.inputs[r].hidden){s=true;break}}if(u==v&&s){p.fadeIn("fast")}else{p.hide()}}k.app.trigger("refresh")};for(var m in j.cases){var l=j.id+"-section-"+m;var o=new g(this.app,{inputs:j.cases[m].inputs,cls:"ui-table-plain"});o.$el.addClass("ui-table-form-section");this.table.add(o.$el);this.table.append(l)}n.trigger("change")},_addRepeat:function(p){var s=this;var q=0;function n(i,u){var t=p.id+"-section-"+(q++);var v=null;if(u){v=function(){l.del(t);l.retitle(p.title);s.app.trigger("refresh")}}var w=new g(s.app,{inputs:i,cls:"ui-table-plain"});l.add({id:t,title:p.title,$el:w.$el,ondel:v});l.retitle(p.title)}var l=new c.View({title_new:p.title,max:p.max,onnew:function(){n(p.inputs,true);s.app.trigger("refresh")}});var j=p.min;var r=_.size(p.cache);for(var m=0;m<Math.max(r,j);m++){var o=null;if(m<r){o=p.cache[m]}else{o=p.inputs}n(o,m>=j)}var k=new f(this.app,{label:p.title,help:p.help,field:l});k.$el.addClass("ui-table-form-section");this.table.add(k.$el);this.table.append(p.id)},_addSection:function(i){var j=this;var n=new g(j.app,{inputs:i.inputs,cls:"ui-table-plain"});var m=new h.ButtonIcon({icon:"fa-eye-slash",tooltip:"Show/hide section",cls:"ui-button-icon-plain"});var l=new d.View({title:i.label,cls:"ui-portlet-section",operations:{button_visible:m}});l.append(n.$el);var k=false;l.$content.hide();l.$header.css("cursor","pointer");l.$header.on("click",function(){if(k){k=false;l.$content.hide();m.setIcon("fa-eye-slash")}else{k=true;l.$content.fadeIn("fast");m.setIcon("fa-eye")}});if(i.expand){l.$header.trigger("click")}this.table.add(l.$el);this.table.append(i.id)},_addRow:function(i){var l=i.id;var j=this._createField(i);this.app.field_list[l]=j;var k=new f(this.app,{label:i.label,default_value:i.default_value,optional:i.optional,help:i.help,field:j});this.app.element_list[l]=k;this.table.add(k.$el);this.table.append(l);if(i.hidden){this.table.get(l).hide()}return j},_createField:function(i){var j=null;switch(i.type){case"text":j=this._fieldText(i);break;case"select":j=this._fieldSelect(i);break;case"data":j=this._fieldData(i);break;case"data_collection":j=this._fieldData(i);break;case"data_column":i.error_text="Missing columns in referenced dataset.";j=this._fieldSelect(i);break;case"hidden":j=this._fieldHidden(i);break;case"hidden_data":j=this._fieldHidden(i);break;case"integer":j=this._fieldSlider(i);break;case"float":j=this._fieldSlider(i);break;case"boolean":j=this._fieldBoolean(i);break;case"genomebuild":i.searchable=true;j=this._fieldSelect(i);break;case"drill_down":j=this._fieldDrilldown(i);break;case"baseurl":j=this._fieldHidden(i);break;default:this.app.incompatible=true;if(i.options){j=this._fieldSelect(i)}else{j=this._fieldText(i)}console.debug("tools-form::_addRow() : Auto matched field type ("+i.type+").")}if(i.value!==undefined){j.value(i.value)}return j},_fieldData:function(i){if(!this.app.options.is_dynamic){i.info="Data input '"+i.name+"' ("+e.textify(i.extensions.toString())+")";i.value=null;return this._fieldHidden(i)}var j=this;return new a.View(this.app,{id:"field-"+i.id,extensions:i.extensions,optional:i.optional,multiple:i.multiple,type:i.type,data:i.options,onchange:function(){j.app.trigger("refresh")}})},_fieldSelect:function(j){if(!this.app.options.is_dynamic&&j.is_dynamic){return this._fieldText(j)}var l=[];for(var m in j.options){var n=j.options[m];l.push({label:n[0],value:n[1]})}var o=h.Select;switch(j.display){case"checkboxes":o=h.Checkbox;break;case"radio":o=h.Radio;break}var k=this;return new o.View({id:"field-"+j.id,data:l,error_text:j.error_text||"No options available",multiple:j.multiple,searchable:j.searchable,onchange:function(){k.app.trigger("refresh")}})},_fieldDrilldown:function(i){if(!this.app.options.is_dynamic&&i.is_dynamic){return this._fieldText(i)}var j=this;return new h.Drilldown.View({id:"field-"+i.id,data:i.options,display:i.display,onchange:function(){j.app.trigger("refresh")}})},_fieldText:function(i){if(i.options){i.area=i.multiple;if(!e.validate(i.value)){i.value=""}else{if(i.value instanceof Array){i.value=value.toString()}else{i.value=String(i.value).replace(/[\[\]'"\s]/g,"");if(i.multiple){i.value=i.value.replace(/,/g,"\n")}}}}var j=this;return new h.Input({id:"field-"+i.id,area:i.area,onchange:function(){j.app.trigger("refresh")}})},_fieldSlider:function(i){var j=this;return new h.Slider.View({id:"field-"+i.id,precise:i.type=="float",min:i.min,max:i.max,onchange:function(){j.app.trigger("refresh")}})},_fieldHidden:function(i){return new h.Hidden({id:"field-"+i.id,info:i.info})},_fieldBoolean:function(i){var j=this;return new h.RadioButton.View({id:"field-"+i.id,data:[{label:"Yes",value:"true"},{label:"No",value:"false"}],onchange:function(){j.app.trigger("refresh")}})}});return{View:g}});
\ No newline at end of file
+define(["utils/utils","mvc/ui/ui-table","mvc/ui/ui-misc","mvc/ui/ui-portlet","mvc/tools/tools-repeat","mvc/tools/tools-select-content","mvc/tools/tools-input"],function(e,b,h,d,c,a,f){var g=Backbone.View.extend({initialize:function(j,i){this.app=j;this.inputs=i.inputs;i.cls="ui-table-plain";i.cls_tr="section-row";this.table=new b.View(i);this.setElement(this.table.$el);this.render()},render:function(){this.table.delAll();for(var j in this.inputs){this.add(this.inputs[j])}},add:function(k){var j=this;var i=jQuery.extend(true,{},k);i.id=k.id=e.uuid();this.app.input_list[i.id]=i;var l=i.type;switch(l){case"conditional":this._addConditional(i);break;case"repeat":this._addRepeat(i);break;case"section":this._addSection(i);break;default:this._addRow(i)}},_addConditional:function(j){var k=this;j.test_param.id=j.id;var n=this._addRow(j.test_param);n.options.onchange=function(w){var v=k.app.tree.matchCase(j,w);for(var u in j.cases){var q=j.cases[u];var t=j.id+"-section-"+u;var p=k.table.get(t);var s=false;for(var r in q.inputs){if(!q.inputs[r].hidden){s=true;break}}if(u==v&&s){p.fadeIn("fast")}else{p.hide()}}k.app.trigger("refresh")};for(var m in j.cases){var l=j.id+"-section-"+m;var o=new g(this.app,{inputs:j.cases[m].inputs});o.$el.addClass("ui-table-form-section");this.table.add(o.$el);this.table.append(l)}n.trigger("change")},_addRepeat:function(p){var s=this;var q=0;function n(i,u){var t=p.id+"-section-"+(q++);var v=null;if(u){v=function(){l.del(t);l.retitle(p.title);s.app.trigger("refresh")}}var w=new g(s.app,{inputs:i});l.add({id:t,title:p.title,$el:w.$el,ondel:v});l.retitle(p.title)}var l=new c.View({title_new:p.title,max:p.max,onnew:function(){n(p.inputs,true);s.app.trigger("refresh")}});var j=p.min;var r=_.size(p.cache);for(var m=0;m<Math.max(r,j);m++){var o=null;if(m<r){o=p.cache[m]}else{o=p.inputs}n(o,m>=j)}var k=new f(this.app,{label:p.title,help:p.help,field:l});k.$el.addClass("ui-table-form-section");this.table.add(k.$el);this.table.append(p.id)},_addSection:function(i){var j=this;var n=new g(j.app,{inputs:i.inputs});var m=new h.ButtonIcon({icon:"fa-eye-slash",tooltip:"Show/hide section",cls:"ui-button-icon-plain"});var l=new d.View({title:i.label,cls:"ui-portlet-section",operations:{button_visible:m}});l.append(n.$el);var k=false;l.$content.hide();l.$header.css("cursor","pointer");l.$header.on("click",function(){if(k){k=false;l.$content.hide();m.setIcon("fa-eye-slash")}else{k=true;l.$content.fadeIn("fast");m.setIcon("fa-eye")}});if(i.expand){l.$header.trigger("click")}this.table.add(l.$el);this.table.append(i.id)},_addRow:function(i){var l=i.id;var j=this._createField(i);this.app.field_list[l]=j;var k=new f(this.app,{label:i.label,default_value:i.default_value,optional:i.optional,help:i.help,field:j});this.app.element_list[l]=k;this.table.add(k.$el);this.table.append(l);if(i.hidden){this.table.get(l).hide()}return j},_createField:function(i){var j=null;switch(i.type){case"text":j=this._fieldText(i);break;case"select":j=this._fieldSelect(i);break;case"data":j=this._fieldData(i);break;case"data_collection":j=this._fieldData(i);break;case"data_column":i.error_text="Missing columns in referenced dataset.";j=this._fieldSelect(i);break;case"hidden":j=this._fieldHidden(i);break;case"hidden_data":j=this._fieldHidden(i);break;case"integer":j=this._fieldSlider(i);break;case"float":j=this._fieldSlider(i);break;case"boolean":j=this._fieldBoolean(i);break;case"genomebuild":i.searchable=true;j=this._fieldSelect(i);break;case"drill_down":j=this._fieldDrilldown(i);break;case"baseurl":j=this._fieldHidden(i);break;default:this.app.incompatible=true;if(i.options){j=this._fieldSelect(i)}else{j=this._fieldText(i)}console.debug("tools-form::_addRow() : Auto matched field type ("+i.type+").")}if(i.value!==undefined){j.value(i.value)}return j},_fieldData:function(i){if(!this.app.options.is_dynamic){i.info="Data input '"+i.name+"' ("+e.textify(i.extensions.toString())+")";i.value=null;return this._fieldHidden(i)}var j=this;return new a.View(this.app,{id:"field-"+i.id,extensions:i.extensions,optional:i.optional,multiple:i.multiple,type:i.type,data:i.options,onchange:function(){j.app.trigger("refresh")}})},_fieldSelect:function(j){if(!this.app.options.is_dynamic&&j.is_dynamic){return this._fieldText(j)}var l=[];for(var m in j.options){var n=j.options[m];l.push({label:n[0],value:n[1]})}var o=h.Select;switch(j.display){case"checkboxes":o=h.Checkbox;break;case"radio":o=h.Radio;break}var k=this;return new o.View({id:"field-"+j.id,data:l,error_text:j.error_text||"No options available",multiple:j.multiple,searchable:j.searchable,onchange:function(){k.app.trigger("refresh")}})},_fieldDrilldown:function(i){if(!this.app.options.is_dynamic&&i.is_dynamic){return this._fieldText(i)}var j=this;return new h.Drilldown.View({id:"field-"+i.id,data:i.options,display:i.display,onchange:function(){j.app.trigger("refresh")}})},_fieldText:function(i){if(i.options){i.area=i.multiple;if(!e.validate(i.value)){i.value=""}else{if(i.value instanceof Array){i.value=value.toString()}else{i.value=String(i.value).replace(/[\[\]'"\s]/g,"");if(i.multiple){i.value=i.value.replace(/,/g,"\n")}}}}var j=this;return new h.Input({id:"field-"+i.id,area:i.area,onchange:function(){j.app.trigger("refresh")}})},_fieldSlider:function(i){var j=this;return new h.Slider.View({id:"field-"+i.id,precise:i.type=="float",min:i.min,max:i.max,onchange:function(){j.app.trigger("refresh")}})},_fieldHidden:function(i){return new h.Hidden({id:"field-"+i.id,info:i.info})},_fieldBoolean:function(i){var j=this;return new h.RadioButton.View({id:"field-"+i.id,data:[{label:"Yes",value:"true"},{label:"No",value:"false"}],onchange:function(){j.app.trigger("refresh")}})}});return{View:g}});
\ No newline at end of file
diff -r 39483e4a5cbfbec5d0603b3e910a315ed52768dd -r 98fd2a336caa70166c26e005f7198369b97e1645 static/scripts/packed/mvc/tools/tools-tree.js
--- a/static/scripts/packed/mvc/tools/tools-tree.js
+++ b/static/scripts/packed/mvc/tools/tools-tree.js
@@ -1,1 +1,1 @@
-define(["utils/utils"],function(a){return Backbone.Model.extend({initialize:function(b){this.app=b},finalize:function(g){var b=this;this.map_dict={};if(!this.app.section){return{}}g=g||{};var f={};var e={};this._iterate(this.app.section.$el,e);function d(j,i,h){f[j]=h;b.map_dict[j]=i}function c(p,s){for(var n in s){var k=s[n];if(k.input){var u=k.input;var o=p;if(p!=""){o+="|"}o+=u.name;switch(u.type){case"repeat":var j="section-";var x=[];var r=null;for(var w in k){var q=w.indexOf(j);if(q!=-1){q+=j.length;x.push(parseInt(w.substr(q)));if(!r){r=w.substr(0,q)}}}x.sort(function(y,i){return y-i});var n=0;for(var l in x){c(o+"_"+n++,k[r+x[l]])}break;case"conditional":var v=b.app.field_list[u.id].value();if(g[u.test_param.type]){v=g[u.test_param.type](v)}d(o+"|"+u.test_param.name,u.id,v);var h=b.matchCase(u,v);if(h!=-1){c(o,s[u.id+"-section-"+h])}break;case"section":c("",k);break;default:var t=b.app.field_list[u.id];if(t&&t.value){var v=t.value();if(g[u.type]){v=g[u.type](v)}if((t.skip&&u.optional)||(t.validate&&!t.validate())){v=null}if(u.ignore===undefined||(v!==null&&u.ignore!=v)){d(o,u.id,v);if(u.payload){for(var m in u.payload){d(m,u.id,u.payload[m])}}}}}}}}c("",e);return f},match:function(b){return this.map_dict&&this.map_dict[b]},matchCase:function(b,d){if(b.test_param.type=="boolean"){if(d=="true"){d=b.test_param.truevalue||"true"}else{d=b.test_param.falsevalue||"false"}}for(var c in b.cases){if(b.cases[c].value==d){return c}}return -1},matchModel:function(d,f){var b={};var c=this;function e(g,p){for(var m in p){var k=p[m];var n=k.name;if(g!=""){n=g+"|"+n}switch(k.type){case"repeat":for(var l in k.cache){e(n+"_"+l,k.cache[l])}break;case"conditional":var q=k.test_param&&k.test_param.value;var h=c.matchCase(k,q);if(h!=-1){e(n,k.cases[h].inputs)}break;default:var o=c.map_dict[n];if(o){f(o,k)}}}}e("",d.inputs);return b},matchResponse:function(d){var b={};var c=this;function e(l,j){if(typeof j==="string"){var g=c.map_dict[l];if(g){b[g]=j}}else{for(var h in j){var f=h;if(l!==""){var k="|";if(j instanceof Array){k="_"}f=l+k+f}e(f,j[h])}}}e("",d);return b},_iterate:function(d,e){var b=this;var c=$(d).children();c.each(function(){var h=this;var g=$(h).attr("id");if($(h).hasClass("section-row")){e[g]={};var f=b.app.input_list[g];if(f){e[g]={input:f}}b._iterate(h,e[g])}else{b._iterate(h,e)}})}})});
\ No newline at end of file
+define(["utils/utils"],function(a){return Backbone.Model.extend({initialize:function(b){this.app=b},finalize:function(g){var b=this;this.map_dict={};if(!this.app.section){return{}}g=g||{};var f={};var e={};this._iterate(this.app.section.$el,e);function d(j,i,h){f[j]=h;b.map_dict[j]=i}function c(l,n){for(var p in n){var w=n[p];if(w.input){var s=w.input;var t=l;if(l!=""){t+="|"}t+=s.name;switch(s.type){case"repeat":var k="section-";var q=[];var m=null;for(var r in w){var o=r.indexOf(k);if(o!=-1){o+=k.length;q.push(parseInt(r.substr(o)));if(!m){m=r.substr(0,o)}}}q.sort(function(A,i){return A-i});var p=0;for(var x in q){c(t+"_"+p++,w[m+q[x]])}break;case"conditional":var v=b.app.field_list[s.id].value();if(g[s.test_param.type]){v=g[s.test_param.type](v)}d(t+"|"+s.test_param.name,s.id,v);var u=b.matchCase(s,v);if(u!=-1){c(t,n[s.id+"-section-"+u])}break;case"section":c("",w);break;default:var j=b.app.field_list[s.id];if(j&&j.value){var v=j.value();if(g[s.type]){v=g[s.type](v)}var z=j.skip&&s.optional;var h=j.validate&&!j.validate();if(!b.app.options.use_defaults){if(z||h){v=null}}else{if(!z&&h){v=null}}if(s.ignore===undefined||(v!==null&&s.ignore!=v)){d(t,s.id,v);if(s.payload){for(var y in s.payload){d(y,s.id,s.payload[y])}}}}}}}}c("",e);return f},match:function(b){return this.map_dict&&this.map_dict[b]},matchCase:function(b,d){if(b.test_param.type=="boolean"){if(d=="true"){d=b.test_param.truevalue||"true"}else{d=b.test_param.falsevalue||"false"}}for(var c in b.cases){if(b.cases[c].value==d){return c}}return -1},matchModel:function(d,f){var b={};var c=this;function e(g,p){for(var m in p){var k=p[m];var n=k.name;if(g!=""){n=g+"|"+n}switch(k.type){case"repeat":for(var l in k.cache){e(n+"_"+l,k.cache[l])}break;case"conditional":var q=k.test_param&&k.test_param.value;var h=c.matchCase(k,q);if(h!=-1){e(n,k.cases[h].inputs)}break;default:var o=c.map_dict[n];if(o){f(o,k)}}}}e("",d.inputs);return b},matchResponse:function(d){var b={};var c=this;function e(l,j){if(typeof j==="string"){var g=c.map_dict[l];if(g){b[g]=j}}else{for(var h in j){var f=h;if(l!==""){var k="|";if(j instanceof Array){k="_"}f=l+k+f}e(f,j[h])}}}e("",d);return b},_iterate:function(d,e){var b=this;var c=$(d).children();c.each(function(){var h=this;var g=$(h).attr("id");if($(h).hasClass("section-row")){e[g]={};var f=b.app.input_list[g];if(f){e[g]={input:f}}b._iterate(h,e[g])}else{b._iterate(h,e)}})}})});
\ No newline at end of file
diff -r 39483e4a5cbfbec5d0603b3e910a315ed52768dd -r 98fd2a336caa70166c26e005f7198369b97e1645 static/style/blue/base.css
--- a/static/style/blue/base.css
+++ b/static/style/blue/base.css
@@ -1397,7 +1397,7 @@
.ui-error{-moz-border-radius:3px;border-radius:3px;background:#f9c7c5;padding:5px}
.ui-table-form-error{display:none}.ui-table-form-error .ui-table-form-error-text{padding-left:5px}
.ui-table tbody{cursor:pointer}
-.ui-table-plain tbody td{padding:5px 0px 5px 0px !important;border:none !important}
+.ui-table-plain{table-layout:fixed}.ui-table-plain tbody td{padding:5px 0px 5px 0px !important;border:none !important}
.ui-table-plain tbody{cursor:auto !important}
.ui-table-form-element .ui-table-form-title-optional{font-weight:bold;text-decoration:underline;cursor:pointer}
.ui-table-form-element .ui-table-form-field{margin-top:5px}
diff -r 39483e4a5cbfbec5d0603b3e910a315ed52768dd -r 98fd2a336caa70166c26e005f7198369b97e1645 static/style/src/less/ui.less
--- a/static/style/src/less/ui.less
+++ b/static/style/src/less/ui.less
@@ -33,6 +33,7 @@
.ui-table-plain {
&:extend(.grid);
+ table-layout:fixed;
tbody td {
padding: 5px 0px 5px 0px !important;
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: guerler: ToolForm: Fix select2 width, adjust argument parsing
by commits-noreply@bitbucket.org 27 Jan '15
by commits-noreply@bitbucket.org 27 Jan '15
27 Jan '15
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/08bacc9d402e/
Changeset: 08bacc9d402e
User: guerler
Date: 2015-01-27 23:02:09+00:00
Summary: ToolForm: Fix select2 width, adjust argument parsing
Affected #: 14 files
diff -r 73a261a75185704a35a05350a31a7d5169cbc9b0 -r 08bacc9d402e75a70ddc249c959ccac846e0512f client/galaxy/scripts/mvc/tools/tools-form-base.js
--- a/client/galaxy/scripts/mvc/tools/tools-form-base.js
+++ b/client/galaxy/scripts/mvc/tools/tools-form-base.js
@@ -18,7 +18,9 @@
// shows form in compact view mode
compact : false,
// shows errors on start
- initial_errors : false
+ initial_errors : false,
+ // use default value for disabled fields
+ use_defaults : false
};
// configure options
@@ -280,8 +282,7 @@
// create tool form section
this.section = new ToolSection.View(self, {
- inputs : options.inputs,
- cls : 'ui-table-plain'
+ inputs : options.inputs
});
// switch to classic tool form mako if the form definition is incompatible
diff -r 73a261a75185704a35a05350a31a7d5169cbc9b0 -r 08bacc9d402e75a70ddc249c959ccac846e0512f client/galaxy/scripts/mvc/tools/tools-form-workflow.js
--- a/client/galaxy/scripts/mvc/tools/tools-form-workflow.js
+++ b/client/galaxy/scripts/mvc/tools/tools-form-workflow.js
@@ -21,6 +21,7 @@
// set labels
this.options.text_enable = 'In Advance';
this.options.text_disable = 'At Runtime';
+ this.options.use_defaults = true;
// declare fields as optional
Utils.deepeach(options.inputs, function(item) {
diff -r 73a261a75185704a35a05350a31a7d5169cbc9b0 -r 08bacc9d402e75a70ddc249c959ccac846e0512f client/galaxy/scripts/mvc/tools/tools-section.js
--- a/client/galaxy/scripts/mvc/tools/tools-section.js
+++ b/client/galaxy/scripts/mvc/tools/tools-section.js
@@ -14,10 +14,13 @@
// link inputs
this.inputs = options.inputs;
+ // fix table style
+ options.cls = 'ui-table-plain';
+
// add table class for tr tag
// this assist in transforming the form into a json structure
options.cls_tr = 'section-row';
-
+
// create table
this.table = new Table.View(options);
@@ -132,8 +135,7 @@
// create sub section
var sub_section = new View(this.app, {
- inputs : input_def.cases[i].inputs,
- cls : 'ui-table-plain'
+ inputs : input_def.cases[i].inputs
});
// displays as grouped subsection
@@ -181,8 +183,7 @@
// create sub section
var sub_section = new View(self.app, {
- inputs : inputs,
- cls : 'ui-table-plain'
+ inputs : inputs
});
// add tab
@@ -255,8 +256,7 @@
// create sub section
var sub_section = new View(self.app, {
- inputs : input_def.inputs,
- cls : 'ui-table-plain'
+ inputs : input_def.inputs
});
// delete button
diff -r 73a261a75185704a35a05350a31a7d5169cbc9b0 -r 08bacc9d402e75a70ddc249c959ccac846e0512f client/galaxy/scripts/mvc/tools/tools-tree.js
--- a/client/galaxy/scripts/mvc/tools/tools-tree.js
+++ b/client/galaxy/scripts/mvc/tools/tools-tree.js
@@ -123,8 +123,16 @@
}
// validate value
- if ((field.skip && input.optional) || (field.validate && !field.validate())) {
- value = null;
+ var skipped = field.skip && input.optional;
+ var unvalidated = field.validate && !field.validate();
+ if (!self.app.options.use_defaults) {
+ if (skipped || unvalidated) {
+ value = null;
+ }
+ } else {
+ if (!skipped && unvalidated) {
+ value = null;
+ }
}
// ignore certain values
diff -r 73a261a75185704a35a05350a31a7d5169cbc9b0 -r 08bacc9d402e75a70ddc249c959ccac846e0512f static/scripts/mvc/tools/tools-form-base.js
--- a/static/scripts/mvc/tools/tools-form-base.js
+++ b/static/scripts/mvc/tools/tools-form-base.js
@@ -18,7 +18,9 @@
// shows form in compact view mode
compact : false,
// shows errors on start
- initial_errors : false
+ initial_errors : false,
+ // use default value for disabled fields
+ use_defaults : false
};
// configure options
@@ -280,8 +282,7 @@
// create tool form section
this.section = new ToolSection.View(self, {
- inputs : options.inputs,
- cls : 'ui-table-plain'
+ inputs : options.inputs
});
// switch to classic tool form mako if the form definition is incompatible
diff -r 73a261a75185704a35a05350a31a7d5169cbc9b0 -r 08bacc9d402e75a70ddc249c959ccac846e0512f static/scripts/mvc/tools/tools-form-workflow.js
--- a/static/scripts/mvc/tools/tools-form-workflow.js
+++ b/static/scripts/mvc/tools/tools-form-workflow.js
@@ -21,6 +21,7 @@
// set labels
this.options.text_enable = 'In Advance';
this.options.text_disable = 'At Runtime';
+ this.options.use_defaults = true;
// declare fields as optional
Utils.deepeach(options.inputs, function(item) {
diff -r 73a261a75185704a35a05350a31a7d5169cbc9b0 -r 08bacc9d402e75a70ddc249c959ccac846e0512f static/scripts/mvc/tools/tools-section.js
--- a/static/scripts/mvc/tools/tools-section.js
+++ b/static/scripts/mvc/tools/tools-section.js
@@ -14,10 +14,13 @@
// link inputs
this.inputs = options.inputs;
+ // fix table style
+ options.cls = 'ui-table-plain';
+
// add table class for tr tag
// this assist in transforming the form into a json structure
options.cls_tr = 'section-row';
-
+
// create table
this.table = new Table.View(options);
@@ -132,8 +135,7 @@
// create sub section
var sub_section = new View(this.app, {
- inputs : input_def.cases[i].inputs,
- cls : 'ui-table-plain'
+ inputs : input_def.cases[i].inputs
});
// displays as grouped subsection
@@ -181,8 +183,7 @@
// create sub section
var sub_section = new View(self.app, {
- inputs : inputs,
- cls : 'ui-table-plain'
+ inputs : inputs
});
// add tab
@@ -255,8 +256,7 @@
// create sub section
var sub_section = new View(self.app, {
- inputs : input_def.inputs,
- cls : 'ui-table-plain'
+ inputs : input_def.inputs
});
// delete button
diff -r 73a261a75185704a35a05350a31a7d5169cbc9b0 -r 08bacc9d402e75a70ddc249c959ccac846e0512f static/scripts/mvc/tools/tools-tree.js
--- a/static/scripts/mvc/tools/tools-tree.js
+++ b/static/scripts/mvc/tools/tools-tree.js
@@ -123,8 +123,16 @@
}
// validate value
- if ((field.skip && input.optional) || (field.validate && !field.validate())) {
- value = null;
+ var skipped = field.skip && input.optional;
+ var unvalidated = field.validate && !field.validate();
+ if (!self.app.options.use_defaults) {
+ if (skipped || unvalidated) {
+ value = null;
+ }
+ } else {
+ if (!skipped && unvalidated) {
+ value = null;
+ }
}
// ignore certain values
diff -r 73a261a75185704a35a05350a31a7d5169cbc9b0 -r 08bacc9d402e75a70ddc249c959ccac846e0512f static/scripts/packed/mvc/tools/tools-form-base.js
--- a/static/scripts/packed/mvc/tools/tools-form-base.js
+++ b/static/scripts/packed/mvc/tools/tools-form-base.js
@@ -1,1 +1,1 @@
-define(["utils/utils","utils/deferred","mvc/ui/ui-portlet","mvc/ui/ui-misc","mvc/citation/citation-model","mvc/citation/citation-view","mvc/tools","mvc/tools/tools-template","mvc/tools/tools-content","mvc/tools/tools-section","mvc/tools/tools-tree"],function(g,h,f,k,i,a,d,c,e,j,b){return Backbone.View.extend({initialize:function(l){this.optionsDefault={is_dynamic:true,compact:false,initial_errors:false};this.options=g.merge(l,this.optionsDefault);console.debug(this.options);var m=parent.Galaxy;if(m&&m.modal){this.modal=m.modal}else{this.modal=new k.Modal.View()}if(m&&m.currUser){this.is_admin=m.currUser.get("is_admin")}else{this.is_admin=false}this.container=this.options.container||"body";this.deferred=new h();this.setElement("<div/>");$(this.container).append(this.$el);this._buildForm()},reciept:function(l){$(this.container).empty();$(this.container).append(l)},highlight:function(m,n,l){var o=this.element_list[m];if(o){o.error(n||"Please verify this parameter.");if(!l){$(this.container).animate({scrollTop:o.$el.offset().top-20},500)}}},_errors:function(n){this.trigger("reset");if(n&&n.errors){var o=this.tree.matchResponse(n.errors);for(var m in this.element_list){var l=this.element_list[m];if(o[m]){this.highlight(m,o[m],true)}}}},_buildForm:function(){var l=this;this.off("refresh");this.off("reset");this.field_list={};this.input_list={};this.element_list={};this.tree=new b(this);this.content=new e(this);var m=this.options;this._renderForm(m);this.tree.finalize();if(m.initial_errors){this._errors(m)}this.on("refresh",function(){l.deferred.reset();l.deferred.execute(function(){l._updateModel()})});this.on("reset",function(){for(var n in this.element_list){this.element_list[n].reset()}});this.trigger("refresh")},_renderForm:function(u){var t=this;this.message=new k.Message();var q=new k.ButtonIcon({icon:"fa-info-circle",title:(!u.compact&&"Requirements")||null,tooltip:"Display tool requirements",onclick:function(){if(!this.visible){this.visible=true;t.message.update({persistent:true,message:c.requirements(u),status:"info"})}else{this.visible=false;t.message.update({message:""})}}});if(!u.requirements||u.requirements.length==0){q.$el.hide()}var m=new k.ButtonMenu({icon:"fa-cubes",title:(!u.compact&&"Versions")||null,tooltip:"Select another tool version"});if(u.versions&&u.versions.length>1){for(var o in u.versions){var r=u.versions[o];if(r!=u.version){m.addMenu({title:"Switch to "+r,version:r,icon:"fa-cube",onclick:function(){u.id=u.id.replace(u.version,this.version);u.version=this.version;t.deferred.reset();t.deferred.execute(function(){t._buildModel()})}})}}}else{m.$el.hide()}var p=new k.ButtonMenu({icon:"fa-caret-down",title:(!u.compact&&"Options")||null,tooltip:"View available options"});if(u.biostar_url){p.addMenu({icon:"fa-question-circle",title:"Question?",tooltip:"Ask a question about this tool (Biostar)",onclick:function(){window.open(u.biostar_url+"/p/new/post/")}});p.addMenu({icon:"fa-search",title:"Search",tooltip:"Search help for this tool (Biostar)",onclick:function(){window.open(u.biostar_url+"/t/"+u.id+"/")}})}p.addMenu({icon:"fa-share",title:"Share",tooltip:"Share this tool",onclick:function(){prompt("Copy to clipboard: Ctrl+C, Enter",window.location.origin+galaxy_config.root+"root?tool_id="+u.id)}});if(this.is_admin){p.addMenu({icon:"fa-download",title:"Download",tooltip:"Download this tool",onclick:function(){window.location.href=galaxy_config.root+"api/tools/"+u.id+"/download"}})}this.section=new j.View(t,{inputs:u.inputs,cls:"ui-table-plain"});if(this.incompatible){this.$el.hide();$("#tool-form-classic").show();return}this.portlet=new f.View({icon:"fa-wrench",title:"<b>"+u.name+"</b> "+u.description+" (Galaxy Tool Version "+u.version+")",cls:"ui-portlet-slim",operations:{requirements:q,menu:p,versions:m},buttons:this.buttons});if(u.compact){this.portlet.$content.css("padding","0px")}this.portlet.append(this.message.$el,true);this.portlet.append(this.section.$el);this.$el.empty();this.$el.append(this.portlet.$el);if(u.help!=""){this.$el.append(c.help(u.help))}if(u.citations){var s=$("<div/>");var l=new i.ToolCitationCollection();l.tool_id=u.id;var n=new a.CitationListView({el:s,collection:l});n.render();l.fetch();this.$el.append(s)}if(u.message){this.message.update({persistent:true,status:"warning",message:u.message})}}})});
\ No newline at end of file
+define(["utils/utils","utils/deferred","mvc/ui/ui-portlet","mvc/ui/ui-misc","mvc/citation/citation-model","mvc/citation/citation-view","mvc/tools","mvc/tools/tools-template","mvc/tools/tools-content","mvc/tools/tools-section","mvc/tools/tools-tree"],function(g,h,f,k,i,a,d,c,e,j,b){return Backbone.View.extend({initialize:function(l){this.optionsDefault={is_dynamic:true,compact:false,initial_errors:false,use_defaults:false};this.options=g.merge(l,this.optionsDefault);console.debug(this.options);var m=parent.Galaxy;if(m&&m.modal){this.modal=m.modal}else{this.modal=new k.Modal.View()}if(m&&m.currUser){this.is_admin=m.currUser.get("is_admin")}else{this.is_admin=false}this.container=this.options.container||"body";this.deferred=new h();this.setElement("<div/>");$(this.container).append(this.$el);this._buildForm()},reciept:function(l){$(this.container).empty();$(this.container).append(l)},highlight:function(m,n,l){var o=this.element_list[m];if(o){o.error(n||"Please verify this parameter.");if(!l){$(this.container).animate({scrollTop:o.$el.offset().top-20},500)}}},_errors:function(n){this.trigger("reset");if(n&&n.errors){var o=this.tree.matchResponse(n.errors);for(var m in this.element_list){var l=this.element_list[m];if(o[m]){this.highlight(m,o[m],true)}}}},_buildForm:function(){var l=this;this.off("refresh");this.off("reset");this.field_list={};this.input_list={};this.element_list={};this.tree=new b(this);this.content=new e(this);var m=this.options;this._renderForm(m);this.tree.finalize();if(m.initial_errors){this._errors(m)}this.on("refresh",function(){l.deferred.reset();l.deferred.execute(function(){l._updateModel()})});this.on("reset",function(){for(var n in this.element_list){this.element_list[n].reset()}});this.trigger("refresh")},_renderForm:function(u){var t=this;this.message=new k.Message();var q=new k.ButtonIcon({icon:"fa-info-circle",title:(!u.compact&&"Requirements")||null,tooltip:"Display tool requirements",onclick:function(){if(!this.visible){this.visible=true;t.message.update({persistent:true,message:c.requirements(u),status:"info"})}else{this.visible=false;t.message.update({message:""})}}});if(!u.requirements||u.requirements.length==0){q.$el.hide()}var m=new k.ButtonMenu({icon:"fa-cubes",title:(!u.compact&&"Versions")||null,tooltip:"Select another tool version"});if(u.versions&&u.versions.length>1){for(var o in u.versions){var r=u.versions[o];if(r!=u.version){m.addMenu({title:"Switch to "+r,version:r,icon:"fa-cube",onclick:function(){u.id=u.id.replace(u.version,this.version);u.version=this.version;t.deferred.reset();t.deferred.execute(function(){t._buildModel()})}})}}}else{m.$el.hide()}var p=new k.ButtonMenu({icon:"fa-caret-down",title:(!u.compact&&"Options")||null,tooltip:"View available options"});if(u.biostar_url){p.addMenu({icon:"fa-question-circle",title:"Question?",tooltip:"Ask a question about this tool (Biostar)",onclick:function(){window.open(u.biostar_url+"/p/new/post/")}});p.addMenu({icon:"fa-search",title:"Search",tooltip:"Search help for this tool (Biostar)",onclick:function(){window.open(u.biostar_url+"/t/"+u.id+"/")}})}p.addMenu({icon:"fa-share",title:"Share",tooltip:"Share this tool",onclick:function(){prompt("Copy to clipboard: Ctrl+C, Enter",window.location.origin+galaxy_config.root+"root?tool_id="+u.id)}});if(this.is_admin){p.addMenu({icon:"fa-download",title:"Download",tooltip:"Download this tool",onclick:function(){window.location.href=galaxy_config.root+"api/tools/"+u.id+"/download"}})}this.section=new j.View(t,{inputs:u.inputs});if(this.incompatible){this.$el.hide();$("#tool-form-classic").show();return}this.portlet=new f.View({icon:"fa-wrench",title:"<b>"+u.name+"</b> "+u.description+" (Galaxy Tool Version "+u.version+")",cls:"ui-portlet-slim",operations:{requirements:q,menu:p,versions:m},buttons:this.buttons});if(u.compact){this.portlet.$content.css("padding","0px")}this.portlet.append(this.message.$el,true);this.portlet.append(this.section.$el);this.$el.empty();this.$el.append(this.portlet.$el);if(u.help!=""){this.$el.append(c.help(u.help))}if(u.citations){var s=$("<div/>");var l=new i.ToolCitationCollection();l.tool_id=u.id;var n=new a.CitationListView({el:s,collection:l});n.render();l.fetch();this.$el.append(s)}if(u.message){this.message.update({persistent:true,status:"warning",message:u.message})}}})});
\ No newline at end of file
diff -r 73a261a75185704a35a05350a31a7d5169cbc9b0 -r 08bacc9d402e75a70ddc249c959ccac846e0512f static/scripts/packed/mvc/tools/tools-form-workflow.js
--- a/static/scripts/packed/mvc/tools/tools-form-workflow.js
+++ b/static/scripts/packed/mvc/tools/tools-form-workflow.js
@@ -1,1 +1,1 @@
-define(["utils/utils","mvc/tools/tools-form-base"],function(b,a){var c=a.extend({initialize:function(e){this.node=workflow.active_node;if(!this.node){console.debug("FAILED - tools-form-workflow:initialize() - Node not found in workflow.");return}this.options=e;this.options.text_enable="In Advance";this.options.text_disable="At Runtime";b.deepeach(e.inputs,function(f){if(f.type){f.optional=(["data","data_hidden","hidden","drill_down","repeat","conditional"]).indexOf(f.type)==-1}});b.deepeach(e.inputs,function(f){if(f.type){if(f.type=="conditional"){f.test_param.optional=false}}});var d=this;b.get({url:galaxy_config.root+"api/datatypes",cache:true,success:function(f){d.datatypes=f;d._makeSections(e.inputs);a.prototype.initialize.call(d,e)}})},_makeSections:function(d){d[b.uuid()]={label:"Edit Step Attributes",type:"section",expand:this.node.annotation,inputs:[{label:"Annotation / Notes",name:"annotation",type:"text",area:true,help:"Add an annotation or notes to this step; annotations are available when a workflow is viewed.",value:this.node.annotation}]};this.post_job_actions=this.node.post_job_actions;for(var e in this.node.output_terminals){d[b.uuid()]=this._makeSection(e)}},_makeSection:function(h){var g=[];for(key in this.datatypes){g.push({0:this.datatypes[key],1:this.datatypes[key]})}g.sort(function(j,i){return j.label>i.label?1:j.label<i.label?-1:0});g.unshift({0:"Sequences",1:"Sequences"});g.unshift({0:"Roadmaps",1:"Roadmaps"});g.unshift({0:"Leave unchanged",1:"None"});var f={label:"Edit Step Action: '"+h+"'",type:"section",inputs:[{action:"RenameDatasetAction",argument:"newname",label:"Rename dataset",type:"text",value:"",ignore:"",help:'This action will rename the result dataset. Click <a href="https://wiki.galaxyproject.org/Learn/AdvancedWorkflow/Variables">here</a> for more information.'},{action:"ChangeDatatypeAction",argument:"newtype",label:"Change datatype",type:"select",ignore:"None",options:g,help:"This action will change the datatype of the output to the indicated value."},{action:"TagDatasetAction",argument:"tags",label:"Tags",type:"text",value:"",ignore:"",help:"This action will set tags for the dataset."},{label:"Assign columns",type:"section",inputs:[{action:"ColumnSetAction",argument:"chromCol",label:"Chrom column",type:"text",value:"",ignore:""},{action:"ColumnSetAction",argument:"startCol",label:"Start column",type:"text",value:"",ignore:""},{action:"ColumnSetAction",argument:"endCol",label:"End column",type:"text",value:"",ignore:""},{action:"ColumnSetAction",argument:"strandCol",label:"Strand column",type:"text",value:"",ignore:""},{action:"ColumnSetAction",argument:"nameCol",label:"Name column",type:"text",value:"",ignore:""}],help:"This action will set column assignments in the output dataset. Blank fields are ignored."},{action:"EmailAction",label:"Email notification",type:"boolean",value:"false",ignore:"false",help:"This action will send an email notifying you when the job is done.",payload:{host:window.location.host}},{action:"DeleteIntermediatesAction",label:"Delete non-outputs",type:"boolean",value:"false",ignore:"false",help:"All non-output steps of this workflow will have datasets deleted if they are no longer being used as job inputs when the job this action is attached to is finished. You *must* be using workflow outputs (the snowflake) in your workflow for this to have any effect."}]};var d=this;function e(n,o){o=o||[];o.push(n);for(var m in n.inputs){var k=n.inputs[m];if(k.action){k.name="pja__"+h+"__"+k.action;if(k.argument){k.name+="__"+k.argument}if(k.payload){for(var s in k.payload){var q=k.payload[s];k.payload[k.name+"__"+s]=q;delete q}}var r=d.post_job_actions[k.action+h];if(r){for(var l in o){o[l].expand=true}if(k.argument){k.value=r.action_arguments&&r.action_arguments[k.argument]||k.value}else{k.value="true"}}}if(k.inputs){e(k,o.slice(0))}}}e(f);return f},_buildModel:function(){Galaxy.modal.show({title:"Coming soon...",body:"This feature has not been implemented yet.",buttons:{Close:function(){Galaxy.modal.hide()}}})},_updateModel:function(){var d=this;var e=this.tree.finalize();console.debug("tools-form-workflow::_refreshForm() - Refreshing states.");console.debug(e);var g=this.deferred.register();var f=galaxy_config.root+"workflow/editor_form_post?tool_id="+this.options.id+"&__is_dynamic__=False";b.request({type:"GET",url:f,data:e,success:function(h){d.node.update_field_data(h);d._errors(h&&h.tool_model);d.deferred.done(g);console.debug("tools-form::_refreshForm() - States refreshed.");console.debug(h)},error:function(h){d.deferred.done(g);console.debug("tools-form::_refreshForm() - Refresh request failed.");console.debug(h)}})}});return{View:c}});
\ No newline at end of file
+define(["utils/utils","mvc/tools/tools-form-base"],function(b,a){var c=a.extend({initialize:function(e){this.node=workflow.active_node;if(!this.node){console.debug("FAILED - tools-form-workflow:initialize() - Node not found in workflow.");return}this.options=e;this.options.text_enable="In Advance";this.options.text_disable="At Runtime";this.options.use_defaults=true;b.deepeach(e.inputs,function(f){if(f.type){f.optional=(["data","data_hidden","hidden","drill_down","repeat","conditional"]).indexOf(f.type)==-1}});b.deepeach(e.inputs,function(f){if(f.type){if(f.type=="conditional"){f.test_param.optional=false}}});var d=this;b.get({url:galaxy_config.root+"api/datatypes",cache:true,success:function(f){d.datatypes=f;d._makeSections(e.inputs);a.prototype.initialize.call(d,e)}})},_makeSections:function(d){d[b.uuid()]={label:"Edit Step Attributes",type:"section",expand:this.node.annotation,inputs:[{label:"Annotation / Notes",name:"annotation",type:"text",area:true,help:"Add an annotation or notes to this step; annotations are available when a workflow is viewed.",value:this.node.annotation}]};this.post_job_actions=this.node.post_job_actions;for(var e in this.node.output_terminals){d[b.uuid()]=this._makeSection(e)}},_makeSection:function(h){var g=[];for(key in this.datatypes){g.push({0:this.datatypes[key],1:this.datatypes[key]})}g.sort(function(j,i){return j.label>i.label?1:j.label<i.label?-1:0});g.unshift({0:"Sequences",1:"Sequences"});g.unshift({0:"Roadmaps",1:"Roadmaps"});g.unshift({0:"Leave unchanged",1:"None"});var f={label:"Edit Step Action: '"+h+"'",type:"section",inputs:[{action:"RenameDatasetAction",argument:"newname",label:"Rename dataset",type:"text",value:"",ignore:"",help:'This action will rename the result dataset. Click <a href="https://wiki.galaxyproject.org/Learn/AdvancedWorkflow/Variables">here</a> for more information.'},{action:"ChangeDatatypeAction",argument:"newtype",label:"Change datatype",type:"select",ignore:"None",options:g,help:"This action will change the datatype of the output to the indicated value."},{action:"TagDatasetAction",argument:"tags",label:"Tags",type:"text",value:"",ignore:"",help:"This action will set tags for the dataset."},{label:"Assign columns",type:"section",inputs:[{action:"ColumnSetAction",argument:"chromCol",label:"Chrom column",type:"text",value:"",ignore:""},{action:"ColumnSetAction",argument:"startCol",label:"Start column",type:"text",value:"",ignore:""},{action:"ColumnSetAction",argument:"endCol",label:"End column",type:"text",value:"",ignore:""},{action:"ColumnSetAction",argument:"strandCol",label:"Strand column",type:"text",value:"",ignore:""},{action:"ColumnSetAction",argument:"nameCol",label:"Name column",type:"text",value:"",ignore:""}],help:"This action will set column assignments in the output dataset. Blank fields are ignored."},{action:"EmailAction",label:"Email notification",type:"boolean",value:"false",ignore:"false",help:"This action will send an email notifying you when the job is done.",payload:{host:window.location.host}},{action:"DeleteIntermediatesAction",label:"Delete non-outputs",type:"boolean",value:"false",ignore:"false",help:"All non-output steps of this workflow will have datasets deleted if they are no longer being used as job inputs when the job this action is attached to is finished. You *must* be using workflow outputs (the snowflake) in your workflow for this to have any effect."}]};var d=this;function e(n,o){o=o||[];o.push(n);for(var m in n.inputs){var k=n.inputs[m];if(k.action){k.name="pja__"+h+"__"+k.action;if(k.argument){k.name+="__"+k.argument}if(k.payload){for(var s in k.payload){var q=k.payload[s];k.payload[k.name+"__"+s]=q;delete q}}var r=d.post_job_actions[k.action+h];if(r){for(var l in o){o[l].expand=true}if(k.argument){k.value=r.action_arguments&&r.action_arguments[k.argument]||k.value}else{k.value="true"}}}if(k.inputs){e(k,o.slice(0))}}}e(f);return f},_buildModel:function(){Galaxy.modal.show({title:"Coming soon...",body:"This feature has not been implemented yet.",buttons:{Close:function(){Galaxy.modal.hide()}}})},_updateModel:function(){var d=this;var e=this.tree.finalize();console.debug("tools-form-workflow::_refreshForm() - Refreshing states.");console.debug(e);var g=this.deferred.register();var f=galaxy_config.root+"workflow/editor_form_post?tool_id="+this.options.id+"&__is_dynamic__=False";b.request({type:"GET",url:f,data:e,success:function(h){d.node.update_field_data(h);d._errors(h&&h.tool_model);d.deferred.done(g);console.debug("tools-form::_refreshForm() - States refreshed.");console.debug(h)},error:function(h){d.deferred.done(g);console.debug("tools-form::_refreshForm() - Refresh request failed.");console.debug(h)}})}});return{View:c}});
\ No newline at end of file
diff -r 73a261a75185704a35a05350a31a7d5169cbc9b0 -r 08bacc9d402e75a70ddc249c959ccac846e0512f static/scripts/packed/mvc/tools/tools-section.js
--- a/static/scripts/packed/mvc/tools/tools-section.js
+++ b/static/scripts/packed/mvc/tools/tools-section.js
@@ -1,1 +1,1 @@
-define(["utils/utils","mvc/ui/ui-table","mvc/ui/ui-misc","mvc/ui/ui-portlet","mvc/tools/tools-repeat","mvc/tools/tools-select-content","mvc/tools/tools-input"],function(e,b,h,d,c,a,f){var g=Backbone.View.extend({initialize:function(j,i){this.app=j;this.inputs=i.inputs;i.cls_tr="section-row";this.table=new b.View(i);this.setElement(this.table.$el);this.render()},render:function(){this.table.delAll();for(var j in this.inputs){this.add(this.inputs[j])}},add:function(k){var j=this;var i=jQuery.extend(true,{},k);i.id=k.id=e.uuid();this.app.input_list[i.id]=i;var l=i.type;switch(l){case"conditional":this._addConditional(i);break;case"repeat":this._addRepeat(i);break;case"section":this._addSection(i);break;default:this._addRow(i)}},_addConditional:function(j){var k=this;j.test_param.id=j.id;var n=this._addRow(j.test_param);n.options.onchange=function(w){var v=k.app.tree.matchCase(j,w);for(var u in j.cases){var q=j.cases[u];var t=j.id+"-section-"+u;var p=k.table.get(t);var s=false;for(var r in q.inputs){if(!q.inputs[r].hidden){s=true;break}}if(u==v&&s){p.fadeIn("fast")}else{p.hide()}}k.app.trigger("refresh")};for(var m in j.cases){var l=j.id+"-section-"+m;var o=new g(this.app,{inputs:j.cases[m].inputs,cls:"ui-table-plain"});o.$el.addClass("ui-table-form-section");this.table.add(o.$el);this.table.append(l)}n.trigger("change")},_addRepeat:function(p){var s=this;var q=0;function n(i,u){var t=p.id+"-section-"+(q++);var v=null;if(u){v=function(){l.del(t);l.retitle(p.title);s.app.trigger("refresh")}}var w=new g(s.app,{inputs:i,cls:"ui-table-plain"});l.add({id:t,title:p.title,$el:w.$el,ondel:v});l.retitle(p.title)}var l=new c.View({title_new:p.title,max:p.max,onnew:function(){n(p.inputs,true);s.app.trigger("refresh")}});var j=p.min;var r=_.size(p.cache);for(var m=0;m<Math.max(r,j);m++){var o=null;if(m<r){o=p.cache[m]}else{o=p.inputs}n(o,m>=j)}var k=new f(this.app,{label:p.title,help:p.help,field:l});k.$el.addClass("ui-table-form-section");this.table.add(k.$el);this.table.append(p.id)},_addSection:function(i){var j=this;var n=new g(j.app,{inputs:i.inputs,cls:"ui-table-plain"});var m=new h.ButtonIcon({icon:"fa-eye-slash",tooltip:"Show/hide section",cls:"ui-button-icon-plain"});var l=new d.View({title:i.label,cls:"ui-portlet-section",operations:{button_visible:m}});l.append(n.$el);var k=false;l.$content.hide();l.$header.css("cursor","pointer");l.$header.on("click",function(){if(k){k=false;l.$content.hide();m.setIcon("fa-eye-slash")}else{k=true;l.$content.fadeIn("fast");m.setIcon("fa-eye")}});if(i.expand){l.$header.trigger("click")}this.table.add(l.$el);this.table.append(i.id)},_addRow:function(i){var l=i.id;var j=this._createField(i);this.app.field_list[l]=j;var k=new f(this.app,{label:i.label,default_value:i.default_value,optional:i.optional,help:i.help,field:j});this.app.element_list[l]=k;this.table.add(k.$el);this.table.append(l);if(i.hidden){this.table.get(l).hide()}return j},_createField:function(i){var j=null;switch(i.type){case"text":j=this._fieldText(i);break;case"select":j=this._fieldSelect(i);break;case"data":j=this._fieldData(i);break;case"data_collection":j=this._fieldData(i);break;case"data_column":i.error_text="Missing columns in referenced dataset.";j=this._fieldSelect(i);break;case"hidden":j=this._fieldHidden(i);break;case"hidden_data":j=this._fieldHidden(i);break;case"integer":j=this._fieldSlider(i);break;case"float":j=this._fieldSlider(i);break;case"boolean":j=this._fieldBoolean(i);break;case"genomebuild":i.searchable=true;j=this._fieldSelect(i);break;case"drill_down":j=this._fieldDrilldown(i);break;case"baseurl":j=this._fieldHidden(i);break;default:this.app.incompatible=true;if(i.options){j=this._fieldSelect(i)}else{j=this._fieldText(i)}console.debug("tools-form::_addRow() : Auto matched field type ("+i.type+").")}if(i.value!==undefined){j.value(i.value)}return j},_fieldData:function(i){if(!this.app.options.is_dynamic){i.info="Data input '"+i.name+"' ("+e.textify(i.extensions.toString())+")";i.value=null;return this._fieldHidden(i)}var j=this;return new a.View(this.app,{id:"field-"+i.id,extensions:i.extensions,optional:i.optional,multiple:i.multiple,type:i.type,data:i.options,onchange:function(){j.app.trigger("refresh")}})},_fieldSelect:function(j){if(!this.app.options.is_dynamic&&j.is_dynamic){return this._fieldText(j)}var l=[];for(var m in j.options){var n=j.options[m];l.push({label:n[0],value:n[1]})}var o=h.Select;switch(j.display){case"checkboxes":o=h.Checkbox;break;case"radio":o=h.Radio;break}var k=this;return new o.View({id:"field-"+j.id,data:l,error_text:j.error_text||"No options available",multiple:j.multiple,searchable:j.searchable,onchange:function(){k.app.trigger("refresh")}})},_fieldDrilldown:function(i){if(!this.app.options.is_dynamic&&i.is_dynamic){return this._fieldText(i)}var j=this;return new h.Drilldown.View({id:"field-"+i.id,data:i.options,display:i.display,onchange:function(){j.app.trigger("refresh")}})},_fieldText:function(i){if(i.options){i.area=i.multiple;if(!e.validate(i.value)){i.value=""}else{if(i.value instanceof Array){i.value=value.toString()}else{i.value=String(i.value).replace(/[\[\]'"\s]/g,"");if(i.multiple){i.value=i.value.replace(/,/g,"\n")}}}}var j=this;return new h.Input({id:"field-"+i.id,area:i.area,onchange:function(){j.app.trigger("refresh")}})},_fieldSlider:function(i){var j=this;return new h.Slider.View({id:"field-"+i.id,precise:i.type=="float",min:i.min,max:i.max,onchange:function(){j.app.trigger("refresh")}})},_fieldHidden:function(i){return new h.Hidden({id:"field-"+i.id,info:i.info})},_fieldBoolean:function(i){var j=this;return new h.RadioButton.View({id:"field-"+i.id,data:[{label:"Yes",value:"true"},{label:"No",value:"false"}],onchange:function(){j.app.trigger("refresh")}})}});return{View:g}});
\ No newline at end of file
+define(["utils/utils","mvc/ui/ui-table","mvc/ui/ui-misc","mvc/ui/ui-portlet","mvc/tools/tools-repeat","mvc/tools/tools-select-content","mvc/tools/tools-input"],function(e,b,h,d,c,a,f){var g=Backbone.View.extend({initialize:function(j,i){this.app=j;this.inputs=i.inputs;i.cls="ui-table-plain";i.cls_tr="section-row";this.table=new b.View(i);this.setElement(this.table.$el);this.render()},render:function(){this.table.delAll();for(var j in this.inputs){this.add(this.inputs[j])}},add:function(k){var j=this;var i=jQuery.extend(true,{},k);i.id=k.id=e.uuid();this.app.input_list[i.id]=i;var l=i.type;switch(l){case"conditional":this._addConditional(i);break;case"repeat":this._addRepeat(i);break;case"section":this._addSection(i);break;default:this._addRow(i)}},_addConditional:function(j){var k=this;j.test_param.id=j.id;var n=this._addRow(j.test_param);n.options.onchange=function(w){var v=k.app.tree.matchCase(j,w);for(var u in j.cases){var q=j.cases[u];var t=j.id+"-section-"+u;var p=k.table.get(t);var s=false;for(var r in q.inputs){if(!q.inputs[r].hidden){s=true;break}}if(u==v&&s){p.fadeIn("fast")}else{p.hide()}}k.app.trigger("refresh")};for(var m in j.cases){var l=j.id+"-section-"+m;var o=new g(this.app,{inputs:j.cases[m].inputs});o.$el.addClass("ui-table-form-section");this.table.add(o.$el);this.table.append(l)}n.trigger("change")},_addRepeat:function(p){var s=this;var q=0;function n(i,u){var t=p.id+"-section-"+(q++);var v=null;if(u){v=function(){l.del(t);l.retitle(p.title);s.app.trigger("refresh")}}var w=new g(s.app,{inputs:i});l.add({id:t,title:p.title,$el:w.$el,ondel:v});l.retitle(p.title)}var l=new c.View({title_new:p.title,max:p.max,onnew:function(){n(p.inputs,true);s.app.trigger("refresh")}});var j=p.min;var r=_.size(p.cache);for(var m=0;m<Math.max(r,j);m++){var o=null;if(m<r){o=p.cache[m]}else{o=p.inputs}n(o,m>=j)}var k=new f(this.app,{label:p.title,help:p.help,field:l});k.$el.addClass("ui-table-form-section");this.table.add(k.$el);this.table.append(p.id)},_addSection:function(i){var j=this;var n=new g(j.app,{inputs:i.inputs});var m=new h.ButtonIcon({icon:"fa-eye-slash",tooltip:"Show/hide section",cls:"ui-button-icon-plain"});var l=new d.View({title:i.label,cls:"ui-portlet-section",operations:{button_visible:m}});l.append(n.$el);var k=false;l.$content.hide();l.$header.css("cursor","pointer");l.$header.on("click",function(){if(k){k=false;l.$content.hide();m.setIcon("fa-eye-slash")}else{k=true;l.$content.fadeIn("fast");m.setIcon("fa-eye")}});if(i.expand){l.$header.trigger("click")}this.table.add(l.$el);this.table.append(i.id)},_addRow:function(i){var l=i.id;var j=this._createField(i);this.app.field_list[l]=j;var k=new f(this.app,{label:i.label,default_value:i.default_value,optional:i.optional,help:i.help,field:j});this.app.element_list[l]=k;this.table.add(k.$el);this.table.append(l);if(i.hidden){this.table.get(l).hide()}return j},_createField:function(i){var j=null;switch(i.type){case"text":j=this._fieldText(i);break;case"select":j=this._fieldSelect(i);break;case"data":j=this._fieldData(i);break;case"data_collection":j=this._fieldData(i);break;case"data_column":i.error_text="Missing columns in referenced dataset.";j=this._fieldSelect(i);break;case"hidden":j=this._fieldHidden(i);break;case"hidden_data":j=this._fieldHidden(i);break;case"integer":j=this._fieldSlider(i);break;case"float":j=this._fieldSlider(i);break;case"boolean":j=this._fieldBoolean(i);break;case"genomebuild":i.searchable=true;j=this._fieldSelect(i);break;case"drill_down":j=this._fieldDrilldown(i);break;case"baseurl":j=this._fieldHidden(i);break;default:this.app.incompatible=true;if(i.options){j=this._fieldSelect(i)}else{j=this._fieldText(i)}console.debug("tools-form::_addRow() : Auto matched field type ("+i.type+").")}if(i.value!==undefined){j.value(i.value)}return j},_fieldData:function(i){if(!this.app.options.is_dynamic){i.info="Data input '"+i.name+"' ("+e.textify(i.extensions.toString())+")";i.value=null;return this._fieldHidden(i)}var j=this;return new a.View(this.app,{id:"field-"+i.id,extensions:i.extensions,optional:i.optional,multiple:i.multiple,type:i.type,data:i.options,onchange:function(){j.app.trigger("refresh")}})},_fieldSelect:function(j){if(!this.app.options.is_dynamic&&j.is_dynamic){return this._fieldText(j)}var l=[];for(var m in j.options){var n=j.options[m];l.push({label:n[0],value:n[1]})}var o=h.Select;switch(j.display){case"checkboxes":o=h.Checkbox;break;case"radio":o=h.Radio;break}var k=this;return new o.View({id:"field-"+j.id,data:l,error_text:j.error_text||"No options available",multiple:j.multiple,searchable:j.searchable,onchange:function(){k.app.trigger("refresh")}})},_fieldDrilldown:function(i){if(!this.app.options.is_dynamic&&i.is_dynamic){return this._fieldText(i)}var j=this;return new h.Drilldown.View({id:"field-"+i.id,data:i.options,display:i.display,onchange:function(){j.app.trigger("refresh")}})},_fieldText:function(i){if(i.options){i.area=i.multiple;if(!e.validate(i.value)){i.value=""}else{if(i.value instanceof Array){i.value=value.toString()}else{i.value=String(i.value).replace(/[\[\]'"\s]/g,"");if(i.multiple){i.value=i.value.replace(/,/g,"\n")}}}}var j=this;return new h.Input({id:"field-"+i.id,area:i.area,onchange:function(){j.app.trigger("refresh")}})},_fieldSlider:function(i){var j=this;return new h.Slider.View({id:"field-"+i.id,precise:i.type=="float",min:i.min,max:i.max,onchange:function(){j.app.trigger("refresh")}})},_fieldHidden:function(i){return new h.Hidden({id:"field-"+i.id,info:i.info})},_fieldBoolean:function(i){var j=this;return new h.RadioButton.View({id:"field-"+i.id,data:[{label:"Yes",value:"true"},{label:"No",value:"false"}],onchange:function(){j.app.trigger("refresh")}})}});return{View:g}});
\ No newline at end of file
diff -r 73a261a75185704a35a05350a31a7d5169cbc9b0 -r 08bacc9d402e75a70ddc249c959ccac846e0512f static/scripts/packed/mvc/tools/tools-tree.js
--- a/static/scripts/packed/mvc/tools/tools-tree.js
+++ b/static/scripts/packed/mvc/tools/tools-tree.js
@@ -1,1 +1,1 @@
-define(["utils/utils"],function(a){return Backbone.Model.extend({initialize:function(b){this.app=b},finalize:function(g){var b=this;this.map_dict={};if(!this.app.section){return{}}g=g||{};var f={};var e={};this._iterate(this.app.section.$el,e);function d(j,i,h){f[j]=h;b.map_dict[j]=i}function c(p,s){for(var n in s){var k=s[n];if(k.input){var u=k.input;var o=p;if(p!=""){o+="|"}o+=u.name;switch(u.type){case"repeat":var j="section-";var x=[];var r=null;for(var w in k){var q=w.indexOf(j);if(q!=-1){q+=j.length;x.push(parseInt(w.substr(q)));if(!r){r=w.substr(0,q)}}}x.sort(function(y,i){return y-i});var n=0;for(var l in x){c(o+"_"+n++,k[r+x[l]])}break;case"conditional":var v=b.app.field_list[u.id].value();if(g[u.test_param.type]){v=g[u.test_param.type](v)}d(o+"|"+u.test_param.name,u.id,v);var h=b.matchCase(u,v);if(h!=-1){c(o,s[u.id+"-section-"+h])}break;case"section":c("",k);break;default:var t=b.app.field_list[u.id];if(t&&t.value){var v=t.value();if(g[u.type]){v=g[u.type](v)}if((t.skip&&u.optional)||(t.validate&&!t.validate())){v=null}if(u.ignore===undefined||(v!==null&&u.ignore!=v)){d(o,u.id,v);if(u.payload){for(var m in u.payload){d(m,u.id,u.payload[m])}}}}}}}}c("",e);return f},match:function(b){return this.map_dict&&this.map_dict[b]},matchCase:function(b,d){if(b.test_param.type=="boolean"){if(d=="true"){d=b.test_param.truevalue||"true"}else{d=b.test_param.falsevalue||"false"}}for(var c in b.cases){if(b.cases[c].value==d){return c}}return -1},matchModel:function(d,f){var b={};var c=this;function e(g,p){for(var m in p){var k=p[m];var n=k.name;if(g!=""){n=g+"|"+n}switch(k.type){case"repeat":for(var l in k.cache){e(n+"_"+l,k.cache[l])}break;case"conditional":var q=k.test_param&&k.test_param.value;var h=c.matchCase(k,q);if(h!=-1){e(n,k.cases[h].inputs)}break;default:var o=c.map_dict[n];if(o){f(o,k)}}}}e("",d.inputs);return b},matchResponse:function(d){var b={};var c=this;function e(l,j){if(typeof j==="string"){var g=c.map_dict[l];if(g){b[g]=j}}else{for(var h in j){var f=h;if(l!==""){var k="|";if(j instanceof Array){k="_"}f=l+k+f}e(f,j[h])}}}e("",d);return b},_iterate:function(d,e){var b=this;var c=$(d).children();c.each(function(){var h=this;var g=$(h).attr("id");if($(h).hasClass("section-row")){e[g]={};var f=b.app.input_list[g];if(f){e[g]={input:f}}b._iterate(h,e[g])}else{b._iterate(h,e)}})}})});
\ No newline at end of file
+define(["utils/utils"],function(a){return Backbone.Model.extend({initialize:function(b){this.app=b},finalize:function(g){var b=this;this.map_dict={};if(!this.app.section){return{}}g=g||{};var f={};var e={};this._iterate(this.app.section.$el,e);function d(j,i,h){f[j]=h;b.map_dict[j]=i}function c(l,n){for(var p in n){var w=n[p];if(w.input){var s=w.input;var t=l;if(l!=""){t+="|"}t+=s.name;switch(s.type){case"repeat":var k="section-";var q=[];var m=null;for(var r in w){var o=r.indexOf(k);if(o!=-1){o+=k.length;q.push(parseInt(r.substr(o)));if(!m){m=r.substr(0,o)}}}q.sort(function(A,i){return A-i});var p=0;for(var x in q){c(t+"_"+p++,w[m+q[x]])}break;case"conditional":var v=b.app.field_list[s.id].value();if(g[s.test_param.type]){v=g[s.test_param.type](v)}d(t+"|"+s.test_param.name,s.id,v);var u=b.matchCase(s,v);if(u!=-1){c(t,n[s.id+"-section-"+u])}break;case"section":c("",w);break;default:var j=b.app.field_list[s.id];if(j&&j.value){var v=j.value();if(g[s.type]){v=g[s.type](v)}var z=j.skip&&s.optional;var h=j.validate&&!j.validate();if(!b.app.options.use_defaults){if(z||h){v=null}}else{if(!z&&h){v=null}}if(s.ignore===undefined||(v!==null&&s.ignore!=v)){d(t,s.id,v);if(s.payload){for(var y in s.payload){d(y,s.id,s.payload[y])}}}}}}}}c("",e);return f},match:function(b){return this.map_dict&&this.map_dict[b]},matchCase:function(b,d){if(b.test_param.type=="boolean"){if(d=="true"){d=b.test_param.truevalue||"true"}else{d=b.test_param.falsevalue||"false"}}for(var c in b.cases){if(b.cases[c].value==d){return c}}return -1},matchModel:function(d,f){var b={};var c=this;function e(g,p){for(var m in p){var k=p[m];var n=k.name;if(g!=""){n=g+"|"+n}switch(k.type){case"repeat":for(var l in k.cache){e(n+"_"+l,k.cache[l])}break;case"conditional":var q=k.test_param&&k.test_param.value;var h=c.matchCase(k,q);if(h!=-1){e(n,k.cases[h].inputs)}break;default:var o=c.map_dict[n];if(o){f(o,k)}}}}e("",d.inputs);return b},matchResponse:function(d){var b={};var c=this;function e(l,j){if(typeof j==="string"){var g=c.map_dict[l];if(g){b[g]=j}}else{for(var h in j){var f=h;if(l!==""){var k="|";if(j instanceof Array){k="_"}f=l+k+f}e(f,j[h])}}}e("",d);return b},_iterate:function(d,e){var b=this;var c=$(d).children();c.each(function(){var h=this;var g=$(h).attr("id");if($(h).hasClass("section-row")){e[g]={};var f=b.app.input_list[g];if(f){e[g]={input:f}}b._iterate(h,e[g])}else{b._iterate(h,e)}})}})});
\ No newline at end of file
diff -r 73a261a75185704a35a05350a31a7d5169cbc9b0 -r 08bacc9d402e75a70ddc249c959ccac846e0512f static/style/blue/base.css
--- a/static/style/blue/base.css
+++ b/static/style/blue/base.css
@@ -1397,7 +1397,7 @@
.ui-error{-moz-border-radius:3px;border-radius:3px;background:#f9c7c5;padding:5px}
.ui-table-form-error{display:none}.ui-table-form-error .ui-table-form-error-text{padding-left:5px}
.ui-table tbody{cursor:pointer}
-.ui-table-plain tbody td{padding:5px 0px 5px 0px !important;border:none !important}
+.ui-table-plain{table-layout:fixed}.ui-table-plain tbody td{padding:5px 0px 5px 0px !important;border:none !important}
.ui-table-plain tbody{cursor:auto !important}
.ui-table-form-element .ui-table-form-title-optional{font-weight:bold;text-decoration:underline;cursor:pointer}
.ui-table-form-element .ui-table-form-field{margin-top:5px}
diff -r 73a261a75185704a35a05350a31a7d5169cbc9b0 -r 08bacc9d402e75a70ddc249c959ccac846e0512f static/style/src/less/ui.less
--- a/static/style/src/less/ui.less
+++ b/static/style/src/less/ui.less
@@ -33,6 +33,7 @@
.ui-table-plain {
&:extend(.grid);
+ table-layout:fixed;
tbody td {
padding: 5px 0px 5px 0px !important;
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
3 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/2228c58015cb/
Changeset: 2228c58015cb
User: martenson
Date: 2015-01-27 00:45:33+00:00
Summary: query parser experiments, better formatted time delta
Affected #: 1 file
diff -r 0733c87123cbc2f7009a125c5e57d630bb8296a6 -r 2228c58015cb928e8c2819614e2a69b70ea4f448 lib/galaxy/webapps/tool_shed/search/repo_search.py
--- a/lib/galaxy/webapps/tool_shed/search/repo_search.py
+++ b/lib/galaxy/webapps/tool_shed/search/repo_search.py
@@ -1,11 +1,11 @@
"""Module for searching the toolshed repositories"""
+import datetime
+import dateutil.relativedelta
from galaxy import exceptions
from galaxy import eggs
from galaxy.web.base.controller import BaseAPIController
from galaxy.webapps.tool_shed import model
from tool_shed.util.shed_util_common import generate_sharable_link_for_repository_in_tool_shed
-
-
import logging
log = logging.getLogger( __name__ )
@@ -34,6 +34,7 @@
search_ready = False
schema = None
+
class RepoSearch ( object ):
def search( self, trans, search_term, **kwd ):
@@ -72,9 +73,15 @@
'remote_repository_url',
'repo_owner_username' ], schema=schema )
- hits = searcher.search( parser.parse( '*' + search_term + '*' ), terms = True )
+ # user_query = parser.parse( search_term )
+ user_query = parser.parse( '*' + search_term + '*' )
+
+ # hits = searcher.search( user_query, terms = True )
+ hits = searcher.search_page( user_query, 1, pagelen = 1, terms = True )
+ log.debug( 'total hits: ' + str( len( hits ) ) )
+ log.debug( 'scored hits: ' + str( hits.scored_length() ) )
results = {}
- results[ 'length'] = len( hits )
+ results[ 'total_results'] = len( hits )
results[ 'hits' ] = []
for hit in hits:
repo = trans.sa_session.query( model.Repository ).filter_by( id=hit[ 'id' ] ).one()
@@ -85,7 +92,20 @@
break
hit_dict = repo.to_dict( view='element', value_mapper={ 'id': trans.security.encode_id, 'user_id': trans.security.encode_id } )
hit_dict[ 'url'] = generate_sharable_link_for_repository_in_tool_shed( repo )
- hit_dict[ 'last_updated' ] = repo.update_time.strftime( "%Y-%m-%d %I:%M %p" )
+
+ # Format the time since last update to be nicely readable.
+ dt1 = repo.update_time
+ dt2 = datetime.datetime.now()
+ rd = dateutil.relativedelta.relativedelta (dt2, dt1)
+ time_ago = ''
+ if rd.years > 0:
+ time_ago += str( rd.years ) + 'years'
+ if rd.months > 0:
+ time_ago += str( rd.months ) + ' months'
+ if rd.days > 0:
+ time_ago += str( rd.days ) + ' days ago'
+ hit_dict[ 'last_updated' ] = time_ago
+
hit_dict[ 'times_downloaded' ] = repo.times_downloaded
hit_dict[ 'approved' ] = approved
results[ 'hits' ].append( {'repository': hit_dict, 'matched_terms': hit.matched_terms() } )
https://bitbucket.org/galaxy/galaxy-central/commits/5877dc562874/
Changeset: 5877dc562874
User: martenson
Date: 2015-01-27 22:15:18+00:00
Summary: adjust schema, start dynamic scoring
Affected #: 2 files
diff -r 2228c58015cb928e8c2819614e2a69b70ea4f448 -r 5877dc562874b894a83393bc54ba671d397909c9 lib/galaxy/webapps/tool_shed/search/repo_search.py
--- a/lib/galaxy/webapps/tool_shed/search/repo_search.py
+++ b/lib/galaxy/webapps/tool_shed/search/repo_search.py
@@ -15,27 +15,47 @@
try:
eggs.require( "Whoosh" )
import whoosh.index
- from whoosh.fields import Schema, STORED, ID, KEYWORD, TEXT
+ from whoosh import scoring
+ from whoosh.fields import Schema, STORED, ID, KEYWORD, TEXT, STORED
from whoosh.scoring import BM25F
from whoosh.qparser import MultifieldParser
from whoosh.index import Index
search_ready = True
schema = Schema(
- id=STORED,
- name=TEXT,
- description=TEXT,
- long_description=TEXT,
- repo_type=TEXT,
- homepage_url=TEXT,
- remote_repository_url=TEXT,
- repo_owner_username=TEXT )
+ id = STORED,
+ name = TEXT( field_boost = 1.7 ),
+ description = TEXT( field_boost = 1.5 ),
+ long_description = TEXT,
+ repo_type = TEXT,
+ homepage_url = TEXT,
+ remote_repository_url = TEXT,
+ repo_owner_username = TEXT,
+ times_downloaded = STORED )
+
except ImportError, e:
search_ready = False
schema = None
+
+class RepoWeighting( scoring.BM25F ):
+ """
+ Affect the BM25G scoring model through the final method.
+ source: https://groups.google.com/forum/#!msg/whoosh/1AKNbW8R_l8/XySW0OecH6gJ
+ """
+ use_final = True
-class RepoSearch ( object ):
+ def final( self, searcher, docnum, score ):
+
+ maxhits = 300
+ hitcount = searcher.stored_fields( docnum )[ "times_downloaded" ]
+ log.debug( 'hitcount: ' + str( hitcount ) )
+
+ # Multiply the computed score for this document by the popularity
+ return score * ( hitcount / maxhits )
+
+
+class RepoSearch( object ):
def search( self, trans, search_term, **kwd ):
"""
@@ -43,8 +63,7 @@
:param search_term: unicode encoded string with the search term(s)
- :returns results: dictionary containing number of hits,
- hits themselves and matched terms for each
+ :returns results: dictionary containing number of hits, hits themselves and matched terms for each
"""
if search_ready:
toolshed_whoosh_index_dir = trans.app.config.toolshed_whoosh_index_dir
@@ -55,42 +74,46 @@
# Some literature about BM25F:
# http://trec.nist.gov/pubs/trec13/papers/microsoft-cambridge.web.hard.pdf
# http://en.wikipedia.org/wiki/Okapi_BM25
- # Basically the higher number the bigger weight.
- searcher = index.searcher( weighting=BM25F( field_B={
- 'name_B' : 0.9,
- 'description_B' : 0.6,
- 'long_description_B' : 0.5,
- 'homepage_url_B' : 0.3,
- 'remote_repository_url_B' : 0.2,
- 'repo_owner_username' : 0.3,
- 'repo_type_B' : 0.1 } ) )
+ # __Basically__ the higher number the bigger weight.
+ repo_weighting = RepoWeighting( field_B = { 'name_B' : 0.9,
+ 'description_B' : 0.6,
+ 'long_description_B' : 0.5,
+ 'homepage_url_B' : 0.3,
+ 'remote_repository_url_B' : 0.2,
+ 'repo_owner_username' : 0.3,
+ 'repo_type_B' : 0.1 } )
+
+ # log.debug(repo_weighting.__dict__)
+ searcher = index.searcher( weighting = repo_weighting )
+
parser = MultifieldParser( [
- 'name',
- 'description',
- 'long_description',
- 'repo_type',
- 'homepage_url',
- 'remote_repository_url',
- 'repo_owner_username' ], schema=schema )
+ 'name',
+ 'description',
+ 'long_description',
+ 'repo_type',
+ 'homepage_url',
+ 'remote_repository_url',
+ 'repo_owner_username' ], schema = schema )
# user_query = parser.parse( search_term )
user_query = parser.parse( '*' + search_term + '*' )
- # hits = searcher.search( user_query, terms = True )
- hits = searcher.search_page( user_query, 1, pagelen = 1, terms = True )
+ hits = searcher.search( user_query, terms = True )
+ # hits = searcher.search_page( user_query, 1, pagelen = 1, terms = True )
+ log.debug( 'searching for: #' + str( search_term ) )
log.debug( 'total hits: ' + str( len( hits ) ) )
log.debug( 'scored hits: ' + str( hits.scored_length() ) )
results = {}
results[ 'total_results'] = len( hits )
results[ 'hits' ] = []
for hit in hits:
- repo = trans.sa_session.query( model.Repository ).filter_by( id=hit[ 'id' ] ).one()
+ repo = trans.sa_session.query( model.Repository ).filter_by( id = hit[ 'id' ] ).one()
approved = 'no'
for review in repo.reviews:
if review.approved == 'yes':
approved = 'yes'
break
- hit_dict = repo.to_dict( view='element', value_mapper={ 'id': trans.security.encode_id, 'user_id': trans.security.encode_id } )
+ hit_dict = repo.to_dict( view = 'element', value_mapper = { 'id': trans.security.encode_id, 'user_id': trans.security.encode_id } )
hit_dict[ 'url'] = generate_sharable_link_for_repository_in_tool_shed( repo )
# Format the time since last update to be nicely readable.
diff -r 2228c58015cb928e8c2819614e2a69b70ea4f448 -r 5877dc562874b894a83393bc54ba671d397909c9 scripts/tool_shed/build_ts_whoosh_index.py
--- a/scripts/tool_shed/build_ts_whoosh_index.py
+++ b/scripts/tool_shed/build_ts_whoosh_index.py
@@ -17,7 +17,7 @@
import whoosh.index
import galaxy.webapps.tool_shed.model.mapping
from whoosh.filedb.filestore import FileStorage
- from whoosh.fields import Schema, STORED, ID, KEYWORD, TEXT
+ from whoosh.fields import Schema, STORED, ID, KEYWORD, TEXT, STORED
from whoosh.scoring import BM25F
from whoosh.qparser import MultifieldParser
from whoosh.index import Index
@@ -25,14 +25,15 @@
whoosh_ready = True
schema = Schema(
- id=STORED,
- name=TEXT,
- description=TEXT,
- long_description=TEXT,
- repo_type=TEXT,
- homepage_url=TEXT,
- remote_repository_url=TEXT,
- repo_owner_username=TEXT )
+ id = STORED,
+ name = TEXT( field_boost = 1.7 ),
+ description = TEXT( field_boost = 1.5 ),
+ long_description = TEXT,
+ repo_type = TEXT,
+ homepage_url = TEXT,
+ remote_repository_url = TEXT,
+ repo_owner_username = TEXT,
+ times_downloaded = STORED )
except ImportError, e:
print 'import error'
@@ -50,15 +51,16 @@
return a_basestr
repos_indexed = 0
- for id, name, description, long_description, repo_type, homepage_url, remote_repository_url, repo_owner_username in get_repos( sa_session ):
- writer.add_document( id=id,
- name=to_unicode( name ),
- description=to_unicode( description ),
- long_description=to_unicode( long_description ),
- repo_type=to_unicode( repo_type ),
- homepage_url=to_unicode( homepage_url ),
- remote_repository_url=to_unicode( remote_repository_url ),
- repo_owner_username=to_unicode( repo_owner_username ) )
+ for id, name, description, long_description, repo_type, homepage_url, remote_repository_url, repo_owner_username, times_downloaded in get_repos( sa_session ):
+ writer.add_document( id = id,
+ name = to_unicode( name ),
+ description = to_unicode( description ),
+ long_description = to_unicode( long_description ),
+ repo_type = to_unicode( repo_type ),
+ homepage_url = to_unicode( homepage_url ),
+ remote_repository_url = to_unicode( remote_repository_url ),
+ repo_owner_username = to_unicode( repo_owner_username ),
+ times_downloaded = times_downloaded )
repos_indexed += 1
writer.commit()
print "Number of repos indexed: ", repos_indexed
@@ -72,13 +74,14 @@
repo_type = repo.type
homepage_url = repo.homepage_url
remote_repository_url = repo.remote_repository_url
+ times_downloaded = repo.times_downloaded
repo_owner_username = ""
if repo.user_id is not None:
user = sa_session.query( model.User ).filter( model.User.id == repo.user_id ).one()
repo_owner_username = user.username
- yield id, name, description, long_description, repo_type, homepage_url, remote_repository_url, repo_owner_username
+ yield id, name, description, long_description, repo_type, homepage_url, remote_repository_url, repo_owner_username, times_downloaded
def get_sa_session_and_needed_config_settings( ini_file ):
conf_parser = ConfigParser.ConfigParser( { 'here' : os.getcwd() } )
https://bitbucket.org/galaxy/galaxy-central/commits/73a261a75185/
Changeset: 73a261a75185
User: martenson
Date: 2015-01-27 22:19:07+00:00
Summary: Merge
Affected #: 7 files
diff -r 5877dc562874b894a83393bc54ba671d397909c9 -r 73a261a75185704a35a05350a31a7d5169cbc9b0 config/galaxy.ini.sample
--- a/config/galaxy.ini.sample
+++ b/config/galaxy.ini.sample
@@ -764,6 +764,25 @@
# Enable Galaxy to communicate directly with a sequencer
#enable_sequencer_communication = False
+
+# Enable beta workflow modules that should not yet be considered part of Galaxy's
+# stable API.
+#enable_beta_workflow_modules = False
+
+# Force usage of Galaxy's beta workflow scheduler under certain circumstances -
+# this workflow scheduling forces Galaxy to schedule workflows in the background
+# so initial submission of the workflows is signficantly sped up. This does
+# however force the user to refresh their history manually to see newly scheduled
+# steps (for "normal" workflows - steps are still scheduled far in advance of
+# them being queued and scheduling here doesn't refer to actual cluster job
+# scheduling).
+# Workflows containing more than the specified number of steps will always use
+# the Galaxy's beta workflow scheduling.
+#force_beta_workflow_scheduled_min_steps=250
+# Switch to using Galaxy's beta workflow scheduling for all workflows involving
+# ccollections.
+#force_beta_workflow_scheduled_for_collections=False
+
# Enable authentication via OpenID. Allows users to log in to their Galaxy
# account by authenticating with an OpenID provider.
#enable_openid = False
diff -r 5877dc562874b894a83393bc54ba671d397909c9 -r 73a261a75185704a35a05350a31a7d5169cbc9b0 config/tool_data_table_conf.xml.sample
--- a/config/tool_data_table_conf.xml.sample
+++ b/config/tool_data_table_conf.xml.sample
@@ -60,4 +60,9 @@
<columns>value, dbkey, name, path</columns><file path="tool-data/mosaik_index.loc" /></table>
+ <!-- Locations of indexes in the 2bit format -->
+ <table name="twobit" comment_char="#">
+ <columns>value, path</columns>
+ <file path="tool-data/twobit.loc" />
+ </table></tables>
diff -r 5877dc562874b894a83393bc54ba671d397909c9 -r 73a261a75185704a35a05350a31a7d5169cbc9b0 lib/galaxy/visualization/genomes.py
--- a/lib/galaxy/visualization/genomes.py
+++ b/lib/galaxy/visualization/genomes.py
@@ -179,33 +179,59 @@
"""
def __init__( self, app ):
+ self.app = app
# Create list of genomes from app.genome_builds
self.genomes = {}
- for key, description in app.genome_builds.get_genome_build_names():
+ # Store internal versions of data tables for twobit and __dbkey__
+ self._table_versions = { 'twobit': None, '__dbkeys__': None }
+ self.reload_genomes()
+
+ def reload_genomes( self ):
+ self.genomes = {}
+ # Store table versions for later
+ for table_name in self._table_versions.keys():
+ table = self.app.tool_data_tables.get( table_name, None )
+ if table is not None:
+ self._table_versions[ table_name ] = table._loaded_content_version
+
+ twobit_table = self.app.tool_data_tables.get( 'twobit', None )
+ twobit_fields = {}
+ if twobit_table is None:
+ # Add genome data (twobit files) to genomes, directly from twobit.loc
+ try:
+ for line in open( os.path.join( self.app.config.tool_data_path, "twobit.loc" ) ):
+ if line.startswith("#"): continue
+ val = line.split()
+ if len( val ) == 2:
+ key, path = val
+ twobit_fields[ key ] = path
+ except IOError, e:
+ # Thrown if twobit.loc does not exist.
+ log.exception( "Error reading twobit.loc: %s", e )
+ for key, description in self.app.genome_builds.get_genome_build_names():
self.genomes[ key ] = Genome( key, description )
+ # Add len files to genomes.
+ self.genomes[ key ].len_file = self.app.genome_builds.get_chrom_info( key )[0]
+ if self.genomes[ key ].len_file:
+ if not os.path.exists( self.genomes[ key ].len_file ):
+ self.genomes[ key ].len_file = None
+ # Add genome data (twobit files) to genomes.
+ if twobit_table is not None:
+ self.genomes[ key ].twobit_file = twobit_table.get_entry( 'value', key, 'path', default=None )
+ elif key in twobit_fields:
+ self.genomes[ key ].twobit_file = twobit_fields[ key ]
+
- # Add len files to genomes.
- len_files = glob.glob( os.path.join( app.config.len_file_path, "*.len" ) )
- for f in len_files:
- key = os.path.split( f )[1].split( ".len" )[0]
- if key in self.genomes:
- self.genomes[ key ].len_file = f
-
- # Add genome data (twobit files) to genomes.
- try:
- for line in open( os.path.join( app.config.tool_data_path, "twobit.loc" ) ):
- if line.startswith("#"): continue
- val = line.split()
- if len( val ) == 2:
- key, path = val
- if key in self.genomes:
- self.genomes[ key ].twobit_file = path
- except IOError, e:
- # Thrown if twobit.loc does not exist.
- log.exception( str( e ) )
+ def check_and_reload( self ):
+ # Check if tables have been modified, if so reload
+ for table_name, table_version in self._table_versions.iteritems():
+ table = self.app.tool_data_tables.get( table_name, None )
+ if table is not None and not table.is_current_version( table_version ):
+ return self.reload_genomes()
def get_build( self, dbkey ):
""" Returns build for the given key. """
+ self.check_and_reload()
rval = None
if dbkey in self.genomes:
rval = self.genomes[ dbkey ]
@@ -214,6 +240,7 @@
def get_dbkeys( self, trans, chrom_info=False, **kwd ):
""" Returns all known dbkeys. If chrom_info is True, only dbkeys with
chromosome lengths are returned. """
+ self.check_and_reload()
dbkeys = []
# Add user's custom keys to dbkeys.
@@ -241,7 +268,7 @@
Returns a naturally sorted list of chroms/contigs for a given dbkey.
Use either chrom or low to specify the starting chrom in the return list.
"""
-
+ self.check_and_reload()
# If there is no dbkey owner, default to current user.
dbkey_owner, dbkey = decode_dbkey( dbkey )
if dbkey_owner:
@@ -303,6 +330,7 @@
Returns true if there is reference data for the specified dbkey. If dbkey is custom,
dbkey_owner is needed to determine if there is reference data.
"""
+ self.check_and_reload()
# Look for key in built-in builds.
if dbkey in self.genomes and self.genomes[ dbkey ].twobit_file:
# There is built-in reference data.
@@ -323,7 +351,7 @@
"""
Return reference data for a build.
"""
-
+ self.check_and_reload()
# If there is no dbkey owner, default to current user.
dbkey_owner, dbkey = decode_dbkey( dbkey )
if dbkey_owner:
diff -r 5877dc562874b894a83393bc54ba671d397909c9 -r 73a261a75185704a35a05350a31a7d5169cbc9b0 lib/galaxy/webapps/galaxy/controllers/history.py
--- a/lib/galaxy/webapps/galaxy/controllers/history.py
+++ b/lib/galaxy/webapps/galaxy/controllers/history.py
@@ -1351,31 +1351,46 @@
id = galaxy.util.listify( id )
name = galaxy.util.listify( name )
histories = []
- cur_names = []
+
for history_id in id:
history = self.history_manager.get_owned( trans, self.decode_id( history_id ), trans.user )
if history and history.user_id == user.id:
histories.append( history )
- cur_names.append( history.get_display_name() )
if not name or len( histories ) != len( name ):
return trans.fill_template( "/history/rename.mako", histories=histories )
- change_msg = ""
- for i in range(len(histories)):
- if histories[i].user_id == user.id:
- if name[i] == histories[i].get_display_name():
- change_msg = change_msg + "<p>History: "+cur_names[i]+" is already named: "+name[i]+"</p>"
- elif name[i] not in [None,'',' ']:
- name[i] = escape(name[i])
- histories[i].name = sanitize_html( name[i] )
- trans.sa_session.add( histories[i] )
- trans.sa_session.flush()
- change_msg = change_msg + "<p>History: "+cur_names[i]+" renamed to: "+name[i]+"</p>"
- trans.log_event( "History renamed: id: %s, renamed to: '%s'" % (str(histories[i].id), name[i] ) )
- else:
- change_msg = change_msg + "<p>You must specify a valid name for History: "+cur_names[i]+"</p>"
- else:
- change_msg = change_msg + "<p>History: "+cur_names[i]+" does not appear to belong to you.</p>"
- return trans.show_message( "<p>%s" % change_msg, refresh_frames=['history'] )
+
+ change_msgs = []
+ for i in range( len( histories ) ):
+ cur_name = histories[i].get_display_name()
+ new_name = name[i]
+
+ # skip if name is empty
+ if not isinstance( new_name, basestring ) or not new_name.strip():
+ change_msgs.append( "You must specify a valid name for History: " + cur_name )
+ continue
+
+ # skip if not the owner
+ #??: isn't this already handled in get_history/if statement above?
+ if histories[i].user_id != user.id:
+ change_msgs.append( "History: " + cur_name + " does not appear to belong to you." )
+ continue
+
+ # skip if it wouldn't be a change
+ if new_name == cur_name:
+ change_msgs.append( "History: " + cur_name + " is already named: " + new_name )
+ continue
+
+ # escape, sanitize, set, and log the change
+ new_name = escape( new_name )
+ histories[i].name = sanitize_html( new_name )
+ trans.sa_session.add( histories[i] )
+ trans.sa_session.flush()
+
+ trans.log_event( "History renamed: id: %s, renamed to: '%s'" % ( str( histories[i].id ), new_name ) )
+ change_msgs.append( "History: " + cur_name + " renamed to: " + new_name )
+
+ change_msg = '<br />'.join( change_msgs )
+ return trans.show_message( change_msg, refresh_frames=['history'] )
@web.expose
@web.require_login( "copy shared Galaxy history" )
diff -r 5877dc562874b894a83393bc54ba671d397909c9 -r 73a261a75185704a35a05350a31a7d5169cbc9b0 templates/admin/jobs.mako
--- a/templates/admin/jobs.mako
+++ b/templates/admin/jobs.mako
@@ -55,11 +55,7 @@
</tr>
%for job in jobs:
<td>
- %if job.state == 'upload':
-
- %else:
- <input type="checkbox" name="stop" value="${job.id}"/>
- %endif
+ <input type="checkbox" name="stop" value="${job.id}"/></td><td>${job.id}</td>
%if job.history and job.history.user:
diff -r 5877dc562874b894a83393bc54ba671d397909c9 -r 73a261a75185704a35a05350a31a7d5169cbc9b0 templates/user/register.mako
--- a/templates/user/register.mako
+++ b/templates/user/register.mako
@@ -17,7 +17,7 @@
## An admin user may be creating a new user account, in which case we want to display the registration form.
## But if the current user is not an admin user, then don't display the registration form.
-%if trans.user_is_admin() or not trans.user:
+%if ( cntrller=='admin' and trans.user_is_admin() ) or not trans.user:
${render_registration_form()}
%if trans.app.config.get( 'terms_url', None ) is not None:
diff -r 5877dc562874b894a83393bc54ba671d397909c9 -r 73a261a75185704a35a05350a31a7d5169cbc9b0 test/api/test_tools.py
--- a/test/api/test_tools.py
+++ b/test/api/test_tools.py
@@ -201,6 +201,27 @@
response = self._run( "validation_default", history_id, inputs )
self._assert_status_code_is( response, 400 )
+ @skip_without_tool( "multi_select" )
+ def test_select_legal_values( self ):
+ history_id = self.dataset_populator.new_history()
+ inputs = {
+ 'select_ex': 'not_option',
+ }
+ response = self._run( "multi_select", history_id, inputs )
+ self._assert_status_code_is( response, 400 )
+
+ @skip_without_tool( "column_param" )
+ def test_column_legal_values( self ):
+ history_id = self.dataset_populator.new_history()
+ new_dataset1 = self.dataset_populator.new_dataset( history_id, content='#col1\tcol2' )
+ inputs = {
+ 'input1': { "src": "hda", "id": new_dataset1["id"] },
+ 'col': "' ; echo 'moo",
+ }
+ response = self._run( "column_param", history_id, inputs )
+ # TODO: make this test pass...
+ self._assert_status_code_is( response, 400 )
+
@skip_without_tool( "collection_paired_test" )
def test_collection_parameter( self ):
history_id = self.dataset_populator.new_history()
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0