galaxy-commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
April 2012
- 1 participants
- 170 discussions
commit/galaxy-central: greg: 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.
by Bitbucket 04 Apr '12
by Bitbucket 04 Apr '12
04 Apr '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/a3ffda11a38b/
changeset: a3ffda11a38b
user: greg
date: 2012-04-04 19:36:37
summary: 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.
affected #: 8 files
diff -r 7aebce7e4aa1081643c69e23136765585b5097be -r a3ffda11a38b4a863dae03c0a53e2428ffbda1a4 lib/galaxy/util/shed_util.py
--- a/lib/galaxy/util/shed_util.py
+++ b/lib/galaxy/util/shed_util.py
@@ -50,9 +50,14 @@
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 -r 7aebce7e4aa1081643c69e23136765585b5097be -r a3ffda11a38b4a863dae03c0a53e2428ffbda1a4 lib/galaxy/webapps/community/controllers/admin.py
--- a/lib/galaxy/webapps/community/controllers/admin.py
+++ b/lib/galaxy/webapps/community/controllers/admin.py
@@ -461,21 +461,25 @@
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 @@
@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 -r 7aebce7e4aa1081643c69e23136765585b5097be -r a3ffda11a38b4a863dae03c0a53e2428ffbda1a4 lib/galaxy/webapps/community/controllers/repository.py
--- a/lib/galaxy/webapps/community/controllers/repository.py
+++ b/lib/galaxy/webapps/community/controllers/repository.py
@@ -400,6 +400,38 @@
# 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 -r 7aebce7e4aa1081643c69e23136765585b5097be -r a3ffda11a38b4a863dae03c0a53e2428ffbda1a4 templates/webapps/community/admin/index.mako
--- a/templates/webapps/community/admin/index.mako
+++ b/templates/webapps/community/admin/index.mako
@@ -60,6 +60,9 @@
<div class="toolTitle"><a target="galaxy_main" href="${h.url_for( controller='admin', action='browse_repository_metadata', webapp='community' )}">Browse metadata</a></div>
+ <div class="toolTitle">
+ <a target="galaxy_main" href="${h.url_for( controller='repository', action='browse_invalid_tools', webapp='community' )}">Browse invalid tools</a>
+ </div></div></div><div class="toolSectionTitle">
diff -r 7aebce7e4aa1081643c69e23136765585b5097be -r a3ffda11a38b4a863dae03c0a53e2428ffbda1a4 templates/webapps/community/admin/reset_all_repository_metadata.mako
--- /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
+
+<div class="toolForm">
+ <div class="toolFormTitle">Reset metadata on each change set of the repositories in this tool shed</div>
+ <form name="reset_all_repository_metadata" id="reset_all_repository_metadata" action="${h.url_for( controller='admin', action='reset_all_repository_metadata' )}" method="post" >
+ <div class="form-row">
+ Click the button below to reset metadata on each change set of the repositories in this tool shed.
+ </div>
+ <div class="form-row">
+ <input type="submit" name="reset_all_repository_metadata_button" value="Reset all repository metadata"/>
+ </div>
+ </form>
+ </div>
+</div>
diff -r 7aebce7e4aa1081643c69e23136765585b5097be -r a3ffda11a38b4a863dae03c0a53e2428ffbda1a4 templates/webapps/community/admin/statistics.mako
--- a/templates/webapps/community/admin/statistics.mako
+++ b/templates/webapps/community/admin/statistics.mako
@@ -19,7 +19,7 @@
<td>${trans.app.shed_counter.repositories}</td></tr><tr>
- <td>New repositories</td>
+ <td>Empty repositories</td><td>${trans.app.shed_counter.new_repositories}</td></tr><tr>
diff -r 7aebce7e4aa1081643c69e23136765585b5097be -r a3ffda11a38b4a863dae03c0a53e2428ffbda1a4 templates/webapps/community/index.mako
--- a/templates/webapps/community/index.mako
+++ b/templates/webapps/community/index.mako
@@ -71,6 +71,9 @@
<div class="toolTitle"><a target="galaxy_main" href="${h.url_for( controller='repository', action='browse_repositories', operation='my_repositories', webapp='community' )}">Browse my repositories</a></div>
+ <div class="toolTitle">
+ <a target="galaxy_main" href="${h.url_for( controller='repository', action='browse_invalid_tools', webapp='community' )}">Browse my invalid tools</a>
+ </div>
%endif
</div></div>
diff -r 7aebce7e4aa1081643c69e23136765585b5097be -r a3ffda11a38b4a863dae03c0a53e2428ffbda1a4 templates/webapps/community/repository/browse_invalid_tools.mako
--- /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
+
+<div class="toolForm">
+ %if invalid_tools_dict:
+ <div class="toolFormTitle">Invalid tools<i> - click the tool config file name to see why the tool is invalid</i></div>
+ <div class="form-row">
+ <table class="grid">
+ <tr>
+ <th>Tool config</th>
+ <th>Repository name</th>
+ <th>Changeset revision</th>
+ </tr>
+ %for invalid_tool_config, repository_tup in invalid_tools_dict.items():
+ <% repository_id, repository_name, changeset_revision = repository_tup %>
+ <tr>
+ <td>
+ <a class="view-info" href="${h.url_for( controller='repository', action='load_invalid_tool', repository_id=trans.security.encode_id( repository_id ), tool_config=invalid_tool_config, changeset_revision=changeset_revision, webapp=webapp )}">
+ ${invalid_tool_config}
+ </a>
+ </td>
+ <td>${repository_name}</td>
+ <td>${changeset_revision}</td>
+ </tr>
+ %endfor
+ </table>
+ </div>
+ </div>
+ %else:
+ <div class="form-row">
+ You do not own any repositories that contain invalid tools.
+ </div>
+ %endif
+</div>
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
04 Apr '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/7aebce7e4aa1/
changeset: 7aebce7e4aa1
user: dan
date: 2012-04-04 18:24:43
summary: Rework the display of DrillDown form elements.
affected #: 3 files
diff -r 45735a13168bfa54ebcf232cbd9ebc2ffe10ee92 -r 7aebce7e4aa1081643c69e23136765585b5097be lib/galaxy/tools/parameters/basic.py
--- a/lib/galaxy/tools/parameters/basic.py
+++ b/lib/galaxy/tools/parameters/basic.py
@@ -1056,26 +1056,35 @@
... </param>
... ''' ) )
>>> print p.get_html()
- <div><ul class="toolParameterExpandableCollapsable">
- <li><span class="toolParameterExpandableCollapsable">[+]</span><input type="checkbox" name="some_name" value="heading1"">Heading 1
- <ul class="toolParameterExpandableCollapsable" default_state="collapsed">
- <li><input type="checkbox" name="some_name" value="option1"">Option 1
- </li>
- <li><input type="checkbox" name="some_name" value="option2"">Option 2
- </li>
- <li><span class="toolParameterExpandableCollapsable">[+]</span><input type="checkbox" name="some_name" value="heading1"">Heading 1
- <ul class="toolParameterExpandableCollapsable" default_state="collapsed">
- <li><input type="checkbox" name="some_name" value="option3"">Option 3
- </li>
- <li><input type="checkbox" name="some_name" value="option4"">Option 4
- </li>
- </ul>
- </li>
- </ul>
- </li>
- <li><input type="checkbox" name="some_name" value="option5"">Option 5
- </li>
- </ul></div>
+ <div class="form-row drilldown-container" id="drilldown--736f6d655f6e616d65">
+ <div class="form-row-input">
+ <span class="form-toggle icon-button toggle-expand" id="drilldown--736f6d655f6e616d65-68656164696e6731-click"></span>
+ <input type="checkbox" name="some_name" value="heading1" >Heading 1
+ <div class="form-row" id="drilldown--736f6d655f6e616d65-68656164696e6731-container" style="float: left; margin-left: 1em;">
+ <div class="form-row-input">
+ <input type="checkbox" name="some_name" value="option1" >Option 1
+ </div>
+ <div class="form-row-input">
+ <input type="checkbox" name="some_name" value="option2" >Option 2
+ </div>
+ <div class="form-row-input">
+ <span class="form-toggle icon-button toggle-expand" id="drilldown--736f6d655f6e616d65-68656164696e6731-68656164696e6731-click"></span>
+ <input type="checkbox" name="some_name" value="heading1" >Heading 1
+ <div class="form-row" id="drilldown--736f6d655f6e616d65-68656164696e6731-68656164696e6731-container" style="float: left; margin-left: 1em;">
+ <div class="form-row-input">
+ <input type="checkbox" name="some_name" value="option3" >Option 3
+ </div>
+ <div class="form-row-input">
+ <input type="checkbox" name="some_name" value="option4" >Option 4
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="form-row-input">
+ <input type="checkbox" name="some_name" value="option5" >Option 5
+ </div>
+ </div>
>>> p = DrillDownSelectToolParameter( None, XML(
... '''
... <param name="some_name" type="drill_down" display="radio" hierarchy="recurse" multiple="false">
@@ -1093,26 +1102,35 @@
... </param>
... ''' ) )
>>> print p.get_html()
- <div><ul class="toolParameterExpandableCollapsable">
- <li><span class="toolParameterExpandableCollapsable">[+]</span><input type="radio" name="some_name" value="heading1"">Heading 1
- <ul class="toolParameterExpandableCollapsable" default_state="collapsed">
- <li><input type="radio" name="some_name" value="option1"">Option 1
- </li>
- <li><input type="radio" name="some_name" value="option2"">Option 2
- </li>
- <li><span class="toolParameterExpandableCollapsable">[+]</span><input type="radio" name="some_name" value="heading1"">Heading 1
- <ul class="toolParameterExpandableCollapsable" default_state="collapsed">
- <li><input type="radio" name="some_name" value="option3"">Option 3
- </li>
- <li><input type="radio" name="some_name" value="option4"">Option 4
- </li>
- </ul>
- </li>
- </ul>
- </li>
- <li><input type="radio" name="some_name" value="option5"">Option 5
- </li>
- </ul></div>
+ <div class="form-row drilldown-container" id="drilldown--736f6d655f6e616d65">
+ <div class="form-row-input">
+ <span class="form-toggle icon-button toggle-expand" id="drilldown--736f6d655f6e616d65-68656164696e6731-click"></span>
+ <input type="radio" name="some_name" value="heading1" >Heading 1
+ <div class="form-row" id="drilldown--736f6d655f6e616d65-68656164696e6731-container" style="float: left; margin-left: 1em;">
+ <div class="form-row-input">
+ <input type="radio" name="some_name" value="option1" >Option 1
+ </div>
+ <div class="form-row-input">
+ <input type="radio" name="some_name" value="option2" >Option 2
+ </div>
+ <div class="form-row-input">
+ <span class="form-toggle icon-button toggle-expand" id="drilldown--736f6d655f6e616d65-68656164696e6731-68656164696e6731-click"></span>
+ <input type="radio" name="some_name" value="heading1" >Heading 1
+ <div class="form-row" id="drilldown--736f6d655f6e616d65-68656164696e6731-68656164696e6731-container" style="float: left; margin-left: 1em;">
+ <div class="form-row-input">
+ <input type="radio" name="some_name" value="option3" >Option 3
+ </div>
+ <div class="form-row-input">
+ <input type="radio" name="some_name" value="option4" >Option 4
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="form-row-input">
+ <input type="radio" name="some_name" value="option5" >Option 5
+ </div>
+ </div>
>>> 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 -r 45735a13168bfa54ebcf232cbd9ebc2ffe10ee92 -r 7aebce7e4aa1081643c69e23136765585b5097be lib/galaxy/web/form_builder.py
--- a/lib/galaxy/web/form_builder.py
+++ b/lib/galaxy/web/form_builder.py
@@ -6,6 +6,7 @@
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 @@
>>> 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()
- <div><ul class="toolParameterExpandableCollapsable">
- <li><span class="toolParameterExpandableCollapsable">[+]</span><input type="checkbox" name="foo" value="heading1"">Heading 1
- <ul class="toolParameterExpandableCollapsable" default_state="collapsed">
- <li><input type="checkbox" name="foo" value="option1"">Option 1
- </li>
- <li><input type="checkbox" name="foo" value="option2"">Option 2
- </li>
- <li><span class="toolParameterExpandableCollapsable">[+]</span><input type="checkbox" name="foo" value="heading1"">Heading 1
- <ul class="toolParameterExpandableCollapsable" default_state="collapsed">
- <li><input type="checkbox" name="foo" value="option3"">Option 3
- </li>
- <li><input type="checkbox" name="foo" value="option4"">Option 4
- </li>
- </ul>
- </li>
- </ul>
- </li>
- <li><input type="checkbox" name="foo" value="option5"">Option 5
- </li>
- </ul></div>
+ <div class="form-row drilldown-container" id="drilldown--666f6f">
+ <div class="form-row-input">
+ <span class="form-toggle icon-button toggle-expand" id="drilldown--666f6f-68656164696e6731-click"></span>
+ <input type="checkbox" name="foo" value="heading1" >Heading 1
+ <div class="form-row" id="drilldown--666f6f-68656164696e6731-container" style="float: left; margin-left: 1em;">
+ <div class="form-row-input">
+ <input type="checkbox" name="foo" value="option1" >Option 1
+ </div>
+ <div class="form-row-input">
+ <input type="checkbox" name="foo" value="option2" >Option 2
+ </div>
+ <div class="form-row-input">
+ <span class="form-toggle icon-button toggle-expand" id="drilldown--666f6f-68656164696e6731-68656164696e6731-click"></span>
+ <input type="checkbox" name="foo" value="heading1" >Heading 1
+ <div class="form-row" id="drilldown--666f6f-68656164696e6731-68656164696e6731-container" style="float: left; margin-left: 1em;">
+ <div class="form-row-input">
+ <input type="checkbox" name="foo" value="option3" >Option 3
+ </div>
+ <div class="form-row-input">
+ <input type="checkbox" name="foo" value="option4" >Option 4
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="form-row-input">
+ <input type="checkbox" name="foo" value="option5" >Option 5
+ </div>
+ </div>
>>> 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()
- <div><ul class="toolParameterExpandableCollapsable">
- <li><span class="toolParameterExpandableCollapsable">[+]</span><input type="radio" name="foo" value="heading1"">Heading 1
- <ul class="toolParameterExpandableCollapsable" default_state="collapsed">
- <li><input type="radio" name="foo" value="option1"">Option 1
- </li>
- <li><input type="radio" name="foo" value="option2"">Option 2
- </li>
- <li><span class="toolParameterExpandableCollapsable">[+]</span><input type="radio" name="foo" value="heading1"">Heading 1
- <ul class="toolParameterExpandableCollapsable" default_state="collapsed">
- <li><input type="radio" name="foo" value="option3"">Option 3
- </li>
- <li><input type="radio" name="foo" value="option4"">Option 4
- </li>
- </ul>
- </li>
- </ul>
- </li>
- <li><input type="radio" name="foo" value="option5"">Option 5
- </li>
- </ul></div>
+ <div class="form-row drilldown-container" id="drilldown--666f6f">
+ <div class="form-row-input">
+ <span class="form-toggle icon-button toggle-expand" id="drilldown--666f6f-68656164696e6731-click"></span>
+ <input type="radio" name="foo" value="heading1" >Heading 1
+ <div class="form-row" id="drilldown--666f6f-68656164696e6731-container" style="float: left; margin-left: 1em;">
+ <div class="form-row-input">
+ <input type="radio" name="foo" value="option1" >Option 1
+ </div>
+ <div class="form-row-input">
+ <input type="radio" name="foo" value="option2" >Option 2
+ </div>
+ <div class="form-row-input">
+ <span class="form-toggle icon-button toggle-expand" id="drilldown--666f6f-68656164696e6731-68656164696e6731-click"></span>
+ <input type="radio" name="foo" value="heading1" >Heading 1
+ <div class="form-row" id="drilldown--666f6f-68656164696e6731-68656164696e6731-container" style="float: left; margin-left: 1em;">
+ <div class="form-row-input">
+ <input type="radio" name="foo" value="option3" >Option 3
+ </div>
+ <div class="form-row-input">
+ <input type="radio" name="foo" value="option4" >Option 4
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="form-row-input">
+ <input type="radio" name="foo" value="option5" >Option 5
+ </div>
+ </div>
"""
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 @@
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 selected:
+ selected = ' checked'
+ else:
+ selected = ''
+ span_class = 'form-toggle icon-button toggle'
+ if option['value'] not in expanded_options:
+ span_class = "%s-expand" % ( span_class )
+ html.append( '<div class="form-row-input">')
+ drilldown_group_id = "%s-%s" % ( base_id, hexlify( option['value'] ) )
if option['options']:
- default_state = 'collapsed'
- default_icon = '[+]'
- if option['value'] in expanded_options:
- default_state = 'expanded'
- default_icon = '[-]'
- html.append( '<li><span class="toolParameterExpandableCollapsable">%s</span><input type="%s" name="%s%s" value="%s"%s">%s' % ( default_icon, self.display, prefix, self.name, escape(str(option['value']), quote=True), selected, option['name']) )
- html.append( '<ul class="toolParameterExpandableCollapsable" default_state="%s">' % default_state )
- recurse_options( html, option['options'], expanded_options )
- html.append( '</ul>')
- else:
- html.append( '<li><input type="%s" name="%s%s" value="%s"%s">%s' % ( self.display, prefix, self.name, escape(str(option['value']), quote=True), selected, option['name']) )
- html.append( '</li>' )
+ html.append( '<span class="%s" id="%s-click"></span>' % ( span_class, drilldown_group_id ) )
+ html.append( '<input type="%s" name="%s%s" value="%s" %s>%s' % ( self.display, prefix, self.name, escaped_option_value, selected, option['name']) )
+ if option['options']:
+ html.append( '<div class="form-row" id="%s-container" style="float: left; margin-left: 1em;">' % ( drilldown_group_id ) )
+ recurse_options( html, option['options'], drilldown_group_id, expanded_options )
+ html.append( '</div>')
+ html.append( '</div>')
+ drilldown_id = "drilldown-%s-%s" % ( hexlify( prefix ), hexlify( self.name ) )
rval = []
- rval.append( '<div><ul class="toolParameterExpandableCollapsable">' )
+ rval.append( '<div class="form-row drilldown-container" id="%s">' % ( drilldown_id ) )
expanded_options = []
find_expanded_options( expanded_options, self.options )
- recurse_options( rval, self.options, expanded_options )
- rval.append( '</ul></div>' )
+ recurse_options( rval, self.options, drilldown_id, expanded_options )
+ rval.append( '</div>' )
return '\n'.join( rval )
class AddressField(BaseField):
diff -r 45735a13168bfa54ebcf232cbd9ebc2ffe10ee92 -r 7aebce7e4aa1081643c69e23136765585b5097be templates/tool_form.mako
--- 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( '<a/>' ).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 ) {
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: fubar: Reverted picard_FastqToSam.xml which I accidentally embellished with a bogus --tmpdir flag because it does not use picard_wrapper.py
by Bitbucket 04 Apr '12
by Bitbucket 04 Apr '12
04 Apr '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/45735a13168b/
changeset: 45735a13168b
user: fubar
date: 2012-04-04 18:16:12
summary: Reverted picard_FastqToSam.xml which I accidentally embellished with a bogus --tmpdir flag because it does not use picard_wrapper.py
affected #: 1 file
diff -r 440e50875343ff7d48464826ce819ef5a232882a -r 45735a13168bfa54ebcf232cbd9ebc2ffe10ee92 tools/picard/picard_FastqToSam.xml
--- a/tools/picard/picard_FastqToSam.xml
+++ b/tools/picard/picard_FastqToSam.xml
@@ -4,7 +4,6 @@
<!-- Dan Blankenberg --><command>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}"
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: jgoecks: Fix bug that scrolled Trackster on double click when completely zoomed in.
by Bitbucket 04 Apr '12
by Bitbucket 04 Apr '12
04 Apr '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/440e50875343/
changeset: 440e50875343
user: jgoecks
date: 2012-04-04 17:33:26
summary: Fix bug that scrolled Trackster on double click when completely zoomed in.
affected #: 1 file
diff -r 9ceb68fe691eb50509bf95b0e7641680b993c55d -r 440e50875343ff7d48464826ce819ef5a232882a static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -1811,7 +1811,7 @@
}
},
zoom_in: function (point, container) {
- if (this.max_high === 0 || this.high - this.low < this.min_separation) {
+ if (this.max_high === 0 || this.high - this.low <= this.min_separation) {
return;
}
var span = this.high - this.low,
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: dannon: Fix multi-input workflow selector to account for recent structural changes.
by Bitbucket 04 Apr '12
by Bitbucket 04 Apr '12
04 Apr '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/9ceb68fe691e/
changeset: 9ceb68fe691e
user: dannon
date: 2012-04-04 17:27:48
summary: Fix multi-input workflow selector to account for recent structural changes.
affected #: 1 file
diff -r 26403ed86d4ccf39ea88c2658012a9a99d453266 -r 9ceb68fe691eb50509bf95b0e7641680b993c55d templates/workflow/run.mako
--- a/templates/workflow/run.mako
+++ b/templates/workflow/run.mako
@@ -37,7 +37,7 @@
placeholder = 'type to filter';
} else {
$('.multiinput').addClass('disabled');
- $('.multiinput', select.parent().prev()).removeClass('disabled');
+ $('.multiinput', select.closest('.form-row')).removeClass('disabled');
select.attr('multiple', 'multiple').attr('size', 8);
placeholder = 'type to filter, [enter] to select all';
}
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: Allow multiple output file collection from the job_working_directory.
by Bitbucket 03 Apr '12
by Bitbucket 03 Apr '12
03 Apr '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/26403ed86d4c/
changeset: 26403ed86d4c
user: natefoo
date: 2012-04-04 04:07:19
summary: Allow multiple output file collection from the job_working_directory.
affected #: 4 files
diff -r 99419b4be32d1054c9b58f1664d8f1ab37ac91ac -r 26403ed86d4ccf39ea88c2658012a9a99d453266 lib/galaxy/config.py
--- a/lib/galaxy/config.py
+++ b/lib/galaxy/config.py
@@ -86,6 +86,7 @@
self.allow_user_dataset_purge = string_as_bool( kwargs.get( "allow_user_dataset_purge", "False" ) )
self.allow_user_impersonation = string_as_bool( kwargs.get( "allow_user_impersonation", "False" ) )
self.new_user_dataset_access_role_default_private = string_as_bool( kwargs.get( "new_user_dataset_access_role_default_private", "False" ) )
+ self.collect_outputs_from = [ x.strip() for x in kwargs.get( 'collect_outputs_from', 'new_file_path,job_working_directory' ).lower().split(',') ]
self.template_path = resolve_path( kwargs.get( "template_path", "templates" ), self.root )
self.template_cache = resolve_path( kwargs.get( "template_cache_path", "database/compiled_templates" ), self.root )
self.local_job_queue_workers = int( kwargs.get( "local_job_queue_workers", "5" ) )
diff -r 99419b4be32d1054c9b58f1664d8f1ab37ac91ac -r 26403ed86d4ccf39ea88c2658012a9a99d453266 lib/galaxy/jobs/__init__.py
--- a/lib/galaxy/jobs/__init__.py
+++ b/lib/galaxy/jobs/__init__.py
@@ -443,7 +443,7 @@
# Check for and move associated_files
self.tool.collect_associated_files(out_data, self.working_directory)
# Create generated output children and primary datasets and add to param_dict
- collected_datasets = {'children':self.tool.collect_child_datasets(out_data),'primary':self.tool.collect_primary_datasets(out_data)}
+ collected_datasets = {'children':self.tool.collect_child_datasets(out_data, self.working_directory),'primary':self.tool.collect_primary_datasets(out_data, self.working_directory)}
param_dict.update({'__collected_datasets__':collected_datasets})
# Certain tools require tasks to be completed after job execution
# ( this used to be performed in the "exec_after_process" hook, but hooks are deprecated ).
diff -r 99419b4be32d1054c9b58f1664d8f1ab37ac91ac -r 26403ed86d4ccf39ea88c2658012a9a99d453266 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -2153,7 +2153,7 @@
shutil.rmtree(temp_file_path)
except:
continue
- def collect_child_datasets( self, output):
+ def collect_child_datasets( self, output, job_working_directory ):
"""
Look for child dataset files, create HDA and attach to parent.
"""
@@ -2161,7 +2161,12 @@
# Loop through output file names, looking for generated children in
# form of 'child_parentId_designation_visibility_extension'
for name, outdata in output.items():
- for filename in glob.glob(os.path.join(self.app.config.new_file_path,"child_%i_*" % outdata.id) ):
+ filenames = []
+ if 'new_file_path' in self.app.config.collect_outputs_from:
+ filenames.extend( glob.glob(os.path.join(self.app.config.new_file_path,"child_%i_*" % outdata.id) ) )
+ if 'job_working_directory' in self.app.config.collect_outputs_from:
+ filenames.extend( glob.glob(os.path.join(job_working_directory,"child_%i_*" % outdata.id) ) )
+ for filename in filenames:
if not name in children:
children[name] = {}
fields = os.path.basename(filename).split("_")
@@ -2213,7 +2218,7 @@
self.sa_session.add( child_dataset )
self.sa_session.flush()
return children
- def collect_primary_datasets( self, output):
+ def collect_primary_datasets( self, output, job_working_directory ):
"""
Find any additional datasets generated by a tool and attach (for
cases where number of outputs is not known in advance).
@@ -2223,7 +2228,12 @@
# datasets in form of:
# 'primary_associatedWithDatasetID_designation_visibility_extension(_DBKEY)'
for name, outdata in output.items():
- for filename in glob.glob(os.path.join(self.app.config.new_file_path,"primary_%i_*" % outdata.id) ):
+ filenames = []
+ if 'new_file_path' in self.app.config.collect_outputs_from:
+ filenames.extend( glob.glob(os.path.join(self.app.config.new_file_path,"primary_%i_*" % outdata.id) ) )
+ if 'job_working_directory' in self.app.config.collect_outputs_from:
+ filenames.extend( glob.glob(os.path.join(job_working_directory,"primary_%i_*" % outdata.id) ) )
+ for filename in filenames:
if not name in primary_datasets:
primary_datasets[name] = {}
fields = os.path.basename(filename).split("_")
diff -r 99419b4be32d1054c9b58f1664d8f1ab37ac91ac -r 26403ed86d4ccf39ea88c2658012a9a99d453266 universe_wsgi.ini.sample
--- a/universe_wsgi.ini.sample
+++ b/universe_wsgi.ini.sample
@@ -151,7 +151,6 @@
# Directory where chrom len files are kept, currently mainly used by trackster
#len_file_path = tool-data/shared/ucsc/chrom
-
# Datatypes config file, defines what data (file) types are available in
# Galaxy.
#datatypes_config_file = datatypes_conf.xml
@@ -172,6 +171,14 @@
# Path to the directory containing the external_service_types defined in the config.
#external_service_type_path = external_service_types
+# Tools with a number of outputs not known until runtime can write these
+# outputs to a directory for collection by Galaxy when the job is done.
+# Previously, this directory was new_file_path, but using one global directory
+# can cause performance problems, so using job_working_directory ('.' or cwd
+# when a job is run) is encouraged. By default, both are checked to avoid
+# breaking existing tools.
+#collect_outputs_from = new_file_path,job_working_directory
+
# -- Mail and notification
# Galaxy sends mail for various things: Subscribing users to the mailing list
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: fubar: Added --tmpdir "${__new_file_path__}" to some other Picard tool command lines so java uses that for temp space.
by Bitbucket 03 Apr '12
by Bitbucket 03 Apr '12
03 Apr '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/99419b4be32d/
changeset: 99419b4be32d
user: fubar
date: 2012-04-03 23:56:46
summary: Added --tmpdir "${__new_file_path__}" to some other Picard tool command lines so java uses that for temp space.
affected #: 5 files
diff -r d2758274580003a0cb94eecc65de8d2d358f9a37 -r 99419b4be32d1054c9b58f1664d8f1ab37ac91ac tools/picard/picard_BamIndexStats.xml
--- a/tools/picard/picard_BamIndexStats.xml
+++ b/tools/picard/picard_BamIndexStats.xml
@@ -7,6 +7,7 @@
-t "$htmlfile"
-d "$htmlfile.files_path"
-j "${GALAXY_DATA_INDEX_DIR}/shared/jars/picard/BamIndexStats.jar"
+ --tmpdir "${__new_file_path__}"
</command><inputs><param format="bam" name="input_file" type="data" label="BAM dataset to generate statistics for"
diff -r d2758274580003a0cb94eecc65de8d2d358f9a37 -r 99419b4be32d1054c9b58f1664d8f1ab37ac91ac tools/picard/picard_FastqToSam.xml
--- a/tools/picard/picard_FastqToSam.xml
+++ b/tools/picard/picard_FastqToSam.xml
@@ -4,6 +4,7 @@
<!-- Dan Blankenberg --><command>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}"
diff -r d2758274580003a0cb94eecc65de8d2d358f9a37 -r 99419b4be32d1054c9b58f1664d8f1ab37ac91ac tools/picard/picard_MarkDuplicates.xml
--- a/tools/picard/picard_MarkDuplicates.xml
+++ b/tools/picard/picard_MarkDuplicates.xml
@@ -7,6 +7,7 @@
--opt-dup-dist="$optDupeDist"
--output-format=$outputFormat
--output-txt=$outMetrics
+ --tmpdir "${__new_file_path__}"
#if str( $outputFormat ) == "sam"
#if str( $remDups ) == "true"
--output-sam=$outFileSamRemoved
diff -r d2758274580003a0cb94eecc65de8d2d358f9a37 -r 99419b4be32d1054c9b58f1664d8f1ab37ac91ac tools/picard/picard_ReorderSam.xml
--- a/tools/picard/picard_ReorderSam.xml
+++ b/tools/picard/picard_ReorderSam.xml
@@ -15,6 +15,7 @@
--allow-contig-len-discord=$allowContigLenDiscord
--output-format=$outputFormat
--output=$outFile
+ --tmpdir "${__new_file_path__}"
-j "${GALAXY_DATA_INDEX_DIR}/shared/jars/picard/ReorderSam.jar"
</command><inputs>
diff -r d2758274580003a0cb94eecc65de8d2d358f9a37 -r 99419b4be32d1054c9b58f1664d8f1ab37ac91ac tools/picard/rgPicardASMetrics.xml
--- a/tools/picard/rgPicardASMetrics.xml
+++ b/tools/picard/rgPicardASMetrics.xml
@@ -2,7 +2,7 @@
<command interpreter="python">
picard_wrapper.py -i "$input_file" -d "$html_file.files_path" -t "$html_file"
--assumesorted "$sorted" -b "$bisulphite" --adaptors "$adaptors" --maxinsert "$maxinsert" -n "$out_prefix" --datatype "$input_file.ext"
- -j ${GALAXY_DATA_INDEX_DIR}/shared/jars/picard/CollectAlignmentSummaryMetrics.jar
+ -j ${GALAXY_DATA_INDEX_DIR}/shared/jars/picard/CollectAlignmentSummaryMetrics.jar --tmpdir "${__new_file_path__}"
#if $genomeSource.refGenomeSource == "history":
--ref-file "$genomeSource.ownFile"
#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
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/8407e8f932af/
changeset: 8407e8f932af
user: jgoecks
date: 2012-04-03 23:10:55
summary: Handle tool labels outside sections.
affected #: 2 files
diff -r 4d28b899b291c984b7ec5e38ed92124148e69f44 -r 8407e8f932af6cbbcf151be8fd3df9086bbb6468 static/scripts/backbone/tools.js
--- a/static/scripts/backbone/tools.js
+++ b/static/scripts/backbone/tools.js
@@ -178,7 +178,13 @@
clear_search_results: function() {
this.each(function(panel_elt) {
- panel_elt.clear_search_results();
+ if (panel_elt instanceof ToolPanelSection) {
+ panel_elt.clear_search_results();
+ }
+ else {
+ // Label or tool, so just show.
+ panel_elt.show();
+ }
});
},
@@ -189,8 +195,24 @@
return;
}
+ var cur_label = null;
this.each(function(panel_elt) {
- panel_elt.apply_search_results(results);
+ if (panel_elt instanceof ToolPanelLabel) {
+ cur_label = panel_elt;
+ cur_label.hide();
+ }
+ else if (panel_elt instanceof Tool) {
+ if (panel_elt.apply_search_results(results)) {
+ if (cur_label) {
+ cur_label.show();
+ }
+ }
+ }
+ else {
+ // Starting new section, so clear current label.
+ cur_label = null;
+ panel_elt.apply_search_results(results);
+ }
});
}
});
@@ -358,6 +380,11 @@
tool_view.render();
this_el.append(tool_view.$el);
}
+ else if (panel_elt instanceof ToolPanelLabel) {
+ var label_view = new ToolPanelLabelView({model: panel_elt});
+ label_view.render();
+ this_el.append(label_view.$el);
+ }
});
return this;
},
diff -r 4d28b899b291c984b7ec5e38ed92124148e69f44 -r 8407e8f932af6cbbcf151be8fd3df9086bbb6468 static/scripts/packed/backbone/tools.js
--- a/static/scripts/packed/backbone/tools.js
+++ b/static/scripts/packed/backbone/tools.js
@@ -1,1 +1,1 @@
-var BaseModel=Backbone.Model.extend({defaults:{id:null,name:null,hidden:false},show:function(){this.set("hidden",false)},hide:function(){this.set("hidden",true)},is_visible:function(){return !this.attributes.hidden}});var Tool=BaseModel.extend({defaults:{description:null,target:null,params:[]},apply_search_results:function(a){(_.indexOf(a,this.attributes.id)!==-1?this.show():this.hide());return this.is_visible()}});var ToolPanelLabel=BaseModel.extend({});var ToolPanelSection=BaseModel.extend({defaults:{elems:[],open:false},clear_search_results:function(){_.each(this.attributes.elems,function(a){a.show()});this.show();this.set("open",false)},apply_search_results:function(b){var c=true,a;_.each(this.attributes.elems,function(d){if(d instanceof ToolPanelLabel){a=d;a.hide()}else{if(d instanceof Tool){if(d.apply_search_results(b)){c=false;if(a){a.show()}}}}});if(c){this.hide()}else{this.show();this.set("open",true)}}});var ToolSearch=BaseModel.extend({defaults:{spinner_url:"",search_url:"",visible:true,query:"",results:null},initialize:function(){this.on("change:query",this.do_search)},do_search:function(){var c=this.attributes.query;if(c.length<3){this.set("results",null);return}var b=c+"*";if(this.timer){clearTimeout(this.timer)}$("#search-spinner").show();var a=this;this.timer=setTimeout(function(){$.get(a.attributes.search_url,{query:b},function(d){a.set("results",d);$("#search-spinner").hide()},"json")},200)}});var ToolPanel=Backbone.Collection.extend({url:"/tools",parse:function(a){var b=function(e){var d=e.type;if(d==="tool"){return new Tool(e)}else{if(d==="section"){var c=_.map(e.elems,b);e.elems=c;return new ToolPanelSection(e)}else{if(d==="label"){return new ToolPanelLabel(e)}}}};return _.map(a,b)},initialize:function(a){this.tool_search=a.tool_search;this.tool_search.on("change:results",this.apply_search_results,this)},clear_search_results:function(){this.each(function(a){a.clear_search_results()})},apply_search_results:function(){var a=this.tool_search.attributes.results;if(a===null){this.clear_search_results();return}this.each(function(b){b.apply_search_results(a)})}});var BaseView=Backbone.View.extend({initialize:function(){this.model.on("change:hidden",this.update_visible,this)},update_visible:function(){(this.model.attributes.hidden?this.$el.hide():this.$el.show())}});var ToolLinkView=BaseView.extend({tagName:"div",template:Handlebars.templates.tool_link,render:function(){this.$el.append(this.template(this.model.toJSON()));return this}});var ToolPanelLabelView=BaseView.extend({tagName:"div",className:"toolPanelLabel",template:Handlebars.templates.panel_label,render:function(){this.$el.append(this.template(this.model.toJSON()));return this},});var ToolPanelSectionView=BaseView.extend({tagName:"div",className:"toolSectionWrapper",template:Handlebars.templates.panel_section,initialize:function(){BaseView.prototype.initialize.call(this);this.model.on("change:open",this.update_open,this)},render:function(){this.$el.append(this.template(this.model.toJSON()));var a=this.$el.find(".toolSectionBody");_.each(this.model.attributes.elems,function(b){if(b instanceof Tool){var c=new ToolLinkView({model:b,className:"toolTitle"});c.render();a.append(c.$el)}else{if(b instanceof ToolPanelLabel){var d=new ToolPanelLabelView({model:b});d.render();a.append(d.$el)}else{}}});return this},events:{"click .toolSectionTitle > a":"toggle"},toggle:function(){this.model.set("open",!this.model.attributes.open)},update_open:function(){(this.model.attributes.open?this.$el.children(".toolSectionBody").slideDown("fast"):this.$el.children(".toolSectionBody").slideUp("fast"))}});var ToolSearchView=Backbone.View.extend({tagName:"div",id:"tool-search",className:"bar",template:Handlebars.templates.tool_search,events:{click:"focus_and_select","keyup :input":"query_changed"},render:function(){this.$el.append(this.template(this.model.toJSON()));if(!this.model.is_visible()){this.$el.hide()}return this},focus_and_select:function(){this.$el.find(":input").focus().select()},query_changed:function(){this.model.set("query",this.$el.find(":input").val())}});var ToolPanelView=Backbone.View.extend({tagName:"div",className:"toolMenu",initialize:function(a){this.collection.tool_search.on("change:results",this.handle_search_results,this)},render:function(){var b=this.$el;var a=new ToolSearchView({model:this.collection.tool_search});a.render();b.append(a.$el);this.collection.each(function(d){if(d instanceof ToolPanelSection){var c=new ToolPanelSectionView({model:d});c.render();b.append(c.$el)}else{if(d instanceof Tool){var e=new ToolLinkView({model:d,className:"toolTitleNoSection"});e.render();b.append(e.$el)}}});return this},handle_search_results:function(){var a=this.collection.tool_search.attributes.results;if(a&&a.length===0){$("#search-no-results").show()}else{$("#search-no-results").hide()}}});
\ No newline at end of file
+var BaseModel=Backbone.Model.extend({defaults:{id:null,name:null,hidden:false},show:function(){this.set("hidden",false)},hide:function(){this.set("hidden",true)},is_visible:function(){return !this.attributes.hidden}});var Tool=BaseModel.extend({defaults:{description:null,target:null,params:[]},apply_search_results:function(a){(_.indexOf(a,this.attributes.id)!==-1?this.show():this.hide());return this.is_visible()}});var ToolPanelLabel=BaseModel.extend({});var ToolPanelSection=BaseModel.extend({defaults:{elems:[],open:false},clear_search_results:function(){_.each(this.attributes.elems,function(a){a.show()});this.show();this.set("open",false)},apply_search_results:function(b){var c=true,a;_.each(this.attributes.elems,function(d){if(d instanceof ToolPanelLabel){a=d;a.hide()}else{if(d instanceof Tool){if(d.apply_search_results(b)){c=false;if(a){a.show()}}}}});if(c){this.hide()}else{this.show();this.set("open",true)}}});var ToolSearch=BaseModel.extend({defaults:{spinner_url:"",search_url:"",visible:true,query:"",results:null},initialize:function(){this.on("change:query",this.do_search)},do_search:function(){var c=this.attributes.query;if(c.length<3){this.set("results",null);return}var b=c+"*";if(this.timer){clearTimeout(this.timer)}$("#search-spinner").show();var a=this;this.timer=setTimeout(function(){$.get(a.attributes.search_url,{query:b},function(d){a.set("results",d);$("#search-spinner").hide()},"json")},200)}});var ToolPanel=Backbone.Collection.extend({url:"/tools",parse:function(a){var b=function(e){var d=e.type;if(d==="tool"){return new Tool(e)}else{if(d==="section"){var c=_.map(e.elems,b);e.elems=c;return new ToolPanelSection(e)}else{if(d==="label"){return new ToolPanelLabel(e)}}}};return _.map(a,b)},initialize:function(a){this.tool_search=a.tool_search;this.tool_search.on("change:results",this.apply_search_results,this)},clear_search_results:function(){this.each(function(a){if(a instanceof ToolPanelSection){a.clear_search_results()}else{a.show()}})},apply_search_results:function(){var b=this.tool_search.attributes.results;if(b===null){this.clear_search_results();return}var a=null;this.each(function(c){if(c instanceof ToolPanelLabel){a=c;a.hide()}else{if(c instanceof Tool){if(c.apply_search_results(b)){if(a){a.show()}}}else{a=null;c.apply_search_results(b)}}})}});var BaseView=Backbone.View.extend({initialize:function(){this.model.on("change:hidden",this.update_visible,this)},update_visible:function(){(this.model.attributes.hidden?this.$el.hide():this.$el.show())}});var ToolLinkView=BaseView.extend({tagName:"div",template:Handlebars.templates.tool_link,render:function(){this.$el.append(this.template(this.model.toJSON()));return this}});var ToolPanelLabelView=BaseView.extend({tagName:"div",className:"toolPanelLabel",template:Handlebars.templates.panel_label,render:function(){this.$el.append(this.template(this.model.toJSON()));return this},});var ToolPanelSectionView=BaseView.extend({tagName:"div",className:"toolSectionWrapper",template:Handlebars.templates.panel_section,initialize:function(){BaseView.prototype.initialize.call(this);this.model.on("change:open",this.update_open,this)},render:function(){this.$el.append(this.template(this.model.toJSON()));var a=this.$el.find(".toolSectionBody");_.each(this.model.attributes.elems,function(b){if(b instanceof Tool){var c=new ToolLinkView({model:b,className:"toolTitle"});c.render();a.append(c.$el)}else{if(b instanceof ToolPanelLabel){var d=new ToolPanelLabelView({model:b});d.render();a.append(d.$el)}else{}}});return this},events:{"click .toolSectionTitle > a":"toggle"},toggle:function(){this.model.set("open",!this.model.attributes.open)},update_open:function(){(this.model.attributes.open?this.$el.children(".toolSectionBody").slideDown("fast"):this.$el.children(".toolSectionBody").slideUp("fast"))}});var ToolSearchView=Backbone.View.extend({tagName:"div",id:"tool-search",className:"bar",template:Handlebars.templates.tool_search,events:{click:"focus_and_select","keyup :input":"query_changed"},render:function(){this.$el.append(this.template(this.model.toJSON()));if(!this.model.is_visible()){this.$el.hide()}return this},focus_and_select:function(){this.$el.find(":input").focus().select()},query_changed:function(){this.model.set("query",this.$el.find(":input").val())}});var ToolPanelView=Backbone.View.extend({tagName:"div",className:"toolMenu",initialize:function(a){this.collection.tool_search.on("change:results",this.handle_search_results,this)},render:function(){var b=this.$el;var a=new ToolSearchView({model:this.collection.tool_search});a.render();b.append(a.$el);this.collection.each(function(d){if(d instanceof ToolPanelSection){var c=new ToolPanelSectionView({model:d});c.render();b.append(c.$el)}else{if(d instanceof Tool){var e=new ToolLinkView({model:d,className:"toolTitleNoSection"});e.render();b.append(e.$el)}else{if(d instanceof ToolPanelLabel){var f=new ToolPanelLabelView({model:d});f.render();b.append(f.$el)}}}});return this},handle_search_results:function(){var a=this.collection.tool_search.attributes.results;if(a&&a.length===0){$("#search-no-results").show()}else{$("#search-no-results").hide()}}});
\ No newline at end of file
https://bitbucket.org/galaxy/galaxy-central/changeset/d27582745800/
changeset: d27582745800
user: jgoecks
date: 2012-04-03 23:41:13
summary: Update styles for standalone labels, tools in tool panel.
affected #: 2 files
diff -r 8407e8f932af6cbbcf151be8fd3df9086bbb6468 -r d2758274580003a0cb94eecc65de8d2d358f9a37 static/june_2007_style/blue/tool_menu.css
--- a/static/june_2007_style/blue/tool_menu.css
+++ b/static/june_2007_style/blue/tool_menu.css
@@ -1,2 +1,4 @@
#tool-search{padding-top:5px;padding-bottom:10px;position:relative;}
div.toolSectionWrapper{margin-bottom:5px;}
+div.toolPanelLabel{padding-top:10px;padding-bottom:5px;font-weight:bold;color:gray;text-transform:uppercase;}
+div.toolTitleNoSection{padding-bottom:5px;font-weight:bold;}
diff -r 8407e8f932af6cbbcf151be8fd3df9086bbb6468 -r d2758274580003a0cb94eecc65de8d2d358f9a37 static/june_2007_style/tool_menu.css.tmpl
--- a/static/june_2007_style/tool_menu.css.tmpl
+++ b/static/june_2007_style/tool_menu.css.tmpl
@@ -3,6 +3,21 @@
padding-bottom: 10px;
position: relative;
}
+
div.toolSectionWrapper {
margin-bottom: 5px;
+}
+
+div.toolPanelLabel {
+ padding-top: 10px;
+ padding-bottom: 5px;
+ font-weight: bold;
+ color: gray;
+ text-transform: uppercase;
+}
+
+div.toolTitleNoSection
+{
+ padding-bottom: 5px;
+ font-weight: bold;
}
\ 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/changeset/3704881a59f0/
changeset: 3704881a59f0
user: fubar
date: 2012-04-03 22:11:54
summary: Patch for picard_AddOrReplaceReadGroups.xml to add --tmpdir "${__new_file_path__}" to the command line generated. That will over-ride the default value "/tmp" for opts.tmpdir in picard_wrapper.py and solve the problem with /tmp filling reported by Matt Shirley.
affected #: 1 file
diff -r 84d0e16fad2cb311503a8e688de4808fd65d78f0 -r 3704881a59f067437247d65b3e5b195f6358cc6c tools/picard/picard_AddOrReplaceReadGroups.xml
--- a/tools/picard/picard_AddOrReplaceReadGroups.xml
+++ b/tools/picard/picard_AddOrReplaceReadGroups.xml
@@ -16,6 +16,7 @@
--output-format=$outputFormat
--output=$outFile
-j "${GALAXY_DATA_INDEX_DIR}/shared/jars/picard/AddOrReplaceReadGroups.jar"
+ --tmpdir "${__new_file_path__}"
</command><inputs><param format="bam,sam" name="inputFile" type="data" label="SAM/BAM dataset to add or replace read groups in"
https://bitbucket.org/galaxy/galaxy-central/changeset/4d28b899b291/
changeset: 4d28b899b291
user: fubar
date: 2012-04-03 22:12:48
summary: branch merge
affected #: 2 files
diff -r 3704881a59f067437247d65b3e5b195f6358cc6c -r 4d28b899b291c984b7ec5e38ed92124148e69f44 static/scripts/backbone/tools.js
--- a/static/scripts/backbone/tools.js
+++ b/static/scripts/backbone/tools.js
@@ -285,7 +285,6 @@
* Toggle visibility of tool section.
*/
toggle: function() {
- this.$el.children(".toolSectionBody").toggle("fast");
this.model.set("open", !this.model.attributes.open);
},
@@ -294,8 +293,8 @@
*/
update_open: function() {
(this.model.attributes.open ?
- this.$el.children(".toolSectionBody").show("fast") :
- this.$el.children(".toolSectionBody").hide("fast")
+ this.$el.children(".toolSectionBody").slideDown("fast") :
+ this.$el.children(".toolSectionBody").slideUp("fast")
);
}
});
diff -r 3704881a59f067437247d65b3e5b195f6358cc6c -r 4d28b899b291c984b7ec5e38ed92124148e69f44 static/scripts/packed/backbone/tools.js
--- a/static/scripts/packed/backbone/tools.js
+++ b/static/scripts/packed/backbone/tools.js
@@ -1,1 +1,1 @@
-var BaseModel=Backbone.Model.extend({defaults:{id:null,name:null,hidden:false},show:function(){this.set("hidden",false)},hide:function(){this.set("hidden",true)},is_visible:function(){return !this.attributes.hidden}});var Tool=BaseModel.extend({defaults:{description:null,target:null,params:[]},apply_search_results:function(a){(_.indexOf(a,this.attributes.id)!==-1?this.show():this.hide());return this.is_visible()}});var ToolPanelLabel=BaseModel.extend({});var ToolPanelSection=BaseModel.extend({defaults:{elems:[],open:false},clear_search_results:function(){_.each(this.attributes.elems,function(a){a.show()});this.show();this.set("open",false)},apply_search_results:function(b){var c=true,a;_.each(this.attributes.elems,function(d){if(d instanceof ToolPanelLabel){a=d;a.hide()}else{if(d instanceof Tool){if(d.apply_search_results(b)){c=false;if(a){a.show()}}}}});if(c){this.hide()}else{this.show();this.set("open",true)}}});var ToolSearch=BaseModel.extend({defaults:{spinner_url:"",search_url:"",visible:true,query:"",results:null},initialize:function(){this.on("change:query",this.do_search)},do_search:function(){var c=this.attributes.query;if(c.length<3){this.set("results",null);return}var b=c+"*";if(this.timer){clearTimeout(this.timer)}$("#search-spinner").show();var a=this;this.timer=setTimeout(function(){$.get(a.attributes.search_url,{query:b},function(d){a.set("results",d);$("#search-spinner").hide()},"json")},200)}});var ToolPanel=Backbone.Collection.extend({url:"/tools",parse:function(a){var b=function(e){var d=e.type;if(d==="tool"){return new Tool(e)}else{if(d==="section"){var c=_.map(e.elems,b);e.elems=c;return new ToolPanelSection(e)}else{if(d==="label"){return new ToolPanelLabel(e)}}}};return _.map(a,b)},initialize:function(a){this.tool_search=a.tool_search;this.tool_search.on("change:results",this.apply_search_results,this)},clear_search_results:function(){this.each(function(a){a.clear_search_results()})},apply_search_results:function(){var a=this.tool_search.attributes.results;if(a===null){this.clear_search_results();return}this.each(function(b){b.apply_search_results(a)})}});var BaseView=Backbone.View.extend({initialize:function(){this.model.on("change:hidden",this.update_visible,this)},update_visible:function(){(this.model.attributes.hidden?this.$el.hide():this.$el.show())}});var ToolLinkView=BaseView.extend({tagName:"div",template:Handlebars.templates.tool_link,render:function(){this.$el.append(this.template(this.model.toJSON()));return this}});var ToolPanelLabelView=BaseView.extend({tagName:"div",className:"toolPanelLabel",template:Handlebars.templates.panel_label,render:function(){this.$el.append(this.template(this.model.toJSON()));return this},});var ToolPanelSectionView=BaseView.extend({tagName:"div",className:"toolSectionWrapper",template:Handlebars.templates.panel_section,initialize:function(){BaseView.prototype.initialize.call(this);this.model.on("change:open",this.update_open,this)},render:function(){this.$el.append(this.template(this.model.toJSON()));var a=this.$el.find(".toolSectionBody");_.each(this.model.attributes.elems,function(b){if(b instanceof Tool){var c=new ToolLinkView({model:b,className:"toolTitle"});c.render();a.append(c.$el)}else{if(b instanceof ToolPanelLabel){var d=new ToolPanelLabelView({model:b});d.render();a.append(d.$el)}else{}}});return this},events:{"click .toolSectionTitle > a":"toggle"},toggle:function(){this.$el.children(".toolSectionBody").toggle("fast");this.model.set("open",!this.model.attributes.open)},update_open:function(){(this.model.attributes.open?this.$el.children(".toolSectionBody").show("fast"):this.$el.children(".toolSectionBody").hide("fast"))}});var ToolSearchView=Backbone.View.extend({tagName:"div",id:"tool-search",className:"bar",template:Handlebars.templates.tool_search,events:{click:"focus_and_select","keyup :input":"query_changed"},render:function(){this.$el.append(this.template(this.model.toJSON()));if(!this.model.is_visible()){this.$el.hide()}return this},focus_and_select:function(){this.$el.find(":input").focus().select()},query_changed:function(){this.model.set("query",this.$el.find(":input").val())}});var ToolPanelView=Backbone.View.extend({tagName:"div",className:"toolMenu",initialize:function(a){this.collection.tool_search.on("change:results",this.handle_search_results,this)},render:function(){var b=this.$el;var a=new ToolSearchView({model:this.collection.tool_search});a.render();b.append(a.$el);this.collection.each(function(d){if(d instanceof ToolPanelSection){var c=new ToolPanelSectionView({model:d});c.render();b.append(c.$el)}else{if(d instanceof Tool){var e=new ToolLinkView({model:d,className:"toolTitleNoSection"});e.render();b.append(e.$el)}}});return this},handle_search_results:function(){var a=this.collection.tool_search.attributes.results;if(a&&a.length===0){$("#search-no-results").show()}else{$("#search-no-results").hide()}}});
\ No newline at end of file
+var BaseModel=Backbone.Model.extend({defaults:{id:null,name:null,hidden:false},show:function(){this.set("hidden",false)},hide:function(){this.set("hidden",true)},is_visible:function(){return !this.attributes.hidden}});var Tool=BaseModel.extend({defaults:{description:null,target:null,params:[]},apply_search_results:function(a){(_.indexOf(a,this.attributes.id)!==-1?this.show():this.hide());return this.is_visible()}});var ToolPanelLabel=BaseModel.extend({});var ToolPanelSection=BaseModel.extend({defaults:{elems:[],open:false},clear_search_results:function(){_.each(this.attributes.elems,function(a){a.show()});this.show();this.set("open",false)},apply_search_results:function(b){var c=true,a;_.each(this.attributes.elems,function(d){if(d instanceof ToolPanelLabel){a=d;a.hide()}else{if(d instanceof Tool){if(d.apply_search_results(b)){c=false;if(a){a.show()}}}}});if(c){this.hide()}else{this.show();this.set("open",true)}}});var ToolSearch=BaseModel.extend({defaults:{spinner_url:"",search_url:"",visible:true,query:"",results:null},initialize:function(){this.on("change:query",this.do_search)},do_search:function(){var c=this.attributes.query;if(c.length<3){this.set("results",null);return}var b=c+"*";if(this.timer){clearTimeout(this.timer)}$("#search-spinner").show();var a=this;this.timer=setTimeout(function(){$.get(a.attributes.search_url,{query:b},function(d){a.set("results",d);$("#search-spinner").hide()},"json")},200)}});var ToolPanel=Backbone.Collection.extend({url:"/tools",parse:function(a){var b=function(e){var d=e.type;if(d==="tool"){return new Tool(e)}else{if(d==="section"){var c=_.map(e.elems,b);e.elems=c;return new ToolPanelSection(e)}else{if(d==="label"){return new ToolPanelLabel(e)}}}};return _.map(a,b)},initialize:function(a){this.tool_search=a.tool_search;this.tool_search.on("change:results",this.apply_search_results,this)},clear_search_results:function(){this.each(function(a){a.clear_search_results()})},apply_search_results:function(){var a=this.tool_search.attributes.results;if(a===null){this.clear_search_results();return}this.each(function(b){b.apply_search_results(a)})}});var BaseView=Backbone.View.extend({initialize:function(){this.model.on("change:hidden",this.update_visible,this)},update_visible:function(){(this.model.attributes.hidden?this.$el.hide():this.$el.show())}});var ToolLinkView=BaseView.extend({tagName:"div",template:Handlebars.templates.tool_link,render:function(){this.$el.append(this.template(this.model.toJSON()));return this}});var ToolPanelLabelView=BaseView.extend({tagName:"div",className:"toolPanelLabel",template:Handlebars.templates.panel_label,render:function(){this.$el.append(this.template(this.model.toJSON()));return this},});var ToolPanelSectionView=BaseView.extend({tagName:"div",className:"toolSectionWrapper",template:Handlebars.templates.panel_section,initialize:function(){BaseView.prototype.initialize.call(this);this.model.on("change:open",this.update_open,this)},render:function(){this.$el.append(this.template(this.model.toJSON()));var a=this.$el.find(".toolSectionBody");_.each(this.model.attributes.elems,function(b){if(b instanceof Tool){var c=new ToolLinkView({model:b,className:"toolTitle"});c.render();a.append(c.$el)}else{if(b instanceof ToolPanelLabel){var d=new ToolPanelLabelView({model:b});d.render();a.append(d.$el)}else{}}});return this},events:{"click .toolSectionTitle > a":"toggle"},toggle:function(){this.model.set("open",!this.model.attributes.open)},update_open:function(){(this.model.attributes.open?this.$el.children(".toolSectionBody").slideDown("fast"):this.$el.children(".toolSectionBody").slideUp("fast"))}});var ToolSearchView=Backbone.View.extend({tagName:"div",id:"tool-search",className:"bar",template:Handlebars.templates.tool_search,events:{click:"focus_and_select","keyup :input":"query_changed"},render:function(){this.$el.append(this.template(this.model.toJSON()));if(!this.model.is_visible()){this.$el.hide()}return this},focus_and_select:function(){this.$el.find(":input").focus().select()},query_changed:function(){this.model.set("query",this.$el.find(":input").val())}});var ToolPanelView=Backbone.View.extend({tagName:"div",className:"toolMenu",initialize:function(a){this.collection.tool_search.on("change:results",this.handle_search_results,this)},render:function(){var b=this.$el;var a=new ToolSearchView({model:this.collection.tool_search});a.render();b.append(a.$el);this.collection.each(function(d){if(d instanceof ToolPanelSection){var c=new ToolPanelSectionView({model:d});c.render();b.append(c.$el)}else{if(d instanceof Tool){var e=new ToolLinkView({model:d,className:"toolTitleNoSection"});e.render();b.append(e.$el)}}});return this},handle_search_results:function(){var a=this.collection.tool_search.attributes.results;if(a&&a.length===0){$("#search-no-results").show()}else{$("#search-no-results").hide()}}});
\ 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/changeset/d77454603237/
changeset: d77454603237
user: jgoecks
date: 2012-04-03 22:00:17
summary: Prettify tool section show/hide using sliding.
affected #: 2 files
diff -r a0f64b544cc6412516a62459808e0026d2897dc0 -r d774546032374648823f29aad4fb178086e169e4 static/scripts/backbone/tools.js
--- a/static/scripts/backbone/tools.js
+++ b/static/scripts/backbone/tools.js
@@ -285,7 +285,6 @@
* Toggle visibility of tool section.
*/
toggle: function() {
- this.$el.children(".toolSectionBody").toggle("fast");
this.model.set("open", !this.model.attributes.open);
},
@@ -294,8 +293,8 @@
*/
update_open: function() {
(this.model.attributes.open ?
- this.$el.children(".toolSectionBody").show("fast") :
- this.$el.children(".toolSectionBody").hide("fast")
+ this.$el.children(".toolSectionBody").slideDown("fast") :
+ this.$el.children(".toolSectionBody").slideUp("fast")
);
}
});
diff -r a0f64b544cc6412516a62459808e0026d2897dc0 -r d774546032374648823f29aad4fb178086e169e4 static/scripts/packed/backbone/tools.js
--- a/static/scripts/packed/backbone/tools.js
+++ b/static/scripts/packed/backbone/tools.js
@@ -1,1 +1,1 @@
-var BaseModel=Backbone.Model.extend({defaults:{id:null,name:null,hidden:false},show:function(){this.set("hidden",false)},hide:function(){this.set("hidden",true)},is_visible:function(){return !this.attributes.hidden}});var Tool=BaseModel.extend({defaults:{description:null,target:null,params:[]},apply_search_results:function(a){(_.indexOf(a,this.attributes.id)!==-1?this.show():this.hide());return this.is_visible()}});var ToolPanelLabel=BaseModel.extend({});var ToolPanelSection=BaseModel.extend({defaults:{elems:[],open:false},clear_search_results:function(){_.each(this.attributes.elems,function(a){a.show()});this.show();this.set("open",false)},apply_search_results:function(b){var c=true,a;_.each(this.attributes.elems,function(d){if(d instanceof ToolPanelLabel){a=d;a.hide()}else{if(d instanceof Tool){if(d.apply_search_results(b)){c=false;if(a){a.show()}}}}});if(c){this.hide()}else{this.show();this.set("open",true)}}});var ToolSearch=BaseModel.extend({defaults:{spinner_url:"",search_url:"",visible:true,query:"",results:null},initialize:function(){this.on("change:query",this.do_search)},do_search:function(){var c=this.attributes.query;if(c.length<3){this.set("results",null);return}var b=c+"*";if(this.timer){clearTimeout(this.timer)}$("#search-spinner").show();var a=this;this.timer=setTimeout(function(){$.get(a.attributes.search_url,{query:b},function(d){a.set("results",d);$("#search-spinner").hide()},"json")},200)}});var ToolPanel=Backbone.Collection.extend({url:"/tools",parse:function(a){var b=function(e){var d=e.type;if(d==="tool"){return new Tool(e)}else{if(d==="section"){var c=_.map(e.elems,b);e.elems=c;return new ToolPanelSection(e)}else{if(d==="label"){return new ToolPanelLabel(e)}}}};return _.map(a,b)},initialize:function(a){this.tool_search=a.tool_search;this.tool_search.on("change:results",this.apply_search_results,this)},clear_search_results:function(){this.each(function(a){a.clear_search_results()})},apply_search_results:function(){var a=this.tool_search.attributes.results;if(a===null){this.clear_search_results();return}this.each(function(b){b.apply_search_results(a)})}});var BaseView=Backbone.View.extend({initialize:function(){this.model.on("change:hidden",this.update_visible,this)},update_visible:function(){(this.model.attributes.hidden?this.$el.hide():this.$el.show())}});var ToolLinkView=BaseView.extend({tagName:"div",template:Handlebars.templates.tool_link,render:function(){this.$el.append(this.template(this.model.toJSON()));return this}});var ToolPanelLabelView=BaseView.extend({tagName:"div",className:"toolPanelLabel",template:Handlebars.templates.panel_label,render:function(){this.$el.append(this.template(this.model.toJSON()));return this},});var ToolPanelSectionView=BaseView.extend({tagName:"div",className:"toolSectionWrapper",template:Handlebars.templates.panel_section,initialize:function(){BaseView.prototype.initialize.call(this);this.model.on("change:open",this.update_open,this)},render:function(){this.$el.append(this.template(this.model.toJSON()));var a=this.$el.find(".toolSectionBody");_.each(this.model.attributes.elems,function(b){if(b instanceof Tool){var c=new ToolLinkView({model:b,className:"toolTitle"});c.render();a.append(c.$el)}else{if(b instanceof ToolPanelLabel){var d=new ToolPanelLabelView({model:b});d.render();a.append(d.$el)}else{}}});return this},events:{"click .toolSectionTitle > a":"toggle"},toggle:function(){this.$el.children(".toolSectionBody").toggle("fast");this.model.set("open",!this.model.attributes.open)},update_open:function(){(this.model.attributes.open?this.$el.children(".toolSectionBody").show("fast"):this.$el.children(".toolSectionBody").hide("fast"))}});var ToolSearchView=Backbone.View.extend({tagName:"div",id:"tool-search",className:"bar",template:Handlebars.templates.tool_search,events:{click:"focus_and_select","keyup :input":"query_changed"},render:function(){this.$el.append(this.template(this.model.toJSON()));if(!this.model.is_visible()){this.$el.hide()}return this},focus_and_select:function(){this.$el.find(":input").focus().select()},query_changed:function(){this.model.set("query",this.$el.find(":input").val())}});var ToolPanelView=Backbone.View.extend({tagName:"div",className:"toolMenu",initialize:function(a){this.collection.tool_search.on("change:results",this.handle_search_results,this)},render:function(){var b=this.$el;var a=new ToolSearchView({model:this.collection.tool_search});a.render();b.append(a.$el);this.collection.each(function(d){if(d instanceof ToolPanelSection){var c=new ToolPanelSectionView({model:d});c.render();b.append(c.$el)}else{if(d instanceof Tool){var e=new ToolLinkView({model:d,className:"toolTitleNoSection"});e.render();b.append(e.$el)}}});return this},handle_search_results:function(){var a=this.collection.tool_search.attributes.results;if(a&&a.length===0){$("#search-no-results").show()}else{$("#search-no-results").hide()}}});
\ No newline at end of file
+var BaseModel=Backbone.Model.extend({defaults:{id:null,name:null,hidden:false},show:function(){this.set("hidden",false)},hide:function(){this.set("hidden",true)},is_visible:function(){return !this.attributes.hidden}});var Tool=BaseModel.extend({defaults:{description:null,target:null,params:[]},apply_search_results:function(a){(_.indexOf(a,this.attributes.id)!==-1?this.show():this.hide());return this.is_visible()}});var ToolPanelLabel=BaseModel.extend({});var ToolPanelSection=BaseModel.extend({defaults:{elems:[],open:false},clear_search_results:function(){_.each(this.attributes.elems,function(a){a.show()});this.show();this.set("open",false)},apply_search_results:function(b){var c=true,a;_.each(this.attributes.elems,function(d){if(d instanceof ToolPanelLabel){a=d;a.hide()}else{if(d instanceof Tool){if(d.apply_search_results(b)){c=false;if(a){a.show()}}}}});if(c){this.hide()}else{this.show();this.set("open",true)}}});var ToolSearch=BaseModel.extend({defaults:{spinner_url:"",search_url:"",visible:true,query:"",results:null},initialize:function(){this.on("change:query",this.do_search)},do_search:function(){var c=this.attributes.query;if(c.length<3){this.set("results",null);return}var b=c+"*";if(this.timer){clearTimeout(this.timer)}$("#search-spinner").show();var a=this;this.timer=setTimeout(function(){$.get(a.attributes.search_url,{query:b},function(d){a.set("results",d);$("#search-spinner").hide()},"json")},200)}});var ToolPanel=Backbone.Collection.extend({url:"/tools",parse:function(a){var b=function(e){var d=e.type;if(d==="tool"){return new Tool(e)}else{if(d==="section"){var c=_.map(e.elems,b);e.elems=c;return new ToolPanelSection(e)}else{if(d==="label"){return new ToolPanelLabel(e)}}}};return _.map(a,b)},initialize:function(a){this.tool_search=a.tool_search;this.tool_search.on("change:results",this.apply_search_results,this)},clear_search_results:function(){this.each(function(a){a.clear_search_results()})},apply_search_results:function(){var a=this.tool_search.attributes.results;if(a===null){this.clear_search_results();return}this.each(function(b){b.apply_search_results(a)})}});var BaseView=Backbone.View.extend({initialize:function(){this.model.on("change:hidden",this.update_visible,this)},update_visible:function(){(this.model.attributes.hidden?this.$el.hide():this.$el.show())}});var ToolLinkView=BaseView.extend({tagName:"div",template:Handlebars.templates.tool_link,render:function(){this.$el.append(this.template(this.model.toJSON()));return this}});var ToolPanelLabelView=BaseView.extend({tagName:"div",className:"toolPanelLabel",template:Handlebars.templates.panel_label,render:function(){this.$el.append(this.template(this.model.toJSON()));return this},});var ToolPanelSectionView=BaseView.extend({tagName:"div",className:"toolSectionWrapper",template:Handlebars.templates.panel_section,initialize:function(){BaseView.prototype.initialize.call(this);this.model.on("change:open",this.update_open,this)},render:function(){this.$el.append(this.template(this.model.toJSON()));var a=this.$el.find(".toolSectionBody");_.each(this.model.attributes.elems,function(b){if(b instanceof Tool){var c=new ToolLinkView({model:b,className:"toolTitle"});c.render();a.append(c.$el)}else{if(b instanceof ToolPanelLabel){var d=new ToolPanelLabelView({model:b});d.render();a.append(d.$el)}else{}}});return this},events:{"click .toolSectionTitle > a":"toggle"},toggle:function(){this.model.set("open",!this.model.attributes.open)},update_open:function(){(this.model.attributes.open?this.$el.children(".toolSectionBody").slideDown("fast"):this.$el.children(".toolSectionBody").slideUp("fast"))}});var ToolSearchView=Backbone.View.extend({tagName:"div",id:"tool-search",className:"bar",template:Handlebars.templates.tool_search,events:{click:"focus_and_select","keyup :input":"query_changed"},render:function(){this.$el.append(this.template(this.model.toJSON()));if(!this.model.is_visible()){this.$el.hide()}return this},focus_and_select:function(){this.$el.find(":input").focus().select()},query_changed:function(){this.model.set("query",this.$el.find(":input").val())}});var ToolPanelView=Backbone.View.extend({tagName:"div",className:"toolMenu",initialize:function(a){this.collection.tool_search.on("change:results",this.handle_search_results,this)},render:function(){var b=this.$el;var a=new ToolSearchView({model:this.collection.tool_search});a.render();b.append(a.$el);this.collection.each(function(d){if(d instanceof ToolPanelSection){var c=new ToolPanelSectionView({model:d});c.render();b.append(c.$el)}else{if(d instanceof Tool){var e=new ToolLinkView({model:d,className:"toolTitleNoSection"});e.render();b.append(e.$el)}}});return this},handle_search_results:function(){var a=this.collection.tool_search.attributes.results;if(a&&a.length===0){$("#search-no-results").show()}else{$("#search-no-results").hide()}}});
\ No newline at end of file
https://bitbucket.org/galaxy/galaxy-central/changeset/4ae471a236a3/
changeset: 4ae471a236a3
user: jgoecks
date: 2012-04-03 22:00:48
summary: Merge
affected #: 9 files
diff -r d774546032374648823f29aad4fb178086e169e4 -r 4ae471a236a381022d87779b033e49d2f8b321bd lib/galaxy/util/shed_util.py
--- a/lib/galaxy/util/shed_util.py
+++ b/lib/galaxy/util/shed_util.py
@@ -24,35 +24,73 @@
class ShedCounter( object ):
def __init__( self, model ):
self.model = model
- self.count_time = strftime( "%b %d, %Y", gmtime() )
- self.valid_tools = self.count_valid_tools()
+ self.generation_time = strftime( "%b %d, %Y", gmtime() )
+ self.repositories = 0
+ self.new_repositories = 0
+ self.deleted_repositories = 0
+ self.invalid_tools = 0
+ self.valid_tools = 0
+ self.workflows = 0
+ self.proprietary_datatypes = 0
+ self.total_clones = 0
+ self.generate_statistics()
@property
def sa_session( self ):
"""Returns a SQLAlchemy session"""
return self.model.context
- def count_valid_tools( self ):
- valid_tools = 0
- processed_repository_ids = []
- for repository_metadata in self.sa_session.query( self.model.RepositoryMetadata ) \
- .filter( and_( self.model.RepositoryMetadata.table.c.malicious == False,
- self.model.RepositoryMetadata.table.c.metadata is not None,
- self.model.RepositoryMetadata.table.c.tool_versions is not None ) ):
- processed_guids = []
- repository = repository_metadata.repository
- if repository.id not in processed_repository_ids:
- for revision_metadata in repository.downloadable_revisions:
- metadata = revision_metadata.metadata
+ def generate_statistics( self ):
+ self.repositories = 0
+ self.new_repositories = 0
+ self.deleted_repositories = 0
+ self.invalid_tools = 0
+ self.valid_tools = 0
+ self.workflows = 0
+ self.proprietary_datatypes = 0
+ self.total_clones = 0
+ for repository in self.sa_session.query( self.model.Repository ):
+ self.repositories += 1
+ self.total_clones += repository.times_downloaded
+ if repository.deleted:
+ self.deleted_repositories += 1
+ elif repository.is_new:
+ self.new_repositories += 1
+ else:
+ processed_guids = []
+ processed_invalid_tool_configs = []
+ processed_relative_workflow_paths = []
+ processed_datatypes = []
+ for downloadable_revision in repository.downloadable_revisions:
+ metadata = downloadable_revision.metadata
if 'tools' in metadata:
tool_dicts = metadata[ 'tools' ]
for tool_dict in tool_dicts:
if 'guid' in tool_dict:
guid = tool_dict[ 'guid' ]
if guid not in processed_guids:
- valid_tools += 1
+ self.valid_tools += 1
processed_guids.append( guid )
- processed_repository_ids.append( repository.id )
- return valid_tools
-
+ if 'invalid_tools' in metadata:
+ invalid_tool_configs = metadata[ 'invalid_tools' ]
+ for invalid_tool_config in invalid_tool_configs:
+ if invalid_tool_config not in processed_invalid_tool_configs:
+ self.invalid_tools += 1
+ processed_invalid_tool_configs.append( invalid_tool_config )
+ if 'datatypes' in metadata:
+ datatypes = metadata[ 'datatypes' ]
+ for datatypes_dict in datatypes:
+ if 'extension' in datatypes_dict:
+ extension = datatypes_dict[ 'extension' ]
+ if extension not in processed_datatypes:
+ self.proprietary_datatypes += 1
+ processed_datatypes.append( extension )
+ if 'workflows' in metadata:
+ workflows = metadata[ 'workflows' ]
+ for workflow_tup in workflows:
+ relative_path, exported_workflow_dict = workflow_tup
+ if relative_path not in processed_relative_workflow_paths:
+ self.workflows += 1
+ processed_relative_workflow_paths.append( relative_path )
+ self.generation_time = strftime( "%b %d, %Y", gmtime() )
def add_to_shed_tool_config( app, shed_tool_conf_dict, elem_list ):
# A tool shed repository is being installed so change the shed_tool_conf file. Parse the config file to generate the entire list
# of config_elems instead of using the in-memory list since it will be a subset of the entire list if one or more repositories have
diff -r d774546032374648823f29aad4fb178086e169e4 -r 4ae471a236a381022d87779b033e49d2f8b321bd lib/galaxy/webapps/community/controllers/admin.py
--- a/lib/galaxy/webapps/community/controllers/admin.py
+++ b/lib/galaxy/webapps/community/controllers/admin.py
@@ -457,6 +457,27 @@
status=status ) )
@web.expose
@web.require_admin
+ def reset_all_repository_metadata( self, trans, **kwd ):
+ 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 ) )
+ @web.expose
+ @web.require_admin
def browse_repositories( self, trans, **kwd ):
# We add params to the keyword dict in this method in order to rename the param
# with an "f-" prefix, simulating filtering by clicking a search link. We have
@@ -527,6 +548,15 @@
return self.repository_list_grid( trans, **kwd )
@web.expose
@web.require_admin
+ def regenerate_statistics( self, trans, **kwd ):
+ if 'regenerate_statistics_button' in kwd:
+ trans.app.shed_counter.generate_statistics()
+ message = "Successfully regenerated statistics"
+ return trans.fill_template( '/webapps/community/admin/statistics.mako',
+ message=message,
+ status='done' )
+ @web.expose
+ @web.require_admin
def delete_repository( self, trans, **kwd ):
params = util.Params( kwd )
message = util.restore_text( params.get( 'message', '' ) )
diff -r d774546032374648823f29aad4fb178086e169e4 -r 4ae471a236a381022d87779b033e49d2f8b321bd lib/galaxy/webapps/community/controllers/common.py
--- a/lib/galaxy/webapps/community/controllers/common.py
+++ b/lib/galaxy/webapps/community/controllers/common.py
@@ -201,7 +201,7 @@
can_set_metadata = False
correction_msg = "This file requires an entry in the tool_data_table_conf.xml file. "
correction_msg += "Upload a file named tool_data_table_conf.xml.sample to the repository "
- correction_msg += "that includes the required entry to resolve this issue.<br/>"
+ correction_msg += "that includes the required entry to correct this error.<br/>"
invalid_files.append( ( name, correction_msg ) )
if options.index_file or options.missing_index_file:
# Make sure the repository contains the required xxx.loc.sample file.
@@ -290,6 +290,7 @@
# repository tip, we handle things like .loc.sample files here.
metadata_dict = {}
invalid_files = []
+ invalid_tool_configs = []
sample_files = []
datatypes_config = None
# Find datatypes_conf.xml if it exists.
@@ -324,6 +325,7 @@
except Exception, e:
valid = False
invalid_files.append( ( name, str( e ) ) )
+ invalid_tool_configs.append( name )
if valid and tool is not None:
can_set_metadata, invalid_files = check_tool_input_params( trans, name, tool, sample_files, invalid_files )
if can_set_metadata:
@@ -331,6 +333,8 @@
tool_config = os.path.join( root, name )
repository_clone_url = generate_clone_url( trans, id )
metadata_dict = generate_tool_metadata( tool_config, tool, repository_clone_url, metadata_dict )
+ else:
+ invalid_tool_configs.append( name )
# Find all exported workflows
elif name.endswith( '.ga' ):
try:
@@ -344,11 +348,14 @@
metadata_dict = generate_workflow_metadata( relative_path, exported_workflow_dict, metadata_dict )
except Exception, e:
invalid_files.append( ( name, str( e ) ) )
+ if invalid_tool_configs:
+ metadata_dict[ 'invalid_tools' ] = invalid_tool_configs
return metadata_dict, invalid_files
def generate_metadata_for_changeset_revision( trans, id, ctx, changeset_revision, repo_dir ):
# Browse repository files within a change set to generate metadata.
metadata_dict = {}
invalid_files = []
+ invalid_tool_configs = []
sample_files = []
tmp_datatypes_config = None
# Find datatypes_conf.xml if it exists.
@@ -392,6 +399,7 @@
valid = True
except Exception, e:
invalid_files.append( ( filename, str( e ) ) )
+ invalid_tool_configs.append( filename )
valid = False
if valid and tool is not None:
# Update the list of metadata dictionaries for tools in metadata_dict. Note that filename
@@ -403,6 +411,8 @@
# tip, we do not have to handle any .loc.sample files since they would have been handled previously.
repository_clone_url = generate_clone_url( trans, id )
metadata_dict = generate_tool_metadata( filename, tool, repository_clone_url, metadata_dict )
+ else:
+ invalid_tool_configs.append( filename )
try:
os.unlink( tmp_filename )
except:
@@ -417,6 +427,8 @@
metadata_dict = generate_workflow_metadata( '', exported_workflow_dict, metadata_dict )
except Exception, e:
invalid_files.append( ( name, str( e ) ) )
+ 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 -r d774546032374648823f29aad4fb178086e169e4 -r 4ae471a236a381022d87779b033e49d2f8b321bd lib/galaxy/webapps/community/controllers/repository.py
--- a/lib/galaxy/webapps/community/controllers/repository.py
+++ b/lib/galaxy/webapps/community/controllers/repository.py
@@ -770,15 +770,14 @@
"""
If the received changeset_revision includes a file named readme (case ignored), return it's contents.
"""
- name = kwd[ 'name' ]
- owner = kwd[ 'owner' ]
+ repository_name = kwd[ 'name' ]
+ repository_owner = kwd[ 'owner' ]
changeset_revision = kwd[ 'changeset_revision' ]
- repository = get_repository_by_name_and_owner( trans, name, owner )
+ repository = get_repository_by_name_and_owner( trans, repository_name, repository_owner )
repo_dir = repository.repo_path
- repo = hg.repository( get_configured_ui(), repo_dir )
for root, dirs, files in os.walk( repo_dir ):
for name in files:
- if name.lower() in [ 'readme', 'readme.txt', 'read_me', 'read_me.txt' ]:
+ if name.lower() in [ 'readme', 'readme.txt', 'read_me', 'read_me.txt', '%s.txt' % repository_name ]:
f = open( os.path.join( root, name ), 'r' )
text = f.read()
f.close()
@@ -1814,6 +1813,81 @@
changeset_revision=changeset_revision,
message=message,
status='error' ) )
+ @web.expose
+ def load_invalid_tool( self, trans, repository_id, tool_config, changeset_revision, **kwd ):
+ params = util.Params( kwd )
+ message = util.restore_text( params.get( 'message', '' ) )
+ status = params.get( 'status', 'error' )
+ webapp = params.get( 'webapp', 'community' )
+ repository = get_repository( trans, repository_id )
+ repo_dir = repository.repo_path
+ repo = hg.repository( get_configured_ui(), repo_dir )
+ ctx = get_changectx_for_changeset( repo, changeset_revision )
+ invalid_message = ''
+ if changeset_revision == repository.tip:
+ for root, dirs, files in os.walk( repo_dir ):
+ found = False
+ for name in files:
+ if name == tool_config:
+ tool_config_path = os.path.join( root, name )
+ found = True
+ break
+ if found:
+ break
+ else:
+ for filename in ctx:
+ if filename == tool_config:
+ fctx = ctx[ filename ]
+ # Write the contents of datatypes_config.xml to a temporary file.
+ fh = tempfile.NamedTemporaryFile( 'w' )
+ tool_config_path = fh.name
+ fh.close()
+ fh = open( tool_config_path, 'w' )
+ fh.write( fctx.data() )
+ fh.close()
+ break
+ metadata_dict, invalid_files = generate_metadata_for_repository_tip( 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:
+ invalid_message = invalid_msg
+ break
+ tool, message = load_tool_from_changeset_revision( trans, repository_id, changeset_revision, tool_config_path )
+ tool_state = self.__new_state( trans )
+ is_malicious = change_set_is_malicious( trans, repository_id, repository.tip )
+ if changeset_revision != repository.tip:
+ try:
+ os.unlink( tool_config_path )
+ except:
+ pass
+ try:
+ if invalid_message:
+ message = invalid_message
+ return trans.fill_template( "/webapps/community/repository/tool_form.mako",
+ repository=repository,
+ changeset_revision=changeset_revision,
+ tool=tool,
+ tool_state=tool_state,
+ is_malicious=is_malicious,
+ webapp=webapp,
+ message=message,
+ status='error' )
+ except Exception, e:
+ message = "This tool is invalid because: %s." % str( e )
+ if webapp == 'galaxy':
+ return trans.response.send_redirect( web.url_for( controller='repository',
+ action='preview_tools_in_changeset',
+ repository_id=repository_id,
+ changeset_revision=changeset_revision,
+ message=message,
+ status='error' ) )
+ return trans.response.send_redirect( web.url_for( controller='repository',
+ action='browse_repositories',
+ operation='view_or_manage_repository',
+ id=repository_id,
+ changeset_revision=changeset_revision,
+ message=message,
+ status='error' ) )
def __new_state( self, trans, all_pages=False ):
"""
Create a new `DefaultToolState` for this tool. It will not be initialized
diff -r d774546032374648823f29aad4fb178086e169e4 -r 4ae471a236a381022d87779b033e49d2f8b321bd templates/base_panels.mako
--- a/templates/base_panels.mako
+++ b/templates/base_panels.mako
@@ -84,6 +84,7 @@
$("iframe#galaxy_main").contents().find("body").find("div[class='errormessage']").text( msg );
}
}
+ var uploads_in_progress = 0;
jQuery( function() {
$("iframe#galaxy_main").load( function() {
$(this).contents().find("form").each( function() {
@@ -134,7 +135,16 @@
$(this).append("<input type='hidden' name='ajax_upload' value='true'>");
}
// iframe submit is required for nginx (otherwise the encoding is wrong)
- $(this).ajaxSubmit( { iframe: true } );
+ $(this).ajaxSubmit( { iframe: true,
+ complete: function (xhr, stat) {
+ uploads_in_progress--;
+ if (uploads_in_progress == 0) {
+ window.onbeforeunload = null;
+ }
+ }
+ } );
+ uploads_in_progress++;
+ window.onbeforeunload = function() { return "Navigating away from the Galaxy analysis interface will interrupt the file upload(s) currently in progress. Do you really want to do this?"; }
if ( $(this).find("input[name='folder_id']").val() != undefined ) {
var library_id = $(this).find("input[name='library_id']").val();
var show_deleted = $(this).find("input[name='show_deleted']").val();
diff -r d774546032374648823f29aad4fb178086e169e4 -r 4ae471a236a381022d87779b033e49d2f8b321bd templates/webapps/community/admin/index.mako
--- a/templates/webapps/community/admin/index.mako
+++ b/templates/webapps/community/admin/index.mako
@@ -55,6 +55,9 @@
<a target="galaxy_main" href="${h.url_for( controller='admin', action='browse_repositories', webapp='community' )}">Browse all repositories</a></div><div class="toolTitle">
+ <a target="galaxy_main" href="${h.url_for( controller='admin', action='reset_all_repository_metadata', webapp='community' )}">Reset all metadata</a>
+ </div>
+ <div class="toolTitle"><a target="galaxy_main" href="${h.url_for( controller='admin', action='browse_repository_metadata', webapp='community' )}">Browse metadata</a></div></div>
@@ -86,6 +89,12 @@
</div></div></div>
+ <div class="toolSectionTitle">
+ Statistics
+ </div>
+ <div class="toolTitle">
+ <a target="galaxy_main" href="${h.url_for( controller='admin', action='regenerate_statistics', webapp='community' )}">View shed statistics</a>
+ </div></div></div></div>
diff -r d774546032374648823f29aad4fb178086e169e4 -r 4ae471a236a381022d87779b033e49d2f8b321bd templates/webapps/community/admin/statistics.mako
--- /dev/null
+++ b/templates/webapps/community/admin/statistics.mako
@@ -0,0 +1,56 @@
+<%inherit file="/base.mako"/>
+<%namespace file="/message.mako" import="render_msg" />
+
+%if message:
+ ${render_msg( message, status )}
+%endif
+
+<div class="toolForm">
+ <div class="toolFormTitle">Tool shed statistics generated on ${trans.app.shed_counter.generation_time}</div>
+ <form name="regenerate_statistics" id="regenerate_statistics" action="${h.url_for( controller='admin', action='regenerate_statistics', webapp='community' )}" method="post" >
+ <div class="form-row">
+ <table class="grid">
+ <tr>
+ <th>Item</th>
+ <th>Count</th>
+ </tr>
+ <tr>
+ <td>Total repositories</td>
+ <td>${trans.app.shed_counter.repositories}</td>
+ </tr>
+ <tr>
+ <td>New repositories</td>
+ <td>${trans.app.shed_counter.new_repositories}</td>
+ </tr>
+ <tr>
+ <td>Deleted repositories</td>
+ <td>${trans.app.shed_counter.deleted_repositories}</td>
+ </tr>
+ <tr>
+ <td>Valid tools</td>
+ <td>${trans.app.shed_counter.valid_tools}</td>
+ </tr>
+ <tr>
+ <td>Invalid tools</td>
+ <td>${trans.app.shed_counter.invalid_tools}</td>
+ </tr>
+ <tr>
+ <td>Workflows</td>
+ <td>${trans.app.shed_counter.workflows}</td>
+ </tr>
+ <tr>
+ <td>Proprietary datatypes</td>
+ <td>${trans.app.shed_counter.proprietary_datatypes}</td>
+ </tr>
+ <tr>
+ <td>Total clones</td>
+ <td>${trans.app.shed_counter.total_clones}</td>
+ </tr>
+ </table>
+ </div>
+ <div class="form-row">
+ <input type="submit" name="regenerate_statistics_button" value="Regenerate statistics"/>
+ </div>
+ </form>
+ </div>
+</div>
diff -r d774546032374648823f29aad4fb178086e169e4 -r 4ae471a236a381022d87779b033e49d2f8b321bd templates/webapps/community/index.mako
--- a/templates/webapps/community/index.mako
+++ b/templates/webapps/community/index.mako
@@ -39,7 +39,7 @@
<%def name="left_panel()"><div class="unified-panel-header" unselectable="on">
- <div class='unified-panel-header-inner'>${trans.app.shed_counter.valid_tools} valid tools on ${trans.app.shed_counter.count_time}</div>
+ <div class='unified-panel-header-inner'>${trans.app.shed_counter.valid_tools} valid tools on ${trans.app.shed_counter.generation_time}</div></div><div class="page-container" style="padding: 10px;"><div class="toolMenu">
diff -r d774546032374648823f29aad4fb178086e169e4 -r 4ae471a236a381022d87779b033e49d2f8b321bd templates/webapps/community/repository/common.mako
--- a/templates/webapps/community/repository/common.mako
+++ b/templates/webapps/community/repository/common.mako
@@ -95,7 +95,7 @@
<div class="form-row"><table width="100%"><tr bgcolor="#D8D8D8" width="100%">
- <td><b>Tools</b><i> - click the name to preview the tool and use the pop-up menu to inspect all metadata</i></td>
+ <td><b>Valid tools</b><i> - click the name to preview the tool and use the pop-up menu to inspect all metadata</i></td></tr></table></div>
@@ -147,6 +147,31 @@
</div><div style="clear: both"></div>
%endif
+ %if 'invalid_tools' in metadata:
+ <div class="form-row">
+ <table width="100%">
+ <tr bgcolor="#D8D8D8" width="100%">
+ <td><b>Invalid tools</b><i> - click the tool config file name to see why the tool is invalid</i></td>
+ </tr>
+ </table>
+ </div>
+ <div style="clear: both"></div>
+ <div class="form-row">
+ <% invalid_tool_configs = metadata[ 'invalid_tools' ] %>
+ <table class="grid">
+ %for invalid_tool_config in invalid_tool_configs:
+ <tr>
+ <td>
+ <a class="view-info" href="${h.url_for( controller='repository', action='load_invalid_tool', repository_id=trans.security.encode_id( repository.id ), tool_config=invalid_tool_config, changeset_revision=changeset_revision, webapp=webapp )}">
+ ${invalid_tool_config}
+ </a>
+ </td>
+ </tr>
+ %endfor
+ </table>
+ </div>
+ <div style="clear: both"></div>
+ %endif
%if 'workflows' in metadata:
## metadata[ 'workflows' ] is a list of tuples where each contained tuple is
## [ <relative path to the .ga file in the repository>, <exported workflow dict> ]
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