From 8a9c206a5b75f68ffa6743a11709735dfda94064 Mon Sep 17 00:00:00 2001 From: Ross Lazarus Date: Thu, 5 Apr 2012 02:16:12 +1000 Subject: [PATCH 1/7] Reverted picard_FastqToSam.xml which I accidentally embellished with a bogus --tmpdir flag because it does not use picard_wrapper.py --- tools/picard/picard_FastqToSam.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/picard/picard_FastqToSam.xml b/tools/picard/picard_FastqToSam.xml index 488a7373aa7..9dec7c65edc 100644 --- a/tools/picard/picard_FastqToSam.xml +++ b/tools/picard/picard_FastqToSam.xml @@ -4,7 +4,6 @@ java -XX:DefaultMaxRAMFraction=1 -XX:+UseParallelGC -jar "${GALAXY_DATA_INDEX_DIR}/shared/jars/picard/FastqToSam.jar" - --tmpdir "${__new_file_path__}" FASTQ="${input_fastq1}" #if str( $input_fastq2) != "None": FASTQ2="${input_fastq2}" From a66adfdd1b59b6676b8e276ab227b6087c24e56b Mon Sep 17 00:00:00 2001 From: Daniel Blankenberg Date: Wed, 4 Apr 2012 12:24:43 -0400 Subject: [PATCH 2/7] Rework the display of DrillDown form elements. --- lib/galaxy/tools/parameters/basic.py | 98 +++++++++++-------- lib/galaxy/web/form_builder.py | 139 ++++++++++++++++----------- templates/tool_form.mako | 38 +++++--- 3 files changed, 161 insertions(+), 114 deletions(-) diff --git a/lib/galaxy/tools/parameters/basic.py b/lib/galaxy/tools/parameters/basic.py index e965c1f4173..4eff947c9da 100644 --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -1056,26 +1056,35 @@ class DrillDownSelectToolParameter( SelectToolParameter ): ... ... ''' ) ) >>> print p.get_html() -
    -
  • [+]Heading 1 -
      -
    • Option 1 -
    • -
    • Option 2 -
    • -
    • [+]Heading 1 -
        -
      • Option 3 -
      • -
      • Option 4 -
      • -
      -
    • -
    -
  • -
  • Option 5 -
  • -
+
+
+ + Heading 1 +
+
+ Option 1 +
+
+ Option 2 +
+
+ + Heading 1 +
+
+ Option 3 +
+
+ Option 4 +
+
+
+
+
+
+ Option 5 +
+
>>> p = DrillDownSelectToolParameter( None, XML( ... ''' ... @@ -1093,26 +1102,35 @@ class DrillDownSelectToolParameter( SelectToolParameter ): ... ... ''' ) ) >>> print p.get_html() -
    -
  • [+]Heading 1 -
      -
    • Option 1 -
    • -
    • Option 2 -
    • -
    • [+]Heading 1 -
        -
      • Option 3 -
      • -
      • Option 4 -
      • -
      -
    • -
    -
  • -
  • Option 5 -
  • -
