galaxy-commits
Threads by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 15302 discussions
commit/galaxy-central: carlfeberhard: history panel: handle errors better on the client side, remove alerts, continue update attempts if error is 'Bad Gateway'
by commits-noreply@bitbucket.org 09 Apr '13
by commits-noreply@bitbucket.org 09 Apr '13
09 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/cf2313ae788d/
Changeset: cf2313ae788d
User: carlfeberhard
Date: 2013-04-10 01:17:51
Summary: history panel: handle errors better on the client side, remove alerts, continue update attempts if error is 'Bad Gateway'
Affected #: 15 files
diff -r 005ee724a360d56e6b243852ce70c27c3804ef6b -r cf2313ae788daca198be009c8c16ec4b27b551ed lib/galaxy/webapps/galaxy/api/histories.py
--- a/lib/galaxy/webapps/galaxy/api/histories.py
+++ b/lib/galaxy/webapps/galaxy/api/histories.py
@@ -59,6 +59,7 @@
if trans.user and len( trans.user.galaxy_sessions ) > 0:
# Most recent active history for user sessions, not deleted
history = trans.user.galaxy_sessions[0].histories[-1].history
+ history_id = trans.security.encode_id( history.id )
else:
return None
else:
diff -r 005ee724a360d56e6b243852ce70c27c3804ef6b -r cf2313ae788daca198be009c8c16ec4b27b551ed 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
@@ -43,14 +43,10 @@
else:
history = self.get_history( trans, history_id, check_ownership=True, check_accessible=True )
- # build the return hda data list
+ # if ids, return _FULL_ data (as show) for each id passed
if ids:
- # if ids, return _FULL_ data (as show) for each id passed
- #NOTE: this might not be the best form (passing all info),
- # but we(I?) need an hda collection with full data somewhere
ids = ids.split( ',' )
- for hda in history.datasets:
- #TODO: curr. ordered by history, change to order from ids list
+ for index, hda in enumerate( history.datasets ):
encoded_hda_id = trans.security.encode_id( hda.id )
if encoded_hda_id in ids:
#TODO: share code with show
@@ -63,21 +59,19 @@
except Exception, exc:
# don't fail entire list if hda err's, record and move on
- # (making sure http recvr knows it's err'd)
- trans.response.status = 500
log.error( "Error in history API at listing contents with history %s, hda %s: (%s) %s",
- history_id, encoded_hda_id, type( exc ), str( exc ) )
- rval.append( self._exception_as_hda_dict( trans, encoded_hda_id, exc ) )
+ history_id, encoded_hda_id, type( exc ), str( exc ), exc_info=True )
+ rval.append( self.get_hda_dict_with_error( trans, hda, str( exc ) ) )
+ # if no ids passed, return a _SUMMARY_ of _all_ datasets in the history
else:
- # if no ids passed, return a _SUMMARY_ of _all_ datasets in the history
for hda in history.datasets:
rval.append( self._summary_hda_dict( trans, history_id, hda ) )
except Exception, e:
# for errors that are not specific to one hda (history lookup or summary list)
rval = "Error in history API at listing contents: " + str( e )
- log.error( rval + ": %s, %s" % ( type( e ), str( e ) ) )
+ log.error( rval + ": %s, %s" % ( type( e ), str( e ) ), exc_info=True )
trans.response.status = 500
return rval
@@ -102,21 +96,6 @@
'url' : url_for( 'history_content', history_id=history_id, id=encoded_id, ),
}
- #TODO: move to model or Mixin
- def _exception_as_hda_dict( self, trans, hda_id, exception ):
- """
- Returns a dictionary for an HDA that raised an exception when it's
- dictionary was being built.
- """
- return {
- 'id' : hda_id,
- 'state' : trans.app.model.Dataset.states.ERROR,
- 'visible' : True,
- 'misc_info' : str( exception ),
- 'misc_blurb': 'Failed to retrieve dataset information.',
- 'error' : str( exception )
- }
-
@web.expose_api_anonymous
def show( self, trans, id, history_id, **kwd ):
"""
diff -r 005ee724a360d56e6b243852ce70c27c3804ef6b -r cf2313ae788daca198be009c8c16ec4b27b551ed lib/galaxy/webapps/galaxy/controllers/tag.py
--- a/lib/galaxy/webapps/galaxy/controllers/tag.py
+++ b/lib/galaxy/webapps/galaxy/controllers/tag.py
@@ -1,11 +1,15 @@
"""
-Tags Controller: handles tagging/untagging of entities and provides autocomplete support.
+Tags Controller: handles tagging/untagging of entities
+and provides autocomplete support.
"""
-import logging
-from galaxy.web.base.controller import *
+
from sqlalchemy.sql.expression import func, and_
from sqlalchemy.sql import select
+from galaxy import web
+from galaxy.web.base.controller import BaseUIController, UsesTagsMixin
+
+import logging
log = logging.getLogger( __name__ )
class TagsController ( BaseUIController, UsesTagsMixin ):
@@ -13,7 +17,9 @@
@web.expose
@web.require_login( "edit item tags" )
def get_tagging_elt_async( self, trans, item_id, item_class, elt_context="" ):
- """ Returns HTML for editing an item's tags. """
+ """
+ Returns HTML for editing an item's tags.
+ """
item = self._get_item( trans, item_class, trans.security.decode_id( item_id ) )
if not item:
return trans.show_error_message( "No item of class %s with id %s " % ( item_class, item_id ) )
@@ -26,10 +32,13 @@
input_size="22",
tag_click_fn="default_tag_click_fn",
use_toggle_link=False )
+
@web.expose
@web.require_login( "add tag to an item" )
def add_tag_async( self, trans, item_id=None, item_class=None, new_tag=None, context=None ):
- """ Add tag to an item. """
+ """
+ Add tag to an item.
+ """
# Apply tag.
item = self._get_item( trans, item_class, trans.security.decode_id( item_id ) )
user = trans.user
@@ -38,10 +47,13 @@
# Log.
params = dict( item_id=item.id, item_class=item_class, tag=new_tag )
trans.log_action( user, unicode( "tag" ), context, params )
+
@web.expose
@web.require_login( "remove tag from an item" )
def remove_tag_async( self, trans, item_id=None, item_class=None, tag_name=None, context=None ):
- """ Remove tag from an item. """
+ """
+ Remove tag from an item.
+ """
# Remove tag.
item = self._get_item( trans, item_class, trans.security.decode_id( item_id ) )
user = trans.user
@@ -50,21 +62,27 @@
# Log.
params = dict( item_id=item.id, item_class=item_class, tag=tag_name )
trans.log_action( user, unicode( "untag" ), context, params )
+
# Retag an item. All previous tags are deleted and new tags are applied.
#(a)web.expose
@web.require_login( "Apply a new set of tags to an item; previous tags are deleted." )
def retag_async( self, trans, item_id=None, item_class=None, new_tags=None ):
- """ Apply a new set of tags to an item; previous tags are deleted. """
+ """
+ Apply a new set of tags to an item; previous tags are deleted.
+ """
# Apply tags.
item = self._get_item( trans, item_class, trans.security.decode_id( item_id ) )
user = trans.user
self.get_tag_handler( trans ).delete_item_tags( trans, item )
self.get_tag_handler( trans ).apply_item_tags( trans, user, item, new_tags.encode( 'utf-8' ) )
- trans.sa_session.flush()
+ trans.sa_session.flush()
+
@web.expose
@web.require_login( "get autocomplete data for an item's tags" )
def tag_autocomplete_data( self, trans, q=None, limit=None, timestamp=None, item_id=None, item_class=None ):
- """ Get autocomplete data for an item's tags. """
+ """
+ Get autocomplete data for an item's tags.
+ """
# Get item, do security check, and get autocomplete data.
item = None
if item_id is not None:
@@ -76,6 +94,7 @@
return self._get_tag_autocomplete_names( trans, q, limit, timestamp, user, item, item_class )
else:
return self._get_tag_autocomplete_values( trans, q, limit, timestamp, user, item, item_class )
+
def _get_tag_autocomplete_names( self, trans, q, limit, timestamp, user=None, item=None, item_class=None ):
"""
Returns autocomplete data for tag names ordered from most frequently used to
@@ -115,6 +134,7 @@
tag_names = self._get_usernames_for_tag( trans, trans.user, tag, item_class, item_tag_assoc_class )
ac_data += tag_names[0] + "|" + tag_names[0] + "\n"
return ac_data
+
def _get_tag_autocomplete_values( self, trans, q, limit, timestamp, user=None, item=None, item_class=None ):
"""
Returns autocomplete data for tag values ordered from most frequently used to
@@ -155,6 +175,7 @@
for row in result_set:
ac_data += tag_uname + ":" + row[0] + "|" + row[0] + "\n"
return ac_data
+
def _get_usernames_for_tag( self, trans, user, tag, item_class, item_tag_assoc_class ):
"""
Returns an ordered list of the user names for a tag; list is ordered from
@@ -176,8 +197,11 @@
for row in result_set:
user_tag_names.append( row[0] )
return user_tag_names
+
def _get_item( self, trans, item_class_name, id ):
- """ Get an item based on type and id. """
+ """
+ Get an item based on type and id.
+ """
item_class = self.get_tag_handler( trans ).item_tag_assoc_info[item_class_name].item_class
item = trans.sa_session.query( item_class ).filter( "id=" + str( id ) )[0]
return item
diff -r 005ee724a360d56e6b243852ce70c27c3804ef6b -r cf2313ae788daca198be009c8c16ec4b27b551ed static/scripts/mvc/dataset/hda-edit.js
--- a/static/scripts/mvc/dataset/hda-edit.js
+++ b/static/scripts/mvc/dataset/hda-edit.js
@@ -456,7 +456,8 @@
//BUG: broken with latest
//TODO: this is a drop in from history.mako - should use MV as well
this.log( this + '.loadAndDisplayTags', event );
- var tagArea = this.$el.find( '.tag-area' ),
+ var view = this,
+ tagArea = this.$el.find( '.tag-area' ),
tagElt = tagArea.find( '.tag-elt' );
// Show or hide tag area; if showing tag area and it's empty, fill it.
@@ -466,7 +467,10 @@
$.ajax({
//TODO: the html from this breaks a couple of times
url: this.urls.tags.get,
- error: function() { alert( _l( "Tagging failed" ) ); },
+ error: function( xhr, status, error ){
+ view.log( "Tagging failed", xhr, status, error );
+ view.trigger( 'error', _l( "Tagging failed" ), xhr, status, error );
+ },
success: function(tag_elt_html) {
tagElt.html(tag_elt_html);
tagElt.find(".tooltip").tooltip();
diff -r 005ee724a360d56e6b243852ce70c27c3804ef6b -r cf2313ae788daca198be009c8c16ec4b27b551ed static/scripts/mvc/dataset/hda-model.js
--- a/static/scripts/mvc/dataset/hda-model.js
+++ b/static/scripts/mvc/dataset/hda-model.js
@@ -49,7 +49,6 @@
deleted : false,
purged : false,
visible : true,
- // based on trans.user (is_admin or security_agent.can_access_dataset( <user_roles>, hda.dataset ))
accessible : true
},
@@ -57,7 +56,7 @@
urlRoot: 'api/histories/',
url : function(){
//TODO: get this via url router
- return 'api/histories/' + this.get( 'history_id' ) + '/contents/' + this.get( 'id' );
+ return this.urlRoot + this.get( 'history_id' ) + '/contents/' + this.get( 'id' );
//TODO: this breaks on save()
},
diff -r 005ee724a360d56e6b243852ce70c27c3804ef6b -r cf2313ae788daca198be009c8c16ec4b27b551ed static/scripts/mvc/history/history-model.js
--- a/static/scripts/mvc/history/history-model.js
+++ b/static/scripts/mvc/history/history-model.js
@@ -21,18 +21,12 @@
// values from api (may need more)
defaults : {
- id : '',
- name : '',
- state : '',
+ id : null,
+ name : 'Unnamed History',
+ state : 'new',
diskSize : 0,
- deleted : false,
-
- //tags : [],
- annotation : null,
-
- //TODO: message? how to get over the api?
- message : null
+ deleted : false
},
//TODO: hardcoded
@@ -40,7 +34,7 @@
/** url for fetch */
url : function(){
// api location of history resource
- return 'api/histories/' + this.get( 'id' );
+ return this.urlRoot + this.get( 'id' );
},
/** Set up the hdas collection
@@ -48,30 +42,20 @@
* @param {Object[]} initialHdas array of model data for this History's HDAs
* @see BaseModel#initialize
*/
- initialize : function( initialSettings, initialHdas ){
+ initialize : function( initialSettings, initialHdas, logger ){
+ logger = logger || null;
this.log( this + ".initialize:", initialSettings, initialHdas );
/** HDACollection of the HDAs contained in this history. */
this.hdas = new HDACollection();
// if we've got hdas passed in the constructor, load them and set up updates if needed
- if( initialHdas ){
- if( _.isArray( initialHdas ) ){
- this.hdas.reset( initialHdas );
- this.checkForUpdates();
- //TODO: don't call if force_history_refresh
- if( this.hdas.length > 0 ){
- this.updateDisplayApplications();
- }
-
- // handle errors in initialHdas
- //TODO: errors from the api shouldn't be plain strings...
- //TODO: remove when mappers and hda_dict are unified (or move to alt history)
- } else if( _.isString( initialHdas ) ){
- this.log( 'error in initialHdas: ', initialHdas );
- Galaxy.show_modal( _l( 'Error loading datasets for history' ), initialHdas,
- { 'Ok': function(){ Galaxy.hide_modal(); } } );
- //TODO: retry (via ajax), report
+ if( initialHdas && _.isArray( initialHdas ) ){
+ this.hdas.reset( initialHdas );
+ this.checkForUpdates();
+ //TODO: don't call if force_history_refresh
+ if( this.hdas.length > 0 ){
+ this.updateDisplayApplications();
}
}
@@ -87,52 +71,11 @@
}
}, this );
- // events
- //this.on( 'change', function( currModel, changedList ){
- // this.log( this + ' has changed:', currModel, changedList );
- //});
- //this.bind( 'all', function( event ){
- // //this.log( this + '', arguments );
- //});
- },
-
- /** get data via the api (alternative to sending options, hdas to initialize)
- * @param {String} historyId encoded id
- * @param {Object[]} success
- * @see BaseModel#initialize
- */
- //TODO: this needs work - move to more straightforward deferred
- // events: loaded, loaded:user, loaded:hdas
- loadFromApi : function( historyId, success ){
- var history = this;
-
- // fetch the history AND the user (mainly to see if they're logged in at this point)
- history.attributes.id = historyId;
- //TODO:?? really? fetch user here?
- jQuery.when(
- jQuery.ajax( 'api/users/current' ),
- history.fetch()
-
- ).then( function( userResponse, historyResponse ){
- history.attributes.user = userResponse[0]; //? meh.
-
- history.trigger( 'loaded:user', userResponse[0] );
- history.trigger( 'loaded', historyResponse[0] );
-
- }).then( function(){
- // ...then the hdas (using contents?ids=...)
- jQuery.ajax( history.url() + '/contents?' + jQuery.param({
- ids : history.hdaIdsFromStateIds().join( ',' )
-
- // reset the collection to the hdas returned
- })).success( function( hdas ){
- history.hdas.reset( hdas );
- history.checkForUpdates();
-
- history.trigger( 'loaded:hdas', hdas );
- if( success ){ callback( history ); }
- });
- });
+ if( this.logger ){
+ this.bind( 'all', function( event ){
+ this.log( this + '', arguments );
+ }, this );
+ }
},
// reduce the state_ids map of hda id lists -> a single list of ids
@@ -146,7 +89,7 @@
// get the history's state from it's cummulative ds states, delay + update if needed
// events: ready
- checkForUpdates : function( datasets ){
+ checkForUpdates : function(){
// get overall History state from collection, run updater if History has running/queued hdas
// boiling it down on the client to running/not
if( this.hdas.running().length ){
@@ -194,7 +137,6 @@
}
// set up to keep pulling if this history in run/queue state
- //TODO: magic number here
if( ( history.get( 'state' ) === HistoryDatasetAssociation.STATES.RUNNING )
|| ( history.get( 'state' ) === HistoryDatasetAssociation.STATES.QUEUED ) ){
setTimeout( function(){
@@ -207,11 +149,22 @@
}
}).error( function( xhr, status, error ){
+ //TODO: use ajax.status handlers here
+ // keep rolling on a bad gateway - server restart
+ if( xhr.status === 502 ){
+ 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
- if( !( ( xhr.readyState === 0 ) && ( xhr.status === 0 ) ) ){
- alert( _l( 'Error getting history updates from the server:' ) + '\n' + error );
+ } else if( !( ( xhr.readyState === 0 ) && ( xhr.status === 0 ) ) ){
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 );
}
});
},
@@ -248,9 +201,11 @@
history.updateHdas( errorJson );
} else {
- var msg = _l( 'ERROR updating hdas from api history contents' ) + ': ';
- history.log( msg, hdaIds, xhr, status, error, errorJson );
- alert( msg + hdaIds.join(',') );
+ history.log( 'Error updating hdas from api history contents',
+ 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 );
}
},
diff -r 005ee724a360d56e6b243852ce70c27c3804ef6b -r cf2313ae788daca198be009c8c16ec4b27b551ed static/scripts/mvc/history/history-panel.js
--- a/static/scripts/mvc/history/history-panel.js
+++ b/static/scripts/mvc/history/history-panel.js
@@ -75,7 +75,8 @@
/** event map
*/
events : {
- 'click #history-tag' : 'loadAndDisplayTags'
+ 'click #history-tag' : 'loadAndDisplayTags',
+ 'click #message-container' : 'removeMessage'
},
// ......................................................................... SET UP
@@ -104,10 +105,28 @@
this._setUpWebStorage( attributes.initiallyExpanded, attributes.show_deleted, attributes.show_hidden );
+ this._setUpEventHandlers();
+
+ // set up instance vars
+ /** map of hda model ids to hda views */
+ this.hdaViews = {};
+ /** map web controller urls for history related actions */
+ this.urls = {};
+ },
+
+ _setUpEventHandlers : function(){
+ // ---- model
// don't need to re-render entire model on all changes, just render disk size when it changes
//this.model.bind( 'change', this.render, this );
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.attributes.error = undefined;
+ }, this );
+
+ // ---- hdas
// bind events from the model's hda collection
this.model.hdas.bind( 'add', this.add, this );
this.model.hdas.bind( 'reset', this.addAll, this );
@@ -126,15 +145,16 @@
}
}, this );
- //this.bind( 'all', function(){
- // this.log( arguments );
- //}, this );
+ // ---- self
+ this.bind( 'error', function( msg, xhr, error, status ){
+ this.displayMessage( 'error', msg );
+ });
- // set up instance vars
- /** map of hda model ids to hda views */
- this.hdaViews = {};
- /** map web controller urls for history related actions */
- this.urls = {};
+ if( this.logger ){
+ this.bind( 'all', function( event ){
+ this.log( this + '', arguments );
+ }, this );
+ }
},
/** Set up client side storage. Currently PersistanStorage keyed under 'HistoryPanel.<id>'
@@ -341,6 +361,9 @@
hdaView.bind( 'body-collapsed', function( id ){
historyView.storage.get( 'expandedHdas' ).deleteKey( id );
});
+ hdaView.bind( 'error', function( msg, xhr, status, error ){
+ historyView.displayMessage( 'error', msg );
+ });
},
/** Set up HistoryPanel js/widget behaviours
@@ -431,7 +454,8 @@
//TODO: into sub-MV
loadAndDisplayTags : function( event ){
this.log( this + '.loadAndDisplayTags', event );
- var tagArea = this.$el.find( '#history-tag-area' ),
+ var panel = this,
+ tagArea = this.$el.find( '#history-tag-area' ),
tagElt = tagArea.find( '.tag-elt' );
this.log( '\t tagArea', tagArea, ' tagElt', tagElt );
@@ -443,7 +467,10 @@
$.ajax({
//TODO: the html from this breaks a couple of times
url: view.urls.tag,
- error: function() { alert( _l( "Tagging failed" ) ); },
+ error: function( xhr, error, status ) {
+ panel.log( 'Error loading tag area html', xhr, error, status );
+ panel.trigger( 'error', _l( "Tagging failed" ), xhr, error, status );
+ },
success: function(tag_elt_html) {
//view.log( view + ' tag elt html (ajax)', tag_elt_html );
tagElt.html(tag_elt_html);
@@ -463,6 +490,23 @@
return false;
},
+ /** display a message in the top of the panel
+ * @param {String} type type of message ('done', 'error', 'warning')
+ * @param {String} msg the message to display
+ */
+ displayMessage : function( type, msg ){
+ var $msgContainer = this.$el.find( '#message-container' ),
+ $msg = $( '<div/>' ).addClass( type + 'message' ).text( msg );
+ $msgContainer.html( $msg );
+ },
+
+ /** Remove a message from the panel
+ */
+ removeMessage : function(){
+ var $msgContainer = this.$el.find( '#message-container' );
+ $msgContainer.html( null );
+ },
+
// ......................................................................... MISC
/** Return a string rep of the history
*/
diff -r 005ee724a360d56e6b243852ce70c27c3804ef6b -r cf2313ae788daca198be009c8c16ec4b27b551ed 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)});f.error(function(h,g,i){alert("("+h.status+") "+_l("Unable to purge this dataset")+":\n"+h)})})}},_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 c=this.model.get("dbkey"),a=this.model.get("visualizations"),f=this.urls.visualization,d={},g={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(c){g.dbkey=c}if(!(this.model.hasData())||!(a&&a.length)||!(f)){this.visualizationsButton=null;return null}this.visualizationsButton=new IconButtonView({model:new IconButton({title:_l("Visualize"),href:f,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(){window.parent.location=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_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})))},_render_annotationArea:function(){if(!this.urls.annotation.get){return null}return $(HDAEditView.templates.annotationArea(_.extend(this.model.toJSON(),{urls:this.urls})))},_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(b){this.log(this+".loadAndDisplayTags",b);var c=this.$el.find(".tag-area"),a=c.find(".tag-elt");if(c.is(":hidden")){if(!jQuery.trim(a.html())){$.ajax({url:this.urls.tags.get,error:function(){alert(_l("Tagging failed"))},success:function(d){a.html(d);a.find(".tooltip").tooltip();c.slideDown("fast")}})}else{c.slideDown("fast")}}else{c.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(){alert(_l("Annotations failed"))},success:function(e){if(e===""){e="<em>"+_l("Describe or add notes to dataset")+"</em>"}c.html(e);d.find(".tooltip").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(){var d=$(window.parent.document).find("iframe#galaxy_main"),c=a+"/scatterplot?"+$.param(b);d.attr("src",c);$("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(_l("Could not add this dataset to browser")+".")},success:function(e){var f=window.parent;f.show_modal(_l("View Data in a New or Saved Visualization"),"",{Cancel:function(){f.hide_modal()},"View in saved visualization":function(){f.show_modal(_l("Add Data to Saved Visualization"),e,{Cancel:function(){f.hide_modal()},"Add to visualization":function(){$(f.document).find("input[name=id]:checked").each(function(){var g=$(this).val();c.id=g;f.location=a+"/trackster?"+$.param(c)})}})},"View in new visualization":function(){f.location=a+"/trackster?"+$.param(c)}})}});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)});f.error(function(h,g,i){alert("("+h.status+") "+_l("Unable to purge this dataset")+":\n"+h)})})}},_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 c=this.model.get("dbkey"),a=this.model.get("visualizations"),f=this.urls.visualization,d={},g={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(c){g.dbkey=c}if(!(this.model.hasData())||!(a&&a.length)||!(f)){this.visualizationsButton=null;return null}this.visualizationsButton=new IconButtonView({model:new IconButton({title:_l("Visualize"),href:f,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(){window.parent.location=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_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})))},_render_annotationArea:function(){if(!this.urls.annotation.get){return null}return $(HDAEditView.templates.annotationArea(_.extend(this.model.toJSON(),{urls:this.urls})))},_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(".tooltip").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(){alert(_l("Annotations failed"))},success:function(e){if(e===""){e="<em>"+_l("Describe or add notes to dataset")+"</em>"}c.html(e);d.find(".tooltip").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(){var d=$(window.parent.document).find("iframe#galaxy_main"),c=a+"/scatterplot?"+$.param(b);d.attr("src",c);$("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(_l("Could not add this dataset to browser")+".")},success:function(e){var f=window.parent;f.show_modal(_l("View Data in a New or Saved Visualization"),"",{Cancel:function(){f.hide_modal()},"View in saved visualization":function(){f.show_modal(_l("Add Data to Saved Visualization"),e,{Cancel:function(){f.hide_modal()},"Add to visualization":function(){$(f.document).find("input[name=id]:checked").each(function(){var g=$(this).val();c.id=g;f.location=a+"/trackster?"+$.param(c)})}})},"View in new visualization":function(){f.location=a+"/trackster?"+$.param(c)}})}});return false}};
\ No newline at end of file
diff -r 005ee724a360d56e6b243852ce70c27c3804ef6b -r cf2313ae788daca198be009c8c16ec4b27b551ed static/scripts/packed/mvc/dataset/hda-model.js
--- a/static/scripts/packed/mvc/dataset/hda-model.js
+++ b/static/scripts/packed/mvc/dataset/hda-model.js
@@ -1,1 +1,1 @@
-var HistoryDatasetAssociation=BaseModel.extend(LoggableMixin).extend({defaults:{history_id:null,model_class:"HistoryDatasetAssociation",hid:0,id:null,name:"(unnamed dataset)",state:"new",data_type:null,file_size:0,file_ext:"",meta_files:[],misc_blurb:"",misc_info:"",deleted:false,purged:false,visible:true,accessible:true},urlRoot:"api/histories/",url:function(){return"api/histories/"+this.get("history_id")+"/contents/"+this.get("id")},initialize:function(){this.log(this+".initialize",this.attributes);this.log("\tparent history_id: "+this.get("history_id"));if(!this.get("accessible")){this.set("state",HistoryDatasetAssociation.STATES.NOT_VIEWABLE)}this.on("change:state",function(b,a){this.log(this+" has changed state:",b,a);if(this.inReadyState()){this.trigger("state:ready",b,a,this.previous("state"))}})},isDeletedOrPurged:function(){return(this.get("deleted")||this.get("purged"))},isVisible:function(b,c){var a=true;if((!b)&&(this.get("deleted")||this.get("purged"))){a=false}if((!c)&&(!this.get("visible"))){a=false}return a},inReadyState:function(){var a=this.get("state");return(this.isDeletedOrPurged()||(a===HistoryDatasetAssociation.STATES.OK)||(a===HistoryDatasetAssociation.STATES.EMPTY)||(a===HistoryDatasetAssociation.STATES.FAILED_METADATA)||(a===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(a===HistoryDatasetAssociation.STATES.DISCARDED)||(a===HistoryDatasetAssociation.STATES.ERROR))},hasData:function(){return(this.get("file_size")>0)},toString:function(){var a=this.get("id")||"";if(this.get("name")){a=this.get("hid")+' :"'+this.get("name")+'",'+a}return"HDA("+a+")"}});HistoryDatasetAssociation.STATES={UPLOAD:"upload",QUEUED:"queued",PAUSED:"paused",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",EMPTY:"empty",OK:"ok",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};var HDACollection=Backbone.Collection.extend(LoggableMixin).extend({model:HistoryDatasetAssociation,initialize:function(){},ids:function(){return this.map(function(a){return a.id})},getByHid:function(a){return _.first(this.filter(function(b){return b.get("hid")===a}))},hidToCollectionIndex:function(a){if(!a){return this.models.length}var d=this.models.length-1;for(var b=d;b>=0;b--){var c=this.at(b).get("hid");if(c==a){return b}if(c<a){return b+1}}return null},getVisible:function(a,b){return this.filter(function(c){return c.isVisible(a,b)})},getStateLists:function(){var a={};_.each(_.values(HistoryDatasetAssociation.STATES),function(b){a[b]=[]});this.each(function(b){a[b.get("state")].push(b.get("id"))});return a},running:function(){var a=[];this.each(function(b){if(!b.inReadyState()){a.push(b.get("id"))}});return a},set:function(a){var b=this;if(!a||!_.isArray(a)){return}a.forEach(function(c){var d=b.get(c.id);if(d){d.set(c)}})},update:function(a){this.log(this+"update:",a);if(!(a&&a.length)){return[]}var c=this,b=null;_.each(a,function(f,d){var e=c.get(f);if(e){e.fetch();b.push(e)}});return b},toString:function(){return("HDACollection()")}});
\ No newline at end of file
+var HistoryDatasetAssociation=BaseModel.extend(LoggableMixin).extend({defaults:{history_id:null,model_class:"HistoryDatasetAssociation",hid:0,id:null,name:"(unnamed dataset)",state:"new",data_type:null,file_size:0,file_ext:"",meta_files:[],misc_blurb:"",misc_info:"",deleted:false,purged:false,visible:true,accessible:true},urlRoot:"api/histories/",url:function(){return this.urlRoot+this.get("history_id")+"/contents/"+this.get("id")},initialize:function(){this.log(this+".initialize",this.attributes);this.log("\tparent history_id: "+this.get("history_id"));if(!this.get("accessible")){this.set("state",HistoryDatasetAssociation.STATES.NOT_VIEWABLE)}this.on("change:state",function(b,a){this.log(this+" has changed state:",b,a);if(this.inReadyState()){this.trigger("state:ready",b,a,this.previous("state"))}})},isDeletedOrPurged:function(){return(this.get("deleted")||this.get("purged"))},isVisible:function(b,c){var a=true;if((!b)&&(this.get("deleted")||this.get("purged"))){a=false}if((!c)&&(!this.get("visible"))){a=false}return a},inReadyState:function(){var a=this.get("state");return(this.isDeletedOrPurged()||(a===HistoryDatasetAssociation.STATES.OK)||(a===HistoryDatasetAssociation.STATES.EMPTY)||(a===HistoryDatasetAssociation.STATES.FAILED_METADATA)||(a===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(a===HistoryDatasetAssociation.STATES.DISCARDED)||(a===HistoryDatasetAssociation.STATES.ERROR))},hasData:function(){return(this.get("file_size")>0)},toString:function(){var a=this.get("id")||"";if(this.get("name")){a=this.get("hid")+' :"'+this.get("name")+'",'+a}return"HDA("+a+")"}});HistoryDatasetAssociation.STATES={UPLOAD:"upload",QUEUED:"queued",PAUSED:"paused",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",EMPTY:"empty",OK:"ok",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};var HDACollection=Backbone.Collection.extend(LoggableMixin).extend({model:HistoryDatasetAssociation,initialize:function(){},ids:function(){return this.map(function(a){return a.id})},getByHid:function(a){return _.first(this.filter(function(b){return b.get("hid")===a}))},hidToCollectionIndex:function(a){if(!a){return this.models.length}var d=this.models.length-1;for(var b=d;b>=0;b--){var c=this.at(b).get("hid");if(c==a){return b}if(c<a){return b+1}}return null},getVisible:function(a,b){return this.filter(function(c){return c.isVisible(a,b)})},getStateLists:function(){var a={};_.each(_.values(HistoryDatasetAssociation.STATES),function(b){a[b]=[]});this.each(function(b){a[b.get("state")].push(b.get("id"))});return a},running:function(){var a=[];this.each(function(b){if(!b.inReadyState()){a.push(b.get("id"))}});return a},set:function(a){var b=this;if(!a||!_.isArray(a)){return}a.forEach(function(c){var d=b.get(c.id);if(d){d.set(c)}})},update:function(a){this.log(this+"update:",a);if(!(a&&a.length)){return[]}var c=this,b=null;_.each(a,function(f,d){var e=c.get(f);if(e){e.fetch();b.push(e)}});return b},toString:function(){return("HDACollection()")}});
\ No newline at end of file
diff -r 005ee724a360d56e6b243852ce70c27c3804ef6b -r cf2313ae788daca198be009c8c16ec4b27b551ed 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=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,annotation:null,message:null},urlRoot:"api/histories/",url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b){if(_.isArray(b)){this.hdas.reset(b);this.checkForUpdates();if(this.hdas.length>0){this.updateDisplayApplications()}}else{if(_.isString(b)){this.log("error in initialHdas: ",b);Galaxy.show_modal(_l("Error loading datasets for history"),b,{Ok:function(){Galaxy.hide_modal()}})}}}this.hdas.bind("state:ready",function(d,f,c){if(d.get("force_history_refresh")){var e=this;setTimeout(function(){e.stateUpdater()},History.UPDATE_DELAY)}},this)},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.trigger("loaded:user",e[0]);b.trigger("loaded",d[0])}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.hdaIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();b.trigger("loaded:hdas",d);if(c){callback(b)}})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}else{this.trigger("ready")}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.fetchHdaUpdates(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},History.UPDATE_DELAY)}else{c.trigger("ready")}}).error(function(f,d,e){if(!((f.readyState===0)&&(f.status===0))){alert(_l("Error getting history updates from the server:")+"\n"+e);c.log("stateUpdater error:",e,"responseText:",f.responseText)}})},fetchHdaUpdates:function(b){var a=this;jQuery.ajax({url:this.url()+"/contents?"+jQuery.param({ids:b.join(",")}),error:function(h,c,d){if((h.readyState===0)&&(h.status===0)){return}var f=JSON.parse(h.responseText);if(_.isArray(f)){var e=_.groupBy(f,function(i){if(_.has(i,"error")){return"errored"}return"ok"});a.log("fetched, errored datasets:",e.errored);a.updateHdas(f)}else{var g=_l("ERROR updating hdas from api history contents")+": ";a.log(g,b,h,c,d,f);alert(g+b.join(","))}},success:function(d,c,e){a.log(a+".fetchHdaUpdates, success:",c,e);a.updateHdas(d)}})},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)},updateDisplayApplications:function(a){this.log(this+"updateDisplayApplications:",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(e,d,f){c.hdas.set(e)},error:function(g,d,e){if(!((g.readyState===0)&&(g.status===0))){var f="Error fetching display applications, "+a+":"+(g.responseText||e);Galaxy.show_modal("History panel error",f,{Ok:function(){Galaxy.hide_modal()}});this.log(f)}}})},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=BaseModel.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();if(c&&_.isArray(c)){this.hdas.reset(c);this.checkForUpdates();if(this.hdas.length>0){this.updateDisplayApplications()}}this.hdas.bind("state:ready",function(e,g,d){if(e.get("force_history_refresh")){var f=this;setTimeout(function(){f.stateUpdater()},History.UPDATE_DELAY)}},this);if(this.logger){this.bind("all",function(d){this.log(this+"",arguments)},this)}},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(){if(this.hdas.running().length){this.stateUpdater()}else{this.trigger("ready")}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.fetchHdaUpdates(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},History.UPDATE_DELAY)}else{c.trigger("ready")}}).error(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(b){var a=this;jQuery.ajax({url:this.url()+"/contents?"+jQuery.param({ids:b.join(",")}),error:function(h,c,d){if((h.readyState===0)&&(h.status===0)){return}var f=JSON.parse(h.responseText);if(_.isArray(f)){var e=_.groupBy(f,function(i){if(_.has(i,"error")){return"errored"}return"ok"});a.log("fetched, errored datasets:",e.errored);a.updateHdas(f)}else{a.log("Error updating hdas from api history contents",b,h,c,d,f);var g=_l("An error occurred while getting dataset details from the server.")+" "+_l("Please contact a Galaxy administrator if the problem persists.");a.trigger("error",g,h,c,d)}},success:function(d,c,e){a.log(a+".fetchHdaUpdates, success:",c,e);a.updateHdas(d)}})},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)},updateDisplayApplications:function(a){this.log(this+"updateDisplayApplications:",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(e,d,f){c.hdas.set(e)},error:function(g,d,e){if(!((g.readyState===0)&&(g.status===0))){var f="Error fetching display applications, "+a+":"+(g.responseText||e);Galaxy.show_modal("History panel error",f,{Ok:function(){Galaxy.hide_modal()}});this.log(f)}}})},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 005ee724a360d56e6b243852ce70c27c3804ef6b -r cf2313ae788daca198be009c8c16ec4b27b551ed 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=BaseView.extend(LoggableMixin).extend({el:"body.historyPage",HDAView:HDAEditView,events:{"click #history-tag":"loadAndDisplayTags"},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.model.bind("change:nice_size",this.updateHistoryDiskSize,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("state:ready",function(c,d,b){if((!c.get("visible"))&&(!this.storage.get("show_hidden"))){this.removeHdaView(c.get("id"))}},this);this.hdaViews={};this.urls={}},_setUpWebStorage:function(b,a,c){this.storage=new PersistantStorage("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())},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(".tooltip").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)})},_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(c){this.log(this+".loadAndDisplayTags",c);var d=this.$el.find("#history-tag-area"),b=d.find(".tag-elt");this.log("\t tagArea",d," tagElt",b);if(d.is(":hidden")){if(!jQuery.trim(b.html())){var a=this;$.ajax({url:a.urls.tag,error:function(){alert(_l("Tagging failed"))},success:function(e){b.html(e);b.find(".tooltip").tooltip();d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},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=BaseView.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={}},_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("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 PersistantStorage("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())},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(".tooltip").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(".tooltip").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)},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 005ee724a360d56e6b243852ce70c27c3804ef6b -r cf2313ae788daca198be009c8c16ec4b27b551ed static/scripts/packed/templates/compiled/template-history-historyPanel.js
--- a/static/scripts/packed/templates/compiled/template-history-historyPanel.js
+++ b/static/scripts/packed/templates/compiled/template-history-historyPanel.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(m,B,z,s,I){this.compilerInfo=[2,">= 1.0.0-rc.3"];z=z||m.helpers;I=I||{};var A="",p,l,h,w=this,e="function",c=z.blockHelperMissing,d=this.escapeExpression;function v(N,M){var J="",L,K;J+='\n <div id="history-name" class="tooltip editable-text"\n title="';K={hash:{},inverse:w.noop,fn:w.program(2,u,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='">';if(L=z.name){L=L.call(N,{hash:{},data:M})}else{L=N.name;L=typeof L===e?L.apply(N):L}J+=d(L)+"</div>\n ";return J}function u(K,J){return"Click to rename history"}function t(N,M){var J="",L,K;J+='\n <div id="history-name" class="tooltip"\n title="';K={hash:{},inverse:w.noop,fn:w.program(5,r,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='">';if(L=z.name){L=L.call(N,{hash:{},data:M})}else{L=N.name;L=typeof L===e?L.apply(N):L}J+=d(L)+"</div>\n ";return J}function r(K,J){return"You must be logged in to edit your history name"}function q(N,M){var J="",L,K;J+='\n <a id="history-tag" title="';K={hash:{},inverse:w.noop,fn:w.program(8,o,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';K={hash:{},inverse:w.noop,fn:w.program(10,H,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n ';return J}function o(K,J){return"Edit history tags"}function H(K,J){return"Edit history annotation"}function G(N,M){var J="",L,K;J+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>';K={hash:{},inverse:w.noop,fn:w.program(13,F,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+=':</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>';K={hash:{},inverse:w.noop,fn:w.program(15,E,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+=':</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text"\n title="';K={hash:{},inverse:w.noop,fn:w.program(17,D,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='">\n ';L=z["if"].call(N,N.annotation,{hash:{},inverse:w.program(21,n,M),fn:w.program(19,C,M),data:M});if(L||L===0){J+=L}J+="\n </div>\n </div>\n </div>\n </div>\n ";return J}function F(K,J){return"Tags"}function E(K,J){return"Annotation"}function D(K,J){return"Click to edit annotation"}function C(M,L){var J="",K;J+="\n ";if(K=z.annotation){K=K.call(M,{hash:{},data:L})}else{K=M.annotation;K=typeof K===e?K.apply(M):K}J+=d(K)+"\n ";return J}function n(N,M){var J="",L,K;J+="\n <em>";K={hash:{},inverse:w.noop,fn:w.program(22,k,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+="</em>\n ";return J}function k(K,J){return"Describe or add notes to history"}function j(N,M){var J="",L,K;J+="\n ";K={hash:{},inverse:w.noop,fn:w.program(25,i,M),data:M};if(L=z.warningmessagesmall){L=L.call(N,K)}else{L=N.warningmessagesmall;L=typeof L===e?L.apply(N):L}if(!z.warningmessagesmall){L=c.call(N,L,K)}if(L||L===0){J+=L}J+="\n ";return J}function i(M,L){var K,J;J={hash:{},inverse:w.noop,fn:w.program(26,g,L),data:L};if(K=z.local){K=K.call(M,J)}else{K=M.local;K=typeof K===e?K.apply(M):K}if(!z.local){K=c.call(M,K,J)}if(K||K===0){return K}else{return""}}function g(K,J){return"You are currently viewing a deleted history!"}function f(M,L){var J="",K;J+='\n <div id="message-container">\n <div class="';if(K=z.status){K=K.call(M,{hash:{},data:L})}else{K=M.status;K=typeof K===e?K.apply(M):K}J+=d(K)+'message">';if(K=z.message){K=K.call(M,{hash:{},data:L})}else{K=M.message;K=typeof K===e?K.apply(M):K}J+=d(K)+"</div>\n </div>\n ";return J}function y(K,J){return"You are over your disk quota.\n Tool execution is on hold until your disk usage drops below your allocated quota."}function x(K,J){return"Your history is empty. Click 'Get Data' on the left pane to start"}A+='<div id="history-controls">\n\n <div id="history-title-area" class="historyLinks">\n \n <div id="history-name-container">\n \n ';l=z["if"].call(B,((p=B.user),p==null||p===false?p:p.email),{hash:{},inverse:w.program(4,t,I),fn:w.program(1,v,I),data:I});if(l||l===0){A+=l}A+='\n </div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';if(l=z.nice_size){l=l.call(B,{hash:{},data:I})}else{l=B.nice_size;l=typeof l===e?l.apply(B):l}A+=d(l)+'</div>\n\n <div id="history-secondary-links" style="float: right;">\n ';l=z["if"].call(B,((p=B.user),p==null||p===false?p:p.email),{hash:{},inverse:w.noop,fn:w.program(7,q,I),data:I});if(l||l===0){A+=l}A+='\n </div>\n <div style="clear: both;"></div>\n </div>\n\n \n \n ';l=z["if"].call(B,((p=B.user),p==null||p===false?p:p.email),{hash:{},inverse:w.noop,fn:w.program(12,G,I),data:I});if(l||l===0){A+=l}A+="\n\n ";l=z["if"].call(B,B.deleted,{hash:{},inverse:w.noop,fn:w.program(24,j,I),data:I});if(l||l===0){A+=l}A+="\n\n ";l=z["if"].call(B,B.message,{hash:{},inverse:w.noop,fn:w.program(28,f,I),data:I});if(l||l===0){A+=l}A+='\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n ';h={hash:{},inverse:w.noop,fn:w.program(30,y,I),data:I};if(l=z.local){l=l.call(B,h)}else{l=B.local;l=typeof l===e?l.apply(B):l}if(!z.local){l=c.call(B,l,h)}if(l||l===0){A+=l}A+='\n </div>\n </div>\n</div>\n\n<div id="';if(l=z.id){l=l.call(B,{hash:{},data:I})}else{l=B.id;l=typeof l===e?l.apply(B):l}A+=d(l)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';h={hash:{},inverse:w.noop,fn:w.program(32,x,I),data:I};if(l=z.local){l=l.call(B,h)}else{l=B.local;l=typeof l===e?l.apply(B):l}if(!z.local){l=c.call(B,l,h)}if(l||l===0){A+=l}A+="\n</div>";return A})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(m,B,z,s,I){this.compilerInfo=[2,">= 1.0.0-rc.3"];z=z||m.helpers;I=I||{};var A="",p,l,h,w=this,e="function",c=z.blockHelperMissing,d=this.escapeExpression;function v(N,M){var J="",L,K;J+='\n <div id="history-name" class="tooltip editable-text"\n title="';K={hash:{},inverse:w.noop,fn:w.program(2,u,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='">';if(L=z.name){L=L.call(N,{hash:{},data:M})}else{L=N.name;L=typeof L===e?L.apply(N):L}J+=d(L)+"</div>\n ";return J}function u(K,J){return"Click to rename history"}function t(N,M){var J="",L,K;J+='\n <div id="history-name" class="tooltip"\n title="';K={hash:{},inverse:w.noop,fn:w.program(5,r,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='">';if(L=z.name){L=L.call(N,{hash:{},data:M})}else{L=N.name;L=typeof L===e?L.apply(N):L}J+=d(L)+"</div>\n ";return J}function r(K,J){return"You must be logged in to edit your history name"}function q(N,M){var J="",L,K;J+='\n <a id="history-tag" title="';K={hash:{},inverse:w.noop,fn:w.program(8,o,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';K={hash:{},inverse:w.noop,fn:w.program(10,H,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n ';return J}function o(K,J){return"Edit history tags"}function H(K,J){return"Edit history annotation"}function G(N,M){var J="",L,K;J+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>';K={hash:{},inverse:w.noop,fn:w.program(13,F,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+=':</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>';K={hash:{},inverse:w.noop,fn:w.program(15,E,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+=':</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text"\n title="';K={hash:{},inverse:w.noop,fn:w.program(17,D,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='">\n ';L=z["if"].call(N,N.annotation,{hash:{},inverse:w.program(21,n,M),fn:w.program(19,C,M),data:M});if(L||L===0){J+=L}J+="\n </div>\n </div>\n </div>\n </div>\n ";return J}function F(K,J){return"Tags"}function E(K,J){return"Annotation"}function D(K,J){return"Click to edit annotation"}function C(M,L){var J="",K;J+="\n ";if(K=z.annotation){K=K.call(M,{hash:{},data:L})}else{K=M.annotation;K=typeof K===e?K.apply(M):K}J+=d(K)+"\n ";return J}function n(N,M){var J="",L,K;J+="\n <em>";K={hash:{},inverse:w.noop,fn:w.program(22,k,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+="</em>\n ";return J}function k(K,J){return"Describe or add notes to history"}function j(N,M){var J="",L,K;J+="\n ";K={hash:{},inverse:w.noop,fn:w.program(25,i,M),data:M};if(L=z.warningmessagesmall){L=L.call(N,K)}else{L=N.warningmessagesmall;L=typeof L===e?L.apply(N):L}if(!z.warningmessagesmall){L=c.call(N,L,K)}if(L||L===0){J+=L}J+="\n ";return J}function i(M,L){var K,J;J={hash:{},inverse:w.noop,fn:w.program(26,g,L),data:L};if(K=z.local){K=K.call(M,J)}else{K=M.local;K=typeof K===e?K.apply(M):K}if(!z.local){K=c.call(M,K,J)}if(K||K===0){return K}else{return""}}function g(K,J){return"You are currently viewing a deleted history!"}function f(M,L){var J="",K;J+='\n <div class="';if(K=z.status){K=K.call(M,{hash:{},data:L})}else{K=M.status;K=typeof K===e?K.apply(M):K}J+=d(K)+'message">';if(K=z.message){K=K.call(M,{hash:{},data:L})}else{K=M.message;K=typeof K===e?K.apply(M):K}J+=d(K)+"</div>\n ";return J}function y(K,J){return"You are over your disk quota.\n Tool execution is on hold until your disk usage drops below your allocated quota."}function x(K,J){return"Your history is empty. Click 'Get Data' on the left pane to start"}A+='<div id="history-controls">\n\n <div id="history-title-area" class="historyLinks">\n \n <div id="history-name-container">\n \n ';l=z["if"].call(B,((p=B.user),p==null||p===false?p:p.email),{hash:{},inverse:w.program(4,t,I),fn:w.program(1,v,I),data:I});if(l||l===0){A+=l}A+='\n </div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';if(l=z.nice_size){l=l.call(B,{hash:{},data:I})}else{l=B.nice_size;l=typeof l===e?l.apply(B):l}A+=d(l)+'</div>\n\n <div id="history-secondary-links" style="float: right;">\n ';l=z["if"].call(B,((p=B.user),p==null||p===false?p:p.email),{hash:{},inverse:w.noop,fn:w.program(7,q,I),data:I});if(l||l===0){A+=l}A+='\n </div>\n <div style="clear: both;"></div>\n </div>\n\n \n \n ';l=z["if"].call(B,((p=B.user),p==null||p===false?p:p.email),{hash:{},inverse:w.noop,fn:w.program(12,G,I),data:I});if(l||l===0){A+=l}A+="\n\n ";l=z["if"].call(B,B.deleted,{hash:{},inverse:w.noop,fn:w.program(24,j,I),data:I});if(l||l===0){A+=l}A+='\n\n <div id="message-container">\n ';l=z["if"].call(B,B.message,{hash:{},inverse:w.noop,fn:w.program(28,f,I),data:I});if(l||l===0){A+=l}A+='\n </div>\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n ';h={hash:{},inverse:w.noop,fn:w.program(30,y,I),data:I};if(l=z.local){l=l.call(B,h)}else{l=B.local;l=typeof l===e?l.apply(B):l}if(!z.local){l=c.call(B,l,h)}if(l||l===0){A+=l}A+='\n </div>\n </div>\n</div>\n\n<div id="';if(l=z.id){l=l.call(B,{hash:{},data:I})}else{l=B.id;l=typeof l===e?l.apply(B):l}A+=d(l)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';h={hash:{},inverse:w.noop,fn:w.program(32,x,I),data:I};if(l=z.local){l=l.call(B,h)}else{l=B.local;l=typeof l===e?l.apply(B):l}if(!z.local){l=c.call(B,l,h)}if(l||l===0){A+=l}A+="\n</div>";return A})})();
\ No newline at end of file
diff -r 005ee724a360d56e6b243852ce70c27c3804ef6b -r cf2313ae788daca198be009c8c16ec4b27b551ed static/scripts/templates/compiled/template-history-historyPanel.js
--- a/static/scripts/templates/compiled/template-history-historyPanel.js
+++ b/static/scripts/templates/compiled/template-history-historyPanel.js
@@ -184,7 +184,7 @@
function program28(depth0,data) {
var buffer = "", stack1;
- buffer += "\n <div id=\"message-container\">\n <div class=\"";
+ buffer += "\n <div class=\"";
if (stack1 = helpers.status) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
else { stack1 = depth0.status; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
buffer += escapeExpression(stack1)
@@ -192,7 +192,7 @@
if (stack1 = helpers.message) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
else { stack1 = depth0.message; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
buffer += escapeExpression(stack1)
- + "</div>\n </div>\n ";
+ + "</div>\n ";
return buffer;
}
@@ -228,10 +228,10 @@
buffer += "\n\n ";
stack2 = helpers['if'].call(depth0, depth0.deleted, {hash:{},inverse:self.noop,fn:self.program(24, program24, data),data:data});
if(stack2 || stack2 === 0) { buffer += stack2; }
- buffer += "\n\n ";
+ buffer += "\n\n <div id=\"message-container\">\n ";
stack2 = helpers['if'].call(depth0, depth0.message, {hash:{},inverse:self.noop,fn:self.program(28, program28, data),data:data});
if(stack2 || stack2 === 0) { buffer += stack2; }
- buffer += "\n\n <div id=\"quota-message-container\" style=\"display: none\">\n <div id=\"quota-message\" class=\"errormessage\">\n ";
+ buffer += "\n </div>\n\n <div id=\"quota-message-container\" style=\"display: none\">\n <div id=\"quota-message\" class=\"errormessage\">\n ";
options = {hash:{},inverse:self.noop,fn:self.program(30, program30, data),data:data};
if (stack2 = helpers.local) { stack2 = stack2.call(depth0, options); }
else { stack2 = depth0.local; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
diff -r 005ee724a360d56e6b243852ce70c27c3804ef6b -r cf2313ae788daca198be009c8c16ec4b27b551ed static/scripts/templates/history-templates.html
--- a/static/scripts/templates/history-templates.html
+++ b/static/scripts/templates/history-templates.html
@@ -62,11 +62,11 @@
{{#warningmessagesmall}}{{#local}}You are currently viewing a deleted history!{{/local}}{{/warningmessagesmall}}
{{/if}}
- {{#if message}}
<div id="message-container">
+ {{#if message}}
<div class="{{status}}message">{{message}}</div>
+ {{/if}}
</div>
- {{/if}}
<div id="quota-message-container" style="display: none"><div id="quota-message" class="errormessage">
diff -r 005ee724a360d56e6b243852ce70c27c3804ef6b -r cf2313ae788daca198be009c8c16ec4b27b551ed templates/webapps/galaxy/root/history.mako
--- a/templates/webapps/galaxy/root/history.mako
+++ b/templates/webapps/galaxy/root/history.mako
@@ -221,28 +221,25 @@
)}
<script type="text/javascript">
-function modalAsAlert( title, body, buttons ){
- alert( title + ':\n' + body );
-}
-
function galaxyPageSetUp(){
// moving global functions, objects into Galaxy namespace
top.Galaxy = top.Galaxy || {};
- // bad idea from memleak standpoint?
- top.Galaxy.mainWindow = top.Galaxy.mainWindow || top.frames.galaxy_main;
- top.Galaxy.toolWindow = top.Galaxy.toolWindow || top.frames.galaxy_tools;
- top.Galaxy.historyWindow = top.Galaxy.historyWindow || top.frames.galaxy_history;
+ if( top != window ){
+ top.Galaxy.mainWindow = top.Galaxy.mainWindow || top.frames.galaxy_main;
+ top.Galaxy.toolWindow = top.Galaxy.toolWindow || top.frames.galaxy_tools;
+ top.Galaxy.historyWindow = top.Galaxy.historyWindow || top.frames.galaxy_history;
+
+ top.Galaxy.$masthead = top.Galaxy.$masthead || $( top.document ).find( 'div#masthead' );
+ top.Galaxy.$messagebox = top.Galaxy.$messagebox || $( top.document ).find( 'div#messagebox' );
+ top.Galaxy.$leftPanel = top.Galaxy.$leftPanel || $( top.document ).find( 'div#left' );
+ top.Galaxy.$centerPanel = top.Galaxy.$centerPanel || $( top.document ).find( 'div#center' );
+ top.Galaxy.$rightPanel = top.Galaxy.$rightPanel || $( top.document ).find( 'div#right' );
- top.Galaxy.$masthead = top.Galaxy.$masthead || $( top.document ).find( 'div#masthead' );
- top.Galaxy.$messagebox = top.Galaxy.$messagebox || $( top.document ).find( 'div#messagebox' );
- top.Galaxy.$leftPanel = top.Galaxy.$leftPanel || $( top.document ).find( 'div#left' );
- top.Galaxy.$centerPanel = top.Galaxy.$centerPanel || $( top.document ).find( 'div#center' );
- top.Galaxy.$rightPanel = top.Galaxy.$rightPanel || $( top.document ).find( 'div#right' );
-
- //modals
- top.Galaxy.show_modal = top.show_modal || modalAsAlert;
- top.Galaxy.hide_modal = top.hide_modal || function(){};
+ //modals
+ top.Galaxy.show_modal = top.show_modal;
+ top.Galaxy.hide_modal = top.hide_modal;
+ }
// other base functions
@@ -297,7 +294,7 @@
historyJson.user = userJson;
// create the history panel
- var history = new History( historyJson, hdaJson );
+ var history = new History( historyJson, hdaJson, ( debugging )?( console ):( null ) );
var historyPanel = new HistoryPanel({
model : history,
urlTemplates : galaxy_paths.attributes,
@@ -445,11 +442,10 @@
.warningmessagesmall {
margin: 8px 0 0 0;
}
- #message-container {
- margin: 8px 0 0 0;
+ #message-container div {
}
#message-container [class$="message"] {
- margin: 0px;
+ margin: 8px 0 0 0;
}
/*---- history level */
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: Custom build bug fix to indicate availability of reference data during conversion. Parameter cleanup via Pylint as well.
by commits-noreply@bitbucket.org 09 Apr '13
by commits-noreply@bitbucket.org 09 Apr '13
09 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/005ee724a360/
Changeset: 005ee724a360
User: jgoecks
Date: 2013-04-09 22:48:08
Summary: Custom build bug fix to indicate availability of reference data during conversion. Parameter cleanup via Pylint as well.
Affected #: 1 file
diff -r 67a58714a972729eb27f08975646204e83753042 -r 005ee724a360d56e6b243852ce70c27c3804ef6b lib/galaxy/visualization/genomes.py
--- a/lib/galaxy/visualization/genomes.py
+++ b/lib/galaxy/visualization/genomes.py
@@ -242,12 +242,16 @@
if dbkey in user_keys:
dbkey_attributes = user_keys[ dbkey ]
dbkey_name = dbkey_attributes[ 'name' ]
+
+ # If there's a fasta for genome, convert to 2bit for later use.
if 'fasta' in dbkey_attributes:
build_fasta = trans.sa_session.query( trans.app.model.HistoryDatasetAssociation ).get( dbkey_attributes[ 'fasta' ] )
len_file = build_fasta.get_converted_dataset( trans, 'len' ).file_name
- converted_dataset = build_fasta.get_converted_dataset( trans, 'twobit' )
- if converted_dataset:
- twobit_file = converted_dataset.file_name
+ build_fasta.get_converted_dataset( trans, 'twobit' )
+ # HACK: set twobit_file to True rather than a file name because
+ # get_converted_dataset returns null during conversion even though
+ # there will eventually be a twobit file available for genome.
+ twobit_file = True
# Backwards compatibility: look for len file directly.
elif 'len' in dbkey_attributes:
len_file = trans.sa_session.query( trans.app.model.HistoryDatasetAssociation ).get( user_keys[ dbkey ][ 'len' ] ).file_name
@@ -275,7 +279,7 @@
return rval
- def has_reference_data( self, trans, dbkey, dbkey_owner=None ):
+ def has_reference_data( self, dbkey, dbkey_owner=None ):
"""
Returns true if there is reference data for the specified dbkey. If dbkey is custom,
dbkey_owner is needed to determine if there is reference data.
@@ -308,7 +312,7 @@
else:
dbkey_user = trans.user
- if not self.has_reference_data( trans, dbkey, dbkey_user ):
+ if not self.has_reference_data( dbkey, dbkey_user ):
return None
#
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
09 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/67a58714a972/
Changeset: 67a58714a972
User: carlfeberhard
Date: 2013-04-09 22:42:08
Summary: remove debugging
Affected #: 1 file
diff -r 9a0d3c0735d7a6bccbe214f2c209a97a2df3831c -r 67a58714a972729eb27f08975646204e83753042 lib/galaxy/webapps/galaxy/controllers/root.py
--- a/lib/galaxy/webapps/galaxy/controllers/root.py
+++ b/lib/galaxy/webapps/galaxy/controllers/root.py
@@ -156,8 +156,6 @@
show_deleted=True, show_hidden=True, show_purged=True )
for hda in hdas:
try:
- if hda.id >= 1058:
- raise Exception( 'Bler blah bler' )
hda_dictionaries.append( self.get_hda_dict( trans, hda ) )
except Exception, exc:
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: better error-handling
by commits-noreply@bitbucket.org 09 Apr '13
by commits-noreply@bitbucket.org 09 Apr '13
09 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/9a0d3c0735d7/
Changeset: 9a0d3c0735d7
User: carlfeberhard
Date: 2013-04-09 22:39:43
Summary: history panel: better error-handling
Affected #: 15 files
diff -r 6d1e0123ffef00c0f1de717d31dfc350bf9027ce -r 9a0d3c0735d7a6bccbe214f2c209a97a2df3831c lib/galaxy/web/base/controller.py
--- a/lib/galaxy/web/base/controller.py
+++ b/lib/galaxy/web/base/controller.py
@@ -382,6 +382,15 @@
return trans.security.encode_dict_ids( hda_dict )
+ def get_hda_dict_with_error( self, trans, hda, error_msg='' ):
+ return trans.security.encode_dict_ids({
+ 'id' : hda.id,
+ 'history_id': hda.history.id,
+ 'hid' : hda.hid,
+ 'name' : hda.name,
+ 'error' : error_msg
+ })
+
def get_display_apps( self, trans, hda ):
#TODO: make more straightforward (somehow)
display_apps = []
diff -r 6d1e0123ffef00c0f1de717d31dfc350bf9027ce -r 9a0d3c0735d7a6bccbe214f2c209a97a2df3831c lib/galaxy/webapps/galaxy/controllers/root.py
--- a/lib/galaxy/webapps/galaxy/controllers/root.py
+++ b/lib/galaxy/webapps/galaxy/controllers/root.py
@@ -11,6 +11,7 @@
from galaxy.model.item_attrs import UsesAnnotations
from galaxy import util, web
from galaxy.util.sanitize_html import sanitize_html
+from galaxy.util.json import to_json_string
#from galaxy.model.orm import *
import logging
@@ -106,73 +107,72 @@
yield "</body></html>"
## ---- Root history display ---------------------------------------------
+ def history_as_xml( self, trans, show_deleted=None, show_hidden=None ):
+ if trans.app.config.require_login and not trans.user:
+ return trans.fill_template( '/no_access.mako', message = 'Please log in to access Galaxy histories.' )
+
+ history = trans.get_history( create=True )
+ trans.response.set_content_type('text/xml')
+ return trans.fill_template_mako( "root/history_as_xml.mako",
+ history=history,
+ show_deleted=util.string_as_bool( show_deleted ),
+ show_hidden=util.string_as_bool( show_hidden ) )
+
@web.expose
def history( self, trans, as_xml=False, show_deleted=None, show_hidden=None, hda_id=None, **kwd ):
"""Display the current history, creating a new history if necessary.
NOTE: No longer accepts "id" or "template" options for security reasons.
"""
+ if as_xml:
+ return self.history_as_xml( trans,
+ show_deleted=util.string_as_bool( show_deleted ), show_hidden=util.string_as_bool( show_hidden ) )
+
+ # get all datasets server-side, client-side will get flags and render appropriately
+ show_deleted = util.string_as_bool_or_none( show_deleted )
+ show_purged = show_deleted
+ show_hidden = util.string_as_bool_or_none( show_hidden )
params = util.Params( kwd )
- message = params.get( 'message', None )
+ message = params.get( 'message', '' )
status = params.get( 'status', 'done' )
if trans.app.config.require_login and not trans.user:
return trans.fill_template( '/no_access.mako', message = 'Please log in to access Galaxy histories.' )
- history = trans.get_history( create=True )
+ def err_msg( where=None ):
+ where = where if where else 'getting the history data from the server'
+ err_msg = ( 'An error occurred %s. '
+ + 'Please contact a Galaxy administrator if the problem persists.' ) %( where )
+ return err_msg, 'error'
- if as_xml:
- trans.response.set_content_type('text/xml')
- return trans.fill_template_mako( "root/history_as_xml.mako",
- history=history,
- show_deleted=util.string_as_bool( show_deleted ),
- show_hidden=util.string_as_bool( show_hidden ) )
+ history_dictionary = {}
+ hda_dictionaries = []
+ try:
+ history = trans.get_history( create=True )
+ history_dictionary = self.get_history_dict( trans, history )
- show_deleted = util.string_as_bool_or_none( show_deleted )
- show_purged = show_deleted
- show_hidden = util.string_as_bool_or_none( show_hidden )
+ #TODO: would be good to re-use the hdas above to get the history data...
+ hdas = self.get_history_datasets( trans, history,
+ show_deleted=True, show_hidden=True, show_purged=True )
+ for hda in hdas:
+ try:
+ if hda.id >= 1058:
+ raise Exception( 'Bler blah bler' )
+ hda_dictionaries.append( self.get_hda_dict( trans, hda ) )
- # get all datasets server-side, client-side will get flags and render appropriately
- hdas = self.get_history_datasets( trans, history,
- show_deleted=True, show_hidden=True, show_purged=True )
+ except Exception, exc:
+ # don't fail entire list if hda err's, record and move on
+ log.error( 'Error bootstrapping hda %d: %s', hda.id, str( exc ), exc_info=True )
+ hda_dictionaries.append( self.get_hda_dict_with_error( trans, hda, str( exc ) ) )
- #TODO: would be good to re-use the hdas above to get the history data...
- history_dictionary = self.get_history_dict( trans, history )
-
- #TODO: blech - all here for now - duplication of hist. contents, index
- hda_dictionaries = []
- for hda in hdas:
- try:
- hda_dictionaries.append( self.get_hda_dict( trans, hda ) )
-
- except Exception, exc:
- # don't fail entire list if hda err's, record and move on
- # (making sure http recvr knows it's err'd)
- encoded_hda_id = trans.security.encode_id( hda.id )
- log.error( "Error in history API at listing contents with history %s, hda %s: (%s) %s",
- history_dictionary[ 'id' ], encoded_hda_id, type( exc ), str( exc ) )
- return_val = {
- 'id' : encoded_hda_id,
- 'name' : hda.name,
- 'hid' : hda.hid,
- 'history_id': history_dictionary[ 'id' ],
- 'state' : trans.model.Dataset.states.ERROR,
- 'visible' : True,
- 'misc_info' : str( exc ),
- 'misc_blurb': 'Failed to retrieve dataset information.',
- 'error' : str( exc )
- }
- hda_dictionaries.append( return_val )
+ except Exception, exc:
+ log.error( 'Error bootstrapping history for user %d: %s', trans.user.id, str( exc ), exc_info=True )
+ message, status = err_msg()
+ history_dictionary[ 'error' ] = message
return trans.stream_template_mako( "root/history.mako",
- history_dictionary = history_dictionary,
- hda_dictionaries = hda_dictionaries,
- show_deleted = show_deleted,
- show_hidden = show_hidden,
- hda_id = hda_id,
- log = log,
- message = message,
- status = status )
+ history_json = to_json_string( history_dictionary ), hda_json = to_json_string( hda_dictionaries ),
+ show_deleted=show_deleted, show_hidden=show_hidden, hda_id=hda_id, log=log, message=message, status=status )
## ---- Dataset display / editing ----------------------------------------
@web.expose
diff -r 6d1e0123ffef00c0f1de717d31dfc350bf9027ce -r 9a0d3c0735d7a6bccbe214f2c209a97a2df3831c static/scripts/galaxy.panels.js
--- a/static/scripts/galaxy.panels.js
+++ b/static/scripts/galaxy.panels.js
@@ -201,7 +201,7 @@
var modal;
$(function(){
- modal = new Modal( { overlay: $("#overlay"), dialog: $("#dialog-box"), backdrop: $("#overlay-background") } );
+ modal = new Modal( { overlay: $("#overlay"), dialog: $("#dialog-box"), backdrop: $("#overlay-background") } );
});
// Backward compatibility
diff -r 6d1e0123ffef00c0f1de717d31dfc350bf9027ce -r 9a0d3c0735d7a6bccbe214f2c209a97a2df3831c static/scripts/mvc/dataset/hda-model.js
--- a/static/scripts/mvc/dataset/hda-model.js
+++ b/static/scripts/mvc/dataset/hda-model.js
@@ -26,15 +26,14 @@
history_id : null,
// often used with tagging
model_class : 'HistoryDatasetAssociation',
- // index within history (??)
hid : 0,
// ---whereas these are Dataset related/inherited
- id : null,
+ id : null,
name : '(unnamed dataset)',
// one of HistoryDatasetAssociation.STATES
- state : 'ok',
+ state : 'new',
// sniffed datatype (sam, tabular, bed, etc.)
data_type : null,
// size in bytes
@@ -44,13 +43,12 @@
// array of associated file types (eg. [ 'bam_index', ... ])
meta_files : [],
- misc_blurb : '',
+ misc_blurb : '',
misc_info : '',
- deleted : false,
+ deleted : false,
purged : false,
- // aka. !hidden (start hidden)
- visible : false,
+ visible : true,
// based on trans.user (is_admin or security_agent.can_access_dataset( <user_roles>, hda.dataset ))
accessible : true
},
diff -r 6d1e0123ffef00c0f1de717d31dfc350bf9027ce -r 9a0d3c0735d7a6bccbe214f2c209a97a2df3831c static/scripts/mvc/history/history-model.js
--- a/static/scripts/mvc/history/history-model.js
+++ b/static/scripts/mvc/history/history-model.js
@@ -67,8 +67,11 @@
// handle errors in initialHdas
//TODO: errors from the api shouldn't be plain strings...
//TODO: remove when mappers and hda_dict are unified (or move to alt history)
- } else if( _.isString( initialHdas ) && ( initialHdas.match( /error/i ) ) ){
- alert( _l( 'Error loading bootstrapped history' ) + ':\n' + initialHdas );
+ } else if( _.isString( initialHdas ) ){
+ this.log( 'error in initialHdas: ', initialHdas );
+ Galaxy.show_modal( _l( 'Error loading datasets for history' ), initialHdas,
+ { 'Ok': function(){ Galaxy.hide_modal(); } } );
+ //TODO: retry (via ajax), report
}
}
diff -r 6d1e0123ffef00c0f1de717d31dfc350bf9027ce -r 9a0d3c0735d7a6bccbe214f2c209a97a2df3831c static/scripts/packed/mvc/data.js
--- a/static/scripts/packed/mvc/data.js
+++ b/static/scripts/packed/mvc/data.js
@@ -1,1 +1,1 @@
-define(["libs/backbone/backbone-relational"],function(){var c=Backbone.RelationalModel.extend({});var d=Backbone.RelationalModel.extend({defaults:{id:"",type:"",name:"",hda_ldda:"hda",metadata:null},initialize:function(){var h=new c();_.each(_.keys(this.attributes),function(i){if(i.indexOf("metadata_")===0){var j=i.split("metadata_")[1];h.set(j,this.attributes[i]);delete this.attributes[i]}},this);this.set("metadata",h)},get_metadata:function(h){return this.attributes.metadata.get(h)},urlRoot:galaxy_paths.get("datasets_url")});var b=d.extend({defaults:_.extend({},d.prototype.defaults,{chunk_url:null,first_data_chunk:null,chunk_index:-1,at_eof:false}),initialize:function(h){d.prototype.initialize.call(this);this.attributes.chunk_index=(this.attributes.first_data_chunk?1:0)},get_next_chunk:function(){if(this.attributes.at_eof){return null}var h=this,i=$.Deferred();$.getJSON(this.attributes.chunk_url,{chunk:h.attributes.chunk_index++}).success(function(j){var k;if(j.ck_data!==""){k=j}else{h.attributes.at_eof=true;k=null}i.resolve(k)});return i}});var f=Backbone.Collection.extend({model:d});var e=Backbone.View.extend({initialize:function(h){},render:function(){this.$el.append($("<div/>").attr("id","loading_indicator"));var l=$("<table/>").attr({id:"content_table",cellpadding:0});this.$el.append(l);var h=this.model.get_metadata("column_names");if(h){l.append("<tr><th>"+h.join("</th><th>")+"</th></tr>")}var j=this.model.get("first_data_chunk");if(j){this._renderChunk(j)}var i=this,m=_.find(this.$el.parents(),function(n){return $(n).css("overflow")==="auto"}),k=false;if(!m){m=window}m=$(m);m.scroll(function(){if(!k&&(i.$el.height()-m.scrollTop()-m.height()<=0)){k=true;$.when(i.model.get_next_chunk()).then(function(n){if(n){i._renderChunk(n);k=false}})}});$("#loading_indicator").ajaxStart(function(){$(this).show()}).ajaxStop(function(){$(this).hide()})},_renderCell:function(j,h,k){var i=this.model.get_metadata("column_types");if(k!==undefined){return $("<td>").attr("colspan",k).addClass("stringalign").text(j)}else{if(i[h]==="str"||i==="list"){return $("<td>").addClass("stringalign").text(j)}else{return $("<td>").text(j)}}},_renderRow:function(h){var i=h.split("\t"),k=$("<tr>"),j=this.model.get_metadata("columns");if(i.length===j){_.each(i,function(m,l){k.append(this._renderCell(m,l))},this)}else{if(i.length>j){_.each(i.slice(0,j-1),function(m,l){k.append(this._renderCell(m,l))},this);k.append(this._renderCell(i.slice(j-1).join("\t"),j-1))}else{if(j>5&&i.length===j-1){_.each(i,function(m,l){k.append(this._renderCell(m,l))},this);k.append($("<td>"))}else{k.append(this._renderCell(h,0,j))}}}return k},_renderChunk:function(h){var i=this.$el.find("table");_.each(h.ck_data.split("\n"),function(j,k){i.append(this._renderRow(j))},this)}});var a=function(k,i,l,h){var j=new i({model:new k(l)});j.render();if(h){h.append(j.$el)}return j};var g=function(j,h){var i=$("<div/>").appendTo(h);return new e({el:i,model:new b(j)}).render()};return{Dataset:d,TabularDataset:b,DatasetCollection:f,TabularDatasetChunkedView:e,createTabularDatasetChunkedView:g}});
\ No newline at end of file
+define(["libs/backbone/backbone-relational"],function(){var d=Backbone.RelationalModel.extend({});var e=Backbone.RelationalModel.extend({defaults:{id:"",type:"",name:"",hda_ldda:"hda",metadata:null},initialize:function(){var i=new d();_.each(_.keys(this.attributes),function(j){if(j.indexOf("metadata_")===0){var l=j.split("metadata_")[1];i.set(l,this.attributes[j]);delete this.attributes[j]}},this);this.set("metadata",i)},get_metadata:function(i){return this.attributes.metadata.get(i)},urlRoot:galaxy_paths.get("datasets_url")});var c=e.extend({defaults:_.extend({},e.prototype.defaults,{chunk_url:null,first_data_chunk:null,chunk_index:-1,at_eof:false}),initialize:function(i){e.prototype.initialize.call(this);this.attributes.chunk_index=(this.attributes.first_data_chunk?1:0)},get_next_chunk:function(){if(this.attributes.at_eof){return null}var i=this,j=$.Deferred();$.getJSON(this.attributes.chunk_url,{chunk:i.attributes.chunk_index++}).success(function(k){var l;if(k.ck_data!==""){l=k}else{i.attributes.at_eof=true;l=null}j.resolve(l)});return j}});var g=Backbone.Collection.extend({model:e});var f=Backbone.View.extend({initialize:function(i){},render:function(){var m=$("<table/>").attr({id:"content_table",cellpadding:0});this.$el.append(m);var i=this.model.get_metadata("column_names");if(i){m.append("<tr><th>"+i.join("</th><th>")+"</th></tr>")}var k=this.model.get("first_data_chunk");if(k){this._renderChunk(k)}var j=this,n=_.find(this.$el.parents(),function(o){return $(o).css("overflow")==="auto"}),l=false;if(!n){n=window}n=$(n);n.scroll(function(){if(!l&&(j.$el.height()-n.scrollTop()-n.height()<=0)){l=true;$.when(j.model.get_next_chunk()).then(function(o){if(o){j._renderChunk(o);l=false}})}});$("#loading_indicator").ajaxStart(function(){$(this).show()}).ajaxStop(function(){$(this).hide()})},_renderCell:function(k,i,l){var j=this.model.get_metadata("column_types");if(l!==undefined){return $("<td>").attr("colspan",l).addClass("stringalign").text(k)}else{if(j[i]==="str"||j==="list"){return $("<td>").addClass("stringalign").text(k)}else{return $("<td>").text(k)}}},_renderRow:function(i){var j=i.split("\t"),l=$("<tr>"),k=this.model.get_metadata("columns");if(j.length===k){_.each(j,function(n,m){l.append(this._renderCell(n,m))},this)}else{if(j.length>k){_.each(j.slice(0,k-1),function(n,m){l.append(this._renderCell(n,m))},this);l.append(this._renderCell(j.slice(k-1).join("\t"),k-1))}else{if(k>5&&j.length===k-1){_.each(j,function(n,m){l.append(this._renderCell(n,m))},this);l.append($("<td>"))}else{l.append(this._renderCell(i,0,k))}}}return l},_renderChunk:function(i){var j=this.$el.find("table");_.each(i.ck_data.split("\n"),function(k,l){j.append(this._renderRow(k))},this)}});var b=f.extend({col:{chrom:null,start:null,end:null,},url_viz:null,dataset_id:null,genome_build:null,get_type:function(i){return({}).toString.call(i).match(/\s([a-zA-Z]+)/)[1].toLowerCase()},initialize:function(i){var j=i.model.attributes.metadata.attributes;if(typeof j.chromCol==="undefined"||typeof j.startCol==="undefined"||typeof j.endCol==="undefined"){console.log("TabularDatasetChunkedViewWithButton : Metadata for column identification is missing.")}else{this.col.chrom=j.chromCol-1;this.col.start=j.startCol-1;this.col.end=j.endCol-1}if(this.col.chrom==null){return}if(typeof i.model.attributes.id==="undefined"){console.log("TabularDatasetChunkedViewWithButton : Dataset identification is missing.")}else{this.dataset_id=i.model.attributes.id}if(typeof i.model.attributes.url_viz==="undefined"){console.log("TabularDatasetChunkedViewWithButton : Url for visualization controller is missing.")}else{this.url_viz=i.model.attributes.url_viz}if(typeof i.model.attributes.genome_build!=="undefined"){this.genome_build=i.model.attributes.genome_build}},events:{"mouseover tr":"btn_viz_show",mouseleave:"btn_viz_hide"},btn_viz_show:function(l){if(this.col.chrom==null){return}var n=$(l.target).parent();var i={dataset_id:this.dataset_id,gene_region:n.children().eq(this.col.chrom).html()+":"+n.children().eq(this.col.start).html()+"-"+n.children().eq(this.col.end).html()};if(n.children().eq(this.col.chrom).html()!=""){var m=n.offset();var k=m.left-10;var j=m.top;$("#btn_viz").css({position:"fixed",top:j+"px",left:k+"px"});$("#btn_viz").off("click");$("#btn_viz").click(this.create_trackster_action(this.url_viz,i,this.genome_build));$("#btn_viz").show()}},btn_viz_hide:function(i){$("#btn_viz").hide()},create_trackster_action_new:function(i,k,j){return function(){window.parent.location.href=i+"/trackster?"+$.param(k)}},create_trackster_action:function(i,k,j){return function(){var l={};if(j){l["f-dbkey"]=j}$.ajax({url:i+"/list_tracks?"+$.param(l),dataType:"html",error:function(){alert(("Could not add this dataset to browser")+".")},success:function(m){var n=window.parent;n.show_modal(("View Data in a New or Saved Visualization"),"",{Cancel:function(){n.hide_modal()},"View in saved visualization":function(){n.show_modal(("Add Data to Saved Visualization"),m,{Cancel:function(){n.hide_modal()},"Add to visualization":function(){$(n.document).find("input[name=id]:checked").each(function(){var o=$(this).val();k.id=o;n.location=i+"/trackster?"+$.param(k)})}})},"View in new visualization":function(){n.location=i+"/trackster?"+$.param(k)}})}});return false}},render:function(){var i=new IconButtonView({model:new IconButton({title:"Visualize",icon_class:"chart_curve",id:"btn_viz"})});this.$el.append(i.render().$el);$("#btn_viz").hide();f.prototype.render.call(this)}});var a=function(l,j,m,i){var k=new j({model:new l(m)});k.render();if(i){i.append(k.$el)}return k};var h=function(k,i){var j=$("<div/>").appendTo(i);return new b({el:j,model:new c(k)}).render()};return{Dataset:e,TabularDataset:c,DatasetCollection:g,TabularDatasetChunkedView:f,createTabularDatasetChunkedView:h}});
\ No newline at end of file
diff -r 6d1e0123ffef00c0f1de717d31dfc350bf9027ce -r 9a0d3c0735d7a6bccbe214f2c209a97a2df3831c static/scripts/packed/mvc/dataset/hda-model.js
--- a/static/scripts/packed/mvc/dataset/hda-model.js
+++ b/static/scripts/packed/mvc/dataset/hda-model.js
@@ -1,1 +1,1 @@
-var HistoryDatasetAssociation=BaseModel.extend(LoggableMixin).extend({defaults:{history_id:null,model_class:"HistoryDatasetAssociation",hid:0,id:null,name:"(unnamed dataset)",state:"ok",data_type:null,file_size:0,file_ext:"",meta_files:[],misc_blurb:"",misc_info:"",deleted:false,purged:false,visible:false,accessible:true},urlRoot:"api/histories/",url:function(){return"api/histories/"+this.get("history_id")+"/contents/"+this.get("id")},initialize:function(){this.log(this+".initialize",this.attributes);this.log("\tparent history_id: "+this.get("history_id"));if(!this.get("accessible")){this.set("state",HistoryDatasetAssociation.STATES.NOT_VIEWABLE)}this.on("change:state",function(b,a){this.log(this+" has changed state:",b,a);if(this.inReadyState()){this.trigger("state:ready",b,a,this.previous("state"))}})},isDeletedOrPurged:function(){return(this.get("deleted")||this.get("purged"))},isVisible:function(b,c){var a=true;if((!b)&&(this.get("deleted")||this.get("purged"))){a=false}if((!c)&&(!this.get("visible"))){a=false}return a},inReadyState:function(){var a=this.get("state");return(this.isDeletedOrPurged()||(a===HistoryDatasetAssociation.STATES.OK)||(a===HistoryDatasetAssociation.STATES.EMPTY)||(a===HistoryDatasetAssociation.STATES.FAILED_METADATA)||(a===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(a===HistoryDatasetAssociation.STATES.DISCARDED)||(a===HistoryDatasetAssociation.STATES.ERROR))},hasData:function(){return(this.get("file_size")>0)},toString:function(){var a=this.get("id")||"";if(this.get("name")){a=this.get("hid")+' :"'+this.get("name")+'",'+a}return"HDA("+a+")"}});HistoryDatasetAssociation.STATES={UPLOAD:"upload",QUEUED:"queued",PAUSED:"paused",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",EMPTY:"empty",OK:"ok",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};var HDACollection=Backbone.Collection.extend(LoggableMixin).extend({model:HistoryDatasetAssociation,initialize:function(){},ids:function(){return this.map(function(a){return a.id})},getByHid:function(a){return _.first(this.filter(function(b){return b.get("hid")===a}))},hidToCollectionIndex:function(a){if(!a){return this.models.length}var d=this.models.length-1;for(var b=d;b>=0;b--){var c=this.at(b).get("hid");if(c==a){return b}if(c<a){return b+1}}return null},getVisible:function(a,b){return this.filter(function(c){return c.isVisible(a,b)})},getStateLists:function(){var a={};_.each(_.values(HistoryDatasetAssociation.STATES),function(b){a[b]=[]});this.each(function(b){a[b.get("state")].push(b.get("id"))});return a},running:function(){var a=[];this.each(function(b){if(!b.inReadyState()){a.push(b.get("id"))}});return a},set:function(a){var b=this;if(!a||!_.isArray(a)){return}a.forEach(function(c){var d=b.get(c.id);if(d){d.set(c)}})},update:function(a){this.log(this+"update:",a);if(!(a&&a.length)){return[]}var c=this,b=null;_.each(a,function(f,d){var e=c.get(f);if(e){e.fetch();b.push(e)}});return b},toString:function(){return("HDACollection()")}});
\ No newline at end of file
+var HistoryDatasetAssociation=BaseModel.extend(LoggableMixin).extend({defaults:{history_id:null,model_class:"HistoryDatasetAssociation",hid:0,id:null,name:"(unnamed dataset)",state:"new",data_type:null,file_size:0,file_ext:"",meta_files:[],misc_blurb:"",misc_info:"",deleted:false,purged:false,visible:true,accessible:true},urlRoot:"api/histories/",url:function(){return"api/histories/"+this.get("history_id")+"/contents/"+this.get("id")},initialize:function(){this.log(this+".initialize",this.attributes);this.log("\tparent history_id: "+this.get("history_id"));if(!this.get("accessible")){this.set("state",HistoryDatasetAssociation.STATES.NOT_VIEWABLE)}this.on("change:state",function(b,a){this.log(this+" has changed state:",b,a);if(this.inReadyState()){this.trigger("state:ready",b,a,this.previous("state"))}})},isDeletedOrPurged:function(){return(this.get("deleted")||this.get("purged"))},isVisible:function(b,c){var a=true;if((!b)&&(this.get("deleted")||this.get("purged"))){a=false}if((!c)&&(!this.get("visible"))){a=false}return a},inReadyState:function(){var a=this.get("state");return(this.isDeletedOrPurged()||(a===HistoryDatasetAssociation.STATES.OK)||(a===HistoryDatasetAssociation.STATES.EMPTY)||(a===HistoryDatasetAssociation.STATES.FAILED_METADATA)||(a===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(a===HistoryDatasetAssociation.STATES.DISCARDED)||(a===HistoryDatasetAssociation.STATES.ERROR))},hasData:function(){return(this.get("file_size")>0)},toString:function(){var a=this.get("id")||"";if(this.get("name")){a=this.get("hid")+' :"'+this.get("name")+'",'+a}return"HDA("+a+")"}});HistoryDatasetAssociation.STATES={UPLOAD:"upload",QUEUED:"queued",PAUSED:"paused",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",EMPTY:"empty",OK:"ok",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};var HDACollection=Backbone.Collection.extend(LoggableMixin).extend({model:HistoryDatasetAssociation,initialize:function(){},ids:function(){return this.map(function(a){return a.id})},getByHid:function(a){return _.first(this.filter(function(b){return b.get("hid")===a}))},hidToCollectionIndex:function(a){if(!a){return this.models.length}var d=this.models.length-1;for(var b=d;b>=0;b--){var c=this.at(b).get("hid");if(c==a){return b}if(c<a){return b+1}}return null},getVisible:function(a,b){return this.filter(function(c){return c.isVisible(a,b)})},getStateLists:function(){var a={};_.each(_.values(HistoryDatasetAssociation.STATES),function(b){a[b]=[]});this.each(function(b){a[b.get("state")].push(b.get("id"))});return a},running:function(){var a=[];this.each(function(b){if(!b.inReadyState()){a.push(b.get("id"))}});return a},set:function(a){var b=this;if(!a||!_.isArray(a)){return}a.forEach(function(c){var d=b.get(c.id);if(d){d.set(c)}})},update:function(a){this.log(this+"update:",a);if(!(a&&a.length)){return[]}var c=this,b=null;_.each(a,function(f,d){var e=c.get(f);if(e){e.fetch();b.push(e)}});return b},toString:function(){return("HDACollection()")}});
\ No newline at end of file
diff -r 6d1e0123ffef00c0f1de717d31dfc350bf9027ce -r 9a0d3c0735d7a6bccbe214f2c209a97a2df3831c 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=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,annotation:null,message:null},urlRoot:"api/histories/",url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b){if(_.isArray(b)){this.hdas.reset(b);this.checkForUpdates();if(this.hdas.length>0){this.updateDisplayApplications()}}else{if(_.isString(b)&&(b.match(/error/i))){alert(_l("Error loading bootstrapped history")+":\n"+b)}}}this.hdas.bind("state:ready",function(d,f,c){if(d.get("force_history_refresh")){var e=this;setTimeout(function(){e.stateUpdater()},History.UPDATE_DELAY)}},this)},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.trigger("loaded:user",e[0]);b.trigger("loaded",d[0])}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.hdaIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();b.trigger("loaded:hdas",d);if(c){callback(b)}})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}else{this.trigger("ready")}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.fetchHdaUpdates(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},History.UPDATE_DELAY)}else{c.trigger("ready")}}).error(function(f,d,e){if(!((f.readyState===0)&&(f.status===0))){alert(_l("Error getting history updates from the server:")+"\n"+e);c.log("stateUpdater error:",e,"responseText:",f.responseText)}})},fetchHdaUpdates:function(b){var a=this;jQuery.ajax({url:this.url()+"/contents?"+jQuery.param({ids:b.join(",")}),error:function(h,c,d){if((h.readyState===0)&&(h.status===0)){return}var f=JSON.parse(h.responseText);if(_.isArray(f)){var e=_.groupBy(f,function(i){if(_.has(i,"error")){return"errored"}return"ok"});a.log("fetched, errored datasets:",e.errored);a.updateHdas(f)}else{var g=_l("ERROR updating hdas from api history contents")+": ";a.log(g,b,h,c,d,f);alert(g+b.join(","))}},success:function(d,c,e){a.log(a+".fetchHdaUpdates, success:",c,e);a.updateHdas(d)}})},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)},updateDisplayApplications:function(a){this.log(this+"updateDisplayApplications:",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(e,d,f){c.hdas.set(e)},error:function(g,d,e){if(!((g.readyState===0)&&(g.status===0))){var f="Error fetching display applications, "+a+":"+(g.responseText||e);Galaxy.show_modal("History panel error",f,{Ok:function(){Galaxy.hide_modal()}});this.log(f)}}})},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=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,annotation:null,message:null},urlRoot:"api/histories/",url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b){if(_.isArray(b)){this.hdas.reset(b);this.checkForUpdates();if(this.hdas.length>0){this.updateDisplayApplications()}}else{if(_.isString(b)){this.log("error in initialHdas: ",b);Galaxy.show_modal(_l("Error loading datasets for history"),b,{Ok:function(){Galaxy.hide_modal()}})}}}this.hdas.bind("state:ready",function(d,f,c){if(d.get("force_history_refresh")){var e=this;setTimeout(function(){e.stateUpdater()},History.UPDATE_DELAY)}},this)},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.trigger("loaded:user",e[0]);b.trigger("loaded",d[0])}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.hdaIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();b.trigger("loaded:hdas",d);if(c){callback(b)}})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}else{this.trigger("ready")}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.fetchHdaUpdates(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},History.UPDATE_DELAY)}else{c.trigger("ready")}}).error(function(f,d,e){if(!((f.readyState===0)&&(f.status===0))){alert(_l("Error getting history updates from the server:")+"\n"+e);c.log("stateUpdater error:",e,"responseText:",f.responseText)}})},fetchHdaUpdates:function(b){var a=this;jQuery.ajax({url:this.url()+"/contents?"+jQuery.param({ids:b.join(",")}),error:function(h,c,d){if((h.readyState===0)&&(h.status===0)){return}var f=JSON.parse(h.responseText);if(_.isArray(f)){var e=_.groupBy(f,function(i){if(_.has(i,"error")){return"errored"}return"ok"});a.log("fetched, errored datasets:",e.errored);a.updateHdas(f)}else{var g=_l("ERROR updating hdas from api history contents")+": ";a.log(g,b,h,c,d,f);alert(g+b.join(","))}},success:function(d,c,e){a.log(a+".fetchHdaUpdates, success:",c,e);a.updateHdas(d)}})},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)},updateDisplayApplications:function(a){this.log(this+"updateDisplayApplications:",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(e,d,f){c.hdas.set(e)},error:function(g,d,e){if(!((g.readyState===0)&&(g.status===0))){var f="Error fetching display applications, "+a+":"+(g.responseText||e);Galaxy.show_modal("History panel error",f,{Ok:function(){Galaxy.hide_modal()}});this.log(f)}}})},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 6d1e0123ffef00c0f1de717d31dfc350bf9027ce -r 9a0d3c0735d7a6bccbe214f2c209a97a2df3831c static/scripts/packed/templates/compiled/template-hda-warning-messages.js
--- a/static/scripts/packed/templates/compiled/template-hda-warning-messages.js
+++ b/static/scripts/packed/templates/compiled/template-hda-warning-messages.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-warning-messages"]=b(function(g,s,q,k,z){this.compilerInfo=[2,">= 1.0.0-rc.3"];q=q||g.helpers;z=z||{};var r="",h,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var A;A=q.unless.call(C,C.purged,{hash:{},inverse:p.noop,fn:p.program(2,n,B),data:B});if(A||A===0){return A}else{return""}}function n(E,D){var A="",C,B;A+="\n";B={hash:{},inverse:p.noop,fn:p.program(3,m,D),data:D};if(C=q.warningmessagesmall){C=C.call(E,B)}else{C=E.warningmessagesmall;C=typeof C===e?C.apply(E):C}if(!q.warningmessagesmall){C=c.call(E,C,B)}if(C||C===0){A+=C}A+="\n";return A}function m(F,E){var A="",D,C,B;A+="\n ";B={hash:{},inverse:p.noop,fn:p.program(4,l,E),data:E};if(D=q.local){D=D.call(F,B)}else{D=F.local;D=typeof D===e?D.apply(F):D}if(!q.local){D=c.call(F,D,B)}if(D||D===0){A+=D}A+="\n ";C=q["if"].call(F,((D=F.urls),D==null||D===false?D:D.undelete),{hash:{},inverse:p.noop,fn:p.program(6,j,E),data:E});if(C||C===0){A+=C}A+="\n";return A}function l(B,A){return"This dataset has been deleted."}function j(E,D){var A="",C,B;A+='\n \n Click <a href="'+d(((C=((C=E.urls),C==null||C===false?C:C.undelete)),typeof C===e?C.apply(E):C))+'" class="historyItemUndelete" id="historyItemUndeleter-';if(B=q.id){B=B.call(E,{hash:{},data:D})}else{B=E.id;B=typeof B===e?B.apply(E):B}A+=d(B)+'"\n target="galaxy_history">here</a> to undelete it\n ';B=q["if"].call(E,((C=E.urls),C==null||C===false?C:C.purge),{hash:{},inverse:p.noop,fn:p.program(7,i,D),data:D});if(B||B===0){A+=B}A+="\n ";return A}function i(E,D){var A="",C,B;A+='\n or <a href="'+d(((C=((C=E.urls),C==null||C===false?C:C.purge)),typeof C===e?C.apply(E):C))+'" class="historyItemPurge" id="historyItemPurger-';if(B=q.id){B=B.call(E,{hash:{},data:D})}else{B=E.id;B=typeof B===e?B.apply(E):B}A+=d(B)+'"\n target="galaxy_history">here</a> to immediately remove it from disk\n ';return A}function f(D,C){var B,A;A={hash:{},inverse:p.noop,fn:p.program(10,y,C),data:C};if(B=q.warningmessagesmall){B=B.call(D,A)}else{B=D.warningmessagesmall;B=typeof B===e?B.apply(D):B}if(!q.warningmessagesmall){B=c.call(D,B,A)}if(B||B===0){return B}else{return""}}function y(E,D){var A="",C,B;A+="\n ";B={hash:{},inverse:p.noop,fn:p.program(11,x,D),data:D};if(C=q.local){C=C.call(E,B)}else{C=E.local;C=typeof C===e?C.apply(E):C}if(!q.local){C=c.call(E,C,B)}if(C||C===0){A+=C}A+="\n";return A}function x(B,A){return"This dataset has been deleted and removed from disk."}function w(D,C){var B,A;A={hash:{},inverse:p.noop,fn:p.program(14,v,C),data:C};if(B=q.warningmessagesmall){B=B.call(D,A)}else{B=D.warningmessagesmall;B=typeof B===e?B.apply(D):B}if(!q.warningmessagesmall){B=c.call(D,B,A)}if(B||B===0){return B}else{return""}}function v(F,E){var A="",D,C,B;A+="\n ";B={hash:{},inverse:p.noop,fn:p.program(15,u,E),data:E};if(D=q.local){D=D.call(F,B)}else{D=F.local;D=typeof D===e?D.apply(F):D}if(!q.local){D=c.call(F,D,B)}if(D||D===0){A+=D}A+="\n ";C=q["if"].call(F,((D=F.urls),D==null||D===false?D:D.unhide),{hash:{},inverse:p.noop,fn:p.program(17,t,E),data:E});if(C||C===0){A+=C}A+="\n";return A}function u(B,A){return"This dataset has been hidden."}function t(E,D){var A="",C,B;A+='\n Click <a href="'+d(((C=((C=E.urls),C==null||C===false?C:C.unhide)),typeof C===e?C.apply(E):C))+'" class="historyItemUnhide" id="historyItemUnhider-';if(B=q.id){B=B.call(E,{hash:{},data:D})}else{B=E.id;B=typeof B===e?B.apply(E):B}A+=d(B)+'"\n target="galaxy_history">here</a> to unhide it\n ';return A}h=q["if"].call(s,s.deleted,{hash:{},inverse:p.noop,fn:p.program(1,o,z),data:z});if(h||h===0){r+=h}r+="\n\n";h=q["if"].call(s,s.purged,{hash:{},inverse:p.noop,fn:p.program(9,f,z),data:z});if(h||h===0){r+=h}r+="\n\n";h=q.unless.call(s,s.visible,{hash:{},inverse:p.noop,fn:p.program(13,w,z),data:z});if(h||h===0){r+=h}return r})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-warning-messages"]=b(function(h,u,s,n,C){this.compilerInfo=[2,">= 1.0.0-rc.3"];s=s||h.helpers;C=C||{};var t="",j,e="function",d=this.escapeExpression,r=this,c=s.blockHelperMissing;function q(H,G){var D="",F,E;D+='\n<div class="errormessagesmall">\n ';E={hash:{},inverse:r.noop,fn:r.program(2,p,G),data:G};if(F=s.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!s.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+=":\n ";E={hash:{},inverse:r.noop,fn:r.program(4,o,G),data:G};if(F=s.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!s.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+="\n</div>\n";return D}function p(E,D){return"There was an error getting the data for this dataset"}function o(F,E){var D;if(D=s.error){D=D.call(F,{hash:{},data:E})}else{D=F.error;D=typeof D===e?D.apply(F):D}return d(D)}function m(F,E){var D;D=s.unless.call(F,F.purged,{hash:{},inverse:r.noop,fn:r.program(7,l,E),data:E});if(D||D===0){return D}else{return""}}function l(H,G){var D="",F,E;D+="\n";E={hash:{},inverse:r.noop,fn:r.program(8,i,G),data:G};if(F=s.warningmessagesmall){F=F.call(H,E)}else{F=H.warningmessagesmall;F=typeof F===e?F.apply(H):F}if(!s.warningmessagesmall){F=c.call(H,F,E)}if(F||F===0){D+=F}D+="\n";return D}function i(I,H){var D="",G,F,E;D+="\n ";E={hash:{},inverse:r.noop,fn:r.program(9,g,H),data:H};if(G=s.local){G=G.call(I,E)}else{G=I.local;G=typeof G===e?G.apply(I):G}if(!s.local){G=c.call(I,G,E)}if(G||G===0){D+=G}D+="\n ";F=s["if"].call(I,((G=I.urls),G==null||G===false?G:G.undelete),{hash:{},inverse:r.noop,fn:r.program(11,B,H),data:H});if(F||F===0){D+=F}D+="\n";return D}function g(E,D){return"This dataset has been deleted."}function B(H,G){var D="",F,E;D+='\n \n Click <a href="'+d(((F=((F=H.urls),F==null||F===false?F:F.undelete)),typeof F===e?F.apply(H):F))+'" class="historyItemUndelete" id="historyItemUndeleter-';if(E=s.id){E=E.call(H,{hash:{},data:G})}else{E=H.id;E=typeof E===e?E.apply(H):E}D+=d(E)+'"\n target="galaxy_history">here</a> to undelete it\n ';E=s["if"].call(H,((F=H.urls),F==null||F===false?F:F.purge),{hash:{},inverse:r.noop,fn:r.program(12,A,G),data:G});if(E||E===0){D+=E}D+="\n ";return D}function A(H,G){var D="",F,E;D+='\n or <a href="'+d(((F=((F=H.urls),F==null||F===false?F:F.purge)),typeof F===e?F.apply(H):F))+'" class="historyItemPurge" id="historyItemPurger-';if(E=s.id){E=E.call(H,{hash:{},data:G})}else{E=H.id;E=typeof E===e?E.apply(H):E}D+=d(E)+'"\n target="galaxy_history">here</a> to immediately remove it from disk\n ';return D}function z(G,F){var E,D;D={hash:{},inverse:r.noop,fn:r.program(15,y,F),data:F};if(E=s.warningmessagesmall){E=E.call(G,D)}else{E=G.warningmessagesmall;E=typeof E===e?E.apply(G):E}if(!s.warningmessagesmall){E=c.call(G,E,D)}if(E||E===0){return E}else{return""}}function y(H,G){var D="",F,E;D+="\n ";E={hash:{},inverse:r.noop,fn:r.program(16,x,G),data:G};if(F=s.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!s.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+="\n";return D}function x(E,D){return"This dataset has been deleted and removed from disk."}function w(G,F){var E,D;D={hash:{},inverse:r.noop,fn:r.program(19,v,F),data:F};if(E=s.warningmessagesmall){E=E.call(G,D)}else{E=G.warningmessagesmall;E=typeof E===e?E.apply(G):E}if(!s.warningmessagesmall){E=c.call(G,E,D)}if(E||E===0){return E}else{return""}}function v(I,H){var D="",G,F,E;D+="\n ";E={hash:{},inverse:r.noop,fn:r.program(20,k,H),data:H};if(G=s.local){G=G.call(I,E)}else{G=I.local;G=typeof G===e?G.apply(I):G}if(!s.local){G=c.call(I,G,E)}if(G||G===0){D+=G}D+="\n ";F=s["if"].call(I,((G=I.urls),G==null||G===false?G:G.unhide),{hash:{},inverse:r.noop,fn:r.program(22,f,H),data:H});if(F||F===0){D+=F}D+="\n";return D}function k(E,D){return"This dataset has been hidden."}function f(H,G){var D="",F,E;D+='\n Click <a href="'+d(((F=((F=H.urls),F==null||F===false?F:F.unhide)),typeof F===e?F.apply(H):F))+'" class="historyItemUnhide" id="historyItemUnhider-';if(E=s.id){E=E.call(H,{hash:{},data:G})}else{E=H.id;E=typeof E===e?E.apply(H):E}D+=d(E)+'"\n target="galaxy_history">here</a> to unhide it\n ';return D}j=s["if"].call(u,u.error,{hash:{},inverse:r.noop,fn:r.program(1,q,C),data:C});if(j||j===0){t+=j}t+="\n\n";j=s["if"].call(u,u.deleted,{hash:{},inverse:r.noop,fn:r.program(6,m,C),data:C});if(j||j===0){t+=j}t+="\n\n";j=s["if"].call(u,u.purged,{hash:{},inverse:r.noop,fn:r.program(14,z,C),data:C});if(j||j===0){t+=j}t+="\n\n";j=s.unless.call(u,u.visible,{hash:{},inverse:r.noop,fn:r.program(18,w,C),data:C});if(j||j===0){t+=j}return t})})();
\ No newline at end of file
diff -r 6d1e0123ffef00c0f1de717d31dfc350bf9027ce -r 9a0d3c0735d7a6bccbe214f2c209a97a2df3831c static/scripts/packed/templates/compiled/template-history-historyPanel.js
--- a/static/scripts/packed/templates/compiled/template-history-historyPanel.js
+++ b/static/scripts/packed/templates/compiled/template-history-historyPanel.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(l,A,y,r,I){this.compilerInfo=[2,">= 1.0.0-rc.3"];y=y||l.helpers;I=I||{};var z="",o,k,h,v=this,e="function",c=y.blockHelperMissing,d=this.escapeExpression;function u(N,M){var J="",L,K;J+='\n <div id="history-name" class="tooltip editable-text"\n title="';K={hash:{},inverse:v.noop,fn:v.program(2,t,M),data:M};if(L=y.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!y.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='">';if(L=y.name){L=L.call(N,{hash:{},data:M})}else{L=N.name;L=typeof L===e?L.apply(N):L}J+=d(L)+"</div>\n ";return J}function t(K,J){return"Click to rename history"}function s(N,M){var J="",L,K;J+='\n <div id="history-name" class="tooltip"\n title="';K={hash:{},inverse:v.noop,fn:v.program(5,q,M),data:M};if(L=y.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!y.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='">';if(L=y.name){L=L.call(N,{hash:{},data:M})}else{L=N.name;L=typeof L===e?L.apply(N):L}J+=d(L)+"</div>\n ";return J}function q(K,J){return"You must be logged in to edit your history name"}function p(N,M){var J="",L,K;J+='\n <a id="history-tag" title="';K={hash:{},inverse:v.noop,fn:v.program(8,n,M),data:M};if(L=y.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!y.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';K={hash:{},inverse:v.noop,fn:v.program(10,H,M),data:M};if(L=y.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!y.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n ';return J}function n(K,J){return"Edit history tags"}function H(K,J){return"Edit history annotation"}function G(N,M){var J="",L,K;J+="\n ";K={hash:{},inverse:v.noop,fn:v.program(13,F,M),data:M};if(L=y.warningmessagesmall){L=L.call(N,K)}else{L=N.warningmessagesmall;L=typeof L===e?L.apply(N):L}if(!y.warningmessagesmall){L=c.call(N,L,K)}if(L||L===0){J+=L}J+="\n ";return J}function F(M,L){var K,J;J={hash:{},inverse:v.noop,fn:v.program(14,E,L),data:L};if(K=y.local){K=K.call(M,J)}else{K=M.local;K=typeof K===e?K.apply(M):K}if(!y.local){K=c.call(M,K,J)}if(K||K===0){return K}else{return""}}function E(K,J){return"You are currently viewing a deleted history!"}function D(N,M){var J="",L,K;J+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>';K={hash:{},inverse:v.noop,fn:v.program(17,C,M),data:M};if(L=y.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!y.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+=':</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>';K={hash:{},inverse:v.noop,fn:v.program(19,B,M),data:M};if(L=y.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!y.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+=':</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text"\n title="';K={hash:{},inverse:v.noop,fn:v.program(21,m,M),data:M};if(L=y.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!y.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='">\n ';L=y["if"].call(N,N.annotation,{hash:{},inverse:v.program(25,i,M),fn:v.program(23,j,M),data:M});if(L||L===0){J+=L}J+="\n </div>\n </div>\n </div>\n </div>\n ";return J}function C(K,J){return"Tags"}function B(K,J){return"Annotation"}function m(K,J){return"Click to edit annotation"}function j(M,L){var J="",K;J+="\n ";if(K=y.annotation){K=K.call(M,{hash:{},data:L})}else{K=M.annotation;K=typeof K===e?K.apply(M):K}J+=d(K)+"\n ";return J}function i(N,M){var J="",L,K;J+="\n <em>";K={hash:{},inverse:v.noop,fn:v.program(26,g,M),data:M};if(L=y.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!y.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+="</em>\n ";return J}function g(K,J){return"Describe or add notes to history"}function f(M,L){var J="",K;J+='\n <div id="message-container">\n <div class="';if(K=y.status){K=K.call(M,{hash:{},data:L})}else{K=M.status;K=typeof K===e?K.apply(M):K}J+=d(K)+'message">\n ';if(K=y.message){K=K.call(M,{hash:{},data:L})}else{K=M.message;K=typeof K===e?K.apply(M):K}J+=d(K)+"\n </div><br />\n </div>\n ";return J}function x(K,J){return"You are over your disk quota.\n Tool execution is on hold until your disk usage drops below your allocated quota."}function w(K,J){return"Your history is empty. Click 'Get Data' on the left pane to start"}z+='<div id="history-controls">\n <div id="history-title-area" class="historyLinks">\n\n \n <div id="history-name-container">\n \n ';k=y["if"].call(A,((o=A.user),o==null||o===false?o:o.email),{hash:{},inverse:v.program(4,s,I),fn:v.program(1,u,I),data:I});if(k||k===0){z+=k}z+='\n </div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';if(k=y.nice_size){k=k.call(A,{hash:{},data:I})}else{k=A.nice_size;k=typeof k===e?k.apply(A):k}z+=d(k)+'</div>\n\n <div id="history-secondary-links" style="float: right;">\n ';k=y["if"].call(A,((o=A.user),o==null||o===false?o:o.email),{hash:{},inverse:v.noop,fn:v.program(7,p,I),data:I});if(k||k===0){z+=k}z+='\n </div>\n <div style="clear: both;"></div>\n </div>\n\n ';k=y["if"].call(A,A.deleted,{hash:{},inverse:v.noop,fn:v.program(12,G,I),data:I});if(k||k===0){z+=k}z+="\n\n \n \n ";k=y["if"].call(A,((o=A.user),o==null||o===false?o:o.email),{hash:{},inverse:v.noop,fn:v.program(16,D,I),data:I});if(k||k===0){z+=k}z+="\n\n ";k=y["if"].call(A,A.message,{hash:{},inverse:v.noop,fn:v.program(28,f,I),data:I});if(k||k===0){z+=k}z+='\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n ';h={hash:{},inverse:v.noop,fn:v.program(30,x,I),data:I};if(k=y.local){k=k.call(A,h)}else{k=A.local;k=typeof k===e?k.apply(A):k}if(!y.local){k=c.call(A,k,h)}if(k||k===0){z+=k}z+='\n </div>\n </div>\n</div>\n\n<div id="';if(k=y.id){k=k.call(A,{hash:{},data:I})}else{k=A.id;k=typeof k===e?k.apply(A):k}z+=d(k)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';h={hash:{},inverse:v.noop,fn:v.program(32,w,I),data:I};if(k=y.local){k=k.call(A,h)}else{k=A.local;k=typeof k===e?k.apply(A):k}if(!y.local){k=c.call(A,k,h)}if(k||k===0){z+=k}z+="\n</div>";return z})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(m,B,z,s,I){this.compilerInfo=[2,">= 1.0.0-rc.3"];z=z||m.helpers;I=I||{};var A="",p,l,h,w=this,e="function",c=z.blockHelperMissing,d=this.escapeExpression;function v(N,M){var J="",L,K;J+='\n <div id="history-name" class="tooltip editable-text"\n title="';K={hash:{},inverse:w.noop,fn:w.program(2,u,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='">';if(L=z.name){L=L.call(N,{hash:{},data:M})}else{L=N.name;L=typeof L===e?L.apply(N):L}J+=d(L)+"</div>\n ";return J}function u(K,J){return"Click to rename history"}function t(N,M){var J="",L,K;J+='\n <div id="history-name" class="tooltip"\n title="';K={hash:{},inverse:w.noop,fn:w.program(5,r,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='">';if(L=z.name){L=L.call(N,{hash:{},data:M})}else{L=N.name;L=typeof L===e?L.apply(N):L}J+=d(L)+"</div>\n ";return J}function r(K,J){return"You must be logged in to edit your history name"}function q(N,M){var J="",L,K;J+='\n <a id="history-tag" title="';K={hash:{},inverse:w.noop,fn:w.program(8,o,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';K={hash:{},inverse:w.noop,fn:w.program(10,H,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n ';return J}function o(K,J){return"Edit history tags"}function H(K,J){return"Edit history annotation"}function G(N,M){var J="",L,K;J+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>';K={hash:{},inverse:w.noop,fn:w.program(13,F,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+=':</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>';K={hash:{},inverse:w.noop,fn:w.program(15,E,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+=':</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text"\n title="';K={hash:{},inverse:w.noop,fn:w.program(17,D,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='">\n ';L=z["if"].call(N,N.annotation,{hash:{},inverse:w.program(21,n,M),fn:w.program(19,C,M),data:M});if(L||L===0){J+=L}J+="\n </div>\n </div>\n </div>\n </div>\n ";return J}function F(K,J){return"Tags"}function E(K,J){return"Annotation"}function D(K,J){return"Click to edit annotation"}function C(M,L){var J="",K;J+="\n ";if(K=z.annotation){K=K.call(M,{hash:{},data:L})}else{K=M.annotation;K=typeof K===e?K.apply(M):K}J+=d(K)+"\n ";return J}function n(N,M){var J="",L,K;J+="\n <em>";K={hash:{},inverse:w.noop,fn:w.program(22,k,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+="</em>\n ";return J}function k(K,J){return"Describe or add notes to history"}function j(N,M){var J="",L,K;J+="\n ";K={hash:{},inverse:w.noop,fn:w.program(25,i,M),data:M};if(L=z.warningmessagesmall){L=L.call(N,K)}else{L=N.warningmessagesmall;L=typeof L===e?L.apply(N):L}if(!z.warningmessagesmall){L=c.call(N,L,K)}if(L||L===0){J+=L}J+="\n ";return J}function i(M,L){var K,J;J={hash:{},inverse:w.noop,fn:w.program(26,g,L),data:L};if(K=z.local){K=K.call(M,J)}else{K=M.local;K=typeof K===e?K.apply(M):K}if(!z.local){K=c.call(M,K,J)}if(K||K===0){return K}else{return""}}function g(K,J){return"You are currently viewing a deleted history!"}function f(M,L){var J="",K;J+='\n <div id="message-container">\n <div class="';if(K=z.status){K=K.call(M,{hash:{},data:L})}else{K=M.status;K=typeof K===e?K.apply(M):K}J+=d(K)+'message">';if(K=z.message){K=K.call(M,{hash:{},data:L})}else{K=M.message;K=typeof K===e?K.apply(M):K}J+=d(K)+"</div>\n </div>\n ";return J}function y(K,J){return"You are over your disk quota.\n Tool execution is on hold until your disk usage drops below your allocated quota."}function x(K,J){return"Your history is empty. Click 'Get Data' on the left pane to start"}A+='<div id="history-controls">\n\n <div id="history-title-area" class="historyLinks">\n \n <div id="history-name-container">\n \n ';l=z["if"].call(B,((p=B.user),p==null||p===false?p:p.email),{hash:{},inverse:w.program(4,t,I),fn:w.program(1,v,I),data:I});if(l||l===0){A+=l}A+='\n </div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';if(l=z.nice_size){l=l.call(B,{hash:{},data:I})}else{l=B.nice_size;l=typeof l===e?l.apply(B):l}A+=d(l)+'</div>\n\n <div id="history-secondary-links" style="float: right;">\n ';l=z["if"].call(B,((p=B.user),p==null||p===false?p:p.email),{hash:{},inverse:w.noop,fn:w.program(7,q,I),data:I});if(l||l===0){A+=l}A+='\n </div>\n <div style="clear: both;"></div>\n </div>\n\n \n \n ';l=z["if"].call(B,((p=B.user),p==null||p===false?p:p.email),{hash:{},inverse:w.noop,fn:w.program(12,G,I),data:I});if(l||l===0){A+=l}A+="\n\n ";l=z["if"].call(B,B.deleted,{hash:{},inverse:w.noop,fn:w.program(24,j,I),data:I});if(l||l===0){A+=l}A+="\n\n ";l=z["if"].call(B,B.message,{hash:{},inverse:w.noop,fn:w.program(28,f,I),data:I});if(l||l===0){A+=l}A+='\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n ';h={hash:{},inverse:w.noop,fn:w.program(30,y,I),data:I};if(l=z.local){l=l.call(B,h)}else{l=B.local;l=typeof l===e?l.apply(B):l}if(!z.local){l=c.call(B,l,h)}if(l||l===0){A+=l}A+='\n </div>\n </div>\n</div>\n\n<div id="';if(l=z.id){l=l.call(B,{hash:{},data:I})}else{l=B.id;l=typeof l===e?l.apply(B):l}A+=d(l)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';h={hash:{},inverse:w.noop,fn:w.program(32,x,I),data:I};if(l=z.local){l=l.call(B,h)}else{l=B.local;l=typeof l===e?l.apply(B):l}if(!z.local){l=c.call(B,l,h)}if(l||l===0){A+=l}A+="\n</div>";return A})})();
\ No newline at end of file
diff -r 6d1e0123ffef00c0f1de717d31dfc350bf9027ce -r 9a0d3c0735d7a6bccbe214f2c209a97a2df3831c static/scripts/templates/compiled/template-hda-warning-messages.js
--- a/static/scripts/templates/compiled/template-hda-warning-messages.js
+++ b/static/scripts/templates/compiled/template-hda-warning-messages.js
@@ -7,16 +7,48 @@
function program1(depth0,data) {
+ var buffer = "", stack1, options;
+ buffer += "\n<div class=\"errormessagesmall\">\n ";
+ options = {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data};
+ if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += ":\n ";
+ options = {hash:{},inverse:self.noop,fn:self.program(4, program4, data),data:data};
+ if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n</div>\n";
+ return buffer;
+ }
+function program2(depth0,data) {
+
+
+ return "There was an error getting the data for this dataset";
+ }
+
+function program4(depth0,data) {
+
var stack1;
- stack1 = helpers.unless.call(depth0, depth0.purged, {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data});
+ if (stack1 = helpers.error) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.error; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ return escapeExpression(stack1);
+ }
+
+function program6(depth0,data) {
+
+ var stack1;
+ stack1 = helpers.unless.call(depth0, depth0.purged, {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data});
if(stack1 || stack1 === 0) { return stack1; }
else { return ''; }
}
-function program2(depth0,data) {
+function program7(depth0,data) {
var buffer = "", stack1, options;
buffer += "\n";
- options = {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data};
+ options = {hash:{},inverse:self.noop,fn:self.program(8, program8, data),data:data};
if (stack1 = helpers.warningmessagesmall) { stack1 = stack1.call(depth0, options); }
else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
@@ -24,28 +56,28 @@
buffer += "\n";
return buffer;
}
-function program3(depth0,data) {
+function program8(depth0,data) {
var buffer = "", stack1, stack2, options;
buffer += "\n ";
- options = {hash:{},inverse:self.noop,fn:self.program(4, program4, data),data:data};
+ options = {hash:{},inverse:self.noop,fn:self.program(9, program9, data),data:data};
if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n ";
- stack2 = helpers['if'].call(depth0, ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.undelete), {hash:{},inverse:self.noop,fn:self.program(6, program6, data),data:data});
+ stack2 = helpers['if'].call(depth0, ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.undelete), {hash:{},inverse:self.noop,fn:self.program(11, program11, data),data:data});
if(stack2 || stack2 === 0) { buffer += stack2; }
buffer += "\n";
return buffer;
}
-function program4(depth0,data) {
+function program9(depth0,data) {
return "This dataset has been deleted.";
}
-function program6(depth0,data) {
+function program11(depth0,data) {
var buffer = "", stack1, stack2;
buffer += "\n "
@@ -56,12 +88,12 @@
else { stack2 = depth0.id; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
buffer += escapeExpression(stack2)
+ "\"\n target=\"galaxy_history\">here</a> to undelete it\n ";
- stack2 = helpers['if'].call(depth0, ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.purge), {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data});
+ stack2 = helpers['if'].call(depth0, ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.purge), {hash:{},inverse:self.noop,fn:self.program(12, program12, data),data:data});
if(stack2 || stack2 === 0) { buffer += stack2; }
buffer += "\n ";
return buffer;
}
-function program7(depth0,data) {
+function program12(depth0,data) {
var buffer = "", stack1, stack2;
buffer += "\n or <a href=\""
@@ -74,21 +106,21 @@
return buffer;
}
-function program9(depth0,data) {
+function program14(depth0,data) {
var stack1, options;
- options = {hash:{},inverse:self.noop,fn:self.program(10, program10, data),data:data};
+ options = {hash:{},inverse:self.noop,fn:self.program(15, program15, data),data:data};
if (stack1 = helpers.warningmessagesmall) { stack1 = stack1.call(depth0, options); }
else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { return stack1; }
else { return ''; }
}
-function program10(depth0,data) {
+function program15(depth0,data) {
var buffer = "", stack1, options;
buffer += "\n ";
- options = {hash:{},inverse:self.noop,fn:self.program(11, program11, data),data:data};
+ options = {hash:{},inverse:self.noop,fn:self.program(16, program16, data),data:data};
if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
@@ -96,44 +128,44 @@
buffer += "\n";
return buffer;
}
-function program11(depth0,data) {
+function program16(depth0,data) {
return "This dataset has been deleted and removed from disk.";
}
-function program13(depth0,data) {
+function program18(depth0,data) {
var stack1, options;
- options = {hash:{},inverse:self.noop,fn:self.program(14, program14, data),data:data};
+ options = {hash:{},inverse:self.noop,fn:self.program(19, program19, data),data:data};
if (stack1 = helpers.warningmessagesmall) { stack1 = stack1.call(depth0, options); }
else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { return stack1; }
else { return ''; }
}
-function program14(depth0,data) {
+function program19(depth0,data) {
var buffer = "", stack1, stack2, options;
buffer += "\n ";
- options = {hash:{},inverse:self.noop,fn:self.program(15, program15, data),data:data};
+ options = {hash:{},inverse:self.noop,fn:self.program(20, program20, data),data:data};
if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n ";
- stack2 = helpers['if'].call(depth0, ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.unhide), {hash:{},inverse:self.noop,fn:self.program(17, program17, data),data:data});
+ stack2 = helpers['if'].call(depth0, ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.unhide), {hash:{},inverse:self.noop,fn:self.program(22, program22, data),data:data});
if(stack2 || stack2 === 0) { buffer += stack2; }
buffer += "\n";
return buffer;
}
-function program15(depth0,data) {
+function program20(depth0,data) {
return "This dataset has been hidden.";
}
-function program17(depth0,data) {
+function program22(depth0,data) {
var buffer = "", stack1, stack2;
buffer += "\n Click <a href=\""
@@ -146,13 +178,16 @@
return buffer;
}
- stack1 = helpers['if'].call(depth0, depth0.deleted, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
+ stack1 = helpers['if'].call(depth0, depth0.error, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n\n";
- stack1 = helpers['if'].call(depth0, depth0.purged, {hash:{},inverse:self.noop,fn:self.program(9, program9, data),data:data});
+ stack1 = helpers['if'].call(depth0, depth0.deleted, {hash:{},inverse:self.noop,fn:self.program(6, program6, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n\n";
- stack1 = helpers.unless.call(depth0, depth0.visible, {hash:{},inverse:self.noop,fn:self.program(13, program13, data),data:data});
+ stack1 = helpers['if'].call(depth0, depth0.purged, {hash:{},inverse:self.noop,fn:self.program(14, program14, data),data:data});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n\n";
+ stack1 = helpers.unless.call(depth0, depth0.visible, {hash:{},inverse:self.noop,fn:self.program(18, program18, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
return buffer;
});
diff -r 6d1e0123ffef00c0f1de717d31dfc350bf9027ce -r 9a0d3c0735d7a6bccbe214f2c209a97a2df3831c static/scripts/templates/compiled/template-history-historyPanel.js
--- a/static/scripts/templates/compiled/template-history-historyPanel.js
+++ b/static/scripts/templates/compiled/template-history-historyPanel.js
@@ -82,77 +82,49 @@
function program12(depth0,data) {
var buffer = "", stack1, options;
- buffer += "\n ";
+ buffer += "\n <div id=\"history-tag-annotation\">\n\n <div id=\"history-tag-area\" style=\"display: none\">\n <strong>";
options = {hash:{},inverse:self.noop,fn:self.program(13, program13, data),data:data};
- if (stack1 = helpers.warningmessagesmall) { stack1 = stack1.call(depth0, options); }
- else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n ";
- return buffer;
- }
-function program13(depth0,data) {
-
- var stack1, options;
- options = {hash:{},inverse:self.noop,fn:self.program(14, program14, data),data:data};
if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
- if(stack1 || stack1 === 0) { return stack1; }
- else { return ''; }
- }
-function program14(depth0,data) {
-
-
- return "You are currently viewing a deleted history!";
- }
-
-function program16(depth0,data) {
-
- var buffer = "", stack1, options;
- buffer += "\n <div id=\"history-tag-annotation\">\n\n <div id=\"history-tag-area\" style=\"display: none\">\n <strong>";
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += ":</strong>\n <div class=\"tag-elt\"></div>\n </div>\n\n <div id=\"history-annotation-area\" style=\"display: none\">\n <strong>";
+ options = {hash:{},inverse:self.noop,fn:self.program(15, program15, data),data:data};
+ if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += ":</strong>\n <div id=\"history-annotation-container\">\n <div id=\"history-annotation\" class=\"tooltip editable-text\"\n title=\"";
options = {hash:{},inverse:self.noop,fn:self.program(17, program17, data),data:data};
if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += ":</strong>\n <div class=\"tag-elt\"></div>\n </div>\n\n <div id=\"history-annotation-area\" style=\"display: none\">\n <strong>";
- options = {hash:{},inverse:self.noop,fn:self.program(19, program19, data),data:data};
- if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += ":</strong>\n <div id=\"history-annotation-container\">\n <div id=\"history-annotation\" class=\"tooltip editable-text\"\n title=\"";
- options = {hash:{},inverse:self.noop,fn:self.program(21, program21, data),data:data};
- if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\">\n ";
- stack1 = helpers['if'].call(depth0, depth0.annotation, {hash:{},inverse:self.program(25, program25, data),fn:self.program(23, program23, data),data:data});
+ stack1 = helpers['if'].call(depth0, depth0.annotation, {hash:{},inverse:self.program(21, program21, data),fn:self.program(19, program19, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n </div>\n </div>\n </div>\n </div>\n ";
return buffer;
}
-function program17(depth0,data) {
+function program13(depth0,data) {
return "Tags";
}
-function program19(depth0,data) {
+function program15(depth0,data) {
return "Annotation";
}
-function program21(depth0,data) {
+function program17(depth0,data) {
return "Click to edit annotation";
}
-function program23(depth0,data) {
+function program19(depth0,data) {
var buffer = "", stack1;
buffer += "\n ";
@@ -163,11 +135,11 @@
return buffer;
}
-function program25(depth0,data) {
+function program21(depth0,data) {
var buffer = "", stack1, options;
buffer += "\n <em>";
- options = {hash:{},inverse:self.noop,fn:self.program(26, program26, data),data:data};
+ options = {hash:{},inverse:self.noop,fn:self.program(22, program22, data),data:data};
if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
@@ -175,10 +147,38 @@
buffer += "</em>\n ";
return buffer;
}
+function program22(depth0,data) {
+
+
+ return "Describe or add notes to history";
+ }
+
+function program24(depth0,data) {
+
+ var buffer = "", stack1, options;
+ buffer += "\n ";
+ options = {hash:{},inverse:self.noop,fn:self.program(25, program25, data),data:data};
+ if (stack1 = helpers.warningmessagesmall) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n ";
+ return buffer;
+ }
+function program25(depth0,data) {
+
+ var stack1, options;
+ options = {hash:{},inverse:self.noop,fn:self.program(26, program26, data),data:data};
+ if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
+ if(stack1 || stack1 === 0) { return stack1; }
+ else { return ''; }
+ }
function program26(depth0,data) {
- return "Describe or add notes to history";
+ return "You are currently viewing a deleted history!";
}
function program28(depth0,data) {
@@ -188,11 +188,11 @@
if (stack1 = helpers.status) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
else { stack1 = depth0.status; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
buffer += escapeExpression(stack1)
- + "message\">\n ";
+ + "message\">";
if (stack1 = helpers.message) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
else { stack1 = depth0.message; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
buffer += escapeExpression(stack1)
- + "\n </div><br />\n </div>\n ";
+ + "</div>\n </div>\n ";
return buffer;
}
@@ -208,7 +208,7 @@
return "Your history is empty. Click 'Get Data' on the left pane to start";
}
- buffer += "<div id=\"history-controls\">\n <div id=\"history-title-area\" class=\"historyLinks\">\n\n "
+ buffer += "<div id=\"history-controls\">\n\n <div id=\"history-title-area\" class=\"historyLinks\">\n "
+ "\n <div id=\"history-name-container\">\n "
+ "\n ";
stack2 = helpers['if'].call(depth0, ((stack1 = depth0.user),stack1 == null || stack1 === false ? stack1 : stack1.email), {hash:{},inverse:self.program(4, program4, data),fn:self.program(1, program1, data),data:data});
@@ -220,13 +220,13 @@
+ "</div>\n\n <div id=\"history-secondary-links\" style=\"float: right;\">\n ";
stack2 = helpers['if'].call(depth0, ((stack1 = depth0.user),stack1 == null || stack1 === false ? stack1 : stack1.email), {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data});
if(stack2 || stack2 === 0) { buffer += stack2; }
- buffer += "\n </div>\n <div style=\"clear: both;\"></div>\n </div>\n\n ";
- stack2 = helpers['if'].call(depth0, depth0.deleted, {hash:{},inverse:self.noop,fn:self.program(12, program12, data),data:data});
- if(stack2 || stack2 === 0) { buffer += stack2; }
- buffer += "\n\n "
+ buffer += "\n </div>\n <div style=\"clear: both;\"></div>\n </div>\n\n "
+ "\n "
+ "\n ";
- stack2 = helpers['if'].call(depth0, ((stack1 = depth0.user),stack1 == null || stack1 === false ? stack1 : stack1.email), {hash:{},inverse:self.noop,fn:self.program(16, program16, data),data:data});
+ stack2 = helpers['if'].call(depth0, ((stack1 = depth0.user),stack1 == null || stack1 === false ? stack1 : stack1.email), {hash:{},inverse:self.noop,fn:self.program(12, program12, data),data:data});
+ if(stack2 || stack2 === 0) { buffer += stack2; }
+ buffer += "\n\n ";
+ stack2 = helpers['if'].call(depth0, depth0.deleted, {hash:{},inverse:self.noop,fn:self.program(24, program24, data),data:data});
if(stack2 || stack2 === 0) { buffer += stack2; }
buffer += "\n\n ";
stack2 = helpers['if'].call(depth0, depth0.message, {hash:{},inverse:self.noop,fn:self.program(28, program28, data),data:data});
diff -r 6d1e0123ffef00c0f1de717d31dfc350bf9027ce -r 9a0d3c0735d7a6bccbe214f2c209a97a2df3831c static/scripts/templates/hda-templates.html
--- a/static/scripts/templates/hda-templates.html
+++ b/static/scripts/templates/hda-templates.html
@@ -1,5 +1,12 @@
<!-- ---------------------------------------------------------------------- WARNING BOXES --><script type="text/template" class="template-hda" id="template-hda-warning-messages">
+{{#if error}}
+<div class="errormessagesmall">
+ {{#local}}There was an error getting the data for this dataset{{/local}}:
+ {{#local}}{{error}}{{/local}}
+</div>
+{{/if}}
+
{{#if deleted}}{{#unless purged}}
{{#warningmessagesmall}}
{{#local}}This dataset has been deleted.{{/local}}
diff -r 6d1e0123ffef00c0f1de717d31dfc350bf9027ce -r 9a0d3c0735d7a6bccbe214f2c209a97a2df3831c static/scripts/templates/history-templates.html
--- a/static/scripts/templates/history-templates.html
+++ b/static/scripts/templates/history-templates.html
@@ -3,8 +3,8 @@
--><script type="text/template" class="template-history" id="template-history-historyPanel"><div id="history-controls">
+
<div id="history-title-area" class="historyLinks">
-
{{! history name (if any) }}
<div id="history-name-container">
{{! TODO: factor out conditional css }}
@@ -32,10 +32,6 @@
<div style="clear: both;"></div></div>
- {{#if deleted}}
- {{#warningmessagesmall}}{{#local}}You are currently viewing a deleted history!{{/local}}{{/warningmessagesmall}}
- {{/if}}
-
{{! tags and annotations }}
{{! TODO: move inline styles out }}
{{#if user.email}}
@@ -62,11 +58,13 @@
</div>
{{/if}}
+ {{#if deleted}}
+ {{#warningmessagesmall}}{{#local}}You are currently viewing a deleted history!{{/local}}{{/warningmessagesmall}}
+ {{/if}}
+
{{#if message}}
<div id="message-container">
- <div class="{{status}}message">
- {{message}}
- </div><br />
+ <div class="{{status}}message">{{message}}</div></div>
{{/if}}
diff -r 6d1e0123ffef00c0f1de717d31dfc350bf9027ce -r 9a0d3c0735d7a6bccbe214f2c209a97a2df3831c templates/webapps/galaxy/root/history.mako
--- a/templates/webapps/galaxy/root/history.mako
+++ b/templates/webapps/galaxy/root/history.mako
@@ -174,18 +174,8 @@
${ unquote_plus( h.to_json_string( url_dict ) ) }
</%def>
+
## -----------------------------------------------------------------------------
-<%def name="get_history_json( history )">
-<%
- try:
- return h.to_json_string( history )
- except TypeError, type_err:
- log.error( 'Could not serialize history' )
- log.debug( 'history data: %s', str( history ) )
- return '{}'
-%>
-</%def>
-
<%def name="get_current_user()"><%
user_json = trans.webapp.api_controllers[ 'users' ].show( trans, 'current' )
@@ -193,17 +183,6 @@
%></%def>
-<%def name="get_hda_json( hdas )">
-<%
- try:
- return h.to_json_string( hdas )
- except TypeError, type_err:
- log.error( 'Could not serialize hdas for history: %s', history['id'] )
- log.debug( 'hda data: %s', str( hdas ) )
- return '{}'
-%>
-</%def>
-
## -----------------------------------------------------------------------------
<%def name="javascripts()">
@@ -242,6 +221,10 @@
)}
<script type="text/javascript">
+function modalAsAlert( title, body, buttons ){
+ alert( title + ':\n' + body );
+}
+
function galaxyPageSetUp(){
// moving global functions, objects into Galaxy namespace
top.Galaxy = top.Galaxy || {};
@@ -258,8 +241,8 @@
top.Galaxy.$rightPanel = top.Galaxy.$rightPanel || $( top.document ).find( 'div#right' );
//modals
- top.Galaxy.show_modal = top.show_modal;
- top.Galaxy.hide_modal = top.hide_modal;
+ top.Galaxy.show_modal = top.show_modal || modalAsAlert;
+ top.Galaxy.hide_modal = top.hide_modal || function(){};
// other base functions
@@ -288,6 +271,7 @@
// 1. load history panel in own tab
// 2. from console: new PersistantStorage( '__history_panel' ).set( 'debugging', true )
// -> history panel and hdas will display console logs in console
+
var debugging = false;
if( jQuery.jStorage.get( '__history_panel' ) ){
debugging = new PersistantStorage( '__history_panel' ).get( 'debugging' );
@@ -299,29 +283,35 @@
var page_show_deleted = ${ 'true' if show_deleted == True else ( 'null' if show_deleted == None else 'false' ) },
page_show_hidden = ${ 'true' if show_hidden == True else ( 'null' if show_hidden == None else 'false' ) },
- user = ${ get_current_user() },
- history = ${ get_history_json( history_dictionary ) },
- hdas = ${ get_hda_json( hda_dictionaries ) };
+ userJson = ${ get_current_user() },
+ historyJson = ${ history_json },
+ hdaJson = ${ hda_json };
+
+ // set up messages passed in
+ %if message:
+ historyJson.message = "${_( message )}"; historyJson.status = "${status}";
+ %endif
// add user data to history
// i don't like this history+user relationship, but user authentication changes views/behaviour
- history.user = user;
+ historyJson.user = userJson;
// create the history panel
+ var history = new History( historyJson, hdaJson );
var historyPanel = new HistoryPanel({
- model : new History( history, hdas ),
- urlTemplates : galaxy_paths.attributes,
- logger : ( debugging )?( console ):( null ),
- // is page sending in show settings? if so override history's
- show_deleted : page_show_deleted,
- show_hidden : page_show_hidden
- });
+ model : history,
+ urlTemplates : galaxy_paths.attributes,
+ logger : ( debugging )?( console ):( null ),
+ // is page sending in show settings? if so override history's
+ show_deleted : page_show_deleted,
+ show_hidden : page_show_hidden
+ });
historyPanel.render();
// set it up to be accessible across iframes
//TODO:?? mem leak
top.Galaxy.currHistoryPanel = historyPanel;
- var currUser = new User( user );
+ var currUser = new User( userJson );
if( !Galaxy.currUser ){ Galaxy.currUser = currUser; }
// QUOTA METER is a cross-frame ui element (meter in masthead, over quota message in history)
@@ -451,19 +441,25 @@
)}
<style>
## TODO: move to base.less
- .historyItemBody {
- display: none;
+ /*---- page level */
+ .warningmessagesmall {
+ margin: 8px 0 0 0;
+ }
+ #message-container {
+ margin: 8px 0 0 0;
+ }
+ #message-container [class$="message"] {
+ margin: 0px;
}
+ /*---- history level */
#history-controls {
- /*border: 1px solid white;*/
margin-bottom: 5px;
padding: 5px;
}
#history-title-area {
margin: 0px 0px 5px 0px;
- /*border: 1px solid red;*/
}
#history-name {
word-wrap: break-word;
@@ -477,7 +473,6 @@
width: 90%;
margin: -2px 0px -3px -4px;
font-weight: bold;
- /*color: gray;*/
}
#quota-message-container {
@@ -488,14 +483,12 @@
}
#history-subtitle-area {
- /*border: 1px solid green;*/
}
#history-size {
}
#history-secondary-links {
}
- /*why this is getting underlined is beyond me*/
#history-secondary-links #history-refresh {
text-decoration: none;
}
@@ -508,6 +501,19 @@
margin: 10px 0px 10px 0px;
}
+ /*---- HDA level */
+ .historyItem div.errormessagesmall {
+ font-size: small;
+ margin: 0px 0px 4px 0px;
+ }
+ .historyItem div.warningmessagesmall {
+ font-size: small;
+ margin: 0px 0px 4px 0px;
+ }
+ .historyItemBody {
+ display: none;
+ }
+
.historyItemTitle {
text-decoration: underline;
cursor: pointer;
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: guerler: Enhance button for trackster visualization in data display viewer
by commits-noreply@bitbucket.org 09 Apr '13
by commits-noreply@bitbucket.org 09 Apr '13
09 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/6d1e0123ffef/
Changeset: 6d1e0123ffef
User: guerler
Date: 2013-04-09 19:59:56
Summary: Enhance button for trackster visualization in data display viewer
Affected #: 2 files
diff -r 7b58daa018e17ce6d48393596b05be6ba823f117 -r 6d1e0123ffef00c0f1de717d31dfc350bf9027ce lib/galaxy/webapps/galaxy/controllers/visualization.py
--- a/lib/galaxy/webapps/galaxy/controllers/visualization.py
+++ b/lib/galaxy/webapps/galaxy/controllers/visualization.py
@@ -697,11 +697,23 @@
# Get dataset to add.
new_dataset_id = kwargs.get( "dataset_id", None )
- # Get gene region
- new_chrom = kwargs.get( "chrom", None )
- new_start = kwargs.get( "start", 0 )
- new_end = kwargs.get( "end", 0 )
-
+ # viewport configuration
+ gene_region_config = {"chrom" : None, "start" : 0, "end" : 0}
+
+ # Check for gene region
+ gene_region = kwargs.get("gene_region", "").split(':')
+
+ # Split gene region into components
+ if (len(gene_region) == 2):
+ gene_chrom = gene_region[0];
+ gene_interval = gene_region[1].split('-')
+
+ # Check length
+ if (len(gene_interval) == 2):
+ gene_region_config['chrom'] = gene_chrom
+ gene_region_config['start'] = int(gene_interval[0])
+ gene_region_config['end'] = int(gene_interval[1])
+
# Set up new browser if no id provided.
if not id:
# Use dbkey from dataset to be added or from incoming parameter.
@@ -711,14 +723,18 @@
if dbkey == '?':
dbkey = kwargs.get( "dbkey", None )
- return trans.fill_template( "tracks/browser.mako", viewport_config={"chrom" : new_chrom, "start" : int(new_start), "end" : int(new_end)},
- add_dataset=new_dataset_id,
- default_dbkey=dbkey )
+ return trans.fill_template( "tracks/browser.mako", viewport_config=gene_region_config, add_dataset=new_dataset_id, default_dbkey=dbkey )
# Display saved visualization.
vis = self.get_visualization( trans, id, check_ownership=False, check_accessible=True )
viz_config = self.get_visualization_config( trans, vis )
+ # Update gene region of saved visualization if user parses a new gene region in the url
+ if gene_region_config['chrom'] is not None:
+ viz_config['viewport']['chrom'] = gene_region_config['chrom']
+ viz_config['viewport']['start'] = gene_region_config['start']
+ viz_config['viewport']['end'] = gene_region_config['end']
+
'''
FIXME:
if new_dataset is not None:
diff -r 7b58daa018e17ce6d48393596b05be6ba823f117 -r 6d1e0123ffef00c0f1de717d31dfc350bf9027ce static/scripts/mvc/data.js
--- a/static/scripts/mvc/data.js
+++ b/static/scripts/mvc/data.js
@@ -227,7 +227,7 @@
* creating the view so that scrolling event can be attached
* to the correct container.
*/
-var BedDatasetChunkedView = TabularDatasetChunkedView.extend(
+var TabularDatasetChunkedViewWithButton = TabularDatasetChunkedView.extend(
{
// gene region columns
col: {
@@ -242,13 +242,20 @@
// dataset id
dataset_id : null,
+ // database key
+ genome_build: null,
+
+ get_type : function(obj) {
+ return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
+ },
+
// backbone initialize
initialize: function (options)
{
// verify that metadata exists
var metadata = options.model.attributes.metadata.attributes;
if (typeof metadata.chromCol === "undefined" || typeof metadata.startCol === "undefined" || typeof metadata.endCol === "undefined")
- console.log("BedDatasetChunkedView:initialize() : Metadata for column identification is missing.");
+ console.log("TabularDatasetChunkedViewWithButton : Metadata for column identification is missing.");
else
{
// read in columns
@@ -257,17 +264,25 @@
this.col.end = metadata.endCol - 1;
}
+ // check
+ if(this.col.chrom == null)
+ return;
+
// get dataset id
if (typeof options.model.attributes.id === "undefined")
- console.log("BedDatasetChunkedView:initialize() : Dataset identification is missing.");
+ console.log("TabularDatasetChunkedViewWithButton : Dataset identification is missing.");
else
this.dataset_id = options.model.attributes.id;
// get url
if (typeof options.model.attributes.url_viz === "undefined")
- console.log("BedDatasetChunkedView:initialize() : Url for visualization controller is missing.");
+ console.log("TabularDatasetChunkedViewWithButton : Url for visualization controller is missing.");
else
this.url_viz = options.model.attributes.url_viz;
+
+ // get genome_build / database key
+ if (typeof options.model.attributes.genome_build !== "undefined")
+ this.genome_build = options.model.attributes.genome_build;
},
// backbone events
@@ -280,19 +295,21 @@
// show button
btn_viz_show: function (e)
{
+ // check
+ if(this.col.chrom == null)
+ return;
+
// get selected data line
var row = $(e.target).parent();
// get target gene region
var btn_viz_pars = {
dataset_id : this.dataset_id,
- chrom : row.children().eq(this.col.chrom).html(),
- start : row.children().eq(this.col.start).html(),
- end : row.children().eq(this.col.end).html()
+ gene_region : row.children().eq(this.col.chrom).html() + ":" + row.children().eq(this.col.start).html() + "-" + row.children().eq(this.col.end).html()
};
// verify that location has been found
- if (btn_viz_pars.chrom != "")
+ if (row.children().eq(this.col.chrom).html() != "")
{
// get button position
var offset = row.offset();
@@ -301,8 +318,9 @@
// update css
$('#btn_viz').css({'position': 'fixed', 'top': top + 'px', 'left': left + 'px'});
- $('#btn_viz').attr('href', "javascript:window.parent.location.href = '" + this.url_viz + "/trackster?" + $.param(btn_viz_pars) + "';");
-
+ $('#btn_viz').off('click');
+ $('#btn_viz').click(this.create_trackster_action(this.url_viz, btn_viz_pars, this.genome_build));
+
// show the button
$('#btn_viz').show();
}
@@ -315,6 +333,59 @@
$('#btn_viz').hide();
},
+
+ // create action
+ create_trackster_action_new : function (vis_url, dataset_params, dbkey)
+ {
+ return function () {
+ window.parent.location.href = vis_url + "/trackster?" + $.param(dataset_params);
+ }
+ },
+
+ // create action
+ create_trackster_action : function (vis_url, dataset_params, dbkey) {
+ return function() {
+ var listTracksParams = {};
+ if (dbkey){
+ // list_tracks seems to use 'f-dbkey' (??)
+ listTracksParams[ 'f-dbkey' ] = dbkey;
+ }
+ $.ajax({
+ url: vis_url + '/list_tracks?' + $.param( listTracksParams ),
+ dataType: "html",
+ error: function() { alert( ( "Could not add this dataset to browser" ) + '.' ); },
+ success: function(table_html) {
+ var parent = window.parent;
+
+ parent.show_modal( ( "View Data in a New or Saved Visualization" ), "", {
+ "Cancel": function() {
+ parent.hide_modal();
+ },
+ "View in saved visualization": function() {
+ // Show new modal with saved visualizations.
+ parent.show_modal( ( "Add Data to Saved Visualization" ), table_html, {
+ "Cancel": function() {
+ parent.hide_modal();
+ },
+ "Add to visualization": function() {
+ $(parent.document).find('input[name=id]:checked').each(function() {
+ var vis_id = $(this).val();
+ dataset_params.id = vis_id;
+ parent.location = vis_url + "/trackster?" + $.param(dataset_params);
+ });
+ }
+ });
+ },
+ "View in new visualization": function() {
+ parent.location = vis_url + "/trackster?" + $.param(dataset_params);
+ }
+ });
+ }
+ });
+ return false;
+ };
+ },
+
// render frame
render: function()
{
@@ -333,7 +404,7 @@
// call parent render
TabularDatasetChunkedView.prototype.render.call(this);
- }
+ }
});
// -- Utility functions. --
@@ -364,20 +435,11 @@
// Create view element and add to parent.
var view_div = $('<div/>').appendTo(parent_elt);
- // Create view with model, render, and return.
- if (dataset_config.data_type == 'bed')
- // bed datatype viewer
- return new BedDatasetChunkedView({
- el: view_div,
- model: new TabularDataset(dataset_config)
- }).render();
- else
- // default viewer
- return new TabularDatasetChunkedView({
- el: view_div,
- model: new TabularDataset(dataset_config)
- }).render();
-
+ // default viewer
+ return new TabularDatasetChunkedViewWithButton({
+ el: view_div,
+ model: new TabularDataset(dataset_config)
+ }).render();
};
return {
@@ -385,7 +447,6 @@
TabularDataset: TabularDataset,
DatasetCollection: DatasetCollection,
TabularDatasetChunkedView: TabularDatasetChunkedView,
- BedDatasetChunkedView: BedDatasetChunkedView,
createTabularDatasetChunkedView: createTabularDatasetChunkedView
};
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dannon: Add missing imports to tool shed repository API. Add NERD_tree_2fixme for variable used out of context
by commits-noreply@bitbucket.org 09 Apr '13
by commits-noreply@bitbucket.org 09 Apr '13
09 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/7b58daa018e1/
Changeset: 7b58daa018e1
User: dannon
Date: 2013-04-09 19:42:27
Summary: Add missing imports to tool shed repository API. Add NERD_tree_2fixme for variable used out of context
Affected #: 1 file
diff -r 5ab62ddc6b7d0b1f0494bac7dadd466ca0b963e8 -r 7b58daa018e17ce6d48393596b05be6ba823f117 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
@@ -1,9 +1,13 @@
import logging
import urllib2
-from galaxy.util import json
+
+from paste.httpexceptions import HTTPBadRequest, HTTPForbidden
+
from galaxy import util
from galaxy import web
+from galaxy.util import json
from galaxy.web.base.controller import BaseAPIController
+
from tool_shed.galaxy_install import repository_util
import tool_shed.util.shed_util_common as suc
@@ -182,6 +186,7 @@
if shed_tool_conf:
# Get the tool_path setting.
index, shed_conf_dict = suc.get_shed_tool_conf_dict( trans.app, shed_tool_conf )
+ # BUG, FIXME: Shed config dict does not exist in this context
tool_path = shed_config_dict[ 'tool_path' ]
else:
# Pick a semi-random shed-related tool panel configuration file and get the tool_path setting.
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dannon: Fix string templating mismatch in tool shed repository API. Similar to 9328:b2a5169daea4
by commits-noreply@bitbucket.org 09 Apr '13
by commits-noreply@bitbucket.org 09 Apr '13
09 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/5ab62ddc6b7d/
Changeset: 5ab62ddc6b7d
User: dannon
Date: 2013-04-09 19:36:18
Summary: Fix string templating mismatch in tool shed repository API. Similar to 9328:b2a5169daea4
Affected #: 1 file
diff -r c9cbd395ed49dc8e4e211648c96ed1dcb5530aa4 -r 5ab62ddc6b7d0b1f0494bac7dadd466ca0b963e8 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
@@ -152,7 +152,7 @@
repo_info_dict = items[ 2 ]
else:
message = "Unable to retrieve installation information from tool shed %s for revision %s of repository %s owned by %s: %s" % \
- ( str( tool_shed_url ), str( name ), str( owner ), str( changeset_revision ) )
+ ( str( tool_shed_url ), str( changeset_revision ), str( name ), str( owner ), str( e ) )
log.error( message, exc_info=True )
trans.response.status = 500
return dict( status='error', error=message )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dannon: Close branch from Bjorn's error-message-fix pull request
by commits-noreply@bitbucket.org 09 Apr '13
by commits-noreply@bitbucket.org 09 Apr '13
09 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/4e08f4804b75/
Changeset: 4e08f4804b75
Branch: error-message-fix
User: dannon
Date: 2013-04-09 19:25:03
Summary: Close branch from Bjorn's error-message-fix pull request
Affected #: 0 files
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dannon: Add Parsley egg prior to merging search API.
by commits-noreply@bitbucket.org 09 Apr '13
by commits-noreply@bitbucket.org 09 Apr '13
09 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/c9cbd395ed49/
Changeset: c9cbd395ed49
User: dannon
Date: 2013-04-09 19:20:29
Summary: Add Parsley egg prior to merging search API.
Affected #: 1 file
diff -r af8a76870774ee664331dc018c4ad85cfe06b871 -r c9cbd395ed49dc8e4e211648c96ed1dcb5530aa4 eggs.ini
--- a/eggs.ini
+++ b/eggs.ini
@@ -45,6 +45,7 @@
nose = 0.11.1
NoseHTML = 0.4.1
NoseTestDiff = 0.1
+Parsley = 1.1
Paste = 1.7.5.1
PasteDeploy = 1.5.0
pexpect = 2.4
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dan: Change database logging of stderr and stdout to take text from start and end of the string (instead of just the start) when the size exceeds the set character limit (32k).
by commits-noreply@bitbucket.org 09 Apr '13
by commits-noreply@bitbucket.org 09 Apr '13
09 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/af8a76870774/
Changeset: af8a76870774
User: dan
Date: 2013-04-09 19:00:47
Summary: Change database logging of stderr and stdout to take text from start and end of the string (instead of just the start) when the size exceeds the set character limit (32k).
Affected #: 2 files
diff -r 2cfc5c8223ef102c320472cb84f197ca28a064d6 -r af8a76870774ee664331dc018c4ad85cfe06b871 lib/galaxy/jobs/__init__.py
--- a/lib/galaxy/jobs/__init__.py
+++ b/lib/galaxy/jobs/__init__.py
@@ -34,6 +34,9 @@
# and should eventually become API'd
TOOL_PROVIDED_JOB_METADATA_FILE = 'galaxy.json'
+DATABASE_MAX_STRING_SIZE = 32768
+DATABASE_MAX_STRING_SIZE_PRETTY = '32K'
+
class Sleeper( object ):
"""
Provides a 'sleep' method that sleeps for a number of seconds *unless*
@@ -774,13 +777,13 @@
job.info = message
# TODO: Put setting the stdout, stderr, and exit code in one place
# (not duplicated with the finish method).
- if ( len( stdout ) > 32768 ):
- stdout = stdout[:32768]
- log.info( "stdout for job %d is greater than 32K, only first part will be logged to database" % job.id )
+ if ( len( stdout ) > DATABASE_MAX_STRING_SIZE ):
+ stdout = util.shrink_string_by_size( stdout, DATABASE_MAX_STRING_SIZE, join_by="\n..\n", left_larger=True, beginning_on_size_error=True )
+ log.info( "stdout for job %d is greater than %s, only a portion will be logged to database" % ( job.id, DATABASE_MAX_STRING_SIZE_PRETTY ) )
job.stdout = stdout
- if ( len( stderr ) > 32768 ):
- stderr = stderr[:32768]
- log.info( "stderr for job %d is greater than 32K, only first part will be logged to database" % job.id )
+ if ( len( stderr ) > DATABASE_MAX_STRING_SIZE ):
+ stderr = util.shrink_string_by_size( stderr, DATABASE_MAX_STRING_SIZE, join_by="\n..\n", left_larger=True, beginning_on_size_error=True )
+ log.info( "stderr for job %d is greater than %s, only a portion will be logged to database" % ( job.id, DATABASE_MAX_STRING_SIZE_PRETTY ) )
job.stderr = stderr
# Let the exit code be Null if one is not provided:
if ( exit_code != None ):
@@ -998,12 +1001,12 @@
# will now be seen by the user.
self.sa_session.flush()
# Save stdout and stderr
- if len( job.stdout ) > 32768:
- log.info( "stdout for job %d is greater than 32K, only first part will be logged to database" % job.id )
- job.stdout = job.stdout[:32768]
- if len( job.stderr ) > 32768:
- log.info( "stderr for job %d is greater than 32K, only first part will be logged to database" % job.id )
- job.stderr = job.stderr[:32768]
+ if len( job.stdout ) > DATABASE_MAX_STRING_SIZE:
+ log.info( "stdout for job %d is greater than %s, only a portion will be logged to database" % ( job.id, DATABASE_MAX_STRING_SIZE_PRETTY ) )
+ job.stdout = util.shrink_string_by_size( job.stdout, DATABASE_MAX_STRING_SIZE, join_by="\n..\n", left_larger=True, beginning_on_size_error=True )
+ if len( job.stderr ) > DATABASE_MAX_STRING_SIZE:
+ log.info( "stderr for job %d is greater than %s, only a portion will be logged to database" % ( job.id, DATABASE_MAX_STRING_SIZE_PRETTY ) )
+ job.stderr = util.shrink_string_by_size( job.stderr, DATABASE_MAX_STRING_SIZE, join_by="\n..\n", left_larger=True, beginning_on_size_error=True )
# The exit code will be null if there is no exit code to be set.
# This is so that we don't assign an exit code, such as 0, that
# is either incorrect or has the wrong semantics.
@@ -1652,12 +1655,12 @@
task.state = task.states.ERROR
# Save stdout and stderr
- if len( stdout ) > 32768:
- log.error( "stdout for task %d is greater than 32K, only first part will be logged to database" % task.id )
- task.stdout = stdout[:32768]
- if len( stderr ) > 32768:
- log.error( "stderr for job %d is greater than 32K, only first part will be logged to database" % task.id )
- task.stderr = stderr[:32768]
+ if len( stdout ) > DATABASE_MAX_STRING_SIZE:
+ log.error( "stdout for task %d is greater than %s, only a portion will be logged to database" % ( task.id, DATABASE_MAX_STRING_SIZE_PRETTY ) )
+ task.stdout = util.shrink_string_by_size( stdout, DATABASE_MAX_STRING_SIZE, join_by="\n..\n", left_larger=True, beginning_on_size_error=True )
+ if len( stderr ) > DATABASE_MAX_STRING_SIZE:
+ log.error( "stderr for task %d is greater than %s, only a portion will be logged to database" % ( task.id, DATABASE_MAX_STRING_SIZE_PRETTY ) )
+ task.stderr = util.shrink_string_by_size( stderr, DATABASE_MAX_STRING_SIZE, join_by="\n..\n", left_larger=True, beginning_on_size_error=True )
task.exit_code = tool_exit_code
task.command_line = self.command_line
self.sa_session.flush()
diff -r 2cfc5c8223ef102c320472cb84f197ca28a064d6 -r af8a76870774ee664331dc018c4ad85cfe06b871 lib/galaxy/util/__init__.py
--- a/lib/galaxy/util/__init__.py
+++ b/lib/galaxy/util/__init__.py
@@ -152,6 +152,25 @@
elem.tail = i + pad
return elem
+def shrink_string_by_size( value, size, join_by="..", left_larger=True, beginning_on_size_error=False, end_on_size_error=False ):
+ if len( value ) > size:
+ len_join_by = len( join_by )
+ min_size = len_join_by + 2
+ if size < min_size:
+ if beginning_on_size_error:
+ return value[:size]
+ elif end_on_size_error:
+ return value[-size:]
+ raise ValueError( 'With the provided join_by value (%s), the minimum size value is %i.' % ( join_by, min_size ) )
+ left_index = right_index = int( ( size - len_join_by ) / 2 )
+ if left_index + right_index + len_join_by < size:
+ if left_larger:
+ left_index += 1
+ else:
+ right_index += 1
+ value = "%s%s%s" % ( value[:left_index], join_by, value[-right_index:] )
+ return value
+
# characters that are valid
valid_chars = set(string.letters + string.digits + " -=_.()/+*^,:?!")
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dan: Fix for generating stderr/stdout links in hda show_params.
by commits-noreply@bitbucket.org 09 Apr '13
by commits-noreply@bitbucket.org 09 Apr '13
09 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/2cfc5c8223ef/
Changeset: 2cfc5c8223ef
User: dan
Date: 2013-04-09 18:26:05
Summary: Fix for generating stderr/stdout links in hda show_params.
Affected #: 1 file
diff -r 95bf71620d50c6d81248eef2001a7dc156ae1088 -r 2cfc5c8223ef102c320472cb84f197ca28a064d6 templates/show_params.mako
--- a/templates/show_params.mako
+++ b/templates/show_params.mako
@@ -105,6 +105,9 @@
</th></tr></thead><tbody>
+ <%
+ encoded_hda_id = trans.security.encode_id( hda.id )
+ %><tr><td>Name:</td><td>${hda.name | h}</td></tr><tr><td>Created:</td><td>${hda.create_time.strftime("%b %d, %Y")}</td></tr>
## <tr><td>Copied from another history?</td><td>${hda.source_library_dataset}</td></tr>
@@ -113,10 +116,10 @@
<tr><td>Format:</td><td>${hda.ext | h}</td></tr><tr><td>Galaxy Tool Version:</td><td>${job.tool_version | h}</td></tr><tr><td>Tool Version:</td><td>${hda.tool_version | h}</td></tr>
- <tr><td>Tool Standard Output:</td><td><a href="${h.url_for( controller='dataset', action='stdout')}">stdout</a></td></tr>
- <tr><td>Tool Standard Error:</td><td><a href="${h.url_for( controller='dataset', action='stderr')}">stderr</a></td></tr>
+ <tr><td>Tool Standard Output:</td><td><a href="${h.url_for( controller='dataset', action='stdout', dataset_id=encoded_hda_id )}">stdout</a></td></tr>
+ <tr><td>Tool Standard Error:</td><td><a href="${h.url_for( controller='dataset', action='stderr', dataset_id=encoded_hda_id )}">stderr</a></td></tr><tr><td>Tool Exit Code:</td><td>${job.exit_code | h}</td></tr>
- <tr><td>API ID:</td><td>${trans.security.encode_id(hda.id)}</td></tr>
+ <tr><td>API ID:</td><td>${encoded_hda_id}</td></tr>
%if trans.user_is_admin() or trans.app.config.expose_dataset_path:
<tr><td>Full Path:</td><td>${hda.file_name | h}</td></tr>
%endif
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: james_taylor: Require Python 2.6+ and remove various compatibility patches for 2.4 and 2.5
by commits-noreply@bitbucket.org 09 Apr '13
by commits-noreply@bitbucket.org 09 Apr '13
09 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/95bf71620d50/
Changeset: 95bf71620d50
User: james_taylor
Date: 2013-04-09 17:57:38
Summary: Require Python 2.6+ and remove various compatibility patches for 2.4 and 2.5
Affected #: 20 files
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 eggs.ini
--- a/eggs.ini
+++ b/eggs.ini
@@ -14,7 +14,6 @@
[eggs:platform]
bx_python = 0.7.1
Cheetah = 2.2.2
-ctypes = 1.0.2
DRMAA_python = 0.2
MarkupSafe = 0.12
mercurial = 2.2.3
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 lib/fpconst.py
--- a/lib/fpconst.py
+++ /dev/null
@@ -1,163 +0,0 @@
-"""Utilities for handling IEEE 754 floating point special values
-
-This python module implements constants and functions for working with
-IEEE754 double-precision special values. It provides constants for
-Not-a-Number (NaN), Positive Infinity (PosInf), and Negative Infinity
-(NegInf), as well as functions to test for these values.
-
-The code is implemented in pure python by taking advantage of the
-'struct' standard module. Care has been taken to generate proper
-results on both big-endian and little-endian machines. Some efficiency
-could be gained by translating the core routines into C.
-
-See <http://babbage.cs.qc.edu/courses/cs341/IEEE-754references.html>
-for reference material on the IEEE 754 floating point standard.
-
-Further information on this package is available at
-<http://www.analytics.washington.edu/statcomp/projects/rzope/fpconst/>.
-
-Author: Gregory R. Warnes <gregory_r_warnes(a)groton.pfizer.com>
-Date:: 2003-04-08
-Copyright: (c) 2003, Pfizer, Inc.
-"""
-
-__version__ = "0.7.0"
-ident = "$Id: fpconst.py,v 1.12 2004/05/22 04:38:17 warnes Exp $"
-
-import struct, operator
-
-# check endianess
-_big_endian = struct.pack('i',1)[0] != '\x01'
-
-# and define appropriate constants
-if(_big_endian):
- NaN = struct.unpack('d', '\x7F\xF8\x00\x00\x00\x00\x00\x00')[0]
- PosInf = struct.unpack('d', '\x7F\xF0\x00\x00\x00\x00\x00\x00')[0]
- NegInf = -PosInf
-else:
- NaN = struct.unpack('d', '\x00\x00\x00\x00\x00\x00\xf8\xff')[0]
- PosInf = struct.unpack('d', '\x00\x00\x00\x00\x00\x00\xf0\x7f')[0]
- NegInf = -PosInf
-
-def _double_as_bytes(dval):
- "Use struct.unpack to decode a double precision float into eight bytes"
- tmp = list(struct.unpack('8B',struct.pack('d', dval)))
- if not _big_endian:
- tmp.reverse()
- return tmp
-
-##
-## Functions to extract components of the IEEE 754 floating point format
-##
-
-def _sign(dval):
- "Extract the sign bit from a double-precision floating point value"
- bb = _double_as_bytes(dval)
- return bb[0] >> 7 & 0x01
-
-def _exponent(dval):
- """Extract the exponentent bits from a double-precision floating
- point value.
-
- Note that for normalized values, the exponent bits have an offset
- of 1023. As a consequence, the actual exponentent is obtained
- by subtracting 1023 from the value returned by this function
- """
- bb = _double_as_bytes(dval)
- return (bb[0] << 4 | bb[1] >> 4) & 0x7ff
-
-def _mantissa(dval):
- """Extract the _mantissa bits from a double-precision floating
- point value."""
-
- bb = _double_as_bytes(dval)
- mantissa = bb[1] & 0x0f << 48
- mantissa += bb[2] << 40
- mantissa += bb[3] << 32
- mantissa += bb[4]
- return mantissa
-
-def _zero_mantissa(dval):
- """Determine whether the mantissa bits of the given double are all
- zero."""
- bb = _double_as_bytes(dval)
- return ((bb[1] & 0x0f) | reduce(operator.or_, bb[2:])) == 0
-
-##
-## Functions to test for IEEE 754 special values
-##
-
-def isNaN(value):
- "Determine if the argument is a IEEE 754 NaN (Not a Number) value."
- return (_exponent(value)==0x7ff and not _zero_mantissa(value))
-
-def isInf(value):
- """Determine if the argument is an infinite IEEE 754 value (positive
- or negative inifinity)"""
- return (_exponent(value)==0x7ff and _zero_mantissa(value))
-
-def isFinite(value):
- """Determine if the argument is an finite IEEE 754 value (i.e., is
- not NaN, positive or negative inifinity)"""
- return (_exponent(value)!=0x7ff)
-
-def isPosInf(value):
- "Determine if the argument is a IEEE 754 positive infinity value"
- return (_sign(value)==0 and _exponent(value)==0x7ff and \
- _zero_mantissa(value))
-
-def isNegInf(value):
- "Determine if the argument is a IEEE 754 negative infinity value"
- return (_sign(value)==1 and _exponent(value)==0x7ff and \
- _zero_mantissa(value))
-
-##
-## Functions to test public functions.
-##
-
-def test_isNaN():
- assert( not isNaN(PosInf) )
- assert( not isNaN(NegInf) )
- assert( isNaN(NaN ) )
- assert( not isNaN( 1.0) )
- assert( not isNaN( -1.0) )
-
-def test_isInf():
- assert( isInf(PosInf) )
- assert( isInf(NegInf) )
- assert( not isInf(NaN ) )
- assert( not isInf( 1.0) )
- assert( not isInf( -1.0) )
-
-def test_isFinite():
- assert( not isFinite(PosInf) )
- assert( not isFinite(NegInf) )
- assert( not isFinite(NaN ) )
- assert( isFinite( 1.0) )
- assert( isFinite( -1.0) )
-
-def test_isPosInf():
- assert( isPosInf(PosInf) )
- assert( not isPosInf(NegInf) )
- assert( not isPosInf(NaN ) )
- assert( not isPosInf( 1.0) )
- assert( not isPosInf( -1.0) )
-
-def test_isNegInf():
- assert( not isNegInf(PosInf) )
- assert( isNegInf(NegInf) )
- assert( not isNegInf(NaN ) )
- assert( not isNegInf( 1.0) )
- assert( not isNegInf( -1.0) )
-
-# overall test
-def test():
- test_isNaN()
- test_isInf()
- test_isFinite()
- test_isPosInf()
- test_isNegInf()
-
-if __name__ == "__main__":
- test()
-
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 lib/galaxy/__init__.py
--- a/lib/galaxy/__init__.py
+++ b/lib/galaxy/__init__.py
@@ -95,10 +95,15 @@
pkg_resources.Distribution._insert_on = pkg_resources.Distribution.insert_on
pkg_resources.Distribution.insert_on = _insert_on
-# patch to add the NullHandler class to logging
-if sys.version_info[:2] < ( 2, 7 ):
- import logging
+# compat: BadZipFile introduced in Python 2.7
+import zipfile
+if not hasattr( zipfile, 'BadZipFile' ):
+ zipfile.BadZipFile = zipfile.error
+
+# compat: patch to add the NullHandler class to logging
+import logging
+if not hasattr( logging, 'NullHandler' ):
class NullHandler( logging.Handler ):
def emit( self, record ):
pass
- logging.NullHandler = NullHandler
+ logging.NullHandler = NullHandler
\ No newline at end of file
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 lib/galaxy/datatypes/data.py
--- a/lib/galaxy/datatypes/data.py
+++ b/lib/galaxy/datatypes/data.py
@@ -17,12 +17,6 @@
eggs.require( "Paste" )
import paste
-
-if sys.version_info[:2] < ( 2, 6 ):
- zipfile.BadZipFile = zipfile.error
-if sys.version_info[:2] < ( 2, 5 ):
- zipfile.LargeZipFile = zipfile.error
-
log = logging.getLogger(__name__)
tmpd = tempfile.mkdtemp()
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 lib/galaxy/eggs/__init__.py
--- a/lib/galaxy/eggs/__init__.py
+++ b/lib/galaxy/eggs/__init__.py
@@ -387,7 +387,6 @@
"guppy": lambda: self.config.get( "app:main", "use_memdump" ),
"python_openid": lambda: self.config.get( "app:main", "enable_openid" ),
"python_daemon": lambda: sys.version_info[:2] >= ( 2, 5 ),
- "ctypes": lambda: ( "drmaa" in self.config.get( "app:main", "start_job_runners" ).split(",") ) and sys.version_info[:2] == ( 2, 4 ),
"pysam": lambda: check_pysam()
}.get( egg_name, lambda: True )()
except:
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 lib/galaxy/jobs/deferred/genome_transfer.py
--- a/lib/galaxy/jobs/deferred/genome_transfer.py
+++ b/lib/galaxy/jobs/deferred/genome_transfer.py
@@ -165,28 +165,18 @@
for name in z.namelist():
if name.endswith('/'):
continue
- if sys.version_info[:2] >= ( 2, 6 ):
- zipped_file = z.open( name )
- while 1:
- try:
- chunk = zipped_file.read( CHUNK_SIZE )
- except IOError:
- os.close( fd )
- log.error( 'Problem decompressing zipped data' )
- return self.app.model.DeferredJob.states.INVALID
- if not chunk:
- break
- os.write( fd, chunk )
- zipped_file.close()
- else:
+ zipped_file = z.open( name )
+ while 1:
try:
- outfile = open( fd, 'wb' )
- outfile.write( z.read( name ) )
- outfile.close()
+ chunk = zipped_file.read( CHUNK_SIZE )
except IOError:
os.close( fd )
log.error( 'Problem decompressing zipped data' )
- return
+ return self.app.model.DeferredJob.states.INVALID
+ if not chunk:
+ break
+ os.write( fd, chunk )
+ zipped_file.close()
os.close( fd )
z.close()
elif data_type == 'fasta':
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 lib/galaxy/jobs/runners/drmaa.py
--- a/lib/galaxy/jobs/runners/drmaa.py
+++ b/lib/galaxy/jobs/runners/drmaa.py
@@ -15,8 +15,6 @@
from galaxy.jobs import JobDestination
from galaxy.jobs.runners import AsynchronousJobState, AsynchronousJobRunner
-if sys.version_info[:2] == ( 2, 4 ):
- eggs.require( "ctypes" )
eggs.require( "drmaa" )
# We foolishly named this file the same as the name exported by the drmaa
# library... 'import drmaa' imports itself.
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 lib/galaxy/objectstore/__init__.py
--- a/lib/galaxy/objectstore/__init__.py
+++ b/lib/galaxy/objectstore/__init__.py
@@ -21,13 +21,12 @@
from sqlalchemy.orm import object_session
-if sys.version_info >= (2, 6):
- import multiprocessing
- from galaxy.objectstore.s3_multipart_upload import multipart_upload
- import boto
- from boto.s3.key import Key
- from boto.s3.connection import S3Connection
- from boto.exception import S3ResponseError
+import multiprocessing
+from galaxy.objectstore.s3_multipart_upload import multipart_upload
+import boto
+from boto.s3.key import Key
+from boto.s3.connection import S3Connection
+from boto.exception import S3ResponseError
log = logging.getLogger( __name__ )
logging.getLogger('boto').setLevel(logging.INFO) # Otherwise boto is quite noisy
@@ -381,7 +380,6 @@
Galaxy and S3.
"""
def __init__(self, config):
- assert sys.version_info >= (2, 6), 'S3 Object Store support requires Python >= 2.6'
super(S3ObjectStore, self).__init__()
self.config = config
self.staging_path = self.config.file_path
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 lib/galaxy/objectstore/s3_multipart_upload.py
--- a/lib/galaxy/objectstore/s3_multipart_upload.py
+++ b/lib/galaxy/objectstore/s3_multipart_upload.py
@@ -13,10 +13,8 @@
import contextlib
import functools
-if sys.version_info >= (2, 6):
- # this is just to prevent unit tests from failing
- import multiprocessing
- from multiprocessing.pool import IMapIterator
+import multiprocessing
+from multiprocessing.pool import IMapIterator
from galaxy import eggs
eggs.require('boto')
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -15,6 +15,8 @@
import types
import urllib
+from math import isinf
+
from galaxy import eggs
eggs.require( "simplejson" )
eggs.require( "MarkupSafe" ) #MarkupSafe must load before mako
@@ -46,7 +48,7 @@
from galaxy.tools.parameters.output import ToolOutputActionGroup
from galaxy.tools.parameters.validation import LateValidationError
from galaxy.tools.test import ToolTestBuilder
-from galaxy.util import isinf, listify, parse_xml, rst_to_html, string_as_bool, string_to_object, xml_text, xml_to_string
+from galaxy.util import listify, parse_xml, rst_to_html, string_as_bool, string_to_object, xml_text, xml_to_string
from galaxy.util.bunch import Bunch
from galaxy.util.expressions import ExpressionContext
from galaxy.util.hash_util import hmac_new
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 lib/galaxy/util/__init__.py
--- a/lib/galaxy/util/__init__.py
+++ b/lib/galaxy/util/__init__.py
@@ -5,24 +5,8 @@
import logging, threading, random, string, re, binascii, pickle, time, datetime, math, re, os, sys, tempfile, stat, grp, smtplib, errno, shutil
from email.MIMEText import MIMEText
-# Older py compatibility
-try:
- set()
-except:
- from sets import Set as set
-
-try:
- from hashlib import md5
-except ImportError:
- from md5 import new as md5
-
-try:
- from math import isinf
-except ImportError:
- INF = float( 'inf' )
- NEG_INF = -INF
- ISINF_LIST = [ INF, NEG_INF ]
- isinf = lambda x: x in ISINF_LIST
+from os.path import relpath
+from hashlib import md5
from galaxy import eggs
import pkg_resources
@@ -543,41 +527,6 @@
print "ERROR: Unable to read builds for site file %s" %filename
return build_sites
-def relpath( path, start = None ):
- """Return a relative version of a path"""
- #modified from python 2.6.1 source code
-
- #version 2.6+ has it built in, we'll use the 'official' copy
- if sys.version_info[:2] >= ( 2, 6 ):
- if start is not None:
- return os.path.relpath( path, start )
- return os.path.relpath( path )
-
- #we need to initialize some local parameters
- curdir = os.curdir
- pardir = os.pardir
- sep = os.sep
- commonprefix = os.path.commonprefix
- join = os.path.join
- if start is None:
- start = curdir
-
- #below is the unedited (but formated) relpath() from posixpath.py of 2.6.1
- #this will likely not function properly on non-posix systems, i.e. windows
- if not path:
- raise ValueError( "no path specified" )
-
- start_list = os.path.abspath( start ).split( sep )
- path_list = os.path.abspath( path ).split( sep )
-
- # Work out how much of the filepath is shared by start and path.
- i = len( commonprefix( [ start_list, path_list ] ) )
-
- rel_list = [ pardir ] * ( len( start_list )- i ) + path_list[ i: ]
- if not rel_list:
- return curdir
- return join( *rel_list )
-
def relativize_symlinks( path, start=None, followlinks=False):
for root, dirs, files in os.walk( path, followlinks=followlinks ):
rel_start = None
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 lib/galaxy/util/pastescript/serve.py
--- a/lib/galaxy/util/pastescript/serve.py
+++ b/lib/galaxy/util/pastescript/serve.py
@@ -101,13 +101,6 @@
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
-# if sys.version_info >= (2, 6):
-# from logging.config import fileConfig
-# else:
-# # Use our custom fileConfig -- 2.5.1's with a custom Formatter class
-# # and less strict whitespace (which were incorporated into 2.6's)
-# from paste.script.util.logging_config import fileConfig
-
class BadCommand(Exception):
def __init__(self, message, exit_code=2):
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 lib/galaxy/visualization/data_providers/genome.py
--- a/lib/galaxy/visualization/data_providers/genome.py
+++ b/lib/galaxy/visualization/data_providers/genome.py
@@ -6,8 +6,6 @@
from math import ceil, log
import pkg_resources
pkg_resources.require( "bx-python" )
-if sys.version_info[:2] == (2, 4):
- pkg_resources.require( "ctypes" )
pkg_resources.require( "pysam" )
pkg_resources.require( "numpy" )
import numpy
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 lib/galaxy/webapps/galaxy/buildapp.py
--- a/lib/galaxy/webapps/galaxy/buildapp.py
+++ b/lib/galaxy/webapps/galaxy/buildapp.py
@@ -285,12 +285,7 @@
log.debug( "Enabling 'eval exceptions' middleware" )
else:
# Not in interactive debug mode, just use the regular error middleware
- if sys.version_info[:2] >= ( 2, 6 ):
- warnings.filterwarnings( 'ignore', '.*', DeprecationWarning, '.*serial_number_generator', 11, True )
- import galaxy.web.framework.middleware.error
- warnings.filters.pop()
- else:
- import galaxy.web.framework.middleware.error
+ import galaxy.web.framework.middleware.error
app = galaxy.web.framework.middleware.error.ErrorMiddleware( app, conf )
log.debug( "Enabling 'error' middleware" )
# Transaction logging (apache access.log style)
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 lib/galaxy/webapps/galaxy/controllers/dataset.py
--- a/lib/galaxy/webapps/galaxy/controllers/dataset.py
+++ b/lib/galaxy/webapps/galaxy/controllers/dataset.py
@@ -20,11 +20,6 @@
pkg_resources.require( "Paste" )
import paste.httpexceptions
-if sys.version_info[:2] < ( 2, 6 ):
- zipfile.BadZipFile = zipfile.error
-if sys.version_info[:2] < ( 2, 5 ):
- zipfile.LargeZipFile = zipfile.error
-
tmpd = tempfile.mkdtemp()
comptypes=[]
ziptype = '32'
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 lib/galaxy/webapps/galaxy/controllers/library_common.py
--- a/lib/galaxy/webapps/galaxy/controllers/library_common.py
+++ b/lib/galaxy/webapps/galaxy/controllers/library_common.py
@@ -27,11 +27,6 @@
whoosh_search_enabled = False
schema = None
-if sys.version_info[:2] < ( 2, 6 ):
- zipfile.BadZipFile = zipfile.error
-if sys.version_info[:2] < ( 2, 5 ):
- zipfile.LargeZipFile = zipfile.error
-
log = logging.getLogger( __name__ )
# Test for available compression types
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 lib/tool_shed/tool_shed_registry.py
--- a/lib/tool_shed/tool_shed_registry.py
+++ b/lib/tool_shed/tool_shed_registry.py
@@ -4,12 +4,7 @@
log = logging.getLogger( __name__ )
-if sys.version_info[:2] == ( 2, 4 ):
- from galaxy import eggs
- eggs.require( 'ElementTree' )
- from elementtree import ElementTree
-else:
- from xml.etree import ElementTree
+from xml.etree import ElementTree
class Registry( object ):
def __init__( self, root_dir=None, config=None ):
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 scripts/check_python.py
--- a/scripts/check_python.py
+++ b/scripts/check_python.py
@@ -1,19 +1,19 @@
"""
-If the current installed python version is not 2.5 to 2.7, prints an error
+If the current installed python version is not 2.6 to 2.7, prints an error
message to stderr and returns 1
"""
import os, sys
msg = """ERROR: Your Python version is: %s
-Galaxy is currently supported on Python 2.5, 2.6 and 2.7. To run Galaxy,
+Galaxy is currently supported on Python 2.6 and 2.7. To run Galaxy,
please download and install a supported version from python.org. If a
supported version is installed but is not your default, getgalaxy.org
contains instructions on how to force Galaxy to use a different version.""" % sys.version[:3]
def check_python():
try:
- assert sys.version_info[:2] >= ( 2, 5 ) and sys.version_info[:2] <= ( 2, 7 )
+ assert sys.version_info[:2] >= ( 2, 6 ) and sys.version_info[:2] <= ( 2, 7 )
except AssertionError:
print >>sys.stderr, msg
raise
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 tools/regVariation/quality_filter.py
--- a/tools/regVariation/quality_filter.py
+++ b/tools/regVariation/quality_filter.py
@@ -24,7 +24,7 @@
from bx.binned_array import BinnedArray, FileBinnedArray
from bx.bitset import *
from bx.bitset_builders import *
-from fpconst import isNaN
+from math import isnan
from bx.cookbook import doc_optparse
from galaxy.tools.exception_handling import *
import bx.align.maf
diff -r 24c143157b7acad82501bf8655b587034963e4b2 -r 95bf71620d50c6d81248eef2001a7dc156ae1088 tools/stats/aggregate_scores_in_intervals.py
--- a/tools/stats/aggregate_scores_in_intervals.py
+++ b/tools/stats/aggregate_scores_in_intervals.py
@@ -25,7 +25,7 @@
from bx.binned_array import BinnedArray, FileBinnedArray
from bx.bitset import *
from bx.bitset_builders import *
-from fpconst import isNaN
+from math import isnan
from bx.cookbook import doc_optparse
from galaxy.tools.exception_handling import *
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: move alternate_history.mako to history.mako
by commits-noreply@bitbucket.org 09 Apr '13
by commits-noreply@bitbucket.org 09 Apr '13
09 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/24c143157b7a/
Changeset: 24c143157b7a
User: carlfeberhard
Date: 2013-04-09 16:58:38
Summary: history panel: move alternate_history.mako to history.mako
Affected #: 3 files
diff -r b7a2605bd0a3c8452999b645eb3a37d876c4f2da -r 24c143157b7acad82501bf8655b587034963e4b2 lib/galaxy/webapps/galaxy/controllers/root.py
--- a/lib/galaxy/webapps/galaxy/controllers/root.py
+++ b/lib/galaxy/webapps/galaxy/controllers/root.py
@@ -164,7 +164,7 @@
}
hda_dictionaries.append( return_val )
- return trans.stream_template_mako( "root/alternate_history.mako",
+ return trans.stream_template_mako( "root/history.mako",
history_dictionary = history_dictionary,
hda_dictionaries = hda_dictionaries,
show_deleted = show_deleted,
diff -r b7a2605bd0a3c8452999b645eb3a37d876c4f2da -r 24c143157b7acad82501bf8655b587034963e4b2 templates/webapps/galaxy/root/alternate_history.mako
--- a/templates/webapps/galaxy/root/alternate_history.mako
+++ /dev/null
@@ -1,522 +0,0 @@
-<%inherit file="/base.mako"/>
-
-<%def name="title()">
- ${_('Galaxy History')}
-</%def>
-
-## ---------------------------------------------------------------------------------------------------------------------
-<%def name="create_localization_json( strings_to_localize )">
- ## converts strings_to_localize (a list of strings) into a JSON dictionary of { string : localized string }
-${ h.to_json_string( dict([ ( string, _(string) ) for string in strings_to_localize ]) ) }
-## ?? add: if string != _(string)
-</%def>
-
-<%def name="get_page_localized_strings()">
- ## a list of localized strings used in the backbone views, etc. (to be loaded and cached)
- ##! change on per page basis
- <%
- ## havent been localized
- ##[
- ## "anonymous user",
- ## "Click to rename history",
- ## "Click to see more actions",
- ## "Edit history tags",
- ## "Edit history annotation",
- ## "Tags",
- ## "Annotation",
- ## "Click to edit annotation",
- ## "You are over your disk ...w your allocated quota.",
- ## "Show deleted",
- ## "Show hidden",
- ## "View data",
- ## "Edit Attributes",
- ## "Download",
- ## "View details",
- ## "Run this job again",
- ## "Visualize",
- ## "Edit dataset tags",
- ## "Edit dataset annotation",
- ## "Trackster",
- ## "Circster",
- ## "Scatterplot",
- ## "GeneTrack",
- ## "Local",
- ## "Web",
- ## "Current",
- ## "main",
- ## "Using"
- ##]
- strings_to_localize = [
-
- # from history.mako
- # not needed?: "Galaxy History",
- 'refresh',
- 'collapse all',
- 'hide deleted',
- 'hide hidden',
- 'You are currently viewing a deleted history!',
- "Your history is empty. Click 'Get Data' on the left pane to start",
-
- # from history_common.mako
- 'Download',
- 'Display Data',
- 'View data',
- 'Edit attributes',
- 'Delete',
- 'Job is waiting to run',
- 'View Details',
- 'Run this job again',
- 'Job is currently running',
- 'View Details',
- 'Run this job again',
- 'Metadata is being Auto-Detected.',
- 'No data: ',
- 'format: ',
- 'database: ',
- #TODO localized data.dbkey??
- 'Info: ',
- #TODO localized display_app.display_name??
- # _( link_app.name )
- # localized peek...ugh
- 'Error: unknown dataset state',
- ]
- return strings_to_localize
- %>
-</%def>
-
-## ---------------------------------------------------------------------------------------------------------------------
-## all the possible history urls (primarily from web controllers at this point)
-<%def name="get_history_url_templates()">
-<%
- from urllib import unquote_plus
-
- history_class_name = 'History'
- encoded_id_template = '<%= id %>'
-
- url_dict = {
- 'rename' : h.url_for( controller="history", action="rename_async",
- id=encoded_id_template ),
- 'tag' : h.url_for( controller='tag', action='get_tagging_elt_async',
- item_class=history_class_name, item_id=encoded_id_template ),
- 'annotate' : h.url_for( controller="history", action="annotate_async",
- id=encoded_id_template )
- }
-%>
-${ unquote_plus( h.to_json_string( url_dict ) ) }
-</%def>
-
-## ---------------------------------------------------------------------------------------------------------------------
-## all the possible hda urls (primarily from web controllers at this point) - whether they should have them or not
-##TODO: unify url_for btwn web, api
-<%def name="get_hda_url_templates()">
-<%
- from urllib import unquote_plus
-
- hda_class_name = 'HistoryDatasetAssociation'
- encoded_id_template = '<%= id %>'
-
- hda_ext_template = '<%= file_ext %>'
- meta_type_template = '<%= file_type %>'
-
- display_app_name_template = '<%= name %>'
- display_app_link_template = '<%= link %>'
-
- url_dict = {
- # ................................................................ warning message links
- 'purge' : h.url_for( controller='dataset', action='purge_async',
- dataset_id=encoded_id_template ),
- #TODO: hide (via api)
- 'unhide' : h.url_for( controller='dataset', action='unhide',
- dataset_id=encoded_id_template ),
- #TODO: via api
- 'undelete' : h.url_for( controller='dataset', action='undelete',
- dataset_id=encoded_id_template ),
-
- # ................................................................ title actions (display, edit, delete),
- 'display' : h.url_for( controller='dataset', action='display',
- dataset_id=encoded_id_template, preview=True, filename='' ),
- 'edit' : h.url_for( controller='dataset', action='edit',
- dataset_id=encoded_id_template ),
-
- #TODO: via api
- 'delete' : h.url_for( controller='dataset', action='delete_async', dataset_id=encoded_id_template ),
-
- # ................................................................ download links (and associated meta files),
- 'download' : h.url_for( controller='dataset', action='display',
- dataset_id=encoded_id_template, to_ext=hda_ext_template ),
- 'meta_download' : h.url_for( controller='dataset', action='get_metadata_file',
- hda_id=encoded_id_template, metadata_name=meta_type_template ),
-
- # ................................................................ primary actions (errors, params, rerun),
- 'report_error' : h.url_for( controller='dataset', action='errors',
- id=encoded_id_template ),
- 'show_params' : h.url_for( controller='dataset', action='show_params',
- dataset_id=encoded_id_template ),
- 'rerun' : h.url_for( controller='tool_runner', action='rerun',
- id=encoded_id_template ),
- 'visualization' : h.url_for( controller='visualization', action='index' ),
-
- # ................................................................ secondary actions (tagging, annotation),
- 'tags' : {
- 'get' : h.url_for( controller='tag', action='get_tagging_elt_async',
- item_class=hda_class_name, item_id=encoded_id_template ),
- 'set' : h.url_for( controller='tag', action='retag',
- item_class=hda_class_name, item_id=encoded_id_template ),
- },
- 'annotation' : {
- 'get' : h.url_for( controller='dataset', action='get_annotation_async',
- id=encoded_id_template ),
- 'set' : h.url_for( controller='/dataset', action='annotate_async',
- id=encoded_id_template ),
- },
- }
-%>
-${ unquote_plus( h.to_json_string( url_dict ) ) }
-</%def>
-
-## -----------------------------------------------------------------------------
-<%def name="get_history_json( history )">
-<%
- try:
- return h.to_json_string( history )
- except TypeError, type_err:
- log.error( 'Could not serialize history' )
- log.debug( 'history data: %s', str( history ) )
- return '{}'
-%>
-</%def>
-
-<%def name="get_current_user()">
-<%
- user_json = trans.webapp.api_controllers[ 'users' ].show( trans, 'current' )
- return user_json
-%>
-</%def>
-
-<%def name="get_hda_json( hdas )">
-<%
- try:
- return h.to_json_string( hdas )
- except TypeError, type_err:
- log.error( 'Could not serialize hdas for history: %s', history['id'] )
- log.debug( 'hda data: %s', str( hdas ) )
- return '{}'
-%>
-</%def>
-
-
-## -----------------------------------------------------------------------------
-<%def name="javascripts()">
-${parent.javascripts()}
-
-${h.js(
- "libs/jquery/jstorage",
- "libs/jquery/jquery.autocomplete", "galaxy.autocom_tagging",
- "mvc/base-mvc",
-)}
-
-${h.templates(
- "helpers-common-templates",
- "template-warningmessagesmall",
-
- "template-history-historyPanel",
-
- "template-hda-warning-messages",
- "template-hda-titleLink",
- "template-hda-failedMetadata",
- "template-hda-hdaSummary",
- "template-hda-downloadLinks",
- "template-hda-tagArea",
- "template-hda-annotationArea",
- "template-hda-displayApps",
-
- "template-user-quotaMeter-quota",
- "template-user-quotaMeter-usage"
-)}
-
-##TODO: fix: curr hasta be _after_ h.templates bc these use those templates - move somehow
-${h.js(
- "mvc/user/user-model", "mvc/user/user-quotameter",
- "mvc/dataset/hda-model", "mvc/dataset/hda-base", "mvc/dataset/hda-edit",
- "mvc/history/history-model", "mvc/history/history-panel"
-)}
-
-<script type="text/javascript">
-function galaxyPageSetUp(){
- // moving global functions, objects into Galaxy namespace
- top.Galaxy = top.Galaxy || {};
-
- // bad idea from memleak standpoint?
- top.Galaxy.mainWindow = top.Galaxy.mainWindow || top.frames.galaxy_main;
- top.Galaxy.toolWindow = top.Galaxy.toolWindow || top.frames.galaxy_tools;
- top.Galaxy.historyWindow = top.Galaxy.historyWindow || top.frames.galaxy_history;
-
- top.Galaxy.$masthead = top.Galaxy.$masthead || $( top.document ).find( 'div#masthead' );
- top.Galaxy.$messagebox = top.Galaxy.$messagebox || $( top.document ).find( 'div#messagebox' );
- top.Galaxy.$leftPanel = top.Galaxy.$leftPanel || $( top.document ).find( 'div#left' );
- top.Galaxy.$centerPanel = top.Galaxy.$centerPanel || $( top.document ).find( 'div#center' );
- top.Galaxy.$rightPanel = top.Galaxy.$rightPanel || $( top.document ).find( 'div#right' );
-
- //modals
- top.Galaxy.show_modal = top.show_modal;
- top.Galaxy.hide_modal = top.hide_modal;
-
- // other base functions
-
- // global backbone models
- top.Galaxy.currUser = top.Galaxy.currUser;
- top.Galaxy.currHistoryPanel = top.Galaxy.currHistoryPanel;
-
- //top.Galaxy.paths = galaxy_paths;
-
- top.Galaxy.localization = GalaxyLocalization;
- window.Galaxy = top.Galaxy;
-}
-
-// set js localizable strings
-GalaxyLocalization.setLocalizedString( ${ create_localization_json( get_page_localized_strings() ) } );
-
-// add needed controller urls to GalaxyPaths
-if( !galaxy_paths ){ galaxy_paths = top.galaxy_paths || new GalaxyPaths(); }
-galaxy_paths.set( 'hda', ${get_hda_url_templates()} );
-galaxy_paths.set( 'history', ${get_history_url_templates()} );
-
-$(function(){
- galaxyPageSetUp();
-
- //NOTE: for debugging on non-local instances (main/test)
- // 1. load history panel in own tab
- // 2. from console: new PersistantStorage( '__history_panel' ).set( 'debugging', true )
- // -> history panel and hdas will display console logs in console
- var debugging = false;
- if( jQuery.jStorage.get( '__history_panel' ) ){
- debugging = new PersistantStorage( '__history_panel' ).get( 'debugging' );
- }
-
- // ostensibly, this is the App
- // LOAD INITIAL DATA IN THIS PAGE - since we're already sending it...
- // ...use mako to 'bootstrap' the models
- var page_show_deleted = ${ 'true' if show_deleted == True else ( 'null' if show_deleted == None else 'false' ) },
- page_show_hidden = ${ 'true' if show_hidden == True else ( 'null' if show_hidden == None else 'false' ) },
-
- user = ${ get_current_user() },
- history = ${ get_history_json( history_dictionary ) },
- hdas = ${ get_hda_json( hda_dictionaries ) };
-
- // add user data to history
- // i don't like this history+user relationship, but user authentication changes views/behaviour
- history.user = user;
-
- // create the history panel
- var historyPanel = new HistoryPanel({
- model : new History( history, hdas ),
- urlTemplates : galaxy_paths.attributes,
- logger : ( debugging )?( console ):( null ),
- // is page sending in show settings? if so override history's
- show_deleted : page_show_deleted,
- show_hidden : page_show_hidden
- });
- historyPanel.render();
-
- // set it up to be accessible across iframes
- //TODO:?? mem leak
- top.Galaxy.currHistoryPanel = historyPanel;
- var currUser = new User( user );
- if( !Galaxy.currUser ){ Galaxy.currUser = currUser; }
-
- // QUOTA METER is a cross-frame ui element (meter in masthead, over quota message in history)
- // create it and join them here for now (via events)
- //TODO: this really belongs in the masthead
- //TODO: and the quota message (curr. in the history panel) belongs somewhere else
-
- //window.currUser.logger = console;
- var quotaMeter = new UserQuotaMeter({
- model : currUser,
- //logger : ( debugging )?( console ):( null ),
- el : $( top.document ).find( '.quota-meter-container' )
- });
- //quotaMeter.logger = console; window.quotaMeter = quotaMeter
- quotaMeter.render();
-
- // show/hide the 'over quota message' in the history when the meter tells it to
- quotaMeter.bind( 'quota:over', historyPanel.showQuotaMessage, historyPanel );
- quotaMeter.bind( 'quota:under', historyPanel.hideQuotaMessage, historyPanel );
- // having to add this to handle re-render of hview while overquota (the above do not fire)
- historyPanel.on( 'rendered rendered:initial', function(){
- if( quotaMeter.isOverQuota() ){
- historyPanel.showQuotaMessage();
- }
- });
- //TODO: this _is_ sent to the page (over_quota)...
-
- // update the quota meter when current history changes size
- historyPanel.model.bind( 'change:nice_size', function(){
- quotaMeter.update()
- }, quotaMeter );
-
-
- //ANOTHER cross-frame element is the history-options-button...
- // in this case, we need to change the popupmenu options listed to include some functions for this history
- // these include: current (1 & 2) 'show/hide' delete and hidden functions, and (3) the collapse all option
- (function(){
- // don't try this if the history panel is in it's own window
- if( top.document === window.document ){
- return;
- }
-
- // lots of wtf here...due to infernalframes
- //TODO: this is way tooo acrobatic
- var $historyButtonWindow = $( top.document ),
- HISTORY_MENU_BUTTON_ID = 'history-options-button',
- $historyMenuButton = $historyButtonWindow.find( '#' + HISTORY_MENU_BUTTON_ID ),
- // jq data in another frame can only be accessed by the jQuery in that frame,
- // get the jQuery from the top frame (that contains the history-options-button)
- START_INSERTING_AT_INDEX = 11,
- COLLAPSE_OPTION_TEXT = _l("Collapse Expanded Datasets"),
- DELETED_OPTION_TEXT = _l("Include Deleted Datasets"),
- HIDDEN_OPTION_TEXT = _l("Include Hidden Datasets");
- windowJQ = $( top )[0].jQuery,
- popupMenu = ( windowJQ && $historyMenuButton[0] )?( windowJQ.data( $historyMenuButton[0], 'PopupMenu' ) )
- :( null );
- //console.debug(
- // '$historyButtonWindow:', $historyButtonWindow,
- // '$historyMenuButton:', $historyMenuButton,
- // 'windowJQ:', windowJQ,
- // 'popupmenu:', popupMenu
- //);
- if( !popupMenu ){ return; }
-
- // since the history frame reloads so often (compared to the main window),
- // we need to check whether these options are there already before we add them again
- // In IE, however, NOT re-adding them creates a 'cant execute from freed script' error:
- // so...we need to re-add the function in either case (just not the option itself)
- //NOTE: we use the global Galaxy.currHistoryPanel here
- // because these remain bound in the main window even if panel refreshes
- //TODO: too much boilerplate
- //TODO: ugh...(in general)
- var collapseOption = popupMenu.findItemByHtml( COLLAPSE_OPTION_TEXT );
- if( !collapseOption ){
- collapseOption = {
- html : COLLAPSE_OPTION_TEXT
- };
- popupMenu.addItem( collapseOption, START_INSERTING_AT_INDEX )
- }
- collapseOption.func = function() {
- Galaxy.currHistoryPanel.collapseAllHdaBodies();
- };
-
- var deletedOption = popupMenu.findItemByHtml( DELETED_OPTION_TEXT );
- if( !deletedOption ){
- deletedOption = {
- html : DELETED_OPTION_TEXT
- };
- popupMenu.addItem( deletedOption, START_INSERTING_AT_INDEX + 1 )
- }
- deletedOption.func = function( clickEvent, thisMenuOption ){
- var show_deleted = Galaxy.currHistoryPanel.toggleShowDeleted();
- thisMenuOption.checked = show_deleted;
- };
- // whether was there or added, update the checked option to reflect the panel's settings on the panel render
- deletedOption.checked = Galaxy.currHistoryPanel.storage.get( 'show_deleted' );
-
- var hiddenOption = popupMenu.findItemByHtml( HIDDEN_OPTION_TEXT );
- if( !hiddenOption ){
- hiddenOption = {
- html : HIDDEN_OPTION_TEXT
- };
- popupMenu.addItem( hiddenOption, START_INSERTING_AT_INDEX + 2 )
- }
- hiddenOption.func = function( clickEvent, thisMenuOption ){
- var show_hidden = Galaxy.currHistoryPanel.toggleShowHidden();
- thisMenuOption.checked = show_hidden;
- };
- // whether was there or added, update the checked option to reflect the panel's settings on the panel render
- hiddenOption.checked = Galaxy.currHistoryPanel.storage.get( 'show_hidden' );
- })();
-
- //TODO: both the quota meter and the options-menu stuff need to be moved out when iframes are removed
-
- return;
-});
-</script>
-
-</%def>
-
-<%def name="stylesheets()">
- ${parent.stylesheets()}
- ${h.css(
- "base",
- "history",
- "autocomplete_tagging"
- )}
- <style>
- ## TODO: move to base.less
- .historyItemBody {
- display: none;
- }
-
- #history-controls {
- /*border: 1px solid white;*/
- margin-bottom: 5px;
- padding: 5px;
- }
-
- #history-title-area {
- margin: 0px 0px 5px 0px;
- /*border: 1px solid red;*/
- }
- #history-name {
- word-wrap: break-word;
- font-weight: bold;
- /*color: gray;*/
- }
- .editable-text {
- border: solid transparent 1px;
- }
- #history-name-container input {
- width: 90%;
- margin: -2px 0px -3px -4px;
- font-weight: bold;
- /*color: gray;*/
- }
-
- #quota-message-container {
- margin: 8px 0px 5px 0px;
- }
- #quota-message {
- margin: 0px;
- }
-
- #history-subtitle-area {
- /*border: 1px solid green;*/
- }
- #history-size {
- }
- #history-secondary-links {
- }
-
- /*why this is getting underlined is beyond me*/
- #history-secondary-links #history-refresh {
- text-decoration: none;
- }
- /*too tweaky*/
- #history-annotate {
- margin-right: 3px;
- }
-
- #history-tag-area, #history-annotation-area {
- margin: 10px 0px 10px 0px;
- }
-
- .historyItemTitle {
- text-decoration: underline;
- cursor: pointer;
- }
- .historyItemTitle:hover {
- text-decoration: underline;
- }
-
- </style>
-</%def>
-
-<body class="historyPage"></body>
diff -r b7a2605bd0a3c8452999b645eb3a37d876c4f2da -r 24c143157b7acad82501bf8655b587034963e4b2 templates/webapps/galaxy/root/history.mako
--- /dev/null
+++ b/templates/webapps/galaxy/root/history.mako
@@ -0,0 +1,522 @@
+<%inherit file="/base.mako"/>
+
+<%def name="title()">
+ ${_('Galaxy History')}
+</%def>
+
+## ---------------------------------------------------------------------------------------------------------------------
+<%def name="create_localization_json( strings_to_localize )">
+ ## converts strings_to_localize (a list of strings) into a JSON dictionary of { string : localized string }
+${ h.to_json_string( dict([ ( string, _(string) ) for string in strings_to_localize ]) ) }
+## ?? add: if string != _(string)
+</%def>
+
+<%def name="get_page_localized_strings()">
+ ## a list of localized strings used in the backbone views, etc. (to be loaded and cached)
+ ##! change on per page basis
+ <%
+ ## havent been localized
+ ##[
+ ## "anonymous user",
+ ## "Click to rename history",
+ ## "Click to see more actions",
+ ## "Edit history tags",
+ ## "Edit history annotation",
+ ## "Tags",
+ ## "Annotation",
+ ## "Click to edit annotation",
+ ## "You are over your disk ...w your allocated quota.",
+ ## "Show deleted",
+ ## "Show hidden",
+ ## "View data",
+ ## "Edit Attributes",
+ ## "Download",
+ ## "View details",
+ ## "Run this job again",
+ ## "Visualize",
+ ## "Edit dataset tags",
+ ## "Edit dataset annotation",
+ ## "Trackster",
+ ## "Circster",
+ ## "Scatterplot",
+ ## "GeneTrack",
+ ## "Local",
+ ## "Web",
+ ## "Current",
+ ## "main",
+ ## "Using"
+ ##]
+ strings_to_localize = [
+
+ # from history.mako
+ # not needed?: "Galaxy History",
+ 'refresh',
+ 'collapse all',
+ 'hide deleted',
+ 'hide hidden',
+ 'You are currently viewing a deleted history!',
+ "Your history is empty. Click 'Get Data' on the left pane to start",
+
+ # from history_common.mako
+ 'Download',
+ 'Display Data',
+ 'View data',
+ 'Edit attributes',
+ 'Delete',
+ 'Job is waiting to run',
+ 'View Details',
+ 'Run this job again',
+ 'Job is currently running',
+ 'View Details',
+ 'Run this job again',
+ 'Metadata is being Auto-Detected.',
+ 'No data: ',
+ 'format: ',
+ 'database: ',
+ #TODO localized data.dbkey??
+ 'Info: ',
+ #TODO localized display_app.display_name??
+ # _( link_app.name )
+ # localized peek...ugh
+ 'Error: unknown dataset state',
+ ]
+ return strings_to_localize
+ %>
+</%def>
+
+## ---------------------------------------------------------------------------------------------------------------------
+## all the possible history urls (primarily from web controllers at this point)
+<%def name="get_history_url_templates()">
+<%
+ from urllib import unquote_plus
+
+ history_class_name = 'History'
+ encoded_id_template = '<%= id %>'
+
+ url_dict = {
+ 'rename' : h.url_for( controller="history", action="rename_async",
+ id=encoded_id_template ),
+ 'tag' : h.url_for( controller='tag', action='get_tagging_elt_async',
+ item_class=history_class_name, item_id=encoded_id_template ),
+ 'annotate' : h.url_for( controller="history", action="annotate_async",
+ id=encoded_id_template )
+ }
+%>
+${ unquote_plus( h.to_json_string( url_dict ) ) }
+</%def>
+
+## ---------------------------------------------------------------------------------------------------------------------
+## all the possible hda urls (primarily from web controllers at this point) - whether they should have them or not
+##TODO: unify url_for btwn web, api
+<%def name="get_hda_url_templates()">
+<%
+ from urllib import unquote_plus
+
+ hda_class_name = 'HistoryDatasetAssociation'
+ encoded_id_template = '<%= id %>'
+
+ hda_ext_template = '<%= file_ext %>'
+ meta_type_template = '<%= file_type %>'
+
+ display_app_name_template = '<%= name %>'
+ display_app_link_template = '<%= link %>'
+
+ url_dict = {
+ # ................................................................ warning message links
+ 'purge' : h.url_for( controller='dataset', action='purge_async',
+ dataset_id=encoded_id_template ),
+ #TODO: hide (via api)
+ 'unhide' : h.url_for( controller='dataset', action='unhide',
+ dataset_id=encoded_id_template ),
+ #TODO: via api
+ 'undelete' : h.url_for( controller='dataset', action='undelete',
+ dataset_id=encoded_id_template ),
+
+ # ................................................................ title actions (display, edit, delete),
+ 'display' : h.url_for( controller='dataset', action='display',
+ dataset_id=encoded_id_template, preview=True, filename='' ),
+ 'edit' : h.url_for( controller='dataset', action='edit',
+ dataset_id=encoded_id_template ),
+
+ #TODO: via api
+ 'delete' : h.url_for( controller='dataset', action='delete_async', dataset_id=encoded_id_template ),
+
+ # ................................................................ download links (and associated meta files),
+ 'download' : h.url_for( controller='dataset', action='display',
+ dataset_id=encoded_id_template, to_ext=hda_ext_template ),
+ 'meta_download' : h.url_for( controller='dataset', action='get_metadata_file',
+ hda_id=encoded_id_template, metadata_name=meta_type_template ),
+
+ # ................................................................ primary actions (errors, params, rerun),
+ 'report_error' : h.url_for( controller='dataset', action='errors',
+ id=encoded_id_template ),
+ 'show_params' : h.url_for( controller='dataset', action='show_params',
+ dataset_id=encoded_id_template ),
+ 'rerun' : h.url_for( controller='tool_runner', action='rerun',
+ id=encoded_id_template ),
+ 'visualization' : h.url_for( controller='visualization', action='index' ),
+
+ # ................................................................ secondary actions (tagging, annotation),
+ 'tags' : {
+ 'get' : h.url_for( controller='tag', action='get_tagging_elt_async',
+ item_class=hda_class_name, item_id=encoded_id_template ),
+ 'set' : h.url_for( controller='tag', action='retag',
+ item_class=hda_class_name, item_id=encoded_id_template ),
+ },
+ 'annotation' : {
+ 'get' : h.url_for( controller='dataset', action='get_annotation_async',
+ id=encoded_id_template ),
+ 'set' : h.url_for( controller='/dataset', action='annotate_async',
+ id=encoded_id_template ),
+ },
+ }
+%>
+${ unquote_plus( h.to_json_string( url_dict ) ) }
+</%def>
+
+## -----------------------------------------------------------------------------
+<%def name="get_history_json( history )">
+<%
+ try:
+ return h.to_json_string( history )
+ except TypeError, type_err:
+ log.error( 'Could not serialize history' )
+ log.debug( 'history data: %s', str( history ) )
+ return '{}'
+%>
+</%def>
+
+<%def name="get_current_user()">
+<%
+ user_json = trans.webapp.api_controllers[ 'users' ].show( trans, 'current' )
+ return user_json
+%>
+</%def>
+
+<%def name="get_hda_json( hdas )">
+<%
+ try:
+ return h.to_json_string( hdas )
+ except TypeError, type_err:
+ log.error( 'Could not serialize hdas for history: %s', history['id'] )
+ log.debug( 'hda data: %s', str( hdas ) )
+ return '{}'
+%>
+</%def>
+
+
+## -----------------------------------------------------------------------------
+<%def name="javascripts()">
+${parent.javascripts()}
+
+${h.js(
+ "libs/jquery/jstorage",
+ "libs/jquery/jquery.autocomplete", "galaxy.autocom_tagging",
+ "mvc/base-mvc",
+)}
+
+${h.templates(
+ "helpers-common-templates",
+ "template-warningmessagesmall",
+
+ "template-history-historyPanel",
+
+ "template-hda-warning-messages",
+ "template-hda-titleLink",
+ "template-hda-failedMetadata",
+ "template-hda-hdaSummary",
+ "template-hda-downloadLinks",
+ "template-hda-tagArea",
+ "template-hda-annotationArea",
+ "template-hda-displayApps",
+
+ "template-user-quotaMeter-quota",
+ "template-user-quotaMeter-usage"
+)}
+
+##TODO: fix: curr hasta be _after_ h.templates bc these use those templates - move somehow
+${h.js(
+ "mvc/user/user-model", "mvc/user/user-quotameter",
+ "mvc/dataset/hda-model", "mvc/dataset/hda-base", "mvc/dataset/hda-edit",
+ "mvc/history/history-model", "mvc/history/history-panel"
+)}
+
+<script type="text/javascript">
+function galaxyPageSetUp(){
+ // moving global functions, objects into Galaxy namespace
+ top.Galaxy = top.Galaxy || {};
+
+ // bad idea from memleak standpoint?
+ top.Galaxy.mainWindow = top.Galaxy.mainWindow || top.frames.galaxy_main;
+ top.Galaxy.toolWindow = top.Galaxy.toolWindow || top.frames.galaxy_tools;
+ top.Galaxy.historyWindow = top.Galaxy.historyWindow || top.frames.galaxy_history;
+
+ top.Galaxy.$masthead = top.Galaxy.$masthead || $( top.document ).find( 'div#masthead' );
+ top.Galaxy.$messagebox = top.Galaxy.$messagebox || $( top.document ).find( 'div#messagebox' );
+ top.Galaxy.$leftPanel = top.Galaxy.$leftPanel || $( top.document ).find( 'div#left' );
+ top.Galaxy.$centerPanel = top.Galaxy.$centerPanel || $( top.document ).find( 'div#center' );
+ top.Galaxy.$rightPanel = top.Galaxy.$rightPanel || $( top.document ).find( 'div#right' );
+
+ //modals
+ top.Galaxy.show_modal = top.show_modal;
+ top.Galaxy.hide_modal = top.hide_modal;
+
+ // other base functions
+
+ // global backbone models
+ top.Galaxy.currUser = top.Galaxy.currUser;
+ top.Galaxy.currHistoryPanel = top.Galaxy.currHistoryPanel;
+
+ //top.Galaxy.paths = galaxy_paths;
+
+ top.Galaxy.localization = GalaxyLocalization;
+ window.Galaxy = top.Galaxy;
+}
+
+// set js localizable strings
+GalaxyLocalization.setLocalizedString( ${ create_localization_json( get_page_localized_strings() ) } );
+
+// add needed controller urls to GalaxyPaths
+if( !galaxy_paths ){ galaxy_paths = top.galaxy_paths || new GalaxyPaths(); }
+galaxy_paths.set( 'hda', ${get_hda_url_templates()} );
+galaxy_paths.set( 'history', ${get_history_url_templates()} );
+
+$(function(){
+ galaxyPageSetUp();
+
+ //NOTE: for debugging on non-local instances (main/test)
+ // 1. load history panel in own tab
+ // 2. from console: new PersistantStorage( '__history_panel' ).set( 'debugging', true )
+ // -> history panel and hdas will display console logs in console
+ var debugging = false;
+ if( jQuery.jStorage.get( '__history_panel' ) ){
+ debugging = new PersistantStorage( '__history_panel' ).get( 'debugging' );
+ }
+
+ // ostensibly, this is the App
+ // LOAD INITIAL DATA IN THIS PAGE - since we're already sending it...
+ // ...use mako to 'bootstrap' the models
+ var page_show_deleted = ${ 'true' if show_deleted == True else ( 'null' if show_deleted == None else 'false' ) },
+ page_show_hidden = ${ 'true' if show_hidden == True else ( 'null' if show_hidden == None else 'false' ) },
+
+ user = ${ get_current_user() },
+ history = ${ get_history_json( history_dictionary ) },
+ hdas = ${ get_hda_json( hda_dictionaries ) };
+
+ // add user data to history
+ // i don't like this history+user relationship, but user authentication changes views/behaviour
+ history.user = user;
+
+ // create the history panel
+ var historyPanel = new HistoryPanel({
+ model : new History( history, hdas ),
+ urlTemplates : galaxy_paths.attributes,
+ logger : ( debugging )?( console ):( null ),
+ // is page sending in show settings? if so override history's
+ show_deleted : page_show_deleted,
+ show_hidden : page_show_hidden
+ });
+ historyPanel.render();
+
+ // set it up to be accessible across iframes
+ //TODO:?? mem leak
+ top.Galaxy.currHistoryPanel = historyPanel;
+ var currUser = new User( user );
+ if( !Galaxy.currUser ){ Galaxy.currUser = currUser; }
+
+ // QUOTA METER is a cross-frame ui element (meter in masthead, over quota message in history)
+ // create it and join them here for now (via events)
+ //TODO: this really belongs in the masthead
+ //TODO: and the quota message (curr. in the history panel) belongs somewhere else
+
+ //window.currUser.logger = console;
+ var quotaMeter = new UserQuotaMeter({
+ model : currUser,
+ //logger : ( debugging )?( console ):( null ),
+ el : $( top.document ).find( '.quota-meter-container' )
+ });
+ //quotaMeter.logger = console; window.quotaMeter = quotaMeter
+ quotaMeter.render();
+
+ // show/hide the 'over quota message' in the history when the meter tells it to
+ quotaMeter.bind( 'quota:over', historyPanel.showQuotaMessage, historyPanel );
+ quotaMeter.bind( 'quota:under', historyPanel.hideQuotaMessage, historyPanel );
+ // having to add this to handle re-render of hview while overquota (the above do not fire)
+ historyPanel.on( 'rendered rendered:initial', function(){
+ if( quotaMeter.isOverQuota() ){
+ historyPanel.showQuotaMessage();
+ }
+ });
+ //TODO: this _is_ sent to the page (over_quota)...
+
+ // update the quota meter when current history changes size
+ historyPanel.model.bind( 'change:nice_size', function(){
+ quotaMeter.update()
+ }, quotaMeter );
+
+
+ //ANOTHER cross-frame element is the history-options-button...
+ // in this case, we need to change the popupmenu options listed to include some functions for this history
+ // these include: current (1 & 2) 'show/hide' delete and hidden functions, and (3) the collapse all option
+ (function(){
+ // don't try this if the history panel is in it's own window
+ if( top.document === window.document ){
+ return;
+ }
+
+ // lots of wtf here...due to infernalframes
+ //TODO: this is way tooo acrobatic
+ var $historyButtonWindow = $( top.document ),
+ HISTORY_MENU_BUTTON_ID = 'history-options-button',
+ $historyMenuButton = $historyButtonWindow.find( '#' + HISTORY_MENU_BUTTON_ID ),
+ // jq data in another frame can only be accessed by the jQuery in that frame,
+ // get the jQuery from the top frame (that contains the history-options-button)
+ START_INSERTING_AT_INDEX = 11,
+ COLLAPSE_OPTION_TEXT = _l("Collapse Expanded Datasets"),
+ DELETED_OPTION_TEXT = _l("Include Deleted Datasets"),
+ HIDDEN_OPTION_TEXT = _l("Include Hidden Datasets");
+ windowJQ = $( top )[0].jQuery,
+ popupMenu = ( windowJQ && $historyMenuButton[0] )?( windowJQ.data( $historyMenuButton[0], 'PopupMenu' ) )
+ :( null );
+ //console.debug(
+ // '$historyButtonWindow:', $historyButtonWindow,
+ // '$historyMenuButton:', $historyMenuButton,
+ // 'windowJQ:', windowJQ,
+ // 'popupmenu:', popupMenu
+ //);
+ if( !popupMenu ){ return; }
+
+ // since the history frame reloads so often (compared to the main window),
+ // we need to check whether these options are there already before we add them again
+ // In IE, however, NOT re-adding them creates a 'cant execute from freed script' error:
+ // so...we need to re-add the function in either case (just not the option itself)
+ //NOTE: we use the global Galaxy.currHistoryPanel here
+ // because these remain bound in the main window even if panel refreshes
+ //TODO: too much boilerplate
+ //TODO: ugh...(in general)
+ var collapseOption = popupMenu.findItemByHtml( COLLAPSE_OPTION_TEXT );
+ if( !collapseOption ){
+ collapseOption = {
+ html : COLLAPSE_OPTION_TEXT
+ };
+ popupMenu.addItem( collapseOption, START_INSERTING_AT_INDEX )
+ }
+ collapseOption.func = function() {
+ Galaxy.currHistoryPanel.collapseAllHdaBodies();
+ };
+
+ var deletedOption = popupMenu.findItemByHtml( DELETED_OPTION_TEXT );
+ if( !deletedOption ){
+ deletedOption = {
+ html : DELETED_OPTION_TEXT
+ };
+ popupMenu.addItem( deletedOption, START_INSERTING_AT_INDEX + 1 )
+ }
+ deletedOption.func = function( clickEvent, thisMenuOption ){
+ var show_deleted = Galaxy.currHistoryPanel.toggleShowDeleted();
+ thisMenuOption.checked = show_deleted;
+ };
+ // whether was there or added, update the checked option to reflect the panel's settings on the panel render
+ deletedOption.checked = Galaxy.currHistoryPanel.storage.get( 'show_deleted' );
+
+ var hiddenOption = popupMenu.findItemByHtml( HIDDEN_OPTION_TEXT );
+ if( !hiddenOption ){
+ hiddenOption = {
+ html : HIDDEN_OPTION_TEXT
+ };
+ popupMenu.addItem( hiddenOption, START_INSERTING_AT_INDEX + 2 )
+ }
+ hiddenOption.func = function( clickEvent, thisMenuOption ){
+ var show_hidden = Galaxy.currHistoryPanel.toggleShowHidden();
+ thisMenuOption.checked = show_hidden;
+ };
+ // whether was there or added, update the checked option to reflect the panel's settings on the panel render
+ hiddenOption.checked = Galaxy.currHistoryPanel.storage.get( 'show_hidden' );
+ })();
+
+ //TODO: both the quota meter and the options-menu stuff need to be moved out when iframes are removed
+
+ return;
+});
+</script>
+
+</%def>
+
+<%def name="stylesheets()">
+ ${parent.stylesheets()}
+ ${h.css(
+ "base",
+ "history",
+ "autocomplete_tagging"
+ )}
+ <style>
+ ## TODO: move to base.less
+ .historyItemBody {
+ display: none;
+ }
+
+ #history-controls {
+ /*border: 1px solid white;*/
+ margin-bottom: 5px;
+ padding: 5px;
+ }
+
+ #history-title-area {
+ margin: 0px 0px 5px 0px;
+ /*border: 1px solid red;*/
+ }
+ #history-name {
+ word-wrap: break-word;
+ font-weight: bold;
+ /*color: gray;*/
+ }
+ .editable-text {
+ border: solid transparent 1px;
+ }
+ #history-name-container input {
+ width: 90%;
+ margin: -2px 0px -3px -4px;
+ font-weight: bold;
+ /*color: gray;*/
+ }
+
+ #quota-message-container {
+ margin: 8px 0px 5px 0px;
+ }
+ #quota-message {
+ margin: 0px;
+ }
+
+ #history-subtitle-area {
+ /*border: 1px solid green;*/
+ }
+ #history-size {
+ }
+ #history-secondary-links {
+ }
+
+ /*why this is getting underlined is beyond me*/
+ #history-secondary-links #history-refresh {
+ text-decoration: none;
+ }
+ /*too tweaky*/
+ #history-annotate {
+ margin-right: 3px;
+ }
+
+ #history-tag-area, #history-annotation-area {
+ margin: 10px 0px 10px 0px;
+ }
+
+ .historyItemTitle {
+ text-decoration: underline;
+ cursor: pointer;
+ }
+ .historyItemTitle:hover {
+ text-decoration: underline;
+ }
+
+ </style>
+</%def>
+
+<body class="historyPage"></body>
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/b2a5169daea4/
Changeset: b2a5169daea4
Branch: error-message-fix
User: BjoernGruening
Date: 2013-04-06 15:00:37
Summary: change error message
Affected #: 1 file
diff -r cb25513c63cd7aa2ebd472e91109c96276ed6d9d -r b2a5169daea4ddcde4eec0b70b1d97a6fd1f1321 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
@@ -141,7 +141,7 @@
response.close()
except Exception, e:
message = "Error attempting to retrieve installation information from tool shed %s for revision %s of repository %s owned by %s: %s" % \
- ( str( tool_shed_url ), str( name ), str( owner ), str( changeset_revision ), str( e ) )
+ ( str( tool_shed_url ), str( changeset_revision ), str( name ), str( owner ), str( e ) )
log.error( message, exc_info=True )
trans.response.status = 500
return dict( status='error', error=message )
@@ -347,4 +347,4 @@
elif isinstance( installed_tool_shed_repositories, list ):
all_installed_tool_shed_repositories.extend( installed_tool_shed_repositories )
return all_installed_tool_shed_repositories
-
\ No newline at end of file
+
https://bitbucket.org/galaxy/galaxy-central/commits/b7a2605bd0a3/
Changeset: b7a2605bd0a3
User: dannon
Date: 2013-04-09 15:56:12
Summary: Merged in BjoernGruening/galaxy-central-bgruening/error-message-fix (pull request #150)
change error message
Affected #: 1 file
diff -r a395caa2f36f2e4aa6c2daf24e4da3c9ede4b125 -r b7a2605bd0a3c8452999b645eb3a37d876c4f2da 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
@@ -141,7 +141,7 @@
response.close()
except Exception, e:
message = "Error attempting to retrieve installation information from tool shed %s for revision %s of repository %s owned by %s: %s" % \
- ( str( tool_shed_url ), str( name ), str( owner ), str( changeset_revision ), str( e ) )
+ ( str( tool_shed_url ), str( changeset_revision ), str( name ), str( owner ), str( e ) )
log.error( message, exc_info=True )
trans.response.status = 500
return dict( status='error', error=message )
@@ -347,4 +347,4 @@
elif isinstance( installed_tool_shed_repositories, list ):
all_installed_tool_shed_repositories.extend( installed_tool_shed_repositories )
return all_installed_tool_shed_repositories
-
\ No newline at end of file
+
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/d07c62f0067a/
Changeset: d07c62f0067a
User: dannon
Date: 2013-04-09 15:34:24
Summary: Fix bug from 8333 which prevented ToolDataTable loading .loc files from directories other than the default galaxy tool_data_path.
Affected #: 1 file
diff -r 8fc56b85e0a5353ffd6790685a4a7d8a84938409 -r d07c62f0067a4fc6cabab499d8c1191199c5fc8f lib/galaxy/tools/data/__init__.py
--- a/lib/galaxy/tools/data/__init__.py
+++ b/lib/galaxy/tools/data/__init__.py
@@ -55,7 +55,7 @@
self.data_table_elem_names.append( table_elem_name )
if from_shed_config:
self.shed_data_table_elems.append( table_elem )
- table = tool_data_table_types[ type ]( table_elem, tool_data_path )
+ table = tool_data_table_types[ type ]( table_elem, tool_data_path, from_shed_config)
if table.name not in self.data_tables:
self.data_tables[ table.name ] = table
log.debug( "Loaded tool data table '%s'", table.name )
@@ -132,7 +132,7 @@
os.chmod( full_path, 0644 )
class ToolDataTable( object ):
- def __init__( self, config_element, tool_data_path ):
+ def __init__( self, config_element, tool_data_path, from_shed_config = False):
self.name = config_element.get( 'name' )
self.comment_char = config_element.get( 'comment_char' )
self.empty_field_value = config_element.get( 'empty_field_value', '' )
@@ -164,11 +164,11 @@
type_key = 'tabular'
- def __init__( self, config_element, tool_data_path ):
- super( TabularToolDataTable, self ).__init__( config_element, tool_data_path )
- self.configure_and_load( config_element, tool_data_path )
+ def __init__( self, config_element, tool_data_path, from_shed_config = False):
+ super( TabularToolDataTable, self ).__init__( config_element, tool_data_path, from_shed_config)
+ self.configure_and_load( config_element, tool_data_path, from_shed_config)
- def configure_and_load( self, config_element, tool_data_path ):
+ def configure_and_load( self, config_element, tool_data_path, from_shed_config = False):
"""
Configure and load table from an XML element.
"""
@@ -180,7 +180,9 @@
all_rows = []
for file_element in config_element.findall( 'file' ):
found = False
- if tool_data_path:
+ if tool_data_path and from_shed_config:
+ # Must identify with from_shed_config as well, because the
+ # regular galaxy app has and uses tool_data_path.
# We're loading a tool in the tool shed, so we cannot use the Galaxy tool-data
# directory which is hard-coded into the tool_data_table_conf.xml entries.
filepath = file_element.get( 'path' )
https://bitbucket.org/galaxy/galaxy-central/commits/a395caa2f36f/
Changeset: a395caa2f36f
User: dannon
Date: 2013-04-09 15:36:23
Summary: Import cleanup, space methods, strip trailing whitespace.
Affected #: 1 file
diff -r d07c62f0067a4fc6cabab499d8c1191199c5fc8f -r a395caa2f36f2e4aa6c2daf24e4da3c9ede4b125 lib/galaxy/tools/data/__init__.py
--- a/lib/galaxy/tools/data/__init__.py
+++ b/lib/galaxy/tools/data/__init__.py
@@ -3,36 +3,47 @@
used by tools, for example in the generation of dynamic options. Tables are
loaded and stored by names which tools use to refer to them. This allows
users to configure data tables for a local Galaxy instance without needing
-to modify the tool configurations.
+to modify the tool configurations.
"""
-import logging, sys, os, os.path, tempfile, shutil
+import logging
+import os
+import os.path
+import shutil
+import tempfile
+
from galaxy import util
log = logging.getLogger( __name__ )
+
class ToolDataTableManager( object ):
"""Manages a collection of tool data tables"""
+
def __init__( self, tool_data_path, config_filename=None ):
self.tool_data_path = tool_data_path
# This stores all defined data table entries from both the tool_data_table_conf.xml file and the shed_tool_data_table_conf.xml file
# at server startup. If tool shed repositories are installed that contain a valid file named tool_data_table_conf.xml.sample, entries
# from that file are inserted into this dict at the time of installation.
- self.data_tables = {}
+ self.data_tables = {}
# Store config elements for on-the-fly persistence to the defined shed_tool_data_table_config file name.
self.shed_data_table_elems = []
self.data_table_elem_names = []
if config_filename:
self.load_from_config_file( config_filename, self.tool_data_path, from_shed_config=False )
+
def __getitem__( self, key ):
return self.data_tables.__getitem__( key )
+
def __contains__( self, key ):
return self.data_tables.__contains__( key )
+
def get( self, name, default=None ):
try:
return self[ name ]
except KeyError:
return default
+
def load_from_config_file( self, config_filename, tool_data_path, from_shed_config=False ):
"""
This method is called under 3 conditions:
@@ -65,6 +76,7 @@
if table_row not in self.data_tables[ table.name ].data:
self.data_tables[ table.name ].data.append( table_row )
return table_elems
+
def add_new_entries_from_config_file( self, config_filename, tool_data_path, shed_tool_data_table_config, persist=False ):
"""
This method is called when a tool shed repository that includes a tool_data_table_conf.xml.sample file is being
@@ -118,6 +130,7 @@
# Persist Galaxy's version of the changed tool_data_table_conf.xml file.
self.to_xml_file( shed_tool_data_table_config )
return table_elems, error_message
+
def to_xml_file( self, shed_tool_data_table_config ):
"""Write the current in-memory version of the shed_tool_data_table_conf.xml file to disk."""
full_path = os.path.abspath( shed_tool_data_table_config )
@@ -130,8 +143,10 @@
os.close( fd )
shutil.move( filename, full_path )
os.chmod( full_path, 0644 )
-
+
+
class ToolDataTable( object ):
+
def __init__( self, config_element, tool_data_path, from_shed_config = False):
self.name = config_element.get( 'name' )
self.comment_char = config_element.get( 'comment_char' )
@@ -146,14 +161,16 @@
self.tool_data_file = None
self.tool_data_path = tool_data_path
self.missing_index_file = None
+
def get_empty_field_by_name( self, name ):
return self.empty_field_values.get( name, self.empty_field_value )
-
+
+
class TabularToolDataTable( ToolDataTable ):
"""
Data stored in a tabular / separated value format on disk, allows multiple
files to be merged but all must have the same column definitions::
-
+
<table type="tabular" name="test"><column name='...' index = '...' /><file path="..." />
@@ -161,9 +178,9 @@
</table>
"""
-
+
type_key = 'tabular'
-
+
def __init__( self, config_element, tool_data_path, from_shed_config = False):
super( TabularToolDataTable, self ).__init__( config_element, tool_data_path, from_shed_config)
self.configure_and_load( config_element, tool_data_path, from_shed_config)
@@ -224,8 +241,8 @@
with a name and index (as in dynamic options config), or a shorthand
comma separated list of names in order as the text of a 'column_names'
element.
-
- A column named 'value' is required.
+
+ A column named 'value' is required.
"""
self.columns = {}
if config_element.find( 'columns' ) is not None:
@@ -254,7 +271,7 @@
def parse_file_fields( self, reader ):
"""
Parse separated lines from file and return a list of tuples.
-
+
TODO: Allow named access to fields using the column names.
"""
separator_char = (lambda c: '<TAB>' if c == '\t' else c)(self.separator)
@@ -270,10 +287,10 @@
rval.append( fields )
else:
log.warn( "Line %i in tool data table '%s' is invalid (HINT: "
- "'%s' characters must be used to separate fields):\n%s"
+ "'%s' characters must be used to separate fields):\n%s"
% ( ( i + 1 ), self.name, separator_char, line ) )
return rval
-
+
def get_column_name_list( self ):
rval = []
for i in range( self.largest_index + 1 ):
@@ -286,7 +303,7 @@
if not found_column:
rval.append( None )
return rval
-
+
def get_entry( self, query_attr, query_val, return_attr, default=None ):
"""
Returns table entry associated with a col/val pair.
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
13 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/5b6306be4e4c/
Changeset: 5b6306be4e4c
User: jmchilton
Date: 2013-03-22 06:41:08
Summary: Refactor tool loading and macro preprocessing stuff into its own module, implement unit tests for basic functionality.
Affected #: 2 files
diff -r 14ab08c0fbfe3e9735e94f4e399aeabc870fe4b2 -r 5b6306be4e4c7f20b6b4e473449cbe7a02ebe921 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -29,7 +29,6 @@
from mako.template import Template
from paste import httpexceptions
from sqlalchemy import and_
-from copy import deepcopy
from galaxy import jobs, model
from galaxy.datatypes.metadata import JobExternalOutputMetadataWrapper
@@ -58,6 +57,7 @@
from galaxy.web import url_for
from galaxy.web.form_builder import SelectField
from tool_shed.util import shed_util_common
+from .loader import load_tool
log = logging.getLogger( __name__ )
@@ -577,7 +577,7 @@
def load_tool( self, config_file, guid=None, **kwds ):
"""Load a single tool from the file named by `config_file` and return an instance of `Tool`."""
# Parse XML configuration file and get the root element
- tree = self._load_and_preprocess_tool_xml( config_file )
+ tree = load_tool( config_file )
root = tree.getroot()
# Allow specifying a different tool subclass to instantiate
if root.find( "type" ) is not None:
@@ -762,102 +762,6 @@
return rval
- def _load_and_preprocess_tool_xml(self, config_file):
- tree = parse_xml(config_file)
- root = tree.getroot()
- macros_el = root.find('macros')
- if not macros_el:
- return tree
- tool_dir = os.path.dirname(config_file)
- macros = self._load_macros(macros_el, tool_dir)
-
- self._expand_macros([root], macros)
- return tree
-
- def _expand_macros(self, elements, macros):
- for element in elements:
- # HACK for elementtree, newer implementations (etree/lxml) won't
- # require this parent_map data structure but elementtree does not
- # track parents or recongnize .find('..').
- parent_map = dict((c, p) for p in element.getiterator() for c in p)
- for expand_el in element.findall('.//expand'):
- macro_name = expand_el.get('macro')
- macro_def = deepcopy(macros[macro_name]) # deepcopy needed?
-
- yield_els = [yield_el for macro_def_el in macro_def for yield_el in macro_def_el.findall('.//yield')]
-
- expand_el_children = expand_el.getchildren()
- macro_def_parent_map = \
- dict((c, p) for macro_def_el in macro_def for p in macro_def_el.getiterator() for c in p)
-
- for yield_el in yield_els:
- self._xml_replace(yield_el, expand_el_children, macro_def_parent_map)
-
- # Recursively expand contained macros.
- self._expand_macros(macro_def, macros)
- self._xml_replace(expand_el, macro_def, parent_map)
-
- def _load_macros(self, macros_el, tool_dir):
- macros = {}
- # Import macros from external files.
- macros.update(self._load_imported_macros(macros_el, tool_dir))
- # Load all directly defined macros.
- macros.update(self._load_embedded_macros(macros_el, tool_dir))
- return macros
-
- def _load_embedded_macros(self, macros_el, tool_dir):
- macros = {}
-
- macro_els = []
- if macros_el:
- macro_els = macros_el.findall("macro")
- for macro in macro_els:
- macro_name = macro.get("name")
- macros[macro_name] = self._load_macro_def(macro)
-
- return macros
-
- def _load_imported_macros(self, macros_el, tool_dir):
- macros = {}
-
- macro_import_els = []
- if macros_el:
- macro_import_els = macros_el.findall("import")
- for macro_import_el in macro_import_els:
- raw_import_path = macro_import_el.text
- tool_relative_import_path = \
- os.path.basename(raw_import_path) # Sanitize this
- import_path = \
- os.path.join(tool_dir, tool_relative_import_path)
- file_macros = self._load_macro_file(import_path, tool_dir)
- macros.update(file_macros)
-
- return macros
-
- def _load_macro_file(self, path, tool_dir):
- tree = parse_xml(path)
- root = tree.getroot()
- return self._load_macros(root, tool_dir)
-
- def _load_macro_def(self, macro):
- return list(macro.getchildren())
-
- def _xml_replace(self, query, targets, parent_map):
- #parent_el = query.find('..') ## Something like this would be better with newer xml library
- parent_el = parent_map[query]
- matching_index = -1
- #for index, el in enumerate(parent_el.iter('.')): ## Something like this for newer implementation
- for index, el in enumerate(parent_el.getchildren()):
- if el == query:
- matching_index = index
- break
- assert matching_index >= 0
- current_index = matching_index
- for target in targets:
- current_index += 1
- parent_el.insert(current_index, deepcopy(target))
- parent_el.remove(query)
-
class ToolSection( object ):
"""
diff -r 14ab08c0fbfe3e9735e94f4e399aeabc870fe4b2 -r 5b6306be4e4c7f20b6b4e473449cbe7a02ebe921 lib/galaxy/tools/loader.py
--- /dev/null
+++ b/lib/galaxy/tools/loader.py
@@ -0,0 +1,223 @@
+from __future__ import with_statement
+
+from copy import deepcopy
+import os
+
+from galaxy.util import parse_xml
+
+
+def load_tool(path):
+ """
+ Loads tool from file system and preprocesses tool macros.
+ """
+ tree = parse_xml(path)
+ root = tree.getroot()
+ macros_el = root.find('macros')
+ if not macros_el:
+ return tree
+ tool_dir = os.path.dirname(path)
+ macros = _load_macros(macros_el, tool_dir)
+
+ _expand_macros([root], macros)
+ return tree
+
+
+def _expand_macros(elements, macros):
+ for element in elements:
+ # HACK for elementtree, newer implementations (etree/lxml) won't
+ # require this parent_map data structure but elementtree does not
+ # track parents or recongnize .find('..').
+ parent_map = dict((c, p) for p in element.getiterator() for c in p)
+ for expand_el in element.findall('.//expand'):
+ macro_name = expand_el.get('macro')
+ macro_def = deepcopy(macros[macro_name]) # deepcopy needed?
+
+ yield_els = [yield_el for macro_def_el in macro_def for yield_el in macro_def_el.findall('.//yield')]
+
+ expand_el_children = expand_el.getchildren()
+ macro_def_parent_map = \
+ dict((c, p) for macro_def_el in macro_def for p in macro_def_el.getiterator() for c in p)
+
+ for yield_el in yield_els:
+ _xml_replace(yield_el, expand_el_children, macro_def_parent_map)
+
+ # Recursively expand contained macros.
+ _expand_macros(macro_def, macros)
+ _xml_replace(expand_el, macro_def, parent_map)
+
+
+def _load_macros(macros_el, tool_dir):
+ macros = {}
+ # Import macros from external files.
+ macros.update(_load_imported_macros(macros_el, tool_dir))
+ # Load all directly defined macros.
+ macros.update(_load_embedded_macros(macros_el, tool_dir))
+ return macros
+
+
+def _load_embedded_macros(macros_el, tool_dir):
+ macros = {}
+
+ macro_els = []
+ if macros_el:
+ macro_els = macros_el.findall("macro")
+ for macro in macro_els:
+ macro_name = macro.get("name")
+ macros[macro_name] = _load_macro_def(macro)
+
+ return macros
+
+
+def _load_imported_macros(macros_el, tool_dir):
+ macros = {}
+
+ macro_import_els = []
+ if macros_el:
+ macro_import_els = macros_el.findall("import")
+ for macro_import_el in macro_import_els:
+ raw_import_path = macro_import_el.text
+ tool_relative_import_path = \
+ os.path.basename(raw_import_path) # Sanitize this
+ import_path = \
+ os.path.join(tool_dir, tool_relative_import_path)
+ file_macros = _load_macro_file(import_path, tool_dir)
+ macros.update(file_macros)
+
+ return macros
+
+
+def _load_macro_file(path, tool_dir):
+ tree = parse_xml(path)
+ root = tree.getroot()
+ return _load_macros(root, tool_dir)
+
+
+def _load_macro_def(macro):
+ return list(macro.getchildren())
+
+
+def _xml_replace(query, targets, parent_map):
+ #parent_el = query.find('..') ## Something like this would be better with newer xml library
+ parent_el = parent_map[query]
+ matching_index = -1
+ #for index, el in enumerate(parent_el.iter('.')): ## Something like this for newer implementation
+ for index, el in enumerate(parent_el.getchildren()):
+ if el == query:
+ matching_index = index
+ break
+ assert matching_index >= 0
+ current_index = matching_index
+ for target in targets:
+ current_index += 1
+ parent_el.insert(current_index, deepcopy(target))
+ parent_el.remove(query)
+
+
+def test_loader():
+ """
+ Function to test this module. Galaxy doesn't seem to have a
+ place to put unit tests that are not doctests. These tests can
+ be run with nosetests via the following command:
+
+ % nosetests --with-doctest lib/galaxy/tools/loader.py
+
+ """
+ from tempfile import mkdtemp
+ from shutil import rmtree
+
+ class TestToolDirectory(object):
+ def __init__(self):
+ self.temp_directory = mkdtemp()
+
+ def __enter__(self):
+ return self
+
+ def __exit__(self, type, value, tb):
+ rmtree(self.temp_directory)
+
+ def write(self, contents, name="tool.xml"):
+ open(os.path.join(self.temp_directory, name), "w").write(contents)
+
+ def load(self, name="tool.xml", preprocess=True):
+ if preprocess:
+ loader = load_tool
+ else:
+ loader = parse_xml
+ return loader(os.path.join(self.temp_directory, name))
+
+ ## Test simple macro replacement.
+ with TestToolDirectory() as tool_dir:
+ tool_dir.write('''
+<tool>
+ <expand macro="inputs" />
+ <macros>
+ <macro name="inputs">
+ <inputs />
+ </macro>
+ </macros>
+</tool>''')
+ xml = tool_dir.load(preprocess=False)
+ assert xml.find("inputs") is None
+ xml = tool_dir.load(preprocess=True)
+ assert xml.find("inputs") is not None
+
+ # Test importing macros from external files
+ with TestToolDirectory() as tool_dir:
+ tool_dir.write('''
+<tool>
+ <expand macro="inputs" />
+ <macros>
+ <import>external.xml</import>
+ </macros>
+</tool>''')
+
+ tool_dir.write('''
+<macros>
+ <macro name="inputs">
+ <inputs />
+ </macro>
+</macros>''', name="external.xml")
+ xml = tool_dir.load(preprocess=False)
+ assert xml.find("inputs") is None
+ xml = tool_dir.load(preprocess=True)
+ assert xml.find("inputs") is not None
+
+ # Test macros with unnamed yield statements.
+ with TestToolDirectory() as tool_dir:
+ tool_dir.write('''
+<tool>
+ <expand macro="inputs">
+ <input name="first_input" />
+ </expand>
+ <macros>
+ <macro name="inputs">
+ <inputs>
+ <yield />
+ </inputs>
+ </macro>
+ </macros>
+</tool>''')
+ xml = tool_dir.load()
+ assert xml.find("inputs").find("input").get("name") == "first_input"
+
+ # Test recursive macro applications.
+ with TestToolDirectory() as tool_dir:
+ tool_dir.write('''
+<tool>
+ <expand macro="inputs">
+ <input name="first_input" />
+ <expand macro="second" />
+ </expand>
+ <macros>
+ <macro name="inputs">
+ <inputs>
+ <yield />
+ </inputs>
+ </macro>
+ <macro name="second">
+ <input name="second_input" />
+ </macro>
+ </macros>
+</tool>''')
+ xml = tool_dir.load()
+ assert xml.find("inputs").findall("input")[1].get("name") == "second_input"
https://bitbucket.org/galaxy/galaxy-central/commits/8400b75d0a68/
Changeset: 8400b75d0a68
User: jmchilton
Date: 2013-03-22 06:41:08
Summary: Refactor macro stuff to allow multiple macro types (default type is xml, <xml> will be short for <macro type="xml"), improves ordering of interleaving imports and embedded macros.
Affected #: 1 file
diff -r 5b6306be4e4c7f20b6b4e473449cbe7a02ebe921 -r 8400b75d0a688ec4a6a07e2e5aa98ef9dcbb193c lib/galaxy/tools/loader.py
--- a/lib/galaxy/tools/loader.py
+++ b/lib/galaxy/tools/loader.py
@@ -13,12 +13,17 @@
tree = parse_xml(path)
root = tree.getroot()
macros_el = root.find('macros')
- if not macros_el:
- return tree
tool_dir = os.path.dirname(path)
- macros = _load_macros(macros_el, tool_dir)
- _expand_macros([root], macros)
+ if macros_el:
+ macro_els = _load_macros(macros_el, tool_dir)
+ _xml_set_children(macros_el, macro_els)
+
+ macro_dict = dict([(macro_el.get("name"), list(macro_el.getchildren())) \
+ for macro_el in macro_els \
+ if macro_el.get('type') == 'xml'])
+ _expand_macros([root], macro_dict)
+
return tree
@@ -30,6 +35,7 @@
parent_map = dict((c, p) for p in element.getiterator() for c in p)
for expand_el in element.findall('.//expand'):
macro_name = expand_el.get('macro')
+ print macros.keys()
macro_def = deepcopy(macros[macro_name]) # deepcopy needed?
yield_els = [yield_el for macro_def_el in macro_def for yield_el in macro_def_el.findall('.//yield')]
@@ -47,29 +53,43 @@
def _load_macros(macros_el, tool_dir):
- macros = {}
+ macros = []
# Import macros from external files.
- macros.update(_load_imported_macros(macros_el, tool_dir))
+ macros.extend(_load_imported_macros(macros_el, tool_dir))
# Load all directly defined macros.
- macros.update(_load_embedded_macros(macros_el, tool_dir))
+ macros.extend(_load_embedded_macros(macros_el, tool_dir))
return macros
def _load_embedded_macros(macros_el, tool_dir):
- macros = {}
+ macros = []
macro_els = []
+ # attribute typed macro
if macros_el:
macro_els = macros_el.findall("macro")
for macro in macro_els:
- macro_name = macro.get("name")
- macros[macro_name] = _load_macro_def(macro)
+ if 'type' not in macro.attrib:
+ macro.attrib['type'] = 'xml'
+ macros.append(macro)
+
+ # type shortcuts (<xml> is a shortcut for <macro type="xml",
+ # likewise for <template>.
+ typed_tag = ['xml']
+ for tag in typed_tag:
+ macro_els = []
+ if macros_el:
+ macro_els = macros_el.findall(tag)
+ for macro_el in macro_els:
+ macro_el.attrib['type'] = tag
+ macro_el.tag = 'macro'
+ macros.append(macro_el)
return macros
def _load_imported_macros(macros_el, tool_dir):
- macros = {}
+ macros = []
macro_import_els = []
if macros_el:
@@ -81,7 +101,7 @@
import_path = \
os.path.join(tool_dir, tool_relative_import_path)
file_macros = _load_macro_file(import_path, tool_dir)
- macros.update(file_macros)
+ macros.extend(file_macros)
return macros
@@ -96,6 +116,13 @@
return list(macro.getchildren())
+def _xml_set_children(element, new_children):
+ for old_child in element.getchildren():
+ element.remove(old_child)
+ for i, new_child in enumerate(new_children):
+ element.insert(i, new_child)
+
+
def _xml_replace(query, targets, parent_map):
#parent_el = query.find('..') ## Something like this would be better with newer xml library
parent_el = parent_map[query]
@@ -119,7 +146,7 @@
place to put unit tests that are not doctests. These tests can
be run with nosetests via the following command:
- % nosetests --with-doctest lib/galaxy/tools/loader.py
+ % nosetests lib/galaxy/tools/loader.py
"""
from tempfile import mkdtemp
@@ -221,3 +248,17 @@
</tool>''')
xml = tool_dir.load()
assert xml.find("inputs").findall("input")[1].get("name") == "second_input"
+
+ # Test <xml> is shortcut for macro type="xml"
+ with TestToolDirectory() as tool_dir:
+ tool_dir.write('''
+<tool>
+ <expand macro="inputs" />
+ <macros>
+ <xml name="inputs">
+ <inputs />
+ </xml>
+ </macros>
+</tool>''')
+ xml = tool_dir.load(preprocess=True)
+ assert xml.find("inputs") is not None
https://bitbucket.org/galaxy/galaxy-central/commits/96aae9b33613/
Changeset: 96aae9b33613
User: jmchilton
Date: 2013-03-22 06:41:08
Summary: Implement 'template' macros that define variables which are made available to cheetah templates.
Affected #: 2 files
diff -r 8400b75d0a688ec4a6a07e2e5aa98ef9dcbb193c -r 96aae9b336130398250524311b4b69c432a44966 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -57,7 +57,7 @@
from galaxy.web import url_for
from galaxy.web.form_builder import SelectField
from tool_shed.util import shed_util_common
-from .loader import load_tool
+from .loader import load_tool, template_macro_params
log = logging.getLogger( __name__ )
@@ -1246,6 +1246,7 @@
# thus hardcoded) FIXME: hidden parameters aren't
# parameters at all really, and should be passed in a different
# way, making this check easier.
+ self.template_macro_params = template_macro_params(root)
for param in self.inputs.values():
if not isinstance( param, ( HiddenToolParameter, BaseURLToolParameter ) ):
self.input_required = True
@@ -2367,7 +2368,7 @@
`to_param_dict_string` method of the associated input.
"""
param_dict = dict()
-
+ param_dict.update(self.template_macro_params)
# All parameters go into the param_dict
param_dict.update( incoming )
diff -r 8400b75d0a688ec4a6a07e2e5aa98ef9dcbb193c -r 96aae9b336130398250524311b4b69c432a44966 lib/galaxy/tools/loader.py
--- a/lib/galaxy/tools/loader.py
+++ b/lib/galaxy/tools/loader.py
@@ -12,22 +12,51 @@
"""
tree = parse_xml(path)
root = tree.getroot()
+
+ _import_macros(root, path)
+
+ # Expand xml macros
+ macro_dict = _macros_of_type(root, 'xml', lambda el: list(el.getchildren()))
+ _expand_macros([root], macro_dict)
+
+ return tree
+
+
+def template_macro_params(root):
+ """
+ Look for template macros and populate param_dict (for cheetah)
+ with these.
+ """
+ param_dict = {}
+ macro_dict = _macros_of_type(root, 'template', lambda el: el.text)
+ for key, value in macro_dict.iteritems():
+ param_dict[key] = value
+ return param_dict
+
+
+def _import_macros(root, path):
+ tool_dir = os.path.dirname(path)
macros_el = root.find('macros')
- tool_dir = os.path.dirname(path)
-
if macros_el:
macro_els = _load_macros(macros_el, tool_dir)
_xml_set_children(macros_el, macro_els)
- macro_dict = dict([(macro_el.get("name"), list(macro_el.getchildren())) \
+
+def _macros_of_type(root, type, el_func):
+ macros_el = root.find('macros')
+ macro_dict = {}
+ if macros_el:
+ macro_els = macros_el.findall('macro')
+ macro_dict = dict([(macro_el.get("name"), el_func(macro_el)) \
for macro_el in macro_els \
- if macro_el.get('type') == 'xml'])
- _expand_macros([root], macro_dict)
-
- return tree
+ if macro_el.get('type') == type])
+ return macro_dict
def _expand_macros(elements, macros):
+ if not macros:
+ return
+
for element in elements:
# HACK for elementtree, newer implementations (etree/lxml) won't
# require this parent_map data structure but elementtree does not
@@ -35,7 +64,6 @@
parent_map = dict((c, p) for p in element.getiterator() for c in p)
for expand_el in element.findall('.//expand'):
macro_name = expand_el.get('macro')
- print macros.keys()
macro_def = deepcopy(macros[macro_name]) # deepcopy needed?
yield_els = [yield_el for macro_def_el in macro_def for yield_el in macro_def_el.findall('.//yield')]
@@ -75,7 +103,7 @@
# type shortcuts (<xml> is a shortcut for <macro type="xml",
# likewise for <template>.
- typed_tag = ['xml']
+ typed_tag = ['template', 'xml']
for tag in typed_tag:
macro_els = []
if macros_el:
@@ -260,5 +288,20 @@
</xml></macros></tool>''')
- xml = tool_dir.load(preprocess=True)
+ xml = tool_dir.load()
assert xml.find("inputs") is not None
+
+ with TestToolDirectory() as tool_dir:
+ tool_dir.write('''
+<tool>
+ <command interpreter="python">tool_wrapper.py
+ #include source=$tool_params
+ </command>
+ <macros>
+ <template name="tool_params">-a 1 -b 2</template>
+ </macros>
+</tool>
+''')
+ xml = tool_dir.load()
+ params_dict = template_macro_params(xml.getroot())
+ assert params_dict['tool_params'] == "-a 1 -b 2"
https://bitbucket.org/galaxy/galaxy-central/commits/dd8e910f6d30/
Changeset: dd8e910f6d30
User: jmchilton
Date: 2013-03-22 06:41:08
Summary: Add GATK macros file and import in each wrapper.
Affected #: 17 files
diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/analyze_covariates.xml
--- a/tools/gatk/analyze_covariates.xml
+++ b/tools/gatk/analyze_covariates.xml
@@ -3,6 +3,9 @@
<requirements><requirement type="package" version="1.4">gatk</requirement></requirements>
+ <macros>
+ <import>gatk_macros.xml</import>
+ </macros><command interpreter="python">gatk_wrapper.py
--max_jvm_heap_fraction "1"
--stdout "${output_log}"
diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/count_covariates.xml
--- a/tools/gatk/count_covariates.xml
+++ b/tools/gatk/count_covariates.xml
@@ -4,6 +4,9 @@
<requirement type="package" version="1.4">gatk</requirement><requirement type="package">samtools</requirement></requirements>
+ <macros>
+ <import>gatk_macros.xml</import>
+ </macros><command interpreter="python">gatk_wrapper.py
--max_jvm_heap_fraction "1"
--stdout "${output_log}"
diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/depth_of_coverage.xml
--- a/tools/gatk/depth_of_coverage.xml
+++ b/tools/gatk/depth_of_coverage.xml
@@ -4,6 +4,9 @@
<requirement type="package" version="1.4">gatk</requirement><requirement type="package">samtools</requirement></requirements>
+ <macros>
+ <import>gatk_macros.xml</import>
+ </macros><command interpreter="python">gatk_wrapper.py
--max_jvm_heap_fraction "1"
--stdout "${output_log}"
diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/gatk_macros.xml
--- /dev/null
+++ b/tools/gatk/gatk_macros.xml
@@ -0,0 +1,2 @@
+<macros>
+</macros>
\ No newline at end of file
diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/indel_realigner.xml
--- a/tools/gatk/indel_realigner.xml
+++ b/tools/gatk/indel_realigner.xml
@@ -4,6 +4,9 @@
<requirement type="package" version="1.4">gatk</requirement><requirement type="package">samtools</requirement></requirements>
+ <macros>
+ <import>gatk_macros.xml</import>
+ </macros><command interpreter="python">gatk_wrapper.py
--max_jvm_heap_fraction "1"
--stdout "${output_log}"
diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/print_reads.xml
--- a/tools/gatk/print_reads.xml
+++ b/tools/gatk/print_reads.xml
@@ -4,6 +4,9 @@
<requirement type="package" version="1.4">gatk</requirement><requirement type="package">samtools</requirement></requirements>
+ <macros>
+ <import>gatk_macros.xml</import>
+ </macros><command interpreter="python">gatk_wrapper.py
--max_jvm_heap_fraction "1"
--stdout "${output_log}"
diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/realigner_target_creator.xml
--- a/tools/gatk/realigner_target_creator.xml
+++ b/tools/gatk/realigner_target_creator.xml
@@ -4,6 +4,9 @@
<requirement type="package" version="1.3">gatk</requirement><requirement type="package">samtools</requirement></requirements>
+ <macros>
+ <import>gatk_macros.xml</import>
+ </macros><command interpreter="python">gatk_wrapper.py
--max_jvm_heap_fraction "1"
--stdout "${output_log}"
diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/table_recalibration.xml
--- a/tools/gatk/table_recalibration.xml
+++ b/tools/gatk/table_recalibration.xml
@@ -4,6 +4,9 @@
<requirement type="package" version="1.4">gatk</requirement><requirement type="package">samtools</requirement></requirements>
+ <macros>
+ <import>gatk_macros.xml</import>
+ </macros><command interpreter="python">gatk_wrapper.py
--max_jvm_heap_fraction "1"
--stdout "${output_log}"
diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/unified_genotyper.xml
--- a/tools/gatk/unified_genotyper.xml
+++ b/tools/gatk/unified_genotyper.xml
@@ -4,6 +4,9 @@
<requirement type="package" version="1.4">gatk</requirement><requirement type="package">samtools</requirement></requirements>
+ <macros>
+ <import>gatk_macros.xml</import>
+ </macros><command interpreter="python">gatk_wrapper.py
--max_jvm_heap_fraction "1"
--stdout "${output_log}"
diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/variant_annotator.xml
--- a/tools/gatk/variant_annotator.xml
+++ b/tools/gatk/variant_annotator.xml
@@ -4,6 +4,9 @@
<requirement type="package" version="1.4">gatk</requirement><requirement type="package">samtools</requirement></requirements>
+ <macros>
+ <import>gatk_macros.xml</import>
+ </macros><command interpreter="python">gatk_wrapper.py
--max_jvm_heap_fraction "1"
--stdout "${output_log}"
diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/variant_apply_recalibration.xml
--- a/tools/gatk/variant_apply_recalibration.xml
+++ b/tools/gatk/variant_apply_recalibration.xml
@@ -3,6 +3,9 @@
<requirements><requirement type="package" version="1.4">gatk</requirement></requirements>
+ <macros>
+ <import>gatk_macros.xml</import>
+ </macros><command interpreter="python">gatk_wrapper.py
--max_jvm_heap_fraction "1"
--stdout "${output_log}"
diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/variant_combine.xml
--- a/tools/gatk/variant_combine.xml
+++ b/tools/gatk/variant_combine.xml
@@ -3,6 +3,9 @@
<requirements><requirement type="package" version="1.4">gatk</requirement></requirements>
+ <macros>
+ <import>gatk_macros.xml</import>
+ </macros><command interpreter="python">gatk_wrapper.py
--max_jvm_heap_fraction "1"
--stdout "${output_log}"
diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/variant_eval.xml
--- a/tools/gatk/variant_eval.xml
+++ b/tools/gatk/variant_eval.xml
@@ -3,6 +3,9 @@
<requirements><requirement type="package" version="1.4">gatk</requirement></requirements>
+ <macros>
+ <import>gatk_macros.xml</import>
+ </macros><command interpreter="python">gatk_wrapper.py
#from binascii import hexlify
--max_jvm_heap_fraction "1"
diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/variant_filtration.xml
--- a/tools/gatk/variant_filtration.xml
+++ b/tools/gatk/variant_filtration.xml
@@ -3,6 +3,9 @@
<requirements><requirement type="package" version="1.4">gatk</requirement></requirements>
+ <macros>
+ <import>gatk_macros.xml</import>
+ </macros><command interpreter="python">gatk_wrapper.py
#from binascii import hexlify
--max_jvm_heap_fraction "1"
diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/variant_recalibrator.xml
--- a/tools/gatk/variant_recalibrator.xml
+++ b/tools/gatk/variant_recalibrator.xml
@@ -3,6 +3,9 @@
<requirements><requirement type="package" version="1.4">gatk</requirement></requirements>
+ <macros>
+ <import>gatk_macros.xml</import>
+ </macros><command interpreter="python">gatk_wrapper.py
--max_jvm_heap_fraction "1"
--stdout "${output_log}"
diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/variant_select.xml
--- a/tools/gatk/variant_select.xml
+++ b/tools/gatk/variant_select.xml
@@ -3,6 +3,9 @@
<requirements><requirement type="package" version="1.4">gatk</requirement></requirements>
+ <macros>
+ <import>gatk_macros.xml</import>
+ </macros><command interpreter="python">gatk_wrapper.py
#from binascii import hexlify
--max_jvm_heap_fraction "1"
diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/variants_validate.xml
--- a/tools/gatk/variants_validate.xml
+++ b/tools/gatk/variants_validate.xml
@@ -3,6 +3,9 @@
<requirements><requirement type="package" version="1.4">gatk</requirement></requirements>
+ <macros>
+ <import>gatk_macros.xml</import>
+ </macros><command interpreter="python">gatk_wrapper.py
--max_jvm_heap_fraction "1"
--stdout "${output_log}"
https://bitbucket.org/galaxy/galaxy-central/commits/1857f97b6772/
Changeset: 1857f97b6772
User: jmchilton
Date: 2013-03-22 06:41:08
Summary: Create shared cheetah template variable for gatk standard options.
Affected #: 16 files
Diff not available.
https://bitbucket.org/galaxy/galaxy-central/commits/0be733a1029e/
Changeset: 0be733a1029e
User: jmchilton
Date: 2013-03-22 06:41:08
Summary: Refactor big GATK parameter type conditional into shared macro for 15 GATK tools.
Affected #: 16 files
Diff not available.
https://bitbucket.org/galaxy/galaxy-central/commits/83ff3052f4b6/
Changeset: 83ff3052f4b6
User: jmchilton
Date: 2013-03-22 06:41:08
Summary: Implement another macro type (token) that performs direct string substition on element text.
Affected #: 1 file
Diff not available.
https://bitbucket.org/galaxy/galaxy-central/commits/6ec03dde4504/
Changeset: 6ec03dde4504
User: jmchilton
Date: 2013-03-22 06:41:08
Summary: Extend token macro expansion to include XML attributes. Optimize expansion performance slightly.
Affected #: 1 file
Diff not available.
https://bitbucket.org/galaxy/galaxy-central/commits/ca5333e3daaf/
Changeset: ca5333e3daaf
User: jmchilton
Date: 2013-03-22 06:41:08
Summary: Refactor GATK wrappers to use token macros to eliminate duplication in citation section.
Affected #: 17 files
Diff not available.
https://bitbucket.org/galaxy/galaxy-central/commits/c28e4c6eced2/
Changeset: c28e4c6eced2
User: jmchilton
Date: 2013-03-22 06:41:08
Summary: Covert more duplicated GATK wrapper code to macros.
Affected #: 16 files
Diff not available.
https://bitbucket.org/galaxy/galaxy-central/commits/71caf4b3d201/
Changeset: 71caf4b3d201
User: jmchilton
Date: 2013-03-22 06:41:08
Summary: Remove unused code in lib/galaxy/tools/loader.py
Affected #: 1 file
Diff not available.
https://bitbucket.org/galaxy/galaxy-central/commits/2c39e7cb976f/
Changeset: 2c39e7cb976f
User: jmchilton
Date: 2013-03-31 19:39:20
Summary: Tool Macros: Added test case for doubly recursive macros. Implement bug fix and refactor to simplify things and make problem/fix more obvious.
Affected #: 1 file
Diff not available.
https://bitbucket.org/galaxy/galaxy-central/commits/8fc56b85e0a5/
Changeset: 8fc56b85e0a5
User: jgoecks
Date: 2013-04-08 23:10:21
Summary: Merged in galaxyp/galaxy-central-parallelism-refactorings (pull request #140)
Improvements to Tool XML Macroing System
Affected #: 19 files
Diff not available.
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/d7f37a2fe690/
Changeset: d7f37a2fe690
Branch: stable
User: natefoo
Date: 2013-04-08 18:28:46
Summary: Added tag security_2013.04.08 for changeset 2cc8d10988e0
Affected #: 1 file
diff -r 04c85ce163d3fb330c80fe61db4755cc446dd244 -r d7f37a2fe69089c97c4d121287736c5c15f37795 .hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -1,3 +1,4 @@
a4113cc1cb5eaa68091c9a73375f00555b66dd11 release_2013.01.13
1c717491139269651bb59687563da9410b84c65d release_2013.02.08
75f09617abaadbc8cc732bb8ee519decaeb56ea7 release_2013.04.01
+2cc8d10988e03257dc7b97f8bb332c7df745d1dd security_2013.04.08
https://bitbucket.org/galaxy/galaxy-central/commits/788cd3d06541/
Changeset: 788cd3d06541
User: natefoo
Date: 2013-04-08 18:30:08
Summary: Merged stable.
Affected #: 1 file
diff -r 19f6e62bd372dc44e0d6b906fa2817122a5a57e4 -r 788cd3d065413b2611d82375a5d0d562775ea529 .hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -1,3 +1,4 @@
a4113cc1cb5eaa68091c9a73375f00555b66dd11 release_2013.01.13
1c717491139269651bb59687563da9410b84c65d release_2013.02.08
75f09617abaadbc8cc732bb8ee519decaeb56ea7 release_2013.04.01
+2cc8d10988e03257dc7b97f8bb332c7df745d1dd security_2013.04.08
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dannon: Add Reports runtime files to .hgignore
by commits-noreply@bitbucket.org 08 Apr '13
by commits-noreply@bitbucket.org 08 Apr '13
08 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/19f6e62bd372/
Changeset: 19f6e62bd372
User: dannon
Date: 2013-04-08 16:56:26
Summary: Add Reports runtime files to .hgignore
Affected #: 1 file
diff -r b12b245510bea4d59f485dbfdd663a47c5443d5c -r 19f6e62bd372dc44e0d6b906fa2817122a5a57e4 .hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -35,6 +35,11 @@
tool_shed_webapp.pid
hgweb.config*
+# Reports Runtime Files
+reports_webapp.lock
+reports_webapp.log
+reports_webapp.pid
+
# Config files
universe_wsgi.ini
reports_wsgi.ini
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: guerler: Inserted a button for trackster visualization into the BED-file data display viewer.
by commits-noreply@bitbucket.org 08 Apr '13
by commits-noreply@bitbucket.org 08 Apr '13
08 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/b12b245510be/
Changeset: b12b245510be
User: guerler
Date: 2013-04-08 16:19:37
Summary: Inserted a button for trackster visualization into the BED-file data display viewer.
Affected #: 4 files
diff -r cb25513c63cd7aa2ebd472e91109c96276ed6d9d -r b12b245510bea4d59f485dbfdd663a47c5443d5c lib/galaxy/webapps/galaxy/controllers/visualization.py
--- a/lib/galaxy/webapps/galaxy/controllers/visualization.py
+++ b/lib/galaxy/webapps/galaxy/controllers/visualization.py
@@ -696,6 +696,11 @@
# Get dataset to add.
new_dataset_id = kwargs.get( "dataset_id", None )
+
+ # Get gene region
+ new_chrom = kwargs.get( "chrom", None )
+ new_start = kwargs.get( "start", 0 )
+ new_end = kwargs.get( "end", 0 )
# Set up new browser if no id provided.
if not id:
@@ -706,7 +711,7 @@
if dbkey == '?':
dbkey = kwargs.get( "dbkey", None )
- return trans.fill_template( "tracks/browser.mako", config={},
+ return trans.fill_template( "tracks/browser.mako", viewport_config={"chrom" : new_chrom, "start" : int(new_start), "end" : int(new_end)},
add_dataset=new_dataset_id,
default_dbkey=dbkey )
diff -r cb25513c63cd7aa2ebd472e91109c96276ed6d9d -r b12b245510bea4d59f485dbfdd663a47c5443d5c static/scripts/mvc/data.js
--- a/static/scripts/mvc/data.js
+++ b/static/scripts/mvc/data.js
@@ -20,7 +20,7 @@
},
initialize: function() {
- // -- Create and initialize metadata. --
+ // -- Create and initialize metadata. --
var metadata = new DatasetMetadata();
@@ -111,10 +111,8 @@
initialize: function(options) {},
- render: function() {
- // Add loading indicator div.
- this.$el.append( $('<div/>').attr('id', 'loading_indicator') );
-
+ render: function()
+ {
// Add data table and header.
var data_table = $('<table/>').attr({
id: 'content_table',
@@ -223,6 +221,121 @@
}
});
+/**
+ * Provides table-based, dynamic view of a bed dataset.
+ * NOTE: view's el must be in DOM already and provided when
+ * creating the view so that scrolling event can be attached
+ * to the correct container.
+ */
+var BedDatasetChunkedView = TabularDatasetChunkedView.extend(
+{
+ // gene region columns
+ col: {
+ chrom : null,
+ start : null,
+ end : null,
+ },
+
+ // url for trackster
+ url_viz : null,
+
+ // dataset id
+ dataset_id : null,
+
+ // backbone initialize
+ initialize: function (options)
+ {
+ // verify that metadata exists
+ var metadata = options.model.attributes.metadata.attributes;
+ if (typeof metadata.chromCol === "undefined" || typeof metadata.startCol === "undefined" || typeof metadata.endCol === "undefined")
+ console.log("BedDatasetChunkedView:initialize() : Metadata for column identification is missing.");
+ else
+ {
+ // read in columns
+ this.col.chrom = metadata.chromCol - 1;
+ this.col.start = metadata.startCol - 1;
+ this.col.end = metadata.endCol - 1;
+ }
+
+ // get dataset id
+ if (typeof options.model.attributes.id === "undefined")
+ console.log("BedDatasetChunkedView:initialize() : Dataset identification is missing.");
+ else
+ this.dataset_id = options.model.attributes.id;
+
+ // get url
+ if (typeof options.model.attributes.url_viz === "undefined")
+ console.log("BedDatasetChunkedView:initialize() : Url for visualization controller is missing.");
+ else
+ this.url_viz = options.model.attributes.url_viz;
+ },
+
+ // backbone events
+ events:
+ {
+ 'mouseover tr' : 'btn_viz_show',
+ 'mouseleave' : 'btn_viz_hide'
+ },
+
+ // show button
+ btn_viz_show: function (e)
+ {
+ // get selected data line
+ var row = $(e.target).parent();
+
+ // get target gene region
+ var btn_viz_pars = {
+ dataset_id : this.dataset_id,
+ chrom : row.children().eq(this.col.chrom).html(),
+ start : row.children().eq(this.col.start).html(),
+ end : row.children().eq(this.col.end).html()
+ };
+
+ // verify that location has been found
+ if (btn_viz_pars.chrom != "")
+ {
+ // get button position
+ var offset = row.offset();
+ var left = offset.left - 10;
+ var top = offset.top;
+
+ // update css
+ $('#btn_viz').css({'position': 'fixed', 'top': top + 'px', 'left': left + 'px'});
+ $('#btn_viz').attr('href', "javascript:window.parent.location.href = '" + this.url_viz + "/trackster?" + $.param(btn_viz_pars) + "';");
+
+ // show the button
+ $('#btn_viz').show();
+ }
+ },
+
+ // hide button
+ btn_viz_hide: function (e)
+ {
+ // hide button from screen
+ $('#btn_viz').hide();
+ },
+
+ // render frame
+ render: function()
+ {
+ // render the icon from template
+ var btn_viz = new IconButtonView({ model : new IconButton({
+ title : 'Visualize',
+ icon_class : 'chart_curve',
+ id : 'btn_viz'
+ })});
+
+ // add it to the screen
+ this.$el.append(btn_viz.render().$el);
+
+ // hide the button
+ $('#btn_viz').hide();
+
+ // call parent render
+ TabularDatasetChunkedView.prototype.render.call(this);
+ }
+});
+
// -- Utility functions. --
/**
@@ -252,10 +365,19 @@
var view_div = $('<div/>').appendTo(parent_elt);
// Create view with model, render, and return.
- return new TabularDatasetChunkedView({
- el: view_div,
- model: new TabularDataset(dataset_config)
- }).render();
+ if (dataset_config.data_type == 'bed')
+ // bed datatype viewer
+ return new BedDatasetChunkedView({
+ el: view_div,
+ model: new TabularDataset(dataset_config)
+ }).render();
+ else
+ // default viewer
+ return new TabularDatasetChunkedView({
+ el: view_div,
+ model: new TabularDataset(dataset_config)
+ }).render();
+
};
return {
@@ -263,6 +385,7 @@
TabularDataset: TabularDataset,
DatasetCollection: DatasetCollection,
TabularDatasetChunkedView: TabularDatasetChunkedView,
+ BedDatasetChunkedView: BedDatasetChunkedView,
createTabularDatasetChunkedView: createTabularDatasetChunkedView
};
diff -r cb25513c63cd7aa2ebd472e91109c96276ed6d9d -r b12b245510bea4d59f485dbfdd663a47c5443d5c templates/webapps/galaxy/dataset/tabular_chunked.mako
--- a/templates/webapps/galaxy/dataset/tabular_chunked.mako
+++ b/templates/webapps/galaxy/dataset/tabular_chunked.mako
@@ -6,6 +6,8 @@
<%def name="javascripts()">
${parent.javascripts()}
${h.js( "libs/require" )}
+ ${h.templates("helpers-common-templates")}
+
<script type="text/javascript">
require.config({
baseUrl: "${h.url_for('/static/scripts')}",
@@ -19,7 +21,8 @@
data.createTabularDatasetChunkedView(
_.extend( ${h.to_json_string( trans.security.encode_dict_ids( dataset.get_api_value() ) )},
{
- chunk_url: "${h.url_for( controller='/dataset', action='display',
+ url_viz: "${h.url_for( controller='/visualization')}",
+ chunk_url: "${h.url_for( controller='/dataset', action='display',
dataset_id=trans.security.encode_id( dataset.id ))}",
first_data_chunk: ${chunk}
}
diff -r cb25513c63cd7aa2ebd472e91109c96276ed6d9d -r b12b245510bea4d59f485dbfdd663a47c5443d5c templates/webapps/galaxy/tracks/browser.mako
--- a/templates/webapps/galaxy/tracks/browser.mako
+++ b/templates/webapps/galaxy/tracks/browser.mako
@@ -89,7 +89,7 @@
container: $("#browser-container"),
name: $("#new-title").val(),
dbkey: $("#new-dbkey").val()
- } );
+ }, JSON.parse('${ h.to_json_string( viewport_config ) }'));
view.editor = true;
init_editor();
set_up_router({view: view});
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dannon: Fixes logout with remote_user=True (almost, logout.mako still uses the wrong template -- bug introduced in 56de0ee7932f)
by commits-noreply@bitbucket.org 05 Apr '13
by commits-noreply@bitbucket.org 05 Apr '13
05 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/04c85ce163d3/
Changeset: 04c85ce163d3
Branch: stable
User: dannon
Date: 2013-04-04 16:19:17
Summary: Fixes logout with remote_user=True (almost, logout.mako still uses the wrong template -- bug introduced in 56de0ee7932f)
Affected #: 1 file
diff -r df5bad7a86dfd7af48a57a593028a1520c18a69b -r 04c85ce163d3fb330c80fe61db4755cc446dd244 templates/webapps/galaxy/base_panels.mako
--- a/templates/webapps/galaxy/base_panels.mako
+++ b/templates/webapps/galaxy/base_panels.mako
@@ -157,10 +157,7 @@
else:
menu_options.append( [ _('Preferences'), h.url_for( controller='/user', action='index', cntrller='user' ), "galaxy_main" ] )
menu_options.append( [ 'Custom Builds', h.url_for( controller='/user', action='dbkeys' ), "galaxy_main" ] )
- if app.config.require_login:
- logout_url = h.url_for( controller='/root', action='index', m_c='user', m_a='logout' )
- else:
- logout_url = h.url_for( controller='/user', action='logout' )
+ logout_url = h.url_for( controller='/user', action='logout' )
menu_options.append( [ 'Logout', logout_url, "_top" ] )
menu_options.append( None )
menu_options.append( [ _('Saved Histories'), h.url_for( controller='/history', action='list' ), "galaxy_main" ] )
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
9 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/52351e7d6433/
Changeset: 52351e7d6433
User: jmchilton
Date: 2013-03-26 16:30:46
Summary: Fix typo related to lwr in job_conf.xml.sample_advanced.
Affected #: 1 file
diff -r 504264153fe1804c409c775be2c6db3f160b8fe2 -r 52351e7d6433973cac61a9822f20559560e10491 job_conf.xml.sample_advanced
--- a/job_conf.xml.sample_advanced
+++ b/job_conf.xml.sample_advanced
@@ -7,7 +7,7 @@
<plugin id="local" type="runner" load="galaxy.jobs.runners.local:LocalJobRunner"/><plugin id="pbs" type="runner" load="galaxy.jobs.runners.pbs:PBSJobRunner" workers="2"/><plugin id="drmaa" type="runner" load="galaxy.jobs.runners.drmaa:DRMAARunner"/>
- <plugin id="lwr" type="runner" load="galaxy.jobs.runners.lwr.LwrJobRunner" /><!-- https://lwr.readthedocs.org -->
+ <plugin id="lwr" type="runner" load="galaxy.jobs.runners.lwr:LwrJobRunner" /><!-- https://lwr.readthedocs.org --><plugin id="cli" type="runner" load="galaxy.jobs.runners.cli:ShellJobRunner" /><plugin id="condor" type="runner" load="galaxy.jobs.runners.condor:CondorJobRunner" /></plugins>
https://bitbucket.org/galaxy/galaxy-central/commits/7aba79e8068c/
Changeset: 7aba79e8068c
User: jmchilton
Date: 2013-03-26 17:16:30
Summary: Fix returning destination id from dynamic job runners, JobMapper was using self.app.job_config but it didn't have access to app, now JobWrapper is passing job_config into JobMapper which in turn is storing it.
Affected #: 2 files
diff -r 52351e7d6433973cac61a9822f20559560e10491 -r 7aba79e8068c658fe7a1a7f412f999ac276c1940 lib/galaxy/jobs/__init__.py
--- a/lib/galaxy/jobs/__init__.py
+++ b/lib/galaxy/jobs/__init__.py
@@ -580,7 +580,7 @@
self.tool_provided_job_metadata = None
# Wrapper holding the info required to restore and clean up from files used for setting metadata externally
self.external_output_metadata = metadata.JobExternalOutputMetadataWrapper( job )
- self.job_runner_mapper = JobRunnerMapper( self, queue.dispatcher.url_to_destination )
+ self.job_runner_mapper = JobRunnerMapper( self, queue.dispatcher.url_to_destination, self.app.job_config )
self.params = None
if job.params:
self.params = from_json_string( job.params )
diff -r 52351e7d6433973cac61a9822f20559560e10491 -r 7aba79e8068c658fe7a1a7f412f999ac276c1940 lib/galaxy/jobs/mapper.py
--- a/lib/galaxy/jobs/mapper.py
+++ b/lib/galaxy/jobs/mapper.py
@@ -21,9 +21,10 @@
(in the form of job_wrappers) to job runner url strings.
"""
- def __init__( self, job_wrapper, url_to_destination ):
+ def __init__( self, job_wrapper, url_to_destination, job_config ):
self.job_wrapper = job_wrapper
self.url_to_destination = url_to_destination
+ self.job_config = job_config
self.rule_modules = self.__get_rule_modules( )
def __get_rule_modules( self ):
@@ -135,7 +136,7 @@
if '://' in rval:
return self.__convert_url_to_destination(rval)
else:
- return self.app.job_config.get_destination(rval)
+ return self.job_config.get_destination(rval)
elif isinstance(rval, galaxy.jobs.JobDestination):
# If the function generated a JobDestination, we'll use that
# destination directly. However, for advanced job limiting, a
https://bitbucket.org/galaxy/galaxy-central/commits/150660f80ca1/
Changeset: 150660f80ca1
User: jmchilton
Date: 2013-03-26 17:18:36
Summary: Slight optimization in JobMapper, no need to prefetch rules modules and hit the disk for every job mapper if 99.9% of them are never going to use rules.
Affected #: 1 file
diff -r 7aba79e8068c658fe7a1a7f412f999ac276c1940 -r 150660f80ca10c1d31b0d60ca2e9ae3f9fa8dbee lib/galaxy/jobs/mapper.py
--- a/lib/galaxy/jobs/mapper.py
+++ b/lib/galaxy/jobs/mapper.py
@@ -25,7 +25,6 @@
self.job_wrapper = job_wrapper
self.url_to_destination = url_to_destination
self.job_config = job_config
- self.rule_modules = self.__get_rule_modules( )
def __get_rule_modules( self ):
unsorted_module_names = self.__get_rule_module_names( )
@@ -119,7 +118,7 @@
def __last_rule_module_with_function( self, function_name ):
# self.rule_modules is sorted in reverse order, so find first
# wiht function
- for rule_module in self.rule_modules:
+ for rule_module in self.__get_rule_modules( ):
if hasattr( rule_module, function_name ):
return rule_module
return None
https://bitbucket.org/galaxy/galaxy-central/commits/9bc03c707d69/
Changeset: 9bc03c707d69
User: jmchilton
Date: 2013-03-26 17:29:23
Summary: Cleanup/reworking of logic in JobMapper for handling multiple possible output types coming from dynamic rules. This is a little more pythonic in that it is making fewer assumptions about types. This is also slightly less code, reduces the number of return statements, etc....
Also removed the the #TODO: Test extensively, this has now been done.
Affected #: 1 file
diff -r 150660f80ca10c1d31b0d60ca2e9ae3f9fa8dbee -r 9bc03c707d69c165b07dcdc07ea9d60efd11d74a lib/galaxy/jobs/mapper.py
--- a/lib/galaxy/jobs/mapper.py
+++ b/lib/galaxy/jobs/mapper.py
@@ -128,27 +128,14 @@
if expand_type == "python":
expand_function_name = self.__determine_expand_function_name( destination )
expand_function = self.__get_expand_function( expand_function_name )
- rval = self.__invoke_expand_function( expand_function )
- # TODO: test me extensively
- if isinstance(rval, basestring):
- # If the function returned a string, check if it's a URL, convert if necessary
- if '://' in rval:
- return self.__convert_url_to_destination(rval)
+ job_destination = self.__invoke_expand_function( expand_function )
+ if not isinstance(job_destination, galaxy.jobs.JobDestination):
+ job_destination_rep = str(job_destination) # Should be either id or url
+ if '://' in job_destination_rep:
+ job_destination = self.__convert_url_to_destination(job_destination_rep)
else:
- return self.job_config.get_destination(rval)
- elif isinstance(rval, galaxy.jobs.JobDestination):
- # If the function generated a JobDestination, we'll use that
- # destination directly. However, for advanced job limiting, a
- # function may want to set the JobDestination's 'tags'
- # attribute so that limiting can be done on a destination tag.
- #id_or_tag = rval.get('id')
- #if rval.get('tags', None):
- # # functions that are generating destinations should only define one tag
- # id_or_tag = rval.get('tags')[0]
- #return id_or_tag, rval
- return rval
- else:
- raise Exception( 'Dynamic function returned a value that could not be understood: %s' % rval )
+ job_destination = self.job_config.get_destination(job_destination_rep)
+ return job_destination
elif expand_type is None:
raise Exception( 'Dynamic function type not specified (hint: add <param id="type">python</param> to your <destination>)' )
else:
https://bitbucket.org/galaxy/galaxy-central/commits/7cf608b34231/
Changeset: 7cf608b34231
User: jmchilton
Date: 2013-03-26 19:14:50
Summary: Dynamic job runner will take id of the tool as the python function if one is not specified. This extends that logic to handle newer tools (i.e. tool shed tools) that may have multiple ids. The most specific id with a corresponding function name will be used.
Affected #: 2 files
Diff not available.
https://bitbucket.org/galaxy/galaxy-central/commits/14a5aecf14cf/
Changeset: 14a5aecf14cf
User: jmchilton
Date: 2013-03-26 21:24:25
Summary: Specify `python` as default dynamic job runner type - simplifies configuration and documentation and other types cheetah, XML, etc... do not seem to be on the roadmap.
Affected #: 1 file
Diff not available.
https://bitbucket.org/galaxy/galaxy-central/commits/bdc4af97dbed/
Changeset: bdc4af97dbed
User: jmchilton
Date: 2013-03-27 21:19:57
Summary: Bug fix for recent changes to the LWR server's handling of config files.
Affected #: 1 file
Diff not available.
https://bitbucket.org/galaxy/galaxy-central/commits/f63846588983/
Changeset: f63846588983
User: jmchilton
Date: 2013-03-27 21:27:38
Summary: Small documentation update to reflect changes in 14a5aec.
Affected #: 1 file
Diff not available.
https://bitbucket.org/galaxy/galaxy-central/commits/cb25513c63cd/
Changeset: cb25513c63cd
User: natefoo
Date: 2013-04-05 23:05:41
Summary: Merged in jmchilton/galaxy-central-multi-input-tool-fixes-2 (pull request #143)
Affected #: 5 files
Diff not available.
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: controllers/root.default: have default return the same message as a 404 (HTTPNotFound)
by commits-noreply@bitbucket.org 05 Apr '13
by commits-noreply@bitbucket.org 05 Apr '13
05 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/e061edf06175/
Changeset: e061edf06175
User: carlfeberhard
Date: 2013-04-05 23:02:07
Summary: controllers/root.default: have default return the same message as a 404 (HTTPNotFound)
Affected #: 1 file
diff -r 438028ac0148d64f4b3f26e0137d443ac2df41f2 -r e061edf06175b8e2557f8dd286ff97f8e2e59d02 lib/galaxy/webapps/galaxy/controllers/root.py
--- a/lib/galaxy/webapps/galaxy/controllers/root.py
+++ b/lib/galaxy/webapps/galaxy/controllers/root.py
@@ -5,6 +5,8 @@
import urllib
import cgi
+from paste.httpexceptions import HTTPNotFound
+
from galaxy.web.base.controller import BaseUIController, UsesHistoryMixin, UsesHistoryDatasetAssociationMixin
from galaxy.model.item_attrs import UsesAnnotations
from galaxy import util, web
@@ -21,7 +23,7 @@
def default(self, trans, target1=None, target2=None, **kwd):
"""Called on any url that does not match a controller method.
"""
- return 'This link may not be followed from within Galaxy.'
+ raise HTTPNotFound( 'This link may not be followed from within Galaxy.' )
@web.expose
def index(self, trans, id=None, tool_id=None, mode=None, workflow_id=None, m_c=None, m_a=None, **kwd):
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dannon: Relocate TracksterConfig import in tools package to avoid circular import w/ visual_analytics that was preventing the reports app from functioning.
by commits-noreply@bitbucket.org 05 Apr '13
by commits-noreply@bitbucket.org 05 Apr '13
05 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/438028ac0148/
Changeset: 438028ac0148
User: dannon
Date: 2013-04-05 21:58:31
Summary: Relocate TracksterConfig import in tools package to avoid circular import w/ visual_analytics that was preventing the reports app from functioning.
Affected #: 1 file
diff -r b84e39f2b4db6d5e6a147b5cf66ca864d9491de8 -r 438028ac0148d64f4b3f26e0137d443ac2df41f2 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -54,7 +54,6 @@
from galaxy.util.none_like import NoneDataset
from galaxy.util.odict import odict
from galaxy.util.template import fill_template
-from galaxy.visualization.genome.visual_analytics import TracksterConfig
from galaxy.web import url_for
from galaxy.web.form_builder import SelectField
from tool_shed.util import shed_util_common
@@ -1289,6 +1288,7 @@
# Trackster configuration.
trackster_conf = root.find( "trackster_conf" )
if trackster_conf is not None:
+ from galaxy.visualization.genome.visual_analytics import TracksterConfig
self.trackster_conf = TracksterConfig.parse( trackster_conf )
else:
self.trackster_conf = None
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dannon: Relocate TracksterConfig import in tools package to avoid circular import w/ visual_analytics that was preventing the reports app from functioning.
by commits-noreply@bitbucket.org 05 Apr '13
by commits-noreply@bitbucket.org 05 Apr '13
05 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/df5bad7a86df/
Changeset: df5bad7a86df
Branch: stable
User: dannon
Date: 2013-04-05 21:58:31
Summary: Relocate TracksterConfig import in tools package to avoid circular import w/ visual_analytics that was preventing the reports app from functioning.
Affected #: 1 file
diff -r 2cc8d10988e03257dc7b97f8bb332c7df745d1dd -r df5bad7a86dfd7af48a57a593028a1520c18a69b lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -54,7 +54,6 @@
from galaxy.util.none_like import NoneDataset
from galaxy.util.odict import odict
from galaxy.util.template import fill_template
-from galaxy.visualization.genome.visual_analytics import TracksterConfig
from galaxy.web import url_for
from galaxy.web.form_builder import SelectField
from tool_shed.util import shed_util_common
@@ -1289,6 +1288,7 @@
# Trackster configuration.
trackster_conf = root.find( "trackster_conf" )
if trackster_conf is not None:
+ from galaxy.visualization.genome.visual_analytics import TracksterConfig
self.trackster_conf = TracksterConfig.parse( trackster_conf )
else:
self.trackster_conf = None
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: do not fetch display apps if there are no hdas yet
by commits-noreply@bitbucket.org 05 Apr '13
by commits-noreply@bitbucket.org 05 Apr '13
05 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/b84e39f2b4db/
Changeset: b84e39f2b4db
User: carlfeberhard
Date: 2013-04-05 20:01:59
Summary: history panel: do not fetch display apps if there are no hdas yet
Affected #: 2 files
diff -r ac4f3e90b6e39b3329eb3f59fa9cce8534e0505a -r b84e39f2b4db6d5e6a147b5cf66ca864d9491de8 static/scripts/mvc/history/history-model.js
--- a/static/scripts/mvc/history/history-model.js
+++ b/static/scripts/mvc/history/history-model.js
@@ -60,7 +60,9 @@
this.hdas.reset( initialHdas );
this.checkForUpdates();
//TODO: don't call if force_history_refresh
- this.updateDisplayApplications();
+ if( this.hdas.length > 0 ){
+ this.updateDisplayApplications();
+ }
// handle errors in initialHdas
//TODO: errors from the api shouldn't be plain strings...
diff -r ac4f3e90b6e39b3329eb3f59fa9cce8534e0505a -r b84e39f2b4db6d5e6a147b5cf66ca864d9491de8 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=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,annotation:null,message:null},urlRoot:"api/histories/",url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b){if(_.isArray(b)){this.hdas.reset(b);this.checkForUpdates();this.updateDisplayApplications()}else{if(_.isString(b)&&(b.match(/error/i))){alert(_l("Error loading bootstrapped history")+":\n"+b)}}}this.hdas.bind("state:ready",function(d,f,c){if(d.get("force_history_refresh")){var e=this;setTimeout(function(){e.stateUpdater()},History.UPDATE_DELAY)}},this)},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.trigger("loaded:user",e[0]);b.trigger("loaded",d[0])}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.hdaIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();b.trigger("loaded:hdas",d);if(c){callback(b)}})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}else{this.trigger("ready")}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.fetchHdaUpdates(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},History.UPDATE_DELAY)}else{c.trigger("ready")}}).error(function(f,d,e){if(!((f.readyState===0)&&(f.status===0))){alert(_l("Error getting history updates from the server:")+"\n"+e);c.log("stateUpdater error:",e,"responseText:",f.responseText)}})},fetchHdaUpdates:function(b){var a=this;jQuery.ajax({url:this.url()+"/contents?"+jQuery.param({ids:b.join(",")}),error:function(h,c,d){if((h.readyState===0)&&(h.status===0)){return}var f=JSON.parse(h.responseText);if(_.isArray(f)){var e=_.groupBy(f,function(i){if(_.has(i,"error")){return"errored"}return"ok"});a.log("fetched, errored datasets:",e.errored);a.updateHdas(f)}else{var g=_l("ERROR updating hdas from api history contents")+": ";a.log(g,b,h,c,d,f);alert(g+b.join(","))}},success:function(d,c,e){a.log(a+".fetchHdaUpdates, success:",c,e);a.updateHdas(d)}})},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)},updateDisplayApplications:function(a){this.log(this+"updateDisplayApplications:",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(e,d,f){c.hdas.set(e)},error:function(g,d,e){if(!((g.readyState===0)&&(g.status===0))){var f="Error fetching display applications, "+a+":"+(g.responseText||e);Galaxy.show_modal("History panel error",f,{Ok:function(){Galaxy.hide_modal()}});this.log(f)}}})},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=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,annotation:null,message:null},urlRoot:"api/histories/",url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b){if(_.isArray(b)){this.hdas.reset(b);this.checkForUpdates();if(this.hdas.length>0){this.updateDisplayApplications()}}else{if(_.isString(b)&&(b.match(/error/i))){alert(_l("Error loading bootstrapped history")+":\n"+b)}}}this.hdas.bind("state:ready",function(d,f,c){if(d.get("force_history_refresh")){var e=this;setTimeout(function(){e.stateUpdater()},History.UPDATE_DELAY)}},this)},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.trigger("loaded:user",e[0]);b.trigger("loaded",d[0])}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.hdaIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();b.trigger("loaded:hdas",d);if(c){callback(b)}})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}else{this.trigger("ready")}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.fetchHdaUpdates(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},History.UPDATE_DELAY)}else{c.trigger("ready")}}).error(function(f,d,e){if(!((f.readyState===0)&&(f.status===0))){alert(_l("Error getting history updates from the server:")+"\n"+e);c.log("stateUpdater error:",e,"responseText:",f.responseText)}})},fetchHdaUpdates:function(b){var a=this;jQuery.ajax({url:this.url()+"/contents?"+jQuery.param({ids:b.join(",")}),error:function(h,c,d){if((h.readyState===0)&&(h.status===0)){return}var f=JSON.parse(h.responseText);if(_.isArray(f)){var e=_.groupBy(f,function(i){if(_.has(i,"error")){return"errored"}return"ok"});a.log("fetched, errored datasets:",e.errored);a.updateHdas(f)}else{var g=_l("ERROR updating hdas from api history contents")+": ";a.log(g,b,h,c,d,f);alert(g+b.join(","))}},success:function(d,c,e){a.log(a+".fetchHdaUpdates, success:",c,e);a.updateHdas(d)}})},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)},updateDisplayApplications:function(a){this.log(this+"updateDisplayApplications:",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(e,d,f){c.hdas.set(e)},error:function(g,d,e){if(!((g.readyState===0)&&(g.status===0))){var f="Error fetching display applications, "+a+":"+(g.responseText||e);Galaxy.show_modal("History panel error",f,{Ok:function(){Galaxy.hide_modal()}});this.log(f)}}})},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
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