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
October 2013
- 1 participants
- 226 discussions
commit/galaxy-central: carlfeberhard: HDA API, delete: fix namespacing on exceptions
by commits-noreply@bitbucket.org 18 Oct '13
by commits-noreply@bitbucket.org 18 Oct '13
18 Oct '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/799dca8ebe23/
Changeset: 799dca8ebe23
User: carlfeberhard
Date: 2013-10-18 21:28:09
Summary: HDA API, delete: fix namespacing on exceptions
Affected #: 1 file
diff -r 99161bb83a3ec96fcc58ff14af9958fd8a19e0ce -r 799dca8ebe2375f962603382380dfc1da720764f lib/galaxy/webapps/galaxy/api/history_contents.py
--- a/lib/galaxy/webapps/galaxy/api/history_contents.py
+++ b/lib/galaxy/webapps/galaxy/api/history_contents.py
@@ -325,7 +325,8 @@
if purge:
if not trans.app.config.allow_user_dataset_purge:
- raise HTTPForbidden( detail='This instance does not allow user dataset purging' )
+ raise exceptions.httpexceptions.HTTPForbidden(
+ detail='This instance does not allow user dataset purging' )
hda.purged = True
trans.sa_session.add( hda )
@@ -345,11 +346,11 @@
trans.sa_session.flush()
rval[ 'deleted' ] = True
- except HTTPInternalServerError, http_server_err:
+ except exceptions.httpexceptions.HTTPInternalServerError, http_server_err:
log.exception( 'HDA API, delete: uncaught HTTPInternalServerError: %s, %s\n%s',
id, str( kwd ), str( http_server_err ) )
raise
- except HTTPException, http_exc:
+ except exceptions.httpexceptions.HTTPException, http_exc:
raise
except Exception, exc:
log.exception( 'HDA API, delete: uncaught exception: %s, %s\n%s',
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: aswarren: API enable copying from one history to another
by commits-noreply@bitbucket.org 18 Oct '13
by commits-noreply@bitbucket.org 18 Oct '13
18 Oct '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/0f8890ee9be5/
Changeset: 0f8890ee9be5
Branch: api_copy_history
User: aswarren
Date: 2013-08-02 00:02:54
Summary: API enable copying from one history to another
Affected #: 1 file
diff -r fe5867b89ec01bfde18591df8809526d85fb821e -r 0f8890ee9be56218a50dea5505a500e3fb9b3762 lib/galaxy/webapps/galaxy/api/history_contents.py
--- a/lib/galaxy/webapps/galaxy/api/history_contents.py
+++ b/lib/galaxy/webapps/galaxy/api/history_contents.py
@@ -174,6 +174,7 @@
#TODO: copy existing, accessible hda - dataset controller, copy_datasets
#TODO: convert existing, accessible hda - model.DatasetInstance(or hda.datatype).get_converter_types
from_ld_id = payload.get( 'from_ld_id', None )
+ from_hda_id= payload.get( 'from_hda_id', None )
try:
history = self.get_history( trans, history_id, check_ownership=True, check_accessible=False )
except Exception, e:
@@ -197,7 +198,19 @@
hda = ld.library_dataset_dataset_association.to_history_dataset_association( history, add_to_history=True )
trans.sa_session.flush()
return hda.get_api_value()
-
+ elif from_hda_id:
+ try:
+ hda = self.get_dataset(trans, from_hda_id)
+ assert trans.user.id == hda.history.user_id, "HistoryDatasetAssocation does not belong to current user"
+ except AssertionError, e:
+ trans.response.status=400
+ return "HistoryDatasetAssocation does not belong to current user"
+ except Exception, e:
+ return str(e)
+ data_copy=hda.copy(copy_children = True)
+ result=history.add_dataset(data_copy)
+ trans.sa_session.flush()
+ return result.get_api_value()
else:
# TODO: implement other "upload" methods here.
trans.response.status = 501
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: greg: Restrict diff file size to something reasonable when browsing changesets in the Tool shed, and add some additional logging and error handling when setting metadata on repositories in the tool shed and Galaxy.
by commits-noreply@bitbucket.org 18 Oct '13
by commits-noreply@bitbucket.org 18 Oct '13
18 Oct '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/148a93733033/
Changeset: 148a93733033
User: greg
Date: 2013-10-18 19:07:37
Summary: Restrict diff file size to something reasonable when browsing changesets in the Tool shed, and add some additional logging and error handling when setting metadata on repositories in the tool shed and Galaxy.
Affected #: 7 files
diff -r a5d98e64b173e5fc11d0d7234a16fbc80c553317 -r 148a93733033814da72a7e7fc8139054626e9354 lib/galaxy/webapps/galaxy/api/tool_shed_repositories.py
--- a/lib/galaxy/webapps/galaxy/api/tool_shed_repositories.py
+++ b/lib/galaxy/webapps/galaxy/api/tool_shed_repositories.py
@@ -517,10 +517,10 @@
message = tool_util.generate_message_for_invalid_tools( trans, invalid_file_tups, repository, None, as_html=False )
results[ 'unsuccessful_count' ] += 1
else:
- message = "Successfully reset metadata on repository %s" % str( repository.name )
+ message = "Successfully reset metadata on repository %s owned by %s" % ( str( repository.name ), str( repository.owner ) )
results[ 'successful_count' ] += 1
except Exception, e:
- message = "Error resetting metadata on repository %s: %s" % ( str( repository.name ), str( e ) )
+ message = "Error resetting metadata on repository %s owned by %s: %s" % ( str( repository.name ), str( repository.owner ), str( e ) )
results[ 'unsuccessful_count' ] += 1
results[ 'repository_status' ].append( message )
stop_time = strftime( "%Y-%m-%d %H:%M:%S" )
diff -r a5d98e64b173e5fc11d0d7234a16fbc80c553317 -r 148a93733033814da72a7e7fc8139054626e9354 lib/galaxy/webapps/tool_shed/api/repositories.py
--- a/lib/galaxy/webapps/tool_shed/api/repositories.py
+++ b/lib/galaxy/webapps/tool_shed/api/repositories.py
@@ -231,8 +231,11 @@
in addition to those repositories of type tool_dependency_definition. This param is ignored
if the current user is not an admin user, in which case this same restriction is automatic.
:param encoded_ids_to_skip (optional): a list of encoded repository ids for repositories that should not be processed.
+ :param skip_file (optional): A local file name that contains the encoded repository ids associated with repositories to skip.
+ This param can be used as an alternative to the above encoded_ids_to_skip.
"""
def handle_repository( trans, repository, results ):
+ log.debug( "Resetting metadata on repository %s" % str( repository.name ) )
repository_id = trans.security.encode_id( repository.id )
try:
invalid_file_tups, metadata_dict = metadata_util.reset_all_metadata_on_repository_in_tool_shed( trans, repository_id )
@@ -240,12 +243,13 @@
message = tool_util.generate_message_for_invalid_tools( trans, invalid_file_tups, repository, None, as_html=False )
results[ 'unsuccessful_count' ] += 1
else:
- message = "Successfully reset metadata on repository %s" % str( repository.name )
+ message = "Successfully reset metadata on repository %s owned by %s" % ( str( repository.name ), str( repository.user.username ) )
results[ 'successful_count' ] += 1
except Exception, e:
- message = "Error resetting metadata on repository %s: %s" % ( str( repository.name ), str( e ) )
+ message = "Error resetting metadata on repository %s owned by %s: %s" % ( str( repository.name ), str( repository.user.username ), str( e ) )
results[ 'unsuccessful_count' ] += 1
- results[ 'repository_status' ].append( message )
+ status = '%s : %s' % ( str( repository.name ), message )
+ results[ 'repository_status' ].append( status )
return results
try:
start_time = strftime( "%Y-%m-%d %H:%M:%S" )
@@ -255,6 +259,16 @@
unsuccessful_count=0 )
handled_repository_ids = []
encoded_ids_to_skip = payload.get( 'encoded_ids_to_skip', [] )
+ skip_file = payload.get( 'skip_file', None )
+ if skip_file and os.path.exists( skip_file ) and not encoded_ids_to_skip:
+ # Load the list of encoded_ids_to_skip from the skip_file.
+ # Contents of file must be 1 encoded repository id per line.
+ lines = open( skip_file, 'rb' ).readlines()
+ for line in lines:
+ if line.startswith( '#' ):
+ # Skip comments.
+ continue
+ encoded_ids_to_skip.append( line.rstrip( '\n' ) )
if trans.user_is_admin():
my_writable = util.asbool( payload.get( 'my_writable', False ) )
else:
@@ -306,17 +320,18 @@
if invalid_file_tups:
message = tool_util.generate_message_for_invalid_tools( trans, invalid_file_tups, repository, None, as_html=False )
else:
- message = "Successfully reset metadata on repository %s" % str( repository.name )
+ message = "Successfully reset metadata on repository %s owned by %s" % ( str( repository.name ), str( repository.user.username ) )
except Exception, e:
- message = "Error resetting metadata on repository %s: %s" % ( str( repository.name ), str( e ) )
-
- results[ 'repository_status' ].append( message )
+ message = "Error resetting metadata on repository %s owned by %s: %s" % ( str( repository.name ), str( repository.user.username ), str( e ) )
+ status = '%s : %s' % ( str( repository.name ), message )
+ results[ 'repository_status' ].append( status )
return results
try:
repository_id = payload.get( 'repository_id', None )
if repository_id is not None:
repository = suc.get_repository_in_tool_shed( trans, repository_id )
start_time = strftime( "%Y-%m-%d %H:%M:%S" )
+ log.debug( "%s...resetting metadata on repository %s" % ( start_time, str( repository.name ) ) )
results = handle_repository( trans, start_time, repository )
stop_time = strftime( "%Y-%m-%d %H:%M:%S" )
results[ 'stop_time' ] = stop_time
diff -r a5d98e64b173e5fc11d0d7234a16fbc80c553317 -r 148a93733033814da72a7e7fc8139054626e9354 lib/galaxy/webapps/tool_shed/controllers/hg.py
--- a/lib/galaxy/webapps/tool_shed/controllers/hg.py
+++ b/lib/galaxy/webapps/tool_shed/controllers/hg.py
@@ -39,7 +39,9 @@
# Set metadata using the repository files on disk.
error_message, status = set_repository_metadata( trans, repository )
if status == 'ok' and error_message:
- log.debug( "Successfully reset metadata on repository %s, but encountered problem: %s" % ( repository.name, error_message ) )
+ log.debug( "Successfully reset metadata on repository %s owned by %s, but encountered problem: %s" % \
+ ( str( repository.name ), str( repository.user.username ), error_message ) )
elif status != 'ok' and error_message:
- log.debug( "Error resetting metadata on repository %s: %s" % ( repository.name, error_message ) )
+ log.debug( "Error resetting metadata on repository %s owned by %s: %s" % \
+ ( str( repository.name ), str( repository.user.username ), error_message ) )
return wsgi_app
diff -r a5d98e64b173e5fc11d0d7234a16fbc80c553317 -r 148a93733033814da72a7e7fc8139054626e9354 lib/galaxy/webapps/tool_shed/controllers/repository.py
--- a/lib/galaxy/webapps/tool_shed/controllers/repository.py
+++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py
@@ -42,6 +42,7 @@
from mercurial import commands
from mercurial import hg
+from mercurial import mdiff
from mercurial import patch
from mercurial import ui
@@ -2856,11 +2857,19 @@
ctx_child = ctx.children()[ 0 ]
else:
ctx_child = None
+ diffs = []
+ options_dict = suc.get_mercurial_default_options_dict( 'diff' )
+ # Not quite sure if the following settings make any difference, but with a combination of them and the size check on each
+ # diff, we don't run out of memory when viewing the changelog of the cisortho2 repository on the test tool shed.
+ options_dict[ 'maxfile' ] = suc.MAXDIFFSIZE
+ options_dict[ 'maxtotal' ] = suc.MAXDIFFSIZE
+ diffopts = mdiff.diffopts( **options_dict )
+ for diff in patch.diff( repo, node1=ctx_parent.node(), node2=ctx.node(), opts=diffopts ):
+ if len( diff ) > suc.MAXDIFFSIZE:
+ diff = util.shrink_string_by_size( diff, suc.MAXDIFFSIZE )
+ diffs.append( suc.to_html_string( diff ) )
modified, added, removed, deleted, unknown, ignored, clean = repo.status( node1=ctx_parent.node(), node2=ctx.node() )
anchors = modified + added + removed + deleted + unknown + ignored + clean
- diffs = []
- for diff in patch.diff( repo, node1=ctx_parent.node(), node2=ctx.node() ):
- diffs.append( suc.to_html_string( diff ) )
metadata = metadata_util.get_repository_metadata_by_repository_id_changeset_revision( trans, id, ctx_str, metadata_only=True )
# For rendering the prev button.
if ctx_parent:
diff -r a5d98e64b173e5fc11d0d7234a16fbc80c553317 -r 148a93733033814da72a7e7fc8139054626e9354 lib/tool_shed/scripts/api/reset_metadata_on_repositories.py
--- a/lib/tool_shed/scripts/api/reset_metadata_on_repositories.py
+++ b/lib/tool_shed/scripts/api/reset_metadata_on_repositories.py
@@ -25,33 +25,55 @@
else:
return False
+def read_skip_file( skip_file ):
+ encoded_ids_to_skip = []
+ if os.path.exists( skip_file ):
+ # Contents of file must be 1 encoded repository id per line.
+ lines = open( skip_file, 'rb' ).readlines()
+ for line in lines:
+ if line.startswith( '#' ):
+ # Skip comments.
+ continue
+ encoded_ids_to_skip.append( line.rstrip( '\n' ) )
+ return encoded_ids_to_skip
+
def main( options ):
api_key = options.api
base_tool_shed_url = options.tool_shed_url.rstrip( '/' )
my_writable = options.my_writable
one_per_request = options.one_per_request
skip_file = options.skip_file
- encoded_ids_to_skip = []
- if skip_file and os.path.exists( skip_file ):
- # Contents of file must be 1 encoded repository id per line.
- contents = open( skip_file, 'rb' ).read()
- if contents:
- encoded_ids_to_skip = contents.split( '\n' )
+ if skip_file:
+ encoded_ids_to_skip = read_skip_file( skip_file )
+ else:
+ encoded_ids_to_skip = []
if string_as_bool( one_per_request ):
url = '%s/api/repositories/repository_ids_for_setting_metadata?key=%s&my_writable=%s' % ( base_tool_shed_url, api_key, str( my_writable ) )
repository_ids = get( url, api_key )
for repository_id in repository_ids:
if repository_id in encoded_ids_to_skip:
+ print "--------"
print "Skipping repository with id %s because it is in skip file %s" % ( str( repository_id ), str( skip_file ) )
+ print "--------"
else:
data = dict( repository_id=repository_id )
url = '%s/api/repositories/reset_metadata_on_repository' % base_tool_shed_url
- submit( url, data, options.api )
+ try:
+ submit( url, data, options.api )
+ except Exception, e:
+ log.exception( ">>>>>>>>>>>>>>>Blew up on data: %s, exception: %s" % ( str( data ), str( e ) ) )
+ # An nginx timeout undoubtedly occurred.
+ sys.exit( 1 )
else:
data = dict( encoded_ids_to_skip=encoded_ids_to_skip,
my_writable=my_writable )
url = '%s/api/repositories/reset_metadata_on_repositories' % base_tool_shed_url
- submit( url, data, options.api )
+ try:
+ submit( url, data, options.api )
+ except Exception, e:
+ log.exception( str( e ) )
+ # An nginx timeout undoubtedly occurred.
+ sys.exit( 1 )
if __name__ == '__main__':
parser = argparse.ArgumentParser( description='Reset metadata on certain repositories in the Tool Shed via the Tool Shed API.' )
diff -r a5d98e64b173e5fc11d0d7234a16fbc80c553317 -r 148a93733033814da72a7e7fc8139054626e9354 lib/tool_shed/util/metadata_util.py
--- a/lib/tool_shed/util/metadata_util.py
+++ b/lib/tool_shed/util/metadata_util.py
@@ -1772,17 +1772,19 @@
if trans.webapp.name == 'tool_shed':
# We're in the tool shed.
repository = suc.get_repository_in_tool_shed( trans, repository_id )
+ owner = str( repository.user.username )
invalid_file_tups, metadata_dict = reset_all_metadata_on_repository_in_tool_shed( trans, repository_id )
else:
# We're in Galaxy.
repository = suc.get_installed_tool_shed_repository( trans, repository_id )
+ owner = str( repository.owner )
invalid_file_tups, metadata_dict = reset_all_metadata_on_installed_repository( trans, repository_id )
if invalid_file_tups:
message = tool_util.generate_message_for_invalid_tools( trans, invalid_file_tups, repository, None, as_html=False )
log.debug( message )
unsuccessful_count += 1
else:
- log.debug( "Successfully reset metadata on repository %s" % str( repository.name ) )
+ log.debug( "Successfully reset metadata on repository %s owned by %s" % ( str( repository.name ), owner ) )
successful_count += 1
except:
log.exception( "Error attempting to reset metadata on repository %s", str( repository.name ) )
diff -r a5d98e64b173e5fc11d0d7234a16fbc80c553317 -r 148a93733033814da72a7e7fc8139054626e9354 lib/tool_shed/util/shed_util_common.py
--- a/lib/tool_shed/util/shed_util_common.py
+++ b/lib/tool_shed/util/shed_util_common.py
@@ -40,6 +40,7 @@
CHUNK_SIZE = 2**20 # 1Mb
INITIAL_CHANGELOG_HASH = '000000000000'
MAX_CONTENT_SIZE = 1048576
+MAXDIFFSIZE = 8000
MAX_DISPLAY_SIZE = 32768
DATATYPES_CONFIG_FILENAME = 'datatypes_conf.xml'
REPOSITORY_DATA_MANAGER_CONFIG_FILENAME = 'data_manager_conf.xml'
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: carlfeberhard: History Panel: match arg order with Backbone when handling errors; pack scripts
by commits-noreply@bitbucket.org 18 Oct '13
by commits-noreply@bitbucket.org 18 Oct '13
18 Oct '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/a5d98e64b173/
Changeset: a5d98e64b173
User: carlfeberhard
Date: 2013-10-18 18:53:31
Summary: History Panel: match arg order with Backbone when handling errors; pack scripts
Affected #: 8 files
diff -r febd7622924885dd0729ce00924289cc1f0eb741 -r a5d98e64b173e5fc11d0d7234a16fbc80c553317 static/scripts/mvc/dataset/hda-edit.js
--- a/static/scripts/mvc/dataset/hda-edit.js
+++ b/static/scripts/mvc/dataset/hda-edit.js
@@ -50,15 +50,16 @@
purge_link.attr( 'href', [ "javascript", "void(0)" ].join( ':' ) );
purge_link.click( function( event ){
//TODO??: confirm?
- var ajaxPromise = jQuery.ajax( purge_url );
- ajaxPromise.success( function( message, status, responseObj ){
+ var xhr = jQuery.ajax( purge_url );
+ xhr.success( function( message, status, responseObj ){
hdaView.model.set( 'purged', true );
hdaView.trigger( 'purged', hdaView );
});
- ajaxPromise.error( function( error, status, message ){
+ xhr.error( function( error, status, message ){
//TODO: Exception messages are hidden within error page
//!NOTE: that includes the 'Removal of datasets by users is not allowed in this Galaxy instance.'
- hdaView.trigger( 'error', _l( "Unable to purge this dataset" ), error, status, message );
+ view.trigger( 'error',
+ hdaView, xhr, { url: purge_url }, _l( "Unable to purge this dataset" ) );
});
});
}
@@ -161,6 +162,7 @@
error: function() {
// Something went wrong, so show HDA again.
// TODO: an error notification would be good.
+ self.trigger( 'error', self, null, null, { url: delete_url }, _l( 'deletion failed' ) );
self.$el.show();
},
success: function() {
@@ -521,7 +523,7 @@
url: this.urls.tags.get,
error: function( xhr, status, error ){
view.log( "Tagging failed", xhr, status, error );
- view.trigger( 'error', _l( "Tagging failed" ), xhr, status, error );
+ view.trigger( 'error', view, xhr, { url: view.urls.tags.get }, _l( "Tagging failed" ) );
},
success: function(tag_elt_html) {
tagElt.html(tag_elt_html);
@@ -546,7 +548,8 @@
loadAndDisplayAnnotation : function( event ){
//TODO: this is a drop in from history.mako - should use MV as well
this.log( this + '.loadAndDisplayAnnotation', event );
- var annotationArea = this.$el.find( '.annotation-area' ),
+ var view = this,
+ annotationArea = this.$el.find( '.annotation-area' ),
annotationElem = annotationArea.find( '.annotation-elt' ),
setAnnotationUrl = this.urls.annotation.set;
@@ -556,9 +559,10 @@
// Need to fill annotation element.
$.ajax({
url: this.urls.annotation.get,
- error: function(){
- view.log( "Annotation failed", xhr, status, error );
- view.trigger( 'error', _l( "Annotation failed" ), xhr, status, error );
+ error: function( xhr, status, message ){
+ view.log( "Annotation failed", xhr, status, message );
+ view.trigger( 'error',
+ view, xhr, { url: view.urls.annotation.get }, _l( "Annotation failed" ) );
},
success: function( htmlFromAjax ){
if( htmlFromAjax === "" ){
diff -r febd7622924885dd0729ce00924289cc1f0eb741 -r a5d98e64b173e5fc11d0d7234a16fbc80c553317 static/scripts/mvc/history/history-model.js
--- a/static/scripts/mvc/history/history-model.js
+++ b/static/scripts/mvc/history/history-model.js
@@ -72,6 +72,10 @@
this.updateAfterDelay();
}
}, this );
+
+ this.hdas.bind( 'error', function( model, xhr, options, msg ){
+ this.trigger( 'error', model, xhr, options, msg );
+ }, this );
},
setOwnEventHandlers : function(){
@@ -176,20 +180,26 @@
historyXhr.fail( function( xhr, status, error ){
//TODO: use ajax.status handlers here
// keep rolling on a bad gateway - server restart
- if( xhr.status === 502 ){
+
+ //if( xhr.status === 0 && xhr.readyState === 0 ){
+
+ if( ( xhr.status === 0 && xhr.readyState === 0 )
+ || ( xhr.status === 502 ) ){
+
+ //if( xhr.status === 502 ){
+ history.log( 'Bad Gateway error. Retrying...' );
setTimeout( function(){
- history.log( 'Bad Gateway error. Retrying...' );
//TODO: someway to throw error on X tries
history.stateUpdater();
}, History.UPDATE_DELAY );
// if not interruption by iframe reload
//TODO: remove when iframes are removed
- } else if( !( ( xhr.readyState === 0 ) && ( xhr.status === 0 ) ) ){
+ } else {
history.log( 'stateUpdater error:', error, 'responseText:', xhr.responseText );
var msg = _l( 'An error occurred while getting updates from the server.' ) + ' '
+ _l( 'Please contact a Galaxy administrator if the problem persists.' );
- history.trigger( 'error', msg, xhr, status, error );
+ history.trigger( 'error', history, xhr, {}, msg );
}
});
},
@@ -228,7 +238,7 @@
hdaIds, xhr, status, error, errorJson );
var msg = _l( 'An error occurred while getting dataset details from the server.' ) + ' '
+ _l( 'Please contact a Galaxy administrator if the problem persists.' );
- history.trigger( 'error', msg, xhr, status, error );
+ history.trigger( 'error', history, xhr, {}, msg );
}
},
@@ -295,12 +305,13 @@
fetchDisplayApplications : function( ids ){
this.log( this + '.fetchDisplayApplications:', ids );
var history = this,
+ display_app_url = 'history/get_display_application_links',
// if any ids passed place them in the query string data
data = ( ids && _.isArray( ids ) )?({ hda_ids : ids.join( ',' ) }):({});
//TODO: hardcoded
history.log( this + ': fetching display application data' );
- jQuery.ajax( 'history/get_display_application_links', {
+ jQuery.ajax( display_app_url, {
data : data,
success : function( displayAppList, status, xhr ){
//history.hdas.set( data, { merge: true } ); // doesn't work - clears all other attributes
@@ -314,7 +325,7 @@
history.log( 'Error fetching display applications:', ids, xhr, status, error );
var msg = _l( 'An error occurred while getting display applications from the server.' ) + ' '
+ _l( 'Please contact a Galaxy administrator if the problem persists.' );
- history.trigger( 'error', msg, xhr, status, error );
+ history.trigger( 'error', history, xhr, { url: display_app_url }, msg );
}
}
});
@@ -322,7 +333,7 @@
toString : function(){
var nameString = ( this.get( 'name' ) )?
- ( ',' + this.get( 'name' ) ) : ( '' );
+ ( ', ' + this.get( 'name' ) ) : ( '' );
return 'History(' + this.get( 'id' ) + nameString + ')';
}
});
diff -r febd7622924885dd0729ce00924289cc1f0eb741 -r a5d98e64b173e5fc11d0d7234a16fbc80c553317 static/scripts/mvc/history/history-panel.js
--- a/static/scripts/mvc/history/history-panel.js
+++ b/static/scripts/mvc/history/history-panel.js
@@ -114,9 +114,21 @@
this.urls = {};
},
- // refresh function
+ errorHandler : function( model, xhr, options, msg ){
+ // let 'lost contact' errors fail silently
+ if( xhr && ( ( xhr.status === 0 && xhr.readyState === 0 )
+ || ( xhr.status === 502 ) ) ){
+ this.log( 'lost contact with server', model, xhr, options, msg );
+ return;
+ }
+
+ // otherwise display a message
+ msg = msg || _l( 'An error occurred while getting updates from the server.' ) + ' '
+ + _l( 'Please contact a Galaxy administrator if the problem persists.' );
+ this.displayMessage( 'error', msg );
+ },
+
refresh : function() {
- // refresh
// TODO: refresh content without reloading frame
window.location = window.location;
},
@@ -128,8 +140,8 @@
this.model.bind( 'change:nice_size', this.updateHistoryDiskSize, this );
// don't need to re-render entire model on all changes, just render disk size when it changes
- this.model.bind( 'error', function( msg, xhr, error, status ){
- this.displayMessage( 'error', msg );
+ this.model.bind( 'error', function( model, xhr, options, msg ){
+ this.errorHandler( model, xhr, options, msg );
this.model.attributes.error = undefined;
}, this );
@@ -157,8 +169,8 @@
}, this );
// ---- self
- this.bind( 'error', function( msg, xhr, error, status ){
- this.displayMessage( 'error', msg );
+ this.bind( 'error', function( model, xhr, options, msg ){
+ this.errorHandler( model, xhr, options, msg );
});
if( this.logger ){
@@ -380,8 +392,8 @@
hdaView.bind( 'body-collapsed', function( id ){
historyView.storage.get( 'expandedHdas' ).deleteKey( id );
});
- hdaView.bind( 'error', function( msg, xhr, status, error ){
- historyView.displayMessage( 'error', msg );
+ hdaView.bind( 'error', function( model, xhr, options, msg ){
+ historyView.errorHandler( model, xhr, options, msg );
});
},
@@ -488,7 +500,7 @@
url: view.urls.tag,
error: function( xhr, error, status ) {
panel.log( 'Error loading tag area html', xhr, error, status );
- panel.trigger( 'error', _l( "Tagging failed" ), xhr, error, status );
+ panel.trigger( 'error', panel, {}, {}, _l( "Tagging failed" ) );
},
success: function(tag_elt_html) {
//view.log( view + ' tag elt html (ajax)', tag_elt_html );
diff -r febd7622924885dd0729ce00924289cc1f0eb741 -r a5d98e64b173e5fc11d0d7234a16fbc80c553317 static/scripts/packed/mvc/dataset/hda-edit.js
--- a/static/scripts/packed/mvc/dataset/hda-edit.js
+++ b/static/scripts/packed/mvc/dataset/hda-edit.js
@@ -1,1 +1,1 @@
-var HDAEditView=HDABaseView.extend(LoggableMixin).extend({initialize:function(a){HDABaseView.prototype.initialize.call(this,a);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton,this._render_rerunButton]},_setUpBehaviors:function(c){HDABaseView.prototype._setUpBehaviors.call(this,c);var a=this,b=this.urls.purge,d=c.find("#historyItemPurger-"+this.model.get("id"));if(d){d.attr("href",["javascript","void(0)"].join(":"));d.click(function(e){var f=jQuery.ajax(b);f.success(function(i,g,h){a.model.set("purged",true);a.trigger("purged",a)});f.error(function(h,g,i){a.trigger("error",_l("Unable to purge this dataset"),h,g,i)})})}},_render_warnings:function(){return $(jQuery.trim(HDABaseView.templates.messages(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_titleButtons:function(){var a=$('<div class="historyItemButtons"></div>');a.append(this._render_displayButton());a.append(this._render_editButton());a.append(this._render_deleteButton());return a},_render_editButton:function(){if((this.model.get("state")===HistoryDatasetAssociation.STATES.NEW)||(this.model.get("state")===HistoryDatasetAssociation.STATES.UPLOAD)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){this.editButton=null;return null}var c=this.model.get("purged"),a=this.model.get("deleted"),b={title:_l("Edit Attributes"),href:this.urls.edit,target:"galaxy_main",icon_class:"edit"};if(a||c){b.enabled=false;if(c){b.title=_l("Cannot edit attributes of datasets removed from disk")}else{if(a){b.title=_l("Undelete dataset to edit attributes")}}}this.editButton=new IconButtonView({model:new IconButton(b)});return this.editButton.render().$el},_render_deleteButton:function(){if((this.model.get("state")===HistoryDatasetAssociation.STATES.NEW)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){this.deleteButton=null;return null}var a=this,b=a.urls["delete"],c={title:_l("Delete"),href:b,id:"historyItemDeleter-"+this.model.get("id"),icon_class:"delete",on_click:function(){$.ajax({url:b,type:"POST",error:function(){a.$el.show()},success:function(){a.model.set({deleted:true})}})}};if(this.model.get("deleted")||this.model.get("purged")){c={title:_l("Dataset is already deleted"),icon_class:"delete",enabled:false}}this.deleteButton=new IconButtonView({model:new IconButton(c)});return this.deleteButton.render().$el},_render_hdaSummary:function(){var a=_.extend(this.model.toJSON(),{urls:this.urls});if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){_.extend(a,{dbkey_unknown_and_editable:true})}return HDABaseView.templates.hdaSummary(a)},_render_errButton:function(){if(this.model.get("state")!==HistoryDatasetAssociation.STATES.ERROR){this.errButton=null;return null}this.errButton=new IconButtonView({model:new IconButton({title:_l("View or report this error"),href:this.urls.report_error,target:"galaxy_main",icon_class:"bug"})});return this.errButton.render().$el},_render_rerunButton:function(){this.rerunButton=new IconButtonView({model:new IconButton({title:_l("Run this job again"),href:this.urls.rerun,target:"galaxy_main",icon_class:"arrow-circle"})});return this.rerunButton.render().$el},_render_visualizationsButton:function(){var a=this.model.get("visualizations");if((!this.model.hasData())||(_.isEmpty(a))){this.visualizationsButton=null;return null}if(_.isObject(a[0])){return this._render_visualizationsFrameworkButton(a)}if(!this.urls.visualization){this.visualizationsButton=null;return null}var c=this.model.get("dbkey"),f=this.urls.visualization,d={},g={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(c){g.dbkey=c}this.visualizationsButton=new IconButtonView({model:new IconButton({title:_l("Visualize"),href:this.urls.visualization,icon_class:"chart_curve"})});var b=this.visualizationsButton.render().$el;b.addClass("visualize-icon");function e(h){switch(h){case"trackster":return create_trackster_action_fn(f,g,c);case"scatterplot":return create_scatterplot_action_fn(f,g);default:return function(){Galaxy.frame_manager.frame_new({title:"Visualization",type:"url",content:f+"/"+h+"?"+$.param(g)})}}}if(a.length===1){b.attr("title",a[0]);b.click(e(a[0]))}else{_.each(a,function(i){var h=i.charAt(0).toUpperCase()+i.slice(1);d[_l(h)]=e(i)});make_popupmenu(b,d)}return b},_render_visualizationsFrameworkButton:function(a){if(!(this.model.hasData())||!(a&&!_.isEmpty(a))){this.visualizationsButton=null;return null}this.visualizationsButton=new IconButtonView({model:new IconButton({title:_l("Visualize"),icon_class:"chart_curve"})});var c=this.visualizationsButton.render().$el;c.addClass("visualize-icon");if(_.keys(a).length===1){c.attr("title",_.keys(a)[0]);c.attr("href",_.values(a)[0])}else{var d=[];_.each(a,function(e){d.push(e)});var b=new PopupMenu(c,d)}return c},_render_secondaryActionButtons:function(b){var c=$("<div/>"),a=this;c.attr("style","float: right;").attr("id","secondary-actions-"+this.model.get("id"));_.each(b,function(d){c.append(d.call(a))});return c},_render_tagButton:function(){if(!(this.model.hasData())||(!this.urls.tags.get)){this.tagButton=null;return null}this.tagButton=new IconButtonView({model:new IconButton({title:_l("Edit dataset tags"),target:"galaxy_main",href:this.urls.tags.get,icon_class:"tags"})});return this.tagButton.render().$el},_render_annotateButton:function(){if(!(this.model.hasData())||(!this.urls.annotation.get)){this.annotateButton=null;return null}this.annotateButton=new IconButtonView({model:new IconButton({title:_l("Edit dataset annotation"),target:"galaxy_main",icon_class:"annotate"})});return this.annotateButton.render().$el},_render_tagArea:function(){if(!this.urls.tags.set){return null}return $(HDAEditView.templates.tagArea(_.extend(this.model.toJSON(),{urls:this.urls})).trim())},_render_annotationArea:function(){if(!this.urls.annotation.get){return null}return $(HDAEditView.templates.annotationArea(_.extend(this.model.toJSON(),{urls:this.urls})).trim())},_render_body_error:function(a){HDABaseView.prototype._render_body_error.call(this,a);var b=a.find("#primary-actions-"+this.model.get("id"));b.prepend(this._render_errButton())},_render_body_ok:function(a){a.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton,this._render_rerunButton]));return}a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton,this._render_rerunButton,this._render_visualizationsButton]));a.append(this._render_secondaryActionButtons([this._render_tagButton,this._render_annotateButton]));a.append('<div class="clear"/>');a.append(this._render_tagArea());a.append(this._render_annotationArea());a.append(this._render_displayAppArea());this._render_displayApps(a);a.append(this._render_peek())},events:{"click .historyItemTitle":"toggleBodyVisibility","click a.icon-button.tags":"loadAndDisplayTags","click a.icon-button.annotate":"loadAndDisplayAnnotation"},loadAndDisplayTags:function(c){this.log(this+".loadAndDisplayTags",c);var a=this,d=this.$el.find(".tag-area"),b=d.find(".tag-elt");if(d.is(":hidden")){if(!jQuery.trim(b.html())){$.ajax({url:this.urls.tags.get,error:function(g,e,f){a.log("Tagging failed",g,e,f);a.trigger("error",_l("Tagging failed"),g,e,f)},success:function(e){b.html(e);b.find("[title]").tooltip();d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},loadAndDisplayAnnotation:function(b){this.log(this+".loadAndDisplayAnnotation",b);var d=this.$el.find(".annotation-area"),c=d.find(".annotation-elt"),a=this.urls.annotation.set;if(d.is(":hidden")){if(!jQuery.trim(c.html())){$.ajax({url:this.urls.annotation.get,error:function(){view.log("Annotation failed",xhr,status,error);view.trigger("error",_l("Annotation failed"),xhr,status,error)},success:function(e){if(e===""){e="<em>"+_l("Describe or add notes to dataset")+"</em>"}c.html(e);d.find("[title]").tooltip();async_save_text(c.attr("id"),c.attr("id"),a,"new_annotation",18,true,4);d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toString:function(){var a=(this.model)?(this.model+""):("(no model)");return"HDAView("+a+")"}});HDAEditView.templates={tagArea:Handlebars.templates["template-hda-tagArea"],annotationArea:Handlebars.templates["template-hda-annotationArea"]};function create_scatterplot_action_fn(a,b){action=function(){Galaxy.frame_manager.frame_new({title:"Scatterplot",type:"url",content:a+"/scatterplot?"+$.param(b),location:"center"});$("div.popmenu-wrapper").remove();return false};return action}function create_trackster_action_fn(a,c,b){return function(){var d={};if(b){d["f-dbkey"]=b}$.ajax({url:a+"/list_tracks?"+$.param(d),dataType:"html",error:function(){alert(("Could not add this dataset to browser")+".")},success:function(e){var f=window.parent;f.Galaxy.modal.show({title:"View Data in a New or Saved Visualization",buttons:{Cancel:function(){f.Galaxy.modal.hide()},"View in saved visualization":function(){f.Galaxy.modal.show({title:"Add Data to Saved Visualization",body:e,buttons:{Cancel:function(){f.Galaxy.modal.hide()},"Add to visualization":function(){$(f.document).find("input[name=id]:checked").each(function(){f.Galaxy.modal.hide();var g=$(this).val();c.id=g;f.Galaxy.frame_manager.frame_new({title:"Trackster",type:"url",content:a+"/trackster?"+$.param(c)})})}}})},"View in new visualization":function(){f.Galaxy.modal.hide();var g=a+"/trackster?"+$.param(c);f.Galaxy.frame_manager.frame_new({title:"Trackster",type:"url",content:g})}}})}});return false}};
\ No newline at end of file
+var HDAEditView=HDABaseView.extend(LoggableMixin).extend({initialize:function(a){HDABaseView.prototype.initialize.call(this,a);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton,this._render_rerunButton]},_setUpBehaviors:function(c){HDABaseView.prototype._setUpBehaviors.call(this,c);var a=this,b=this.urls.purge,d=c.find("#historyItemPurger-"+this.model.get("id"));if(d){d.attr("href",["javascript","void(0)"].join(":"));d.click(function(e){var f=jQuery.ajax(b);f.success(function(i,g,h){a.model.set("purged",true);a.trigger("purged",a)});f.error(function(h,g,i){view.trigger("error",a,f,{url:b},_l("Unable to purge this dataset"))})})}},_render_warnings:function(){return $(jQuery.trim(HDABaseView.templates.messages(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_titleButtons:function(){var a=$('<div class="historyItemButtons"></div>');a.append(this._render_displayButton());a.append(this._render_editButton());a.append(this._render_deleteButton());return a},_render_editButton:function(){if((this.model.get("state")===HistoryDatasetAssociation.STATES.NEW)||(this.model.get("state")===HistoryDatasetAssociation.STATES.UPLOAD)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){this.editButton=null;return null}var c=this.model.get("purged"),a=this.model.get("deleted"),b={title:_l("Edit Attributes"),href:this.urls.edit,target:"galaxy_main",icon_class:"edit"};if(a||c){b.enabled=false;if(c){b.title=_l("Cannot edit attributes of datasets removed from disk")}else{if(a){b.title=_l("Undelete dataset to edit attributes")}}}this.editButton=new IconButtonView({model:new IconButton(b)});return this.editButton.render().$el},_render_deleteButton:function(){if((this.model.get("state")===HistoryDatasetAssociation.STATES.NEW)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){this.deleteButton=null;return null}var a=this,b=a.urls["delete"],c={title:_l("Delete"),href:b,id:"historyItemDeleter-"+this.model.get("id"),icon_class:"delete",on_click:function(){$.ajax({url:b,type:"POST",error:function(){a.trigger("error",a,null,null,{url:b},_l("deletion failed"));a.$el.show()},success:function(){a.model.set({deleted:true})}})}};if(this.model.get("deleted")||this.model.get("purged")){c={title:_l("Dataset is already deleted"),icon_class:"delete",enabled:false}}this.deleteButton=new IconButtonView({model:new IconButton(c)});return this.deleteButton.render().$el},_render_hdaSummary:function(){var a=_.extend(this.model.toJSON(),{urls:this.urls});if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){_.extend(a,{dbkey_unknown_and_editable:true})}return HDABaseView.templates.hdaSummary(a)},_render_errButton:function(){if(this.model.get("state")!==HistoryDatasetAssociation.STATES.ERROR){this.errButton=null;return null}this.errButton=new IconButtonView({model:new IconButton({title:_l("View or report this error"),href:this.urls.report_error,target:"galaxy_main",icon_class:"bug"})});return this.errButton.render().$el},_render_rerunButton:function(){this.rerunButton=new IconButtonView({model:new IconButton({title:_l("Run this job again"),href:this.urls.rerun,target:"galaxy_main",icon_class:"arrow-circle"})});return this.rerunButton.render().$el},_render_visualizationsButton:function(){var a=this.model.get("visualizations");if((!this.model.hasData())||(_.isEmpty(a))){this.visualizationsButton=null;return null}if(_.isObject(a[0])){return this._render_visualizationsFrameworkButton(a)}if(!this.urls.visualization){this.visualizationsButton=null;return null}var c=this.model.get("dbkey"),f=this.urls.visualization,d={},g={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(c){g.dbkey=c}this.visualizationsButton=new IconButtonView({model:new IconButton({title:_l("Visualize"),href:this.urls.visualization,icon_class:"chart_curve"})});var b=this.visualizationsButton.render().$el;b.addClass("visualize-icon");function e(h){switch(h){case"trackster":return create_trackster_action_fn(f,g,c);case"scatterplot":return create_scatterplot_action_fn(f,g);default:return function(){Galaxy.frame_manager.frame_new({title:"Visualization",type:"url",content:f+"/"+h+"?"+$.param(g)})}}}if(a.length===1){b.attr("title",a[0]);b.click(e(a[0]))}else{_.each(a,function(i){var h=i.charAt(0).toUpperCase()+i.slice(1);d[_l(h)]=e(i)});make_popupmenu(b,d)}return b},_render_visualizationsFrameworkButton:function(a){if(!(this.model.hasData())||!(a&&!_.isEmpty(a))){this.visualizationsButton=null;return null}this.visualizationsButton=new IconButtonView({model:new IconButton({title:_l("Visualize"),icon_class:"chart_curve"})});var c=this.visualizationsButton.render().$el;c.addClass("visualize-icon");if(_.keys(a).length===1){c.attr("title",_.keys(a)[0]);c.attr("href",_.values(a)[0])}else{var d=[];_.each(a,function(e){d.push(e)});var b=new PopupMenu(c,d)}return c},_render_secondaryActionButtons:function(b){var c=$("<div/>"),a=this;c.attr("style","float: right;").attr("id","secondary-actions-"+this.model.get("id"));_.each(b,function(d){c.append(d.call(a))});return c},_render_tagButton:function(){if(!(this.model.hasData())||(!this.urls.tags.get)){this.tagButton=null;return null}this.tagButton=new IconButtonView({model:new IconButton({title:_l("Edit dataset tags"),target:"galaxy_main",href:this.urls.tags.get,icon_class:"tags"})});return this.tagButton.render().$el},_render_annotateButton:function(){if(!(this.model.hasData())||(!this.urls.annotation.get)){this.annotateButton=null;return null}this.annotateButton=new IconButtonView({model:new IconButton({title:_l("Edit dataset annotation"),target:"galaxy_main",icon_class:"annotate"})});return this.annotateButton.render().$el},_render_tagArea:function(){if(!this.urls.tags.set){return null}return $(HDAEditView.templates.tagArea(_.extend(this.model.toJSON(),{urls:this.urls})).trim())},_render_annotationArea:function(){if(!this.urls.annotation.get){return null}return $(HDAEditView.templates.annotationArea(_.extend(this.model.toJSON(),{urls:this.urls})).trim())},_render_body_error:function(a){HDABaseView.prototype._render_body_error.call(this,a);var b=a.find("#primary-actions-"+this.model.get("id"));b.prepend(this._render_errButton())},_render_body_ok:function(a){a.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton,this._render_rerunButton]));return}a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton,this._render_rerunButton,this._render_visualizationsButton]));a.append(this._render_secondaryActionButtons([this._render_tagButton,this._render_annotateButton]));a.append('<div class="clear"/>');a.append(this._render_tagArea());a.append(this._render_annotationArea());a.append(this._render_displayAppArea());this._render_displayApps(a);a.append(this._render_peek())},events:{"click .historyItemTitle":"toggleBodyVisibility","click a.icon-button.tags":"loadAndDisplayTags","click a.icon-button.annotate":"loadAndDisplayAnnotation"},loadAndDisplayTags:function(c){this.log(this+".loadAndDisplayTags",c);var a=this,d=this.$el.find(".tag-area"),b=d.find(".tag-elt");if(d.is(":hidden")){if(!jQuery.trim(b.html())){$.ajax({url:this.urls.tags.get,error:function(g,e,f){a.log("Tagging failed",g,e,f);a.trigger("error",a,g,{url:a.urls.tags.get},_l("Tagging failed"))},success:function(e){b.html(e);b.find("[title]").tooltip();d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},loadAndDisplayAnnotation:function(c){this.log(this+".loadAndDisplayAnnotation",c);var a=this,e=this.$el.find(".annotation-area"),d=e.find(".annotation-elt"),b=this.urls.annotation.set;if(e.is(":hidden")){if(!jQuery.trim(d.html())){$.ajax({url:this.urls.annotation.get,error:function(h,f,g){a.log("Annotation failed",h,f,g);a.trigger("error",a,h,{url:a.urls.annotation.get},_l("Annotation failed"))},success:function(f){if(f===""){f="<em>"+_l("Describe or add notes to dataset")+"</em>"}d.html(f);e.find("[title]").tooltip();async_save_text(d.attr("id"),d.attr("id"),b,"new_annotation",18,true,4);e.slideDown("fast")}})}else{e.slideDown("fast")}}else{e.slideUp("fast")}return false},toString:function(){var a=(this.model)?(this.model+""):("(no model)");return"HDAView("+a+")"}});HDAEditView.templates={tagArea:Handlebars.templates["template-hda-tagArea"],annotationArea:Handlebars.templates["template-hda-annotationArea"]};function create_scatterplot_action_fn(a,b){action=function(){Galaxy.frame_manager.frame_new({title:"Scatterplot",type:"url",content:a+"/scatterplot?"+$.param(b),location:"center"});$("div.popmenu-wrapper").remove();return false};return action}function create_trackster_action_fn(a,c,b){return function(){var d={};if(b){d["f-dbkey"]=b}$.ajax({url:a+"/list_tracks?"+$.param(d),dataType:"html",error:function(){alert(("Could not add this dataset to browser")+".")},success:function(e){var f=window.parent;f.Galaxy.modal.show({title:"View Data in a New or Saved Visualization",buttons:{Cancel:function(){f.Galaxy.modal.hide()},"View in saved visualization":function(){f.Galaxy.modal.show({title:"Add Data to Saved Visualization",body:e,buttons:{Cancel:function(){f.Galaxy.modal.hide()},"Add to visualization":function(){$(f.document).find("input[name=id]:checked").each(function(){f.Galaxy.modal.hide();var g=$(this).val();c.id=g;f.Galaxy.frame_manager.frame_new({title:"Trackster",type:"url",content:a+"/trackster?"+$.param(c)})})}}})},"View in new visualization":function(){f.Galaxy.modal.hide();var g=a+"/trackster?"+$.param(c);f.Galaxy.frame_manager.frame_new({title:"Trackster",type:"url",content:g})}}})}});return false}};
\ No newline at end of file
diff -r febd7622924885dd0729ce00924289cc1f0eb741 -r a5d98e64b173e5fc11d0d7234a16fbc80c553317 static/scripts/packed/mvc/history/history-model.js
--- a/static/scripts/packed/mvc/history/history-model.js
+++ b/static/scripts/packed/mvc/history/history-model.js
@@ -1,1 +1,1 @@
-var History=Backbone.Model.extend(LoggableMixin).extend({defaults:{id:null,name:"Unnamed History",state:"new",diskSize:0,deleted:false},urlRoot:"api/histories/",url:function(){return this.urlRoot+this.get("id")},initialize:function(b,c,a){a=a||null;this.log(this+".initialize:",b,c);this.hdas=new HDACollection();this.updateTimeoutId=null;if(c&&_.isArray(c)){this.hdas.add(c);this.checkForUpdates();if(this.hdas.length>0){this.fetchDisplayApplications()}}this.setHdaEventHandlers();this.setOwnEventHandlers()},setHdaEventHandlers:function(){this.hdas.bind("state:ready",function(b,c,a){if(b.get("force_history_refresh")){this.updateAfterDelay()}},this)},setOwnEventHandlers:function(){if(this.logger){this.bind("all",function(a){this.log(this+"",arguments)},this)}},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},updateAfterDelay:function(){var a=this;this.updateTimeoutId=setTimeout(function(){a.updateTimeoutId=null;a.stateUpdater()},History.UPDATE_DELAY);return this.updateTimeoutId},isRunning:function(){var a=this.get("state");return((a===HistoryDatasetAssociation.STATES.RUNNING)||(a===HistoryDatasetAssociation.STATES.QUEUED))},isReady:function(){return !this.isRunning()},checkForUpdates:function(){if(this.isRunning()){this.updateAfterDelay()}else{this.trigger("ready")}return this},findHdasToUpdate:function(){var c=this,a=c.get("state_ids"),b=[];_.each(a,function(d,e){_.each(d,function(g){var f=c.hdas.get(g);if(!f||f.get("state")!==e){b.push(g)}})});return b},stateUpdater:function(){var c=this,a=this.get("state"),b=this.fetch();b.done(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=c.findHdasToUpdate();if(e.length){c.fetchHdaUpdates(e).done(function(f){c.checkForUpdates()})}else{c.checkForUpdates()}});b.fail(function(g,d,e){if(g.status===502){setTimeout(function(){c.log("Bad Gateway error. Retrying...");c.stateUpdater()},History.UPDATE_DELAY)}else{if(!((g.readyState===0)&&(g.status===0))){c.log("stateUpdater error:",e,"responseText:",g.responseText);var f=_l("An error occurred while getting updates from the server.")+" "+_l("Please contact a Galaxy administrator if the problem persists.");c.trigger("error",f,g,d,e)}}})},fetchHdaUpdates:function(c){var a=this,b=jQuery.ajax({url:this.url()+"/contents?"+jQuery.param({ids:c.join(",")}),error:function(i,d,e){if((i.readyState===0)&&(i.status===0)){return}var g=JSON.parse(i.responseText);if(_.isArray(g)){var f=_.groupBy(g,function(j){if(_.has(j,"error")){return"errored"}return"ok"});a.log("fetched, errored datasets:",f.errored);a.updateHdas(g)}else{a.log("Error updating hdas from api history contents",c,i,d,e,g);var h=_l("An error occurred while getting dataset details from the server.")+" "+_l("Please contact a Galaxy administrator if the problem persists.");a.trigger("error",h,i,d,e)}},success:function(e,d,f){a.log(a+".fetchHdaUpdates, success:",d,f);a.updateHdas(e)}});return b},updateHdas:function(a){var c=this,b=[];c.log(c+".updateHdas:",a);_.each(a,function(e,f){var d=c.hdas.get(e.id);if(d){c.log("found existing model in list for id "+e.id+", updating...:");d.set(e)}else{c.log("NO existing model for id "+e.id+", creating...:");b.push(e)}});if(b.length){c.addHdas(b)}},addHdas:function(a){var b=this;_.each(a,function(c,d){var e=b.hdas.hidToCollectionIndex(c.hid);c.history_id=b.get("id");b.hdas.add(new HistoryDatasetAssociation(c),{at:e,silent:true})});b.hdas.trigger("add",a)},fetchDisplayApplications:function(a){this.log(this+".fetchDisplayApplications:",a);var c=this,b=(a&&_.isArray(a))?({hda_ids:a.join(",")}):({});c.log(this+": fetching display application data");jQuery.ajax("history/get_display_application_links",{data:b,success:function(f,d,e){_.each(f,function(h){var g=c.hdas.get(h.id);if(g){g.set(h)}})},error:function(g,d,e){if(!((g.readyState===0)&&(g.status===0))){c.log("Error fetching display applications:",a,g,d,e);var f=_l("An error occurred while getting display applications from the server.")+" "+_l("Please contact a Galaxy administrator if the problem persists.");c.trigger("error",f,g,d,e)}}})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});History.UPDATE_DELAY=4000;var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories"});
\ No newline at end of file
+var History=Backbone.Model.extend(LoggableMixin).extend({defaults:{id:null,name:"Unnamed History",state:"new",diskSize:0,deleted:false},urlRoot:"api/histories/",url:function(){return this.urlRoot+this.get("id")},initialize:function(b,c,a){a=a||null;this.log(this+".initialize:",b,c);this.hdas=new HDACollection();this.updateTimeoutId=null;if(c&&_.isArray(c)){this.hdas.add(c);this.checkForUpdates();if(this.hdas.length>0){this.fetchDisplayApplications()}}this.setHdaEventHandlers();this.setOwnEventHandlers()},setHdaEventHandlers:function(){this.hdas.bind("state:ready",function(b,c,a){if(b.get("force_history_refresh")){this.updateAfterDelay()}},this);this.hdas.bind("error",function(b,d,a,c){this.trigger("error",b,d,a,c)},this)},setOwnEventHandlers:function(){if(this.logger){this.bind("all",function(a){this.log(this+"",arguments)},this)}},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},updateAfterDelay:function(){var a=this;this.updateTimeoutId=setTimeout(function(){a.updateTimeoutId=null;a.stateUpdater()},History.UPDATE_DELAY);return this.updateTimeoutId},isRunning:function(){var a=this.get("state");return((a===HistoryDatasetAssociation.STATES.RUNNING)||(a===HistoryDatasetAssociation.STATES.QUEUED))},isReady:function(){return !this.isRunning()},checkForUpdates:function(){if(this.isRunning()){this.updateAfterDelay()}else{this.trigger("ready")}return this},findHdasToUpdate:function(){var c=this,a=c.get("state_ids"),b=[];_.each(a,function(d,e){_.each(d,function(g){var f=c.hdas.get(g);if(!f||f.get("state")!==e){b.push(g)}})});return b},stateUpdater:function(){var c=this,a=this.get("state"),b=this.fetch();b.done(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=c.findHdasToUpdate();if(e.length){c.fetchHdaUpdates(e).done(function(f){c.checkForUpdates()})}else{c.checkForUpdates()}});b.fail(function(g,d,e){if((g.status===0&&g.readyState===0)||(g.status===502)){c.log("Bad Gateway error. Retrying...");setTimeout(function(){c.stateUpdater()},History.UPDATE_DELAY)}else{c.log("stateUpdater error:",e,"responseText:",g.responseText);var f=_l("An error occurred while getting updates from the server.")+" "+_l("Please contact a Galaxy administrator if the problem persists.");c.trigger("error",c,g,{},f)}})},fetchHdaUpdates:function(c){var a=this,b=jQuery.ajax({url:this.url()+"/contents?"+jQuery.param({ids:c.join(",")}),error:function(i,d,e){if((i.readyState===0)&&(i.status===0)){return}var g=JSON.parse(i.responseText);if(_.isArray(g)){var f=_.groupBy(g,function(j){if(_.has(j,"error")){return"errored"}return"ok"});a.log("fetched, errored datasets:",f.errored);a.updateHdas(g)}else{a.log("Error updating hdas from api history contents",c,i,d,e,g);var h=_l("An error occurred while getting dataset details from the server.")+" "+_l("Please contact a Galaxy administrator if the problem persists.");a.trigger("error",a,i,{},h)}},success:function(e,d,f){a.log(a+".fetchHdaUpdates, success:",d,f);a.updateHdas(e)}});return b},updateHdas:function(a){var c=this,b=[];c.log(c+".updateHdas:",a);_.each(a,function(e,f){var d=c.hdas.get(e.id);if(d){c.log("found existing model in list for id "+e.id+", updating...:");d.set(e)}else{c.log("NO existing model for id "+e.id+", creating...:");b.push(e)}});if(b.length){c.addHdas(b)}},addHdas:function(a){var b=this;_.each(a,function(c,d){var e=b.hdas.hidToCollectionIndex(c.hid);c.history_id=b.get("id");b.hdas.add(new HistoryDatasetAssociation(c),{at:e,silent:true})});b.hdas.trigger("add",a)},fetchDisplayApplications:function(a){this.log(this+".fetchDisplayApplications:",a);var d=this,c="history/get_display_application_links",b=(a&&_.isArray(a))?({hda_ids:a.join(",")}):({});d.log(this+": fetching display application data");jQuery.ajax(c,{data:b,success:function(g,e,f){_.each(g,function(i){var h=d.hdas.get(i.id);if(h){h.set(i)}})},error:function(h,e,f){if(!((h.readyState===0)&&(h.status===0))){d.log("Error fetching display applications:",a,h,e,f);var g=_l("An error occurred while getting display applications from the server.")+" "+_l("Please contact a Galaxy administrator if the problem persists.");d.trigger("error",d,h,{url:c},g)}}})},toString:function(){var a=(this.get("name"))?(", "+this.get("name")):("");return"History("+this.get("id")+a+")"}});History.UPDATE_DELAY=4000;var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories"});
\ No newline at end of file
diff -r febd7622924885dd0729ce00924289cc1f0eb741 -r a5d98e64b173e5fc11d0d7234a16fbc80c553317 static/scripts/packed/mvc/history/history-panel.js
--- a/static/scripts/packed/mvc/history/history-panel.js
+++ b/static/scripts/packed/mvc/history/history-panel.js
@@ -1,1 +1,1 @@
-var HistoryPanel=Backbone.View.extend(LoggableMixin).extend({el:"body.historyPage",HDAView:HDAEditView,events:{"click #history-tag":"loadAndDisplayTags","click #message-container":"removeMessage"},initialize:function(a){if(a.logger){this.logger=this.model.logger=a.logger}this.log(this+".initialize:",a);if(!a.urlTemplates){throw (this+" needs urlTemplates on initialize")}if(!a.urlTemplates.history){throw (this+" needs urlTemplates.history on initialize")}if(!a.urlTemplates.hda){throw (this+" needs urlTemplates.hda on initialize")}this.urlTemplates=a.urlTemplates.history;this.hdaUrlTemplates=a.urlTemplates.hda;this._setUpWebStorage(a.initiallyExpanded,a.show_deleted,a.show_hidden);this._setUpEventHandlers();this.hdaViews={};this.urls={}},refresh:function(){window.location=window.location},_setUpEventHandlers:function(){this.model.bind("change:nice_size",this.updateHistoryDiskSize,this);this.model.bind("error",function(d,c,b,a){this.displayMessage("error",d);this.model.attributes.error=undefined},this);this.model.hdas.bind("add",this.add,this);this.model.hdas.bind("reset",this.addAll,this);this.model.hdas.bind("change:deleted",this.handleHdaDeletionChange,this);this.model.hdas.bind("change:purged",function(a){this.model.fetch()},this);this.model.hdas.bind("state:ready",function(b,c,a){if((!b.get("visible"))&&(!this.storage.get("show_hidden"))){this.removeHdaView(b.get("id"))}},this);this.bind("error",function(d,c,b,a){this.displayMessage("error",d)});if(this.logger){this.bind("all",function(a){this.log(this+"",arguments)},this)}},_setUpWebStorage:function(b,a,c){this.storage=new PersistentStorage("HistoryView."+this.model.get("id"),{expandedHdas:{},show_deleted:false,show_hidden:false});this.log(this+" (prev) storage:",JSON.stringify(this.storage.get(),null,2));if(b){this.storage.set("exandedHdas",b)}if((a===true)||(a===false)){this.storage.set("show_deleted",a)}if((c===true)||(c===false)){this.storage.set("show_hidden",c)}this.show_deleted=this.storage.get("show_deleted");this.show_hidden=this.storage.get("show_hidden");this.log(this+" (init'd) storage:",this.storage.get())},clearWebStorage:function(){for(var a in sessionStorage){if(a.indexOf("HistoryView.")===0){sessionStorage.removeItem(a)}}},add:function(a){this.render()},addAll:function(){this.render()},handleHdaDeletionChange:function(a){if(a.get("deleted")&&!this.storage.get("show_deleted")){this.removeHdaView(a.get("id"))}},removeHdaView:function(c,b){var a=this.hdaViews[c];if(!a){return}a.remove(b);delete this.hdaViews[c];if(_.isEmpty(this.hdaViews)){this.render()}},render:function(){var b=this,d=b.toString()+".set-up",c=$("<div/>"),a=this.model.toJSON(),e=(this.$el.children().size()===0);a.urls=this._renderUrls(a);c.append(HistoryPanel.templates.historyPanel(a));c.find("[title]").tooltip({placement:"bottom"});if(!this.model.hdas.length||!this.renderItems(c.find("#"+this.model.get("id")+"-datasets"))){c.find("#emptyHistoryMessage").show()}$(b).queue(d,function(f){b.$el.fadeOut("fast",function(){f()})});$(b).queue(d,function(f){b.$el.html("");b.$el.append(c.children());b.$el.fadeIn("fast",function(){f()})});$(b).queue(d,function(f){this.log(b+" rendered:",b.$el);b._setUpBehaviours();if(e){b.trigger("rendered:initial")}else{b.trigger("rendered")}f()});$(b).dequeue(d);return this},_renderUrls:function(a){var b=this;b.urls={};_.each(this.urlTemplates,function(d,c){b.urls[c]=_.template(d,a)});return b.urls},renderItems:function(b){this.hdaViews={};var a=this,c=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"));_.each(c,function(f){var e=f.get("id"),d=a.storage.get("expandedHdas").get(e);a.hdaViews[e]=new a.HDAView({model:f,expanded:d,urlTemplates:a.hdaUrlTemplates,logger:a.logger});a._setUpHdaListeners(a.hdaViews[e]);b.prepend(a.hdaViews[e].render().$el)});return c.length},_setUpHdaListeners:function(b){var a=this;b.bind("body-expanded",function(c){a.storage.get("expandedHdas").set(c,true)});b.bind("body-collapsed",function(c){a.storage.get("expandedHdas").deleteKey(c)});b.bind("error",function(f,e,c,d){a.displayMessage("error",f)})},_setUpBehaviours:function(){if(!(this.model.get("user")&&this.model.get("user").email)){return}var a=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(a.is(":hidden")){a.slideDown("fast")}else{a.slideUp("fast")}return false});async_save_text("history-name-container","history-name",this.urls.rename,"new_name",18);async_save_text("history-annotation-container","history-annotation",this.urls.annotate,"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},showQuotaMessage:function(){var a=this.$el.find("#quota-message-container");if(a.is(":hidden")){a.slideDown("fast")}},hideQuotaMessage:function(){var a=this.$el.find("#quota-message-container");if(!a.is(":hidden")){a.slideUp("fast")}},toggleShowDeleted:function(){this.storage.set("show_deleted",!this.storage.get("show_deleted"));this.render();return this.storage.get("show_deleted")},toggleShowHidden:function(){this.storage.set("show_hidden",!this.storage.get("show_hidden"));this.render();return this.storage.get("show_hidden")},collapseAllHdaBodies:function(){_.each(this.hdaViews,function(a){a.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},loadAndDisplayTags:function(d){this.log(this+".loadAndDisplayTags",d);var b=this,e=this.$el.find("#history-tag-area"),c=e.find(".tag-elt");this.log("\t tagArea",e," tagElt",c);if(e.is(":hidden")){if(!jQuery.trim(c.html())){var a=this;$.ajax({url:a.urls.tag,error:function(h,g,f){b.log("Error loading tag area html",h,g,f);b.trigger("error",_l("Tagging failed"),h,g,f)},success:function(f){c.html(f);c.find("[title]").tooltip();e.slideDown("fast")}})}else{e.slideDown("fast")}}else{e.slideUp("fast")}return false},displayMessage:function(c,d){var b=this.$el.find("#message-container"),a=$("<div/>").addClass(c+"message").text(d);b.html(a)},removeMessage:function(){var a=this.$el.find("#message-container");a.html(null)},scrollToTop:function(){$(document).scrollTop(0);return this},scrollIntoView:function(b,c){if(!c){$(document).scrollTop(b);return this}var a=window,d=this.$el.parent(),f=$(a).innerHeight(),e=(f/2)-(c/2);$(d).scrollTop(b-e);return this},scrollToId:function(b){if((!b)||(!this.hdaViews[b])){return this}var a=this.hdaViews[b].$el;this.scrollIntoView(a.offset().top,a.outerHeight());return this},scrollToHid:function(a){var b=this.model.hdas.getByHid(a);if(!b){return this}return this.scrollToId(b.id)},toString:function(){var a=this.model.get("name")||"";return"HistoryPanel("+a+")"}});HistoryPanel.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};
\ No newline at end of file
+var HistoryPanel=Backbone.View.extend(LoggableMixin).extend({el:"body.historyPage",HDAView:HDAEditView,events:{"click #history-tag":"loadAndDisplayTags","click #message-container":"removeMessage"},initialize:function(a){if(a.logger){this.logger=this.model.logger=a.logger}this.log(this+".initialize:",a);if(!a.urlTemplates){throw (this+" needs urlTemplates on initialize")}if(!a.urlTemplates.history){throw (this+" needs urlTemplates.history on initialize")}if(!a.urlTemplates.hda){throw (this+" needs urlTemplates.hda on initialize")}this.urlTemplates=a.urlTemplates.history;this.hdaUrlTemplates=a.urlTemplates.hda;this._setUpWebStorage(a.initiallyExpanded,a.show_deleted,a.show_hidden);this._setUpEventHandlers();this.hdaViews={};this.urls={}},errorHandler:function(b,d,a,c){if(d&&((d.status===0&&d.readyState===0)||(d.status===502))){this.log("lost contact with server",b,d,a,c);return}c=c||_l("An error occurred while getting updates from the server.")+" "+_l("Please contact a Galaxy administrator if the problem persists.");this.displayMessage("error",c)},refresh:function(){window.location=window.location},_setUpEventHandlers:function(){this.model.bind("change:nice_size",this.updateHistoryDiskSize,this);this.model.bind("error",function(b,d,a,c){this.errorHandler(b,d,a,c);this.model.attributes.error=undefined},this);this.model.hdas.bind("add",this.add,this);this.model.hdas.bind("reset",this.addAll,this);this.model.hdas.bind("change:deleted",this.handleHdaDeletionChange,this);this.model.hdas.bind("change:purged",function(a){this.model.fetch()},this);this.model.hdas.bind("state:ready",function(b,c,a){if((!b.get("visible"))&&(!this.storage.get("show_hidden"))){this.removeHdaView(b.get("id"))}},this);this.bind("error",function(b,d,a,c){this.errorHandler(b,d,a,c)});if(this.logger){this.bind("all",function(a){this.log(this+"",arguments)},this)}},_setUpWebStorage:function(b,a,c){this.storage=new PersistentStorage("HistoryView."+this.model.get("id"),{expandedHdas:{},show_deleted:false,show_hidden:false});this.log(this+" (prev) storage:",JSON.stringify(this.storage.get(),null,2));if(b){this.storage.set("exandedHdas",b)}if((a===true)||(a===false)){this.storage.set("show_deleted",a)}if((c===true)||(c===false)){this.storage.set("show_hidden",c)}this.show_deleted=this.storage.get("show_deleted");this.show_hidden=this.storage.get("show_hidden");this.log(this+" (init'd) storage:",this.storage.get())},clearWebStorage:function(){for(var a in sessionStorage){if(a.indexOf("HistoryView.")===0){sessionStorage.removeItem(a)}}},add:function(a){this.render()},addAll:function(){this.render()},handleHdaDeletionChange:function(a){if(a.get("deleted")&&!this.storage.get("show_deleted")){this.removeHdaView(a.get("id"))}},removeHdaView:function(c,b){var a=this.hdaViews[c];if(!a){return}a.remove(b);delete this.hdaViews[c];if(_.isEmpty(this.hdaViews)){this.render()}},render:function(){var b=this,d=b.toString()+".set-up",c=$("<div/>"),a=this.model.toJSON(),e=(this.$el.children().size()===0);a.urls=this._renderUrls(a);c.append(HistoryPanel.templates.historyPanel(a));c.find("[title]").tooltip({placement:"bottom"});if(!this.model.hdas.length||!this.renderItems(c.find("#"+this.model.get("id")+"-datasets"))){c.find("#emptyHistoryMessage").show()}$(b).queue(d,function(f){b.$el.fadeOut("fast",function(){f()})});$(b).queue(d,function(f){b.$el.html("");b.$el.append(c.children());b.$el.fadeIn("fast",function(){f()})});$(b).queue(d,function(f){this.log(b+" rendered:",b.$el);b._setUpBehaviours();if(e){b.trigger("rendered:initial")}else{b.trigger("rendered")}f()});$(b).dequeue(d);return this},_renderUrls:function(a){var b=this;b.urls={};_.each(this.urlTemplates,function(d,c){b.urls[c]=_.template(d,a)});return b.urls},renderItems:function(b){this.hdaViews={};var a=this,c=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"));_.each(c,function(f){var e=f.get("id"),d=a.storage.get("expandedHdas").get(e);a.hdaViews[e]=new a.HDAView({model:f,expanded:d,urlTemplates:a.hdaUrlTemplates,logger:a.logger});a._setUpHdaListeners(a.hdaViews[e]);b.prepend(a.hdaViews[e].render().$el)});return c.length},_setUpHdaListeners:function(b){var a=this;b.bind("body-expanded",function(c){a.storage.get("expandedHdas").set(c,true)});b.bind("body-collapsed",function(c){a.storage.get("expandedHdas").deleteKey(c)});b.bind("error",function(d,f,c,e){a.errorHandler(d,f,c,e)})},_setUpBehaviours:function(){if(!(this.model.get("user")&&this.model.get("user").email)){return}var a=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(a.is(":hidden")){a.slideDown("fast")}else{a.slideUp("fast")}return false});async_save_text("history-name-container","history-name",this.urls.rename,"new_name",18);async_save_text("history-annotation-container","history-annotation",this.urls.annotate,"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},showQuotaMessage:function(){var a=this.$el.find("#quota-message-container");if(a.is(":hidden")){a.slideDown("fast")}},hideQuotaMessage:function(){var a=this.$el.find("#quota-message-container");if(!a.is(":hidden")){a.slideUp("fast")}},toggleShowDeleted:function(){this.storage.set("show_deleted",!this.storage.get("show_deleted"));this.render();return this.storage.get("show_deleted")},toggleShowHidden:function(){this.storage.set("show_hidden",!this.storage.get("show_hidden"));this.render();return this.storage.get("show_hidden")},collapseAllHdaBodies:function(){_.each(this.hdaViews,function(a){a.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},loadAndDisplayTags:function(d){this.log(this+".loadAndDisplayTags",d);var b=this,e=this.$el.find("#history-tag-area"),c=e.find(".tag-elt");this.log("\t tagArea",e," tagElt",c);if(e.is(":hidden")){if(!jQuery.trim(c.html())){var a=this;$.ajax({url:a.urls.tag,error:function(h,g,f){b.log("Error loading tag area html",h,g,f);b.trigger("error",b,{},{},_l("Tagging failed"))},success:function(f){c.html(f);c.find("[title]").tooltip();e.slideDown("fast")}})}else{e.slideDown("fast")}}else{e.slideUp("fast")}return false},displayMessage:function(c,d){var b=this.$el.find("#message-container"),a=$("<div/>").addClass(c+"message").text(d);b.html(a)},removeMessage:function(){var a=this.$el.find("#message-container");a.html(null)},scrollToTop:function(){$(document).scrollTop(0);return this},scrollIntoView:function(b,c){if(!c){$(document).scrollTop(b);return this}var a=window,d=this.$el.parent(),f=$(a).innerHeight(),e=(f/2)-(c/2);$(d).scrollTop(b-e);return this},scrollToId:function(b){if((!b)||(!this.hdaViews[b])){return this}var a=this.hdaViews[b].$el;this.scrollIntoView(a.offset().top,a.outerHeight());return this},scrollToHid:function(a){var b=this.model.hdas.getByHid(a);if(!b){return this}return this.scrollToId(b.id)},toString:function(){var a=this.model.get("name")||"";return"HistoryPanel("+a+")"}});HistoryPanel.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};
\ No newline at end of file
diff -r febd7622924885dd0729ce00924289cc1f0eb741 -r a5d98e64b173e5fc11d0d7234a16fbc80c553317 static/scripts/packed/viz/trackster.js
--- a/static/scripts/packed/viz/trackster.js
+++ b/static/scripts/packed/viz/trackster.js
@@ -1,1 +1,1 @@
-var ui=null;var view=null;var browser_router=null;require(["utils/galaxy.utils","libs/jquery/jstorage","libs/jquery/jquery.event.drag","libs/jquery/jquery.event.hover","libs/jquery/jquery.mousewheel","libs/jquery/jquery-ui","libs/jquery/select2","libs/farbtastic","libs/jquery/jquery.form","libs/jquery/jquery.rating","mvc/ui"],function(a){a.cssLoadFile("static/style/jquery.rating.css");a.cssLoadFile("static/style/autocomplete_tagging.css");a.cssLoadFile("static/style/jquery-ui/smoothness/jquery-ui.css");a.cssLoadFile("static/style/library.css");a.cssLoadFile("static/style/trackster.css")});define(["libs/backbone/backbone-relational","viz/visualization","viz/trackster_ui"],function(c,a,b){var d=Backbone.View.extend({initialize:function(){ui=new b.TracksterUI(galaxy_config.root);ui.createButtonMenu();ui.buttonMenu.$el.attr("style","float: right");$("#center .unified-panel-header-inner").append(ui.buttonMenu.$el);$("#right .unified-panel-title").append("Bookmarks");$("#right .unified-panel-icons").append("<a id='add-bookmark-button' class='icon-button menu-button plus-button' href='javascript:void(0);' title='Add bookmark'></a>");$("#right-border").click(function(){view.resize_window()});force_right_panel("hide");if(galaxy_config.app.id){this.view_existing()}else{this.view_new()}},set_up_router:function(e){browser_router=new a.TrackBrowserRouter(e);Backbone.history.start()},view_existing:function(){var e=galaxy_config.app.viz_config;view=ui.create_visualization({container:$("#center .unified-panel-body"),name:e.title,vis_id:e.vis_id,dbkey:e.dbkey},e.viewport,e.tracks,e.bookmarks,true);this.init_editor()},view_new:function(){var e=this;$.ajax({url:galaxy_config.root+"api/genomes?chrom_info=True",data:{},error:function(){alert("Couldn't create new browser.")},success:function(f){Galaxy.modal.show({title:"New Visualization",body:e.template_view_new(f),buttons:{Cancel:function(){window.location=galaxy_config.root+"visualization/list"},Create:function(){e.create_browser($("#new-title").val(),$("#new-dbkey").val());Galaxy.modal.hide()}}});if(galaxy_config.app.default_dbkey){$("#new-dbkey option[value='"+galaxy_config.app.default_dbkey+"']").attr("selected",true)}$("#new-title").focus();$("select[name='dbkey']").select2();$("#overlay").css("overflow","auto")}})},template_view_new:function(e){var g='<form id="new-browser-form" action="javascript:void(0);" method="post" onsubmit="return false;"><div class="form-row"><label for="new-title">Browser name:</label><div class="form-row-input"><input type="text" name="title" id="new-title" value="Unnamed"></input></div><div style="clear: both;"></div></div><div class="form-row"><label for="new-dbkey">Reference genome build (dbkey): </label><div class="form-row-input"><select name="dbkey" id="new-dbkey">';for(var f in e){g+='<option value="'+e[f][1]+'">'+e[f][0]+"</option>"}g+='</select></div><div style="clear: both;"></div></div><div class="form-row">Is the build not listed here? <a href="'+galaxy_config.root+'user/dbkeys?use_panels=True">Add a Custom Build</a></div></form>';return g},create_browser:function(f,e){$(document).trigger("convert_to_values");view=ui.create_visualization({container:$("#center .unified-panel-body"),name:f,dbkey:e},galaxy_config.app.gene_region);this.init_editor();view.editor=true},init_editor:function(){$("#center .unified-panel-title").text(view.name+" ("+view.dbkey+")");if(galaxy_config.app.add_dataset){$.ajax({url:galaxy_config.root+"api/datasets/"+galaxy_config.app.add_dataset,data:{hda_ldda:"hda",data_type:"track_config"},dataType:"json",success:function(e){view.add_drawable(b.object_from_template(e,view,view))}})}$("#add-bookmark-button").click(function(){var f=view.chrom+":"+view.low+"-"+view.high,e="Bookmark description";return ui.add_bookmark(f,e,true)});ui.init_keyboard_nav(view);this.set_up_router({view:view})}});return{GalaxyApp:d}});
\ No newline at end of file
+var ui=null;var view=null;var browser_router=null;require(["utils/galaxy.utils","libs/jquery/jstorage","libs/jquery/jquery.event.drag","libs/jquery/jquery.event.hover","libs/jquery/jquery.mousewheel","libs/jquery/jquery-ui","libs/jquery/select2","libs/farbtastic","libs/jquery/jquery.form","libs/jquery/jquery.rating","mvc/ui"],function(a){a.cssLoadFile("static/style/jquery.rating.css");a.cssLoadFile("static/style/autocomplete_tagging.css");a.cssLoadFile("static/style/jquery-ui/smoothness/jquery-ui.css");a.cssLoadFile("static/style/library.css");a.cssLoadFile("static/style/trackster.css")});define(["libs/backbone/backbone-relational","viz/visualization","viz/trackster_ui"],function(c,a,b){var d=Backbone.View.extend({initialize:function(){ui=new b.TracksterUI(galaxy_config.root);ui.createButtonMenu();ui.buttonMenu.$el.attr("style","float: right");$("#center .unified-panel-header-inner").append(ui.buttonMenu.$el);$("#right .unified-panel-title").append("Bookmarks");$("#right .unified-panel-icons").append("<a id='add-bookmark-button' class='icon-button menu-button plus-button' href='javascript:void(0);' title='Add bookmark'></a>");$("#right-border").click(function(){view.resize_window()});force_right_panel("hide");if(galaxy_config.app.id){this.view_existing()}else{this.view_new()}},set_up_router:function(e){browser_router=new a.TrackBrowserRouter(e);Backbone.history.start()},view_existing:function(){var e=galaxy_config.app.viz_config;view=ui.create_visualization({container:$("#center .unified-panel-body"),name:e.title,vis_id:e.vis_id,dbkey:e.dbkey},e.viewport,e.tracks,e.bookmarks,true);this.init_editor()},view_new:function(){var e=this;$.ajax({url:galaxy_config.root+"api/genomes?chrom_info=True",data:{},error:function(){alert("Couldn't create new browser.")},success:function(f){Galaxy.modal.show({title:"New Visualization",body:e.template_view_new(f),buttons:{Cancel:function(){window.location=galaxy_config.root+"visualization/list"},Create:function(){e.create_browser($("#new-title").val(),$("#new-dbkey").val());Galaxy.modal.hide()}}});if(galaxy_config.app.default_dbkey){$("#new-dbkey option[value='"+galaxy_config.app.default_dbkey+"']").attr("selected",true)}$("#new-title").focus();$("select[name='dbkey']").select2();$("#overlay").css("overflow","auto")}})},template_view_new:function(e){var g='<form id="new-browser-form" action="javascript:void(0);" method="post" onsubmit="return false;"><div class="form-row"><label for="new-title">Browser name:</label><div class="form-row-input"><input type="text" name="title" id="new-title" value="Unnamed"></input></div><div style="clear: both;"></div></div><div class="form-row"><label for="new-dbkey">Reference genome build (dbkey): </label><div class="form-row-input"><select name="dbkey" id="new-dbkey">';for(var f in e){g+='<option value="'+e[f][1]+'">'+e[f][0]+"</option>"}g+='</select></div><div style="clear: both;"></div></div><div class="form-row">Is the build not listed here? <a href="'+galaxy_config.root+'user/dbkeys?use_panels=True">Add a Custom Build</a></div></form>';return g},create_browser:function(f,e){$(document).trigger("convert_to_values");view=ui.create_visualization({container:$("#center .unified-panel-body"),name:f,dbkey:e},galaxy_config.app.gene_region);this.init_editor();view.editor=true},init_editor:function(){$("#center .unified-panel-title").text(view.prefs.name+" ("+view.dbkey+")");if(galaxy_config.app.add_dataset){$.ajax({url:galaxy_config.root+"api/datasets/"+galaxy_config.app.add_dataset,data:{hda_ldda:"hda",data_type:"track_config"},dataType:"json",success:function(e){view.add_drawable(b.object_from_template(e,view,view))}})}$("#add-bookmark-button").click(function(){var f=view.chrom+":"+view.low+"-"+view.high,e="Bookmark description";return ui.add_bookmark(f,e,true)});ui.init_keyboard_nav(view);this.set_up_router({view:view})}});return{GalaxyApp:d}});
\ No newline at end of file
diff -r febd7622924885dd0729ce00924289cc1f0eb741 -r a5d98e64b173e5fc11d0d7234a16fbc80c553317 static/scripts/packed/viz/trackster_ui.js
--- a/static/scripts/packed/viz/trackster_ui.js
+++ b/static/scripts/packed/viz/trackster_ui.js
@@ -1,1 +1,1 @@
-define(["base","libs/underscore","viz/trackster/slotting","viz/trackster/painters","viz/trackster/tracks","viz/visualization"],function(a,f,e,c,d,h){var j=d.object_from_template;var b=function(l,k){if(!k){k={}}var m=new IconButtonCollection(f.map(l,function(n){return new IconButton(f.extend(n,k))}));return new IconButtonMenuView({collection:m})};var g=a.Base.extend({initialize:function(k){this.baseURL=k},createButtonMenu:function(){var k=this,l=b([{icon_class:"plus-button",title:"Add tracks",on_click:function(){h.select_datasets(galaxy_config.root+"visualization/list_current_history_datasets",galaxy_config.root+"api/datasets",{"f-dbkey":view.dbkey},function(m){f.each(m,function(n){view.add_drawable(j(n,view,view))})})}},{icon_class:"block--plus",title:"Add group",on_click:function(){view.add_drawable(new d.DrawableGroup(view,view,{name:"New Group"}))}},{icon_class:"bookmarks",title:"Bookmarks",on_click:function(){force_right_panel(($("div#right").css("right")=="0px"?"hide":"show"))}},{icon_class:"globe",title:"Circster",on_click:function(){window.location=k.baseURL+"visualization/circster?id="+view.vis_id}},{icon_class:"disk--arrow",title:"Save",on_click:function(){Galaxy.modal.show({title:"Saving...",body:"progress"});var m=[];$(".bookmark").each(function(){m.push({position:$(this).children(".position").text(),annotation:$(this).children(".annotation").text()})});var n=(view.overview_drawable?view.overview_drawable.name:null),o={view:view.to_dict(),viewport:{chrom:view.chrom,start:view.low,end:view.high,overview:n},bookmarks:m};$.ajax({url:galaxy_config.root+"visualization/save",type:"POST",dataType:"json",data:{id:view.vis_id,title:view.name,dbkey:view.dbkey,type:"trackster",vis_json:JSON.stringify(o)}}).success(function(p){Galaxy.modal.hide();view.vis_id=p.vis_id;view.has_changes=false;window.history.pushState({},"",p.url+window.location.hash)}).error(function(){Galaxy.modal.show({title:"Could Not Save",body:"Could not save visualization. Please try again later.",buttons:{Cancel:function(){Galaxy.modal.hide()}}})})}},{icon_class:"cross-circle",title:"Close",on_click:function(){window.location=galaxy_config.root+"visualization"}}],{tooltip_config:{placement:"bottom"}});this.buttonMenu=l;return l},add_bookmarks:function(){var k=this,l=this.baseURL;Galaxy.modal.show({title:"Select dataset for new bookmarks",body:"progress"});$.ajax({url:this.baseURL+"/visualization/list_histories",data:{"f-dbkey":view.dbkey},error:function(){alert("Grid failed")},success:function(m){Galaxy.modal.show({title:"Select dataset for new bookmarks",body:m,buttons:{Cancel:function(){Galaxy.modal.hide()},Insert:function(){$("input[name=id]:checked,input[name=ldda_ids]:checked").first().each(function(){var n,o=$(this).val();if($(this).attr("name")==="id"){n={hda_id:o}}else{n={ldda_id:o}}$.ajax({url:this.baseURL+"/visualization/bookmarks_from_dataset",data:n,dataType:"json"}).then(function(p){for(i=0;i<p.data.length;i++){var q=p.data[i];k.add_bookmark(q[0],q[1])}})});Galaxy.modal.hide()}}})}})},add_bookmark:function(o,m,k){var q=$("#right .unified-panel-body"),s=$("<div/>").addClass("bookmark").appendTo(q);var t=$("<div/>").addClass("position").appendTo(s),p=$("<a href=''/>").text(o).appendTo(t).click(function(){view.go_to(o);return false}),n=$("<div/>").text(m).appendTo(s);if(k){var r=$("<div/>").addClass("delete-icon-container").prependTo(s).click(function(){s.slideUp("fast");s.remove();view.has_changes=true;return false}),l=$("<a href=''/>").addClass("icon-button delete").appendTo(r);n.make_text_editable({num_rows:3,use_textarea:true,help_text:"Edit bookmark note"}).addClass("annotation")}view.has_changes=true;return s},create_visualization:function(p,k,o,q,n){var m=this,l=new d.TracksterView(p);l.editor=true;$.when(l.load_chroms_deferred).then(function(B){if(k){var z=k.chrom,r=k.start,w=k.end,t=k.overview;if(z&&(r!==undefined)&&w){l.change_chrom(z,r,w)}else{l.change_chrom(B[0].chrom)}}else{l.change_chrom(B[0].chrom)}if(o){var u,s,v;for(var x=0;x<o.length;x++){l.add_drawable(j(o[x],l,l))}}l.update_intro_div();var A;for(var x=0;x<l.drawables.length;x++){if(l.drawables[x].name===t){l.set_overview(l.drawables[x]);break}}if(q){var y;for(var x=0;x<q.length;x++){y=q[x];m.add_bookmark(y.position,y.annotation,n)}}l.has_changes=false});return l},init_keyboard_nav:function(k){$(document).keydown(function(l){if($(l.srcElement).is(":input")){return}switch(l.which){case 37:k.move_fraction(0.25);break;case 38:var m=Math.round(k.viewport_container.height()/15);k.viewport_container.scrollTop(k.viewport_container.scrollTop()-20);break;case 39:k.move_fraction(-0.25);break;case 40:var m=Math.round(k.viewport_container.height()/15);k.viewport_container.scrollTop(k.viewport_container.scrollTop()+20);break}})}});return{object_from_template:j,TracksterUI:g}});
\ No newline at end of file
+define(["base","libs/underscore","viz/trackster/slotting","viz/trackster/painters","viz/trackster/tracks","viz/visualization"],function(a,f,e,c,d,h){var j=d.object_from_template;var b=function(l,k){if(!k){k={}}var m=new IconButtonCollection(f.map(l,function(n){return new IconButton(f.extend(n,k))}));return new IconButtonMenuView({collection:m})};var g=a.Base.extend({initialize:function(k){this.baseURL=k},createButtonMenu:function(){var k=this,l=b([{icon_class:"plus-button",title:"Add tracks",on_click:function(){h.select_datasets(galaxy_config.root+"visualization/list_current_history_datasets",galaxy_config.root+"api/datasets",{"f-dbkey":view.dbkey},function(m){f.each(m,function(n){view.add_drawable(j(n,view,view))})})}},{icon_class:"block--plus",title:"Add group",on_click:function(){view.add_drawable(new d.DrawableGroup(view,view,{name:"New Group"}))}},{icon_class:"bookmarks",title:"Bookmarks",on_click:function(){force_right_panel(($("div#right").css("right")=="0px"?"hide":"show"))}},{icon_class:"globe",title:"Circster",on_click:function(){window.location=k.baseURL+"visualization/circster?id="+view.vis_id}},{icon_class:"disk--arrow",title:"Save",on_click:function(){Galaxy.modal.show({title:"Saving...",body:"progress"});var m=[];$(".bookmark").each(function(){m.push({position:$(this).children(".position").text(),annotation:$(this).children(".annotation").text()})});var n=(view.overview_drawable?view.overview_drawable.prefs.name:null),o={view:view.to_dict(),viewport:{chrom:view.chrom,start:view.low,end:view.high,overview:n},bookmarks:m};$.ajax({url:galaxy_config.root+"visualization/save",type:"POST",dataType:"json",data:{id:view.vis_id,title:view.prefs.name,dbkey:view.dbkey,type:"trackster",vis_json:JSON.stringify(o)}}).success(function(p){Galaxy.modal.hide();view.vis_id=p.vis_id;view.has_changes=false;window.history.pushState({},"",p.url+window.location.hash)}).error(function(){Galaxy.modal.show({title:"Could Not Save",body:"Could not save visualization. Please try again later.",buttons:{Cancel:function(){Galaxy.modal.hide()}}})})}},{icon_class:"cross-circle",title:"Close",on_click:function(){window.location=galaxy_config.root+"visualization"}}],{tooltip_config:{placement:"bottom"}});this.buttonMenu=l;return l},add_bookmarks:function(){var k=this,l=this.baseURL;Galaxy.modal.show({title:"Select dataset for new bookmarks",body:"progress"});$.ajax({url:this.baseURL+"/visualization/list_histories",data:{"f-dbkey":view.dbkey},error:function(){alert("Grid failed")},success:function(m){Galaxy.modal.show({title:"Select dataset for new bookmarks",body:m,buttons:{Cancel:function(){Galaxy.modal.hide()},Insert:function(){$("input[name=id]:checked,input[name=ldda_ids]:checked").first().each(function(){var n,o=$(this).val();if($(this).attr("name")==="id"){n={hda_id:o}}else{n={ldda_id:o}}$.ajax({url:this.baseURL+"/visualization/bookmarks_from_dataset",data:n,dataType:"json"}).then(function(p){for(i=0;i<p.data.length;i++){var q=p.data[i];k.add_bookmark(q[0],q[1])}})});Galaxy.modal.hide()}}})}})},add_bookmark:function(o,m,k){var q=$("#right .unified-panel-body"),s=$("<div/>").addClass("bookmark").appendTo(q);var t=$("<div/>").addClass("position").appendTo(s),p=$("<a href=''/>").text(o).appendTo(t).click(function(){view.go_to(o);return false}),n=$("<div/>").text(m).appendTo(s);if(k){var r=$("<div/>").addClass("delete-icon-container").prependTo(s).click(function(){s.slideUp("fast");s.remove();view.has_changes=true;return false}),l=$("<a href=''/>").addClass("icon-button delete").appendTo(r);n.make_text_editable({num_rows:3,use_textarea:true,help_text:"Edit bookmark note"}).addClass("annotation")}view.has_changes=true;return s},create_visualization:function(p,k,o,q,n){var m=this,l=new d.TracksterView(p);l.editor=true;$.when(l.load_chroms_deferred).then(function(B){if(k){var z=k.chrom,r=k.start,w=k.end,t=k.overview;if(z&&(r!==undefined)&&w){l.change_chrom(z,r,w)}else{l.change_chrom(B[0].chrom)}}else{l.change_chrom(B[0].chrom)}if(o){var u,s,v;for(var x=0;x<o.length;x++){l.add_drawable(j(o[x],l,l))}}l.update_intro_div();var A;for(var x=0;x<l.drawables.length;x++){if(l.drawables[x].prefs.name===t){l.set_overview(l.drawables[x]);break}}if(q){var y;for(var x=0;x<q.length;x++){y=q[x];m.add_bookmark(y.position,y.annotation,n)}}l.has_changes=false});return l},init_keyboard_nav:function(k){$(document).keydown(function(l){if($(l.srcElement).is(":input")){return}switch(l.which){case 37:k.move_fraction(0.25);break;case 38:var m=Math.round(k.viewport_container.height()/15);k.viewport_container.scrollTop(k.viewport_container.scrollTop()-20);break;case 39:k.move_fraction(-0.25);break;case 40:var m=Math.round(k.viewport_container.height()/15);k.viewport_container.scrollTop(k.viewport_container.scrollTop()+20);break}})}});return{object_from_template:j,TracksterUI:g}});
\ No newline at end of file
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: natefoo: Log failures when setting peek.
by commits-noreply@bitbucket.org 18 Oct '13
by commits-noreply@bitbucket.org 18 Oct '13
18 Oct '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/febd76229248/
Changeset: febd76229248
User: natefoo
Date: 2013-10-18 17:43:01
Summary: Log failures when setting peek.
Affected #: 1 file
diff -r 503d939099fcd8913202300b83221a8d3269b9f9 -r febd7622924885dd0729ce00924289cc1f0eb741 lib/galaxy/datatypes/tabular.py
--- a/lib/galaxy/datatypes/tabular.py
+++ b/lib/galaxy/datatypes/tabular.py
@@ -227,6 +227,7 @@
out.append( '</th>' )
out.append( '</tr>' )
except Exception, exc:
+ log.exception( 'make_html_peek_header failed on HDA %s' % dataset.id )
raise Exception, "Can't create peek header %s" % str( exc )
return "".join( out )
@@ -254,6 +255,7 @@
out.append( '<td>%s</td>' % escape( elem ) )
out.append( '</tr>' )
except Exception, exc:
+ log.exception( 'make_html_peek_rows failed on HDA %s' % dataset.id )
raise Exception, "Can't create peek rows %s" % str( exc )
return "".join( out )
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: Trackster: more name location fixes.
by commits-noreply@bitbucket.org 17 Oct '13
by commits-noreply@bitbucket.org 17 Oct '13
17 Oct '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/503d939099fc/
Changeset: 503d939099fc
User: jgoecks
Date: 2013-10-18 04:45:23
Summary: Trackster: more name location fixes.
Affected #: 1 file
diff -r f0875c78b7864c5ac75be62e9a52611bfa2a6cf0 -r 503d939099fcd8913202300b83221a8d3269b9f9 static/scripts/viz/trackster_ui.js
--- a/static/scripts/viz/trackster_ui.js
+++ b/static/scripts/viz/trackster_ui.js
@@ -75,7 +75,7 @@
});
// FIXME: give unique IDs to Drawables and save overview as ID.
- var overview_track_name = (view.overview_drawable ? view.overview_drawable.name : null),
+ var overview_track_name = (view.overview_drawable ? view.overview_drawable.prefs.name : null),
viz_config = {
'view': view.to_dict(),
'viewport': { 'chrom': view.chrom, 'start': view.low , 'end': view.high, 'overview': overview_track_name },
@@ -88,7 +88,7 @@
dataType: "json",
data: {
'id' : view.vis_id,
- 'title' : view.name,
+ 'title' : view.prefs.name,
'dbkey' : view.dbkey,
'type' : 'trackster',
'vis_json' : JSON.stringify(viz_config)
@@ -265,7 +265,7 @@
// Set overview.
var overview_drawable;
for (var i = 0; i < view.drawables.length; i++) {
- if (view.drawables[i].name === overview_drawable_name) {
+ if (view.drawables[i].prefs.name === overview_drawable_name) {
view.set_overview(view.drawables[i]);
break;
}
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: Set visualization naming to refer to new location.
by commits-noreply@bitbucket.org 17 Oct '13
by commits-noreply@bitbucket.org 17 Oct '13
17 Oct '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/f0875c78b786/
Changeset: f0875c78b786
User: jgoecks
Date: 2013-10-18 04:22:36
Summary: Set visualization naming to refer to new location.
Affected #: 1 file
diff -r 0d46133c90452dc8815de7057b13548f06beb7bb -r f0875c78b7864c5ac75be62e9a52611bfa2a6cf0 static/scripts/viz/trackster.js
--- a/static/scripts/viz/trackster.js
+++ b/static/scripts/viz/trackster.js
@@ -197,7 +197,7 @@
init_editor : function ()
{
// set title
- $("#center .unified-panel-title").text(view.name + " (" + view.dbkey + ")");
+ $("#center .unified-panel-title").text(view.prefs.name + " (" + view.dbkey + ")");
// add dataset
if (galaxy_config.app.add_dataset)
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: jmchilton: Add smpt_ssl parameter to force SSL SMTP connection from start.
by commits-noreply@bitbucket.org 17 Oct '13
by commits-noreply@bitbucket.org 17 Oct '13
17 Oct '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/0d46133c9045/
Changeset: 0d46133c9045
User: jmchilton
Date: 2013-10-18 01:09:55
Summary: Add smpt_ssl parameter to force SSL SMTP connection from start.
This is based on a slightly reworked commit from @aswarren (pull
request 198). I tweaked it by dropping smtp_from (as discussed in
pull request), and fixing a small string versus bool bug.
Tested both ways and it seems to work, with any luck though there is a
bug in there somewhere and Galaxy admins everywhere will get a break
until it is discovered :).
Affected #: 3 files
diff -r 90547efa211fb9c6480662129591ab28acbc0ffe -r 0d46133c90452dc8815de7057b13548f06beb7bb lib/galaxy/config.py
--- a/lib/galaxy/config.py
+++ b/lib/galaxy/config.py
@@ -159,6 +159,7 @@
self.smtp_server = kwargs.get( 'smtp_server', None )
self.smtp_username = kwargs.get( 'smtp_username', None )
self.smtp_password = kwargs.get( 'smtp_password', None )
+ self.smtp_ssl = kwargs.get( 'smtp_ssl', None )
self.track_jobs_in_database = kwargs.get( 'track_jobs_in_database', 'None' )
self.start_job_runners = listify(kwargs.get( 'start_job_runners', '' ))
self.expose_dataset_path = string_as_bool( kwargs.get( 'expose_dataset_path', 'False' ) )
diff -r 90547efa211fb9c6480662129591ab28acbc0ffe -r 0d46133c90452dc8815de7057b13548f06beb7bb lib/galaxy/util/__init__.py
--- a/lib/galaxy/util/__init__.py
+++ b/lib/galaxy/util/__init__.py
@@ -873,19 +873,24 @@
log.error( "Mail is not configured for this Galaxy instance." )
log.info( msg )
return
- s = smtplib.SMTP()
+ smtp_ssl = asbool( config.smtp_ssl )
+ if smtp_ssl:
+ s = smtplib.SMTP_SSL()
+ else:
+ s = smtplib.SMTP()
s.connect( config.smtp_server )
- try:
- s.starttls()
- log.debug( 'Initiated SSL/TLS connection to SMTP server: %s' % config.smtp_server )
- except RuntimeError, e:
- log.warning( 'SSL/TLS support is not available to your Python interpreter: %s' % e )
- except smtplib.SMTPHeloError, e:
- log.error( "The server didn't reply properly to the HELO greeting: %s" % e )
- s.close()
- raise
- except smtplib.SMTPException, e:
- log.warning( 'The server does not support the STARTTLS extension: %s' % e )
+ if not smtp_ssl:
+ try:
+ s.starttls()
+ log.debug( 'Initiated SSL/TLS connection to SMTP server: %s' % config.smtp_server )
+ except RuntimeError, e:
+ log.warning( 'SSL/TLS support is not available to your Python interpreter: %s' % e )
+ except smtplib.SMTPHeloError, e:
+ log.error( "The server didn't reply properly to the HELO greeting: %s" % e )
+ s.close()
+ raise
+ except smtplib.SMTPException, e:
+ log.warning( 'The server does not support the STARTTLS extension: %s' % e )
if config.smtp_username and config.smtp_password:
try:
s.login( config.smtp_username, config.smtp_password )
diff -r 90547efa211fb9c6480662129591ab28acbc0ffe -r 0d46133c90452dc8815de7057b13548f06beb7bb universe_wsgi.ini.sample
--- a/universe_wsgi.ini.sample
+++ b/universe_wsgi.ini.sample
@@ -263,6 +263,9 @@
#smtp_username = None
#smtp_password = None
+# If your SMTP server requires SSL from the beginning of the connection
+# smtp_ssl= False
+
# On the user registration form, users may choose to join the mailing list.
# This is the address of the list they'll be subscribed to.
#mailing_join_addr = galaxy-announce-join(a)bx.psu.edu
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/0b440d5c1667/
Changeset: 0b440d5c1667
User: nsoranzo
Date: 2013-10-17 12:46:13
Summary: Fix for "NotFound: cannot find 'cov_cutoff' while searching for 'expected.cov_cutoff'"
Affected #: 1 file
diff -r 329ea7a83af4f389a7c95ee4559d88c6fec0211b -r 0b440d5c1667b06e3a1eb3c8131b925e6da173fd tools/sr_assembly/velvetg.xml
--- a/tools/sr_assembly/velvetg.xml
+++ b/tools/sr_assembly/velvetg.xml
@@ -19,7 +19,7 @@
#if $expected.coverage == "auto":
-exp_cov auto
#elif $expected.coverage == "value":
- -exp_cov $expected.cov_cutoff
+ -exp_cov $expected.exp_cov
#end if
#if $contig_lgth.use_contig_lgth == "yes":
-min_contig_lgth $contig_lgth.min_contig_lgth
https://bitbucket.org/galaxy/galaxy-central/commits/90547efa211f/
Changeset: 90547efa211f
User: jmchilton
Date: 2013-10-18 00:27:23
Summary: Merge.
Affected #: 1 file
diff -r 0282484e4c323e1baf79d05813ea8213239a8b4e -r 90547efa211fb9c6480662129591ab28acbc0ffe tools/sr_assembly/velvetg.xml
--- a/tools/sr_assembly/velvetg.xml
+++ b/tools/sr_assembly/velvetg.xml
@@ -19,7 +19,7 @@
#if $expected.coverage == "auto":
-exp_cov auto
#elif $expected.coverage == "value":
- -exp_cov $expected.cov_cutoff
+ -exp_cov $expected.exp_cov
#end if
#if $contig_lgth.use_contig_lgth == "yes":
-min_contig_lgth $contig_lgth.min_contig_lgth
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: BjoernGruening: If you have a repeat tag and want to get the filetype from the first element you can't access the first element in a from_param type.
by commits-noreply@bitbucket.org 17 Oct '13
by commits-noreply@bitbucket.org 17 Oct '13
17 Oct '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/0282484e4c32/
Changeset: 0282484e4c32
User: BjoernGruening
Date: 2013-08-14 19:07:31
Summary: If you have a repeat tag and want to get the filetype from the first element you can't access the first element in a from_param type.
That commit creates some artifical parameter called 'first' that you can use as value in param_attribute. For example:
<option type="from_param" name="singlePaired.mate_list" param_attribute="first.input_mate1.ext" />
I use that to retrive the filetype of paired end reads that are inserted in a repeat tag.
Assuming that every mate pair is from the same type as the first element.
Affected #: 1 file
diff -r 5c9cfd1dea8bfb85bcc1ee07035629a77ee3a051 -r 0282484e4c323e1baf79d05813ea8213239a8b4e lib/galaxy/tools/parameters/output.py
--- a/lib/galaxy/tools/parameters/output.py
+++ b/lib/galaxy/tools/parameters/output.py
@@ -188,7 +188,14 @@
assert ref_name in value, "Required dependency '%s' not found in incoming values" % ref_name
value = value.get( ref_name )
for attr_name in self.param_attribute:
- value = getattr( value, attr_name )
+ # if the value is a list from a repeat tag you can access the first element of the repeat with
+ # artifical 'first' attribute_name. For example: .. param_attribute="first.input_mate1.ext"
+ if isinstance(value, list) and attr_name == 'first':
+ value = value[0]
+ elif isinstance(value, dict):
+ value = value[ attr_name ]
+ else:
+ value = getattr( value, attr_name )
options = [ [ str( value ) ] ]
for filter in self.filters:
options = filter.filter_options( options, other_values )
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