galaxy-commits
Threads by month
- ----- 2026 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 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
- 15302 discussions
commit/galaxy-central: dan: Some web sanitization for Data Managers and Biostar redirect.
by commits-noreply@bitbucket.org 04 Dec '14
by commits-noreply@bitbucket.org 04 Dec '14
04 Dec '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/c1d4e82df5cb/
Changeset: c1d4e82df5cb
Branch: next-stable
User: dan
Date: 2014-12-04 21:14:28+00:00
Summary: Some web sanitization for Data Managers and Biostar redirect.
Affected #: 4 files
diff -r b51526d2f9b42a0bc64b55584e435ceebe7ceb31 -r c1d4e82df5cbf8a6d551221a0d4013d658ad4748 lib/galaxy/webapps/galaxy/controllers/data_manager.py
--- a/lib/galaxy/webapps/galaxy/controllers/data_manager.py
+++ b/lib/galaxy/webapps/galaxy/controllers/data_manager.py
@@ -7,6 +7,8 @@
pkg_resources.require( "Paste" )
import paste.httpexceptions
+from galaxy.web.framework.helpers import escape
+
#set up logger
import logging
log = logging.getLogger( __name__ )
@@ -18,8 +20,8 @@
not_is_admin = not trans.user_is_admin()
if not_is_admin and not trans.app.config.enable_data_manager_user_view:
raise paste.httpexceptions.HTTPUnauthorized( "This Galaxy instance is not configured to allow non-admins to view the data manager." )
- message = kwd.get( 'message' )
- status = kwd.get( 'status', 'info' )
+ message = escape( kwd.get( 'message', '' ) )
+ status = escape( kwd.get( 'status', 'info' ) )
return trans.fill_template( "data_manager/index.mako", data_managers=trans.app.data_managers, tool_data_tables=trans.app.tool_data_tables, view_only=not_is_admin, message=message, status=status )
@web.expose
@@ -27,8 +29,8 @@
not_is_admin = not trans.user_is_admin()
if not_is_admin and not trans.app.config.enable_data_manager_user_view:
raise paste.httpexceptions.HTTPUnauthorized( "This Galaxy instance is not configured to allow non-admins to view the data manager." )
- message = kwd.get( 'message' )
- status = kwd.get( 'status', 'info' )
+ message = escape( kwd.get( 'message', '' ) )
+ status = escape( kwd.get( 'status', 'info' ) )
data_manager_id = kwd.get( 'id', None )
data_manager = trans.app.data_managers.get_manager( data_manager_id )
if data_manager is None:
@@ -41,8 +43,8 @@
not_is_admin = not trans.user_is_admin()
if not_is_admin and not trans.app.config.enable_data_manager_user_view:
raise paste.httpexceptions.HTTPUnauthorized( "This Galaxy instance is not configured to allow non-admins to view the data manager." )
- message = kwd.get( 'message' )
- status = kwd.get( 'status', 'info' )
+ message = escape( kwd.get( 'message', '' ) )
+ status = escape( kwd.get( 'status', 'info' ) )
job_id = kwd.get( 'id', None )
try:
job_id = trans.security.decode_id( job_id )
@@ -62,7 +64,7 @@
data_manager_json = loads( open( hda.get_file_name() ).read() )
except Exception, e:
data_manager_json = {}
- error_messages.append( "Unable to obtain data_table info for hda (%s): %s" % ( hda.id, e ) )
+ error_messages.append( escape( "Unable to obtain data_table info for hda (%s): %s" % ( hda.id, e ) ) )
values = []
for key, value in data_manager_json.get( 'data_tables', {} ).iteritems():
values.append( ( key, value ) )
@@ -74,8 +76,8 @@
not_is_admin = not trans.user_is_admin()
if not_is_admin and not trans.app.config.enable_data_manager_user_view:
raise paste.httpexceptions.HTTPUnauthorized( "This Galaxy instance is not configured to allow non-admins to view the data manager." )
- message = kwd.get( 'message' )
- status = kwd.get( 'status', 'info' )
+ message = escape( kwd.get( 'message', '' ) )
+ status = escape( kwd.get( 'status', 'info' ) )
data_table_name = kwd.get( 'table_name', None )
if not data_table_name:
return trans.response.send_redirect( web.url_for( controller="data_manager", action="index" ) )
diff -r b51526d2f9b42a0bc64b55584e435ceebe7ceb31 -r c1d4e82df5cbf8a6d551221a0d4013d658ad4748 templates/webapps/galaxy/biostar/post_redirect.mako
--- a/templates/webapps/galaxy/biostar/post_redirect.mako
+++ b/templates/webapps/galaxy/biostar/post_redirect.mako
@@ -18,7 +18,7 @@
<p>If you are not automatically forwarded, click the button below:<p><form id="postRedirectForm" action="${post_url}" method="post" >
%for input_name, input_value in form_inputs.items():
- <input type="hidden" name="${input_name}" value="${input_value | h}">
+ <input type="hidden" name="${input_name | h}" value="${input_value | h}">
%endfor
<input type="submit" name="GalaxySubmitPostRedirectForm" id='GalaxySubmitPostRedirectForm' value="Click Here"></form>
diff -r b51526d2f9b42a0bc64b55584e435ceebe7ceb31 -r c1d4e82df5cbf8a6d551221a0d4013d658ad4748 templates/webapps/galaxy/data_manager/manage_data_table.mako
--- a/templates/webapps/galaxy/data_manager/manage_data_table.mako
+++ b/templates/webapps/galaxy/data_manager/manage_data_table.mako
@@ -14,9 +14,9 @@
<% column_name_list = data_table.get_column_name_list() %><table class="tabletip"><thead>
- <tr><th colspan="${len (column_name_list) }" style="font-size: 120%;">
+ <tr><th colspan="${ len( column_name_list ) | h}" style="font-size: 120%;">
Data Manager: ${ data_table.name | h }
- <a class="icon-btn" href="${ h.url_for( controller="data_manager", action="reload_tool_data_tables", table_name=data_table.name ) }" title="Reload ${data_table.name} tool data table" data-placement="bottom">
+ <a class="icon-btn" href="${ h.url_for( controller="data_manager", action="reload_tool_data_tables", table_name=data_table.name ) }" title="Reload ${data_table.name | h} tool data table" data-placement="bottom"><span class="fa fa-refresh"></span></a></th></tr>
diff -r b51526d2f9b42a0bc64b55584e435ceebe7ceb31 -r c1d4e82df5cbf8a6d551221a0d4013d658ad4748 templates/webapps/galaxy/data_manager/view_job.mako
--- a/templates/webapps/galaxy/data_manager/view_job.mako
+++ b/templates/webapps/galaxy/data_manager/view_job.mako
@@ -26,8 +26,8 @@
</thead><tbody><tr><td>Name:</td><td>${hda.name | h}</td></tr>
- <tr><td>Created:</td><td>${hda.create_time.strftime(trans.app.config.pretty_datetime_format)}</td></tr>
- <tr><td>Filesize:</td><td>${nice_size(hda.dataset.file_size)}</td></tr>
+ <tr><td>Created:</td><td>${hda.create_time.strftime(trans.app.config.pretty_datetime_format) | h}</td></tr>
+ <tr><td>Filesize:</td><td>${nice_size(hda.dataset.file_size) | h}</td></tr><tr><td>Tool Exit Code:</td><td>${job.exit_code | h}</td></tr><tr><td>Full Path:</td><td>${hda.file_name | h}</td></tr><tr><td>View complete info:</td><td><a href="${h.url_for( controller='dataset', action='show_params', dataset_id=trans.security.encode_id( hda.id ))}">${ hda.id | h }</a></td></tr>
@@ -47,7 +47,7 @@
%for j, table_row in enumerate( json_table ):
<tbody>
%if len_json_table > 1:
- <tr><td><strong>Entry #${j}</strong></td><td></td></tr>
+ <tr><td><strong>Entry #${j | h}</strong></td><td></td></tr>
%endif
%for name, value in table_row.iteritems():
<tr><td>${name | h}:</td><td>${value | h}</td></tr>
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: Some web sanitization for Data Managers and Biostar redirect.
by commits-noreply@bitbucket.org 04 Dec '14
by commits-noreply@bitbucket.org 04 Dec '14
04 Dec '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/7272cc7b9ea1/
Changeset: 7272cc7b9ea1
User: dan
Date: 2014-12-04 21:14:28+00:00
Summary: Some web sanitization for Data Managers and Biostar redirect.
Affected #: 4 files
diff -r 636d3594e201ebb2d085c33c6de32577d65bd866 -r 7272cc7b9ea1fd64646fa6d7e6fb5924fd8618f8 lib/galaxy/webapps/galaxy/controllers/data_manager.py
--- a/lib/galaxy/webapps/galaxy/controllers/data_manager.py
+++ b/lib/galaxy/webapps/galaxy/controllers/data_manager.py
@@ -7,6 +7,8 @@
pkg_resources.require( "Paste" )
import paste.httpexceptions
+from galaxy.web.framework.helpers import escape
+
#set up logger
import logging
log = logging.getLogger( __name__ )
@@ -18,8 +20,8 @@
not_is_admin = not trans.user_is_admin()
if not_is_admin and not trans.app.config.enable_data_manager_user_view:
raise paste.httpexceptions.HTTPUnauthorized( "This Galaxy instance is not configured to allow non-admins to view the data manager." )
- message = kwd.get( 'message' )
- status = kwd.get( 'status', 'info' )
+ message = escape( kwd.get( 'message', '' ) )
+ status = escape( kwd.get( 'status', 'info' ) )
return trans.fill_template( "data_manager/index.mako", data_managers=trans.app.data_managers, tool_data_tables=trans.app.tool_data_tables, view_only=not_is_admin, message=message, status=status )
@web.expose
@@ -27,8 +29,8 @@
not_is_admin = not trans.user_is_admin()
if not_is_admin and not trans.app.config.enable_data_manager_user_view:
raise paste.httpexceptions.HTTPUnauthorized( "This Galaxy instance is not configured to allow non-admins to view the data manager." )
- message = kwd.get( 'message' )
- status = kwd.get( 'status', 'info' )
+ message = escape( kwd.get( 'message', '' ) )
+ status = escape( kwd.get( 'status', 'info' ) )
data_manager_id = kwd.get( 'id', None )
data_manager = trans.app.data_managers.get_manager( data_manager_id )
if data_manager is None:
@@ -41,8 +43,8 @@
not_is_admin = not trans.user_is_admin()
if not_is_admin and not trans.app.config.enable_data_manager_user_view:
raise paste.httpexceptions.HTTPUnauthorized( "This Galaxy instance is not configured to allow non-admins to view the data manager." )
- message = kwd.get( 'message' )
- status = kwd.get( 'status', 'info' )
+ message = escape( kwd.get( 'message', '' ) )
+ status = escape( kwd.get( 'status', 'info' ) )
job_id = kwd.get( 'id', None )
try:
job_id = trans.security.decode_id( job_id )
@@ -62,7 +64,7 @@
data_manager_json = loads( open( hda.get_file_name() ).read() )
except Exception, e:
data_manager_json = {}
- error_messages.append( "Unable to obtain data_table info for hda (%s): %s" % ( hda.id, e ) )
+ error_messages.append( escape( "Unable to obtain data_table info for hda (%s): %s" % ( hda.id, e ) ) )
values = []
for key, value in data_manager_json.get( 'data_tables', {} ).iteritems():
values.append( ( key, value ) )
@@ -74,8 +76,8 @@
not_is_admin = not trans.user_is_admin()
if not_is_admin and not trans.app.config.enable_data_manager_user_view:
raise paste.httpexceptions.HTTPUnauthorized( "This Galaxy instance is not configured to allow non-admins to view the data manager." )
- message = kwd.get( 'message' )
- status = kwd.get( 'status', 'info' )
+ message = escape( kwd.get( 'message', '' ) )
+ status = escape( kwd.get( 'status', 'info' ) )
data_table_name = kwd.get( 'table_name', None )
if not data_table_name:
return trans.response.send_redirect( web.url_for( controller="data_manager", action="index" ) )
diff -r 636d3594e201ebb2d085c33c6de32577d65bd866 -r 7272cc7b9ea1fd64646fa6d7e6fb5924fd8618f8 templates/webapps/galaxy/biostar/post_redirect.mako
--- a/templates/webapps/galaxy/biostar/post_redirect.mako
+++ b/templates/webapps/galaxy/biostar/post_redirect.mako
@@ -18,7 +18,7 @@
<p>If you are not automatically forwarded, click the button below:<p><form id="postRedirectForm" action="${post_url}" method="post" >
%for input_name, input_value in form_inputs.items():
- <input type="hidden" name="${input_name}" value="${input_value | h}">
+ <input type="hidden" name="${input_name | h}" value="${input_value | h}">
%endfor
<input type="submit" name="GalaxySubmitPostRedirectForm" id='GalaxySubmitPostRedirectForm' value="Click Here"></form>
diff -r 636d3594e201ebb2d085c33c6de32577d65bd866 -r 7272cc7b9ea1fd64646fa6d7e6fb5924fd8618f8 templates/webapps/galaxy/data_manager/manage_data_table.mako
--- a/templates/webapps/galaxy/data_manager/manage_data_table.mako
+++ b/templates/webapps/galaxy/data_manager/manage_data_table.mako
@@ -14,9 +14,9 @@
<% column_name_list = data_table.get_column_name_list() %><table class="tabletip"><thead>
- <tr><th colspan="${len (column_name_list) }" style="font-size: 120%;">
+ <tr><th colspan="${ len( column_name_list ) | h}" style="font-size: 120%;">
Data Manager: ${ data_table.name | h }
- <a class="icon-btn" href="${ h.url_for( controller="data_manager", action="reload_tool_data_tables", table_name=data_table.name ) }" title="Reload ${data_table.name} tool data table" data-placement="bottom">
+ <a class="icon-btn" href="${ h.url_for( controller="data_manager", action="reload_tool_data_tables", table_name=data_table.name ) }" title="Reload ${data_table.name | h} tool data table" data-placement="bottom"><span class="fa fa-refresh"></span></a></th></tr>
diff -r 636d3594e201ebb2d085c33c6de32577d65bd866 -r 7272cc7b9ea1fd64646fa6d7e6fb5924fd8618f8 templates/webapps/galaxy/data_manager/view_job.mako
--- a/templates/webapps/galaxy/data_manager/view_job.mako
+++ b/templates/webapps/galaxy/data_manager/view_job.mako
@@ -26,8 +26,8 @@
</thead><tbody><tr><td>Name:</td><td>${hda.name | h}</td></tr>
- <tr><td>Created:</td><td>${hda.create_time.strftime(trans.app.config.pretty_datetime_format)}</td></tr>
- <tr><td>Filesize:</td><td>${nice_size(hda.dataset.file_size)}</td></tr>
+ <tr><td>Created:</td><td>${hda.create_time.strftime(trans.app.config.pretty_datetime_format) | h}</td></tr>
+ <tr><td>Filesize:</td><td>${nice_size(hda.dataset.file_size) | h}</td></tr><tr><td>Tool Exit Code:</td><td>${job.exit_code | h}</td></tr><tr><td>Full Path:</td><td>${hda.file_name | h}</td></tr><tr><td>View complete info:</td><td><a href="${h.url_for( controller='dataset', action='show_params', dataset_id=trans.security.encode_id( hda.id ))}">${ hda.id | h }</a></td></tr>
@@ -47,7 +47,7 @@
%for j, table_row in enumerate( json_table ):
<tbody>
%if len_json_table > 1:
- <tr><td><strong>Entry #${j}</strong></td><td></td></tr>
+ <tr><td><strong>Entry #${j | h}</strong></td><td></td></tr>
%endif
%for name, value in table_row.iteritems():
<tr><td>${name | h}:</td><td>${value | h}</td></tr>
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
11 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/6eccc509c109/
Changeset: 6eccc509c109
Branch: next-stable
User: dannon
Date: 2014-12-04 16:38:16+00:00
Summary: Sanitize all user fields in cloud/index.mako
Affected #: 1 file
diff -r 29b2c328b89b6634c9a3f9a21c2349105a7e485a -r 6eccc509c109c87889d80ba745d97cfa425e0ce4 templates/webapps/galaxy/cloud/index.mako
--- a/templates/webapps/galaxy/cloud/index.mako
+++ b/templates/webapps/galaxy/cloud/index.mako
@@ -218,7 +218,7 @@
</div>
%if share_string:
- <input type='hidden' name='share_string' value='${share_string}'/>
+ <input id="dbremove_share_string" type='hidden' name='share_string' value='${share_string | h}'/>
%else:
<!-- DBEDIT temporary hide share string due to it being broken on the cloudman end --><div class="form-row" style="display:none;">
@@ -228,11 +228,11 @@
%endif
%if ami:
- <input type='hidden' name='ami' value='${ami}'/>
+ <input type='hidden' name='ami' value='${ami | h}'/>
%endif
%if bucket_default:
- <input type='hidden' name='bucket_default' value='${bucket_default}'/>
+ <input type='hidden' name='bucket_default' value='${bucket_default | h}'/>
%endif
<div class="form-row">
https://bitbucket.org/galaxy/galaxy-central/commits/90d3d1205ef0/
Changeset: 90d3d1205ef0
Branch: next-stable
User: dannon
Date: 2014-12-04 16:51:46+00:00
Summary: Remove unused cloud/run.mako; all functionality is rolled into cloud/index.
Affected #: 1 file
diff -r 6eccc509c109c87889d80ba745d97cfa425e0ce4 -r 90d3d1205ef0211ce2f459e2832c6bad2737d924 templates/webapps/galaxy/cloud/run.mako
--- a/templates/webapps/galaxy/cloud/run.mako
+++ /dev/null
@@ -1,41 +0,0 @@
-<%inherit file="/webapps/galaxy/base_panels.mako"/>
-
-<%def name="init()">
-<%
- self.has_left_panel=False
- self.has_right_panel=False
- self.active_view="shared"
- self.message_box_visible=False
-%>
-</%def>
-
-
-<%def name="center_panel()">
- <div style="overflow: auto; height: 100%;">
- <div class="page-container" style="padding: 10px;">
- <h2>Launching a Galaxy Cloud Instance</h2>
-%if error:
- <p>${error}</p>
-%elif instance:
- %if kp_material:
- <h3>Very Important Key Pair Information</h3>
- <p>A new key pair named '${kp_name}' has been created in your AWS
- account and will be used to access this instance via ssh. It is
- <strong>very important</strong> that you save the following private key
- as it is not saved on this Galaxy instance and will be permanently lost
- once you leave this page. To do this, save the following key block as
- a plain text file named '${kp_name}'.</p>
- <pre>${kp_material}</pre>
- %endif
- <p>The instance '${instance.id} has been successfully launched using the
- '${instance.image_id}' AMI.<br/> Access it at <a
- href="http://${instance.public_dns_name}">http://${instance.public_dns_name}</a></p>
- <p>SSH access is available using your private key '${kp_name}'.</p>
-%else:
- <p> Unknown failure, no instance. Please refer to your AWS console at <a
- href="https://console.aws.amazon.com">https://console.aws.amazon.com</a></p>
-%endif
- </div>
- </div>
-</%def>
-
https://bitbucket.org/galaxy/galaxy-central/commits/54e5ea026a4a/
Changeset: 54e5ea026a4a
Branch: next-stable
User: dannon
Date: 2014-12-04 17:05:07+00:00
Summary: Don't trust user email rendered into page unescaped for Raven.
Affected #: 1 file
diff -r 90d3d1205ef0211ce2f459e2832c6bad2737d924 -r 54e5ea026a4aaad0f4fd1228c63c77c15327afa4 templates/base/base_panels.mako
--- a/templates/base/base_panels.mako
+++ b/templates/base/base_panels.mako
@@ -45,7 +45,7 @@
<script>
Raven.config('${app.config.sentry_dsn_public}').install();
%if trans.user:
- Raven.setUser( { email: "${trans.user.email}" } );
+ Raven.setUser( { email: "${trans.user.email | h}" } );
%endif
</script>
%endif
https://bitbucket.org/galaxy/galaxy-central/commits/3ecb6b58e88a/
Changeset: 3ecb6b58e88a
Branch: next-stable
User: dannon
Date: 2014-12-04 17:05:23+00:00
Summary: Trim trailing whitespace.
Affected #: 1 file
diff -r 54e5ea026a4aaad0f4fd1228c63c77c15327afa4 -r 3ecb6b58e88aeac8db48253e585df2aa429f39dc templates/base/base_panels.mako
--- a/templates/base/base_panels.mako
+++ b/templates/base/base_panels.mako
@@ -13,7 +13,7 @@
self.body_class=""
self.require_javascript=False
%>
-
+
<%def name="init()">
## Override
</%def>
@@ -62,7 +62,7 @@
'libs/require',
"mvc/ui"
)}
-
+
<script type="text/javascript">
## global configuration object
var galaxy_config =
@@ -112,14 +112,14 @@
'galaxy.panels'
)}
<script type="text/javascript">
-
+
ensure_dd_helper();
-
+
%if self.has_left_panel:
var lp = new Panel( { panel: $("#left"), center: $("#center"), drag: $("#left > .unified-panel-footer > .drag" ), toggle: $("#left > .unified-panel-footer > .panel-collapse" ) } );
force_left_panel = function( x ) { lp.force_panel( x ) };
%endif
-
+
%if self.has_right_panel:
var rp = new Panel( { panel: $("#right"), center: $("#center"), drag: $("#right > .unified-panel-footer > .drag" ), toggle: $("#right > .unified-panel-footer > .panel-collapse" ), right: true } );
window.handle_minwidth_hint = function( x ) { rp.handle_minwidth_hint( x ) };
@@ -134,7 +134,7 @@
ga('create', '${app.config.ga_code}', 'auto');
ga('send', 'pageview');
%endif
-
+
</script>
## Handle AJAX (actually hidden iframe) upload tool
<script type="text/javascript">
@@ -300,7 +300,7 @@
## Document
<html><!--base_panels.mako-->
- ${self.init()}
+ ${self.init()}
<head>
%if app.config.brand:
<title>${self.title()} / ${app.config.brand}</title>
@@ -316,7 +316,7 @@
${self.javascripts()}
${self.javascript_app()}
</head>
-
+
<%
body_class = self.body_class
if self.message_box_visible:
https://bitbucket.org/galaxy/galaxy-central/commits/738a4cbb6ed3/
Changeset: 738a4cbb6ed3
Branch: next-stable
User: dannon
Date: 2014-12-04 18:07:03+00:00
Summary: Cleanup of show_params while looking for bugs.
Affected #: 1 file
diff -r 3ecb6b58e88aeac8db48253e585df2aa429f39dc -r 738a4cbb6ed3189a80202f4be53726542b516239 lib/galaxy/webapps/galaxy/controllers/dataset.py
--- a/lib/galaxy/webapps/galaxy/controllers/dataset.py
+++ b/lib/galaxy/webapps/galaxy/controllers/dataset.py
@@ -932,7 +932,7 @@
@web.expose
def show_params( self, trans, dataset_id=None, from_noframe=None, **kwd ):
"""
- Show the parameters used for an HDA
+ Show the parameters used for the job associated with an HDA
"""
hda = trans.sa_session.query( trans.app.model.HistoryDatasetAssociation ).get( trans.security.decode_id( dataset_id ) )
if not hda:
@@ -961,19 +961,31 @@
toolbox = self.get_toolbox()
tool = toolbox.get_tool( job.tool_id )
assert tool is not None, 'Requested tool has not been loaded.'
- #Load parameter objects, if a parameter type has changed, it's possible for the value to no longer be valid
+ # Load parameter objects, if a parameter type has changed, it's possible for the value to no longer be valid
try:
params_objects = job.get_param_values( trans.app, ignore_errors=False )
except:
params_objects = job.get_param_values( trans.app, ignore_errors=True )
- upgrade_messages = tool.check_and_update_param_values( job.get_param_values( trans.app, ignore_errors=True ), trans, update_values=False ) #use different param_objects here, since we want to display original values as much as possible
+ # use different param_objects in the following line, since we want to display original values as much as possible
+ upgrade_messages = tool.check_and_update_param_values( job.get_param_values( trans.app,
+ ignore_errors=True ),
+ trans,
+ update_values=False )
has_parameter_errors = True
except:
pass
if job is None:
return trans.show_error_message( "Job information is not available for this dataset." )
- #TODO: we should provide the basic values along with the objects, in order to better handle reporting of old values during upgrade
- return trans.fill_template( "show_params.mako", inherit_chain=inherit_chain, history=trans.get_history(), hda=hda, job=job, tool=tool, params_objects=params_objects, upgrade_messages=upgrade_messages, has_parameter_errors=has_parameter_errors )
+ # TODO: we should provide the basic values along with the objects, in order to better handle reporting of old values during upgrade
+ return trans.fill_template( "show_params.mako",
+ inherit_chain=inherit_chain,
+ history=trans.get_history(),
+ hda=hda,
+ job=job,
+ tool=tool,
+ params_objects=params_objects,
+ upgrade_messages=upgrade_messages,
+ has_parameter_errors=has_parameter_errors )
@web.expose
def copy_datasets( self, trans, source_history=None, source_content_ids="", target_history_id=None, target_history_ids="", new_history_name="", do_copy=False, **kwd ):
https://bitbucket.org/galaxy/galaxy-central/commits/84bf14a4e9de/
Changeset: 84bf14a4e9de
Branch: next-stable
User: dannon
Date: 2014-12-04 18:10:37+00:00
Summary: Catch ValueError and actually log it instead of blowing up w/ invalid dataset_id. Raise httpexception.
Affected #: 1 file
diff -r 738a4cbb6ed3189a80202f4be53726542b516239 -r 84bf14a4e9de8bb7a27411933c28fdc237b75a52 lib/galaxy/webapps/galaxy/controllers/dataset.py
--- a/lib/galaxy/webapps/galaxy/controllers/dataset.py
+++ b/lib/galaxy/webapps/galaxy/controllers/dataset.py
@@ -934,9 +934,12 @@
"""
Show the parameters used for the job associated with an HDA
"""
- hda = trans.sa_session.query( trans.app.model.HistoryDatasetAssociation ).get( trans.security.decode_id( dataset_id ) )
+ try:
+ hda = trans.sa_session.query( trans.app.model.HistoryDatasetAssociation ).get( trans.security.decode_id( dataset_id ) )
+ except ValueError:
+ hda = None
if not hda:
- raise paste.httpexceptions.HTTPRequestRangeNotSatisfiable( "Invalid reference dataset id: %s." % str( dataset_id ) )
+ raise paste.httpexceptions.HTTPRequestRangeNotSatisfiable( "Invalid reference dataset id: %s." % escape( str( dataset_id ) ) )
if not self._can_access_dataset( trans, hda ):
return trans.show_error_message( "You are not allowed to access this dataset" )
@@ -967,8 +970,7 @@
except:
params_objects = job.get_param_values( trans.app, ignore_errors=True )
# use different param_objects in the following line, since we want to display original values as much as possible
- upgrade_messages = tool.check_and_update_param_values( job.get_param_values( trans.app,
- ignore_errors=True ),
+ upgrade_messages = tool.check_and_update_param_values( job.get_param_values( trans.app, ignore_errors=True ),
trans,
update_values=False )
has_parameter_errors = True
https://bitbucket.org/galaxy/galaxy-central/commits/502ee96ed98d/
Changeset: 502ee96ed98d
Branch: next-stable
User: dannon
Date: 2014-12-04 19:04:52+00:00
Summary: Cleanup of search functionality while hunting bugs.
Affected #: 3 files
diff -r 84bf14a4e9de8bb7a27411933c28fdc237b75a52 -r 502ee96ed98d74e31844dc601599fd4c10006090 lib/galaxy/webapps/galaxy/controllers/search.py
--- a/lib/galaxy/webapps/galaxy/controllers/search.py
+++ b/lib/galaxy/webapps/galaxy/controllers/search.py
@@ -1,4 +1,3 @@
-
"""
Contains a basic search interface for Galaxy
"""
@@ -8,7 +7,8 @@
log = logging.getLogger( __name__ )
+
class SearchController( BaseUIController ):
@web.expose
def index(self, trans):
- return trans.fill_template( "search/index.mako")
+ return trans.fill_template( "search/index.mako" )
diff -r 84bf14a4e9de8bb7a27411933c28fdc237b75a52 -r 502ee96ed98d74e31844dc601599fd4c10006090 templates/search/index.mako
--- a/templates/search/index.mako
+++ b/templates/search/index.mako
@@ -17,9 +17,9 @@
${parent.stylesheets()}
<style>
.searchResult {
- border-style:dashed;
- border-width:1px;
- margin: 5px;
+ border-style:dashed;
+ border-width:1px;
+ margin: 5px;
}
</style>
@@ -30,17 +30,17 @@
<script type="text/javascript">
var search_format_output = function(doc) {
- var div_class = "historyItem";
- var a = $("<div class='" + div_class + "'>")
- a.append($("<div>").append(doc['model_class']));
- b = a.append( $("<div class='historyItemTitle'><a href='/file/" + doc['id'] + "'>" + doc['name'] + "</a></div>") );
- if ('misc_blurb' in doc) {
- b.append( $("<div>").append(doc["misc_blurb"]) );
- }
- if ('peek' in doc) {
- b.append( $("<pre class='peek'>").append( doc["peek"]) );
- }
- return a;
+ var div_class = "historyItem";
+ var a = $("<div class='" + div_class + "'>")
+ a.append($("<div>").append(doc['model_class']));
+ b = a.append( $("<div class='historyItemTitle'><a href='/file/" + doc['id'] + "'>" + doc['name'] + "</a></div>") );
+ if ('misc_blurb' in doc) {
+ b.append( $("<div>").append(doc["misc_blurb"]) );
+ }
+ if ('peek' in doc) {
+ b.append( $("<pre class='peek'>").append( doc["peek"]) );
+ }
+ return a;
}
</script>
diff -r 84bf14a4e9de8bb7a27411933c28fdc237b75a52 -r 502ee96ed98d74e31844dc601599fd4c10006090 templates/search/search.mako
--- a/templates/search/search.mako
+++ b/templates/search/search.mako
@@ -2,7 +2,7 @@
<%def name="search_init()">
${h.js(
- 'libs/jquery/jquery',
+ 'libs/jquery/jquery',
)}
</%def>
@@ -12,54 +12,54 @@
<script type="text/javascript">
function doSearch(query) {
- if (query.length > 1) {
- var url = "/api/search";
- $.ajax({
- type : 'POST',
- url: url,
- data: JSON.stringify({"query" : query }),
- contentType : 'application/json',
- dataType : 'json',
- success : function(data) {
- var p = $("#output");
- p.empty();
- for(var i in data) {
- var e = ${output_format}(data[i]);
- p.append(e);
- }
- }
- });
- }
+ if (query.length > 1) {
+ var url = "/api/search";
+ $.ajax({
+ type : 'POST',
+ url: url,
+ data: JSON.stringify({"query" : query }),
+ contentType : 'application/json',
+ dataType : 'json',
+ success : function(data) {
+ var p = $("#output");
+ p.empty();
+ for(var i in data) {
+ var e = ${output_format}(data[i]);
+ p.append(e);
+ }
+ }
+ });
+ }
};
$(document).ready( function() {
- $("#search_button").click(function() {
- doSearch($("#search_text").val());
- });
- $('#search_text').keyup(function(e){
- if(e.keyCode == 13) {
- doSearch($("#search_text").val());
- }
- });
- doSearch($("#search_text").val());
+ $("#search_button").click(function() {
+ doSearch($("#search_text").val());
+ });
+ $('#search_text').keyup(function(e){
+ if(e.keyCode == 13) {
+ doSearch($("#search_text").val());
+ }
+ });
+ doSearch($("#search_text").val());
});
var queryURL = function (query) {
- var url = "/api/search" + encodeURIComponent(query);
- url = url + "&field=" + $("#searchFields").val();
- if ($("#fileType").val() != "All") {
- url = url + "&type=" + $("#fileType").val()
- }
- return url;
+ var url = "/api/search" + encodeURIComponent(query);
+ url = url + "&field=" + $("#searchFields").val();
+ if ($("#fileType").val() != "All") {
+ url = url + "&type=" + $("#fileType").val()
+ }
+ return url;
}
</script><div id="search_box" style="margin: 20px;">
- <input type="text" id="search_text" size="90"/>
+ <input type="text" id="search_text" size="90"/></div><div style="margin: 20px;">
- <input type="button" id="search_button" value="Search"/>
+ <input type="button" id="search_button" value="Search"/></div><div id="output"></div>
https://bitbucket.org/galaxy/galaxy-central/commits/02681fa23902/
Changeset: 02681fa23902
Branch: next-stable
User: dannon
Date: 2014-12-04 20:23:35+00:00
Summary: Fix search to work for at least datasets, hdas, etc.
Affected #: 2 files
diff -r 502ee96ed98d74e31844dc601599fd4c10006090 -r 02681fa23902d774892634cbbe5c9fbaf26f0846 templates/search/index.mako
--- a/templates/search/index.mako
+++ b/templates/search/index.mako
@@ -1,52 +1,112 @@
-
<%inherit file="/webapps/galaxy/base_panels.mako"/>
-<%namespace file="/search/search.mako" import="search_init" />
-<%namespace file="/search/search.mako" import="search_dialog" /><%def name="init()">
-<%
- self.has_left_panel=False
- self.has_right_panel=False
- self.message_box_visible=False
- self.active_view="shared"
- self.overlay_visible=False
-%>
+ <%
+ self.has_left_panel=False
+ self.has_right_panel=False
+ self.message_box_visible=False
+ self.active_view="shared"
+ self.overlay_visible=False
+ %></%def><%def name="stylesheets()">
-${parent.stylesheets()}
-<style>
-.searchResult {
- border-style:dashed;
- border-width:1px;
- margin: 5px;
-}
-</style>
+ ${parent.stylesheets()}
+ <style>
+ .searchResult {
+ border-style:dashed;
+ border-width:1px;
+ margin: 5px;
+ }
+ </style>
+</%def>
+
+
+<%def name="javascripts()">
+ ${parent.javascripts()}
+ ${h.js(
+ "libs/jquery/jquery",
+ )}
+ <script type="text/javascript">
+
+ function search_format_output(doc) {
+ var div_class = "historyItem";
+ var a = $("<div class='" + div_class + "'>")
+ a.append($("<div>").append(doc['model_class']));
+ b = a.append( $("<div class='historyItemTitle'><a href='/file/" + doc['id'] + "'>" + doc['name'] + "</a></div>") );
+ if ('misc_blurb' in doc) {
+ b.append( $("<div>").append(doc["misc_blurb"]) );
+ }
+ if ('peek' in doc) {
+ b.append( $("<pre class='peek'>").append( doc["peek"]) );
+ }
+ return a;
+ }
+
+ function doSearch(query) {
+ if (query.length > 1) {
+ var url = "/api/search";
+ $.ajax({
+ type : 'POST',
+ url: url,
+ data: JSON.stringify({"query" : query }),
+ contentType : 'application/json',
+ dataType : 'json',
+ success : function(data) {
+ var p = $("#output");
+ p.empty();
+ _.each(data.results, function(doc){
+ var div_class = "historyItem";
+ var a = $("<div class='" + div_class + "'>")
+ a.append($("<div>").append(doc['model_class']));
+ b = a.append( $("<div class='historyItemTitle'><a href='/file/" + doc['id'] + "'>" + doc['name'] + "</a></div>") );
+ if ('misc_blurb' in doc) {
+ b.append( $("<div>").append(doc["misc_blurb"]) );
+ }
+ if ('peek' in doc) {
+ b.append( $("<pre class='peek'>").append( doc["peek"]) );
+ }
+ p.append(b);
+ });
+ }
+ });
+ }
+ };
+
+
+ var queryURL = function (query) {
+ var url = "/api/search" + encodeURIComponent(query);
+ url = url + "&field=" + $("#searchFields").val();
+ if ($("#fileType").val() != "All") {
+ url = url + "&type=" + $("#fileType").val()
+ }
+ return url;
+ }
+
+ $(document).ready( function() {
+ $("#search_button").click(function() {
+ doSearch($("#search_text").val());
+ });
+ $('#search_text').keyup(function(e){
+ if(e.keyCode == 13) {
+ doSearch($("#search_text").val());
+ }
+ });
+ doSearch($("#search_text").val());
+ });
+ </script></%def>
+
<%def name="center_panel()">
-${search_init()}
-<script type="text/javascript">
-var search_format_output = function(doc) {
- var div_class = "historyItem";
- var a = $("<div class='" + div_class + "'>")
- a.append($("<div>").append(doc['model_class']));
- b = a.append( $("<div class='historyItemTitle'><a href='/file/" + doc['id'] + "'>" + doc['name'] + "</a></div>") );
- if ('misc_blurb' in doc) {
- b.append( $("<div>").append(doc["misc_blurb"]) );
- }
- if ('peek' in doc) {
- b.append( $("<pre class='peek'>").append( doc["peek"]) );
- }
- return a;
-}
+ <div id="search_box" style="margin: 20px;">
+ <input type="text" id="search_text" size="90"/>
+ </div>
+ <div style="margin: 20px;">
+ <input type="button" id="search_button" value="Search"/>
+ </div>
+ <div id="output"></div>
-</script>
-<div style="overflow: auto; height: 100%">
-${search_dialog("search_format_output")}
-</div></%def>
-
-
diff -r 502ee96ed98d74e31844dc601599fd4c10006090 -r 02681fa23902d774892634cbbe5c9fbaf26f0846 templates/search/search.mako
--- a/templates/search/search.mako
+++ /dev/null
@@ -1,68 +0,0 @@
-
-<%def name="search_init()">
-
- ${h.js(
- 'libs/jquery/jquery',
-)}
-
-</%def>
-
-<%def name="search_dialog(output_format)">
-
-<script type="text/javascript">
-
-function doSearch(query) {
- if (query.length > 1) {
- var url = "/api/search";
- $.ajax({
- type : 'POST',
- url: url,
- data: JSON.stringify({"query" : query }),
- contentType : 'application/json',
- dataType : 'json',
- success : function(data) {
- var p = $("#output");
- p.empty();
- for(var i in data) {
- var e = ${output_format}(data[i]);
- p.append(e);
- }
- }
- });
- }
-};
-
-$(document).ready( function() {
- $("#search_button").click(function() {
- doSearch($("#search_text").val());
- });
- $('#search_text').keyup(function(e){
- if(e.keyCode == 13) {
- doSearch($("#search_text").val());
- }
- });
- doSearch($("#search_text").val());
-});
-
-var queryURL = function (query) {
- var url = "/api/search" + encodeURIComponent(query);
- url = url + "&field=" + $("#searchFields").val();
- if ($("#fileType").val() != "All") {
- url = url + "&type=" + $("#fileType").val()
- }
- return url;
-}
-
-</script>
-
-<div id="search_box" style="margin: 20px;">
- <input type="text" id="search_text" size="90"/>
-</div>
-<div style="margin: 20px;">
- <input type="button" id="search_button" value="Search"/>
-</div>
-
-<div id="output"></div>
-
-
-</%def>
https://bitbucket.org/galaxy/galaxy-central/commits/ead3e859dda1/
Changeset: ead3e859dda1
Branch: next-stable
User: dannon
Date: 2014-12-04 20:27:19+00:00
Summary: Disable search interface for right now -- I made it not broken in the previous commit, but nobody should be using this yet.
Affected #: 1 file
diff -r 02681fa23902d774892634cbbe5c9fbaf26f0846 -r ead3e859dda102520ea706bb3a566723af33a90f lib/galaxy/webapps/galaxy/controllers/search.py
--- a/lib/galaxy/webapps/galaxy/controllers/search.py
+++ b/lib/galaxy/webapps/galaxy/controllers/search.py
@@ -9,6 +9,11 @@
class SearchController( BaseUIController ):
+
@web.expose
def index(self, trans):
- return trans.fill_template( "search/index.mako" )
+ """
+ Not ready for human consumption, yet. Power users can still use the
+ search API.
+ """
+ return trans.show_message("Sorry, the search interface isn't quite ready for use, yet.")
https://bitbucket.org/galaxy/galaxy-central/commits/a37ee286981b/
Changeset: a37ee286981b
Branch: next-stable
User: dannon
Date: 2014-12-04 20:29:06+00:00
Summary: Tweak message and commentary for search controller.
Affected #: 1 file
diff -r ead3e859dda102520ea706bb3a566723af33a90f -r a37ee286981b363c0f8b644c3a40a7007648fffe lib/galaxy/webapps/galaxy/controllers/search.py
--- a/lib/galaxy/webapps/galaxy/controllers/search.py
+++ b/lib/galaxy/webapps/galaxy/controllers/search.py
@@ -13,7 +13,7 @@
@web.expose
def index(self, trans):
"""
- Not ready for human consumption, yet. Power users can still use the
- search API.
+ Per the message, this is not ready for human consumption, yet. Power
+ users can still use the search API.
"""
- return trans.show_message("Sorry, the search interface isn't quite ready for use, yet.")
+ return trans.show_message("Sorry, the search interface isn't quite ready for use, yet. Watch the release notes and check back later!")
https://bitbucket.org/galaxy/galaxy-central/commits/b51526d2f9b4/
Changeset: b51526d2f9b4
Branch: next-stable
User: dannon
Date: 2014-12-04 20:40:51+00:00
Summary: Merge.
Affected #: 3 files
diff -r a37ee286981b363c0f8b644c3a40a7007648fffe -r b51526d2f9b42a0bc64b55584e435ceebe7ceb31 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
@@ -125,6 +125,9 @@
// handle default value
if (!field.skip) {
+ if (input.optional && field.validate && !field.validate()) {
+ value = 'None';
+ }
add (job_input_id, input.id, value);
}
}
diff -r a37ee286981b363c0f8b644c3a40a7007648fffe -r b51526d2f9b42a0bc64b55584e435ceebe7ceb31 static/scripts/mvc/tools/tools-tree.js
--- a/static/scripts/mvc/tools/tools-tree.js
+++ b/static/scripts/mvc/tools/tools-tree.js
@@ -125,6 +125,9 @@
// handle default value
if (!field.skip) {
+ if (input.optional && field.validate && !field.validate()) {
+ value = 'None';
+ }
add (job_input_id, input.id, value);
}
}
diff -r a37ee286981b363c0f8b644c3a40a7007648fffe -r b51526d2f9b42a0bc64b55584e435ceebe7ceb31 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([],function(){return Backbone.Model.extend({initialize:function(a){this.app=a},refresh:function(){this.dict={};this.xml=$("<div/>");if(!this.app.section){return{}}this._iterate(this.app.section.$el,this.dict,this.xml)},finalize:function(d){d=d||{};var a=this;this.job_def={};this.job_ids={};function c(g,f,e){a.job_def[g]=e;a.job_ids[g]=f}function b(l,o){for(var j in o){var g=o[j];if(g.input){var q=g.input;var k=l;if(l!=""){k+="|"}k+=q.name;switch(q.type){case"repeat":var f="section-";var t=[];var n=null;for(var s in g){var m=s.indexOf(f);if(m!=-1){m+=f.length;t.push(parseInt(s.substr(m)));if(!n){n=s.substr(0,m)}}}t.sort(function(u,i){return u-i});var j=0;for(var h in t){b(k+"_"+j++,g[n+t[h]])}break;case"conditional":var r=a.app.field_list[q.id].value();if(d[q.test_param.type]){r=d[q.test_param.type](r)}c(k+"|"+q.test_param.name,q.id,r);var e=a.matchCase(q,r);if(e!=-1){b(k,o[q.id+"-section-"+e])}break;default:var p=a.app.field_list[q.id];var r=p.value();if(d[q.type]){r=d[q.type](r)}if(!p.skip){c(k,q.id,r)}}}}}b("",this.dict);return this.job_def},match:function(a){return this.job_ids&&this.job_ids[a]},matchCase:function(a,c){if(a.test_param.type=="boolean"){if(c=="true"){c=a.test_param.truevalue||"true"}else{c=a.test_param.falsevalue||"false"}}for(var b in a.cases){if(a.cases[b].value==c){return b}}return -1},matchModel:function(c,e){var a={};var b=this;function d(f,o){for(var l in o){var h=o[l];var m=h.name;if(f!=""){m=f+"|"+m}switch(h.type){case"repeat":for(var k in h.cache){d(m+"_"+k,h.cache[k])}break;case"conditional":var p=h.test_param&&h.test_param.value;var g=b.matchCase(h,p);if(g!=-1){d(m,h.cases[g].inputs)}break;default:var n=b.app.tree.job_ids[m];if(n){e(n,h)}}}}d("",c.inputs);return a},matchResponse:function(c){var a={};var b=this;function d(k,h){if(typeof h==="string"){var f=b.app.tree.job_ids[k];if(f){a[f]=h}}else{for(var g in h){var e=g;if(k!==""){var j="|";if(h instanceof Array){j="_"}e=k+j+e}d(e,h[g])}}}d("",c);return a},references:function(c,e){var g=[];var b=this;function d(h,j){var i=$(j).children();var l=[];var k=false;i.each(function(){var o=this;var n=$(o).attr("id");if(n!==c){var m=b.app.input_list[n];if(m){if(m.name==h){k=true;return false}if(m.data_ref==h&&m.type==e){l.push(n)}}}});if(!k){g=g.concat(l);i.each(function(){d(h,this)})}}var f=this.xml.find("#"+c);if(f.length>0){var a=this.app.input_list[c];if(a){d(a.name,f.parent())}}return g},_iterate:function(d,e,b){var a=this;var c=$(d).children();c.each(function(){var i=this;var h=$(i).attr("id");if($(i).hasClass("section-row")){e[h]={};var f=a.app.input_list[h];if(f){e[h]={input:f}}var g=$('<div id="'+h+'"/>');b.append(g);a._iterate(i,e[h],g)}else{a._iterate(i,e,b)}})}})});
\ No newline at end of file
+define([],function(){return Backbone.Model.extend({initialize:function(a){this.app=a},refresh:function(){this.dict={};this.xml=$("<div/>");if(!this.app.section){return{}}this._iterate(this.app.section.$el,this.dict,this.xml)},finalize:function(d){d=d||{};var a=this;this.job_def={};this.job_ids={};function c(g,f,e){a.job_def[g]=e;a.job_ids[g]=f}function b(l,o){for(var j in o){var g=o[j];if(g.input){var q=g.input;var k=l;if(l!=""){k+="|"}k+=q.name;switch(q.type){case"repeat":var f="section-";var t=[];var n=null;for(var s in g){var m=s.indexOf(f);if(m!=-1){m+=f.length;t.push(parseInt(s.substr(m)));if(!n){n=s.substr(0,m)}}}t.sort(function(u,i){return u-i});var j=0;for(var h in t){b(k+"_"+j++,g[n+t[h]])}break;case"conditional":var r=a.app.field_list[q.id].value();if(d[q.test_param.type]){r=d[q.test_param.type](r)}c(k+"|"+q.test_param.name,q.id,r);var e=a.matchCase(q,r);if(e!=-1){b(k,o[q.id+"-section-"+e])}break;default:var p=a.app.field_list[q.id];var r=p.value();if(d[q.type]){r=d[q.type](r)}if(!p.skip){if(q.optional&&p.validate&&!p.validate()){r="None"}c(k,q.id,r)}}}}}b("",this.dict);return this.job_def},match:function(a){return this.job_ids&&this.job_ids[a]},matchCase:function(a,c){if(a.test_param.type=="boolean"){if(c=="true"){c=a.test_param.truevalue||"true"}else{c=a.test_param.falsevalue||"false"}}for(var b in a.cases){if(a.cases[b].value==c){return b}}return -1},matchModel:function(c,e){var a={};var b=this;function d(f,o){for(var l in o){var h=o[l];var m=h.name;if(f!=""){m=f+"|"+m}switch(h.type){case"repeat":for(var k in h.cache){d(m+"_"+k,h.cache[k])}break;case"conditional":var p=h.test_param&&h.test_param.value;var g=b.matchCase(h,p);if(g!=-1){d(m,h.cases[g].inputs)}break;default:var n=b.app.tree.job_ids[m];if(n){e(n,h)}}}}d("",c.inputs);return a},matchResponse:function(c){var a={};var b=this;function d(k,h){if(typeof h==="string"){var f=b.app.tree.job_ids[k];if(f){a[f]=h}}else{for(var g in h){var e=g;if(k!==""){var j="|";if(h instanceof Array){j="_"}e=k+j+e}d(e,h[g])}}}d("",c);return a},references:function(c,e){var g=[];var b=this;function d(h,j){var i=$(j).children();var l=[];var k=false;i.each(function(){var o=this;var n=$(o).attr("id");if(n!==c){var m=b.app.input_list[n];if(m){if(m.name==h){k=true;return false}if(m.data_ref==h&&m.type==e){l.push(n)}}}});if(!k){g=g.concat(l);i.each(function(){d(h,this)})}}var f=this.xml.find("#"+c);if(f.length>0){var a=this.app.input_list[c];if(a){d(a.name,f.parent())}}return g},_iterate:function(d,e,b){var a=this;var c=$(d).children();c.each(function(){var i=this;var h=$(i).attr("id");if($(i).hasClass("section-row")){e[h]={};var f=a.app.input_list[h];if(f){e[h]={input:f}}var g=$('<div id="'+h+'"/>');b.append(g);a._iterate(i,e[h],g)}else{a._iterate(i,e,b)}})}})});
\ No newline at end of file
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
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/effaa3321792/
Changeset: effaa3321792
Branch: next-stable
User: guerler
Date: 2014-12-04 18:46:44+00:00
Summary: ToolForm: Adjust optional parameter submission
Affected #: 3 files
diff -r 29b2c328b89b6634c9a3f9a21c2349105a7e485a -r effaa332179242851638c008fab9010d04f3d48b 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
@@ -125,6 +125,9 @@
// handle default value
if (!field.skip) {
+ if (input.optional && field.validate && !field.validate()) {
+ value = 'None';
+ }
add (job_input_id, input.id, value);
}
}
diff -r 29b2c328b89b6634c9a3f9a21c2349105a7e485a -r effaa332179242851638c008fab9010d04f3d48b static/scripts/mvc/tools/tools-tree.js
--- a/static/scripts/mvc/tools/tools-tree.js
+++ b/static/scripts/mvc/tools/tools-tree.js
@@ -125,6 +125,9 @@
// handle default value
if (!field.skip) {
+ if (input.optional && field.validate && !field.validate()) {
+ value = 'None';
+ }
add (job_input_id, input.id, value);
}
}
diff -r 29b2c328b89b6634c9a3f9a21c2349105a7e485a -r effaa332179242851638c008fab9010d04f3d48b 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([],function(){return Backbone.Model.extend({initialize:function(a){this.app=a},refresh:function(){this.dict={};this.xml=$("<div/>");if(!this.app.section){return{}}this._iterate(this.app.section.$el,this.dict,this.xml)},finalize:function(d){d=d||{};var a=this;this.job_def={};this.job_ids={};function c(g,f,e){a.job_def[g]=e;a.job_ids[g]=f}function b(l,o){for(var j in o){var g=o[j];if(g.input){var q=g.input;var k=l;if(l!=""){k+="|"}k+=q.name;switch(q.type){case"repeat":var f="section-";var t=[];var n=null;for(var s in g){var m=s.indexOf(f);if(m!=-1){m+=f.length;t.push(parseInt(s.substr(m)));if(!n){n=s.substr(0,m)}}}t.sort(function(u,i){return u-i});var j=0;for(var h in t){b(k+"_"+j++,g[n+t[h]])}break;case"conditional":var r=a.app.field_list[q.id].value();if(d[q.test_param.type]){r=d[q.test_param.type](r)}c(k+"|"+q.test_param.name,q.id,r);var e=a.matchCase(q,r);if(e!=-1){b(k,o[q.id+"-section-"+e])}break;default:var p=a.app.field_list[q.id];var r=p.value();if(d[q.type]){r=d[q.type](r)}if(!p.skip){c(k,q.id,r)}}}}}b("",this.dict);return this.job_def},match:function(a){return this.job_ids&&this.job_ids[a]},matchCase:function(a,c){if(a.test_param.type=="boolean"){if(c=="true"){c=a.test_param.truevalue||"true"}else{c=a.test_param.falsevalue||"false"}}for(var b in a.cases){if(a.cases[b].value==c){return b}}return -1},matchModel:function(c,e){var a={};var b=this;function d(f,o){for(var l in o){var h=o[l];var m=h.name;if(f!=""){m=f+"|"+m}switch(h.type){case"repeat":for(var k in h.cache){d(m+"_"+k,h.cache[k])}break;case"conditional":var p=h.test_param&&h.test_param.value;var g=b.matchCase(h,p);if(g!=-1){d(m,h.cases[g].inputs)}break;default:var n=b.app.tree.job_ids[m];if(n){e(n,h)}}}}d("",c.inputs);return a},matchResponse:function(c){var a={};var b=this;function d(k,h){if(typeof h==="string"){var f=b.app.tree.job_ids[k];if(f){a[f]=h}}else{for(var g in h){var e=g;if(k!==""){var j="|";if(h instanceof Array){j="_"}e=k+j+e}d(e,h[g])}}}d("",c);return a},references:function(c,e){var g=[];var b=this;function d(h,j){var i=$(j).children();var l=[];var k=false;i.each(function(){var o=this;var n=$(o).attr("id");if(n!==c){var m=b.app.input_list[n];if(m){if(m.name==h){k=true;return false}if(m.data_ref==h&&m.type==e){l.push(n)}}}});if(!k){g=g.concat(l);i.each(function(){d(h,this)})}}var f=this.xml.find("#"+c);if(f.length>0){var a=this.app.input_list[c];if(a){d(a.name,f.parent())}}return g},_iterate:function(d,e,b){var a=this;var c=$(d).children();c.each(function(){var i=this;var h=$(i).attr("id");if($(i).hasClass("section-row")){e[h]={};var f=a.app.input_list[h];if(f){e[h]={input:f}}var g=$('<div id="'+h+'"/>');b.append(g);a._iterate(i,e[h],g)}else{a._iterate(i,e,b)}})}})});
\ No newline at end of file
+define([],function(){return Backbone.Model.extend({initialize:function(a){this.app=a},refresh:function(){this.dict={};this.xml=$("<div/>");if(!this.app.section){return{}}this._iterate(this.app.section.$el,this.dict,this.xml)},finalize:function(d){d=d||{};var a=this;this.job_def={};this.job_ids={};function c(g,f,e){a.job_def[g]=e;a.job_ids[g]=f}function b(l,o){for(var j in o){var g=o[j];if(g.input){var q=g.input;var k=l;if(l!=""){k+="|"}k+=q.name;switch(q.type){case"repeat":var f="section-";var t=[];var n=null;for(var s in g){var m=s.indexOf(f);if(m!=-1){m+=f.length;t.push(parseInt(s.substr(m)));if(!n){n=s.substr(0,m)}}}t.sort(function(u,i){return u-i});var j=0;for(var h in t){b(k+"_"+j++,g[n+t[h]])}break;case"conditional":var r=a.app.field_list[q.id].value();if(d[q.test_param.type]){r=d[q.test_param.type](r)}c(k+"|"+q.test_param.name,q.id,r);var e=a.matchCase(q,r);if(e!=-1){b(k,o[q.id+"-section-"+e])}break;default:var p=a.app.field_list[q.id];var r=p.value();if(d[q.type]){r=d[q.type](r)}if(!p.skip){if(q.optional&&p.validate&&!p.validate()){r="None"}c(k,q.id,r)}}}}}b("",this.dict);return this.job_def},match:function(a){return this.job_ids&&this.job_ids[a]},matchCase:function(a,c){if(a.test_param.type=="boolean"){if(c=="true"){c=a.test_param.truevalue||"true"}else{c=a.test_param.falsevalue||"false"}}for(var b in a.cases){if(a.cases[b].value==c){return b}}return -1},matchModel:function(c,e){var a={};var b=this;function d(f,o){for(var l in o){var h=o[l];var m=h.name;if(f!=""){m=f+"|"+m}switch(h.type){case"repeat":for(var k in h.cache){d(m+"_"+k,h.cache[k])}break;case"conditional":var p=h.test_param&&h.test_param.value;var g=b.matchCase(h,p);if(g!=-1){d(m,h.cases[g].inputs)}break;default:var n=b.app.tree.job_ids[m];if(n){e(n,h)}}}}d("",c.inputs);return a},matchResponse:function(c){var a={};var b=this;function d(k,h){if(typeof h==="string"){var f=b.app.tree.job_ids[k];if(f){a[f]=h}}else{for(var g in h){var e=g;if(k!==""){var j="|";if(h instanceof Array){j="_"}e=k+j+e}d(e,h[g])}}}d("",c);return a},references:function(c,e){var g=[];var b=this;function d(h,j){var i=$(j).children();var l=[];var k=false;i.each(function(){var o=this;var n=$(o).attr("id");if(n!==c){var m=b.app.input_list[n];if(m){if(m.name==h){k=true;return false}if(m.data_ref==h&&m.type==e){l.push(n)}}}});if(!k){g=g.concat(l);i.each(function(){d(h,this)})}}var f=this.xml.find("#"+c);if(f.length>0){var a=this.app.input_list[c];if(a){d(a.name,f.parent())}}return g},_iterate:function(d,e,b){var a=this;var c=$(d).children();c.each(function(){var i=this;var h=$(i).attr("id");if($(i).hasClass("section-row")){e[h]={};var f=a.app.input_list[h];if(f){e[h]={input:f}}var g=$('<div id="'+h+'"/>');b.append(g);a._iterate(i,e[h],g)}else{a._iterate(i,e,b)}})}})});
\ No newline at end of file
https://bitbucket.org/galaxy/galaxy-central/commits/636d3594e201/
Changeset: 636d3594e201
User: guerler
Date: 2014-12-04 18:48:10+00:00
Summary: Merge
Affected #: 3 files
diff -r 66d38fa8edcbd9926f4eca9b875e2fe561d2d850 -r 636d3594e201ebb2d085c33c6de32577d65bd866 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
@@ -125,6 +125,9 @@
// handle default value
if (!field.skip) {
+ if (input.optional && field.validate && !field.validate()) {
+ value = 'None';
+ }
add (job_input_id, input.id, value);
}
}
diff -r 66d38fa8edcbd9926f4eca9b875e2fe561d2d850 -r 636d3594e201ebb2d085c33c6de32577d65bd866 static/scripts/mvc/tools/tools-tree.js
--- a/static/scripts/mvc/tools/tools-tree.js
+++ b/static/scripts/mvc/tools/tools-tree.js
@@ -125,6 +125,9 @@
// handle default value
if (!field.skip) {
+ if (input.optional && field.validate && !field.validate()) {
+ value = 'None';
+ }
add (job_input_id, input.id, value);
}
}
diff -r 66d38fa8edcbd9926f4eca9b875e2fe561d2d850 -r 636d3594e201ebb2d085c33c6de32577d65bd866 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([],function(){return Backbone.Model.extend({initialize:function(a){this.app=a},refresh:function(){this.dict={};this.xml=$("<div/>");if(!this.app.section){return{}}this._iterate(this.app.section.$el,this.dict,this.xml)},finalize:function(d){d=d||{};var a=this;this.job_def={};this.job_ids={};function c(g,f,e){a.job_def[g]=e;a.job_ids[g]=f}function b(l,o){for(var j in o){var g=o[j];if(g.input){var q=g.input;var k=l;if(l!=""){k+="|"}k+=q.name;switch(q.type){case"repeat":var f="section-";var t=[];var n=null;for(var s in g){var m=s.indexOf(f);if(m!=-1){m+=f.length;t.push(parseInt(s.substr(m)));if(!n){n=s.substr(0,m)}}}t.sort(function(u,i){return u-i});var j=0;for(var h in t){b(k+"_"+j++,g[n+t[h]])}break;case"conditional":var r=a.app.field_list[q.id].value();if(d[q.test_param.type]){r=d[q.test_param.type](r)}c(k+"|"+q.test_param.name,q.id,r);var e=a.matchCase(q,r);if(e!=-1){b(k,o[q.id+"-section-"+e])}break;default:var p=a.app.field_list[q.id];var r=p.value();if(d[q.type]){r=d[q.type](r)}if(!p.skip){c(k,q.id,r)}}}}}b("",this.dict);return this.job_def},match:function(a){return this.job_ids&&this.job_ids[a]},matchCase:function(a,c){if(a.test_param.type=="boolean"){if(c=="true"){c=a.test_param.truevalue||"true"}else{c=a.test_param.falsevalue||"false"}}for(var b in a.cases){if(a.cases[b].value==c){return b}}return -1},matchModel:function(c,e){var a={};var b=this;function d(f,o){for(var l in o){var h=o[l];var m=h.name;if(f!=""){m=f+"|"+m}switch(h.type){case"repeat":for(var k in h.cache){d(m+"_"+k,h.cache[k])}break;case"conditional":var p=h.test_param&&h.test_param.value;var g=b.matchCase(h,p);if(g!=-1){d(m,h.cases[g].inputs)}break;default:var n=b.app.tree.job_ids[m];if(n){e(n,h)}}}}d("",c.inputs);return a},matchResponse:function(c){var a={};var b=this;function d(k,h){if(typeof h==="string"){var f=b.app.tree.job_ids[k];if(f){a[f]=h}}else{for(var g in h){var e=g;if(k!==""){var j="|";if(h instanceof Array){j="_"}e=k+j+e}d(e,h[g])}}}d("",c);return a},references:function(c,e){var g=[];var b=this;function d(h,j){var i=$(j).children();var l=[];var k=false;i.each(function(){var o=this;var n=$(o).attr("id");if(n!==c){var m=b.app.input_list[n];if(m){if(m.name==h){k=true;return false}if(m.data_ref==h&&m.type==e){l.push(n)}}}});if(!k){g=g.concat(l);i.each(function(){d(h,this)})}}var f=this.xml.find("#"+c);if(f.length>0){var a=this.app.input_list[c];if(a){d(a.name,f.parent())}}return g},_iterate:function(d,e,b){var a=this;var c=$(d).children();c.each(function(){var i=this;var h=$(i).attr("id");if($(i).hasClass("section-row")){e[h]={};var f=a.app.input_list[h];if(f){e[h]={input:f}}var g=$('<div id="'+h+'"/>');b.append(g);a._iterate(i,e[h],g)}else{a._iterate(i,e,b)}})}})});
\ No newline at end of file
+define([],function(){return Backbone.Model.extend({initialize:function(a){this.app=a},refresh:function(){this.dict={};this.xml=$("<div/>");if(!this.app.section){return{}}this._iterate(this.app.section.$el,this.dict,this.xml)},finalize:function(d){d=d||{};var a=this;this.job_def={};this.job_ids={};function c(g,f,e){a.job_def[g]=e;a.job_ids[g]=f}function b(l,o){for(var j in o){var g=o[j];if(g.input){var q=g.input;var k=l;if(l!=""){k+="|"}k+=q.name;switch(q.type){case"repeat":var f="section-";var t=[];var n=null;for(var s in g){var m=s.indexOf(f);if(m!=-1){m+=f.length;t.push(parseInt(s.substr(m)));if(!n){n=s.substr(0,m)}}}t.sort(function(u,i){return u-i});var j=0;for(var h in t){b(k+"_"+j++,g[n+t[h]])}break;case"conditional":var r=a.app.field_list[q.id].value();if(d[q.test_param.type]){r=d[q.test_param.type](r)}c(k+"|"+q.test_param.name,q.id,r);var e=a.matchCase(q,r);if(e!=-1){b(k,o[q.id+"-section-"+e])}break;default:var p=a.app.field_list[q.id];var r=p.value();if(d[q.type]){r=d[q.type](r)}if(!p.skip){if(q.optional&&p.validate&&!p.validate()){r="None"}c(k,q.id,r)}}}}}b("",this.dict);return this.job_def},match:function(a){return this.job_ids&&this.job_ids[a]},matchCase:function(a,c){if(a.test_param.type=="boolean"){if(c=="true"){c=a.test_param.truevalue||"true"}else{c=a.test_param.falsevalue||"false"}}for(var b in a.cases){if(a.cases[b].value==c){return b}}return -1},matchModel:function(c,e){var a={};var b=this;function d(f,o){for(var l in o){var h=o[l];var m=h.name;if(f!=""){m=f+"|"+m}switch(h.type){case"repeat":for(var k in h.cache){d(m+"_"+k,h.cache[k])}break;case"conditional":var p=h.test_param&&h.test_param.value;var g=b.matchCase(h,p);if(g!=-1){d(m,h.cases[g].inputs)}break;default:var n=b.app.tree.job_ids[m];if(n){e(n,h)}}}}d("",c.inputs);return a},matchResponse:function(c){var a={};var b=this;function d(k,h){if(typeof h==="string"){var f=b.app.tree.job_ids[k];if(f){a[f]=h}}else{for(var g in h){var e=g;if(k!==""){var j="|";if(h instanceof Array){j="_"}e=k+j+e}d(e,h[g])}}}d("",c);return a},references:function(c,e){var g=[];var b=this;function d(h,j){var i=$(j).children();var l=[];var k=false;i.each(function(){var o=this;var n=$(o).attr("id");if(n!==c){var m=b.app.input_list[n];if(m){if(m.name==h){k=true;return false}if(m.data_ref==h&&m.type==e){l.push(n)}}}});if(!k){g=g.concat(l);i.each(function(){d(h,this)})}}var f=this.xml.find("#"+c);if(f.length>0){var a=this.app.input_list[c];if(a){d(a.name,f.parent())}}return g},_iterate:function(d,e,b){var a=this;var c=$(d).children();c.each(function(){var i=this;var h=$(i).attr("id");if($(i).hasClass("section-row")){e[h]={};var f=a.app.input_list[h];if(f){e[h]={input:f}}var g=$('<div id="'+h+'"/>');b.append(g);a._iterate(i,e[h],g)}else{a._iterate(i,e,b)}})}})});
\ No newline at end of file
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: jmchilton: Test case for passing null to optional tool input.
by commits-noreply@bitbucket.org 04 Dec '14
by commits-noreply@bitbucket.org 04 Dec '14
04 Dec '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/66d38fa8edcb/
Changeset: 66d38fa8edcb
User: jmchilton
Date: 2014-12-04 17:28:23+00:00
Summary: Test case for passing null to optional tool input.
Affected #: 2 files
diff -r c5d6eadac9c3d6784361b93ef81c87307b5a4f0f -r 66d38fa8edcbd9926f4eca9b875e2fe561d2d850 test/api/test_tools.py
--- a/test/api/test_tools.py
+++ b/test/api/test_tools.py
@@ -106,6 +106,20 @@
output1_content = self.dataset_populator.get_history_dataset_content( history_id, dataset=output )
assert output1_content == "--ex1,ex2"
+ @skip_without_tool( "multi_select" )
+ def test_multi_select_optional( self ):
+ history_id = self.dataset_populator.new_history()
+ inputs = {
+ "select_ex": ["--ex1"],
+ "select_optional": None,
+ }
+ response = self._run( "multi_select", history_id, inputs, assert_ok=True )
+ output = response[ "outputs" ]
+ output1_content = self.dataset_populator.get_history_dataset_content( history_id, dataset=output[ 0 ] )
+ output2_content = self.dataset_populator.get_history_dataset_content( history_id, dataset=output[ 1 ] )
+ assert output1_content.strip() == "--ex1"
+ assert output2_content.strip() == "None", output2_content
+
@skip_without_tool( "multi_data_param" )
def test_multidata_param( self ):
history_id = self.dataset_populator.new_history()
diff -r c5d6eadac9c3d6784361b93ef81c87307b5a4f0f -r 66d38fa8edcbd9926f4eca9b875e2fe561d2d850 test/functional/tools/multi_select.xml
--- a/test/functional/tools/multi_select.xml
+++ b/test/functional/tools/multi_select.xml
@@ -3,7 +3,7 @@
<configfiles><configfile name="config">${select_ex}</configfile></configfiles>
- <command>cat $config > $output</command>
+ <command>cat $config > $output; echo '$select_optional' > $output2</command><inputs><param name="select_ex" type="select" display="checkboxes" multiple="true"><option value="--ex1">Ex1</option>
@@ -12,9 +12,17 @@
<option value="--ex4">Ex4</option><option value="ex5">Ex5</option></param>
+ <param name="select_optional" type="select" optional="true">
+ <option value="--ex1">Ex1</option>
+ <option value="ex2">Ex2</option>
+ <option value="--ex3">Ex3</option>
+ <option value="--ex4">Ex4</option>
+ <option value="ex5">Ex5</option>
+ </param></inputs><outputs><data format="txt" name="output" />
+ <data format="txt" name="output2" /></outputs><tests><test>
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: Update error message again
by commits-noreply@bitbucket.org 04 Dec '14
by commits-noreply@bitbucket.org 04 Dec '14
04 Dec '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/c5d6eadac9c3/
Changeset: c5d6eadac9c3
User: guerler
Date: 2014-12-04 17:01:34+00:00
Summary: ToolForm: Update error message again
Affected #: 3 files
diff -r e4447035cdc08adba1d75363f694c5988716c554 -r c5d6eadac9c3d6784361b93ef81c87307b5a4f0f 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
@@ -314,7 +314,7 @@
// data column
case 'data_column':
- input_def.error_text = 'Referenced dataset has no matching columns.';
+ input_def.error_text = 'Missing columns in referenced dataset.';
field = this._fieldSelect(input_def);
break;
diff -r e4447035cdc08adba1d75363f694c5988716c554 -r c5d6eadac9c3d6784361b93ef81c87307b5a4f0f static/scripts/mvc/tools/tools-section.js
--- a/static/scripts/mvc/tools/tools-section.js
+++ b/static/scripts/mvc/tools/tools-section.js
@@ -314,7 +314,7 @@
// data column
case 'data_column':
- input_def.error_text = 'Referenced dataset has no matching columns.';
+ input_def.error_text = 'Missing columns in referenced dataset.';
field = this._fieldSelect(input_def);
break;
diff -r e4447035cdc08adba1d75363f694c5988716c554 -r c5d6eadac9c3d6784361b93ef81c87307b5a4f0f 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/tools/tools-repeat","mvc/tools/tools-select-content","mvc/tools/tools-input"],function(d,b,g,c,a,e){var f=Backbone.View.extend({initialize:function(i,h){this.app=i;this.inputs=h.inputs;h.cls_tr="section-row";this.table=new b.View(h);this.setElement(this.table.$el);this.render()},render:function(){this.table.delAll();for(var h in this.inputs){this._add(this.inputs[h])}},_add:function(j){var i=this;var h=jQuery.extend(true,{},j);h.id=j.id=d.uuid();this.app.input_list[h.id]=h;var k=h.type;switch(k){case"conditional":this._addConditional(h);break;case"repeat":this._addRepeat(h);break;default:this._addRow(h)}},_addConditional:function(h){var j=this;h.test_param.id=h.id;var m=this._addRow(h.test_param);m.options.onchange=function(t){var p=j.app.tree.matchCase(h,t);for(var r in h.cases){var w=h.cases[r];var u=h.id+"-section-"+r;var o=j.table.get(u);var v=false;for(var q in w.inputs){var s=w.inputs[q].type;if(s&&s!=="hidden"){v=true;break}}if(r==p&&v){o.fadeIn("fast")}else{o.hide()}}j.app.refresh()};for(var l in h.cases){var k=h.id+"-section-"+l;var n=new f(this.app,{inputs:h.cases[l].inputs,cls:"ui-table-plain"});n.$el.addClass("ui-table-form-section");this.table.add(n.$el);this.table.append(k)}m.trigger("change")},_addRepeat:function(o){var r=this;var p=0;function m(i,t){var s=o.id+"-section-"+(p++);var u=null;if(t){u=function(){k.del(s);k.retitle(o.title);r.app.rebuild();r.app.refresh()}}var v=new f(r.app,{inputs:i,cls:"ui-table-plain"});k.add({id:s,title:o.title,$el:v.$el,ondel:u});k.retitle(o.title)}var k=new c.View({title_new:o.title,max:o.max,onnew:function(){m(o.inputs,true);r.app.rebuild();r.app.refresh()}});var h=o.min;var q=_.size(o.cache);for(var l=0;l<Math.max(q,h);l++){var n=null;if(l<q){n=o.cache[l]}else{n=o.inputs}m(n,l>=h)}var j=new e(this.app,{label:o.title,help:o.help,field:k});j.$el.addClass("ui-table-form-section");this.table.add(j.$el);this.table.append(o.id)},_addRow:function(h){var k=h.id;var i=this._createField(h);if(h.is_dynamic){this.app.is_dynamic=true}this.app.field_list[k]=i;var j=new e(this.app,{label:h.label,optional:h.optional,help:h.help,field:i});this.app.element_list[k]=j;this.table.add(j.$el);this.table.append(k);return i},_createField:function(h){var i=null;switch(h.type){case"text":i=this._fieldText(h);break;case"select":i=this._fieldSelect(h);break;case"data":i=this._fieldData(h);break;case"data_column":h.error_text="Referenced dataset has no matching columns.";i=this._fieldSelect(h);break;case"hidden":i=this._fieldHidden(h);break;case"integer":i=this._fieldSlider(h);break;case"float":i=this._fieldSlider(h);break;case"boolean":i=this._fieldBoolean(h);break;case"genomebuild":h.searchable=true;i=this._fieldSelect(h);break;case"drill_down":i=this._fieldDrilldown(h);break;case"baseurl":i=this._fieldHidden(h);break;default:this.app.incompatible=true;if(h.options){i=this._fieldSelect(h)}else{i=this._fieldText(h)}console.debug("tools-form::_addRow() : Auto matched field type ("+h.type+").")}if(h.value!==undefined){i.value(h.value)}return i},_fieldData:function(h){var i=this;return new a.View(this.app,{id:"field-"+h.id,extensions:h.extensions,multiple:h.multiple,type:h.type,data:h.options,onchange:function(){i.app.refresh()}})},_fieldSelect:function(h){var k=[];for(var l in h.options){var m=h.options[l];k.push({label:m[0],value:m[1]})}var n=g.Select;switch(h.display){case"checkboxes":n=g.Checkbox;break;case"radio":n=g.Radio;break}var j=this;return new n.View({id:"field-"+h.id,data:k,error_text:h.error_text||"No options available",multiple:h.multiple,searchable:h.searchable,onchange:function(){j.app.refresh()}})},_fieldDrilldown:function(h){var i=this;return new g.Drilldown.View({id:"field-"+h.id,data:h.options,display:h.display,onchange:function(){i.app.refresh()}})},_fieldText:function(h){var i=this;return new g.Input({id:"field-"+h.id,area:h.area,onchange:function(){i.app.refresh()}})},_fieldSlider:function(h){return new g.Slider.View({id:"field-"+h.id,precise:h.type=="float",min:h.min,max:h.max})},_fieldHidden:function(h){return new g.Hidden({id:"field-"+h.id})},_fieldBoolean:function(h){return new g.RadioButton.View({id:"field-"+h.id,data:[{label:"Yes",value:"true"},{label:"No",value:"false"}]})}});return{View:f}});
\ No newline at end of file
+define(["utils/utils","mvc/ui/ui-table","mvc/ui/ui-misc","mvc/tools/tools-repeat","mvc/tools/tools-select-content","mvc/tools/tools-input"],function(d,b,g,c,a,e){var f=Backbone.View.extend({initialize:function(i,h){this.app=i;this.inputs=h.inputs;h.cls_tr="section-row";this.table=new b.View(h);this.setElement(this.table.$el);this.render()},render:function(){this.table.delAll();for(var h in this.inputs){this._add(this.inputs[h])}},_add:function(j){var i=this;var h=jQuery.extend(true,{},j);h.id=j.id=d.uuid();this.app.input_list[h.id]=h;var k=h.type;switch(k){case"conditional":this._addConditional(h);break;case"repeat":this._addRepeat(h);break;default:this._addRow(h)}},_addConditional:function(h){var j=this;h.test_param.id=h.id;var m=this._addRow(h.test_param);m.options.onchange=function(t){var p=j.app.tree.matchCase(h,t);for(var r in h.cases){var w=h.cases[r];var u=h.id+"-section-"+r;var o=j.table.get(u);var v=false;for(var q in w.inputs){var s=w.inputs[q].type;if(s&&s!=="hidden"){v=true;break}}if(r==p&&v){o.fadeIn("fast")}else{o.hide()}}j.app.refresh()};for(var l in h.cases){var k=h.id+"-section-"+l;var n=new f(this.app,{inputs:h.cases[l].inputs,cls:"ui-table-plain"});n.$el.addClass("ui-table-form-section");this.table.add(n.$el);this.table.append(k)}m.trigger("change")},_addRepeat:function(o){var r=this;var p=0;function m(i,t){var s=o.id+"-section-"+(p++);var u=null;if(t){u=function(){k.del(s);k.retitle(o.title);r.app.rebuild();r.app.refresh()}}var v=new f(r.app,{inputs:i,cls:"ui-table-plain"});k.add({id:s,title:o.title,$el:v.$el,ondel:u});k.retitle(o.title)}var k=new c.View({title_new:o.title,max:o.max,onnew:function(){m(o.inputs,true);r.app.rebuild();r.app.refresh()}});var h=o.min;var q=_.size(o.cache);for(var l=0;l<Math.max(q,h);l++){var n=null;if(l<q){n=o.cache[l]}else{n=o.inputs}m(n,l>=h)}var j=new e(this.app,{label:o.title,help:o.help,field:k});j.$el.addClass("ui-table-form-section");this.table.add(j.$el);this.table.append(o.id)},_addRow:function(h){var k=h.id;var i=this._createField(h);if(h.is_dynamic){this.app.is_dynamic=true}this.app.field_list[k]=i;var j=new e(this.app,{label:h.label,optional:h.optional,help:h.help,field:i});this.app.element_list[k]=j;this.table.add(j.$el);this.table.append(k);return i},_createField:function(h){var i=null;switch(h.type){case"text":i=this._fieldText(h);break;case"select":i=this._fieldSelect(h);break;case"data":i=this._fieldData(h);break;case"data_column":h.error_text="Missing columns in referenced dataset.";i=this._fieldSelect(h);break;case"hidden":i=this._fieldHidden(h);break;case"integer":i=this._fieldSlider(h);break;case"float":i=this._fieldSlider(h);break;case"boolean":i=this._fieldBoolean(h);break;case"genomebuild":h.searchable=true;i=this._fieldSelect(h);break;case"drill_down":i=this._fieldDrilldown(h);break;case"baseurl":i=this._fieldHidden(h);break;default:this.app.incompatible=true;if(h.options){i=this._fieldSelect(h)}else{i=this._fieldText(h)}console.debug("tools-form::_addRow() : Auto matched field type ("+h.type+").")}if(h.value!==undefined){i.value(h.value)}return i},_fieldData:function(h){var i=this;return new a.View(this.app,{id:"field-"+h.id,extensions:h.extensions,multiple:h.multiple,type:h.type,data:h.options,onchange:function(){i.app.refresh()}})},_fieldSelect:function(h){var k=[];for(var l in h.options){var m=h.options[l];k.push({label:m[0],value:m[1]})}var n=g.Select;switch(h.display){case"checkboxes":n=g.Checkbox;break;case"radio":n=g.Radio;break}var j=this;return new n.View({id:"field-"+h.id,data:k,error_text:h.error_text||"No options available",multiple:h.multiple,searchable:h.searchable,onchange:function(){j.app.refresh()}})},_fieldDrilldown:function(h){var i=this;return new g.Drilldown.View({id:"field-"+h.id,data:h.options,display:h.display,onchange:function(){i.app.refresh()}})},_fieldText:function(h){var i=this;return new g.Input({id:"field-"+h.id,area:h.area,onchange:function(){i.app.refresh()}})},_fieldSlider:function(h){return new g.Slider.View({id:"field-"+h.id,precise:h.type=="float",min:h.min,max:h.max})},_fieldHidden:function(h){return new g.Hidden({id:"field-"+h.id})},_fieldBoolean:function(h){return new g.RadioButton.View({id:"field-"+h.id,data:[{label:"Yes",value:"true"},{label:"No",value:"false"}]})}});return{View:f}});
\ No newline at end of file
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: Update error message for missing columns
by commits-noreply@bitbucket.org 04 Dec '14
by commits-noreply@bitbucket.org 04 Dec '14
04 Dec '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/e4447035cdc0/
Changeset: e4447035cdc0
User: guerler
Date: 2014-12-04 16:59:21+00:00
Summary: ToolForm: Update error message for missing columns
Affected #: 3 files
diff -r 6b526d404d1e48f7a9a771624a259dd8a503ea39 -r e4447035cdc08adba1d75363f694c5988716c554 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
@@ -314,7 +314,7 @@
// data column
case 'data_column':
- input_def.error_text = 'Referenced dataset contains no suitable columns';
+ input_def.error_text = 'Referenced dataset has no matching columns.';
field = this._fieldSelect(input_def);
break;
diff -r 6b526d404d1e48f7a9a771624a259dd8a503ea39 -r e4447035cdc08adba1d75363f694c5988716c554 static/scripts/mvc/tools/tools-section.js
--- a/static/scripts/mvc/tools/tools-section.js
+++ b/static/scripts/mvc/tools/tools-section.js
@@ -314,7 +314,7 @@
// data column
case 'data_column':
- input_def.error_text = 'Referenced dataset contains no suitable columns';
+ input_def.error_text = 'Referenced dataset has no matching columns.';
field = this._fieldSelect(input_def);
break;
diff -r 6b526d404d1e48f7a9a771624a259dd8a503ea39 -r e4447035cdc08adba1d75363f694c5988716c554 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/tools/tools-repeat","mvc/tools/tools-select-content","mvc/tools/tools-input"],function(d,b,g,c,a,e){var f=Backbone.View.extend({initialize:function(i,h){this.app=i;this.inputs=h.inputs;h.cls_tr="section-row";this.table=new b.View(h);this.setElement(this.table.$el);this.render()},render:function(){this.table.delAll();for(var h in this.inputs){this._add(this.inputs[h])}},_add:function(j){var i=this;var h=jQuery.extend(true,{},j);h.id=j.id=d.uuid();this.app.input_list[h.id]=h;var k=h.type;switch(k){case"conditional":this._addConditional(h);break;case"repeat":this._addRepeat(h);break;default:this._addRow(h)}},_addConditional:function(h){var j=this;h.test_param.id=h.id;var m=this._addRow(h.test_param);m.options.onchange=function(t){var p=j.app.tree.matchCase(h,t);for(var r in h.cases){var w=h.cases[r];var u=h.id+"-section-"+r;var o=j.table.get(u);var v=false;for(var q in w.inputs){var s=w.inputs[q].type;if(s&&s!=="hidden"){v=true;break}}if(r==p&&v){o.fadeIn("fast")}else{o.hide()}}j.app.refresh()};for(var l in h.cases){var k=h.id+"-section-"+l;var n=new f(this.app,{inputs:h.cases[l].inputs,cls:"ui-table-plain"});n.$el.addClass("ui-table-form-section");this.table.add(n.$el);this.table.append(k)}m.trigger("change")},_addRepeat:function(o){var r=this;var p=0;function m(i,t){var s=o.id+"-section-"+(p++);var u=null;if(t){u=function(){k.del(s);k.retitle(o.title);r.app.rebuild();r.app.refresh()}}var v=new f(r.app,{inputs:i,cls:"ui-table-plain"});k.add({id:s,title:o.title,$el:v.$el,ondel:u});k.retitle(o.title)}var k=new c.View({title_new:o.title,max:o.max,onnew:function(){m(o.inputs,true);r.app.rebuild();r.app.refresh()}});var h=o.min;var q=_.size(o.cache);for(var l=0;l<Math.max(q,h);l++){var n=null;if(l<q){n=o.cache[l]}else{n=o.inputs}m(n,l>=h)}var j=new e(this.app,{label:o.title,help:o.help,field:k});j.$el.addClass("ui-table-form-section");this.table.add(j.$el);this.table.append(o.id)},_addRow:function(h){var k=h.id;var i=this._createField(h);if(h.is_dynamic){this.app.is_dynamic=true}this.app.field_list[k]=i;var j=new e(this.app,{label:h.label,optional:h.optional,help:h.help,field:i});this.app.element_list[k]=j;this.table.add(j.$el);this.table.append(k);return i},_createField:function(h){var i=null;switch(h.type){case"text":i=this._fieldText(h);break;case"select":i=this._fieldSelect(h);break;case"data":i=this._fieldData(h);break;case"data_column":h.error_text="Referenced dataset contains no suitable columns";i=this._fieldSelect(h);break;case"hidden":i=this._fieldHidden(h);break;case"integer":i=this._fieldSlider(h);break;case"float":i=this._fieldSlider(h);break;case"boolean":i=this._fieldBoolean(h);break;case"genomebuild":h.searchable=true;i=this._fieldSelect(h);break;case"drill_down":i=this._fieldDrilldown(h);break;case"baseurl":i=this._fieldHidden(h);break;default:this.app.incompatible=true;if(h.options){i=this._fieldSelect(h)}else{i=this._fieldText(h)}console.debug("tools-form::_addRow() : Auto matched field type ("+h.type+").")}if(h.value!==undefined){i.value(h.value)}return i},_fieldData:function(h){var i=this;return new a.View(this.app,{id:"field-"+h.id,extensions:h.extensions,multiple:h.multiple,type:h.type,data:h.options,onchange:function(){i.app.refresh()}})},_fieldSelect:function(h){var k=[];for(var l in h.options){var m=h.options[l];k.push({label:m[0],value:m[1]})}var n=g.Select;switch(h.display){case"checkboxes":n=g.Checkbox;break;case"radio":n=g.Radio;break}var j=this;return new n.View({id:"field-"+h.id,data:k,error_text:h.error_text||"No options available",multiple:h.multiple,searchable:h.searchable,onchange:function(){j.app.refresh()}})},_fieldDrilldown:function(h){var i=this;return new g.Drilldown.View({id:"field-"+h.id,data:h.options,display:h.display,onchange:function(){i.app.refresh()}})},_fieldText:function(h){var i=this;return new g.Input({id:"field-"+h.id,area:h.area,onchange:function(){i.app.refresh()}})},_fieldSlider:function(h){return new g.Slider.View({id:"field-"+h.id,precise:h.type=="float",min:h.min,max:h.max})},_fieldHidden:function(h){return new g.Hidden({id:"field-"+h.id})},_fieldBoolean:function(h){return new g.RadioButton.View({id:"field-"+h.id,data:[{label:"Yes",value:"true"},{label:"No",value:"false"}]})}});return{View:f}});
\ No newline at end of file
+define(["utils/utils","mvc/ui/ui-table","mvc/ui/ui-misc","mvc/tools/tools-repeat","mvc/tools/tools-select-content","mvc/tools/tools-input"],function(d,b,g,c,a,e){var f=Backbone.View.extend({initialize:function(i,h){this.app=i;this.inputs=h.inputs;h.cls_tr="section-row";this.table=new b.View(h);this.setElement(this.table.$el);this.render()},render:function(){this.table.delAll();for(var h in this.inputs){this._add(this.inputs[h])}},_add:function(j){var i=this;var h=jQuery.extend(true,{},j);h.id=j.id=d.uuid();this.app.input_list[h.id]=h;var k=h.type;switch(k){case"conditional":this._addConditional(h);break;case"repeat":this._addRepeat(h);break;default:this._addRow(h)}},_addConditional:function(h){var j=this;h.test_param.id=h.id;var m=this._addRow(h.test_param);m.options.onchange=function(t){var p=j.app.tree.matchCase(h,t);for(var r in h.cases){var w=h.cases[r];var u=h.id+"-section-"+r;var o=j.table.get(u);var v=false;for(var q in w.inputs){var s=w.inputs[q].type;if(s&&s!=="hidden"){v=true;break}}if(r==p&&v){o.fadeIn("fast")}else{o.hide()}}j.app.refresh()};for(var l in h.cases){var k=h.id+"-section-"+l;var n=new f(this.app,{inputs:h.cases[l].inputs,cls:"ui-table-plain"});n.$el.addClass("ui-table-form-section");this.table.add(n.$el);this.table.append(k)}m.trigger("change")},_addRepeat:function(o){var r=this;var p=0;function m(i,t){var s=o.id+"-section-"+(p++);var u=null;if(t){u=function(){k.del(s);k.retitle(o.title);r.app.rebuild();r.app.refresh()}}var v=new f(r.app,{inputs:i,cls:"ui-table-plain"});k.add({id:s,title:o.title,$el:v.$el,ondel:u});k.retitle(o.title)}var k=new c.View({title_new:o.title,max:o.max,onnew:function(){m(o.inputs,true);r.app.rebuild();r.app.refresh()}});var h=o.min;var q=_.size(o.cache);for(var l=0;l<Math.max(q,h);l++){var n=null;if(l<q){n=o.cache[l]}else{n=o.inputs}m(n,l>=h)}var j=new e(this.app,{label:o.title,help:o.help,field:k});j.$el.addClass("ui-table-form-section");this.table.add(j.$el);this.table.append(o.id)},_addRow:function(h){var k=h.id;var i=this._createField(h);if(h.is_dynamic){this.app.is_dynamic=true}this.app.field_list[k]=i;var j=new e(this.app,{label:h.label,optional:h.optional,help:h.help,field:i});this.app.element_list[k]=j;this.table.add(j.$el);this.table.append(k);return i},_createField:function(h){var i=null;switch(h.type){case"text":i=this._fieldText(h);break;case"select":i=this._fieldSelect(h);break;case"data":i=this._fieldData(h);break;case"data_column":h.error_text="Referenced dataset has no matching columns.";i=this._fieldSelect(h);break;case"hidden":i=this._fieldHidden(h);break;case"integer":i=this._fieldSlider(h);break;case"float":i=this._fieldSlider(h);break;case"boolean":i=this._fieldBoolean(h);break;case"genomebuild":h.searchable=true;i=this._fieldSelect(h);break;case"drill_down":i=this._fieldDrilldown(h);break;case"baseurl":i=this._fieldHidden(h);break;default:this.app.incompatible=true;if(h.options){i=this._fieldSelect(h)}else{i=this._fieldText(h)}console.debug("tools-form::_addRow() : Auto matched field type ("+h.type+").")}if(h.value!==undefined){i.value(h.value)}return i},_fieldData:function(h){var i=this;return new a.View(this.app,{id:"field-"+h.id,extensions:h.extensions,multiple:h.multiple,type:h.type,data:h.options,onchange:function(){i.app.refresh()}})},_fieldSelect:function(h){var k=[];for(var l in h.options){var m=h.options[l];k.push({label:m[0],value:m[1]})}var n=g.Select;switch(h.display){case"checkboxes":n=g.Checkbox;break;case"radio":n=g.Radio;break}var j=this;return new n.View({id:"field-"+h.id,data:k,error_text:h.error_text||"No options available",multiple:h.multiple,searchable:h.searchable,onchange:function(){j.app.refresh()}})},_fieldDrilldown:function(h){var i=this;return new g.Drilldown.View({id:"field-"+h.id,data:h.options,display:h.display,onchange:function(){i.app.refresh()}})},_fieldText:function(h){var i=this;return new g.Input({id:"field-"+h.id,area:h.area,onchange:function(){i.app.refresh()}})},_fieldSlider:function(h){return new g.Slider.View({id:"field-"+h.id,precise:h.type=="float",min:h.min,max:h.max})},_fieldHidden:function(h){return new g.Hidden({id:"field-"+h.id})},_fieldBoolean:function(h){return new g.RadioButton.View({id:"field-"+h.id,data:[{label:"Yes",value:"true"},{label:"No",value:"false"}]})}});return{View:f}});
\ No newline at end of file
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: Update error message
by commits-noreply@bitbucket.org 04 Dec '14
by commits-noreply@bitbucket.org 04 Dec '14
04 Dec '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/6b526d404d1e/
Changeset: 6b526d404d1e
User: guerler
Date: 2014-12-04 16:53:22+00:00
Summary: ToolForm: Update error message
Affected #: 3 files
diff -r 6b397d3623e9de8f375f4ce52f501548530a4ef9 -r 6b526d404d1e48f7a9a771624a259dd8a503ea39 client/galaxy/scripts/mvc/tools/tools-select-content.js
--- a/client/galaxy/scripts/mvc/tools/tools-select-content.js
+++ b/client/galaxy/scripts/mvc/tools/tools-select-content.js
@@ -41,16 +41,16 @@
extensions = extensions.replace(',', ', ');
var pos = extensions.lastIndexOf(', ');
if (pos != -1) {
- extensions = extensions.substr(0, pos) + " or " + extensions.substr(pos+1);
+ extensions = extensions.substr(0, pos) + ' or ' + extensions.substr(pos+1);
}
}
- var hda_error = 'No dataset available';
+ var hda_error = 'No dataset available.';
if (extensions) {
- hda_error = 'No dataset of type ' + extensions + ' available.';
+ hda_error = 'No ' + extensions + ' dataset available.';
}
- var hdca_error = 'No dataset list available';
+ var hdca_error = 'No dataset list available.';
if (extensions) {
- hdca_error = 'No dataset list of type ' + extensions + ' available.';
+ hdca_error = 'No ' + extensions + ' dataset list available.';
}
// add single dataset selector
diff -r 6b397d3623e9de8f375f4ce52f501548530a4ef9 -r 6b526d404d1e48f7a9a771624a259dd8a503ea39 static/scripts/mvc/tools/tools-select-content.js
--- a/static/scripts/mvc/tools/tools-select-content.js
+++ b/static/scripts/mvc/tools/tools-select-content.js
@@ -41,16 +41,16 @@
extensions = extensions.replace(',', ', ');
var pos = extensions.lastIndexOf(', ');
if (pos != -1) {
- extensions = extensions.substr(0, pos) + " or " + extensions.substr(pos+1);
+ extensions = extensions.substr(0, pos) + ' or ' + extensions.substr(pos+1);
}
}
- var hda_error = 'No dataset available';
+ var hda_error = 'No dataset available.';
if (extensions) {
- hda_error = 'No dataset of type ' + extensions + ' available.';
+ hda_error = 'No ' + extensions + ' dataset available.';
}
- var hdca_error = 'No dataset list available';
+ var hdca_error = 'No dataset list available.';
if (extensions) {
- hdca_error = 'No dataset list of type ' + extensions + ' available.';
+ hdca_error = 'No ' + extensions + ' dataset list available.';
}
// add single dataset selector
diff -r 6b397d3623e9de8f375f4ce52f501548530a4ef9 -r 6b526d404d1e48f7a9a771624a259dd8a503ea39 static/scripts/packed/mvc/tools/tools-select-content.js
--- a/static/scripts/packed/mvc/tools/tools-select-content.js
+++ b/static/scripts/packed/mvc/tools/tools-select-content.js
@@ -1,1 +1,1 @@
-define(["utils/utils","mvc/ui/ui-misc","mvc/ui/ui-tabs","mvc/tools/tools-template"],function(c,e,b,a){var d=Backbone.View.extend({initialize:function(f,o){this.app=f;this.options=o;var n=this;this.setElement("<div/>");this.list={};var m=[];if(o.type=="data_collection"){this.mode="collection"}else{if(o.multiple){this.mode="multiple"}else{this.mode="single"}}this.current=this.mode;this.list={};var j=o.extensions.toString();if(j){j=j.replace(",",", ");var k=j.lastIndexOf(", ");if(k!=-1){j=j.substr(0,k)+" or "+j.substr(k+1)}}var h="No dataset available";if(j){h="No dataset of type "+j+" available."}var l="No dataset list available";if(j){l="No dataset list of type "+j+" available."}if(this.mode=="single"){m.push({icon:"fa-file-o",label:"Single dataset",value:"single"});this.select_single=new e.Select.View({error_text:h,onchange:function(){n.trigger("change")}});this.list.single={field:this.select_single,type:"hda"}}if(this.mode=="single"||this.mode=="multiple"){m.push({icon:"fa-files-o",label:"Multiple datasets",value:"multiple"});this.select_multiple=new e.Select.View({multiple:true,error_text:h,onchange:function(){n.trigger("change")}});this.list.multiple={field:this.select_multiple,type:"hda"}}if(this.mode=="single"||this.mode=="collection"){m.push({icon:"fa-folder-o",label:"List of datasets",value:"collection"});this.select_collection=new e.Select.View({error_text:l,onchange:function(){n.trigger("change")}});this.list.collection={field:this.select_collection,type:"hdca"}}this.button_type=new e.RadioButton.View({value:this.current,data:m,onchange:function(i){n.current=i;n.refresh();n.trigger("change")}});this.$batch=$(a.batchMode());if(_.size(this.list)>1){this.$el.append(c.wrap(this.button_type.$el))}for(var g in this.list){this.$el.append(this.list[g].field.$el)}this.$el.append(this.$batch);this.update(o.data);if(this.options.value!==undefined){this.value(this.options.value)}this.refresh();this.on("change",function(){if(o.onchange){o.onchange(n.value())}})},wait:function(){for(var f in this.list){this.list[f].field.wait()}},unwait:function(){for(var f in this.list){this.list[f].field.unwait()}},update:function(g){var l=[];for(var j in g.hda){var k=g.hda[j];l.push({label:k.hid+": "+k.name,value:k.id})}var f=[];for(var j in g.hdca){var h=g.hdca[j];f.push({label:h.hid+": "+h.name,value:h.id})}this.select_single&&this.select_single.update(l);this.select_multiple&&this.select_multiple.update(l);this.select_collection&&this.select_collection.update(f);this.app.content.add(g)},value:function(m){if(m&&m.values){try{var l=[];for(var h in m.values){l.push(m.values[h].id)}if(m&&m.values.length>0&&m.values[0].src=="hcda"){this.current="collection";this.select_collection.value(l[0])}else{if(this.mode=="multiple"){this.current="multiple";this.select_multiple.value(l)}else{this.current="single";this.select_single.value(l[0])}}this.refresh();var g=this._select();if(!g.validate()){g.value(g.first())}}catch(k){console.debug("tools-select-content::value() - Skipped.")}}var j=this._select().value();if(!(j instanceof Array)){j=[j]}var f={batch:this.mode=="single"&&this.current!="single",values:[]};for(var h in j){f.values.push({id:j[h],src:this.list[this.current].type})}return f},validate:function(){return this._select().validate()},refresh:function(){for(var g in this.list){var f=this.list[g].field.$el;if(this.current==g){f.show()}else{f.hide()}}if(this.mode=="single"&&this.current!="single"){this.$batch.show()}else{this.$batch.hide()}},_select:function(){return this.list[this.current].field}});return{View:d}});
\ No newline at end of file
+define(["utils/utils","mvc/ui/ui-misc","mvc/ui/ui-tabs","mvc/tools/tools-template"],function(c,e,b,a){var d=Backbone.View.extend({initialize:function(f,o){this.app=f;this.options=o;var n=this;this.setElement("<div/>");this.list={};var m=[];if(o.type=="data_collection"){this.mode="collection"}else{if(o.multiple){this.mode="multiple"}else{this.mode="single"}}this.current=this.mode;this.list={};var j=o.extensions.toString();if(j){j=j.replace(",",", ");var k=j.lastIndexOf(", ");if(k!=-1){j=j.substr(0,k)+" or "+j.substr(k+1)}}var h="No dataset available.";if(j){h="No "+j+" dataset available."}var l="No dataset list available.";if(j){l="No "+j+" dataset list available."}if(this.mode=="single"){m.push({icon:"fa-file-o",label:"Single dataset",value:"single"});this.select_single=new e.Select.View({error_text:h,onchange:function(){n.trigger("change")}});this.list.single={field:this.select_single,type:"hda"}}if(this.mode=="single"||this.mode=="multiple"){m.push({icon:"fa-files-o",label:"Multiple datasets",value:"multiple"});this.select_multiple=new e.Select.View({multiple:true,error_text:h,onchange:function(){n.trigger("change")}});this.list.multiple={field:this.select_multiple,type:"hda"}}if(this.mode=="single"||this.mode=="collection"){m.push({icon:"fa-folder-o",label:"List of datasets",value:"collection"});this.select_collection=new e.Select.View({error_text:l,onchange:function(){n.trigger("change")}});this.list.collection={field:this.select_collection,type:"hdca"}}this.button_type=new e.RadioButton.View({value:this.current,data:m,onchange:function(i){n.current=i;n.refresh();n.trigger("change")}});this.$batch=$(a.batchMode());if(_.size(this.list)>1){this.$el.append(c.wrap(this.button_type.$el))}for(var g in this.list){this.$el.append(this.list[g].field.$el)}this.$el.append(this.$batch);this.update(o.data);if(this.options.value!==undefined){this.value(this.options.value)}this.refresh();this.on("change",function(){if(o.onchange){o.onchange(n.value())}})},wait:function(){for(var f in this.list){this.list[f].field.wait()}},unwait:function(){for(var f in this.list){this.list[f].field.unwait()}},update:function(g){var l=[];for(var j in g.hda){var k=g.hda[j];l.push({label:k.hid+": "+k.name,value:k.id})}var f=[];for(var j in g.hdca){var h=g.hdca[j];f.push({label:h.hid+": "+h.name,value:h.id})}this.select_single&&this.select_single.update(l);this.select_multiple&&this.select_multiple.update(l);this.select_collection&&this.select_collection.update(f);this.app.content.add(g)},value:function(m){if(m&&m.values){try{var l=[];for(var h in m.values){l.push(m.values[h].id)}if(m&&m.values.length>0&&m.values[0].src=="hcda"){this.current="collection";this.select_collection.value(l[0])}else{if(this.mode=="multiple"){this.current="multiple";this.select_multiple.value(l)}else{this.current="single";this.select_single.value(l[0])}}this.refresh();var g=this._select();if(!g.validate()){g.value(g.first())}}catch(k){console.debug("tools-select-content::value() - Skipped.")}}var j=this._select().value();if(!(j instanceof Array)){j=[j]}var f={batch:this.mode=="single"&&this.current!="single",values:[]};for(var h in j){f.values.push({id:j[h],src:this.list[this.current].type})}return f},validate:function(){return this._select().validate()},refresh:function(){for(var g in this.list){var f=this.list[g].field.$el;if(this.current==g){f.show()}else{f.hide()}}if(this.mode=="single"&&this.current!="single"){this.$batch.show()}else{this.$batch.hide()}},_select:function(){return this.list[this.current].field}});return{View:d}});
\ No newline at end of file
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: Add dataset types to error message
by commits-noreply@bitbucket.org 04 Dec '14
by commits-noreply@bitbucket.org 04 Dec '14
04 Dec '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/6b397d3623e9/
Changeset: 6b397d3623e9
User: guerler
Date: 2014-12-04 16:45:18+00:00
Summary: ToolForm: Add dataset types to error message
Affected #: 15 files
diff -r b8dea58ea20ef71e4b30beae636042ffc44d348e -r 6b397d3623e9de8f375f4ce52f501548530a4ef9 client/galaxy/scripts/mvc/tools/tools-form.js
--- a/client/galaxy/scripts/mvc/tools/tools-form.js
+++ b/client/galaxy/scripts/mvc/tools/tools-form.js
@@ -340,7 +340,7 @@
buttons: {
execute : new Ui.Button({
icon : 'fa-check',
- tooltip : 'Execute the tool',
+ tooltip : 'Execute: ' + self.model.name,
title : 'Execute',
cls : 'btn btn-primary',
floating : 'clear',
diff -r b8dea58ea20ef71e4b30beae636042ffc44d348e -r 6b397d3623e9de8f375f4ce52f501548530a4ef9 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
@@ -314,6 +314,7 @@
// data column
case 'data_column':
+ input_def.error_text = 'Referenced dataset contains no suitable columns';
field = this._fieldSelect(input_def);
break;
@@ -425,6 +426,7 @@
return new SelectClass.View({
id : 'field-' + input_def.id,
data : options,
+ error_text : input_def.error_text || 'No options available',
multiple : input_def.multiple,
searchable : input_def.searchable,
onchange : function() {
diff -r b8dea58ea20ef71e4b30beae636042ffc44d348e -r 6b397d3623e9de8f375f4ce52f501548530a4ef9 client/galaxy/scripts/mvc/tools/tools-select-content.js
--- a/client/galaxy/scripts/mvc/tools/tools-select-content.js
+++ b/client/galaxy/scripts/mvc/tools/tools-select-content.js
@@ -35,10 +35,29 @@
this.current = this.mode;
this.list = {};
+ // error messages
+ var extensions = options.extensions.toString();
+ if (extensions) {
+ extensions = extensions.replace(',', ', ');
+ var pos = extensions.lastIndexOf(', ');
+ if (pos != -1) {
+ extensions = extensions.substr(0, pos) + " or " + extensions.substr(pos+1);
+ }
+ }
+ var hda_error = 'No dataset available';
+ if (extensions) {
+ hda_error = 'No dataset of type ' + extensions + ' available.';
+ }
+ var hdca_error = 'No dataset list available';
+ if (extensions) {
+ hdca_error = 'No dataset list of type ' + extensions + ' available.';
+ }
+
// add single dataset selector
if (this.mode == 'single') {
radio_buttons.push({icon: 'fa-file-o', label : 'Single dataset', value : 'single'});
this.select_single = new Ui.Select.View({
+ error_text : hda_error,
onchange : function() {
self.trigger('change');
}
@@ -54,6 +73,7 @@
radio_buttons.push({icon: 'fa-files-o', label : 'Multiple datasets', value : 'multiple' });
this.select_multiple = new Ui.Select.View({
multiple : true,
+ error_text : hda_error,
onchange : function() {
self.trigger('change');
}
@@ -68,6 +88,7 @@
if (this.mode == 'single' || this.mode == 'collection') {
radio_buttons.push({icon: 'fa-folder-o', label : 'List of datasets', value : 'collection' });
this.select_collection = new Ui.Select.View({
+ error_text : hdca_error,
onchange : function() {
self.trigger('change');
}
diff -r b8dea58ea20ef71e4b30beae636042ffc44d348e -r 6b397d3623e9de8f375f4ce52f501548530a4ef9 client/galaxy/scripts/mvc/ui/ui-options.js
--- a/client/galaxy/scripts/mvc/ui/ui-options.js
+++ b/client/galaxy/scripts/mvc/ui/ui-options.js
@@ -10,8 +10,8 @@
visible : true,
data : [],
id : Utils.uuid(),
- errorText : 'No data available.',
- waitText : 'Please wait...'
+ error_text : 'No data available.',
+ wait_text : 'Please wait...'
};
// configure options
@@ -153,7 +153,7 @@
*/
wait: function() {
if (this._size() == 0) {
- this._messageShow(this.options.waitText, 'info');
+ this._messageShow(this.options.wait_text, 'info');
this.$options.hide();
}
},
@@ -177,7 +177,7 @@
*/
_refresh: function() {
if (this._size() == 0) {
- this._messageShow(this.options.errorText, 'danger');
+ this._messageShow(this.options.error_text, 'danger');
this.$options.hide();
} else {
this._messageHide();
diff -r b8dea58ea20ef71e4b30beae636042ffc44d348e -r 6b397d3623e9de8f375f4ce52f501548530a4ef9 client/galaxy/scripts/mvc/ui/ui-select-default.js
--- a/client/galaxy/scripts/mvc/ui/ui-select-default.js
+++ b/client/galaxy/scripts/mvc/ui/ui-select-default.js
@@ -9,7 +9,7 @@
optionsDefault : {
id : '',
cls : '',
- empty : 'No data available',
+ error_text : 'No data available',
visible : true,
wait : false,
multiple : false,
@@ -247,7 +247,7 @@
this.disable();
// append placeholder
- this.$select.append(this._templateOption({value : 'null', label : this.options.empty}));
+ this.$select.append(this._templateOption({value : 'null', label : this.options.error_text}));
} else {
// enable select field
this.enable();
diff -r b8dea58ea20ef71e4b30beae636042ffc44d348e -r 6b397d3623e9de8f375f4ce52f501548530a4ef9 static/scripts/mvc/tools/tools-form.js
--- a/static/scripts/mvc/tools/tools-form.js
+++ b/static/scripts/mvc/tools/tools-form.js
@@ -340,7 +340,7 @@
buttons: {
execute : new Ui.Button({
icon : 'fa-check',
- tooltip : 'Execute the tool',
+ tooltip : 'Execute: ' + self.model.name,
title : 'Execute',
cls : 'btn btn-primary',
floating : 'clear',
diff -r b8dea58ea20ef71e4b30beae636042ffc44d348e -r 6b397d3623e9de8f375f4ce52f501548530a4ef9 static/scripts/mvc/tools/tools-section.js
--- a/static/scripts/mvc/tools/tools-section.js
+++ b/static/scripts/mvc/tools/tools-section.js
@@ -314,6 +314,7 @@
// data column
case 'data_column':
+ input_def.error_text = 'Referenced dataset contains no suitable columns';
field = this._fieldSelect(input_def);
break;
@@ -425,6 +426,7 @@
return new SelectClass.View({
id : 'field-' + input_def.id,
data : options,
+ error_text : input_def.error_text || 'No options available',
multiple : input_def.multiple,
searchable : input_def.searchable,
onchange : function() {
diff -r b8dea58ea20ef71e4b30beae636042ffc44d348e -r 6b397d3623e9de8f375f4ce52f501548530a4ef9 static/scripts/mvc/tools/tools-select-content.js
--- a/static/scripts/mvc/tools/tools-select-content.js
+++ b/static/scripts/mvc/tools/tools-select-content.js
@@ -35,10 +35,29 @@
this.current = this.mode;
this.list = {};
+ // error messages
+ var extensions = options.extensions.toString();
+ if (extensions) {
+ extensions = extensions.replace(',', ', ');
+ var pos = extensions.lastIndexOf(', ');
+ if (pos != -1) {
+ extensions = extensions.substr(0, pos) + " or " + extensions.substr(pos+1);
+ }
+ }
+ var hda_error = 'No dataset available';
+ if (extensions) {
+ hda_error = 'No dataset of type ' + extensions + ' available.';
+ }
+ var hdca_error = 'No dataset list available';
+ if (extensions) {
+ hdca_error = 'No dataset list of type ' + extensions + ' available.';
+ }
+
// add single dataset selector
if (this.mode == 'single') {
radio_buttons.push({icon: 'fa-file-o', label : 'Single dataset', value : 'single'});
this.select_single = new Ui.Select.View({
+ error_text : hda_error,
onchange : function() {
self.trigger('change');
}
@@ -54,6 +73,7 @@
radio_buttons.push({icon: 'fa-files-o', label : 'Multiple datasets', value : 'multiple' });
this.select_multiple = new Ui.Select.View({
multiple : true,
+ error_text : hda_error,
onchange : function() {
self.trigger('change');
}
@@ -68,6 +88,7 @@
if (this.mode == 'single' || this.mode == 'collection') {
radio_buttons.push({icon: 'fa-folder-o', label : 'List of datasets', value : 'collection' });
this.select_collection = new Ui.Select.View({
+ error_text : hdca_error,
onchange : function() {
self.trigger('change');
}
diff -r b8dea58ea20ef71e4b30beae636042ffc44d348e -r 6b397d3623e9de8f375f4ce52f501548530a4ef9 static/scripts/mvc/ui/ui-options.js
--- a/static/scripts/mvc/ui/ui-options.js
+++ b/static/scripts/mvc/ui/ui-options.js
@@ -10,8 +10,8 @@
visible : true,
data : [],
id : Utils.uuid(),
- errorText : 'No data available.',
- waitText : 'Please wait...'
+ error_text : 'No data available.',
+ wait_text : 'Please wait...'
};
// configure options
@@ -153,7 +153,7 @@
*/
wait: function() {
if (this._size() == 0) {
- this._messageShow(this.options.waitText, 'info');
+ this._messageShow(this.options.wait_text, 'info');
this.$options.hide();
}
},
@@ -177,7 +177,7 @@
*/
_refresh: function() {
if (this._size() == 0) {
- this._messageShow(this.options.errorText, 'danger');
+ this._messageShow(this.options.error_text, 'danger');
this.$options.hide();
} else {
this._messageHide();
diff -r b8dea58ea20ef71e4b30beae636042ffc44d348e -r 6b397d3623e9de8f375f4ce52f501548530a4ef9 static/scripts/mvc/ui/ui-select-default.js
--- a/static/scripts/mvc/ui/ui-select-default.js
+++ b/static/scripts/mvc/ui/ui-select-default.js
@@ -9,7 +9,7 @@
optionsDefault : {
id : '',
cls : '',
- empty : 'No data available',
+ error_text : 'No data available',
visible : true,
wait : false,
multiple : false,
@@ -247,7 +247,7 @@
this.disable();
// append placeholder
- this.$select.append(this._templateOption({value : 'null', label : this.options.empty}));
+ this.$select.append(this._templateOption({value : 'null', label : this.options.error_text}));
} else {
// enable select field
this.enable();
diff -r b8dea58ea20ef71e4b30beae636042ffc44d348e -r 6b397d3623e9de8f375f4ce52f501548530a4ef9 static/scripts/packed/mvc/tools/tools-form.js
--- a/static/scripts/packed/mvc/tools/tools-form.js
+++ b/static/scripts/packed/mvc/tools/tools-form.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","mvc/tools/tools-jobs"],function(i,j,h,m,k,a,e,d,f,l,c,g){var b=Backbone.View.extend({container:"body",initialize:function(o){console.debug(o);var n=this;var p=parent.Galaxy;if(p&&p.modal){this.modal=p.modal}else{this.modal=new m.Modal.View()}if(p&&p.currUser){this.is_admin=p.currUser.get("is_admin")}else{this.is_admin=false}this.options=o;this.deferred=new j();this.setElement("<div/>");$(this.container).append(this.$el);this.tree=new c(this);this.job_handler=new g(this);this.content=new f(this);this._buildForm(o)},message:function(n){$(this.container).empty();$(this.container).append(n)},reset:function(){for(var n in this.element_list){this.element_list[n].reset()}},rebuild:function(){this.tree.refresh();console.debug("tools-form::rebuild() - Rebuilding data structures.")},refresh:function(){if(this.is_dynamic){var n=this;this.deferred.reset();this.deferred.execute(function(){n._updateModel()})}},_buildModel:function(){var n=this;var o=galaxy_config.root+"api/tools/"+this.options.id+"/build?";if(this.options.job_id){o+="job_id="+this.options.job_id}else{if(this.options.dataset_id){o+="dataset_id="+this.options.dataset_id}else{var p=top.location.href;var q=p.indexOf("?");if(p.indexOf("tool_id=")!=-1&&q!==-1){o+=p.slice(q+1)}}}i.request({type:"GET",url:o,success:function(r){n.options=$.extend(n.options,r);n.model=r;n.inputs=r.inputs;console.debug("tools-form::initialize() - Initial tool model ready.");console.debug(r);n._buildForm()},error:function(r){console.debug("tools-form::initialize() - Initial tool model request failed.");console.debug(r)}})},_updateModel:function(){var n=this;var o=this.tree.finalize({data:function(r){if(r.values.length>0&&r.values[0]&&r.values[0].src==="hda"){return n.content.get({id:r.values[0].id,src:"hda"}).id_uncoded}return null}});console.debug("tools-form::_refreshForm() - Refreshing states.");console.debug(o);function q(u){for(var s in n.input_list){var t=n.field_list[s];var r=n.input_list[s];if(r.is_dynamic&&t.wait&&t.unwait){if(u){t.wait()}else{t.unwait()}}}}q(true);var p=this.deferred.register();i.request({type:"GET",url:galaxy_config.root+"api/tools/"+this.options.id+"/build",data:o,success:function(r){n._updateForm(r);q(false);n.deferred.done(p);console.debug("tools-form::_refreshForm() - States refreshed.");console.debug(r)},error:function(r){n.deferred.done(p);console.debug("tools-form::_refreshForm() - Refresh request failed.");console.debug(r)}})},_updateForm:function(n){var o=this;this.tree.matchModel(n,function(q,u){var p=o.input_list[q];if(p&&p.options){if(!_.isEqual(p.options,u.options)){p.options=u.options;var v=o.field_list[q];if(v.update){var t=[];switch(p.type){case"data":t=p.options;break;case"drill_down":t=p.options;break;default:for(var s in u.options){var r=u.options[s];if(r.length>2){t.push({label:r[0],value:r[1]})}}}v.update(t);v.trigger("change");console.debug("Updating options for "+q)}}}})},_buildForm:function(p){var o=this;this.field_list={};this.input_list={};this.element_list={};this.model=p;this.inputs=p.inputs;var s=new m.ButtonMenu({icon:"fa-gear",tooltip:"Click to see a list of options."});if(p.biostar_url){s.addMenu({icon:"fa-question-circle",title:"Question?",tooltip:"Ask a question about this tool (Biostar)",onclick:function(){window.open(o.options.biostar_url+"/p/new/post/")}});s.addMenu({icon:"fa-search",title:"Search",tooltip:"Search help for this tool (Biostar)",onclick:function(){window.open(o.options.biostar_url+"/t/"+o.options.id+"/")}})}s.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="+o.options.id)}});if(this.is_admin){s.addMenu({icon:"fa-download",title:"Download",tooltip:"Download this tool",onclick:function(){window.location.href=galaxy_config.root+"api/tools/"+o.options.id+"/download"}})}this.section=new l.View(o,{inputs:this.inputs,cls:"ui-table-plain"});if(this.incompatible){this.$el.hide();$("#tool-form-classic").show();return}this.portlet=new h.View({icon:"fa-wrench",title:"<b>"+this.model.name+"</b> "+this.model.description,cls:"ui-portlet-slim",operations:{menu:s},buttons:{execute:new m.Button({icon:"fa-check",tooltip:"Execute the tool",title:"Execute",cls:"btn btn-primary",floating:"clear",onclick:function(){o.job_handler.submit()}})}});this.$el.empty();this.$el.append(this.portlet.$el);if(p.help!=""){this.$el.append(d.help(p.help))}if(p.citations){var r=$("<div/>");var n=new k.ToolCitationCollection();n.tool_id=p.id;var q=new a.CitationListView({el:r,collection:n});q.render();n.fetch();this.$el.append(r)}this.portlet.append(this.section.$el);this.rebuild()}});return{View:b}});
\ 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","mvc/tools/tools-jobs"],function(i,j,h,m,k,a,e,d,f,l,c,g){var b=Backbone.View.extend({container:"body",initialize:function(o){console.debug(o);var n=this;var p=parent.Galaxy;if(p&&p.modal){this.modal=p.modal}else{this.modal=new m.Modal.View()}if(p&&p.currUser){this.is_admin=p.currUser.get("is_admin")}else{this.is_admin=false}this.options=o;this.deferred=new j();this.setElement("<div/>");$(this.container).append(this.$el);this.tree=new c(this);this.job_handler=new g(this);this.content=new f(this);this._buildForm(o)},message:function(n){$(this.container).empty();$(this.container).append(n)},reset:function(){for(var n in this.element_list){this.element_list[n].reset()}},rebuild:function(){this.tree.refresh();console.debug("tools-form::rebuild() - Rebuilding data structures.")},refresh:function(){if(this.is_dynamic){var n=this;this.deferred.reset();this.deferred.execute(function(){n._updateModel()})}},_buildModel:function(){var n=this;var o=galaxy_config.root+"api/tools/"+this.options.id+"/build?";if(this.options.job_id){o+="job_id="+this.options.job_id}else{if(this.options.dataset_id){o+="dataset_id="+this.options.dataset_id}else{var p=top.location.href;var q=p.indexOf("?");if(p.indexOf("tool_id=")!=-1&&q!==-1){o+=p.slice(q+1)}}}i.request({type:"GET",url:o,success:function(r){n.options=$.extend(n.options,r);n.model=r;n.inputs=r.inputs;console.debug("tools-form::initialize() - Initial tool model ready.");console.debug(r);n._buildForm()},error:function(r){console.debug("tools-form::initialize() - Initial tool model request failed.");console.debug(r)}})},_updateModel:function(){var n=this;var o=this.tree.finalize({data:function(r){if(r.values.length>0&&r.values[0]&&r.values[0].src==="hda"){return n.content.get({id:r.values[0].id,src:"hda"}).id_uncoded}return null}});console.debug("tools-form::_refreshForm() - Refreshing states.");console.debug(o);function q(u){for(var s in n.input_list){var t=n.field_list[s];var r=n.input_list[s];if(r.is_dynamic&&t.wait&&t.unwait){if(u){t.wait()}else{t.unwait()}}}}q(true);var p=this.deferred.register();i.request({type:"GET",url:galaxy_config.root+"api/tools/"+this.options.id+"/build",data:o,success:function(r){n._updateForm(r);q(false);n.deferred.done(p);console.debug("tools-form::_refreshForm() - States refreshed.");console.debug(r)},error:function(r){n.deferred.done(p);console.debug("tools-form::_refreshForm() - Refresh request failed.");console.debug(r)}})},_updateForm:function(n){var o=this;this.tree.matchModel(n,function(q,u){var p=o.input_list[q];if(p&&p.options){if(!_.isEqual(p.options,u.options)){p.options=u.options;var v=o.field_list[q];if(v.update){var t=[];switch(p.type){case"data":t=p.options;break;case"drill_down":t=p.options;break;default:for(var s in u.options){var r=u.options[s];if(r.length>2){t.push({label:r[0],value:r[1]})}}}v.update(t);v.trigger("change");console.debug("Updating options for "+q)}}}})},_buildForm:function(p){var o=this;this.field_list={};this.input_list={};this.element_list={};this.model=p;this.inputs=p.inputs;var s=new m.ButtonMenu({icon:"fa-gear",tooltip:"Click to see a list of options."});if(p.biostar_url){s.addMenu({icon:"fa-question-circle",title:"Question?",tooltip:"Ask a question about this tool (Biostar)",onclick:function(){window.open(o.options.biostar_url+"/p/new/post/")}});s.addMenu({icon:"fa-search",title:"Search",tooltip:"Search help for this tool (Biostar)",onclick:function(){window.open(o.options.biostar_url+"/t/"+o.options.id+"/")}})}s.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="+o.options.id)}});if(this.is_admin){s.addMenu({icon:"fa-download",title:"Download",tooltip:"Download this tool",onclick:function(){window.location.href=galaxy_config.root+"api/tools/"+o.options.id+"/download"}})}this.section=new l.View(o,{inputs:this.inputs,cls:"ui-table-plain"});if(this.incompatible){this.$el.hide();$("#tool-form-classic").show();return}this.portlet=new h.View({icon:"fa-wrench",title:"<b>"+this.model.name+"</b> "+this.model.description,cls:"ui-portlet-slim",operations:{menu:s},buttons:{execute:new m.Button({icon:"fa-check",tooltip:"Execute: "+o.model.name,title:"Execute",cls:"btn btn-primary",floating:"clear",onclick:function(){o.job_handler.submit()}})}});this.$el.empty();this.$el.append(this.portlet.$el);if(p.help!=""){this.$el.append(d.help(p.help))}if(p.citations){var r=$("<div/>");var n=new k.ToolCitationCollection();n.tool_id=p.id;var q=new a.CitationListView({el:r,collection:n});q.render();n.fetch();this.$el.append(r)}this.portlet.append(this.section.$el);this.rebuild()}});return{View:b}});
\ No newline at end of file
diff -r b8dea58ea20ef71e4b30beae636042ffc44d348e -r 6b397d3623e9de8f375f4ce52f501548530a4ef9 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/tools/tools-repeat","mvc/tools/tools-select-content","mvc/tools/tools-input"],function(d,b,g,c,a,e){var f=Backbone.View.extend({initialize:function(i,h){this.app=i;this.inputs=h.inputs;h.cls_tr="section-row";this.table=new b.View(h);this.setElement(this.table.$el);this.render()},render:function(){this.table.delAll();for(var h in this.inputs){this._add(this.inputs[h])}},_add:function(j){var i=this;var h=jQuery.extend(true,{},j);h.id=j.id=d.uuid();this.app.input_list[h.id]=h;var k=h.type;switch(k){case"conditional":this._addConditional(h);break;case"repeat":this._addRepeat(h);break;default:this._addRow(h)}},_addConditional:function(h){var j=this;h.test_param.id=h.id;var m=this._addRow(h.test_param);m.options.onchange=function(t){var p=j.app.tree.matchCase(h,t);for(var r in h.cases){var w=h.cases[r];var u=h.id+"-section-"+r;var o=j.table.get(u);var v=false;for(var q in w.inputs){var s=w.inputs[q].type;if(s&&s!=="hidden"){v=true;break}}if(r==p&&v){o.fadeIn("fast")}else{o.hide()}}j.app.refresh()};for(var l in h.cases){var k=h.id+"-section-"+l;var n=new f(this.app,{inputs:h.cases[l].inputs,cls:"ui-table-plain"});n.$el.addClass("ui-table-form-section");this.table.add(n.$el);this.table.append(k)}m.trigger("change")},_addRepeat:function(o){var r=this;var p=0;function m(i,t){var s=o.id+"-section-"+(p++);var u=null;if(t){u=function(){k.del(s);k.retitle(o.title);r.app.rebuild();r.app.refresh()}}var v=new f(r.app,{inputs:i,cls:"ui-table-plain"});k.add({id:s,title:o.title,$el:v.$el,ondel:u});k.retitle(o.title)}var k=new c.View({title_new:o.title,max:o.max,onnew:function(){m(o.inputs,true);r.app.rebuild();r.app.refresh()}});var h=o.min;var q=_.size(o.cache);for(var l=0;l<Math.max(q,h);l++){var n=null;if(l<q){n=o.cache[l]}else{n=o.inputs}m(n,l>=h)}var j=new e(this.app,{label:o.title,help:o.help,field:k});j.$el.addClass("ui-table-form-section");this.table.add(j.$el);this.table.append(o.id)},_addRow:function(h){var k=h.id;var i=this._createField(h);if(h.is_dynamic){this.app.is_dynamic=true}this.app.field_list[k]=i;var j=new e(this.app,{label:h.label,optional:h.optional,help:h.help,field:i});this.app.element_list[k]=j;this.table.add(j.$el);this.table.append(k);return i},_createField:function(h){var i=null;switch(h.type){case"text":i=this._fieldText(h);break;case"select":i=this._fieldSelect(h);break;case"data":i=this._fieldData(h);break;case"data_column":i=this._fieldSelect(h);break;case"hidden":i=this._fieldHidden(h);break;case"integer":i=this._fieldSlider(h);break;case"float":i=this._fieldSlider(h);break;case"boolean":i=this._fieldBoolean(h);break;case"genomebuild":h.searchable=true;i=this._fieldSelect(h);break;case"drill_down":i=this._fieldDrilldown(h);break;case"baseurl":i=this._fieldHidden(h);break;default:this.app.incompatible=true;if(h.options){i=this._fieldSelect(h)}else{i=this._fieldText(h)}console.debug("tools-form::_addRow() : Auto matched field type ("+h.type+").")}if(h.value!==undefined){i.value(h.value)}return i},_fieldData:function(h){var i=this;return new a.View(this.app,{id:"field-"+h.id,extensions:h.extensions,multiple:h.multiple,type:h.type,data:h.options,onchange:function(){i.app.refresh()}})},_fieldSelect:function(h){var k=[];for(var l in h.options){var m=h.options[l];k.push({label:m[0],value:m[1]})}var n=g.Select;switch(h.display){case"checkboxes":n=g.Checkbox;break;case"radio":n=g.Radio;break}var j=this;return new n.View({id:"field-"+h.id,data:k,multiple:h.multiple,searchable:h.searchable,onchange:function(){j.app.refresh()}})},_fieldDrilldown:function(h){var i=this;return new g.Drilldown.View({id:"field-"+h.id,data:h.options,display:h.display,onchange:function(){i.app.refresh()}})},_fieldText:function(h){var i=this;return new g.Input({id:"field-"+h.id,area:h.area,onchange:function(){i.app.refresh()}})},_fieldSlider:function(h){return new g.Slider.View({id:"field-"+h.id,precise:h.type=="float",min:h.min,max:h.max})},_fieldHidden:function(h){return new g.Hidden({id:"field-"+h.id})},_fieldBoolean:function(h){return new g.RadioButton.View({id:"field-"+h.id,data:[{label:"Yes",value:"true"},{label:"No",value:"false"}]})}});return{View:f}});
\ No newline at end of file
+define(["utils/utils","mvc/ui/ui-table","mvc/ui/ui-misc","mvc/tools/tools-repeat","mvc/tools/tools-select-content","mvc/tools/tools-input"],function(d,b,g,c,a,e){var f=Backbone.View.extend({initialize:function(i,h){this.app=i;this.inputs=h.inputs;h.cls_tr="section-row";this.table=new b.View(h);this.setElement(this.table.$el);this.render()},render:function(){this.table.delAll();for(var h in this.inputs){this._add(this.inputs[h])}},_add:function(j){var i=this;var h=jQuery.extend(true,{},j);h.id=j.id=d.uuid();this.app.input_list[h.id]=h;var k=h.type;switch(k){case"conditional":this._addConditional(h);break;case"repeat":this._addRepeat(h);break;default:this._addRow(h)}},_addConditional:function(h){var j=this;h.test_param.id=h.id;var m=this._addRow(h.test_param);m.options.onchange=function(t){var p=j.app.tree.matchCase(h,t);for(var r in h.cases){var w=h.cases[r];var u=h.id+"-section-"+r;var o=j.table.get(u);var v=false;for(var q in w.inputs){var s=w.inputs[q].type;if(s&&s!=="hidden"){v=true;break}}if(r==p&&v){o.fadeIn("fast")}else{o.hide()}}j.app.refresh()};for(var l in h.cases){var k=h.id+"-section-"+l;var n=new f(this.app,{inputs:h.cases[l].inputs,cls:"ui-table-plain"});n.$el.addClass("ui-table-form-section");this.table.add(n.$el);this.table.append(k)}m.trigger("change")},_addRepeat:function(o){var r=this;var p=0;function m(i,t){var s=o.id+"-section-"+(p++);var u=null;if(t){u=function(){k.del(s);k.retitle(o.title);r.app.rebuild();r.app.refresh()}}var v=new f(r.app,{inputs:i,cls:"ui-table-plain"});k.add({id:s,title:o.title,$el:v.$el,ondel:u});k.retitle(o.title)}var k=new c.View({title_new:o.title,max:o.max,onnew:function(){m(o.inputs,true);r.app.rebuild();r.app.refresh()}});var h=o.min;var q=_.size(o.cache);for(var l=0;l<Math.max(q,h);l++){var n=null;if(l<q){n=o.cache[l]}else{n=o.inputs}m(n,l>=h)}var j=new e(this.app,{label:o.title,help:o.help,field:k});j.$el.addClass("ui-table-form-section");this.table.add(j.$el);this.table.append(o.id)},_addRow:function(h){var k=h.id;var i=this._createField(h);if(h.is_dynamic){this.app.is_dynamic=true}this.app.field_list[k]=i;var j=new e(this.app,{label:h.label,optional:h.optional,help:h.help,field:i});this.app.element_list[k]=j;this.table.add(j.$el);this.table.append(k);return i},_createField:function(h){var i=null;switch(h.type){case"text":i=this._fieldText(h);break;case"select":i=this._fieldSelect(h);break;case"data":i=this._fieldData(h);break;case"data_column":h.error_text="Referenced dataset contains no suitable columns";i=this._fieldSelect(h);break;case"hidden":i=this._fieldHidden(h);break;case"integer":i=this._fieldSlider(h);break;case"float":i=this._fieldSlider(h);break;case"boolean":i=this._fieldBoolean(h);break;case"genomebuild":h.searchable=true;i=this._fieldSelect(h);break;case"drill_down":i=this._fieldDrilldown(h);break;case"baseurl":i=this._fieldHidden(h);break;default:this.app.incompatible=true;if(h.options){i=this._fieldSelect(h)}else{i=this._fieldText(h)}console.debug("tools-form::_addRow() : Auto matched field type ("+h.type+").")}if(h.value!==undefined){i.value(h.value)}return i},_fieldData:function(h){var i=this;return new a.View(this.app,{id:"field-"+h.id,extensions:h.extensions,multiple:h.multiple,type:h.type,data:h.options,onchange:function(){i.app.refresh()}})},_fieldSelect:function(h){var k=[];for(var l in h.options){var m=h.options[l];k.push({label:m[0],value:m[1]})}var n=g.Select;switch(h.display){case"checkboxes":n=g.Checkbox;break;case"radio":n=g.Radio;break}var j=this;return new n.View({id:"field-"+h.id,data:k,error_text:h.error_text||"No options available",multiple:h.multiple,searchable:h.searchable,onchange:function(){j.app.refresh()}})},_fieldDrilldown:function(h){var i=this;return new g.Drilldown.View({id:"field-"+h.id,data:h.options,display:h.display,onchange:function(){i.app.refresh()}})},_fieldText:function(h){var i=this;return new g.Input({id:"field-"+h.id,area:h.area,onchange:function(){i.app.refresh()}})},_fieldSlider:function(h){return new g.Slider.View({id:"field-"+h.id,precise:h.type=="float",min:h.min,max:h.max})},_fieldHidden:function(h){return new g.Hidden({id:"field-"+h.id})},_fieldBoolean:function(h){return new g.RadioButton.View({id:"field-"+h.id,data:[{label:"Yes",value:"true"},{label:"No",value:"false"}]})}});return{View:f}});
\ No newline at end of file
diff -r b8dea58ea20ef71e4b30beae636042ffc44d348e -r 6b397d3623e9de8f375f4ce52f501548530a4ef9 static/scripts/packed/mvc/tools/tools-select-content.js
--- a/static/scripts/packed/mvc/tools/tools-select-content.js
+++ b/static/scripts/packed/mvc/tools/tools-select-content.js
@@ -1,1 +1,1 @@
-define(["utils/utils","mvc/ui/ui-misc","mvc/ui/ui-tabs","mvc/tools/tools-template"],function(c,e,b,a){var d=Backbone.View.extend({initialize:function(k,g){this.app=k;this.options=g;var f=this;this.setElement("<div/>");this.list={};var j=[];if(g.type=="data_collection"){this.mode="collection"}else{if(g.multiple){this.mode="multiple"}else{this.mode="single"}}this.current=this.mode;this.list={};if(this.mode=="single"){j.push({icon:"fa-file-o",label:"Single dataset",value:"single"});this.select_single=new e.Select.View({onchange:function(){f.trigger("change")}});this.list.single={field:this.select_single,type:"hda"}}if(this.mode=="single"||this.mode=="multiple"){j.push({icon:"fa-files-o",label:"Multiple datasets",value:"multiple"});this.select_multiple=new e.Select.View({multiple:true,onchange:function(){f.trigger("change")}});this.list.multiple={field:this.select_multiple,type:"hda"}}if(this.mode=="single"||this.mode=="collection"){j.push({icon:"fa-folder-o",label:"List of datasets",value:"collection"});this.select_collection=new e.Select.View({onchange:function(){f.trigger("change")}});this.list.collection={field:this.select_collection,type:"hdca"}}this.button_type=new e.RadioButton.View({value:this.current,data:j,onchange:function(i){f.current=i;f.refresh();f.trigger("change")}});this.$batch=$(a.batchMode());if(_.size(this.list)>1){this.$el.append(c.wrap(this.button_type.$el))}for(var h in this.list){this.$el.append(this.list[h].field.$el)}this.$el.append(this.$batch);this.update(g.data);if(this.options.value!==undefined){this.value(this.options.value)}this.refresh();this.on("change",function(){if(g.onchange){g.onchange(f.value())}})},wait:function(){for(var f in this.list){this.list[f].field.wait()}},unwait:function(){for(var f in this.list){this.list[f].field.unwait()}},update:function(g){var l=[];for(var j in g.hda){var k=g.hda[j];l.push({label:k.hid+": "+k.name,value:k.id})}var f=[];for(var j in g.hdca){var h=g.hdca[j];f.push({label:h.hid+": "+h.name,value:h.id})}this.select_single&&this.select_single.update(l);this.select_multiple&&this.select_multiple.update(l);this.select_collection&&this.select_collection.update(f);this.app.content.add(g)},value:function(m){if(m&&m.values){try{var l=[];for(var h in m.values){l.push(m.values[h].id)}if(m&&m.values.length>0&&m.values[0].src=="hcda"){this.current="collection";this.select_collection.value(l[0])}else{if(this.mode=="multiple"){this.current="multiple";this.select_multiple.value(l)}else{this.current="single";this.select_single.value(l[0])}}this.refresh();var g=this._select();if(!g.validate()){g.value(g.first())}}catch(k){console.debug("tools-select-content::value() - Skipped.")}}var j=this._select().value();if(!(j instanceof Array)){j=[j]}var f={batch:this.mode=="single"&&this.current!="single",values:[]};for(var h in j){f.values.push({id:j[h],src:this.list[this.current].type})}return f},validate:function(){return this._select().validate()},refresh:function(){for(var g in this.list){var f=this.list[g].field.$el;if(this.current==g){f.show()}else{f.hide()}}if(this.mode=="single"&&this.current!="single"){this.$batch.show()}else{this.$batch.hide()}},_select:function(){return this.list[this.current].field}});return{View:d}});
\ No newline at end of file
+define(["utils/utils","mvc/ui/ui-misc","mvc/ui/ui-tabs","mvc/tools/tools-template"],function(c,e,b,a){var d=Backbone.View.extend({initialize:function(f,o){this.app=f;this.options=o;var n=this;this.setElement("<div/>");this.list={};var m=[];if(o.type=="data_collection"){this.mode="collection"}else{if(o.multiple){this.mode="multiple"}else{this.mode="single"}}this.current=this.mode;this.list={};var j=o.extensions.toString();if(j){j=j.replace(",",", ");var k=j.lastIndexOf(", ");if(k!=-1){j=j.substr(0,k)+" or "+j.substr(k+1)}}var h="No dataset available";if(j){h="No dataset of type "+j+" available."}var l="No dataset list available";if(j){l="No dataset list of type "+j+" available."}if(this.mode=="single"){m.push({icon:"fa-file-o",label:"Single dataset",value:"single"});this.select_single=new e.Select.View({error_text:h,onchange:function(){n.trigger("change")}});this.list.single={field:this.select_single,type:"hda"}}if(this.mode=="single"||this.mode=="multiple"){m.push({icon:"fa-files-o",label:"Multiple datasets",value:"multiple"});this.select_multiple=new e.Select.View({multiple:true,error_text:h,onchange:function(){n.trigger("change")}});this.list.multiple={field:this.select_multiple,type:"hda"}}if(this.mode=="single"||this.mode=="collection"){m.push({icon:"fa-folder-o",label:"List of datasets",value:"collection"});this.select_collection=new e.Select.View({error_text:l,onchange:function(){n.trigger("change")}});this.list.collection={field:this.select_collection,type:"hdca"}}this.button_type=new e.RadioButton.View({value:this.current,data:m,onchange:function(i){n.current=i;n.refresh();n.trigger("change")}});this.$batch=$(a.batchMode());if(_.size(this.list)>1){this.$el.append(c.wrap(this.button_type.$el))}for(var g in this.list){this.$el.append(this.list[g].field.$el)}this.$el.append(this.$batch);this.update(o.data);if(this.options.value!==undefined){this.value(this.options.value)}this.refresh();this.on("change",function(){if(o.onchange){o.onchange(n.value())}})},wait:function(){for(var f in this.list){this.list[f].field.wait()}},unwait:function(){for(var f in this.list){this.list[f].field.unwait()}},update:function(g){var l=[];for(var j in g.hda){var k=g.hda[j];l.push({label:k.hid+": "+k.name,value:k.id})}var f=[];for(var j in g.hdca){var h=g.hdca[j];f.push({label:h.hid+": "+h.name,value:h.id})}this.select_single&&this.select_single.update(l);this.select_multiple&&this.select_multiple.update(l);this.select_collection&&this.select_collection.update(f);this.app.content.add(g)},value:function(m){if(m&&m.values){try{var l=[];for(var h in m.values){l.push(m.values[h].id)}if(m&&m.values.length>0&&m.values[0].src=="hcda"){this.current="collection";this.select_collection.value(l[0])}else{if(this.mode=="multiple"){this.current="multiple";this.select_multiple.value(l)}else{this.current="single";this.select_single.value(l[0])}}this.refresh();var g=this._select();if(!g.validate()){g.value(g.first())}}catch(k){console.debug("tools-select-content::value() - Skipped.")}}var j=this._select().value();if(!(j instanceof Array)){j=[j]}var f={batch:this.mode=="single"&&this.current!="single",values:[]};for(var h in j){f.values.push({id:j[h],src:this.list[this.current].type})}return f},validate:function(){return this._select().validate()},refresh:function(){for(var g in this.list){var f=this.list[g].field.$el;if(this.current==g){f.show()}else{f.hide()}}if(this.mode=="single"&&this.current!="single"){this.$batch.show()}else{this.$batch.hide()}},_select:function(){return this.list[this.current].field}});return{View:d}});
\ No newline at end of file
diff -r b8dea58ea20ef71e4b30beae636042ffc44d348e -r 6b397d3623e9de8f375f4ce52f501548530a4ef9 static/scripts/packed/mvc/ui/ui-options.js
--- a/static/scripts/packed/mvc/ui/ui-options.js
+++ b/static/scripts/packed/mvc/ui/ui-options.js
@@ -1,1 +1,1 @@
-define(["utils/utils"],function(b){var a=Backbone.View.extend({initialize:function(g){this.optionsDefault={visible:true,data:[],id:b.uuid(),errorText:"No data available.",waitText:"Please wait..."};this.options=b.merge(g,this.optionsDefault);this.setElement("<div/>");this.$message=$("<div/>");this.$options=$(this._template(g));this.$el.append(this.$message);this.$el.append(this.$options);if(!this.options.visible){this.$el.hide()}this.update(this.options.data);if(this.options.value!==undefined){this.value(this.options.value)}var f=this;this.on("change",function(){f._change()})},update:function(g){var j=this._getValue();this.$options.empty();if(this._templateOptions){this.$options.append(this._templateOptions(g))}else{for(var h in g){var i=$(this._templateOption(g[h]));i.addClass("ui-option");this.$options.append(i)}}var f=this;this.$el.find("input").on("change",function(){f.value(f._getValue());f._change()});this._refresh();this.value(j)},value:function(g){if(g!==undefined){if(!(g instanceof Array)){g=[g]}this.$el.find("input").prop("checked",false);for(var f in g){this.$el.find('input[value="'+g[f]+'"]').first().prop("checked",true)}}return this._getValue()},exists:function(g){if(g!==undefined){if(!(g instanceof Array)){g=[g]}for(var f in g){if(this.$el.find('input[value="'+g[f]+'"]').length>0){return true}}}return false},first:function(){var f=this.$el.find("input");if(f.length>0){return f.val()}else{return undefined}},validate:function(){var g=this.value();if(!(g instanceof Array)){g=[g]}for(var f in g){if([null,"null",undefined].indexOf(g[f])>-1){return false}}return true},wait:function(){if(this._size()==0){this._messageShow(this.options.waitText,"info");this.$options.hide()}},unwait:function(){this._messageHide();this._refresh()},_change:function(){if(this.options.onchange){this.options.onchange(this._getValue())}},_refresh:function(){if(this._size()==0){this._messageShow(this.options.errorText,"danger");this.$options.hide()}else{this._messageHide();this.$options.css("display","inline-block")}},_getValue:function(){var g=this.$el.find(":checked");if(g.length==0){return"null"}if(this.options.multiple){var f=[];g.each(function(){f.push($(this).val())});return f}else{return g.val()}},_size:function(){return this.$el.find(".ui-option").length},_messageShow:function(g,f){this.$message.show();this.$message.removeClass();this.$message.addClass("ui-message alert alert-"+f);this.$message.html(g)},_messageHide:function(){this.$message.hide()},_template:function(){return'<div class="ui-options"/>'}});var d={};d.View=a.extend({initialize:function(f){a.prototype.initialize.call(this,f)},_templateOption:function(f){return'<div><input type="radio" name="'+this.options.id+'" value="'+f.value+'"/>'+f.label+"<br></div>"}});var c={};c.View=a.extend({initialize:function(f){f.multiple=true;a.prototype.initialize.call(this,f)},_templateOption:function(f){return'<div><input type="checkbox" name="'+this.options.id+'" value="'+f.value+'"/>'+f.label+"<br></div>"}});var e={};e.View=a.extend({initialize:function(f){a.prototype.initialize.call(this,f)},value:function(f){if(f!==undefined){this.$el.find("input").prop("checked",false);this.$el.find("label").removeClass("active");this.$el.find('[value="'+f+'"]').prop("checked",true).closest("label").addClass("active")}return this._getValue()},_templateOption:function(g){var f='<label class="btn btn-default">';if(g.icon){f+='<i class="fa '+g.icon+'"/>'}f+='<input type="radio" name="'+this.options.id+'" value="'+g.value+'">'+g.label+"</label>";return f},_template:function(){return'<div class="btn-group ui-radiobutton" data-toggle="buttons"/>'}});return{Base:a,Radio:d,RadioButton:e,Checkbox:c}});
\ No newline at end of file
+define(["utils/utils"],function(b){var a=Backbone.View.extend({initialize:function(g){this.optionsDefault={visible:true,data:[],id:b.uuid(),error_text:"No data available.",wait_text:"Please wait..."};this.options=b.merge(g,this.optionsDefault);this.setElement("<div/>");this.$message=$("<div/>");this.$options=$(this._template(g));this.$el.append(this.$message);this.$el.append(this.$options);if(!this.options.visible){this.$el.hide()}this.update(this.options.data);if(this.options.value!==undefined){this.value(this.options.value)}var f=this;this.on("change",function(){f._change()})},update:function(g){var j=this._getValue();this.$options.empty();if(this._templateOptions){this.$options.append(this._templateOptions(g))}else{for(var h in g){var i=$(this._templateOption(g[h]));i.addClass("ui-option");this.$options.append(i)}}var f=this;this.$el.find("input").on("change",function(){f.value(f._getValue());f._change()});this._refresh();this.value(j)},value:function(g){if(g!==undefined){if(!(g instanceof Array)){g=[g]}this.$el.find("input").prop("checked",false);for(var f in g){this.$el.find('input[value="'+g[f]+'"]').first().prop("checked",true)}}return this._getValue()},exists:function(g){if(g!==undefined){if(!(g instanceof Array)){g=[g]}for(var f in g){if(this.$el.find('input[value="'+g[f]+'"]').length>0){return true}}}return false},first:function(){var f=this.$el.find("input");if(f.length>0){return f.val()}else{return undefined}},validate:function(){var g=this.value();if(!(g instanceof Array)){g=[g]}for(var f in g){if([null,"null",undefined].indexOf(g[f])>-1){return false}}return true},wait:function(){if(this._size()==0){this._messageShow(this.options.wait_text,"info");this.$options.hide()}},unwait:function(){this._messageHide();this._refresh()},_change:function(){if(this.options.onchange){this.options.onchange(this._getValue())}},_refresh:function(){if(this._size()==0){this._messageShow(this.options.error_text,"danger");this.$options.hide()}else{this._messageHide();this.$options.css("display","inline-block")}},_getValue:function(){var g=this.$el.find(":checked");if(g.length==0){return"null"}if(this.options.multiple){var f=[];g.each(function(){f.push($(this).val())});return f}else{return g.val()}},_size:function(){return this.$el.find(".ui-option").length},_messageShow:function(g,f){this.$message.show();this.$message.removeClass();this.$message.addClass("ui-message alert alert-"+f);this.$message.html(g)},_messageHide:function(){this.$message.hide()},_template:function(){return'<div class="ui-options"/>'}});var d={};d.View=a.extend({initialize:function(f){a.prototype.initialize.call(this,f)},_templateOption:function(f){return'<div><input type="radio" name="'+this.options.id+'" value="'+f.value+'"/>'+f.label+"<br></div>"}});var c={};c.View=a.extend({initialize:function(f){f.multiple=true;a.prototype.initialize.call(this,f)},_templateOption:function(f){return'<div><input type="checkbox" name="'+this.options.id+'" value="'+f.value+'"/>'+f.label+"<br></div>"}});var e={};e.View=a.extend({initialize:function(f){a.prototype.initialize.call(this,f)},value:function(f){if(f!==undefined){this.$el.find("input").prop("checked",false);this.$el.find("label").removeClass("active");this.$el.find('[value="'+f+'"]').prop("checked",true).closest("label").addClass("active")}return this._getValue()},_templateOption:function(g){var f='<label class="btn btn-default">';if(g.icon){f+='<i class="fa '+g.icon+'"/>'}f+='<input type="radio" name="'+this.options.id+'" value="'+g.value+'">'+g.label+"</label>";return f},_template:function(){return'<div class="btn-group ui-radiobutton" data-toggle="buttons"/>'}});return{Base:a,Radio:d,RadioButton:e,Checkbox:c}});
\ No newline at end of file
diff -r b8dea58ea20ef71e4b30beae636042ffc44d348e -r 6b397d3623e9de8f375f4ce52f501548530a4ef9 static/scripts/packed/mvc/ui/ui-select-default.js
--- a/static/scripts/packed/mvc/ui/ui-select-default.js
+++ b/static/scripts/packed/mvc/ui/ui-select-default.js
@@ -1,1 +1,1 @@
-define(["utils/utils"],function(a){var b=Backbone.View.extend({optionsDefault:{id:"",cls:"",empty:"No data available",visible:true,wait:false,multiple:false,searchable:false},initialize:function(d){this.options=a.merge(d,this.optionsDefault);this.setElement(this._template(this.options));this.$select=this.$el.find(".select");this.$icon=this.$el.find(".icon");this.$button=this.$el.find(".button");if(this.options.multiple){this.$select.prop("multiple",true);this.$select.addClass("ui-select-multiple");this.$icon.remove()}else{this.$el.addClass("ui-select")}this.update(this.options.data);if(this.options.value!==undefined){this.value(this.options.value)}if(!this.options.visible){this.hide()}if(this.options.wait){this.wait()}else{this.show()}var c=this;this.$select.on("change",function(){c._change()});this.on("change",function(){c._change()})},value:function(c){if(c!==undefined){this.$select.val(c);if(this.$select.select2){this.$select.select2("val",c)}}return this.$select.val()},first:function(){var c=this.$select.find("option");if(c.length>0){return c.val()}else{return undefined}},validate:function(){var d=this.value();if(!(d instanceof Array)){d=[d]}for(var c in d){if([null,"null",undefined].indexOf(d[c])>-1){return false}}return true},text:function(){return this.$select.find("option:selected").text()},show:function(){this.unwait();this.$select.show();this.$el.show()},hide:function(){this.$el.hide()},wait:function(){this.$icon.removeClass();this.$icon.addClass("fa fa-spinner fa-spin")},unwait:function(){this.$icon.removeClass();this.$icon.addClass("fa fa-caret-down")},disabled:function(){return this.$select.is(":disabled")},enable:function(){this.$select.prop("disabled",false)},disable:function(){this.$select.prop("disabled",true)},add:function(c){this.$select.append(this._templateOption(c));this._refresh()},del:function(c){this.$select.find("option[value="+c+"]").remove();this.$select.trigger("change");this._refresh()},update:function(c){var e=this.$select.val();this.$select.find("option").remove();for(var d in c){this.$select.append(this._templateOption(c[d]))}this._refresh();this.$select.val(e);if(!this.$select.val()){this.$select.val(this.first())}if(this.options.searchable){this.$button.hide();this.$select.select2("destroy");this.$select.select2()}},setOnChange:function(c){this.options.onchange=c},exists:function(c){return this.$select.find('option[value="'+c+'"]').length>0},_change:function(){if(this.options.onchange){this.options.onchange(this.$select.val())}},_refresh:function(){this.$select.find("option[value=null]").remove();var c=this.$select.find("option").length;if(c==0){this.disable();this.$select.append(this._templateOption({value:"null",label:this.options.empty}))}else{this.enable()}},_templateOption:function(c){return'<option value="'+c.value+'">'+c.label+"</option>"},_template:function(c){return'<div id="'+c.id+'"><select id="select" class="select '+c.cls+" "+c.id+'"></select><div class="button"><i class="icon"/></div></div>'}});return{View:b}});
\ No newline at end of file
+define(["utils/utils"],function(a){var b=Backbone.View.extend({optionsDefault:{id:"",cls:"",error_text:"No data available",visible:true,wait:false,multiple:false,searchable:false},initialize:function(d){this.options=a.merge(d,this.optionsDefault);this.setElement(this._template(this.options));this.$select=this.$el.find(".select");this.$icon=this.$el.find(".icon");this.$button=this.$el.find(".button");if(this.options.multiple){this.$select.prop("multiple",true);this.$select.addClass("ui-select-multiple");this.$icon.remove()}else{this.$el.addClass("ui-select")}this.update(this.options.data);if(this.options.value!==undefined){this.value(this.options.value)}if(!this.options.visible){this.hide()}if(this.options.wait){this.wait()}else{this.show()}var c=this;this.$select.on("change",function(){c._change()});this.on("change",function(){c._change()})},value:function(c){if(c!==undefined){this.$select.val(c);if(this.$select.select2){this.$select.select2("val",c)}}return this.$select.val()},first:function(){var c=this.$select.find("option");if(c.length>0){return c.val()}else{return undefined}},validate:function(){var d=this.value();if(!(d instanceof Array)){d=[d]}for(var c in d){if([null,"null",undefined].indexOf(d[c])>-1){return false}}return true},text:function(){return this.$select.find("option:selected").text()},show:function(){this.unwait();this.$select.show();this.$el.show()},hide:function(){this.$el.hide()},wait:function(){this.$icon.removeClass();this.$icon.addClass("fa fa-spinner fa-spin")},unwait:function(){this.$icon.removeClass();this.$icon.addClass("fa fa-caret-down")},disabled:function(){return this.$select.is(":disabled")},enable:function(){this.$select.prop("disabled",false)},disable:function(){this.$select.prop("disabled",true)},add:function(c){this.$select.append(this._templateOption(c));this._refresh()},del:function(c){this.$select.find("option[value="+c+"]").remove();this.$select.trigger("change");this._refresh()},update:function(c){var e=this.$select.val();this.$select.find("option").remove();for(var d in c){this.$select.append(this._templateOption(c[d]))}this._refresh();this.$select.val(e);if(!this.$select.val()){this.$select.val(this.first())}if(this.options.searchable){this.$button.hide();this.$select.select2("destroy");this.$select.select2()}},setOnChange:function(c){this.options.onchange=c},exists:function(c){return this.$select.find('option[value="'+c+'"]').length>0},_change:function(){if(this.options.onchange){this.options.onchange(this.$select.val())}},_refresh:function(){this.$select.find("option[value=null]").remove();var c=this.$select.find("option").length;if(c==0){this.disable();this.$select.append(this._templateOption({value:"null",label:this.options.error_text}))}else{this.enable()}},_templateOption:function(c){return'<option value="'+c.value+'">'+c.label+"</option>"},_template:function(c){return'<div id="'+c.id+'"><select id="select" class="select '+c.cls+" "+c.id+'"></select><div class="button"><i class="icon"/></div></div>'}});return{View:b}});
\ No newline at end of file
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
5 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/8ed933747f9a/
Changeset: 8ed933747f9a
Branch: next-stable
User: dannon
Date: 2014-12-04 15:27:08+00:00
Summary: changeset: 15487:c8791bdcbdde
user: Dannon Baker <dannonbaker(a)me.com>
date: Tue Dec 02 09:40:10 2014 -0500
files: lib/galaxy/webapps/galaxy/controllers/user.py
description:
Remove never-used success vars.
Affected #: 1 file
diff -r 0cfba5087d81c4bd0add051cf1d0ab48d8a33cce -r 8ed933747f9acebc51de16939cca3e48533c3305 lib/galaxy/webapps/galaxy/controllers/user.py
--- a/lib/galaxy/webapps/galaxy/controllers/user.py
+++ b/lib/galaxy/webapps/galaxy/controllers/user.py
@@ -1022,12 +1022,10 @@
is_activation_sent = self.send_verification_email( trans, user.email, user.username )
if is_activation_sent:
message = 'The login information has been updated with the changes.<br>Verification email has been sent to your new email address. Please verify it by clicking the activation link in the email.<br>Please check your spam/trash folder in case you cannot find the message.'
- success = True
else:
message = 'Unable to send activation email, please contact your local Galaxy administrator.'
if trans.app.config.error_email_to is not None:
message += ' Contact: %s' % trans.app.config.error_email_to
- success = False
if ( user.username != username ):
user.username = username
trans.sa_session.add( user )
https://bitbucket.org/galaxy/galaxy-central/commits/4dd689ca4e4f/
Changeset: 4dd689ca4e4f
Branch: next-stable
User: dannon
Date: 2014-12-04 15:56:33+00:00
Summary: Fix indentation to a multiple of 4.
Affected #: 1 file
diff -r 8ed933747f9acebc51de16939cca3e48533c3305 -r 4dd689ca4e4f1f2148abd67639fba2e48466716f lib/galaxy/webapps/galaxy/controllers/user.py
--- a/lib/galaxy/webapps/galaxy/controllers/user.py
+++ b/lib/galaxy/webapps/galaxy/controllers/user.py
@@ -1539,7 +1539,7 @@
@web.require_login( "to undelete addresses" )
@web.expose
def undelete_address( self, trans, cntrller, address_id=None, **kwd ):
- return self.__delete_undelete_address( trans, cntrller, 'undelete', address_id=address_id, **kwd )
+ return self.__delete_undelete_address( trans, cntrller, 'undelete', address_id=address_id, **kwd )
def __delete_undelete_address( self, trans, cntrller, op, address_id=None, **kwd ):
is_admin = cntrller == 'admin' and trans.user_is_admin()
https://bitbucket.org/galaxy/galaxy-central/commits/52bca602fda1/
Changeset: 52bca602fda1
Branch: next-stable
User: dannon
Date: 2014-12-04 16:00:36+00:00
Summary: Remove another unused variable in the redirect code.
Affected #: 1 file
diff -r 4dd689ca4e4f1f2148abd67639fba2e48466716f -r 52bca602fda1f49cdd686607cc4b4c3b4943f59d lib/galaxy/webapps/galaxy/controllers/user.py
--- a/lib/galaxy/webapps/galaxy/controllers/user.py
+++ b/lib/galaxy/webapps/galaxy/controllers/user.py
@@ -1739,7 +1739,6 @@
def __get_redirect_url( self, redirect ):
root_url = url_for( '/', qualified=True )
- redirect_url = '' # always start with redirect_url being empty
# compare urls, to prevent a redirect from pointing (directly) outside of galaxy
# or to enter a logout/login loop
if not util.compare_urls( root_url, redirect, compare_path=False ) or util.compare_urls( url_for( controller='user', action='logout', qualified=True ), redirect ):
https://bitbucket.org/galaxy/galaxy-central/commits/29b2c328b89b/
Changeset: 29b2c328b89b
Branch: next-stable
User: dannon
Date: 2014-12-04 16:09:30+00:00
Summary: Import cleanup in user controller prior to merging password work.
Affected #: 1 file
diff -r 52bca602fda1f49cdd686607cc4b4c3b4943f59d -r 29b2c328b89b6634c9a3f9a21c2349105a7e485a lib/galaxy/webapps/galaxy/controllers/user.py
--- a/lib/galaxy/webapps/galaxy/controllers/user.py
+++ b/lib/galaxy/webapps/galaxy/controllers/user.py
@@ -5,32 +5,30 @@
import glob
import logging
import os
+import random
import socket
import string
-import random
import urllib
+
+from datetime import datetime, timedelta
+
+from galaxy import model
+from galaxy import util
from galaxy import web
-from galaxy import util
-from galaxy import model
from galaxy.model.orm import and_
-from galaxy.security.validate_user_input import validate_email
-from galaxy.security.validate_user_input import validate_publicname
-from galaxy.security.validate_user_input import validate_password
-from galaxy.security.validate_user_input import transform_publicname
-from galaxy.util.json import loads
-from galaxy.util.json import dumps
-from galaxy.util import listify
-from galaxy.util import docstring_trim
+from galaxy.security.validate_user_input import (transform_publicname,
+ validate_email,
+ validate_password,
+ validate_publicname)
+from galaxy.util import biostar, hash_util, docstring_trim, listify
+from galaxy.util.json import dumps, loads
from galaxy.web import url_for
-from galaxy.web.base.controller import BaseUIController
-from galaxy.web.base.controller import UsesFormDefinitionsMixin
-from galaxy.web.base.controller import CreatesUsersMixin
-from galaxy.web.base.controller import CreatesApiKeysMixin
-from galaxy.web.form_builder import CheckboxField
-from galaxy.web.form_builder import build_select_field
-from galaxy.web.framework.helpers import time_ago, grids, escape
-from datetime import datetime, timedelta
-from galaxy.util import hash_util, biostar
+from galaxy.web.base.controller import (BaseUIController,
+ CreatesApiKeysMixin,
+ CreatesUsersMixin,
+ UsesFormDefinitionsMixin)
+from galaxy.web.form_builder import build_select_field, CheckboxField
+from galaxy.web.framework.helpers import escape, grids, time_ago
log = logging.getLogger( __name__ )
https://bitbucket.org/galaxy/galaxy-central/commits/b8dea58ea20e/
Changeset: b8dea58ea20e
User: dannon
Date: 2014-12-04 16:10:26+00:00
Summary: Merge next-stable to default.
Affected #: 1 file
diff -r 2cdf98534410d48b1a10c03eec30901979955aca -r b8dea58ea20ef71e4b30beae636042ffc44d348e lib/galaxy/webapps/galaxy/controllers/user.py
--- a/lib/galaxy/webapps/galaxy/controllers/user.py
+++ b/lib/galaxy/webapps/galaxy/controllers/user.py
@@ -5,32 +5,30 @@
import glob
import logging
import os
+import random
import socket
import string
-import random
import urllib
+
+from datetime import datetime, timedelta
+
+from galaxy import model
+from galaxy import util
from galaxy import web
-from galaxy import util
-from galaxy import model
from galaxy.model.orm import and_
-from galaxy.security.validate_user_input import validate_email
-from galaxy.security.validate_user_input import validate_publicname
-from galaxy.security.validate_user_input import validate_password
-from galaxy.security.validate_user_input import transform_publicname
-from galaxy.util.json import loads
-from galaxy.util.json import dumps
-from galaxy.util import listify
-from galaxy.util import docstring_trim
+from galaxy.security.validate_user_input import (transform_publicname,
+ validate_email,
+ validate_password,
+ validate_publicname)
+from galaxy.util import biostar, hash_util, docstring_trim, listify
+from galaxy.util.json import dumps, loads
from galaxy.web import url_for
-from galaxy.web.base.controller import BaseUIController
-from galaxy.web.base.controller import UsesFormDefinitionsMixin
-from galaxy.web.base.controller import CreatesUsersMixin
-from galaxy.web.base.controller import CreatesApiKeysMixin
-from galaxy.web.form_builder import CheckboxField
-from galaxy.web.form_builder import build_select_field
-from galaxy.web.framework.helpers import time_ago, grids, escape
-from datetime import datetime, timedelta
-from galaxy.util import hash_util, biostar
+from galaxy.web.base.controller import (BaseUIController,
+ CreatesApiKeysMixin,
+ CreatesUsersMixin,
+ UsesFormDefinitionsMixin)
+from galaxy.web.form_builder import build_select_field, CheckboxField
+from galaxy.web.framework.helpers import escape, grids, time_ago
log = logging.getLogger( __name__ )
@@ -1022,12 +1020,10 @@
is_activation_sent = self.send_verification_email( trans, user.email, user.username )
if is_activation_sent:
message = 'The login information has been updated with the changes.<br>Verification email has been sent to your new email address. Please verify it by clicking the activation link in the email.<br>Please check your spam/trash folder in case you cannot find the message.'
- success = True
else:
message = 'Unable to send activation email, please contact your local Galaxy administrator.'
if trans.app.config.error_email_to is not None:
message += ' Contact: %s' % trans.app.config.error_email_to
- success = False
if ( user.username != username ):
user.username = username
trans.sa_session.add( user )
@@ -1542,7 +1538,7 @@
@web.require_login( "to undelete addresses" )
@web.expose
def undelete_address( self, trans, cntrller, address_id=None, **kwd ):
- return self.__delete_undelete_address( trans, cntrller, 'undelete', address_id=address_id, **kwd )
+ return self.__delete_undelete_address( trans, cntrller, 'undelete', address_id=address_id, **kwd )
def __delete_undelete_address( self, trans, cntrller, op, address_id=None, **kwd ):
is_admin = cntrller == 'admin' and trans.user_is_admin()
@@ -1742,7 +1738,6 @@
def __get_redirect_url( self, redirect ):
root_url = url_for( '/', qualified=True )
- redirect_url = '' # always start with redirect_url being empty
# compare urls, to prevent a redirect from pointing (directly) outside of galaxy
# or to enter a logout/login loop
if not util.compare_urls( root_url, redirect, compare_path=False ) or util.compare_urls( url_for( controller='user', action='logout', qualified=True ), redirect ):
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_2014.10.06 for changeset 9c482e1d9b3c
by commits-noreply@bitbucket.org 04 Dec '14
by commits-noreply@bitbucket.org 04 Dec '14
04 Dec '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/295fd99b1d57/
Changeset: 295fd99b1d57
Branch: stable
User: natefoo
Date: 2014-12-04 16:00:22+00:00
Summary: Update tag latest_2014.10.06 for changeset 9c482e1d9b3c
Affected #: 1 file
diff -r 9c482e1d9b3cfdb2936b3f230d434c1f27898eff -r 295fd99b1d578e4d58af673259b95e703750f757 .hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -20,4 +20,4 @@
ca45b78adb4152fc6e7395514d46eba6b7d0b838 release_2014.08.11
548ab24667d6206780237bd807f7d857a484c461 latest_2014.08.11
2092948937ac30ef82f71463a235c66d34987088 release_2014.10.06
-0e663285c74326737d4ff3c637d4c8aba8847755 latest_2014.10.06
+9c482e1d9b3cfdb2936b3f230d434c1f27898eff latest_2014.10.06
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 DynamicOptions AdditionalValueFilter when columns have not been assigned and to give value preference over name.
by commits-noreply@bitbucket.org 04 Dec '14
by commits-noreply@bitbucket.org 04 Dec '14
04 Dec '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/9c482e1d9b3c/
Changeset: 9c482e1d9b3c
Branch: stable
User: dan
Date: 2014-12-03 21:52:56+00:00
Summary: Fix for DynamicOptions AdditionalValueFilter when columns have not been assigned and to give value preference over name.
Affected #: 1 file
diff -r caade2c602d65a005d54997e95fcb1a9eab6ea17 -r 9c482e1d9b3cfdb2936b3f230d434c1f27898eff lib/galaxy/tools/parameters/dynamic_options.py
--- a/lib/galaxy/tools/parameters/dynamic_options.py
+++ b/lib/galaxy/tools/parameters/dynamic_options.py
@@ -301,8 +301,11 @@
add_value = []
for i in range( self.dynamic_option.largest_index + 1 ):
add_value.append( "" )
- add_value[self.dynamic_option.columns['value']] = self.value
- add_value[self.dynamic_option.columns['name']] = self.name
+ value_col = self.dynamic_option.columns.get( 'value', 0 )
+ name_col = self.dynamic_option.columns.get( 'name', value_col )
+ # Set name first, then value, in case they are the same column
+ add_value[ name_col ] = self.name
+ add_value[ value_col ] = self.value
if self.index is not None:
rval.insert( self.index, add_value )
else:
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: Merged in lance_parsons/galaxy-central-pull-requests/admin_cleanup_datasets_fix (pull request #586)
by commits-noreply@bitbucket.org 04 Dec '14
by commits-noreply@bitbucket.org 04 Dec '14
04 Dec '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/2cdf98534410/
Changeset: 2cdf98534410
User: natefoo
Date: 2014-12-04 15:33:52+00:00
Summary: Merged in lance_parsons/galaxy-central-pull-requests/admin_cleanup_datasets_fix (pull request #586)
Added pkg_resources to load required Mako package
Affected #: 1 file
diff -r 171511af9fcf2689e2761cf79e2cf02ff8324acc -r 2cdf98534410d48b1a10c03eec30901979955aca scripts/cleanup_datasets/admin_cleanup_datasets.py
--- a/scripts/cleanup_datasets/admin_cleanup_datasets.py
+++ b/scripts/cleanup_datasets/admin_cleanup_datasets.py
@@ -47,10 +47,10 @@
log.addHandler(logging.StreamHandler(sys.stdout))
from cleanup_datasets import CleanupDatasetsApplication
-#import pkg_resources
+import pkg_resources
#pkg_resources.require("SQLAlchemy >= 0.4")
-#pkg_resources.require("Mako")
+pkg_resources.require("Mako")
from mako.template import Template
import time
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
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/aa75079bf2cb/
Changeset: aa75079bf2cb
Branch: admin_cleanup_datasets_fix
User: lance_parsons
Date: 2014-12-03 19:50:56+00:00
Summary: Added pkg_resources to load required Mako package
Affected #: 1 file
diff -r 25d6c1903eceb8a2ed47459d1fefcfaed57e8995 -r aa75079bf2cb6e5a03774442aed99e2c16e540f5 scripts/cleanup_datasets/admin_cleanup_datasets.py
--- a/scripts/cleanup_datasets/admin_cleanup_datasets.py
+++ b/scripts/cleanup_datasets/admin_cleanup_datasets.py
@@ -47,10 +47,10 @@
log.addHandler(logging.StreamHandler(sys.stdout))
from cleanup_datasets import CleanupDatasetsApplication
-#import pkg_resources
+import pkg_resources
#pkg_resources.require("SQLAlchemy >= 0.4")
-#pkg_resources.require("Mako")
+pkg_resources.require("Mako")
from mako.template import Template
import time
https://bitbucket.org/galaxy/galaxy-central/commits/2cdf98534410/
Changeset: 2cdf98534410
User: natefoo
Date: 2014-12-04 15:33:52+00:00
Summary: Merged in lance_parsons/galaxy-central-pull-requests/admin_cleanup_datasets_fix (pull request #586)
Added pkg_resources to load required Mako package
Affected #: 1 file
diff -r 171511af9fcf2689e2761cf79e2cf02ff8324acc -r 2cdf98534410d48b1a10c03eec30901979955aca scripts/cleanup_datasets/admin_cleanup_datasets.py
--- a/scripts/cleanup_datasets/admin_cleanup_datasets.py
+++ b/scripts/cleanup_datasets/admin_cleanup_datasets.py
@@ -47,10 +47,10 @@
log.addHandler(logging.StreamHandler(sys.stdout))
from cleanup_datasets import CleanupDatasetsApplication
-#import pkg_resources
+import pkg_resources
#pkg_resources.require("SQLAlchemy >= 0.4")
-#pkg_resources.require("Mako")
+pkg_resources.require("Mako")
from mako.template import Template
import time
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: jmchilton: Merged in jmchilton/galaxy-central-fork-1 (pull request #575)
by commits-noreply@bitbucket.org 04 Dec '14
by commits-noreply@bitbucket.org 04 Dec '14
04 Dec '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/171511af9fcf/
Changeset: 171511af9fcf
User: jmchilton
Date: 2014-12-04 14:50:45+00:00
Summary: Merged in jmchilton/galaxy-central-fork-1 (pull request #575)
Allow using attribute 'optional' for data column parameters.
Affected #: 2 files
diff -r 100a7353b7faf9815783ec7f1245bb539a1b2717 -r 171511af9fcf2689e2761cf79e2cf02ff8324acc lib/galaxy/tools/parameters/basic.py
--- a/lib/galaxy/tools/parameters/basic.py
+++ b/lib/galaxy/tools/parameters/basic.py
@@ -1130,7 +1130,13 @@
SelectToolParameter.__init__( self, tool, elem )
self.tool = tool
self.numerical = string_as_bool( elem.get( "numerical", False ))
- self.force_select = string_as_bool( elem.get( "force_select", True ))
+ # Allow specifing force_select for backward compat., but probably
+ # should use optional going forward for consistency with other
+ # parameters.
+ if "force_select" in elem.attrib:
+ self.force_select = string_as_bool( elem.get( "force_select" ) )
+ else:
+ self.force_select = not string_as_bool( elem.get( "optional", False ) )
self.accept_default = string_as_bool( elem.get( "accept_default", False ))
self.data_ref = elem.get( "data_ref", None )
self.ref_input = None
diff -r 100a7353b7faf9815783ec7f1245bb539a1b2717 -r 171511af9fcf2689e2761cf79e2cf02ff8324acc test/unit/tools/test_column_parameters.py
--- a/test/unit/tools/test_column_parameters.py
+++ b/test/unit/tools/test_column_parameters.py
@@ -13,6 +13,21 @@
class DataColumnParameterTestCase( TestCase, tools_support.UsesApp ):
+ def test_not_optional_by_default(self):
+ assert not self.__param_optional()
+
+ def test_force_select_disable(self):
+ self.other_attributes = 'force_select="false"'
+ assert self.__param_optional()
+
+ def test_optional_override(self):
+ self.other_attributes = 'optional="true"'
+ assert self.__param_optional()
+
+ def __param_optional(self):
+ # TODO: don't break abstraction, try setting null value instead
+ return not self.param.force_select
+
def test_from_html(self):
value = self.param.from_html("3", self.trans, { "input_tsv": self.build_ready_hda() } )
assert value == "3"
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
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/df52b3de192d/
Changeset: df52b3de192d
User: jmchilton
Date: 2014-11-25 15:57:49+00:00
Summary: Allow using attribute 'optional' for data column parameters.
For consistency with other parameters, has the opposite effect of 'force_select'.
Affected #: 2 files
diff -r 69a6f901230540012d38f17adb1995d96f6a5dba -r df52b3de192d2edeffedd6fe325ecce6c3c33ddc lib/galaxy/tools/parameters/basic.py
--- a/lib/galaxy/tools/parameters/basic.py
+++ b/lib/galaxy/tools/parameters/basic.py
@@ -1125,7 +1125,13 @@
SelectToolParameter.__init__( self, tool, elem )
self.tool = tool
self.numerical = string_as_bool( elem.get( "numerical", False ))
- self.force_select = string_as_bool( elem.get( "force_select", True ))
+ # Allow specifing force_select for backward compat., but probably
+ # should use optional going forward for consistency with other
+ # parameters.
+ if "force_select" in elem.attrib:
+ self.force_select = string_as_bool( elem.get( "force_select" ) )
+ else:
+ self.force_select = not string_as_bool( elem.get( "optional", False ) )
self.accept_default = string_as_bool( elem.get( "accept_default", False ))
self.data_ref = elem.get( "data_ref", None )
self.ref_input = None
diff -r 69a6f901230540012d38f17adb1995d96f6a5dba -r df52b3de192d2edeffedd6fe325ecce6c3c33ddc test/unit/tools/test_column_parameters.py
--- a/test/unit/tools/test_column_parameters.py
+++ b/test/unit/tools/test_column_parameters.py
@@ -13,6 +13,21 @@
class DataColumnParameterTestCase( TestCase, tools_support.UsesApp ):
+ def test_not_optional_by_default(self):
+ assert not self.__param_optional()
+
+ def test_force_select_disable(self):
+ self.other_attributes = 'force_select="false"'
+ assert self.__param_optional()
+
+ def test_optional_override(self):
+ self.other_attributes = 'optional="true"'
+ assert self.__param_optional()
+
+ def __param_optional(self):
+ # TODO: don't break abstraction, try setting null value instead
+ return not self.param.force_select
+
def test_from_html(self):
value = self.param.from_html("3", self.trans, { "input_tsv": self.build_ready_hda() } )
assert value == "3"
https://bitbucket.org/galaxy/galaxy-central/commits/171511af9fcf/
Changeset: 171511af9fcf
User: jmchilton
Date: 2014-12-04 14:50:45+00:00
Summary: Merged in jmchilton/galaxy-central-fork-1 (pull request #575)
Allow using attribute 'optional' for data column parameters.
Affected #: 2 files
diff -r 100a7353b7faf9815783ec7f1245bb539a1b2717 -r 171511af9fcf2689e2761cf79e2cf02ff8324acc lib/galaxy/tools/parameters/basic.py
--- a/lib/galaxy/tools/parameters/basic.py
+++ b/lib/galaxy/tools/parameters/basic.py
@@ -1130,7 +1130,13 @@
SelectToolParameter.__init__( self, tool, elem )
self.tool = tool
self.numerical = string_as_bool( elem.get( "numerical", False ))
- self.force_select = string_as_bool( elem.get( "force_select", True ))
+ # Allow specifing force_select for backward compat., but probably
+ # should use optional going forward for consistency with other
+ # parameters.
+ if "force_select" in elem.attrib:
+ self.force_select = string_as_bool( elem.get( "force_select" ) )
+ else:
+ self.force_select = not string_as_bool( elem.get( "optional", False ) )
self.accept_default = string_as_bool( elem.get( "accept_default", False ))
self.data_ref = elem.get( "data_ref", None )
self.ref_input = None
diff -r 100a7353b7faf9815783ec7f1245bb539a1b2717 -r 171511af9fcf2689e2761cf79e2cf02ff8324acc test/unit/tools/test_column_parameters.py
--- a/test/unit/tools/test_column_parameters.py
+++ b/test/unit/tools/test_column_parameters.py
@@ -13,6 +13,21 @@
class DataColumnParameterTestCase( TestCase, tools_support.UsesApp ):
+ def test_not_optional_by_default(self):
+ assert not self.__param_optional()
+
+ def test_force_select_disable(self):
+ self.other_attributes = 'force_select="false"'
+ assert self.__param_optional()
+
+ def test_optional_override(self):
+ self.other_attributes = 'optional="true"'
+ assert self.__param_optional()
+
+ def __param_optional(self):
+ # TODO: don't break abstraction, try setting null value instead
+ return not self.param.force_select
+
def test_from_html(self):
value = self.param.from_html("3", self.trans, { "input_tsv": self.build_ready_hda() } )
assert value == "3"
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: Merged in dan/galaxy-central-prs/stable (pull request #584)
by commits-noreply@bitbucket.org 04 Dec '14
by commits-noreply@bitbucket.org 04 Dec '14
04 Dec '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/caade2c602d6/
Changeset: caade2c602d6
Branch: stable
User: natefoo
Date: 2014-12-04 14:20:19+00:00
Summary: Merged in dan/galaxy-central-prs/stable (pull request #584)
[STABLE] DatasetMatcher should check to see if hda is of the correct format before attempting to filter on e.g. metadata attributes (that may not exist for a non-expected format).
Affected #: 1 file
diff -r cfdd5c45c63eee193cdefa7767e9b43217238e88 -r caade2c602d65a005d54997e95fcb1a9eab6ea17 lib/galaxy/tools/parameters/dataset_matcher.py
--- a/lib/galaxy/tools/parameters/dataset_matcher.py
+++ b/lib/galaxy/tools/parameters/dataset_matcher.py
@@ -39,26 +39,30 @@
return state_valid and ( not check_security or self.__can_access_dataset( dataset ) )
def valid_hda_match( self, hda, check_implicit_conversions=True, check_security=False ):
- """ Return False of this parameter can not be matched to a the supplied
+ """ Return False of this parameter can not be matched to the supplied
HDA, otherwise return a description of the match (either a
HdaDirectMatch describing a direct match or a HdaImplicitMatch
describing an implicit conversion.)
"""
+ rval = False
+ formats = self.param.formats
+ if hda.datatype.matches_any( formats ):
+ rval = HdaDirectMatch( hda )
+ else:
+ if not check_implicit_conversions:
+ return False
+ target_ext, converted_dataset = hda.find_conversion_destination( formats )
+ if target_ext:
+ if converted_dataset:
+ hda = converted_dataset
+ if check_security and not self.__can_access_dataset( hda.dataset ):
+ return False
+ rval = HdaImplicitMatch( hda, target_ext )
+ else:
+ return False
if self.filter( hda ):
return False
- formats = self.param.formats
- if hda.datatype.matches_any( formats ):
- return HdaDirectMatch( hda )
- if not check_implicit_conversions:
- return False
- target_ext, converted_dataset = hda.find_conversion_destination( formats )
- if target_ext:
- if converted_dataset:
- hda = converted_dataset
- if check_security and not self.__can_access_dataset( hda.dataset ):
- return False
- return HdaImplicitMatch( hda, target_ext )
- return False
+ return rval
def hda_match( self, hda, check_implicit_conversions=True, ensure_visible=True ):
""" If HDA is accessible, return information about whether it could
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
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/f6914532d844/
Changeset: f6914532d844
Branch: stable
User: dan
Date: 2014-12-03 16:35:35+00:00
Summary: DatasetMatcher should check to see if hda is of the correct format before attempting to filter on e.g. metadata attributes (that may not exist for a non-expected format).
Affected #: 1 file
diff -r 26aab19109ce7956f29bfc4f5877e6950c0fae56 -r f6914532d8440041ee6741815355d36dac0c1b10 lib/galaxy/tools/parameters/dataset_matcher.py
--- a/lib/galaxy/tools/parameters/dataset_matcher.py
+++ b/lib/galaxy/tools/parameters/dataset_matcher.py
@@ -39,26 +39,30 @@
return state_valid and ( not check_security or self.__can_access_dataset( dataset ) )
def valid_hda_match( self, hda, check_implicit_conversions=True, check_security=False ):
- """ Return False of this parameter can not be matched to a the supplied
+ """ Return False of this parameter can not be matched to the supplied
HDA, otherwise return a description of the match (either a
HdaDirectMatch describing a direct match or a HdaImplicitMatch
describing an implicit conversion.)
"""
+ rval = False
+ formats = self.param.formats
+ if hda.datatype.matches_any( formats ):
+ rval = HdaDirectMatch( hda )
+ else:
+ if not check_implicit_conversions:
+ return False
+ target_ext, converted_dataset = hda.find_conversion_destination( formats )
+ if target_ext:
+ if converted_dataset:
+ hda = converted_dataset
+ if check_security and not self.__can_access_dataset( hda.dataset ):
+ return False
+ rval = HdaImplicitMatch( hda, target_ext )
+ else:
+ return False
if self.filter( hda ):
return False
- formats = self.param.formats
- if hda.datatype.matches_any( formats ):
- return HdaDirectMatch( hda )
- if not check_implicit_conversions:
- return False
- target_ext, converted_dataset = hda.find_conversion_destination( formats )
- if target_ext:
- if converted_dataset:
- hda = converted_dataset
- if check_security and not self.__can_access_dataset( hda.dataset ):
- return False
- return HdaImplicitMatch( hda, target_ext )
- return False
+ return rval
def hda_match( self, hda, check_implicit_conversions=True, ensure_visible=True ):
""" If HDA is accessible, return information about whether it could
https://bitbucket.org/galaxy/galaxy-central/commits/caade2c602d6/
Changeset: caade2c602d6
Branch: stable
User: natefoo
Date: 2014-12-04 14:20:19+00:00
Summary: Merged in dan/galaxy-central-prs/stable (pull request #584)
[STABLE] DatasetMatcher should check to see if hda is of the correct format before attempting to filter on e.g. metadata attributes (that may not exist for a non-expected format).
Affected #: 1 file
diff -r cfdd5c45c63eee193cdefa7767e9b43217238e88 -r caade2c602d65a005d54997e95fcb1a9eab6ea17 lib/galaxy/tools/parameters/dataset_matcher.py
--- a/lib/galaxy/tools/parameters/dataset_matcher.py
+++ b/lib/galaxy/tools/parameters/dataset_matcher.py
@@ -39,26 +39,30 @@
return state_valid and ( not check_security or self.__can_access_dataset( dataset ) )
def valid_hda_match( self, hda, check_implicit_conversions=True, check_security=False ):
- """ Return False of this parameter can not be matched to a the supplied
+ """ Return False of this parameter can not be matched to the supplied
HDA, otherwise return a description of the match (either a
HdaDirectMatch describing a direct match or a HdaImplicitMatch
describing an implicit conversion.)
"""
+ rval = False
+ formats = self.param.formats
+ if hda.datatype.matches_any( formats ):
+ rval = HdaDirectMatch( hda )
+ else:
+ if not check_implicit_conversions:
+ return False
+ target_ext, converted_dataset = hda.find_conversion_destination( formats )
+ if target_ext:
+ if converted_dataset:
+ hda = converted_dataset
+ if check_security and not self.__can_access_dataset( hda.dataset ):
+ return False
+ rval = HdaImplicitMatch( hda, target_ext )
+ else:
+ return False
if self.filter( hda ):
return False
- formats = self.param.formats
- if hda.datatype.matches_any( formats ):
- return HdaDirectMatch( hda )
- if not check_implicit_conversions:
- return False
- target_ext, converted_dataset = hda.find_conversion_destination( formats )
- if target_ext:
- if converted_dataset:
- hda = converted_dataset
- if check_security and not self.__can_access_dataset( hda.dataset ):
- return False
- return HdaImplicitMatch( hda, target_ext )
- return False
+ return rval
def hda_match( self, hda, check_implicit_conversions=True, ensure_visible=True ):
""" If HDA is accessible, return information about whether it could
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
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/ef86eb163f3f/
Changeset: ef86eb163f3f
User: jmchilton
Date: 2014-12-04 14:16:01+00:00
Summary: Easier debugging of API test problems.
Affected #: 1 file
diff -r 50fe8f57c2fbe71ec3ee7b7dd2b489a0d7c32d78 -r ef86eb163f3f66c046f7ca4ff0d829b38b0728d4 test/api/helpers.py
--- a/test/api/helpers.py
+++ b/test/api/helpers.py
@@ -76,7 +76,11 @@
return run_response.json()["outputs"][0]
def wait_for_history( self, history_id, assert_ok=False, timeout=DEFAULT_HISTORY_TIMEOUT ):
- return wait_on_state( lambda: self.galaxy_interactor.get( "histories/%s" % history_id ), assert_ok=assert_ok, timeout=timeout )
+ try:
+ return wait_on_state( lambda: self.galaxy_interactor.get( "histories/%s" % history_id ), assert_ok=assert_ok, timeout=timeout )
+ except AssertionError:
+ self.galaxy_interactor._summarize_history_errors( history_id )
+ raise
def wait_for_job( self, job_id, assert_ok=False, timeout=DEFAULT_HISTORY_TIMEOUT ):
return wait_on_state( lambda: self.galaxy_interactor.get( "jobs/%s" % job_id ), assert_ok=assert_ok, timeout=timeout )
https://bitbucket.org/galaxy/galaxy-central/commits/100a7353b7fa/
Changeset: 100a7353b7fa
User: jmchilton
Date: 2014-12-04 14:16:01+00:00
Summary: Remove seemingly unlinked to workflow action and template.
Please let me know if I missed something.
Affected #: 2 files
diff -r ef86eb163f3f66c046f7ca4ff0d829b38b0728d4 -r 100a7353b7faf9815783ec7f1245bb539a1b2717 lib/galaxy/webapps/galaxy/controllers/workflow.py
--- a/lib/galaxy/webapps/galaxy/controllers/workflow.py
+++ b/lib/galaxy/webapps/galaxy/controllers/workflow.py
@@ -407,27 +407,6 @@
@web.expose
@web.require_login( "use Galaxy workflows" )
- def edit_attributes( self, trans, id, **kwargs ):
- # Get workflow and do error checking.
- stored = self.get_stored_workflow( trans, id )
- if not stored:
- error( "You do not own this workflow or workflow ID is invalid." )
- # Update workflow attributes if new values submitted.
- if 'name' in kwargs:
- # Rename workflow.
- stored.name = sanitize_html( kwargs['name'] )
- if 'annotation' in kwargs:
- # Set workflow annotation; sanitize annotation before adding it.
- annotation = sanitize_html( kwargs[ 'annotation' ], 'utf-8', 'text/html' )
- self.add_item_annotation( trans.sa_session, trans.get_user(), stored, annotation )
- trans.sa_session.flush()
- return trans.fill_template( 'workflow/edit_attributes.mako',
- stored=stored,
- annotation=self.get_item_annotation_str( trans.sa_session, trans.user, stored )
- )
-
- @web.expose
- @web.require_login( "use Galaxy workflows" )
def rename( self, trans, id, new_name=None, **kwargs ):
stored = self.get_stored_workflow( trans, id )
if new_name is not None:
diff -r ef86eb163f3f66c046f7ca4ff0d829b38b0728d4 -r 100a7353b7faf9815783ec7f1245bb539a1b2717 templates/webapps/galaxy/workflow/edit_attributes.mako
--- a/templates/webapps/galaxy/workflow/edit_attributes.mako
+++ /dev/null
@@ -1,66 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-<%def name="title()">${_('Edit Workflow Attributes')}</%def>
-
-<%def name="stylesheets()">
- ${h.css( "base", "autocomplete_tagging" )}
-</%def>
-
-<%def name="javascripts()">
- ${parent.javascripts()}
- ${h.js( "libs/jquery/jquery.autocomplete", "galaxy.autocom_tagging" )}
-</%def>
-
-%if msg:
- ${render_msg( msg, messagetype )}
-%endif
-
-<%def name="body()">
- <div class="toolForm">
- <div class="toolFormTitle">${_('Edit Workflow Attributes')}</div>
- <div class="toolFormBody">
- <form name="edit_attributes" action="${h.url_for(controller='workflow', action='edit_attributes' )}" method="post">
- <input type="hidden" name="id" value="${trans.security.encode_id( stored.id )}"/>
- <div class="form-row">
- <label>
- Name:
- </label>
- <div style="float: left; width: 225px; margin-right: 10px;">
- <input type="text" name="name" value="${stored.name}" size="30"/>
- </div>
- <div style="clear: both"></div>
- </div>
- <%namespace file="/tagging_common.mako" import="render_individual_tagging_element" />
- <div class="form-row">
- <label>
- Tags:
- </label>
- <div style="float: left; width: 265px; margin-right: 10px; border-style: inset; border-width: 1px; margin-left: 2px">
- <style>
- .tag-area {
- border: none;
- }
- </style>
- ${render_individual_tagging_element(user=trans.get_user(), tagged_item=stored, elt_context="edit_attributes.mako", use_toggle_link=False, in_form=True, input_size="25")}
- </div>
- <div style="clear: both"></div>
- <div class="toolParamHelp">Apply tags to make it easy to search for and find items with the same tag.</div>
- </div>
- <div class="form-row">
- <label>
- Annotation / Notes:
- </label>
- <div style="float: left; width: 225px; margin-right: 10px;">
- <textarea name="annotation" cols="30" rows="2">${annotation}</textarea>
- </div>
- <div style="clear: both"></div>
- <div class="toolParamHelp">Add an annotation notes to a workflow; annotations are available when a workflow is viewed.</div>
- </div>
- <div class="form-row">
- <input type="submit" name="save" value="${_('Save')}"/>
- </div>
- </form>
- </div>
- </div>
-</%def>
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_2014.10.06 for changeset 0e663285c743
by commits-noreply@bitbucket.org 04 Dec '14
by commits-noreply@bitbucket.org 04 Dec '14
04 Dec '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/cfdd5c45c63e/
Changeset: cfdd5c45c63e
Branch: stable
User: natefoo
Date: 2014-12-04 14:00:18+00:00
Summary: Update tag latest_2014.10.06 for changeset 0e663285c743
Affected #: 1 file
diff -r 0e663285c74326737d4ff3c637d4c8aba8847755 -r cfdd5c45c63eee193cdefa7767e9b43217238e88 .hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -20,4 +20,4 @@
ca45b78adb4152fc6e7395514d46eba6b7d0b838 release_2014.08.11
548ab24667d6206780237bd807f7d857a484c461 latest_2014.08.11
2092948937ac30ef82f71463a235c66d34987088 release_2014.10.06
-546ff6ef27b4b83e26ae228c292fd981173ac550 latest_2014.10.06
+0e663285c74326737d4ff3c637d4c8aba8847755 latest_2014.10.06
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
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/0cfba5087d81/
Changeset: 0cfba5087d81
Branch: next-stable
User: guerler
Date: 2014-12-04 05:42:39+00:00
Summary: ToolForm: Fix error mapping
Affected #: 3 files
diff -r 97fdb9c106886f9f768b35b2cbe5fd164e95f3c7 -r 0cfba5087d81c4bd0add051cf1d0ab48d8a33cce 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
@@ -234,7 +234,11 @@
for (var i in head) {
var new_id = i;
if (id !== '') {
- new_id = id + '|' + new_id;
+ var separator = '|';
+ if (head instanceof Array) {
+ separator = '_';
+ }
+ new_id = id + separator + new_id;
}
search (new_id, head[i]);
}
diff -r 97fdb9c106886f9f768b35b2cbe5fd164e95f3c7 -r 0cfba5087d81c4bd0add051cf1d0ab48d8a33cce static/scripts/mvc/tools/tools-tree.js
--- a/static/scripts/mvc/tools/tools-tree.js
+++ b/static/scripts/mvc/tools/tools-tree.js
@@ -234,7 +234,11 @@
for (var i in head) {
var new_id = i;
if (id !== '') {
- new_id = id + '|' + new_id;
+ var separator = '|';
+ if (head instanceof Array) {
+ separator = '_';
+ }
+ new_id = id + separator + new_id;
}
search (new_id, head[i]);
}
diff -r 97fdb9c106886f9f768b35b2cbe5fd164e95f3c7 -r 0cfba5087d81c4bd0add051cf1d0ab48d8a33cce 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([],function(){return Backbone.Model.extend({initialize:function(a){this.app=a},refresh:function(){this.dict={};this.xml=$("<div/>");if(!this.app.section){return{}}this._iterate(this.app.section.$el,this.dict,this.xml)},finalize:function(d){d=d||{};var a=this;this.job_def={};this.job_ids={};function c(g,f,e){a.job_def[g]=e;a.job_ids[g]=f}function b(l,o){for(var j in o){var g=o[j];if(g.input){var q=g.input;var k=l;if(l!=""){k+="|"}k+=q.name;switch(q.type){case"repeat":var f="section-";var t=[];var n=null;for(var s in g){var m=s.indexOf(f);if(m!=-1){m+=f.length;t.push(parseInt(s.substr(m)));if(!n){n=s.substr(0,m)}}}t.sort(function(u,i){return u-i});var j=0;for(var h in t){b(k+"_"+j++,g[n+t[h]])}break;case"conditional":var r=a.app.field_list[q.id].value();if(d[q.test_param.type]){r=d[q.test_param.type](r)}c(k+"|"+q.test_param.name,q.id,r);var e=a.matchCase(q,r);if(e!=-1){b(k,o[q.id+"-section-"+e])}break;default:var p=a.app.field_list[q.id];var r=p.value();if(d[q.type]){r=d[q.type](r)}if(!p.skip){c(k,q.id,r)}}}}}b("",this.dict);return this.job_def},match:function(a){return this.job_ids&&this.job_ids[a]},matchCase:function(a,c){if(a.test_param.type=="boolean"){if(c=="true"){c=a.test_param.truevalue||"true"}else{c=a.test_param.falsevalue||"false"}}for(var b in a.cases){if(a.cases[b].value==c){return b}}return -1},matchModel:function(c,e){var a={};var b=this;function d(f,o){for(var l in o){var h=o[l];var m=h.name;if(f!=""){m=f+"|"+m}switch(h.type){case"repeat":for(var k in h.cache){d(m+"_"+k,h.cache[k])}break;case"conditional":var p=h.test_param&&h.test_param.value;var g=b.matchCase(h,p);if(g!=-1){d(m,h.cases[g].inputs)}break;default:var n=b.app.tree.job_ids[m];if(n){e(n,h)}}}}d("",c.inputs);return a},matchResponse:function(c){var a={};var b=this;function d(j,h){if(typeof h==="string"){var f=b.app.tree.job_ids[j];if(f){a[f]=h}}else{for(var g in h){var e=g;if(j!==""){e=j+"|"+e}d(e,h[g])}}}d("",c);return a},references:function(c,e){var g=[];var b=this;function d(h,j){var i=$(j).children();var l=[];var k=false;i.each(function(){var o=this;var n=$(o).attr("id");if(n!==c){var m=b.app.input_list[n];if(m){if(m.name==h){k=true;return false}if(m.data_ref==h&&m.type==e){l.push(n)}}}});if(!k){g=g.concat(l);i.each(function(){d(h,this)})}}var f=this.xml.find("#"+c);if(f.length>0){var a=this.app.input_list[c];if(a){d(a.name,f.parent())}}return g},_iterate:function(d,e,b){var a=this;var c=$(d).children();c.each(function(){var i=this;var h=$(i).attr("id");if($(i).hasClass("section-row")){e[h]={};var f=a.app.input_list[h];if(f){e[h]={input:f}}var g=$('<div id="'+h+'"/>');b.append(g);a._iterate(i,e[h],g)}else{a._iterate(i,e,b)}})}})});
\ No newline at end of file
+define([],function(){return Backbone.Model.extend({initialize:function(a){this.app=a},refresh:function(){this.dict={};this.xml=$("<div/>");if(!this.app.section){return{}}this._iterate(this.app.section.$el,this.dict,this.xml)},finalize:function(d){d=d||{};var a=this;this.job_def={};this.job_ids={};function c(g,f,e){a.job_def[g]=e;a.job_ids[g]=f}function b(l,o){for(var j in o){var g=o[j];if(g.input){var q=g.input;var k=l;if(l!=""){k+="|"}k+=q.name;switch(q.type){case"repeat":var f="section-";var t=[];var n=null;for(var s in g){var m=s.indexOf(f);if(m!=-1){m+=f.length;t.push(parseInt(s.substr(m)));if(!n){n=s.substr(0,m)}}}t.sort(function(u,i){return u-i});var j=0;for(var h in t){b(k+"_"+j++,g[n+t[h]])}break;case"conditional":var r=a.app.field_list[q.id].value();if(d[q.test_param.type]){r=d[q.test_param.type](r)}c(k+"|"+q.test_param.name,q.id,r);var e=a.matchCase(q,r);if(e!=-1){b(k,o[q.id+"-section-"+e])}break;default:var p=a.app.field_list[q.id];var r=p.value();if(d[q.type]){r=d[q.type](r)}if(!p.skip){c(k,q.id,r)}}}}}b("",this.dict);return this.job_def},match:function(a){return this.job_ids&&this.job_ids[a]},matchCase:function(a,c){if(a.test_param.type=="boolean"){if(c=="true"){c=a.test_param.truevalue||"true"}else{c=a.test_param.falsevalue||"false"}}for(var b in a.cases){if(a.cases[b].value==c){return b}}return -1},matchModel:function(c,e){var a={};var b=this;function d(f,o){for(var l in o){var h=o[l];var m=h.name;if(f!=""){m=f+"|"+m}switch(h.type){case"repeat":for(var k in h.cache){d(m+"_"+k,h.cache[k])}break;case"conditional":var p=h.test_param&&h.test_param.value;var g=b.matchCase(h,p);if(g!=-1){d(m,h.cases[g].inputs)}break;default:var n=b.app.tree.job_ids[m];if(n){e(n,h)}}}}d("",c.inputs);return a},matchResponse:function(c){var a={};var b=this;function d(k,h){if(typeof h==="string"){var f=b.app.tree.job_ids[k];if(f){a[f]=h}}else{for(var g in h){var e=g;if(k!==""){var j="|";if(h instanceof Array){j="_"}e=k+j+e}d(e,h[g])}}}d("",c);return a},references:function(c,e){var g=[];var b=this;function d(h,j){var i=$(j).children();var l=[];var k=false;i.each(function(){var o=this;var n=$(o).attr("id");if(n!==c){var m=b.app.input_list[n];if(m){if(m.name==h){k=true;return false}if(m.data_ref==h&&m.type==e){l.push(n)}}}});if(!k){g=g.concat(l);i.each(function(){d(h,this)})}}var f=this.xml.find("#"+c);if(f.length>0){var a=this.app.input_list[c];if(a){d(a.name,f.parent())}}return g},_iterate:function(d,e,b){var a=this;var c=$(d).children();c.each(function(){var i=this;var h=$(i).attr("id");if($(i).hasClass("section-row")){e[h]={};var f=a.app.input_list[h];if(f){e[h]={input:f}}var g=$('<div id="'+h+'"/>');b.append(g);a._iterate(i,e[h],g)}else{a._iterate(i,e,b)}})}})});
\ No newline at end of file
https://bitbucket.org/galaxy/galaxy-central/commits/50fe8f57c2fb/
Changeset: 50fe8f57c2fb
User: guerler
Date: 2014-12-04 05:43:07+00:00
Summary: Merge
Affected #: 3 files
diff -r 7591b8c658b50d484cacfa5aca61df0babfdaca2 -r 50fe8f57c2fbe71ec3ee7b7dd2b489a0d7c32d78 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
@@ -234,7 +234,11 @@
for (var i in head) {
var new_id = i;
if (id !== '') {
- new_id = id + '|' + new_id;
+ var separator = '|';
+ if (head instanceof Array) {
+ separator = '_';
+ }
+ new_id = id + separator + new_id;
}
search (new_id, head[i]);
}
diff -r 7591b8c658b50d484cacfa5aca61df0babfdaca2 -r 50fe8f57c2fbe71ec3ee7b7dd2b489a0d7c32d78 static/scripts/mvc/tools/tools-tree.js
--- a/static/scripts/mvc/tools/tools-tree.js
+++ b/static/scripts/mvc/tools/tools-tree.js
@@ -234,7 +234,11 @@
for (var i in head) {
var new_id = i;
if (id !== '') {
- new_id = id + '|' + new_id;
+ var separator = '|';
+ if (head instanceof Array) {
+ separator = '_';
+ }
+ new_id = id + separator + new_id;
}
search (new_id, head[i]);
}
diff -r 7591b8c658b50d484cacfa5aca61df0babfdaca2 -r 50fe8f57c2fbe71ec3ee7b7dd2b489a0d7c32d78 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([],function(){return Backbone.Model.extend({initialize:function(a){this.app=a},refresh:function(){this.dict={};this.xml=$("<div/>");if(!this.app.section){return{}}this._iterate(this.app.section.$el,this.dict,this.xml)},finalize:function(d){d=d||{};var a=this;this.job_def={};this.job_ids={};function c(g,f,e){a.job_def[g]=e;a.job_ids[g]=f}function b(l,o){for(var j in o){var g=o[j];if(g.input){var q=g.input;var k=l;if(l!=""){k+="|"}k+=q.name;switch(q.type){case"repeat":var f="section-";var t=[];var n=null;for(var s in g){var m=s.indexOf(f);if(m!=-1){m+=f.length;t.push(parseInt(s.substr(m)));if(!n){n=s.substr(0,m)}}}t.sort(function(u,i){return u-i});var j=0;for(var h in t){b(k+"_"+j++,g[n+t[h]])}break;case"conditional":var r=a.app.field_list[q.id].value();if(d[q.test_param.type]){r=d[q.test_param.type](r)}c(k+"|"+q.test_param.name,q.id,r);var e=a.matchCase(q,r);if(e!=-1){b(k,o[q.id+"-section-"+e])}break;default:var p=a.app.field_list[q.id];var r=p.value();if(d[q.type]){r=d[q.type](r)}if(!p.skip){c(k,q.id,r)}}}}}b("",this.dict);return this.job_def},match:function(a){return this.job_ids&&this.job_ids[a]},matchCase:function(a,c){if(a.test_param.type=="boolean"){if(c=="true"){c=a.test_param.truevalue||"true"}else{c=a.test_param.falsevalue||"false"}}for(var b in a.cases){if(a.cases[b].value==c){return b}}return -1},matchModel:function(c,e){var a={};var b=this;function d(f,o){for(var l in o){var h=o[l];var m=h.name;if(f!=""){m=f+"|"+m}switch(h.type){case"repeat":for(var k in h.cache){d(m+"_"+k,h.cache[k])}break;case"conditional":var p=h.test_param&&h.test_param.value;var g=b.matchCase(h,p);if(g!=-1){d(m,h.cases[g].inputs)}break;default:var n=b.app.tree.job_ids[m];if(n){e(n,h)}}}}d("",c.inputs);return a},matchResponse:function(c){var a={};var b=this;function d(j,h){if(typeof h==="string"){var f=b.app.tree.job_ids[j];if(f){a[f]=h}}else{for(var g in h){var e=g;if(j!==""){e=j+"|"+e}d(e,h[g])}}}d("",c);return a},references:function(c,e){var g=[];var b=this;function d(h,j){var i=$(j).children();var l=[];var k=false;i.each(function(){var o=this;var n=$(o).attr("id");if(n!==c){var m=b.app.input_list[n];if(m){if(m.name==h){k=true;return false}if(m.data_ref==h&&m.type==e){l.push(n)}}}});if(!k){g=g.concat(l);i.each(function(){d(h,this)})}}var f=this.xml.find("#"+c);if(f.length>0){var a=this.app.input_list[c];if(a){d(a.name,f.parent())}}return g},_iterate:function(d,e,b){var a=this;var c=$(d).children();c.each(function(){var i=this;var h=$(i).attr("id");if($(i).hasClass("section-row")){e[h]={};var f=a.app.input_list[h];if(f){e[h]={input:f}}var g=$('<div id="'+h+'"/>');b.append(g);a._iterate(i,e[h],g)}else{a._iterate(i,e,b)}})}})});
\ No newline at end of file
+define([],function(){return Backbone.Model.extend({initialize:function(a){this.app=a},refresh:function(){this.dict={};this.xml=$("<div/>");if(!this.app.section){return{}}this._iterate(this.app.section.$el,this.dict,this.xml)},finalize:function(d){d=d||{};var a=this;this.job_def={};this.job_ids={};function c(g,f,e){a.job_def[g]=e;a.job_ids[g]=f}function b(l,o){for(var j in o){var g=o[j];if(g.input){var q=g.input;var k=l;if(l!=""){k+="|"}k+=q.name;switch(q.type){case"repeat":var f="section-";var t=[];var n=null;for(var s in g){var m=s.indexOf(f);if(m!=-1){m+=f.length;t.push(parseInt(s.substr(m)));if(!n){n=s.substr(0,m)}}}t.sort(function(u,i){return u-i});var j=0;for(var h in t){b(k+"_"+j++,g[n+t[h]])}break;case"conditional":var r=a.app.field_list[q.id].value();if(d[q.test_param.type]){r=d[q.test_param.type](r)}c(k+"|"+q.test_param.name,q.id,r);var e=a.matchCase(q,r);if(e!=-1){b(k,o[q.id+"-section-"+e])}break;default:var p=a.app.field_list[q.id];var r=p.value();if(d[q.type]){r=d[q.type](r)}if(!p.skip){c(k,q.id,r)}}}}}b("",this.dict);return this.job_def},match:function(a){return this.job_ids&&this.job_ids[a]},matchCase:function(a,c){if(a.test_param.type=="boolean"){if(c=="true"){c=a.test_param.truevalue||"true"}else{c=a.test_param.falsevalue||"false"}}for(var b in a.cases){if(a.cases[b].value==c){return b}}return -1},matchModel:function(c,e){var a={};var b=this;function d(f,o){for(var l in o){var h=o[l];var m=h.name;if(f!=""){m=f+"|"+m}switch(h.type){case"repeat":for(var k in h.cache){d(m+"_"+k,h.cache[k])}break;case"conditional":var p=h.test_param&&h.test_param.value;var g=b.matchCase(h,p);if(g!=-1){d(m,h.cases[g].inputs)}break;default:var n=b.app.tree.job_ids[m];if(n){e(n,h)}}}}d("",c.inputs);return a},matchResponse:function(c){var a={};var b=this;function d(k,h){if(typeof h==="string"){var f=b.app.tree.job_ids[k];if(f){a[f]=h}}else{for(var g in h){var e=g;if(k!==""){var j="|";if(h instanceof Array){j="_"}e=k+j+e}d(e,h[g])}}}d("",c);return a},references:function(c,e){var g=[];var b=this;function d(h,j){var i=$(j).children();var l=[];var k=false;i.each(function(){var o=this;var n=$(o).attr("id");if(n!==c){var m=b.app.input_list[n];if(m){if(m.name==h){k=true;return false}if(m.data_ref==h&&m.type==e){l.push(n)}}}});if(!k){g=g.concat(l);i.each(function(){d(h,this)})}}var f=this.xml.find("#"+c);if(f.length>0){var a=this.app.input_list[c];if(a){d(a.name,f.parent())}}return g},_iterate:function(d,e,b){var a=this;var c=$(d).children();c.each(function(){var i=this;var h=$(i).attr("id");if($(i).hasClass("section-row")){e[h]={};var f=a.app.input_list[h];if(f){e[h]={input:f}}var g=$('<div id="'+h+'"/>');b.append(g);a._iterate(i,e[h],g)}else{a._iterate(i,e,b)}})}})});
\ No newline at end of file
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
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/97fdb9c10688/
Changeset: 97fdb9c10688
Branch: next-stable
User: guerler
Date: 2014-12-04 04:49:15+00:00
Summary: Fix inf swapping for json
Affected #: 1 file
diff -r 06d53d20887d55bf27f412c2248741e940d5424f -r 97fdb9c106886f9f768b35b2cbe5fd164e95f3c7 lib/galaxy/util/json.py
--- a/lib/galaxy/util/json.py
+++ b/lib/galaxy/util/json.py
@@ -48,6 +48,8 @@
return "__Infinity__"
elif val == float("-inf"):
return "__-Infinity__"
+ else:
+ return val
else:
return val
https://bitbucket.org/galaxy/galaxy-central/commits/7591b8c658b5/
Changeset: 7591b8c658b5
User: guerler
Date: 2014-12-04 04:49:43+00:00
Summary: Merge
Affected #: 1 file
diff -r 1deca66fc876e855e8f286b6f0cd610227276e48 -r 7591b8c658b50d484cacfa5aca61df0babfdaca2 lib/galaxy/util/json.py
--- a/lib/galaxy/util/json.py
+++ b/lib/galaxy/util/json.py
@@ -48,6 +48,8 @@
return "__Infinity__"
elif val == float("-inf"):
return "__-Infinity__"
+ else:
+ return val
else:
return val
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: jmchilton: Re-attempt fix in 37cf9cd.
by commits-noreply@bitbucket.org 04 Dec '14
by commits-noreply@bitbucket.org 04 Dec '14
04 Dec '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/1deca66fc876/
Changeset: 1deca66fc876
User: jmchilton
Date: 2014-12-04 03:38:37+00:00
Summary: Re-attempt fix in 37cf9cd.
Affected #: 2 files
diff -r f2e8f6fdeb720a4c1d4643306f45f13bb9fc8924 -r 1deca66fc876e855e8f286b6f0cd610227276e48 lib/galaxy/tools/parameters/basic.py
--- a/lib/galaxy/tools/parameters/basic.py
+++ b/lib/galaxy/tools/parameters/basic.py
@@ -2222,10 +2222,6 @@
raise ValueError( "History does not include a dataset collection of the correct type or containing the correct types of datasets" )
if value in [None, "None"]:
return None
- # would really like to not need to handle lists in here but
- # doing it for uniformity with DataToolParameters for now.
- if isinstance( value, list ):
- value = value[ 0 ]
if isinstance( value, str ) and value.find( "," ) > 0:
value = [ int( value_part ) for value_part in value.split( "," ) ]
elif isinstance( value, trans.app.model.HistoryDatasetCollectionAssociation ):
diff -r f2e8f6fdeb720a4c1d4643306f45f13bb9fc8924 -r 1deca66fc876e855e8f286b6f0cd610227276e48 lib/galaxy/tools/parameters/meta.py
--- a/lib/galaxy/tools/parameters/meta.py
+++ b/lib/galaxy/tools/parameters/meta.py
@@ -123,6 +123,10 @@
def __collection_multirun_parameter( value ):
+ is_batch = value.get( 'batch', False )
+ if not is_batch:
+ return False
+
batch_values = util.listify( value[ 'values' ] )
if len( batch_values ) == 1:
batch_over = batch_values[ 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: guerler: ToolForm: Add data collection parameter
by commits-noreply@bitbucket.org 03 Dec '14
by commits-noreply@bitbucket.org 03 Dec '14
03 Dec '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/f2e8f6fdeb72/
Changeset: f2e8f6fdeb72
User: guerler
Date: 2014-12-03 22:29:34+00:00
Summary: ToolForm: Add data collection parameter
Affected #: 7 files
diff -r caf0f2bf161d9cd6e8fe6a205c6c967d5495c0fe -r f2e8f6fdeb720a4c1d4643306f45f13bb9fc8924 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
@@ -307,6 +307,11 @@
field = this._fieldData(input_def);
break;
+ // collection selector
+ //case 'data_collection':
+ // field = this._fieldData(input_def);
+ // break;
+
// data column
case 'data_column':
field = this._fieldSelect(input_def);
@@ -383,6 +388,7 @@
id : 'field-' + input_def.id,
extensions : input_def.extensions,
multiple : input_def.multiple,
+ type : input_def.type,
data : input_def.options,
onchange : function() {
self.app.refresh();
diff -r caf0f2bf161d9cd6e8fe6a205c6c967d5495c0fe -r f2e8f6fdeb720a4c1d4643306f45f13bb9fc8924 client/galaxy/scripts/mvc/tools/tools-select-content.js
--- a/client/galaxy/scripts/mvc/tools/tools-select-content.js
+++ b/client/galaxy/scripts/mvc/tools/tools-select-content.js
@@ -20,15 +20,23 @@
// radio button options
var radio_buttons = [];
+ // identify selector type
+ if (options.type == 'data_collection') {
+ this.mode = 'collection';
+ } else {
+ if (options.multiple) {
+ this.mode = 'multiple';
+ } else {
+ this.mode = 'single';
+ }
+ }
+
// set initial state
- if (!options.multiple) {
- this.current = 'single';
- } else {
- this.current = 'multiple';
- }
-
+ this.current = this.mode;
+ this.list = {};
+
// add single dataset selector
- if (!options.multiple) {
+ if (this.mode == 'single') {
radio_buttons.push({icon: 'fa-file-o', label : 'Single dataset', value : 'single'});
this.select_single = new Ui.Select.View({
onchange : function() {
@@ -42,29 +50,33 @@
}
// add multiple dataset selector
- radio_buttons.push({icon: 'fa-files-o', label : 'Multiple datasets', value : 'multiple' });
- this.select_multiple = new Ui.Select.View({
- multiple : true,
- onchange : function() {
- self.trigger('change');
- }
- });
- this.list['multiple'] = {
- field: this.select_multiple,
- type : 'hda'
- };
+ if (this.mode == 'single' || this.mode == 'multiple') {
+ radio_buttons.push({icon: 'fa-files-o', label : 'Multiple datasets', value : 'multiple' });
+ this.select_multiple = new Ui.Select.View({
+ multiple : true,
+ onchange : function() {
+ self.trigger('change');
+ }
+ });
+ this.list['multiple'] = {
+ field: this.select_multiple,
+ type : 'hda'
+ };
+ }
// add collection selector
- radio_buttons.push({icon: 'fa-folder-o', label : 'List of datasets', value : 'collection' });
- this.select_collection = new Ui.Select.View({
- onchange : function() {
- self.trigger('change');
- }
- });
- this.list['collection'] = {
- field: this.select_collection,
- type : 'hdca'
- };
+ if (this.mode == 'single' || this.mode == 'collection') {
+ radio_buttons.push({icon: 'fa-folder-o', label : 'List of datasets', value : 'collection' });
+ this.select_collection = new Ui.Select.View({
+ onchange : function() {
+ self.trigger('change');
+ }
+ });
+ this.list['collection'] = {
+ field: this.select_collection,
+ type : 'hdca'
+ };
+ }
// create button
this.button_type = new Ui.RadioButton.View({
@@ -81,7 +93,9 @@
this.$batch = $(ToolTemplate.batchMode());
// add elements to dom
- this.$el.append(Utils.wrap(this.button_type.$el));
+ if (_.size(this.list) > 1) {
+ this.$el.append(Utils.wrap(this.button_type.$el));
+ }
for (var i in this.list) {
this.$el.append(this.list[i].field.$el);
}
@@ -144,8 +158,8 @@
// update selection fields
this.select_single && this.select_single.update(dataset_options);
- this.select_multiple.update(dataset_options);
- this.select_collection.update(collection_options);
+ this.select_multiple && this.select_multiple.update(dataset_options);
+ this.select_collection && this.select_collection.update(collection_options);
// add to content list
this.app.content.add(options);
@@ -167,7 +181,7 @@
this.current = 'collection';
this.select_collection.value(list[0]);
} else {
- if (list.length > 1 || this.options.multiple) {
+ if (this.mode == 'multiple') {
this.current = 'multiple';
this.select_multiple.value(list);
} else {
@@ -195,7 +209,7 @@
// prepare result dict
var result = {
- batch : !this.options.multiple && this.current != 'single',
+ batch : this.mode == 'single' && this.current != 'single',
values : []
}
@@ -227,7 +241,7 @@
$el.hide();
}
}
- if (this.current != 'single' && !this.options.multiple) {
+ if (this.mode == 'single' && this.current != 'single') {
this.$batch.show();
} else {
this.$batch.hide();
diff -r caf0f2bf161d9cd6e8fe6a205c6c967d5495c0fe -r f2e8f6fdeb720a4c1d4643306f45f13bb9fc8924 lib/galaxy/tools/parameters/basic.py
--- a/lib/galaxy/tools/parameters/basic.py
+++ b/lib/galaxy/tools/parameters/basic.py
@@ -2314,6 +2314,47 @@
return d
+ def to_dict( self, trans, view='collection', value_mapper=None, other_values=None ):
+ # create dictionary and fill default parameters
+ d = super( DataCollectionToolParameter, self ).to_dict( trans )
+ d['multiple'] = self.multiple
+ d['is_dynamic'] = False
+ d['options'] = {'hda': [], 'hdca': []}
+
+ # return default content if context is not available
+ if other_values is None:
+ return d
+
+ # prepare dataset/collection matching
+ dataset_matcher = DatasetMatcher( trans, self, None, other_values )
+ history = trans.history
+
+ # append directly matched collections
+ for hdca in self.match_collections( trans, history, dataset_matcher ):
+ d['options']['hdca'].append({
+ 'id' : trans.security.encode_id( hdca.id ),
+ 'id_uncoded' : hdca.id,
+ 'hid' : hdca.hid,
+ 'name' : hdca.name,
+ 'src' : 'hdca'
+ })
+
+ # append matching subcollections
+ for hdca in self.match_multirun_collections( trans, history, dataset_matcher ):
+ subcollection_type = self._history_query( trans ).collection_type_description.collection_type
+ d['options']['hdca'].append({
+ 'id' : trans.security.encode_id( hdca.id ),
+ 'id_uncoded' : hdca.id,
+ 'hid' : hdca.hid,
+ 'name' : hdca.name,
+ 'src' : 'hdca'
+ })
+
+ # sort both lists
+ d['options']['hdca'] = sorted(d['options']['hdca'], key=lambda k: k['hid'], reverse=True)
+
+ # return final dictionary
+ return d
class HiddenDataToolParameter( HiddenToolParameter, DataToolParameter ):
"""
diff -r caf0f2bf161d9cd6e8fe6a205c6c967d5495c0fe -r f2e8f6fdeb720a4c1d4643306f45f13bb9fc8924 static/scripts/mvc/tools/tools-section.js
--- a/static/scripts/mvc/tools/tools-section.js
+++ b/static/scripts/mvc/tools/tools-section.js
@@ -307,6 +307,11 @@
field = this._fieldData(input_def);
break;
+ // collection selector
+ //case 'data_collection':
+ // field = this._fieldData(input_def);
+ // break;
+
// data column
case 'data_column':
field = this._fieldSelect(input_def);
@@ -383,6 +388,7 @@
id : 'field-' + input_def.id,
extensions : input_def.extensions,
multiple : input_def.multiple,
+ type : input_def.type,
data : input_def.options,
onchange : function() {
self.app.refresh();
diff -r caf0f2bf161d9cd6e8fe6a205c6c967d5495c0fe -r f2e8f6fdeb720a4c1d4643306f45f13bb9fc8924 static/scripts/mvc/tools/tools-select-content.js
--- a/static/scripts/mvc/tools/tools-select-content.js
+++ b/static/scripts/mvc/tools/tools-select-content.js
@@ -20,15 +20,23 @@
// radio button options
var radio_buttons = [];
+ // identify selector type
+ if (options.type == 'data_collection') {
+ this.mode = 'collection';
+ } else {
+ if (options.multiple) {
+ this.mode = 'multiple';
+ } else {
+ this.mode = 'single';
+ }
+ }
+
// set initial state
- if (!options.multiple) {
- this.current = 'single';
- } else {
- this.current = 'multiple';
- }
-
+ this.current = this.mode;
+ this.list = {};
+
// add single dataset selector
- if (!options.multiple) {
+ if (this.mode == 'single') {
radio_buttons.push({icon: 'fa-file-o', label : 'Single dataset', value : 'single'});
this.select_single = new Ui.Select.View({
onchange : function() {
@@ -42,29 +50,33 @@
}
// add multiple dataset selector
- radio_buttons.push({icon: 'fa-files-o', label : 'Multiple datasets', value : 'multiple' });
- this.select_multiple = new Ui.Select.View({
- multiple : true,
- onchange : function() {
- self.trigger('change');
- }
- });
- this.list['multiple'] = {
- field: this.select_multiple,
- type : 'hda'
- };
+ if (this.mode == 'single' || this.mode == 'multiple') {
+ radio_buttons.push({icon: 'fa-files-o', label : 'Multiple datasets', value : 'multiple' });
+ this.select_multiple = new Ui.Select.View({
+ multiple : true,
+ onchange : function() {
+ self.trigger('change');
+ }
+ });
+ this.list['multiple'] = {
+ field: this.select_multiple,
+ type : 'hda'
+ };
+ }
// add collection selector
- radio_buttons.push({icon: 'fa-folder-o', label : 'List of datasets', value : 'collection' });
- this.select_collection = new Ui.Select.View({
- onchange : function() {
- self.trigger('change');
- }
- });
- this.list['collection'] = {
- field: this.select_collection,
- type : 'hdca'
- };
+ if (this.mode == 'single' || this.mode == 'collection') {
+ radio_buttons.push({icon: 'fa-folder-o', label : 'List of datasets', value : 'collection' });
+ this.select_collection = new Ui.Select.View({
+ onchange : function() {
+ self.trigger('change');
+ }
+ });
+ this.list['collection'] = {
+ field: this.select_collection,
+ type : 'hdca'
+ };
+ }
// create button
this.button_type = new Ui.RadioButton.View({
@@ -81,7 +93,9 @@
this.$batch = $(ToolTemplate.batchMode());
// add elements to dom
- this.$el.append(Utils.wrap(this.button_type.$el));
+ if (_.size(this.list) > 1) {
+ this.$el.append(Utils.wrap(this.button_type.$el));
+ }
for (var i in this.list) {
this.$el.append(this.list[i].field.$el);
}
@@ -144,8 +158,8 @@
// update selection fields
this.select_single && this.select_single.update(dataset_options);
- this.select_multiple.update(dataset_options);
- this.select_collection.update(collection_options);
+ this.select_multiple && this.select_multiple.update(dataset_options);
+ this.select_collection && this.select_collection.update(collection_options);
// add to content list
this.app.content.add(options);
@@ -167,7 +181,7 @@
this.current = 'collection';
this.select_collection.value(list[0]);
} else {
- if (list.length > 1 || this.options.multiple) {
+ if (this.mode == 'multiple') {
this.current = 'multiple';
this.select_multiple.value(list);
} else {
@@ -195,7 +209,7 @@
// prepare result dict
var result = {
- batch : !this.options.multiple && this.current != 'single',
+ batch : this.mode == 'single' && this.current != 'single',
values : []
}
@@ -227,7 +241,7 @@
$el.hide();
}
}
- if (this.current != 'single' && !this.options.multiple) {
+ if (this.mode == 'single' && this.current != 'single') {
this.$batch.show();
} else {
this.$batch.hide();
diff -r caf0f2bf161d9cd6e8fe6a205c6c967d5495c0fe -r f2e8f6fdeb720a4c1d4643306f45f13bb9fc8924 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/tools/tools-repeat","mvc/tools/tools-select-content","mvc/tools/tools-input"],function(d,b,g,c,a,e){var f=Backbone.View.extend({initialize:function(i,h){this.app=i;this.inputs=h.inputs;h.cls_tr="section-row";this.table=new b.View(h);this.setElement(this.table.$el);this.render()},render:function(){this.table.delAll();for(var h in this.inputs){this._add(this.inputs[h])}},_add:function(j){var i=this;var h=jQuery.extend(true,{},j);h.id=j.id=d.uuid();this.app.input_list[h.id]=h;var k=h.type;switch(k){case"conditional":this._addConditional(h);break;case"repeat":this._addRepeat(h);break;default:this._addRow(h)}},_addConditional:function(h){var j=this;h.test_param.id=h.id;var m=this._addRow(h.test_param);m.options.onchange=function(t){var p=j.app.tree.matchCase(h,t);for(var r in h.cases){var w=h.cases[r];var u=h.id+"-section-"+r;var o=j.table.get(u);var v=false;for(var q in w.inputs){var s=w.inputs[q].type;if(s&&s!=="hidden"){v=true;break}}if(r==p&&v){o.fadeIn("fast")}else{o.hide()}}j.app.refresh()};for(var l in h.cases){var k=h.id+"-section-"+l;var n=new f(this.app,{inputs:h.cases[l].inputs,cls:"ui-table-plain"});n.$el.addClass("ui-table-form-section");this.table.add(n.$el);this.table.append(k)}m.trigger("change")},_addRepeat:function(o){var r=this;var p=0;function m(i,t){var s=o.id+"-section-"+(p++);var u=null;if(t){u=function(){k.del(s);k.retitle(o.title);r.app.rebuild();r.app.refresh()}}var v=new f(r.app,{inputs:i,cls:"ui-table-plain"});k.add({id:s,title:o.title,$el:v.$el,ondel:u});k.retitle(o.title)}var k=new c.View({title_new:o.title,max:o.max,onnew:function(){m(o.inputs,true);r.app.rebuild();r.app.refresh()}});var h=o.min;var q=_.size(o.cache);for(var l=0;l<Math.max(q,h);l++){var n=null;if(l<q){n=o.cache[l]}else{n=o.inputs}m(n,l>=h)}var j=new e(this.app,{label:o.title,help:o.help,field:k});j.$el.addClass("ui-table-form-section");this.table.add(j.$el);this.table.append(o.id)},_addRow:function(h){var k=h.id;var i=this._createField(h);if(h.is_dynamic){this.app.is_dynamic=true}this.app.field_list[k]=i;var j=new e(this.app,{label:h.label,optional:h.optional,help:h.help,field:i});this.app.element_list[k]=j;this.table.add(j.$el);this.table.append(k);return i},_createField:function(h){var i=null;switch(h.type){case"text":i=this._fieldText(h);break;case"select":i=this._fieldSelect(h);break;case"data":i=this._fieldData(h);break;case"data_column":i=this._fieldSelect(h);break;case"hidden":i=this._fieldHidden(h);break;case"integer":i=this._fieldSlider(h);break;case"float":i=this._fieldSlider(h);break;case"boolean":i=this._fieldBoolean(h);break;case"genomebuild":h.searchable=true;i=this._fieldSelect(h);break;case"drill_down":i=this._fieldDrilldown(h);break;case"baseurl":i=this._fieldHidden(h);break;default:this.app.incompatible=true;if(h.options){i=this._fieldSelect(h)}else{i=this._fieldText(h)}console.debug("tools-form::_addRow() : Auto matched field type ("+h.type+").")}if(h.value!==undefined){i.value(h.value)}return i},_fieldData:function(h){var i=this;return new a.View(this.app,{id:"field-"+h.id,extensions:h.extensions,multiple:h.multiple,data:h.options,onchange:function(){i.app.refresh()}})},_fieldSelect:function(h){var k=[];for(var l in h.options){var m=h.options[l];k.push({label:m[0],value:m[1]})}var n=g.Select;switch(h.display){case"checkboxes":n=g.Checkbox;break;case"radio":n=g.Radio;break}var j=this;return new n.View({id:"field-"+h.id,data:k,multiple:h.multiple,searchable:h.searchable,onchange:function(){j.app.refresh()}})},_fieldDrilldown:function(h){var i=this;return new g.Drilldown.View({id:"field-"+h.id,data:h.options,display:h.display,onchange:function(){i.app.refresh()}})},_fieldText:function(h){var i=this;return new g.Input({id:"field-"+h.id,area:h.area,onchange:function(){i.app.refresh()}})},_fieldSlider:function(h){return new g.Slider.View({id:"field-"+h.id,precise:h.type=="float",min:h.min,max:h.max})},_fieldHidden:function(h){return new g.Hidden({id:"field-"+h.id})},_fieldBoolean:function(h){return new g.RadioButton.View({id:"field-"+h.id,data:[{label:"Yes",value:"true"},{label:"No",value:"false"}]})}});return{View:f}});
\ No newline at end of file
+define(["utils/utils","mvc/ui/ui-table","mvc/ui/ui-misc","mvc/tools/tools-repeat","mvc/tools/tools-select-content","mvc/tools/tools-input"],function(d,b,g,c,a,e){var f=Backbone.View.extend({initialize:function(i,h){this.app=i;this.inputs=h.inputs;h.cls_tr="section-row";this.table=new b.View(h);this.setElement(this.table.$el);this.render()},render:function(){this.table.delAll();for(var h in this.inputs){this._add(this.inputs[h])}},_add:function(j){var i=this;var h=jQuery.extend(true,{},j);h.id=j.id=d.uuid();this.app.input_list[h.id]=h;var k=h.type;switch(k){case"conditional":this._addConditional(h);break;case"repeat":this._addRepeat(h);break;default:this._addRow(h)}},_addConditional:function(h){var j=this;h.test_param.id=h.id;var m=this._addRow(h.test_param);m.options.onchange=function(t){var p=j.app.tree.matchCase(h,t);for(var r in h.cases){var w=h.cases[r];var u=h.id+"-section-"+r;var o=j.table.get(u);var v=false;for(var q in w.inputs){var s=w.inputs[q].type;if(s&&s!=="hidden"){v=true;break}}if(r==p&&v){o.fadeIn("fast")}else{o.hide()}}j.app.refresh()};for(var l in h.cases){var k=h.id+"-section-"+l;var n=new f(this.app,{inputs:h.cases[l].inputs,cls:"ui-table-plain"});n.$el.addClass("ui-table-form-section");this.table.add(n.$el);this.table.append(k)}m.trigger("change")},_addRepeat:function(o){var r=this;var p=0;function m(i,t){var s=o.id+"-section-"+(p++);var u=null;if(t){u=function(){k.del(s);k.retitle(o.title);r.app.rebuild();r.app.refresh()}}var v=new f(r.app,{inputs:i,cls:"ui-table-plain"});k.add({id:s,title:o.title,$el:v.$el,ondel:u});k.retitle(o.title)}var k=new c.View({title_new:o.title,max:o.max,onnew:function(){m(o.inputs,true);r.app.rebuild();r.app.refresh()}});var h=o.min;var q=_.size(o.cache);for(var l=0;l<Math.max(q,h);l++){var n=null;if(l<q){n=o.cache[l]}else{n=o.inputs}m(n,l>=h)}var j=new e(this.app,{label:o.title,help:o.help,field:k});j.$el.addClass("ui-table-form-section");this.table.add(j.$el);this.table.append(o.id)},_addRow:function(h){var k=h.id;var i=this._createField(h);if(h.is_dynamic){this.app.is_dynamic=true}this.app.field_list[k]=i;var j=new e(this.app,{label:h.label,optional:h.optional,help:h.help,field:i});this.app.element_list[k]=j;this.table.add(j.$el);this.table.append(k);return i},_createField:function(h){var i=null;switch(h.type){case"text":i=this._fieldText(h);break;case"select":i=this._fieldSelect(h);break;case"data":i=this._fieldData(h);break;case"data_column":i=this._fieldSelect(h);break;case"hidden":i=this._fieldHidden(h);break;case"integer":i=this._fieldSlider(h);break;case"float":i=this._fieldSlider(h);break;case"boolean":i=this._fieldBoolean(h);break;case"genomebuild":h.searchable=true;i=this._fieldSelect(h);break;case"drill_down":i=this._fieldDrilldown(h);break;case"baseurl":i=this._fieldHidden(h);break;default:this.app.incompatible=true;if(h.options){i=this._fieldSelect(h)}else{i=this._fieldText(h)}console.debug("tools-form::_addRow() : Auto matched field type ("+h.type+").")}if(h.value!==undefined){i.value(h.value)}return i},_fieldData:function(h){var i=this;return new a.View(this.app,{id:"field-"+h.id,extensions:h.extensions,multiple:h.multiple,type:h.type,data:h.options,onchange:function(){i.app.refresh()}})},_fieldSelect:function(h){var k=[];for(var l in h.options){var m=h.options[l];k.push({label:m[0],value:m[1]})}var n=g.Select;switch(h.display){case"checkboxes":n=g.Checkbox;break;case"radio":n=g.Radio;break}var j=this;return new n.View({id:"field-"+h.id,data:k,multiple:h.multiple,searchable:h.searchable,onchange:function(){j.app.refresh()}})},_fieldDrilldown:function(h){var i=this;return new g.Drilldown.View({id:"field-"+h.id,data:h.options,display:h.display,onchange:function(){i.app.refresh()}})},_fieldText:function(h){var i=this;return new g.Input({id:"field-"+h.id,area:h.area,onchange:function(){i.app.refresh()}})},_fieldSlider:function(h){return new g.Slider.View({id:"field-"+h.id,precise:h.type=="float",min:h.min,max:h.max})},_fieldHidden:function(h){return new g.Hidden({id:"field-"+h.id})},_fieldBoolean:function(h){return new g.RadioButton.View({id:"field-"+h.id,data:[{label:"Yes",value:"true"},{label:"No",value:"false"}]})}});return{View:f}});
\ No newline at end of file
diff -r caf0f2bf161d9cd6e8fe6a205c6c967d5495c0fe -r f2e8f6fdeb720a4c1d4643306f45f13bb9fc8924 static/scripts/packed/mvc/tools/tools-select-content.js
--- a/static/scripts/packed/mvc/tools/tools-select-content.js
+++ b/static/scripts/packed/mvc/tools/tools-select-content.js
@@ -1,1 +1,1 @@
-define(["utils/utils","mvc/ui/ui-misc","mvc/ui/ui-tabs","mvc/tools/tools-template"],function(c,e,b,a){var d=Backbone.View.extend({initialize:function(k,g){this.app=k;this.options=g;var f=this;this.setElement("<div/>");this.list={};var j=[];if(!g.multiple){this.current="single"}else{this.current="multiple"}if(!g.multiple){j.push({icon:"fa-file-o",label:"Single dataset",value:"single"});this.select_single=new e.Select.View({onchange:function(){f.trigger("change")}});this.list.single={field:this.select_single,type:"hda"}}j.push({icon:"fa-files-o",label:"Multiple datasets",value:"multiple"});this.select_multiple=new e.Select.View({multiple:true,onchange:function(){f.trigger("change")}});this.list.multiple={field:this.select_multiple,type:"hda"};j.push({icon:"fa-folder-o",label:"List of datasets",value:"collection"});this.select_collection=new e.Select.View({onchange:function(){f.trigger("change")}});this.list.collection={field:this.select_collection,type:"hdca"};this.button_type=new e.RadioButton.View({value:this.current,data:j,onchange:function(i){f.current=i;f.refresh();f.trigger("change")}});this.$batch=$(a.batchMode());this.$el.append(c.wrap(this.button_type.$el));for(var h in this.list){this.$el.append(this.list[h].field.$el)}this.$el.append(this.$batch);this.update(g.data);if(this.options.value!==undefined){this.value(this.options.value)}this.refresh();this.on("change",function(){if(g.onchange){g.onchange(f.value())}})},wait:function(){for(var f in this.list){this.list[f].field.wait()}},unwait:function(){for(var f in this.list){this.list[f].field.unwait()}},update:function(g){var l=[];for(var j in g.hda){var k=g.hda[j];l.push({label:k.hid+": "+k.name,value:k.id})}var f=[];for(var j in g.hdca){var h=g.hdca[j];f.push({label:h.hid+": "+h.name,value:h.id})}this.select_single&&this.select_single.update(l);this.select_multiple.update(l);this.select_collection.update(f);this.app.content.add(g)},value:function(m){if(m&&m.values){try{var l=[];for(var h in m.values){l.push(m.values[h].id)}if(m&&m.values.length>0&&m.values[0].src=="hcda"){this.current="collection";this.select_collection.value(l[0])}else{if(l.length>1||this.options.multiple){this.current="multiple";this.select_multiple.value(l)}else{this.current="single";this.select_single.value(l[0])}}this.refresh();var g=this._select();if(!g.validate()){g.value(g.first())}}catch(k){console.debug("tools-select-content::value() - Skipped.")}}var j=this._select().value();if(!(j instanceof Array)){j=[j]}var f={batch:!this.options.multiple&&this.current!="single",values:[]};for(var h in j){f.values.push({id:j[h],src:this.list[this.current].type})}return f},validate:function(){return this._select().validate()},refresh:function(){for(var g in this.list){var f=this.list[g].field.$el;if(this.current==g){f.show()}else{f.hide()}}if(this.current!="single"&&!this.options.multiple){this.$batch.show()}else{this.$batch.hide()}},_select:function(){return this.list[this.current].field}});return{View:d}});
\ No newline at end of file
+define(["utils/utils","mvc/ui/ui-misc","mvc/ui/ui-tabs","mvc/tools/tools-template"],function(c,e,b,a){var d=Backbone.View.extend({initialize:function(k,g){this.app=k;this.options=g;var f=this;this.setElement("<div/>");this.list={};var j=[];if(g.type=="data_collection"){this.mode="collection"}else{if(g.multiple){this.mode="multiple"}else{this.mode="single"}}this.current=this.mode;this.list={};if(this.mode=="single"){j.push({icon:"fa-file-o",label:"Single dataset",value:"single"});this.select_single=new e.Select.View({onchange:function(){f.trigger("change")}});this.list.single={field:this.select_single,type:"hda"}}if(this.mode=="single"||this.mode=="multiple"){j.push({icon:"fa-files-o",label:"Multiple datasets",value:"multiple"});this.select_multiple=new e.Select.View({multiple:true,onchange:function(){f.trigger("change")}});this.list.multiple={field:this.select_multiple,type:"hda"}}if(this.mode=="single"||this.mode=="collection"){j.push({icon:"fa-folder-o",label:"List of datasets",value:"collection"});this.select_collection=new e.Select.View({onchange:function(){f.trigger("change")}});this.list.collection={field:this.select_collection,type:"hdca"}}this.button_type=new e.RadioButton.View({value:this.current,data:j,onchange:function(i){f.current=i;f.refresh();f.trigger("change")}});this.$batch=$(a.batchMode());if(_.size(this.list)>1){this.$el.append(c.wrap(this.button_type.$el))}for(var h in this.list){this.$el.append(this.list[h].field.$el)}this.$el.append(this.$batch);this.update(g.data);if(this.options.value!==undefined){this.value(this.options.value)}this.refresh();this.on("change",function(){if(g.onchange){g.onchange(f.value())}})},wait:function(){for(var f in this.list){this.list[f].field.wait()}},unwait:function(){for(var f in this.list){this.list[f].field.unwait()}},update:function(g){var l=[];for(var j in g.hda){var k=g.hda[j];l.push({label:k.hid+": "+k.name,value:k.id})}var f=[];for(var j in g.hdca){var h=g.hdca[j];f.push({label:h.hid+": "+h.name,value:h.id})}this.select_single&&this.select_single.update(l);this.select_multiple&&this.select_multiple.update(l);this.select_collection&&this.select_collection.update(f);this.app.content.add(g)},value:function(m){if(m&&m.values){try{var l=[];for(var h in m.values){l.push(m.values[h].id)}if(m&&m.values.length>0&&m.values[0].src=="hcda"){this.current="collection";this.select_collection.value(l[0])}else{if(this.mode=="multiple"){this.current="multiple";this.select_multiple.value(l)}else{this.current="single";this.select_single.value(l[0])}}this.refresh();var g=this._select();if(!g.validate()){g.value(g.first())}}catch(k){console.debug("tools-select-content::value() - Skipped.")}}var j=this._select().value();if(!(j instanceof Array)){j=[j]}var f={batch:this.mode=="single"&&this.current!="single",values:[]};for(var h in j){f.values.push({id:j[h],src:this.list[this.current].type})}return f},validate:function(){return this._select().validate()},refresh:function(){for(var g in this.list){var f=this.list[g].field.$el;if(this.current==g){f.show()}else{f.hide()}}if(this.mode=="single"&&this.current!="single"){this.$batch.show()}else{this.$batch.hide()}},_select:function(){return this.list[this.current].field}});return{View:d}});
\ No newline at end of file
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
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/06d53d20887d/
Changeset: 06d53d20887d
Branch: next-stable
User: dan
Date: 2014-12-03 21:52:56+00:00
Summary: Fix for DynamicOptions AdditionalValueFilter when columns have not been assigned and to give value preference over name.
Affected #: 1 file
diff -r 4b6b1d2d740732a982c922b264d2027ed2c90370 -r 06d53d20887d55bf27f412c2248741e940d5424f lib/galaxy/tools/parameters/dynamic_options.py
--- a/lib/galaxy/tools/parameters/dynamic_options.py
+++ b/lib/galaxy/tools/parameters/dynamic_options.py
@@ -301,8 +301,11 @@
add_value = []
for i in range( self.dynamic_option.largest_index + 1 ):
add_value.append( "" )
- add_value[self.dynamic_option.columns['value']] = self.value
- add_value[self.dynamic_option.columns['name']] = self.name
+ value_col = self.dynamic_option.columns.get( 'value', 0 )
+ name_col = self.dynamic_option.columns.get( 'name', value_col )
+ # Set name first, then value, in case they are the same column
+ add_value[ name_col ] = self.name
+ add_value[ value_col ] = self.value
if self.index is not None:
rval.insert( self.index, add_value )
else:
https://bitbucket.org/galaxy/galaxy-central/commits/caf0f2bf161d/
Changeset: caf0f2bf161d
User: dan
Date: 2014-12-03 21:54:10+00:00
Summary: merge
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