+
+
+ + Heading 1 +
+
+ Option 1 +
+
+ Option 2 +
+
+ + Heading 1 +
+
+ Option 3 +
+
+ Option 4 +
+
+
+
+
+
+ Option 5 +
+
>>> print p.options [{'selected': False, 'name': 'Heading 1', 'value': 'heading1', 'options': [{'selected': False, 'name': 'Option 1', 'value': 'option1', 'options': []}, {'selected': False, 'name': 'Option 2', 'value': 'option2', 'options': []}, {'selected': False, 'name': 'Heading 1', 'value': 'heading1', 'options': [{'selected': False, 'name': 'Option 3', 'value': 'option3', 'options': []}, {'selected': False, 'name': 'Option 4', 'value': 'option4', 'options': []}]}]}, {'selected': False, 'name': 'Option 5', 'value': 'option5', 'options': []}] """ diff --git a/lib/galaxy/web/form_builder.py b/lib/galaxy/web/form_builder.py index 62442256be9..c4c2169ec69 100644 --- a/lib/galaxy/web/form_builder.py +++ b/lib/galaxy/web/form_builder.py @@ -6,6 +6,7 @@ import logging, sys, os, time from cgi import escape from galaxy.util import restore_text, relpath, nice_size from galaxy.web import url_for +from binascii import hexlify log = logging.getLogger(__name__) @@ -391,48 +392,66 @@ class DrillDownField( BaseField ): >>> t = DrillDownField( "foo", multiple=True, display="checkbox", options=[{'name': 'Heading 1', 'value': 'heading1', 'options': [{'name': 'Option 1', 'value': 'option1', 'options': []}, {'name': 'Option 2', 'value': 'option2', 'options': []}, {'name': 'Heading 1', 'value': 'heading1', 'options': [{'name': 'Option 3', 'value': 'option3', 'options': []}, {'name': 'Option 4', 'value': 'option4', 'options': []}]}]}, {'name': 'Option 5', 'value': 'option5', 'options': []}] ) >>> print t.get_html() -
    -
  • [+]Heading 1 -
      -
    • Option 1 -
    • -
    • Option 2 -
    • -
    • [+]Heading 1 -
        -
      • Option 3 -
      • -
      • Option 4 -
      • -
      -
    • -
    -
  • -
  • Option 5 -
  • -
+
+
+ + Heading 1 +
+
+ Option 1 +
+
+ Option 2 +
+
+ + Heading 1 +
+
+ Option 3 +
+
+ Option 4 +
+
+
+
+
+
+ Option 5 +
+
>>> t = DrillDownField( "foo", multiple=False, display="radio", options=[{'name': 'Heading 1', 'value': 'heading1', 'options': [{'name': 'Option 1', 'value': 'option1', 'options': []}, {'name': 'Option 2', 'value': 'option2', 'options': []}, {'name': 'Heading 1', 'value': 'heading1', 'options': [{'name': 'Option 3', 'value': 'option3', 'options': []}, {'name': 'Option 4', 'value': 'option4', 'options': []}]}]}, {'name': 'Option 5', 'value': 'option5', 'options': []}] ) >>> print t.get_html() -
    -
  • [+]Heading 1 -
      -
    • Option 1 -
    • -
    • Option 2 -
    • -
    • [+]Heading 1 -
        -
      • Option 3 -
      • -
      • Option 4 -
      • -
      -
    • -
    -
  • -
  • Option 5 -
  • -
+
+
+ + Heading 1 +
+
+ Option 1 +
+
+ Option 2 +
+
+ + Heading 1 +
+
+ Option 3 +
+
+ Option 4 +
+
+
+
+
+
+ Option 5 +
+
""" def __init__( self, name, multiple=None, display=None, refresh_on_change=False, options = [], value = [], refresh_on_change_values = [] ): self.name = name @@ -466,30 +485,34 @@ class DrillDownField( BaseField ): if option['options']: new_parents = list( parent_options ) + [ option['value'] ] find_expanded_options( expanded_options, option['options'], new_parents ) - def recurse_options( html, options, expanded_options = [] ): + def recurse_options( html, options, base_id, expanded_options = [] ): for option in options: + escaped_option_value = escape( str( option['value'] ), quote=True ) selected = ( option['value'] in self.value ) - if selected: selected = ' checked' - else: selected = '' - if option['options']: - default_state = 'collapsed' - default_icon = '[+]' - if option['value'] in expanded_options: - default_state = 'expanded' - default_icon = '[-]' - html.append( '
  • %s%s' % ( default_icon, self.display, prefix, self.name, escape(str(option['value']), quote=True), selected, option['name']) ) - html.append( '
      ' % default_state ) - recurse_options( html, option['options'], expanded_options ) - html.append( '
    ') + if selected: + selected = ' checked' else: - html.append( '
  • %s' % ( self.display, prefix, self.name, escape(str(option['value']), quote=True), selected, option['name']) ) - html.append( '
  • ' ) + selected = '' + span_class = 'form-toggle icon-button toggle' + if option['value'] not in expanded_options: + span_class = "%s-expand" % ( span_class ) + html.append( '
    ') + drilldown_group_id = "%s-%s" % ( base_id, hexlify( option['value'] ) ) + if option['options']: + html.append( '' % ( span_class, drilldown_group_id ) ) + html.append( '%s' % ( self.display, prefix, self.name, escaped_option_value, selected, option['name']) ) + if option['options']: + html.append( '
    ' % ( drilldown_group_id ) ) + recurse_options( html, option['options'], drilldown_group_id, expanded_options ) + html.append( '
    ') + html.append( '
    ') + drilldown_id = "drilldown-%s-%s" % ( hexlify( prefix ), hexlify( self.name ) ) rval = [] - rval.append( '
      ' ) + rval.append( '
      ' % ( drilldown_id ) ) expanded_options = [] find_expanded_options( expanded_options, self.options ) - recurse_options( rval, self.options, expanded_options ) - rval.append( '
    ' ) + recurse_options( rval, self.options, drilldown_id, expanded_options ) + rval.append( '' ) return '\n'.join( rval ) class AddressField(BaseField): diff --git a/templates/tool_form.mako b/templates/tool_form.mako index 5ca87b60357..58fb2732d0d 100644 --- a/templates/tool_form.mako +++ b/templates/tool_form.mako @@ -32,23 +32,29 @@ }); // For drilldown parameters: add expand/collapse buttons and collapse initially-collapsed elements - $( 'li ul.toolParameterExpandableCollapsable' ).each( function() { - var el = $(this), - parent_li = el.parent('li'), - sub_ul = el.remove(); - - parent_li.find( 'span' ).wrapInner( '' ).find( 'a' ).click( function() { - sub_ul.toggle(); - $(this).html( sub_ul.is(":hidden") ? '[+]' : '[-]' ); + $( 'div.drilldown-container' ).each( function() { + $(this).find('span.form-toggle' ).each( function() { + var show_hide_click_elt = $(this); + var group_id = show_hide_click_elt.attr('id').substring( 0, show_hide_click_elt.attr('id').lastIndexOf( '-click' ) ); + $('#' + group_id + '-container').each( function() { + var show_hide_elt = $(this); + if ( show_hide_click_elt.hasClass( 'toggle-expand' ) ) { + show_hide_elt.hide(); + } + show_hide_click_elt.click( function() { + if ( show_hide_click_elt.hasClass("toggle") ){ + show_hide_click_elt.removeClass("toggle"); + show_hide_click_elt.addClass("toggle-expand"); + show_hide_elt.hide() + } + else { + show_hide_click_elt.addClass("toggle"); + show_hide_click_elt.removeClass("toggle-expand"); + show_hide_elt.show(); + } + }); + }); }); - parent_li.append( sub_ul ); - }); - - $( 'ul ul.toolParameterExpandableCollapsable' ).each( function(i) { - var el = $(this); - if (el.attr("default_state") === "collapsed") { - el.hide(); - } }); function checkUncheckAll( name, check ) { From a146ac6df0633f51ec12f4dae3c1c556527ef8f5 Mon Sep 17 00:00:00 2001 From: Greg Von Kuster Date: Wed, 4 Apr 2012 13:36:37 -0400 Subject: [PATCH 3/7] Add the ability to browse invalid tools in the tool shed - current user is restricted to seeing only their invalid tools if not an admin. Also a bit of cleanup in tool shed statistics. --- lib/galaxy/util/shed_util.py | 9 +++- .../webapps/community/controllers/admin.py | 41 +++++++++++-------- .../community/controllers/repository.py | 32 +++++++++++++++ templates/webapps/community/admin/index.mako | 3 ++ .../admin/reset_all_repository_metadata.mako | 19 +++++++++ .../webapps/community/admin/statistics.mako | 2 +- templates/webapps/community/index.mako | 3 ++ .../repository/browse_invalid_tools.mako | 38 +++++++++++++++++ 8 files changed, 127 insertions(+), 20 deletions(-) create mode 100644 templates/webapps/community/admin/reset_all_repository_metadata.mako create mode 100644 templates/webapps/community/repository/browse_invalid_tools.mako diff --git a/lib/galaxy/util/shed_util.py b/lib/galaxy/util/shed_util.py index f023dc12f73..b794bbc9fec 100644 --- a/lib/galaxy/util/shed_util.py +++ b/lib/galaxy/util/shed_util.py @@ -50,9 +50,14 @@ class ShedCounter( object ): for repository in self.sa_session.query( self.model.Repository ): self.repositories += 1 self.total_clones += repository.times_downloaded - if repository.deleted: + is_deleted = repository.deleted + is_new = repository.is_new + if is_deleted and is_new: self.deleted_repositories += 1 - elif repository.is_new: + self.new_repositories += 1 + elif is_deleted: + self.deleted_repositories += 1 + elif is_new: self.new_repositories += 1 else: processed_guids = [] diff --git a/lib/galaxy/webapps/community/controllers/admin.py b/lib/galaxy/webapps/community/controllers/admin.py index 41f1c9efd8b..6168f4e0ddd 100644 --- a/lib/galaxy/webapps/community/controllers/admin.py +++ b/lib/galaxy/webapps/community/controllers/admin.py @@ -461,21 +461,25 @@ class AdminController( BaseUIController, Admin ): params = util.Params( kwd ) message = util.restore_text( params.get( 'message', '' ) ) status = params.get( 'status', 'done' ) - count = 0 - for repository in trans.sa_session.query( trans.model.Repository ) \ - .filter( trans.model.Repository.table.c.deleted == False ): - try: - reset_all_repository_metadata( trans, trans.security.encode_id( repository.id ) ) - log.debug( "Reset metadata on repository %s" % repository.name ) - count += 1 - except Exception, e: - log.debug( "Error attempting to reset metadata on repository %s: %s" % ( repository.name, str( e ) ) ) - message = "Reset metadata on %d repositories" % count - trans.response.send_redirect( web.url_for( controller='admin', - action='browse_repository_metadata', - webapp='community', - message=util.sanitize_text( message ), - status=status ) ) + if 'reset_all_repository_metadata_button' in kwd: + count = 0 + for repository in trans.sa_session.query( trans.model.Repository ) \ + .filter( trans.model.Repository.table.c.deleted == False ): + try: + reset_all_repository_metadata( trans, trans.security.encode_id( repository.id ) ) + log.debug( "Reset metadata on repository %s" % repository.name ) + count += 1 + except Exception, e: + log.debug( "Error attempting to reset metadata on repository %s: %s" % ( repository.name, str( e ) ) ) + message = "Reset metadata on %d repositories" % count + trans.response.send_redirect( web.url_for( controller='admin', + action='browse_repository_metadata', + webapp='community', + message=util.sanitize_text( message ), + status=status ) ) + return trans.fill_template( '/webapps/community/admin/reset_all_repository_metadata.mako', + message=message, + status=status ) @web.expose @web.require_admin def browse_repositories( self, trans, **kwd ): @@ -549,12 +553,15 @@ class AdminController( BaseUIController, Admin ): @web.expose @web.require_admin def regenerate_statistics( self, trans, **kwd ): + params = util.Params( kwd ) + message = util.restore_text( params.get( 'message', '' ) ) + status = params.get( 'status', 'done' ) if 'regenerate_statistics_button' in kwd: trans.app.shed_counter.generate_statistics() - message = "Successfully regenerated statistics" + message = "Successfully regenerated statistics" return trans.fill_template( '/webapps/community/admin/statistics.mako', message=message, - status='done' ) + status=status ) @web.expose @web.require_admin def delete_repository( self, trans, **kwd ): diff --git a/lib/galaxy/webapps/community/controllers/repository.py b/lib/galaxy/webapps/community/controllers/repository.py index 20ecc6daad5..72a9857fe30 100644 --- a/lib/galaxy/webapps/community/controllers/repository.py +++ b/lib/galaxy/webapps/community/controllers/repository.py @@ -400,6 +400,38 @@ class RepositoryController( BaseUIController, ItemRatings ): # Render the list view return self.valid_repository_list_grid( trans, **kwd ) @web.expose + def browse_invalid_tools( self, trans, **kwd ): + params = util.Params( kwd ) + message = util.restore_text( params.get( 'message', '' ) ) + status = params.get( 'status', 'done' ) + webapp = params.get( 'webapp', 'community' ) + is_admin = trans.user_is_admin() + invalid_tools_dict = odict() + if is_admin: + for repository in trans.sa_session.query( trans.model.Repository ) \ + .filter( trans.model.Repository.table.c.deleted == False ) \ + .order_by( trans.model.Repository.table.c.name ): + for downloadable_revision in repository.downloadable_revisions: + metadata = downloadable_revision.metadata + invalid_tools = metadata.get( 'invalid_tools', [] ) + for invalid_tool_config in invalid_tools: + invalid_tools_dict[ invalid_tool_config ] = ( repository.id, repository.name, downloadable_revision.changeset_revision ) + else: + for repository in trans.sa_session.query( trans.model.Repository ) \ + .filter( and_( trans.model.Repository.table.c.deleted == False, + trans.model.Repository.table.c.user_id == trans.user.id ) ) \ + .order_by( trans.model.Repository.table.c.name ): + for downloadable_revision in repository.downloadable_revisions: + metadata = downloadable_revision.metadata + invalid_tools = metadata.get( 'invalid_tools', [] ) + for invalid_tool_config in invalid_tools: + invalid_tools_dict[ invalid_tool_config ] = ( repository.id, repository.name, downloadable_revision.changeset_revision ) + return trans.fill_template( '/webapps/community/repository/browse_invalid_tools.mako', + invalid_tools_dict=invalid_tools_dict, + webapp=webapp, + message=message, + status=status ) + @web.expose def find_workflows( self, trans, **kwd ): params = util.Params( kwd ) message = util.restore_text( params.get( 'message', '' ) ) diff --git a/templates/webapps/community/admin/index.mako b/templates/webapps/community/admin/index.mako index 84c3300a539..06763c0d9c2 100644 --- a/templates/webapps/community/admin/index.mako +++ b/templates/webapps/community/admin/index.mako @@ -60,6 +60,9 @@ +
    diff --git a/templates/webapps/community/admin/reset_all_repository_metadata.mako b/templates/webapps/community/admin/reset_all_repository_metadata.mako new file mode 100644 index 00000000000..ba1c6c2e044 --- /dev/null +++ b/templates/webapps/community/admin/reset_all_repository_metadata.mako @@ -0,0 +1,19 @@ +<%inherit file="/base.mako"/> +<%namespace file="/message.mako" import="render_msg" /> + +%if message: + ${render_msg( message, status )} +%endif + +
    +
    Reset metadata on each change set of the repositories in this tool shed
    +
    +
    + Click the button below to reset metadata on each change set of the repositories in this tool shed. +
    +
    + +
    +
    +
    +
    diff --git a/templates/webapps/community/admin/statistics.mako b/templates/webapps/community/admin/statistics.mako index b68a64846a1..e9a266a0877 100644 --- a/templates/webapps/community/admin/statistics.mako +++ b/templates/webapps/community/admin/statistics.mako @@ -19,7 +19,7 @@ ${trans.app.shed_counter.repositories} - New repositories + Empty repositories ${trans.app.shed_counter.new_repositories} diff --git a/templates/webapps/community/index.mako b/templates/webapps/community/index.mako index 65a984e946d..2eaf1d94691 100644 --- a/templates/webapps/community/index.mako +++ b/templates/webapps/community/index.mako @@ -71,6 +71,9 @@ + %endif diff --git a/templates/webapps/community/repository/browse_invalid_tools.mako b/templates/webapps/community/repository/browse_invalid_tools.mako new file mode 100644 index 00000000000..e0ccf159324 --- /dev/null +++ b/templates/webapps/community/repository/browse_invalid_tools.mako @@ -0,0 +1,38 @@ +<%inherit file="/base.mako"/> +<%namespace file="/message.mako" import="render_msg" /> + +%if message: + ${render_msg( message, status )} +%endif + +
    + %if invalid_tools_dict: +
    Invalid tools - click the tool config file name to see why the tool is invalid
    +
    + + + + + + + %for invalid_tool_config, repository_tup in invalid_tools_dict.items(): + <% repository_id, repository_name, changeset_revision = repository_tup %> + + + + + + %endfor +
    Tool configRepository nameChangeset revision
    + + ${invalid_tool_config} + + ${repository_name}${changeset_revision}
    +
    +
    + %else: +
    + You do not own any repositories that contain invalid tools. +
    + %endif + From 656b12c31621785778a840f10818e637f18f3b6f Mon Sep 17 00:00:00 2001 From: Greg Von Kuster Date: Wed, 4 Apr 2012 13:42:23 -0400 Subject: [PATCH 4/7] Apply fix for brand overflowing to the tool shed's base_panels.mako. --- templates/webapps/community/base_panels.mako | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/webapps/community/base_panels.mako b/templates/webapps/community/base_panels.mako index 0f8e5feea13..542e4c7e351 100644 --- a/templates/webapps/community/base_panels.mako +++ b/templates/webapps/community/base_panels.mako @@ -117,12 +117,12 @@ ## Logo, layered over tabs to be clickable -
    + From fb96283757c82a7f246976318042504da6eeef36 Mon Sep 17 00:00:00 2001 From: Greg Von Kuster Date: Wed, 4 Apr 2012 13:56:22 -0400 Subject: [PATCH 5/7] Slight fix for viewing invalid tools - allow an admin user to view only his invalid tools if requesting from the repositories view. --- lib/galaxy/webapps/community/controllers/repository.py | 3 ++- templates/webapps/community/admin/index.mako | 2 +- templates/webapps/community/index.mako | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/galaxy/webapps/community/controllers/repository.py b/lib/galaxy/webapps/community/controllers/repository.py index 72a9857fe30..d84e3fc43b0 100644 --- a/lib/galaxy/webapps/community/controllers/repository.py +++ b/lib/galaxy/webapps/community/controllers/repository.py @@ -405,9 +405,10 @@ class RepositoryController( BaseUIController, ItemRatings ): message = util.restore_text( params.get( 'message', '' ) ) status = params.get( 'status', 'done' ) webapp = params.get( 'webapp', 'community' ) + cntrller = params.get( 'cntrller', 'repository' ) is_admin = trans.user_is_admin() invalid_tools_dict = odict() - if is_admin: + if is_admin and cntrller == 'admin': for repository in trans.sa_session.query( trans.model.Repository ) \ .filter( trans.model.Repository.table.c.deleted == False ) \ .order_by( trans.model.Repository.table.c.name ): diff --git a/templates/webapps/community/admin/index.mako b/templates/webapps/community/admin/index.mako index 06763c0d9c2..8a2a90f0742 100644 --- a/templates/webapps/community/admin/index.mako +++ b/templates/webapps/community/admin/index.mako @@ -61,7 +61,7 @@ Browse metadata
    diff --git a/templates/webapps/community/index.mako b/templates/webapps/community/index.mako index 2eaf1d94691..16c40dc44c6 100644 --- a/templates/webapps/community/index.mako +++ b/templates/webapps/community/index.mako @@ -72,7 +72,7 @@ Browse my repositories %endif From acd1555108193e1516ff029bd6c55484d3b1a91a Mon Sep 17 00:00:00 2001 From: Greg Von Kuster Date: Wed, 4 Apr 2012 15:01:09 -0400 Subject: [PATCH 6/7] Only include invalid tools in the metadata for the repository tip - supporting this in older revisions is a bit more complex and will be supported at a later time. --- lib/galaxy/webapps/community/controllers/common.py | 5 +++++ lib/galaxy/webapps/community/controllers/repository.py | 4 +++- .../webapps/community/repository/browse_invalid_tools.mako | 6 +++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/webapps/community/controllers/common.py b/lib/galaxy/webapps/community/controllers/common.py index e7d2c58e673..8166b1cf328 100644 --- a/lib/galaxy/webapps/community/controllers/common.py +++ b/lib/galaxy/webapps/community/controllers/common.py @@ -427,8 +427,13 @@ def generate_metadata_for_changeset_revision( trans, id, ctx, changeset_revision metadata_dict = generate_workflow_metadata( '', exported_workflow_dict, metadata_dict ) except Exception, e: invalid_files.append( ( name, str( e ) ) ) + """ + FIXME: Handling invalid tools in change sets that are not the repository tip are a bit complex, so this is currently not + supported. One example is the Emboss tools that have a tag set, which requires the file to exist in a location + that can be found. if invalid_tool_configs: metadata_dict[ 'invalid_tools' ] = invalid_tool_configs + """ return metadata_dict, invalid_files def set_repository_metadata( trans, id, changeset_revision, content_alert_str='', **kwd ): """Set repository metadata""" diff --git a/lib/galaxy/webapps/community/controllers/repository.py b/lib/galaxy/webapps/community/controllers/repository.py index d84e3fc43b0..d5bdab21a70 100644 --- a/lib/galaxy/webapps/community/controllers/repository.py +++ b/lib/galaxy/webapps/community/controllers/repository.py @@ -428,6 +428,7 @@ class RepositoryController( BaseUIController, ItemRatings ): for invalid_tool_config in invalid_tools: invalid_tools_dict[ invalid_tool_config ] = ( repository.id, repository.name, downloadable_revision.changeset_revision ) return trans.fill_template( '/webapps/community/repository/browse_invalid_tools.mako', + cntrller=cntrller, invalid_tools_dict=invalid_tools_dict, webapp=webapp, message=message, @@ -1867,6 +1868,7 @@ class RepositoryController( BaseUIController, ItemRatings ): break if found: break + metadata_dict, invalid_files = generate_metadata_for_repository_tip( trans, repository_id, ctx, changeset_revision, repo_dir ) else: for filename in ctx: if filename == tool_config: @@ -1879,7 +1881,7 @@ class RepositoryController( BaseUIController, ItemRatings ): fh.write( fctx.data() ) fh.close() break - metadata_dict, invalid_files = generate_metadata_for_repository_tip( trans, repository_id, ctx, changeset_revision, repo_dir ) + metadata_dict, invalid_files = generate_metadata_for_changeset_revision( trans, repository_id, ctx, changeset_revision, repo_dir ) for invalid_file_tup in invalid_files: invalid_tool_config, invalid_msg = invalid_file_tup if tool_config == invalid_tool_config: diff --git a/templates/webapps/community/repository/browse_invalid_tools.mako b/templates/webapps/community/repository/browse_invalid_tools.mako index e0ccf159324..b3a8ef29784 100644 --- a/templates/webapps/community/repository/browse_invalid_tools.mako +++ b/templates/webapps/community/repository/browse_invalid_tools.mako @@ -32,7 +32,11 @@ %else:
    - You do not own any repositories that contain invalid tools. + %if cntrller == 'admin' and trans.user_is_admin(): + No repositories in this tool shed contain invalid tools. + %else: + None of your repositories contain invalid tools. + %endif
    %endif From 5eb980e685ad4505b7ade0738e1ef3f8f2d3c105 Mon Sep 17 00:00:00 2001 From: Daniel Blankenberg Date: Wed, 4 Apr 2012 21:12:31 -0400 Subject: [PATCH 7/7] DrillDown parameter now uses slideUp/Down. --- templates/tool_form.mako | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/tool_form.mako b/templates/tool_form.mako index 58fb2732d0d..c401e5e0c23 100644 --- a/templates/tool_form.mako +++ b/templates/tool_form.mako @@ -43,14 +43,14 @@ } show_hide_click_elt.click( function() { if ( show_hide_click_elt.hasClass("toggle") ){ - show_hide_click_elt.removeClass("toggle"); show_hide_click_elt.addClass("toggle-expand"); - show_hide_elt.hide() + show_hide_click_elt.removeClass("toggle"); + show_hide_elt.slideUp( 'fast' ); } else { show_hide_click_elt.addClass("toggle"); show_hide_click_elt.removeClass("toggle-expand"); - show_hide_elt.show(); + show_hide_elt.slideDown( 'fast' ); } }); });