galaxy-commits
Threads by month
- ----- 2026 -----
- 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: Datatypes: remove mutable defaults from function definitions
by commits-noreply@bitbucket.org 23 Oct '13
by commits-noreply@bitbucket.org 23 Oct '13
23 Oct '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/c3179a238f97/
Changeset: c3179a238f97
User: carlfeberhard
Date: 2013-10-23 19:06:50
Summary: Datatypes: remove mutable defaults from function definitions
Affected #: 1 file
diff -r e66076ed4678c1ad15db09c1d220a624e2047a79 -r c3179a238f97fdf7b1f159b32d276a4a596a7e9e lib/galaxy/datatypes/metadata.py
--- a/lib/galaxy/datatypes/metadata.py
+++ b/lib/galaxy/datatypes/metadata.py
@@ -5,7 +5,6 @@
from galaxy import eggs
eggs.require("simplejson")
-
import copy
import cPickle
import logging
@@ -37,10 +36,12 @@
"""
def __init__( self, target ):
self.target = target
+
def __call__( self, *args, **kwargs ):
class_locals = sys._getframe( 1 ).f_locals #get the locals dictionary of the frame object one down in the call stack (i.e. the Datatype class calling MetadataElement)
statements = class_locals.setdefault( STATEMENTS, [] ) #get and set '__galaxy_statments__' to an empty list if not in locals dict
statements.append( ( self, args, kwargs ) ) #add Statement containing info to populate a MetadataElementSpec
+
@classmethod
def process( cls, element ):
for statement, args, kwargs in getattr( element, STATEMENTS, [] ):
@@ -59,29 +60,38 @@
#initialize dict if needed
if self.parent._metadata is None:
self.parent._metadata = {}
+
def get_parent( self ):
if "_parent" in self.__dict__:
return self.__dict__["_parent"]()
return None
+
def set_parent( self, parent ):
self.__dict__["_parent"] = weakref.ref( parent ) # use weakref to prevent a circular reference interfering with garbage collection: hda/lda (parent) <--> MetadataCollection (self) ; needs to be hashable, so cannot use proxy.
parent = property( get_parent, set_parent )
+
@property
def spec( self ):
return self.parent.datatype.metadata_spec
+
def __iter__( self ):
return self.parent._metadata.__iter__()
+
def get( self, key, default=None ):
try:
return self.__getattr__( key ) or default
except:
return default
+
def items(self):
return iter( [ ( k, self.get( k ) ) for k in self.spec.iterkeys() ] )
+
def __str__(self):
return dict( self.items() ).__str__()
+
def __nonzero__( self ):
return bool( self.parent._metadata )
+
def __getattr__( self, name ):
if name in self.spec:
if name in self.parent._metadata:
@@ -89,6 +99,7 @@
return self.spec[name].wrap( self.spec[name].default, object_session( self.parent ) )
if name in self.parent._metadata:
return self.parent._metadata[name]
+
def __setattr__( self, name, value ):
if name == "parent":
return self.set_parent( value )
@@ -97,14 +108,17 @@
self.parent._metadata[name] = self.spec[name].unwrap( value )
else:
self.parent._metadata[name] = value
+
def element_is_set( self, name ):
return bool( self.parent._metadata.get( name, False ) )
+
def get_html_by_name( self, name, **kwd ):
if name in self.spec:
rval = self.spec[name].param.get_html( value=getattr( self, name ), context=self, **kwd )
if rval is None:
return self.spec[name].no_value
return rval
+
def make_dict_copy( self, to_copy ):
"""Makes a deep copy of input iterable to_copy according to self.spec"""
rval = {}
@@ -112,6 +126,7 @@
if key in self.spec:
rval[key] = self.spec[key].param.make_copy( value, target_context=self, source_context=to_copy )
return rval
+
def from_JSON_dict( self, filename ):
dataset = self.parent
log.debug( 'loading metadata from file for: %s %s' % ( dataset.__class__.__name__, dataset.id ) )
@@ -123,6 +138,7 @@
#if the metadata value is not found in our externally set metadata but it has a value in the 'old'
#metadata associated with our dataset, we'll delete it from our dataset's metadata dict
del dataset._metadata[ name ]
+
def to_JSON_dict( self, filename ):
#galaxy.model.customtypes.json_encoder.encode()
meta_dict = {}
@@ -131,6 +147,7 @@
if name in dataset_meta_dict:
meta_dict[ name ] = spec.param.to_external_value( dataset_meta_dict[ name ] )
simplejson.dump( meta_dict, open( filename, 'wb+' ) )
+
def __getstate__( self ):
return None #cannot pickle a weakref item (self._parent), when data._metadata_collection is None, it will be recreated on demand
@@ -163,10 +180,12 @@
def __init__( self, spec ):
self.spec = spec
- def get_html_field( self, value=None, context={}, other_values={}, **kwd ):
+ def get_html_field( self, value=None, context=None, other_values=None, **kwd ):
+ context = context or {}
+ other_values = other_values or {}
return form_builder.TextField( self.spec.name, value=value )
- def get_html( self, value, context={}, other_values={}, **kwd ):
+ def get_html( self, value, context=None, other_values=None, **kwd ):
"""
The "context" is simply the metadata collection/bunch holding
this piece of metadata. This is passed in to allow for
@@ -175,6 +194,9 @@
example, a column assignment should validate against the
number of columns in the dataset.
"""
+ context = context or {}
+ other_values = other_values or {}
+
if self.spec.get("readonly"):
return value
if self.spec.get("optional"):
@@ -296,7 +318,10 @@
value = [value]
return ",".join( map( str, value ) )
- def get_html_field( self, value=None, context={}, other_values={}, values=None, **kwd ):
+ def get_html_field( self, value=None, context=None, other_values=None, values=None, **kwd ):
+ context = context or {}
+ other_values = other_values or {}
+
field = form_builder.SelectField( self.spec.name, multiple=self.multiple, display=self.spec.get("display") )
if self.values:
value_list = self.values
@@ -316,7 +341,10 @@
field.add_option( val, label, selected=False )
return field
- def get_html( self, value, context={}, other_values={}, values=None, **kwd ):
+ def get_html( self, value, context=None, other_values=None, values=None, **kwd ):
+ context = context or {}
+ other_values = other_values or {}
+
if self.spec.get("readonly"):
if value in [ None, [] ]:
return str( self.spec.no_value )
@@ -338,21 +366,30 @@
if not isinstance( value, list ): return [value]
return value
+
class DBKeyParameter( SelectParameter ):
- def get_html_field( self, value=None, context={}, other_values={}, values=None, **kwd):
+
+ def get_html_field( self, value=None, context=None, other_values=None, values=None, **kwd):
+ context = context or {}
+ other_values = other_values or {}
try:
values = kwd['trans'].db_builds
except KeyError:
pass
return super(DBKeyParameter, self).get_html_field( value, context, other_values, values, **kwd)
- def get_html( self, value=None, context={}, other_values={}, values=None, **kwd):
+
+ def get_html( self, value=None, context=None, other_values=None, values=None, **kwd):
+ context = context or {}
+ other_values = other_values or {}
try:
values = kwd['trans'].db_builds
except KeyError:
pass
return super(DBKeyParameter, self).get_html( value, context, other_values, values, **kwd)
+
class RangeParameter( SelectParameter ):
+
def __init__( self, spec ):
SelectParameter.__init__( self, spec )
# The spec must be set with min and max values
@@ -360,12 +397,18 @@
self.max = spec.get( "max" ) or 1
self.step = self.spec.get( "step" ) or 1
- def get_html_field( self, value=None, context={}, other_values={}, values=None, **kwd ):
+ def get_html_field( self, value=None, context=None, other_values=None, values=None, **kwd ):
+ context = context or {}
+ other_values = other_values or {}
+
if values is None:
values = zip( range( self.min, self.max, self.step ), range( self.min, self.max, self.step ))
return SelectParameter.get_html_field( self, value=value, context=context, other_values=other_values, values=values, **kwd )
- def get_html( self, value, context={}, other_values={}, values=None, **kwd ):
+ def get_html( self, value, context=None, other_values=None, values=None, **kwd ):
+ context = context or {}
+ other_values = other_values or {}
+
if values is None:
values = zip( range( self.min, self.max, self.step ), range( self.min, self.max, self.step ))
return SelectParameter.get_html( self, value, context=context, other_values=other_values, values=values, **kwd )
@@ -376,35 +419,46 @@
values = [ int(x) for x in value ]
return values
+
class ColumnParameter( RangeParameter ):
- def get_html_field( self, value=None, context={}, other_values={}, values=None, **kwd ):
+ def get_html_field( self, value=None, context=None, other_values=None, values=None, **kwd ):
+ context = context or {}
+ other_values = other_values or {}
+
if values is None and context:
column_range = range( 1, ( context.columns or 0 ) + 1, 1 )
values = zip( column_range, column_range )
return RangeParameter.get_html_field( self, value=value, context=context, other_values=other_values, values=values, **kwd )
- def get_html( self, value, context={}, other_values={}, values=None, **kwd ):
+ def get_html( self, value, context=None, other_values=None, values=None, **kwd ):
+ context = context or {}
+ other_values = other_values or {}
+
if values is None and context:
column_range = range( 1, ( context.columns or 0 ) + 1, 1 )
values = zip( column_range, column_range )
return RangeParameter.get_html( self, value, context=context, other_values=other_values, values=values, **kwd )
+
class ColumnTypesParameter( MetadataParameter ):
def to_string( self, value ):
return ",".join( map( str, value ) )
+
class ListParameter( MetadataParameter ):
def to_string( self, value ):
return ",".join( [str(x) for x in value] )
+
class DictParameter( MetadataParameter ):
def to_string( self, value ):
return simplejson.dumps( value )
+
class PythonObjectParameter( MetadataParameter ):
def to_string( self, value ):
@@ -412,16 +466,21 @@
return self.spec._to_string( self.spec.no_value )
return self.spec._to_string( value )
- def get_html_field( self, value=None, context={}, other_values={}, **kwd ):
+ def get_html_field( self, value=None, context=None, other_values=None, **kwd ):
+ context = context or {}
+ other_values = other_values or {}
return form_builder.TextField( self.spec.name, value=self._to_string( value ) )
- def get_html( self, value=None, context={}, other_values={}, **kwd ):
+ def get_html( self, value=None, context=None, other_values=None, **kwd ):
+ context = context or {}
+ other_values = other_values or {}
return str( self )
@classmethod
def marshal( cls, value ):
return value
+
class FileParameter( MetadataParameter ):
def to_string( self, value ):
@@ -429,10 +488,14 @@
return str( self.spec.no_value )
return value.file_name
- def get_html_field( self, value=None, context={}, other_values={}, **kwd ):
+ def get_html_field( self, value=None, context=None, other_values=None, **kwd ):
+ context = context or {}
+ other_values = other_values or {}
return form_builder.TextField( self.spec.name, value=str( value.id ) )
- def get_html( self, value=None, context={}, other_values={}, **kwd ):
+ def get_html( self, value=None, context=None, other_values=None, **kwd ):
+ context = context or {}
+ other_values = other_values or {}
return "<div>No display available for Metadata Files</div>"
def wrap( self, value, session ):
@@ -497,12 +560,15 @@
#we do not include 'dataset' in the kwds passed, as from_JSON_value() will handle this for us
return MetadataTempFile( **kwds )
+
#This class is used when a database file connection is not available
class MetadataTempFile( object ):
tmp_dir = 'database/tmp' #this should be overwritten as necessary in calling scripts
+
def __init__( self, **kwds ):
self.kwds = kwds
self._filename = None
+
@property
def file_name( self ):
if self._filename is None:
@@ -510,17 +576,21 @@
self._filename = abspath( tempfile.NamedTemporaryFile( dir = self.tmp_dir, prefix = "metadata_temp_file_" ).name )
open( self._filename, 'wb+' ) #create an empty file, so it can't be reused using tempfile
return self._filename
+
def to_JSON( self ):
return { '__class__':self.__class__.__name__, 'filename':self.file_name, 'kwds':self.kwds }
+
@classmethod
def from_JSON( cls, json_dict ):
#need to ensure our keywords are not unicode
rval = cls( **stringify_dictionary_keys( json_dict['kwds'] ) )
rval._filename = json_dict['filename']
return rval
+
@classmethod
def is_JSONified_value( cls, value ):
return ( isinstance( value, dict ) and value.get( '__class__', None ) == cls.__name__ )
+
@classmethod
def cleanup_from_JSON_dict_filename( cls, filename ):
try:
@@ -533,12 +603,15 @@
except Exception, e:
log.debug( 'Failed to cleanup MetadataTempFile temp files from %s: %s' % ( filename, e ) )
+
#Class with methods allowing set_meta() to be called externally to the Galaxy head
class JobExternalOutputMetadataWrapper( object ):
#this class allows access to external metadata filenames for all outputs associated with a job
#We will use JSON as the medium of exchange of information, except for the DatasetInstance object which will use pickle (in the future this could be JSONified as well)
+
def __init__( self, job ):
self.job_id = job.id
+
def get_output_filenames_by_dataset( self, dataset, sa_session ):
if isinstance( dataset, galaxy.model.HistoryDatasetAssociation ):
return sa_session.query( galaxy.model.JobExternalOutputMetadata ) \
@@ -549,12 +622,15 @@
.filter_by( job_id = self.job_id, library_dataset_dataset_association_id = dataset.id ) \
.first() #there should only be one or None
return None
+
def get_dataset_metadata_key( self, dataset ):
# Set meta can be called on library items and history items,
# need to make different keys for them, since ids can overlap
return "%s_%d" % ( dataset.__class__.__name__, dataset.id )
+
def setup_external_metadata( self, datasets, sa_session, exec_dir=None, tmp_dir=None, dataset_files_path=None,
- output_fnames=None, config_root=None, config_file=None, datatypes_config=None, job_metadata=None, kwds={} ):
+ output_fnames=None, config_root=None, config_file=None, datatypes_config=None, job_metadata=None, kwds=None ):
+ kwds = kwds or {}
#fill in metadata_files_dict and return the command with args required to set metadata
def __metadata_files_list_to_cmd_line( metadata_files ):
def __get_filename_override():
@@ -652,6 +728,7 @@
os.remove( fname )
except Exception, e:
log.debug( 'Failed to cleanup external metadata file (%s) for %s: %s' % ( key, dataset_key, e ) )
+
def set_job_runner_external_pid( self, pid, sa_session ):
for metadata_files in sa_session.query( galaxy.model.Job ).get( self.job_id ).external_output_metadata:
metadata_files.job_runner_external_pid = pid
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: cleanup, todo list, docs; pack scripts
by commits-noreply@bitbucket.org 23 Oct '13
by commits-noreply@bitbucket.org 23 Oct '13
23 Oct '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/e66076ed4678/
Changeset: e66076ed4678
User: carlfeberhard
Date: 2013-10-23 19:03:59
Summary: History panel: cleanup, todo list, docs; pack scripts
Affected #: 10 files
diff -r 7f70f02747d374ebf1804a1ae380cb27968043b0 -r e66076ed4678c1ad15db09c1d220a624e2047a79 static/scripts/mvc/dataset/hda-base.js
--- a/static/scripts/mvc/dataset/hda-base.js
+++ b/static/scripts/mvc/dataset/hda-base.js
@@ -5,7 +5,7 @@
//==============================================================================
/** @class Read only view for HistoryDatasetAssociation.
* @name HDABaseView
- *
+ *
* @augments Backbone.View
* @borrows LoggableMixin#logger as #logger
* @borrows LoggableMixin#log as #log
@@ -23,7 +23,7 @@
fxSpeed : 'fast',
- // ......................................................................... SET UP
+ // ......................................................................... set up
/** Set up the view, cache url templates, bind listeners
* @param {Object} attributes
* @config {Object} urlTemplates nested object containing url templates for this view
@@ -44,13 +44,17 @@
this._setUpListeners();
},
+ /** event listeners */
_setUpListeners : function(){
+
// re-rendering on any model changes
this.model.on( 'change', function( model, options ){
- // if the model moved into the ready state and is expanded without details, fetch those details
+
+ // if the model moved into the ready state and is expanded without details, fetch those details now
if( this.model.changedAttributes().state && this.model.inReadyState()
&& this.expanded && !this.model.hasDetails() ){
this.model.fetch(); // will render automatically (due to lines below)
+
} else {
this.render();
}
@@ -61,7 +65,7 @@
//}, this );
},
- // ......................................................................... RENDER MAIN
+ // ......................................................................... render main
/** Render this HDA, set up ui.
* @fires rendered:ready when rendered and NO running HDAs
* @fires rendered when rendered and running HDAs
@@ -122,7 +126,6 @@
_setUpBehaviors : function( $container ){
$container = $container || this.$el;
// set up canned behavior on children (bootstrap, popupmenus, editable_text, etc.)
- //TODO: we can potentially skip this step and call popupmenu directly on the download button
make_popup_menus( $container );
$container.find( '[title]' ).tooltip({ placement : 'bottom' });
},
@@ -213,13 +216,10 @@
* @returns {jQuery} rendered DOM
*/
_render_titleLink : function(){
- return $( jQuery.trim( HDABaseView.templates.titleLink(
- //TODO?? does this need urls?
- _.extend( this.model.toJSON(), { urls: this.urls } )
- )));
+ return $( jQuery.trim( HDABaseView.templates.titleLink( this.model.toJSON() )));
},
- // ......................................................................... RENDER BODY
+ // ......................................................................... body
/** Render the data/metadata summary (format, size, misc info, etc.).
* @returns {jQuery} rendered DOM
*/
@@ -283,7 +283,7 @@
/** Render links to external genome display applications (igb, gbrowse, etc.).
* @param {jQuery} $parent the jq node to search for .display-apps and render into to (defaults to this.$el)
*/
- //TODO: not a fan of the style on these
+//TODO: move into visualization button
_render_displayApps : function( $parent ){
$parent = $parent || this.$el;
var $displayAppsDiv = $parent.find( 'div.display-apps' ),
@@ -310,7 +310,6 @@
/** Render the data peek.
* @returns {jQuery} rendered DOM
*/
- //TODO: curr. pre-formatted into table on the server side - may not be ideal/flexible
_render_peek : function(){
var peek = this.model.get( 'peek' );
if( !peek ){ return null; }
@@ -326,74 +325,38 @@
/** Render the enclosing div of the hda body and, if expanded, the html in the body
* @returns {jQuery} rendered DOM
*/
- //TODO: only render these on expansion (or already expanded)
_render_body : function(){
- var body = $( '<div/>' )
+ var $body = $( '<div/>' )
.attr( 'id', 'info-' + this.model.get( 'id' ) )
.addClass( 'historyItemBody' )
.attr( 'style', 'display: none' );
if( this.expanded ){
// only render the body html if it's being shown
- this._render_body_html( body );
- //TODO: switch back when jq -> 1.9
- //body.show();
- body.css( 'display', 'block' );
+ this._render_body_html( $body );
+ $body.show();
}
- return body;
+ return $body;
},
/** Render the (expanded) body of an HDA, dispatching to other functions based on the HDA state
* @param {jQuery} body the body element to append the html to
*/
- //TODO: only render these on expansion (or already expanded)
- _render_body_html : function( body ){
+ _render_body_html : function( $body ){
//this.log( this + '_render_body' );
- body.html( '' );
- //TODO: not a fan of this dispatch
- switch( this.model.get( 'state' ) ){
- case hdaModel.HistoryDatasetAssociation.STATES.NEW :
- this._render_body_new( body );
- break;
- case hdaModel.HistoryDatasetAssociation.STATES.NOT_VIEWABLE :
- this._render_body_not_viewable( body );
- break;
- case hdaModel.HistoryDatasetAssociation.STATES.UPLOAD :
- this._render_body_uploading( body );
- break;
- case hdaModel.HistoryDatasetAssociation.STATES.PAUSED:
- this._render_body_paused( body );
- break;
- case hdaModel.HistoryDatasetAssociation.STATES.QUEUED :
- this._render_body_queued( body );
- break;
- case hdaModel.HistoryDatasetAssociation.STATES.RUNNING :
- this._render_body_running( body );
- break;
- case hdaModel.HistoryDatasetAssociation.STATES.ERROR :
- this._render_body_error( body );
- break;
- case hdaModel.HistoryDatasetAssociation.STATES.DISCARDED :
- this._render_body_discarded( body );
- break;
- case hdaModel.HistoryDatasetAssociation.STATES.SETTING_METADATA :
- this._render_body_setting_metadata( body );
- break;
- case hdaModel.HistoryDatasetAssociation.STATES.EMPTY :
- this._render_body_empty( body );
- break;
- case hdaModel.HistoryDatasetAssociation.STATES.FAILED_METADATA :
- this._render_body_failed_metadata( body );
- break;
- case hdaModel.HistoryDatasetAssociation.STATES.OK :
- this._render_body_ok( body );
- break;
- default:
- //??: no body?
- body.append( $( '<div>Error: unknown dataset state "' + this.model.get( 'state' ) + '".</div>' ) );
+ $body.empty();
+
+ var modelState = this.model.get( 'state' );
+ // cheesy get function by assumed matching name
+ var renderFnName = '_render_body_' + modelState,
+ renderFn = this[ renderFnName ];
+ if( _.isFunction( renderFn ) ){
+ this[ renderFnName ]( $body );
+ } else {
+ $body.append( $( '<div>Error: unknown dataset state "' + this.model.get( 'state' ) + '".</div>' ) );
}
- body.append( '<div style="clear: both"></div>' );
- this._setUpBehaviors( body );
+ $body.append( '<div style="clear: both"></div>' );
+ this._setUpBehaviors( $body );
},
/** Render a new dataset - this should be a transient state that's never shown
@@ -408,15 +371,14 @@
/** Render inaccessible, not-owned by curr user.
* @param {jQuery} parent DOM to which to append this body
*/
- _render_body_not_viewable : function( parent ){
- //TODO: revisit - still showing display, edit, delete (as common) - that CAN'T be right
- parent.append( $( '<div>' + _l( 'You do not have permission to view dataset' ) + '</div>' ) );
+ _render_body_noPermission : function( parent ){
+ parent.append( $( '<div>' + _l( 'You do not have permission to view this dataset' ) + '</div>' ) );
},
/** Render an HDA still being uploaded.
* @param {jQuery} parent DOM to which to append this body
*/
- _render_body_uploading : function( parent ){
+ _render_body_upload : function( parent ){
parent.append( $( '<div>' + _l( 'Dataset is uploading' ) + '</div>' ) );
},
@@ -432,7 +394,8 @@
* @param {jQuery} parent DOM to which to append this body
*/
_render_body_paused: function( parent ){
- parent.append( $( '<div>' + _l( 'Job is paused. Use the history menu to resume' ) + '</div>' ) );
+ parent.append( $( '<div>' + _l( 'Job is paused. '
+ + 'Use the "Resume Paused Jobs" in the history menu to resume' ) + '</div>' ) );
parent.append( this._render_primaryActionButtons( this.defaultPrimaryActionButtonRenderers ));
},
@@ -477,8 +440,6 @@
* @param {jQuery} parent DOM to which to append this body
*/
_render_body_empty : function( parent ){
- //TODO: replace i with dataset-misc-info class
- //?? why are we showing the file size when we know it's zero??
parent.append( $( '<div>' + _l( 'No data' ) + ': <i>' + this.model.get( 'misc_blurb' ) + '</i></div>' ) );
parent.append( this._render_primaryActionButtons( this.defaultPrimaryActionButtonRenderers ));
},
@@ -487,7 +448,6 @@
* @param {jQuery} parent DOM to which to append this body
*/
_render_body_failed_metadata : function( parent ){
- //TODO: the css for this box is broken (unlike the others)
// add a message box about the failure at the top of the body...
parent.append( $( HDABaseView.templates.failedMetadata(
_.extend( this.model.toJSON(), { urls: this.urls } )
@@ -504,7 +464,6 @@
parent.append( this._render_hdaSummary() );
// return shortened form if del'd
- //TODO: is this correct? maybe only on purged
if( this.model.isDeletedOrPurged() ){
parent.append( this._render_primaryActionButtons([
this._render_downloadButton,
@@ -525,44 +484,55 @@
parent.append( this._render_peek() );
},
- // ......................................................................... EVENTS
+ // ......................................................................... events
/** event map */
events : {
+ // expand the body when the title is clicked
'click .historyItemTitle' : 'toggleBodyVisibility'
},
- /** Render an HDA that's done running and where everything worked.
+ /** Show or hide the body/details of an HDA.
+ * note: if the model does not have detailed data, fetch that data before showing the body
* @param {Event} event the event that triggered this (@link HDABaseView#events)
* @param {Boolean} expanded if true, expand; if false, collapse
* @fires body-expanded when a body has been expanded
* @fires body-collapsed when a body has been collapsed
*/
toggleBodyVisibility : function( event, expand ){
- var hdaView = this;
expand = ( expand === undefined )?( !this.body.is( ':visible' ) ):( expand );
if( expand ){
- if( this.model.inReadyState() && !this.model.hasDetails() ){
- var xhr = this.model.fetch();
- xhr.done( function( model ){
- hdaView.expandBody();
- });
- } else {
- this.expandBody();
- }
+ this.expandBody();
} else {
this.collapseBody();
}
},
+ /** Render and show the full, detailed body of this view including extra data and controls.
+ * @fires body-expanded when a body has been expanded
+ */
expandBody : function(){
var hdaView = this;
- hdaView._render_body_html( hdaView.body );
- this.body.slideDown( hdaView.fxSpeed, function(){
- hdaView.expanded = true;
- hdaView.trigger( 'body-expanded', hdaView.model.get( 'id' ) );
- });
+
+ function _renderBodyAndExpand(){
+ hdaView._render_body_html( hdaView.body );
+ hdaView.body.slideDown( hdaView.fxSpeed, function(){
+ hdaView.expanded = true;
+ hdaView.trigger( 'body-expanded', hdaView.model.get( 'id' ) );
+ });
+ }
+ // fetch first if no details in the model
+ if( this.model.inReadyState() && !this.model.hasDetails() ){
+ this.model.fetch().done( function( model ){
+ _renderBodyAndExpand();
+ });
+ } else {
+ _renderBodyAndExpand();
+ }
},
+ /** Hide the body/details of an HDA.
+ * @fires body-collapsed when a body has been collapsed
+ */
collapseBody : function(){
var hdaView = this;
this.body.slideUp( hdaView.fxSpeed, function(){
@@ -571,7 +541,10 @@
});
},
- // ......................................................................... DELETION
+ // ......................................................................... removal
+ /** Remove this view's html from the DOM and remove all event listeners.
+ * @param {Function} callback an optional function called when removal is done
+ */
remove : function( callback ){
var hdaView = this;
this.$el.fadeOut( hdaView.fxSpeed, function(){
@@ -581,7 +554,8 @@
});
},
- // ......................................................................... MISC
+ // ......................................................................... misc
+ /** String representation */
toString : function(){
var modelString = ( this.model )?( this.model + '' ):( '(no model)' );
return 'HDABaseView(' + modelString + ')';
@@ -602,5 +576,5 @@
//==============================================================================
return {
- HDABaseView : HDABaseView,
+ HDABaseView : HDABaseView
};});
diff -r 7f70f02747d374ebf1804a1ae380cb27968043b0 -r e66076ed4678c1ad15db09c1d220a624e2047a79 static/scripts/mvc/dataset/hda-edit.js
--- a/static/scripts/mvc/dataset/hda-edit.js
+++ b/static/scripts/mvc/dataset/hda-edit.js
@@ -14,7 +14,7 @@
var HDAEditView = hdaBase.HDABaseView.extend( LoggableMixin ).extend(
/** @lends HDAEditView.prototype */{
- // ......................................................................... SET UP
+ // ......................................................................... set up
/** Set up the view, cache url templates, bind listeners.
* Overrides HDABaseView.initialize to change default actions (adding re-run).
* @param {Object} attributes
@@ -43,7 +43,7 @@
//var hdaView = this;
},
- // ......................................................................... RENDER WARNINGS
+ // ......................................................................... render warnings
/** Render any hda warnings including: is deleted, is purged, is hidden.
* Overrides _render_warnings to include links to further actions (undelete, etc.)).
* @returns {Object} the templated urls
@@ -71,13 +71,14 @@
return buttonDiv;
},
+//TODO: move titleButtons into state renderers, remove state checks in the buttons
+
/** Render icon-button to edit the attributes (format, permissions, etc.) this hda.
* @returns {jQuery} rendered DOM
*/
_render_editButton : function(){
// don't show edit while uploading, in-accessible
// DO show if in error (ala previous history panel)
- //TODO??: not viewable/accessible are essentially the same (not viewable set from accessible)
if( ( this.model.get( 'state' ) === hdaModel.HistoryDatasetAssociation.STATES.NEW )
|| ( this.model.get( 'state' ) === hdaModel.HistoryDatasetAssociation.STATES.UPLOAD )
|| ( this.model.get( 'state' ) === hdaModel.HistoryDatasetAssociation.STATES.NOT_VIEWABLE )
@@ -114,7 +115,6 @@
*/
_render_deleteButton : function(){
// don't show delete if...
- //TODO??: not viewable/accessible are essentially the same (not viewable set from accessible)
if( ( this.model.get( 'state' ) === hdaModel.HistoryDatasetAssociation.STATES.NEW )
|| ( this.model.get( 'state' ) === hdaModel.HistoryDatasetAssociation.STATES.NOT_VIEWABLE )
|| ( !this.model.get( 'accessible' ) ) ){
@@ -147,7 +147,7 @@
return this.deleteButton.render().$el;
},
- // ......................................................................... RENDER BODY
+ // ......................................................................... render body
/** Render the data/metadata summary (format, size, misc info, etc.).
* Overrides _render_hdaSummary to include edit link in dbkey.
* @see HDABaseView#_render_hdaSummary
@@ -158,7 +158,6 @@
// if there's no dbkey and it's editable : pass a flag to the template to render a link to editing in the '?'
if( this.model.get( 'metadata_dbkey' ) === '?'
&& !this.model.isDeletedOrPurged() ){
- //TODO: use HDABaseView and select/replace base on this switch
_.extend( modelData, { dbkey_unknown_and_editable : true });
}
return hdaBase.HDABaseView.templates.hdaSummary( modelData );
@@ -238,10 +237,8 @@
var $icon = this.visualizationsButton.render().$el;
$icon.addClass( 'visualize-icon' ); // needed?
- //TODO: make this more concise
// map a function to each visualization in the icon's attributes
// create a popupmenu from that map
-
/** @inner */
function create_viz_action( visualization ) {
switch( visualization ){
@@ -269,7 +266,6 @@
// >1: Populate menu dict with visualization fns, make the popupmenu
} else {
_.each( visualizations, function( visualization ) {
- //TODO: move to utils
var titleCaseVisualization = visualization.charAt( 0 ).toUpperCase() + visualization.slice( 1 );
popup_menu_dict[ _l( titleCaseVisualization ) ] = create_viz_action( visualization );
});
@@ -334,9 +330,7 @@
/** Render icon-button to load and display tagging html.
* @returns {jQuery} rendered DOM
*/
- //TODO: these should be a sub-MV
_render_tagButton : function(){
- //TODO: check for User
if( !this.hasUser || !this.urls.tags.get ){
this.tagButton = null;
return null;
@@ -354,9 +348,7 @@
/** Render icon-button to load and display annotation html.
* @returns {jQuery} rendered DOM
*/
- //TODO: these should be a sub-MV
_render_annotateButton : function(){
- //TODO: check for User
if( !this.hasUser || !this.urls.annotation.get ){
this.annotateButton = null;
return null;
@@ -370,33 +362,6 @@
return this.annotateButton.render().$el;
},
- // ......................................................................... other elements
- /** Render area to display tags.
- * @returns {jQuery} rendered DOM
- */
-//TODO: into sub-MV
-//TODO: check for User
- _render_tagArea : function(){
- if( !this.urls.tags.set ){ return null; }
- //TODO: move to mvc/tags.js
- return $( HDAEditView.templates.tagArea(
- _.extend( this.model.toJSON(), { urls: this.urls } )
- ).trim() );
- },
-
- /** Render area to display annotation.
- * @returns {jQuery} rendered DOM
- */
-//TODO: into sub-MV
-//TODO: check for User
- _render_annotationArea : function(){
- if( !this.urls.annotation.get ){ return null; }
- //TODO: move to mvc/annotations.js
- return $( HDAEditView.templates.annotationArea(
- _.extend( this.model.toJSON(), { urls: this.urls } )
- ).trim() );
- },
-
// ......................................................................... state body renderers
/** Render an HDA whose job has failed.
* Overrides _render_body_error to prepend error report button to primary actions strip.
@@ -415,7 +380,6 @@
* @see HDABaseView#_render_body_ok
*/
_render_body_ok : function( parent ){
- //TODO: should call super somehow and insert the needed...
// most common state renderer and the most complicated
parent.append( this._render_hdaSummary() );
@@ -451,7 +415,7 @@
parent.append( this._render_peek() );
},
- // ......................................................................... EVENTS
+ // ......................................................................... events
/** event map */
events : {
'click .historyItemTitle' : 'toggleBodyVisibility',
@@ -463,16 +427,28 @@
'click a.icon-button.annotate' : 'loadAndDisplayAnnotation'
},
- // ......................................................................... STATE CHANGES / MANIPULATION
+ /** listener for item purge */
confirmPurge : function _confirmPurge( ev ){
- //TODO: confirm dialog
+//TODO: confirm dialog
this.model.purge({ url: this.urls.purge });
return false;
},
+ // ......................................................................... tags
+ /** Render area to display tags.
+ * @returns {jQuery} rendered DOM
+ */
+//TODO: into sub-MV
+ _render_tagArea : function(){
+ if( !this.hasUser || !this.urls.tags.set ){ return null; }
+ return $( HDAEditView.templates.tagArea(
+ _.extend( this.model.toJSON(), { urls: this.urls } )
+ ).trim() );
+ },
+
/** Find the tag area and, if initial: load the html (via ajax) for displaying them; otherwise, unhide/hide
*/
- //TODO: into sub-MV
+//TODO: into sub-MV
loadAndDisplayTags : function( event ){
//BUG: broken with latest
//TODO: this is a drop in from history.mako - should use MV as well
@@ -508,6 +484,18 @@
}
return false;
},
+
+ // ......................................................................... annotations
+ /** Render area to display annotation.
+ * @returns {jQuery} rendered DOM
+ */
+//TODO: into sub-MV
+ _render_annotationArea : function(){
+ if( !this.hasUser || !this.urls.annotation.get ){ return null; }
+ return $( HDAEditView.templates.annotationArea(
+ _.extend( this.model.toJSON(), { urls: this.urls } )
+ ).trim() );
+ },
/** Find the annotation area and, if initial: load the html (via ajax) for displaying them; otherwise, unhide/hide
*/
@@ -555,7 +543,7 @@
return false;
},
- // ......................................................................... UTILTIY
+ // ......................................................................... misc
/** string rep */
toString : function(){
var modelString = ( this.model )?( this.model + '' ):( '(no model)' );
@@ -678,5 +666,5 @@
//==============================================================================
return {
- HDAEditView : HDAEditView,
+ HDAEditView : HDAEditView
};});
diff -r 7f70f02747d374ebf1804a1ae380cb27968043b0 -r e66076ed4678c1ad15db09c1d220a624e2047a79 static/scripts/mvc/dataset/hda-model.js
--- a/static/scripts/mvc/dataset/hda-model.js
+++ b/static/scripts/mvc/dataset/hda-model.js
@@ -53,41 +53,42 @@
misc_info : ''
},
- /** fetch location of this history in the api */
+ /** fetch location of this HDA's history in the api */
urlRoot: 'api/histories/',
+ /** full url spec. for this HDA */
url : function(){
return this.urlRoot + this.get( 'history_id' ) + '/contents/' + this.get( 'id' );
},
+ /** controller urls assoc. with this HDA */
urls : function(){
var id = this.get( 'id' );
if( !id ){ return {}; }
var urls = {
- 'delete' : galaxy_config.root + 'datasets/' + id + '/delete_async',
- 'purge' : galaxy_config.root + 'datasets/' + id + '/purge_async',
- 'unhide' : galaxy_config.root + 'datasets/' + id + '/unhide',
- 'undelete' : galaxy_config.root + 'datasets/' + id + '/undelete',
+ 'purge' : galaxy_config.root + 'datasets/' + id + '/purge_async',
- 'display' : galaxy_config.root + 'datasets/' + id + '/display/?preview=True',
- 'download' : galaxy_config.root + 'datasets/' + id + '/display?to_ext=' + this.get( 'file_ext' ),
- 'edit' : galaxy_config.root + 'datasets/' + id + '/edit',
- 'report_error': galaxy_config.root + 'dataset/errors?id=' + id,
- 'rerun' : galaxy_config.root + 'tool_runner/rerun?id=' + id,
- 'show_params': galaxy_config.root + 'datasets/' + id + '/show_params',
- 'visualization': galaxy_config.root + 'visualization',
+ 'display' : galaxy_config.root + 'datasets/' + id + '/display/?preview=True',
+ 'download' : galaxy_config.root + 'datasets/' + id + '/display?to_ext=' + this.get( 'file_ext' ),
+ 'edit' : galaxy_config.root + 'datasets/' + id + '/edit',
+ 'report_error' : galaxy_config.root + 'dataset/errors?id=' + id,
+ 'rerun' : galaxy_config.root + 'tool_runner/rerun?id=' + id,
+ 'show_params' : galaxy_config.root + 'datasets/' + id + '/show_params',
+ 'visualization' : galaxy_config.root + 'visualization',
'annotation': { 'get': galaxy_config.root + 'dataset/get_annotation_async?id=' + id,
'set': galaxy_config.root + 'dataset/annotate_async?id=' + id },
- 'tags' : { 'get': galaxy_config.root + 'tag/get_tagging_elt_async?item_id=' + id + '&item_class=HistoryDatasetAssociation',
- 'set': galaxy_config.root + 'tag/retag?item_id=' + id + '&item_class=HistoryDatasetAssociation' }
+ 'tags' : { 'get': galaxy_config.root + 'tag/get_tagging_elt_async?item_id='
+ + id + '&item_class=HistoryDatasetAssociation',
+ 'set': galaxy_config.root + 'tag/retag?item_id='
+ + id + '&item_class=HistoryDatasetAssociation' }
};
- //'meta_download': '/dataset/get_metadata_file?hda_id=%3C%25%3D+id+%25%3E&metadata_name=%3C%25%3D+file_type+%25%3E',
+ // download links to assoc. metadata files (bam indeces, etc.)
var meta_files = this.get( 'meta_files' );
if( meta_files ){
urls.meta_download = _.map( meta_files, function( meta_file ){
return {
- //url : _.template( urlTemplate, { id: modelJson.id, file_type: meta_file.file_type }),
- url : galaxy_config.root + 'dataset/get_metadata_file?hda_id=' + id + '&metadata_name=' + meta_file.file_type,
+ url : galaxy_config.root + 'dataset/get_metadata_file?hda_id='
+ + id + '&metadata_name=' + meta_file.file_type,
file_type : meta_file.file_type
};
});
@@ -110,6 +111,9 @@
this._setUpListeners();
},
+ /** set up any event listeners
+ * event: state:ready fired when this HDA moves into a ready state
+ */
_setUpListeners : function(){
// if the state has changed and the new state is a ready state, fire an event
this.on( 'change:state', function( currModel, newState ){
@@ -121,8 +125,7 @@
},
// ........................................................................ common queries
- /** Is this hda deleted or purged?
- */
+ /** Is this hda deleted or purged? */
isDeletedOrPurged : function(){
return ( this.get( 'deleted' ) || this.get( 'purged' ) );
},
@@ -132,7 +135,6 @@
* @param {Boolean} show_deleted are we showing deleted hdas?
* @param {Boolean} show_hidden are we showing hidden hdas?
*/
- //TODO: too many 'visible's
isVisible : function( show_deleted, show_hidden ){
var isVisible = true;
if( ( !show_deleted )
@@ -146,6 +148,7 @@
return isVisible;
},
+ /** the more common alias of visible */
hidden : function(){
return !this.get( 'visible' );
},
@@ -158,33 +161,37 @@
return ( this.isDeletedOrPurged() || ready );
},
+ /** Does this model already contain detailed data (as opposed to just summary level data)? */
hasDetails : function(){
//?? this may not be reliable
return _.has( this.attributes, 'genome_build' );
},
- /** Convenience function to match hda.has_data.
- */
+ /** Convenience function to match hda.has_data. */
hasData : function(){
- //TODO:?? is this equivalent to all possible hda.has_data calls?
return ( this.get( 'file_size' ) > 0 );
},
// ........................................................................ ajax
+ /** save this HDA, _Mark_ing it as deleted (just a flag) */
'delete' : function _delete( options ){
return this.save( { deleted: true }, options );
},
+ /** save this HDA, _Mark_ing it as undeleted */
undelete : function _undelete( options ){
return this.save( { deleted: false }, options );
},
+ /** save this HDA as not visible */
hide : function _hide( options ){
return this.save( { visible: false }, options );
},
+ /** save this HDA as visible */
unhide : function _uhide( options ){
return this.save( { visible: true }, options );
},
+ /** purge this HDA and remove the underlying dataset file from the server's fs */
purge : function _purge( options ){
//TODO: ideally this would be a DELETE call to the api
// using purge async for now
@@ -210,10 +217,15 @@
},
// ........................................................................ sorting/filtering
+ /** what attributes of an HDA will be used in a search */
searchKeys : [
'name', 'file_ext', 'genome_build', 'misc_blurb', 'misc_info', 'annotation', 'tags'
],
+ /** search this HDA for the string searchFor
+ * @param {String} searchFor look for this string in all attributes listed in searchKeys (above) using indexOf
+ * @returns {Array} an array of attribute keys where searchFor was found
+ */
search : function( searchFor ){
var model = this;
searchFor = searchFor.toLowerCase();
@@ -223,13 +235,16 @@
});
},
+ /** alias of search, but returns a boolean
+ * @param {String} matchesWhat look for this string in all attributes listed in searchKeys (above) using indexOf
+ * @returns {Boolean} was matchesWhat found in any attributes
+ */
matches : function( matchesWhat ){
return !!this.search( matchesWhat ).length;
},
// ........................................................................ misc
- /** String representation
- */
+ /** String representation */
toString : function(){
var nameAndId = this.get( 'id' ) || '';
if( this.get( 'name' ) ){
@@ -274,6 +289,7 @@
ERROR : 'error'
};
+/** states that are in a final state (the underlying job is complete) */
HistoryDatasetAssociation.READY_STATES = [
HistoryDatasetAssociation.STATES.NEW,
HistoryDatasetAssociation.STATES.OK,
@@ -285,6 +301,7 @@
HistoryDatasetAssociation.STATES.ERROR
];
+/** states that will change (the underlying job is not finished) */
HistoryDatasetAssociation.NOT_READY_STATES = [
HistoryDatasetAssociation.STATES.UPLOAD,
HistoryDatasetAssociation.STATES.QUEUED,
@@ -306,7 +323,10 @@
///** logger used to record this.log messages, commonly set to console */
//// comment this out to suppress log output
//logger : console,
+
+ /** root api url */
urlRoot : galaxy_config.root + 'api/histories',
+ /** complete api url */
url : function(){
return this.urlRoot + '/' + this.historyId + '/contents';
},
@@ -331,6 +351,9 @@
return this.map( function( hda ){ return hda.id; });
},
+ /** Get hdas that are not ready
+ * @returns array of HDAs
+ */
notReady : function(){
return this.filter( function( hda ){
return !hda.inReadyState();
@@ -370,11 +393,13 @@
},
// ........................................................................ ajax
+ /** fetch detailed model data for all HDAs in this collection */
fetchAllDetails : function(){
return this.fetch({ data : { details : 'all' } });
},
// ........................................................................ sorting/filtering
+ /** return a new collection of HDAs whose attributes contain the substring matchesWhat */
matches : function( matchesWhat ){
return this.filter( function( hda ){
return hda.matches( matchesWhat );
diff -r 7f70f02747d374ebf1804a1ae380cb27968043b0 -r e66076ed4678c1ad15db09c1d220a624e2047a79 static/scripts/mvc/history/history-model.js
--- a/static/scripts/mvc/history/history-model.js
+++ b/static/scripts/mvc/history/history-model.js
@@ -13,7 +13,6 @@
*/
var History = Backbone.Model.extend( LoggableMixin ).extend(
/** @lends History.prototype */{
- //TODO: bind change events from items and collection to this (itemLengths, states)
///** logger used to record this.log messages, commonly set to console */
//// comment this out to suppress log output
@@ -33,17 +32,20 @@
// ........................................................................ urls
urlRoot: galaxy_config.root + 'api/histories',
+ /** url for changing the name of the history */
renameUrl : function(){
//TODO: just use this.save()
var id = this.get( 'id' );
if( !id ){ return undefined; }
return galaxy_config.root + 'history/rename_async?id=' + this.get( 'id' );
},
+ /** url for changing the annotation of the history */
annotateUrl : function(){
var id = this.get( 'id' );
if( !id ){ return undefined; }
return galaxy_config.root + 'history/annotate_async?id=' + this.get( 'id' );
},
+ /** url for changing the tags of the history */
tagUrl : function(){
var id = this.get( 'id' );
if( !id ){ return undefined; }
@@ -51,9 +53,10 @@
},
// ........................................................................ set up/tear down
- /** Set up the hdas collection
+ /** Set up the model
* @param {Object} historyJSON model data for this History
* @param {Object[]} hdaJSON array of model data for this History's HDAs
+ * @param {Object} options any extra settings including logger
* @see BaseModel#initialize
*/
initialize : function( historyJSON, hdaJSON, options ){
@@ -70,10 +73,15 @@
this._setUpListeners();
+ /** cached timeout id for the HDA updater */
+ this.updateTimeoutId = null;
// set up update timeout if needed
this.checkForUpdates();
},
+ /** set up any event listeners for this history including those to the contained HDAs
+ * events: error:hdas if an error occurred with the HDA collection
+ */
_setUpListeners : function(){
this.on( 'error', function( model, xhr, options, msg, details ){
this.errorHandler( model, xhr, options, msg, details );
@@ -107,25 +115,29 @@
// }
//},
+ /** event listener for errors. Generally errors are handled outside this model */
errorHandler : function( model, xhr, options, msg, details ){
// clear update timeout on model err
this.clearUpdateTimeout();
},
// ........................................................................ common queries
+ /** is this model already associated with a user? */
hasUser : function(){
var user = this.get( 'user' );
return !!( user && user.id );
},
// ........................................................................ ajax
- // get the history's state from it's cummulative ds states, delay + update if needed
- // events: ready
+ /** does the HDA collection indicate they're still running and need to be updated later? delay + update if needed
+ * @param {Function} onReadyCallback function to run when all HDAs are in the ready state
+ * events: ready
+ */
checkForUpdates : function( onReadyCallback ){
//console.info( 'checkForUpdates' )
// get overall History state from collection, run updater if History has running/queued hdas
- // boiling it down on the client to running/not
+ // boiling it down on the client to running/not
if( this.hdas.running().length ){
this.setUpdateTimeout();
@@ -138,8 +150,8 @@
return this;
},
+ /** create a timeout (after UPDATE_DELAY or delay ms) to refetch the HDA collection. Clear any prev. timeout */
setUpdateTimeout : function( delay ){
- //TODO: callbacks?
delay = delay || History.UPDATE_DELAY;
var history = this;
@@ -151,6 +163,7 @@
return this.updateTimeoutId;
},
+ /** clear the timeout and the cached timeout id */
clearUpdateTimeout : function(){
if( this.updateTimeoutId ){
clearTimeout( this.updateTimeoutId );
@@ -158,25 +171,26 @@
}
},
- // update this history, find any hda's running/queued, update ONLY those that have changed states,
- // set up to run this again in some interval of time
- // events: ready
+ /* update the HDA collection getting full detailed model data for any hda whose id is in detailIds
+ * set up to run this again in some interval of time
+ * @param {String[]} detailIds list of HDA ids to get detailed model data for
+ * @param {Object} options std. backbone fetch options map
+ */
refresh : function( detailIds, options ){
//console.info( 'refresh:', detailIds, this.hdas );
detailIds = detailIds || [];
options = options || {};
var history = this;
+ // add detailIds to options as CSV string
options.data = options.data || {};
if( detailIds.length ){
options.data.details = detailIds.join( ',' );
}
var xhr = this.hdas.fetch( options );
xhr.done( function( hdaModels ){
- //this.trigger( 'hdas-refreshed', this, hdaModels );
- history.checkForUpdates(function(){
- // fetch the history after an update in order to recalc history size
- //TODO: move to event?
+ history.checkForUpdates( function(){
+ // fetch the history inside onReadyCallback in order to recalc history size
this.fetch();
});
});
diff -r 7f70f02747d374ebf1804a1ae380cb27968043b0 -r e66076ed4678c1ad15db09c1d220a624e2047a79 static/scripts/mvc/history/history-panel.js
--- a/static/scripts/mvc/history/history-panel.js
+++ b/static/scripts/mvc/history/history-panel.js
@@ -16,20 +16,14 @@
meta:
css/html class/id 'item' -> hda
add classes, ids on empty divs
- events (local/ui and otherwise)
- list in docs as well
- require.js
convert function comments to jsDoc style, complete comments
move inline styles into base.less
- watch the magic strings
- watch your globals
feature creep:
lineage
hide button
show permissions in info
show shared/sharing status on ds, history
- maintain scroll position on refresh (storage?)
selection, multi-select (and actions common to selected (ugh))
searching
sorting, re-shuffling
@@ -58,13 +52,14 @@
tagName : 'div',
className : 'history-panel',
- //fxSpeed : 'fast',
+ /** (in ms) that jquery effects will use */
fxSpeed : 300,
- /** event map
- */
+ /** event map */
events : {
'click #history-tag' : 'loadAndDisplayTags',
+ // allow (error) messages to be clicked away
+//TODO: switch to common close (X) idiom
'click #message-container' : 'clearMessages'
},
@@ -107,6 +102,10 @@
}
},
+ /** create any event listeners for the panel
+ * @fires: rendered:initial on the first render
+ * @fires: empty-history when switching to a history with no HDAs or creating a new history
+ */
_setUpListeners : function(){
// ---- event handlers for self
this.on( 'error', function( model, xhr, options, msg, details ){
@@ -154,13 +153,24 @@
//},
// ........................................................................ error handling
+ /** Event listener to handle errors (from the panel, the history, or the history's HDAs)
+ * @param {Model or View} model the (Backbone) source of the error
+ * @param {XMLHTTPRequest} xhr any ajax obj. assoc. with the error
+ * @param {Object} options the options map commonly used with bbone ajax
+ * @param {String} msg optional message passed to ease error location
+ * @param {Object} msg optional object containing error details
+ */
errorHandler : function( model, xhr, options, msg, details ){
var parsed = this._parseErrorMessage( model, xhr, options, msg, details );
+ // interrupted ajax
if( xhr && xhr.status === 0 && xhr.readyState === 0 ){
+ // bad gateway
} else if( xhr && xhr.status === 502 ){
+//TODO: gmail style 'reconnecting in Ns'
+ // otherwise, show an error message inside the panel
} else {
// it's possible to have a triggered error before the message container is rendered - wait for it to show
if( !this.$el.find( '#message-container' ).is( ':visible' ) ){
@@ -173,6 +183,9 @@
}
},
+ /** Parse an error event into an Object usable by displayMessage based on the parameters
+ * note: see errorHandler for more info on params
+ */
_parseErrorMessage : function( model, xhr, options, msg, details ){
var user = Galaxy.currUser,
// add the args (w/ some extra info) into an obj
@@ -199,12 +212,92 @@
return parsed;
},
+ /** Modify an error message to be fancy and wear a monocle. */
_bePolite : function( msg ){
msg = msg || _l( 'An error occurred while getting updates from the server' );
return msg + '. ' + _l( 'Please contact a Galaxy administrator if the problem persists.' );
},
// ------------------------------------------------------------------------ loading history/hda models
+
+ //NOTE: all the following fns replace the existing history model with a new model
+ // (in the following 'details' refers to the full set of hda api data (urls, display_apps, misc_info, etc.)
+ // - hdas w/o details will have summary data only (name, hid, deleted, visible, state, etc.))
+
+ /** (re-)loads the user's current history & hdas w/ details */
+ // implemented as a 'fresh start' or for when there is no model (intial panel render)
+ loadCurrentHistory : function( attributes ){
+ var panel = this;
+ return this.loadHistoryWithHDADetails( 'current', attributes )
+ .then(function( historyData, hdaData ){
+ panel.trigger( 'current-history', panel );
+ });
+ },
+
+ /** loads a history & hdas w/ details and makes them the current history */
+ switchToHistory : function( historyId, attributes ){
+ //console.info( 'switchToHistory:', historyId, attributes );
+ var panel = this,
+ historyFn = function(){
+ // make this current and get history data with one call
+ return jQuery.post( galaxy_config.root + 'api/histories/' + historyId + '/set_as_current' );
+ };
+ return this.loadHistoryWithHDADetails( historyId, attributes, historyFn )
+ .then(function( historyData, hdaData ){
+ panel.trigger( 'switched-history', panel );
+ });
+ },
+
+ /** creates a new history on the server and sets it as the user's current history */
+ createNewHistory : function( attributes ){
+ var panel = this,
+ historyFn = function(){
+ // get history data from posting a new history (and setting it to current)
+ return jQuery.post( galaxy_config.root + 'api/histories', { current: true });
+ };
+ // id undefined bc there is no historyId yet - the server will provide
+ // (no need for details - nothing expanded in new history)
+ return this.loadHistory( undefined, attributes, historyFn )
+ .then(function( historyData, hdaData ){
+ panel.trigger( 'new-history', panel );
+ });
+ },
+
+ /** loads a history & hdas w/ details (but does not make them the current history) */
+ loadHistoryWithHDADetails : function( historyId, attributes, historyFn, hdaFn ){
+ //console.info( 'loadHistoryWithHDADetails:', historyId, attributes, historyFn, hdaFn );
+ var panel = this,
+ // will be called to get hda ids that need details from the api
+ hdaDetailIds = function( historyData ){
+ return panel.getExpandedHdaIds( historyData.id );
+ };
+ return this.loadHistory( historyId, attributes, historyFn, hdaFn, hdaDetailIds );
+ },
+
+ /** loads a history & hdas w/ NO details (but does not make them the current history) */
+ loadHistory : function( historyId, attributes, historyFn, hdaFn, hdaDetailIds ){
+ this.trigger( 'loading-history', this );
+ attributes = attributes || {};
+ var panel = this;
+ //console.info( 'loadHistory:', historyId, attributes, historyFn, hdaFn, hdaDetailIds );
+ var xhr = historyModel.History.getHistoryData( historyId, {
+ historyFn : historyFn,
+ hdaFn : hdaFn,
+ hdaDetailIds : attributes.initiallyExpanded || hdaDetailIds
+ });
+ //console.debug( 'xhr:', xhr );
+ return this._loadHistoryFromXHR( xhr, attributes )
+ .fail( function( xhr, where, history ){
+ // throw an error up for the error handler
+ panel.trigger( 'error', panel, xhr, attributes, _l( 'An error was encountered while ' + where ),
+ { historyId: historyId, history: history || {} });
+ })
+ .always( function(){
+ // bc hideLoadingIndicator relies on this firing
+ panel.trigger( 'loading-done', panel );
+ });
+ },
+
/** given an xhr that will provide both history and hda data, pass data to set model or handle xhr errors */
_loadHistoryFromXHR : function( xhr, attributes ){
var panel = this;
@@ -246,84 +339,6 @@
return this;
},
- //NOTE: all the following fns replace the existing history model with a new model
- // (in the following 'details' refers to the full set of hda api data (urls, display_apps, misc_info, etc.)
- // - hdas w/o details will have summary data only (name, hid, deleted, visible, state, etc.))
-
- /** loads a history & hdas w/ NO details (but does not make them the current history) */
- loadHistory : function( historyId, attributes, historyFn, hdaFn, hdaDetailIds ){
- this.trigger( 'loading-history', this );
- attributes = attributes || {};
- var panel = this;
- //console.info( 'loadHistory:', historyId, attributes, historyFn, hdaFn, hdaDetailIds );
- var xhr = historyModel.History.getHistoryData( historyId, {
- historyFn : historyFn,
- hdaFn : hdaFn,
- hdaDetailIds : attributes.initiallyExpanded || hdaDetailIds
- });
- //console.debug( 'xhr:', xhr );
- return this._loadHistoryFromXHR( xhr, attributes )
- .fail( function( xhr, where, history ){
- // throw an error up for the error handler
- panel.trigger( 'error', panel, xhr, attributes, _l( 'An error was encountered while ' + where ),
- { historyId: historyId, history: history || {} });
- })
- .always( function(){
- // bc hideLoadingIndicator relies on this firing
- panel.trigger( 'loading-done', panel );
- });
- },
-
- /** loads a history & hdas w/ details (but does not make them the current history) */
- loadHistoryWithHDADetails : function( historyId, attributes, historyFn, hdaFn ){
- //console.info( 'loadHistoryWithHDADetails:', historyId, attributes, historyFn, hdaFn );
- var panel = this,
- // will be called to get hda ids that need details from the api
- hdaDetailIds = function( historyData ){
- return panel.getExpandedHdaIds( historyData.id );
- };
- return this.loadHistory( historyId, attributes, historyFn, hdaFn, hdaDetailIds );
- },
-
- /** loads a history & hdas w/ details and makes them the current history */
- switchToHistory : function( historyId, attributes ){
- //console.info( 'switchToHistory:', historyId, attributes );
- var panel = this,
- historyFn = function(){
- // make this current and get history data with one call
- return jQuery.post( galaxy_config.root + 'api/histories/' + historyId + '/set_as_current' );
- };
- return this.loadHistoryWithHDADetails( historyId, attributes, historyFn )
- .then(function( historyData, hdaData ){
- panel.trigger( 'switched-history', panel );
- });
- },
-
- /** (re-)loads the user's current history & hdas w/ details */
- // implemented as a 'fresh start' or for when there is no model (intial panel render)
- loadCurrentHistory : function( attributes ){
- var panel = this;
- return this.loadHistoryWithHDADetails( 'current', attributes )
- .then(function( historyData, hdaData ){
- panel.trigger( 'current-history', panel );
- });
- },
-
- /** creates a new history on the server and sets it as the user's current history */
- createNewHistory : function( attributes ){
- var panel = this,
- historyFn = function(){
- // get history data from posting a new history (and setting it to current)
- return jQuery.post( galaxy_config.root + 'api/histories', { current: true });
- };
- // id undefined bc there is no historyId yet - the server will provide
- // (no need for details - nothing expanded in new history)
- return this.loadHistory( undefined, attributes, historyFn )
- .then(function( historyData, hdaData ){
- panel.trigger( 'new-history', panel );
- });
- },
-
// alias to the model. Updates the hda list only (not the history)
refreshHdas : function( detailIds, options ){
if( this.model ){
@@ -334,15 +349,7 @@
},
// ------------------------------------------------------------------------ browser stored prefs
- //TODO: simplify
-
- /** key string to store each histories settings under */
- _getStorageKey : function( id ){
- if( !id ){
- throw new Error( '_getStorageKey needs valid id: ' + id );
- }
- return ( 'history:' + id );
- },
+//TODO: simplify
/** Set up client side storage. Currently PersistanStorage keyed under 'HistoryPanel.<id>'
* @param {Object} initiallyExpanded
@@ -359,7 +366,6 @@
// data that needs to be persistent over page refreshes
// (note the key function which uses the history id as well)
this.storage = new PersistentStorage( this._getStorageKey( this.model.get( 'id' ) ), {
- //TODO: initiallyExpanded only works on first load right now
expandedHdas : {},
show_deleted : false,
show_hidden : false
@@ -393,6 +399,15 @@
this.log( this + ' (init\'d) storage:', this.storage.get() );
},
+ /** key string to store each histories settings under */
+ _getStorageKey : function( id ){
+ if( !id ){
+ throw new Error( '_getStorageKey needs valid id: ' + id );
+ }
+ return ( 'history:' + id );
+ },
+
+ /** clear all stored history panel data */
clearWebStorage : function(){
for( var key in sessionStorage ){
if( key.indexOf( 'HistoryView.' ) === 0 ){
@@ -401,6 +416,7 @@
}
},
+ /** get all stored data as an Object for a history with the given id */
getStoredOptions : function( historyId ){
if( !historyId || historyId === 'current' ){
return ( this.storage )?( this.storage.get() ):( {} );
@@ -410,12 +426,14 @@
return ( item === null )?( {} ):( JSON.parse( item ) );
},
+ /** get all the map of expaneded hda ids for the given history id */
getExpandedHdaIds : function( historyId ){
var expandedHdas = this.getStoredOptions( historyId ).expandedHdas;
return (( _.isEmpty( expandedHdas ) )?( [] ):( _.keys( expandedHdas ) ));
},
// ------------------------------------------------------------------------ history/hda event listening
+ /** listening for history and HDA events */
_setUpModelEventHandlers : function(){
// ---- history
// on a model error - bounce it up to the panel and remove it from the model
@@ -454,7 +472,7 @@
this.model.hdas.on( 'state:ready', function( hda, newState, oldState ){
if( ( !hda.get( 'visible' ) )
&& ( !this.storage.get( 'show_hidden' ) ) ){
- this.removeHdaView( hda.get( 'id' ) );
+ this.removeHdaView( this.hdaViews[ hda.id ] );
}
}, this );
@@ -491,7 +509,9 @@
]);
},
-//TODO: use this below in renderItems
+ /** Create an HDA view for the given HDA (but leave attachment for addHdaView above)
+ * @param {HistoryDatasetAssociation} hda
+ */
createHdaView : function( hda ){
var hdaId = hda.get( 'id' ),
expanded = this.storage.get( 'expandedHdas' ).get( hdaId ),
@@ -506,12 +526,31 @@
return hdaView.render();
},
+ /** Set up HistoryPanel listeners for HDAView events. Currently binds:
+ * HDAView#body-visible, HDAView#body-hidden to store expanded states
+ * @param {HDAView} hdaView HDAView (base or edit) to listen to
+ */
+ _setUpHdaListeners : function( hdaView ){
+ var historyView = this;
+ // maintain a list of hdas whose bodies are expanded
+ hdaView.on( 'body-expanded', function( id ){
+ historyView.storage.get( 'expandedHdas' ).set( id, true );
+ });
+ hdaView.on( 'body-collapsed', function( id ){
+ historyView.storage.get( 'expandedHdas' ).deleteKey( id );
+ });
+//TODO: remove?
+ hdaView.on( 'error', function( model, xhr, options, msg ){
+ historyView.errorHandler( model, xhr, options, msg );
+ });
+ },
+
/** If this hda is deleted and we're not showing deleted hdas, remove the view
* @param {HistoryDataAssociation} the hda to check
*/
handleHdaDeletionChange : function( hda ){
if( hda.get( 'deleted' ) && !this.storage.get( 'show_deleted' ) ){
- this.removeHdaView( hda.get( 'id' ) );
+ this.removeHdaView( this.hdaViews[ hda.id ] );
} // otherwise, the hdaView rendering should handle it
},
@@ -520,22 +559,21 @@
*/
handleHdaVisibleChange : function( hda ){
if( hda.hidden() && !this.storage.get( 'show_hidden' ) ){
- this.removeHdaView( hda.get( 'id' ) );
+ this.removeHdaView( this.hdaViews[ hda.id ] );
} // otherwise, the hdaView rendering should handle it
},
/** Remove a view from the panel and if the panel is now empty, re-render
* @param {Int} the id of the hdaView to remove
*/
- removeHdaView : function( id ){
- //console.debug( 'removeHdaView' );
- var panel = this,
- hdaView = this.hdaViews[ id ];
+ removeHdaView : function( hdaView ){
if( !hdaView ){ return; }
+ var panel = this;
hdaView.$el.fadeOut( panel.fxSpeed, function(){
+ hdaView.off();
hdaView.remove();
- delete panel.hdaViews[ id ];
+ delete panel.hdaViews[ hdaView.model.id ];
if( _.isEmpty( panel.hdaViews ) ){
panel.$el.find( '#emptyHistoryMessage' ).fadeIn( panel.fxSpeed );
}
@@ -544,10 +582,9 @@
// ------------------------------------------------------------------------ panel rendering
/** Render urls, historyPanel body, and hdas (if any are shown)
+ * @fires: rendered when the panel is attached and fully visible
* @see Backbone.View#render
*/
- /** event rendered triggered when the panel rendering is complete */
- /** event rendered:initial triggered when the FIRST panel rendering is complete */
render : function( callback ){
var panel = this,
$newRender;
@@ -579,11 +616,13 @@
//TODO: ideally, these would be set up before the fade in (can't because of async save text)
panel._setUpBehaviours();
if( callback ){ callback.call( this ); }
+ panel.trigger( 'rendered', this );
}
]);
return this;
},
+ /** render with history data */
renderModel : function( ){
var $newRender = $( '<div/>' );
// render the main template, tooltips
@@ -601,7 +640,9 @@
return $newRender;
},
+ /** render with no history data */
renderWithoutModel : function( ){
+ // we'll always need the message container
var $newRender = $( '<div/>' ),
$msgContainer = $( '<div/>' ).attr( 'id', 'message-container' )
.css({ 'margin-left': '4px', 'margin-right': '4px' });
@@ -624,44 +665,12 @@
);
_.each( visibleHdas, function( hda ){
- var hdaId = hda.get( 'id' ),
- expanded = historyView.storage.get( 'expandedHdas' ).get( hdaId );
-
- historyView.hdaViews[ hdaId ] = new historyView.HDAView({
- model : hda,
- expanded : expanded,
- hasUser : historyView.model.hasUser(),
- logger : historyView.logger
- });
- historyView._setUpHdaListeners( historyView.hdaViews[ hdaId ] );
-
// render it (NOTE: reverse order, newest on top (prepend))
- //TODO: by default send a reverse order list (although this may be more efficient - it's more confusing)
- $whereTo.prepend( historyView.hdaViews[ hdaId ].render().$el );
+ $whereTo.prepend( historyView.createHdaView( hda ).$el );
});
return visibleHdas.length;
},
- /** Set up HistoryPanel listeners for HDAView events. Currently binds:
- * HDAView#body-visible, HDAView#body-hidden to store expanded states
- * @param {HDAView} hdaView HDAView (base or edit) to listen to
- */
- _setUpHdaListeners : function( hdaView ){
- var historyView = this;
- // maintain a list of hdas whose bodies are expanded
- hdaView.on( 'body-expanded', function( id ){
- historyView.storage.get( 'expandedHdas' ).set( id, true );
- });
- hdaView.on( 'body-collapsed', function( id ){
- historyView.storage.get( 'expandedHdas' ).deleteKey( id );
- });
-//TODO: remove?
- hdaView.on( 'error', function( model, xhr, options, msg ){
-//TODO: change to modal?
- historyView.errorHandler( model, xhr, options, msg );
- });
- },
-
/** Set up HistoryPanel js/widget behaviours
*/
//TODO: these should be either sub-MVs, or handled by events
@@ -770,6 +779,7 @@
},
// ........................................................................ loading indicator
+ /** hide the panel and display a loading indicator (in the panel's parent) when history model's are switched */
showLoadingIndicator : function( msg, speed, callback ){
speed = ( speed !== undefined )?( speed ):( this.fxSpeed );
if( !this.indicator ){
@@ -783,6 +793,7 @@
}
},
+ /** hide the loading indicator */
hideLoadingIndicator : function( speed, callback ){
speed = ( speed !== undefined )?( speed ):( this.fxSpeed );
if( this.indicator ){
@@ -816,6 +827,7 @@
return $msgContainer.html( $msg );
},
+ /** convert msg and details into modal options usable by Galaxy.modal */
messageToModalOptions : function( type, msg, details ){
// only error is fleshed out here
var panel = this,
@@ -860,10 +872,12 @@
},
// ........................................................................ scrolling
+ /** get the current scroll position of the panel in its parent */
scrollPosition : function(){
return this.$el.parent().scrollTop();
},
+ /** set the current scroll position of the panel in its parent */
scrollTo : function( pos ){
this.$el.parent().scrollTop( pos );
},
@@ -925,6 +939,7 @@
// ........................................................................ external objects/MVC
//TODO: remove quota meter from panel and remove this
+ /** add listeners to an external quota meter (mvc/user/user-quotameter.js) */
connectToQuotaMeter : function( quotaMeter ){
if( !quotaMeter ){
return this;
@@ -942,25 +957,26 @@
return this;
},
+//TODO: this seems more like a per user message than a history message; IOW, this doesn't belong here
/** Show the over quota message (which happens to be in the history panel).
*/
-//TODO: this seems more like a per user message than a history message; IOW, this doesn't belong here
showQuotaMessage : function(){
var msg = this.$el.find( '#quota-message-container' );
//this.log( this + ' showing quota message:', msg, userData );
if( msg.is( ':hidden' ) ){ msg.slideDown( this.fxSpeed ); }
},
+//TODO: this seems more like a per user message than a history message
/** Hide the over quota message (which happens to be in the history panel).
*/
-//TODO: this seems more like a per user message than a history message
hideQuotaMessage : function(){
var msg = this.$el.find( '#quota-message-container' );
//this.log( this + ' hiding quota message:', msg, userData );
if( !msg.is( ':hidden' ) ){ msg.slideUp( this.fxSpeed ); }
},
- //TODO: move show_deleted/hidden into panel from opt menu and remove this
+//TODO: move show_deleted/hidden into panel from opt menu and remove this
+ /** add listeners to an external options menu (templates/webapps/galaxy/root/index.mako) */
connectToOptionsMenu : function( optionsMenu ){
if( !optionsMenu ){
return this;
diff -r 7f70f02747d374ebf1804a1ae380cb27968043b0 -r e66076ed4678c1ad15db09c1d220a624e2047a79 static/scripts/packed/mvc/dataset/hda-base.js
--- a/static/scripts/packed/mvc/dataset/hda-base.js
+++ b/static/scripts/packed/mvc/dataset/hda-base.js
@@ -1,1 +1,1 @@
-define(["mvc/dataset/hda-model"],function(b){var a=Backbone.View.extend(LoggableMixin).extend({tagName:"div",className:"historyItemContainer",fxSpeed:"fast",initialize:function(c){if(c.logger){this.logger=this.model.logger=c.logger}this.log(this+".initialize:",c);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton];this.expanded=c.expanded||false;this._setUpListeners()},_setUpListeners:function(){this.model.on("change",function(d,c){if(this.model.changedAttributes().state&&this.model.inReadyState()&&this.expanded&&!this.model.hasDetails()){this.model.fetch()}else{this.render()}},this)},render:function(){var d=this,g=this.model.get("id"),e=this.model.get("state"),c=$("<div/>").attr("id","historyItem-"+g),f=(this.$el.children().size()===0);this.$el.attr("id","historyItemContainer-"+g);this.$el.find("[title]").tooltip("destroy");this.urls=this.model.urls();c.addClass("historyItemWrapper").addClass("historyItem").addClass("historyItem-"+e);c.append(this._render_warnings());c.append(this._render_titleBar());this._setUpBehaviors(c);this.body=$(this._render_body());c.append(this.body);this.$el.fadeOut(this.fxSpeed,function(){d.$el.children().remove();d.$el.append(c).fadeIn(d.fxSpeed,function(){d.log(d+" rendered:",d.$el);var h="rendered";if(f){h+=":initial"}else{if(d.model.inReadyState()){h+=":ready"}}d.trigger(h)})});return this},_setUpBehaviors:function(c){c=c||this.$el;make_popup_menus(c);c.find("[title]").tooltip({placement:"bottom"})},_render_warnings:function(){return $(jQuery.trim(a.templates.messages(this.model.toJSON())))},_render_titleBar:function(){var c=$('<div class="historyItemTitleBar" style="overflow: hidden"></div>');c.append(this._render_titleButtons());c.append('<span class="state-icon"></span>');c.append(this._render_titleLink());return c},_render_titleButtons:function(){var c=$('<div class="historyItemButtons"></div>');c.append(this._render_displayButton());return c},_render_displayButton:function(){if((this.model.get("state")===b.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(this.model.get("state")===b.HistoryDatasetAssociation.STATES.NEW)||(!this.model.get("accessible"))){this.displayButton=null;return null}var d={icon_class:"display",target:"galaxy_main"};if(this.model.get("purged")){d.enabled=false;d.title=_l("Cannot display datasets removed from disk")}else{if(this.model.get("state")===b.HistoryDatasetAssociation.STATES.UPLOAD){d.enabled=false;d.title=_l("This dataset must finish uploading before it can be viewed")}else{d.title=_l("View data");d.href=this.urls.display;var c=this;d.on_click=function(){Galaxy.frame_manager.frame_new({title:"Data Viewer: "+c.model.get("name"),type:"url",location:"center",content:c.urls.display})}}}this.displayButton=new IconButtonView({model:new IconButton(d)});return this.displayButton.render().$el},_render_titleLink:function(){return $(jQuery.trim(a.templates.titleLink(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_hdaSummary:function(){var c=_.extend(this.model.toJSON(),{urls:this.urls});return a.templates.hdaSummary(c)},_render_primaryActionButtons:function(e){var c=this,d=$("<div/>").attr("id","primary-actions-"+this.model.get("id"));_.each(e,function(f){d.append(f.call(c))});return d},_render_downloadButton:function(){if(this.model.get("purged")||!this.model.hasData()){return null}var c=a.templates.downloadLinks(_.extend(this.model.toJSON(),{urls:this.urls}));return $(c.trim())},_render_showParamsButton:function(){this.showParamsButton=new IconButtonView({model:new IconButton({title:_l("View details"),href:this.urls.show_params,target:"galaxy_main",icon_class:"information"})});return this.showParamsButton.render().$el},_render_displayAppArea:function(){return $("<div/>").addClass("display-apps")},_render_displayApps:function(e){e=e||this.$el;var f=e.find("div.display-apps"),c=this.model.get("display_types"),d=this.model.get("display_apps");if((!this.model.hasData())||(!e||!e.length)||(!f.length)){return}f.html(null);if(!_.isEmpty(c)){f.append(a.templates.displayApps({displayApps:c}))}if(!_.isEmpty(d)){f.append(a.templates.displayApps({displayApps:d}))}},_render_peek:function(){var c=this.model.get("peek");if(!c){return null}return $("<div/>").append($("<pre/>").attr("id","peek"+this.model.get("id")).addClass("peek").append(c))},_render_body:function(){var c=$("<div/>").attr("id","info-"+this.model.get("id")).addClass("historyItemBody").attr("style","display: none");if(this.expanded){this._render_body_html(c);c.css("display","block")}return c},_render_body_html:function(c){c.html("");switch(this.model.get("state")){case b.HistoryDatasetAssociation.STATES.NEW:this._render_body_new(c);break;case b.HistoryDatasetAssociation.STATES.NOT_VIEWABLE:this._render_body_not_viewable(c);break;case b.HistoryDatasetAssociation.STATES.UPLOAD:this._render_body_uploading(c);break;case b.HistoryDatasetAssociation.STATES.PAUSED:this._render_body_paused(c);break;case b.HistoryDatasetAssociation.STATES.QUEUED:this._render_body_queued(c);break;case b.HistoryDatasetAssociation.STATES.RUNNING:this._render_body_running(c);break;case b.HistoryDatasetAssociation.STATES.ERROR:this._render_body_error(c);break;case b.HistoryDatasetAssociation.STATES.DISCARDED:this._render_body_discarded(c);break;case b.HistoryDatasetAssociation.STATES.SETTING_METADATA:this._render_body_setting_metadata(c);break;case b.HistoryDatasetAssociation.STATES.EMPTY:this._render_body_empty(c);break;case b.HistoryDatasetAssociation.STATES.FAILED_METADATA:this._render_body_failed_metadata(c);break;case b.HistoryDatasetAssociation.STATES.OK:this._render_body_ok(c);break;default:c.append($('<div>Error: unknown dataset state "'+this.model.get("state")+'".</div>'))}c.append('<div style="clear: both"></div>');this._setUpBehaviors(c)},_render_body_new:function(d){var c=_l("This is a new dataset and not all of its data are available yet");d.append($("<div>"+_l(c)+"</div>"))},_render_body_not_viewable:function(c){c.append($("<div>"+_l("You do not have permission to view dataset")+"</div>"))},_render_body_uploading:function(c){c.append($("<div>"+_l("Dataset is uploading")+"</div>"))},_render_body_queued:function(c){c.append($("<div>"+_l("Job is waiting to run")+"</div>"));c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_paused:function(c){c.append($("<div>"+_l("Job is paused. Use the history menu to resume")+"</div>"));c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_running:function(c){c.append("<div>"+_l("Job is currently running")+"</div>");c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_error:function(c){if(!this.model.get("purged")){c.append($("<div>"+this.model.get("misc_blurb")+"</div>"))}c.append((_l("An error occurred with this dataset")+": <i>"+$.trim(this.model.get("misc_info"))+"</i>"));c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers.concat([this._render_downloadButton])))},_render_body_discarded:function(c){c.append("<div>"+_l("The job creating this dataset was cancelled before completion")+".</div>");c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_setting_metadata:function(c){c.append($("<div>"+_l("Metadata is being auto-detected")+".</div>"))},_render_body_empty:function(c){c.append($("<div>"+_l("No data")+": <i>"+this.model.get("misc_blurb")+"</i></div>"));c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_failed_metadata:function(c){c.append($(a.templates.failedMetadata(_.extend(this.model.toJSON(),{urls:this.urls}))));this._render_body_ok(c)},_render_body_ok:function(c){c.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){c.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));return}c.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));c.append('<div class="clear"/>');c.append(this._render_displayAppArea());this._render_displayApps(c);c.append(this._render_peek())},events:{"click .historyItemTitle":"toggleBodyVisibility"},toggleBodyVisibility:function(e,c){var d=this;c=(c===undefined)?(!this.body.is(":visible")):(c);if(c){if(this.model.inReadyState()&&!this.model.hasDetails()){var f=this.model.fetch();f.done(function(g){d.expandBody()})}else{this.expandBody()}}else{this.collapseBody()}},expandBody:function(){var c=this;c._render_body_html(c.body);this.body.slideDown(c.fxSpeed,function(){c.expanded=true;c.trigger("body-expanded",c.model.get("id"))})},collapseBody:function(){var c=this;this.body.slideUp(c.fxSpeed,function(){c.expanded=false;c.trigger("body-collapsed",c.model.get("id"))})},remove:function(d){var c=this;this.$el.fadeOut(c.fxSpeed,function(){c.$el.remove();c.off();if(d){d()}})},toString:function(){var c=(this.model)?(this.model+""):("(no model)");return"HDABaseView("+c+")"}});a.templates={warningMsg:Handlebars.templates["template-warningmessagesmall"],messages:Handlebars.templates["template-hda-warning-messages"],titleLink:Handlebars.templates["template-hda-titleLink"],hdaSummary:Handlebars.templates["template-hda-hdaSummary"],downloadLinks:Handlebars.templates["template-hda-downloadLinks"],failedMetadata:Handlebars.templates["template-hda-failedMetadata"],displayApps:Handlebars.templates["template-hda-displayApps"]};return{HDABaseView:a,}});
\ No newline at end of file
+define(["mvc/dataset/hda-model"],function(b){var a=Backbone.View.extend(LoggableMixin).extend({tagName:"div",className:"historyItemContainer",fxSpeed:"fast",initialize:function(c){if(c.logger){this.logger=this.model.logger=c.logger}this.log(this+".initialize:",c);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton];this.expanded=c.expanded||false;this._setUpListeners()},_setUpListeners:function(){this.model.on("change",function(d,c){if(this.model.changedAttributes().state&&this.model.inReadyState()&&this.expanded&&!this.model.hasDetails()){this.model.fetch()}else{this.render()}},this)},render:function(){var d=this,g=this.model.get("id"),e=this.model.get("state"),c=$("<div/>").attr("id","historyItem-"+g),f=(this.$el.children().size()===0);this.$el.attr("id","historyItemContainer-"+g);this.$el.find("[title]").tooltip("destroy");this.urls=this.model.urls();c.addClass("historyItemWrapper").addClass("historyItem").addClass("historyItem-"+e);c.append(this._render_warnings());c.append(this._render_titleBar());this._setUpBehaviors(c);this.body=$(this._render_body());c.append(this.body);this.$el.fadeOut(this.fxSpeed,function(){d.$el.children().remove();d.$el.append(c).fadeIn(d.fxSpeed,function(){d.log(d+" rendered:",d.$el);var h="rendered";if(f){h+=":initial"}else{if(d.model.inReadyState()){h+=":ready"}}d.trigger(h)})});return this},_setUpBehaviors:function(c){c=c||this.$el;make_popup_menus(c);c.find("[title]").tooltip({placement:"bottom"})},_render_warnings:function(){return $(jQuery.trim(a.templates.messages(this.model.toJSON())))},_render_titleBar:function(){var c=$('<div class="historyItemTitleBar" style="overflow: hidden"></div>');c.append(this._render_titleButtons());c.append('<span class="state-icon"></span>');c.append(this._render_titleLink());return c},_render_titleButtons:function(){var c=$('<div class="historyItemButtons"></div>');c.append(this._render_displayButton());return c},_render_displayButton:function(){if((this.model.get("state")===b.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(this.model.get("state")===b.HistoryDatasetAssociation.STATES.NEW)||(!this.model.get("accessible"))){this.displayButton=null;return null}var d={icon_class:"display",target:"galaxy_main"};if(this.model.get("purged")){d.enabled=false;d.title=_l("Cannot display datasets removed from disk")}else{if(this.model.get("state")===b.HistoryDatasetAssociation.STATES.UPLOAD){d.enabled=false;d.title=_l("This dataset must finish uploading before it can be viewed")}else{d.title=_l("View data");d.href=this.urls.display;var c=this;d.on_click=function(){Galaxy.frame_manager.frame_new({title:"Data Viewer: "+c.model.get("name"),type:"url",location:"center",content:c.urls.display})}}}this.displayButton=new IconButtonView({model:new IconButton(d)});return this.displayButton.render().$el},_render_titleLink:function(){return $(jQuery.trim(a.templates.titleLink(this.model.toJSON())))},_render_hdaSummary:function(){var c=_.extend(this.model.toJSON(),{urls:this.urls});return a.templates.hdaSummary(c)},_render_primaryActionButtons:function(e){var c=this,d=$("<div/>").attr("id","primary-actions-"+this.model.get("id"));_.each(e,function(f){d.append(f.call(c))});return d},_render_downloadButton:function(){if(this.model.get("purged")||!this.model.hasData()){return null}var c=a.templates.downloadLinks(_.extend(this.model.toJSON(),{urls:this.urls}));return $(c.trim())},_render_showParamsButton:function(){this.showParamsButton=new IconButtonView({model:new IconButton({title:_l("View details"),href:this.urls.show_params,target:"galaxy_main",icon_class:"information"})});return this.showParamsButton.render().$el},_render_displayAppArea:function(){return $("<div/>").addClass("display-apps")},_render_displayApps:function(e){e=e||this.$el;var f=e.find("div.display-apps"),c=this.model.get("display_types"),d=this.model.get("display_apps");if((!this.model.hasData())||(!e||!e.length)||(!f.length)){return}f.html(null);if(!_.isEmpty(c)){f.append(a.templates.displayApps({displayApps:c}))}if(!_.isEmpty(d)){f.append(a.templates.displayApps({displayApps:d}))}},_render_peek:function(){var c=this.model.get("peek");if(!c){return null}return $("<div/>").append($("<pre/>").attr("id","peek"+this.model.get("id")).addClass("peek").append(c))},_render_body:function(){var c=$("<div/>").attr("id","info-"+this.model.get("id")).addClass("historyItemBody").attr("style","display: none");if(this.expanded){this._render_body_html(c);c.show()}return c},_render_body_html:function(e){e.empty();var c=this.model.get("state");var f="_render_body_"+c,d=this[f];if(_.isFunction(d)){this[f](e)}else{e.append($('<div>Error: unknown dataset state "'+this.model.get("state")+'".</div>'))}e.append('<div style="clear: both"></div>');this._setUpBehaviors(e)},_render_body_new:function(d){var c=_l("This is a new dataset and not all of its data are available yet");d.append($("<div>"+_l(c)+"</div>"))},_render_body_noPermission:function(c){c.append($("<div>"+_l("You do not have permission to view this dataset")+"</div>"))},_render_body_upload:function(c){c.append($("<div>"+_l("Dataset is uploading")+"</div>"))},_render_body_queued:function(c){c.append($("<div>"+_l("Job is waiting to run")+"</div>"));c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_paused:function(c){c.append($("<div>"+_l('Job is paused. Use the "Resume Paused Jobs" in the history menu to resume')+"</div>"));c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_running:function(c){c.append("<div>"+_l("Job is currently running")+"</div>");c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_error:function(c){if(!this.model.get("purged")){c.append($("<div>"+this.model.get("misc_blurb")+"</div>"))}c.append((_l("An error occurred with this dataset")+": <i>"+$.trim(this.model.get("misc_info"))+"</i>"));c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers.concat([this._render_downloadButton])))},_render_body_discarded:function(c){c.append("<div>"+_l("The job creating this dataset was cancelled before completion")+".</div>");c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_setting_metadata:function(c){c.append($("<div>"+_l("Metadata is being auto-detected")+".</div>"))},_render_body_empty:function(c){c.append($("<div>"+_l("No data")+": <i>"+this.model.get("misc_blurb")+"</i></div>"));c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_failed_metadata:function(c){c.append($(a.templates.failedMetadata(_.extend(this.model.toJSON(),{urls:this.urls}))));this._render_body_ok(c)},_render_body_ok:function(c){c.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){c.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));return}c.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));c.append('<div class="clear"/>');c.append(this._render_displayAppArea());this._render_displayApps(c);c.append(this._render_peek())},events:{"click .historyItemTitle":"toggleBodyVisibility"},toggleBodyVisibility:function(d,c){c=(c===undefined)?(!this.body.is(":visible")):(c);if(c){this.expandBody()}else{this.collapseBody()}},expandBody:function(){var c=this;function d(){c._render_body_html(c.body);c.body.slideDown(c.fxSpeed,function(){c.expanded=true;c.trigger("body-expanded",c.model.get("id"))})}if(this.model.inReadyState()&&!this.model.hasDetails()){this.model.fetch().done(function(e){d()})}else{d()}},collapseBody:function(){var c=this;this.body.slideUp(c.fxSpeed,function(){c.expanded=false;c.trigger("body-collapsed",c.model.get("id"))})},remove:function(d){var c=this;this.$el.fadeOut(c.fxSpeed,function(){c.$el.remove();c.off();if(d){d()}})},toString:function(){var c=(this.model)?(this.model+""):("(no model)");return"HDABaseView("+c+")"}});a.templates={warningMsg:Handlebars.templates["template-warningmessagesmall"],messages:Handlebars.templates["template-hda-warning-messages"],titleLink:Handlebars.templates["template-hda-titleLink"],hdaSummary:Handlebars.templates["template-hda-hdaSummary"],downloadLinks:Handlebars.templates["template-hda-downloadLinks"],failedMetadata:Handlebars.templates["template-hda-failedMetadata"],displayApps:Handlebars.templates["template-hda-displayApps"]};return{HDABaseView:a}});
\ No newline at end of file
diff -r 7f70f02747d374ebf1804a1ae380cb27968043b0 -r e66076ed4678c1ad15db09c1d220a624e2047a79 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 @@
-define(["mvc/dataset/hda-model","mvc/dataset/hda-base"],function(d,a){var f=a.HDABaseView.extend(LoggableMixin).extend({initialize:function(g){a.HDABaseView.prototype.initialize.call(this,g);this.hasUser=g.hasUser;this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton,this._render_rerunButton]},_setUpBehaviors:function(g){a.HDABaseView.prototype._setUpBehaviors.call(this,g)},_render_warnings:function(){return $(jQuery.trim(a.HDABaseView.templates.messages(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_titleButtons:function(){var g=$('<div class="historyItemButtons"></div>');g.append(this._render_displayButton());g.append(this._render_editButton());g.append(this._render_deleteButton());return g},_render_editButton:function(){if((this.model.get("state")===d.HistoryDatasetAssociation.STATES.NEW)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.UPLOAD)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){this.editButton=null;return null}var i=this.model.get("purged"),g=this.model.get("deleted"),h={title:_l("Edit Attributes"),href:this.urls.edit,target:"galaxy_main",icon_class:"edit"};if(g||i){h.enabled=false;if(i){h.title=_l("Cannot edit attributes of datasets removed from disk")}else{if(g){h.title=_l("Undelete dataset to edit attributes")}}}this.editButton=new IconButtonView({model:new IconButton(h)});return this.editButton.render().$el},_render_deleteButton:function(){if((this.model.get("state")===d.HistoryDatasetAssociation.STATES.NEW)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){this.deleteButton=null;return null}var g=this,j="historyItemDeleter-"+g.model.get("id"),h=g.urls["delete"],i={title:_l("Delete"),href:h,id:j,icon_class:"delete",on_click:function(){g.$el.find(".menu-button.delete").trigger("mouseout");g.model["delete"]()}};if(this.model.get("deleted")||this.model.get("purged")){i={title:_l("Dataset is already deleted"),icon_class:"delete",enabled:false}}this.deleteButton=new IconButtonView({model:new IconButton(i)});return this.deleteButton.render().$el},_render_hdaSummary:function(){var g=_.extend(this.model.toJSON(),{urls:this.urls});if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){_.extend(g,{dbkey_unknown_and_editable:true})}return a.HDABaseView.templates.hdaSummary(g)},_render_errButton:function(){if(this.model.get("state")!==d.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 g=this.model.get("visualizations");if((!this.model.hasData())||(_.isEmpty(g))){this.visualizationsButton=null;return null}if(_.isObject(g[0])){return this._render_visualizationsFrameworkButton(g)}if(!this.urls.visualization){this.visualizationsButton=null;return null}var i=this.model.get("dbkey"),l=this.urls.visualization,j={},m={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(i){m.dbkey=i}this.visualizationsButton=new IconButtonView({model:new IconButton({title:_l("Visualize"),href:this.urls.visualization,icon_class:"chart_curve"})});var h=this.visualizationsButton.render().$el;h.addClass("visualize-icon");function k(n){switch(n){case"trackster":return b(l,m,i);case"scatterplot":return e(l,m);default:return function(){Galaxy.frame_manager.frame_new({title:"Visualization",type:"url",content:l+"/"+n+"?"+$.param(m)})}}}if(g.length===1){h.attr("title",g[0]);h.click(k(g[0]))}else{_.each(g,function(o){var n=o.charAt(0).toUpperCase()+o.slice(1);j[_l(n)]=k(o)});make_popupmenu(h,j)}return h},_render_visualizationsFrameworkButton:function(g){if(!(this.model.hasData())||!(g&&!_.isEmpty(g))){this.visualizationsButton=null;return null}this.visualizationsButton=new IconButtonView({model:new IconButton({title:_l("Visualize"),icon_class:"chart_curve"})});var i=this.visualizationsButton.render().$el;i.addClass("visualize-icon");if(_.keys(g).length===1){i.attr("title",_.keys(g)[0]);i.attr("href",_.values(g)[0])}else{var j=[];_.each(g,function(k){j.push(k)});var h=new PopupMenu(i,j)}return i},_render_secondaryActionButtons:function(h){var i=$("<div/>"),g=this;i.attr("style","float: right;").attr("id","secondary-actions-"+this.model.get("id"));_.each(h,function(j){i.append(j.call(g))});return i},_render_tagButton:function(){if(!this.hasUser||!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.hasUser||!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 $(f.templates.tagArea(_.extend(this.model.toJSON(),{urls:this.urls})).trim())},_render_annotationArea:function(){if(!this.urls.annotation.get){return null}return $(f.templates.annotationArea(_.extend(this.model.toJSON(),{urls:this.urls})).trim())},_render_body_error:function(g){a.HDABaseView.prototype._render_body_error.call(this,g);var h=g.find("#primary-actions-"+this.model.get("id"));h.prepend(this._render_errButton())},_render_body_ok:function(g){g.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){g.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton,this._render_rerunButton]));return}g.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton,this._render_rerunButton,this._render_visualizationsButton]));g.append(this._render_secondaryActionButtons([this._render_tagButton,this._render_annotateButton]));g.append('<div class="clear"/>');g.append(this._render_tagArea());g.append(this._render_annotationArea());g.append(this._render_displayAppArea());this._render_displayApps(g);g.append(this._render_peek())},events:{"click .historyItemTitle":"toggleBodyVisibility","click .historyItemUndelete":function(g){this.model.undelete();return false},"click .historyItemUnhide":function(g){this.model.unhide();return false},"click .historyItemPurge":"confirmPurge","click a.icon-button.tags":"loadAndDisplayTags","click a.icon-button.annotate":"loadAndDisplayAnnotation"},confirmPurge:function c(g){this.model.purge({url:this.urls.purge});return false},loadAndDisplayTags:function(i){this.log(this+".loadAndDisplayTags",i);var g=this,j=this.$el.find(".tag-area"),h=j.find(".tag-elt");if(j.is(":hidden")){if(!jQuery.trim(h.html())){$.ajax({url:this.urls.tags.get,error:function(m,k,l){g.log("Tagging failed",m,k,l);g.trigger("error",g,m,{},_l("Tagging failed"))},success:function(k){h.html(k);h.find("[title]").tooltip();j.slideDown(g.fxSpeed)}})}else{j.slideDown(g.fxSpeed)}}else{j.slideUp(g.fxSpeed)}return false},loadAndDisplayAnnotation:function(i){this.log(this+".loadAndDisplayAnnotation",i);var g=this,k=this.$el.find(".annotation-area"),j=k.find(".annotation-elt"),h=this.urls.annotation.set;if(k.is(":hidden")){if(!jQuery.trim(j.html())){$.ajax({url:this.urls.annotation.get,error:function(){g.log("Annotation failed",xhr,status,error);g.trigger("error",g,xhr,{},_l("Annotation failed"))},success:function(l){if(l===""){l="<em>"+_l("Describe or add notes to dataset")+"</em>"}j.html(l);k.find("[title]").tooltip();async_save_text(j.attr("id"),j.attr("id"),h,"new_annotation",18,true,4);k.slideDown(g.fxSpeed)}})}else{k.slideDown(g.fxSpeed)}}else{k.slideUp(g.fxSpeed)}return false},toString:function(){var g=(this.model)?(this.model+""):("(no model)");return"HDAView("+g+")"}});f.templates={tagArea:Handlebars.templates["template-hda-tagArea"],annotationArea:Handlebars.templates["template-hda-annotationArea"]};function e(g,h){action=function(){Galaxy.frame_manager.frame_new({title:"Scatterplot",type:"url",content:g+"/scatterplot?"+$.param(h),location:"center"});$("div.popmenu-wrapper").remove();return false};return action}function b(g,i,h){return function(){var j={};if(h){j["f-dbkey"]=h}$.ajax({url:g+"/list_tracks?"+$.param(j),dataType:"html",error:function(){alert(("Could not add this dataset to browser")+".")},success:function(k){var l=window.parent;l.Galaxy.modal.show({title:"View Data in a New or Saved Visualization",buttons:{Cancel:function(){l.Galaxy.modal.hide()},"View in saved visualization":function(){l.Galaxy.modal.show({title:"Add Data to Saved Visualization",body:k,buttons:{Cancel:function(){l.Galaxy.modal.hide()},"Add to visualization":function(){$(l.document).find("input[name=id]:checked").each(function(){l.Galaxy.modal.hide();var m=$(this).val();i.id=m;l.Galaxy.frame_manager.frame_new({title:"Trackster",type:"url",content:g+"/trackster?"+$.param(i)})})}}})},"View in new visualization":function(){l.Galaxy.modal.hide();var m=g+"/trackster?"+$.param(i);l.Galaxy.frame_manager.frame_new({title:"Trackster",type:"url",content:m})}}})}});return false}}return{HDAEditView:f,}});
\ No newline at end of file
+define(["mvc/dataset/hda-model","mvc/dataset/hda-base"],function(d,a){var f=a.HDABaseView.extend(LoggableMixin).extend({initialize:function(g){a.HDABaseView.prototype.initialize.call(this,g);this.hasUser=g.hasUser;this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton,this._render_rerunButton]},_setUpBehaviors:function(g){a.HDABaseView.prototype._setUpBehaviors.call(this,g)},_render_warnings:function(){return $(jQuery.trim(a.HDABaseView.templates.messages(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_titleButtons:function(){var g=$('<div class="historyItemButtons"></div>');g.append(this._render_displayButton());g.append(this._render_editButton());g.append(this._render_deleteButton());return g},_render_editButton:function(){if((this.model.get("state")===d.HistoryDatasetAssociation.STATES.NEW)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.UPLOAD)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){this.editButton=null;return null}var i=this.model.get("purged"),g=this.model.get("deleted"),h={title:_l("Edit Attributes"),href:this.urls.edit,target:"galaxy_main",icon_class:"edit"};if(g||i){h.enabled=false;if(i){h.title=_l("Cannot edit attributes of datasets removed from disk")}else{if(g){h.title=_l("Undelete dataset to edit attributes")}}}this.editButton=new IconButtonView({model:new IconButton(h)});return this.editButton.render().$el},_render_deleteButton:function(){if((this.model.get("state")===d.HistoryDatasetAssociation.STATES.NEW)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){this.deleteButton=null;return null}var g=this,j="historyItemDeleter-"+g.model.get("id"),h=g.urls["delete"],i={title:_l("Delete"),href:h,id:j,icon_class:"delete",on_click:function(){g.$el.find(".menu-button.delete").trigger("mouseout");g.model["delete"]()}};if(this.model.get("deleted")||this.model.get("purged")){i={title:_l("Dataset is already deleted"),icon_class:"delete",enabled:false}}this.deleteButton=new IconButtonView({model:new IconButton(i)});return this.deleteButton.render().$el},_render_hdaSummary:function(){var g=_.extend(this.model.toJSON(),{urls:this.urls});if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){_.extend(g,{dbkey_unknown_and_editable:true})}return a.HDABaseView.templates.hdaSummary(g)},_render_errButton:function(){if(this.model.get("state")!==d.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 g=this.model.get("visualizations");if((!this.model.hasData())||(_.isEmpty(g))){this.visualizationsButton=null;return null}if(_.isObject(g[0])){return this._render_visualizationsFrameworkButton(g)}if(!this.urls.visualization){this.visualizationsButton=null;return null}var i=this.model.get("dbkey"),l=this.urls.visualization,j={},m={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(i){m.dbkey=i}this.visualizationsButton=new IconButtonView({model:new IconButton({title:_l("Visualize"),href:this.urls.visualization,icon_class:"chart_curve"})});var h=this.visualizationsButton.render().$el;h.addClass("visualize-icon");function k(n){switch(n){case"trackster":return b(l,m,i);case"scatterplot":return e(l,m);default:return function(){Galaxy.frame_manager.frame_new({title:"Visualization",type:"url",content:l+"/"+n+"?"+$.param(m)})}}}if(g.length===1){h.attr("title",g[0]);h.click(k(g[0]))}else{_.each(g,function(o){var n=o.charAt(0).toUpperCase()+o.slice(1);j[_l(n)]=k(o)});make_popupmenu(h,j)}return h},_render_visualizationsFrameworkButton:function(g){if(!(this.model.hasData())||!(g&&!_.isEmpty(g))){this.visualizationsButton=null;return null}this.visualizationsButton=new IconButtonView({model:new IconButton({title:_l("Visualize"),icon_class:"chart_curve"})});var i=this.visualizationsButton.render().$el;i.addClass("visualize-icon");if(_.keys(g).length===1){i.attr("title",_.keys(g)[0]);i.attr("href",_.values(g)[0])}else{var j=[];_.each(g,function(k){j.push(k)});var h=new PopupMenu(i,j)}return i},_render_secondaryActionButtons:function(h){var i=$("<div/>"),g=this;i.attr("style","float: right;").attr("id","secondary-actions-"+this.model.get("id"));_.each(h,function(j){i.append(j.call(g))});return i},_render_tagButton:function(){if(!this.hasUser||!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.hasUser||!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_body_error:function(g){a.HDABaseView.prototype._render_body_error.call(this,g);var h=g.find("#primary-actions-"+this.model.get("id"));h.prepend(this._render_errButton())},_render_body_ok:function(g){g.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){g.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton,this._render_rerunButton]));return}g.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton,this._render_rerunButton,this._render_visualizationsButton]));g.append(this._render_secondaryActionButtons([this._render_tagButton,this._render_annotateButton]));g.append('<div class="clear"/>');g.append(this._render_tagArea());g.append(this._render_annotationArea());g.append(this._render_displayAppArea());this._render_displayApps(g);g.append(this._render_peek())},events:{"click .historyItemTitle":"toggleBodyVisibility","click .historyItemUndelete":function(g){this.model.undelete();return false},"click .historyItemUnhide":function(g){this.model.unhide();return false},"click .historyItemPurge":"confirmPurge","click a.icon-button.tags":"loadAndDisplayTags","click a.icon-button.annotate":"loadAndDisplayAnnotation"},confirmPurge:function c(g){this.model.purge({url:this.urls.purge});return false},_render_tagArea:function(){if(!this.hasUser||!this.urls.tags.set){return null}return $(f.templates.tagArea(_.extend(this.model.toJSON(),{urls:this.urls})).trim())},loadAndDisplayTags:function(i){this.log(this+".loadAndDisplayTags",i);var g=this,j=this.$el.find(".tag-area"),h=j.find(".tag-elt");if(j.is(":hidden")){if(!jQuery.trim(h.html())){$.ajax({url:this.urls.tags.get,error:function(m,k,l){g.log("Tagging failed",m,k,l);g.trigger("error",g,m,{},_l("Tagging failed"))},success:function(k){h.html(k);h.find("[title]").tooltip();j.slideDown(g.fxSpeed)}})}else{j.slideDown(g.fxSpeed)}}else{j.slideUp(g.fxSpeed)}return false},_render_annotationArea:function(){if(!this.hasUser||!this.urls.annotation.get){return null}return $(f.templates.annotationArea(_.extend(this.model.toJSON(),{urls:this.urls})).trim())},loadAndDisplayAnnotation:function(i){this.log(this+".loadAndDisplayAnnotation",i);var g=this,k=this.$el.find(".annotation-area"),j=k.find(".annotation-elt"),h=this.urls.annotation.set;if(k.is(":hidden")){if(!jQuery.trim(j.html())){$.ajax({url:this.urls.annotation.get,error:function(){g.log("Annotation failed",xhr,status,error);g.trigger("error",g,xhr,{},_l("Annotation failed"))},success:function(l){if(l===""){l="<em>"+_l("Describe or add notes to dataset")+"</em>"}j.html(l);k.find("[title]").tooltip();async_save_text(j.attr("id"),j.attr("id"),h,"new_annotation",18,true,4);k.slideDown(g.fxSpeed)}})}else{k.slideDown(g.fxSpeed)}}else{k.slideUp(g.fxSpeed)}return false},toString:function(){var g=(this.model)?(this.model+""):("(no model)");return"HDAView("+g+")"}});f.templates={tagArea:Handlebars.templates["template-hda-tagArea"],annotationArea:Handlebars.templates["template-hda-annotationArea"]};function e(g,h){action=function(){Galaxy.frame_manager.frame_new({title:"Scatterplot",type:"url",content:g+"/scatterplot?"+$.param(h),location:"center"});$("div.popmenu-wrapper").remove();return false};return action}function b(g,i,h){return function(){var j={};if(h){j["f-dbkey"]=h}$.ajax({url:g+"/list_tracks?"+$.param(j),dataType:"html",error:function(){alert(("Could not add this dataset to browser")+".")},success:function(k){var l=window.parent;l.Galaxy.modal.show({title:"View Data in a New or Saved Visualization",buttons:{Cancel:function(){l.Galaxy.modal.hide()},"View in saved visualization":function(){l.Galaxy.modal.show({title:"Add Data to Saved Visualization",body:k,buttons:{Cancel:function(){l.Galaxy.modal.hide()},"Add to visualization":function(){$(l.document).find("input[name=id]:checked").each(function(){l.Galaxy.modal.hide();var m=$(this).val();i.id=m;l.Galaxy.frame_manager.frame_new({title:"Trackster",type:"url",content:g+"/trackster?"+$.param(i)})})}}})},"View in new visualization":function(){l.Galaxy.modal.hide();var m=g+"/trackster?"+$.param(i);l.Galaxy.frame_manager.frame_new({title:"Trackster",type:"url",content:m})}}})}});return false}}return{HDAEditView:f}});
\ No newline at end of file
diff -r 7f70f02747d374ebf1804a1ae380cb27968043b0 -r e66076ed4678c1ad15db09c1d220a624e2047a79 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 @@
-define([],function(){var d=Backbone.Model.extend(LoggableMixin).extend({defaults:{history_id:null,model_class:"HistoryDatasetAssociation",hid:0,id:null,name:"(unnamed dataset)",state:"new",deleted:false,visible:true,accessible:true,purged:false,data_type:null,file_size:0,file_ext:"",meta_files:[],misc_blurb:"",misc_info:""},urlRoot:"api/histories/",url:function(){return this.urlRoot+this.get("history_id")+"/contents/"+this.get("id")},urls:function(){var j=this.get("id");if(!j){return{}}var h={"delete":"/datasets/"+j+"/delete_async",purge:"/datasets/"+j+"/purge_async",unhide:"/datasets/"+j+"/unhide",undelete:"/datasets/"+j+"/undelete",display:"/datasets/"+j+"/display/?preview=True",download:"/datasets/"+j+"/display?to_ext="+this.get("file_ext"),edit:"/datasets/"+j+"/edit",report_error:"/dataset/errors?id="+j,rerun:"/tool_runner/rerun?id="+j,show_params:"/datasets/"+j+"/show_params",visualization:"/visualization",annotation:{get:"/dataset/get_annotation_async?id="+j,set:"/dataset/annotate_async?id="+j},tags:{get:"/tag/get_tagging_elt_async?item_id="+j+"&item_class=HistoryDatasetAssociation",set:"/tag/retag?item_id="+j+"&item_class=HistoryDatasetAssociation"}};var i=this.get("meta_files");if(i){h.meta_download=_.map(i,function(k){return{url:"/dataset/get_metadata_file?hda_id="+j+"&metadata_name="+k.file_type,file_type:k.file_type}})}return h},initialize:function(h){this.log(this+".initialize",this.attributes);this.log("\tparent history_id: "+this.get("history_id"));if(!this.get("accessible")){this.set("state",d.STATES.NOT_VIEWABLE)}this._setUpListeners()},_setUpListeners:function(){this.on("change:state",function(i,h){this.log(this+" has changed state:",i,h);if(this.inReadyState()){this.trigger("state:ready",i,h,this.previous("state"))}})},isDeletedOrPurged:function(){return(this.get("deleted")||this.get("purged"))},isVisible:function(i,j){var h=true;if((!i)&&(this.get("deleted")||this.get("purged"))){h=false}if((!j)&&(!this.get("visible"))){h=false}return h},hidden:function(){return !this.get("visible")},inReadyState:function(){var h=_.contains(d.READY_STATES,this.get("state"));return(this.isDeletedOrPurged()||h)},hasDetails:function(){return _.has(this.attributes,"genome_build")},hasData:function(){return(this.get("file_size")>0)},"delete":function c(h){return this.save({deleted:true},h)},undelete:function a(h){return this.save({deleted:false},h)},hide:function b(h){return this.save({visible:false},h)},unhide:function g(h){return this.save({visible:true},h)},purge:function f(h){var i=this,j=jQuery.ajax(h);j.done(function(m,k,l){i.set("purged",true)});j.fail(function(o,k,n){var l=_l("Unable to purge this dataset");var m=("Removal of datasets by users is not allowed in this Galaxy instance");if(o.responseJSON&&o.responseJSON.error){l=o.responseJSON.error}else{if(o.responseText.indexOf(m)!==-1){l=m}}o.responseText=l;i.trigger("error",i,o,h,_l(l),{error:l})})},searchKeys:["name","file_ext","genome_build","misc_blurb","misc_info","annotation","tags"],search:function(h){var i=this;h=h.toLowerCase();return _.filter(this.searchKeys,function(k){var j=i.get(k);return(_.isString(j)&&j.toLowerCase().indexOf(h)!==-1)})},matches:function(h){return !!this.search(h).length},toString:function(){var h=this.get("id")||"";if(this.get("name")){h=this.get("hid")+' :"'+this.get("name")+'",'+h}return"HDA("+h+")"}});d.STATES={UPLOAD:"upload",QUEUED:"queued",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",EMPTY:"empty",OK:"ok",PAUSED:"paused",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};d.READY_STATES=[d.STATES.NEW,d.STATES.OK,d.STATES.EMPTY,d.STATES.PAUSED,d.STATES.FAILED_METADATA,d.STATES.NOT_VIEWABLE,d.STATES.DISCARDED,d.STATES.ERROR];d.NOT_READY_STATES=[d.STATES.UPLOAD,d.STATES.QUEUED,d.STATES.RUNNING,d.STATES.SETTING_METADATA];var e=Backbone.Collection.extend(LoggableMixin).extend({model:d,urlRoot:"/api/histories",url:function(){return this.urlRoot+"/"+this.historyId+"/contents"},initialize:function(i,h){h=h||{};this.historyId=h.historyId;this._setUpListeners()},_setUpListeners:function(){},ids:function(){return this.map(function(h){return h.id})},notReady:function(){return this.filter(function(h){return !h.inReadyState()})},running:function(){var h=[];this.each(function(i){if(!i.inReadyState()){h.push(i.get("id"))}});return h},getByHid:function(h){return _.first(this.filter(function(i){return i.get("hid")===h}))},getVisible:function(h,i){return this.filter(function(j){return j.isVisible(h,i)})},fetchAllDetails:function(){return this.fetch({data:{details:"all"}})},matches:function(h){return this.filter(function(i){return i.matches(h)})},set:function(j,h){var i=this;j=_.map(j,function(l){var m=i.get(l.id);if(!m){return l}var k=m.toJSON();_.extend(k,l);return k});Backbone.Collection.prototype.set.call(this,j,h)},toString:function(){return("HDACollection()")}});return{HistoryDatasetAssociation:d,HDACollection:e}});
\ No newline at end of file
+define([],function(){var d=Backbone.Model.extend(LoggableMixin).extend({defaults:{history_id:null,model_class:"HistoryDatasetAssociation",hid:0,id:null,name:"(unnamed dataset)",state:"new",deleted:false,visible:true,accessible:true,purged:false,data_type:null,file_size:0,file_ext:"",meta_files:[],misc_blurb:"",misc_info:""},urlRoot:"api/histories/",url:function(){return this.urlRoot+this.get("history_id")+"/contents/"+this.get("id")},urls:function(){var j=this.get("id");if(!j){return{}}var h={purge:galaxy_config.root+"datasets/"+j+"/purge_async",display:galaxy_config.root+"datasets/"+j+"/display/?preview=True",download:galaxy_config.root+"datasets/"+j+"/display?to_ext="+this.get("file_ext"),edit:galaxy_config.root+"datasets/"+j+"/edit",report_error:galaxy_config.root+"dataset/errors?id="+j,rerun:galaxy_config.root+"tool_runner/rerun?id="+j,show_params:galaxy_config.root+"datasets/"+j+"/show_params",visualization:galaxy_config.root+"visualization",annotation:{get:galaxy_config.root+"dataset/get_annotation_async?id="+j,set:galaxy_config.root+"dataset/annotate_async?id="+j},tags:{get:galaxy_config.root+"tag/get_tagging_elt_async?item_id="+j+"&item_class=HistoryDatasetAssociation",set:galaxy_config.root+"tag/retag?item_id="+j+"&item_class=HistoryDatasetAssociation"}};var i=this.get("meta_files");if(i){h.meta_download=_.map(i,function(k){return{url:galaxy_config.root+"dataset/get_metadata_file?hda_id="+j+"&metadata_name="+k.file_type,file_type:k.file_type}})}return h},initialize:function(h){this.log(this+".initialize",this.attributes);this.log("\tparent history_id: "+this.get("history_id"));if(!this.get("accessible")){this.set("state",d.STATES.NOT_VIEWABLE)}this._setUpListeners()},_setUpListeners:function(){this.on("change:state",function(i,h){this.log(this+" has changed state:",i,h);if(this.inReadyState()){this.trigger("state:ready",i,h,this.previous("state"))}})},isDeletedOrPurged:function(){return(this.get("deleted")||this.get("purged"))},isVisible:function(i,j){var h=true;if((!i)&&(this.get("deleted")||this.get("purged"))){h=false}if((!j)&&(!this.get("visible"))){h=false}return h},hidden:function(){return !this.get("visible")},inReadyState:function(){var h=_.contains(d.READY_STATES,this.get("state"));return(this.isDeletedOrPurged()||h)},hasDetails:function(){return _.has(this.attributes,"genome_build")},hasData:function(){return(this.get("file_size")>0)},"delete":function c(h){return this.save({deleted:true},h)},undelete:function a(h){return this.save({deleted:false},h)},hide:function b(h){return this.save({visible:false},h)},unhide:function g(h){return this.save({visible:true},h)},purge:function f(h){var i=this,j=jQuery.ajax(h);j.done(function(m,k,l){i.set("purged",true)});j.fail(function(o,k,n){var l=_l("Unable to purge this dataset");var m=("Removal of datasets by users is not allowed in this Galaxy instance");if(o.responseJSON&&o.responseJSON.error){l=o.responseJSON.error}else{if(o.responseText.indexOf(m)!==-1){l=m}}o.responseText=l;i.trigger("error",i,o,h,_l(l),{error:l})})},searchKeys:["name","file_ext","genome_build","misc_blurb","misc_info","annotation","tags"],search:function(h){var i=this;h=h.toLowerCase();return _.filter(this.searchKeys,function(k){var j=i.get(k);return(_.isString(j)&&j.toLowerCase().indexOf(h)!==-1)})},matches:function(h){return !!this.search(h).length},toString:function(){var h=this.get("id")||"";if(this.get("name")){h=this.get("hid")+' :"'+this.get("name")+'",'+h}return"HDA("+h+")"}});d.STATES={UPLOAD:"upload",QUEUED:"queued",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",EMPTY:"empty",OK:"ok",PAUSED:"paused",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};d.READY_STATES=[d.STATES.NEW,d.STATES.OK,d.STATES.EMPTY,d.STATES.PAUSED,d.STATES.FAILED_METADATA,d.STATES.NOT_VIEWABLE,d.STATES.DISCARDED,d.STATES.ERROR];d.NOT_READY_STATES=[d.STATES.UPLOAD,d.STATES.QUEUED,d.STATES.RUNNING,d.STATES.SETTING_METADATA];var e=Backbone.Collection.extend(LoggableMixin).extend({model:d,urlRoot:galaxy_config.root+"api/histories",url:function(){return this.urlRoot+"/"+this.historyId+"/contents"},initialize:function(i,h){h=h||{};this.historyId=h.historyId;this._setUpListeners()},_setUpListeners:function(){},ids:function(){return this.map(function(h){return h.id})},notReady:function(){return this.filter(function(h){return !h.inReadyState()})},running:function(){var h=[];this.each(function(i){if(!i.inReadyState()){h.push(i.get("id"))}});return h},getByHid:function(h){return _.first(this.filter(function(i){return i.get("hid")===h}))},getVisible:function(h,i){return this.filter(function(j){return j.isVisible(h,i)})},fetchAllDetails:function(){return this.fetch({data:{details:"all"}})},matches:function(h){return this.filter(function(i){return i.matches(h)})},set:function(j,h){var i=this;j=_.map(j,function(l){var m=i.get(l.id);if(!m){return l}var k=m.toJSON();_.extend(k,l);return k});Backbone.Collection.prototype.set.call(this,j,h)},toString:function(){return("HDACollection()")}});return{HistoryDatasetAssociation:d,HDACollection:e}});
\ No newline at end of file
diff -r 7f70f02747d374ebf1804a1ae380cb27968043b0 -r e66076ed4678c1ad15db09c1d220a624e2047a79 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 @@
-define(["mvc/dataset/hda-model"],function(a){var c=Backbone.Model.extend(LoggableMixin).extend({defaults:{model_class:"History",id:null,name:"Unnamed History",state:"new",diskSize:0,deleted:false},urlRoot:"api/histories",renameUrl:function(){var e=this.get("id");if(!e){return undefined}return"/history/rename_async?id="+this.get("id")},annotateUrl:function(){var e=this.get("id");if(!e){return undefined}return"/history/annotate_async?id="+this.get("id")},tagUrl:function(){var e=this.get("id");if(!e){return undefined}return"/tag/get_tagging_elt_async?item_id="+this.get("id")+"&item_class=History"},initialize:function(f,g,e){e=e||{};this.logger=e.logger||null;this.log(this+".initialize:",f,g,e);this.hdas=new a.HDACollection(g||[],{historyId:this.get("id")});if(g&&_.isArray(g)){this.hdas.reset(g)}this._setUpListeners();this.checkForUpdates()},_setUpListeners:function(){this.on("error",function(f,i,e,h,g){this.errorHandler(f,i,e,h,g)});if(this.hdas){this.listenTo(this.hdas,"error",function(){this.trigger.apply(this,["error:hdas"].concat(jQuery.makeArray(arguments)))})}this.on("change:id",function(f,e){if(this.hdas){this.hdas.historyId=e}},this)},errorHandler:function(f,i,e,h,g){this.clearUpdateTimeout()},hasUser:function(){var e=this.get("user");return !!(e&&e.id)},checkForUpdates:function(e){if(this.hdas.running().length){this.setUpdateTimeout()}else{this.trigger("ready");if(_.isFunction(e)){e.call(this)}}return this},setUpdateTimeout:function(e){e=e||c.UPDATE_DELAY;var f=this;this.clearUpdateTimeout();this.updateTimeoutId=setTimeout(function(){f.refresh()},e);return this.updateTimeoutId},clearUpdateTimeout:function(){if(this.updateTimeoutId){clearTimeout(this.updateTimeoutId);this.updateTimeoutId=null}},refresh:function(f,e){f=f||[];e=e||{};var g=this;e.data=e.data||{};if(f.length){e.data.details=f.join(",")}var h=this.hdas.fetch(e);h.done(function(i){g.checkForUpdates(function(){this.fetch()})});return h},toString:function(){return"History("+this.get("id")+","+this.get("name")+")"}});c.UPDATE_DELAY=4000;c.getHistoryData=function d(f,p){p=p||{};var j=p.hdaDetailIds||[];var l=jQuery.Deferred(),k=null;function g(q){return jQuery.ajax("/api/histories/"+f)}function e(q){if(!q||!q.state_ids){return 0}return _.reduce(q.state_ids,function(r,t,s){return r+t.length},0)}function o(r){if(!e(r)){return[]}if(_.isFunction(j)){j=j(r)}var q=(j.length)?({details:j.join(",")}):({});return jQuery.ajax("/api/histories/"+r.id+"/contents",{data:q})}var n=p.historyFn||g,m=p.hdaFn||o;var i=n(f);i.done(function(q){k=q;l.notify({status:"history data retrieved",historyJSON:k})});i.fail(function(s,q,r){l.reject(s,"loading the history")});var h=i.then(m);h.then(function(q){l.notify({status:"dataset data retrieved",historyJSON:k,hdaJSON:q});l.resolve(k,q)});h.fail(function(s,q,r){l.reject(s,"loading the datasets",{history:k})});return l};var b=Backbone.Collection.extend(LoggableMixin).extend({model:c,urlRoot:"api/histories"});return{History:c,HistoryCollection:b}});
\ No newline at end of file
+define(["mvc/dataset/hda-model"],function(a){var c=Backbone.Model.extend(LoggableMixin).extend({defaults:{model_class:"History",id:null,name:"Unnamed History",state:"new",diskSize:0,deleted:false},urlRoot:galaxy_config.root+"api/histories",renameUrl:function(){var e=this.get("id");if(!e){return undefined}return galaxy_config.root+"history/rename_async?id="+this.get("id")},annotateUrl:function(){var e=this.get("id");if(!e){return undefined}return galaxy_config.root+"history/annotate_async?id="+this.get("id")},tagUrl:function(){var e=this.get("id");if(!e){return undefined}return galaxy_config.root+"tag/get_tagging_elt_async?item_id="+this.get("id")+"&item_class=History"},initialize:function(f,g,e){e=e||{};this.logger=e.logger||null;this.log(this+".initialize:",f,g,e);this.hdas=new a.HDACollection(g||[],{historyId:this.get("id")});if(g&&_.isArray(g)){this.hdas.reset(g)}this._setUpListeners();this.updateTimeoutId=null;this.checkForUpdates()},_setUpListeners:function(){this.on("error",function(f,i,e,h,g){this.errorHandler(f,i,e,h,g)});if(this.hdas){this.listenTo(this.hdas,"error",function(){this.trigger.apply(this,["error:hdas"].concat(jQuery.makeArray(arguments)))})}this.on("change:id",function(f,e){if(this.hdas){this.hdas.historyId=e}},this)},errorHandler:function(f,i,e,h,g){this.clearUpdateTimeout()},hasUser:function(){var e=this.get("user");return !!(e&&e.id)},checkForUpdates:function(e){if(this.hdas.running().length){this.setUpdateTimeout()}else{this.trigger("ready");if(_.isFunction(e)){e.call(this)}}return this},setUpdateTimeout:function(e){e=e||c.UPDATE_DELAY;var f=this;this.clearUpdateTimeout();this.updateTimeoutId=setTimeout(function(){f.refresh()},e);return this.updateTimeoutId},clearUpdateTimeout:function(){if(this.updateTimeoutId){clearTimeout(this.updateTimeoutId);this.updateTimeoutId=null}},refresh:function(f,e){f=f||[];e=e||{};var g=this;e.data=e.data||{};if(f.length){e.data.details=f.join(",")}var h=this.hdas.fetch(e);h.done(function(i){g.checkForUpdates(function(){this.fetch()})});return h},toString:function(){return"History("+this.get("id")+","+this.get("name")+")"}});c.UPDATE_DELAY=4000;c.getHistoryData=function d(f,p){p=p||{};var j=p.hdaDetailIds||[];var l=jQuery.Deferred(),k=null;function g(q){return jQuery.ajax(galaxy_config.root+"api/histories/"+f)}function e(q){if(!q||!q.state_ids){return 0}return _.reduce(q.state_ids,function(r,t,s){return r+t.length},0)}function o(r){if(!e(r)){return[]}if(_.isFunction(j)){j=j(r)}var q=(j.length)?({details:j.join(",")}):({});return jQuery.ajax(galaxy_config.root+"api/histories/"+r.id+"/contents",{data:q})}var n=p.historyFn||g,m=p.hdaFn||o;var i=n(f);i.done(function(q){k=q;l.notify({status:"history data retrieved",historyJSON:k})});i.fail(function(s,q,r){l.reject(s,"loading the history")});var h=i.then(m);h.then(function(q){l.notify({status:"dataset data retrieved",historyJSON:k,hdaJSON:q});l.resolve(k,q)});h.fail(function(s,q,r){l.reject(s,"loading the datasets",{history:k})});return l};var b=Backbone.Collection.extend(LoggableMixin).extend({model:c,urlRoot:galaxy_config.root+"api/histories"});return{History:c,HistoryCollection:b}});
\ No newline at end of file
diff -r 7f70f02747d374ebf1804a1ae380cb27968043b0 -r e66076ed4678c1ad15db09c1d220a624e2047a79 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 @@
-define(["mvc/history/history-model","mvc/dataset/hda-base","mvc/dataset/hda-edit"],function(d,b,a){var c=Backbone.View.extend(LoggableMixin).extend({HDAView:a.HDAEditView,tagName:"div",className:"history-panel",fxSpeed:300,events:{"click #history-tag":"loadAndDisplayTags","click #message-container":"clearMessages"},initialize:function(e){e=e||{};if(e.logger){this.logger=e.logger}this.log(this+".initialize:",e);this._setUpListeners();this.hdaViews={};this.urls={};this.indicator=new LoadingIndicator(this.$el);if(this.model){this._setUpWebStorage(e.initiallyExpanded,e.show_deleted,e.show_hidden);this._setUpModelEventHandlers()}if(e.onready){e.onready.call(this)}},_setUpListeners:function(){this.on("error",function(f,i,e,h,g){this.errorHandler(f,i,e,h,g)});this.on("loading-history",function(){this.showLoadingIndicator()});this.on("loading-done",function(){this.hideLoadingIndicator()});this.once("rendered",function(){this.trigger("rendered:initial",this);return false});this.on("switched-history current-history new-history",function(){if(_.isEmpty(this.hdaViews)){this.trigger("empty-history",this)}});if(this.logger){this.on("all",function(e){this.log(this+"",arguments)},this)}},errorHandler:function(g,j,f,i,h){var e=this._parseErrorMessage(g,j,f,i,h);if(j&&j.status===0&&j.readyState===0){}else{if(j&&j.status===502){}else{if(!this.$el.find("#message-container").is(":visible")){this.once("rendered",function(){this.displayMessage("error",e.message,e.details)})}else{this.displayMessage("error",e.message,e.details)}}}},_parseErrorMessage:function(h,l,g,k,j){var f=Galaxy.currUser,e={message:this._bePolite(k),details:{user:(f instanceof User)?(f.toJSON()):(f+""),source:(h instanceof Backbone.Model)?(h.toJSON()):(h+""),xhr:l,options:(l)?(_.omit(g,"xhr")):(g)}};_.extend(e.details,j||{});if(l&&_.isFunction(l.getAllResponseHeaders)){var i=l.getAllResponseHeaders();i=_.compact(i.split("\n"));i=_.map(i,function(m){return m.split(": ")});e.details.xhr.responseHeaders=_.object(i)}return e},_bePolite:function(e){e=e||_l("An error occurred while getting updates from the server");return e+". "+_l("Please contact a Galaxy administrator if the problem persists.")},_loadHistoryFromXHR:function(g,f){var e=this;g.then(function(h,i){e.setModel(h,i,f)});g.fail(function(i,h){e.render()});return g},setModel:function(g,e,f){f=f||{};if(this.model){this.model.clearUpdateTimeout();this.stopListening(this.model);this.stopListening(this.model.hdas)}this.hdaViews={};if(Galaxy&&Galaxy.currUser){g.user=Galaxy.currUser.toJSON()}this.model=new d.History(g,e,f);this._setUpWebStorage(f.initiallyExpanded,f.show_deleted,f.show_hidden);this._setUpModelEventHandlers();this.trigger("new-model",this);this.render();return this},loadHistory:function(h,g,f,k,i){this.trigger("loading-history",this);g=g||{};var e=this;var j=d.History.getHistoryData(h,{historyFn:f,hdaFn:k,hdaDetailIds:g.initiallyExpanded||i});return this._loadHistoryFromXHR(j,g).fail(function(n,l,m){e.trigger("error",e,n,g,_l("An error was encountered while "+l),{historyId:h,history:m||{}})}).always(function(){e.trigger("loading-done",e)})},loadHistoryWithHDADetails:function(h,g,f,j){var e=this,i=function(k){return e.getExpandedHdaIds(k.id)};return this.loadHistory(h,g,f,j,i)},switchToHistory:function(h,g){var e=this,f=function(){return jQuery.post("/api/histories/"+h+"/set_as_current")};return this.loadHistoryWithHDADetails(h,g,f).then(function(j,i){e.trigger("switched-history",e)})},loadCurrentHistory:function(f){var e=this;return this.loadHistoryWithHDADetails("current",f).then(function(h,g){e.trigger("current-history",e)})},createNewHistory:function(g){var e=this,f=function(){return jQuery.post("/api/histories",{current:true})};return this.loadHistory(undefined,g,f).then(function(i,h){e.trigger("new-history",e)})},refreshHdas:function(f,e){if(this.model){return this.model.refresh(f,e)}return $.when()},_getStorageKey:function(e){if(!e){throw new Error("_getStorageKey needs valid id: "+e)}return("history:"+e)},_setUpWebStorage:function(f,e,g){this.storage=new PersistentStorage(this._getStorageKey(this.model.get("id")),{expandedHdas:{},show_deleted:false,show_hidden:false});this.log(this+" (prev) storage:",JSON.stringify(this.storage.get(),null,2));if(f){this.storage.set("exandedHdas",f)}if((e===true)||(e===false)){this.storage.set("show_deleted",e)}if((g===true)||(g===false)){this.storage.set("show_hidden",g)}this.show_deleted=this.storage.get("show_deleted");this.show_hidden=this.storage.get("show_hidden");this.trigger("new-storage",this.storage,this);this.log(this+" (init'd) storage:",this.storage.get())},clearWebStorage:function(){for(var e in sessionStorage){if(e.indexOf("HistoryView.")===0){sessionStorage.removeItem(e)}}},getStoredOptions:function(f){if(!f||f==="current"){return(this.storage)?(this.storage.get()):({})}var e=sessionStorage.getItem(this._getStorageKey(f));return(e===null)?({}):(JSON.parse(e))},getExpandedHdaIds:function(e){var f=this.getStoredOptions(e).expandedHdas;return((_.isEmpty(f))?([]):(_.keys(f)))},_setUpModelEventHandlers:function(){this.model.on("error error:hdas",function(f,h,e,g){this.errorHandler(f,h,e,g)},this);this.model.on("change:nice_size",this.updateHistoryDiskSize,this);if(Galaxy&&Galaxy.quotaMeter){this.listenTo(this.model,"change:nice_size",function(){Galaxy.quotaMeter.update()})}this.model.hdas.on("add",this.addHdaView,this);this.model.hdas.on("change:deleted",this.handleHdaDeletionChange,this);this.model.hdas.on("change:visible",this.handleHdaVisibleChange,this);this.model.hdas.on("change:purged",function(e){this.model.fetch()},this);this.model.hdas.on("state:ready",function(f,g,e){if((!f.get("visible"))&&(!this.storage.get("show_hidden"))){this.removeHdaView(f.get("id"))}},this)},addHdaView:function(h){this.log("add."+this,h);var f=this;if(!h.isVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"))){return}$({}).queue([function g(j){var i=f.$el.find("#emptyHistoryMessage");if(i.is(":visible")){i.fadeOut(f.fxSpeed,j)}else{j()}},function e(j){f.scrollToTop();var i=f.$el.find("#"+f.model.get("id")+"-datasets");f.createHdaView(h).$el.hide().prependTo(i).slideDown(f.fxSpeed)}])},createHdaView:function(g){var f=g.get("id"),e=this.storage.get("expandedHdas").get(f),h=new this.HDAView({model:g,expanded:e,hasUser:this.model.hasUser(),logger:this.logger});this._setUpHdaListeners(h);this.hdaViews[f]=h;return h.render()},handleHdaDeletionChange:function(e){if(e.get("deleted")&&!this.storage.get("show_deleted")){this.removeHdaView(e.get("id"))}},handleHdaVisibleChange:function(e){if(e.hidden()&&!this.storage.get("show_hidden")){this.removeHdaView(e.get("id"))}},removeHdaView:function(g){var e=this,f=this.hdaViews[g];if(!f){return}f.$el.fadeOut(e.fxSpeed,function(){f.remove();delete e.hdaViews[g];if(_.isEmpty(e.hdaViews)){e.$el.find("#emptyHistoryMessage").fadeIn(e.fxSpeed)}})},render:function(g){var e=this,f;if(this.model){f=this.renderModel()}else{f=this.renderWithoutModel()}$(e).queue("fx",[function(h){if(e.$el.is(":visible")){e.$el.fadeOut(e.fxSpeed,h)}else{h()}},function(h){e.$el.empty();if(f){e.$el.append(f.children())}e.$el.fadeIn(e.fxSpeed,h)},function(h){e._setUpBehaviours();if(g){g.call(this)}}]);return this},renderModel:function(){var e=$("<div/>");e.append(c.templates.historyPanel(this.model.toJSON()));e.find("[title]").tooltip({placement:"bottom"});if(!this.model.hdas.length||!this.renderItems(e.find("#"+this.model.get("id")+"-datasets"))){e.find("#emptyHistoryMessage").show()}return e},renderWithoutModel:function(){var e=$("<div/>"),f=$("<div/>").attr("id","message-container").css({"margin-left":"4px","margin-right":"4px"});return e.append(f)},renderItems:function(f){this.hdaViews={};var e=this,g=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"));_.each(g,function(j){var i=j.get("id"),h=e.storage.get("expandedHdas").get(i);e.hdaViews[i]=new e.HDAView({model:j,expanded:h,hasUser:e.model.hasUser(),logger:e.logger});e._setUpHdaListeners(e.hdaViews[i]);f.prepend(e.hdaViews[i].render().$el)});return g.length},_setUpHdaListeners:function(f){var e=this;f.on("body-expanded",function(g){e.storage.get("expandedHdas").set(g,true)});f.on("body-collapsed",function(g){e.storage.get("expandedHdas").deleteKey(g)});f.on("error",function(h,j,g,i){e.errorHandler(h,j,g,i)})},_setUpBehaviours:function(){if(!this.model||!(this.model.get("user")&&this.model.get("user").email)){return}var e=this,f=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(f.is(":hidden")){f.slideDown(e.fxSpeed)}else{f.slideUp(e.fxSpeed)}return false});async_save_text("history-name-container","history-name",this.model.renameUrl(),"new_name",18);async_save_text("history-annotation-container","history-annotation",this.model.annotateUrl(),"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},collapseAllHdaBodies:function(){_.each(this.hdaViews,function(e){e.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},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")},loadAndDisplayTags:function(g){this.log(this+".loadAndDisplayTags",g);var e=this,h=this.$el.find("#history-tag-area"),f=h.find(".tag-elt");this.log("\t tagArea",h," tagElt",f);if(h.is(":hidden")){if(!jQuery.trim(f.html())){$.ajax({url:e.model.tagUrl(),error:function(k,j,i){e.log("Error loading tag area html",k,j,i);e.trigger("error",e,k,null,_l("Error loading tags"))},success:function(i){f.html(i);f.find("[title]").tooltip();h.slideDown(e.fxSpeed)}})}else{h.slideDown(e.fxSpeed)}}else{h.slideUp(e.fxSpeed)}return false},showLoadingIndicator:function(f,e,g){e=(e!==undefined)?(e):(this.fxSpeed);if(!this.indicator){this.indicator=new LoadingIndicator(this.$el,this.$el.parent())}if(!this.$el.is(":visible")){this.indicator.show(0,g)}else{this.$el.fadeOut(e);this.indicator.show(e,g)}},hideLoadingIndicator:function(e,f){e=(e!==undefined)?(e):(this.fxSpeed);if(this.indicator){this.indicator.hide(e,f)}},displayMessage:function(j,k,i){var g=this;this.scrollToTop();var h=this.$el.find("#message-container"),e=$("<div/>").addClass(j+"message").html(k);if(!_.isEmpty(i)){var f=$('<a href="javascript:void(0)">Details</a>').click(function(){Galaxy.modal.show(g.messageToModalOptions(j,k,i));return false});e.append(" ",f)}return h.html(e)},messageToModalOptions:function(i,k,h){var e=this,j=$("<div/>"),g={title:"Details"};function f(l){l=_.omit(l,_.functions(l));return["<table>",_.map(l,function(n,m){n=(_.isObject(n))?(f(n)):(n);return'<tr><td style="vertical-align: top; color: grey">'+m+'</td><td style="padding-left: 8px">'+n+"</td></tr>"}).join(""),"</table>"].join("")}if(_.isObject(h)){g.body=j.append(f(h))}else{g.body=j.html(h)}g.buttons={Ok:function(){Galaxy.modal.hide();e.clearMessages()}};return g},clearMessages:function(){var e=this.$el.find("#message-container");e.empty()},scrollPosition:function(){return this.$el.parent().scrollTop()},scrollTo:function(e){this.$el.parent().scrollTop(e)},scrollToTop:function(){this.$el.parent().scrollTop(0);return this},scrollIntoView:function(f,g){if(!g){this.$el.parent().parent().scrollTop(f);return this}var e=window,h=this.$el.parent().parent(),j=$(e).innerHeight(),i=(j/2)-(g/2);$(h).scrollTop(f-i);return this},scrollToId:function(f){if((!f)||(!this.hdaViews[f])){return this}var e=this.hdaViews[f].$el;this.scrollIntoView(e.offset().top,e.outerHeight());return this},scrollToHid:function(e){var f=this.model.hdas.getByHid(e);if(!f){return this}return this.scrollToId(f.id)},connectToQuotaMeter:function(e){if(!e){return this}this.listenTo(e,"quota:over",this.showQuotaMessage);this.listenTo(e,"quota:under",this.hideQuotaMessage);this.on("rendered rendered:initial",function(){if(e&&e.isOverQuota()){this.showQuotaMessage()}});return this},showQuotaMessage:function(){var e=this.$el.find("#quota-message-container");if(e.is(":hidden")){e.slideDown(this.fxSpeed)}},hideQuotaMessage:function(){var e=this.$el.find("#quota-message-container");if(!e.is(":hidden")){e.slideUp(this.fxSpeed)}},connectToOptionsMenu:function(e){if(!e){return this}this.on("new-storage",function(g,f){if(e&&g){e.findItemByHtml(_l("Include Deleted Datasets")).checked=g.get("show_deleted");e.findItemByHtml(_l("Include Hidden Datasets")).checked=g.get("show_hidden")}});return this},toString:function(){return"HistoryPanel("+((this.model)?(this.model.get("name")):(""))+")"}});c.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};return{HistoryPanel:c}});
\ No newline at end of file
+define(["mvc/history/history-model","mvc/dataset/hda-base","mvc/dataset/hda-edit"],function(d,b,a){var c=Backbone.View.extend(LoggableMixin).extend({HDAView:a.HDAEditView,tagName:"div",className:"history-panel",fxSpeed:300,events:{"click #history-tag":"loadAndDisplayTags","click #message-container":"clearMessages"},initialize:function(e){e=e||{};if(e.logger){this.logger=e.logger}this.log(this+".initialize:",e);this._setUpListeners();this.hdaViews={};this.urls={};this.indicator=new LoadingIndicator(this.$el);if(this.model){this._setUpWebStorage(e.initiallyExpanded,e.show_deleted,e.show_hidden);this._setUpModelEventHandlers()}if(e.onready){e.onready.call(this)}},_setUpListeners:function(){this.on("error",function(f,i,e,h,g){this.errorHandler(f,i,e,h,g)});this.on("loading-history",function(){this.showLoadingIndicator()});this.on("loading-done",function(){this.hideLoadingIndicator()});this.once("rendered",function(){this.trigger("rendered:initial",this);return false});this.on("switched-history current-history new-history",function(){if(_.isEmpty(this.hdaViews)){this.trigger("empty-history",this)}});if(this.logger){this.on("all",function(e){this.log(this+"",arguments)},this)}},errorHandler:function(g,j,f,i,h){var e=this._parseErrorMessage(g,j,f,i,h);if(j&&j.status===0&&j.readyState===0){}else{if(j&&j.status===502){}else{if(!this.$el.find("#message-container").is(":visible")){this.once("rendered",function(){this.displayMessage("error",e.message,e.details)})}else{this.displayMessage("error",e.message,e.details)}}}},_parseErrorMessage:function(h,l,g,k,j){var f=Galaxy.currUser,e={message:this._bePolite(k),details:{user:(f instanceof User)?(f.toJSON()):(f+""),source:(h instanceof Backbone.Model)?(h.toJSON()):(h+""),xhr:l,options:(l)?(_.omit(g,"xhr")):(g)}};_.extend(e.details,j||{});if(l&&_.isFunction(l.getAllResponseHeaders)){var i=l.getAllResponseHeaders();i=_.compact(i.split("\n"));i=_.map(i,function(m){return m.split(": ")});e.details.xhr.responseHeaders=_.object(i)}return e},_bePolite:function(e){e=e||_l("An error occurred while getting updates from the server");return e+". "+_l("Please contact a Galaxy administrator if the problem persists.")},loadCurrentHistory:function(f){var e=this;return this.loadHistoryWithHDADetails("current",f).then(function(h,g){e.trigger("current-history",e)})},switchToHistory:function(h,g){var e=this,f=function(){return jQuery.post(galaxy_config.root+"api/histories/"+h+"/set_as_current")};return this.loadHistoryWithHDADetails(h,g,f).then(function(j,i){e.trigger("switched-history",e)})},createNewHistory:function(g){var e=this,f=function(){return jQuery.post(galaxy_config.root+"api/histories",{current:true})};return this.loadHistory(undefined,g,f).then(function(i,h){e.trigger("new-history",e)})},loadHistoryWithHDADetails:function(h,g,f,j){var e=this,i=function(k){return e.getExpandedHdaIds(k.id)};return this.loadHistory(h,g,f,j,i)},loadHistory:function(h,g,f,k,i){this.trigger("loading-history",this);g=g||{};var e=this;var j=d.History.getHistoryData(h,{historyFn:f,hdaFn:k,hdaDetailIds:g.initiallyExpanded||i});return this._loadHistoryFromXHR(j,g).fail(function(n,l,m){e.trigger("error",e,n,g,_l("An error was encountered while "+l),{historyId:h,history:m||{}})}).always(function(){e.trigger("loading-done",e)})},_loadHistoryFromXHR:function(g,f){var e=this;g.then(function(h,i){e.setModel(h,i,f)});g.fail(function(i,h){e.render()});return g},setModel:function(g,e,f){f=f||{};if(this.model){this.model.clearUpdateTimeout();this.stopListening(this.model);this.stopListening(this.model.hdas)}this.hdaViews={};if(Galaxy&&Galaxy.currUser){g.user=Galaxy.currUser.toJSON()}this.model=new d.History(g,e,f);this._setUpWebStorage(f.initiallyExpanded,f.show_deleted,f.show_hidden);this._setUpModelEventHandlers();this.trigger("new-model",this);this.render();return this},refreshHdas:function(f,e){if(this.model){return this.model.refresh(f,e)}return $.when()},_setUpWebStorage:function(f,e,g){this.storage=new PersistentStorage(this._getStorageKey(this.model.get("id")),{expandedHdas:{},show_deleted:false,show_hidden:false});this.log(this+" (prev) storage:",JSON.stringify(this.storage.get(),null,2));if(f){this.storage.set("exandedHdas",f)}if((e===true)||(e===false)){this.storage.set("show_deleted",e)}if((g===true)||(g===false)){this.storage.set("show_hidden",g)}this.show_deleted=this.storage.get("show_deleted");this.show_hidden=this.storage.get("show_hidden");this.trigger("new-storage",this.storage,this);this.log(this+" (init'd) storage:",this.storage.get())},_getStorageKey:function(e){if(!e){throw new Error("_getStorageKey needs valid id: "+e)}return("history:"+e)},clearWebStorage:function(){for(var e in sessionStorage){if(e.indexOf("HistoryView.")===0){sessionStorage.removeItem(e)}}},getStoredOptions:function(f){if(!f||f==="current"){return(this.storage)?(this.storage.get()):({})}var e=sessionStorage.getItem(this._getStorageKey(f));return(e===null)?({}):(JSON.parse(e))},getExpandedHdaIds:function(e){var f=this.getStoredOptions(e).expandedHdas;return((_.isEmpty(f))?([]):(_.keys(f)))},_setUpModelEventHandlers:function(){this.model.on("error error:hdas",function(f,h,e,g){this.errorHandler(f,h,e,g)},this);this.model.on("change:nice_size",this.updateHistoryDiskSize,this);if(Galaxy&&Galaxy.quotaMeter){this.listenTo(this.model,"change:nice_size",function(){Galaxy.quotaMeter.update()})}this.model.hdas.on("add",this.addHdaView,this);this.model.hdas.on("change:deleted",this.handleHdaDeletionChange,this);this.model.hdas.on("change:visible",this.handleHdaVisibleChange,this);this.model.hdas.on("change:purged",function(e){this.model.fetch()},this);this.model.hdas.on("state:ready",function(f,g,e){if((!f.get("visible"))&&(!this.storage.get("show_hidden"))){this.removeHdaView(this.hdaViews[f.id])}},this)},addHdaView:function(h){this.log("add."+this,h);var f=this;if(!h.isVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"))){return}$({}).queue([function g(j){var i=f.$el.find("#emptyHistoryMessage");if(i.is(":visible")){i.fadeOut(f.fxSpeed,j)}else{j()}},function e(j){f.scrollToTop();var i=f.$el.find("#"+f.model.get("id")+"-datasets");f.createHdaView(h).$el.hide().prependTo(i).slideDown(f.fxSpeed)}])},createHdaView:function(g){var f=g.get("id"),e=this.storage.get("expandedHdas").get(f),h=new this.HDAView({model:g,expanded:e,hasUser:this.model.hasUser(),logger:this.logger});this._setUpHdaListeners(h);this.hdaViews[f]=h;return h.render()},_setUpHdaListeners:function(f){var e=this;f.on("body-expanded",function(g){e.storage.get("expandedHdas").set(g,true)});f.on("body-collapsed",function(g){e.storage.get("expandedHdas").deleteKey(g)});f.on("error",function(h,j,g,i){e.errorHandler(h,j,g,i)})},handleHdaDeletionChange:function(e){if(e.get("deleted")&&!this.storage.get("show_deleted")){this.removeHdaView(this.hdaViews[e.id])}},handleHdaVisibleChange:function(e){if(e.hidden()&&!this.storage.get("show_hidden")){this.removeHdaView(this.hdaViews[e.id])}},removeHdaView:function(f){if(!f){return}var e=this;f.$el.fadeOut(e.fxSpeed,function(){f.off();f.remove();delete e.hdaViews[f.model.id];if(_.isEmpty(e.hdaViews)){e.$el.find("#emptyHistoryMessage").fadeIn(e.fxSpeed)}})},render:function(g){var e=this,f;if(this.model){f=this.renderModel()}else{f=this.renderWithoutModel()}$(e).queue("fx",[function(h){if(e.$el.is(":visible")){e.$el.fadeOut(e.fxSpeed,h)}else{h()}},function(h){e.$el.empty();if(f){e.$el.append(f.children())}e.$el.fadeIn(e.fxSpeed,h)},function(h){e._setUpBehaviours();if(g){g.call(this)}e.trigger("rendered",this)}]);return this},renderModel:function(){var e=$("<div/>");e.append(c.templates.historyPanel(this.model.toJSON()));e.find("[title]").tooltip({placement:"bottom"});if(!this.model.hdas.length||!this.renderItems(e.find("#"+this.model.get("id")+"-datasets"))){e.find("#emptyHistoryMessage").show()}return e},renderWithoutModel:function(){var e=$("<div/>"),f=$("<div/>").attr("id","message-container").css({"margin-left":"4px","margin-right":"4px"});return e.append(f)},renderItems:function(f){this.hdaViews={};var e=this,g=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"));_.each(g,function(h){f.prepend(e.createHdaView(h).$el)});return g.length},_setUpBehaviours:function(){if(!this.model||!(this.model.get("user")&&this.model.get("user").email)){return}var e=this,f=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(f.is(":hidden")){f.slideDown(e.fxSpeed)}else{f.slideUp(e.fxSpeed)}return false});async_save_text("history-name-container","history-name",this.model.renameUrl(),"new_name",18);async_save_text("history-annotation-container","history-annotation",this.model.annotateUrl(),"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},collapseAllHdaBodies:function(){_.each(this.hdaViews,function(e){e.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},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")},loadAndDisplayTags:function(g){this.log(this+".loadAndDisplayTags",g);var e=this,h=this.$el.find("#history-tag-area"),f=h.find(".tag-elt");this.log("\t tagArea",h," tagElt",f);if(h.is(":hidden")){if(!jQuery.trim(f.html())){$.ajax({url:e.model.tagUrl(),error:function(k,j,i){e.log("Error loading tag area html",k,j,i);e.trigger("error",e,k,null,_l("Error loading tags"))},success:function(i){f.html(i);f.find("[title]").tooltip();h.slideDown(e.fxSpeed)}})}else{h.slideDown(e.fxSpeed)}}else{h.slideUp(e.fxSpeed)}return false},showLoadingIndicator:function(f,e,g){e=(e!==undefined)?(e):(this.fxSpeed);if(!this.indicator){this.indicator=new LoadingIndicator(this.$el,this.$el.parent())}if(!this.$el.is(":visible")){this.indicator.show(0,g)}else{this.$el.fadeOut(e);this.indicator.show(e,g)}},hideLoadingIndicator:function(e,f){e=(e!==undefined)?(e):(this.fxSpeed);if(this.indicator){this.indicator.hide(e,f)}},displayMessage:function(j,k,i){var g=this;this.scrollToTop();var h=this.$el.find("#message-container"),e=$("<div/>").addClass(j+"message").html(k);if(!_.isEmpty(i)){var f=$('<a href="javascript:void(0)">Details</a>').click(function(){Galaxy.modal.show(g.messageToModalOptions(j,k,i));return false});e.append(" ",f)}return h.html(e)},messageToModalOptions:function(i,k,h){var e=this,j=$("<div/>"),g={title:"Details"};function f(l){l=_.omit(l,_.functions(l));return["<table>",_.map(l,function(n,m){n=(_.isObject(n))?(f(n)):(n);return'<tr><td style="vertical-align: top; color: grey">'+m+'</td><td style="padding-left: 8px">'+n+"</td></tr>"}).join(""),"</table>"].join("")}if(_.isObject(h)){g.body=j.append(f(h))}else{g.body=j.html(h)}g.buttons={Ok:function(){Galaxy.modal.hide();e.clearMessages()}};return g},clearMessages:function(){var e=this.$el.find("#message-container");e.empty()},scrollPosition:function(){return this.$el.parent().scrollTop()},scrollTo:function(e){this.$el.parent().scrollTop(e)},scrollToTop:function(){this.$el.parent().scrollTop(0);return this},scrollIntoView:function(f,g){if(!g){this.$el.parent().parent().scrollTop(f);return this}var e=window,h=this.$el.parent().parent(),j=$(e).innerHeight(),i=(j/2)-(g/2);$(h).scrollTop(f-i);return this},scrollToId:function(f){if((!f)||(!this.hdaViews[f])){return this}var e=this.hdaViews[f].$el;this.scrollIntoView(e.offset().top,e.outerHeight());return this},scrollToHid:function(e){var f=this.model.hdas.getByHid(e);if(!f){return this}return this.scrollToId(f.id)},connectToQuotaMeter:function(e){if(!e){return this}this.listenTo(e,"quota:over",this.showQuotaMessage);this.listenTo(e,"quota:under",this.hideQuotaMessage);this.on("rendered rendered:initial",function(){if(e&&e.isOverQuota()){this.showQuotaMessage()}});return this},showQuotaMessage:function(){var e=this.$el.find("#quota-message-container");if(e.is(":hidden")){e.slideDown(this.fxSpeed)}},hideQuotaMessage:function(){var e=this.$el.find("#quota-message-container");if(!e.is(":hidden")){e.slideUp(this.fxSpeed)}},connectToOptionsMenu:function(e){if(!e){return this}this.on("new-storage",function(g,f){if(e&&g){e.findItemByHtml(_l("Include Deleted Datasets")).checked=g.get("show_deleted");e.findItemByHtml(_l("Include Hidden Datasets")).checked=g.get("show_hidden")}});return this},toString:function(){return"HistoryPanel("+((this.model)?(this.model.get("name")):(""))+")"}});c.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};return{HistoryPanel:c}});
\ No newline at end of file
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: jgoecks: Use galaxy_config.root for HDA URLs to support URL rewriting.
by commits-noreply@bitbucket.org 23 Oct '13
by commits-noreply@bitbucket.org 23 Oct '13
23 Oct '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/7f70f02747d3/
Changeset: 7f70f02747d3
User: jgoecks
Date: 2013-10-23 18:31:52
Summary: Use galaxy_config.root for HDA URLs to support URL rewriting.
Affected #: 1 file
diff -r d3cc9a975d0e9aa1a91fc19ef33c5d3fa53d19fd -r 7f70f02747d374ebf1804a1ae380cb27968043b0 static/scripts/mvc/dataset/hda-model.js
--- a/static/scripts/mvc/dataset/hda-model.js
+++ b/static/scripts/mvc/dataset/hda-model.js
@@ -63,23 +63,23 @@
var id = this.get( 'id' );
if( !id ){ return {}; }
var urls = {
- 'delete' : '/datasets/' + id + '/delete_async',
- 'purge' : '/datasets/' + id + '/purge_async',
- 'unhide' : '/datasets/' + id + '/unhide',
- 'undelete' : '/datasets/' + id + '/undelete',
+ 'delete' : galaxy_config.root + 'datasets/' + id + '/delete_async',
+ 'purge' : galaxy_config.root + 'datasets/' + id + '/purge_async',
+ 'unhide' : galaxy_config.root + 'datasets/' + id + '/unhide',
+ 'undelete' : galaxy_config.root + 'datasets/' + id + '/undelete',
- 'display' : '/datasets/' + id + '/display/?preview=True',
- 'download' : '/datasets/' + id + '/display?to_ext=' + this.get( 'file_ext' ),
- 'edit' : '/datasets/' + id + '/edit',
- 'report_error': '/dataset/errors?id=' + id,
- 'rerun' : '/tool_runner/rerun?id=' + id,
- 'show_params': '/datasets/' + id + '/show_params',
- 'visualization': '/visualization',
+ 'display' : galaxy_config.root + 'datasets/' + id + '/display/?preview=True',
+ 'download' : galaxy_config.root + 'datasets/' + id + '/display?to_ext=' + this.get( 'file_ext' ),
+ 'edit' : galaxy_config.root + 'datasets/' + id + '/edit',
+ 'report_error': galaxy_config.root + 'dataset/errors?id=' + id,
+ 'rerun' : galaxy_config.root + 'tool_runner/rerun?id=' + id,
+ 'show_params': galaxy_config.root + 'datasets/' + id + '/show_params',
+ 'visualization': galaxy_config.root + 'visualization',
- 'annotation': { 'get': '/dataset/get_annotation_async?id=' + id,
- 'set': '/dataset/annotate_async?id=' + id },
- 'tags' : { 'get': '/tag/get_tagging_elt_async?item_id=' + id + '&item_class=HistoryDatasetAssociation',
- 'set': '/tag/retag?item_id=' + id + '&item_class=HistoryDatasetAssociation' }
+ 'annotation': { 'get': galaxy_config.root + 'dataset/get_annotation_async?id=' + id,
+ 'set': galaxy_config.root + 'dataset/annotate_async?id=' + id },
+ 'tags' : { 'get': galaxy_config.root + 'tag/get_tagging_elt_async?item_id=' + id + '&item_class=HistoryDatasetAssociation',
+ 'set': galaxy_config.root + 'tag/retag?item_id=' + id + '&item_class=HistoryDatasetAssociation' }
};
//'meta_download': '/dataset/get_metadata_file?hda_id=%3C%25%3D+id+%25%3E&metadata_name=%3C%25%3D+file_type+%25%3E',
var meta_files = this.get( 'meta_files' );
@@ -87,7 +87,7 @@
urls.meta_download = _.map( meta_files, function( meta_file ){
return {
//url : _.template( urlTemplate, { id: modelJson.id, file_type: meta_file.file_type }),
- url : '/dataset/get_metadata_file?hda_id=' + id + '&metadata_name=' + meta_file.file_type,
+ url : galaxy_config.root + 'dataset/get_metadata_file?hda_id=' + id + '&metadata_name=' + meta_file.file_type,
file_type : meta_file.file_type
};
});
@@ -306,7 +306,7 @@
///** logger used to record this.log messages, commonly set to console */
//// comment this out to suppress log output
//logger : console,
- urlRoot : '/api/histories',
+ urlRoot : galaxy_config.root + 'api/histories',
url : function(){
return this.urlRoot + '/' + this.historyId + '/contents';
},
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: Use galaxy_config.root for history URLs to support URL rewriting.
by commits-noreply@bitbucket.org 23 Oct '13
by commits-noreply@bitbucket.org 23 Oct '13
23 Oct '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/d3cc9a975d0e/
Changeset: d3cc9a975d0e
User: jgoecks
Date: 2013-10-23 18:22:43
Summary: Use galaxy_config.root for history URLs to support URL rewriting.
Affected #: 2 files
diff -r 5d138db3d1e52e364fd3c69c321ea44bac8373eb -r d3cc9a975d0e9aa1a91fc19ef33c5d3fa53d19fd static/scripts/mvc/history/history-model.js
--- a/static/scripts/mvc/history/history-model.js
+++ b/static/scripts/mvc/history/history-model.js
@@ -207,7 +207,7 @@
function getHistory( id ){
// get the history data
//return jQuery.ajax( '/generate_json_error' );
- return jQuery.ajax( '/api/histories/' + historyId );
+ return jQuery.ajax( galaxy_config.root + 'api/histories/' + historyId );
}
function countHdasFromHistory( historyData ){
// get the number of hdas accrd. to the history
@@ -225,7 +225,7 @@
hdaDetailIds = hdaDetailIds( historyData );
}
var data = ( hdaDetailIds.length )?( { details : hdaDetailIds.join( ',' ) } ):( {} );
- return jQuery.ajax( '/api/histories/' + historyData.id + '/contents', { data: data });
+ return jQuery.ajax( galaxy_config.root + 'api/histories/' + historyData.id + '/contents', { data: data });
//return jQuery.ajax( '/generate_json_error' );
}
diff -r 5d138db3d1e52e364fd3c69c321ea44bac8373eb -r d3cc9a975d0e9aa1a91fc19ef33c5d3fa53d19fd static/scripts/mvc/history/history-panel.js
--- a/static/scripts/mvc/history/history-panel.js
+++ b/static/scripts/mvc/history/history-panel.js
@@ -291,7 +291,7 @@
var panel = this,
historyFn = function(){
// make this current and get history data with one call
- return jQuery.post( '/api/histories/' + historyId + '/set_as_current' );
+ return jQuery.post( galaxy_config.root + 'api/histories/' + historyId + '/set_as_current' );
};
return this.loadHistoryWithHDADetails( historyId, attributes, historyFn )
.then(function( historyData, hdaData ){
@@ -314,7 +314,7 @@
var panel = this,
historyFn = function(){
// get history data from posting a new history (and setting it to current)
- return jQuery.post( '/api/histories', { current: true });
+ return jQuery.post( galaxy_config.root + 'api/histories', { current: true });
};
// id undefined bc there is no historyId yet - the server will provide
// (no need for details - nothing expanded in new history)
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: Use galaxy_config.root for history URLs to support URL rewriting.
by commits-noreply@bitbucket.org 23 Oct '13
by commits-noreply@bitbucket.org 23 Oct '13
23 Oct '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/5d138db3d1e5/
Changeset: 5d138db3d1e5
User: jgoecks
Date: 2013-10-23 18:11:58
Summary: Use galaxy_config.root for history URLs to support URL rewriting.
Affected #: 1 file
diff -r 06d5abc6d40748a41493d2beac87fc1cb81f5bf6 -r 5d138db3d1e52e364fd3c69c321ea44bac8373eb static/scripts/mvc/history/history-model.js
--- a/static/scripts/mvc/history/history-model.js
+++ b/static/scripts/mvc/history/history-model.js
@@ -31,23 +31,23 @@
},
// ........................................................................ urls
- urlRoot: 'api/histories',
+ urlRoot: galaxy_config.root + 'api/histories',
renameUrl : function(){
//TODO: just use this.save()
var id = this.get( 'id' );
if( !id ){ return undefined; }
- return '/history/rename_async?id=' + this.get( 'id' );
+ return galaxy_config.root + 'history/rename_async?id=' + this.get( 'id' );
},
annotateUrl : function(){
var id = this.get( 'id' );
if( !id ){ return undefined; }
- return '/history/annotate_async?id=' + this.get( 'id' );
+ return galaxy_config.root + 'history/annotate_async?id=' + this.get( 'id' );
},
tagUrl : function(){
var id = this.get( 'id' );
if( !id ){ return undefined; }
- return '/tag/get_tagging_elt_async?item_id=' + this.get( 'id' ) + '&item_class=History';
+ return galaxy_config.root + 'tag/get_tagging_elt_async?item_id=' + this.get( 'id' ) + '&item_class=History';
},
// ........................................................................ set up/tear down
@@ -276,7 +276,7 @@
var HistoryCollection = Backbone.Collection.extend( LoggableMixin ).extend(
/** @lends HistoryCollection.prototype */{
model : History,
- urlRoot : 'api/histories'
+ urlRoot : galaxy_config.root + 'api/histories'
///** logger used to record this.log messages, commonly set to console */
//// comment this out to suppress log output
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/35328380ac82/
Changeset: 35328380ac82
Branch: next-stable
User: Dave Bouvier
Date: 2013-10-23 16:09:16
Summary: Clean up uninstallation filter. Fix recording of installation errors.
Affected #: 1 file
diff -r f3c2d456413d9c586c1ac9d861c3c2acca510def -r 35328380ac82c471a942bd6f0b5a4e73413bf272 test/install_and_test_tool_shed_repositories/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/functional_tests.py
@@ -252,10 +252,8 @@
if repository.status in [ app.model.ToolShedRepository.installation_status.UNINSTALLED,
app.model.ToolShedRepository.installation_status.DEACTIVATED ]:
continue
- if repository.status not in [ app.model.ToolShedRepository.installation_status.UNINSTALLED,
- app.model.ToolShedRepository.installation_status.ERROR,
- app.model.ToolShedRepository.installation_status.INSTALLED,
- app.model.ToolShedRepository.installation_status.DEACTIVATED ]:
+ if repository.status not in [ app.model.ToolShedRepository.installation_status.ERROR,
+ app.model.ToolShedRepository.installation_status.INSTALLED ]:
repository.status = app.model.ToolShedRepository.installation_status.ERROR
sa_session.add( repository )
sa_session.flush()
@@ -1155,11 +1153,10 @@
repository = test_db_util.get_installed_repository_by_name_owner_changeset_revision( name, owner, changeset_revision )
except:
log.exception( 'Unable to uninstall, no installed repository found.' )
- continue
- test_result = dict( tool_shed=repository.tool_shed,
- name=repository.name,
- owner=repository.owner,
- changeset_revision=repository.changeset_revision,
+ test_result = dict( tool_shed=galaxy_tool_shed_url,
+ name=repository_info_dict[ 'name' ],
+ owner=repository_info_dict[ 'owner' ],
+ changeset_revision=repository_info_dict[ 'changeset_revision' ],
error_message=extract_log_data( result, from_tool_test=False ) )
repository_status[ 'installation_errors' ][ 'repository_dependencies' ].append( test_result )
params[ 'tools_functionally_correct' ] = False
@@ -1170,7 +1167,11 @@
repository_status,
repository_info_dict,
params )
- success = execute_uninstall_method( app, deactivate_only )
+ try:
+ success = execute_uninstall_method( app, deactivate_only )
+ except:
+ log.exception( 'Encountered error attempting to uninstall %s.', repository_info_dict[ 'name' ] )
+ success = False
if not success:
log.error( 'Repository %s failed to uninstall.', repository_info_dict[ 'name' ] )
repositories_failed_install.append( dict( name=name, owner=owner, changeset_revision=changeset_revision ) )
https://bitbucket.org/galaxy/galaxy-central/commits/06d5abc6d407/
Changeset: 06d5abc6d407
User: Dave Bouvier
Date: 2013-10-23 16:47:31
Summary: Merge with next-stable.
Affected #: 1 file
diff -r c5d68c98b9c50b42fdbc2a82f3bd85a1d320ace6 -r 06d5abc6d40748a41493d2beac87fc1cb81f5bf6 test/install_and_test_tool_shed_repositories/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/functional_tests.py
@@ -252,10 +252,8 @@
if repository.status in [ app.model.ToolShedRepository.installation_status.UNINSTALLED,
app.model.ToolShedRepository.installation_status.DEACTIVATED ]:
continue
- if repository.status not in [ app.model.ToolShedRepository.installation_status.UNINSTALLED,
- app.model.ToolShedRepository.installation_status.ERROR,
- app.model.ToolShedRepository.installation_status.INSTALLED,
- app.model.ToolShedRepository.installation_status.DEACTIVATED ]:
+ if repository.status not in [ app.model.ToolShedRepository.installation_status.ERROR,
+ app.model.ToolShedRepository.installation_status.INSTALLED ]:
repository.status = app.model.ToolShedRepository.installation_status.ERROR
sa_session.add( repository )
sa_session.flush()
@@ -1155,11 +1153,10 @@
repository = test_db_util.get_installed_repository_by_name_owner_changeset_revision( name, owner, changeset_revision )
except:
log.exception( 'Unable to uninstall, no installed repository found.' )
- continue
- test_result = dict( tool_shed=repository.tool_shed,
- name=repository.name,
- owner=repository.owner,
- changeset_revision=repository.changeset_revision,
+ test_result = dict( tool_shed=galaxy_tool_shed_url,
+ name=repository_info_dict[ 'name' ],
+ owner=repository_info_dict[ 'owner' ],
+ changeset_revision=repository_info_dict[ 'changeset_revision' ],
error_message=extract_log_data( result, from_tool_test=False ) )
repository_status[ 'installation_errors' ][ 'repository_dependencies' ].append( test_result )
params[ 'tools_functionally_correct' ] = False
@@ -1170,7 +1167,11 @@
repository_status,
repository_info_dict,
params )
- success = execute_uninstall_method( app, deactivate_only )
+ try:
+ success = execute_uninstall_method( app, deactivate_only )
+ except:
+ log.exception( 'Encountered error attempting to uninstall %s.', repository_info_dict[ 'name' ] )
+ success = False
if not success:
log.error( 'Repository %s failed to uninstall.', repository_info_dict[ 'name' ] )
repositories_failed_install.append( dict( name=name, owner=owner, changeset_revision=changeset_revision ) )
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/f3c2d456413d/
Changeset: f3c2d456413d
Branch: next-stable
User: Dave Bouvier
Date: 2013-10-22 22:26:44
Summary: Additional filtering of repositories not to uninstall.
Affected #: 1 file
diff -r f82ad49f42e16622fd807bb4e8a3b220580dee77 -r f3c2d456413d9c586c1ac9d861c3c2acca510def test/install_and_test_tool_shed_repositories/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/functional_tests.py
@@ -249,7 +249,8 @@
sa_session = app.model.context.current
repositories_to_uninstall = sa_session.query( app.model.ToolShedRepository ).all()
for repository in repositories_to_uninstall:
- if repository.status == app.model.ToolShedRepository.installation_status.UNINSTALLED:
+ if repository.status in [ app.model.ToolShedRepository.installation_status.UNINSTALLED,
+ app.model.ToolShedRepository.installation_status.DEACTIVATED ]:
continue
if repository.status not in [ app.model.ToolShedRepository.installation_status.UNINSTALLED,
app.model.ToolShedRepository.installation_status.ERROR,
https://bitbucket.org/galaxy/galaxy-central/commits/c5d68c98b9c5/
Changeset: c5d68c98b9c5
User: Dave Bouvier
Date: 2013-10-22 22:27:12
Summary: Merge in next-stable.
Affected #: 1 file
diff -r 4a035502056b5b19d227a22e4cc7fa6901da3242 -r c5d68c98b9c50b42fdbc2a82f3bd85a1d320ace6 test/install_and_test_tool_shed_repositories/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/functional_tests.py
@@ -249,7 +249,8 @@
sa_session = app.model.context.current
repositories_to_uninstall = sa_session.query( app.model.ToolShedRepository ).all()
for repository in repositories_to_uninstall:
- if repository.status == app.model.ToolShedRepository.installation_status.UNINSTALLED:
+ if repository.status in [ app.model.ToolShedRepository.installation_status.UNINSTALLED,
+ app.model.ToolShedRepository.installation_status.DEACTIVATED ]:
continue
if repository.status not in [ app.model.ToolShedRepository.installation_status.UNINSTALLED,
app.model.ToolShedRepository.installation_status.ERROR,
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/f82ad49f42e1/
Changeset: f82ad49f42e1
Branch: next-stable
User: Dave Bouvier
Date: 2013-10-22 21:24:05
Summary: Also exclude deactivated repositories from uninstallation.
Affected #: 1 file
diff -r b2c6618e150d6397e33ecd6ad4b046b580b35b83 -r f82ad49f42e16622fd807bb4e8a3b220580dee77 test/install_and_test_tool_shed_repositories/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/functional_tests.py
@@ -253,14 +253,15 @@
continue
if repository.status not in [ app.model.ToolShedRepository.installation_status.UNINSTALLED,
app.model.ToolShedRepository.installation_status.ERROR,
- app.model.ToolShedRepository.installation_status.INSTALLED ]:
+ app.model.ToolShedRepository.installation_status.INSTALLED,
+ app.model.ToolShedRepository.installation_status.DEACTIVATED ]:
repository.status = app.model.ToolShedRepository.installation_status.ERROR
sa_session.add( repository )
sa_session.flush()
name = str( repository.name )
owner = str( repository.owner )
changeset_revision = str( repository.installed_changeset_revision )
- log.debug( 'Changeset revision %s of repository %s queued for uninstallation.', changeset_revision, name )
+ log.debug( 'Changeset revision %s of %s repository %s queued for uninstallation.', changeset_revision, repository.status, name )
repository_dict = dict( name=name, owner=owner, changeset_revision=changeset_revision )
# Generate a test method to uninstall this repository through the embedded Galaxy application's web interface.
test_install_repositories.generate_uninstall_method( repository_dict, deactivate_only )
https://bitbucket.org/galaxy/galaxy-central/commits/4a035502056b/
Changeset: 4a035502056b
User: Dave Bouvier
Date: 2013-10-22 21:24:55
Summary: Merge in fix from next-stable.
Affected #: 1 file
diff -r 556bf6487abc5a3383a399334d97e93e1a87cb54 -r 4a035502056b5b19d227a22e4cc7fa6901da3242 test/install_and_test_tool_shed_repositories/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/functional_tests.py
@@ -253,14 +253,15 @@
continue
if repository.status not in [ app.model.ToolShedRepository.installation_status.UNINSTALLED,
app.model.ToolShedRepository.installation_status.ERROR,
- app.model.ToolShedRepository.installation_status.INSTALLED ]:
+ app.model.ToolShedRepository.installation_status.INSTALLED,
+ app.model.ToolShedRepository.installation_status.DEACTIVATED ]:
repository.status = app.model.ToolShedRepository.installation_status.ERROR
sa_session.add( repository )
sa_session.flush()
name = str( repository.name )
owner = str( repository.owner )
changeset_revision = str( repository.installed_changeset_revision )
- log.debug( 'Changeset revision %s of repository %s queued for uninstallation.', changeset_revision, name )
+ log.debug( 'Changeset revision %s of %s repository %s queued for uninstallation.', changeset_revision, repository.status, name )
repository_dict = dict( name=name, owner=owner, changeset_revision=changeset_revision )
# Generate a test method to uninstall this repository through the embedded Galaxy application's web interface.
test_install_repositories.generate_uninstall_method( repository_dict, deactivate_only )
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/b2c6618e150d/
Changeset: b2c6618e150d
Branch: next-stable
User: greg
Date: 2013-10-22 20:48:53
Summary: Fix for getting the status from the tool shed for installed repositories.
Affected #: 1 file
diff -r 2f0053f5952e9b93ded01fcd24ed87783dedc698 -r b2c6618e150d6397e33ecd6ad4b046b580b35b83 lib/galaxy/webapps/tool_shed/controllers/repository.py
--- a/lib/galaxy/webapps/tool_shed/controllers/repository.py
+++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py
@@ -2741,6 +2741,9 @@
changeset_revision = kwd.get( 'changeset_revision', None )
repository = suc.get_repository_by_name_and_owner( trans.app, name, owner )
if repository:
+ repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans,
+ trans.security.encode_id( repository.id ),
+ changeset_revision )
repo_dir = repository.repo_path( trans.app )
repo = hg.repository( suc.get_configured_ui(), repo_dir )
tool_shed_status_dict = {}
@@ -2751,21 +2754,24 @@
tool_shed_status_dict[ 'latest_installable_revision' ] = 'True'
else:
next_installable_revision = suc.get_next_downloadable_changeset_revision( repository, repo, changeset_revision )
- if next_installable_revision:
- tool_shed_status_dict[ 'latest_installable_revision' ] = 'False'
+ if repository_metadata is None:
+ if next_installable_revision:
+ tool_shed_status_dict[ 'latest_installable_revision' ] = 'True'
+ else:
+ tool_shed_status_dict[ 'latest_installable_revision' ] = 'False'
else:
- tool_shed_status_dict[ 'latest_installable_revision' ] = 'True'
+ if next_installable_revision:
+ tool_shed_status_dict[ 'latest_installable_revision' ] = 'False'
+ else:
+ tool_shed_status_dict[ 'latest_installable_revision' ] = 'True'
# Handle revision updates.
if changeset_revision == repository.tip( trans.app ):
tool_shed_status_dict[ 'revision_update' ] = 'False'
else:
- repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans,
- trans.security.encode_id( repository.id ),
- changeset_revision )
- if repository_metadata:
+ if repository_metadata is None:
+ tool_shed_status_dict[ 'revision_update' ] = 'True'
+ else:
tool_shed_status_dict[ 'revision_update' ] = 'False'
- else:
- tool_shed_status_dict[ 'revision_update' ] = 'True'
# Handle revision upgrades.
ordered_metadata_changeset_revisions = suc.get_ordered_metadata_changeset_revisions( repository, repo, downloadable=True )
num_metadata_revisions = len( ordered_metadata_changeset_revisions )
https://bitbucket.org/galaxy/galaxy-central/commits/556bf6487abc/
Changeset: 556bf6487abc
User: greg
Date: 2013-10-22 20:49:40
Summary: Merged from next-stable
Affected #: 1 file
diff -r 8bc80aa53e81d9362e08ead0a0307cd3af0dd8aa -r 556bf6487abc5a3383a399334d97e93e1a87cb54 lib/galaxy/webapps/tool_shed/controllers/repository.py
--- a/lib/galaxy/webapps/tool_shed/controllers/repository.py
+++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py
@@ -2741,6 +2741,9 @@
changeset_revision = kwd.get( 'changeset_revision', None )
repository = suc.get_repository_by_name_and_owner( trans.app, name, owner )
if repository:
+ repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans,
+ trans.security.encode_id( repository.id ),
+ changeset_revision )
repo_dir = repository.repo_path( trans.app )
repo = hg.repository( suc.get_configured_ui(), repo_dir )
tool_shed_status_dict = {}
@@ -2751,21 +2754,24 @@
tool_shed_status_dict[ 'latest_installable_revision' ] = 'True'
else:
next_installable_revision = suc.get_next_downloadable_changeset_revision( repository, repo, changeset_revision )
- if next_installable_revision:
- tool_shed_status_dict[ 'latest_installable_revision' ] = 'False'
+ if repository_metadata is None:
+ if next_installable_revision:
+ tool_shed_status_dict[ 'latest_installable_revision' ] = 'True'
+ else:
+ tool_shed_status_dict[ 'latest_installable_revision' ] = 'False'
else:
- tool_shed_status_dict[ 'latest_installable_revision' ] = 'True'
+ if next_installable_revision:
+ tool_shed_status_dict[ 'latest_installable_revision' ] = 'False'
+ else:
+ tool_shed_status_dict[ 'latest_installable_revision' ] = 'True'
# Handle revision updates.
if changeset_revision == repository.tip( trans.app ):
tool_shed_status_dict[ 'revision_update' ] = 'False'
else:
- repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans,
- trans.security.encode_id( repository.id ),
- changeset_revision )
- if repository_metadata:
+ if repository_metadata is None:
+ tool_shed_status_dict[ 'revision_update' ] = 'True'
+ else:
tool_shed_status_dict[ 'revision_update' ] = 'False'
- else:
- tool_shed_status_dict[ 'revision_update' ] = 'True'
# Handle revision upgrades.
ordered_metadata_changeset_revisions = suc.get_ordered_metadata_changeset_revisions( repository, repo, downloadable=True )
num_metadata_revisions = len( ordered_metadata_changeset_revisions )
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: fix empty body on expanded and updating, do not show panel error on double zeros; HDA API: do not attempt set on non-hda; pack scripts
by commits-noreply@bitbucket.org 22 Oct '13
by commits-noreply@bitbucket.org 22 Oct '13
22 Oct '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/8bc80aa53e81/
Changeset: 8bc80aa53e81
User: carlfeberhard
Date: 2013-10-22 20:13:37
Summary: History panel: fix empty body on expanded and updating, do not show panel error on double zeros; HDA API: do not attempt set on non-hda; pack scripts
Affected #: 13 files
diff -r c0bf145241e7735cd1c7a9dddab44d984425695f -r 8bc80aa53e81d9362e08ead0a0307cd3af0dd8aa 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
@@ -311,8 +311,9 @@
payload = self._validate_and_parse_update_payload( payload )
hda = self.get_dataset( trans, id, check_ownership=True, check_accessible=True, check_state=True )
- # additional checks here (security, etc.)
- changed = self.set_hda_from_dict( trans, hda, payload )
+ # get_dataset can return a string during an error
+ if hda and isinstance( hda, trans.model.HistoryDatasetAssociation ):
+ changed = self.set_hda_from_dict( trans, hda, payload )
except Exception, exception:
log.error( 'Update of history (%s), HDA (%s) failed: %s',
diff -r c0bf145241e7735cd1c7a9dddab44d984425695f -r 8bc80aa53e81d9362e08ead0a0307cd3af0dd8aa static/scripts/mvc/dataset/hda-base.js
--- a/static/scripts/mvc/dataset/hda-base.js
+++ b/static/scripts/mvc/dataset/hda-base.js
@@ -46,7 +46,15 @@
_setUpListeners : function(){
// re-rendering on any model changes
- this.model.on( 'change', this.render, this );
+ this.model.on( 'change', function( model, options ){
+ // if the model moved into the ready state and is expanded without details, fetch those details
+ if( this.model.changedAttributes().state && this.model.inReadyState()
+ && this.expanded && !this.model.hasDetails() ){
+ this.model.fetch(); // will render automatically (due to lines below)
+ } else {
+ this.render();
+ }
+ }, this );
//this.on( 'all', function( event ){
// this.log( event );
diff -r c0bf145241e7735cd1c7a9dddab44d984425695f -r 8bc80aa53e81d9362e08ead0a0307cd3af0dd8aa static/scripts/mvc/history/history-model.js
--- a/static/scripts/mvc/history/history-model.js
+++ b/static/scripts/mvc/history/history-model.js
@@ -69,17 +69,19 @@
}
this._setUpListeners();
- this._installAjaxErrorHandler( this.ajaxErrorHandler );
// set up update timeout if needed
this.checkForUpdates();
},
_setUpListeners : function(){
+ this.on( 'error', function( model, xhr, options, msg, details ){
+ this.errorHandler( model, xhr, options, msg, details );
+ });
+
// hda collection listening
if( this.hdas ){
this.listenTo( this.hdas, 'error', function(){
- //this.ajaxErrorHandler.apply( this, arguments );
this.trigger.apply( this, [ 'error:hdas' ].concat( jQuery.makeArray( arguments ) ) );
});
}
@@ -105,6 +107,11 @@
// }
//},
+ errorHandler : function( model, xhr, options, msg, details ){
+ // clear update timeout on model err
+ this.clearUpdateTimeout();
+ },
+
// ........................................................................ common queries
hasUser : function(){
var user = this.get( 'user' );
@@ -112,20 +119,6 @@
},
// ........................................................................ ajax
- // override to add ajax error event
- //TODO: into mixin/base
- _installAjaxErrorHandler : function( handler ){
- this.sync = function _sync( method, model, options ){
- return Backbone.Model.prototype.sync.call( model, method, model, options )
- .fail( function( xhr, status, message ){
- handler.call( model, model, xhr, options, method );
- });
- };
- },
-
- ajaxErrorHandler : function( model, xhr, options, method ){
- },
-
// get the history's state from it's cummulative ds states, delay + update if needed
// events: ready
checkForUpdates : function( onReadyCallback ){
diff -r c0bf145241e7735cd1c7a9dddab44d984425695f -r 8bc80aa53e81d9362e08ead0a0307cd3af0dd8aa static/scripts/mvc/history/history-panel.js
--- a/static/scripts/mvc/history/history-panel.js
+++ b/static/scripts/mvc/history/history-panel.js
@@ -157,7 +157,9 @@
errorHandler : function( model, xhr, options, msg, details ){
var parsed = this._parseErrorMessage( model, xhr, options, msg, details );
- if( xhr && xhr.status === 502 ){
+ if( xhr && xhr.status === 0 && xhr.readyState === 0 ){
+
+ } else if( xhr && xhr.status === 502 ){
} else {
// it's possible to have a triggered error before the message container is rendered - wait for it to show
diff -r c0bf145241e7735cd1c7a9dddab44d984425695f -r 8bc80aa53e81d9362e08ead0a0307cd3af0dd8aa static/scripts/packed/galaxy.upload.js
--- a/static/scripts/packed/galaxy.upload.js
+++ b/static/scripts/packed/galaxy.upload.js
@@ -1,1 +1,1 @@
-define(["galaxy.modal","galaxy.master","utils/galaxy.utils","utils/galaxy.uploadbox","libs/backbone/backbone-relational"],function(b,d,c){var a=Backbone.View.extend({modal:null,button_show:null,uploadbox:null,select_extension:[["Auto-detect","auto"]],select_genome:[["Unspecified (?)","?"]],state:{init:"fa-icon-trash",queued:"fa-icon-spinner fa-icon-spin",running:"__running__",success:"fa-icon-ok",error:"fa-icon-warning-sign"},counter:{announce:0,success:0,error:0,running:0,reset:function(){this.announce=this.success=this.error=this.running=0}},initialize:function(){if(!Galaxy.currHistoryPanel){var e=this;window.setTimeout(function(){e.initialize()},500);return}if(!Galaxy.currUser.get("id")){return}var e=this;this.button_show=new d.GalaxyMasterIcon({icon:"fa-icon-upload",tooltip:"Upload Files",on_click:function(f){e.event_show(f)},on_unload:function(){if(e.counter.running>0){return"Several uploads are still processing."}},with_number:true});Galaxy.master.prepend(this.button_show);var e=this;c.jsonFromUrl(galaxy_config.root+"api/datatypes",function(f){for(key in f){e.select_extension.push([f[key],f[key]])}});c.jsonFromUrl(galaxy_config.root+"api/genomes",function(f){var g=e.select_genome[0];e.select_genome=[];for(key in f){if(f[key].length>1){if(f[key][1]!==g[1]){e.select_genome.push(f[key])}}}e.select_genome.sort(function(i,h){return i[0]>h[0]?1:i[0]<h[0]?-1:0});e.select_genome.unshift(g)})},event_dragover:function(f){},event_dragleave:function(f){},event_announce:function(i,g,n){var f="#upload-"+i;$(this.el).find("tbody:last").append(this.template_row(f));var h=this.get_upload_item(i);h.fadeIn();h.find("#title").html(g.name);h.find("#size").html(this.size_to_string(g.size));var m=this;h.find("#symbol").on("click",function(){m.event_remove(i)});h.find("#text-content").on("keyup",function(){var o=h.find("#text-content").val().length;h.find("#size").html(m.size_to_string(o))});this.event_progress(i,g,0);this.counter.announce++;this.update_screen();if(g.size==-1){var l=h.find("#text");var j=8;var e=h.width()-2*j;var k=h.height()-j;l.css("width",e+"px");l.css("top",k+"px");h.height(k+l.height()+2*j);l.show()}},event_initialize:function(i,e,n){this.button_show.number(this.counter.announce);var g=this.get_upload_item(i);var k=g.find("#symbol");k.addClass(this.state.running);var j=Galaxy.currHistoryPanel.model.get("id");var f=g.find("#extension").val();var m=g.find("#genome").val();var l=g.find("#text-content").val();var h=g.find("#space_to_tabs").is(":checked");if(!l&&!(e.size>0)){return null}this.uploadbox.configure({url:galaxy_config.root+"api/tools/",paramname:"files_0|file_data"});tool_input={};tool_input.dbkey=m;tool_input.file_type=f;tool_input["files_0|NAME"]=e.name;tool_input["files_0|type"]="upload_dataset";tool_input["files_0|url_paste"]=l;tool_input.space_to_tabs=h;data={};data.history_id=j;data.tool_id="upload1";data.inputs=JSON.stringify(tool_input);return data},event_progress:function(f,g,i){var h=this.get_upload_item(f);var e=parseInt(i);h.find(".progress-bar").css({width:e+"%"});if(e!=100){h.find("#percentage").html(e+"%")}else{h.find("#percentage").html("Adding to history...")}},event_success:function(e,f,h){this.event_progress(e,f,100);this.button_show.number("");this.counter.announce--;this.counter.success++;this.update_screen();var g=this.get_upload_item(e);g.addClass("success");g.find("#percentage").html("100%");var i=g.find("#symbol");i.removeClass(this.state.running);i.removeClass(this.state.queued);i.addClass(this.state.success);Galaxy.currHistoryPanel.refresh()},event_error:function(e,f,h){this.event_progress(e,f,0);this.button_show.number("");this.counter.announce--;this.counter.error++;this.update_screen();var g=this.get_upload_item(e);g.addClass("danger");g.find(".progress").remove();g.find("#info").html("<strong>Failed: </strong>"+h).show();var i=g.find("#symbol");i.removeClass(this.state.running);i.removeClass(this.state.queued);i.addClass(this.state.error)},event_start:function(){if(this.counter.announce==0||this.counter.running>0){return}var f=$(this.el).find(".upload-item");var e=this;f.each(function(){var g=$(this).find("#symbol");if(g.hasClass(e.state.init)){g.removeClass(e.state.init);g.addClass(e.state.queued);$(this).find("#text-content").attr("disabled",true);$(this).find("#genome").attr("disabled",true);$(this).find("#extension").attr("disabled",true);$(this).find("#space_to_tabs").attr("disabled",true)}});this.counter.running=this.counter.announce;this.update_screen();this.uploadbox.start()},event_stop:function(){if(this.counter.running==0){return}this.uploadbox.stop();$("#upload-info").html("Queue will pause after completing the current file...")},event_complete:function(){this.counter.running=0;this.update_screen();var f=$(this.el).find(".upload-item");var e=this;f.each(function(){var g=$(this).find("#symbol");if(g.hasClass(e.state.queued)&&!g.hasClass(e.state.running)){g.removeClass(e.state.queued);g.addClass(e.state.init);$(this).find("#text-content").attr("disabled",false);$(this).find("#genome").attr("disabled",false);$(this).find("#extension").attr("disabled",false);$(this).find("#space_to_tabs").attr("disabled",false)}})},event_reset:function(){if(this.counter.running==0){var e=$(this.el).find(".upload-item");$(this.el).find("table").fadeOut({complete:function(){e.remove()}});this.counter.reset();this.update_screen();this.uploadbox.reset()}},event_remove:function(e){var f=this.get_upload_item(e);var g=f.find("#symbol");if(g.hasClass(this.state.init)||g.hasClass(this.state.success)||g.hasClass(this.state.error)){if(f.hasClass("success")){this.counter.success--}else{if(f.hasClass("danger")){this.counter.error--}else{this.counter.announce--}}this.update_screen();this.uploadbox.remove(e);f.remove()}},event_create:function(){this.uploadbox.add([{name:"New File",size:-1}])},event_show:function(g){g.preventDefault();if(!this.modal){var f=this;this.modal=new b.GalaxyModal({title:"Upload files from your local drive",body:this.template("upload-box","upload-info"),buttons:{Select:function(){f.uploadbox.select()},Create:function(){f.event_create()},Upload:function(){f.event_start()},Pause:function(){f.event_stop()},Reset:function(){f.event_reset()},Close:function(){f.modal.hide()},},height:"400",width:"900"});this.setElement("#upload-box");var f=this;this.uploadbox=this.$el.uploadbox({dragover:function(){f.event_dragover()},dragleave:function(){f.event_dragleave()},announce:function(e,h,i){f.event_announce(e,h,i)},initialize:function(e,h,i){return f.event_initialize(e,h,i)},success:function(e,h,i){f.event_success(e,h,i)},progress:function(e,h,i){f.event_progress(e,h,i)},error:function(e,h,i){f.event_error(e,h,i)},complete:function(){f.event_complete()},});this.update_screen()}this.modal.show()},get_upload_item:function(e){return $(this.el).find("#upload-"+e)},size_to_string:function(e){var f="";if(e>=100000000000){e=e/100000000000;f="TB"}else{if(e>=100000000){e=e/100000000;f="GB"}else{if(e>=100000){e=e/100000;f="MB"}else{if(e>=100){e=e/100;f="KB"}else{if(e>0){e=e*10;f="b"}else{return"<strong>-</strong>"}}}}}return"<strong>"+(Math.round(e)/10)+"</strong> "+f},update_screen:function(){if(this.counter.announce==0){if(this.uploadbox.compatible()){message="Drag&drop files into this box or click 'Select' to select files!"}else{message="Unfortunately, your browser does not support multiple file uploads or drag&drop.<br>Please upgrade to i.e. Firefox 4+, Chrome 7+, IE 10+, Opera 12+ or Safari 6+."}}else{if(this.counter.running==0){message="You added "+this.counter.announce+" file(s) to the queue. Add more files or click 'Upload' to proceed."}else{message="Please wait..."+this.counter.announce+" out of "+this.counter.running+" remaining."}}$("#upload-info").html(message);if(this.counter.running==0&&this.counter.announce+this.counter.success+this.counter.error>0){this.modal.enableButton("Reset")}else{this.modal.disableButton("Reset")}if(this.counter.running==0&&this.counter.announce>0){this.modal.enableButton("Upload")}else{this.modal.disableButton("Upload")}if(this.counter.running>0){this.modal.enableButton("Pause")}else{this.modal.disableButton("Pause")}if(this.counter.running==0){this.modal.enableButton("Select");this.modal.enableButton("Create")}else{this.modal.disableButton("Select");this.modal.disableButton("Create")}if(this.counter.announce+this.counter.success+this.counter.error>0){$(this.el).find("table").show()}else{$(this.el).find("table").hide()}},template:function(f,e){return'<div id="'+f+'" class="upload-box"><table class="table table-striped" style="display: none;"><thead><tr><th>Name</th><th>Size</th><th>Type</th><th>Genome</th><th>Space→Tab</th><th>Status</th><th></th></tr></thead><tbody></tbody></table></div><h6 id="'+e+'" class="upload-info"></h6>'},template_row:function(f){var e='<tr id="'+f.substr(1)+'" class="upload-item"><td><div style="position: relative;"><div id="title" class="title"></div><div id="text" class="text"><div class="text-info">You may specify a list of URLs (one per line) or paste the contents of a file.</div><textarea id="text-content" class="text-content form-control"></textarea></div></div></td><td><div id="size" class="size"></div></td>';e+='<td><select id="extension" class="extension">';for(key in this.select_extension){e+='<option value="'+this.select_extension[key][1]+'">'+this.select_extension[key][0]+"</option>"}e+="</select></td>";e+='<td><select id="genome" class="genome">';for(key in this.select_genome){e+='<option value="'+this.select_genome[key][1]+'">'+this.select_genome[key][0]+"</option>"}e+="</select></td>";e+='<td><input id="space_to_tabs" type="checkbox"></input></td><td><div id="info" class="info"><div class="progress"><div class="progress-bar progress-bar-success"></div><div id="percentage" class="percentage">0%</div></div></div></td><td><div id="symbol" class="symbol '+this.state.init+'"></div></td></tr>';return e}});return{GalaxyUpload:a}});
\ No newline at end of file
+define(["galaxy.modal","galaxy.master","utils/galaxy.utils","utils/galaxy.uploadbox","libs/backbone/backbone-relational"],function(b,d,c){var a=Backbone.View.extend({modal:null,button_show:null,uploadbox:null,select_extension:[["Auto-detect","auto"]],select_genome:[["Unspecified (?)","?"]],state:{init:"fa-icon-trash",queued:"fa-icon-spinner fa-icon-spin",running:"__running__",success:"fa-icon-ok",error:"fa-icon-warning-sign"},counter:{announce:0,success:0,error:0,running:0,reset:function(){this.announce=this.success=this.error=this.running=0}},initialize:function(){if(!Galaxy.currHistoryPanel){var e=this;window.setTimeout(function(){e.initialize()},500);return}if(!Galaxy.currUser.get("id")){return}var e=this;this.button_show=new d.GalaxyMasterIcon({icon:"fa-icon-upload",tooltip:"Upload Files",on_click:function(f){e.event_show(f)},on_unload:function(){if(e.counter.running>0){return"Several uploads are still processing."}},with_number:true});Galaxy.master.prepend(this.button_show);var e=this;c.jsonFromUrl(galaxy_config.root+"api/datatypes",function(f){for(key in f){e.select_extension.push([f[key],f[key]])}});c.jsonFromUrl(galaxy_config.root+"api/genomes",function(f){var g=e.select_genome[0];e.select_genome=[];for(key in f){if(f[key].length>1){if(f[key][1]!==g[1]){e.select_genome.push(f[key])}}}e.select_genome.sort(function(i,h){return i[0]>h[0]?1:i[0]<h[0]?-1:0});e.select_genome.unshift(g)})},event_dragover:function(f){},event_dragleave:function(f){},event_announce:function(i,g,n){var f="#upload-"+i;$(this.el).find("tbody:last").append(this.template_row(f));var h=this.get_upload_item(i);h.fadeIn();h.find("#title").html(g.name);h.find("#size").html(this.size_to_string(g.size));var m=this;h.find("#symbol").on("click",function(){m.event_remove(i)});h.find("#text-content").on("keyup",function(){var o=h.find("#text-content").val().length;h.find("#size").html(m.size_to_string(o))});this.event_progress(i,g,0);this.counter.announce++;this.update_screen();if(g.size==-1){var l=h.find("#text");var j=8;var e=h.width()-2*j;var k=h.height()-j;l.css("width",e+"px");l.css("top",k+"px");h.height(k+l.height()+2*j);l.show()}},event_initialize:function(i,e,n){this.button_show.number(this.counter.announce);var g=this.get_upload_item(i);var k=g.find("#symbol");k.addClass(this.state.running);var j=Galaxy.currHistoryPanel.model.get("id");var f=g.find("#extension").val();var m=g.find("#genome").val();var l=g.find("#text-content").val();var h=g.find("#space_to_tabs").is(":checked");if(!l&&!(e.size>0)){return null}this.uploadbox.configure({url:galaxy_config.root+"api/tools/",paramname:"files_0|file_data"});tool_input={};tool_input.dbkey=m;tool_input.file_type=f;tool_input["files_0|NAME"]=e.name;tool_input["files_0|type"]="upload_dataset";tool_input["files_0|url_paste"]=l;tool_input.space_to_tabs=h;data={};data.history_id=j;data.tool_id="upload1";data.inputs=JSON.stringify(tool_input);return data},event_progress:function(f,g,i){var h=this.get_upload_item(f);var e=parseInt(i);h.find(".progress-bar").css({width:e+"%"});if(e!=100){h.find("#percentage").html(e+"%")}else{h.find("#percentage").html("Adding to history...")}},event_success:function(e,f,h){this.event_progress(e,f,100);this.button_show.number("");this.counter.announce--;this.counter.success++;this.update_screen();var g=this.get_upload_item(e);g.addClass("success");g.find("#percentage").html("100%");var i=g.find("#symbol");i.removeClass(this.state.running);i.removeClass(this.state.queued);i.addClass(this.state.success);Galaxy.currHistoryPanel.refreshHdas()},event_error:function(e,f,h){this.event_progress(e,f,0);this.button_show.number("");this.counter.announce--;this.counter.error++;this.update_screen();var g=this.get_upload_item(e);g.addClass("danger");g.find(".progress").remove();g.find("#info").html("<strong>Failed: </strong>"+h).show();var i=g.find("#symbol");i.removeClass(this.state.running);i.removeClass(this.state.queued);i.addClass(this.state.error)},event_start:function(){if(this.counter.announce==0||this.counter.running>0){return}var f=$(this.el).find(".upload-item");var e=this;f.each(function(){var g=$(this).find("#symbol");if(g.hasClass(e.state.init)){g.removeClass(e.state.init);g.addClass(e.state.queued);$(this).find("#text-content").attr("disabled",true);$(this).find("#genome").attr("disabled",true);$(this).find("#extension").attr("disabled",true);$(this).find("#space_to_tabs").attr("disabled",true)}});this.counter.running=this.counter.announce;this.update_screen();this.uploadbox.start()},event_stop:function(){if(this.counter.running==0){return}this.uploadbox.stop();$("#upload-info").html("Queue will pause after completing the current file...")},event_complete:function(){this.counter.running=0;this.update_screen();var f=$(this.el).find(".upload-item");var e=this;f.each(function(){var g=$(this).find("#symbol");if(g.hasClass(e.state.queued)&&!g.hasClass(e.state.running)){g.removeClass(e.state.queued);g.addClass(e.state.init);$(this).find("#text-content").attr("disabled",false);$(this).find("#genome").attr("disabled",false);$(this).find("#extension").attr("disabled",false);$(this).find("#space_to_tabs").attr("disabled",false)}})},event_reset:function(){if(this.counter.running==0){var e=$(this.el).find(".upload-item");$(this.el).find("table").fadeOut({complete:function(){e.remove()}});this.counter.reset();this.update_screen();this.uploadbox.reset()}},event_remove:function(e){var f=this.get_upload_item(e);var g=f.find("#symbol");if(g.hasClass(this.state.init)||g.hasClass(this.state.success)||g.hasClass(this.state.error)){if(f.hasClass("success")){this.counter.success--}else{if(f.hasClass("danger")){this.counter.error--}else{this.counter.announce--}}this.update_screen();this.uploadbox.remove(e);f.remove()}},event_create:function(){this.uploadbox.add([{name:"New File",size:-1}])},event_show:function(g){g.preventDefault();if(!this.modal){var f=this;this.modal=new b.GalaxyModal({title:"Upload files from your local drive",body:this.template("upload-box","upload-info"),buttons:{Select:function(){f.uploadbox.select()},Create:function(){f.event_create()},Upload:function(){f.event_start()},Pause:function(){f.event_stop()},Reset:function(){f.event_reset()},Close:function(){f.modal.hide()},},height:"400",width:"900"});this.setElement("#upload-box");var f=this;this.uploadbox=this.$el.uploadbox({dragover:function(){f.event_dragover()},dragleave:function(){f.event_dragleave()},announce:function(e,h,i){f.event_announce(e,h,i)},initialize:function(e,h,i){return f.event_initialize(e,h,i)},success:function(e,h,i){f.event_success(e,h,i)},progress:function(e,h,i){f.event_progress(e,h,i)},error:function(e,h,i){f.event_error(e,h,i)},complete:function(){f.event_complete()},});this.update_screen()}this.modal.show()},get_upload_item:function(e){return $(this.el).find("#upload-"+e)},size_to_string:function(e){var f="";if(e>=100000000000){e=e/100000000000;f="TB"}else{if(e>=100000000){e=e/100000000;f="GB"}else{if(e>=100000){e=e/100000;f="MB"}else{if(e>=100){e=e/100;f="KB"}else{if(e>0){e=e*10;f="b"}else{return"<strong>-</strong>"}}}}}return"<strong>"+(Math.round(e)/10)+"</strong> "+f},update_screen:function(){if(this.counter.announce==0){if(this.uploadbox.compatible()){message="Drag&drop files into this box or click 'Select' to select files!"}else{message="Unfortunately, your browser does not support multiple file uploads or drag&drop.<br>Please upgrade to i.e. Firefox 4+, Chrome 7+, IE 10+, Opera 12+ or Safari 6+."}}else{if(this.counter.running==0){message="You added "+this.counter.announce+" file(s) to the queue. Add more files or click 'Upload' to proceed."}else{message="Please wait..."+this.counter.announce+" out of "+this.counter.running+" remaining."}}$("#upload-info").html(message);if(this.counter.running==0&&this.counter.announce+this.counter.success+this.counter.error>0){this.modal.enableButton("Reset")}else{this.modal.disableButton("Reset")}if(this.counter.running==0&&this.counter.announce>0){this.modal.enableButton("Upload")}else{this.modal.disableButton("Upload")}if(this.counter.running>0){this.modal.enableButton("Pause")}else{this.modal.disableButton("Pause")}if(this.counter.running==0){this.modal.enableButton("Select");this.modal.enableButton("Create")}else{this.modal.disableButton("Select");this.modal.disableButton("Create")}if(this.counter.announce+this.counter.success+this.counter.error>0){$(this.el).find("table").show()}else{$(this.el).find("table").hide()}},template:function(f,e){return'<div id="'+f+'" class="upload-box"><table class="table table-striped" style="display: none;"><thead><tr><th>Name</th><th>Size</th><th>Type</th><th>Genome</th><th>Space→Tab</th><th>Status</th><th></th></tr></thead><tbody></tbody></table></div><h6 id="'+e+'" class="upload-info"></h6>'},template_row:function(f){var e='<tr id="'+f.substr(1)+'" class="upload-item"><td><div style="position: relative;"><div id="title" class="title"></div><div id="text" class="text"><div class="text-info">You may specify a list of URLs (one per line) or paste the contents of a file.</div><textarea id="text-content" class="text-content form-control"></textarea></div></div></td><td><div id="size" class="size"></div></td>';e+='<td><select id="extension" class="extension">';for(key in this.select_extension){e+='<option value="'+this.select_extension[key][1]+'">'+this.select_extension[key][0]+"</option>"}e+="</select></td>";e+='<td><select id="genome" class="genome">';for(key in this.select_genome){e+='<option value="'+this.select_genome[key][1]+'">'+this.select_genome[key][0]+"</option>"}e+="</select></td>";e+='<td><input id="space_to_tabs" type="checkbox"></input></td><td><div id="info" class="info"><div class="progress"><div class="progress-bar progress-bar-success"></div><div id="percentage" class="percentage">0%</div></div></div></td><td><div id="symbol" class="symbol '+this.state.init+'"></div></td></tr>';return e}});return{GalaxyUpload:a}});
\ No newline at end of file
diff -r c0bf145241e7735cd1c7a9dddab44d984425695f -r 8bc80aa53e81d9362e08ead0a0307cd3af0dd8aa static/scripts/packed/mvc/dataset/hda-base.js
--- a/static/scripts/packed/mvc/dataset/hda-base.js
+++ b/static/scripts/packed/mvc/dataset/hda-base.js
@@ -1,1 +1,1 @@
-define(["mvc/dataset/hda-model"],function(b){var a=Backbone.View.extend(LoggableMixin).extend({tagName:"div",className:"historyItemContainer",fxSpeed:"fast",initialize:function(c){if(c.logger){this.logger=this.model.logger=c.logger}this.log(this+".initialize:",c);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton];this.expanded=c.expanded||false;this._setUpListeners()},_setUpListeners:function(){this.model.on("change",this.render,this)},render:function(){var d=this,g=this.model.get("id"),e=this.model.get("state"),c=$("<div/>").attr("id","historyItem-"+g),f=(this.$el.children().size()===0);this.$el.attr("id","historyItemContainer-"+g);this.$el.find("[title]").tooltip("destroy");this.urls=this.model.urls();c.addClass("historyItemWrapper").addClass("historyItem").addClass("historyItem-"+e);c.append(this._render_warnings());c.append(this._render_titleBar());this._setUpBehaviors(c);this.body=$(this._render_body());c.append(this.body);this.$el.fadeOut(this.fxSpeed,function(){d.$el.children().remove();d.$el.append(c).fadeIn(d.fxSpeed,function(){d.log(d+" rendered:",d.$el);var h="rendered";if(f){h+=":initial"}else{if(d.model.inReadyState()){h+=":ready"}}d.trigger(h)})});return this},_setUpBehaviors:function(c){c=c||this.$el;make_popup_menus(c);c.find("[title]").tooltip({placement:"bottom"})},_render_warnings:function(){return $(jQuery.trim(a.templates.messages(this.model.toJSON())))},_render_titleBar:function(){var c=$('<div class="historyItemTitleBar" style="overflow: hidden"></div>');c.append(this._render_titleButtons());c.append('<span class="state-icon"></span>');c.append(this._render_titleLink());return c},_render_titleButtons:function(){var c=$('<div class="historyItemButtons"></div>');c.append(this._render_displayButton());return c},_render_displayButton:function(){if((this.model.get("state")===b.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(this.model.get("state")===b.HistoryDatasetAssociation.STATES.NEW)||(!this.model.get("accessible"))){this.displayButton=null;return null}var d={icon_class:"display",target:"galaxy_main"};if(this.model.get("purged")){d.enabled=false;d.title=_l("Cannot display datasets removed from disk")}else{if(this.model.get("state")===b.HistoryDatasetAssociation.STATES.UPLOAD){d.enabled=false;d.title=_l("This dataset must finish uploading before it can be viewed")}else{d.title=_l("View data");d.href=this.urls.display;var c=this;d.on_click=function(){Galaxy.frame_manager.frame_new({title:"Data Viewer: "+c.model.get("name"),type:"url",location:"center",content:c.urls.display})}}}this.displayButton=new IconButtonView({model:new IconButton(d)});return this.displayButton.render().$el},_render_titleLink:function(){return $(jQuery.trim(a.templates.titleLink(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_hdaSummary:function(){var c=_.extend(this.model.toJSON(),{urls:this.urls});return a.templates.hdaSummary(c)},_render_primaryActionButtons:function(e){var c=this,d=$("<div/>").attr("id","primary-actions-"+this.model.get("id"));_.each(e,function(f){d.append(f.call(c))});return d},_render_downloadButton:function(){if(this.model.get("purged")||!this.model.hasData()){return null}var c=a.templates.downloadLinks(_.extend(this.model.toJSON(),{urls:this.urls}));return $(c.trim())},_render_showParamsButton:function(){this.showParamsButton=new IconButtonView({model:new IconButton({title:_l("View details"),href:this.urls.show_params,target:"galaxy_main",icon_class:"information"})});return this.showParamsButton.render().$el},_render_displayAppArea:function(){return $("<div/>").addClass("display-apps")},_render_displayApps:function(e){e=e||this.$el;var f=e.find("div.display-apps"),c=this.model.get("display_types"),d=this.model.get("display_apps");if((!this.model.hasData())||(!e||!e.length)||(!f.length)){return}f.html(null);if(!_.isEmpty(c)){f.append(a.templates.displayApps({displayApps:c}))}if(!_.isEmpty(d)){f.append(a.templates.displayApps({displayApps:d}))}},_render_peek:function(){var c=this.model.get("peek");if(!c){return null}return $("<div/>").append($("<pre/>").attr("id","peek"+this.model.get("id")).addClass("peek").append(c))},_render_body:function(){var c=$("<div/>").attr("id","info-"+this.model.get("id")).addClass("historyItemBody").attr("style","display: none");if(this.expanded){this._render_body_html(c);c.css("display","block")}return c},_render_body_html:function(c){c.html("");switch(this.model.get("state")){case b.HistoryDatasetAssociation.STATES.NEW:this._render_body_new(c);break;case b.HistoryDatasetAssociation.STATES.NOT_VIEWABLE:this._render_body_not_viewable(c);break;case b.HistoryDatasetAssociation.STATES.UPLOAD:this._render_body_uploading(c);break;case b.HistoryDatasetAssociation.STATES.PAUSED:this._render_body_paused(c);break;case b.HistoryDatasetAssociation.STATES.QUEUED:this._render_body_queued(c);break;case b.HistoryDatasetAssociation.STATES.RUNNING:this._render_body_running(c);break;case b.HistoryDatasetAssociation.STATES.ERROR:this._render_body_error(c);break;case b.HistoryDatasetAssociation.STATES.DISCARDED:this._render_body_discarded(c);break;case b.HistoryDatasetAssociation.STATES.SETTING_METADATA:this._render_body_setting_metadata(c);break;case b.HistoryDatasetAssociation.STATES.EMPTY:this._render_body_empty(c);break;case b.HistoryDatasetAssociation.STATES.FAILED_METADATA:this._render_body_failed_metadata(c);break;case b.HistoryDatasetAssociation.STATES.OK:this._render_body_ok(c);break;default:c.append($('<div>Error: unknown dataset state "'+this.model.get("state")+'".</div>'))}c.append('<div style="clear: both"></div>');this._setUpBehaviors(c)},_render_body_new:function(d){var c=_l("This is a new dataset and not all of its data are available yet");d.append($("<div>"+_l(c)+"</div>"))},_render_body_not_viewable:function(c){c.append($("<div>"+_l("You do not have permission to view dataset")+"</div>"))},_render_body_uploading:function(c){c.append($("<div>"+_l("Dataset is uploading")+"</div>"))},_render_body_queued:function(c){c.append($("<div>"+_l("Job is waiting to run")+"</div>"));c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_paused:function(c){c.append($("<div>"+_l("Job is paused. Use the history menu to resume")+"</div>"));c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_running:function(c){c.append("<div>"+_l("Job is currently running")+"</div>");c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_error:function(c){if(!this.model.get("purged")){c.append($("<div>"+this.model.get("misc_blurb")+"</div>"))}c.append((_l("An error occurred with this dataset")+": <i>"+$.trim(this.model.get("misc_info"))+"</i>"));c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers.concat([this._render_downloadButton])))},_render_body_discarded:function(c){c.append("<div>"+_l("The job creating this dataset was cancelled before completion")+".</div>");c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_setting_metadata:function(c){c.append($("<div>"+_l("Metadata is being auto-detected")+".</div>"))},_render_body_empty:function(c){c.append($("<div>"+_l("No data")+": <i>"+this.model.get("misc_blurb")+"</i></div>"));c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_failed_metadata:function(c){c.append($(a.templates.failedMetadata(_.extend(this.model.toJSON(),{urls:this.urls}))));this._render_body_ok(c)},_render_body_ok:function(c){c.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){c.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));return}c.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));c.append('<div class="clear"/>');c.append(this._render_displayAppArea());this._render_displayApps(c);c.append(this._render_peek())},events:{"click .historyItemTitle":"toggleBodyVisibility"},toggleBodyVisibility:function(e,c){var d=this;c=(c===undefined)?(!this.body.is(":visible")):(c);if(c){if(this.model.inReadyState()&&!this.model.hasDetails()){var f=this.model.fetch();f.done(function(g){d.expandBody()})}else{this.expandBody()}}else{this.collapseBody()}},expandBody:function(){var c=this;c._render_body_html(c.body);this.body.slideDown(c.fxSpeed,function(){c.expanded=true;c.trigger("body-expanded",c.model.get("id"))})},collapseBody:function(){var c=this;this.body.slideUp(c.fxSpeed,function(){c.expanded=false;c.trigger("body-collapsed",c.model.get("id"))})},remove:function(d){var c=this;this.$el.fadeOut(c.fxSpeed,function(){c.$el.remove();c.off();if(d){d()}})},toString:function(){var c=(this.model)?(this.model+""):("(no model)");return"HDABaseView("+c+")"}});a.templates={warningMsg:Handlebars.templates["template-warningmessagesmall"],messages:Handlebars.templates["template-hda-warning-messages"],titleLink:Handlebars.templates["template-hda-titleLink"],hdaSummary:Handlebars.templates["template-hda-hdaSummary"],downloadLinks:Handlebars.templates["template-hda-downloadLinks"],failedMetadata:Handlebars.templates["template-hda-failedMetadata"],displayApps:Handlebars.templates["template-hda-displayApps"]};return{HDABaseView:a,}});
\ No newline at end of file
+define(["mvc/dataset/hda-model"],function(b){var a=Backbone.View.extend(LoggableMixin).extend({tagName:"div",className:"historyItemContainer",fxSpeed:"fast",initialize:function(c){if(c.logger){this.logger=this.model.logger=c.logger}this.log(this+".initialize:",c);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton];this.expanded=c.expanded||false;this._setUpListeners()},_setUpListeners:function(){this.model.on("change",function(d,c){if(this.model.changedAttributes().state&&this.model.inReadyState()&&this.expanded&&!this.model.hasDetails()){this.model.fetch()}else{this.render()}},this)},render:function(){var d=this,g=this.model.get("id"),e=this.model.get("state"),c=$("<div/>").attr("id","historyItem-"+g),f=(this.$el.children().size()===0);this.$el.attr("id","historyItemContainer-"+g);this.$el.find("[title]").tooltip("destroy");this.urls=this.model.urls();c.addClass("historyItemWrapper").addClass("historyItem").addClass("historyItem-"+e);c.append(this._render_warnings());c.append(this._render_titleBar());this._setUpBehaviors(c);this.body=$(this._render_body());c.append(this.body);this.$el.fadeOut(this.fxSpeed,function(){d.$el.children().remove();d.$el.append(c).fadeIn(d.fxSpeed,function(){d.log(d+" rendered:",d.$el);var h="rendered";if(f){h+=":initial"}else{if(d.model.inReadyState()){h+=":ready"}}d.trigger(h)})});return this},_setUpBehaviors:function(c){c=c||this.$el;make_popup_menus(c);c.find("[title]").tooltip({placement:"bottom"})},_render_warnings:function(){return $(jQuery.trim(a.templates.messages(this.model.toJSON())))},_render_titleBar:function(){var c=$('<div class="historyItemTitleBar" style="overflow: hidden"></div>');c.append(this._render_titleButtons());c.append('<span class="state-icon"></span>');c.append(this._render_titleLink());return c},_render_titleButtons:function(){var c=$('<div class="historyItemButtons"></div>');c.append(this._render_displayButton());return c},_render_displayButton:function(){if((this.model.get("state")===b.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(this.model.get("state")===b.HistoryDatasetAssociation.STATES.NEW)||(!this.model.get("accessible"))){this.displayButton=null;return null}var d={icon_class:"display",target:"galaxy_main"};if(this.model.get("purged")){d.enabled=false;d.title=_l("Cannot display datasets removed from disk")}else{if(this.model.get("state")===b.HistoryDatasetAssociation.STATES.UPLOAD){d.enabled=false;d.title=_l("This dataset must finish uploading before it can be viewed")}else{d.title=_l("View data");d.href=this.urls.display;var c=this;d.on_click=function(){Galaxy.frame_manager.frame_new({title:"Data Viewer: "+c.model.get("name"),type:"url",location:"center",content:c.urls.display})}}}this.displayButton=new IconButtonView({model:new IconButton(d)});return this.displayButton.render().$el},_render_titleLink:function(){return $(jQuery.trim(a.templates.titleLink(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_hdaSummary:function(){var c=_.extend(this.model.toJSON(),{urls:this.urls});return a.templates.hdaSummary(c)},_render_primaryActionButtons:function(e){var c=this,d=$("<div/>").attr("id","primary-actions-"+this.model.get("id"));_.each(e,function(f){d.append(f.call(c))});return d},_render_downloadButton:function(){if(this.model.get("purged")||!this.model.hasData()){return null}var c=a.templates.downloadLinks(_.extend(this.model.toJSON(),{urls:this.urls}));return $(c.trim())},_render_showParamsButton:function(){this.showParamsButton=new IconButtonView({model:new IconButton({title:_l("View details"),href:this.urls.show_params,target:"galaxy_main",icon_class:"information"})});return this.showParamsButton.render().$el},_render_displayAppArea:function(){return $("<div/>").addClass("display-apps")},_render_displayApps:function(e){e=e||this.$el;var f=e.find("div.display-apps"),c=this.model.get("display_types"),d=this.model.get("display_apps");if((!this.model.hasData())||(!e||!e.length)||(!f.length)){return}f.html(null);if(!_.isEmpty(c)){f.append(a.templates.displayApps({displayApps:c}))}if(!_.isEmpty(d)){f.append(a.templates.displayApps({displayApps:d}))}},_render_peek:function(){var c=this.model.get("peek");if(!c){return null}return $("<div/>").append($("<pre/>").attr("id","peek"+this.model.get("id")).addClass("peek").append(c))},_render_body:function(){var c=$("<div/>").attr("id","info-"+this.model.get("id")).addClass("historyItemBody").attr("style","display: none");if(this.expanded){this._render_body_html(c);c.css("display","block")}return c},_render_body_html:function(c){c.html("");switch(this.model.get("state")){case b.HistoryDatasetAssociation.STATES.NEW:this._render_body_new(c);break;case b.HistoryDatasetAssociation.STATES.NOT_VIEWABLE:this._render_body_not_viewable(c);break;case b.HistoryDatasetAssociation.STATES.UPLOAD:this._render_body_uploading(c);break;case b.HistoryDatasetAssociation.STATES.PAUSED:this._render_body_paused(c);break;case b.HistoryDatasetAssociation.STATES.QUEUED:this._render_body_queued(c);break;case b.HistoryDatasetAssociation.STATES.RUNNING:this._render_body_running(c);break;case b.HistoryDatasetAssociation.STATES.ERROR:this._render_body_error(c);break;case b.HistoryDatasetAssociation.STATES.DISCARDED:this._render_body_discarded(c);break;case b.HistoryDatasetAssociation.STATES.SETTING_METADATA:this._render_body_setting_metadata(c);break;case b.HistoryDatasetAssociation.STATES.EMPTY:this._render_body_empty(c);break;case b.HistoryDatasetAssociation.STATES.FAILED_METADATA:this._render_body_failed_metadata(c);break;case b.HistoryDatasetAssociation.STATES.OK:this._render_body_ok(c);break;default:c.append($('<div>Error: unknown dataset state "'+this.model.get("state")+'".</div>'))}c.append('<div style="clear: both"></div>');this._setUpBehaviors(c)},_render_body_new:function(d){var c=_l("This is a new dataset and not all of its data are available yet");d.append($("<div>"+_l(c)+"</div>"))},_render_body_not_viewable:function(c){c.append($("<div>"+_l("You do not have permission to view dataset")+"</div>"))},_render_body_uploading:function(c){c.append($("<div>"+_l("Dataset is uploading")+"</div>"))},_render_body_queued:function(c){c.append($("<div>"+_l("Job is waiting to run")+"</div>"));c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_paused:function(c){c.append($("<div>"+_l("Job is paused. Use the history menu to resume")+"</div>"));c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_running:function(c){c.append("<div>"+_l("Job is currently running")+"</div>");c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_error:function(c){if(!this.model.get("purged")){c.append($("<div>"+this.model.get("misc_blurb")+"</div>"))}c.append((_l("An error occurred with this dataset")+": <i>"+$.trim(this.model.get("misc_info"))+"</i>"));c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers.concat([this._render_downloadButton])))},_render_body_discarded:function(c){c.append("<div>"+_l("The job creating this dataset was cancelled before completion")+".</div>");c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_setting_metadata:function(c){c.append($("<div>"+_l("Metadata is being auto-detected")+".</div>"))},_render_body_empty:function(c){c.append($("<div>"+_l("No data")+": <i>"+this.model.get("misc_blurb")+"</i></div>"));c.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_failed_metadata:function(c){c.append($(a.templates.failedMetadata(_.extend(this.model.toJSON(),{urls:this.urls}))));this._render_body_ok(c)},_render_body_ok:function(c){c.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){c.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));return}c.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));c.append('<div class="clear"/>');c.append(this._render_displayAppArea());this._render_displayApps(c);c.append(this._render_peek())},events:{"click .historyItemTitle":"toggleBodyVisibility"},toggleBodyVisibility:function(e,c){var d=this;c=(c===undefined)?(!this.body.is(":visible")):(c);if(c){if(this.model.inReadyState()&&!this.model.hasDetails()){var f=this.model.fetch();f.done(function(g){d.expandBody()})}else{this.expandBody()}}else{this.collapseBody()}},expandBody:function(){var c=this;c._render_body_html(c.body);this.body.slideDown(c.fxSpeed,function(){c.expanded=true;c.trigger("body-expanded",c.model.get("id"))})},collapseBody:function(){var c=this;this.body.slideUp(c.fxSpeed,function(){c.expanded=false;c.trigger("body-collapsed",c.model.get("id"))})},remove:function(d){var c=this;this.$el.fadeOut(c.fxSpeed,function(){c.$el.remove();c.off();if(d){d()}})},toString:function(){var c=(this.model)?(this.model+""):("(no model)");return"HDABaseView("+c+")"}});a.templates={warningMsg:Handlebars.templates["template-warningmessagesmall"],messages:Handlebars.templates["template-hda-warning-messages"],titleLink:Handlebars.templates["template-hda-titleLink"],hdaSummary:Handlebars.templates["template-hda-hdaSummary"],downloadLinks:Handlebars.templates["template-hda-downloadLinks"],failedMetadata:Handlebars.templates["template-hda-failedMetadata"],displayApps:Handlebars.templates["template-hda-displayApps"]};return{HDABaseView:a,}});
\ No newline at end of file
diff -r c0bf145241e7735cd1c7a9dddab44d984425695f -r 8bc80aa53e81d9362e08ead0a0307cd3af0dd8aa 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 @@
-define(["mvc/dataset/hda-model"],function(a){var c=Backbone.Model.extend(LoggableMixin).extend({defaults:{model_class:"History",id:null,name:"Unnamed History",state:"new",diskSize:0,deleted:false},urlRoot:"api/histories",renameUrl:function(){var e=this.get("id");if(!e){return undefined}return"/history/rename_async?id="+this.get("id")},annotateUrl:function(){var e=this.get("id");if(!e){return undefined}return"/history/annotate_async?id="+this.get("id")},tagUrl:function(){var e=this.get("id");if(!e){return undefined}return"/tag/get_tagging_elt_async?item_id="+this.get("id")+"&item_class=History"},initialize:function(f,g,e){e=e||{};this.logger=e.logger||null;this.log(this+".initialize:",f,g,e);this.hdas=new a.HDACollection(g||[],{historyId:this.get("id")});if(g&&_.isArray(g)){this.hdas.reset(g)}this._setUpListeners();this._installAjaxErrorHandler(this.ajaxErrorHandler);this.checkForUpdates()},_setUpListeners:function(){if(this.hdas){this.listenTo(this.hdas,"error",function(){this.trigger.apply(this,["error:hdas"].concat(jQuery.makeArray(arguments)))})}this.on("change:id",function(f,e){if(this.hdas){this.hdas.historyId=e}},this)},hasUser:function(){var e=this.get("user");return !!(e&&e.id)},_installAjaxErrorHandler:function(f){this.sync=function e(i,h,g){return Backbone.Model.prototype.sync.call(h,i,h,g).fail(function(l,j,k){f.call(h,h,l,g,i)})}},ajaxErrorHandler:function(f,g,e,h){},checkForUpdates:function(e){if(this.hdas.running().length){this.setUpdateTimeout()}else{this.trigger("ready");if(_.isFunction(e)){e.call(this)}}return this},setUpdateTimeout:function(e){e=e||c.UPDATE_DELAY;var f=this;this.clearUpdateTimeout();this.updateTimeoutId=setTimeout(function(){f.refresh()},e);return this.updateTimeoutId},clearUpdateTimeout:function(){if(this.updateTimeoutId){clearTimeout(this.updateTimeoutId);this.updateTimeoutId=null}},refresh:function(f,e){f=f||[];e=e||{};var g=this;e.data=e.data||{};if(f.length){e.data.details=f.join(",")}var h=this.hdas.fetch(e);h.done(function(i){g.checkForUpdates(function(){this.fetch()})});return h},toString:function(){return"History("+this.get("id")+","+this.get("name")+")"}});c.UPDATE_DELAY=4000;c.getHistoryData=function d(f,p){p=p||{};var j=p.hdaDetailIds||[];var l=jQuery.Deferred(),k=null;function g(q){return jQuery.ajax("/api/histories/"+f)}function e(q){if(!q||!q.state_ids){return 0}return _.reduce(q.state_ids,function(r,t,s){return r+t.length},0)}function o(r){if(!e(r)){return[]}if(_.isFunction(j)){j=j(r)}var q=(j.length)?({details:j.join(",")}):({});return jQuery.ajax("/api/histories/"+r.id+"/contents",{data:q})}var n=p.historyFn||g,m=p.hdaFn||o;var i=n(f);i.done(function(q){k=q;l.notify({status:"history data retrieved",historyJSON:k})});i.fail(function(s,q,r){l.reject(s,"loading the history")});var h=i.then(m);h.then(function(q){l.notify({status:"dataset data retrieved",historyJSON:k,hdaJSON:q});l.resolve(k,q)});h.fail(function(s,q,r){l.reject(s,"loading the datasets",{history:k})});return l};var b=Backbone.Collection.extend(LoggableMixin).extend({model:c,urlRoot:"api/histories"});return{History:c,HistoryCollection:b}});
\ No newline at end of file
+define(["mvc/dataset/hda-model"],function(a){var c=Backbone.Model.extend(LoggableMixin).extend({defaults:{model_class:"History",id:null,name:"Unnamed History",state:"new",diskSize:0,deleted:false},urlRoot:"api/histories",renameUrl:function(){var e=this.get("id");if(!e){return undefined}return"/history/rename_async?id="+this.get("id")},annotateUrl:function(){var e=this.get("id");if(!e){return undefined}return"/history/annotate_async?id="+this.get("id")},tagUrl:function(){var e=this.get("id");if(!e){return undefined}return"/tag/get_tagging_elt_async?item_id="+this.get("id")+"&item_class=History"},initialize:function(f,g,e){e=e||{};this.logger=e.logger||null;this.log(this+".initialize:",f,g,e);this.hdas=new a.HDACollection(g||[],{historyId:this.get("id")});if(g&&_.isArray(g)){this.hdas.reset(g)}this._setUpListeners();this.checkForUpdates()},_setUpListeners:function(){this.on("error",function(f,i,e,h,g){this.errorHandler(f,i,e,h,g)});if(this.hdas){this.listenTo(this.hdas,"error",function(){this.trigger.apply(this,["error:hdas"].concat(jQuery.makeArray(arguments)))})}this.on("change:id",function(f,e){if(this.hdas){this.hdas.historyId=e}},this)},errorHandler:function(f,i,e,h,g){this.clearUpdateTimeout()},hasUser:function(){var e=this.get("user");return !!(e&&e.id)},checkForUpdates:function(e){if(this.hdas.running().length){this.setUpdateTimeout()}else{this.trigger("ready");if(_.isFunction(e)){e.call(this)}}return this},setUpdateTimeout:function(e){e=e||c.UPDATE_DELAY;var f=this;this.clearUpdateTimeout();this.updateTimeoutId=setTimeout(function(){f.refresh()},e);return this.updateTimeoutId},clearUpdateTimeout:function(){if(this.updateTimeoutId){clearTimeout(this.updateTimeoutId);this.updateTimeoutId=null}},refresh:function(f,e){f=f||[];e=e||{};var g=this;e.data=e.data||{};if(f.length){e.data.details=f.join(",")}var h=this.hdas.fetch(e);h.done(function(i){g.checkForUpdates(function(){this.fetch()})});return h},toString:function(){return"History("+this.get("id")+","+this.get("name")+")"}});c.UPDATE_DELAY=4000;c.getHistoryData=function d(f,p){p=p||{};var j=p.hdaDetailIds||[];var l=jQuery.Deferred(),k=null;function g(q){return jQuery.ajax("/api/histories/"+f)}function e(q){if(!q||!q.state_ids){return 0}return _.reduce(q.state_ids,function(r,t,s){return r+t.length},0)}function o(r){if(!e(r)){return[]}if(_.isFunction(j)){j=j(r)}var q=(j.length)?({details:j.join(",")}):({});return jQuery.ajax("/api/histories/"+r.id+"/contents",{data:q})}var n=p.historyFn||g,m=p.hdaFn||o;var i=n(f);i.done(function(q){k=q;l.notify({status:"history data retrieved",historyJSON:k})});i.fail(function(s,q,r){l.reject(s,"loading the history")});var h=i.then(m);h.then(function(q){l.notify({status:"dataset data retrieved",historyJSON:k,hdaJSON:q});l.resolve(k,q)});h.fail(function(s,q,r){l.reject(s,"loading the datasets",{history:k})});return l};var b=Backbone.Collection.extend(LoggableMixin).extend({model:c,urlRoot:"api/histories"});return{History:c,HistoryCollection:b}});
\ No newline at end of file
diff -r c0bf145241e7735cd1c7a9dddab44d984425695f -r 8bc80aa53e81d9362e08ead0a0307cd3af0dd8aa 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 @@
-define(["mvc/history/history-model","mvc/dataset/hda-base","mvc/dataset/hda-edit"],function(d,b,a){var c=Backbone.View.extend(LoggableMixin).extend({HDAView:a.HDAEditView,tagName:"div",className:"history-panel",fxSpeed:300,events:{"click #history-tag":"loadAndDisplayTags","click #message-container":"clearMessages"},initialize:function(e){e=e||{};if(e.logger){this.logger=e.logger}this.log(this+".initialize:",e);this._setUpListeners();this.hdaViews={};this.urls={};this.indicator=new LoadingIndicator(this.$el);if(this.model){this._setUpWebStorage(e.initiallyExpanded,e.show_deleted,e.show_hidden);this._setUpModelEventHandlers()}if(e.onready){e.onready.call(this)}},_setUpListeners:function(){this.on("error",function(f,i,e,h,g){this.errorHandler(f,i,e,h,g)});this.on("loading-history",function(){this.showLoadingIndicator()});this.on("loading-done",function(){this.hideLoadingIndicator()});this.once("rendered",function(){this.trigger("rendered:initial",this);return false});this.on("switched-history current-history new-history",function(){if(_.isEmpty(this.hdaViews)){this.trigger("empty-history",this)}});if(this.logger){this.on("all",function(e){this.log(this+"",arguments)},this)}},errorHandler:function(g,j,f,i,h){var e=this._parseErrorMessage(g,j,f,i,h);if(j&&j.status===502){}else{if(!this.$el.find("#message-container").is(":visible")){this.once("rendered",function(){this.displayMessage("error",e.message,e.details)})}else{this.displayMessage("error",e.message,e.details)}}},_parseErrorMessage:function(h,l,g,k,j){var f=Galaxy.currUser,e={message:this._bePolite(k),details:{user:(f instanceof User)?(f.toJSON()):(f+""),source:(h instanceof Backbone.Model)?(h.toJSON()):(h+""),xhr:l,options:(l)?(_.omit(g,"xhr")):(g)}};_.extend(e.details,j||{});if(l&&_.isFunction(l.getAllResponseHeaders)){var i=l.getAllResponseHeaders();i=_.compact(i.split("\n"));i=_.map(i,function(m){return m.split(": ")});e.details.xhr.responseHeaders=_.object(i)}return e},_bePolite:function(e){e=e||_l("An error occurred while getting updates from the server");return e+". "+_l("Please contact a Galaxy administrator if the problem persists.")},_loadHistoryFromXHR:function(g,f){var e=this;g.then(function(h,i){e.setModel(h,i,f)});g.fail(function(i,h){e.render()});return g},setModel:function(g,e,f){f=f||{};if(this.model){this.model.clearUpdateTimeout();this.stopListening(this.model);this.stopListening(this.model.hdas)}this.hdaViews={};if(Galaxy&&Galaxy.currUser){g.user=Galaxy.currUser.toJSON()}this.model=new d.History(g,e,f);this._setUpWebStorage(f.initiallyExpanded,f.show_deleted,f.show_hidden);this._setUpModelEventHandlers();this.trigger("new-model",this);this.render();return this},loadHistory:function(h,g,f,k,i){this.trigger("loading-history",this);g=g||{};var e=this;var j=d.History.getHistoryData(h,{historyFn:f,hdaFn:k,hdaDetailIds:g.initiallyExpanded||i});return this._loadHistoryFromXHR(j,g).fail(function(n,l,m){e.trigger("error",e,n,g,_l("An error was encountered while "+l),{historyId:h,history:m||{}})}).always(function(){e.trigger("loading-done",e)})},loadHistoryWithHDADetails:function(h,g,f,j){var e=this,i=function(k){return e.getExpandedHdaIds(k.id)};return this.loadHistory(h,g,f,j,i)},switchToHistory:function(h,g){var e=this,f=function(){return jQuery.post("/api/histories/"+h+"/set_as_current")};return this.loadHistoryWithHDADetails(h,g,f).then(function(j,i){e.trigger("switched-history",e)})},loadCurrentHistory:function(f){var e=this;return this.loadHistoryWithHDADetails("current",f).then(function(h,g){e.trigger("current-history",e)})},createNewHistory:function(g){var e=this,f=function(){return jQuery.post("/api/histories",{current:true})};return this.loadHistory(undefined,g,f).then(function(i,h){e.trigger("new-history",e)})},refreshHdas:function(f,e){if(this.model){return this.model.refresh(f,e)}return $.when()},_getStorageKey:function(e){if(!e){throw new Error("_getStorageKey needs valid id: "+e)}return("history:"+e)},_setUpWebStorage:function(f,e,g){this.storage=new PersistentStorage(this._getStorageKey(this.model.get("id")),{expandedHdas:{},show_deleted:false,show_hidden:false});this.log(this+" (prev) storage:",JSON.stringify(this.storage.get(),null,2));if(f){this.storage.set("exandedHdas",f)}if((e===true)||(e===false)){this.storage.set("show_deleted",e)}if((g===true)||(g===false)){this.storage.set("show_hidden",g)}this.show_deleted=this.storage.get("show_deleted");this.show_hidden=this.storage.get("show_hidden");this.trigger("new-storage",this.storage,this);this.log(this+" (init'd) storage:",this.storage.get())},clearWebStorage:function(){for(var e in sessionStorage){if(e.indexOf("HistoryView.")===0){sessionStorage.removeItem(e)}}},getStoredOptions:function(f){if(!f||f==="current"){return(this.storage)?(this.storage.get()):({})}var e=sessionStorage.getItem(this._getStorageKey(f));return(e===null)?({}):(JSON.parse(e))},getExpandedHdaIds:function(e){var f=this.getStoredOptions(e).expandedHdas;return((_.isEmpty(f))?([]):(_.keys(f)))},_setUpModelEventHandlers:function(){this.model.on("error error:hdas",function(f,h,e,g){this.errorHandler(f,h,e,g)},this);this.model.on("change:nice_size",this.updateHistoryDiskSize,this);if(Galaxy&&Galaxy.quotaMeter){this.listenTo(this.model,"change:nice_size",function(){Galaxy.quotaMeter.update()})}this.model.hdas.on("add",this.addHdaView,this);this.model.hdas.on("change:deleted",this.handleHdaDeletionChange,this);this.model.hdas.on("change:visible",this.handleHdaVisibleChange,this);this.model.hdas.on("change:purged",function(e){this.model.fetch()},this);this.model.hdas.on("state:ready",function(f,g,e){if((!f.get("visible"))&&(!this.storage.get("show_hidden"))){this.removeHdaView(f.get("id"))}},this)},addHdaView:function(h){this.log("add."+this,h);var f=this;if(!h.isVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"))){return}$({}).queue([function g(j){var i=f.$el.find("#emptyHistoryMessage");if(i.is(":visible")){i.fadeOut(f.fxSpeed,j)}else{j()}},function e(j){f.scrollToTop();var i=f.$el.find("#"+f.model.get("id")+"-datasets");f.createHdaView(h).$el.hide().prependTo(i).slideDown(f.fxSpeed)}])},createHdaView:function(g){var f=g.get("id"),e=this.storage.get("expandedHdas").get(f),h=new this.HDAView({model:g,expanded:e,hasUser:this.model.hasUser(),logger:this.logger});this._setUpHdaListeners(h);this.hdaViews[f]=h;return h.render()},handleHdaDeletionChange:function(e){if(e.get("deleted")&&!this.storage.get("show_deleted")){this.removeHdaView(e.get("id"))}},handleHdaVisibleChange:function(e){if(e.hidden()&&!this.storage.get("show_hidden")){this.removeHdaView(e.get("id"))}},removeHdaView:function(g){var e=this,f=this.hdaViews[g];if(!f){return}f.$el.fadeOut(e.fxSpeed,function(){f.remove();delete e.hdaViews[g];if(_.isEmpty(e.hdaViews)){e.$el.find("#emptyHistoryMessage").fadeIn(e.fxSpeed)}})},render:function(g){var e=this,f;if(this.model){f=this.renderModel()}else{f=this.renderWithoutModel()}$(e).queue("fx",[function(h){if(e.$el.is(":visible")){e.$el.fadeOut(e.fxSpeed,h)}else{h()}},function(h){e.$el.empty();if(f){e.$el.append(f.children())}e.$el.fadeIn(e.fxSpeed,h)},function(h){e._setUpBehaviours();if(g){g.call(this)}}]);return this},renderModel:function(){var e=$("<div/>");e.append(c.templates.historyPanel(this.model.toJSON()));e.find("[title]").tooltip({placement:"bottom"});if(!this.model.hdas.length||!this.renderItems(e.find("#"+this.model.get("id")+"-datasets"))){e.find("#emptyHistoryMessage").show()}return e},renderWithoutModel:function(){var e=$("<div/>"),f=$("<div/>").attr("id","message-container").css({"margin-left":"4px","margin-right":"4px"});return e.append(f)},renderItems:function(f){this.hdaViews={};var e=this,g=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"));_.each(g,function(j){var i=j.get("id"),h=e.storage.get("expandedHdas").get(i);e.hdaViews[i]=new e.HDAView({model:j,expanded:h,hasUser:e.model.hasUser(),logger:e.logger});e._setUpHdaListeners(e.hdaViews[i]);f.prepend(e.hdaViews[i].render().$el)});return g.length},_setUpHdaListeners:function(f){var e=this;f.on("body-expanded",function(g){e.storage.get("expandedHdas").set(g,true)});f.on("body-collapsed",function(g){e.storage.get("expandedHdas").deleteKey(g)});f.on("error",function(h,j,g,i){e.errorHandler(h,j,g,i)})},_setUpBehaviours:function(){if(!this.model||!(this.model.get("user")&&this.model.get("user").email)){return}var e=this,f=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(f.is(":hidden")){f.slideDown(e.fxSpeed)}else{f.slideUp(e.fxSpeed)}return false});async_save_text("history-name-container","history-name",this.model.renameUrl(),"new_name",18);async_save_text("history-annotation-container","history-annotation",this.model.annotateUrl(),"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},collapseAllHdaBodies:function(){_.each(this.hdaViews,function(e){e.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},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")},loadAndDisplayTags:function(g){this.log(this+".loadAndDisplayTags",g);var e=this,h=this.$el.find("#history-tag-area"),f=h.find(".tag-elt");this.log("\t tagArea",h," tagElt",f);if(h.is(":hidden")){if(!jQuery.trim(f.html())){$.ajax({url:e.model.tagUrl(),error:function(k,j,i){e.log("Error loading tag area html",k,j,i);e.trigger("error",e,k,null,_l("Error loading tags"))},success:function(i){f.html(i);f.find("[title]").tooltip();h.slideDown(e.fxSpeed)}})}else{h.slideDown(e.fxSpeed)}}else{h.slideUp(e.fxSpeed)}return false},showLoadingIndicator:function(f,e,g){e=(e!==undefined)?(e):(this.fxSpeed);if(!this.indicator){this.indicator=new LoadingIndicator(this.$el,this.$el.parent())}if(!this.$el.is(":visible")){this.indicator.show(0,g)}else{this.$el.fadeOut(e);this.indicator.show(e,g)}},hideLoadingIndicator:function(e,f){e=(e!==undefined)?(e):(this.fxSpeed);if(this.indicator){this.indicator.hide(e,f)}},displayMessage:function(j,k,i){var g=this;this.scrollToTop();var h=this.$el.find("#message-container"),e=$("<div/>").addClass(j+"message").html(k);if(!_.isEmpty(i)){var f=$('<a href="javascript:void(0)">Details</a>').click(function(){Galaxy.modal.show(g.messageToModalOptions(j,k,i));return false});e.append(" ",f)}return h.html(e)},messageToModalOptions:function(i,k,h){var e=this,j=$("<div/>"),g={title:"Details"};function f(l){l=_.omit(l,_.functions(l));return["<table>",_.map(l,function(n,m){n=(_.isObject(n))?(f(n)):(n);return'<tr><td style="vertical-align: top; color: grey">'+m+'</td><td style="padding-left: 8px">'+n+"</td></tr>"}).join(""),"</table>"].join("")}if(_.isObject(h)){g.body=j.append(f(h))}else{g.body=j.html(h)}g.buttons={Ok:function(){Galaxy.modal.hide();e.clearMessages()}};return g},clearMessages:function(){var e=this.$el.find("#message-container");e.empty()},scrollPosition:function(){return this.$el.parent().scrollTop()},scrollTo:function(e){this.$el.parent().scrollTop(e)},scrollToTop:function(){this.$el.parent().scrollTop(0);return this},scrollIntoView:function(f,g){if(!g){this.$el.parent().parent().scrollTop(f);return this}var e=window,h=this.$el.parent().parent(),j=$(e).innerHeight(),i=(j/2)-(g/2);$(h).scrollTop(f-i);return this},scrollToId:function(f){if((!f)||(!this.hdaViews[f])){return this}var e=this.hdaViews[f].$el;this.scrollIntoView(e.offset().top,e.outerHeight());return this},scrollToHid:function(e){var f=this.model.hdas.getByHid(e);if(!f){return this}return this.scrollToId(f.id)},connectToQuotaMeter:function(e){if(!e){return this}this.listenTo(e,"quota:over",this.showQuotaMessage);this.listenTo(e,"quota:under",this.hideQuotaMessage);this.on("rendered rendered:initial",function(){if(e&&e.isOverQuota()){this.showQuotaMessage()}});return this},showQuotaMessage:function(){var e=this.$el.find("#quota-message-container");if(e.is(":hidden")){e.slideDown(this.fxSpeed)}},hideQuotaMessage:function(){var e=this.$el.find("#quota-message-container");if(!e.is(":hidden")){e.slideUp(this.fxSpeed)}},connectToOptionsMenu:function(e){if(!e){return this}this.on("new-storage",function(g,f){if(e&&g){e.findItemByHtml(_l("Include Deleted Datasets")).checked=g.get("show_deleted");e.findItemByHtml(_l("Include Hidden Datasets")).checked=g.get("show_hidden")}});return this},toString:function(){return"HistoryPanel("+((this.model)?(this.model.get("name")):(""))+")"}});c.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};return{HistoryPanel:c}});
\ No newline at end of file
+define(["mvc/history/history-model","mvc/dataset/hda-base","mvc/dataset/hda-edit"],function(d,b,a){var c=Backbone.View.extend(LoggableMixin).extend({HDAView:a.HDAEditView,tagName:"div",className:"history-panel",fxSpeed:300,events:{"click #history-tag":"loadAndDisplayTags","click #message-container":"clearMessages"},initialize:function(e){e=e||{};if(e.logger){this.logger=e.logger}this.log(this+".initialize:",e);this._setUpListeners();this.hdaViews={};this.urls={};this.indicator=new LoadingIndicator(this.$el);if(this.model){this._setUpWebStorage(e.initiallyExpanded,e.show_deleted,e.show_hidden);this._setUpModelEventHandlers()}if(e.onready){e.onready.call(this)}},_setUpListeners:function(){this.on("error",function(f,i,e,h,g){this.errorHandler(f,i,e,h,g)});this.on("loading-history",function(){this.showLoadingIndicator()});this.on("loading-done",function(){this.hideLoadingIndicator()});this.once("rendered",function(){this.trigger("rendered:initial",this);return false});this.on("switched-history current-history new-history",function(){if(_.isEmpty(this.hdaViews)){this.trigger("empty-history",this)}});if(this.logger){this.on("all",function(e){this.log(this+"",arguments)},this)}},errorHandler:function(g,j,f,i,h){var e=this._parseErrorMessage(g,j,f,i,h);if(j&&j.status===0&&j.readyState===0){}else{if(j&&j.status===502){}else{if(!this.$el.find("#message-container").is(":visible")){this.once("rendered",function(){this.displayMessage("error",e.message,e.details)})}else{this.displayMessage("error",e.message,e.details)}}}},_parseErrorMessage:function(h,l,g,k,j){var f=Galaxy.currUser,e={message:this._bePolite(k),details:{user:(f instanceof User)?(f.toJSON()):(f+""),source:(h instanceof Backbone.Model)?(h.toJSON()):(h+""),xhr:l,options:(l)?(_.omit(g,"xhr")):(g)}};_.extend(e.details,j||{});if(l&&_.isFunction(l.getAllResponseHeaders)){var i=l.getAllResponseHeaders();i=_.compact(i.split("\n"));i=_.map(i,function(m){return m.split(": ")});e.details.xhr.responseHeaders=_.object(i)}return e},_bePolite:function(e){e=e||_l("An error occurred while getting updates from the server");return e+". "+_l("Please contact a Galaxy administrator if the problem persists.")},_loadHistoryFromXHR:function(g,f){var e=this;g.then(function(h,i){e.setModel(h,i,f)});g.fail(function(i,h){e.render()});return g},setModel:function(g,e,f){f=f||{};if(this.model){this.model.clearUpdateTimeout();this.stopListening(this.model);this.stopListening(this.model.hdas)}this.hdaViews={};if(Galaxy&&Galaxy.currUser){g.user=Galaxy.currUser.toJSON()}this.model=new d.History(g,e,f);this._setUpWebStorage(f.initiallyExpanded,f.show_deleted,f.show_hidden);this._setUpModelEventHandlers();this.trigger("new-model",this);this.render();return this},loadHistory:function(h,g,f,k,i){this.trigger("loading-history",this);g=g||{};var e=this;var j=d.History.getHistoryData(h,{historyFn:f,hdaFn:k,hdaDetailIds:g.initiallyExpanded||i});return this._loadHistoryFromXHR(j,g).fail(function(n,l,m){e.trigger("error",e,n,g,_l("An error was encountered while "+l),{historyId:h,history:m||{}})}).always(function(){e.trigger("loading-done",e)})},loadHistoryWithHDADetails:function(h,g,f,j){var e=this,i=function(k){return e.getExpandedHdaIds(k.id)};return this.loadHistory(h,g,f,j,i)},switchToHistory:function(h,g){var e=this,f=function(){return jQuery.post("/api/histories/"+h+"/set_as_current")};return this.loadHistoryWithHDADetails(h,g,f).then(function(j,i){e.trigger("switched-history",e)})},loadCurrentHistory:function(f){var e=this;return this.loadHistoryWithHDADetails("current",f).then(function(h,g){e.trigger("current-history",e)})},createNewHistory:function(g){var e=this,f=function(){return jQuery.post("/api/histories",{current:true})};return this.loadHistory(undefined,g,f).then(function(i,h){e.trigger("new-history",e)})},refreshHdas:function(f,e){if(this.model){return this.model.refresh(f,e)}return $.when()},_getStorageKey:function(e){if(!e){throw new Error("_getStorageKey needs valid id: "+e)}return("history:"+e)},_setUpWebStorage:function(f,e,g){this.storage=new PersistentStorage(this._getStorageKey(this.model.get("id")),{expandedHdas:{},show_deleted:false,show_hidden:false});this.log(this+" (prev) storage:",JSON.stringify(this.storage.get(),null,2));if(f){this.storage.set("exandedHdas",f)}if((e===true)||(e===false)){this.storage.set("show_deleted",e)}if((g===true)||(g===false)){this.storage.set("show_hidden",g)}this.show_deleted=this.storage.get("show_deleted");this.show_hidden=this.storage.get("show_hidden");this.trigger("new-storage",this.storage,this);this.log(this+" (init'd) storage:",this.storage.get())},clearWebStorage:function(){for(var e in sessionStorage){if(e.indexOf("HistoryView.")===0){sessionStorage.removeItem(e)}}},getStoredOptions:function(f){if(!f||f==="current"){return(this.storage)?(this.storage.get()):({})}var e=sessionStorage.getItem(this._getStorageKey(f));return(e===null)?({}):(JSON.parse(e))},getExpandedHdaIds:function(e){var f=this.getStoredOptions(e).expandedHdas;return((_.isEmpty(f))?([]):(_.keys(f)))},_setUpModelEventHandlers:function(){this.model.on("error error:hdas",function(f,h,e,g){this.errorHandler(f,h,e,g)},this);this.model.on("change:nice_size",this.updateHistoryDiskSize,this);if(Galaxy&&Galaxy.quotaMeter){this.listenTo(this.model,"change:nice_size",function(){Galaxy.quotaMeter.update()})}this.model.hdas.on("add",this.addHdaView,this);this.model.hdas.on("change:deleted",this.handleHdaDeletionChange,this);this.model.hdas.on("change:visible",this.handleHdaVisibleChange,this);this.model.hdas.on("change:purged",function(e){this.model.fetch()},this);this.model.hdas.on("state:ready",function(f,g,e){if((!f.get("visible"))&&(!this.storage.get("show_hidden"))){this.removeHdaView(f.get("id"))}},this)},addHdaView:function(h){this.log("add."+this,h);var f=this;if(!h.isVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"))){return}$({}).queue([function g(j){var i=f.$el.find("#emptyHistoryMessage");if(i.is(":visible")){i.fadeOut(f.fxSpeed,j)}else{j()}},function e(j){f.scrollToTop();var i=f.$el.find("#"+f.model.get("id")+"-datasets");f.createHdaView(h).$el.hide().prependTo(i).slideDown(f.fxSpeed)}])},createHdaView:function(g){var f=g.get("id"),e=this.storage.get("expandedHdas").get(f),h=new this.HDAView({model:g,expanded:e,hasUser:this.model.hasUser(),logger:this.logger});this._setUpHdaListeners(h);this.hdaViews[f]=h;return h.render()},handleHdaDeletionChange:function(e){if(e.get("deleted")&&!this.storage.get("show_deleted")){this.removeHdaView(e.get("id"))}},handleHdaVisibleChange:function(e){if(e.hidden()&&!this.storage.get("show_hidden")){this.removeHdaView(e.get("id"))}},removeHdaView:function(g){var e=this,f=this.hdaViews[g];if(!f){return}f.$el.fadeOut(e.fxSpeed,function(){f.remove();delete e.hdaViews[g];if(_.isEmpty(e.hdaViews)){e.$el.find("#emptyHistoryMessage").fadeIn(e.fxSpeed)}})},render:function(g){var e=this,f;if(this.model){f=this.renderModel()}else{f=this.renderWithoutModel()}$(e).queue("fx",[function(h){if(e.$el.is(":visible")){e.$el.fadeOut(e.fxSpeed,h)}else{h()}},function(h){e.$el.empty();if(f){e.$el.append(f.children())}e.$el.fadeIn(e.fxSpeed,h)},function(h){e._setUpBehaviours();if(g){g.call(this)}}]);return this},renderModel:function(){var e=$("<div/>");e.append(c.templates.historyPanel(this.model.toJSON()));e.find("[title]").tooltip({placement:"bottom"});if(!this.model.hdas.length||!this.renderItems(e.find("#"+this.model.get("id")+"-datasets"))){e.find("#emptyHistoryMessage").show()}return e},renderWithoutModel:function(){var e=$("<div/>"),f=$("<div/>").attr("id","message-container").css({"margin-left":"4px","margin-right":"4px"});return e.append(f)},renderItems:function(f){this.hdaViews={};var e=this,g=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"));_.each(g,function(j){var i=j.get("id"),h=e.storage.get("expandedHdas").get(i);e.hdaViews[i]=new e.HDAView({model:j,expanded:h,hasUser:e.model.hasUser(),logger:e.logger});e._setUpHdaListeners(e.hdaViews[i]);f.prepend(e.hdaViews[i].render().$el)});return g.length},_setUpHdaListeners:function(f){var e=this;f.on("body-expanded",function(g){e.storage.get("expandedHdas").set(g,true)});f.on("body-collapsed",function(g){e.storage.get("expandedHdas").deleteKey(g)});f.on("error",function(h,j,g,i){e.errorHandler(h,j,g,i)})},_setUpBehaviours:function(){if(!this.model||!(this.model.get("user")&&this.model.get("user").email)){return}var e=this,f=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(f.is(":hidden")){f.slideDown(e.fxSpeed)}else{f.slideUp(e.fxSpeed)}return false});async_save_text("history-name-container","history-name",this.model.renameUrl(),"new_name",18);async_save_text("history-annotation-container","history-annotation",this.model.annotateUrl(),"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},collapseAllHdaBodies:function(){_.each(this.hdaViews,function(e){e.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},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")},loadAndDisplayTags:function(g){this.log(this+".loadAndDisplayTags",g);var e=this,h=this.$el.find("#history-tag-area"),f=h.find(".tag-elt");this.log("\t tagArea",h," tagElt",f);if(h.is(":hidden")){if(!jQuery.trim(f.html())){$.ajax({url:e.model.tagUrl(),error:function(k,j,i){e.log("Error loading tag area html",k,j,i);e.trigger("error",e,k,null,_l("Error loading tags"))},success:function(i){f.html(i);f.find("[title]").tooltip();h.slideDown(e.fxSpeed)}})}else{h.slideDown(e.fxSpeed)}}else{h.slideUp(e.fxSpeed)}return false},showLoadingIndicator:function(f,e,g){e=(e!==undefined)?(e):(this.fxSpeed);if(!this.indicator){this.indicator=new LoadingIndicator(this.$el,this.$el.parent())}if(!this.$el.is(":visible")){this.indicator.show(0,g)}else{this.$el.fadeOut(e);this.indicator.show(e,g)}},hideLoadingIndicator:function(e,f){e=(e!==undefined)?(e):(this.fxSpeed);if(this.indicator){this.indicator.hide(e,f)}},displayMessage:function(j,k,i){var g=this;this.scrollToTop();var h=this.$el.find("#message-container"),e=$("<div/>").addClass(j+"message").html(k);if(!_.isEmpty(i)){var f=$('<a href="javascript:void(0)">Details</a>').click(function(){Galaxy.modal.show(g.messageToModalOptions(j,k,i));return false});e.append(" ",f)}return h.html(e)},messageToModalOptions:function(i,k,h){var e=this,j=$("<div/>"),g={title:"Details"};function f(l){l=_.omit(l,_.functions(l));return["<table>",_.map(l,function(n,m){n=(_.isObject(n))?(f(n)):(n);return'<tr><td style="vertical-align: top; color: grey">'+m+'</td><td style="padding-left: 8px">'+n+"</td></tr>"}).join(""),"</table>"].join("")}if(_.isObject(h)){g.body=j.append(f(h))}else{g.body=j.html(h)}g.buttons={Ok:function(){Galaxy.modal.hide();e.clearMessages()}};return g},clearMessages:function(){var e=this.$el.find("#message-container");e.empty()},scrollPosition:function(){return this.$el.parent().scrollTop()},scrollTo:function(e){this.$el.parent().scrollTop(e)},scrollToTop:function(){this.$el.parent().scrollTop(0);return this},scrollIntoView:function(f,g){if(!g){this.$el.parent().parent().scrollTop(f);return this}var e=window,h=this.$el.parent().parent(),j=$(e).innerHeight(),i=(j/2)-(g/2);$(h).scrollTop(f-i);return this},scrollToId:function(f){if((!f)||(!this.hdaViews[f])){return this}var e=this.hdaViews[f].$el;this.scrollIntoView(e.offset().top,e.outerHeight());return this},scrollToHid:function(e){var f=this.model.hdas.getByHid(e);if(!f){return this}return this.scrollToId(f.id)},connectToQuotaMeter:function(e){if(!e){return this}this.listenTo(e,"quota:over",this.showQuotaMessage);this.listenTo(e,"quota:under",this.hideQuotaMessage);this.on("rendered rendered:initial",function(){if(e&&e.isOverQuota()){this.showQuotaMessage()}});return this},showQuotaMessage:function(){var e=this.$el.find("#quota-message-container");if(e.is(":hidden")){e.slideDown(this.fxSpeed)}},hideQuotaMessage:function(){var e=this.$el.find("#quota-message-container");if(!e.is(":hidden")){e.slideUp(this.fxSpeed)}},connectToOptionsMenu:function(e){if(!e){return this}this.on("new-storage",function(g,f){if(e&&g){e.findItemByHtml(_l("Include Deleted Datasets")).checked=g.get("show_deleted");e.findItemByHtml(_l("Include Hidden Datasets")).checked=g.get("show_hidden")}});return this},toString:function(){return"HistoryPanel("+((this.model)?(this.model.get("name")):(""))+")"}});c.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};return{HistoryPanel:c}});
\ No newline at end of file
diff -r c0bf145241e7735cd1c7a9dddab44d984425695f -r 8bc80aa53e81d9362e08ead0a0307cd3af0dd8aa static/scripts/packed/templates/compiled/history-templates.js
--- a/static/scripts/packed/templates/compiled/history-templates.js
+++ b/static/scripts/packed/templates/compiled/history-templates.js
@@ -1,1 +1,1 @@
-Handlebars.registerPartial("clearFloatDiv",function(a){return'<div class="clear"></div>'});Handlebars.registerHelper("warningmessagesmall",function(a){return'<div class="warningmessagesmall"><strong>'+a.fn(this)+"</strong></div>"});Handlebars.registerHelper("local",function(a){return _l(a.fn(this))});(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-annotationArea"]=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,p,h="function",j=this.escapeExpression,o=this,n=f.blockHelperMissing;function e(r,q){return"Annotation"}function c(r,q){return"Edit dataset annotation"}i+='\n<div id="';if(d=f.id){d=d.call(m,{hash:{},data:k})}else{d=m.id;d=typeof d===h?d.apply(m):d}i+=j(d)+'-annotation-area" class="annotation-area" style="display: none;">\n <strong>';p={hash:{},inverse:o.noop,fn:o.program(1,e,k),data:k};if(d=f.local){d=d.call(m,p)}else{d=m.local;d=typeof d===h?d.apply(m):d}if(!f.local){d=n.call(m,d,p)}if(d||d===0){i+=d}i+=':</strong>\n <div id="';if(d=f.id){d=d.call(m,{hash:{},data:k})}else{d=m.id;d=typeof d===h?d.apply(m):d}i+=j(d)+'-anotation-elt" class="annotation-elt editable-text"\n style="margin: 1px 0px 1px 0px" title="';p={hash:{},inverse:o.noop,fn:o.program(3,c,k),data:k};if(d=f.local){d=d.call(m,p)}else{d=m.local;d=typeof d===h?d.apply(m):d}if(!f.local){d=n.call(m,d,p)}if(d||d===0){i+=d}i+='">\n </div>\n</div>';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-displayApps"]=b(function(h,m,g,l,k){this.compilerInfo=[4,">= 1.0.0"];g=this.merge(g,h.helpers);k=k||{};var d,i="function",j=this.escapeExpression,o=this,n=g.blockHelperMissing;function f(s,r){var p="",q;p+="\n ";if(q=g.label){q=q.call(s,{hash:{},data:r})}else{q=s.label;q=typeof q===i?q.apply(s):q}p+=j(q)+"\n ";q=g.each.call(s,s.links,{hash:{},inverse:o.noop,fn:o.program(2,e,r),data:r});if(q||q===0){p+=q}p+="\n <br />\n";return p}function e(t,s){var p="",r,q;p+='\n <a target="';if(r=g.target){r=r.call(t,{hash:{},data:s})}else{r=t.target;r=typeof r===i?r.apply(t):r}p+=j(r)+'" href="';if(r=g.href){r=r.call(t,{hash:{},data:s})}else{r=t.href;r=typeof r===i?r.apply(t):r}p+=j(r)+'">';q={hash:{},inverse:o.noop,fn:o.program(3,c,s),data:s};if(r=g.local){r=r.call(t,q)}else{r=t.local;r=typeof r===i?r.apply(t):r}if(!g.local){r=n.call(t,r,q)}if(r||r===0){p+=r}p+="</a>\n ";return p}function c(r,q){var p;if(p=g.text){p=p.call(r,{hash:{},data:q})}else{p=r.text;p=typeof p===i?p.apply(r):p}return j(p)}d=g.each.call(m,m.displayApps,{hash:{},inverse:o.noop,fn:o.program(1,f,k),data:k});if(d||d===0){return d}else{return""}})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-downloadLinks"]=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var c,s,h="function",i=this.escapeExpression,q=this,m=f.blockHelperMissing;function e(y,x){var t="",w,v,u;t+='\n<div popupmenu="dataset-';if(w=f.id){w=w.call(y,{hash:{},data:x})}else{w=y.id;w=typeof w===h?w.apply(y):w}t+=i(w)+'-popup">\n <a class="action-button" href="'+i(((w=((w=y.urls),w==null||w===false?w:w.download)),typeof w===h?w.apply(y):w))+'">';u={hash:{},inverse:q.noop,fn:q.program(2,d,x),data:x};if(v=f.local){v=v.call(y,u)}else{v=y.local;v=typeof v===h?v.apply(y):v}if(!f.local){v=m.call(y,v,u)}if(v||v===0){t+=v}t+="</a>\n <a>";u={hash:{},inverse:q.noop,fn:q.program(4,r,x),data:x};if(v=f.local){v=v.call(y,u)}else{v=y.local;v=typeof v===h?v.apply(y):v}if(!f.local){v=m.call(y,v,u)}if(v||v===0){t+=v}t+="</a>\n ";v=f.each.call(y,((w=y.urls),w==null||w===false?w:w.meta_download),{hash:{},inverse:q.noop,fn:q.program(6,p,x),data:x});if(v||v===0){t+=v}t+='\n</div>\n<div style="float:left;" class="menubutton split popup" id="dataset-';if(v=f.id){v=v.call(y,{hash:{},data:x})}else{v=y.id;v=typeof v===h?v.apply(y):v}t+=i(v)+'-popup">\n <a href="'+i(((w=((w=y.urls),w==null||w===false?w:w.download)),typeof w===h?w.apply(y):w))+'" title="';u={hash:{},inverse:q.noop,fn:q.program(7,o,x),data:x};if(v=f.local){v=v.call(y,u)}else{v=y.local;v=typeof v===h?v.apply(y):v}if(!f.local){v=m.call(y,v,u)}if(v||v===0){t+=v}t+='" class="icon-button disk"></a>\n</div>\n';return t}function d(u,t){return"Download Dataset"}function r(u,t){return"Additional Files"}function p(x,w){var t="",v,u;t+='\n <a class="action-button" href="';if(v=f.url){v=v.call(x,{hash:{},data:w})}else{v=x.url;v=typeof v===h?v.apply(x):v}t+=i(v)+'">';u={hash:{},inverse:q.noop,fn:q.program(7,o,w),data:w};if(v=f.local){v=v.call(x,u)}else{v=x.local;v=typeof v===h?v.apply(x):v}if(!f.local){v=m.call(x,v,u)}if(v||v===0){t+=v}t+=" ";if(v=f.file_type){v=v.call(x,{hash:{},data:w})}else{v=x.file_type;v=typeof v===h?v.apply(x):v}t+=i(v)+"</a>\n ";return t}function o(u,t){return"Download"}function n(y,x){var t="",w,v,u;t+='\n\n<a href="'+i(((w=((w=y.urls),w==null||w===false?w:w.download)),typeof w===h?w.apply(y):w))+'" title="';u={hash:{},inverse:q.noop,fn:q.program(7,o,x),data:x};if(v=f.local){v=v.call(y,u)}else{v=y.local;v=typeof v===h?v.apply(y):v}if(!f.local){v=m.call(y,v,u)}if(v||v===0){t+=v}t+='" class="icon-button disk"></a>\n';return t}s=f["if"].call(l,((c=l.urls),c==null||c===false?c:c.meta_download),{hash:{},inverse:q.program(9,n,j),fn:q.program(1,e,j),data:j});if(s||s===0){return s}else{return""}})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-failedMetadata"]=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var c,o,n=this,h="function",m=f.blockHelperMissing,i=this.escapeExpression;function e(t,s){var p="",r,q;p+="\n";q={hash:{},inverse:n.noop,fn:n.program(2,d,s),data:s};if(r=f.local){r=r.call(t,q)}else{r=t.local;r=typeof r===h?r.apply(t):r}if(!f.local){r=m.call(t,r,q)}if(r||r===0){p+=r}p+='\nYou may be able to <a href="'+i(((r=((r=t.urls),r==null||r===false?r:r.edit)),typeof r===h?r.apply(t):r))+'" target="galaxy_main">set it manually or retry auto-detection</a>.\n';return p}function d(q,p){return"An error occurred setting the metadata for this dataset."}o={hash:{},inverse:n.noop,fn:n.program(1,e,j),data:j};if(c=f.warningmessagesmall){c=c.call(l,o)}else{c=l.warningmessagesmall;c=typeof c===h?c.apply(l):c}if(!f.warningmessagesmall){c=m.call(l,c,o)}if(c||c===0){return c}else{return""}})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-hdaSummary"]=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,s,h="function",j=this.escapeExpression,r=this,n=f.blockHelperMissing;function e(u,t){return"format: "}function c(u,t){return"database: "}function q(x,w){var t="",v,u;t+='\n <a class="metadata-dbkey" href="'+j(((v=((v=x.urls),v==null||v===false?v:v.edit)),typeof v===h?v.apply(x):v))+'" target="galaxy_main">';if(u=f.metadata_dbkey){u=u.call(x,{hash:{},data:w})}else{u=x.metadata_dbkey;u=typeof u===h?u.apply(x):u}t+=j(u)+"</a>\n ";return t}function p(w,v){var t="",u;t+='\n <span class="metadata-dbkey ';if(u=f.metadata_dbkey){u=u.call(w,{hash:{},data:v})}else{u=w.metadata_dbkey;u=typeof u===h?u.apply(w):u}t+=j(u)+'">';if(u=f.metadata_dbkey){u=u.call(w,{hash:{},data:v})}else{u=w.metadata_dbkey;u=typeof u===h?u.apply(w):u}t+=j(u)+"</span>\n ";return t}function o(w,v){var t="",u;t+='\n<div class="hda-info"> ';if(u=f.misc_info){u=u.call(w,{hash:{},data:v})}else{u=w.misc_info;u=typeof u===h?u.apply(w):u}t+=j(u)+" </div>\n";return t}i+='<div class="hda-summary">\n ';if(d=f.misc_blurb){d=d.call(m,{hash:{},data:k})}else{d=m.misc_blurb;d=typeof d===h?d.apply(m):d}i+=j(d)+"<br />\n ";s={hash:{},inverse:r.noop,fn:r.program(1,e,k),data:k};if(d=f.local){d=d.call(m,s)}else{d=m.local;d=typeof d===h?d.apply(m):d}if(!f.local){d=n.call(m,d,s)}if(d||d===0){i+=d}i+='<span class="';if(d=f.data_type){d=d.call(m,{hash:{},data:k})}else{d=m.data_type;d=typeof d===h?d.apply(m):d}i+=j(d)+'">';if(d=f.data_type){d=d.call(m,{hash:{},data:k})}else{d=m.data_type;d=typeof d===h?d.apply(m):d}i+=j(d)+"</span>,\n ";s={hash:{},inverse:r.noop,fn:r.program(3,c,k),data:k};if(d=f.local){d=d.call(m,s)}else{d=m.local;d=typeof d===h?d.apply(m):d}if(!f.local){d=n.call(m,d,s)}if(d||d===0){i+=d}i+="\n ";d=f["if"].call(m,m.dbkey_unknown_and_editable,{hash:{},inverse:r.program(7,p,k),fn:r.program(5,q,k),data:k});if(d||d===0){i+=d}i+="\n</div>\n";d=f["if"].call(m,m.misc_info,{hash:{},inverse:r.noop,fn:r.program(9,o,k),data:k});if(d||d===0){i+=d}return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-tagArea"]=b(function(f,k,e,j,i){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,f.helpers);i=i||{};var h="",c,n,m=this,g="function",l=e.blockHelperMissing;function d(p,o){return"Tags"}h+='\n<div class="tag-area" style="display: none;">\n <strong>';n={hash:{},inverse:m.noop,fn:m.program(1,d,i),data:i};if(c=e.local){c=c.call(k,n)}else{c=k.local;c=typeof c===g?c.apply(k):c}if(!e.local){c=l.call(k,c,n)}if(c||c===0){h+=c}h+=':</strong>\n <div class="tag-elt">\n </div>\n</div>';return h})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-titleLink"]=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='<span class="historyItemTitle">';if(c=d.hid){c=c.call(k,{hash:{},data:i})}else{c=k.hid;c=typeof c===f?c.apply(k):c}g+=h(c)+": ";if(c=d.name){c=c.call(k,{hash:{},data:i})}else{c=k.name;c=typeof c===f?c.apply(k):c}g+=h(c)+"</span>";return g})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-warning-messages"]=b(function(h,u,s,n,C){this.compilerInfo=[4,">= 1.0.0"];s=this.merge(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})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(m,C,A,s,J){this.compilerInfo=[4,">= 1.0.0"];A=this.merge(A,m.helpers);J=J||{};var B="",p,l,h,x=this,e="function",c=A.blockHelperMissing,d=this.escapeExpression;function v(O,N){var K="",M,L;K+='\n <div id="history-name" class="editable-text"\n title="';L={hash:{},inverse:x.noop,fn:x.program(2,u,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='">';if(M=A.name){M=M.call(O,{hash:{},data:N})}else{M=O.name;M=typeof M===e?M.apply(O):M}K+=d(M)+"</div>\n ";return K}function u(L,K){return"Click to rename history"}function t(O,N){var K="",M,L;K+='\n <div id="history-name"\n title="';L={hash:{},inverse:x.noop,fn:x.program(5,r,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='">';if(M=A.name){M=M.call(O,{hash:{},data:N})}else{M=O.name;M=typeof M===e?M.apply(O):M}K+=d(M)+"</div>\n ";return K}function r(L,K){return"You must be logged in to edit your history name"}function q(O,N){var K="",M,L;K+='\n <a id="history-tag" title="';L={hash:{},inverse:x.noop,fn:x.program(8,o,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='"\n class="icon-button tags" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';L={hash:{},inverse:x.noop,fn:x.program(10,I,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='"\n class="icon-button annotate" target="galaxy_main" href="javascript:void(0)"></a>\n ';return K}function o(L,K){return"Edit history tags"}function I(L,K){return"Edit history annotation"}function H(O,N){var K="",M,L;K+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>';L={hash:{},inverse:x.noop,fn:x.program(13,G,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+=':</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>';L={hash:{},inverse:x.noop,fn:x.program(15,F,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+=':</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="editable-text"\n title="';L={hash:{},inverse:x.noop,fn:x.program(17,E,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='">\n ';M=A["if"].call(O,O.annotation,{hash:{},inverse:x.program(21,n,N),fn:x.program(19,D,N),data:N});if(M||M===0){K+=M}K+="\n </div>\n </div>\n </div>\n </div>\n ";return K}function G(L,K){return"Tags"}function F(L,K){return"Annotation"}function E(L,K){return"Click to edit annotation"}function D(N,M){var K="",L;K+="\n ";if(L=A.annotation){L=L.call(N,{hash:{},data:M})}else{L=N.annotation;L=typeof L===e?L.apply(N):L}K+=d(L)+"\n ";return K}function n(O,N){var K="",M,L;K+="\n <em>";L={hash:{},inverse:x.noop,fn:x.program(22,k,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+="</em>\n ";return K}function k(L,K){return"Describe or add notes to history"}function j(O,N){var K="",M,L;K+="\n ";L={hash:{},inverse:x.noop,fn:x.program(25,i,N),data:N};if(M=A.warningmessagesmall){M=M.call(O,L)}else{M=O.warningmessagesmall;M=typeof M===e?M.apply(O):M}if(!A.warningmessagesmall){M=c.call(O,M,L)}if(M||M===0){K+=M}K+="\n ";return K}function i(N,M){var L,K;K={hash:{},inverse:x.noop,fn:x.program(26,g,M),data:M};if(L=A.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!A.local){L=c.call(N,L,K)}if(L||L===0){return L}else{return""}}function g(L,K){return"You are currently viewing a deleted history!"}function f(N,M){var K="",L;K+='\n <div class="';if(L=A.status){L=L.call(N,{hash:{},data:M})}else{L=N.status;L=typeof L===e?L.apply(N):L}K+=d(L)+'message">';if(L=A.message){L=L.call(N,{hash:{},data:M})}else{L=N.message;L=typeof L===e?L.apply(N):L}K+=d(L)+"</div>\n ";return K}function z(L,K){return"You are over your disk quota"}function y(L,K){return"Tool execution is on hold until your disk usage drops below your allocated quota"}function w(L,K){return"Your history is empty. Click 'Get Data' on the left pane to start"}B+='<div id="history-controls">\n\n <div id="history-title-area" class="historyLinks">\n \n <div id="history-name-container">\n \n ';l=A["if"].call(C,((p=C.user),p==null||p===false?p:p.email),{hash:{},inverse:x.program(4,t,J),fn:x.program(1,v,J),data:J});if(l||l===0){B+=l}B+='\n </div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';if(l=A.nice_size){l=l.call(C,{hash:{},data:J})}else{l=C.nice_size;l=typeof l===e?l.apply(C):l}B+=d(l)+'</div>\n\n <div id="history-secondary-links" style="float: right;">\n ';l=A["if"].call(C,((p=C.user),p==null||p===false?p:p.email),{hash:{},inverse:x.noop,fn:x.program(7,q,J),data:J});if(l||l===0){B+=l}B+='\n </div>\n <div style="clear: both;"></div>\n </div>\n\n \n \n ';l=A["if"].call(C,((p=C.user),p==null||p===false?p:p.email),{hash:{},inverse:x.noop,fn:x.program(12,H,J),data:J});if(l||l===0){B+=l}B+="\n\n ";l=A["if"].call(C,C.deleted,{hash:{},inverse:x.noop,fn:x.program(24,j,J),data:J});if(l||l===0){B+=l}B+='\n\n <div id="message-container">\n ';l=A["if"].call(C,C.message,{hash:{},inverse:x.noop,fn:x.program(28,f,J),data:J});if(l||l===0){B+=l}B+='\n </div>\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n ';h={hash:{},inverse:x.noop,fn:x.program(30,z,J),data:J};if(l=A.local){l=l.call(C,h)}else{l=C.local;l=typeof l===e?l.apply(C):l}if(!A.local){l=c.call(C,l,h)}if(l||l===0){B+=l}B+=".\n ";h={hash:{},inverse:x.noop,fn:x.program(32,y,J),data:J};if(l=A.local){l=l.call(C,h)}else{l=C.local;l=typeof l===e?l.apply(C):l}if(!A.local){l=c.call(C,l,h)}if(l||l===0){B+=l}B+='.\n </div>\n </div>\n</div>\n\n<div id="';if(l=A.id){l=l.call(C,{hash:{},data:J})}else{l=C.id;l=typeof l===e?l.apply(C):l}B+=d(l)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';h={hash:{},inverse:x.noop,fn:x.program(34,w,J),data:J};if(l=A.local){l=l.call(C,h)}else{l=C.local;l=typeof l===e?l.apply(C):l}if(!A.local){l=c.call(C,l,h)}if(l||l===0){B+=l}B+="\n</div>";return B})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-iconButton"]=b(function(i,j,g,e,h){this.compilerInfo=[4,">= 1.0.0"];g=this.merge(g,i.helpers);e=this.merge(e,i.partials);h=h||{};var c="",f,d=this;c+="\n";f=d.invokePartial(e.iconButton,"iconButton",j,g,e,h);if(f||f===0){c+=f}return c})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-warningmessagesmall"]=b(function(i,j,f,d,g){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,i.helpers);g=g||{};var c="",e,h="function";c+=' \n <div class="warningmessagesmall"><strong>';if(e=f.warning){e=e.call(j,{hash:{},data:g})}else{e=j.warning;e=typeof e===h?e.apply(j):e}if(e||e===0){c+=e}c+="</strong></div>";return c})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(m,C,A,s,J){this.compilerInfo=[4,">= 1.0.0"];A=this.merge(A,m.helpers);J=J||{};var B="",p,l,h,x=this,e="function",c=A.blockHelperMissing,d=this.escapeExpression;function v(O,N){var K="",M,L;K+='\n <div id="history-name" class="editable-text"\n title="';L={hash:{},inverse:x.noop,fn:x.program(2,u,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='">';if(M=A.name){M=M.call(O,{hash:{},data:N})}else{M=O.name;M=typeof M===e?M.apply(O):M}K+=d(M)+"</div>\n ";return K}function u(L,K){return"Click to rename history"}function t(O,N){var K="",M,L;K+='\n <div id="history-name"\n title="';L={hash:{},inverse:x.noop,fn:x.program(5,r,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='">';if(M=A.name){M=M.call(O,{hash:{},data:N})}else{M=O.name;M=typeof M===e?M.apply(O):M}K+=d(M)+"</div>\n ";return K}function r(L,K){return"You must be logged in to edit your history name"}function q(O,N){var K="",M,L;K+='\n <a id="history-tag" title="';L={hash:{},inverse:x.noop,fn:x.program(8,o,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='"\n class="icon-button tags" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';L={hash:{},inverse:x.noop,fn:x.program(10,I,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='"\n class="icon-button annotate" target="galaxy_main" href="javascript:void(0)"></a>\n ';return K}function o(L,K){return"Edit history tags"}function I(L,K){return"Edit history annotation"}function H(O,N){var K="",M,L;K+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>';L={hash:{},inverse:x.noop,fn:x.program(13,G,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+=':</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>';L={hash:{},inverse:x.noop,fn:x.program(15,F,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+=':</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="editable-text"\n title="';L={hash:{},inverse:x.noop,fn:x.program(17,E,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='">\n ';M=A["if"].call(O,O.annotation,{hash:{},inverse:x.program(21,n,N),fn:x.program(19,D,N),data:N});if(M||M===0){K+=M}K+="\n </div>\n </div>\n </div>\n </div>\n ";return K}function G(L,K){return"Tags"}function F(L,K){return"Annotation"}function E(L,K){return"Click to edit annotation"}function D(N,M){var K="",L;K+="\n ";if(L=A.annotation){L=L.call(N,{hash:{},data:M})}else{L=N.annotation;L=typeof L===e?L.apply(N):L}K+=d(L)+"\n ";return K}function n(O,N){var K="",M,L;K+="\n <em>";L={hash:{},inverse:x.noop,fn:x.program(22,k,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+="</em>\n ";return K}function k(L,K){return"Describe or add notes to history"}function j(O,N){var K="",M,L;K+="\n ";L={hash:{},inverse:x.noop,fn:x.program(25,i,N),data:N};if(M=A.warningmessagesmall){M=M.call(O,L)}else{M=O.warningmessagesmall;M=typeof M===e?M.apply(O):M}if(!A.warningmessagesmall){M=c.call(O,M,L)}if(M||M===0){K+=M}K+="\n ";return K}function i(N,M){var L,K;K={hash:{},inverse:x.noop,fn:x.program(26,g,M),data:M};if(L=A.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!A.local){L=c.call(N,L,K)}if(L||L===0){return L}else{return""}}function g(L,K){return"You are currently viewing a deleted history!"}function f(N,M){var K="",L;K+='\n <div class="';if(L=A.status){L=L.call(N,{hash:{},data:M})}else{L=N.status;L=typeof L===e?L.apply(N):L}K+=d(L)+'message">';if(L=A.message){L=L.call(N,{hash:{},data:M})}else{L=N.message;L=typeof L===e?L.apply(N):L}K+=d(L)+"</div>\n ";return K}function z(L,K){return"You are over your disk quota"}function y(L,K){return"Tool execution is on hold until your disk usage drops below your allocated quota"}function w(L,K){return"Your history is empty. Click 'Get Data' on the left pane to start"}B+='<div id="history-controls">\n\n <div id="history-title-area" class="historyLinks">\n \n <div id="history-name-container">\n \n ';l=A["if"].call(C,((p=C.user),p==null||p===false?p:p.email),{hash:{},inverse:x.program(4,t,J),fn:x.program(1,v,J),data:J});if(l||l===0){B+=l}B+='\n </div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';if(l=A.nice_size){l=l.call(C,{hash:{},data:J})}else{l=C.nice_size;l=typeof l===e?l.apply(C):l}B+=d(l)+'</div>\n\n <div id="history-secondary-links" style="float: right;">\n ';l=A["if"].call(C,((p=C.user),p==null||p===false?p:p.email),{hash:{},inverse:x.noop,fn:x.program(7,q,J),data:J});if(l||l===0){B+=l}B+='\n </div>\n <div style="clear: both;"></div>\n </div>\n\n \n \n ';l=A["if"].call(C,((p=C.user),p==null||p===false?p:p.email),{hash:{},inverse:x.noop,fn:x.program(12,H,J),data:J});if(l||l===0){B+=l}B+="\n\n ";l=A["if"].call(C,C.deleted,{hash:{},inverse:x.noop,fn:x.program(24,j,J),data:J});if(l||l===0){B+=l}B+='\n\n <div id="message-container">\n ';l=A["if"].call(C,C.message,{hash:{},inverse:x.noop,fn:x.program(28,f,J),data:J});if(l||l===0){B+=l}B+='\n </div>\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n ';h={hash:{},inverse:x.noop,fn:x.program(30,z,J),data:J};if(l=A.local){l=l.call(C,h)}else{l=C.local;l=typeof l===e?l.apply(C):l}if(!A.local){l=c.call(C,l,h)}if(l||l===0){B+=l}B+=".\n ";h={hash:{},inverse:x.noop,fn:x.program(32,y,J),data:J};if(l=A.local){l=l.call(C,h)}else{l=C.local;l=typeof l===e?l.apply(C):l}if(!A.local){l=c.call(C,l,h)}if(l||l===0){B+=l}B+='.\n </div>\n </div>\n</div>\n\n<div id="';if(l=A.id){l=l.call(C,{hash:{},data:J})}else{l=C.id;l=typeof l===e?l.apply(C):l}B+=d(l)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';h={hash:{},inverse:x.noop,fn:x.program(34,w,J),data:J};if(l=A.local){l=l.call(C,h)}else{l=C.local;l=typeof l===e?l.apply(C):l}if(!A.local){l=c.call(C,l,h)}if(l||l===0){B+=l}B+="\n</div>";return B})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-annotationArea"]=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,p,h="function",j=this.escapeExpression,o=this,n=f.blockHelperMissing;function e(r,q){return"Annotation"}function c(r,q){return"Edit dataset annotation"}i+='\n<div id="';if(d=f.id){d=d.call(m,{hash:{},data:k})}else{d=m.id;d=typeof d===h?d.apply(m):d}i+=j(d)+'-annotation-area" class="annotation-area" style="display: none;">\n <strong>';p={hash:{},inverse:o.noop,fn:o.program(1,e,k),data:k};if(d=f.local){d=d.call(m,p)}else{d=m.local;d=typeof d===h?d.apply(m):d}if(!f.local){d=n.call(m,d,p)}if(d||d===0){i+=d}i+=':</strong>\n <div id="';if(d=f.id){d=d.call(m,{hash:{},data:k})}else{d=m.id;d=typeof d===h?d.apply(m):d}i+=j(d)+'-anotation-elt" class="annotation-elt editable-text"\n style="margin: 1px 0px 1px 0px" title="';p={hash:{},inverse:o.noop,fn:o.program(3,c,k),data:k};if(d=f.local){d=d.call(m,p)}else{d=m.local;d=typeof d===h?d.apply(m):d}if(!f.local){d=n.call(m,d,p)}if(d||d===0){i+=d}i+='">\n </div>\n</div>';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-displayApps"]=b(function(h,m,g,l,k){this.compilerInfo=[4,">= 1.0.0"];g=this.merge(g,h.helpers);k=k||{};var d,i="function",j=this.escapeExpression,o=this,n=g.blockHelperMissing;function f(s,r){var p="",q;p+="\n ";if(q=g.label){q=q.call(s,{hash:{},data:r})}else{q=s.label;q=typeof q===i?q.apply(s):q}p+=j(q)+"\n ";q=g.each.call(s,s.links,{hash:{},inverse:o.noop,fn:o.program(2,e,r),data:r});if(q||q===0){p+=q}p+="\n <br />\n";return p}function e(t,s){var p="",r,q;p+='\n <a target="';if(r=g.target){r=r.call(t,{hash:{},data:s})}else{r=t.target;r=typeof r===i?r.apply(t):r}p+=j(r)+'" href="';if(r=g.href){r=r.call(t,{hash:{},data:s})}else{r=t.href;r=typeof r===i?r.apply(t):r}p+=j(r)+'">';q={hash:{},inverse:o.noop,fn:o.program(3,c,s),data:s};if(r=g.local){r=r.call(t,q)}else{r=t.local;r=typeof r===i?r.apply(t):r}if(!g.local){r=n.call(t,r,q)}if(r||r===0){p+=r}p+="</a>\n ";return p}function c(r,q){var p;if(p=g.text){p=p.call(r,{hash:{},data:q})}else{p=r.text;p=typeof p===i?p.apply(r):p}return j(p)}d=g.each.call(m,m.displayApps,{hash:{},inverse:o.noop,fn:o.program(1,f,k),data:k});if(d||d===0){return d}else{return""}})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-downloadLinks"]=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var c,s,h="function",i=this.escapeExpression,q=this,m=f.blockHelperMissing;function e(y,x){var t="",w,v,u;t+='\n<div popupmenu="dataset-';if(w=f.id){w=w.call(y,{hash:{},data:x})}else{w=y.id;w=typeof w===h?w.apply(y):w}t+=i(w)+'-popup">\n <a class="action-button" href="'+i(((w=((w=y.urls),w==null||w===false?w:w.download)),typeof w===h?w.apply(y):w))+'">';u={hash:{},inverse:q.noop,fn:q.program(2,d,x),data:x};if(v=f.local){v=v.call(y,u)}else{v=y.local;v=typeof v===h?v.apply(y):v}if(!f.local){v=m.call(y,v,u)}if(v||v===0){t+=v}t+="</a>\n <a>";u={hash:{},inverse:q.noop,fn:q.program(4,r,x),data:x};if(v=f.local){v=v.call(y,u)}else{v=y.local;v=typeof v===h?v.apply(y):v}if(!f.local){v=m.call(y,v,u)}if(v||v===0){t+=v}t+="</a>\n ";v=f.each.call(y,((w=y.urls),w==null||w===false?w:w.meta_download),{hash:{},inverse:q.noop,fn:q.program(6,p,x),data:x});if(v||v===0){t+=v}t+='\n</div>\n<div style="float:left;" class="menubutton split popup" id="dataset-';if(v=f.id){v=v.call(y,{hash:{},data:x})}else{v=y.id;v=typeof v===h?v.apply(y):v}t+=i(v)+'-popup">\n <a href="'+i(((w=((w=y.urls),w==null||w===false?w:w.download)),typeof w===h?w.apply(y):w))+'" title="';u={hash:{},inverse:q.noop,fn:q.program(7,o,x),data:x};if(v=f.local){v=v.call(y,u)}else{v=y.local;v=typeof v===h?v.apply(y):v}if(!f.local){v=m.call(y,v,u)}if(v||v===0){t+=v}t+='" class="icon-button disk"></a>\n</div>\n';return t}function d(u,t){return"Download Dataset"}function r(u,t){return"Additional Files"}function p(x,w){var t="",v,u;t+='\n <a class="action-button" href="';if(v=f.url){v=v.call(x,{hash:{},data:w})}else{v=x.url;v=typeof v===h?v.apply(x):v}t+=i(v)+'">';u={hash:{},inverse:q.noop,fn:q.program(7,o,w),data:w};if(v=f.local){v=v.call(x,u)}else{v=x.local;v=typeof v===h?v.apply(x):v}if(!f.local){v=m.call(x,v,u)}if(v||v===0){t+=v}t+=" ";if(v=f.file_type){v=v.call(x,{hash:{},data:w})}else{v=x.file_type;v=typeof v===h?v.apply(x):v}t+=i(v)+"</a>\n ";return t}function o(u,t){return"Download"}function n(y,x){var t="",w,v,u;t+='\n\n<a href="'+i(((w=((w=y.urls),w==null||w===false?w:w.download)),typeof w===h?w.apply(y):w))+'" title="';u={hash:{},inverse:q.noop,fn:q.program(7,o,x),data:x};if(v=f.local){v=v.call(y,u)}else{v=y.local;v=typeof v===h?v.apply(y):v}if(!f.local){v=m.call(y,v,u)}if(v||v===0){t+=v}t+='" class="icon-button disk"></a>\n';return t}s=f["if"].call(l,((c=l.urls),c==null||c===false?c:c.meta_download),{hash:{},inverse:q.program(9,n,j),fn:q.program(1,e,j),data:j});if(s||s===0){return s}else{return""}})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-failedMetadata"]=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var c,o,n=this,h="function",m=f.blockHelperMissing,i=this.escapeExpression;function e(t,s){var p="",r,q;p+="\n";q={hash:{},inverse:n.noop,fn:n.program(2,d,s),data:s};if(r=f.local){r=r.call(t,q)}else{r=t.local;r=typeof r===h?r.apply(t):r}if(!f.local){r=m.call(t,r,q)}if(r||r===0){p+=r}p+='\nYou may be able to <a href="'+i(((r=((r=t.urls),r==null||r===false?r:r.edit)),typeof r===h?r.apply(t):r))+'" target="galaxy_main">set it manually or retry auto-detection</a>.\n';return p}function d(q,p){return"An error occurred setting the metadata for this dataset."}o={hash:{},inverse:n.noop,fn:n.program(1,e,j),data:j};if(c=f.warningmessagesmall){c=c.call(l,o)}else{c=l.warningmessagesmall;c=typeof c===h?c.apply(l):c}if(!f.warningmessagesmall){c=m.call(l,c,o)}if(c||c===0){return c}else{return""}})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-hdaSummary"]=b(function(g,r,p,k,u){this.compilerInfo=[4,">= 1.0.0"];p=this.merge(p,g.helpers);u=u||{};var q="",h,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(y,x){var v="",w;v+="\n ";if(w=p.misc_blurb){w=w.call(y,{hash:{},data:x})}else{w=y.misc_blurb;w=typeof w===e?w.apply(y):w}v+=d(w)+"<br />\n ";return v}function m(z,y){var v="",x,w;v+="\n ";w={hash:{},inverse:o.noop,fn:o.program(4,l,y),data:y};if(x=p.local){x=x.call(z,w)}else{x=z.local;x=typeof x===e?x.apply(z):x}if(!p.local){x=c.call(z,x,w)}if(x||x===0){v+=x}v+='<span class="';if(x=p.data_type){x=x.call(z,{hash:{},data:y})}else{x=z.data_type;x=typeof x===e?x.apply(z):x}v+=d(x)+'">';if(x=p.data_type){x=x.call(z,{hash:{},data:y})}else{x=z.data_type;x=typeof x===e?x.apply(z):x}v+=d(x)+"</span>,\n ";return v}function l(w,v){return"format: "}function j(z,y){var v="",x,w;v+="\n ";w={hash:{},inverse:o.noop,fn:o.program(7,i,y),data:y};if(x=p.local){x=x.call(z,w)}else{x=z.local;x=typeof x===e?x.apply(z):x}if(!p.local){x=c.call(z,x,w)}if(x||x===0){v+=x}v+="\n ";x=p["if"].call(z,z.dbkey_unknown_and_editable,{hash:{},inverse:o.program(11,t,y),fn:o.program(9,f,y),data:y});if(x||x===0){v+=x}v+="\n ";return v}function i(w,v){return"database: "}function f(z,y){var v="",x,w;v+='\n <a class="metadata-dbkey" href="'+d(((x=((x=z.urls),x==null||x===false?x:x.edit)),typeof x===e?x.apply(z):x))+'" target="galaxy_main">';if(w=p.metadata_dbkey){w=w.call(z,{hash:{},data:y})}else{w=z.metadata_dbkey;w=typeof w===e?w.apply(z):w}v+=d(w)+"</a>\n ";return v}function t(y,x){var v="",w;v+='\n <span class="metadata-dbkey ';if(w=p.metadata_dbkey){w=w.call(y,{hash:{},data:x})}else{w=y.metadata_dbkey;w=typeof w===e?w.apply(y):w}v+=d(w)+'">';if(w=p.metadata_dbkey){w=w.call(y,{hash:{},data:x})}else{w=y.metadata_dbkey;w=typeof w===e?w.apply(y):w}v+=d(w)+"</span>\n ";return v}function s(y,x){var v="",w;v+='\n<div class="hda-info"> ';if(w=p.misc_info){w=w.call(y,{hash:{},data:x})}else{w=y.misc_info;w=typeof w===e?w.apply(y):w}v+=d(w)+" </div>\n";return v}q+='<div class="hda-summary">\n ';h=p["if"].call(r,r.misc_blurb,{hash:{},inverse:o.noop,fn:o.program(1,n,u),data:u});if(h||h===0){q+=h}q+="\n ";h=p["if"].call(r,r.data_type,{hash:{},inverse:o.noop,fn:o.program(3,m,u),data:u});if(h||h===0){q+=h}q+="\n ";h=p["if"].call(r,r.metadata_dbkey,{hash:{},inverse:o.noop,fn:o.program(6,j,u),data:u});if(h||h===0){q+=h}q+="\n</div>\n";h=p["if"].call(r,r.misc_info,{hash:{},inverse:o.noop,fn:o.program(13,s,u),data:u});if(h||h===0){q+=h}return q})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-tagArea"]=b(function(f,k,e,j,i){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,f.helpers);i=i||{};var h="",c,n,m=this,g="function",l=e.blockHelperMissing;function d(p,o){return"Tags"}h+='\n<div class="tag-area" style="display: none;">\n <strong>';n={hash:{},inverse:m.noop,fn:m.program(1,d,i),data:i};if(c=e.local){c=c.call(k,n)}else{c=k.local;c=typeof c===g?c.apply(k):c}if(!e.local){c=l.call(k,c,n)}if(c||c===0){h+=c}h+=':</strong>\n <div class="tag-elt">\n </div>\n</div>';return h})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-titleLink"]=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='<span class="historyItemTitle">';if(c=d.hid){c=c.call(k,{hash:{},data:i})}else{c=k.hid;c=typeof c===f?c.apply(k):c}g+=h(c)+": ";if(c=d.name){c=c.call(k,{hash:{},data:i})}else{c=k.name;c=typeof c===f?c.apply(k):c}g+=h(c)+"</span>";return g})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-warning-messages"]=b(function(h,u,s,n,C){this.compilerInfo=[4,">= 1.0.0"];s=this.merge(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 c0bf145241e7735cd1c7a9dddab44d984425695f -r 8bc80aa53e81d9362e08ead0a0307cd3af0dd8aa static/scripts/packed/templates/compiled/template-hda-hdaSummary.js
--- a/static/scripts/packed/templates/compiled/template-hda-hdaSummary.js
+++ b/static/scripts/packed/templates/compiled/template-hda-hdaSummary.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-hdaSummary"]=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,s,h="function",j=this.escapeExpression,r=this,n=f.blockHelperMissing;function e(u,t){return"format: "}function c(u,t){return"database: "}function q(x,w){var t="",v,u;t+='\n <a class="metadata-dbkey" href="'+j(((v=((v=x.urls),v==null||v===false?v:v.edit)),typeof v===h?v.apply(x):v))+'" target="galaxy_main">';if(u=f.metadata_dbkey){u=u.call(x,{hash:{},data:w})}else{u=x.metadata_dbkey;u=typeof u===h?u.apply(x):u}t+=j(u)+"</a>\n ";return t}function p(w,v){var t="",u;t+='\n <span class="metadata-dbkey ';if(u=f.metadata_dbkey){u=u.call(w,{hash:{},data:v})}else{u=w.metadata_dbkey;u=typeof u===h?u.apply(w):u}t+=j(u)+'">';if(u=f.metadata_dbkey){u=u.call(w,{hash:{},data:v})}else{u=w.metadata_dbkey;u=typeof u===h?u.apply(w):u}t+=j(u)+"</span>\n ";return t}function o(w,v){var t="",u;t+='\n<div class="hda-info"> ';if(u=f.misc_info){u=u.call(w,{hash:{},data:v})}else{u=w.misc_info;u=typeof u===h?u.apply(w):u}t+=j(u)+" </div>\n";return t}i+='<div class="hda-summary">\n ';if(d=f.misc_blurb){d=d.call(m,{hash:{},data:k})}else{d=m.misc_blurb;d=typeof d===h?d.apply(m):d}i+=j(d)+"<br />\n ";s={hash:{},inverse:r.noop,fn:r.program(1,e,k),data:k};if(d=f.local){d=d.call(m,s)}else{d=m.local;d=typeof d===h?d.apply(m):d}if(!f.local){d=n.call(m,d,s)}if(d||d===0){i+=d}i+='<span class="';if(d=f.data_type){d=d.call(m,{hash:{},data:k})}else{d=m.data_type;d=typeof d===h?d.apply(m):d}i+=j(d)+'">';if(d=f.data_type){d=d.call(m,{hash:{},data:k})}else{d=m.data_type;d=typeof d===h?d.apply(m):d}i+=j(d)+"</span>,\n ";s={hash:{},inverse:r.noop,fn:r.program(3,c,k),data:k};if(d=f.local){d=d.call(m,s)}else{d=m.local;d=typeof d===h?d.apply(m):d}if(!f.local){d=n.call(m,d,s)}if(d||d===0){i+=d}i+="\n ";d=f["if"].call(m,m.dbkey_unknown_and_editable,{hash:{},inverse:r.program(7,p,k),fn:r.program(5,q,k),data:k});if(d||d===0){i+=d}i+="\n</div>\n";d=f["if"].call(m,m.misc_info,{hash:{},inverse:r.noop,fn:r.program(9,o,k),data:k});if(d||d===0){i+=d}return i})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-hdaSummary"]=b(function(g,r,p,k,u){this.compilerInfo=[4,">= 1.0.0"];p=this.merge(p,g.helpers);u=u||{};var q="",h,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(y,x){var v="",w;v+="\n ";if(w=p.misc_blurb){w=w.call(y,{hash:{},data:x})}else{w=y.misc_blurb;w=typeof w===e?w.apply(y):w}v+=d(w)+"<br />\n ";return v}function m(z,y){var v="",x,w;v+="\n ";w={hash:{},inverse:o.noop,fn:o.program(4,l,y),data:y};if(x=p.local){x=x.call(z,w)}else{x=z.local;x=typeof x===e?x.apply(z):x}if(!p.local){x=c.call(z,x,w)}if(x||x===0){v+=x}v+='<span class="';if(x=p.data_type){x=x.call(z,{hash:{},data:y})}else{x=z.data_type;x=typeof x===e?x.apply(z):x}v+=d(x)+'">';if(x=p.data_type){x=x.call(z,{hash:{},data:y})}else{x=z.data_type;x=typeof x===e?x.apply(z):x}v+=d(x)+"</span>,\n ";return v}function l(w,v){return"format: "}function j(z,y){var v="",x,w;v+="\n ";w={hash:{},inverse:o.noop,fn:o.program(7,i,y),data:y};if(x=p.local){x=x.call(z,w)}else{x=z.local;x=typeof x===e?x.apply(z):x}if(!p.local){x=c.call(z,x,w)}if(x||x===0){v+=x}v+="\n ";x=p["if"].call(z,z.dbkey_unknown_and_editable,{hash:{},inverse:o.program(11,t,y),fn:o.program(9,f,y),data:y});if(x||x===0){v+=x}v+="\n ";return v}function i(w,v){return"database: "}function f(z,y){var v="",x,w;v+='\n <a class="metadata-dbkey" href="'+d(((x=((x=z.urls),x==null||x===false?x:x.edit)),typeof x===e?x.apply(z):x))+'" target="galaxy_main">';if(w=p.metadata_dbkey){w=w.call(z,{hash:{},data:y})}else{w=z.metadata_dbkey;w=typeof w===e?w.apply(z):w}v+=d(w)+"</a>\n ";return v}function t(y,x){var v="",w;v+='\n <span class="metadata-dbkey ';if(w=p.metadata_dbkey){w=w.call(y,{hash:{},data:x})}else{w=y.metadata_dbkey;w=typeof w===e?w.apply(y):w}v+=d(w)+'">';if(w=p.metadata_dbkey){w=w.call(y,{hash:{},data:x})}else{w=y.metadata_dbkey;w=typeof w===e?w.apply(y):w}v+=d(w)+"</span>\n ";return v}function s(y,x){var v="",w;v+='\n<div class="hda-info"> ';if(w=p.misc_info){w=w.call(y,{hash:{},data:x})}else{w=y.misc_info;w=typeof w===e?w.apply(y):w}v+=d(w)+" </div>\n";return v}q+='<div class="hda-summary">\n ';h=p["if"].call(r,r.misc_blurb,{hash:{},inverse:o.noop,fn:o.program(1,n,u),data:u});if(h||h===0){q+=h}q+="\n ";h=p["if"].call(r,r.data_type,{hash:{},inverse:o.noop,fn:o.program(3,m,u),data:u});if(h||h===0){q+=h}q+="\n ";h=p["if"].call(r,r.metadata_dbkey,{hash:{},inverse:o.noop,fn:o.program(6,j,u),data:u});if(h||h===0){q+=h}q+="\n</div>\n";h=p["if"].call(r,r.misc_info,{hash:{},inverse:o.noop,fn:o.program(13,s,u),data:u});if(h||h===0){q+=h}return q})})();
\ No newline at end of file
diff -r c0bf145241e7735cd1c7a9dddab44d984425695f -r 8bc80aa53e81d9362e08ead0a0307cd3af0dd8aa static/scripts/templates/compiled/history-templates.js
--- a/static/scripts/templates/compiled/history-templates.js
+++ b/static/scripts/templates/compiled/history-templates.js
@@ -1,19 +1,268 @@
-/** Hack div to clear re-enclose float'd elements above it in the parent div
- */
-Handlebars.registerPartial( 'clearFloatDiv', function( options ){
- return '<div class="clear"></div>';
-});
-/** Renders a warning in a (mostly css) highlighted, iconned warning box
- */
-Handlebars.registerHelper( 'warningmessagesmall', function( options ){
- return '<div class="warningmessagesmall"><strong>' + options.fn( this ) + '</strong></div>'
-});
-/** Calls _l (from base-mvc.js) to localize strings (if poosible)
- * This helper is specifically for localization within templates
- */
-Handlebars.registerHelper( 'local', function( options ){
- return _l( options.fn( this ) );
-});(function() {
+(function() {
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
+templates['template-history-historyPanel'] = template(function (Handlebars,depth0,helpers,partials,data) {
+ this.compilerInfo = [4,'>= 1.0.0'];
+helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
+ var buffer = "", stack1, stack2, options, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing, escapeExpression=this.escapeExpression;
+
+function program1(depth0,data) {
+
+ var buffer = "", stack1, options;
+ buffer += "\n <div id=\"history-name\" class=\"editable-text\"\n title=\"";
+ 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 += "\">";
+ if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "</div>\n ";
+ return buffer;
+ }
+function program2(depth0,data) {
+
+
+ return "Click to rename history";
+ }
+
+function program4(depth0,data) {
+
+ var buffer = "", stack1, options;
+ buffer += "\n <div id=\"history-name\"\n title=\"";
+ options = {hash:{},inverse:self.noop,fn:self.program(5, program5, 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 += "\">";
+ if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "</div>\n ";
+ return buffer;
+ }
+function program5(depth0,data) {
+
+
+ return "You must be logged in to edit your history name";
+ }
+
+function program7(depth0,data) {
+
+ var buffer = "", stack1, options;
+ buffer += "\n <a id=\"history-tag\" title=\"";
+ options = {hash:{},inverse:self.noop,fn:self.program(8, program8, 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 class=\"icon-button tags\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n <a id=\"history-annotate\" title=\"";
+ options = {hash:{},inverse:self.noop,fn:self.program(10, program10, 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 class=\"icon-button annotate\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n ";
+ return buffer;
+ }
+function program8(depth0,data) {
+
+
+ return "Edit history tags";
+ }
+
+function program10(depth0,data) {
+
+
+ return "Edit history annotation";
+ }
+
+function program12(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>";
+ options = {hash:{},inverse:self.noop,fn:self.program(13, program13, 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(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=\"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 += "\">\n ";
+ 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 program13(depth0,data) {
+
+
+ return "Tags";
+ }
+
+function program15(depth0,data) {
+
+
+ return "Annotation";
+ }
+
+function program17(depth0,data) {
+
+
+ return "Click to edit annotation";
+ }
+
+function program19(depth0,data) {
+
+ var buffer = "", stack1;
+ buffer += "\n ";
+ if (stack1 = helpers.annotation) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.annotation; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "\n ";
+ return buffer;
+ }
+
+function program21(depth0,data) {
+
+ var buffer = "", stack1, options;
+ buffer += "\n <em>";
+ 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); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ 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 "You are currently viewing a deleted history!";
+ }
+
+function program28(depth0,data) {
+
+ var buffer = "", stack1;
+ 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)
+ + "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)
+ + "</div>\n ";
+ return buffer;
+ }
+
+function program30(depth0,data) {
+
+
+ return "You are over your disk quota";
+ }
+
+function program32(depth0,data) {
+
+
+ return "Tool execution is on hold until your disk usage drops below your allocated quota";
+ }
+
+function program34(depth0,data) {
+
+
+ return "Your history is empty. Click 'Get Data' on the left pane to start";
+ }
+
+ 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});
+ if(stack2 || stack2 === 0) { buffer += stack2; }
+ buffer += "\n </div>\n </div>\n\n <div id=\"history-subtitle-area\">\n <div id=\"history-size\" style=\"float:left;\">";
+ if (stack2 = helpers.nice_size) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
+ else { stack2 = depth0.nice_size; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
+ buffer += escapeExpression(stack2)
+ + "</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 "
+ + "\n "
+ + "\n ";
+ 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 <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 </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; }
+ if (!helpers.local) { stack2 = blockHelperMissing.call(depth0, stack2, options); }
+ if(stack2 || stack2 === 0) { buffer += stack2; }
+ buffer += ".\n ";
+ options = {hash:{},inverse:self.noop,fn:self.program(32, program32, data),data:data};
+ if (stack2 = helpers.local) { stack2 = stack2.call(depth0, options); }
+ else { stack2 = depth0.local; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
+ if (!helpers.local) { stack2 = blockHelperMissing.call(depth0, stack2, options); }
+ if(stack2 || stack2 === 0) { buffer += stack2; }
+ buffer += ".\n </div>\n </div>\n</div>\n\n<div id=\"";
+ if (stack2 = helpers.id) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
+ else { stack2 = depth0.id; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
+ buffer += escapeExpression(stack2)
+ + "-datasets\" class=\"history-datasets-list\"></div>\n\n<div class=\"infomessagesmall\" id=\"emptyHistoryMessage\" style=\"display: none;\">\n ";
+ options = {hash:{},inverse:self.noop,fn:self.program(34, program34, data),data:data};
+ if (stack2 = helpers.local) { stack2 = stack2.call(depth0, options); }
+ else { stack2 = depth0.local; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
+ if (!helpers.local) { stack2 = blockHelperMissing.call(depth0, stack2, options); }
+ if(stack2 || stack2 === 0) { buffer += stack2; }
+ buffer += "\n</div>";
+ return buffer;
+ });
+})();(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-hda-annotationArea'] = template(function (Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
@@ -250,65 +499,24 @@
templates['template-hda-hdaSummary'] = template(function (Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
- var buffer = "", stack1, options, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
+ var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
function program1(depth0,data) {
-
- return "format: ";
+ var buffer = "", stack1;
+ buffer += "\n ";
+ if (stack1 = helpers.misc_blurb) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.misc_blurb; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "<br />\n ";
+ return buffer;
}
function program3(depth0,data) {
-
- return "database: ";
- }
-
-function program5(depth0,data) {
-
- var buffer = "", stack1, stack2;
- buffer += "\n <a class=\"metadata-dbkey\" href=\""
- + escapeExpression(((stack1 = ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.edit)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
- + "\" target=\"galaxy_main\">";
- if (stack2 = helpers.metadata_dbkey) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
- else { stack2 = depth0.metadata_dbkey; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
- buffer += escapeExpression(stack2)
- + "</a>\n ";
- return buffer;
- }
-
-function program7(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "\n <span class=\"metadata-dbkey ";
- if (stack1 = helpers.metadata_dbkey) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "\">";
- if (stack1 = helpers.metadata_dbkey) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "</span>\n ";
- return buffer;
- }
-
-function program9(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "\n<div class=\"hda-info\"> ";
- if (stack1 = helpers.misc_info) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.misc_info; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + " </div>\n";
- return buffer;
- }
-
- buffer += "<div class=\"hda-summary\">\n ";
- if (stack1 = helpers.misc_blurb) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.misc_blurb; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "<br />\n ";
- options = {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data};
+ var buffer = "", stack1, options;
+ 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); }
@@ -322,16 +530,85 @@
else { stack1 = depth0.data_type; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
buffer += escapeExpression(stack1)
+ "</span>,\n ";
- options = {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data};
+ return buffer;
+ }
+function program4(depth0,data) {
+
+
+ return "format: ";
+ }
+
+function program6(depth0,data) {
+
+ var buffer = "", stack1, options;
+ buffer += "\n ";
+ options = {hash:{},inverse:self.noop,fn:self.program(7, program7, 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.dbkey_unknown_and_editable, {hash:{},inverse:self.program(11, program11, data),fn:self.program(9, program9, data),data:data});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n ";
- stack1 = helpers['if'].call(depth0, depth0.dbkey_unknown_and_editable, {hash:{},inverse:self.program(7, program7, data),fn:self.program(5, program5, data),data:data});
+ return buffer;
+ }
+function program7(depth0,data) {
+
+
+ return "database: ";
+ }
+
+function program9(depth0,data) {
+
+ var buffer = "", stack1, stack2;
+ buffer += "\n <a class=\"metadata-dbkey\" href=\""
+ + escapeExpression(((stack1 = ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.edit)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
+ + "\" target=\"galaxy_main\">";
+ if (stack2 = helpers.metadata_dbkey) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
+ else { stack2 = depth0.metadata_dbkey; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
+ buffer += escapeExpression(stack2)
+ + "</a>\n ";
+ return buffer;
+ }
+
+function program11(depth0,data) {
+
+ var buffer = "", stack1;
+ buffer += "\n <span class=\"metadata-dbkey ";
+ if (stack1 = helpers.metadata_dbkey) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "\">";
+ if (stack1 = helpers.metadata_dbkey) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "</span>\n ";
+ return buffer;
+ }
+
+function program13(depth0,data) {
+
+ var buffer = "", stack1;
+ buffer += "\n<div class=\"hda-info\"> ";
+ if (stack1 = helpers.misc_info) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.misc_info; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + " </div>\n";
+ return buffer;
+ }
+
+ buffer += "<div class=\"hda-summary\">\n ";
+ stack1 = helpers['if'].call(depth0, depth0.misc_blurb, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n ";
+ stack1 = helpers['if'].call(depth0, depth0.data_type, {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n ";
+ stack1 = helpers['if'].call(depth0, depth0.metadata_dbkey, {hash:{},inverse:self.noop,fn:self.program(6, program6, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n</div>\n";
- stack1 = helpers['if'].call(depth0, depth0.misc_info, {hash:{},inverse:self.noop,fn:self.program(9, program9, data),data:data});
+ stack1 = helpers['if'].call(depth0, depth0.misc_info, {hash:{},inverse:self.noop,fn:self.program(13, program13, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
return buffer;
});
@@ -569,296 +846,4 @@
if(stack1 || stack1 === 0) { buffer += stack1; }
return buffer;
});
-})();(function() {
- var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['template-history-historyPanel'] = template(function (Handlebars,depth0,helpers,partials,data) {
- this.compilerInfo = [4,'>= 1.0.0'];
-helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
- var buffer = "", stack1, stack2, options, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing, escapeExpression=this.escapeExpression;
-
-function program1(depth0,data) {
-
- var buffer = "", stack1, options;
- buffer += "\n <div id=\"history-name\" class=\"editable-text\"\n title=\"";
- 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 += "\">";
- if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "</div>\n ";
- return buffer;
- }
-function program2(depth0,data) {
-
-
- return "Click to rename history";
- }
-
-function program4(depth0,data) {
-
- var buffer = "", stack1, options;
- buffer += "\n <div id=\"history-name\"\n title=\"";
- options = {hash:{},inverse:self.noop,fn:self.program(5, program5, 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 += "\">";
- if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "</div>\n ";
- return buffer;
- }
-function program5(depth0,data) {
-
-
- return "You must be logged in to edit your history name";
- }
-
-function program7(depth0,data) {
-
- var buffer = "", stack1, options;
- buffer += "\n <a id=\"history-tag\" title=\"";
- options = {hash:{},inverse:self.noop,fn:self.program(8, program8, 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 class=\"icon-button tags\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n <a id=\"history-annotate\" title=\"";
- options = {hash:{},inverse:self.noop,fn:self.program(10, program10, 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 class=\"icon-button annotate\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n ";
- return buffer;
- }
-function program8(depth0,data) {
-
-
- return "Edit history tags";
- }
-
-function program10(depth0,data) {
-
-
- return "Edit history annotation";
- }
-
-function program12(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>";
- options = {hash:{},inverse:self.noop,fn:self.program(13, program13, 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(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=\"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 += "\">\n ";
- 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 program13(depth0,data) {
-
-
- return "Tags";
- }
-
-function program15(depth0,data) {
-
-
- return "Annotation";
- }
-
-function program17(depth0,data) {
-
-
- return "Click to edit annotation";
- }
-
-function program19(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "\n ";
- if (stack1 = helpers.annotation) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.annotation; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "\n ";
- return buffer;
- }
-
-function program21(depth0,data) {
-
- var buffer = "", stack1, options;
- buffer += "\n <em>";
- 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); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- 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 "You are currently viewing a deleted history!";
- }
-
-function program28(depth0,data) {
-
- var buffer = "", stack1;
- 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)
- + "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)
- + "</div>\n ";
- return buffer;
- }
-
-function program30(depth0,data) {
-
-
- return "You are over your disk quota";
- }
-
-function program32(depth0,data) {
-
-
- return "Tool execution is on hold until your disk usage drops below your allocated quota";
- }
-
-function program34(depth0,data) {
-
-
- return "Your history is empty. Click 'Get Data' on the left pane to start";
- }
-
- 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});
- if(stack2 || stack2 === 0) { buffer += stack2; }
- buffer += "\n </div>\n </div>\n\n <div id=\"history-subtitle-area\">\n <div id=\"history-size\" style=\"float:left;\">";
- if (stack2 = helpers.nice_size) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
- else { stack2 = depth0.nice_size; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
- buffer += escapeExpression(stack2)
- + "</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 "
- + "\n "
- + "\n ";
- 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 <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 </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; }
- if (!helpers.local) { stack2 = blockHelperMissing.call(depth0, stack2, options); }
- if(stack2 || stack2 === 0) { buffer += stack2; }
- buffer += ".\n ";
- options = {hash:{},inverse:self.noop,fn:self.program(32, program32, data),data:data};
- if (stack2 = helpers.local) { stack2 = stack2.call(depth0, options); }
- else { stack2 = depth0.local; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
- if (!helpers.local) { stack2 = blockHelperMissing.call(depth0, stack2, options); }
- if(stack2 || stack2 === 0) { buffer += stack2; }
- buffer += ".\n </div>\n </div>\n</div>\n\n<div id=\"";
- if (stack2 = helpers.id) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
- else { stack2 = depth0.id; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
- buffer += escapeExpression(stack2)
- + "-datasets\" class=\"history-datasets-list\"></div>\n\n<div class=\"infomessagesmall\" id=\"emptyHistoryMessage\" style=\"display: none;\">\n ";
- options = {hash:{},inverse:self.noop,fn:self.program(34, program34, data),data:data};
- if (stack2 = helpers.local) { stack2 = stack2.call(depth0, options); }
- else { stack2 = depth0.local; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
- if (!helpers.local) { stack2 = blockHelperMissing.call(depth0, stack2, options); }
- if(stack2 || stack2 === 0) { buffer += stack2; }
- buffer += "\n</div>";
- return buffer;
- });
-})();(function() {
- var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['template-iconButton'] = template(function (Handlebars,depth0,helpers,partials,data) {
- this.compilerInfo = [4,'>= 1.0.0'];
-helpers = this.merge(helpers, Handlebars.helpers); partials = this.merge(partials, Handlebars.partials); data = data || {};
- var buffer = "", stack1, self=this;
-
-
- buffer += "\n";
- stack1 = self.invokePartial(partials.iconButton, 'iconButton', depth0, helpers, partials, data);
- if(stack1 || stack1 === 0) { buffer += stack1; }
- return buffer;
- });
-})();(function() {
- var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['template-warningmessagesmall'] = template(function (Handlebars,depth0,helpers,partials,data) {
- this.compilerInfo = [4,'>= 1.0.0'];
-helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
- var buffer = "", stack1, functionType="function";
-
-
- buffer += " \n <div class=\"warningmessagesmall\"><strong>";
- if (stack1 = helpers.warning) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.warning; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "</strong></div>";
- return buffer;
- });
})();
\ No newline at end of file
diff -r c0bf145241e7735cd1c7a9dddab44d984425695f -r 8bc80aa53e81d9362e08ead0a0307cd3af0dd8aa static/scripts/templates/compiled/template-hda-hdaSummary.js
--- a/static/scripts/templates/compiled/template-hda-hdaSummary.js
+++ b/static/scripts/templates/compiled/template-hda-hdaSummary.js
@@ -3,65 +3,24 @@
templates['template-hda-hdaSummary'] = template(function (Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
- var buffer = "", stack1, options, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
+ var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
function program1(depth0,data) {
-
- return "format: ";
+ var buffer = "", stack1;
+ buffer += "\n ";
+ if (stack1 = helpers.misc_blurb) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.misc_blurb; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "<br />\n ";
+ return buffer;
}
function program3(depth0,data) {
-
- return "database: ";
- }
-
-function program5(depth0,data) {
-
- var buffer = "", stack1, stack2;
- buffer += "\n <a class=\"metadata-dbkey\" href=\""
- + escapeExpression(((stack1 = ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.edit)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
- + "\" target=\"galaxy_main\">";
- if (stack2 = helpers.metadata_dbkey) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
- else { stack2 = depth0.metadata_dbkey; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
- buffer += escapeExpression(stack2)
- + "</a>\n ";
- return buffer;
- }
-
-function program7(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "\n <span class=\"metadata-dbkey ";
- if (stack1 = helpers.metadata_dbkey) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "\">";
- if (stack1 = helpers.metadata_dbkey) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "</span>\n ";
- return buffer;
- }
-
-function program9(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "\n<div class=\"hda-info\"> ";
- if (stack1 = helpers.misc_info) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.misc_info; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + " </div>\n";
- return buffer;
- }
-
- buffer += "<div class=\"hda-summary\">\n ";
- if (stack1 = helpers.misc_blurb) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.misc_blurb; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "<br />\n ";
- options = {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data};
+ var buffer = "", stack1, options;
+ 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); }
@@ -75,16 +34,85 @@
else { stack1 = depth0.data_type; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
buffer += escapeExpression(stack1)
+ "</span>,\n ";
- options = {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data};
+ return buffer;
+ }
+function program4(depth0,data) {
+
+
+ return "format: ";
+ }
+
+function program6(depth0,data) {
+
+ var buffer = "", stack1, options;
+ buffer += "\n ";
+ options = {hash:{},inverse:self.noop,fn:self.program(7, program7, 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.dbkey_unknown_and_editable, {hash:{},inverse:self.program(11, program11, data),fn:self.program(9, program9, data),data:data});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n ";
- stack1 = helpers['if'].call(depth0, depth0.dbkey_unknown_and_editable, {hash:{},inverse:self.program(7, program7, data),fn:self.program(5, program5, data),data:data});
+ return buffer;
+ }
+function program7(depth0,data) {
+
+
+ return "database: ";
+ }
+
+function program9(depth0,data) {
+
+ var buffer = "", stack1, stack2;
+ buffer += "\n <a class=\"metadata-dbkey\" href=\""
+ + escapeExpression(((stack1 = ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.edit)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
+ + "\" target=\"galaxy_main\">";
+ if (stack2 = helpers.metadata_dbkey) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
+ else { stack2 = depth0.metadata_dbkey; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
+ buffer += escapeExpression(stack2)
+ + "</a>\n ";
+ return buffer;
+ }
+
+function program11(depth0,data) {
+
+ var buffer = "", stack1;
+ buffer += "\n <span class=\"metadata-dbkey ";
+ if (stack1 = helpers.metadata_dbkey) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "\">";
+ if (stack1 = helpers.metadata_dbkey) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + "</span>\n ";
+ return buffer;
+ }
+
+function program13(depth0,data) {
+
+ var buffer = "", stack1;
+ buffer += "\n<div class=\"hda-info\"> ";
+ if (stack1 = helpers.misc_info) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
+ else { stack1 = depth0.misc_info; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
+ buffer += escapeExpression(stack1)
+ + " </div>\n";
+ return buffer;
+ }
+
+ buffer += "<div class=\"hda-summary\">\n ";
+ stack1 = helpers['if'].call(depth0, depth0.misc_blurb, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n ";
+ stack1 = helpers['if'].call(depth0, depth0.data_type, {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n ";
+ stack1 = helpers['if'].call(depth0, depth0.metadata_dbkey, {hash:{},inverse:self.noop,fn:self.program(6, program6, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n</div>\n";
- stack1 = helpers['if'].call(depth0, depth0.misc_info, {hash:{},inverse:self.noop,fn:self.program(9, program9, data),data:data});
+ stack1 = helpers['if'].call(depth0, depth0.misc_info, {hash:{},inverse:self.noop,fn:self.program(13, program13, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
return buffer;
});
diff -r c0bf145241e7735cd1c7a9dddab44d984425695f -r 8bc80aa53e81d9362e08ead0a0307cd3af0dd8aa static/scripts/templates/hda-templates.html
--- a/static/scripts/templates/hda-templates.html
+++ b/static/scripts/templates/hda-templates.html
@@ -45,13 +45,19 @@
<!-- ---------------------------------------------------------------------- SUMMARY INFO (ok state) --><script type="text/template" class="template-hda" id="template-hda-hdaSummary"><div class="hda-summary">
- {{ misc_blurb }}<br />
- {{#local}}format: {{/local}}<span class="{{ data_type }}">{{ data_type }}</span>,
- {{#local}}database: {{/local}}
- {{#if dbkey_unknown_and_editable }}
- <a class="metadata-dbkey" href="{{ urls.edit }}" target="galaxy_main">{{ metadata_dbkey }}</a>
- {{else}}
- <span class="metadata-dbkey {{ metadata_dbkey }}">{{ metadata_dbkey }}</span>
+ {{#if misc_blurb }}
+ {{ misc_blurb }}<br />
+ {{/if}}
+ {{#if data_type }}
+ {{#local}}format: {{/local}}<span class="{{ data_type }}">{{ data_type }}</span>,
+ {{/if}}
+ {{#if metadata_dbkey }}
+ {{#local}}database: {{/local}}
+ {{#if dbkey_unknown_and_editable }}
+ <a class="metadata-dbkey" href="{{ urls.edit }}" target="galaxy_main">{{ metadata_dbkey }}</a>
+ {{else}}
+ <span class="metadata-dbkey {{ metadata_dbkey }}">{{ metadata_dbkey }}</span>
+ {{/if}}
{{/if}}
</div>
{{#if misc_info}}
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