galaxy-commits
Threads by month
- ----- 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: greg: Fix for viewing invalid tools in the tool shed.
by Bitbucket 12 Nov '12
by Bitbucket 12 Nov '12
12 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/74a7bc65f1ed/
changeset: 74a7bc65f1ed
user: greg
date: 2012-11-12 22:05:55
summary: Fix for viewing invalid tools in the tool shed.
affected #: 1 file
diff -r 8cc09edeafb2b01b034c8c4abff1b0bc95a66d47 -r 74a7bc65f1ed8bde40425d1823ad8761b6cdcea8 lib/galaxy/webapps/community/controllers/repository.py
--- a/lib/galaxy/webapps/community/controllers/repository.py
+++ b/lib/galaxy/webapps/community/controllers/repository.py
@@ -1577,7 +1577,6 @@
params = util.Params( kwd )
message = util.restore_text( params.get( 'message', '' ) )
status = params.get( 'status', 'error' )
- repository_clone_url = generate_clone_url_for_repository_in_tool_shed( trans, repository_id )
repository, tool, error_message = load_tool_from_changeset_revision( trans, repository_id, changeset_revision, tool_config )
tool_state = self.__new_state( trans )
is_malicious = changeset_is_malicious( trans, repository_id, repository.tip( trans.app ) )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Correct method name in the repository controller.
by Bitbucket 12 Nov '12
by Bitbucket 12 Nov '12
12 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/8cc09edeafb2/
changeset: 8cc09edeafb2
user: greg
date: 2012-11-12 22:00:31
summary: Correct method name in the repository controller.
affected #: 1 file
diff -r d60deede2b6a1d360bfd7479a68ab72eb162e84b -r 8cc09edeafb2b01b034c8c4abff1b0bc95a66d47 lib/galaxy/webapps/community/controllers/repository.py
--- a/lib/galaxy/webapps/community/controllers/repository.py
+++ b/lib/galaxy/webapps/community/controllers/repository.py
@@ -1577,7 +1577,7 @@
params = util.Params( kwd )
message = util.restore_text( params.get( 'message', '' ) )
status = params.get( 'status', 'error' )
- repository_clone_url = generate_clone_url( trans, repository_id )
+ repository_clone_url = generate_clone_url_for_repository_in_tool_shed( trans, repository_id )
repository, tool, error_message = load_tool_from_changeset_revision( trans, repository_id, changeset_revision, tool_config )
tool_state = self.__new_state( trans )
is_malicious = changeset_is_malicious( trans, repository_id, repository.tip( trans.app ) )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Make the directory containing the tool shed's hgweb.config file a setting in the tool shed config.
by Bitbucket 12 Nov '12
by Bitbucket 12 Nov '12
12 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/d60deede2b6a/
changeset: d60deede2b6a
user: greg
date: 2012-11-12 21:55:24
summary: Make the directory containing the tool shed's hgweb.config file a setting in the tool shed config.
affected #: 31 files
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b community_wsgi.ini.sample
--- a/community_wsgi.ini.sample
+++ b/community_wsgi.ini.sample
@@ -26,6 +26,9 @@
# You may use a SQLAlchemy connection string to specify an external database instead
#database_connection = postgres:///community_test?host=/var/run/postgresql
+# Where the hgweb.config file is stored. The default is the Galaxy installation directory.
+#hgweb_config_dir = None
+
# Where dataset files are saved
file_path = database/community_files
# Temporary storage for additional datasets, this should be shared through the cluster
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b lib/galaxy/util/shed_util.py
--- a/lib/galaxy/util/shed_util.py
+++ b/lib/galaxy/util/shed_util.py
@@ -42,10 +42,11 @@
class ShedCounter( object ):
def __init__( self, model ):
+ # TODO: Enhance the ShedCounter to retrieve information from the db instead of displaying what's currently in memory.
self.model = model
self.generation_time = strftime( "%b %d, %Y", gmtime() )
self.repositories = 0
- self.new_repositories = 0
+ #self.new_repositories = 0
self.deleted_repositories = 0
self.invalid_tools = 0
self.valid_tools = 0
@@ -59,7 +60,7 @@
return self.model.context
def generate_statistics( self ):
self.repositories = 0
- self.new_repositories = 0
+ #self.new_repositories = 0
self.deleted_repositories = 0
self.invalid_tools = 0
self.valid_tools = 0
@@ -70,14 +71,15 @@
self.repositories += 1
self.total_clones += repository.times_downloaded
is_deleted = repository.deleted
- is_new = repository.is_new
- if is_deleted and is_new:
+ #is_new = repository.is_new
+ #if is_deleted and is_new:
+ if is_deleted:
self.deleted_repositories += 1
- self.new_repositories += 1
- elif is_deleted:
- self.deleted_repositories += 1
- elif is_new:
- self.new_repositories += 1
+ # self.new_repositories += 1
+ #elif is_deleted:
+ # self.deleted_repositories += 1
+ #elif is_new:
+ # self.new_repositories += 1
else:
processed_guids = []
processed_invalid_tool_configs = []
@@ -763,8 +765,8 @@
"""
Generate metadata for a repository using it's files on disk. To generate metadata for changeset revisions older than the repository tip,
the repository will have been cloned to a temporary location and updated to a specified changeset revision to access that changeset revision's
- disk files, so the value of repository_files_dir will not always be repository.repo_path (it could be an absolute path to a temporary directory
- containing a clone). If it is an absolute path, the value of relative_install_dir must contain repository.repo_path.
+ disk files, so the value of repository_files_dir will not always be repository.repo_path( app ) (it could be an absolute path to a temporary
+ directory containing a clone). If it is an absolute path, the value of relative_install_dir must contain repository.repo_path( app ).
The value of persist will be True when the installed repository contains a valid tool_data_table_conf.xml.sample file, in which case the entries
should ultimately be persisted to the file referred to by app.config.shed_tool_data_table_config.
@@ -784,7 +786,7 @@
original_tool_data_table_config_path = app.config.tool_data_table_config_path
if resetting_all_metadata_on_repository:
if not relative_install_dir:
- raise Exception( "The value of repository.repo_path must be sent when resetting all metadata on a repository." )
+ raise Exception( "The value of repository.repo_path( app ) must be sent when resetting all metadata on a repository." )
# Keep track of the location where the repository is temporarily cloned so that we can strip the path when setting metadata. The value of
# repository_files_dir is the full path to the temporary directory to which the repository was cloned.
work_dir = repository_files_dir
@@ -907,7 +909,7 @@
app.config.tool_data_path = original_tool_data_path
app.config.tool_data_table_config_path = original_tool_data_table_config_path
return metadata_dict, invalid_file_tups
-def generate_message_for_invalid_tools( invalid_file_tups, repository, metadata_dict, as_html=True, displaying_invalid_tool=False ):
+def generate_message_for_invalid_tools( trans, invalid_file_tups, repository, metadata_dict, as_html=True, displaying_invalid_tool=False ):
if as_html:
new_line = '<br/>'
bold_start = '<b>'
@@ -919,10 +921,10 @@
message = ''
if not displaying_invalid_tool:
if metadata_dict:
- message += "Metadata was defined for some items in revision '%s'. " % str( repository.tip )
+ message += "Metadata was defined for some items in revision '%s'. " % str( repository.tip( trans.app ) )
message += "Correct the following problems if necessary and reset metadata.%s" % new_line
else:
- message += "Metadata cannot be defined for revision '%s' so this revision cannot be automatically " % str( repository.tip )
+ message += "Metadata cannot be defined for revision '%s' so this revision cannot be automatically " % str( repository.tip( trans.app ) )
message += "installed into a local Galaxy instance. Correct the following problems and reset metadata.%s" % new_line
for itc_tup in invalid_file_tups:
tool_file, exception_msg = itc_tup
@@ -1351,6 +1353,11 @@
ctx = get_changectx_for_changeset( repo, changeset_revision )
named_tmp_file = get_named_tmpfile_from_ctx( ctx, file_name, dir )
return named_tmp_file
+def get_hgweb_config( app ):
+ hgweb_config = os.path.join( app.config.hgweb_config_dir, 'hgweb.config' )
+ if not os.path.exists( hgweb_config ):
+ raise Exception( "Required file %s does not exist - check config setting for hgweb_config_dir." % hgweb_config )
+ return hgweb_config
def get_installed_tool_shed_repository( trans, id ):
"""Get a repository on the Galaxy side from the database via id"""
return trans.sa_session.query( trans.model.ToolShedRepository ).get( trans.security.decode_id( id ) )
@@ -2229,7 +2236,7 @@
trans.sa_session.flush()
repository = get_repository_in_tool_shed( trans, id )
log.debug( "Resetting all metadata on repository: %s" % repository.name )
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
repository_clone_url = generate_clone_url_for_repository_in_tool_shed( trans, repository )
# The list of changeset_revisions refers to repository_metadata records that have been created or updated. When the following loop
@@ -2329,7 +2336,7 @@
repository = get_installed_tool_shed_repository( trans, repository_id )
invalid_file_tups, metadata_dict = reset_all_metadata_on_installed_repository( trans, repository_id )
if invalid_file_tups:
- message = generate_message_for_invalid_tools( invalid_file_tups, repository, None, as_html=False )
+ message = generate_message_for_invalid_tools( trans, invalid_file_tups, repository, None, as_html=False )
log.debug( message )
unsuccessful_count += 1
else:
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b lib/galaxy/webapps/community/config.py
--- a/lib/galaxy/webapps/community/config.py
+++ b/lib/galaxy/webapps/community/config.py
@@ -92,6 +92,8 @@
self.job_handlers = []
self.tool_handlers = []
self.tool_runners = []
+ # Where the tool shed hgweb.config file is stored - the default is the Galaxy installation directory.
+ self.hgweb_config_dir = resolve_path( kwargs.get( 'hgweb_config_dir', '' ), self.root )
# Proxy features
self.apache_xsendfile = kwargs.get( 'apache_xsendfile', False )
self.nginx_x_accel_redirect_base = kwargs.get( 'nginx_x_accel_redirect_base', False )
@@ -112,7 +114,7 @@
return default
def check( self ):
# Check that required directories exist.
- paths_to_check = [ self.root, self.file_path, self.tool_data_path, self.template_path ]
+ paths_to_check = [ self.root, self.file_path, self.hgweb_config_dir, self.tool_data_path, self.template_path ]
for path in paths_to_check:
if path not in [ None, False ] and not os.path.isdir( path ):
try:
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b lib/galaxy/webapps/community/controllers/admin.py
--- a/lib/galaxy/webapps/community/controllers/admin.py
+++ b/lib/galaxy/webapps/community/controllers/admin.py
@@ -344,7 +344,7 @@
class RevisionColumn( grids.TextColumn ):
def get_value( self, trans, grid, repository_metadata ):
repository = repository_metadata.repository
- repo = hg.repository( get_configured_ui(), repository.repo_path )
+ repo = hg.repository( get_configured_ui(), repository.repo_path( trans.app ) )
ctx = get_changectx_for_changeset( repo, repository_metadata.changeset_revision )
return "%s:%s" % ( str( ctx.rev() ), repository_metadata.changeset_revision )
class ToolsColumn( grids.TextColumn ):
@@ -516,7 +516,7 @@
if k.startswith( changset_revision_str ):
repository_id = trans.security.encode_id( int( k.lstrip( changset_revision_str ) ) )
repository = get_repository_in_tool_shed( trans, repository_id )
- if repository.tip != v:
+ if repository.tip( trans.app ) != v:
return trans.response.send_redirect( web.url_for( controller='repository',
action='browse_repositories',
operation='view_or_manage_repository',
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b lib/galaxy/webapps/community/controllers/common.py
--- a/lib/galaxy/webapps/community/controllers/common.py
+++ b/lib/galaxy/webapps/community/controllers/common.py
@@ -139,7 +139,7 @@
if not file_path or not os.path.exists( file_path ):
# The file no longer exists on disk, so it must have been deleted at some previous point in the change log.
return False
- if changeset_revision == repository.tip:
+ if changeset_revision == repository.tip( trans.app ):
return True
file_name = strip_path( file_path )
latest_version_of_file = get_latest_tool_config_revision_from_repository_manifest( repo, file_name, changeset_revision )
@@ -327,7 +327,7 @@
previous_changeset_revision = current_changeset_revision
def get_previous_repository_reviews( trans, repository, changeset_revision ):
"""Return an ordered dictionary of repository reviews up to and including the received changeset revision."""
- repo = hg.repository( get_configured_ui(), repository.repo_path )
+ repo = hg.repository( get_configured_ui(), repository.repo_path( trans.app ) )
reviewed_revision_hashes = [ review.changeset_revision for review in repository.reviews ]
previous_reviews_dict = odict()
for changeset in reversed_upper_bounded_changelog( repo, changeset_revision ):
@@ -340,10 +340,10 @@
previous_reviews_dict[ previous_changeset_revision ] = dict( changeset_revision_label=previous_changeset_revision_label,
reviews=revision_reviews )
return previous_reviews_dict
-def get_rev_label_changeset_revision_from_repository_metadata( repository_metadata, repository=None ):
+def get_rev_label_changeset_revision_from_repository_metadata( trans, repository_metadata, repository=None ):
if repository is None:
repository = repository_metadata.repository
- repo = hg.repository( get_configured_ui(), repository.repo_path )
+ repo = hg.repository( get_configured_ui(), repository.repo_path( trans.app ) )
changeset_revision = repository_metadata.changeset_revision
ctx = get_changectx_for_changeset( repo, changeset_revision )
if ctx:
@@ -424,7 +424,7 @@
Return a string consisting of the human read-able
changeset rev and the changeset revision string.
"""
- repo = hg.repository( get_configured_ui(), repository.repo_path )
+ repo = hg.repository( get_configured_ui(), repository.repo_path( trans.app ) )
ctx = get_changectx_for_changeset( repo, changeset_revision )
if ctx:
return "%s:%s" % ( str( ctx.rev() ), changeset_revision )
@@ -454,7 +454,7 @@
# 4. A regular user checks the "Receive email alerts" check box on the manage repository page. Since the
# user is not an admin user, the email will not include any information about both HTML and image content
# that was included in the change set.
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
smtp_server = trans.app.config.smtp_server
if smtp_server and ( new_repo_alert or repository.email_alerts ):
@@ -522,7 +522,7 @@
log.exception( "An error occurred sending a tool shed repository update alert by email." )
def has_previous_repository_reviews( trans, repository, changeset_revision ):
"""Determine if a repository has a changeset revision review prior to the received changeset revision."""
- repo = hg.repository( get_configured_ui(), repository.repo_path )
+ repo = hg.repository( get_configured_ui(), repository.repo_path( trans.app ) )
reviewed_revision_hashes = [ review.changeset_revision for review in repository.reviews ]
for changeset in reversed_upper_bounded_changelog( repo, changeset_revision ):
previous_changeset_revision = str( repo.changectx( changeset ) )
@@ -537,7 +537,7 @@
"""
original_tool_data_path = trans.app.config.tool_data_path
repository = get_repository_in_tool_shed( trans, repository_id )
- repo_files_dir = repository.repo_path
+ repo_files_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_files_dir )
message = ''
tool = None
@@ -555,7 +555,8 @@
tool,
sample_files )
if invalid_files_and_errors_tups:
- message2 = generate_message_for_invalid_tools( invalid_files_and_errors_tups,
+ message2 = generate_message_for_invalid_tools( trans,
+ invalid_files_and_errors_tups,
repository,
metadata_dict=None,
as_html=True,
@@ -631,7 +632,7 @@
status = 'done'
encoded_id = trans.security.encode_id( repository.id )
repository_clone_url = generate_clone_url_for_repository_in_tool_shed( trans, repository )
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
metadata_dict, invalid_file_tups = generate_metadata_for_changeset_revision( app=trans.app,
repository=repository,
@@ -649,7 +650,7 @@
repository_metadata = create_or_update_repository_metadata( trans,
encoded_id,
repository,
- repository.tip,
+ repository.tip( trans.app ),
metadata_dict )
# If this is the first record stored for this repository, see if we need to send any email alerts.
if len( repository.downloadable_revisions ) == 1:
@@ -659,7 +660,7 @@
if repository_metadata:
downloadable = is_downloadable( metadata_dict )
# Update the last saved repository_metadata table row.
- repository_metadata.changeset_revision = repository.tip
+ repository_metadata.changeset_revision = repository.tip( trans.app )
repository_metadata.metadata = metadata_dict
repository_metadata.downloadable = downloadable
trans.sa_session.add( repository_metadata )
@@ -669,7 +670,7 @@
repository_metadata = create_or_update_repository_metadata( trans,
encoded_id,
repository,
- repository.tip,
+ repository.tip( trans.app ),
metadata_dict )
if 'tools' in metadata_dict and repository_metadata and status != 'error':
# Set tool versions on the new downloadable change set. The order of the list of changesets is critical, so we use the repo's changelog.
@@ -680,11 +681,11 @@
changeset_revisions.append( changeset_revision )
add_tool_versions( trans, encoded_id, repository_metadata, changeset_revisions )
elif len( repo ) == 1 and not invalid_file_tups:
- message = "Revision '%s' includes no tools, datatypes or exported workflows for which metadata can " % str( repository.tip )
+ message = "Revision '%s' includes no tools, datatypes or exported workflows for which metadata can " % str( repository.tip( trans.app ) )
message += "be defined so this revision cannot be automatically installed into a local Galaxy instance."
status = "error"
if invalid_file_tups:
- message = generate_message_for_invalid_tools( invalid_file_tups, repository, metadata_dict )
+ message = generate_message_for_invalid_tools( trans, invalid_file_tups, repository, metadata_dict )
status = 'error'
# Reset the tool_data_tables by loading the empty tool_data_table_conf.xml file.
reset_tool_data_tables( trans.app )
@@ -704,7 +705,7 @@
# is not supported by the mercurial API.
# Make a copy of a repository's files for browsing, remove from disk all files that are not tracked, and commit all
# added, modified or removed files that have not yet been committed.
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
# The following will delete the disk copy of only the files in the repository.
#os.system( 'hg update -r null > /dev/null 2>&1' )
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b lib/galaxy/webapps/community/controllers/hg.py
--- a/lib/galaxy/webapps/community/controllers/hg.py
+++ b/lib/galaxy/webapps/community/controllers/hg.py
@@ -1,7 +1,7 @@
import os, logging
from galaxy.web.base.controller import *
from galaxy.webapps.community.controllers.common import *
-from galaxy.util.shed_util import update_repository
+from galaxy.util.shed_util import get_hgweb_config
from galaxy import eggs
eggs.require('mercurial')
@@ -14,10 +14,16 @@
class HgController( BaseUIController ):
@web.expose
def handle_request( self, trans, **kwd ):
- # The os command that results in this method being called will look something like
+ # The os command that results in this method being called will look something like:
# hg clone http://test@127.0.0.1:9009/repos/test/convert_characters1
hg_version = mercurial.__version__.version
cmd = kwd.get( 'cmd', None )
+ hgweb_config = get_hgweb_config( trans.app )
+ if not os.path.exists( hgweb_config ):
+ raise Exception( "Required file %s does not exist." % str( hgweb_config ) )
+ def make_web_app():
+ hgwebapp = hgwebdir( hgweb_config )
+ return hgwebapp
wsgi_app = wsgiapplication( make_web_app )
if hg_version >= '2.2.3' and cmd == 'pushkey':
# When doing an "hg push" from the command line, the following commands, in order, will be retrieved from environ, depending
@@ -33,15 +39,8 @@
if hg_version >= '2.2.3':
# Set metadata using the repository files on disk.
error_message, status = set_repository_metadata( trans, repository )
- if status not in [ 'ok' ] and error_message:
- log.debug( "Error resetting metadata on repository '%s': %s" % ( str( repository.name ), str( error_message ) ) )
- elif status in [ 'ok' ] and error_message:
- log.debug( "Successfully reset metadata on repository %s, but encountered problem: %s" % ( str( repository.name ), str( error_message ) ) )
+ if status == 'ok' and error_message:
+ log.debug( "Successfully reset metadata on repository %s, but encountered problem: %s" % ( repository.name, error_message ) )
+ elif status != 'ok' and error_message:
+ log.debug( "Error resetting metadata on repository %s: %s" % ( repository.name, error_message ) )
return wsgi_app
-
-def make_web_app():
- hgweb_config = "%s/hgweb.config" % os.getcwd()
- if not os.path.exists( hgweb_config ):
- raise Exception( "Required file hgweb.config does not exist in directory %s" % os.getcwd() )
- hgwebapp = hgwebdir( hgweb_config )
- return hgwebapp
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b lib/galaxy/webapps/community/controllers/repository.py
--- a/lib/galaxy/webapps/community/controllers/repository.py
+++ b/lib/galaxy/webapps/community/controllers/repository.py
@@ -11,12 +11,12 @@
from galaxy.model.orm import *
# TODO: re-factor shed_util to eliminate the following restricted imports
from galaxy.util.shed_util import create_repo_info_dict, generate_clone_url_for_repository_in_tool_shed, generate_message_for_invalid_tools
-from galaxy.util.shed_util import get_changectx_for_changeset, get_configured_ui, get_file_from_changeset_revision, get_repository_file_contents
-from galaxy.util.shed_util import get_repository_in_tool_shed, get_repository_metadata_by_changeset_revision, handle_sample_files_and_load_tool_from_disk
-from galaxy.util.shed_util import handle_sample_files_and_load_tool_from_tmp_config, INITIAL_CHANGELOG_HASH, load_tool_from_config, NOT_TOOL_CONFIGS
-from galaxy.util.shed_util import open_repository_files_folder, remove_dir, reset_all_metadata_on_repository_in_tool_shed
-from galaxy.util.shed_util import reversed_lower_upper_bounded_changelog, reversed_upper_bounded_changelog, strip_path, to_html_escaped
-from galaxy.util.shed_util import update_repository, url_join
+from galaxy.util.shed_util import get_changectx_for_changeset, get_configured_ui, get_file_from_changeset_revision, get_hgweb_config
+from galaxy.util.shed_util import get_repository_file_contents, get_repository_in_tool_shed, get_repository_metadata_by_changeset_revision
+from galaxy.util.shed_util import handle_sample_files_and_load_tool_from_disk, handle_sample_files_and_load_tool_from_tmp_config
+from galaxy.util.shed_util import INITIAL_CHANGELOG_HASH, load_tool_from_config, NOT_TOOL_CONFIGS, open_repository_files_folder, remove_dir
+from galaxy.util.shed_util import reset_all_metadata_on_repository_in_tool_shed, reversed_lower_upper_bounded_changelog
+from galaxy.util.shed_util import reversed_upper_bounded_changelog, strip_path, to_html_escaped, update_repository, url_join
from galaxy.tool_shed.encoding_util import *
from common import *
@@ -129,7 +129,7 @@
grids.GridColumn.__init__( self, col_name )
def get_value( self, trans, grid, repository ):
"""Display the repository tip revision label."""
- return escape_html( repository.revision )
+ return escape_html( repository.revision( trans.app ) )
class DescriptionColumn( grids.TextColumn ):
def get_value( self, trans, grid, repository ):
return escape_html( repository.description )
@@ -361,7 +361,7 @@
for repository in trans.sa_session.query( model.Repository ) \
.filter( and_( model.Repository.table.c.deprecated == False,
model.Repository.table.c.deleted == False ) ):
- allow_push = repository.allow_push
+ allow_push = repository.allow_push( trans.app )
if allow_push:
allow_push_usernames = allow_push.split( ',' )
if username in allow_push_usernames:
@@ -533,7 +533,7 @@
def __add_hgweb_config_entry( self, trans, repository, repository_path ):
# Add an entry in the hgweb.config file for a new repository. An entry looks something like:
# repos/test/mira_assembler = database/community_files/000/repo_123.
- hgweb_config = "%s/hgweb.config" % trans.app.config.root
+ hgweb_config = get_hgweb_config( trans.app )
if repository_path.startswith( './' ):
repository_path = repository_path.replace( './', '', 1 )
entry = "repos/%s/%s = %s" % ( repository.user.username, repository.name, repository_path )
@@ -700,7 +700,7 @@
if k.startswith( changset_revision_str ):
repository_id = trans.security.encode_id( int( k.lstrip( changset_revision_str ) ) )
repository = get_repository_in_tool_shed( trans, repository_id )
- if repository.tip != v:
+ if repository.tip( trans.app ) != v:
return trans.response.send_redirect( web.url_for( controller='repository',
action='browse_repositories',
operation='view_or_manage_repository',
@@ -714,11 +714,11 @@
status = params.get( 'status', 'done' )
commit_message = util.restore_text( params.get( 'commit_message', 'Deleted selected files' ) )
repository = get_repository_in_tool_shed( trans, id )
- repo = hg.repository( get_configured_ui(), repository.repo_path )
+ repo = hg.repository( get_configured_ui(), repository.repo_path( trans.app ) )
# Update repository files for browsing.
update_repository( repo )
- is_malicious = changeset_is_malicious( trans, id, repository.tip )
- metadata = self.get_metadata( trans, id, repository.tip )
+ is_malicious = changeset_is_malicious( trans, id, repository.tip( trans.app ) )
+ metadata = self.get_metadata( trans, id, repository.tip( trans.app ) )
return trans.fill_template( '/webapps/community/repository/browse_repository.mako',
repository=repository,
metadata=metadata,
@@ -799,7 +799,7 @@
if k.startswith( changset_revision_str ):
repository_id = trans.security.encode_id( int( k.lstrip( changset_revision_str ) ) )
repository = get_repository_in_tool_shed( trans, repository_id )
- if repository.tip != v:
+ if repository.tip( trans.app ) != v:
return trans.response.send_redirect( web.url_for( controller='repository',
action='preview_tools_in_changeset',
repository_id=trans.security.encode_id( repository.id ),
@@ -828,10 +828,10 @@
# Change an entry in the hgweb.config file for a repository. This only happens when
# the owner changes the name of the repository. An entry looks something like:
# repos/test/mira_assembler = database/community_files/000/repo_123.
- hgweb_config = "%s/hgweb.config" % trans.app.config.root
+ hgweb_config = get_hgweb_config( trans.app )
# Make a backup of the hgweb.config file since we're going to be changing it.
self.__make_hgweb_config_copy( trans, hgweb_config )
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
old_lhs = "repos/%s/%s" % ( repository.user.username, old_repository_name )
new_entry = "repos/%s/%s = %s\n" % ( repository.user.username, new_repository_name, repo_dir )
tmp_fd, tmp_fname = tempfile.mkstemp()
@@ -855,7 +855,7 @@
owner = params.get( 'owner', None )
changeset_revision = params.get( 'changeset_revision', None )
repository = get_repository_by_name_and_owner( trans, name, owner )
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
# Default to the current changeset revision.
update_to_ctx = get_changectx_for_changeset( repo, changeset_revision )
@@ -869,7 +869,7 @@
url = url_join( galaxy_url,
'admin_toolshed/update_to_changeset_revision?tool_shed_url=%s&name=%s&owner=%s&changeset_revision=%s&latest_changeset_revision=' % \
( url_for( '/', qualified=True ), repository.name, repository.user.username, changeset_revision ) )
- if changeset_revision == repository.tip:
+ if changeset_revision == repository.tip( trans.app ):
# If changeset_revision is the repository tip, there are no additional updates.
if from_update_manager:
return no_update
@@ -894,7 +894,7 @@
changeset_hash = str( repo.changectx( changeset ) )
ctx = get_changectx_for_changeset( repo, changeset_hash )
if update_to_changeset_hash:
- if changeset_hash == repository.tip:
+ if changeset_hash == repository.tip( trans.app ):
update_to_ctx = get_changectx_for_changeset( repo, changeset_hash )
latest_changeset_revision = changeset_hash
break
@@ -926,7 +926,7 @@
message = util.restore_text( params.get( 'message', '' ) )
status = params.get( 'status', 'done' )
repository = get_repository_in_tool_shed( trans, id )
- metadata = self.get_metadata( trans, id, repository.tip )
+ metadata = self.get_metadata( trans, id, repository.tip( trans.app ) )
if trans.user and trans.user.email:
return trans.fill_template( "/webapps/community/repository/contact_owner.mako",
repository=repository,
@@ -936,12 +936,12 @@
else:
# Do all we can to eliminate spam.
return trans.show_error_message( "You must be logged in to contact the owner of a repository." )
- def __create_hgrc_file( self, repository ):
- # At this point, an entry for the repository is required to be in the hgweb.config file so we can call repository.repo_path.
- # Since we support both http and https, we set push_ssl to False to override the default (which is True) in the mercurial api.
- # The hg purge extension purges all files and directories not being tracked by mercurial in the current repository. It'll
- # remove unknown files and empty directories. This is not currently used because it is not supported in the mercurial API.
- repo = hg.repository( get_configured_ui(), path=repository.repo_path )
+ def __create_hgrc_file( self, trans, repository ):
+ # At this point, an entry for the repository is required to be in the hgweb.config file so we can call repository.repo_path( trans.app ).
+ # Since we support both http and https, we set push_ssl to False to override the default (which is True) in the mercurial api. The hg
+ # purge extension purges all files and directories not being tracked by mercurial in the current repository. It'll remove unknown files
+ # and empty directories. This is not currently used because it is not supported in the mercurial API.
+ repo = hg.repository( get_configured_ui(), path=repository.repo_path( trans.app ) )
fp = repo.opener( 'hgrc', 'wb' )
fp.write( '[paths]\n' )
fp.write( 'default = .\n' )
@@ -1001,11 +1001,10 @@
os.makedirs( repository_path )
# Create the local repository
repo = hg.repository( get_configured_ui(), repository_path, create=True )
- # Add an entry in the hgweb.config file for the local repository
- # This enables calls to repository.repo_path
+ # Add an entry in the hgweb.config file for the local repository, enabling calls to repository.repo_path( trans.app )
self.__add_hgweb_config_entry( trans, repository, repository_path )
# Create a .hg/hgrc file for the local repository
- self.__create_hgrc_file( repository )
+ self.__create_hgrc_file( trans, repository )
flush_needed = False
if category_ids:
# Create category associations
@@ -1057,7 +1056,7 @@
status = params.get( 'status', 'done' )
repository, tool, message = load_tool_from_changeset_revision( trans, repository_id, changeset_revision, tool_config )
tool_state = self.__new_state( trans )
- is_malicious = changeset_is_malicious( trans, repository_id, repository.tip )
+ is_malicious = changeset_is_malicious( trans, repository_id, repository.tip( trans.app ) )
metadata = self.get_metadata( trans, repository_id, changeset_revision )
try:
return trans.fill_template( "/webapps/community/repository/tool_form.mako",
@@ -1284,7 +1283,7 @@
repository_owner = kwd[ 'owner' ]
changeset_revision = kwd[ 'changeset_revision' ]
repository = get_repository_by_name_and_owner( trans, repository_name, repository_owner )
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
ctx = get_changectx_for_changeset( repo, changeset_revision )
if ctx:
@@ -1320,7 +1319,7 @@
includes_tools = True
if not includes_tool_dependencies and 'tool_dependencies' in metadata:
includes_tool_dependencies = True
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
ctx = get_changectx_for_changeset( repo, changeset_revision )
repo_info_dict = create_repo_info_dict( repository, repository.user.username, repository_clone_url, changeset_revision, str( ctx.rev() ), metadata )
@@ -1378,7 +1377,7 @@
owner = kwd[ 'owner' ]
changeset_revision = kwd[ 'changeset_revision' ]
repository = get_repository_by_name_and_owner( trans, name, owner )
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
tool_version_dicts = []
for changeset in repo.changelog:
@@ -1402,14 +1401,14 @@
owner = params.get( 'owner', None )
changeset_revision = params.get( 'changeset_revision', None )
repository = get_repository_by_name_and_owner( trans, name, owner )
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
# Default to the received changeset revision and ctx_rev.
update_to_ctx = get_changectx_for_changeset( repo, changeset_revision )
ctx_rev = str( update_to_ctx.rev() )
latest_changeset_revision = changeset_revision
update_dict = dict( changeset_revision=changeset_revision, ctx_rev=ctx_rev )
- if changeset_revision == repository.tip:
+ if changeset_revision == repository.tip( trans.app ):
# If changeset_revision is the repository tip, there are no additional updates.
return tool_shed_encode( update_dict )
else:
@@ -1429,7 +1428,7 @@
if update_to_changeset_hash:
if get_repository_metadata_by_changeset_revision( trans, trans.security.encode_id( repository.id ), changeset_hash ):
# We found a RepositoryMetadata record.
- if changeset_hash == repository.tip:
+ if changeset_hash == repository.tip( trans.app ):
# The current ctx is the repository tip, so use it.
update_to_ctx = get_changectx_for_changeset( repo, changeset_hash )
latest_changeset_revision = changeset_hash
@@ -1446,7 +1445,7 @@
def get_versions_of_tool( self, trans, repository, repository_metadata, guid ):
"""Return the tool lineage in descendant order for the received guid contained in the received repsitory_metadata.tool_versions."""
encoded_id = trans.security.encode_id( repository.id )
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
# Initialize the tool lineage
tool_guid_lineage = [ guid ]
@@ -1462,7 +1461,7 @@
current_child_guid = parent_guid
# Get all descendant guids of the received guid.
current_parent_guid = guid
- for changeset in reversed_lower_upper_bounded_changelog( repo, repository_metadata.changeset_revision, repository.tip ):
+ for changeset in reversed_lower_upper_bounded_changelog( repo, repository_metadata.changeset_revision, repository.tip( trans.app ) ):
ctx = repo.changectx( changeset )
rm = get_repository_metadata_by_changeset_revision( trans, encoded_id, str( ctx ) )
if rm:
@@ -1581,16 +1580,16 @@
repository_clone_url = generate_clone_url( trans, repository_id )
repository, tool, error_message = load_tool_from_changeset_revision( trans, repository_id, changeset_revision, tool_config )
tool_state = self.__new_state( trans )
- is_malicious = changeset_is_malicious( trans, repository_id, repository.tip )
+ is_malicious = changeset_is_malicious( trans, repository_id, repository.tip( trans.app ) )
invalid_file_tups = []
if tool:
invalid_file_tups = check_tool_input_params( trans.app,
- repository.repo_path,
+ repository.repo_path( trans.app ),
tool_config,
tool,
[] )
if invalid_file_tups:
- message = generate_message_for_invalid_tools( invalid_file_tups, repository, {}, as_html=True, displaying_invalid_tool=True )
+ message = generate_message_for_invalid_tools( trans, invalid_file_tups, repository, {}, as_html=True, displaying_invalid_tool=True )
elif error_message:
message = error_message
try:
@@ -1622,7 +1621,8 @@
# Make a backup of the hgweb.config file
today = date.today()
backup_date = today.strftime( "%Y_%m_%d" )
- hgweb_config_copy = '%s/hgweb.config_%s_backup' % ( trans.app.config.root, backup_date )
+ hgweb_config_backup_filename = 'hgweb.config_%s_backup' % backup_date
+ hgweb_config_copy = os.path.join( trans.app.config.hgweb_config_dir, hgweb_config_backup_filename )
shutil.copy( os.path.abspath( hgweb_config ), os.path.abspath( hgweb_config_copy ) )
def __make_same_length( self, list1, list2 ):
# If either list is 1 item, we'll append to it until its length is the same as the other.
@@ -1672,10 +1672,10 @@
status = params.get( 'status', 'done' )
cntrller = params.get( 'cntrller', 'repository' )
repository = get_repository_in_tool_shed( trans, id )
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
repo_name = util.restore_text( params.get( 'repo_name', repository.name ) )
- changeset_revision = util.restore_text( params.get( 'changeset_revision', repository.tip ) )
+ changeset_revision = util.restore_text( params.get( 'changeset_revision', repository.tip( trans.app ) ) )
description = util.restore_text( params.get( 'description', repository.description ) )
long_description = util.restore_text( params.get( 'long_description', repository.long_description ) )
avg_rating, num_ratings = self.get_ave_item_rating_data( trans.sa_session, repository, webapp_model=trans.model )
@@ -1746,7 +1746,7 @@
user = trans.sa_session.query( trans.model.User ).get( trans.security.decode_id( user_id ) )
usernames.append( user.username )
usernames = ','.join( usernames )
- repository.set_allow_push( usernames, remove_auth=remove_auth )
+ repository.set_allow_push( trans.app, usernames, remove_auth=remove_auth )
message = "The repository information has been updated."
elif params.get( 'receive_email_alerts_button', False ):
flush_needed = False
@@ -1766,8 +1766,9 @@
message = "The repository information has been updated."
if error:
status = 'error'
- if repository.allow_push:
- current_allow_push_list = repository.allow_push.split( ',' )
+ current_allow_push = repository.allow_push( trans.app )
+ if current_allow_push:
+ current_allow_push_list = current_allow_push.split( ',' )
else:
current_allow_push_list = []
allow_push_select_field = self.__build_allow_push_select_field( trans, current_allow_push_list )
@@ -1778,7 +1779,7 @@
selected_value=changeset_revision,
add_id_to_name=False,
downloadable=False )
- revision_label = get_revision_label( trans, repository, repository.tip )
+ revision_label = get_revision_label( trans, repository, repository.tip( trans.app ) )
repository_metadata_id = None
metadata = None
is_malicious = False
@@ -1800,7 +1801,7 @@
metadata = repository_metadata.metadata
is_malicious = repository_metadata.malicious
if is_malicious:
- if trans.app.security_agent.can_push( trans.user, repository ):
+ if trans.app.security_agent.can_push( trans.app, trans.user, repository ):
message += malicious_error_can_push
else:
message += malicious_error
@@ -1896,7 +1897,7 @@
message = util.restore_text( params.get( 'message', '' ) )
status = params.get( 'status', 'done' )
repository = get_repository_in_tool_shed( trans, repository_id )
- changeset_revision = util.restore_text( params.get( 'changeset_revision', repository.tip ) )
+ changeset_revision = util.restore_text( params.get( 'changeset_revision', repository.tip( trans.app ) ) )
repository_metadata = get_repository_metadata_by_changeset_revision( trans, repository_id, changeset_revision )
if repository_metadata:
repository_metadata_id = trans.security.encode_id( repository_metadata.id ),
@@ -1935,7 +1936,7 @@
owner = params.get( 'owner', None )
changeset_revision = params.get( 'changeset_revision', None )
repository = get_repository_by_name_and_owner( trans, name, owner )
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
# Get the lower bound changeset revision
lower_bound_changeset_revision = get_previous_downloadable_changset_revision( repository, repo, changeset_revision )
@@ -1961,7 +1962,7 @@
message='Select a repository to rate',
status='error' ) )
repository = get_repository_in_tool_shed( trans, id )
- repo = hg.repository( get_configured_ui(), repository.repo_path )
+ repo = hg.repository( get_configured_ui(), repository.repo_path( trans.app ) )
if repository.user == trans.user:
return trans.response.send_redirect( web.url_for( controller='repository',
action='browse_repositories',
@@ -1974,8 +1975,8 @@
avg_rating, num_ratings = self.get_ave_item_rating_data( trans.sa_session, repository, webapp_model=trans.model )
display_reviews = util.string_as_bool( params.get( 'display_reviews', False ) )
rra = self.get_user_item_rating( trans.sa_session, trans.user, repository, webapp_model=trans.model )
- is_malicious = changeset_is_malicious( trans, id, repository.tip )
- metadata = self.get_metadata( trans, id, repository.tip )
+ is_malicious = changeset_is_malicious( trans, id, repository.tip( trans.app ) )
+ metadata = self.get_metadata( trans, id, repository.tip( trans.app ) )
return trans.fill_template( '/webapps/community/repository/rate_repository.mako',
repository=repository,
metadata=metadata,
@@ -1993,7 +1994,7 @@
invalid_file_tups, metadata_dict = reset_all_metadata_on_repository_in_tool_shed( trans, id, **kwd )
if invalid_file_tups:
repository = get_repository_in_tool_shed( trans, id )
- message = generate_message_for_invalid_tools( invalid_file_tups, repository, metadata_dict )
+ message = generate_message_for_invalid_tools( trans, invalid_file_tups, repository, metadata_dict )
status = 'error'
else:
message = "All repository metadata has been reset."
@@ -2099,14 +2100,14 @@
status = params.get( 'status', 'done' )
commit_message = util.restore_text( params.get( 'commit_message', 'Deleted selected files' ) )
repository = get_repository_in_tool_shed( trans, id )
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
selected_files_to_delete = util.restore_text( params.get( 'selected_files_to_delete', '' ) )
if params.get( 'select_files_to_delete_button', False ):
if selected_files_to_delete:
selected_files_to_delete = selected_files_to_delete.split( ',' )
# Get the current repository tip.
- tip = repository.tip
+ tip = repository.tip( trans.app )
for selected_file in selected_files_to_delete:
try:
commands.remove( repo.ui, repo, selected_file, force=True )
@@ -2139,7 +2140,7 @@
update_repository( repo )
# Get the new repository tip.
repo = hg.repository( get_configured_ui(), repo_dir )
- if tip == repository.tip:
+ if tip == repository.tip( trans.app ):
message += 'No changes to repository. '
kwd[ 'message' ] = message
@@ -2150,7 +2151,7 @@
else:
message = "Select at least 1 file to delete from the repository before clicking <b>Delete selected files</b>."
status = "error"
- is_malicious = changeset_is_malicious( trans, id, repository.tip )
+ is_malicious = changeset_is_malicious( trans, id, repository.tip( trans.app ) )
return trans.fill_template( '/webapps/community/repository/browse_repository.mako',
repo=repo,
repository=repository,
@@ -2283,7 +2284,7 @@
message = util.restore_text( params.get( 'message', '' ) )
status = params.get( 'status', 'done' )
repository = get_repository_in_tool_shed( trans, id )
- repo = hg.repository( get_configured_ui(), repository.repo_path )
+ repo = hg.repository( get_configured_ui(), repository.repo_path( trans.app ) )
changesets = []
for changeset in repo.changelog:
ctx = repo.changectx( changeset )
@@ -2305,8 +2306,8 @@
'has_metadata' : has_metadata }
# Make sure we'll view latest changeset first.
changesets.insert( 0, change_dict )
- is_malicious = changeset_is_malicious( trans, id, repository.tip )
- metadata = self.get_metadata( trans, id, repository.tip )
+ is_malicious = changeset_is_malicious( trans, id, repository.tip( trans.app ) )
+ metadata = self.get_metadata( trans, id, repository.tip( trans.app ) )
return trans.fill_template( '/webapps/community/repository/view_changelog.mako',
repository=repository,
metadata=metadata,
@@ -2320,7 +2321,7 @@
message = util.restore_text( params.get( 'message', '' ) )
status = params.get( 'status', 'done' )
repository = get_repository_in_tool_shed( trans, id )
- repo = hg.repository( get_configured_ui(), repository.repo_path )
+ repo = hg.repository( get_configured_ui(), repository.repo_path( trans.app ) )
ctx = get_changectx_for_changeset( repo, ctx_str )
if ctx is None:
message = "Repository does not include changeset revision '%s'." % str( ctx_str )
@@ -2336,7 +2337,7 @@
diffs = []
for diff in patch.diff( repo, node1=ctx_parent.node(), node2=ctx.node() ):
diffs.append( to_html_escaped( diff ) )
- is_malicious = changeset_is_malicious( trans, id, repository.tip )
+ is_malicious = changeset_is_malicious( trans, id, repository.tip( trans.app ) )
metadata = self.get_metadata( trans, id, ctx_str )
return trans.fill_template( '/webapps/community/repository/view_changeset.mako',
repository=repository,
@@ -2379,7 +2380,7 @@
metadata = None
if metadata and 'readme' in metadata:
readme_file = str( metadata[ 'readme' ] )
- repo_files_dir = repository.repo_path
+ repo_files_dir = repository.repo_path( trans.app )
try:
f = open( readme_file, 'r' )
raw_text = f.read()
@@ -2423,9 +2424,9 @@
status = params.get( 'status', 'done' )
cntrller = params.get( 'cntrller', 'repository' )
repository = get_repository_in_tool_shed( trans, id )
- repo = hg.repository( get_configured_ui(), repository.repo_path )
+ repo = hg.repository( get_configured_ui(), repository.repo_path( trans.app ) )
avg_rating, num_ratings = self.get_ave_item_rating_data( trans.sa_session, repository, webapp_model=trans.model )
- changeset_revision = util.restore_text( params.get( 'changeset_revision', repository.tip ) )
+ changeset_revision = util.restore_text( params.get( 'changeset_revision', repository.tip( trans.app ) ) )
display_reviews = util.string_as_bool( params.get( 'display_reviews', False ) )
alerts = params.get( 'alerts', '' )
alerts_checked = CheckboxField.is_checked( alerts )
@@ -2464,9 +2465,9 @@
else:
repository_metadata_id = None
metadata = None
- is_malicious = changeset_is_malicious( trans, id, repository.tip )
+ is_malicious = changeset_is_malicious( trans, id, repository.tip( trans.app ) )
if is_malicious:
- if trans.app.security_agent.can_push( trans.user, repository ):
+ if trans.app.security_agent.can_push( trans.app, trans.user, repository ):
message += malicious_error_can_push
else:
message += malicious_error
@@ -2505,7 +2506,7 @@
message = util.restore_text( params.get( 'message', '' ) )
status = params.get( 'status', 'done' )
repository = get_repository_in_tool_shed( trans, repository_id )
- repo_files_dir = repository.repo_path
+ repo_files_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_files_dir )
tool_metadata_dict = {}
tool_lineage = []
@@ -2547,7 +2548,7 @@
tool_lineage = self.get_versions_of_tool( trans, repository, repository_metadata, guid )
else:
metadata = None
- is_malicious = changeset_is_malicious( trans, repository_id, repository.tip )
+ is_malicious = changeset_is_malicious( trans, repository_id, repository.tip( trans.app ) )
changeset_revision_select_field = build_changeset_revision_select_field( trans,
repository,
selected_value=changeset_revision,
@@ -2611,7 +2612,7 @@
# Restrict the options to all revisions that have associated metadata.
repository_metadata_revisions = repository.metadata_revisions
for repository_metadata in repository_metadata_revisions:
- rev, label, changeset_revision = get_rev_label_changeset_revision_from_repository_metadata( repository_metadata, repository=repository )
+ rev, label, changeset_revision = get_rev_label_changeset_revision_from_repository_metadata( trans, repository_metadata, repository=repository )
changeset_tups.append( ( rev, label, changeset_revision ) )
refresh_on_change_values.append( changeset_revision )
# Sort options by the revision label. Even though the downloadable_revisions query sorts by update_time,
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b lib/galaxy/webapps/community/controllers/repository_review.py
--- a/lib/galaxy/webapps/community/controllers/repository_review.py
+++ b/lib/galaxy/webapps/community/controllers/repository_review.py
@@ -56,7 +56,7 @@
# Restrict to revisions that have been reviewed.
if repository.reviews:
rval = ''
- repo = hg.repository( get_configured_ui(), repository.repo_path )
+ repo = hg.repository( get_configured_ui(), repository.repo_path( trans.app ) )
for review in repository.reviews:
changeset_revision = review.changeset_revision
rev, label = get_rev_label_from_changeset_revision( repo, changeset_revision )
@@ -71,7 +71,9 @@
if repository_metadata_revisions:
rval = ''
for repository_metadata in repository_metadata_revisions:
- rev, label, changeset_revision = get_rev_label_changeset_revision_from_repository_metadata( repository_metadata, repository=repository )
+ rev, label, changeset_revision = get_rev_label_changeset_revision_from_repository_metadata( trans,
+ repository_metadata,
+ repository=repository )
rval += '<a href="manage_repository_reviews_of_revision'
rval += '?id=%s&changeset_revision=%s">%s</a><br/>' % ( trans.security.encode_id( repository.id ), changeset_revision, label )
return rval
@@ -309,7 +311,7 @@
status = params.get( 'status', 'done' )
review = get_review( trans, kwd[ 'id' ] )
repository = review.repository
- repo = hg.repository( get_configured_ui(), repository.repo_path )
+ repo = hg.repository( get_configured_ui(), repository.repo_path( trans.app ) )
rev, changeset_revision_label = get_rev_label_from_changeset_revision( repo, review.changeset_revision )
return trans.fill_template( '/webapps/community/repository_review/browse_review.mako',
repository=repository,
@@ -468,7 +470,7 @@
for component in get_components( trans ):
components_dict[ component.name ] = dict( component=component, component_review=None )
repository = review.repository
- repo = hg.repository( get_configured_ui(), repository.repo_path )
+ repo = hg.repository( get_configured_ui(), repository.repo_path( trans.app ) )
for component_review in review.component_reviews:
if component_review and component_review.component:
component_name = component_review.component.name
@@ -652,7 +654,7 @@
repository_id = kwd.get( 'id', None )
if repository_id:
repository = get_repository_in_tool_shed( trans, repository_id )
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
metadata_revision_hashes = [ metadata_revision.changeset_revision for metadata_revision in repository.metadata_revisions ]
reviewed_revision_hashes = [ review.changeset_revision for review in repository.reviews ]
@@ -699,7 +701,7 @@
repository_id = kwd.get( 'id', None )
changeset_revision = kwd.get( 'changeset_revision', None )
repository = get_repository_in_tool_shed( trans, repository_id )
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
installable = changeset_revision in [ metadata_revision.changeset_revision for metadata_revision in repository.metadata_revisions ]
rev, changeset_revision_label = get_rev_label_from_changeset_revision( repo, changeset_revision )
@@ -765,7 +767,7 @@
status = params.get( 'status', 'done' )
repository = get_repository_in_tool_shed( trans, kwd[ 'id' ] )
changeset_revision = kwd.get( 'changeset_revision', None )
- repo = hg.repository( get_configured_ui(), repository.repo_path )
+ repo = hg.repository( get_configured_ui(), repository.repo_path( trans.app ) )
previous_reviews_dict = get_previous_repository_reviews( trans, repository, changeset_revision )
rev, changeset_revision_label = get_rev_label_from_changeset_revision( repo, changeset_revision )
return trans.fill_template( '/webapps/community/repository_review/select_previous_review.mako',
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b lib/galaxy/webapps/community/controllers/upload.py
--- a/lib/galaxy/webapps/community/controllers/upload.py
+++ b/lib/galaxy/webapps/community/controllers/upload.py
@@ -31,19 +31,19 @@
categories = get_categories( trans )
repository_id = params.get( 'repository_id', '' )
repository = get_repository_in_tool_shed( trans, repository_id )
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
uncompress_file = util.string_as_bool( params.get( 'uncompress_file', 'true' ) )
remove_repo_files_not_in_tar = util.string_as_bool( params.get( 'remove_repo_files_not_in_tar', 'true' ) )
uploaded_file = None
upload_point = self.__get_upload_point( repository, **kwd )
- tip = repository.tip
+ tip = repository.tip( trans.app )
file_data = params.get( 'file_data', '' )
url = params.get( 'url', '' )
# Part of the upload process is sending email notification to those that have registered to
# receive them. One scenario occurs when the first change set is produced for the repository.
# See the handle_email_alerts() method for the definition of the scenarios.
- new_repo_alert = repository.is_new
+ new_repo_alert = repository.is_new( trans.app )
uploaded_directory = None
if params.get( 'upload_button', False ):
if file_data == '' and url == '':
@@ -158,7 +158,7 @@
# Update the repository files for browsing.
update_repository( repo )
# Get the new repository tip.
- if tip == repository.tip:
+ if tip == repository.tip( trans.app ):
message = 'No changes to repository. '
status = 'warning'
else:
@@ -215,7 +215,7 @@
message=message,
status=status )
def upload_directory( self, trans, repository, uploaded_directory, upload_point, remove_repo_files_not_in_tar, commit_message, new_repo_alert ):
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
undesirable_dirs_removed = 0
undesirable_files_removed = 0
@@ -251,7 +251,7 @@
return self.__handle_directory_changes(trans, repository, full_path, filenames_in_archive, remove_repo_files_not_in_tar, new_repo_alert, commit_message, undesirable_dirs_removed, undesirable_files_removed)
def upload_tar( self, trans, repository, tar, uploaded_file, upload_point, remove_repo_files_not_in_tar, commit_message, new_repo_alert ):
# Upload a tar archive of files.
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
undesirable_dirs_removed = 0
undesirable_files_removed = 0
@@ -284,12 +284,12 @@
uploaded_file.close()
return self.__handle_directory_changes(trans, repository, full_path, filenames_in_archive, remove_repo_files_not_in_tar, new_repo_alert, commit_message, undesirable_dirs_removed, undesirable_files_removed)
def __handle_directory_changes( self, trans, repository, full_path, filenames_in_archive, remove_repo_files_not_in_tar, new_repo_alert, commit_message, undesirable_dirs_removed, undesirable_files_removed ):
- repo_dir = repository.repo_path
+ repo_dir = repository.repo_path( trans.app )
repo = hg.repository( get_configured_ui(), repo_dir )
content_alert_str = ''
files_to_remove = []
filenames_in_archive = [ os.path.join( full_path, name ) for name in filenames_in_archive ]
- if remove_repo_files_not_in_tar and not repository.is_new:
+ if remove_repo_files_not_in_tar and not repository.is_new( trans.app ):
# We have a repository that is not new (it contains files), so discover
# those files that are in the repository, but not in the uploaded archive.
for root, dirs, files in os.walk( full_path ):
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b lib/galaxy/webapps/community/framework/middleware/remoteuser.py
--- a/lib/galaxy/webapps/community/framework/middleware/remoteuser.py
+++ b/lib/galaxy/webapps/community/framework/middleware/remoteuser.py
@@ -53,8 +53,7 @@
if host in self.display_servers:
environ[ 'HTTP_REMOTE_USER' ] = 'remote_display_server@%s' % ( self.maildomain or 'example.org' )
return self.app( environ, start_response )
- # Apache sets REMOTE_USER to the string '(null)' when using the
- # Rewrite* method for passing REMOTE_USER and a user is
+ # Apache sets REMOTE_USER to the string '(null)' when using the Rewrite* method for passing REMOTE_USER and a user is
# un-authenticated. Any other possible values need to go here as well.
path_info = environ.get('PATH_INFO', '')
if environ.has_key( 'HTTP_REMOTE_USER' ) and environ[ 'HTTP_REMOTE_USER' ] != '(null)':
@@ -62,16 +61,14 @@
if self.maildomain is not None:
environ[ 'HTTP_REMOTE_USER' ] += '@' + self.maildomain
else:
- title = "Access to Galaxy is denied"
+ title = "Access to this Galaxy tool shed is denied"
message = """
- Galaxy is configured to authenticate users via an external
- method (such as HTTP authentication in Apache), but only a
- username (not an email address) was provided by the
- upstream (proxy) server. Since Galaxy usernames are email
- addresses, a default mail domain must be set.</p>
- <p>Please contact your local Galaxy administrator. The
- variable <code>remote_user_maildomain</code> must be set
- before you may access Galaxy.
+ This Galaxy tool shed is configured to authenticate users via an external
+ method (such as HTTP authentication in Apache), but only a username (not
+ an email address) was provided by the upstream (proxy) server. Since tool
+ shed usernames are email addresses, a default mail domain must be set.</[>
+ <p>The variable <code>remote_user_maildomain</code> must be set before you
+ can access this tool shed. Contact your local tool shed administrator.
"""
return self.error( start_response, title, message )
return self.app( environ, start_response )
@@ -79,15 +76,15 @@
# The API handles its own authentication via keys
return self.app( environ, start_response )
else:
- title = "Access to Galaxy is denied"
+ title = "Access to this Galaxy tool shed is denied"
message = """
- Galaxy is configured to authenticate users via an external
- method (such as HTTP authentication in Apache), but a username
- was not provided by the upstream (proxy) server. This is
- generally due to a misconfiguration in the upstream server.</p>
- <p>Please contact your local Galaxy administrator.
+ This Galaxy tool shed is configured to authenticate users via an external
+ method (such as HTTP authentication in Apache), but a username was not
+ provided by the upstream (proxy) server. This is generally due to a
+ misconfiguration in the upstream server.</p>
+ <p>Contact your local Galaxy tool shed administrator.
"""
return self.error( start_response, title, message )
- def error( self, start_response, title="Access denied", message="Please contact your local Galaxy administrator." ):
+ def error( self, start_response, title="Access denied", message="Contact your local Galaxy tool shed administrator." ):
start_response( '403 Forbidden', [('Content-type', 'text/html')] )
return [errorpage % (title, message)]
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b lib/galaxy/webapps/community/model/__init__.py
--- a/lib/galaxy/webapps/community/model/__init__.py
+++ b/lib/galaxy/webapps/community/model/__init__.py
@@ -6,6 +6,7 @@
"""
import os.path, os, errno, sys, codecs, operator, logging, tarfile, mimetypes, ConfigParser
from galaxy import util
+from galaxy.util.shed_util import get_hgweb_config
from galaxy.util.bunch import Bunch
from galaxy.util.hash_util import *
from galaxy.web.form_builder import *
@@ -15,7 +16,7 @@
from mercurial import hg, ui
log = logging.getLogger( __name__ )
-
+
class User( object ):
def __init__( self, email=None, password=None ):
self.email = email
@@ -109,6 +110,10 @@
MARKED_FOR_REMOVAL = 'r',
MARKED_FOR_ADDITION = 'a',
NOT_TRACKED = '?' )
+ # Handle to the hgweb.config file on disk.
+ hgweb_config_file = None
+ # This repository's entry in the hgweb.config file on disk.
+ hgweb_path = None
def __init__( self, name=None, description=None, long_description=None, user_id=None, private=False, email_alerts=None, times_downloaded=0,
deprecated=False ):
self.name = name or "Unnamed repository"
@@ -119,42 +124,43 @@
self.email_alerts = email_alerts
self.times_downloaded = times_downloaded
self.deprecated = deprecated
- @property
- def repo_path( self ):
- # Repository locations on disk are defined in the hgweb.config file
- # in the Galaxy install directory. An entry looks something like:
- # repos/test/mira_assembler = database/community_files/000/repo_123
- # TODO: handle this using the mercurial api.
- lhs = "repos/%s/%s" % ( self.user.username, self.name )
- hgweb_config = "%s/hgweb.config" % os.getcwd()
- if not os.path.exists( hgweb_config ):
- raise Exception( "Required file hgweb.config does not exist in directory %s" % os.getcwd() )
- config = ConfigParser.ConfigParser()
- config.read( hgweb_config )
- for option in config.options( "paths" ):
- if option == lhs:
- return config.get( "paths", option )
- raise Exception( "Entry for repository %s missing in %s/hgweb.config file." % ( lhs, os.getcwd() ) )
- @property
- def revision( self ):
- repo = hg.repository( ui.ui(), self.repo_path )
+ def get_hgweb_config_file( self, app ):
+ if self.hgweb_config_file is None:
+ self.hgweb_config_file = get_hgweb_config( app )
+ return self.hgweb_config_file
+ def get_hgweb_path( self, app ):
+ # TODO: If possible, handle this using the mercurial api.
+ if self.hgweb_path is None:
+ lhs = os.path.join( "repos", self.user.username, self.name )
+ config = ConfigParser.ConfigParser()
+ config.read( self.get_hgweb_config_file( app ) )
+ for option in config.options( "paths" ):
+ if option == lhs:
+ self.hgweb_path = config.get( "paths", option )
+ break
+ if self.hgweb_path is None:
+ raise Exception( "Entry for repository %s missing in file %s." % ( lhs, hgweb_config ) )
+ return self.hgweb_path
+ def repo_path( self, app ):
+ # Repository locations on disk are stored in the hgweb.config file located in the directory defined by the config setting hgweb_config_dir.
+ # An entry looks something like: repos/test/mira_assembler = database/community_files/000/repo_123
+ return self.get_hgweb_path( app )
+ def revision( self, app ):
+ repo = hg.repository( ui.ui(), self.repo_path( app ) )
tip_ctx = repo.changectx( repo.changelog.tip() )
return "%s:%s" % ( str( tip_ctx.rev() ), str( repo.changectx( repo.changelog.tip() ) ) )
- @property
- def tip( self ):
- repo = hg.repository( ui.ui(), self.repo_path )
+ def tip( self, app ):
+ repo = hg.repository( ui.ui(), self.repo_path( app ) )
return str( repo.changectx( repo.changelog.tip() ) )
- @property
- def is_new( self ):
- repo = hg.repository( ui.ui(), self.repo_path )
+ def is_new( self, app ):
+ repo = hg.repository( ui.ui(), self.repo_path( app ) )
tip_ctx = repo.changectx( repo.changelog.tip() )
return tip_ctx.rev() < 0
- @property
- def allow_push( self ):
- repo = hg.repository( ui.ui(), self.repo_path )
+ def allow_push( self, app ):
+ repo = hg.repository( ui.ui(), self.repo_path( app ) )
return repo.ui.config( 'web', 'allow_push' )
- def set_allow_push( self, usernames, remove_auth='' ):
- allow_push = util.listify( self.allow_push )
+ def set_allow_push( self, app, usernames, remove_auth='' ):
+ allow_push = util.listify( self.allow_push( app ) )
if remove_auth:
allow_push.remove( remove_auth )
else:
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b lib/galaxy/webapps/community/model/mapping.py
--- a/lib/galaxy/webapps/community/model/mapping.py
+++ b/lib/galaxy/webapps/community/model/mapping.py
@@ -315,7 +315,7 @@
result.engine = engine
result.session = Session
result.create_tables = create_tables
- #load local galaxy security policy
+ # Load local tool shed security policy
result.security_agent = CommunityRBACAgent( result )
result.shed_counter = ShedCounter( result )
return result
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b lib/galaxy/webapps/community/security/__init__.py
--- a/lib/galaxy/webapps/community/security/__init__.py
+++ b/lib/galaxy/webapps/community/security/__init__.py
@@ -159,9 +159,9 @@
self.associate_components( user=user, role=role )
for group in groups:
self.associate_components( user=user, group=group )
- def can_push( self, user, repository ):
+ def can_push( self, app, user, repository ):
if user:
- return user.username in listify( repository.allow_push )
+ return user.username in listify( repository.allow_push( app ) )
return False
def user_can_review_repositories( self, user ):
if user:
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b templates/webapps/community/admin/statistics.mako
--- a/templates/webapps/community/admin/statistics.mako
+++ b/templates/webapps/community/admin/statistics.mako
@@ -18,10 +18,10 @@
<td>Total repositories</td><td>${trans.app.shed_counter.repositories | h}</td></tr>
- <tr>
- <td>Empty repositories</td>
- <td>${trans.app.shed_counter.new_repositories | h}</td>
- </tr>
+ ##<tr>
+ ## <td>Empty repositories</td>
+ ## <td>${trans.app.shed_counter.new_repositories | h}</td>
+ ##</tr><tr><td>Deleted repositories</td><td>${trans.app.shed_counter.deleted_repositories | h}</td>
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b templates/webapps/community/common/view_readme.mako
--- a/templates/webapps/community/common/view_readme.mako
+++ b/templates/webapps/community/common/view_readme.mako
@@ -5,9 +5,9 @@
<%
if trans.webapp.name == 'community':
is_admin = trans.user_is_admin()
- is_new = repository.is_new
+ is_new = repository.is_new( trans.app )
can_contact_owner = trans.user and trans.user != repository.user
- can_push = trans.app.security_agent.can_push( trans.user, repository )
+ can_push = trans.app.security_agent.can_push( trans.app, trans.user, repository )
can_rate = not is_new and trans.user and repository.user != trans.user
can_upload = can_push
can_download = not is_new and ( not is_malicious or can_push )
@@ -26,9 +26,9 @@
<li><a class="action-button" id="repository-${repository.id}-popup" class="menubutton">Repository Actions</a></li><div popupmenu="repository-${repository.id}-popup">
%if can_manage:
- <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">Manage repository</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">Manage repository</a>
%else:
- <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">View repository</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">View repository</a>
%endif
%if can_upload:
<a class="action-button" href="${h.url_for( controller='upload', action='upload', repository_id=trans.security.encode_id( repository.id ) )}">Upload files to repository</a>
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b templates/webapps/community/repository/browse_repository.mako
--- a/templates/webapps/community/repository/browse_repository.mako
+++ b/templates/webapps/community/repository/browse_repository.mako
@@ -6,9 +6,9 @@
<%
from galaxy.web.framework.helpers import time_ago
is_admin = trans.user_is_admin()
- is_new = repository.is_new
+ is_new = repository.is_new( trans.app )
can_contact_owner = trans.user and trans.user != repository.user
- can_push = trans.app.security_agent.can_push( trans.user, repository )
+ can_push = trans.app.security_agent.can_push( trans.app, trans.user, repository )
can_upload = can_push
can_download = not is_new and ( not is_malicious or can_push )
can_browse_contents = not is_new
@@ -70,15 +70,15 @@
<li><a class="action-button" id="repository-${repository.id}-popup" class="menubutton">Repository Actions</a></li><div popupmenu="repository-${repository.id}-popup">
%if can_manage:
- <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">Manage repository</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">Manage repository</a>
%else:
- <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">View repository</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">View repository</a>
%endif
%if can_upload:
<a class="action-button" href="${h.url_for( controller='upload', action='upload', repository_id=trans.security.encode_id( repository.id ) )}">Upload files to repository</a>
%endif
%if has_readme:
- <a class="action-button" href="${h.url_for( controller='repository', action='view_readme', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">View README</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='view_readme', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">View README</a>
%endif
%if can_view_change_log:
<a class="action-button" href="${h.url_for( controller='repository', action='view_changelog', id=trans.app.security.encode_id( repository.id ) )}">View change log</a>
@@ -87,9 +87,9 @@
<a class="action-button" href="${h.url_for( controller='repository', action='rate_repository', id=trans.app.security.encode_id( repository.id ) )}">Rate repository</a>
%endif
%if can_download:
- <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip, file_type='gz' )}">Download as a .tar.gz file</a>
- <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip, file_type='bz2' )}">Download as a .tar.bz2 file</a>
- <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip, file_type='zip' )}">Download as a zip file</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ), file_type='gz' )}">Download as a .tar.gz file</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ), file_type='bz2' )}">Download as a .tar.bz2 file</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ), file_type='zip' )}">Download as a zip file</a>
%endif
</div>
%endif
@@ -101,7 +101,7 @@
%if can_browse_contents:
<div class="toolForm">
- <div class="toolFormTitle">Browse ${repository.name | h} revision ${repository.tip | h} (repository tip)</div>
+ <div class="toolFormTitle">Browse ${repository.name | h} revision ${repository.tip( trans.app ) | h} (repository tip)</div>
%if can_download:
<div class="form-row"><label>Clone this repository:</label>
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b templates/webapps/community/repository/common.mako
--- a/templates/webapps/community/repository/common.mako
+++ b/templates/webapps/community/repository/common.mako
@@ -22,7 +22,7 @@
// initAjax is hard to fake, so we pass the children as object array:
initAjax: {url: "${h.url_for( controller='repository', action='open_folder' )}",
dataType: "json",
- data: { folder_path: "${repository.repo_path}" },
+ data: { folder_path: "${repository.repo_path( trans.app )}" },
},
onLazyRead: function(dtnode){
dtnode.appendAjax({
@@ -51,7 +51,7 @@
var cell = $("#file_contents");
var selected_value;
if (dtnode.data.key == 'root') {
- selected_value = "${repository.repo_path}/";
+ selected_value = "${repository.repo_path( trans.app )}/";
} else {
selected_value = dtnode.data.key;
};
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b templates/webapps/community/repository/contact_owner.mako
--- a/templates/webapps/community/repository/contact_owner.mako
+++ b/templates/webapps/community/repository/contact_owner.mako
@@ -3,9 +3,9 @@
<%
is_admin = trans.user_is_admin()
- is_new = repository.is_new
+ is_new = repository.is_new( trans.app )
can_contact_owner = trans.user and trans.user != repository.user
- can_push = trans.app.security_agent.can_push( trans.user, repository )
+ can_push = trans.app.security_agent.can_push( trans.app, trans.user, repository )
can_upload = can_push
can_download = not is_new and ( not is_malicious or can_push )
can_browse_contents = not is_new
@@ -44,7 +44,7 @@
<a class="action-button" href="${h.url_for( controller='upload', action='upload', repository_id=trans.security.encode_id( repository.id ) )}">Upload files to repository</a>
%endif
%if has_readme:
- <a class="action-button" href="${h.url_for( controller='repository', action='view_readme', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">View README</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='view_readme', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">View README</a>
%endif
%if can_view_change_log:
<a class="action-button" href="${h.url_for( controller='repository', action='view_changelog', id=trans.app.security.encode_id( repository.id ) )}">View change log</a>
@@ -53,9 +53,9 @@
<a class="action-button" href="${h.url_for( controller='repository', action='browse_repository', id=trans.app.security.encode_id( repository.id ) )}">${browse_label | h}</a>
%endif
%if can_download:
- <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip, file_type='gz' )}">Download as a .tar.gz file</a>
- <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip, file_type='bz2' )}">Download as a .tar.bz2 file</a>
- <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip, file_type='zip' )}">Download as a zip file</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ), file_type='gz' )}">Download as a .tar.gz file</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ), file_type='bz2' )}">Download as a .tar.bz2 file</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ), file_type='zip' )}">Download as a zip file</a>
%endif
</div>
%endif
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b templates/webapps/community/repository/manage_repository.mako
--- a/templates/webapps/community/repository/manage_repository.mako
+++ b/templates/webapps/community/repository/manage_repository.mako
@@ -6,10 +6,10 @@
<%
from galaxy.web.framework.helpers import time_ago
is_admin = trans.user_is_admin()
- is_new = repository.is_new
+ is_new = repository.is_new( trans.app )
is_deprecated = repository.deprecated
can_contact_owner = trans.user and trans.user != repository.user
- can_push = not is_deprecated and trans.app.security_agent.can_push( trans.user, repository )
+ can_push = not is_deprecated and trans.app.security_agent.can_push( trans.app, trans.user, repository )
can_upload = can_push
can_download = not is_deprecated and not is_new and ( not is_malicious or can_push )
can_browse_contents = not is_new
@@ -20,14 +20,14 @@
browse_label = 'Browse or delete repository tip files'
else:
browse_label = 'Browse repository tip files'
- can_set_malicious = metadata and can_set_metadata and is_admin and changeset_revision == repository.tip
+ can_set_malicious = metadata and can_set_metadata and is_admin and changeset_revision == repository.tip( trans.app )
can_deprecate = not is_new and trans.user and ( is_admin or repository.user == trans.user ) and not is_deprecated
can_undeprecate = trans.user and ( is_admin or repository.user == trans.user ) and is_deprecated
can_reset_all_metadata = not is_deprecated and is_admin and len( repo ) > 0
has_readme = metadata and 'readme' in metadata
can_review_repository = not is_deprecated and trans.app.security_agent.user_can_review_repositories( trans.user )
reviewing_repository = cntrller and cntrller == 'repository_review'
- if changeset_revision == repository.tip:
+ if changeset_revision == repository.tip( trans.app ):
tip_str = 'repository tip'
else:
tip_str = ''
@@ -191,7 +191,7 @@
%if is_admin:
<div class="form-row"><label>Location:</label>
- ${repository.repo_path | h}
+ ${repository.repo_path( trans.app ) | h}
</div><div class="form-row"><label>Deleted:</label>
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b templates/webapps/community/repository/preview_tools_in_changeset.mako
--- a/templates/webapps/community/repository/preview_tools_in_changeset.mako
+++ b/templates/webapps/community/repository/preview_tools_in_changeset.mako
@@ -4,9 +4,9 @@
<%namespace file="/webapps/community/repository/common.mako" import="*" /><%
- is_new = repository.is_new
+ is_new = repository.is_new( trans.app )
can_contact_owner = trans.user and trans.user != repository.user
- can_push = trans.app.security_agent.can_push( trans.user, repository )
+ can_push = trans.app.security_agent.can_push( trans.app, trans.user, repository )
can_rate = not is_new and trans.user and repository.user != trans.user
can_upload = can_push
can_download = not is_new and ( not is_malicious or can_push )
@@ -59,7 +59,7 @@
<form name="change_revision" id="change_revision" action="${h.url_for( controller='repository', action='preview_tools_in_changeset', repository_id=trans.security.encode_id( repository.id ) )}" method="post" ><div class="form-row"><%
- if changeset_revision == repository.tip:
+ if changeset_revision == repository.tip( trans.app ):
tip_str = 'repository tip'
else:
tip_str = ''
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b templates/webapps/community/repository/rate_repository.mako
--- a/templates/webapps/community/repository/rate_repository.mako
+++ b/templates/webapps/community/repository/rate_repository.mako
@@ -6,9 +6,9 @@
from galaxy.web.framework.helpers import time_ago
from urllib import quote_plus
is_admin = trans.user_is_admin()
- is_new = repository.is_new
+ is_new = repository.is_new( trans.app )
can_contact_owner = trans.user and trans.user != repository.user
- can_push = trans.app.security_agent.can_push( trans.user, repository )
+ can_push = trans.app.security_agent.can_push( trans.app, trans.user, repository )
can_upload = can_push
can_download = not is_new and ( not is_malicious or can_push )
can_browse_contents = not is_new
@@ -77,15 +77,15 @@
<li><a class="action-button" id="repository-${repository.id}-popup" class="menubutton">Repository Actions</a></li><div popupmenu="repository-${repository.id}-popup">
%if can_manage:
- <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">Manage repository</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">Manage repository</a>
%else:
- <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">View repository</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">View repository</a>
%endif
%if can_upload:
<a class="action-button" href="${h.url_for( controller='upload', action='upload', repository_id=trans.security.encode_id( repository.id ) )}">Upload files to repository</a>
%endif
%if has_readme:
- <a class="action-button" href="${h.url_for( controller='repository', action='view_readme', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">View README</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='view_readme', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">View README</a>
%endif
%if can_view_change_log:
<a class="action-button" href="${h.url_for( controller='repository', action='view_changelog', id=trans.app.security.encode_id( repository.id ) )}">View change log</a>
@@ -97,9 +97,9 @@
<a class="action-button" href="${h.url_for( controller='repository', action='contact_owner', id=trans.security.encode_id( repository.id ) )}">Contact repository owner</a>
%endif
%if can_download:
- <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip, file_type='gz' )}">Download as a .tar.gz file</a>
- <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip, file_type='bz2' )}">Download as a .tar.bz2 file</a>
- <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip, file_type='zip' )}">Download as a zip file</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ), file_type='gz' )}">Download as a .tar.gz file</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ), file_type='bz2' )}">Download as a .tar.bz2 file</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ), file_type='zip' )}">Download as a zip file</a>
%endif
</div>
%endif
@@ -122,7 +122,7 @@
</div><div class="form-row"><label>Version:</label>
- ${repository.revision | h}
+ ${repository.revision( trans.app ) | h}
<div style="clear: both"></div></div><div class="form-row">
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b templates/webapps/community/repository/tool_form.mako
--- a/templates/webapps/community/repository/tool_form.mako
+++ b/templates/webapps/community/repository/tool_form.mako
@@ -8,9 +8,9 @@
from galaxy.web.form_builder import SelectField
is_admin = trans.user_is_admin()
- is_new = repository.is_new
+ is_new = repository.is_new( trans.app )
can_contact_owner = trans.user and trans.user != repository.user
- can_push = trans.app.security_agent.can_push( trans.user, repository )
+ can_push = trans.app.security_agent.can_push( trans.app, trans.user, repository )
can_upload = can_push
can_download = not is_new and ( not is_malicious or can_push )
can_browse_contents = not is_new
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b templates/webapps/community/repository/upload.mako
--- a/templates/webapps/community/repository/upload.mako
+++ b/templates/webapps/community/repository/upload.mako
@@ -3,7 +3,7 @@
<%
is_admin = trans.user_is_admin()
- is_new = repository.is_new
+ is_new = repository.is_new( trans.app )
can_browse_contents = not is_new
can_browse_contents = not is_new
can_rate = repository.user != trans.user
@@ -48,9 +48,9 @@
<li><a class="action-button" id="repository-${repository.id}-popup" class="menubutton">Repository Actions</a></li><div popupmenu="repository-${repository.id}-popup">
%if can_manage:
- <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">Manage repository</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">Manage repository</a>
%else:
- <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">View repository</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">View repository</a>
%endif
%if can_view_change_log:
<a class="action-button" href="${h.url_for( controller='repository', action='view_changelog', id=trans.app.security.encode_id( repository.id ) )}">View change log</a>
@@ -154,7 +154,7 @@
</div><div style="clear: both"></div></div>
- %if not repository.is_new:
+ %if not repository.is_new( trans.app ):
<div class="form-row" ><label>Contents:</label><div id="tree" >
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b templates/webapps/community/repository/view_changelog.mako
--- a/templates/webapps/community/repository/view_changelog.mako
+++ b/templates/webapps/community/repository/view_changelog.mako
@@ -6,11 +6,11 @@
<%
from galaxy.web.framework.helpers import time_ago
is_admin = trans.user_is_admin()
- is_new = repository.is_new
+ is_new = repository.is_new( trans.app )
can_contact_owner = trans.user and trans.user != repository.user
can_browse_contents = not is_new
can_manage = is_admin or trans.user == repository.user
- can_push = trans.app.security_agent.can_push( trans.user, repository )
+ can_push = trans.app.security_agent.can_push( trans.app, trans.user, repository )
can_rate = trans.user and repository.user != trans.user
can_upload = can_push
can_download = not is_new and ( not is_malicious or can_push )
@@ -48,12 +48,12 @@
<a class="action-button" href="${h.url_for( controller='upload', action='upload', repository_id=trans.security.encode_id( repository.id ) )}">Upload files to repository</a>
%endif
%if can_manage:
- <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.security.encode_id( repository.id ), changeset_revision=repository.tip )}">Manage repository</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">Manage repository</a>
%else:
- <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.security.encode_id( repository.id ), changeset_revision=repository.tip )}">View repository</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">View repository</a>
%endif
%if has_readme:
- <a class="action-button" href="${h.url_for( controller='repository', action='view_readme', id=trans.security.encode_id( repository.id ), changeset_revision=repository.tip )}">View README</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='view_readme', id=trans.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">View README</a>
%endif
%if can_rate:
<a class="action-button" href="${h.url_for( controller='repository', action='rate_repository', id=trans.security.encode_id( repository.id ) )}">Rate repository</a>
@@ -65,9 +65,9 @@
<a class="action-button" href="${h.url_for( controller='repository', action='contact_owner', id=trans.security.encode_id( repository.id ) )}">Contact repository owner</a>
%endif
%if can_download:
- <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.security.encode_id( repository.id ), changeset_revision=repository.tip, file_type='gz' )}">Download as a .tar.gz file</a>
- <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.security.encode_id( repository.id ), changeset_revision=repository.tip, file_type='bz2' )}">Download as a .tar.bz2 file</a>
- <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.security.encode_id( repository.id ), changeset_revision=repository.tip, file_type='zip' )}">Download as a zip file</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ), file_type='gz' )}">Download as a .tar.gz file</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ), file_type='bz2' )}">Download as a .tar.bz2 file</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ), file_type='zip' )}">Download as a zip file</a>
%endif
</div></ul>
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b templates/webapps/community/repository/view_changeset.mako
--- a/templates/webapps/community/repository/view_changeset.mako
+++ b/templates/webapps/community/repository/view_changeset.mako
@@ -6,12 +6,12 @@
<%
from galaxy.web.framework.helpers import time_ago
is_admin = trans.user_is_admin()
- is_new = repository.is_new
+ is_new = repository.is_new( trans.app )
can_contact_owner = trans.user and trans.user != repository.user
can_browse_contents = not is_new
can_rate = trans.user and repository.user != trans.user
can_manage = is_admin or trans.user == repository.user
- can_push = trans.app.security_agent.can_push( trans.user, repository )
+ can_push = trans.app.security_agent.can_push( trans.app, trans.user, repository )
can_view_change_log = not is_new
can_upload = can_push
can_download = not is_new and ( not is_malicious or can_push )
@@ -49,12 +49,12 @@
<a class="action-button" href="${h.url_for( controller='upload', action='upload', repository_id=trans.security.encode_id( repository.id ) )}">Upload files to repository</a>
%endif
%if can_manage:
- <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">Manage repository</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">Manage repository</a>
%else:
- <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">View repository</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">View repository</a>
%endif
%if has_readme:
- <a class="action-button" href="${h.url_for( controller='repository', action='view_readme', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">View README</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='view_readme', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">View README</a>
%endif
%if can_view_change_log:
<a class="action-button" href="${h.url_for( controller='repository', action='view_changelog', id=trans.app.security.encode_id( repository.id ) )}">View change log</a>
@@ -69,9 +69,9 @@
<a class="action-button" href="${h.url_for( controller='repository', action='contact_owner', id=trans.security.encode_id( repository.id ) )}">Contact repository owner</a>
%endif
%if can_download:
- <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip, file_type='gz' )}">Download as a .tar.gz file</a>
- <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip, file_type='bz2' )}">Download as a .tar.bz2 file</a>
- <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip, file_type='zip' )}">Download as a zip file</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ), file_type='gz' )}">Download as a .tar.gz file</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ), file_type='bz2' )}">Download as a .tar.bz2 file</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ), file_type='zip' )}">Download as a zip file</a>
%endif
</div></ul>
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b templates/webapps/community/repository/view_repository.mako
--- a/templates/webapps/community/repository/view_repository.mako
+++ b/templates/webapps/community/repository/view_repository.mako
@@ -5,10 +5,10 @@
<%
from galaxy.web.framework.helpers import time_ago
- is_new = repository.is_new
+ is_new = repository.is_new( trans.app )
is_deprecated = repository.deprecated
can_contact_owner = trans.user and trans.user != repository.user
- can_push = not is_deprecated and trans.app.security_agent.can_push( trans.user, repository )
+ can_push = not is_deprecated and trans.app.security_agent.can_push( trans.app, trans.user, repository )
can_rate = not is_deprecated and not is_new and trans.user and repository.user != trans.user
can_upload = can_push
can_download = not is_deprecated and not is_new and ( not is_malicious or can_push )
@@ -114,7 +114,7 @@
<form name="change_revision" id="change_revision" action="${h.url_for( controller='repository', action='view_repository', id=trans.security.encode_id( repository.id ) )}" method="post" ><div class="form-row"><%
- if changeset_revision == repository.tip:
+ if changeset_revision == repository.tip( trans.app ):
tip_str = 'repository tip'
else:
tip_str = ''
@@ -172,7 +172,7 @@
%if trans.user_is_admin():
<div class="form-row"><label>Location:</label>
- ${repository.repo_path | h}
+ ${repository.repo_path( trans.app ) | h}
</div><div class="form-row"><label>Deleted:</label>
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b templates/webapps/community/repository/view_tool_metadata.mako
--- a/templates/webapps/community/repository/view_tool_metadata.mako
+++ b/templates/webapps/community/repository/view_tool_metadata.mako
@@ -7,9 +7,9 @@
from galaxy.web.framework.helpers import time_ago
from urllib import quote_plus
is_admin = trans.user_is_admin()
- is_new = repository.is_new
+ is_new = repository.is_new( trans.app )
can_contact_owner = trans.user and trans.user != repository.user
- can_push = trans.app.security_agent.can_push( trans.user, repository )
+ can_push = trans.app.security_agent.can_push( trans.app, trans.user, repository )
can_upload = can_push
can_download = not is_new and ( not is_malicious or can_push )
can_browse_contents = trans.webapp.name == 'community' and not is_new
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b templates/webapps/community/repository/view_workflow.mako
--- a/templates/webapps/community/repository/view_workflow.mako
+++ b/templates/webapps/community/repository/view_workflow.mako
@@ -9,10 +9,10 @@
in_tool_shed = trans.webapp.name == 'community'
is_admin = trans.user_is_admin()
- is_new = repository.is_new
+ is_new = repository.is_new( trans.app )
can_manage = is_admin or trans.user == repository.user
can_contact_owner = in_tool_shed and trans.user and trans.user != repository.user
- can_push = in_tool_shed and trans.app.security_agent.can_push( trans.user, repository )
+ can_push = in_tool_shed and trans.app.security_agent.can_push( trans.app, trans.user, repository )
can_upload = can_push
can_download = in_tool_shed and not is_new and ( not is_malicious or can_push )
can_browse_contents = in_tool_shed and not is_new
@@ -51,9 +51,9 @@
<a class="action-button" href="${h.url_for( controller='upload', action='upload', repository_id=trans.security.encode_id( repository.id ) )}">Upload files to repository</a>
%endif
%if can_manage:
- <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">Manage repository</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">Manage repository</a>
%else:
- <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">View repository</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">View repository</a>
%endif
%if has_readme:
<a class="action-button" href="${h.url_for( controller='repository', action='view_readme', id=trans.app.security.encode_id( repository.id ), changeset_revision=changeset_revision )}">View README</a>
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b templates/webapps/community/repository_review/reviews_of_changeset_revision.mako
--- a/templates/webapps/community/repository_review/reviews_of_changeset_revision.mako
+++ b/templates/webapps/community/repository_review/reviews_of_changeset_revision.mako
@@ -7,11 +7,11 @@
from galaxy.webapps.community.controllers.repository_review import build_approved_select_field
from galaxy.webapps.community.controllers.common import STRSEP
is_admin = trans.user_is_admin()
- is_new = repository.is_new
+ is_new = repository.is_new( trans.app )
can_browse_contents = not is_new
can_contact_owner = trans.user and trans.user != repository.user
can_manage = is_admin or repository.user == trans.user
- can_push = trans.app.security_agent.can_push( trans.user, repository )
+ can_push = trans.app.security_agent.can_push( trans.app, trans.user, repository )
can_rate = not is_new and trans.user and repository.user != trans.user
can_view_change_log = not is_new
if can_push:
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b templates/webapps/community/repository_review/reviews_of_repository.mako
--- a/templates/webapps/community/repository_review/reviews_of_repository.mako
+++ b/templates/webapps/community/repository_review/reviews_of_repository.mako
@@ -5,11 +5,11 @@
<%
is_admin = trans.user_is_admin()
- is_new = repository.is_new
+ is_new = repository.is_new( trans.app )
can_browse_contents = not is_new
can_contact_owner = trans.user and trans.user != repository.user
can_manage = is_admin or repository.user == trans.user
- can_push = trans.app.security_agent.can_push( trans.user, repository )
+ can_push = trans.app.security_agent.can_push( trans.app, trans.user, repository )
can_rate = not is_new and trans.user and repository.user != trans.user
can_view_change_log = not is_new
if can_push:
@@ -44,9 +44,9 @@
<li><a class="action-button" id="repository-${repository.id}-popup" class="menubutton">Repository Actions</a></li><div popupmenu="repository-${repository.id}-popup">
%if can_manage:
- <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">Manage repository</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">Manage repository</a>
%else:
- <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">View repository</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">View repository</a>
%endif
%if can_view_change_log:
<a class="action-button" href="${h.url_for( controller='repository', action='view_changelog', id=trans.security.encode_id( repository.id ) )}">View change log</a>
diff -r 15543df2c2428ffadbce946433ae43edff8cb197 -r d60deede2b6a1d360bfd7479a68ab72eb162e84b templates/webapps/community/repository_review/select_previous_review.mako
--- a/templates/webapps/community/repository_review/select_previous_review.mako
+++ b/templates/webapps/community/repository_review/select_previous_review.mako
@@ -5,11 +5,11 @@
<%
is_admin = trans.user_is_admin()
- is_new = repository.is_new
+ is_new = repository.is_new( trans.app )
can_browse_contents = not is_new
can_contact_owner = trans.user and trans.user != repository.user
can_manage = is_admin or repository.user == trans.user
- can_push = trans.app.security_agent.can_push( trans.user, repository )
+ can_push = trans.app.security_agent.can_push( trans.app, trans.user, repository )
can_rate = not is_new and trans.user and repository.user != trans.user
can_view_change_log = not is_new
if can_push:
@@ -43,9 +43,9 @@
<li><a class="action-button" id="repository-${repository.id}-popup" class="menubutton">Repository Actions</a></li><div popupmenu="repository-${repository.id}-popup">
%if can_manage:
- <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">Manage repository</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">Manage repository</a>
%else:
- <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip )}">View repository</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">View repository</a>
%endif
%if can_view_change_log:
<a class="action-button" href="${h.url_for( controller='repository', action='view_changelog', id=trans.security.encode_id( repository.id ) )}">View change log</a>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/4dee72426a65/
changeset: 4dee72426a65
user: jmchilton
date: 2012-09-22 05:04:15
summary: Improvements to reports management script (run_reports.sh) to enable managing the reports app from CloudMan. These enhancements are all "optional", the default behavior of run_reports.sh is unchanged.
Added flag (--sync-config) to run_reports.sh script that will cause it to synchronize the database connection and file path properties in reports_wsgi.ini with those in universe_wsgi.ini prior to starting paster app.
Allow specification of reports configuration directory mirroring similar extensions previously accepted for universe config and run.sh
Added usage documentation to run_reports.sh.
Added extension points to tweak pid and log location for reports application via environment variables.
affected #: 3 files
diff -r 3574c1fa4cb3494f82fd1915c63da6154b230756 -r 4dee72426a656988fdf6c70c2c3ff4ba9774fb5c run_reports.sh
--- a/run_reports.sh
+++ b/run_reports.sh
@@ -1,4 +1,29 @@
#!/bin/sh
+
+# Usage: ./run_reports.sh [--sync-config] <start|stop>
+#
+#
+# Description: This script can be used to start or stop the galaxy
+# reports web application. Passing in --sync-config as the first
+# argument to this will cause Galaxy's database and path parameters
+# from universe_wsgi.ini to be copied over into reports_wsgi.ini.
+
cd `dirname $0`
-python ./scripts/paster.py serve reports_wsgi.ini --pid-file=reports_webapp.pid --log-file=reports_webapp.log $@
+
+GALAXY_REPORTS_CONFIG=${GALAXY_REPORTS_CONFIG:-reports_wsgi.ini}
+GALAXY_REPORTS_PID=${GALAXY_REPORTS_PID:-reports_webapp.pid}
+GALAXY_REPORTS_LOG=${GALAXY_REPORTS_LOG:-reports_webapp.log}
+
+if [ -n "$GALAXY_REPORTS_CONFIG_DIR" ]; then
+ python ./scripts/build_universe_config.py "$GALAXY_REPORTS_CONFIG_DIR" "$GALAXY_REPORTS_CONFIG"
+fi
+
+
+if [ "$1" = "--sync-config" ];
+then
+ python ./scripts/sync_reports_config.py
+ shift
+fi
+
+python ./scripts/paster.py serve "$GALAXY_REPORTS_CONFIG" --pid-file="$GALAXY_REPORTS_PID" --log-file="$GALAXY_REPORTS_LOG" $@
diff -r 3574c1fa4cb3494f82fd1915c63da6154b230756 -r 4dee72426a656988fdf6c70c2c3ff4ba9774fb5c scripts/build_universe_config.py
--- a/scripts/build_universe_config.py
+++ b/scripts/build_universe_config.py
@@ -20,7 +20,11 @@
## TODO: Expand enviroment variables here, that would
## also make Galaxy much easier to configure.
- parser.write(open("universe_wsgi.ini", 'w'))
+ destination= "universe_wsgi.ini"
+ if len(argv) > 2:
+ destination = argv[2]
+
+ parser.write(open(destination, 'w'))
if __name__ == '__main__':
merge()
diff -r 3574c1fa4cb3494f82fd1915c63da6154b230756 -r 4dee72426a656988fdf6c70c2c3ff4ba9774fb5c scripts/sync_reports_config.py
--- /dev/null
+++ b/scripts/sync_reports_config.py
@@ -0,0 +1,58 @@
+from ConfigParser import ConfigParser
+from sys import argv
+
+REPLACE_PROPERTIES = ["file_path", "database_connection", "new_file_path"]
+MAIN_SECTION = "app:main"
+
+def sync():
+ # Add or replace the relevant properites from universe_wsgi.ini
+ # into reports_wsgi.ini
+ reports_config_file = "reports_wsgi.ini"
+ if len(argv) > 1:
+ reports_config_file = argv[1]
+
+ universe_config_file = "universe_wsgi.ini"
+ if len(argv) > 2:
+ universe_config_file = argv[2]
+
+ parser = ConfigParser()
+ parser.read(universe_config_file)
+
+ with open(reports_config_file, "r") as f:
+ reports_config_lines = f.readlines()
+
+ replaced_properties = set([])
+ with open(reports_config_file, "w") as f:
+ # Write all properties from reports config replacing as
+ # needed.
+ for reports_config_line in reports_config_lines:
+ (line, replaced_property) = get_synced_line(reports_config_line, parser)
+ if replaced_property:
+ replaced_properties.add(replaced_property)
+ f.write(line)
+
+ # If any properties appear in universe config and not in
+ # reports write these as well.
+ for replacement_property in REPLACE_PROPERTIES:
+ if parser.has_option(MAIN_SECTION, replacement_property) and \
+ not (replacement_property in replaced_properties):
+ f.write(get_universe_line(replacement_property, parser))
+
+def get_synced_line(reports_line, universe_config):
+ # Cycle through properties to replace and perform replacement on
+ # this line if needed.
+ synced_line = reports_line
+ replaced_property = None
+ for replacement_property in REPLACE_PROPERTIES:
+ if reports_line.startswith(replacement_property) and \
+ universe_config.has_option(MAIN_SECTION, replacement_property):
+ synced_line = get_universe_line(replacement_property, universe_config)
+ replaced_property = replacement_property
+ break
+ return (synced_line, replaced_property)
+
+def get_universe_line(property_name, universe_config):
+ return "%s=%s\n" % (property_name, universe_config.get(MAIN_SECTION, property_name))
+
+if __name__ == '__main__':
+ sync()
https://bitbucket.org/galaxy/galaxy-central/changeset/15543df2c242/
changeset: 15543df2c242
user: dannon
date: 2012-11-12 18:00:18
summary: Merged in jmchilton/galaxy-central-reports-config-enhancements (pull request #71)
affected #: 3 files
diff -r 38ce114e06f965dfd7eca383849a91b07d1473c6 -r 15543df2c2428ffadbce946433ae43edff8cb197 run_reports.sh
--- a/run_reports.sh
+++ b/run_reports.sh
@@ -1,4 +1,29 @@
#!/bin/sh
+
+# Usage: ./run_reports.sh [--sync-config] <start|stop>
+#
+#
+# Description: This script can be used to start or stop the galaxy
+# reports web application. Passing in --sync-config as the first
+# argument to this will cause Galaxy's database and path parameters
+# from universe_wsgi.ini to be copied over into reports_wsgi.ini.
+
cd `dirname $0`
-python ./scripts/paster.py serve reports_wsgi.ini --pid-file=reports_webapp.pid --log-file=reports_webapp.log $@
+
+GALAXY_REPORTS_CONFIG=${GALAXY_REPORTS_CONFIG:-reports_wsgi.ini}
+GALAXY_REPORTS_PID=${GALAXY_REPORTS_PID:-reports_webapp.pid}
+GALAXY_REPORTS_LOG=${GALAXY_REPORTS_LOG:-reports_webapp.log}
+
+if [ -n "$GALAXY_REPORTS_CONFIG_DIR" ]; then
+ python ./scripts/build_universe_config.py "$GALAXY_REPORTS_CONFIG_DIR" "$GALAXY_REPORTS_CONFIG"
+fi
+
+
+if [ "$1" = "--sync-config" ];
+then
+ python ./scripts/sync_reports_config.py
+ shift
+fi
+
+python ./scripts/paster.py serve "$GALAXY_REPORTS_CONFIG" --pid-file="$GALAXY_REPORTS_PID" --log-file="$GALAXY_REPORTS_LOG" $@
diff -r 38ce114e06f965dfd7eca383849a91b07d1473c6 -r 15543df2c2428ffadbce946433ae43edff8cb197 scripts/build_universe_config.py
--- a/scripts/build_universe_config.py
+++ b/scripts/build_universe_config.py
@@ -20,7 +20,11 @@
## TODO: Expand enviroment variables here, that would
## also make Galaxy much easier to configure.
- parser.write(open("universe_wsgi.ini", 'w'))
+ destination= "universe_wsgi.ini"
+ if len(argv) > 2:
+ destination = argv[2]
+
+ parser.write(open(destination, 'w'))
if __name__ == '__main__':
merge()
diff -r 38ce114e06f965dfd7eca383849a91b07d1473c6 -r 15543df2c2428ffadbce946433ae43edff8cb197 scripts/sync_reports_config.py
--- /dev/null
+++ b/scripts/sync_reports_config.py
@@ -0,0 +1,58 @@
+from ConfigParser import ConfigParser
+from sys import argv
+
+REPLACE_PROPERTIES = ["file_path", "database_connection", "new_file_path"]
+MAIN_SECTION = "app:main"
+
+def sync():
+ # Add or replace the relevant properites from universe_wsgi.ini
+ # into reports_wsgi.ini
+ reports_config_file = "reports_wsgi.ini"
+ if len(argv) > 1:
+ reports_config_file = argv[1]
+
+ universe_config_file = "universe_wsgi.ini"
+ if len(argv) > 2:
+ universe_config_file = argv[2]
+
+ parser = ConfigParser()
+ parser.read(universe_config_file)
+
+ with open(reports_config_file, "r") as f:
+ reports_config_lines = f.readlines()
+
+ replaced_properties = set([])
+ with open(reports_config_file, "w") as f:
+ # Write all properties from reports config replacing as
+ # needed.
+ for reports_config_line in reports_config_lines:
+ (line, replaced_property) = get_synced_line(reports_config_line, parser)
+ if replaced_property:
+ replaced_properties.add(replaced_property)
+ f.write(line)
+
+ # If any properties appear in universe config and not in
+ # reports write these as well.
+ for replacement_property in REPLACE_PROPERTIES:
+ if parser.has_option(MAIN_SECTION, replacement_property) and \
+ not (replacement_property in replaced_properties):
+ f.write(get_universe_line(replacement_property, parser))
+
+def get_synced_line(reports_line, universe_config):
+ # Cycle through properties to replace and perform replacement on
+ # this line if needed.
+ synced_line = reports_line
+ replaced_property = None
+ for replacement_property in REPLACE_PROPERTIES:
+ if reports_line.startswith(replacement_property) and \
+ universe_config.has_option(MAIN_SECTION, replacement_property):
+ synced_line = get_universe_line(replacement_property, universe_config)
+ replaced_property = replacement_property
+ break
+ return (synced_line, replaced_property)
+
+def get_universe_line(property_name, universe_config):
+ return "%s=%s\n" % (property_name, universe_config.get(MAIN_SECTION, property_name))
+
+if __name__ == '__main__':
+ sync()
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/c691188b11ad/
changeset: c691188b11ad
user: kellrott
date: 2012-10-28 08:28:42
summary: Adding the initial componenents of an extended metadata system for datasets.
The idea behind an 'extended metadata' for datasets is to provide a mechanism to encode
and index user generated metadata and keep it attached to files. Users can provide a
JSON style data structure which will then be indexed and stored. Later this index can
be used to search and discover datasets via a pseudo-formal schema.
This patch introduces the tables, and makes it possible to inject user metadata into a file
load using the 'extended_metadata' field in the query.
affected #: 5 files
diff -r ecd131b136d00d5753992061d12b12156be8b277 -r c691188b11ad81ae21d1135501a5ede81135bffa lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py
+++ b/lib/galaxy/model/__init__.py
@@ -977,7 +977,7 @@
permitted_actions = Dataset.permitted_actions
def __init__( self, id=None, hid=None, name=None, info=None, blurb=None, peek=None, tool_version=None, extension=None,
dbkey=None, metadata=None, history=None, dataset=None, deleted=False, designation=None,
- parent_id=None, validation_errors=None, visible=True, create_dataset=False, sa_session=None ):
+ parent_id=None, validation_errors=None, visible=True, create_dataset=False, sa_session=None, extended_metadata=None ):
self.name = name or "Unnamed dataset"
self.id = id
self.info = info
@@ -987,6 +987,7 @@
self.extension = extension
self.designation = designation
self.metadata = metadata or dict()
+ self.extended_metadata = extended_metadata
if dbkey: #dbkey is stored in metadata, only set if non-zero, or else we could clobber one supplied by input 'metadata'
self.dbkey = dbkey
self.deleted = deleted
@@ -1891,6 +1892,18 @@
ldda_name = unicode( ldda_name, 'utf-8' )
return ldda_name
+class ExtendedMetadata( object ):
+ def __init__(self, data):
+ self.data = data
+
+
+class ExtendedMetadataIndex( object ):
+ def __init__( self, extended_metadata, path, value):
+ self.extended_metadata = extended_metadata
+ self.path = path
+ self.value = value
+
+
class LibraryInfoAssociation( object ):
def __init__( self, library, form_definition, info, inheritable=False ):
self.library = library
diff -r ecd131b136d00d5753992061d12b12156be8b277 -r c691188b11ad81ae21d1135501a5ede81135bffa lib/galaxy/model/mapping.py
--- a/lib/galaxy/model/mapping.py
+++ b/lib/galaxy/model/mapping.py
@@ -323,7 +323,24 @@
Column( "deleted", Boolean, index=True, default=False ),
Column( "visible", Boolean ),
Column( "user_id", Integer, ForeignKey( "galaxy_user.id" ), index=True ),
- Column( "message", TrimmedString( 255 ) ) )
+ Column( "message", TrimmedString( 255 ) ),
+ Column( "extended_metadata_id", Integer,
+ ForeignKey( "extended_metadata.id" ), index=True )
+ )
+
+
+ExtendedMetadata.table = Table("extended_metadata", metadata,
+ Column( "id", Integer, primary_key=True ),
+ Column( "data", JSONType ) )
+
+ExtendedMetadataIndex.table = Table("extended_metadata_index", metadata,
+ Column( "id", Integer, primary_key=True ),
+ Column( "extended_metadata_id", Integer, ForeignKey("extended_metadata.id",
+ onupdate="CASCADE",
+ ondelete="CASCADE" ),
+ index=True ),
+ Column( "path", String( 255 )),
+ Column( "value", TEXT))
Library.table = Table( "library", metadata,
Column( "id", Integer, primary_key=True ),
@@ -1436,6 +1453,28 @@
)
)
+assign_mapper(context, ExtendedMetadata, ExtendedMetadata.table,
+ properties=dict(
+ children=relation(
+ ExtendedMetadataIndex,
+ primaryjoin=( ExtendedMetadataIndex.table.c.extended_metadata_id == ExtendedMetadata.table.c.id ),
+ backref=backref("parent",
+ primaryjoin=( ExtendedMetadataIndex.table.c.extended_metadata_id == ExtendedMetadata.table.c.id )
+ )
+ )
+ )
+)
+
+assign_mapper(context, ExtendedMetadataIndex, ExtendedMetadataIndex.table,
+ properties=dict(
+ extended_metadata=relation(
+ ExtendedMetadata,
+ primaryjoin=( ( ExtendedMetadataIndex.table.c.extended_metadata_id == ExtendedMetadata.table.c.id ) )
+ )
+ )
+)
+
+
assign_mapper( context, LibraryInfoAssociation, LibraryInfoAssociation.table,
properties=dict( library=relation( Library,
primaryjoin=( ( LibraryInfoAssociation.table.c.library_id == Library.table.c.id ) & ( not_( LibraryInfoAssociation.table.c.deleted ) ) ), backref="info_association" ),
@@ -1515,8 +1554,12 @@
backref=backref( "parent", primaryjoin=( LibraryDatasetDatasetAssociation.table.c.parent_id == LibraryDatasetDatasetAssociation.table.c.id ), remote_side=[LibraryDatasetDatasetAssociation.table.c.id] ) ),
visible_children=relation(
LibraryDatasetDatasetAssociation,
- primaryjoin=( ( LibraryDatasetDatasetAssociation.table.c.parent_id == LibraryDatasetDatasetAssociation.table.c.id ) & ( LibraryDatasetDatasetAssociation.table.c.visible == True ) ) )
- ) )
+ primaryjoin=( ( LibraryDatasetDatasetAssociation.table.c.parent_id == LibraryDatasetDatasetAssociation.table.c.id ) & ( LibraryDatasetDatasetAssociation.table.c.visible == True ) ) ),
+ extended_metadata=relation(
+ ExtendedMetadata,
+ primaryjoin=( ( LibraryDatasetDatasetAssociation.table.c.extended_metadata_id == ExtendedMetadata.table.c.id ) )
+ )
+ ))
assign_mapper( context, LibraryDatasetDatasetInfoAssociation, LibraryDatasetDatasetInfoAssociation.table,
properties=dict( library_dataset_dataset_association=relation( LibraryDatasetDatasetAssociation,
diff -r ecd131b136d00d5753992061d12b12156be8b277 -r c691188b11ad81ae21d1135501a5ede81135bffa lib/galaxy/model/migrate/versions/0108_add_extended_metadata.py
--- /dev/null
+++ b/lib/galaxy/model/migrate/versions/0108_add_extended_metadata.py
@@ -0,0 +1,75 @@
+"""
+Add the ExtendedMetadata and ExtendedMetadataIndex tables
+"""
+
+from sqlalchemy import *
+from sqlalchemy.orm import *
+from migrate import *
+from migrate.changeset import *
+from galaxy.model.custom_types import JSONType
+
+import logging
+log = logging.getLogger( __name__ )
+
+metadata = MetaData( migrate_engine )
+#db_session = scoped_session( sessionmaker( bind=migrate_engine, autoflush=False, autocommit=True ) )
+
+
+ExtendedMetadata_table = Table("extended_metadata", metadata,
+ Column( "id", Integer, primary_key=True ),
+ Column( "data", JSONType ) )
+
+ExtendedMetadataIndex_table = Table("extended_metadata_index", metadata,
+ Column( "id", Integer, primary_key=True ),
+ Column( "extended_metadata_id", Integer, ForeignKey("extended_metadata.id",
+ onupdate="CASCADE",
+ ondelete="CASCADE" ),
+ index=True ),
+ Column( "path", String( 255 )),
+ Column( "value", TEXT))
+
+extended_metadata_ldda_col = Column( "extended_metadata_id", Integer, ForeignKey("extended_metadata.id"), nullable=True )
+
+
+def display_migration_details():
+ print ""
+ print "This migration script adds a 'handler' column to the Job table."
+
+def upgrade():
+ print __doc__
+ metadata.reflect()
+ try:
+ ExtendedMetadata_table.create()
+ except:
+ log.debug("Could not create ExtendedMetadata Table.")
+ try:
+ ExtendedMetadataIndex_table.create()
+ except:
+ log.debug("Could not create ExtendedMetadataIndex Table.")
+
+
+ # Add the extended_metadata_id to the ldda table
+ try:
+ ldda_table = Table( "library_dataset_dataset_association", metadata, autoload=True )
+ extended_metadata_ldda_col.create( ldda_table )
+ assert extended_metadata_ldda_col is ldda_table.c.extended_metadata_id
+ except Exception, e:
+ print str(e)
+ log.error( "Adding column 'extended_metadata_id' to library_dataset_dataset_association table failed: %s" % str( e ) )
+ return
+
+
+def downgrade():
+ metadata.reflect()
+ ExtendedMetadata_table.drop()
+ ExtendedMetadataIndex_table.drop()
+
+ # Drop the Job table's exit_code column.
+ try:
+ job_table = Table( "library_dataset_dataset_association", metadata, autoload=True )
+ extended_metadata_id = job_table.c.extended_metadata_id
+ extended_metadata_id.drop()
+ except Exception, e:
+ log.debug( "Dropping 'extended_metadata_id' column from library_dataset_dataset_association table failed: %s" % ( str( e ) ) )
+
+
diff -r ecd131b136d00d5753992061d12b12156be8b277 -r c691188b11ad81ae21d1135501a5ede81135bffa lib/galaxy/webapps/galaxy/api/library_contents.py
--- a/lib/galaxy/webapps/galaxy/api/library_contents.py
+++ b/lib/galaxy/webapps/galaxy/api/library_contents.py
@@ -7,6 +7,7 @@
from galaxy.web.base.controller import *
from galaxy.util.sanitize_html import sanitize_html
from galaxy.model.orm import *
+from galaxy.model import ExtendedMetadata, ExtendedMetadataIndex
log = logging.getLogger( __name__ )
@@ -114,6 +115,13 @@
return str( e )
# The rest of the security happens in the library_common controller.
real_folder_id = trans.security.encode_id( parent.id )
+
+ #check for extended metadata, store it and pop it out of the param
+ #otherwise sanitize_param will have a fit
+ ex_meta_payload = None
+ if 'extended_metadata' in payload:
+ ex_meta_payload = payload.pop('extended_metadata')
+
# Now create the desired content object, either file or folder.
if create_type == 'file':
status, output = trans.webapp.controllers['library_common'].upload_library_dataset( trans, 'api', library_id, real_folder_id, **payload )
@@ -125,6 +133,19 @@
else:
rval = []
for k, v in output.items():
+ if ex_meta_payload is not None:
+ """
+ If there is extended metadata, store it, attach it to the dataset, and index it
+ """
+ ex_meta = ExtendedMetadata(ex_meta_payload)
+ trans.sa_session.add( ex_meta )
+ v.extended_metadata = ex_meta
+ trans.sa_session.add(v)
+ trans.sa_session.flush()
+ for path, value in self._scan_json_block(ex_meta_payload):
+ meta_i = ExtendedMetadataIndex(ex_meta, path, value)
+ trans.sa_session.add(meta_i)
+ trans.sa_session.flush()
if type( v ) == trans.app.model.LibraryDatasetDatasetAssociation:
v = v.library_dataset
encoded_id = trans.security.encode_id( v.id )
@@ -135,6 +156,33 @@
url = url_for( 'library_content', library_id=library_id, id=encoded_id ) ) )
return rval
+ def _scan_json_block(self, meta, prefix=""):
+ """
+ Scan a json style data structure, and emit all fields and their values.
+ Example paths
+
+ Data
+ { "data" : [ 1, 2, 3 ] }
+
+ Path:
+ /data == [1,2,3]
+
+ /data/[0] == 1
+
+ """
+ if isinstance(meta, dict):
+ for a in meta:
+ for path, value in self._scan_json_block(meta[a], prefix + "/" + a):
+ yield path, value
+ elif isinstance(meta, list):
+ for i, a in enumerate(meta):
+ for path, value in self._scan_json_block(a, prefix + "[%d]" % (i)):
+ yield path, value
+ else:
+ #BUG: Everything is cast to string, which can lead to false positives
+ #for cross type comparisions, ie "True" == True
+ yield prefix, str(meta)
+
@web.expose_api
def update( self, trans, id, library_id, payload, **kwd ):
"""
diff -r ecd131b136d00d5753992061d12b12156be8b277 -r c691188b11ad81ae21d1135501a5ede81135bffa scripts/api/load_data_with_metadata.py
--- /dev/null
+++ b/scripts/api/load_data_with_metadata.py
@@ -0,0 +1,70 @@
+#!/usr/bin/env python
+"""
+
+This script scans a directory for files with companion '.json' files, then loads
+the data from the file, and attaches the .json contents using the 'extended_metadata'
+system in the library
+
+Sample call:
+python load_data_with_metadata.py <api_key><api_url> /tmp/g_inbox/ /tmp/g_inbox/done/ "API Imports"
+
+NOTE: The upload method used requires the data library filesystem upload allow_library_path_paste
+"""
+import os
+import shutil
+import sys
+import json
+import time
+sys.path.insert( 0, os.path.dirname( __file__ ) )
+from common import submit, display
+
+def main(api_key, api_url, in_folder, out_folder, data_library):
+ # Find/Create data library with the above name. Assume we're putting datasets in the root folder '/'
+ libs = display(api_key, api_url + 'libraries', return_formatted=False)
+ library_id = None
+ for library in libs:
+ if library['name'] == data_library:
+ library_id = library['id']
+ if not library_id:
+ lib_create_data = {'name':data_library}
+ library = submit(api_key, api_url + 'libraries', lib_create_data, return_formatted=False)
+ library_id = library[0]['id']
+ folders = display(api_key, api_url + "libraries/%s/contents" % library_id, return_formatted = False)
+ for f in folders:
+ if f['name'] == "/":
+ library_folder_id = f['id']
+ if not library_id or not library_folder_id:
+ print "Failure to configure library destination."
+ sys.exit(1)
+ # Watch in_folder, upload anything that shows up there to data library and get ldda,
+ # invoke workflow, move file to out_folder.
+ for fname in os.listdir(in_folder):
+ fullpath = os.path.join(in_folder, fname)
+ if os.path.isfile(fullpath) and os.path.exists(fullpath + ".json"):
+ data = {}
+ data['folder_id'] = library_folder_id
+ data['file_type'] = 'auto'
+ data['dbkey'] = ''
+ data['upload_option'] = 'upload_paths'
+ data['filesystem_paths'] = fullpath
+ data['create_type'] = 'file'
+
+ handle = open( fullpath + ".json" )
+ smeta = handle.read()
+ handle.close()
+ data['extended_metadata'] = json.loads(smeta)
+ libset = submit(api_key, api_url + "libraries/%s/contents" % library_id, data, return_formatted = True)
+ print libset
+
+if __name__ == '__main__':
+ try:
+ api_key = sys.argv[1]
+ api_url = sys.argv[2]
+ in_folder = sys.argv[3]
+ out_folder = sys.argv[4]
+ data_library = sys.argv[5]
+ except IndexError:
+ print 'usage: %s key url in_folder out_folder data_library' % os.path.basename( sys.argv[0] )
+ sys.exit( 1 )
+ main(api_key, api_url, in_folder, out_folder, data_library )
+
https://bitbucket.org/galaxy/galaxy-central/changeset/38ce114e06f9/
changeset: 38ce114e06f9
user: dannon
date: 2012-11-12 17:54:45
summary: Merged in kellrott/galaxy-central (pull request #81)
affected #: 5 files
diff -r dd63b34f813972b00f7bf492aec1e74ef9bd5f59 -r 38ce114e06f965dfd7eca383849a91b07d1473c6 lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py
+++ b/lib/galaxy/model/__init__.py
@@ -993,7 +993,7 @@
permitted_actions = Dataset.permitted_actions
def __init__( self, id=None, hid=None, name=None, info=None, blurb=None, peek=None, tool_version=None, extension=None,
dbkey=None, metadata=None, history=None, dataset=None, deleted=False, designation=None,
- parent_id=None, validation_errors=None, visible=True, create_dataset=False, sa_session=None ):
+ parent_id=None, validation_errors=None, visible=True, create_dataset=False, sa_session=None, extended_metadata=None ):
self.name = name or "Unnamed dataset"
self.id = id
self.info = info
@@ -1003,6 +1003,7 @@
self.extension = extension
self.designation = designation
self.metadata = metadata or dict()
+ self.extended_metadata = extended_metadata
if dbkey: #dbkey is stored in metadata, only set if non-zero, or else we could clobber one supplied by input 'metadata'
self.dbkey = dbkey
self.deleted = deleted
@@ -1908,6 +1909,18 @@
ldda_name = unicode( ldda_name, 'utf-8' )
return ldda_name
+class ExtendedMetadata( object ):
+ def __init__(self, data):
+ self.data = data
+
+
+class ExtendedMetadataIndex( object ):
+ def __init__( self, extended_metadata, path, value):
+ self.extended_metadata = extended_metadata
+ self.path = path
+ self.value = value
+
+
class LibraryInfoAssociation( object ):
def __init__( self, library, form_definition, info, inheritable=False ):
self.library = library
diff -r dd63b34f813972b00f7bf492aec1e74ef9bd5f59 -r 38ce114e06f965dfd7eca383849a91b07d1473c6 lib/galaxy/model/mapping.py
--- a/lib/galaxy/model/mapping.py
+++ b/lib/galaxy/model/mapping.py
@@ -323,7 +323,24 @@
Column( "deleted", Boolean, index=True, default=False ),
Column( "visible", Boolean ),
Column( "user_id", Integer, ForeignKey( "galaxy_user.id" ), index=True ),
- Column( "message", TrimmedString( 255 ) ) )
+ Column( "message", TrimmedString( 255 ) ),
+ Column( "extended_metadata_id", Integer,
+ ForeignKey( "extended_metadata.id" ), index=True )
+ )
+
+
+ExtendedMetadata.table = Table("extended_metadata", metadata,
+ Column( "id", Integer, primary_key=True ),
+ Column( "data", JSONType ) )
+
+ExtendedMetadataIndex.table = Table("extended_metadata_index", metadata,
+ Column( "id", Integer, primary_key=True ),
+ Column( "extended_metadata_id", Integer, ForeignKey("extended_metadata.id",
+ onupdate="CASCADE",
+ ondelete="CASCADE" ),
+ index=True ),
+ Column( "path", String( 255 )),
+ Column( "value", TEXT))
Library.table = Table( "library", metadata,
Column( "id", Integer, primary_key=True ),
@@ -1436,6 +1453,28 @@
)
)
+assign_mapper(context, ExtendedMetadata, ExtendedMetadata.table,
+ properties=dict(
+ children=relation(
+ ExtendedMetadataIndex,
+ primaryjoin=( ExtendedMetadataIndex.table.c.extended_metadata_id == ExtendedMetadata.table.c.id ),
+ backref=backref("parent",
+ primaryjoin=( ExtendedMetadataIndex.table.c.extended_metadata_id == ExtendedMetadata.table.c.id )
+ )
+ )
+ )
+)
+
+assign_mapper(context, ExtendedMetadataIndex, ExtendedMetadataIndex.table,
+ properties=dict(
+ extended_metadata=relation(
+ ExtendedMetadata,
+ primaryjoin=( ( ExtendedMetadataIndex.table.c.extended_metadata_id == ExtendedMetadata.table.c.id ) )
+ )
+ )
+)
+
+
assign_mapper( context, LibraryInfoAssociation, LibraryInfoAssociation.table,
properties=dict( library=relation( Library,
primaryjoin=( ( LibraryInfoAssociation.table.c.library_id == Library.table.c.id ) & ( not_( LibraryInfoAssociation.table.c.deleted ) ) ), backref="info_association" ),
@@ -1515,8 +1554,12 @@
backref=backref( "parent", primaryjoin=( LibraryDatasetDatasetAssociation.table.c.parent_id == LibraryDatasetDatasetAssociation.table.c.id ), remote_side=[LibraryDatasetDatasetAssociation.table.c.id] ) ),
visible_children=relation(
LibraryDatasetDatasetAssociation,
- primaryjoin=( ( LibraryDatasetDatasetAssociation.table.c.parent_id == LibraryDatasetDatasetAssociation.table.c.id ) & ( LibraryDatasetDatasetAssociation.table.c.visible == True ) ) )
- ) )
+ primaryjoin=( ( LibraryDatasetDatasetAssociation.table.c.parent_id == LibraryDatasetDatasetAssociation.table.c.id ) & ( LibraryDatasetDatasetAssociation.table.c.visible == True ) ) ),
+ extended_metadata=relation(
+ ExtendedMetadata,
+ primaryjoin=( ( LibraryDatasetDatasetAssociation.table.c.extended_metadata_id == ExtendedMetadata.table.c.id ) )
+ )
+ ))
assign_mapper( context, LibraryDatasetDatasetInfoAssociation, LibraryDatasetDatasetInfoAssociation.table,
properties=dict( library_dataset_dataset_association=relation( LibraryDatasetDatasetAssociation,
diff -r dd63b34f813972b00f7bf492aec1e74ef9bd5f59 -r 38ce114e06f965dfd7eca383849a91b07d1473c6 lib/galaxy/model/migrate/versions/0108_add_extended_metadata.py
--- /dev/null
+++ b/lib/galaxy/model/migrate/versions/0108_add_extended_metadata.py
@@ -0,0 +1,75 @@
+"""
+Add the ExtendedMetadata and ExtendedMetadataIndex tables
+"""
+
+from sqlalchemy import *
+from sqlalchemy.orm import *
+from migrate import *
+from migrate.changeset import *
+from galaxy.model.custom_types import JSONType
+
+import logging
+log = logging.getLogger( __name__ )
+
+metadata = MetaData( migrate_engine )
+#db_session = scoped_session( sessionmaker( bind=migrate_engine, autoflush=False, autocommit=True ) )
+
+
+ExtendedMetadata_table = Table("extended_metadata", metadata,
+ Column( "id", Integer, primary_key=True ),
+ Column( "data", JSONType ) )
+
+ExtendedMetadataIndex_table = Table("extended_metadata_index", metadata,
+ Column( "id", Integer, primary_key=True ),
+ Column( "extended_metadata_id", Integer, ForeignKey("extended_metadata.id",
+ onupdate="CASCADE",
+ ondelete="CASCADE" ),
+ index=True ),
+ Column( "path", String( 255 )),
+ Column( "value", TEXT))
+
+extended_metadata_ldda_col = Column( "extended_metadata_id", Integer, ForeignKey("extended_metadata.id"), nullable=True )
+
+
+def display_migration_details():
+ print ""
+ print "This migration script adds a 'handler' column to the Job table."
+
+def upgrade():
+ print __doc__
+ metadata.reflect()
+ try:
+ ExtendedMetadata_table.create()
+ except:
+ log.debug("Could not create ExtendedMetadata Table.")
+ try:
+ ExtendedMetadataIndex_table.create()
+ except:
+ log.debug("Could not create ExtendedMetadataIndex Table.")
+
+
+ # Add the extended_metadata_id to the ldda table
+ try:
+ ldda_table = Table( "library_dataset_dataset_association", metadata, autoload=True )
+ extended_metadata_ldda_col.create( ldda_table )
+ assert extended_metadata_ldda_col is ldda_table.c.extended_metadata_id
+ except Exception, e:
+ print str(e)
+ log.error( "Adding column 'extended_metadata_id' to library_dataset_dataset_association table failed: %s" % str( e ) )
+ return
+
+
+def downgrade():
+ metadata.reflect()
+ ExtendedMetadata_table.drop()
+ ExtendedMetadataIndex_table.drop()
+
+ # Drop the Job table's exit_code column.
+ try:
+ job_table = Table( "library_dataset_dataset_association", metadata, autoload=True )
+ extended_metadata_id = job_table.c.extended_metadata_id
+ extended_metadata_id.drop()
+ except Exception, e:
+ log.debug( "Dropping 'extended_metadata_id' column from library_dataset_dataset_association table failed: %s" % ( str( e ) ) )
+
+
diff -r dd63b34f813972b00f7bf492aec1e74ef9bd5f59 -r 38ce114e06f965dfd7eca383849a91b07d1473c6 lib/galaxy/webapps/galaxy/api/library_contents.py
--- a/lib/galaxy/webapps/galaxy/api/library_contents.py
+++ b/lib/galaxy/webapps/galaxy/api/library_contents.py
@@ -7,6 +7,7 @@
from galaxy.web.base.controller import *
from galaxy.util.sanitize_html import sanitize_html
from galaxy.model.orm import *
+from galaxy.model import ExtendedMetadata, ExtendedMetadataIndex
log = logging.getLogger( __name__ )
@@ -114,6 +115,13 @@
return str( e )
# The rest of the security happens in the library_common controller.
real_folder_id = trans.security.encode_id( parent.id )
+
+ #check for extended metadata, store it and pop it out of the param
+ #otherwise sanitize_param will have a fit
+ ex_meta_payload = None
+ if 'extended_metadata' in payload:
+ ex_meta_payload = payload.pop('extended_metadata')
+
# Now create the desired content object, either file or folder.
if create_type == 'file':
status, output = trans.webapp.controllers['library_common'].upload_library_dataset( trans, 'api', library_id, real_folder_id, **payload )
@@ -125,6 +133,19 @@
else:
rval = []
for k, v in output.items():
+ if ex_meta_payload is not None:
+ """
+ If there is extended metadata, store it, attach it to the dataset, and index it
+ """
+ ex_meta = ExtendedMetadata(ex_meta_payload)
+ trans.sa_session.add( ex_meta )
+ v.extended_metadata = ex_meta
+ trans.sa_session.add(v)
+ trans.sa_session.flush()
+ for path, value in self._scan_json_block(ex_meta_payload):
+ meta_i = ExtendedMetadataIndex(ex_meta, path, value)
+ trans.sa_session.add(meta_i)
+ trans.sa_session.flush()
if type( v ) == trans.app.model.LibraryDatasetDatasetAssociation:
v = v.library_dataset
encoded_id = trans.security.encode_id( v.id )
@@ -135,6 +156,33 @@
url = url_for( 'library_content', library_id=library_id, id=encoded_id ) ) )
return rval
+ def _scan_json_block(self, meta, prefix=""):
+ """
+ Scan a json style data structure, and emit all fields and their values.
+ Example paths
+
+ Data
+ { "data" : [ 1, 2, 3 ] }
+
+ Path:
+ /data == [1,2,3]
+
+ /data/[0] == 1
+
+ """
+ if isinstance(meta, dict):
+ for a in meta:
+ for path, value in self._scan_json_block(meta[a], prefix + "/" + a):
+ yield path, value
+ elif isinstance(meta, list):
+ for i, a in enumerate(meta):
+ for path, value in self._scan_json_block(a, prefix + "[%d]" % (i)):
+ yield path, value
+ else:
+ #BUG: Everything is cast to string, which can lead to false positives
+ #for cross type comparisions, ie "True" == True
+ yield prefix, str(meta)
+
@web.expose_api
def update( self, trans, id, library_id, payload, **kwd ):
"""
diff -r dd63b34f813972b00f7bf492aec1e74ef9bd5f59 -r 38ce114e06f965dfd7eca383849a91b07d1473c6 scripts/api/load_data_with_metadata.py
--- /dev/null
+++ b/scripts/api/load_data_with_metadata.py
@@ -0,0 +1,70 @@
+#!/usr/bin/env python
+"""
+
+This script scans a directory for files with companion '.json' files, then loads
+the data from the file, and attaches the .json contents using the 'extended_metadata'
+system in the library
+
+Sample call:
+python load_data_with_metadata.py <api_key><api_url> /tmp/g_inbox/ /tmp/g_inbox/done/ "API Imports"
+
+NOTE: The upload method used requires the data library filesystem upload allow_library_path_paste
+"""
+import os
+import shutil
+import sys
+import json
+import time
+sys.path.insert( 0, os.path.dirname( __file__ ) )
+from common import submit, display
+
+def main(api_key, api_url, in_folder, out_folder, data_library):
+ # Find/Create data library with the above name. Assume we're putting datasets in the root folder '/'
+ libs = display(api_key, api_url + 'libraries', return_formatted=False)
+ library_id = None
+ for library in libs:
+ if library['name'] == data_library:
+ library_id = library['id']
+ if not library_id:
+ lib_create_data = {'name':data_library}
+ library = submit(api_key, api_url + 'libraries', lib_create_data, return_formatted=False)
+ library_id = library[0]['id']
+ folders = display(api_key, api_url + "libraries/%s/contents" % library_id, return_formatted = False)
+ for f in folders:
+ if f['name'] == "/":
+ library_folder_id = f['id']
+ if not library_id or not library_folder_id:
+ print "Failure to configure library destination."
+ sys.exit(1)
+ # Watch in_folder, upload anything that shows up there to data library and get ldda,
+ # invoke workflow, move file to out_folder.
+ for fname in os.listdir(in_folder):
+ fullpath = os.path.join(in_folder, fname)
+ if os.path.isfile(fullpath) and os.path.exists(fullpath + ".json"):
+ data = {}
+ data['folder_id'] = library_folder_id
+ data['file_type'] = 'auto'
+ data['dbkey'] = ''
+ data['upload_option'] = 'upload_paths'
+ data['filesystem_paths'] = fullpath
+ data['create_type'] = 'file'
+
+ handle = open( fullpath + ".json" )
+ smeta = handle.read()
+ handle.close()
+ data['extended_metadata'] = json.loads(smeta)
+ libset = submit(api_key, api_url + "libraries/%s/contents" % library_id, data, return_formatted = True)
+ print libset
+
+if __name__ == '__main__':
+ try:
+ api_key = sys.argv[1]
+ api_url = sys.argv[2]
+ in_folder = sys.argv[3]
+ out_folder = sys.argv[4]
+ data_library = sys.argv[5]
+ except IndexError:
+ print 'usage: %s key url in_folder out_folder data_library' % os.path.basename( sys.argv[0] )
+ sys.exit( 1 )
+ main(api_key, api_url, in_folder, out_folder, data_library )
+
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
3 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/6a10ee8260f5/
changeset: 6a10ee8260f5
user: jgoecks
date: 2012-11-11 02:31:03
summary: Use a single generic method for asynchronously setting an item's slug.
affected #: 5 files
diff -r 5fdb5348d968f5bb38aedba23e26bdb9032a0c0b -r 6a10ee8260f5682bca6637ba855263426bee57de lib/galaxy/web/base/controller.py
--- a/lib/galaxy/web/base/controller.py
+++ b/lib/galaxy/web/base/controller.py
@@ -1487,16 +1487,19 @@
user.username = username
trans.sa_session.flush
return self.sharing( trans, id, **kwargs )
+
+ @web.expose
+ @web.require_login( "modify Galaxy items" )
+ def set_slug_async( self, trans, id, new_slug ):
+ item = self.get_item( trans, id )
+ if item:
+ item.slug = new_slug
+ trans.sa_session.flush()
+ return item.slug
# -- Abstract methods. --
@web.expose
- @web.require_login( "modify Galaxy items" )
- def set_slug_async( self, trans, id, new_slug ):
- """ Set item slug asynchronously. """
- raise "Unimplemented Method"
-
- @web.expose
@web.require_login( "share Galaxy items" )
def sharing( self, trans, id, **kwargs ):
""" Handle item sharing. """
diff -r 5fdb5348d968f5bb38aedba23e26bdb9032a0c0b -r 6a10ee8260f5682bca6637ba855263426bee57de lib/galaxy/webapps/galaxy/controllers/history.py
--- a/lib/galaxy/webapps/galaxy/controllers/history.py
+++ b/lib/galaxy/webapps/galaxy/controllers/history.py
@@ -725,15 +725,6 @@
return
@web.expose
- @web.require_login( "modify Galaxy items" )
- def set_slug_async( self, trans, id, new_slug ):
- history = self.get_history( trans, id )
- if history:
- history.slug = new_slug
- trans.sa_session.flush()
- return history.slug
-
- @web.expose
def get_item_content_async( self, trans, id ):
""" Returns item content in HTML format. """
diff -r 5fdb5348d968f5bb38aedba23e26bdb9032a0c0b -r 6a10ee8260f5682bca6637ba855263426bee57de lib/galaxy/webapps/galaxy/controllers/page.py
--- a/lib/galaxy/webapps/galaxy/controllers/page.py
+++ b/lib/galaxy/webapps/galaxy/controllers/page.py
@@ -621,15 +621,6 @@
return
@web.expose
- @web.require_login( "modify Galaxy items" )
- def set_slug_async( self, trans, id, new_slug ):
- page = self.get_page( trans, id )
- if page:
- page.slug = new_slug
- trans.sa_session.flush()
- return page.slug
-
- @web.expose
@web.require_login( "rate items" )
@web.json
def rate_async( self, trans, id, rating ):
diff -r 5fdb5348d968f5bb38aedba23e26bdb9032a0c0b -r 6a10ee8260f5682bca6637ba855263426bee57de lib/galaxy/webapps/galaxy/controllers/visualization.py
--- a/lib/galaxy/webapps/galaxy/controllers/visualization.py
+++ b/lib/galaxy/webapps/galaxy/controllers/visualization.py
@@ -366,17 +366,7 @@
# Display the management page
trans.set_message( 'Copy created with name "%s"' % cloned_visualization.title )
return self.list( trans )
-
- @web.expose
- @web.require_login( "modify Galaxy visualizations" )
- def set_slug_async( self, trans, id, new_slug ):
- """ Set item slug asynchronously. """
- visualization = self.get_visualization( trans, id )
- if visualization:
- visualization.slug = new_slug
- trans.sa_session.flush()
- return visualization.slug
-
+
@web.expose
@web.require_login( "use Galaxy visualizations" )
def set_accessible_async( self, trans, id=None, accessible=False ):
diff -r 5fdb5348d968f5bb38aedba23e26bdb9032a0c0b -r 6a10ee8260f5682bca6637ba855263426bee57de lib/galaxy/webapps/galaxy/controllers/workflow.py
--- a/lib/galaxy/webapps/galaxy/controllers/workflow.py
+++ b/lib/galaxy/webapps/galaxy/controllers/workflow.py
@@ -468,15 +468,6 @@
return
@web.expose
- @web.require_login( "modify Galaxy items" )
- def set_slug_async( self, trans, id, new_slug ):
- stored = self.get_stored_workflow( trans, id )
- if stored:
- stored.slug = new_slug
- trans.sa_session.flush()
- return stored.slug
-
- @web.expose
def get_embed_html_async( self, trans, id ):
""" Returns HTML for embedding a workflow in a page. """
https://bitbucket.org/galaxy/galaxy-central/changeset/5c1420204d84/
changeset: 5c1420204d84
user: jgoecks
date: 2012-11-11 04:50:33
summary: Ignore shed_tool_data_table_conf.xml in repository.
affected #: 1 file
diff -r 6a10ee8260f5682bca6637ba855263426bee57de -r 5c1420204d84e980ee5c2f3828d188cb0037505a .hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -28,6 +28,7 @@
reports_wsgi.ini
community_wsgi.ini
+# Config files.
datatypes_conf.xml
tool_conf.xml
external_service_types_conf.xml
@@ -37,6 +38,7 @@
tool_sheds_conf.xml
integrated_tool_panel.xml
openid_conf.xml
+shed_tool_data_table_conf.xml
static/welcome.html.*
static/welcome.html
https://bitbucket.org/galaxy/galaxy-central/changeset/dd63b34f8139/
changeset: dd63b34f8139
user: jgoecks
date: 2012-11-11 04:53:35
summary: Ensure that slugs cannot be duplicated for active, importable items.
affected #: 1 file
diff -r 5c1420204d84e980ee5c2f3828d188cb0037505a -r dd63b34f813972b00f7bf492aec1e74ef9bd5f59 lib/galaxy/web/base/controller.py
--- a/lib/galaxy/web/base/controller.py
+++ b/lib/galaxy/web/base/controller.py
@@ -1493,9 +1493,57 @@
def set_slug_async( self, trans, id, new_slug ):
item = self.get_item( trans, id )
if item:
- item.slug = new_slug
- trans.sa_session.flush()
- return item.slug
+ # Only update slug if slug is not already in use.
+ if trans.sa_session.query( item.__class__ ).filter_by( user=item.user, slug=new_slug, importable=True ).count() == 0:
+ item.slug = new_slug
+ trans.sa_session.flush()
+
+ return item.slug
+
+ def _make_item_accessible( self, sa_session, item ):
+ """ Makes item accessible--viewable and importable--and sets item's slug.
+ Does not flush/commit changes, however. Item must have name, user,
+ importable, and slug attributes. """
+ item.importable = True
+ self.create_item_slug( sa_session, item )
+
+ def create_item_slug( self, sa_session, item ):
+ """ Create/set item slug. Slug is unique among user's importable items
+ for item's class. Returns true if item's slug was set/changed; false
+ otherwise.
+ """
+ cur_slug = item.slug
+
+ # Setup slug base.
+ if cur_slug is None or cur_slug == "":
+ # Item can have either a name or a title.
+ if hasattr( item, 'name' ):
+ item_name = item.name
+ elif hasattr( item, 'title' ):
+ item_name = item.title
+ # Replace whitespace with '-'
+ slug_base = re.sub( "\s+", "-", item_name.lower() )
+ # Remove all non-alphanumeric characters.
+ slug_base = re.sub( "[^a-zA-Z0-9\-]", "", slug_base )
+ # Remove trailing '-'.
+ if slug_base.endswith('-'):
+ slug_base = slug_base[:-1]
+ else:
+ slug_base = cur_slug
+
+ # Using slug base, find a slug that is not taken. If slug is taken,
+ # add integer to end.
+ new_slug = slug_base
+ count = 1
+ while sa_session.query( item.__class__ ).filter_by( user=item.user, slug=new_slug, importable=True ).count() != 0:
+ # Slug taken; choose a new slug based on count. This approach can
+ # handle numerous items with the same name gracefully.
+ new_slug = '%s-%i' % ( slug_base, count )
+ count += 1
+
+ # Set slug and return.
+ item.slug = new_slug
+ return item.slug == cur_slug
# -- Abstract methods. --
@@ -1527,39 +1575,6 @@
def get_item_content_async( self, trans, id ):
""" Returns item content in HTML format. """
raise "Unimplemented Method"
-
- # -- Helper methods. --
-
- def _make_item_accessible( self, sa_session, item ):
- """ Makes item accessible--viewable and importable--and sets item's slug. Does not flush/commit changes, however. Item must have name, user, importable, and slug attributes. """
- item.importable = True
- self.create_item_slug( sa_session, item )
-
- def create_item_slug( self, sa_session, item ):
- """ Create item slug. Slug is unique among user's importable items for item's class. Returns true if item's slug was set; false otherwise. """
- if item.slug is None or item.slug == "":
- # Item can have either a name or a title.
- if hasattr( item, 'name' ):
- item_name = item.name
- elif hasattr( item, 'title' ):
- item_name = item.title
- # Replace whitespace with '-'
- slug_base = re.sub( "\s+", "-", item_name.lower() )
- # Remove all non-alphanumeric characters.
- slug_base = re.sub( "[^a-zA-Z0-9\-]", "", slug_base )
- # Remove trailing '-'.
- if slug_base.endswith('-'):
- slug_base = slug_base[:-1]
- # Make sure that slug is not taken; if it is, add a number to it.
- slug = slug_base
- count = 1
- while sa_session.query( item.__class__ ).filter_by( user=item.user, slug=slug, importable=True ).count() != 0:
- # Slug taken; choose a new slug based on count. This approach can handle numerous items with the same name gracefully.
- slug = '%s-%i' % ( slug_base, count )
- count += 1
- item.slug = slug
- return True
- return False
def get_item( self, trans, id ):
""" Return item based on id. """
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: clements: Pared Sphinx's mock module list down to those that actually get rid of errors at ReadTheDocs.
by Bitbucket 10 Nov '12
by Bitbucket 10 Nov '12
10 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/5fdb5348d968/
changeset: 5fdb5348d968
user: clements
date: 2012-11-03 18:25:21
summary: Pared Sphinx's mock module list down to those that actually get rid of errors at ReadTheDocs.
affected #: 1 file
diff -r f980df29adff1964f5978e56ce7414ee23eb3a25 -r 5fdb5348d968f5bb38aedba23e26bdb9032a0c0b doc/source/conf.py
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -273,7 +273,7 @@
else:
return Mock()
-# adding pbs_python, DRMAA_python. markupsafe, and drmaa here had no effect.
+# adding pbs_python, DRMAA_python, markupsafe, and drmaa here had no effect.
MOCK_MODULES = ['tables', 'decorator']
for mod_name in MOCK_MODULES:
sys.modules[mod_name] = Mock()
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/b1d704208702/
changeset: b1d704208702
user: clements
date: 2012-11-03 18:00:12
summary: More changes to get Sphinx to run with fewer erros on ReadTheDocs.org.
affected #: 1 file
diff -r 029237b5d5a2a511c7a787b7d7abbc6de94c01f3 -r b1d704208702feac085d9cf04d56bd08ebdbb3b0 doc/source/conf.py
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -273,6 +273,7 @@
else:
return Mock()
-MOCK_MODULES = ['tables', 'pbs_python', 'DRMAA_python', 'decorator']
+# adding pbs_python and DRMAA_python here had no effect.
+MOCK_MODULES = ['tables', 'markupsafe', 'drmaa', 'decorator']
for mod_name in MOCK_MODULES:
sys.modules[mod_name] = Mock()
https://bitbucket.org/galaxy/galaxy-central/changeset/f980df29adff/
changeset: f980df29adff
user: clements
date: 2012-11-03 18:10:15
summary: Took out mock modules that weren't helping from Sphinx config file.
affected #: 1 file
diff -r b1d704208702feac085d9cf04d56bd08ebdbb3b0 -r f980df29adff1964f5978e56ce7414ee23eb3a25 doc/source/conf.py
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -273,7 +273,7 @@
else:
return Mock()
-# adding pbs_python and DRMAA_python here had no effect.
-MOCK_MODULES = ['tables', 'markupsafe', 'drmaa', 'decorator']
+# adding pbs_python, DRMAA_python. markupsafe, and drmaa here had no effect.
+MOCK_MODULES = ['tables', 'decorator']
for mod_name in MOCK_MODULES:
sys.modules[mod_name] = Mock()
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: clements: Added ReadTheDocs section to Sphinx's conf.py. This lists modules that need to be mocked up, Ithink.
by Bitbucket 10 Nov '12
by Bitbucket 10 Nov '12
10 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/029237b5d5a2/
changeset: 029237b5d5a2
user: clements
date: 2012-11-03 17:34:06
summary: Added ReadTheDocs section to Sphinx's conf.py. This lists modules that need to be mocked up, Ithink.
affected #: 1 file
diff -r f8c03b26fd59f8546959789af33b2ae0370b8551 -r 029237b5d5a2a511c7a787b7d7abbc6de94c01f3 doc/source/conf.py
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -252,3 +252,27 @@
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
+
+# -- ReadTheDocs.org Settings ------------------------------------------------
+
+class Mock(object):
+ def __init__(self, *args, **kwargs):
+ pass
+
+ def __call__(self, *args, **kwargs):
+ return Mock()
+
+ @classmethod
+ def __getattr__(cls, name):
+ if name in ('__file__', '__path__'):
+ return '/dev/null'
+ elif name[0] == name[0].upper():
+ mockType = type(name, (), {})
+ mockType.__module__ = __name__
+ return mockType
+ else:
+ return Mock()
+
+MOCK_MODULES = ['tables', 'pbs_python', 'DRMAA_python', 'decorator']
+for mod_name in MOCK_MODULES:
+ sys.modules[mod_name] = Mock()
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
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/f8c03b26fd59/
changeset: f8c03b26fd59
user: clements
date: 2012-11-03 16:51:09
summary: All Sphinx related changes:
- Changed from Galaxy Documentation to Galaxy Code Documentation to be clearer
- Dropped galaxy.jobs.rules, as it is now empty.
affected #: 3 files
diff -r d30d2888780f44d815d4463e337bf0f62996e2df -r f8c03b26fd59f8546959789af33b2ae0370b8551 doc/source/conf.py
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -52,7 +52,7 @@
master_doc = 'index'
# General information about the project.
-project = u'Galaxy'
+project = u'Galaxy Code'
copyright = u'2012, Galaxy Team'
# The version info for the project you're documenting, acts as replacement for
@@ -195,7 +195,7 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
- ('index', 'Galaxy.tex', u'Galaxy Documentation',
+ ('index', 'Galaxy.tex', u'Galaxy Code Documentation',
u'Galaxy Team', 'manual'),
]
@@ -225,7 +225,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- ('index', 'galaxy', u'Galaxy Documentation',
+ ('index', 'galaxy', u'Galaxy Code Documentation',
[u'Galaxy Team'], 1)
]
@@ -239,7 +239,7 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
- ('index', 'Galaxy', u'Galaxy Documentation',
+ ('index', 'Galaxy', u'Galaxy Code Documentation',
u'Galaxy Team', 'Galaxy', 'Data intensive biology for everyone.',
'Miscellaneous'),
]
diff -r d30d2888780f44d815d4463e337bf0f62996e2df -r f8c03b26fd59f8546959789af33b2ae0370b8551 doc/source/index.rst
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -1,5 +1,5 @@
-Galaxy Documentation
-********************
+Galaxy Code Documentation
+*************************
Galaxy is an open, web-based platform for accessible, reproducible, and
transparent computational biomedical research.
diff -r d30d2888780f44d815d4463e337bf0f62996e2df -r f8c03b26fd59f8546959789af33b2ae0370b8551 doc/source/lib/galaxy.jobs.rst
--- a/doc/source/lib/galaxy.jobs.rst
+++ b/doc/source/lib/galaxy.jobs.rst
@@ -48,7 +48,6 @@
galaxy.jobs.actions
galaxy.jobs.deferred
- galaxy.jobs.rules
galaxy.jobs.runners
galaxy.jobs.splitters
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
09 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/d30d2888780f/
changeset: d30d2888780f
user: carlfeberhard
date: 2012-11-09 21:38:51
summary: (alt)history: subclass on for_editing flag: now hda-edit.js, hda-base.js; split hda and history templates; compile_templates.py: don't stop removal loop for error on single file; pack_scripts;
affected #: 44 files
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/mvc/dataset/hda-base.js
--- /dev/null
+++ b/static/scripts/mvc/dataset/hda-base.js
@@ -0,0 +1,447 @@
+//define([
+// "../mvc/base-mvc"
+//], function(){
+//==============================================================================
+/** read only view for HistoryDatasetAssociations
+ *
+ */
+var HDABaseView = BaseView.extend( LoggableMixin ).extend({
+ //??TODO: add alias in initialize this.hda = this.model?
+ // view for HistoryDatasetAssociation model above
+
+ // uncomment this out see log messages
+ //logger : console,
+
+ tagName : "div",
+ className : "historyItemContainer",
+
+ // ................................................................................ SET UP
+ initialize : function( attributes ){
+ this.log( this + '.initialize:', attributes );
+
+ // which buttons go in most states (ok/failed meta are more complicated)
+ this.defaultPrimaryActionButtonRenderers = [
+ this._render_showParamsButton
+ ];
+
+ // render urlTemplates (gen. provided by GalaxyPaths) to urls
+ if( !attributes.urlTemplates ){ throw( 'HDAView needs urlTemplates on initialize' ); }
+ this.urls = this.renderUrls( attributes.urlTemplates, this.model.toJSON() );
+
+ // whether the body of this hda is expanded (shown)
+ this.expanded = attributes.expanded || false;
+
+ // re-render the entire view on any model change
+ this.model.bind( 'change', this.render, this );
+ //this.bind( 'all', function( event ){
+ // this.log( event );
+ //}, this );
+ },
+
+ // urlTemplates is a map (or nested map) of underscore templates (currently, anyhoo)
+ // use the templates to create the apropo urls for each action this ds could use
+ renderUrls : function( urlTemplates, modelJson ){
+ var hdaView = this,
+ urls = {};
+ _.each( urlTemplates, function( urlTemplateOrObj, urlKey ){
+ // object == nested templates: recurse
+ if( _.isObject( urlTemplateOrObj ) ){
+ urls[ urlKey ] = hdaView.renderUrls( urlTemplateOrObj, modelJson );
+
+ // string == template:
+ } else {
+ // meta_down load is a special case (see renderMetaDownloadUrls)
+ //TODO: should be a better (gen.) way to handle this case
+ if( urlKey === 'meta_download' ){
+ urls[ urlKey ] = hdaView.renderMetaDownloadUrls( urlTemplateOrObj, modelJson );
+ } else {
+ urls[ urlKey ] = _.template( urlTemplateOrObj, modelJson );
+ }
+ }
+ });
+ return urls;
+ },
+
+ // there can be more than one meta_file to download, so return a list of url and file_type for each
+ renderMetaDownloadUrls : function( urlTemplate, modelJson ){
+ return _.map( modelJson.meta_files, function( meta_file ){
+ return {
+ url : _.template( urlTemplate, { id: modelJson.id, file_type: meta_file.file_type }),
+ file_type : meta_file.file_type
+ };
+ });
+ },
+
+ // ................................................................................ RENDER MAIN
+ // events: rendered, rendered:ready, rendered:initial, rendered:ready:initial
+ render : function(){
+ var view = this,
+ id = this.model.get( 'id' ),
+ state = this.model.get( 'state' ),
+ itemWrapper = $( '<div/>' ).attr( 'id', 'historyItem-' + id ),
+ initialRender = ( this.$el.children().size() === 0 );
+
+ //console.debug( this + '.render, initial?:', initialRender );
+ this.$el.attr( 'id', 'historyItemContainer-' + id );
+
+ itemWrapper
+ .addClass( 'historyItemWrapper' ).addClass( 'historyItem' )
+ .addClass( 'historyItem-' + state );
+
+ itemWrapper.append( this._render_warnings() );
+ itemWrapper.append( this._render_titleBar() );
+ this.body = $( this._render_body() );
+ itemWrapper.append( this.body );
+
+ //TODO: move to own function: setUpBehaviours
+ // we can potentially skip this step and call popupmenu directly on the download button
+ make_popup_menus( itemWrapper );
+
+ // set up canned behavior on children (bootstrap, popupmenus, editable_text, etc.)
+ itemWrapper.find( '.tooltip' ).tooltip({ placement : 'bottom' });
+
+ // transition...
+ this.$el.fadeOut( 'fast', function(){
+ view.$el.children().remove();
+ view.$el.append( itemWrapper ).fadeIn( 'fast', function(){
+ view.log( view + ' rendered:', view.$el );
+
+ var renderedEventName = 'rendered';
+ if( initialRender ){
+ renderedEventName += ':initial';
+ } else if( view.model.inReadyState() ){
+ renderedEventName += ':ready';
+ }
+ view.trigger( renderedEventName );
+ });
+ });
+ return this;
+ },
+
+ // ................................................................................ RENDER WARNINGS
+ // hda warnings including: is deleted, is purged, is hidden (including links to further actions (undelete, etc.))
+ _render_warnings : function(){
+ // jQ errs on building dom with whitespace - if there are no messages, trim -> ''
+ return $( jQuery.trim( HDABaseView.templates.messages( this.model.toJSON() )));
+ },
+
+ // ................................................................................ RENDER TITLEBAR
+ // the part of an hda always shown (whether the body is expanded or not): title link, title buttons
+ _render_titleBar : function(){
+ var titleBar = $( '<div class="historyItemTitleBar" style="overflow: hidden"></div>' );
+ titleBar.append( this._render_titleButtons() );
+ titleBar.append( '<span class="state-icon"></span>' );
+ titleBar.append( this._render_titleLink() );
+ return titleBar;
+ },
+
+ // ................................................................................ display, edit attr, delete
+ // icon-button group for the common, most easily accessed actions
+ //NOTE: these are generally displayed for almost every hda state (tho poss. disabled)
+ _render_titleButtons : function(){
+ // render the display, edit attr and delete icon-buttons
+ var buttonDiv = $( '<div class="historyItemButtons"></div>' );
+ buttonDiv.append( this._render_displayButton() );
+ return buttonDiv;
+ },
+
+ // icon-button to display this hda in the galaxy main iframe
+ _render_displayButton : function(){
+ // don't show display if not in ready state, error'd, or not accessible
+ if( ( !this.model.inReadyState() )
+ || ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.ERROR )
+ || ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.NOT_VIEWABLE )
+ || ( !this.model.get( 'accessible' ) ) ){
+ this.displayButton = null;
+ return null;
+ }
+
+ var displayBtnData = {
+ icon_class : 'display',
+ target : 'galaxy_main'
+ };
+
+ // show a disabled display if the data's been purged
+ if( this.model.get( 'purged' ) ){
+ displayBtnData.enabled = false;
+ displayBtnData.title = _l( 'Cannot display datasets removed from disk' );
+
+ } else {
+ displayBtnData.title = _l( 'Display data in browser' );
+ displayBtnData.href = this.urls.display;
+ }
+
+ this.displayButton = new IconButtonView({ model : new IconButton( displayBtnData ) });
+ return this.displayButton.render().$el;
+ },
+
+ // ................................................................................ titleLink
+ // render the hid and hda.name as a link (that will expand the body)
+ _render_titleLink : function(){
+ return $( jQuery.trim( HDABaseView.templates.titleLink(
+ _.extend( this.model.toJSON(), { urls: this.urls } )
+ )));
+ },
+
+ // ................................................................................ RENDER BODY
+ // render the data/metadata summary (format, size, misc info, etc.)
+ _render_hdaSummary : function(){
+ var modelData = _.extend( this.model.toJSON(), { urls: this.urls } );
+ return HDABaseView.templates.hdaSummary( modelData );
+ },
+
+ // ................................................................................ primary actions
+ // render the icon-buttons gen. placed underneath the hda summary
+ _render_primaryActionButtons : function( buttonRenderingFuncs ){
+ var view = this,
+ primaryActionButtons = $( '<div/>' ).attr( 'id', 'primary-actions-' + this.model.get( 'id' ) );
+ _.each( buttonRenderingFuncs, function( fn ){
+ primaryActionButtons.append( fn.call( view ) );
+ });
+ return primaryActionButtons;
+ },
+
+ // icon-button/popupmenu to down the data (and/or the associated meta files (bai, etc.)) for this hda
+ _render_downloadButton : function(){
+ // don't show anything if the data's been purged
+ if( this.model.get( 'purged' ) || !this.model.hasData() ){ return null; }
+
+ // return either: a single download icon-button (if there are no meta files)
+ // or a popupmenu with links to download assoc. meta files (if there are meta files)
+ var downloadLinkHTML = HDABaseView.templates.downloadLinks(
+ _.extend( this.model.toJSON(), { urls: this.urls } )
+ );
+ //this.log( this + '_render_downloadButton, downloadLinkHTML:', downloadLinkHTML );
+ return $( downloadLinkHTML );
+ },
+
+ // icon-button to show the input and output (stdout/err) for the job that created this hda
+ _render_showParamsButton : function(){
+ // gen. safe to show in all cases
+ 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;
+ },
+
+ // ................................................................................ other elements
+ // render links to external genome display applications (igb, gbrowse, etc.)
+ //TODO: not a fan of the style on these
+ _render_displayApps : function(){
+ if( !this.model.hasData() ){ return null; }
+
+ var displayAppsDiv = $( '<div/>' ).addClass( 'display-apps' );
+ if( !_.isEmpty( this.model.get( 'display_types' ) ) ){
+ //this.log( this + 'display_types:', this.model.get( 'urls' ).display_types );
+ //TODO:?? does this ever get used?
+ displayAppsDiv.append(
+ HDABaseView.templates.displayApps({ displayApps : this.model.get( 'display_types' ) })
+ );
+ }
+ if( !_.isEmpty( this.model.get( 'display_apps' ) ) ){
+ //this.log( this + 'display_apps:', this.model.get( 'urls' ).display_apps );
+ displayAppsDiv.append(
+ HDABaseView.templates.displayApps({ displayApps : this.model.get( 'display_apps' ) })
+ );
+ }
+ return displayAppsDiv;
+ },
+
+ // render the data peek
+ //TODO: curr. pre-formatted into table on the server side - may not be ideal/flexible
+ _render_peek : function(){
+ if( !this.model.get( 'peek' ) ){ return null; }
+ return $( '<div/>' ).append(
+ $( '<pre/>' )
+ .attr( 'id', 'peek' + this.model.get( 'id' ) )
+ .addClass( 'peek' )
+ .append( this.model.get( 'peek' ) )
+ );
+ },
+
+ // ................................................................................ state body renderers
+ // _render_body fns for the various states
+ //TODO: only render these on expansion (or already expanded)
+ _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_uploading : function( parent ){
+ parent.append( $( '<div>' + _l( 'Dataset is uploading' ) + '</div>' ) );
+ },
+
+ _render_body_queued : function( parent ){
+ parent.append( $( '<div>' + _l( 'Job is waiting to run' ) + '.</div>' ) );
+ parent.append( this._render_primaryActionButtons( this.defaultPrimaryActionButtonRenderers ));
+ },
+
+ _render_body_running : function( parent ){
+ parent.append( '<div>' + _l( 'Job is currently running' ) + '.</div>' );
+ parent.append( this._render_primaryActionButtons( this.defaultPrimaryActionButtonRenderers ));
+ },
+
+ _render_body_error : function( parent ){
+ if( !this.model.get( 'purged' ) ){
+ parent.append( $( '<div>' + this.model.get( 'misc_blurb' ) + '</div>' ) );
+ }
+ parent.append( ( _l( 'An error occurred running this job' ) + ': '
+ + '<i>' + $.trim( this.model.get( 'misc_info' ) ) + '</i>' ) );
+ parent.append( this._render_primaryActionButtons(
+ this.defaultPrimaryActionButtonRenderers.concat([ this._render_downloadButton ])
+ ));
+ },
+
+ _render_body_discarded : function( parent ){
+ parent.append( '<div>' + _l( 'The job creating this dataset was cancelled before completion' ) + '.</div>' );
+ parent.append( this._render_primaryActionButtons( this.defaultPrimaryActionButtonRenderers ));
+ },
+
+ _render_body_setting_metadata : function( parent ){
+ parent.append( $( '<div>' + _l( 'Metadata is being auto-detected' ) + '.</div>' ) );
+ },
+
+ _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 ));
+ },
+
+ _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( this.model.toJSON() ) ) );
+ //...then render the remaining body as STATES.OK (only diff between these states is the box above)
+ this._render_body_ok( parent );
+ },
+
+ _render_body_ok : function( parent ){
+ // most common state renderer and the most complicated
+ 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,
+ this._render_showParamsButton
+ ]));
+ return;
+ }
+
+ //NOTE: change the order here
+ parent.append( this._render_primaryActionButtons([
+ this._render_downloadButton,
+ this._render_showParamsButton
+ ]));
+ parent.append( '<div class="clear"/>' );
+
+ parent.append( this._render_displayApps() );
+ parent.append( this._render_peek() );
+ },
+
+ _render_body : function(){
+ //this.log( this + '_render_body' );
+
+ var body = $( '<div/>' )
+ .attr( 'id', 'info-' + this.model.get( 'id' ) )
+ .addClass( 'historyItemBody' )
+ .attr( 'style', 'display: block' );
+
+ //TODO: not a fan of this dispatch
+ switch( this.model.get( 'state' ) ){
+ case HistoryDatasetAssociation.STATES.NOT_VIEWABLE :
+ this._render_body_not_viewable( body );
+ break;
+ case HistoryDatasetAssociation.STATES.UPLOAD :
+ this._render_body_uploading( body );
+ break;
+ case HistoryDatasetAssociation.STATES.QUEUED :
+ this._render_body_queued( body );
+ break;
+ case HistoryDatasetAssociation.STATES.RUNNING :
+ this._render_body_running( body );
+ break;
+ case HistoryDatasetAssociation.STATES.ERROR :
+ this._render_body_error( body );
+ break;
+ case HistoryDatasetAssociation.STATES.DISCARDED :
+ this._render_body_discarded( body );
+ break;
+ case HistoryDatasetAssociation.STATES.SETTING_METADATA :
+ this._render_body_setting_metadata( body );
+ break;
+ case HistoryDatasetAssociation.STATES.EMPTY :
+ this._render_body_empty( body );
+ break;
+ case HistoryDatasetAssociation.STATES.FAILED_METADATA :
+ this._render_body_failed_metadata( body );
+ break;
+ case HistoryDatasetAssociation.STATES.OK :
+ this._render_body_ok( body );
+ break;
+ default:
+ //??: no body?
+ body.append( $( '<div>Error: unknown dataset state "' + state + '".</div>' ) );
+ }
+ body.append( '<div style="clear: both"></div>' );
+
+ if( this.expanded ){
+ body.show();
+ } else {
+ body.hide();
+ }
+ return body;
+ },
+
+ // ................................................................................ EVENTS
+ events : {
+ 'click .historyItemTitle' : 'toggleBodyVisibility'
+ },
+
+ // expand/collapse body
+ // event: body-visible, body-hidden
+ toggleBodyVisibility : function( event, expanded ){
+ var hdaView = this,
+ $body = this.$el.find( '.historyItemBody' );
+ expanded = ( expanded === undefined )?( !$body.is( ':visible' ) ):( expanded );
+ //this.log( 'toggleBodyVisibility, expanded:', expanded, '$body:', $body );
+
+ if( expanded ){
+ $body.slideDown( 'fast', function(){
+ hdaView.trigger( 'body-visible', hdaView.model.get( 'id' ) );
+ });
+ } else {
+ $body.slideUp( 'fast', function(){
+ hdaView.trigger( 'body-hidden', hdaView.model.get( 'id' ) );
+ });
+ }
+ },
+
+ // ................................................................................ UTILTIY
+ toString : function(){
+ var modelString = ( this.model )?( this.model + '' ):( '(no model)' );
+ return 'HDABaseView(' + modelString + ')';
+ }
+});
+
+//------------------------------------------------------------------------------
+HDABaseView.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 : HDABaseView,
+//};});
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/mvc/dataset/hda-edit.js
--- a/static/scripts/mvc/dataset/hda-edit.js
+++ b/static/scripts/mvc/dataset/hda-edit.js
@@ -2,155 +2,32 @@
// "../mvc/base-mvc"
//], function(){
//==============================================================================
-/** View for editing (working with - as opposed to viewing/read-only) an hda
+/** editing view for HistoryDatasetAssociations
*
*/
-var HDAView = BaseView.extend( LoggableMixin ).extend({
- //??TODO: add alias in initialize this.hda = this.model?
- // view for HistoryDatasetAssociation model above
+var HDAEditView = HDABaseView.extend({
- // uncomment this out see log messages
- //logger : console,
-
- tagName : "div",
- className : "historyItemContainer",
-
// ................................................................................ SET UP
initialize : function( attributes ){
- this.log( this + '.initialize:', attributes );
+ HDABaseView.prototype.initialize.call( this, attributes );
- // render urlTemplates (gen. provided by GalaxyPaths) to urls
- if( !attributes.urlTemplates ){ throw( 'HDAView needs urlTemplates on initialize' ); }
- this.urls = this.renderUrls( attributes.urlTemplates, this.model.toJSON() );
-
- // whether the body of this hda is expanded (shown)
- this.expanded = attributes.expanded || false;
-
- // re-render the entire view on any model change
- this.model.bind( 'change', this.render, this );
- //this.bind( 'all', function( event ){
- // this.log( event );
- //}, this );
- },
-
- // urlTemplates is a map (or nested map) of underscore templates (currently, anyhoo)
- // use the templates to create the apropo urls for each action this ds could use
- renderUrls : function( urlTemplates, modelJson ){
- var hdaView = this,
- urls = {};
- _.each( urlTemplates, function( urlTemplateOrObj, urlKey ){
- // object == nested templates: recurse
- if( _.isObject( urlTemplateOrObj ) ){
- urls[ urlKey ] = hdaView.renderUrls( urlTemplateOrObj, modelJson );
-
- // string == template:
- } else {
- // meta_down load is a special case (see renderMetaDownloadUrls)
- //TODO: should be a better (gen.) way to handle this case
- if( urlKey === 'meta_download' ){
- urls[ urlKey ] = hdaView.renderMetaDownloadUrls( urlTemplateOrObj, modelJson );
- } else {
- urls[ urlKey ] = _.template( urlTemplateOrObj, modelJson );
- }
- }
- });
- return urls;
+ // which buttons go in most states (ok/failed meta are more complicated)
+ // HDAEdit gets the rerun button on almost all states
+ this.defaultPrimaryActionButtonRenderers = [
+ this._render_showParamsButton,
+ this._render_rerunButton
+ ];
},
- // there can be more than one meta_file to download, so return a list of url and file_type for each
- renderMetaDownloadUrls : function( urlTemplate, modelJson ){
- return _.map( modelJson.meta_files, function( meta_file ){
- return {
- url : _.template( urlTemplate, { id: modelJson.id, file_type: meta_file.file_type }),
- file_type : meta_file.file_type
- };
- });
- },
-
- // ................................................................................ RENDER MAIN
- // events: rendered, rendered:ready, rendered:initial, rendered:ready:initial
- render : function(){
- var view = this,
- id = this.model.get( 'id' ),
- state = this.model.get( 'state' ),
- itemWrapper = $( '<div/>' ).attr( 'id', 'historyItem-' + id ),
- initialRender = ( this.$el.children().size() === 0 );
-
- //console.debug( this + '.render, initial?:', initialRender );
-
- this._clearReferences();
- this.$el.attr( 'id', 'historyItemContainer-' + id );
-
- itemWrapper
- .addClass( 'historyItemWrapper' ).addClass( 'historyItem' )
- .addClass( 'historyItem-' + state );
-
- itemWrapper.append( this._render_warnings() );
- itemWrapper.append( this._render_titleBar() );
- this.body = $( this._render_body() );
- itemWrapper.append( this.body );
-
- //TODO: move to own function: setUpBehaviours
- // we can potentially skip this step and call popupmenu directly on the download button
- make_popup_menus( itemWrapper );
-
- // set up canned behavior on children (bootstrap, popupmenus, editable_text, etc.)
- itemWrapper.find( '.tooltip' ).tooltip({ placement : 'bottom' });
-
- // transition...
- this.$el.fadeOut( 'fast', function(){
- view.$el.children().remove();
- view.$el.append( itemWrapper ).fadeIn( 'fast', function(){
- view.log( view + ' rendered:', view.$el );
-
- var renderedEventName = 'rendered';
- if( initialRender ){
- renderedEventName += ':initial';
- } else if( view.model.inReadyState() ){
- renderedEventName += ':ready';
- }
- view.trigger( renderedEventName );
- });
- });
- return this;
- },
-
- //NOTE: button renderers have the side effect of caching their IconButtonViews to this view
- // clear out cached sub-views, dom refs, etc. from prev. render
- _clearReferences : function(){
- //??TODO: we should reset these in the button logic checks (i.e. if not needed this.button = null; return null)
- //?? do we really need these - not so far
- //TODO: at least move these to a map
- this.displayButton = null;
- this.editButton = null;
- this.deleteButton = null;
- this.errButton = null;
- this.showParamsButton = null;
- this.rerunButton = null;
- this.visualizationsButton = null;
- this.tagButton = null;
- this.annotateButton = null;
- },
-
// ................................................................................ RENDER WARNINGS
// hda warnings including: is deleted, is purged, is hidden (including links to further actions (undelete, etc.))
_render_warnings : function(){
// jQ errs on building dom with whitespace - if there are no messages, trim -> ''
- return $( jQuery.trim( HDAView.templates.messages(
+ return $( jQuery.trim( HDABaseView.templates.messages(
_.extend( this.model.toJSON(), { urls: this.urls } )
)));
},
- // ................................................................................ RENDER TITLEBAR
- // the part of an hda always shown (whether the body is expanded or not): title link, title buttons
- _render_titleBar : function(){
- var titleBar = $( '<div class="historyItemTitleBar" style="overflow: hidden"></div>' );
- titleBar.append( this._render_titleButtons() );
- titleBar.append( '<span class="state-icon"></span>' );
- titleBar.append( this._render_titleLink() );
- return titleBar;
- },
-
// ................................................................................ display, edit attr, delete
// icon-button group for the common, most easily accessed actions
//NOTE: these are generally displayed for almost every hda state (tho poss. disabled)
@@ -163,46 +40,16 @@
return buttonDiv;
},
- // icon-button to display this hda in the galaxy main iframe
- _render_displayButton : function(){
- // don't show display if not in ready state, error'd, or not accessible
- if( ( !this.model.inReadyState() )
+ // icon-button to edit the attributes (format, permissions, etc.) this hda
+ _render_editButton : function(){
+ // don't show edit while uploading
+ //TODO??: error?
+ //TODO??: not viewable/accessible are essentially the same (not viewable set from accessible)
+ if( ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.UPLOAD )
|| ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.ERROR )
|| ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.NOT_VIEWABLE )
|| ( !this.model.get( 'accessible' ) ) ){
- return null;
- }
-
- var displayBtnData = {
- icon_class : 'display'
- };
-
- // show a disabled display if the data's been purged
- if( this.model.get( 'purged' ) ){
- displayBtnData.enabled = false;
- displayBtnData.title = _l( 'Cannot display datasets removed from disk' );
-
- } else {
- displayBtnData.title = _l( 'Display data in browser' );
- displayBtnData.href = this.urls.display;
- }
-
- if( this.model.get( 'for_editing' ) ){
- displayBtnData.target = 'galaxy_main';
- }
-
- this.displayButton = new IconButtonView({ model : new IconButton( displayBtnData ) });
- return this.displayButton.render().$el;
- },
-
- // icon-button to edit the attributes (format, permissions, etc.) this hda
- _render_editButton : function(){
- // don't show edit while uploading, or if editable
- if( ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.UPLOAD )
- || ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.ERROR )
- || ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.NOT_VIEWABLE )
- || ( !this.model.get( 'accessible' ) )
- || ( !this.model.get( 'for_editing' ) ) ){
+ this.editButton = null;
return null;
}
@@ -216,7 +63,6 @@
};
// disable if purged or deleted and explain why in the tooltip
- //TODO: if for_editing
if( deleted || purged ){
editBtnData.enabled = false;
if( purged ){
@@ -233,9 +79,10 @@
// icon-button to delete this hda
_render_deleteButton : function(){
// don't show delete if...
- if( ( !this.model.get( 'for_editing' ) )
- || ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.NOT_VIEWABLE )
+ //TODO??: not viewable/accessible are essentially the same (not viewable set from accessible)
+ if( ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.NOT_VIEWABLE )
|| ( !this.model.get( 'accessible' ) ) ){
+ this.deleteButton = null;
return null;
}
@@ -255,14 +102,6 @@
this.deleteButton = new IconButtonView({ model : new IconButton( deleteBtnData ) });
return this.deleteButton.render().$el;
},
-
- // ................................................................................ titleLink
- // render the hid and hda.name as a link (that will expand the body)
- _render_titleLink : function(){
- return $( jQuery.trim( HDAView.templates.titleLink(
- _.extend( this.model.toJSON(), { urls: this.urls } )
- )));
- },
// ................................................................................ RENDER BODY
// render the data/metadata summary (format, size, misc info, etc.)
@@ -271,40 +110,19 @@
// 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 HDAView.templates.hdaSummary( modelData );
+ return HDABaseView.templates.hdaSummary( modelData );
},
// ................................................................................ primary actions
- // render the icon-buttons gen. placed underneath the hda summary
- _render_primaryActionButtons : function( buttonRenderingFuncs ){
- var primaryActionButtons = $( '<div/>' ).attr( 'id', 'primary-actions-' + this.model.get( 'id' ) ),
- view = this;
- _.each( buttonRenderingFuncs, function( fn ){
- primaryActionButtons.append( fn.call( view ) );
- });
- return primaryActionButtons;
- },
-
- // icon-button/popupmenu to down the data (and/or the associated meta files (bai, etc.)) for this hda
- _render_downloadButton : function(){
- // don't show anything if the data's been purged
- if( this.model.get( 'purged' ) ){ return null; }
-
- // return either: a single download icon-button (if there are no meta files)
- // or a popupmenu with links to download assoc. meta files (if there are meta files)
- var downloadLinkHTML = HDAView.templates.downloadLinks(
- _.extend( this.model.toJSON(), { urls: this.urls } )
- );
- //this.log( this + '_render_downloadButton, downloadLinkHTML:', downloadLinkHTML );
- return $( downloadLinkHTML );
- },
-
// icon-button to show the input and output (stdout/err) for the job that created this hda
- _render_errButton : function(){
- if( ( this.model.get( 'state' ) !== HistoryDatasetAssociation.STATES.ERROR )
- || ( !this.model.get( 'for_editing' ) ) ){ return null; }
+ _render_errButton : function(){
+ if( this.model.get( 'state' ) !== HistoryDatasetAssociation.STATES.ERROR ){
+ this.errButton = null;
+ return null;
+ }
this.errButton = new IconButtonView({ model : new IconButton({
title : _l( 'View or report this error' ),
@@ -315,21 +133,8 @@
return this.errButton.render().$el;
},
- // icon-button to show the input and output (stdout/err) for the job that created this hda
- _render_showParamsButton : function(){
- // gen. safe to show in all cases
- 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;
- },
-
// icon-button to re run the job that created this hda
_render_rerunButton : function(){
- if( !this.model.get( 'for_editing' ) ){ return null; }
this.rerunButton = new IconButtonView({ model : new IconButton({
title : _l( 'Run this job again' ),
href : this.urls.rerun,
@@ -352,10 +157,10 @@
};
if( !( this.model.hasData() )
- || !( this.model.get( 'for_editing' ) )
|| !( visualizations && visualizations.length )
|| !( visualization_url ) ){
//console.warn( 'NOT rendering visualization icon' )
+ this.visualizationsButton = null;
return null;
}
@@ -422,9 +227,12 @@
// icon-button to load and display tagging html
//TODO: these should be a sub-MV
_render_tagButton : function(){
+ //TODO: check for User
if( !( this.model.hasData() )
- || !( this.model.get( 'for_editing' ) )
- || ( !this.urls.tags.get ) ){ return null; }
+ || ( !this.urls.tags.get ) ){
+ this.tagButton = null;
+ return null;
+ }
this.tagButton = new IconButtonView({ model : new IconButton({
title : _l( 'Edit dataset tags' ),
@@ -438,9 +246,12 @@
// icon-button to load and display annotation html
//TODO: these should be a sub-MV
_render_annotateButton : function(){
+ //TODO: check for User
if( !( this.model.hasData() )
- || !( this.model.get( 'for_editing' ) )
- || ( !this.urls.annotation.get ) ){ return null; }
+ || ( !this.urls.annotation.get ) ){
+ this.annotateButton = null;
+ return null;
+ }
this.annotateButton = new IconButtonView({ model : new IconButton({
title : _l( 'Edit dataset annotation' ),
@@ -451,130 +262,34 @@
},
// ................................................................................ other elements
- // render links to external genome display applications (igb, gbrowse, etc.)
- //TODO: not a fan of the style on these
- _render_displayApps : function(){
- if( !this.model.hasData() ){ return null; }
-
- var displayAppsDiv = $( '<div/>' ).addClass( 'display-apps' );
- if( !_.isEmpty( this.model.get( 'display_types' ) ) ){
- //this.log( this + 'display_types:', this.model.get( 'urls' ).display_types );
- //TODO:?? does this ever get used?
- displayAppsDiv.append(
- HDAView.templates.displayApps({ displayApps : this.model.get( 'display_types' ) })
- );
- }
- if( !_.isEmpty( this.model.get( 'display_apps' ) ) ){
- //this.log( this + 'display_apps:', this.model.get( 'urls' ).display_apps );
- displayAppsDiv.append(
- HDAView.templates.displayApps({ displayApps : this.model.get( 'display_apps' ) })
- );
- }
- return displayAppsDiv;
- },
-
//TODO: into sub-MV
+ //TODO: check for User
// render the area used to load tag display
_render_tagArea : function(){
if( !this.urls.tags.set ){ return null; }
//TODO: move to mvc/tags.js
- return $( HDAView.templates.tagArea(
+ return $( HDAEditView.templates.tagArea(
_.extend( this.model.toJSON(), { urls: this.urls } )
));
},
//TODO: into sub-MV
+ //TODO: check for User
// render the area used to load annotation display
_render_annotationArea : function(){
if( !this.urls.annotation.get ){ return null; }
//TODO: move to mvc/annotations.js
- return $( HDAView.templates.annotationArea(
+ return $( HDAEditView.templates.annotationArea(
_.extend( this.model.toJSON(), { urls: this.urls } )
));
},
-
- // render the data peek
- //TODO: curr. pre-formatted into table on the server side - may not be ideal/flexible
- _render_peek : function(){
- if( !this.model.get( 'peek' ) ){ return null; }
- return $( '<div/>' ).append(
- $( '<pre/>' )
- .attr( 'id', 'peek' + this.model.get( 'id' ) )
- .addClass( 'peek' )
- .append( this.model.get( 'peek' ) )
- );
- },
// ................................................................................ state body renderers
- // _render_body fns for the various states
- //TODO: only render these on expansion (or already expanded)
- _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_uploading : function( parent ){
- parent.append( $( '<div>' + _l( 'Dataset is uploading' ) + '</div>' ) );
- },
-
- _render_body_queued : function( parent ){
- parent.append( $( '<div>' + _l( 'Job is waiting to run' ) + '.</div>' ) );
- parent.append( this._render_primaryActionButtons([
- this._render_showParamsButton,
- this._render_rerunButton
- ]));
- },
-
- _render_body_running : function( parent ){
- parent.append( '<div>' + _l( 'Job is currently running' ) + '.</div>' );
- parent.append( this._render_primaryActionButtons([
- this._render_showParamsButton,
- this._render_rerunButton
- ]));
- },
-
_render_body_error : function( parent ){
- if( !this.model.get( 'purged' ) ){
- parent.append( $( '<div>' + this.model.get( 'misc_blurb' ) + '</div>' ) );
- }
- parent.append( ( _l( 'An error occurred running this job' ) + ': '
- + '<i>' + $.trim( this.model.get( 'misc_info' ) ) + '</i>' ) );
- parent.append( this._render_primaryActionButtons([
- this._render_downloadButton,
- this._render_errButton,
- this._render_showParamsButton,
- this._render_rerunButton
- ]));
- },
-
- _render_body_discarded : function( parent ){
- parent.append( '<div>' + _l( 'The job creating this dataset was cancelled before completion' ) + '.</div>' );
- parent.append( this._render_primaryActionButtons([
- this._render_showParamsButton,
- this._render_rerunButton
- ]));
- },
-
- _render_body_setting_metadata : function( parent ){
- parent.append( $( '<div>' + _l( 'Metadata is being auto-detected' ) + '.</div>' ) );
- },
-
- _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._render_showParamsButton,
- this._render_rerunButton
- ]));
- },
-
- _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( $( HDAView.templates.failedMetadata( this.model.toJSON() ) ) );
- //...then render the remaining body as STATES.OK (only diff between these states is the box above)
- this._render_body_ok( parent );
+ // overridden to prepend error report button to primary actions strip
+ HDABaseView.prototype._render_body_error.call( this, parent );
+ var primaryActions = parent.find( '#primary-actions-' + this.model.get( 'id' ) );
+ primaryActions.prepend( this._render_errButton() );
},
_render_body_ok : function( parent ){
@@ -595,7 +310,6 @@
//NOTE: change the order here
parent.append( this._render_primaryActionButtons([
this._render_downloadButton,
- this._render_errButton,
this._render_showParamsButton,
this._render_rerunButton,
this._render_visualizationsButton
@@ -611,70 +325,6 @@
parent.append( this._render_displayApps() );
parent.append( this._render_peek() );
-
- //TODO??: still needed?
- //// If Mozilla, hide scrollbars in hidden items since they cause animation bugs
- //if ( $.browser.mozilla ) {
- // $( "div.historyItemBody" ).each( function() {
- // if ( !$(this).is(":visible") ) { $(this).find( "pre.peek" ).css( "overflow", "hidden" ); }
- // });
- //}
- },
-
- _render_body : function(){
- //this.log( this + '_render_body' );
- //this.log( 'state:', state, 'for_editing', for_editing );
-
- //TODO: incorrect id (encoded - use hid?)
- var body = $( '<div/>' )
- .attr( 'id', 'info-' + this.model.get( 'id' ) )
- .addClass( 'historyItemBody' )
- .attr( 'style', 'display: block' );
-
- //TODO: not a fan of this dispatch
- switch( this.model.get( 'state' ) ){
- case HistoryDatasetAssociation.STATES.NOT_VIEWABLE :
- this._render_body_not_viewable( body );
- break;
- case HistoryDatasetAssociation.STATES.UPLOAD :
- this._render_body_uploading( body );
- break;
- case HistoryDatasetAssociation.STATES.QUEUED :
- this._render_body_queued( body );
- break;
- case HistoryDatasetAssociation.STATES.RUNNING :
- this._render_body_running( body );
- break;
- case HistoryDatasetAssociation.STATES.ERROR :
- this._render_body_error( body );
- break;
- case HistoryDatasetAssociation.STATES.DISCARDED :
- this._render_body_discarded( body );
- break;
- case HistoryDatasetAssociation.STATES.SETTING_METADATA :
- this._render_body_setting_metadata( body );
- break;
- case HistoryDatasetAssociation.STATES.EMPTY :
- this._render_body_empty( body );
- break;
- case HistoryDatasetAssociation.STATES.FAILED_METADATA :
- this._render_body_failed_metadata( body );
- break;
- case HistoryDatasetAssociation.STATES.OK :
- this._render_body_ok( body );
- break;
- default:
- //??: no body?
- body.append( $( '<div>Error: unknown dataset state "' + state + '".</div>' ) );
- }
- body.append( '<div style="clear: both"></div>' );
-
- if( this.expanded ){
- body.show();
- } else {
- body.hide();
- }
- return body;
},
// ................................................................................ EVENTS
@@ -761,25 +411,6 @@
return false;
},
- // expand/collapse body
- // event: body-visible, body-hidden
- toggleBodyVisibility : function( event, expanded ){
- var hdaView = this,
- $body = this.$el.find( '.historyItemBody' );
- expanded = ( expanded === undefined )?( !$body.is( ':visible' ) ):( expanded );
- //this.log( 'toggleBodyVisibility, expanded:', expanded, '$body:', $body );
-
- if( expanded ){
- $body.slideDown( 'fast', function(){
- hdaView.trigger( 'body-visible', hdaView.model.get( 'id' ) );
- });
- } else {
- $body.slideUp( 'fast', function(){
- hdaView.trigger( 'body-hidden', hdaView.model.get( 'id' ) );
- });
- }
- },
-
// ................................................................................ UTILTIY
toString : function(){
var modelString = ( this.model )?( this.model + '' ):( '(no model)' );
@@ -788,17 +419,9 @@
});
//------------------------------------------------------------------------------
-HDAView.templates = {
- warningMsg : Handlebars.templates[ 'template-warningmessagesmall' ],
-
- messages : Handlebars.templates[ 'template-history-warning-messages' ],
- titleLink : Handlebars.templates[ 'template-history-titleLink' ],
- hdaSummary : Handlebars.templates[ 'template-history-hdaSummary' ],
- downloadLinks : Handlebars.templates[ 'template-history-downloadLinks' ],
- failedMetadata : Handlebars.templates[ 'template-history-failedMetaData' ],
- tagArea : Handlebars.templates[ 'template-history-tagArea' ],
- annotationArea : Handlebars.templates[ 'template-history-annotationArea' ],
- displayApps : Handlebars.templates[ 'template-history-displayApps' ]
+HDAEditView.templates = {
+ tagArea : Handlebars.templates[ 'template-hda-tagArea' ],
+ annotationArea : Handlebars.templates[ 'template-hda-annotationArea' ]
};
//==============================================================================
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/mvc/dataset/hda-model.js
--- a/static/scripts/mvc/dataset/hda-model.js
+++ b/static/scripts/mvc/dataset/hda-model.js
@@ -43,10 +43,7 @@
// aka. !hidden
visible : false,
// based on trans.user (is_admin or security_agent.can_access_dataset( <user_roles>, hda.dataset ))
- accessible : false,
-
- //TODO: this needs to be removed (it is a function of the view type (e.g. HDAForEditingView))
- for_editing : true
+ accessible : false
},
// fetch location of this history in the api
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/mvc/history/history-panel.js
--- a/static/scripts/mvc/history/history-panel.js
+++ b/static/scripts/mvc/history/history-panel.js
@@ -5,26 +5,26 @@
Backbone.js implementation of history panel
TODO:
+ refactoring on for_editing:
+ uhoh: purge link in warning message in history_common.mako conditional on trans.app.config.allow_user_dataset_purge
+ bug: rerun still doesn't take encoded ids
+
anon user, mako template init:
- bug: rename url seems to be wrong url
BUG: shouldn't have tag/anno buttons (on hdas)
Check for user in hdaView somehow
logged in, mako template:
- BUG: quotaMsg not showing when 100% (on load)
bug: rename not being changed locally - render() shows old name, refresh: new name
+ TODO: editable text to MV, might also just use REST.update on history
BUG: meter is not updating RELIABLY on change:nice_size
BUG: am able to start upload even if over quota - 'runs' forever
bug: quotaMeter bar rendering square in chrome
- BUG: imported, shared history with unaccessible dataset errs in historycontents when getting history
- (entire history is inaccessible)
- ??: still happening?
from loadFromApi:
+
+ fixed:
BUG: not loading deleted datasets
FIXED: history_contents, show: state_ids returns all ids now (incl. deleted)
-
- fixed:
BUG: upload, history size, doesn't change
FIXED: using change:nice_size to trigger re-render of history size
BUG: delete uploading hda - now in state 'discarded'! ...new state to handle
@@ -112,6 +112,8 @@
// direct attachment to existing element
el : 'body.historyPage',
+ //HDAView : HDABaseView,
+ HDAView : HDAEditView,
// init with the model, urlTemplates, set up storage, bind HDACollection events
//NOTE: this will create or load PersistantStorage keyed under 'HistoryView.<id>'
@@ -122,9 +124,9 @@
// set up url templates
//TODO: prob. better to put this in class scope (as the handlebars templates), but...
// they're added to GalaxyPaths on page load (after this file is loaded)
- if( !attributes.urlTemplates ){ throw( 'HDAView needs urlTemplates on initialize' ); }
- if( !attributes.urlTemplates.history ){ throw( 'HDAView needs urlTemplates.history on initialize' ); }
- if( !attributes.urlTemplates.hda ){ throw( 'HDAView needs urlTemplates.hda on initialize' ); }
+ if( !attributes.urlTemplates ){ throw( this + ' needs urlTemplates on initialize' ); }
+ if( !attributes.urlTemplates.history ){ throw( this + ' needs urlTemplates.history on initialize' ); }
+ if( !attributes.urlTemplates.hda ){ throw( this + ' needs urlTemplates.hda on initialize' ); }
this.urlTemplates = attributes.urlTemplates.history;
this.hdaUrlTemplates = attributes.urlTemplates.hda;
@@ -283,7 +285,7 @@
var hdaId = hda.get( 'id' ),
expanded = historyView.storage.get( 'expandedHdas' ).get( hdaId );
- historyView.hdaViews[ hdaId ] = new HDAView({
+ historyView.hdaViews[ hdaId ] = new historyView.HDAView({
model : hda,
expanded : expanded,
urlTemplates : historyView.hdaUrlTemplates
@@ -301,12 +303,11 @@
setUpHdaListeners : function( hdaView ){
var historyView = this;
// use storage to maintain a list of hdas whose bodies are expanded
- hdaView.bind( 'toggleBodyVisibility', function( id, visible ){
- if( visible ){
- historyView.storage.get( 'expandedHdas' ).set( id, true );
- } else {
- historyView.storage.get( 'expandedHdas' ).deleteKey( id );
- }
+ hdaView.bind( 'body-visible', function( id ){
+ historyView.storage.get( 'expandedHdas' ).set( id, true );
+ });
+ hdaView.bind( 'body-hidden', function( id ){
+ historyView.storage.get( 'expandedHdas' ).deleteKey( id );
});
},
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/mvc/dataset/hda-base.js
--- /dev/null
+++ b/static/scripts/packed/mvc/dataset/hda-base.js
@@ -0,0 +1,1 @@
+var HDABaseView=BaseView.extend(LoggableMixin).extend({tagName:"div",className:"historyItemContainer",initialize:function(a){this.log(this+".initialize:",a);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton];if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}this.urls=this.renderUrls(a.urlTemplates,this.model.toJSON());this.expanded=a.expanded||false;this.model.bind("change",this.render,this)},renderUrls:function(d,a){var b=this,c={};_.each(d,function(e,f){if(_.isObject(e)){c[f]=b.renderUrls(e,a)}else{if(f==="meta_download"){c[f]=b.renderMetaDownloadUrls(e,a)}else{c[f]=_.template(e,a)}}});return c},renderMetaDownloadUrls:function(b,a){return _.map(a.meta_files,function(c){return{url:_.template(b,{id:a.id,file_type:c.file_type}),file_type:c.file_type}})},render:function(){var b=this,e=this.model.get("id"),c=this.model.get("state"),a=$("<div/>").attr("id","historyItem-"+e),d=(this.$el.children().size()===0);this.$el.attr("id","historyItemContainer-"+e);a.addClass("historyItemWrapper").addClass("historyItem").addClass("historyItem-"+c);a.append(this._render_warnings());a.append(this._render_titleBar());this.body=$(this._render_body());a.append(this.body);make_popup_menus(a);a.find(".tooltip").tooltip({placement:"bottom"});this.$el.fadeOut("fast",function(){b.$el.children().remove();b.$el.append(a).fadeIn("fast",function(){b.log(b+" rendered:",b.$el);var f="rendered";if(d){f+=":initial"}else{if(b.model.inReadyState()){f+=":ready"}}b.trigger(f)})});return this},_render_warnings:function(){return $(jQuery.trim(HDABaseView.templates.messages(this.model.toJSON())))},_render_titleBar:function(){var a=$('<div class="historyItemTitleBar" style="overflow: hidden"></div>');a.append(this._render_titleButtons());a.append('<span class="state-icon"></span>');a.append(this._render_titleLink());return a},_render_titleButtons:function(){var a=$('<div class="historyItemButtons"></div>');a.append(this._render_displayButton());return a},_render_displayButton:function(){if((!this.model.inReadyState())||(this.model.get("state")===HistoryDatasetAssociation.STATES.ERROR)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){this.displayButton=null;return null}var a={icon_class:"display",target:"galaxy_main"};if(this.model.get("purged")){a.enabled=false;a.title=_l("Cannot display datasets removed from disk")}else{a.title=_l("Display data in browser");a.href=this.urls.display}this.displayButton=new IconButtonView({model:new IconButton(a)});return this.displayButton.render().$el},_render_titleLink:function(){return $(jQuery.trim(HDABaseView.templates.titleLink(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_hdaSummary:function(){var a=_.extend(this.model.toJSON(),{urls:this.urls});return HDABaseView.templates.hdaSummary(a)},_render_primaryActionButtons:function(c){var a=this,b=$("<div/>").attr("id","primary-actions-"+this.model.get("id"));_.each(c,function(d){b.append(d.call(a))});return b},_render_downloadButton:function(){if(this.model.get("purged")||!this.model.hasData()){return null}var a=HDABaseView.templates.downloadLinks(_.extend(this.model.toJSON(),{urls:this.urls}));return $(a)},_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_displayApps:function(){if(!this.model.hasData()){return null}var a=$("<div/>").addClass("display-apps");if(!_.isEmpty(this.model.get("display_types"))){a.append(HDABaseView.templates.displayApps({displayApps:this.model.get("display_types")}))}if(!_.isEmpty(this.model.get("display_apps"))){a.append(HDABaseView.templates.displayApps({displayApps:this.model.get("display_apps")}))}return a},_render_peek:function(){if(!this.model.get("peek")){return null}return $("<div/>").append($("<pre/>").attr("id","peek"+this.model.get("id")).addClass("peek").append(this.model.get("peek")))},_render_body_not_viewable:function(a){a.append($("<div>"+_l("You do not have permission to view dataset")+".</div>"))},_render_body_uploading:function(a){a.append($("<div>"+_l("Dataset is uploading")+"</div>"))},_render_body_queued:function(a){a.append($("<div>"+_l("Job is waiting to run")+".</div>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_running:function(a){a.append("<div>"+_l("Job is currently running")+".</div>");a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_error:function(a){if(!this.model.get("purged")){a.append($("<div>"+this.model.get("misc_blurb")+"</div>"))}a.append((_l("An error occurred running this job")+": <i>"+$.trim(this.model.get("misc_info"))+"</i>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers.concat([this._render_downloadButton])))},_render_body_discarded:function(a){a.append("<div>"+_l("The job creating this dataset was cancelled before completion")+".</div>");a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_setting_metadata:function(a){a.append($("<div>"+_l("Metadata is being auto-detected")+".</div>"))},_render_body_empty:function(a){a.append($("<div>"+_l("No data")+": <i>"+this.model.get("misc_blurb")+"</i></div>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_failed_metadata:function(a){a.append($(HDABaseView.templates.failedMetadata(this.model.toJSON())));this._render_body_ok(a)},_render_body_ok:function(a){a.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));return}a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));a.append('<div class="clear"/>');a.append(this._render_displayApps());a.append(this._render_peek())},_render_body:function(){var a=$("<div/>").attr("id","info-"+this.model.get("id")).addClass("historyItemBody").attr("style","display: block");switch(this.model.get("state")){case HistoryDatasetAssociation.STATES.NOT_VIEWABLE:this._render_body_not_viewable(a);break;case HistoryDatasetAssociation.STATES.UPLOAD:this._render_body_uploading(a);break;case HistoryDatasetAssociation.STATES.QUEUED:this._render_body_queued(a);break;case HistoryDatasetAssociation.STATES.RUNNING:this._render_body_running(a);break;case HistoryDatasetAssociation.STATES.ERROR:this._render_body_error(a);break;case HistoryDatasetAssociation.STATES.DISCARDED:this._render_body_discarded(a);break;case HistoryDatasetAssociation.STATES.SETTING_METADATA:this._render_body_setting_metadata(a);break;case HistoryDatasetAssociation.STATES.EMPTY:this._render_body_empty(a);break;case HistoryDatasetAssociation.STATES.FAILED_METADATA:this._render_body_failed_metadata(a);break;case HistoryDatasetAssociation.STATES.OK:this._render_body_ok(a);break;default:a.append($('<div>Error: unknown dataset state "'+state+'".</div>'))}a.append('<div style="clear: both"></div>');if(this.expanded){a.show()}else{a.hide()}return a},events:{"click .historyItemTitle":"toggleBodyVisibility"},toggleBodyVisibility:function(c,a){var b=this,d=this.$el.find(".historyItemBody");a=(a===undefined)?(!d.is(":visible")):(a);if(a){d.slideDown("fast",function(){b.trigger("body-visible",b.model.get("id"))})}else{d.slideUp("fast",function(){b.trigger("body-hidden",b.model.get("id"))})}},toString:function(){var a=(this.model)?(this.model+""):("(no model)");return"HDABaseView("+a+")"}});HDABaseView.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"]};
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/mvc/dataset/hda-edit.js
--- a/static/scripts/packed/mvc/dataset/hda-edit.js
+++ b/static/scripts/packed/mvc/dataset/hda-edit.js
@@ -1,1 +1,1 @@
-var HDAView=BaseView.extend(LoggableMixin).extend({tagName:"div",className:"historyItemContainer",initialize:function(a){this.log(this+".initialize:",a);if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}this.urls=this.renderUrls(a.urlTemplates,this.model.toJSON());this.expanded=a.expanded||false;this.model.bind("change",this.render,this)},renderUrls:function(d,a){var b=this,c={};_.each(d,function(e,f){if(_.isObject(e)){c[f]=b.renderUrls(e,a)}else{if(f==="meta_download"){c[f]=b.renderMetaDownloadUrls(e,a)}else{c[f]=_.template(e,a)}}});return c},renderMetaDownloadUrls:function(b,a){return _.map(a.meta_files,function(c){return{url:_.template(b,{id:a.id,file_type:c.file_type}),file_type:c.file_type}})},render:function(){var b=this,e=this.model.get("id"),c=this.model.get("state"),a=$("<div/>").attr("id","historyItem-"+e),d=(this.$el.children().size()===0);this._clearReferences();this.$el.attr("id","historyItemContainer-"+e);a.addClass("historyItemWrapper").addClass("historyItem").addClass("historyItem-"+c);a.append(this._render_warnings());a.append(this._render_titleBar());this.body=$(this._render_body());a.append(this.body);make_popup_menus(a);a.find(".tooltip").tooltip({placement:"bottom"});this.$el.fadeOut("fast",function(){b.$el.children().remove();b.$el.append(a).fadeIn("fast",function(){b.log(b+" rendered:",b.$el);var f="rendered";if(d){f+=":initial"}else{if(b.model.inReadyState()){f+=":ready"}}b.trigger(f)})});return this},_clearReferences:function(){this.displayButton=null;this.editButton=null;this.deleteButton=null;this.errButton=null;this.showParamsButton=null;this.rerunButton=null;this.visualizationsButton=null;this.tagButton=null;this.annotateButton=null},_render_warnings:function(){return $(jQuery.trim(HDAView.templates.messages(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_titleBar:function(){var a=$('<div class="historyItemTitleBar" style="overflow: hidden"></div>');a.append(this._render_titleButtons());a.append('<span class="state-icon"></span>');a.append(this._render_titleLink());return a},_render_titleButtons:function(){var a=$('<div class="historyItemButtons"></div>');a.append(this._render_displayButton());a.append(this._render_editButton());a.append(this._render_deleteButton());return a},_render_displayButton:function(){if((!this.model.inReadyState())||(this.model.get("state")===HistoryDatasetAssociation.STATES.ERROR)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var a={icon_class:"display"};if(this.model.get("purged")){a.enabled=false;a.title=_l("Cannot display datasets removed from disk")}else{a.title=_l("Display data in browser");a.href=this.urls.display}if(this.model.get("for_editing")){a.target="galaxy_main"}this.displayButton=new IconButtonView({model:new IconButton(a)});return this.displayButton.render().$el},_render_editButton:function(){if((this.model.get("state")===HistoryDatasetAssociation.STATES.UPLOAD)||(this.model.get("state")===HistoryDatasetAssociation.STATES.ERROR)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))||(!this.model.get("for_editing"))){return null}var c=this.model.get("purged"),a=this.model.get("deleted"),b={title:_l("Edit Attributes"),href:this.urls.edit,target:"galaxy_main",icon_class:"edit"};if(a||c){b.enabled=false;if(c){b.title=_l("Cannot edit attributes of datasets removed from disk")}else{if(a){b.title=_l("Undelete dataset to edit attributes")}}}this.editButton=new IconButtonView({model:new IconButton(b)});return this.editButton.render().$el},_render_deleteButton:function(){if((!this.model.get("for_editing"))||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var a={title:_l("Delete"),href:this.urls["delete"],id:"historyItemDeleter-"+this.model.get("id"),icon_class:"delete"};if(this.model.get("deleted")||this.model.get("purged")){a={title:_l("Dataset is already deleted"),icon_class:"delete",enabled:false}}this.deleteButton=new IconButtonView({model:new IconButton(a)});return this.deleteButton.render().$el},_render_titleLink:function(){return $(jQuery.trim(HDAView.templates.titleLink(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_hdaSummary:function(){var a=_.extend(this.model.toJSON(),{urls:this.urls});if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){_.extend(a,{dbkey_unknown_and_editable:true})}return HDAView.templates.hdaSummary(a)},_render_primaryActionButtons:function(c){var b=$("<div/>").attr("id","primary-actions-"+this.model.get("id")),a=this;_.each(c,function(d){b.append(d.call(a))});return b},_render_downloadButton:function(){if(this.model.get("purged")){return null}var a=HDAView.templates.downloadLinks(_.extend(this.model.toJSON(),{urls:this.urls}));return $(a)},_render_errButton:function(){if((this.model.get("state")!==HistoryDatasetAssociation.STATES.ERROR)||(!this.model.get("for_editing"))){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_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_rerunButton:function(){if(!this.model.get("for_editing")){return null}this.rerunButton=new IconButtonView({model:new IconButton({title:_l("Run this job again"),href:this.urls.rerun,target:"galaxy_main",icon_class:"arrow-circle"})});return this.rerunButton.render().$el},_render_visualizationsButton:function(){var c=this.model.get("dbkey"),a=this.model.get("visualizations"),f=this.urls.visualization,d={},g={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(!(this.model.hasData())||!(this.model.get("for_editing"))||!(a&&a.length)||!(f)){return null}this.visualizationsButton=new IconButtonView({model:new IconButton({title:_l("Visualize"),href:f,icon_class:"chart_curve"})});var b=this.visualizationsButton.render().$el;b.addClass("visualize-icon");if(c){g.dbkey=c}function e(h){switch(h){case"trackster":return create_trackster_action_fn(f,g,c);case"scatterplot":return create_scatterplot_action_fn(f,g);default:return function(){window.parent.location=f+"/"+h+"?"+$.param(g)}}}if(a.length===1){b.attr("title",a[0]);b.click(e(a[0]))}else{_.each(a,function(i){var h=i.charAt(0).toUpperCase()+i.slice(1);d[_l(h)]=e(i)});make_popupmenu(b,d)}return b},_render_secondaryActionButtons:function(b){var c=$("<div/>"),a=this;c.attr("style","float: right;").attr("id","secondary-actions-"+this.model.get("id"));_.each(b,function(d){c.append(d.call(a))});return c},_render_tagButton:function(){if(!(this.model.hasData())||!(this.model.get("for_editing"))||(!this.urls.tags.get)){return null}this.tagButton=new IconButtonView({model:new IconButton({title:_l("Edit dataset tags"),target:"galaxy_main",href:this.urls.tags.get,icon_class:"tags"})});return this.tagButton.render().$el},_render_annotateButton:function(){if(!(this.model.hasData())||!(this.model.get("for_editing"))||(!this.urls.annotation.get)){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_displayApps:function(){if(!this.model.hasData()){return null}var a=$("<div/>").addClass("display-apps");if(!_.isEmpty(this.model.get("display_types"))){a.append(HDAView.templates.displayApps({displayApps:this.model.get("display_types")}))}if(!_.isEmpty(this.model.get("display_apps"))){a.append(HDAView.templates.displayApps({displayApps:this.model.get("display_apps")}))}return a},_render_tagArea:function(){if(!this.urls.tags.set){return null}return $(HDAView.templates.tagArea(_.extend(this.model.toJSON(),{urls:this.urls})))},_render_annotationArea:function(){if(!this.urls.annotation.get){return null}return $(HDAView.templates.annotationArea(_.extend(this.model.toJSON(),{urls:this.urls})))},_render_peek:function(){if(!this.model.get("peek")){return null}return $("<div/>").append($("<pre/>").attr("id","peek"+this.model.get("id")).addClass("peek").append(this.model.get("peek")))},_render_body_not_viewable:function(a){a.append($("<div>"+_l("You do not have permission to view dataset")+".</div>"))},_render_body_uploading:function(a){a.append($("<div>"+_l("Dataset is uploading")+"</div>"))},_render_body_queued:function(a){a.append($("<div>"+_l("Job is waiting to run")+".</div>"));a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_running:function(a){a.append("<div>"+_l("Job is currently running")+".</div>");a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_error:function(a){if(!this.model.get("purged")){a.append($("<div>"+this.model.get("misc_blurb")+"</div>"))}a.append((_l("An error occurred running this job")+": <i>"+$.trim(this.model.get("misc_info"))+"</i>"));a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_errButton,this._render_showParamsButton,this._render_rerunButton]))},_render_body_discarded:function(a){a.append("<div>"+_l("The job creating this dataset was cancelled before completion")+".</div>");a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_setting_metadata:function(a){a.append($("<div>"+_l("Metadata is being auto-detected")+".</div>"))},_render_body_empty:function(a){a.append($("<div>"+_l("No data")+": <i>"+this.model.get("misc_blurb")+"</i></div>"));a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_failed_metadata:function(a){a.append($(HDAView.templates.failedMetadata(this.model.toJSON())));this._render_body_ok(a)},_render_body_ok:function(a){a.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton,this._render_rerunButton]));return}a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_errButton,this._render_showParamsButton,this._render_rerunButton,this._render_visualizationsButton]));a.append(this._render_secondaryActionButtons([this._render_tagButton,this._render_annotateButton]));a.append('<div class="clear"/>');a.append(this._render_tagArea());a.append(this._render_annotationArea());a.append(this._render_displayApps());a.append(this._render_peek())},_render_body:function(){var a=$("<div/>").attr("id","info-"+this.model.get("id")).addClass("historyItemBody").attr("style","display: block");switch(this.model.get("state")){case HistoryDatasetAssociation.STATES.NOT_VIEWABLE:this._render_body_not_viewable(a);break;case HistoryDatasetAssociation.STATES.UPLOAD:this._render_body_uploading(a);break;case HistoryDatasetAssociation.STATES.QUEUED:this._render_body_queued(a);break;case HistoryDatasetAssociation.STATES.RUNNING:this._render_body_running(a);break;case HistoryDatasetAssociation.STATES.ERROR:this._render_body_error(a);break;case HistoryDatasetAssociation.STATES.DISCARDED:this._render_body_discarded(a);break;case HistoryDatasetAssociation.STATES.SETTING_METADATA:this._render_body_setting_metadata(a);break;case HistoryDatasetAssociation.STATES.EMPTY:this._render_body_empty(a);break;case HistoryDatasetAssociation.STATES.FAILED_METADATA:this._render_body_failed_metadata(a);break;case HistoryDatasetAssociation.STATES.OK:this._render_body_ok(a);break;default:a.append($('<div>Error: unknown dataset state "'+state+'".</div>'))}a.append('<div style="clear: both"></div>');if(this.expanded){a.show()}else{a.hide()}return a},events:{"click .historyItemTitle":"toggleBodyVisibility","click a.icon-button.tags":"loadAndDisplayTags","click a.icon-button.annotate":"loadAndDisplayAnnotation"},loadAndDisplayTags:function(b){this.log(this+".loadAndDisplayTags",b);var c=this.$el.find(".tag-area"),a=c.find(".tag-elt");if(c.is(":hidden")){if(!jQuery.trim(a.html())){$.ajax({url:this.urls.tags.get,error:function(){alert(_l("Tagging failed"))},success:function(d){a.html(d);a.find(".tooltip").tooltip();c.slideDown("fast")}})}else{c.slideDown("fast")}}else{c.slideUp("fast")}return false},loadAndDisplayAnnotation:function(b){this.log(this+".loadAndDisplayAnnotation",b);var d=this.$el.find(".annotation-area"),c=d.find(".annotation-elt"),a=this.urls.annotation.set;if(d.is(":hidden")){if(!jQuery.trim(c.html())){$.ajax({url:this.urls.annotation.get,error:function(){alert(_l("Annotations failed"))},success:function(e){if(e===""){e="<em>"+_l("Describe or add notes to dataset")+"</em>"}c.html(e);d.find(".tooltip").tooltip();async_save_text(c.attr("id"),c.attr("id"),a,"new_annotation",18,true,4);d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toggleBodyVisibility:function(c,a){var b=this,d=this.$el.find(".historyItemBody");a=(a===undefined)?(!d.is(":visible")):(a);if(a){d.slideDown("fast",function(){b.trigger("body-visible",b.model.get("id"))})}else{d.slideUp("fast",function(){b.trigger("body-hidden",b.model.get("id"))})}},toString:function(){var a=(this.model)?(this.model+""):("(no model)");return"HDAView("+a+")"}});HDAView.templates={warningMsg:Handlebars.templates["template-warningmessagesmall"],messages:Handlebars.templates["template-history-warning-messages"],titleLink:Handlebars.templates["template-history-titleLink"],hdaSummary:Handlebars.templates["template-history-hdaSummary"],downloadLinks:Handlebars.templates["template-history-downloadLinks"],failedMetadata:Handlebars.templates["template-history-failedMetaData"],tagArea:Handlebars.templates["template-history-tagArea"],annotationArea:Handlebars.templates["template-history-annotationArea"],displayApps:Handlebars.templates["template-history-displayApps"]};function create_scatterplot_action_fn(a,b){action=function(){var d=$(window.parent.document).find("iframe#galaxy_main"),c=a+"/scatterplot?"+$.param(b);d.attr("src",c);$("div.popmenu-wrapper").remove();return false};return action}function create_trackster_action_fn(a,c,b){return function(){var d={};if(b){d.dbkey=b}$.ajax({url:a+"/list_tracks?f-"+$.param(d),dataType:"html",error:function(){alert(_l("Could not add this dataset to browser")+".")},success:function(e){var f=window.parent;f.show_modal(_l("View Data in a New or Saved Visualization"),"",{Cancel:function(){f.hide_modal()},"View in saved visualization":function(){f.show_modal(_l("Add Data to Saved Visualization"),e,{Cancel:function(){f.hide_modal()},"Add to visualization":function(){$(f.document).find("input[name=id]:checked").each(function(){var g=$(this).val();c.id=g;f.location=a+"/trackster?"+$.param(c)})}})},"View in new visualization":function(){f.location=a+"/trackster?"+$.param(c)}})}});return false}};
\ No newline at end of file
+var HDAEditView=HDABaseView.extend({initialize:function(a){HDABaseView.prototype.initialize.call(this,a);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton,this._render_rerunButton]},_render_warnings:function(){return $(jQuery.trim(HDABaseView.templates.messages(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_titleButtons:function(){var a=$('<div class="historyItemButtons"></div>');a.append(this._render_displayButton());a.append(this._render_editButton());a.append(this._render_deleteButton());return a},_render_editButton:function(){if((this.model.get("state")===HistoryDatasetAssociation.STATES.UPLOAD)||(this.model.get("state")===HistoryDatasetAssociation.STATES.ERROR)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){this.editButton=null;return null}var c=this.model.get("purged"),a=this.model.get("deleted"),b={title:_l("Edit Attributes"),href:this.urls.edit,target:"galaxy_main",icon_class:"edit"};if(a||c){b.enabled=false;if(c){b.title=_l("Cannot edit attributes of datasets removed from disk")}else{if(a){b.title=_l("Undelete dataset to edit attributes")}}}this.editButton=new IconButtonView({model:new IconButton(b)});return this.editButton.render().$el},_render_deleteButton:function(){if((this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){this.deleteButton=null;return null}var a={title:_l("Delete"),href:this.urls["delete"],id:"historyItemDeleter-"+this.model.get("id"),icon_class:"delete"};if(this.model.get("deleted")||this.model.get("purged")){a={title:_l("Dataset is already deleted"),icon_class:"delete",enabled:false}}this.deleteButton=new IconButtonView({model:new IconButton(a)});return this.deleteButton.render().$el},_render_hdaSummary:function(){var a=_.extend(this.model.toJSON(),{urls:this.urls});if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){_.extend(a,{dbkey_unknown_and_editable:true})}return HDABaseView.templates.hdaSummary(a)},_render_errButton:function(){if(this.model.get("state")!==HistoryDatasetAssociation.STATES.ERROR){this.errButton=null;return null}this.errButton=new IconButtonView({model:new IconButton({title:_l("View or report this error"),href:this.urls.report_error,target:"galaxy_main",icon_class:"bug"})});return this.errButton.render().$el},_render_rerunButton:function(){this.rerunButton=new IconButtonView({model:new IconButton({title:_l("Run this job again"),href:this.urls.rerun,target:"galaxy_main",icon_class:"arrow-circle"})});return this.rerunButton.render().$el},_render_visualizationsButton:function(){var c=this.model.get("dbkey"),a=this.model.get("visualizations"),f=this.urls.visualization,d={},g={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(!(this.model.hasData())||!(a&&a.length)||!(f)){this.visualizationsButton=null;return null}this.visualizationsButton=new IconButtonView({model:new IconButton({title:_l("Visualize"),href:f,icon_class:"chart_curve"})});var b=this.visualizationsButton.render().$el;b.addClass("visualize-icon");if(c){g.dbkey=c}function e(h){switch(h){case"trackster":return create_trackster_action_fn(f,g,c);case"scatterplot":return create_scatterplot_action_fn(f,g);default:return function(){window.parent.location=f+"/"+h+"?"+$.param(g)}}}if(a.length===1){b.attr("title",a[0]);b.click(e(a[0]))}else{_.each(a,function(i){var h=i.charAt(0).toUpperCase()+i.slice(1);d[_l(h)]=e(i)});make_popupmenu(b,d)}return b},_render_secondaryActionButtons:function(b){var c=$("<div/>"),a=this;c.attr("style","float: right;").attr("id","secondary-actions-"+this.model.get("id"));_.each(b,function(d){c.append(d.call(a))});return c},_render_tagButton:function(){if(!(this.model.hasData())||(!this.urls.tags.get)){this.tagButton=null;return null}this.tagButton=new IconButtonView({model:new IconButton({title:_l("Edit dataset tags"),target:"galaxy_main",href:this.urls.tags.get,icon_class:"tags"})});return this.tagButton.render().$el},_render_annotateButton:function(){if(!(this.model.hasData())||(!this.urls.annotation.get)){this.annotateButton=null;return null}this.annotateButton=new IconButtonView({model:new IconButton({title:_l("Edit dataset annotation"),target:"galaxy_main",icon_class:"annotate"})});return this.annotateButton.render().$el},_render_tagArea:function(){if(!this.urls.tags.set){return null}return $(HDAEditView.templates.tagArea(_.extend(this.model.toJSON(),{urls:this.urls})))},_render_annotationArea:function(){if(!this.urls.annotation.get){return null}return $(HDAEditView.templates.annotationArea(_.extend(this.model.toJSON(),{urls:this.urls})))},_render_body_error:function(a){HDABaseView.prototype._render_body_error.call(this,a);var b=a.find("#primary-actions-"+this.model.get("id"));b.prepend(this._render_errButton())},_render_body_ok:function(a){a.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton,this._render_rerunButton]));return}a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton,this._render_rerunButton,this._render_visualizationsButton]));a.append(this._render_secondaryActionButtons([this._render_tagButton,this._render_annotateButton]));a.append('<div class="clear"/>');a.append(this._render_tagArea());a.append(this._render_annotationArea());a.append(this._render_displayApps());a.append(this._render_peek())},events:{"click .historyItemTitle":"toggleBodyVisibility","click a.icon-button.tags":"loadAndDisplayTags","click a.icon-button.annotate":"loadAndDisplayAnnotation"},loadAndDisplayTags:function(b){this.log(this+".loadAndDisplayTags",b);var c=this.$el.find(".tag-area"),a=c.find(".tag-elt");if(c.is(":hidden")){if(!jQuery.trim(a.html())){$.ajax({url:this.urls.tags.get,error:function(){alert(_l("Tagging failed"))},success:function(d){a.html(d);a.find(".tooltip").tooltip();c.slideDown("fast")}})}else{c.slideDown("fast")}}else{c.slideUp("fast")}return false},loadAndDisplayAnnotation:function(b){this.log(this+".loadAndDisplayAnnotation",b);var d=this.$el.find(".annotation-area"),c=d.find(".annotation-elt"),a=this.urls.annotation.set;if(d.is(":hidden")){if(!jQuery.trim(c.html())){$.ajax({url:this.urls.annotation.get,error:function(){alert(_l("Annotations failed"))},success:function(e){if(e===""){e="<em>"+_l("Describe or add notes to dataset")+"</em>"}c.html(e);d.find(".tooltip").tooltip();async_save_text(c.attr("id"),c.attr("id"),a,"new_annotation",18,true,4);d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toString:function(){var a=(this.model)?(this.model+""):("(no model)");return"HDAView("+a+")"}});HDAEditView.templates={tagArea:Handlebars.templates["template-hda-tagArea"],annotationArea:Handlebars.templates["template-hda-annotationArea"]};function create_scatterplot_action_fn(a,b){action=function(){var d=$(window.parent.document).find("iframe#galaxy_main"),c=a+"/scatterplot?"+$.param(b);d.attr("src",c);$("div.popmenu-wrapper").remove();return false};return action}function create_trackster_action_fn(a,c,b){return function(){var d={};if(b){d.dbkey=b}$.ajax({url:a+"/list_tracks?f-"+$.param(d),dataType:"html",error:function(){alert(_l("Could not add this dataset to browser")+".")},success:function(e){var f=window.parent;f.show_modal(_l("View Data in a New or Saved Visualization"),"",{Cancel:function(){f.hide_modal()},"View in saved visualization":function(){f.show_modal(_l("Add Data to Saved Visualization"),e,{Cancel:function(){f.hide_modal()},"Add to visualization":function(){$(f.document).find("input[name=id]:checked").each(function(){var g=$(this).val();c.id=g;f.location=a+"/trackster?"+$.param(c)})}})},"View in new visualization":function(){f.location=a+"/trackster?"+$.param(c)}})}});return false}};
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/mvc/dataset/hda-model.js
--- a/static/scripts/packed/mvc/dataset/hda-model.js
+++ b/static/scripts/packed/mvc/dataset/hda-model.js
@@ -1,1 +1,1 @@
-var HistoryDatasetAssociation=BaseModel.extend(LoggableMixin).extend({defaults:{history_id:null,model_class:"HistoryDatasetAssociation",hid:0,id:null,name:"",state:"",data_type:null,file_size:0,meta_files:[],misc_blurb:"",misc_info:"",deleted:false,purged:false,visible:false,accessible:false,for_editing:true},url:function(){return"api/histories/"+this.get("history_id")+"/contents/"+this.get("id")},initialize:function(){this.log(this+".initialize",this.attributes);this.log("\tparent history_id: "+this.get("history_id"));if(!this.get("accessible")){this.set("state",HistoryDatasetAssociation.STATES.NOT_VIEWABLE)}this.on("change:state",function(b,a){this.log(this+" has changed state:",b,a);if(this.inReadyState()){this.trigger("state:ready",this.get("id"),a,this.previous("state"),b)}})},isDeletedOrPurged:function(){return(this.get("deleted")||this.get("purged"))},isVisible:function(b,c){var a=true;if((!b)&&(this.get("deleted")||this.get("purged"))){a=false}if((!c)&&(!this.get("visible"))){a=false}return a},inReadyState:function(){var a=this.get("state");return((a===HistoryDatasetAssociation.STATES.NEW)||(a===HistoryDatasetAssociation.STATES.OK)||(a===HistoryDatasetAssociation.STATES.EMPTY)||(a===HistoryDatasetAssociation.STATES.FAILED_METADATA)||(a===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(a===HistoryDatasetAssociation.STATES.DISCARDED)||(a===HistoryDatasetAssociation.STATES.ERROR))},hasData:function(){return(this.get("file_size")>0)},toString:function(){var a=this.get("id")||"";if(this.get("name")){a+=':"'+this.get("name")+'"'}return"HistoryDatasetAssociation("+a+")"}});HistoryDatasetAssociation.STATES={UPLOAD:"upload",QUEUED:"queued",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",OK:"ok",EMPTY:"empty",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};var HDACollection=Backbone.Collection.extend(LoggableMixin).extend({model:HistoryDatasetAssociation,initialize:function(){},ids:function(){return this.map(function(a){return a.id})},getVisible:function(a,b){return this.filter(function(c){return c.isVisible(a,b)})},getStateLists:function(){var a={};_.each(_.values(HistoryDatasetAssociation.STATES),function(b){a[b]=[]});this.each(function(b){a[b.get("state")].push(b.get("id"))});return a},running:function(){var a=[];this.each(function(b){if(!b.inReadyState()){a.push(b.get("id"))}});return a},update:function(a){this.log(this+"update:",a);if(!(a&&a.length)){return}var b=this;_.each(a,function(e,c){var d=b.get(e);d.fetch()})},toString:function(){return("HDACollection("+this.ids().join(",")+")")}});
\ No newline at end of file
+var HistoryDatasetAssociation=BaseModel.extend(LoggableMixin).extend({defaults:{history_id:null,model_class:"HistoryDatasetAssociation",hid:0,id:null,name:"",state:"",data_type:null,file_size:0,meta_files:[],misc_blurb:"",misc_info:"",deleted:false,purged:false,visible:false,accessible:false},url:function(){return"api/histories/"+this.get("history_id")+"/contents/"+this.get("id")},initialize:function(){this.log(this+".initialize",this.attributes);this.log("\tparent history_id: "+this.get("history_id"));if(!this.get("accessible")){this.set("state",HistoryDatasetAssociation.STATES.NOT_VIEWABLE)}this.on("change:state",function(b,a){this.log(this+" has changed state:",b,a);if(this.inReadyState()){this.trigger("state:ready",this.get("id"),a,this.previous("state"),b)}})},isDeletedOrPurged:function(){return(this.get("deleted")||this.get("purged"))},isVisible:function(b,c){var a=true;if((!b)&&(this.get("deleted")||this.get("purged"))){a=false}if((!c)&&(!this.get("visible"))){a=false}return a},inReadyState:function(){var a=this.get("state");return((a===HistoryDatasetAssociation.STATES.NEW)||(a===HistoryDatasetAssociation.STATES.OK)||(a===HistoryDatasetAssociation.STATES.EMPTY)||(a===HistoryDatasetAssociation.STATES.FAILED_METADATA)||(a===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(a===HistoryDatasetAssociation.STATES.DISCARDED)||(a===HistoryDatasetAssociation.STATES.ERROR))},hasData:function(){return(this.get("file_size")>0)},toString:function(){var a=this.get("id")||"";if(this.get("name")){a+=':"'+this.get("name")+'"'}return"HistoryDatasetAssociation("+a+")"}});HistoryDatasetAssociation.STATES={UPLOAD:"upload",QUEUED:"queued",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",OK:"ok",EMPTY:"empty",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};var HDACollection=Backbone.Collection.extend(LoggableMixin).extend({model:HistoryDatasetAssociation,initialize:function(){},ids:function(){return this.map(function(a){return a.id})},getVisible:function(a,b){return this.filter(function(c){return c.isVisible(a,b)})},getStateLists:function(){var a={};_.each(_.values(HistoryDatasetAssociation.STATES),function(b){a[b]=[]});this.each(function(b){a[b.get("state")].push(b.get("id"))});return a},running:function(){var a=[];this.each(function(b){if(!b.inReadyState()){a.push(b.get("id"))}});return a},update:function(a){this.log(this+"update:",a);if(!(a&&a.length)){return}var b=this;_.each(a,function(e,c){var d=b.get(e);d.fetch()})},toString:function(){return("HDACollection("+this.ids().join(",")+")")}});
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/mvc/history/history-panel.js
--- a/static/scripts/packed/mvc/history/history-panel.js
+++ b/static/scripts/packed/mvc/history/history-panel.js
@@ -1,1 +1,1 @@
-var HistoryPanel=BaseView.extend(LoggableMixin).extend({el:"body.historyPage",initialize:function(a){this.log(this+".initialize:",a);if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}if(!a.urlTemplates.history){throw ("HDAView needs urlTemplates.history on initialize")}if(!a.urlTemplates.hda){throw ("HDAView needs urlTemplates.hda on initialize")}this.urlTemplates=a.urlTemplates.history;this.hdaUrlTemplates=a.urlTemplates.hda;this.storage=new PersistantStorage("HistoryView."+this.model.get("id"),{expandedHdas:{},show_deleted:false,show_hidden:false});this.log("this.storage:",this.storage.get());this.log("show_deleted:",a.show_deleted,"show_hidden",a.show_hidden);if((a.show_deleted===true)||(a.show_deleted===false)){this.storage.set("show_deleted",a.show_deleted)}if((a.show_hidden===true)||(a.show_hidden===false)){this.storage.set("show_hidden",a.show_hidden)}this.show_deleted=this.storage.get("show_deleted");this.show_hidden=this.storage.get("show_hidden");this.log("this.show_deleted:",this.show_deleted,"show_hidden",this.show_hidden);this.log("(now) this.storage:",this.storage.get());this.model.bind("change:nice_size",this.updateHistoryDiskSize,this);this.model.hdas.bind("add",this.add,this);this.model.hdas.bind("reset",this.addAll,this);this.model.hdas.bind("all",this.all,this);this.hdaViews={};this.urls={}},add:function(a){},addAll:function(){this.render()},all:function(a){},renderUrls:function(a){var b=this;b.urls={};_.each(this.urlTemplates,function(d,c){b.urls[c]=_.template(d,a)});return b.urls},render:function(){var b=this,d=b.toString()+".set-up",c=$("<div/>"),a=this.model.toJSON(),e=(this.$el.children().size()===0);a.urls=this.renderUrls(a);c.append(HistoryPanel.templates.historyPanel(a));c.find(".tooltip").tooltip({placement:"bottom"});this.setUpActionButton(c.find("#history-action-popup"));if(!this.model.hdas.length||!this.renderItems(c.find("#"+this.model.get("id")+"-datasets"))){c.find("#emptyHistoryMessage").show()}$(b).queue(d,function(f){b.$el.fadeOut("fast",function(){f()})});$(b).queue(d,function(f){b.$el.html("");b.$el.append(c.children());b.$el.fadeIn("fast",function(){f()})});$(b).queue(d,function(f){this.log(b+" rendered:",b.$el);b.setUpBehaviours();if(e){b.trigger("rendered:initial")}else{b.trigger("rendered")}f()});$(b).dequeue(d);return this},setUpActionButton:function(e){var c=this,d=(this.storage.get("show_deleted"))?("Hide deleted"):("Show deleted"),a=(this.storage.get("show_hidden"))?("Hide hidden"):("Show hidden"),b={};b[_l("refresh")]=function(){window.location.reload()};b[_l("collapse all")]=function(){c.hideAllHdaBodies()};b[_l(d)]=function(){c.toggleShowDeleted()};b[_l(a)]=function(){c.toggleShowHidden()};make_popupmenu(e,b)},renderItems:function(b){this.hdaViews={};var a=this,c=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"));_.each(c,function(f){var e=f.get("id"),d=a.storage.get("expandedHdas").get(e);a.hdaViews[e]=new HDAView({model:f,expanded:d,urlTemplates:a.hdaUrlTemplates});a.setUpHdaListeners(a.hdaViews[e]);b.prepend(a.hdaViews[e].render().$el)});return c.length},setUpHdaListeners:function(b){var a=this;b.bind("toggleBodyVisibility",function(d,c){if(c){a.storage.get("expandedHdas").set(d,true)}else{a.storage.get("expandedHdas").deleteKey(d)}})},setUpBehaviours:function(){if(!(this.model.get("user")&&this.model.get("user").email)){return}var a=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(a.is(":hidden")){a.slideDown("fast")}else{a.slideUp("fast")}return false});async_save_text("history-name-container","history-name",this.urls.rename,"new_name",18);async_save_text("history-annotation-container","history-annotation",this.urls.annotate,"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},events:{"click #history-tag":"loadAndDisplayTags"},showQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(b.is(":hidden")){b.slideDown("fast")}},hideQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(!b.is(":hidden")){b.slideUp("fast")}},toggleShowDeleted:function(a,c,b){this.storage.set("show_deleted",!this.storage.get("show_deleted"));this.render()},toggleShowHidden:function(){this.storage.set("show_hidden",!this.storage.get("show_hidden"));this.render()},hideAllHdaBodies:function(){_.each(this.hdaViews,function(a){a.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},loadAndDisplayTags:function(c){this.log(this+".loadAndDisplayTags",c);var d=this.$el.find("#history-tag-area"),b=d.find(".tag-elt");this.log("\t tagArea",d," tagElt",b);if(d.is(":hidden")){if(!jQuery.trim(b.html())){var a=this;$.ajax({url:a.urls.tag,error:function(){alert(_l("Tagging failed"))},success:function(e){b.html(e);b.find(".tooltip").tooltip();d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toString:function(){var a=this.model.get("name")||"";return"HistoryView("+a+")"}});HistoryPanel.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};
\ No newline at end of file
+var HistoryPanel=BaseView.extend(LoggableMixin).extend({el:"body.historyPage",HDAView:HDAEditView,initialize:function(a){this.log(this+".initialize:",a);if(!a.urlTemplates){throw (this+" needs urlTemplates on initialize")}if(!a.urlTemplates.history){throw (this+" needs urlTemplates.history on initialize")}if(!a.urlTemplates.hda){throw (this+" needs urlTemplates.hda on initialize")}this.urlTemplates=a.urlTemplates.history;this.hdaUrlTemplates=a.urlTemplates.hda;this.storage=new PersistantStorage("HistoryView."+this.model.get("id"),{expandedHdas:{},show_deleted:false,show_hidden:false});this.log("this.storage:",this.storage.get());this.log("show_deleted:",a.show_deleted,"show_hidden",a.show_hidden);if((a.show_deleted===true)||(a.show_deleted===false)){this.storage.set("show_deleted",a.show_deleted)}if((a.show_hidden===true)||(a.show_hidden===false)){this.storage.set("show_hidden",a.show_hidden)}this.show_deleted=this.storage.get("show_deleted");this.show_hidden=this.storage.get("show_hidden");this.log("this.show_deleted:",this.show_deleted,"show_hidden",this.show_hidden);this.log("(now) this.storage:",this.storage.get());this.model.bind("change:nice_size",this.updateHistoryDiskSize,this);this.model.hdas.bind("add",this.add,this);this.model.hdas.bind("reset",this.addAll,this);this.model.hdas.bind("all",this.all,this);this.hdaViews={};this.urls={}},add:function(a){},addAll:function(){this.render()},all:function(a){},renderUrls:function(a){var b=this;b.urls={};_.each(this.urlTemplates,function(d,c){b.urls[c]=_.template(d,a)});return b.urls},render:function(){var b=this,d=b.toString()+".set-up",c=$("<div/>"),a=this.model.toJSON(),e=(this.$el.children().size()===0);a.urls=this.renderUrls(a);c.append(HistoryPanel.templates.historyPanel(a));c.find(".tooltip").tooltip({placement:"bottom"});this.setUpActionButton(c.find("#history-action-popup"));if(!this.model.hdas.length||!this.renderItems(c.find("#"+this.model.get("id")+"-datasets"))){c.find("#emptyHistoryMessage").show()}$(b).queue(d,function(f){b.$el.fadeOut("fast",function(){f()})});$(b).queue(d,function(f){b.$el.html("");b.$el.append(c.children());b.$el.fadeIn("fast",function(){f()})});$(b).queue(d,function(f){this.log(b+" rendered:",b.$el);b.setUpBehaviours();if(e){b.trigger("rendered:initial")}else{b.trigger("rendered")}f()});$(b).dequeue(d);return this},setUpActionButton:function(e){var c=this,d=(this.storage.get("show_deleted"))?("Hide deleted"):("Show deleted"),a=(this.storage.get("show_hidden"))?("Hide hidden"):("Show hidden"),b={};b[_l("refresh")]=function(){window.location.reload()};b[_l("collapse all")]=function(){c.hideAllHdaBodies()};b[_l(d)]=function(){c.toggleShowDeleted()};b[_l(a)]=function(){c.toggleShowHidden()};make_popupmenu(e,b)},renderItems:function(b){this.hdaViews={};var a=this,c=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"));_.each(c,function(f){var e=f.get("id"),d=a.storage.get("expandedHdas").get(e);a.hdaViews[e]=new a.HDAView({model:f,expanded:d,urlTemplates:a.hdaUrlTemplates});a.setUpHdaListeners(a.hdaViews[e]);b.prepend(a.hdaViews[e].render().$el)});return c.length},setUpHdaListeners:function(b){var a=this;b.bind("body-visible",function(c){a.storage.get("expandedHdas").set(c,true)});b.bind("body-hidden",function(c){a.storage.get("expandedHdas").deleteKey(c)})},setUpBehaviours:function(){if(!(this.model.get("user")&&this.model.get("user").email)){return}var a=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(a.is(":hidden")){a.slideDown("fast")}else{a.slideUp("fast")}return false});async_save_text("history-name-container","history-name",this.urls.rename,"new_name",18);async_save_text("history-annotation-container","history-annotation",this.urls.annotate,"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},events:{"click #history-tag":"loadAndDisplayTags"},showQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(b.is(":hidden")){b.slideDown("fast")}},hideQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(!b.is(":hidden")){b.slideUp("fast")}},toggleShowDeleted:function(a,c,b){this.storage.set("show_deleted",!this.storage.get("show_deleted"));this.render()},toggleShowHidden:function(){this.storage.set("show_hidden",!this.storage.get("show_hidden"));this.render()},hideAllHdaBodies:function(){_.each(this.hdaViews,function(a){a.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},loadAndDisplayTags:function(c){this.log(this+".loadAndDisplayTags",c);var d=this.$el.find("#history-tag-area"),b=d.find(".tag-elt");this.log("\t tagArea",d," tagElt",b);if(d.is(":hidden")){if(!jQuery.trim(b.html())){var a=this;$.ajax({url:a.urls.tag,error:function(){alert(_l("Tagging failed"))},success:function(e){b.html(e);b.find(".tooltip").tooltip();d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toString:function(){var a=this.model.get("name")||"";return"HistoryView("+a+")"}});HistoryPanel.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-hda-annotationArea.js
--- /dev/null
+++ b/static/scripts/packed/templates/compiled/template-hda-annotationArea.js
@@ -0,0 +1,1 @@
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-annotationArea"]=b(function(g,n,f,m,l){f=f||g.helpers;var j="",d,i,h="function",k=this.escapeExpression,p=this,o=f.blockHelperMissing;function e(r,q){return"Annotation"}function c(r,q){return"Edit dataset annotation"}j+='\n<div id="';i=f.id;if(i){d=i.call(n,{hash:{}})}else{d=n.id;d=typeof d===h?d():d}j+=k(d)+'-annotation-area" class="annotation-area" style="display: none;">\n <strong>';i=f.local;if(i){d=i.call(n,{hash:{},inverse:p.noop,fn:p.program(1,e,l)})}else{d=n.local;d=typeof d===h?d():d}if(!f.local){d=o.call(n,d,{hash:{},inverse:p.noop,fn:p.program(1,e,l)})}if(d||d===0){j+=d}j+=':</strong>\n <div id="';i=f.id;if(i){d=i.call(n,{hash:{}})}else{d=n.id;d=typeof d===h?d():d}j+=k(d)+'-anotation-elt" class="annotation-elt tooltip editable-text"\n style="margin: 1px 0px 1px 0px" title="';i=f.local;if(i){d=i.call(n,{hash:{},inverse:p.noop,fn:p.program(3,c,l)})}else{d=n.local;d=typeof d===h?d():d}if(!f.local){d=o.call(n,d,{hash:{},inverse:p.noop,fn:p.program(3,c,l)})}if(d||d===0){j+=d}j+='">\n </div>\n</div>';return j})})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-hda-displayApps.js
--- /dev/null
+++ b/static/scripts/packed/templates/compiled/template-hda-displayApps.js
@@ -0,0 +1,1 @@
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-displayApps"]=b(function(h,m,g,l,k){g=g||h.helpers;var d,i="function",j=this.escapeExpression,o=this,n=g.blockHelperMissing;function f(t,s){var q="",r,p;q+="\n ";p=g.label;if(p){r=p.call(t,{hash:{}})}else{r=t.label;r=typeof r===i?r():r}q+=j(r)+"\n ";r=t.links;r=g.each.call(t,r,{hash:{},inverse:o.noop,fn:o.program(2,e,s)});if(r||r===0){q+=r}q+="\n <br />\n";return q}function e(t,s){var q="",r,p;q+='\n <a target="';p=g.target;if(p){r=p.call(t,{hash:{}})}else{r=t.target;r=typeof r===i?r():r}q+=j(r)+'" href="';p=g.href;if(p){r=p.call(t,{hash:{}})}else{r=t.href;r=typeof r===i?r():r}q+=j(r)+'">';p=g.local;if(p){r=p.call(t,{hash:{},inverse:o.noop,fn:o.program(3,c,s)})}else{r=t.local;r=typeof r===i?r():r}if(!g.local){r=n.call(t,r,{hash:{},inverse:o.noop,fn:o.program(3,c,s)})}if(r||r===0){q+=r}q+="</a>\n ";return q}function c(s,r){var q,p;p=g.text;if(p){q=p.call(s,{hash:{}})}else{q=s.text;q=typeof q===i?q():q}return j(q)}d=m.displayApps;d=g.each.call(m,d,{hash:{},inverse:o.noop,fn:o.program(1,f,k)});if(d||d===0){return d}else{return""}})})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-hda-downloadLinks.js
--- /dev/null
+++ b/static/scripts/packed/templates/compiled/template-hda-downloadLinks.js
@@ -0,0 +1,1 @@
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-downloadLinks"]=b(function(g,q,p,k,t){p=p||g.helpers;var h,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(y,x){var v="",w,u;v+="\n";v+='\n<div popupmenu="dataset-';u=p.id;if(u){w=u.call(y,{hash:{}})}else{w=y.id;w=typeof w===e?w():w}v+=d(w)+'-popup">\n <a class="action-button" href="';w=y.urls;w=w==null||w===false?w:w.download;w=typeof w===e?w():w;v+=d(w)+'">';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(2,m,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(2,m,x)})}if(w||w===0){v+=w}v+="</a>\n <a>";u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(4,l,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(4,l,x)})}if(w||w===0){v+=w}v+="</a>\n ";w=y.urls;w=w==null||w===false?w:w.meta_download;w=p.each.call(y,w,{hash:{},inverse:o.noop,fn:o.program(6,j,x)});if(w||w===0){v+=w}v+='\n</div>\n<div style="float:left;" class="menubutton split popup" id="dataset-';u=p.id;if(u){w=u.call(y,{hash:{}})}else{w=y.id;w=typeof w===e?w():w}v+=d(w)+'-popup">\n <a href="';w=y.urls;w=w==null||w===false?w:w.download;w=typeof w===e?w():w;v+=d(w)+'" title="';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(9,f,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(9,f,x)})}if(w||w===0){v+=w}v+='" class="icon-button disk tooltip"></a>\n</div>\n';return v}function m(v,u){return"Download Dataset"}function l(v,u){return"Additional Files"}function j(y,x){var v="",w,u;v+='\n <a class="action-button" href="';u=p.url;if(u){w=u.call(y,{hash:{}})}else{w=y.url;w=typeof w===e?w():w}v+=d(w)+'">';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(7,i,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(7,i,x)})}if(w||w===0){v+=w}v+=" ";u=p.file_type;if(u){w=u.call(y,{hash:{}})}else{w=y.file_type;w=typeof w===e?w():w}v+=d(w)+"</a>\n ";return v}function i(v,u){return"Download"}function f(v,u){return"Download"}function s(y,x){var v="",w,u;v+="\n";v+='\n<a href="';w=y.urls;w=w==null||w===false?w:w.download;w=typeof w===e?w():w;v+=d(w)+'" title="';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(12,r,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(12,r,x)})}if(w||w===0){v+=w}v+='" class="icon-button disk tooltip"></a>\n';return v}function r(v,u){return"Download"}h=q.urls;h=h==null||h===false?h:h.meta_download;h=p["if"].call(q,h,{hash:{},inverse:o.program(11,s,t),fn:o.program(1,n,t)});if(h||h===0){return h}else{return""}})})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-hda-failedMetaData.js
--- /dev/null
+++ b/static/scripts/packed/templates/compiled/template-hda-failedMetaData.js
@@ -0,0 +1,1 @@
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-failedMetaData"]=b(function(g,m,f,l,k){f=f||g.helpers;var c,i,o=this,h="function",n=f.blockHelperMissing,j=this.escapeExpression;function e(t,s){var q="",r,p;q+="\n";p=f.local;if(p){r=p.call(t,{hash:{},inverse:o.noop,fn:o.program(2,d,s)})}else{r=t.local;r=typeof r===h?r():r}if(!f.local){r=n.call(t,r,{hash:{},inverse:o.noop,fn:o.program(2,d,s)})}if(r||r===0){q+=r}q+='\nYou may be able to <a href="';r=t.urls;r=r==null||r===false?r:r.edit;r=typeof r===h?r():r;q+=j(r)+'" target="galaxy_main">set it manually or retry auto-detection</a>.\n';return q}function d(q,p){return"An error occurred setting the metadata for this dataset."}i=f.warningmessagesmall;if(i){c=i.call(m,{hash:{},inverse:o.noop,fn:o.program(1,e,k)})}else{c=m.warningmessagesmall;c=typeof c===h?c():c}if(!f.warningmessagesmall){c=n.call(m,c,{hash:{},inverse:o.noop,fn:o.program(1,e,k)})}if(c||c===0){return c}else{return""}})})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-hda-hdaSummary.js
--- /dev/null
+++ b/static/scripts/packed/templates/compiled/template-hda-hdaSummary.js
@@ -0,0 +1,1 @@
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-hdaSummary"]=b(function(g,n,f,m,l){f=f||g.helpers;var j="",d,i,h="function",k=this.escapeExpression,p=this;function e(u,t){var r="",s,q;r+='\n <a class="metadata-dbkey" href="';s=u.urls;s=s==null||s===false?s:s.edit;s=typeof s===h?s():s;r+=k(s)+'" target="galaxy_main">';q=f.metadata_dbkey;if(q){s=q.call(u,{hash:{}})}else{s=u.metadata_dbkey;s=typeof s===h?s():s}r+=k(s)+"</a>\n ";return r}function c(u,t){var r="",s,q;r+='\n <span class="metadata-dbkey ';q=f.metadata_dbkey;if(q){s=q.call(u,{hash:{}})}else{s=u.metadata_dbkey;s=typeof s===h?s():s}r+=k(s)+'">';q=f.metadata_dbkey;if(q){s=q.call(u,{hash:{}})}else{s=u.metadata_dbkey;s=typeof s===h?s():s}r+=k(s)+"</span>\n ";return r}function o(u,t){var r="",s,q;r+='\n<div class="hda-info"> ';q=f.misc_info;if(q){s=q.call(u,{hash:{}})}else{s=u.misc_info;s=typeof s===h?s():s}r+=k(s)+" </div>\n";return r}j+='<div class="hda-summary">\n ';i=f.misc_blurb;if(i){d=i.call(n,{hash:{}})}else{d=n.misc_blurb;d=typeof d===h?d():d}j+=k(d)+'<br />\n format: <span class="';i=f.data_type;if(i){d=i.call(n,{hash:{}})}else{d=n.data_type;d=typeof d===h?d():d}j+=k(d)+'">';i=f.data_type;if(i){d=i.call(n,{hash:{}})}else{d=n.data_type;d=typeof d===h?d():d}j+=k(d)+"</span>,\n database:\n ";d=n.dbkey_unknown_and_editable;d=f["if"].call(n,d,{hash:{},inverse:p.program(3,c,l),fn:p.program(1,e,l)});if(d||d===0){j+=d}j+="\n</div>\n";d=n.misc_info;d=f["if"].call(n,d,{hash:{},inverse:p.noop,fn:p.program(5,o,l)});if(d||d===0){j+=d}return j})})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-hda-tagArea.js
--- /dev/null
+++ b/static/scripts/packed/templates/compiled/template-hda-tagArea.js
@@ -0,0 +1,1 @@
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-tagArea"]=b(function(f,l,e,k,j){e=e||f.helpers;var i="",c,h,n=this,g="function",m=e.blockHelperMissing;function d(p,o){return"Tags"}i+='\n<div class="tag-area" style="display: none;">\n <strong>';h=e.local;if(h){c=h.call(l,{hash:{},inverse:n.noop,fn:n.program(1,d,j)})}else{c=l.local;c=typeof c===g?c():c}if(!e.local){c=m.call(l,c,{hash:{},inverse:n.noop,fn:n.program(1,d,j)})}if(c||c===0){i+=c}i+=':</strong>\n <div class="tag-elt">\n </div>\n</div>';return i})})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-hda-titleLink.js
--- /dev/null
+++ b/static/scripts/packed/templates/compiled/template-hda-titleLink.js
@@ -0,0 +1,1 @@
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-titleLink"]=b(function(e,l,d,k,j){d=d||e.helpers;var h="",c,g,f="function",i=this.escapeExpression;h+='<span class="historyItemTitle">';g=d.hid;if(g){c=g.call(l,{hash:{}})}else{c=l.hid;c=typeof c===f?c():c}h+=i(c)+": ";g=d.name;if(g){c=g.call(l,{hash:{}})}else{c=l.name;c=typeof c===f?c():c}h+=i(c)+"</span>";return h})})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-hda-warning-messages.js
--- /dev/null
+++ b/static/scripts/packed/templates/compiled/template-hda-warning-messages.js
@@ -0,0 +1,1 @@
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-warning-messages"]=b(function(g,s,q,k,z){q=q||g.helpers;var r="",h,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var A;A=C.purged;A=q.unless.call(C,A,{hash:{},inverse:p.noop,fn:p.program(2,n,B)});if(A||A===0){return A}else{return""}}function n(E,D){var B="",C,A;B+="\n";A=q.warningmessagesmall;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(3,m,D)})}else{C=E.warningmessagesmall;C=typeof C===e?C():C}if(!q.warningmessagesmall){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(3,m,D)})}if(C||C===0){B+=C}B+="\n";return B}function m(E,D){var B="",C,A;B+="\n ";A=q.local;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(4,l,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(4,l,D)})}if(C||C===0){B+=C}B+="\n ";C=E.urls;C=C==null||C===false?C:C.undelete;C=q["if"].call(E,C,{hash:{},inverse:p.noop,fn:p.program(6,j,D)});if(C||C===0){B+=C}B+="\n";return B}function l(B,A){return"This dataset has been deleted."}function j(E,D){var B="",C,A;B+="\n ";B+='\n Click <a href="';C=E.urls;C=C==null||C===false?C:C.undelete;C=typeof C===e?C():C;B+=d(C)+'" class="historyItemUndelete" id="historyItemUndeleter-';A=q.id;if(A){C=A.call(E,{hash:{}})}else{C=E.id;C=typeof C===e?C():C}B+=d(C)+'"\n target="galaxy_history">here</a> to undelete it\n ';C=E.urls;C=C==null||C===false?C:C.purge;C=q["if"].call(E,C,{hash:{},inverse:p.noop,fn:p.program(7,i,D)});if(C||C===0){B+=C}B+="\n ";return B}function i(E,D){var B="",C,A;B+='\n or <a href="';C=E.urls;C=C==null||C===false?C:C.purge;C=typeof C===e?C():C;B+=d(C)+'" class="historyItemPurge" id="historyItemPurger-';A=q.id;if(A){C=A.call(E,{hash:{}})}else{C=E.id;C=typeof C===e?C():C}B+=d(C)+'"\n target="galaxy_history">here</a> to immediately remove it from disk\n ';return B}function f(D,C){var B,A;A=q.warningmessagesmall;if(A){B=A.call(D,{hash:{},inverse:p.noop,fn:p.program(10,y,C)})}else{B=D.warningmessagesmall;B=typeof B===e?B():B}if(!q.warningmessagesmall){B=c.call(D,B,{hash:{},inverse:p.noop,fn:p.program(10,y,C)})}if(B||B===0){return B}else{return""}}function y(E,D){var B="",C,A;B+="\n ";A=q.local;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(11,x,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(11,x,D)})}if(C||C===0){B+=C}B+="\n";return B}function x(B,A){return"This dataset has been deleted and removed from disk."}function w(D,C){var B,A;A=q.warningmessagesmall;if(A){B=A.call(D,{hash:{},inverse:p.noop,fn:p.program(14,v,C)})}else{B=D.warningmessagesmall;B=typeof B===e?B():B}if(!q.warningmessagesmall){B=c.call(D,B,{hash:{},inverse:p.noop,fn:p.program(14,v,C)})}if(B||B===0){return B}else{return""}}function v(E,D){var B="",C,A;B+="\n ";A=q.local;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(15,u,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(15,u,D)})}if(C||C===0){B+=C}B+="\n ";C=E.urls;C=C==null||C===false?C:C.unhide;C=q["if"].call(E,C,{hash:{},inverse:p.noop,fn:p.program(17,t,D)});if(C||C===0){B+=C}B+="\n";return B}function u(B,A){return"This dataset has been hidden."}function t(E,D){var B="",C,A;B+='\n Click <a href="';C=E.urls;C=C==null||C===false?C:C.unhide;C=typeof C===e?C():C;B+=d(C)+'" class="historyItemUnhide" id="historyItemUnhider-';A=q.id;if(A){C=A.call(E,{hash:{}})}else{C=E.id;C=typeof C===e?C():C}B+=d(C)+'"\n target="galaxy_history">here</a> to unhide it\n ';return B}h=s.deleted;h=q["if"].call(s,h,{hash:{},inverse:p.noop,fn:p.program(1,o,z)});if(h||h===0){r+=h}r+="\n\n";h=s.purged;h=q["if"].call(s,h,{hash:{},inverse:p.noop,fn:p.program(9,f,z)});if(h||h===0){r+=h}r+="\n\n";h=s.visible;h=q.unless.call(s,h,{hash:{},inverse:p.noop,fn:p.program(13,w,z)});if(h||h===0){r+=h}return r})})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-history-annotationArea.js
--- a/static/scripts/packed/templates/compiled/template-history-annotationArea.js
+++ /dev/null
@@ -1,1 +0,0 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-annotationArea"]=b(function(g,n,f,m,l){f=f||g.helpers;var j="",d,i,h="function",k=this.escapeExpression,p=this,o=f.blockHelperMissing;function e(r,q){return"Annotation"}function c(r,q){return"Edit dataset annotation"}j+='\n<div id="';i=f.id;if(i){d=i.call(n,{hash:{}})}else{d=n.id;d=typeof d===h?d():d}j+=k(d)+'-annotation-area" class="annotation-area" style="display: none;">\n <strong>';i=f.local;if(i){d=i.call(n,{hash:{},inverse:p.noop,fn:p.program(1,e,l)})}else{d=n.local;d=typeof d===h?d():d}if(!f.local){d=o.call(n,d,{hash:{},inverse:p.noop,fn:p.program(1,e,l)})}if(d||d===0){j+=d}j+=':</strong>\n <div id="';i=f.id;if(i){d=i.call(n,{hash:{}})}else{d=n.id;d=typeof d===h?d():d}j+=k(d)+'-anotation-elt" class="annotation-elt tooltip editable-text"\n style="margin: 1px 0px 1px 0px" title="';i=f.local;if(i){d=i.call(n,{hash:{},inverse:p.noop,fn:p.program(3,c,l)})}else{d=n.local;d=typeof d===h?d():d}if(!f.local){d=o.call(n,d,{hash:{},inverse:p.noop,fn:p.program(3,c,l)})}if(d||d===0){j+=d}j+='">\n </div>\n</div>';return j})})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-history-displayApps.js
--- a/static/scripts/packed/templates/compiled/template-history-displayApps.js
+++ /dev/null
@@ -1,1 +0,0 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-displayApps"]=b(function(h,m,g,l,k){g=g||h.helpers;var d,i="function",j=this.escapeExpression,o=this,n=g.blockHelperMissing;function f(t,s){var q="",r,p;q+="\n ";p=g.label;if(p){r=p.call(t,{hash:{}})}else{r=t.label;r=typeof r===i?r():r}q+=j(r)+"\n ";r=t.links;r=g.each.call(t,r,{hash:{},inverse:o.noop,fn:o.program(2,e,s)});if(r||r===0){q+=r}q+="\n <br />\n";return q}function e(t,s){var q="",r,p;q+='\n <a target="';p=g.target;if(p){r=p.call(t,{hash:{}})}else{r=t.target;r=typeof r===i?r():r}q+=j(r)+'" href="';p=g.href;if(p){r=p.call(t,{hash:{}})}else{r=t.href;r=typeof r===i?r():r}q+=j(r)+'">';p=g.local;if(p){r=p.call(t,{hash:{},inverse:o.noop,fn:o.program(3,c,s)})}else{r=t.local;r=typeof r===i?r():r}if(!g.local){r=n.call(t,r,{hash:{},inverse:o.noop,fn:o.program(3,c,s)})}if(r||r===0){q+=r}q+="</a>\n ";return q}function c(s,r){var q,p;p=g.text;if(p){q=p.call(s,{hash:{}})}else{q=s.text;q=typeof q===i?q():q}return j(q)}d=m.displayApps;d=g.each.call(m,d,{hash:{},inverse:o.noop,fn:o.program(1,f,k)});if(d||d===0){return d}else{return""}})})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-history-downloadLinks.js
--- a/static/scripts/packed/templates/compiled/template-history-downloadLinks.js
+++ /dev/null
@@ -1,1 +0,0 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-downloadLinks"]=b(function(g,q,p,k,t){p=p||g.helpers;var h,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(y,x){var v="",w,u;v+="\n";v+='\n<div popupmenu="dataset-';u=p.id;if(u){w=u.call(y,{hash:{}})}else{w=y.id;w=typeof w===e?w():w}v+=d(w)+'-popup">\n <a class="action-button" href="';w=y.urls;w=w==null||w===false?w:w.download;w=typeof w===e?w():w;v+=d(w)+'">';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(2,m,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(2,m,x)})}if(w||w===0){v+=w}v+="</a>\n <a>";u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(4,l,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(4,l,x)})}if(w||w===0){v+=w}v+="</a>\n ";w=y.urls;w=w==null||w===false?w:w.meta_download;w=p.each.call(y,w,{hash:{},inverse:o.noop,fn:o.program(6,j,x)});if(w||w===0){v+=w}v+='\n</div>\n<div style="float:left;" class="menubutton split popup" id="dataset-';u=p.id;if(u){w=u.call(y,{hash:{}})}else{w=y.id;w=typeof w===e?w():w}v+=d(w)+'-popup">\n <a href="';w=y.urls;w=w==null||w===false?w:w.download;w=typeof w===e?w():w;v+=d(w)+'" title="';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(9,f,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(9,f,x)})}if(w||w===0){v+=w}v+='" class="icon-button disk tooltip"></a>\n</div>\n';return v}function m(v,u){return"Download Dataset"}function l(v,u){return"Additional Files"}function j(y,x){var v="",w,u;v+='\n <a class="action-button" href="';u=p.url;if(u){w=u.call(y,{hash:{}})}else{w=y.url;w=typeof w===e?w():w}v+=d(w)+'">';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(7,i,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(7,i,x)})}if(w||w===0){v+=w}v+=" ";u=p.file_type;if(u){w=u.call(y,{hash:{}})}else{w=y.file_type;w=typeof w===e?w():w}v+=d(w)+"</a>\n ";return v}function i(v,u){return"Download"}function f(v,u){return"Download"}function s(y,x){var v="",w,u;v+="\n";v+='\n<a href="';w=y.urls;w=w==null||w===false?w:w.download;w=typeof w===e?w():w;v+=d(w)+'" title="';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(12,r,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(12,r,x)})}if(w||w===0){v+=w}v+='" class="icon-button disk tooltip"></a>\n';return v}function r(v,u){return"Download"}h=q.urls;h=h==null||h===false?h:h.meta_download;h=p["if"].call(q,h,{hash:{},inverse:o.program(11,s,t),fn:o.program(1,n,t)});if(h||h===0){return h}else{return""}})})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-history-failedMetaData.js
--- a/static/scripts/packed/templates/compiled/template-history-failedMetaData.js
+++ /dev/null
@@ -1,1 +0,0 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-failedMetaData"]=b(function(g,m,f,l,k){f=f||g.helpers;var c,i,o=this,h="function",n=f.blockHelperMissing,j=this.escapeExpression;function e(t,s){var q="",r,p;q+="\n";p=f.local;if(p){r=p.call(t,{hash:{},inverse:o.noop,fn:o.program(2,d,s)})}else{r=t.local;r=typeof r===h?r():r}if(!f.local){r=n.call(t,r,{hash:{},inverse:o.noop,fn:o.program(2,d,s)})}if(r||r===0){q+=r}q+='\nYou may be able to <a href="';r=t.urls;r=r==null||r===false?r:r.edit;r=typeof r===h?r():r;q+=j(r)+'" target="galaxy_main">set it manually or retry auto-detection</a>.\n';return q}function d(q,p){return"An error occurred setting the metadata for this dataset."}i=f.warningmessagesmall;if(i){c=i.call(m,{hash:{},inverse:o.noop,fn:o.program(1,e,k)})}else{c=m.warningmessagesmall;c=typeof c===h?c():c}if(!f.warningmessagesmall){c=n.call(m,c,{hash:{},inverse:o.noop,fn:o.program(1,e,k)})}if(c||c===0){return c}else{return""}})})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-history-hdaSummary.js
--- a/static/scripts/packed/templates/compiled/template-history-hdaSummary.js
+++ /dev/null
@@ -1,1 +0,0 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-hdaSummary"]=b(function(g,n,f,m,l){f=f||g.helpers;var j="",d,i,h="function",k=this.escapeExpression,p=this;function e(u,t){var r="",s,q;r+='\n <a href="';s=u.urls;s=s==null||s===false?s:s.edit;s=typeof s===h?s():s;r+=k(s)+'" target="galaxy_main">';q=f.metadata_dbkey;if(q){s=q.call(u,{hash:{}})}else{s=u.metadata_dbkey;s=typeof s===h?s():s}r+=k(s)+"</a>\n ";return r}function c(u,t){var r="",s,q;r+='\n <span class="';q=f.metadata_dbkey;if(q){s=q.call(u,{hash:{}})}else{s=u.metadata_dbkey;s=typeof s===h?s():s}r+=k(s)+'">';q=f.metadata_dbkey;if(q){s=q.call(u,{hash:{}})}else{s=u.metadata_dbkey;s=typeof s===h?s():s}r+=k(s)+"</span>\n ";return r}function o(u,t){var r="",s,q;r+='\n<div class="hda-info">';q=f.misc_info;if(q){s=q.call(u,{hash:{}})}else{s=u.misc_info;s=typeof s===h?s():s}r+=k(s)+"</div>\n";return r}j+='<div class="hda-summary">\n ';i=f.misc_blurb;if(i){d=i.call(n,{hash:{}})}else{d=n.misc_blurb;d=typeof d===h?d():d}j+=k(d)+'<br />\n format: <span class="';i=f.data_type;if(i){d=i.call(n,{hash:{}})}else{d=n.data_type;d=typeof d===h?d():d}j+=k(d)+'">';i=f.data_type;if(i){d=i.call(n,{hash:{}})}else{d=n.data_type;d=typeof d===h?d():d}j+=k(d)+"</span>,\n database:\n ";d=n.dbkey_unknown_and_editable;d=f["if"].call(n,d,{hash:{},inverse:p.program(3,c,l),fn:p.program(1,e,l)});if(d||d===0){j+=d}j+="\n</div>\n";d=n.misc_info;d=f["if"].call(n,d,{hash:{},inverse:p.noop,fn:p.program(5,o,l)});if(d||d===0){j+=d}return j})})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-history-tagArea.js
--- a/static/scripts/packed/templates/compiled/template-history-tagArea.js
+++ /dev/null
@@ -1,1 +0,0 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-tagArea"]=b(function(f,l,e,k,j){e=e||f.helpers;var i="",c,h,n=this,g="function",m=e.blockHelperMissing;function d(p,o){return"Tags"}i+='\n<div class="tag-area" style="display: none;">\n <strong>';h=e.local;if(h){c=h.call(l,{hash:{},inverse:n.noop,fn:n.program(1,d,j)})}else{c=l.local;c=typeof c===g?c():c}if(!e.local){c=m.call(l,c,{hash:{},inverse:n.noop,fn:n.program(1,d,j)})}if(c||c===0){i+=c}i+=':</strong>\n <div class="tag-elt">\n </div>\n</div>';return i})})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-history-titleLink.js
--- a/static/scripts/packed/templates/compiled/template-history-titleLink.js
+++ /dev/null
@@ -1,1 +0,0 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-titleLink"]=b(function(e,l,d,k,j){d=d||e.helpers;var h="",c,g,f="function",i=this.escapeExpression;h+='<a href="javascript:void(0);"><span class="historyItemTitle">';g=d.hid;if(g){c=g.call(l,{hash:{}})}else{c=l.hid;c=typeof c===f?c():c}h+=i(c)+": ";g=d.name;if(g){c=g.call(l,{hash:{}})}else{c=l.name;c=typeof c===f?c():c}h+=i(c)+"</span></a>";return h})})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-history-warning-messages.js
--- a/static/scripts/packed/templates/compiled/template-history-warning-messages.js
+++ /dev/null
@@ -1,1 +0,0 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-warning-messages"]=b(function(g,s,q,k,z){q=q||g.helpers;var r="",h,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var A;A=C.purged;A=q.unless.call(C,A,{hash:{},inverse:p.noop,fn:p.program(2,n,B)});if(A||A===0){return A}else{return""}}function n(E,D){var B="",C,A;B+="\n";A=q.warningmessagesmall;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(3,m,D)})}else{C=E.warningmessagesmall;C=typeof C===e?C():C}if(!q.warningmessagesmall){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(3,m,D)})}if(C||C===0){B+=C}B+="\n";return B}function m(E,D){var B="",C,A;B+="\n ";A=q.local;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(4,l,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(4,l,D)})}if(C||C===0){B+=C}B+="\n ";C=E.urls;C=C==null||C===false?C:C.undelete;C=q["if"].call(E,C,{hash:{},inverse:p.noop,fn:p.program(6,j,D)});if(C||C===0){B+=C}B+="\n";return B}function l(B,A){return"This dataset has been deleted."}function j(E,D){var B="",C,A;B+="\n ";B+='\n Click <a href="';C=E.urls;C=C==null||C===false?C:C.undelete;C=typeof C===e?C():C;B+=d(C)+'" class="historyItemUndelete" id="historyItemUndeleter-';A=q.id;if(A){C=A.call(E,{hash:{}})}else{C=E.id;C=typeof C===e?C():C}B+=d(C)+'"\n target="galaxy_history">here</a> to undelete it\n ';C=E.urls;C=C==null||C===false?C:C.purge;C=q["if"].call(E,C,{hash:{},inverse:p.noop,fn:p.program(7,i,D)});if(C||C===0){B+=C}B+="\n ";return B}function i(E,D){var B="",C,A;B+='\n or <a href="';C=E.urls;C=C==null||C===false?C:C.purge;C=typeof C===e?C():C;B+=d(C)+'" class="historyItemPurge" id="historyItemPurger-';A=q.id;if(A){C=A.call(E,{hash:{}})}else{C=E.id;C=typeof C===e?C():C}B+=d(C)+'"\n target="galaxy_history">here</a> to immediately remove it from disk\n ';return B}function f(D,C){var B,A;A=q.warningmessagesmall;if(A){B=A.call(D,{hash:{},inverse:p.noop,fn:p.program(10,y,C)})}else{B=D.warningmessagesmall;B=typeof B===e?B():B}if(!q.warningmessagesmall){B=c.call(D,B,{hash:{},inverse:p.noop,fn:p.program(10,y,C)})}if(B||B===0){return B}else{return""}}function y(E,D){var B="",C,A;B+="\n ";A=q.local;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(11,x,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(11,x,D)})}if(C||C===0){B+=C}B+="\n";return B}function x(B,A){return"This dataset has been deleted and removed from disk."}function w(D,C){var B,A;A=q.warningmessagesmall;if(A){B=A.call(D,{hash:{},inverse:p.noop,fn:p.program(14,v,C)})}else{B=D.warningmessagesmall;B=typeof B===e?B():B}if(!q.warningmessagesmall){B=c.call(D,B,{hash:{},inverse:p.noop,fn:p.program(14,v,C)})}if(B||B===0){return B}else{return""}}function v(E,D){var B="",C,A;B+="\n ";A=q.local;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(15,u,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(15,u,D)})}if(C||C===0){B+=C}B+="\n ";C=E.urls;C=C==null||C===false?C:C.unhide;C=q["if"].call(E,C,{hash:{},inverse:p.noop,fn:p.program(17,t,D)});if(C||C===0){B+=C}B+="\n";return B}function u(B,A){return"This dataset has been hidden."}function t(E,D){var B="",C,A;B+='\n Click <a href="';C=E.urls;C=C==null||C===false?C:C.unhide;C=typeof C===e?C():C;B+=d(C)+'" class="historyItemUnhide" id="historyItemUnhider-';A=q.id;if(A){C=A.call(E,{hash:{}})}else{C=E.id;C=typeof C===e?C():C}B+=d(C)+'"\n target="galaxy_history">here</a> to unhide it\n ';return B}h=s.deleted;h=q["if"].call(s,h,{hash:{},inverse:p.noop,fn:p.program(1,o,z)});if(h||h===0){r+=h}r+="\n\n";h=s.purged;h=q["if"].call(s,h,{hash:{},inverse:p.noop,fn:p.program(9,f,z)});if(h||h===0){r+=h}r+="\n\n";h=s.visible;h=q.unless.call(s,h,{hash:{},inverse:p.noop,fn:p.program(13,w,z)});if(h||h===0){r+=h}return r})})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compile_templates.py
--- a/static/scripts/templates/compile_templates.py
+++ b/static/scripts/templates/compile_templates.py
@@ -210,9 +210,11 @@
# delete multi template intermediate files
print "\nCleaning up intermediate multi-template template files:"
for filename in multi_template_template_filenames:
- print 'removing', filename
- os.remove( filename )
-
+ try:
+ print 'removing', filename
+ os.remove( filename )
+ except Exception, exc:
+ print exc
# ------------------------------------------------------------------------------
if __name__ == '__main__':
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-hda-annotationArea.js
--- /dev/null
+++ b/static/scripts/templates/compiled/template-hda-annotationArea.js
@@ -0,0 +1,39 @@
+(function() {
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
+templates['template-hda-annotationArea'] = template(function (Handlebars,depth0,helpers,partials,data) {
+ helpers = helpers || Handlebars.helpers;
+ var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
+
+function program1(depth0,data) {
+
+
+ return "Annotation";}
+
+function program3(depth0,data) {
+
+
+ return "Edit dataset annotation";}
+
+ buffer += "\n<div id=\"";
+ foundHelper = helpers.id;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "-annotation-area\" class=\"annotation-area\" style=\"display: none;\">\n <strong>";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += ":</strong>\n <div id=\"";
+ foundHelper = helpers.id;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "-anotation-elt\" class=\"annotation-elt tooltip editable-text\"\n style=\"margin: 1px 0px 1px 0px\" title=\"";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\">\n </div>\n</div>";
+ return buffer;});
+})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-hda-displayApps.js
--- /dev/null
+++ b/static/scripts/templates/compiled/template-hda-displayApps.js
@@ -0,0 +1,51 @@
+(function() {
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
+templates['template-hda-displayApps'] = template(function (Handlebars,depth0,helpers,partials,data) {
+ helpers = helpers || Handlebars.helpers;
+ var stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
+
+function program1(depth0,data) {
+
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n ";
+ foundHelper = helpers.label;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.label; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "\n ";
+ stack1 = depth0.links;
+ stack1 = helpers.each.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n <br />\n";
+ return buffer;}
+function program2(depth0,data) {
+
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n <a target=\"";
+ foundHelper = helpers.target;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.target; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "\" href=\"";
+ foundHelper = helpers.href;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.href; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "\">";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "</a>\n ";
+ return buffer;}
+function program3(depth0,data) {
+
+ var stack1, foundHelper;
+ foundHelper = helpers.text;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.text; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ return escapeExpression(stack1);}
+
+ stack1 = depth0.displayApps;
+ stack1 = helpers.each.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)});
+ if(stack1 || stack1 === 0) { return stack1; }
+ else { return ''; }});
+})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-hda-downloadLinks.js
--- /dev/null
+++ b/static/scripts/templates/compiled/template-hda-downloadLinks.js
@@ -0,0 +1,117 @@
+(function() {
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
+templates['template-hda-downloadLinks'] = template(function (Handlebars,depth0,helpers,partials,data) {
+ helpers = helpers || Handlebars.helpers;
+ var stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
+
+function program1(depth0,data) {
+
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n";
+ buffer += "\n<div popupmenu=\"dataset-";
+ foundHelper = helpers.id;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "-popup\">\n <a class=\"action-button\" href=\"";
+ stack1 = depth0.urls;
+ stack1 = stack1 == null || stack1 === false ? stack1 : stack1.download;
+ stack1 = typeof stack1 === functionType ? stack1() : stack1;
+ buffer += escapeExpression(stack1) + "\">";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "</a>\n <a>";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "</a>\n ";
+ stack1 = depth0.urls;
+ stack1 = stack1 == null || stack1 === false ? stack1 : stack1.meta_download;
+ stack1 = helpers.each.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(6, program6, data)});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n</div>\n<div style=\"float:left;\" class=\"menubutton split popup\" id=\"dataset-";
+ foundHelper = helpers.id;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "-popup\">\n <a href=\"";
+ stack1 = depth0.urls;
+ stack1 = stack1 == null || stack1 === false ? stack1 : stack1.download;
+ stack1 = typeof stack1 === functionType ? stack1() : stack1;
+ buffer += escapeExpression(stack1) + "\" title=\"";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\" class=\"icon-button disk tooltip\"></a>\n</div>\n";
+ return buffer;}
+function program2(depth0,data) {
+
+
+ return "Download Dataset";}
+
+function program4(depth0,data) {
+
+
+ return "Additional Files";}
+
+function program6(depth0,data) {
+
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n <a class=\"action-button\" href=\"";
+ foundHelper = helpers.url;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.url; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "\">";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += " ";
+ foundHelper = helpers.file_type;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.file_type; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "</a>\n ";
+ return buffer;}
+function program7(depth0,data) {
+
+
+ return "Download";}
+
+function program9(depth0,data) {
+
+
+ return "Download";}
+
+function program11(depth0,data) {
+
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n";
+ buffer += "\n<a href=\"";
+ stack1 = depth0.urls;
+ stack1 = stack1 == null || stack1 === false ? stack1 : stack1.download;
+ stack1 = typeof stack1 === functionType ? stack1() : stack1;
+ buffer += escapeExpression(stack1) + "\" title=\"";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\" class=\"icon-button disk tooltip\"></a>\n";
+ return buffer;}
+function program12(depth0,data) {
+
+
+ return "Download";}
+
+ stack1 = depth0.urls;
+ stack1 = stack1 == null || stack1 === false ? stack1 : stack1.meta_download;
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(11, program11, data),fn:self.program(1, program1, data)});
+ if(stack1 || stack1 === 0) { return stack1; }
+ else { return ''; }});
+})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-hda-failedMetaData.js
--- /dev/null
+++ b/static/scripts/templates/compiled/template-hda-failedMetaData.js
@@ -0,0 +1,33 @@
+(function() {
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
+templates['template-hda-failedMetaData'] = template(function (Handlebars,depth0,helpers,partials,data) {
+ helpers = helpers || Handlebars.helpers;
+ var stack1, foundHelper, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing, escapeExpression=this.escapeExpression;
+
+function program1(depth0,data) {
+
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\nYou may be able to <a href=\"";
+ stack1 = depth0.urls;
+ stack1 = stack1 == null || stack1 === false ? stack1 : stack1.edit;
+ stack1 = typeof stack1 === functionType ? stack1() : stack1;
+ buffer += escapeExpression(stack1) + "\" target=\"galaxy_main\">set it manually or retry auto-detection</a>.\n";
+ return buffer;}
+function program2(depth0,data) {
+
+
+ return "An error occurred setting the metadata for this dataset.";}
+
+ foundHelper = helpers.warningmessagesmall;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
+ else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
+ if(stack1 || stack1 === 0) { return stack1; }
+ else { return ''; }});
+})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-hda-hdaSummary.js
--- /dev/null
+++ b/static/scripts/templates/compiled/template-hda-hdaSummary.js
@@ -0,0 +1,66 @@
+(function() {
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
+templates['template-hda-hdaSummary'] = template(function (Handlebars,depth0,helpers,partials,data) {
+ helpers = helpers || Handlebars.helpers;
+ var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression, self=this;
+
+function program1(depth0,data) {
+
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n <a class=\"metadata-dbkey\" href=\"";
+ stack1 = depth0.urls;
+ stack1 = stack1 == null || stack1 === false ? stack1 : stack1.edit;
+ stack1 = typeof stack1 === functionType ? stack1() : stack1;
+ buffer += escapeExpression(stack1) + "\" target=\"galaxy_main\">";
+ foundHelper = helpers.metadata_dbkey;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "</a>\n ";
+ return buffer;}
+
+function program3(depth0,data) {
+
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n <span class=\"metadata-dbkey ";
+ foundHelper = helpers.metadata_dbkey;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "\">";
+ foundHelper = helpers.metadata_dbkey;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "</span>\n ";
+ return buffer;}
+
+function program5(depth0,data) {
+
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n<div class=\"hda-info\"> ";
+ foundHelper = helpers.misc_info;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.misc_info; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + " </div>\n";
+ return buffer;}
+
+ buffer += "<div class=\"hda-summary\">\n ";
+ foundHelper = helpers.misc_blurb;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.misc_blurb; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "<br />\n format: <span class=\"";
+ foundHelper = helpers.data_type;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.data_type; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "\">";
+ foundHelper = helpers.data_type;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.data_type; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "</span>,\n database:\n ";
+ stack1 = depth0.dbkey_unknown_and_editable;
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data)});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n</div>\n";
+ stack1 = depth0.misc_info;
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ return buffer;});
+})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-hda-tagArea.js
--- /dev/null
+++ b/static/scripts/templates/compiled/template-hda-tagArea.js
@@ -0,0 +1,20 @@
+(function() {
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
+templates['template-hda-tagArea'] = template(function (Handlebars,depth0,helpers,partials,data) {
+ helpers = helpers || Handlebars.helpers;
+ var buffer = "", stack1, foundHelper, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing;
+
+function program1(depth0,data) {
+
+
+ return "Tags";}
+
+ buffer += "\n<div class=\"tag-area\" style=\"display: none;\">\n <strong>";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += ":</strong>\n <div class=\"tag-elt\">\n </div>\n</div>";
+ return buffer;});
+})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-hda-titleLink.js
--- /dev/null
+++ b/static/scripts/templates/compiled/template-hda-titleLink.js
@@ -0,0 +1,18 @@
+(function() {
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
+templates['template-hda-titleLink'] = template(function (Handlebars,depth0,helpers,partials,data) {
+ helpers = helpers || Handlebars.helpers;
+ var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression;
+
+
+ buffer += "<span class=\"historyItemTitle\">";
+ foundHelper = helpers.hid;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.hid; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + ": ";
+ foundHelper = helpers.name;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "</span>";
+ return buffer;});
+})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-hda-warning-messages.js
--- /dev/null
+++ b/static/scripts/templates/compiled/template-hda-warning-messages.js
@@ -0,0 +1,160 @@
+(function() {
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
+templates['template-hda-warning-messages'] = template(function (Handlebars,depth0,helpers,partials,data) {
+ helpers = helpers || Handlebars.helpers;
+ var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
+
+function program1(depth0,data) {
+
+ var stack1;
+ stack1 = depth0.purged;
+ stack1 = helpers.unless.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)});
+ if(stack1 || stack1 === 0) { return stack1; }
+ else { return ''; }}
+function program2(depth0,data) {
+
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n";
+ foundHelper = helpers.warningmessagesmall;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); }
+ else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n";
+ return buffer;}
+function program3(depth0,data) {
+
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n ";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n ";
+ stack1 = depth0.urls;
+ stack1 = stack1 == null || stack1 === false ? stack1 : stack1.undelete;
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(6, program6, data)});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n";
+ return buffer;}
+function program4(depth0,data) {
+
+
+ return "This dataset has been deleted.";}
+
+function program6(depth0,data) {
+
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n ";
+ buffer += "\n Click <a href=\"";
+ stack1 = depth0.urls;
+ stack1 = stack1 == null || stack1 === false ? stack1 : stack1.undelete;
+ stack1 = typeof stack1 === functionType ? stack1() : stack1;
+ buffer += escapeExpression(stack1) + "\" class=\"historyItemUndelete\" id=\"historyItemUndeleter-";
+ foundHelper = helpers.id;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "\"\n target=\"galaxy_history\">here</a> to undelete it\n ";
+ stack1 = depth0.urls;
+ stack1 = stack1 == null || stack1 === false ? stack1 : stack1.purge;
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n ";
+ return buffer;}
+function program7(depth0,data) {
+
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n or <a href=\"";
+ stack1 = depth0.urls;
+ stack1 = stack1 == null || stack1 === false ? stack1 : stack1.purge;
+ stack1 = typeof stack1 === functionType ? stack1() : stack1;
+ buffer += escapeExpression(stack1) + "\" class=\"historyItemPurge\" id=\"historyItemPurger-";
+ foundHelper = helpers.id;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "\"\n target=\"galaxy_history\">here</a> to immediately remove it from disk\n ";
+ return buffer;}
+
+function program9(depth0,data) {
+
+ var stack1, foundHelper;
+ foundHelper = helpers.warningmessagesmall;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); }
+ else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); }
+ if(stack1 || stack1 === 0) { return stack1; }
+ else { return ''; }}
+function program10(depth0,data) {
+
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n ";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n";
+ return buffer;}
+function program11(depth0,data) {
+
+
+ return "This dataset has been deleted and removed from disk.";}
+
+function program13(depth0,data) {
+
+ var stack1, foundHelper;
+ foundHelper = helpers.warningmessagesmall;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); }
+ else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); }
+ if(stack1 || stack1 === 0) { return stack1; }
+ else { return ''; }}
+function program14(depth0,data) {
+
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n ";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(15, program15, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(15, program15, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n ";
+ stack1 = depth0.urls;
+ stack1 = stack1 == null || stack1 === false ? stack1 : stack1.unhide;
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(17, program17, data)});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n";
+ return buffer;}
+function program15(depth0,data) {
+
+
+ return "This dataset has been hidden.";}
+
+function program17(depth0,data) {
+
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n Click <a href=\"";
+ stack1 = depth0.urls;
+ stack1 = stack1 == null || stack1 === false ? stack1 : stack1.unhide;
+ stack1 = typeof stack1 === functionType ? stack1() : stack1;
+ buffer += escapeExpression(stack1) + "\" class=\"historyItemUnhide\" id=\"historyItemUnhider-";
+ foundHelper = helpers.id;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "\"\n target=\"galaxy_history\">here</a> to unhide it\n ";
+ return buffer;}
+
+ stack1 = depth0.deleted;
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n\n";
+ stack1 = depth0.purged;
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n\n";
+ stack1 = depth0.visible;
+ stack1 = helpers.unless.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(13, program13, data)});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ return buffer;});
+})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-history-annotationArea.js
--- a/static/scripts/templates/compiled/template-history-annotationArea.js
+++ /dev/null
@@ -1,39 +0,0 @@
-(function() {
- var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['template-history-annotationArea'] = template(function (Handlebars,depth0,helpers,partials,data) {
- helpers = helpers || Handlebars.helpers;
- var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
-
-function program1(depth0,data) {
-
-
- return "Annotation";}
-
-function program3(depth0,data) {
-
-
- return "Edit dataset annotation";}
-
- buffer += "\n<div id=\"";
- foundHelper = helpers.id;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "-annotation-area\" class=\"annotation-area\" style=\"display: none;\">\n <strong>";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += ":</strong>\n <div id=\"";
- foundHelper = helpers.id;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "-anotation-elt\" class=\"annotation-elt tooltip editable-text\"\n style=\"margin: 1px 0px 1px 0px\" title=\"";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\">\n </div>\n</div>";
- return buffer;});
-})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-history-displayApps.js
--- a/static/scripts/templates/compiled/template-history-displayApps.js
+++ /dev/null
@@ -1,51 +0,0 @@
-(function() {
- var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['template-history-displayApps'] = template(function (Handlebars,depth0,helpers,partials,data) {
- helpers = helpers || Handlebars.helpers;
- var stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
-
-function program1(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n ";
- foundHelper = helpers.label;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.label; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "\n ";
- stack1 = depth0.links;
- stack1 = helpers.each.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n <br />\n";
- return buffer;}
-function program2(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n <a target=\"";
- foundHelper = helpers.target;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.target; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "\" href=\"";
- foundHelper = helpers.href;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.href; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "\">";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "</a>\n ";
- return buffer;}
-function program3(depth0,data) {
-
- var stack1, foundHelper;
- foundHelper = helpers.text;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.text; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- return escapeExpression(stack1);}
-
- stack1 = depth0.displayApps;
- stack1 = helpers.each.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)});
- if(stack1 || stack1 === 0) { return stack1; }
- else { return ''; }});
-})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-history-downloadLinks.js
--- a/static/scripts/templates/compiled/template-history-downloadLinks.js
+++ /dev/null
@@ -1,117 +0,0 @@
-(function() {
- var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['template-history-downloadLinks'] = template(function (Handlebars,depth0,helpers,partials,data) {
- helpers = helpers || Handlebars.helpers;
- var stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
-
-function program1(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n";
- buffer += "\n<div popupmenu=\"dataset-";
- foundHelper = helpers.id;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "-popup\">\n <a class=\"action-button\" href=\"";
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.download;
- stack1 = typeof stack1 === functionType ? stack1() : stack1;
- buffer += escapeExpression(stack1) + "\">";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "</a>\n <a>";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "</a>\n ";
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.meta_download;
- stack1 = helpers.each.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(6, program6, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n</div>\n<div style=\"float:left;\" class=\"menubutton split popup\" id=\"dataset-";
- foundHelper = helpers.id;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "-popup\">\n <a href=\"";
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.download;
- stack1 = typeof stack1 === functionType ? stack1() : stack1;
- buffer += escapeExpression(stack1) + "\" title=\"";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\" class=\"icon-button disk tooltip\"></a>\n</div>\n";
- return buffer;}
-function program2(depth0,data) {
-
-
- return "Download Dataset";}
-
-function program4(depth0,data) {
-
-
- return "Additional Files";}
-
-function program6(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n <a class=\"action-button\" href=\"";
- foundHelper = helpers.url;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.url; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "\">";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += " ";
- foundHelper = helpers.file_type;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.file_type; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "</a>\n ";
- return buffer;}
-function program7(depth0,data) {
-
-
- return "Download";}
-
-function program9(depth0,data) {
-
-
- return "Download";}
-
-function program11(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n";
- buffer += "\n<a href=\"";
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.download;
- stack1 = typeof stack1 === functionType ? stack1() : stack1;
- buffer += escapeExpression(stack1) + "\" title=\"";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\" class=\"icon-button disk tooltip\"></a>\n";
- return buffer;}
-function program12(depth0,data) {
-
-
- return "Download";}
-
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.meta_download;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(11, program11, data),fn:self.program(1, program1, data)});
- if(stack1 || stack1 === 0) { return stack1; }
- else { return ''; }});
-})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-history-failedMetaData.js
--- a/static/scripts/templates/compiled/template-history-failedMetaData.js
+++ /dev/null
@@ -1,33 +0,0 @@
-(function() {
- var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['template-history-failedMetaData'] = template(function (Handlebars,depth0,helpers,partials,data) {
- helpers = helpers || Handlebars.helpers;
- var stack1, foundHelper, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing, escapeExpression=this.escapeExpression;
-
-function program1(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\nYou may be able to <a href=\"";
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.edit;
- stack1 = typeof stack1 === functionType ? stack1() : stack1;
- buffer += escapeExpression(stack1) + "\" target=\"galaxy_main\">set it manually or retry auto-detection</a>.\n";
- return buffer;}
-function program2(depth0,data) {
-
-
- return "An error occurred setting the metadata for this dataset.";}
-
- foundHelper = helpers.warningmessagesmall;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
- else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
- if(stack1 || stack1 === 0) { return stack1; }
- else { return ''; }});
-})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-history-hdaSummary.js
--- a/static/scripts/templates/compiled/template-history-hdaSummary.js
+++ /dev/null
@@ -1,66 +0,0 @@
-(function() {
- var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['template-history-hdaSummary'] = template(function (Handlebars,depth0,helpers,partials,data) {
- helpers = helpers || Handlebars.helpers;
- var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression, self=this;
-
-function program1(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n <a href=\"";
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.edit;
- stack1 = typeof stack1 === functionType ? stack1() : stack1;
- buffer += escapeExpression(stack1) + "\" target=\"galaxy_main\">";
- foundHelper = helpers.metadata_dbkey;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "</a>\n ";
- return buffer;}
-
-function program3(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n <span class=\"";
- foundHelper = helpers.metadata_dbkey;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "\">";
- foundHelper = helpers.metadata_dbkey;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "</span>\n ";
- return buffer;}
-
-function program5(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n<div class=\"hda-info\">";
- foundHelper = helpers.misc_info;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.misc_info; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "</div>\n";
- return buffer;}
-
- buffer += "<div class=\"hda-summary\">\n ";
- foundHelper = helpers.misc_blurb;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.misc_blurb; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "<br />\n format: <span class=\"";
- foundHelper = helpers.data_type;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.data_type; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "\">";
- foundHelper = helpers.data_type;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.data_type; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "</span>,\n database:\n ";
- stack1 = depth0.dbkey_unknown_and_editable;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n</div>\n";
- stack1 = depth0.misc_info;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- return buffer;});
-})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-history-tagArea.js
--- a/static/scripts/templates/compiled/template-history-tagArea.js
+++ /dev/null
@@ -1,20 +0,0 @@
-(function() {
- var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['template-history-tagArea'] = template(function (Handlebars,depth0,helpers,partials,data) {
- helpers = helpers || Handlebars.helpers;
- var buffer = "", stack1, foundHelper, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing;
-
-function program1(depth0,data) {
-
-
- return "Tags";}
-
- buffer += "\n<div class=\"tag-area\" style=\"display: none;\">\n <strong>";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += ":</strong>\n <div class=\"tag-elt\">\n </div>\n</div>";
- return buffer;});
-})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-history-titleLink.js
--- a/static/scripts/templates/compiled/template-history-titleLink.js
+++ /dev/null
@@ -1,18 +0,0 @@
-(function() {
- var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['template-history-titleLink'] = template(function (Handlebars,depth0,helpers,partials,data) {
- helpers = helpers || Handlebars.helpers;
- var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression;
-
-
- buffer += "<a href=\"javascript:void(0);\"><span class=\"historyItemTitle\">";
- foundHelper = helpers.hid;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.hid; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + ": ";
- foundHelper = helpers.name;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "</span></a>";
- return buffer;});
-})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-history-warning-messages.js
--- a/static/scripts/templates/compiled/template-history-warning-messages.js
+++ /dev/null
@@ -1,160 +0,0 @@
-(function() {
- var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['template-history-warning-messages'] = template(function (Handlebars,depth0,helpers,partials,data) {
- helpers = helpers || Handlebars.helpers;
- var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
-
-function program1(depth0,data) {
-
- var stack1;
- stack1 = depth0.purged;
- stack1 = helpers.unless.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)});
- if(stack1 || stack1 === 0) { return stack1; }
- else { return ''; }}
-function program2(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n";
- foundHelper = helpers.warningmessagesmall;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); }
- else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n";
- return buffer;}
-function program3(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n ";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n ";
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.undelete;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(6, program6, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n";
- return buffer;}
-function program4(depth0,data) {
-
-
- return "This dataset has been deleted.";}
-
-function program6(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n ";
- buffer += "\n Click <a href=\"";
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.undelete;
- stack1 = typeof stack1 === functionType ? stack1() : stack1;
- buffer += escapeExpression(stack1) + "\" class=\"historyItemUndelete\" id=\"historyItemUndeleter-";
- foundHelper = helpers.id;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "\"\n target=\"galaxy_history\">here</a> to undelete it\n ";
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.purge;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n ";
- return buffer;}
-function program7(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n or <a href=\"";
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.purge;
- stack1 = typeof stack1 === functionType ? stack1() : stack1;
- buffer += escapeExpression(stack1) + "\" class=\"historyItemPurge\" id=\"historyItemPurger-";
- foundHelper = helpers.id;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "\"\n target=\"galaxy_history\">here</a> to immediately remove it from disk\n ";
- return buffer;}
-
-function program9(depth0,data) {
-
- var stack1, foundHelper;
- foundHelper = helpers.warningmessagesmall;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); }
- else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); }
- if(stack1 || stack1 === 0) { return stack1; }
- else { return ''; }}
-function program10(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n ";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n";
- return buffer;}
-function program11(depth0,data) {
-
-
- return "This dataset has been deleted and removed from disk.";}
-
-function program13(depth0,data) {
-
- var stack1, foundHelper;
- foundHelper = helpers.warningmessagesmall;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); }
- else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); }
- if(stack1 || stack1 === 0) { return stack1; }
- else { return ''; }}
-function program14(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n ";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(15, program15, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(15, program15, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n ";
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.unhide;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(17, program17, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n";
- return buffer;}
-function program15(depth0,data) {
-
-
- return "This dataset has been hidden.";}
-
-function program17(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n Click <a href=\"";
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.unhide;
- stack1 = typeof stack1 === functionType ? stack1() : stack1;
- buffer += escapeExpression(stack1) + "\" class=\"historyItemUnhide\" id=\"historyItemUnhider-";
- foundHelper = helpers.id;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "\"\n target=\"galaxy_history\">here</a> to unhide it\n ";
- return buffer;}
-
- stack1 = depth0.deleted;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n\n";
- stack1 = depth0.purged;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n\n";
- stack1 = depth0.visible;
- stack1 = helpers.unless.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(13, program13, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- return buffer;});
-})();
\ No newline at end of file
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/hda-templates.html
--- /dev/null
+++ b/static/scripts/templates/hda-templates.html
@@ -0,0 +1,118 @@
+<!-- ---------------------------------------------------------------------- WARNING BOXES -->
+<script type="text/template" class="template-hda" id="template-hda-warning-messages">
+{{#if deleted}}{{#unless purged}}
+{{#warningmessagesmall}}
+ {{#local}}This dataset has been deleted.{{/local}}
+ {{#if urls.undelete}}
+ {{! how in the hell would you localize this? }}
+ Click <a href="{{ urls.undelete }}" class="historyItemUndelete" id="historyItemUndeleter-{{ id }}"
+ target="galaxy_history">here</a> to undelete it
+ {{#if urls.purge}}
+ or <a href="{{ urls.purge }}" class="historyItemPurge" id="historyItemPurger-{{ id }}"
+ target="galaxy_history">here</a> to immediately remove it from disk
+ {{/if}}
+ {{/if}}
+{{/warningmessagesmall}}
+{{/unless}}{{/if}}
+
+{{#if purged}}{{#warningmessagesmall}}
+ {{#local}}This dataset has been deleted and removed from disk.{{/local}}
+{{/warningmessagesmall}}{{/if}}
+
+{{#unless visible}}{{#warningmessagesmall}}
+ {{#local}}This dataset has been hidden.{{/local}}
+ {{#if urls.unhide}}
+ Click <a href="{{ urls.unhide }}" class="historyItemUnhide" id="historyItemUnhider-{{ id }}"
+ target="galaxy_history">here</a> to unhide it
+ {{/if}}
+{{/warningmessagesmall}}{{/unless}}
+</script>
+
+
+<!-- ---------------------------------------------------------------------- TITLE/NAME -->
+<script type="text/template" class="template-hda" id="template-hda-titleLink">
+<span class="historyItemTitle">{{ hid }}: {{ name }}</span>
+</script>
+
+
+<!-- ---------------------------------------------------------------------- SUMMARY INFO (ok state) -->
+<script type="text/template" class="template-hda" id="template-hda-hdaSummary">
+<div class="hda-summary">
+ {{ misc_blurb }}<br />
+ format: <span class="{{ data_type }}">{{ data_type }}</span>,
+ database:
+ {{#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}}
+</div>
+{{#if misc_info}}
+<div class="hda-info"> {{ misc_info }} </div>
+{{/if}}
+</script>
+
+
+<!-- ---------------------------------------------------------------------- FAILED META WARNING -->
+<script type="text/template" class="template-hda" id="template-hda-failedMetaData">
+{{#warningmessagesmall}}
+{{#local}}An error occurred setting the metadata for this dataset.{{/local}}
+You may be able to <a href="{{ urls.edit }}" target="galaxy_main">set it manually or retry auto-detection</a>.
+{{/warningmessagesmall}}
+</script>
+
+
+<!-- ---------------------------------------------------------------------- DOWNLOAD POPUP -->
+<script type="text/template" class="template-hda" id="template-hda-downloadLinks">
+{{#if urls.meta_download}}
+{{! this will be built using a popupmenu }}
+<div popupmenu="dataset-{{ id }}-popup">
+ <a class="action-button" href="{{ urls.download }}">{{#local}}Download Dataset{{/local}}</a>
+ <a>{{#local}}Additional Files{{/local}}</a>
+ {{#each urls.meta_download}}
+ <a class="action-button" href="{{ url }}">{{#local}}Download{{/local}} {{ file_type }}</a>
+ {{/each}}
+</div>
+<div style="float:left;" class="menubutton split popup" id="dataset-{{ id }}-popup">
+ <a href="{{ urls.download }}" title="{{#local}}Download{{/local}}" class="icon-button disk tooltip"></a>
+</div>
+{{else}}
+{{! otherwise a simple icon button }}
+<a href="{{ urls.download }}" title="{{#local}}Download{{/local}}" class="icon-button disk tooltip"></a>
+{{/if}}
+</script>
+
+
+<!-- ---------------------------------------------------------------------- TAG AREA -->
+<script type="text/template" class="template-hda" id="template-hda-tagArea">
+{{! TODO: move to mvc/tag.js templates }}
+<div class="tag-area" style="display: none;">
+ <strong>{{#local}}Tags{{/local}}:</strong>
+ <div class="tag-elt">
+ </div>
+</div>
+</script>
+
+
+<!-- ---------------------------------------------------------------------- ANNOTATION AREA -->
+<script type="text/template" class="template-hda" id="template-hda-annotationArea">
+{{! TODO: move to mvc/annotations.js templates, editable-text }}
+<div id="{{ id }}-annotation-area" class="annotation-area" style="display: none;">
+ <strong>{{#local}}Annotation{{/local}}:</strong>
+ <div id="{{ id }}-anotation-elt" class="annotation-elt tooltip editable-text"
+ style="margin: 1px 0px 1px 0px" title="{{#local}}Edit dataset annotation{{/local}}">
+ </div>
+</div>
+</script>
+
+
+<!-- ---------------------------------------------------------------------- DISPLAY_APP LINKS -->
+<script type="text/template" class="template-hda" id="template-hda-displayApps">
+{{#each displayApps}}
+ {{label}}
+ {{#each links}}
+ <a target="{{target}}" href="{{href}}">{{#local}}{{text}}{{/local}}</a>
+ {{/each}}
+ <br />
+{{/each}}
+</script>
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/history-templates.html
--- a/static/scripts/templates/history-templates.html
+++ b/static/scripts/templates/history-templates.html
@@ -1,115 +1,11 @@
-<script type="text/template" class="template-history" id="template-history-warning-messages">
-{{#if deleted}}{{#unless purged}}
-{{#warningmessagesmall}}
- {{#local}}This dataset has been deleted.{{/local}}
- {{#if urls.undelete}}
- {{! how in the hell would you localize this? }}
- Click <a href="{{ urls.undelete }}" class="historyItemUndelete" id="historyItemUndeleter-{{ id }}"
- target="galaxy_history">here</a> to undelete it
- {{#if urls.purge}}
- or <a href="{{ urls.purge }}" class="historyItemPurge" id="historyItemPurger-{{ id }}"
- target="galaxy_history">here</a> to immediately remove it from disk
- {{/if}}
- {{/if}}
-{{/warningmessagesmall}}
-{{/unless}}{{/if}}
-
-{{#if purged}}{{#warningmessagesmall}}
- {{#local}}This dataset has been deleted and removed from disk.{{/local}}
-{{/warningmessagesmall}}{{/if}}
-
-{{#unless visible}}{{#warningmessagesmall}}
- {{#local}}This dataset has been hidden.{{/local}}
- {{#if urls.unhide}}
- Click <a href="{{ urls.unhide }}" class="historyItemUnhide" id="historyItemUnhider-{{ id }}"
- target="galaxy_history">here</a> to unhide it
- {{/if}}
-{{/warningmessagesmall}}{{/unless}}
-</script>
-
-<script type="text/template" class="template-history" id="template-history-titleLink">
-<a href="javascript:void(0);"><span class="historyItemTitle">{{ hid }}: {{ name }}</span></a>
-</script>
-
-<script type="text/template" class="template-history" id="template-history-hdaSummary">
-<div class="hda-summary">
- {{ misc_blurb }}<br />
- format: <span class="{{ data_type }}">{{ data_type }}</span>,
- database:
- {{#if dbkey_unknown_and_editable }}
- <a href="{{ urls.edit }}" target="galaxy_main">{{ metadata_dbkey }}</a>
- {{else}}
- <span class="{{ metadata_dbkey }}">{{ metadata_dbkey }}</span>
- {{/if}}
-</div>
-{{#if misc_info}}
-<div class="hda-info">{{ misc_info }}</div>
-{{/if}}
-</script>
-
-<script type="text/template" class="template-history" id="template-history-failedMetaData">
-{{#warningmessagesmall}}
-{{#local}}An error occurred setting the metadata for this dataset.{{/local}}
-You may be able to <a href="{{ urls.edit }}" target="galaxy_main">set it manually or retry auto-detection</a>.
-{{/warningmessagesmall}}
-</script>
-
-<script type="text/template" class="template-history" id="template-history-downloadLinks">
-{{#if urls.meta_download}}
-{{! this will be built using a popupmenu }}
-<div popupmenu="dataset-{{ id }}-popup">
- <a class="action-button" href="{{ urls.download }}">{{#local}}Download Dataset{{/local}}</a>
- <a>{{#local}}Additional Files{{/local}}</a>
- {{#each urls.meta_download}}
- <a class="action-button" href="{{ url }}">{{#local}}Download{{/local}} {{ file_type }}</a>
- {{/each}}
-</div>
-<div style="float:left;" class="menubutton split popup" id="dataset-{{ id }}-popup">
- <a href="{{ urls.download }}" title="{{#local}}Download{{/local}}" class="icon-button disk tooltip"></a>
-</div>
-{{else}}
-{{! otherwise a simple icon button }}
-<a href="{{ urls.download }}" title="{{#local}}Download{{/local}}" class="icon-button disk tooltip"></a>
-{{/if}}
-</script>
-
-<script type="text/template" class="template-history" id="template-history-tagArea">
-{{! TODO: move to mvc/tag.js templates }}
-<div class="tag-area" style="display: none;">
- <strong>{{#local}}Tags{{/local}}:</strong>
- <div class="tag-elt">
- </div>
-</div>
-</script>
-
-<script type="text/template" class="template-history" id="template-history-annotationArea">
-{{! TODO: move to mvc/annotations.js templates, editable-text }}
-<div id="{{ id }}-annotation-area" class="annotation-area" style="display: none;">
- <strong>{{#local}}Annotation{{/local}}:</strong>
- <div id="{{ id }}-anotation-elt" class="annotation-elt tooltip editable-text"
- style="margin: 1px 0px 1px 0px" title="{{#local}}Edit dataset annotation{{/local}}">
- </div>
-</div>
-</script>
-
-<script type="text/template" class="template-history" id="template-history-displayApps">
-{{#each displayApps}}
- {{label}}
- {{#each links}}
- <a target="{{target}}" href="{{href}}">{{#local}}{{text}}{{/local}}</a>
- {{/each}}
- <br />
-{{/each}}
-</script>
-
<!--
History panel/page - the main container for hdas (gen. on the left hand of the glx page)
--><script type="text/template" class="template-history" id="template-history-historyPanel">
-{{! history name (if any) }}
<div id="history-controls"><div id="history-title-area" class="historyLinks">
+ {{! history name (if any) }}
<div id="history-name-container" style="float: left;">
{{! TODO: factor out conditional css }}
{{#if user.email}}
diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df templates/root/alternate_history.mako
--- a/templates/root/alternate_history.mako
+++ b/templates/root/alternate_history.mako
@@ -233,27 +233,33 @@
"helpers-common-templates",
"template-warningmessagesmall",
- "template-history-warning-messages",
- "template-history-titleLink",
- "template-history-failedMetadata",
- "template-history-hdaSummary",
- "template-history-downloadLinks",
- "template-history-tagArea",
- "template-history-annotationArea",
- "template-history-displayApps",
-
"template-history-historyPanel",
+ "template-hda-warning-messages",
+ "template-hda-titleLink",
+ "template-hda-failedMetadata",
+ "template-hda-hdaSummary",
+ "template-hda-downloadLinks",
+ "template-hda-tagArea",
+ "template-hda-annotationArea",
+ "template-hda-displayApps",
+
"template-user-quotaMeter-quota",
"template-user-quotaMeter-usage"
)}
##TODO: fix: curr hasta be _after_ h.templates bc these use those templates - move somehow
${h.js(
- "mvc/dataset/hda-model", "mvc/dataset/hda-edit",
- "mvc/history/history-model", "mvc/history/history-panel",
- ##"mvc/tags", "mvc/annotations",
- "mvc/user/user-model", "mvc/user/user-quotameter"
+ "mvc/user/user-model", "mvc/user/user-quotameter",
+
+ "mvc/dataset/hda-model",
+ "mvc/dataset/hda-base",
+ "mvc/dataset/hda-edit",
+ ##"mvc/dataset/hda-readonly",
+
+ ##"mvc/tags", "mvc/annotations"
+
+ "mvc/history/history-model", "mvc/history/history-panel"
)}
<script type="text/javascript">
@@ -417,6 +423,7 @@
width: 90%;
margin: -2px 0px -3px -4px;
font-weight: bold;
+ font-size: 110%;
color: black;
}
@@ -439,6 +446,17 @@
margin: 10px 0px 10px 0px;
}
+ .historyItemTitle {
+ text-decoration: none;
+ cursor: pointer;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -khtml-user-select: none;
+ }
+ .historyItemTitle:hover {
+ text-decoration: underline;
+ }
+
</style><noscript>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
09 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/65fddffc937d/
changeset: 65fddffc937d
user: carlfeberhard
date: 2012-11-09 17:01:48
summary: (alt)history: standardize custom broadcasted events, localize all strings; base-mvc, GalaxyLocalization: add (commented-out) code to store non-localized strings that are attempting to be localized; pack scripts;
affected #: 33 files
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/mvc/base-mvc.js
--- a/static/scripts/mvc/base-mvc.js
+++ b/static/scripts/mvc/base-mvc.js
@@ -79,15 +79,17 @@
* GalaxyLocalization.setLocalizedString( original, localized )
* GalaxyLocalization.setLocalizedString({ original1 : localized1, original2 : localized2 })
* get with either:
- * _l( original )
+ * GalaxyLocalization.localize( string )
+ * _l( string )
*/
//TODO: move to Galaxy.Localization (maybe galaxy.base.js)
var GalaxyLocalization = jQuery.extend( {}, {
ALIAS_NAME : '_l',
localizedStrings : {},
-
+
+ // Set a single English string -> localized string association, or set an entire map of those associations
+ // Pass in either two strings (english, localized) or just an obj (map) of english : localized
setLocalizedString : function( str_or_obj, localizedString ){
- // pass in either two strings (english, translated) or an obj (map) of english : translated attributes
//console.debug( this + '.setLocalizedString:', str_or_obj, localizedString );
var self = this;
@@ -115,16 +117,19 @@
}
},
+ // Attempt to get a localized string for strToLocalize. If not found, return the original strToLocalize
localize : function( strToLocalize ){
//console.debug( this + '.localize:', strToLocalize );
+
+ //// uncomment this section to cache strings that need to be localized but haven't been
+ //if( !_.has( this.localizedStrings, strToLocalize ) ){
+ // //console.debug( 'localization NOT found:', strToLocalize );
+ // if( !this.nonLocalized ){ this.nonLocalized = {}; }
+ // this.nonLocalized[ strToLocalize ] = false;
+ //}
+
// return the localized version if it's there, the strToLocalize if not
- var retStr = strToLocalize;
- if( _.has( this.localizedStrings, strToLocalize ) ){
- //console.debug( 'found' );
- retStr = this.localizedStrings[ strToLocalize ];
- }
- //console.debug( 'returning:', retStr );
- return retStr;
+ return this.localizedStrings[ strToLocalize ] || strToLocalize;
},
toString : function(){ return 'GalaxyLocalization'; }
@@ -247,4 +252,3 @@
return returnedStorage;
};
-
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/mvc/dataset/hda-edit.js
--- a/static/scripts/mvc/dataset/hda-edit.js
+++ b/static/scripts/mvc/dataset/hda-edit.js
@@ -68,6 +68,7 @@
},
// ................................................................................ RENDER MAIN
+ // events: rendered, rendered:ready, rendered:initial, rendered:ready:initial
render : function(){
var view = this,
id = this.model.get( 'id' ),
@@ -101,8 +102,8 @@
view.$el.children().remove();
view.$el.append( itemWrapper ).fadeIn( 'fast', function(){
view.log( view + ' rendered:', view.$el );
+
var renderedEventName = 'rendered';
-
if( initialRender ){
renderedEventName += ':initial';
} else if( view.model.inReadyState() ){
@@ -179,10 +180,10 @@
// show a disabled display if the data's been purged
if( this.model.get( 'purged' ) ){
displayBtnData.enabled = false;
- displayBtnData.title = 'Cannot display datasets removed from disk';
+ displayBtnData.title = _l( 'Cannot display datasets removed from disk' );
} else {
- displayBtnData.title = 'Display data in browser';
+ displayBtnData.title = _l( 'Display data in browser' );
displayBtnData.href = this.urls.display;
}
@@ -208,7 +209,7 @@
var purged = this.model.get( 'purged' ),
deleted = this.model.get( 'deleted' ),
editBtnData = {
- title : 'Edit attributes',
+ title : _l( 'Edit Attributes' ),
href : this.urls.edit,
target : 'galaxy_main',
icon_class : 'edit'
@@ -219,9 +220,9 @@
if( deleted || purged ){
editBtnData.enabled = false;
if( purged ){
- editBtnData.title = 'Cannot edit attributes of datasets removed from disk';
+ editBtnData.title = _l( 'Cannot edit attributes of datasets removed from disk' );
} else if( deleted ){
- editBtnData.title = 'Undelete dataset to edit attributes';
+ editBtnData.title = _l( 'Undelete dataset to edit attributes' );
}
}
@@ -239,14 +240,14 @@
}
var deleteBtnData = {
- title : 'Delete',
+ title : _l( 'Delete' ),
href : this.urls[ 'delete' ],
id : 'historyItemDeleter-' + this.model.get( 'id' ),
icon_class : 'delete'
};
if( this.model.get( 'deleted' ) || this.model.get( 'purged' ) ){
deleteBtnData = {
- title : 'Dataset is already deleted',
+ title : _l( 'Dataset is already deleted' ),
icon_class : 'delete',
enabled : false
};
@@ -306,7 +307,7 @@
|| ( !this.model.get( 'for_editing' ) ) ){ return null; }
this.errButton = new IconButtonView({ model : new IconButton({
- title : 'View or report this error',
+ title : _l( 'View or report this error' ),
href : this.urls.report_error,
target : 'galaxy_main',
icon_class : 'bug'
@@ -318,7 +319,7 @@
_render_showParamsButton : function(){
// gen. safe to show in all cases
this.showParamsButton = new IconButtonView({ model : new IconButton({
- title : 'View details',
+ title : _l( 'View details' ),
href : this.urls.show_params,
target : 'galaxy_main',
icon_class : 'information'
@@ -330,7 +331,7 @@
_render_rerunButton : function(){
if( !this.model.get( 'for_editing' ) ){ return null; }
this.rerunButton = new IconButtonView({ model : new IconButton({
- title : 'Run this job again',
+ title : _l( 'Run this job again' ),
href : this.urls.rerun,
target : 'galaxy_main',
icon_class : 'arrow-circle'
@@ -360,7 +361,7 @@
// render the icon from template
this.visualizationsButton = new IconButtonView({ model : new IconButton({
- title : 'Visualize',
+ title : _l( 'Visualize' ),
href : visualization_url,
icon_class : 'chart_curve'
})});
@@ -395,7 +396,7 @@
_.each( visualizations, function( visualization ) {
//TODO: move to utils
var titleCaseVisualization = visualization.charAt( 0 ).toUpperCase() + visualization.slice( 1 );
- popup_menu_dict[ titleCaseVisualization ] = create_viz_action( visualization );
+ popup_menu_dict[ _l( titleCaseVisualization ) ] = create_viz_action( visualization );
});
make_popupmenu( $icon, popup_menu_dict );
}
@@ -426,7 +427,7 @@
|| ( !this.urls.tags.get ) ){ return null; }
this.tagButton = new IconButtonView({ model : new IconButton({
- title : 'Edit dataset tags',
+ title : _l( 'Edit dataset tags' ),
target : 'galaxy_main',
href : this.urls.tags.get,
icon_class : 'tags'
@@ -442,7 +443,7 @@
|| ( !this.urls.annotation.get ) ){ return null; }
this.annotateButton = new IconButtonView({ model : new IconButton({
- title : 'Edit dataset annotation',
+ title : _l( 'Edit dataset annotation' ),
target : 'galaxy_main',
icon_class : 'annotate'
})});
@@ -509,15 +510,15 @@
//TODO: only render these on expansion (or already expanded)
_render_body_not_viewable : function( parent ){
//TODO: revisit - still showing display, edit, delete (as common) - that CAN'T be right
- parent.append( $( '<div>You do not have permission to view dataset.</div>' ) );
+ parent.append( $( '<div>' + _l( 'You do not have permission to view dataset' ) + '.</div>' ) );
},
_render_body_uploading : function( parent ){
- parent.append( $( '<div>Dataset is uploading</div>' ) );
+ parent.append( $( '<div>' + _l( 'Dataset is uploading' ) + '</div>' ) );
},
_render_body_queued : function( parent ){
- parent.append( $( '<div>Job is waiting to run.</div>' ) );
+ parent.append( $( '<div>' + _l( 'Job is waiting to run' ) + '.</div>' ) );
parent.append( this._render_primaryActionButtons([
this._render_showParamsButton,
this._render_rerunButton
@@ -525,7 +526,7 @@
},
_render_body_running : function( parent ){
- parent.append( '<div>Job is currently running.</div>' );
+ parent.append( '<div>' + _l( 'Job is currently running' ) + '.</div>' );
parent.append( this._render_primaryActionButtons([
this._render_showParamsButton,
this._render_rerunButton
@@ -536,7 +537,7 @@
if( !this.model.get( 'purged' ) ){
parent.append( $( '<div>' + this.model.get( 'misc_blurb' ) + '</div>' ) );
}
- parent.append( ( 'An error occurred running this job: '
+ parent.append( ( _l( 'An error occurred running this job' ) + ': '
+ '<i>' + $.trim( this.model.get( 'misc_info' ) ) + '</i>' ) );
parent.append( this._render_primaryActionButtons([
this._render_downloadButton,
@@ -547,7 +548,7 @@
},
_render_body_discarded : function( parent ){
- parent.append( '<div>The job creating this dataset was cancelled before completion.</div>' );
+ parent.append( '<div>' + _l( 'The job creating this dataset was cancelled before completion' ) + '.</div>' );
parent.append( this._render_primaryActionButtons([
this._render_showParamsButton,
this._render_rerunButton
@@ -555,13 +556,13 @@
},
_render_body_setting_metadata : function( parent ){
- parent.append( $( '<div>Metadata is being auto-detected.</div>' ) );
+ parent.append( $( '<div>' + _l( 'Metadata is being auto-detected' ) + '.</div>' ) );
},
_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>No data: <i>' + this.model.get( 'misc_blurb' ) + '</i></div>' ) );
+ parent.append( $( '<div>' + _l( 'No data' ) + ': <i>' + this.model.get( 'misc_blurb' ) + '</i></div>' ) );
parent.append( this._render_primaryActionButtons([
this._render_showParamsButton,
this._render_rerunButton
@@ -700,7 +701,7 @@
$.ajax({
//TODO: the html from this breaks a couple of times
url: this.urls.tags.get,
- error: function() { alert( "Tagging failed" ); },
+ error: function() { alert( _l( "Tagging failed" ) ); },
success: function(tag_elt_html) {
tagElt.html(tag_elt_html);
tagElt.find(".tooltip").tooltip();
@@ -733,10 +734,10 @@
// Need to fill annotation element.
$.ajax({
url: this.urls.annotation.get,
- error: function(){ alert( "Annotations failed" ); },
+ error: function(){ alert( _l( "Annotations failed" ) ); },
success: function( htmlFromAjax ){
if( htmlFromAjax === "" ){
- htmlFromAjax = "<em>Describe or add notes to dataset</em>";
+ htmlFromAjax = "<em>" + _l( "Describe or add notes to dataset" ) + "</em>";
}
annotationElem.html( htmlFromAjax );
annotationArea.find(".tooltip").tooltip();
@@ -761,18 +762,22 @@
},
// expand/collapse body
- //side effect: trigger event
+ // event: body-visible, body-hidden
toggleBodyVisibility : function( event, expanded ){
- var $body = this.$el.find( '.historyItemBody' );
+ var hdaView = this,
+ $body = this.$el.find( '.historyItemBody' );
expanded = ( expanded === undefined )?( !$body.is( ':visible' ) ):( expanded );
//this.log( 'toggleBodyVisibility, expanded:', expanded, '$body:', $body );
if( expanded ){
- $body.slideDown( 'fast' );
+ $body.slideDown( 'fast', function(){
+ hdaView.trigger( 'body-visible', hdaView.model.get( 'id' ) );
+ });
} else {
- $body.slideUp( 'fast' );
+ $body.slideUp( 'fast', function(){
+ hdaView.trigger( 'body-hidden', hdaView.model.get( 'id' ) );
+ });
}
- this.trigger( 'toggleBodyVisibility', this.model.get( 'id' ), expanded );
},
// ................................................................................ UTILTIY
@@ -823,17 +828,17 @@
$.ajax({
url: vis_url + '/list_tracks?f-' + $.param(params),
dataType: "html",
- error: function() { alert( "Could not add this dataset to browser." ); },
+ error: function() { alert( _l( "Could not add this dataset to browser" ) + '.' ); },
success: function(table_html) {
var parent = window.parent;
- parent.show_modal("View Data in a New or Saved Visualization", "", {
+ parent.show_modal( _l( "View Data in a New or Saved Visualization" ), "", {
"Cancel": function() {
parent.hide_modal();
},
"View in saved visualization": function() {
// Show new modal with saved visualizations.
- parent.show_modal("Add Data to Saved Visualization", table_html, {
+ parent.show_modal( _l( "Add Data to Saved Visualization" ), table_html, {
"Cancel": function() {
parent.hide_modal();
},
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/mvc/history/history-model.js
--- a/static/scripts/mvc/history/history-model.js
+++ b/static/scripts/mvc/history/history-model.js
@@ -9,7 +9,7 @@
//TODO: bind change events from items and collection to this (itemLengths, states)
// uncomment this out see log messages
- logger : console,
+ //logger : console,
// values from api (may need more)
defaults : {
@@ -47,14 +47,15 @@
//this.on( 'change', function( currModel, changedList ){
// this.log( this + ' has changed:', currModel, changedList );
//});
- this.bind( 'all', function( event ){
- //this.log( this + '', arguments );
- console.info( this + '', arguments );
- });
+ //this.bind( 'all', function( event ){
+ // //this.log( this + '', arguments );
+ // console.info( this + '', arguments );
+ //});
},
// get data via the api (alternative to sending options,hdas to initialize)
//TODO: this needs work - move to more straightforward deferred
+ // events: loaded, loaded:user, loaded:hdas
loadFromApi : function( historyId, success ){
var history = this;
@@ -66,11 +67,12 @@
history.fetch()
).then( function( userResponse, historyResponse ){
- console.warn( 'fetched user: ', userResponse[0] );
- console.warn( 'fetched history: ', historyResponse[0] );
+ //console.warn( 'fetched user: ', userResponse[0] );
+ //console.warn( 'fetched history: ', historyResponse[0] );
history.attributes.user = userResponse[0]; //? meh.
- history.trigger( 'loaded', historyResponse );
- history.log( history );
+
+ history.trigger( 'loaded:user', userResponse[0] );
+ history.trigger( 'loaded', historyResponse[0] );
}).then( function(){
// ...then the hdas (using contents?ids=...)
@@ -82,6 +84,7 @@
//console.warn( 'fetched hdas', hdas );
history.hdas.reset( hdas );
history.checkForUpdates();
+
history.trigger( 'loaded:hdas', hdas );
if( success ){ callback( history ); }
});
@@ -98,17 +101,22 @@
},
// get the history's state from it's cummulative ds states, delay + update if needed
+ // events: ready
checkForUpdates : function( datasets ){
// get overall History state from collection, run updater if History has running/queued hdas
// boiling it down on the client to running/not
if( this.hdas.running().length ){
this.stateUpdater();
+
+ } else {
+ this.trigger( 'ready' );
}
return this;
},
// 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
stateUpdater : function(){
var history = this,
oldState = this.get( 'state' ),
@@ -148,13 +156,17 @@
setTimeout( function(){
history.stateUpdater();
}, 4000 );
+
+ // otherwise, we're now in a 'ready' state (no hdas running)
+ } else {
+ history.trigger( 'ready' );
}
}).error( function( xhr, status, error ){
if( console && console.warn ){
console.warn( 'Error getting history updates from the server:', xhr, status, error );
}
- alert( 'Error getting history updates from the server.\n' + error );
+ alert( _l( 'Error getting history updates from the server.' ) + '\n' + error );
});
},
@@ -172,7 +184,7 @@
var HistoryCollection = Backbone.Collection.extend( LoggableMixin ).extend({
model : History,
urlRoot : 'api/histories',
- logger : console
+ //logger : console
});
//==============================================================================
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/mvc/history/history-panel.js
--- a/static/scripts/mvc/history/history-panel.js
+++ b/static/scripts/mvc/history/history-panel.js
@@ -7,14 +7,15 @@
TODO:
anon user, mako template init:
bug: rename url seems to be wrong url
-
BUG: shouldn't have tag/anno buttons (on hdas)
+ Check for user in hdaView somehow
logged in, mako template:
+ BUG: quotaMsg not showing when 100% (on load)
+ bug: rename not being changed locally - render() shows old name, refresh: new name
BUG: meter is not updating RELIABLY on change:nice_size
BUG: am able to start upload even if over quota - 'runs' forever
bug: quotaMeter bar rendering square in chrome
- BUG: quotaMsg not showing when 100% (on load)
BUG: imported, shared history with unaccessible dataset errs in historycontents when getting history
(entire history is inaccessible)
??: still happening?
@@ -199,6 +200,7 @@
},
// render urls, historyView body, and hdas (if any are shown), fade out, swap, fade in, set up behaviours
+ // events: rendered, rendered:initial
render : function(){
var historyView = this,
setUpQueueName = historyView.toString() + '.set-up',
@@ -298,7 +300,6 @@
// set up HistoryView->HDAView listeners
setUpHdaListeners : function( hdaView ){
var historyView = this;
-
// use storage to maintain a list of hdas whose bodies are expanded
hdaView.bind( 'toggleBodyVisibility', function( id, visible ){
if( visible ){
@@ -307,9 +308,6 @@
historyView.storage.get( 'expandedHdas' ).deleteKey( id );
}
});
-
- // rendering listeners
- hdaView.bind( 'rendered:ready', function(){ historyView.trigger( 'hda:rendered:ready' ); });
},
// set up js/widget behaviours: tooltips,
@@ -336,8 +334,6 @@
async_save_text( "history-annotation-container", "history-annotation",
this.urls.annotate, "new_annotation", 18, true, 4 );
-
- //this.$( 'button' ).button();
},
// update the history size display (curr. upper right of panel)
@@ -397,7 +393,7 @@
$.ajax({
//TODO: the html from this breaks a couple of times
url: view.urls.tag,
- error: function() { alert( "Tagging failed" ); },
+ error: function() { alert( _l( "Tagging failed" ) ); },
success: function(tag_elt_html) {
//view.log( view + ' tag elt html (ajax)', tag_elt_html );
tagElt.html(tag_elt_html);
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/mvc/user/user-model.js
--- a/static/scripts/mvc/user/user-model.js
+++ b/static/scripts/mvc/user/user-model.js
@@ -1,9 +1,10 @@
var User = BaseModel.extend( LoggableMixin ).extend({
//logger : console,
+ urlRoot : 'api/users',
defaults : {
id : null,
- username : "(anonymous user)",
+ username : '(' + _l( "anonymous user" ) + ')',
email : "",
total_disk_usage : 0,
nice_total_disk_usage : "0 bytes"
@@ -16,7 +17,7 @@
this.on( 'change', function( model, data ){ this.log( this + ' has changed:', model, data.changes ); });
},
- urlRoot : 'api/users',
+ // events: loaded
loadFromApi : function( idOrCurrent, options ){
idOrCurrent = idOrCurrent || User.CURRENT_ID_STR;
options = options || {};
@@ -26,6 +27,8 @@
model.trigger( 'loaded', newModel, response );
if( userFn ){ userFn( newModel, response ); }
};
+
+ // requests for the current user must have a sep. constructed url (fetch don't work, ma)
if( idOrCurrent === User.CURRENT_ID_STR ){
options.url = this.urlRoot + '/' + User.CURRENT_ID_STR;
}
@@ -55,6 +58,6 @@
// (stub) collection for users (shouldn't be common unless admin UI)
var UserCollection = Backbone.Collection.extend( LoggableMixin ).extend({
model : User,
- logger : console,
urlRoot : 'api/users'
+ //logger : console,
});
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/mvc/user/user-quotameter.js
--- a/static/scripts/mvc/user/user-quotameter.js
+++ b/static/scripts/mvc/user/user-quotameter.js
@@ -9,31 +9,11 @@
options : {
warnAtPercent : 85,
- errorAtPercent : 100,
-
- // the quota/usage bar is in the masthead
- meterDocument : window.top.document,
- containerSelector : '.quota-meter-container',
- meterSelector : '#quota-meter',
- barSelector : '#quota-meter-bar',
- textSelector : '#quota-meter-text',
-
- // the quota message currently displays in the history panel
- msgDocument : ( top.frames.galaxy_history )?( top.frames.galaxy_history.document )
- :( top.document ),
- msgSelector : '#quota-message-container',
-
- warnClass : 'quota-meter-bar-warn',
- errorClass : 'quota-meter-bar-error',
- usageTemplate : 'Using <%= nice_total_disk_usage %>',
- quotaTemplate : 'Using <%= quota_percent %>%',
- meterTemplate : '', // see where I'm going?
- animationSpeed : 'fast'
+ errorAtPercent : 100
},
initialize : function( options ){
this.log( this + '.initialize:', options );
-
_.extend( this.options, options );
//this.bind( 'all', function( event, data ){ this.log( this + ' event:', event, data ); }, this );
@@ -51,6 +31,7 @@
&& this.model.get( 'quota_percent' ) >= this.options.errorAtPercent );
},
+ // events: quota:over, quota:under, quota:under:approaching, quota:under:ok
_render_quota : function(){
var modelJson = this.model.toJSON(),
//prevPercent = this.model.previous( 'quota_percent' ),
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/mvc/base-mvc.js
--- a/static/scripts/packed/mvc/base-mvc.js
+++ b/static/scripts/packed/mvc/base-mvc.js
@@ -1,1 +1,1 @@
-var BaseModel=Backbone.RelationalModel.extend({defaults:{name:null,hidden:false},show:function(){this.set("hidden",false)},hide:function(){this.set("hidden",true)},is_visible:function(){return !this.attributes.hidden}});var BaseView=Backbone.View.extend({initialize:function(){this.model.on("change:hidden",this.update_visible,this);this.update_visible()},update_visible:function(){if(this.model.attributes.hidden){this.$el.hide()}else{this.$el.show()}}});var LoggableMixin={logger:null,log:function(){if(this.logger){return this.logger.log.apply(this.logger,arguments)}return undefined}};var GalaxyLocalization=jQuery.extend({},{ALIAS_NAME:"_l",localizedStrings:{},setLocalizedString:function(b,a){var c=this;var d=function(f,e){if(f!==e){c.localizedStrings[f]=e}};if(jQuery.type(b)==="string"){d(b,a)}else{if(jQuery.type(b)==="object"){jQuery.each(b,function(e,f){d(e,f)})}else{throw ("Localization.setLocalizedString needs either a string or object as the first argument, given: "+b)}}},localize:function(b){var a=b;if(_.has(this.localizedStrings,b)){a=this.localizedStrings[b]}return a},toString:function(){return"GalaxyLocalization"}});window[GalaxyLocalization.ALIAS_NAME]=function(a){return GalaxyLocalization.localize(a)};var PersistantStorage=function(g,d){if(!g){throw ("PersistantStorage needs storageKey argument")}d=d||{};var b=jQuery.jStorage.get,c=jQuery.jStorage.set,a=jQuery.jStorage.deleteKey;var e=function(i,h){i=i||{};h=h||null;return{get:function(j){if(j===undefined){return i}else{if(i.hasOwnProperty(j)){return(jQuery.type(i[j])==="object")?(new e(i[j],this)):(i[j])}}return undefined},set:function(j,k){i[j]=k;this.save();return this},deleteKey:function(j){delete i[j];this.save();return this},save:function(){return h.save()},toString:function(){return("StorageRecursionHelper("+i+")")}}};var f={};data=b(g);if(data===null){data=jQuery.extend(true,{},d);c(g,data)}f=new e(data);f.save=function(h){c(g,f.get())};f.destroy=function(){a(g)};f.toString=function(){return"PersistantStorage("+data+")"};return f};
\ No newline at end of file
+var BaseModel=Backbone.RelationalModel.extend({defaults:{name:null,hidden:false},show:function(){this.set("hidden",false)},hide:function(){this.set("hidden",true)},is_visible:function(){return !this.attributes.hidden}});var BaseView=Backbone.View.extend({initialize:function(){this.model.on("change:hidden",this.update_visible,this);this.update_visible()},update_visible:function(){if(this.model.attributes.hidden){this.$el.hide()}else{this.$el.show()}}});var LoggableMixin={logger:null,log:function(){if(this.logger){return this.logger.log.apply(this.logger,arguments)}return undefined}};var GalaxyLocalization=jQuery.extend({},{ALIAS_NAME:"_l",localizedStrings:{},setLocalizedString:function(b,a){var c=this;var d=function(f,e){if(f!==e){c.localizedStrings[f]=e}};if(jQuery.type(b)==="string"){d(b,a)}else{if(jQuery.type(b)==="object"){jQuery.each(b,function(e,f){d(e,f)})}else{throw ("Localization.setLocalizedString needs either a string or object as the first argument, given: "+b)}}},localize:function(a){return this.localizedStrings[a]||a},toString:function(){return"GalaxyLocalization"}});window[GalaxyLocalization.ALIAS_NAME]=function(a){return GalaxyLocalization.localize(a)};var PersistantStorage=function(g,d){if(!g){throw ("PersistantStorage needs storageKey argument")}d=d||{};var b=jQuery.jStorage.get,c=jQuery.jStorage.set,a=jQuery.jStorage.deleteKey;var e=function(i,h){i=i||{};h=h||null;return{get:function(j){if(j===undefined){return i}else{if(i.hasOwnProperty(j)){return(jQuery.type(i[j])==="object")?(new e(i[j],this)):(i[j])}}return undefined},set:function(j,k){i[j]=k;this.save();return this},deleteKey:function(j){delete i[j];this.save();return this},save:function(){return h.save()},toString:function(){return("StorageRecursionHelper("+i+")")}}};var f={};data=b(g);if(data===null){data=jQuery.extend(true,{},d);c(g,data)}f=new e(data);f.save=function(h){c(g,f.get())};f.destroy=function(){a(g)};f.toString=function(){return"PersistantStorage("+data+")"};return f};
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/mvc/dataset/hda-edit.js
--- a/static/scripts/packed/mvc/dataset/hda-edit.js
+++ b/static/scripts/packed/mvc/dataset/hda-edit.js
@@ -1,1 +1,1 @@
-var HDAView=BaseView.extend(LoggableMixin).extend({tagName:"div",className:"historyItemContainer",initialize:function(a){this.log(this+".initialize:",a);if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}this.urls=this.renderUrls(a.urlTemplates,this.model.toJSON());this.expanded=a.expanded||false;this.model.bind("change",this.render,this)},renderUrls:function(d,a){var b=this,c={};_.each(d,function(e,f){if(_.isObject(e)){c[f]=b.renderUrls(e,a)}else{if(f==="meta_download"){c[f]=b.renderMetaDownloadUrls(e,a)}else{c[f]=_.template(e,a)}}});return c},renderMetaDownloadUrls:function(b,a){return _.map(a.meta_files,function(c){return{url:_.template(b,{id:a.id,file_type:c.file_type}),file_type:c.file_type}})},render:function(){var b=this,e=this.model.get("id"),c=this.model.get("state"),a=$("<div/>").attr("id","historyItem-"+e),d=(this.$el.children().size()===0);this._clearReferences();this.$el.attr("id","historyItemContainer-"+e);a.addClass("historyItemWrapper").addClass("historyItem").addClass("historyItem-"+c);a.append(this._render_warnings());a.append(this._render_titleBar());this.body=$(this._render_body());a.append(this.body);make_popup_menus(a);a.find(".tooltip").tooltip({placement:"bottom"});this.$el.fadeOut("fast",function(){b.$el.children().remove();b.$el.append(a).fadeIn("fast",function(){b.log(b+" rendered:",b.$el);var f="rendered";if(d){f+=":initial"}else{if(b.model.inReadyState()){f+=":ready"}}b.trigger(f)})});return this},_clearReferences:function(){this.displayButton=null;this.editButton=null;this.deleteButton=null;this.errButton=null;this.showParamsButton=null;this.rerunButton=null;this.visualizationsButton=null;this.tagButton=null;this.annotateButton=null},_render_warnings:function(){return $(jQuery.trim(HDAView.templates.messages(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_titleBar:function(){var a=$('<div class="historyItemTitleBar" style="overflow: hidden"></div>');a.append(this._render_titleButtons());a.append('<span class="state-icon"></span>');a.append(this._render_titleLink());return a},_render_titleButtons:function(){var a=$('<div class="historyItemButtons"></div>');a.append(this._render_displayButton());a.append(this._render_editButton());a.append(this._render_deleteButton());return a},_render_displayButton:function(){if((!this.model.inReadyState())||(this.model.get("state")===HistoryDatasetAssociation.STATES.ERROR)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var a={icon_class:"display"};if(this.model.get("purged")){a.enabled=false;a.title="Cannot display datasets removed from disk"}else{a.title="Display data in browser";a.href=this.urls.display}if(this.model.get("for_editing")){a.target="galaxy_main"}this.displayButton=new IconButtonView({model:new IconButton(a)});return this.displayButton.render().$el},_render_editButton:function(){if((this.model.get("state")===HistoryDatasetAssociation.STATES.UPLOAD)||(this.model.get("state")===HistoryDatasetAssociation.STATES.ERROR)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))||(!this.model.get("for_editing"))){return null}var c=this.model.get("purged"),a=this.model.get("deleted"),b={title:"Edit attributes",href:this.urls.edit,target:"galaxy_main",icon_class:"edit"};if(a||c){b.enabled=false;if(c){b.title="Cannot edit attributes of datasets removed from disk"}else{if(a){b.title="Undelete dataset to edit attributes"}}}this.editButton=new IconButtonView({model:new IconButton(b)});return this.editButton.render().$el},_render_deleteButton:function(){if((!this.model.get("for_editing"))||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var a={title:"Delete",href:this.urls["delete"],id:"historyItemDeleter-"+this.model.get("id"),icon_class:"delete"};if(this.model.get("deleted")||this.model.get("purged")){a={title:"Dataset is already deleted",icon_class:"delete",enabled:false}}this.deleteButton=new IconButtonView({model:new IconButton(a)});return this.deleteButton.render().$el},_render_titleLink:function(){return $(jQuery.trim(HDAView.templates.titleLink(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_hdaSummary:function(){var a=_.extend(this.model.toJSON(),{urls:this.urls});if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){_.extend(a,{dbkey_unknown_and_editable:true})}return HDAView.templates.hdaSummary(a)},_render_primaryActionButtons:function(c){var b=$("<div/>").attr("id","primary-actions-"+this.model.get("id")),a=this;_.each(c,function(d){b.append(d.call(a))});return b},_render_downloadButton:function(){if(this.model.get("purged")){return null}var a=HDAView.templates.downloadLinks(_.extend(this.model.toJSON(),{urls:this.urls}));return $(a)},_render_errButton:function(){if((this.model.get("state")!==HistoryDatasetAssociation.STATES.ERROR)||(!this.model.get("for_editing"))){return null}this.errButton=new IconButtonView({model:new IconButton({title:"View or report this error",href:this.urls.report_error,target:"galaxy_main",icon_class:"bug"})});return this.errButton.render().$el},_render_showParamsButton:function(){this.showParamsButton=new IconButtonView({model:new IconButton({title:"View details",href:this.urls.show_params,target:"galaxy_main",icon_class:"information"})});return this.showParamsButton.render().$el},_render_rerunButton:function(){if(!this.model.get("for_editing")){return null}this.rerunButton=new IconButtonView({model:new IconButton({title:"Run this job again",href:this.urls.rerun,target:"galaxy_main",icon_class:"arrow-circle"})});return this.rerunButton.render().$el},_render_visualizationsButton:function(){var c=this.model.get("dbkey"),a=this.model.get("visualizations"),f=this.urls.visualization,d={},g={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(!(this.model.hasData())||!(this.model.get("for_editing"))||!(a&&a.length)||!(f)){return null}this.visualizationsButton=new IconButtonView({model:new IconButton({title:"Visualize",href:f,icon_class:"chart_curve"})});var b=this.visualizationsButton.render().$el;b.addClass("visualize-icon");if(c){g.dbkey=c}function e(h){switch(h){case"trackster":return create_trackster_action_fn(f,g,c);case"scatterplot":return create_scatterplot_action_fn(f,g);default:return function(){window.parent.location=f+"/"+h+"?"+$.param(g)}}}if(a.length===1){b.attr("title",a[0]);b.click(e(a[0]))}else{_.each(a,function(i){var h=i.charAt(0).toUpperCase()+i.slice(1);d[h]=e(i)});make_popupmenu(b,d)}return b},_render_secondaryActionButtons:function(b){var c=$("<div/>"),a=this;c.attr("style","float: right;").attr("id","secondary-actions-"+this.model.get("id"));_.each(b,function(d){c.append(d.call(a))});return c},_render_tagButton:function(){if(!(this.model.hasData())||!(this.model.get("for_editing"))||(!this.urls.tags.get)){return null}this.tagButton=new IconButtonView({model:new IconButton({title:"Edit dataset tags",target:"galaxy_main",href:this.urls.tags.get,icon_class:"tags"})});return this.tagButton.render().$el},_render_annotateButton:function(){if(!(this.model.hasData())||!(this.model.get("for_editing"))||(!this.urls.annotation.get)){return null}this.annotateButton=new IconButtonView({model:new IconButton({title:"Edit dataset annotation",target:"galaxy_main",icon_class:"annotate"})});return this.annotateButton.render().$el},_render_displayApps:function(){if(!this.model.hasData()){return null}var a=$("<div/>").addClass("display-apps");if(!_.isEmpty(this.model.get("display_types"))){a.append(HDAView.templates.displayApps({displayApps:this.model.get("display_types")}))}if(!_.isEmpty(this.model.get("display_apps"))){a.append(HDAView.templates.displayApps({displayApps:this.model.get("display_apps")}))}return a},_render_tagArea:function(){if(!this.urls.tags.set){return null}return $(HDAView.templates.tagArea(_.extend(this.model.toJSON(),{urls:this.urls})))},_render_annotationArea:function(){if(!this.urls.annotation.get){return null}return $(HDAView.templates.annotationArea(_.extend(this.model.toJSON(),{urls:this.urls})))},_render_peek:function(){if(!this.model.get("peek")){return null}return $("<div/>").append($("<pre/>").attr("id","peek"+this.model.get("id")).addClass("peek").append(this.model.get("peek")))},_render_body_not_viewable:function(a){a.append($("<div>You do not have permission to view dataset.</div>"))},_render_body_uploading:function(a){a.append($("<div>Dataset is uploading</div>"))},_render_body_queued:function(a){a.append($("<div>Job is waiting to run.</div>"));a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_running:function(a){a.append("<div>Job is currently running.</div>");a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_error:function(a){if(!this.model.get("purged")){a.append($("<div>"+this.model.get("misc_blurb")+"</div>"))}a.append(("An error occurred running this job: <i>"+$.trim(this.model.get("misc_info"))+"</i>"));a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_errButton,this._render_showParamsButton,this._render_rerunButton]))},_render_body_discarded:function(a){a.append("<div>The job creating this dataset was cancelled before completion.</div>");a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_setting_metadata:function(a){a.append($("<div>Metadata is being auto-detected.</div>"))},_render_body_empty:function(a){a.append($("<div>No data: <i>"+this.model.get("misc_blurb")+"</i></div>"));a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_failed_metadata:function(a){a.append($(HDAView.templates.failedMetadata(this.model.toJSON())));this._render_body_ok(a)},_render_body_ok:function(a){a.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton,this._render_rerunButton]));return}a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_errButton,this._render_showParamsButton,this._render_rerunButton,this._render_visualizationsButton]));a.append(this._render_secondaryActionButtons([this._render_tagButton,this._render_annotateButton]));a.append('<div class="clear"/>');a.append(this._render_tagArea());a.append(this._render_annotationArea());a.append(this._render_displayApps());a.append(this._render_peek())},_render_body:function(){var a=$("<div/>").attr("id","info-"+this.model.get("id")).addClass("historyItemBody").attr("style","display: block");switch(this.model.get("state")){case HistoryDatasetAssociation.STATES.NOT_VIEWABLE:this._render_body_not_viewable(a);break;case HistoryDatasetAssociation.STATES.UPLOAD:this._render_body_uploading(a);break;case HistoryDatasetAssociation.STATES.QUEUED:this._render_body_queued(a);break;case HistoryDatasetAssociation.STATES.RUNNING:this._render_body_running(a);break;case HistoryDatasetAssociation.STATES.ERROR:this._render_body_error(a);break;case HistoryDatasetAssociation.STATES.DISCARDED:this._render_body_discarded(a);break;case HistoryDatasetAssociation.STATES.SETTING_METADATA:this._render_body_setting_metadata(a);break;case HistoryDatasetAssociation.STATES.EMPTY:this._render_body_empty(a);break;case HistoryDatasetAssociation.STATES.FAILED_METADATA:this._render_body_failed_metadata(a);break;case HistoryDatasetAssociation.STATES.OK:this._render_body_ok(a);break;default:a.append($('<div>Error: unknown dataset state "'+state+'".</div>'))}a.append('<div style="clear: both"></div>');if(this.expanded){a.show()}else{a.hide()}return a},events:{"click .historyItemTitle":"toggleBodyVisibility","click a.icon-button.tags":"loadAndDisplayTags","click a.icon-button.annotate":"loadAndDisplayAnnotation"},loadAndDisplayTags:function(b){this.log(this+".loadAndDisplayTags",b);var c=this.$el.find(".tag-area"),a=c.find(".tag-elt");if(c.is(":hidden")){if(!jQuery.trim(a.html())){$.ajax({url:this.urls.tags.get,error:function(){alert("Tagging failed")},success:function(d){a.html(d);a.find(".tooltip").tooltip();c.slideDown("fast")}})}else{c.slideDown("fast")}}else{c.slideUp("fast")}return false},loadAndDisplayAnnotation:function(b){this.log(this+".loadAndDisplayAnnotation",b);var d=this.$el.find(".annotation-area"),c=d.find(".annotation-elt"),a=this.urls.annotation.set;if(d.is(":hidden")){if(!jQuery.trim(c.html())){$.ajax({url:this.urls.annotation.get,error:function(){alert("Annotations failed")},success:function(e){if(e===""){e="<em>Describe or add notes to dataset</em>"}c.html(e);d.find(".tooltip").tooltip();async_save_text(c.attr("id"),c.attr("id"),a,"new_annotation",18,true,4);d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toggleBodyVisibility:function(b,a){var c=this.$el.find(".historyItemBody");a=(a===undefined)?(!c.is(":visible")):(a);if(a){c.slideDown("fast")}else{c.slideUp("fast")}this.trigger("toggleBodyVisibility",this.model.get("id"),a)},toString:function(){var a=(this.model)?(this.model+""):("(no model)");return"HDAView("+a+")"}});HDAView.templates={warningMsg:Handlebars.templates["template-warningmessagesmall"],messages:Handlebars.templates["template-history-warning-messages"],titleLink:Handlebars.templates["template-history-titleLink"],hdaSummary:Handlebars.templates["template-history-hdaSummary"],downloadLinks:Handlebars.templates["template-history-downloadLinks"],failedMetadata:Handlebars.templates["template-history-failedMetaData"],tagArea:Handlebars.templates["template-history-tagArea"],annotationArea:Handlebars.templates["template-history-annotationArea"],displayApps:Handlebars.templates["template-history-displayApps"]};function create_scatterplot_action_fn(a,b){action=function(){var d=$(window.parent.document).find("iframe#galaxy_main"),c=a+"/scatterplot?"+$.param(b);d.attr("src",c);$("div.popmenu-wrapper").remove();return false};return action}function create_trackster_action_fn(a,c,b){return function(){var d={};if(b){d.dbkey=b}$.ajax({url:a+"/list_tracks?f-"+$.param(d),dataType:"html",error:function(){alert("Could not add this dataset to browser.")},success:function(e){var f=window.parent;f.show_modal("View Data in a New or Saved Visualization","",{Cancel:function(){f.hide_modal()},"View in saved visualization":function(){f.show_modal("Add Data to Saved Visualization",e,{Cancel:function(){f.hide_modal()},"Add to visualization":function(){$(f.document).find("input[name=id]:checked").each(function(){var g=$(this).val();c.id=g;f.location=a+"/trackster?"+$.param(c)})}})},"View in new visualization":function(){f.location=a+"/trackster?"+$.param(c)}})}});return false}};
\ No newline at end of file
+var HDAView=BaseView.extend(LoggableMixin).extend({tagName:"div",className:"historyItemContainer",initialize:function(a){this.log(this+".initialize:",a);if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}this.urls=this.renderUrls(a.urlTemplates,this.model.toJSON());this.expanded=a.expanded||false;this.model.bind("change",this.render,this)},renderUrls:function(d,a){var b=this,c={};_.each(d,function(e,f){if(_.isObject(e)){c[f]=b.renderUrls(e,a)}else{if(f==="meta_download"){c[f]=b.renderMetaDownloadUrls(e,a)}else{c[f]=_.template(e,a)}}});return c},renderMetaDownloadUrls:function(b,a){return _.map(a.meta_files,function(c){return{url:_.template(b,{id:a.id,file_type:c.file_type}),file_type:c.file_type}})},render:function(){var b=this,e=this.model.get("id"),c=this.model.get("state"),a=$("<div/>").attr("id","historyItem-"+e),d=(this.$el.children().size()===0);this._clearReferences();this.$el.attr("id","historyItemContainer-"+e);a.addClass("historyItemWrapper").addClass("historyItem").addClass("historyItem-"+c);a.append(this._render_warnings());a.append(this._render_titleBar());this.body=$(this._render_body());a.append(this.body);make_popup_menus(a);a.find(".tooltip").tooltip({placement:"bottom"});this.$el.fadeOut("fast",function(){b.$el.children().remove();b.$el.append(a).fadeIn("fast",function(){b.log(b+" rendered:",b.$el);var f="rendered";if(d){f+=":initial"}else{if(b.model.inReadyState()){f+=":ready"}}b.trigger(f)})});return this},_clearReferences:function(){this.displayButton=null;this.editButton=null;this.deleteButton=null;this.errButton=null;this.showParamsButton=null;this.rerunButton=null;this.visualizationsButton=null;this.tagButton=null;this.annotateButton=null},_render_warnings:function(){return $(jQuery.trim(HDAView.templates.messages(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_titleBar:function(){var a=$('<div class="historyItemTitleBar" style="overflow: hidden"></div>');a.append(this._render_titleButtons());a.append('<span class="state-icon"></span>');a.append(this._render_titleLink());return a},_render_titleButtons:function(){var a=$('<div class="historyItemButtons"></div>');a.append(this._render_displayButton());a.append(this._render_editButton());a.append(this._render_deleteButton());return a},_render_displayButton:function(){if((!this.model.inReadyState())||(this.model.get("state")===HistoryDatasetAssociation.STATES.ERROR)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var a={icon_class:"display"};if(this.model.get("purged")){a.enabled=false;a.title=_l("Cannot display datasets removed from disk")}else{a.title=_l("Display data in browser");a.href=this.urls.display}if(this.model.get("for_editing")){a.target="galaxy_main"}this.displayButton=new IconButtonView({model:new IconButton(a)});return this.displayButton.render().$el},_render_editButton:function(){if((this.model.get("state")===HistoryDatasetAssociation.STATES.UPLOAD)||(this.model.get("state")===HistoryDatasetAssociation.STATES.ERROR)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))||(!this.model.get("for_editing"))){return null}var c=this.model.get("purged"),a=this.model.get("deleted"),b={title:_l("Edit Attributes"),href:this.urls.edit,target:"galaxy_main",icon_class:"edit"};if(a||c){b.enabled=false;if(c){b.title=_l("Cannot edit attributes of datasets removed from disk")}else{if(a){b.title=_l("Undelete dataset to edit attributes")}}}this.editButton=new IconButtonView({model:new IconButton(b)});return this.editButton.render().$el},_render_deleteButton:function(){if((!this.model.get("for_editing"))||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var a={title:_l("Delete"),href:this.urls["delete"],id:"historyItemDeleter-"+this.model.get("id"),icon_class:"delete"};if(this.model.get("deleted")||this.model.get("purged")){a={title:_l("Dataset is already deleted"),icon_class:"delete",enabled:false}}this.deleteButton=new IconButtonView({model:new IconButton(a)});return this.deleteButton.render().$el},_render_titleLink:function(){return $(jQuery.trim(HDAView.templates.titleLink(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_hdaSummary:function(){var a=_.extend(this.model.toJSON(),{urls:this.urls});if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){_.extend(a,{dbkey_unknown_and_editable:true})}return HDAView.templates.hdaSummary(a)},_render_primaryActionButtons:function(c){var b=$("<div/>").attr("id","primary-actions-"+this.model.get("id")),a=this;_.each(c,function(d){b.append(d.call(a))});return b},_render_downloadButton:function(){if(this.model.get("purged")){return null}var a=HDAView.templates.downloadLinks(_.extend(this.model.toJSON(),{urls:this.urls}));return $(a)},_render_errButton:function(){if((this.model.get("state")!==HistoryDatasetAssociation.STATES.ERROR)||(!this.model.get("for_editing"))){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_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_rerunButton:function(){if(!this.model.get("for_editing")){return null}this.rerunButton=new IconButtonView({model:new IconButton({title:_l("Run this job again"),href:this.urls.rerun,target:"galaxy_main",icon_class:"arrow-circle"})});return this.rerunButton.render().$el},_render_visualizationsButton:function(){var c=this.model.get("dbkey"),a=this.model.get("visualizations"),f=this.urls.visualization,d={},g={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(!(this.model.hasData())||!(this.model.get("for_editing"))||!(a&&a.length)||!(f)){return null}this.visualizationsButton=new IconButtonView({model:new IconButton({title:_l("Visualize"),href:f,icon_class:"chart_curve"})});var b=this.visualizationsButton.render().$el;b.addClass("visualize-icon");if(c){g.dbkey=c}function e(h){switch(h){case"trackster":return create_trackster_action_fn(f,g,c);case"scatterplot":return create_scatterplot_action_fn(f,g);default:return function(){window.parent.location=f+"/"+h+"?"+$.param(g)}}}if(a.length===1){b.attr("title",a[0]);b.click(e(a[0]))}else{_.each(a,function(i){var h=i.charAt(0).toUpperCase()+i.slice(1);d[_l(h)]=e(i)});make_popupmenu(b,d)}return b},_render_secondaryActionButtons:function(b){var c=$("<div/>"),a=this;c.attr("style","float: right;").attr("id","secondary-actions-"+this.model.get("id"));_.each(b,function(d){c.append(d.call(a))});return c},_render_tagButton:function(){if(!(this.model.hasData())||!(this.model.get("for_editing"))||(!this.urls.tags.get)){return null}this.tagButton=new IconButtonView({model:new IconButton({title:_l("Edit dataset tags"),target:"galaxy_main",href:this.urls.tags.get,icon_class:"tags"})});return this.tagButton.render().$el},_render_annotateButton:function(){if(!(this.model.hasData())||!(this.model.get("for_editing"))||(!this.urls.annotation.get)){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_displayApps:function(){if(!this.model.hasData()){return null}var a=$("<div/>").addClass("display-apps");if(!_.isEmpty(this.model.get("display_types"))){a.append(HDAView.templates.displayApps({displayApps:this.model.get("display_types")}))}if(!_.isEmpty(this.model.get("display_apps"))){a.append(HDAView.templates.displayApps({displayApps:this.model.get("display_apps")}))}return a},_render_tagArea:function(){if(!this.urls.tags.set){return null}return $(HDAView.templates.tagArea(_.extend(this.model.toJSON(),{urls:this.urls})))},_render_annotationArea:function(){if(!this.urls.annotation.get){return null}return $(HDAView.templates.annotationArea(_.extend(this.model.toJSON(),{urls:this.urls})))},_render_peek:function(){if(!this.model.get("peek")){return null}return $("<div/>").append($("<pre/>").attr("id","peek"+this.model.get("id")).addClass("peek").append(this.model.get("peek")))},_render_body_not_viewable:function(a){a.append($("<div>"+_l("You do not have permission to view dataset")+".</div>"))},_render_body_uploading:function(a){a.append($("<div>"+_l("Dataset is uploading")+"</div>"))},_render_body_queued:function(a){a.append($("<div>"+_l("Job is waiting to run")+".</div>"));a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_running:function(a){a.append("<div>"+_l("Job is currently running")+".</div>");a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_error:function(a){if(!this.model.get("purged")){a.append($("<div>"+this.model.get("misc_blurb")+"</div>"))}a.append((_l("An error occurred running this job")+": <i>"+$.trim(this.model.get("misc_info"))+"</i>"));a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_errButton,this._render_showParamsButton,this._render_rerunButton]))},_render_body_discarded:function(a){a.append("<div>"+_l("The job creating this dataset was cancelled before completion")+".</div>");a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_setting_metadata:function(a){a.append($("<div>"+_l("Metadata is being auto-detected")+".</div>"))},_render_body_empty:function(a){a.append($("<div>"+_l("No data")+": <i>"+this.model.get("misc_blurb")+"</i></div>"));a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_failed_metadata:function(a){a.append($(HDAView.templates.failedMetadata(this.model.toJSON())));this._render_body_ok(a)},_render_body_ok:function(a){a.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton,this._render_rerunButton]));return}a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_errButton,this._render_showParamsButton,this._render_rerunButton,this._render_visualizationsButton]));a.append(this._render_secondaryActionButtons([this._render_tagButton,this._render_annotateButton]));a.append('<div class="clear"/>');a.append(this._render_tagArea());a.append(this._render_annotationArea());a.append(this._render_displayApps());a.append(this._render_peek())},_render_body:function(){var a=$("<div/>").attr("id","info-"+this.model.get("id")).addClass("historyItemBody").attr("style","display: block");switch(this.model.get("state")){case HistoryDatasetAssociation.STATES.NOT_VIEWABLE:this._render_body_not_viewable(a);break;case HistoryDatasetAssociation.STATES.UPLOAD:this._render_body_uploading(a);break;case HistoryDatasetAssociation.STATES.QUEUED:this._render_body_queued(a);break;case HistoryDatasetAssociation.STATES.RUNNING:this._render_body_running(a);break;case HistoryDatasetAssociation.STATES.ERROR:this._render_body_error(a);break;case HistoryDatasetAssociation.STATES.DISCARDED:this._render_body_discarded(a);break;case HistoryDatasetAssociation.STATES.SETTING_METADATA:this._render_body_setting_metadata(a);break;case HistoryDatasetAssociation.STATES.EMPTY:this._render_body_empty(a);break;case HistoryDatasetAssociation.STATES.FAILED_METADATA:this._render_body_failed_metadata(a);break;case HistoryDatasetAssociation.STATES.OK:this._render_body_ok(a);break;default:a.append($('<div>Error: unknown dataset state "'+state+'".</div>'))}a.append('<div style="clear: both"></div>');if(this.expanded){a.show()}else{a.hide()}return a},events:{"click .historyItemTitle":"toggleBodyVisibility","click a.icon-button.tags":"loadAndDisplayTags","click a.icon-button.annotate":"loadAndDisplayAnnotation"},loadAndDisplayTags:function(b){this.log(this+".loadAndDisplayTags",b);var c=this.$el.find(".tag-area"),a=c.find(".tag-elt");if(c.is(":hidden")){if(!jQuery.trim(a.html())){$.ajax({url:this.urls.tags.get,error:function(){alert(_l("Tagging failed"))},success:function(d){a.html(d);a.find(".tooltip").tooltip();c.slideDown("fast")}})}else{c.slideDown("fast")}}else{c.slideUp("fast")}return false},loadAndDisplayAnnotation:function(b){this.log(this+".loadAndDisplayAnnotation",b);var d=this.$el.find(".annotation-area"),c=d.find(".annotation-elt"),a=this.urls.annotation.set;if(d.is(":hidden")){if(!jQuery.trim(c.html())){$.ajax({url:this.urls.annotation.get,error:function(){alert(_l("Annotations failed"))},success:function(e){if(e===""){e="<em>"+_l("Describe or add notes to dataset")+"</em>"}c.html(e);d.find(".tooltip").tooltip();async_save_text(c.attr("id"),c.attr("id"),a,"new_annotation",18,true,4);d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toggleBodyVisibility:function(c,a){var b=this,d=this.$el.find(".historyItemBody");a=(a===undefined)?(!d.is(":visible")):(a);if(a){d.slideDown("fast",function(){b.trigger("body-visible",b.model.get("id"))})}else{d.slideUp("fast",function(){b.trigger("body-hidden",b.model.get("id"))})}},toString:function(){var a=(this.model)?(this.model+""):("(no model)");return"HDAView("+a+")"}});HDAView.templates={warningMsg:Handlebars.templates["template-warningmessagesmall"],messages:Handlebars.templates["template-history-warning-messages"],titleLink:Handlebars.templates["template-history-titleLink"],hdaSummary:Handlebars.templates["template-history-hdaSummary"],downloadLinks:Handlebars.templates["template-history-downloadLinks"],failedMetadata:Handlebars.templates["template-history-failedMetaData"],tagArea:Handlebars.templates["template-history-tagArea"],annotationArea:Handlebars.templates["template-history-annotationArea"],displayApps:Handlebars.templates["template-history-displayApps"]};function create_scatterplot_action_fn(a,b){action=function(){var d=$(window.parent.document).find("iframe#galaxy_main"),c=a+"/scatterplot?"+$.param(b);d.attr("src",c);$("div.popmenu-wrapper").remove();return false};return action}function create_trackster_action_fn(a,c,b){return function(){var d={};if(b){d.dbkey=b}$.ajax({url:a+"/list_tracks?f-"+$.param(d),dataType:"html",error:function(){alert(_l("Could not add this dataset to browser")+".")},success:function(e){var f=window.parent;f.show_modal(_l("View Data in a New or Saved Visualization"),"",{Cancel:function(){f.hide_modal()},"View in saved visualization":function(){f.show_modal(_l("Add Data to Saved Visualization"),e,{Cancel:function(){f.hide_modal()},"Add to visualization":function(){$(f.document).find("input[name=id]:checked").each(function(){var g=$(this).val();c.id=g;f.location=a+"/trackster?"+$.param(c)})}})},"View in new visualization":function(){f.location=a+"/trackster?"+$.param(c)}})}});return false}};
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/mvc/history/history-model.js
--- a/static/scripts/packed/mvc/history/history-model.js
+++ b/static/scripts/packed/mvc/history/history-model.js
@@ -1,1 +1,1 @@
-var History=BaseModel.extend(LoggableMixin).extend({logger:console,defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,annotation:null,message:null},url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b&&b.length){this.hdas.reset(b);this.checkForUpdates()}this.bind("all",function(c){console.info(this+"",arguments)})},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){console.warn("fetched user: ",e[0]);console.warn("fetched history: ",d[0]);b.attributes.user=e[0];b.trigger("loaded",d);b.log(b)}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.hdaIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();b.trigger("loaded:hdas",d);if(c){callback(b)}})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.hdas.update(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},4000)}}).error(function(f,d,e){if(console&&console.warn){console.warn("Error getting history updates from the server:",f,d,e)}alert("Error getting history updates from the server.\n"+e)})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories",logger:console});
\ No newline at end of file
+var History=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,annotation:null,message:null},url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b&&b.length){this.hdas.reset(b);this.checkForUpdates()}},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.trigger("loaded:user",e[0]);b.trigger("loaded",d[0])}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.hdaIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();b.trigger("loaded:hdas",d);if(c){callback(b)}})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}else{this.trigger("ready")}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.hdas.update(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},4000)}else{c.trigger("ready")}}).error(function(f,d,e){if(console&&console.warn){console.warn("Error getting history updates from the server:",f,d,e)}alert(_l("Error getting history updates from the server.")+"\n"+e)})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories",});
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/mvc/history/history-panel.js
--- a/static/scripts/packed/mvc/history/history-panel.js
+++ b/static/scripts/packed/mvc/history/history-panel.js
@@ -1,1 +1,1 @@
-var HistoryPanel=BaseView.extend(LoggableMixin).extend({el:"body.historyPage",initialize:function(a){this.log(this+".initialize:",a);if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}if(!a.urlTemplates.history){throw ("HDAView needs urlTemplates.history on initialize")}if(!a.urlTemplates.hda){throw ("HDAView needs urlTemplates.hda on initialize")}this.urlTemplates=a.urlTemplates.history;this.hdaUrlTemplates=a.urlTemplates.hda;this.storage=new PersistantStorage("HistoryView."+this.model.get("id"),{expandedHdas:{},show_deleted:false,show_hidden:false});this.log("this.storage:",this.storage.get());this.log("show_deleted:",a.show_deleted,"show_hidden",a.show_hidden);if((a.show_deleted===true)||(a.show_deleted===false)){this.storage.set("show_deleted",a.show_deleted)}if((a.show_hidden===true)||(a.show_hidden===false)){this.storage.set("show_hidden",a.show_hidden)}this.show_deleted=this.storage.get("show_deleted");this.show_hidden=this.storage.get("show_hidden");this.log("this.show_deleted:",this.show_deleted,"show_hidden",this.show_hidden);this.log("(now) this.storage:",this.storage.get());this.model.bind("change:nice_size",this.updateHistoryDiskSize,this);this.model.hdas.bind("add",this.add,this);this.model.hdas.bind("reset",this.addAll,this);this.model.hdas.bind("all",this.all,this);this.hdaViews={};this.urls={}},add:function(a){},addAll:function(){this.render()},all:function(a){},renderUrls:function(a){var b=this;b.urls={};_.each(this.urlTemplates,function(d,c){b.urls[c]=_.template(d,a)});return b.urls},render:function(){var b=this,d=b.toString()+".set-up",c=$("<div/>"),a=this.model.toJSON(),e=(this.$el.children().size()===0);a.urls=this.renderUrls(a);c.append(HistoryPanel.templates.historyPanel(a));c.find(".tooltip").tooltip({placement:"bottom"});this.setUpActionButton(c.find("#history-action-popup"));if(!this.model.hdas.length||!this.renderItems(c.find("#"+this.model.get("id")+"-datasets"))){c.find("#emptyHistoryMessage").show()}$(b).queue(d,function(f){b.$el.fadeOut("fast",function(){f()})});$(b).queue(d,function(f){b.$el.html("");b.$el.append(c.children());b.$el.fadeIn("fast",function(){f()})});$(b).queue(d,function(f){this.log(b+" rendered:",b.$el);b.setUpBehaviours();if(e){b.trigger("rendered:initial")}else{b.trigger("rendered")}f()});$(b).dequeue(d);return this},setUpActionButton:function(e){var c=this,d=(this.storage.get("show_deleted"))?("Hide deleted"):("Show deleted"),a=(this.storage.get("show_hidden"))?("Hide hidden"):("Show hidden"),b={};b[_l("refresh")]=function(){window.location.reload()};b[_l("collapse all")]=function(){c.hideAllHdaBodies()};b[_l(d)]=function(){c.toggleShowDeleted()};b[_l(a)]=function(){c.toggleShowHidden()};make_popupmenu(e,b)},renderItems:function(b){this.hdaViews={};var a=this,c=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"));_.each(c,function(f){var e=f.get("id"),d=a.storage.get("expandedHdas").get(e);a.hdaViews[e]=new HDAView({model:f,expanded:d,urlTemplates:a.hdaUrlTemplates});a.setUpHdaListeners(a.hdaViews[e]);b.prepend(a.hdaViews[e].render().$el)});return c.length},setUpHdaListeners:function(b){var a=this;b.bind("toggleBodyVisibility",function(d,c){if(c){a.storage.get("expandedHdas").set(d,true)}else{a.storage.get("expandedHdas").deleteKey(d)}});b.bind("rendered:ready",function(){a.trigger("hda:rendered:ready")})},setUpBehaviours:function(){if(!(this.model.get("user")&&this.model.get("user").email)){return}var a=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(a.is(":hidden")){a.slideDown("fast")}else{a.slideUp("fast")}return false});async_save_text("history-name-container","history-name",this.urls.rename,"new_name",18);async_save_text("history-annotation-container","history-annotation",this.urls.annotate,"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},events:{"click #history-tag":"loadAndDisplayTags"},showQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(b.is(":hidden")){b.slideDown("fast")}},hideQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(!b.is(":hidden")){b.slideUp("fast")}},toggleShowDeleted:function(a,c,b){this.storage.set("show_deleted",!this.storage.get("show_deleted"));this.render()},toggleShowHidden:function(){this.storage.set("show_hidden",!this.storage.get("show_hidden"));this.render()},hideAllHdaBodies:function(){_.each(this.hdaViews,function(a){a.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},loadAndDisplayTags:function(c){this.log(this+".loadAndDisplayTags",c);var d=this.$el.find("#history-tag-area"),b=d.find(".tag-elt");this.log("\t tagArea",d," tagElt",b);if(d.is(":hidden")){if(!jQuery.trim(b.html())){var a=this;$.ajax({url:a.urls.tag,error:function(){alert("Tagging failed")},success:function(e){b.html(e);b.find(".tooltip").tooltip();d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toString:function(){var a=this.model.get("name")||"";return"HistoryView("+a+")"}});HistoryPanel.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};
\ No newline at end of file
+var HistoryPanel=BaseView.extend(LoggableMixin).extend({el:"body.historyPage",initialize:function(a){this.log(this+".initialize:",a);if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}if(!a.urlTemplates.history){throw ("HDAView needs urlTemplates.history on initialize")}if(!a.urlTemplates.hda){throw ("HDAView needs urlTemplates.hda on initialize")}this.urlTemplates=a.urlTemplates.history;this.hdaUrlTemplates=a.urlTemplates.hda;this.storage=new PersistantStorage("HistoryView."+this.model.get("id"),{expandedHdas:{},show_deleted:false,show_hidden:false});this.log("this.storage:",this.storage.get());this.log("show_deleted:",a.show_deleted,"show_hidden",a.show_hidden);if((a.show_deleted===true)||(a.show_deleted===false)){this.storage.set("show_deleted",a.show_deleted)}if((a.show_hidden===true)||(a.show_hidden===false)){this.storage.set("show_hidden",a.show_hidden)}this.show_deleted=this.storage.get("show_deleted");this.show_hidden=this.storage.get("show_hidden");this.log("this.show_deleted:",this.show_deleted,"show_hidden",this.show_hidden);this.log("(now) this.storage:",this.storage.get());this.model.bind("change:nice_size",this.updateHistoryDiskSize,this);this.model.hdas.bind("add",this.add,this);this.model.hdas.bind("reset",this.addAll,this);this.model.hdas.bind("all",this.all,this);this.hdaViews={};this.urls={}},add:function(a){},addAll:function(){this.render()},all:function(a){},renderUrls:function(a){var b=this;b.urls={};_.each(this.urlTemplates,function(d,c){b.urls[c]=_.template(d,a)});return b.urls},render:function(){var b=this,d=b.toString()+".set-up",c=$("<div/>"),a=this.model.toJSON(),e=(this.$el.children().size()===0);a.urls=this.renderUrls(a);c.append(HistoryPanel.templates.historyPanel(a));c.find(".tooltip").tooltip({placement:"bottom"});this.setUpActionButton(c.find("#history-action-popup"));if(!this.model.hdas.length||!this.renderItems(c.find("#"+this.model.get("id")+"-datasets"))){c.find("#emptyHistoryMessage").show()}$(b).queue(d,function(f){b.$el.fadeOut("fast",function(){f()})});$(b).queue(d,function(f){b.$el.html("");b.$el.append(c.children());b.$el.fadeIn("fast",function(){f()})});$(b).queue(d,function(f){this.log(b+" rendered:",b.$el);b.setUpBehaviours();if(e){b.trigger("rendered:initial")}else{b.trigger("rendered")}f()});$(b).dequeue(d);return this},setUpActionButton:function(e){var c=this,d=(this.storage.get("show_deleted"))?("Hide deleted"):("Show deleted"),a=(this.storage.get("show_hidden"))?("Hide hidden"):("Show hidden"),b={};b[_l("refresh")]=function(){window.location.reload()};b[_l("collapse all")]=function(){c.hideAllHdaBodies()};b[_l(d)]=function(){c.toggleShowDeleted()};b[_l(a)]=function(){c.toggleShowHidden()};make_popupmenu(e,b)},renderItems:function(b){this.hdaViews={};var a=this,c=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"));_.each(c,function(f){var e=f.get("id"),d=a.storage.get("expandedHdas").get(e);a.hdaViews[e]=new HDAView({model:f,expanded:d,urlTemplates:a.hdaUrlTemplates});a.setUpHdaListeners(a.hdaViews[e]);b.prepend(a.hdaViews[e].render().$el)});return c.length},setUpHdaListeners:function(b){var a=this;b.bind("toggleBodyVisibility",function(d,c){if(c){a.storage.get("expandedHdas").set(d,true)}else{a.storage.get("expandedHdas").deleteKey(d)}})},setUpBehaviours:function(){if(!(this.model.get("user")&&this.model.get("user").email)){return}var a=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(a.is(":hidden")){a.slideDown("fast")}else{a.slideUp("fast")}return false});async_save_text("history-name-container","history-name",this.urls.rename,"new_name",18);async_save_text("history-annotation-container","history-annotation",this.urls.annotate,"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},events:{"click #history-tag":"loadAndDisplayTags"},showQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(b.is(":hidden")){b.slideDown("fast")}},hideQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(!b.is(":hidden")){b.slideUp("fast")}},toggleShowDeleted:function(a,c,b){this.storage.set("show_deleted",!this.storage.get("show_deleted"));this.render()},toggleShowHidden:function(){this.storage.set("show_hidden",!this.storage.get("show_hidden"));this.render()},hideAllHdaBodies:function(){_.each(this.hdaViews,function(a){a.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},loadAndDisplayTags:function(c){this.log(this+".loadAndDisplayTags",c);var d=this.$el.find("#history-tag-area"),b=d.find(".tag-elt");this.log("\t tagArea",d," tagElt",b);if(d.is(":hidden")){if(!jQuery.trim(b.html())){var a=this;$.ajax({url:a.urls.tag,error:function(){alert(_l("Tagging failed"))},success:function(e){b.html(e);b.find(".tooltip").tooltip();d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toString:function(){var a=this.model.get("name")||"";return"HistoryView("+a+")"}});HistoryPanel.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/mvc/user/user-model.js
--- a/static/scripts/packed/mvc/user/user-model.js
+++ b/static/scripts/packed/mvc/user/user-model.js
@@ -1,1 +1,1 @@
-var User=BaseModel.extend(LoggableMixin).extend({defaults:{id:null,username:"(anonymous user)",email:"",total_disk_usage:0,nice_total_disk_usage:"0 bytes"},initialize:function(a){this.log("User.initialize:",a);this.on("loaded",function(b,c){this.log(this+" has loaded:",b,c)});this.on("change",function(b,c){this.log(this+" has changed:",b,c.changes)})},urlRoot:"api/users",loadFromApi:function(d,b){d=d||User.CURRENT_ID_STR;b=b||{};var a=this,c=b.success;b.success=function(f,e){a.trigger("loaded",f,e);if(c){c(f,e)}};if(d===User.CURRENT_ID_STR){b.url=this.urlRoot+"/"+User.CURRENT_ID_STR}return BaseModel.prototype.fetch.call(this,b)},toString:function(){var a=[this.get("username")];if(this.get("id")){a.unshift(this.get("id"));a.push(this.get("email"))}return"User("+a.join(":")+")"}});User.CURRENT_ID_STR="current";User.getCurrentUserFromApi=function(b){var a=new User();a.loadFromApi(User.CURRENT_ID_STR,b);return a};var UserCollection=Backbone.Collection.extend(LoggableMixin).extend({model:User,logger:console,urlRoot:"api/users"});
\ No newline at end of file
+var User=BaseModel.extend(LoggableMixin).extend({urlRoot:"api/users",defaults:{id:null,username:"("+_l("anonymous user")+")",email:"",total_disk_usage:0,nice_total_disk_usage:"0 bytes"},initialize:function(a){this.log("User.initialize:",a);this.on("loaded",function(b,c){this.log(this+" has loaded:",b,c)});this.on("change",function(b,c){this.log(this+" has changed:",b,c.changes)})},loadFromApi:function(d,b){d=d||User.CURRENT_ID_STR;b=b||{};var a=this,c=b.success;b.success=function(f,e){a.trigger("loaded",f,e);if(c){c(f,e)}};if(d===User.CURRENT_ID_STR){b.url=this.urlRoot+"/"+User.CURRENT_ID_STR}return BaseModel.prototype.fetch.call(this,b)},toString:function(){var a=[this.get("username")];if(this.get("id")){a.unshift(this.get("id"));a.push(this.get("email"))}return"User("+a.join(":")+")"}});User.CURRENT_ID_STR="current";User.getCurrentUserFromApi=function(b){var a=new User();a.loadFromApi(User.CURRENT_ID_STR,b);return a};var UserCollection=Backbone.Collection.extend(LoggableMixin).extend({model:User,urlRoot:"api/users"});
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/mvc/user/user-quotameter.js
--- a/static/scripts/packed/mvc/user/user-quotameter.js
+++ b/static/scripts/packed/mvc/user/user-quotameter.js
@@ -1,1 +1,1 @@
-var UserQuotaMeter=BaseView.extend(LoggableMixin).extend({options:{warnAtPercent:85,errorAtPercent:100,meterDocument:window.top.document,containerSelector:".quota-meter-container",meterSelector:"#quota-meter",barSelector:"#quota-meter-bar",textSelector:"#quota-meter-text",msgDocument:(top.frames.galaxy_history)?(top.frames.galaxy_history.document):(top.document),msgSelector:"#quota-message-container",warnClass:"quota-meter-bar-warn",errorClass:"quota-meter-bar-error",usageTemplate:"Using <%= nice_total_disk_usage %>",quotaTemplate:"Using <%= quota_percent %>%",meterTemplate:"",animationSpeed:"fast"},initialize:function(a){this.log(this+".initialize:",a);_.extend(this.options,a);this.model.bind("change:quota_percent change:total_disk_usage",this.render,this)},update:function(a){this.log(this+" updating user data...",a);this.model.loadFromApi(this.model.get("id"),a);return this},isOverQuota:function(){return(this.model.get("quota_percent")!==null&&this.model.get("quota_percent")>=this.options.errorAtPercent)},_render_quota:function(){var a=this.model.toJSON(),b=a.quota_percent,c=$(UserQuotaMeter.templates.quota(a));if(this.isOverQuota()){c.addClass("progress-danger");c.find("#quota-meter-text").css("color","white");this.trigger("quota:over",a)}else{if(b>=this.options.warnAtPercent){c.addClass("progress-warning");this.trigger("quota:under quota:under:approaching",a)}else{c.addClass("progress-success");this.trigger("quota:under quota:under:ok",a)}}return c},_render_usage:function(){var a=$(UserQuotaMeter.templates.usage(this.model.toJSON()));this.log(this+".rendering usage:",a);return a},render:function(){var a=null;this.log(this+".model.quota_percent:",this.model.get("quota_percent"));if((this.model.get("quota_percent")===null)||(this.model.get("quota_percent")===undefined)){a=this._render_usage()}else{a=this._render_quota()}this.$el.html(a);return this},toString:function(){return"UserQuotaMeter("+this.model+")"}});UserQuotaMeter.templates={quota:Handlebars.templates["template-user-quotaMeter-quota"],usage:Handlebars.templates["template-user-quotaMeter-usage"]};
\ No newline at end of file
+var UserQuotaMeter=BaseView.extend(LoggableMixin).extend({options:{warnAtPercent:85,errorAtPercent:100},initialize:function(a){this.log(this+".initialize:",a);_.extend(this.options,a);this.model.bind("change:quota_percent change:total_disk_usage",this.render,this)},update:function(a){this.log(this+" updating user data...",a);this.model.loadFromApi(this.model.get("id"),a);return this},isOverQuota:function(){return(this.model.get("quota_percent")!==null&&this.model.get("quota_percent")>=this.options.errorAtPercent)},_render_quota:function(){var a=this.model.toJSON(),b=a.quota_percent,c=$(UserQuotaMeter.templates.quota(a));if(this.isOverQuota()){c.addClass("progress-danger");c.find("#quota-meter-text").css("color","white");this.trigger("quota:over",a)}else{if(b>=this.options.warnAtPercent){c.addClass("progress-warning");this.trigger("quota:under quota:under:approaching",a)}else{c.addClass("progress-success");this.trigger("quota:under quota:under:ok",a)}}return c},_render_usage:function(){var a=$(UserQuotaMeter.templates.usage(this.model.toJSON()));this.log(this+".rendering usage:",a);return a},render:function(){var a=null;this.log(this+".model.quota_percent:",this.model.get("quota_percent"));if((this.model.get("quota_percent")===null)||(this.model.get("quota_percent")===undefined)){a=this._render_usage()}else{a=this._render_quota()}this.$el.html(a);return this},toString:function(){return"UserQuotaMeter("+this.model+")"}});UserQuotaMeter.templates={quota:Handlebars.templates["template-user-quotaMeter-quota"],usage:Handlebars.templates["template-user-quotaMeter-usage"]};
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/templates/compiled/template-history-annotationArea.js
--- a/static/scripts/packed/templates/compiled/template-history-annotationArea.js
+++ b/static/scripts/packed/templates/compiled/template-history-annotationArea.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-annotationArea"]=b(function(e,l,d,k,j){d=d||e.helpers;var h="",c,g,f="function",i=this.escapeExpression;h+='\n<div id="';g=d.id;if(g){c=g.call(l,{hash:{}})}else{c=l.id;c=typeof c===f?c():c}h+=i(c)+'-annotation-area" class="annotation-area" style="display: none;">\n <strong>Annotation:</strong>\n <div id="';g=d.id;if(g){c=g.call(l,{hash:{}})}else{c=l.id;c=typeof c===f?c():c}h+=i(c)+'-anotation-elt" class="annotation-elt tooltip editable-text"\n style="margin: 1px 0px 1px 0px" title="Edit dataset annotation">\n </div>\n</div>';return h})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-annotationArea"]=b(function(g,n,f,m,l){f=f||g.helpers;var j="",d,i,h="function",k=this.escapeExpression,p=this,o=f.blockHelperMissing;function e(r,q){return"Annotation"}function c(r,q){return"Edit dataset annotation"}j+='\n<div id="';i=f.id;if(i){d=i.call(n,{hash:{}})}else{d=n.id;d=typeof d===h?d():d}j+=k(d)+'-annotation-area" class="annotation-area" style="display: none;">\n <strong>';i=f.local;if(i){d=i.call(n,{hash:{},inverse:p.noop,fn:p.program(1,e,l)})}else{d=n.local;d=typeof d===h?d():d}if(!f.local){d=o.call(n,d,{hash:{},inverse:p.noop,fn:p.program(1,e,l)})}if(d||d===0){j+=d}j+=':</strong>\n <div id="';i=f.id;if(i){d=i.call(n,{hash:{}})}else{d=n.id;d=typeof d===h?d():d}j+=k(d)+'-anotation-elt" class="annotation-elt tooltip editable-text"\n style="margin: 1px 0px 1px 0px" title="';i=f.local;if(i){d=i.call(n,{hash:{},inverse:p.noop,fn:p.program(3,c,l)})}else{d=n.local;d=typeof d===h?d():d}if(!f.local){d=o.call(n,d,{hash:{},inverse:p.noop,fn:p.program(3,c,l)})}if(d||d===0){j+=d}j+='">\n </div>\n</div>';return j})})();
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/templates/compiled/template-history-displayApps.js
--- a/static/scripts/packed/templates/compiled/template-history-displayApps.js
+++ b/static/scripts/packed/templates/compiled/template-history-displayApps.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-displayApps"]=b(function(g,l,f,k,j){f=f||g.helpers;var c,h="function",i=this.escapeExpression,m=this;function e(r,q){var o="",p,n;o+="\n ";n=f.label;if(n){p=n.call(r,{hash:{}})}else{p=r.label;p=typeof p===h?p():p}o+=i(p)+"\n ";p=r.links;p=f.each.call(r,p,{hash:{},inverse:m.noop,fn:m.program(2,d,q)});if(p||p===0){o+=p}o+="\n <br />\n";return o}function d(r,q){var o="",p,n;o+='\n <a target="';n=f.target;if(n){p=n.call(r,{hash:{}})}else{p=r.target;p=typeof p===h?p():p}o+=i(p)+'" href="';n=f.href;if(n){p=n.call(r,{hash:{}})}else{p=r.href;p=typeof p===h?p():p}o+=i(p)+'">';n=f.text;if(n){p=n.call(r,{hash:{}})}else{p=r.text;p=typeof p===h?p():p}o+=i(p)+"</a>\n ";return o}c=l.displayApps;c=f.each.call(l,c,{hash:{},inverse:m.noop,fn:m.program(1,e,j)});if(c||c===0){return c}else{return""}})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-displayApps"]=b(function(h,m,g,l,k){g=g||h.helpers;var d,i="function",j=this.escapeExpression,o=this,n=g.blockHelperMissing;function f(t,s){var q="",r,p;q+="\n ";p=g.label;if(p){r=p.call(t,{hash:{}})}else{r=t.label;r=typeof r===i?r():r}q+=j(r)+"\n ";r=t.links;r=g.each.call(t,r,{hash:{},inverse:o.noop,fn:o.program(2,e,s)});if(r||r===0){q+=r}q+="\n <br />\n";return q}function e(t,s){var q="",r,p;q+='\n <a target="';p=g.target;if(p){r=p.call(t,{hash:{}})}else{r=t.target;r=typeof r===i?r():r}q+=j(r)+'" href="';p=g.href;if(p){r=p.call(t,{hash:{}})}else{r=t.href;r=typeof r===i?r():r}q+=j(r)+'">';p=g.local;if(p){r=p.call(t,{hash:{},inverse:o.noop,fn:o.program(3,c,s)})}else{r=t.local;r=typeof r===i?r():r}if(!g.local){r=n.call(t,r,{hash:{},inverse:o.noop,fn:o.program(3,c,s)})}if(r||r===0){q+=r}q+="</a>\n ";return q}function c(s,r){var q,p;p=g.text;if(p){q=p.call(s,{hash:{}})}else{q=s.text;q=typeof q===i?q():q}return j(q)}d=m.displayApps;d=g.each.call(m,d,{hash:{},inverse:o.noop,fn:o.program(1,f,k)});if(d||d===0){return d}else{return""}})})();
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/templates/compiled/template-history-downloadLinks.js
--- a/static/scripts/packed/templates/compiled/template-history-downloadLinks.js
+++ b/static/scripts/packed/templates/compiled/template-history-downloadLinks.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-downloadLinks"]=b(function(g,l,f,k,j){f=f||g.helpers;var c,h="function",i=this.escapeExpression,m=this;function e(s,r){var p="",q,o;p+="\n";p+='\n<div popupmenu="dataset-';o=f.id;if(o){q=o.call(s,{hash:{}})}else{q=s.id;q=typeof q===h?q():q}p+=i(q)+'-popup">\n <a class="action-button" href="';q=s.urls;q=q==null||q===false?q:q.download;q=typeof q===h?q():q;p+=i(q)+'">Download Dataset</a>\n <a>Additional Files</a>\n ';q=s.urls;q=q==null||q===false?q:q.meta_download;q=f.each.call(s,q,{hash:{},inverse:m.noop,fn:m.program(2,d,r)});if(q||q===0){p+=q}p+='\n</div>\n<div style="float:left;" class="menubutton split popup" id="dataset-';o=f.id;if(o){q=o.call(s,{hash:{}})}else{q=s.id;q=typeof q===h?q():q}p+=i(q)+'-popup">\n <a href="';q=s.urls;q=q==null||q===false?q:q.download;q=typeof q===h?q():q;p+=i(q)+'" title="Download" class="icon-button disk tooltip"></a>\n</div>\n';return p}function d(s,r){var p="",q,o;p+='\n <a class="action-button" href="';o=f.url;if(o){q=o.call(s,{hash:{}})}else{q=s.url;q=typeof q===h?q():q}p+=i(q)+'">Download ';o=f.file_type;if(o){q=o.call(s,{hash:{}})}else{q=s.file_type;q=typeof q===h?q():q}p+=i(q)+"</a>\n ";return p}function n(r,q){var o="",p;o+="\n";o+='\n<a href="';p=r.urls;p=p==null||p===false?p:p.download;p=typeof p===h?p():p;o+=i(p)+'" title="Download" class="icon-button disk tooltip"></a>\n';return o}c=l.urls;c=c==null||c===false?c:c.meta_download;c=f["if"].call(l,c,{hash:{},inverse:m.program(4,n,j),fn:m.program(1,e,j)});if(c||c===0){return c}else{return""}})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-downloadLinks"]=b(function(g,q,p,k,t){p=p||g.helpers;var h,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(y,x){var v="",w,u;v+="\n";v+='\n<div popupmenu="dataset-';u=p.id;if(u){w=u.call(y,{hash:{}})}else{w=y.id;w=typeof w===e?w():w}v+=d(w)+'-popup">\n <a class="action-button" href="';w=y.urls;w=w==null||w===false?w:w.download;w=typeof w===e?w():w;v+=d(w)+'">';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(2,m,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(2,m,x)})}if(w||w===0){v+=w}v+="</a>\n <a>";u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(4,l,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(4,l,x)})}if(w||w===0){v+=w}v+="</a>\n ";w=y.urls;w=w==null||w===false?w:w.meta_download;w=p.each.call(y,w,{hash:{},inverse:o.noop,fn:o.program(6,j,x)});if(w||w===0){v+=w}v+='\n</div>\n<div style="float:left;" class="menubutton split popup" id="dataset-';u=p.id;if(u){w=u.call(y,{hash:{}})}else{w=y.id;w=typeof w===e?w():w}v+=d(w)+'-popup">\n <a href="';w=y.urls;w=w==null||w===false?w:w.download;w=typeof w===e?w():w;v+=d(w)+'" title="';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(9,f,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(9,f,x)})}if(w||w===0){v+=w}v+='" class="icon-button disk tooltip"></a>\n</div>\n';return v}function m(v,u){return"Download Dataset"}function l(v,u){return"Additional Files"}function j(y,x){var v="",w,u;v+='\n <a class="action-button" href="';u=p.url;if(u){w=u.call(y,{hash:{}})}else{w=y.url;w=typeof w===e?w():w}v+=d(w)+'">';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(7,i,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(7,i,x)})}if(w||w===0){v+=w}v+=" ";u=p.file_type;if(u){w=u.call(y,{hash:{}})}else{w=y.file_type;w=typeof w===e?w():w}v+=d(w)+"</a>\n ";return v}function i(v,u){return"Download"}function f(v,u){return"Download"}function s(y,x){var v="",w,u;v+="\n";v+='\n<a href="';w=y.urls;w=w==null||w===false?w:w.download;w=typeof w===e?w():w;v+=d(w)+'" title="';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(12,r,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(12,r,x)})}if(w||w===0){v+=w}v+='" class="icon-button disk tooltip"></a>\n';return v}function r(v,u){return"Download"}h=q.urls;h=h==null||h===false?h:h.meta_download;h=p["if"].call(q,h,{hash:{},inverse:o.program(11,s,t),fn:o.program(1,n,t)});if(h||h===0){return h}else{return""}})})();
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/templates/compiled/template-history-failedMetaData.js
--- a/static/scripts/packed/templates/compiled/template-history-failedMetaData.js
+++ b/static/scripts/packed/templates/compiled/template-history-failedMetaData.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-failedMetaData"]=b(function(f,l,e,k,j){e=e||f.helpers;var c,h,g="function",i=this.escapeExpression,n=this,m=e.blockHelperMissing;function d(r,q){var o="",p;o+='\nAn error occurred setting the metadata for this dataset.\nYou may be able to <a href="';p=r.urls;p=p==null||p===false?p:p.edit;p=typeof p===g?p():p;o+=i(p)+'" target="galaxy_main">set it manually or retry auto-detection</a>.\n';return o}h=e.warningmessagesmall;if(h){c=h.call(l,{hash:{},inverse:n.noop,fn:n.program(1,d,j)})}else{c=l.warningmessagesmall;c=typeof c===g?c():c}if(!e.warningmessagesmall){c=m.call(l,c,{hash:{},inverse:n.noop,fn:n.program(1,d,j)})}if(c||c===0){return c}else{return""}})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-failedMetaData"]=b(function(g,m,f,l,k){f=f||g.helpers;var c,i,o=this,h="function",n=f.blockHelperMissing,j=this.escapeExpression;function e(t,s){var q="",r,p;q+="\n";p=f.local;if(p){r=p.call(t,{hash:{},inverse:o.noop,fn:o.program(2,d,s)})}else{r=t.local;r=typeof r===h?r():r}if(!f.local){r=n.call(t,r,{hash:{},inverse:o.noop,fn:o.program(2,d,s)})}if(r||r===0){q+=r}q+='\nYou may be able to <a href="';r=t.urls;r=r==null||r===false?r:r.edit;r=typeof r===h?r():r;q+=j(r)+'" target="galaxy_main">set it manually or retry auto-detection</a>.\n';return q}function d(q,p){return"An error occurred setting the metadata for this dataset."}i=f.warningmessagesmall;if(i){c=i.call(m,{hash:{},inverse:o.noop,fn:o.program(1,e,k)})}else{c=m.warningmessagesmall;c=typeof c===h?c():c}if(!f.warningmessagesmall){c=n.call(m,c,{hash:{},inverse:o.noop,fn:o.program(1,e,k)})}if(c||c===0){return c}else{return""}})})();
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/templates/compiled/template-history-historyPanel.js
--- a/static/scripts/packed/templates/compiled/template-history-historyPanel.js
+++ b/static/scripts/packed/templates/compiled/template-history-historyPanel.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(g,t,r,n,B){r=r||g.helpers;var s="",k,j,e="function",d=this.escapeExpression,q=this,c=r.blockHelperMissing;function p(G,F){var D="",E,C;D+='\n <div id="history-name" class="tooltip editable-text"\n title="Click to rename history">';C=r.name;if(C){E=C.call(G,{hash:{}})}else{E=G.name;E=typeof E===e?E():E}D+=d(E)+"</div>\n ";return D}function o(G,F){var D="",E,C;D+='\n <div id="history-name" class="tooltip"\n title="You must be logged in to edit your history name">';C=r.name;if(C){E=C.call(G,{hash:{}})}else{E=G.name;E=typeof E===e?E():E}D+=d(E)+"</div>\n ";return D}function m(D,C){return"Click to see more actions"}function l(G,F){var D="",E,C;D+='\n <div id="history-secondary-links" style="float: right;">\n <a id="history-tag" title="';C=r.local;if(C){E=C.call(G,{hash:{},inverse:q.noop,fn:q.program(8,i,F)})}else{E=G.local;E=typeof E===e?E():E}if(!r.local){E=c.call(G,E,{hash:{},inverse:q.noop,fn:q.program(8,i,F)})}if(E||E===0){D+=E}D+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';C=r.local;if(C){E=C.call(G,{hash:{},inverse:q.noop,fn:q.program(10,A,F)})}else{E=G.local;E=typeof E===e?E():E}if(!r.local){E=c.call(G,E,{hash:{},inverse:q.noop,fn:q.program(10,A,F)})}if(E||E===0){D+=E}D+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n </div>\n ';return D}function i(D,C){return"Edit history tags"}function A(D,C){return"Edit history annotation"}function z(G,F){var D="",E,C;D+="\n ";C=r.warningmessagesmall;if(C){E=C.call(G,{hash:{},inverse:q.noop,fn:q.program(13,y,F)})}else{E=G.warningmessagesmall;E=typeof E===e?E():E}if(!r.warningmessagesmall){E=c.call(G,E,{hash:{},inverse:q.noop,fn:q.program(13,y,F)})}if(E||E===0){D+=E}D+="\n ";return D}function y(F,E){var D,C;C=r.local;if(C){D=C.call(F,{hash:{},inverse:q.noop,fn:q.program(14,x,E)})}else{D=F.local;D=typeof D===e?D():D}if(!r.local){D=c.call(F,D,{hash:{},inverse:q.noop,fn:q.program(14,x,E)})}if(D||D===0){return D}else{return""}}function x(D,C){return"You are currently viewing a deleted history!"}function w(F,E){var C="",D;C+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>Tags:</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>Annotation / Notes:</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text" title="Click to edit annotation">\n ';D=F.annotation;D=r["if"].call(F,D,{hash:{},inverse:q.program(19,u,E),fn:q.program(17,v,E)});if(D||D===0){C+=D}C+="\n </div>\n </div>\n </div>\n </div>\n ";return C}function v(G,F){var D="",E,C;D+="\n ";C=r.annotation;if(C){E=C.call(G,{hash:{}})}else{E=G.annotation;E=typeof E===e?E():E}D+=d(E)+"\n ";return D}function u(D,C){return"\n <em>Describe or add notes to history</em>\n "}function h(G,F){var D="",E,C;D+='\n <div id="message-container">\n <div class="';C=r.status;if(C){E=C.call(G,{hash:{}})}else{E=G.status;E=typeof E===e?E():E}D+=d(E)+'message">\n ';C=r.message;if(C){E=C.call(G,{hash:{}})}else{E=G.message;E=typeof E===e?E():E}D+=d(E)+"\n </div><br />\n </div>\n ";return D}function f(D,C){return"Your history is empty. Click 'Get Data' on the left pane to start"}s+='\n<div id="history-controls">\n <div id="history-title-area" class="historyLinks">\n\n <div id="history-name-container" style="float: left;">\n ';s+="\n ";k=t.user;k=k==null||k===false?k:k.email;k=r["if"].call(t,k,{hash:{},inverse:q.program(3,o,B),fn:q.program(1,p,B)});if(k||k===0){s+=k}s+='\n </div>\n\n <a id="history-action-popup" class="tooltip" title="';j=r.local;if(j){k=j.call(t,{hash:{},inverse:q.noop,fn:q.program(5,m,B)})}else{k=t.local;k=typeof k===e?k():k}if(!r.local){k=c.call(t,k,{hash:{},inverse:q.noop,fn:q.program(5,m,B)})}if(k||k===0){s+=k}s+='"\n href="javascript:void(0);" style="float: right;">\n <span class="ficon cog large"></span>\n </a>\n <div style="clear: both;"></div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';j=r.nice_size;if(j){k=j.call(t,{hash:{}})}else{k=t.nice_size;k=typeof k===e?k():k}s+=d(k)+"</div>\n ";k=t.user;k=k==null||k===false?k:k.email;k=r["if"].call(t,k,{hash:{},inverse:q.noop,fn:q.program(7,l,B)});if(k||k===0){s+=k}s+='\n <div style="clear: both;"></div>\n </div>\n\n ';k=t.deleted;k=r["if"].call(t,k,{hash:{},inverse:q.noop,fn:q.program(12,z,B)});if(k||k===0){s+=k}s+="\n\n ";s+="\n ";s+="\n ";k=t.user;k=k==null||k===false?k:k.email;k=r["if"].call(t,k,{hash:{},inverse:q.noop,fn:q.program(16,w,B)});if(k||k===0){s+=k}s+="\n\n ";k=t.message;k=r["if"].call(t,k,{hash:{},inverse:q.noop,fn:q.program(21,h,B)});if(k||k===0){s+=k}s+='\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.\n </div>\n </div>\n</div>\n\n<div id="';j=r.id;if(j){k=j.call(t,{hash:{}})}else{k=t.id;k=typeof k===e?k():k}s+=d(k)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';j=r.local;if(j){k=j.call(t,{hash:{},inverse:q.noop,fn:q.program(23,f,B)})}else{k=t.local;k=typeof k===e?k():k}if(!r.local){k=c.call(t,k,{hash:{},inverse:q.noop,fn:q.program(23,f,B)})}if(k||k===0){s+=k}s+="\n</div>";return s})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(k,A,y,q,I){y=y||k.helpers;var z="",n,m,v=this,e="function",c=y.blockHelperMissing,d=this.escapeExpression;function t(N,M){var K="",L,J;K+='\n <div id="history-name" class="tooltip editable-text"\n title="';J=y.local;if(J){L=J.call(N,{hash:{},inverse:v.noop,fn:v.program(2,s,M)})}else{L=N.local;L=typeof L===e?L():L}if(!y.local){L=c.call(N,L,{hash:{},inverse:v.noop,fn:v.program(2,s,M)})}if(L||L===0){K+=L}K+='">';J=y.name;if(J){L=J.call(N,{hash:{}})}else{L=N.name;L=typeof L===e?L():L}K+=d(L)+"</div>\n ";return K}function s(K,J){return"Click to rename history"}function r(N,M){var K="",L,J;K+='\n <div id="history-name" class="tooltip"\n title="';J=y.local;if(J){L=J.call(N,{hash:{},inverse:v.noop,fn:v.program(5,p,M)})}else{L=N.local;L=typeof L===e?L():L}if(!y.local){L=c.call(N,L,{hash:{},inverse:v.noop,fn:v.program(5,p,M)})}if(L||L===0){K+=L}K+='">';J=y.name;if(J){L=J.call(N,{hash:{}})}else{L=N.name;L=typeof L===e?L():L}K+=d(L)+"</div>\n ";return K}function p(K,J){return"You must be logged in to edit your history name"}function o(K,J){return"Click to see more actions"}function j(N,M){var K="",L,J;K+='\n <div id="history-secondary-links" style="float: right;">\n <a id="history-tag" title="';J=y.local;if(J){L=J.call(N,{hash:{},inverse:v.noop,fn:v.program(10,H,M)})}else{L=N.local;L=typeof L===e?L():L}if(!y.local){L=c.call(N,L,{hash:{},inverse:v.noop,fn:v.program(10,H,M)})}if(L||L===0){K+=L}K+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';J=y.local;if(J){L=J.call(N,{hash:{},inverse:v.noop,fn:v.program(12,G,M)})}else{L=N.local;L=typeof L===e?L():L}if(!y.local){L=c.call(N,L,{hash:{},inverse:v.noop,fn:v.program(12,G,M)})}if(L||L===0){K+=L}K+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n </div>\n ';return K}function H(K,J){return"Edit history tags"}function G(K,J){return"Edit history annotation"}function F(N,M){var K="",L,J;K+="\n ";J=y.warningmessagesmall;if(J){L=J.call(N,{hash:{},inverse:v.noop,fn:v.program(15,E,M)})}else{L=N.warningmessagesmall;L=typeof L===e?L():L}if(!y.warningmessagesmall){L=c.call(N,L,{hash:{},inverse:v.noop,fn:v.program(15,E,M)})}if(L||L===0){K+=L}K+="\n ";return K}function E(M,L){var K,J;J=y.local;if(J){K=J.call(M,{hash:{},inverse:v.noop,fn:v.program(16,D,L)})}else{K=M.local;K=typeof K===e?K():K}if(!y.local){K=c.call(M,K,{hash:{},inverse:v.noop,fn:v.program(16,D,L)})}if(K||K===0){return K}else{return""}}function D(K,J){return"You are currently viewing a deleted history!"}function C(N,M){var K="",L,J;K+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>';J=y.local;if(J){L=J.call(N,{hash:{},inverse:v.noop,fn:v.program(19,B,M)})}else{L=N.local;L=typeof L===e?L():L}if(!y.local){L=c.call(N,L,{hash:{},inverse:v.noop,fn:v.program(19,B,M)})}if(L||L===0){K+=L}K+=':</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>';J=y.local;if(J){L=J.call(N,{hash:{},inverse:v.noop,fn:v.program(21,l,M)})}else{L=N.local;L=typeof L===e?L():L}if(!y.local){L=c.call(N,L,{hash:{},inverse:v.noop,fn:v.program(21,l,M)})}if(L||L===0){K+=L}K+=':</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text"\n title="';J=y.local;if(J){L=J.call(N,{hash:{},inverse:v.noop,fn:v.program(23,i,M)})}else{L=N.local;L=typeof L===e?L():L}if(!y.local){L=c.call(N,L,{hash:{},inverse:v.noop,fn:v.program(23,i,M)})}if(L||L===0){K+=L}K+='">\n ';L=N.annotation;L=y["if"].call(N,L,{hash:{},inverse:v.program(27,g,M),fn:v.program(25,h,M)});if(L||L===0){K+=L}K+="\n </div>\n </div>\n </div>\n </div>\n ";return K}function B(K,J){return"Tags"}function l(K,J){return"Annotation"}function i(K,J){return"Click to edit annotation"}function h(N,M){var K="",L,J;K+="\n ";J=y.annotation;if(J){L=J.call(N,{hash:{}})}else{L=N.annotation;L=typeof L===e?L():L}K+=d(L)+"\n ";return K}function g(N,M){var K="",L,J;K+="\n <em>";J=y.local;if(J){L=J.call(N,{hash:{},inverse:v.noop,fn:v.program(28,f,M)})}else{L=N.local;L=typeof L===e?L():L}if(!y.local){L=c.call(N,L,{hash:{},inverse:v.noop,fn:v.program(28,f,M)})}if(L||L===0){K+=L}K+="</em>\n ";return K}function f(K,J){return"Describe or add notes to history"}function x(N,M){var K="",L,J;K+='\n <div id="message-container">\n <div class="';J=y.status;if(J){L=J.call(N,{hash:{}})}else{L=N.status;L=typeof L===e?L():L}K+=d(L)+'message">\n ';J=y.message;if(J){L=J.call(N,{hash:{}})}else{L=N.message;L=typeof L===e?L():L}K+=d(L)+"\n </div><br />\n </div>\n ";return K}function w(K,J){return"You are over your disk quota.\n Tool execution is on hold until your disk usage drops below your allocated quota."}function u(K,J){return"Your history is empty. Click 'Get Data' on the left pane to start"}z+='\n<div id="history-controls">\n <div id="history-title-area" class="historyLinks">\n\n <div id="history-name-container" style="float: left;">\n ';z+="\n ";n=A.user;n=n==null||n===false?n:n.email;n=y["if"].call(A,n,{hash:{},inverse:v.program(4,r,I),fn:v.program(1,t,I)});if(n||n===0){z+=n}z+='\n </div>\n\n <a id="history-action-popup" class="tooltip" title="';m=y.local;if(m){n=m.call(A,{hash:{},inverse:v.noop,fn:v.program(7,o,I)})}else{n=A.local;n=typeof n===e?n():n}if(!y.local){n=c.call(A,n,{hash:{},inverse:v.noop,fn:v.program(7,o,I)})}if(n||n===0){z+=n}z+='"\n href="javascript:void(0);" style="float: right;">\n <span class="ficon cog large"></span>\n </a>\n <div style="clear: both;"></div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';m=y.nice_size;if(m){n=m.call(A,{hash:{}})}else{n=A.nice_size;n=typeof n===e?n():n}z+=d(n)+"</div>\n ";n=A.user;n=n==null||n===false?n:n.email;n=y["if"].call(A,n,{hash:{},inverse:v.noop,fn:v.program(9,j,I)});if(n||n===0){z+=n}z+='\n <div style="clear: both;"></div>\n </div>\n\n ';n=A.deleted;n=y["if"].call(A,n,{hash:{},inverse:v.noop,fn:v.program(14,F,I)});if(n||n===0){z+=n}z+="\n\n ";z+="\n ";z+="\n ";n=A.user;n=n==null||n===false?n:n.email;n=y["if"].call(A,n,{hash:{},inverse:v.noop,fn:v.program(18,C,I)});if(n||n===0){z+=n}z+="\n\n ";n=A.message;n=y["if"].call(A,n,{hash:{},inverse:v.noop,fn:v.program(30,x,I)});if(n||n===0){z+=n}z+='\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n ';m=y.local;if(m){n=m.call(A,{hash:{},inverse:v.noop,fn:v.program(32,w,I)})}else{n=A.local;n=typeof n===e?n():n}if(!y.local){n=c.call(A,n,{hash:{},inverse:v.noop,fn:v.program(32,w,I)})}if(n||n===0){z+=n}z+='\n </div>\n </div>\n</div>\n\n<div id="';m=y.id;if(m){n=m.call(A,{hash:{}})}else{n=A.id;n=typeof n===e?n():n}z+=d(n)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';m=y.local;if(m){n=m.call(A,{hash:{},inverse:v.noop,fn:v.program(34,u,I)})}else{n=A.local;n=typeof n===e?n():n}if(!y.local){n=c.call(A,n,{hash:{},inverse:v.noop,fn:v.program(34,u,I)})}if(n||n===0){z+=n}z+="\n</div>";return z})})();
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/templates/compiled/template-history-tagArea.js
--- a/static/scripts/packed/templates/compiled/template-history-tagArea.js
+++ b/static/scripts/packed/templates/compiled/template-history-tagArea.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-tagArea"]=b(function(g,h,e,d,f){e=e||g.helpers;var c="";c+='\n<div class="tag-area" style="display: none;">\n <strong>Tags:</strong>\n <div class="tag-elt">\n </div>\n</div>';return c})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-tagArea"]=b(function(f,l,e,k,j){e=e||f.helpers;var i="",c,h,n=this,g="function",m=e.blockHelperMissing;function d(p,o){return"Tags"}i+='\n<div class="tag-area" style="display: none;">\n <strong>';h=e.local;if(h){c=h.call(l,{hash:{},inverse:n.noop,fn:n.program(1,d,j)})}else{c=l.local;c=typeof c===g?c():c}if(!e.local){c=m.call(l,c,{hash:{},inverse:n.noop,fn:n.program(1,d,j)})}if(c||c===0){i+=c}i+=':</strong>\n <div class="tag-elt">\n </div>\n</div>';return i})})();
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/templates/compiled/template-history-warning-messages.js
--- a/static/scripts/packed/templates/compiled/template-history-warning-messages.js
+++ b/static/scripts/packed/templates/compiled/template-history-warning-messages.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-warning-messages"]=b(function(f,s,q,k,w){q=q||f.helpers;var r="",h,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(z,y){var x;x=z.purged;x=q.unless.call(z,x,{hash:{},inverse:p.noop,fn:p.program(2,n,y)});if(x||x===0){return x}else{return""}}function n(B,A){var y="",z,x;y+="\n";x=q.warningmessagesmall;if(x){z=x.call(B,{hash:{},inverse:p.noop,fn:p.program(3,m,A)})}else{z=B.warningmessagesmall;z=typeof z===e?z():z}if(!q.warningmessagesmall){z=c.call(B,z,{hash:{},inverse:p.noop,fn:p.program(3,m,A)})}if(z||z===0){y+=z}y+="\n";return y}function m(A,z){var x="",y;x+="\n This dataset has been deleted.\n ";y=A.urls;y=y==null||y===false?y:y.undelete;y=q["if"].call(A,y,{hash:{},inverse:p.noop,fn:p.program(4,l,z)});if(y||y===0){x+=y}x+="\n";return x}function l(B,A){var y="",z,x;y+='\n Click <a href="';z=B.urls;z=z==null||z===false?z:z.undelete;z=typeof z===e?z():z;y+=d(z)+'" class="historyItemUndelete" id="historyItemUndeleter-';x=q.id;if(x){z=x.call(B,{hash:{}})}else{z=B.id;z=typeof z===e?z():z}y+=d(z)+'"\n target="galaxy_history">here</a> to undelete it\n ';z=B.urls;z=z==null||z===false?z:z.purge;z=q["if"].call(B,z,{hash:{},inverse:p.noop,fn:p.program(5,j,A)});if(z||z===0){y+=z}y+="\n ";return y}function j(B,A){var y="",z,x;y+='\n or <a href="';z=B.urls;z=z==null||z===false?z:z.purge;z=typeof z===e?z():z;y+=d(z)+'" class="historyItemPurge" id="historyItemPurger-';x=q.id;if(x){z=x.call(B,{hash:{}})}else{z=B.id;z=typeof z===e?z():z}y+=d(z)+'"\n target="galaxy_history">here</a> to immediately remove it from disk\n ';return y}function i(A,z){var y,x;x=q.warningmessagesmall;if(x){y=x.call(A,{hash:{},inverse:p.noop,fn:p.program(8,g,z)})}else{y=A.warningmessagesmall;y=typeof y===e?y():y}if(!q.warningmessagesmall){y=c.call(A,y,{hash:{},inverse:p.noop,fn:p.program(8,g,z)})}if(y||y===0){return y}else{return""}}function g(y,x){return"\n This dataset has been deleted and removed from disk.\n"}function v(A,z){var y,x;x=q.warningmessagesmall;if(x){y=x.call(A,{hash:{},inverse:p.noop,fn:p.program(11,u,z)})}else{y=A.warningmessagesmall;y=typeof y===e?y():y}if(!q.warningmessagesmall){y=c.call(A,y,{hash:{},inverse:p.noop,fn:p.program(11,u,z)})}if(y||y===0){return y}else{return""}}function u(A,z){var x="",y;x+="\n This dataset has been hidden.\n ";y=A.urls;y=y==null||y===false?y:y.unhide;y=q["if"].call(A,y,{hash:{},inverse:p.noop,fn:p.program(12,t,z)});if(y||y===0){x+=y}x+="\n";return x}function t(B,A){var y="",z,x;y+='\n Click <a href="';z=B.urls;z=z==null||z===false?z:z.unhide;z=typeof z===e?z():z;y+=d(z)+'" class="historyItemUnhide" id="historyItemUnhider-';x=q.id;if(x){z=x.call(B,{hash:{}})}else{z=B.id;z=typeof z===e?z():z}y+=d(z)+'"\n target="galaxy_history">here</a> to unhide it\n ';return y}h=s.deleted;h=q["if"].call(s,h,{hash:{},inverse:p.noop,fn:p.program(1,o,w)});if(h||h===0){r+=h}r+="\n\n";h=s.purged;h=q["if"].call(s,h,{hash:{},inverse:p.noop,fn:p.program(7,i,w)});if(h||h===0){r+=h}r+="\n\n";h=s.visible;h=q.unless.call(s,h,{hash:{},inverse:p.noop,fn:p.program(10,v,w)});if(h||h===0){r+=h}return r})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-warning-messages"]=b(function(g,s,q,k,z){q=q||g.helpers;var r="",h,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var A;A=C.purged;A=q.unless.call(C,A,{hash:{},inverse:p.noop,fn:p.program(2,n,B)});if(A||A===0){return A}else{return""}}function n(E,D){var B="",C,A;B+="\n";A=q.warningmessagesmall;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(3,m,D)})}else{C=E.warningmessagesmall;C=typeof C===e?C():C}if(!q.warningmessagesmall){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(3,m,D)})}if(C||C===0){B+=C}B+="\n";return B}function m(E,D){var B="",C,A;B+="\n ";A=q.local;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(4,l,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(4,l,D)})}if(C||C===0){B+=C}B+="\n ";C=E.urls;C=C==null||C===false?C:C.undelete;C=q["if"].call(E,C,{hash:{},inverse:p.noop,fn:p.program(6,j,D)});if(C||C===0){B+=C}B+="\n";return B}function l(B,A){return"This dataset has been deleted."}function j(E,D){var B="",C,A;B+="\n ";B+='\n Click <a href="';C=E.urls;C=C==null||C===false?C:C.undelete;C=typeof C===e?C():C;B+=d(C)+'" class="historyItemUndelete" id="historyItemUndeleter-';A=q.id;if(A){C=A.call(E,{hash:{}})}else{C=E.id;C=typeof C===e?C():C}B+=d(C)+'"\n target="galaxy_history">here</a> to undelete it\n ';C=E.urls;C=C==null||C===false?C:C.purge;C=q["if"].call(E,C,{hash:{},inverse:p.noop,fn:p.program(7,i,D)});if(C||C===0){B+=C}B+="\n ";return B}function i(E,D){var B="",C,A;B+='\n or <a href="';C=E.urls;C=C==null||C===false?C:C.purge;C=typeof C===e?C():C;B+=d(C)+'" class="historyItemPurge" id="historyItemPurger-';A=q.id;if(A){C=A.call(E,{hash:{}})}else{C=E.id;C=typeof C===e?C():C}B+=d(C)+'"\n target="galaxy_history">here</a> to immediately remove it from disk\n ';return B}function f(D,C){var B,A;A=q.warningmessagesmall;if(A){B=A.call(D,{hash:{},inverse:p.noop,fn:p.program(10,y,C)})}else{B=D.warningmessagesmall;B=typeof B===e?B():B}if(!q.warningmessagesmall){B=c.call(D,B,{hash:{},inverse:p.noop,fn:p.program(10,y,C)})}if(B||B===0){return B}else{return""}}function y(E,D){var B="",C,A;B+="\n ";A=q.local;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(11,x,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(11,x,D)})}if(C||C===0){B+=C}B+="\n";return B}function x(B,A){return"This dataset has been deleted and removed from disk."}function w(D,C){var B,A;A=q.warningmessagesmall;if(A){B=A.call(D,{hash:{},inverse:p.noop,fn:p.program(14,v,C)})}else{B=D.warningmessagesmall;B=typeof B===e?B():B}if(!q.warningmessagesmall){B=c.call(D,B,{hash:{},inverse:p.noop,fn:p.program(14,v,C)})}if(B||B===0){return B}else{return""}}function v(E,D){var B="",C,A;B+="\n ";A=q.local;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(15,u,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(15,u,D)})}if(C||C===0){B+=C}B+="\n ";C=E.urls;C=C==null||C===false?C:C.unhide;C=q["if"].call(E,C,{hash:{},inverse:p.noop,fn:p.program(17,t,D)});if(C||C===0){B+=C}B+="\n";return B}function u(B,A){return"This dataset has been hidden."}function t(E,D){var B="",C,A;B+='\n Click <a href="';C=E.urls;C=C==null||C===false?C:C.unhide;C=typeof C===e?C():C;B+=d(C)+'" class="historyItemUnhide" id="historyItemUnhider-';A=q.id;if(A){C=A.call(E,{hash:{}})}else{C=E.id;C=typeof C===e?C():C}B+=d(C)+'"\n target="galaxy_history">here</a> to unhide it\n ';return B}h=s.deleted;h=q["if"].call(s,h,{hash:{},inverse:p.noop,fn:p.program(1,o,z)});if(h||h===0){r+=h}r+="\n\n";h=s.purged;h=q["if"].call(s,h,{hash:{},inverse:p.noop,fn:p.program(9,f,z)});if(h||h===0){r+=h}r+="\n\n";h=s.visible;h=q.unless.call(s,h,{hash:{},inverse:p.noop,fn:p.program(13,w,z)});if(h||h===0){r+=h}return r})})();
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/templates/compiled/template-user-quotaMeter-quota.js
--- a/static/scripts/packed/templates/compiled/template-user-quotaMeter-quota.js
+++ b/static/scripts/packed/templates/compiled/template-user-quotaMeter-quota.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-user-quotaMeter-quota"]=b(function(e,l,d,k,j){d=d||e.helpers;var h="",c,g,f="function",i=this.escapeExpression;h+='<div id="quota-meter" class="quota-meter progress">\n <div id="quota-meter-bar" class="quota-meter-bar bar" style="width: ';g=d.quota_percent;if(g){c=g.call(l,{hash:{}})}else{c=l.quota_percent;c=typeof c===f?c():c}h+=i(c)+'%"></div>\n ';h+='\n <div id="quota-meter-text" class="quota-meter-text"style="top: 6px">\n Using ';g=d.quota_percent;if(g){c=g.call(l,{hash:{}})}else{c=l.quota_percent;c=typeof c===f?c():c}h+=i(c)+"%\n </div>\n</div>";return h})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-user-quotaMeter-quota"]=b(function(f,m,e,l,k){e=e||f.helpers;var i="",c,h,g="function",j=this.escapeExpression,o=this,n=e.blockHelperMissing;function d(q,p){return"Using"}i+='<div id="quota-meter" class="quota-meter progress">\n <div id="quota-meter-bar" class="quota-meter-bar bar" style="width: ';h=e.quota_percent;if(h){c=h.call(m,{hash:{}})}else{c=m.quota_percent;c=typeof c===g?c():c}i+=j(c)+'%"></div>\n ';i+='\n <div id="quota-meter-text" class="quota-meter-text"style="top: 6px">\n ';h=e.local;if(h){c=h.call(m,{hash:{},inverse:o.noop,fn:o.program(1,d,k)})}else{c=m.local;c=typeof c===g?c():c}if(!e.local){c=n.call(m,c,{hash:{},inverse:o.noop,fn:o.program(1,d,k)})}if(c||c===0){i+=c}i+=" ";h=e.quota_percent;if(h){c=h.call(m,{hash:{}})}else{c=m.quota_percent;c=typeof c===g?c():c}i+=j(c)+"%\n </div>\n</div>";return i})})();
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/templates/compiled/template-user-quotaMeter-usage.js
--- a/static/scripts/packed/templates/compiled/template-user-quotaMeter-usage.js
+++ b/static/scripts/packed/templates/compiled/template-user-quotaMeter-usage.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-user-quotaMeter-usage"]=b(function(e,l,d,k,j){d=d||e.helpers;var h="",c,g,f="function",i=this.escapeExpression;h+='\n<div id="quota-meter" class="quota-meter" style="background-color: transparent">\n <div id="quota-meter-text" class="quota-meter-text" style="top: 6px; color: white">\n Using ';g=d.nice_total_disk_usage;if(g){c=g.call(l,{hash:{}})}else{c=l.nice_total_disk_usage;c=typeof c===f?c():c}h+=i(c)+"\n </div>\n</div>";return h})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-user-quotaMeter-usage"]=b(function(f,m,e,l,k){e=e||f.helpers;var i="",c,h,o=this,g="function",n=e.blockHelperMissing,j=this.escapeExpression;function d(q,p){return"Using"}i+='\n<div id="quota-meter" class="quota-meter" style="background-color: transparent">\n <div id="quota-meter-text" class="quota-meter-text" style="top: 6px; color: white">\n ';h=e.local;if(h){c=h.call(m,{hash:{},inverse:o.noop,fn:o.program(1,d,k)})}else{c=m.local;c=typeof c===g?c():c}if(!e.local){c=n.call(m,c,{hash:{},inverse:o.noop,fn:o.program(1,d,k)})}if(c||c===0){i+=c}i+=" ";h=e.nice_total_disk_usage;if(h){c=h.call(m,{hash:{}})}else{c=m.nice_total_disk_usage;c=typeof c===g?c():c}i+=j(c)+"\n </div>\n</div>";return i})})();
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/compiled/template-history-annotationArea.js
--- a/static/scripts/templates/compiled/template-history-annotationArea.js
+++ b/static/scripts/templates/compiled/template-history-annotationArea.js
@@ -2,17 +2,38 @@
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-history-annotationArea'] = template(function (Handlebars,depth0,helpers,partials,data) {
helpers = helpers || Handlebars.helpers;
- var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression;
+ var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
+function program1(depth0,data) {
+
+
+ return "Annotation";}
+
+function program3(depth0,data) {
+
+
+ return "Edit dataset annotation";}
buffer += "\n<div id=\"";
foundHelper = helpers.id;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "-annotation-area\" class=\"annotation-area\" style=\"display: none;\">\n <strong>Annotation:</strong>\n <div id=\"";
+ buffer += escapeExpression(stack1) + "-annotation-area\" class=\"annotation-area\" style=\"display: none;\">\n <strong>";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += ":</strong>\n <div id=\"";
foundHelper = helpers.id;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "-anotation-elt\" class=\"annotation-elt tooltip editable-text\"\n style=\"margin: 1px 0px 1px 0px\" title=\"Edit dataset annotation\">\n </div>\n</div>";
+ buffer += escapeExpression(stack1) + "-anotation-elt\" class=\"annotation-elt tooltip editable-text\"\n style=\"margin: 1px 0px 1px 0px\" title=\"";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\">\n </div>\n</div>";
return buffer;});
})();
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/compiled/template-history-displayApps.js
--- a/static/scripts/templates/compiled/template-history-displayApps.js
+++ b/static/scripts/templates/compiled/template-history-displayApps.js
@@ -2,7 +2,7 @@
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-history-displayApps'] = template(function (Handlebars,depth0,helpers,partials,data) {
helpers = helpers || Handlebars.helpers;
- var stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
+ var stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
function program1(depth0,data) {
@@ -29,11 +29,20 @@
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.href; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
buffer += escapeExpression(stack1) + "\">";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "</a>\n ";
+ return buffer;}
+function program3(depth0,data) {
+
+ var stack1, foundHelper;
foundHelper = helpers.text;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.text; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "</a>\n ";
- return buffer;}
+ return escapeExpression(stack1);}
stack1 = depth0.displayApps;
stack1 = helpers.each.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)});
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/compiled/template-history-downloadLinks.js
--- a/static/scripts/templates/compiled/template-history-downloadLinks.js
+++ b/static/scripts/templates/compiled/template-history-downloadLinks.js
@@ -2,7 +2,7 @@
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-history-downloadLinks'] = template(function (Handlebars,depth0,helpers,partials,data) {
helpers = helpers || Handlebars.helpers;
- var stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
+ var stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
function program1(depth0,data) {
@@ -16,10 +16,22 @@
stack1 = depth0.urls;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.download;
stack1 = typeof stack1 === functionType ? stack1() : stack1;
- buffer += escapeExpression(stack1) + "\">Download Dataset</a>\n <a>Additional Files</a>\n ";
+ buffer += escapeExpression(stack1) + "\">";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "</a>\n <a>";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "</a>\n ";
stack1 = depth0.urls;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.meta_download;
- stack1 = helpers.each.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)});
+ stack1 = helpers.each.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(6, program6, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n</div>\n<div style=\"float:left;\" class=\"menubutton split popup\" id=\"dataset-";
foundHelper = helpers.id;
@@ -29,36 +41,77 @@
stack1 = depth0.urls;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.download;
stack1 = typeof stack1 === functionType ? stack1() : stack1;
- buffer += escapeExpression(stack1) + "\" title=\"Download\" class=\"icon-button disk tooltip\"></a>\n</div>\n";
+ buffer += escapeExpression(stack1) + "\" title=\"";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\" class=\"icon-button disk tooltip\"></a>\n</div>\n";
return buffer;}
function program2(depth0,data) {
+
+ return "Download Dataset";}
+
+function program4(depth0,data) {
+
+
+ return "Additional Files";}
+
+function program6(depth0,data) {
+
var buffer = "", stack1, foundHelper;
buffer += "\n <a class=\"action-button\" href=\"";
foundHelper = helpers.url;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.url; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "\">Download ";
+ buffer += escapeExpression(stack1) + "\">";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += " ";
foundHelper = helpers.file_type;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.file_type; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
buffer += escapeExpression(stack1) + "</a>\n ";
return buffer;}
+function program7(depth0,data) {
+
+
+ return "Download";}
-function program4(depth0,data) {
+function program9(depth0,data) {
- var buffer = "", stack1;
+
+ return "Download";}
+
+function program11(depth0,data) {
+
+ var buffer = "", stack1, foundHelper;
buffer += "\n";
buffer += "\n<a href=\"";
stack1 = depth0.urls;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.download;
stack1 = typeof stack1 === functionType ? stack1() : stack1;
- buffer += escapeExpression(stack1) + "\" title=\"Download\" class=\"icon-button disk tooltip\"></a>\n";
+ buffer += escapeExpression(stack1) + "\" title=\"";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\" class=\"icon-button disk tooltip\"></a>\n";
return buffer;}
+function program12(depth0,data) {
+
+
+ return "Download";}
stack1 = depth0.urls;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.meta_download;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(4, program4, data),fn:self.program(1, program1, data)});
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(11, program11, data),fn:self.program(1, program1, data)});
if(stack1 || stack1 === 0) { return stack1; }
else { return ''; }});
})();
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/compiled/template-history-failedMetaData.js
--- a/static/scripts/templates/compiled/template-history-failedMetaData.js
+++ b/static/scripts/templates/compiled/template-history-failedMetaData.js
@@ -2,17 +2,27 @@
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-history-failedMetaData'] = template(function (Handlebars,depth0,helpers,partials,data) {
helpers = helpers || Handlebars.helpers;
- var stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
+ var stack1, foundHelper, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing, escapeExpression=this.escapeExpression;
function program1(depth0,data) {
- var buffer = "", stack1;
- buffer += "\nAn error occurred setting the metadata for this dataset.\nYou may be able to <a href=\"";
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\nYou may be able to <a href=\"";
stack1 = depth0.urls;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.edit;
stack1 = typeof stack1 === functionType ? stack1() : stack1;
buffer += escapeExpression(stack1) + "\" target=\"galaxy_main\">set it manually or retry auto-detection</a>.\n";
return buffer;}
+function program2(depth0,data) {
+
+
+ return "An error occurred setting the metadata for this dataset.";}
foundHelper = helpers.warningmessagesmall;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/compiled/template-history-historyPanel.js
--- a/static/scripts/templates/compiled/template-history-historyPanel.js
+++ b/static/scripts/templates/compiled/template-history-historyPanel.js
@@ -2,95 +2,148 @@
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-history-historyPanel'] = template(function (Handlebars,depth0,helpers,partials,data) {
helpers = helpers || Handlebars.helpers;
- var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
+ var buffer = "", stack1, foundHelper, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing, escapeExpression=this.escapeExpression;
function program1(depth0,data) {
var buffer = "", stack1, foundHelper;
- buffer += "\n <div id=\"history-name\" class=\"tooltip editable-text\"\n title=\"Click to rename history\">";
+ buffer += "\n <div id=\"history-name\" class=\"tooltip editable-text\"\n title=\"";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\">";
foundHelper = helpers.name;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
buffer += escapeExpression(stack1) + "</div>\n ";
return buffer;}
+function program2(depth0,data) {
+
+
+ return "Click to rename history";}
-function program3(depth0,data) {
+function program4(depth0,data) {
var buffer = "", stack1, foundHelper;
- buffer += "\n <div id=\"history-name\" class=\"tooltip\"\n title=\"You must be logged in to edit your history name\">";
+ buffer += "\n <div id=\"history-name\" class=\"tooltip\"\n title=\"";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\">";
foundHelper = helpers.name;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
buffer += escapeExpression(stack1) + "</div>\n ";
return buffer;}
+function program5(depth0,data) {
+
+
+ return "You must be logged in to edit your history name";}
-function program5(depth0,data) {
+function program7(depth0,data) {
return "Click to see more actions";}
-function program7(depth0,data) {
+function program9(depth0,data) {
var buffer = "", stack1, foundHelper;
buffer += "\n <div id=\"history-secondary-links\" style=\"float: right;\">\n <a id=\"history-tag\" title=\"";
foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(8, program8, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(8, program8, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\"\n class=\"icon-button tags tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n <a id=\"history-annotate\" title=\"";
- foundHelper = helpers.local;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); }
else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); }
if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\"\n class=\"icon-button tags tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n <a id=\"history-annotate\" title=\"";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\"\n class=\"icon-button annotate tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n </div>\n ";
return buffer;}
-function program8(depth0,data) {
+function program10(depth0,data) {
return "Edit history tags";}
-function program10(depth0,data) {
+function program12(depth0,data) {
return "Edit history annotation";}
-function program12(depth0,data) {
+function program14(depth0,data) {
var buffer = "", stack1, foundHelper;
buffer += "\n ";
foundHelper = helpers.warningmessagesmall;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(13, program13, data)}); }
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(15, program15, data)}); }
else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(13, program13, data)}); }
+ if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(15, program15, data)}); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n ";
return buffer;}
-function program13(depth0,data) {
+function program15(depth0,data) {
var stack1, foundHelper;
foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); }
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(16, program16, data)}); }
else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(16, program16, data)}); }
if(stack1 || stack1 === 0) { return stack1; }
else { return ''; }}
-function program14(depth0,data) {
+function program16(depth0,data) {
return "You are currently viewing a deleted history!";}
-function program16(depth0,data) {
+function program18(depth0,data) {
- var buffer = "", stack1;
- buffer += "\n <div id=\"history-tag-annotation\">\n\n <div id=\"history-tag-area\" style=\"display: none\">\n <strong>Tags:</strong>\n <div class=\"tag-elt\"></div>\n </div>\n\n <div id=\"history-annotation-area\" style=\"display: none\">\n <strong>Annotation / Notes:</strong>\n <div id=\"history-annotation-container\">\n <div id=\"history-annotation\" class=\"tooltip editable-text\" title=\"Click to edit annotation\">\n ";
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n <div id=\"history-tag-annotation\">\n\n <div id=\"history-tag-area\" style=\"display: none\">\n <strong>";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(19, program19, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(19, program19, data)}); }
+ 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>";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(21, program21, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(21, program21, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += ":</strong>\n <div id=\"history-annotation-container\">\n <div id=\"history-annotation\" class=\"tooltip editable-text\"\n title=\"";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(23, program23, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(23, program23, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\">\n ";
stack1 = depth0.annotation;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(19, program19, data),fn:self.program(17, program17, data)});
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(27, program27, data),fn:self.program(25, program25, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n </div>\n </div>\n </div>\n </div>\n ";
return buffer;}
-function program17(depth0,data) {
+function program19(depth0,data) {
+
+
+ return "Tags";}
+
+function program21(depth0,data) {
+
+
+ return "Annotation";}
+
+function program23(depth0,data) {
+
+
+ return "Click to edit annotation";}
+
+function program25(depth0,data) {
var buffer = "", stack1, foundHelper;
buffer += "\n ";
@@ -100,12 +153,23 @@
buffer += escapeExpression(stack1) + "\n ";
return buffer;}
-function program19(depth0,data) {
+function program27(depth0,data) {
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n <em>";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(28, program28, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(28, program28, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "</em>\n ";
+ return buffer;}
+function program28(depth0,data) {
- return "\n <em>Describe or add notes to history</em>\n ";}
+
+ return "Describe or add notes to history";}
-function program21(depth0,data) {
+function program30(depth0,data) {
var buffer = "", stack1, foundHelper;
buffer += "\n <div id=\"message-container\">\n <div class=\"";
@@ -119,7 +183,12 @@
buffer += escapeExpression(stack1) + "\n </div><br />\n </div>\n ";
return buffer;}
-function program23(depth0,data) {
+function program32(depth0,data) {
+
+
+ return "You are over your disk quota.\n 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";}
@@ -128,13 +197,13 @@
buffer += "\n ";
stack1 = depth0.user;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data)});
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(4, program4, data),fn:self.program(1, program1, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n </div>\n\n <a id=\"history-action-popup\" class=\"tooltip\" title=\"";
foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)}); }
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); }
else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)}); }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\"\n href=\"javascript:void(0);\" style=\"float: right;\">\n <span class=\"ficon cog large\"></span>\n </a>\n <div style=\"clear: both;\"></div>\n </div>\n\n <div id=\"history-subtitle-area\">\n <div id=\"history-size\" style=\"float:left;\">";
foundHelper = helpers.nice_size;
@@ -143,32 +212,38 @@
buffer += escapeExpression(stack1) + "</div>\n ";
stack1 = depth0.user;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)});
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n <div style=\"clear: both;\"></div>\n </div>\n\n ";
stack1 = depth0.deleted;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)});
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n\n ";
buffer += "\n ";
buffer += "\n ";
stack1 = depth0.user;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(16, program16, data)});
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(18, program18, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n\n ";
stack1 = depth0.message;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(21, program21, data)});
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(30, program30, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n\n <div id=\"quota-message-container\" style=\"display: none\">\n <div id=\"quota-message\" class=\"errormessage\">\n You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.\n </div>\n </div>\n</div>\n\n<div id=\"";
+ buffer += "\n\n <div id=\"quota-message-container\" style=\"display: none\">\n <div id=\"quota-message\" class=\"errormessage\">\n ";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(32, program32, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(32, program32, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n </div>\n </div>\n</div>\n\n<div id=\"";
foundHelper = helpers.id;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
buffer += escapeExpression(stack1) + "-datasets\" class=\"history-datasets-list\"></div>\n\n<div class=\"infomessagesmall\" id=\"emptyHistoryMessage\" style=\"display: none;\">\n ";
foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(23, program23, data)}); }
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(34, program34, data)}); }
else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(23, program23, data)}); }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(34, program34, data)}); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n</div>";
return buffer;});
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/compiled/template-history-tagArea.js
--- a/static/scripts/templates/compiled/template-history-tagArea.js
+++ b/static/scripts/templates/compiled/template-history-tagArea.js
@@ -2,9 +2,19 @@
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-history-tagArea'] = template(function (Handlebars,depth0,helpers,partials,data) {
helpers = helpers || Handlebars.helpers;
- var buffer = "";
+ var buffer = "", stack1, foundHelper, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing;
+function program1(depth0,data) {
+
+
+ return "Tags";}
- buffer += "\n<div class=\"tag-area\" style=\"display: none;\">\n <strong>Tags:</strong>\n <div class=\"tag-elt\">\n </div>\n</div>";
+ buffer += "\n<div class=\"tag-area\" style=\"display: none;\">\n <strong>";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += ":</strong>\n <div class=\"tag-elt\">\n </div>\n</div>";
return buffer;});
})();
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/compiled/template-history-warning-messages.js
--- a/static/scripts/templates/compiled/template-history-warning-messages.js
+++ b/static/scripts/templates/compiled/template-history-warning-messages.js
@@ -24,17 +24,29 @@
return buffer;}
function program3(depth0,data) {
- var buffer = "", stack1;
- buffer += "\n This dataset has been deleted.\n ";
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n ";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n ";
stack1 = depth0.urls;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.undelete;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)});
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(6, program6, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n";
return buffer;}
function program4(depth0,data) {
+
+ return "This dataset has been deleted.";}
+
+function program6(depth0,data) {
+
var buffer = "", stack1, foundHelper;
+ buffer += "\n ";
buffer += "\n Click <a href=\"";
stack1 = depth0.urls;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.undelete;
@@ -46,11 +58,11 @@
buffer += escapeExpression(stack1) + "\"\n target=\"galaxy_history\">here</a> to undelete it\n ";
stack1 = depth0.urls;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.purge;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)});
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n ";
return buffer;}
-function program5(depth0,data) {
+function program7(depth0,data) {
var buffer = "", stack1, foundHelper;
buffer += "\n or <a href=\"";
@@ -64,40 +76,62 @@
buffer += escapeExpression(stack1) + "\"\n target=\"galaxy_history\">here</a> to immediately remove it from disk\n ";
return buffer;}
-function program7(depth0,data) {
+function program9(depth0,data) {
var stack1, foundHelper;
foundHelper = helpers.warningmessagesmall;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(8, program8, data)}); }
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); }
else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(8, program8, data)}); }
+ if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); }
if(stack1 || stack1 === 0) { return stack1; }
else { return ''; }}
-function program8(depth0,data) {
+function program10(depth0,data) {
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n ";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n";
+ return buffer;}
+function program11(depth0,data) {
- return "\n This dataset has been deleted and removed from disk.\n";}
+
+ return "This dataset has been deleted and removed from disk.";}
-function program10(depth0,data) {
+function program13(depth0,data) {
var stack1, foundHelper;
foundHelper = helpers.warningmessagesmall;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); }
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); }
else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); }
+ if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); }
if(stack1 || stack1 === 0) { return stack1; }
else { return ''; }}
-function program11(depth0,data) {
+function program14(depth0,data) {
- var buffer = "", stack1;
- buffer += "\n This dataset has been hidden.\n ";
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n ";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(15, program15, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(15, program15, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n ";
stack1 = depth0.urls;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.unhide;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)});
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(17, program17, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n";
return buffer;}
-function program12(depth0,data) {
+function program15(depth0,data) {
+
+
+ return "This dataset has been hidden.";}
+
+function program17(depth0,data) {
var buffer = "", stack1, foundHelper;
buffer += "\n Click <a href=\"";
@@ -116,11 +150,11 @@
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n\n";
stack1 = depth0.purged;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)});
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n\n";
stack1 = depth0.visible;
- stack1 = helpers.unless.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)});
+ stack1 = helpers.unless.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(13, program13, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
return buffer;});
})();
\ No newline at end of file
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/compiled/template-user-quotaMeter-quota.js
--- a/static/scripts/templates/compiled/template-user-quotaMeter-quota.js
+++ b/static/scripts/templates/compiled/template-user-quotaMeter-quota.js
@@ -2,15 +2,25 @@
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-user-quotaMeter-quota'] = template(function (Handlebars,depth0,helpers,partials,data) {
helpers = helpers || Handlebars.helpers;
- var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression;
+ var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
+function program1(depth0,data) {
+
+
+ return "Using";}
buffer += "<div id=\"quota-meter\" class=\"quota-meter progress\">\n <div id=\"quota-meter-bar\" class=\"quota-meter-bar bar\" style=\"width: ";
foundHelper = helpers.quota_percent;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.quota_percent; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
buffer += escapeExpression(stack1) + "%\"></div>\n ";
- buffer += "\n <div id=\"quota-meter-text\" class=\"quota-meter-text\"style=\"top: 6px\">\n Using ";
+ buffer += "\n <div id=\"quota-meter-text\" class=\"quota-meter-text\"style=\"top: 6px\">\n ";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += " ";
foundHelper = helpers.quota_percent;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.quota_percent; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/compiled/template-user-quotaMeter-usage.js
--- a/static/scripts/templates/compiled/template-user-quotaMeter-usage.js
+++ b/static/scripts/templates/compiled/template-user-quotaMeter-usage.js
@@ -2,10 +2,20 @@
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-user-quotaMeter-usage'] = template(function (Handlebars,depth0,helpers,partials,data) {
helpers = helpers || Handlebars.helpers;
- var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression;
+ var buffer = "", stack1, foundHelper, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing, escapeExpression=this.escapeExpression;
+function program1(depth0,data) {
+
+
+ return "Using";}
- buffer += "\n<div id=\"quota-meter\" class=\"quota-meter\" style=\"background-color: transparent\">\n <div id=\"quota-meter-text\" class=\"quota-meter-text\" style=\"top: 6px; color: white\">\n Using ";
+ buffer += "\n<div id=\"quota-meter\" class=\"quota-meter\" style=\"background-color: transparent\">\n <div id=\"quota-meter-text\" class=\"quota-meter-text\" style=\"top: 6px; color: white\">\n ";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += " ";
foundHelper = helpers.nice_total_disk_usage;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.nice_total_disk_usage; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/history-templates.html
--- a/static/scripts/templates/history-templates.html
+++ b/static/scripts/templates/history-templates.html
@@ -1,8 +1,9 @@
<script type="text/template" class="template-history" id="template-history-warning-messages">
{{#if deleted}}{{#unless purged}}
{{#warningmessagesmall}}
- This dataset has been deleted.
+ {{#local}}This dataset has been deleted.{{/local}}
{{#if urls.undelete}}
+ {{! how in the hell would you localize this? }}
Click <a href="{{ urls.undelete }}" class="historyItemUndelete" id="historyItemUndeleter-{{ id }}"
target="galaxy_history">here</a> to undelete it
{{#if urls.purge}}
@@ -14,11 +15,11 @@
{{/unless}}{{/if}}
{{#if purged}}{{#warningmessagesmall}}
- This dataset has been deleted and removed from disk.
+ {{#local}}This dataset has been deleted and removed from disk.{{/local}}
{{/warningmessagesmall}}{{/if}}
{{#unless visible}}{{#warningmessagesmall}}
- This dataset has been hidden.
+ {{#local}}This dataset has been hidden.{{/local}}
{{#if urls.unhide}}
Click <a href="{{ urls.unhide }}" class="historyItemUnhide" id="historyItemUnhider-{{ id }}"
target="galaxy_history">here</a> to unhide it
@@ -48,7 +49,7 @@
<script type="text/template" class="template-history" id="template-history-failedMetaData">
{{#warningmessagesmall}}
-An error occurred setting the metadata for this dataset.
+{{#local}}An error occurred setting the metadata for this dataset.{{/local}}
You may be able to <a href="{{ urls.edit }}" target="galaxy_main">set it manually or retry auto-detection</a>.
{{/warningmessagesmall}}
</script>
@@ -57,25 +58,25 @@
{{#if urls.meta_download}}
{{! this will be built using a popupmenu }}
<div popupmenu="dataset-{{ id }}-popup">
- <a class="action-button" href="{{ urls.download }}">Download Dataset</a>
- <a>Additional Files</a>
+ <a class="action-button" href="{{ urls.download }}">{{#local}}Download Dataset{{/local}}</a>
+ <a>{{#local}}Additional Files{{/local}}</a>
{{#each urls.meta_download}}
- <a class="action-button" href="{{ url }}">Download {{ file_type }}</a>
+ <a class="action-button" href="{{ url }}">{{#local}}Download{{/local}} {{ file_type }}</a>
{{/each}}
</div><div style="float:left;" class="menubutton split popup" id="dataset-{{ id }}-popup">
- <a href="{{ urls.download }}" title="Download" class="icon-button disk tooltip"></a>
+ <a href="{{ urls.download }}" title="{{#local}}Download{{/local}}" class="icon-button disk tooltip"></a></div>
{{else}}
{{! otherwise a simple icon button }}
-<a href="{{ urls.download }}" title="Download" class="icon-button disk tooltip"></a>
+<a href="{{ urls.download }}" title="{{#local}}Download{{/local}}" class="icon-button disk tooltip"></a>
{{/if}}
</script><script type="text/template" class="template-history" id="template-history-tagArea">
{{! TODO: move to mvc/tag.js templates }}
<div class="tag-area" style="display: none;">
- <strong>Tags:</strong>
+ <strong>{{#local}}Tags{{/local}}:</strong><div class="tag-elt"></div></div>
@@ -84,9 +85,9 @@
<script type="text/template" class="template-history" id="template-history-annotationArea">
{{! TODO: move to mvc/annotations.js templates, editable-text }}
<div id="{{ id }}-annotation-area" class="annotation-area" style="display: none;">
- <strong>Annotation:</strong>
+ <strong>{{#local}}Annotation{{/local}}:</strong><div id="{{ id }}-anotation-elt" class="annotation-elt tooltip editable-text"
- style="margin: 1px 0px 1px 0px" title="Edit dataset annotation">
+ style="margin: 1px 0px 1px 0px" title="{{#local}}Edit dataset annotation{{/local}}"></div></div></script>
@@ -95,7 +96,7 @@
{{#each displayApps}}
{{label}}
{{#each links}}
- <a target="{{target}}" href="{{href}}">{{text}}</a>
+ <a target="{{target}}" href="{{href}}">{{#local}}{{text}}{{/local}}</a>
{{/each}}
<br />
{{/each}}
@@ -113,10 +114,10 @@
{{! TODO: factor out conditional css }}
{{#if user.email}}
<div id="history-name" class="tooltip editable-text"
- title="Click to rename history">{{name}}</div>
+ title="{{#local}}Click to rename history{{/local}}">{{name}}</div>
{{else}}
<div id="history-name" class="tooltip"
- title="You must be logged in to edit your history name">{{name}}</div>
+ title="{{#local}}You must be logged in to edit your history name{{/local}}">{{name}}</div>
{{/if}}
</div>
@@ -150,18 +151,19 @@
<div id="history-tag-annotation"><div id="history-tag-area" style="display: none">
- <strong>Tags:</strong>
+ <strong>{{#local}}Tags{{/local}}:</strong><div class="tag-elt"></div></div><div id="history-annotation-area" style="display: none">
- <strong>Annotation / Notes:</strong>
+ <strong>{{#local}}Annotation{{/local}}:</strong><div id="history-annotation-container">
- <div id="history-annotation" class="tooltip editable-text" title="Click to edit annotation">
+ <div id="history-annotation" class="tooltip editable-text"
+ title="{{#local}}Click to edit annotation{{/local}}">
{{#if annotation}}
{{annotation}}
{{else}}
- <em>Describe or add notes to history</em>
+ <em>{{#local}}Describe or add notes to history{{/local}}</em>
{{/if}}
</div></div>
@@ -179,7 +181,8 @@
<div id="quota-message-container" style="display: none"><div id="quota-message" class="errormessage">
- You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.
+ {{#local}}You are over your disk quota.
+ Tool execution is on hold until your disk usage drops below your allocated quota.{{/local}}
</div></div></div>
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/ui-templates.html
--- a/static/scripts/templates/ui-templates.html
+++ b/static/scripts/templates/ui-templates.html
@@ -3,7 +3,7 @@
<div id="quota-meter-bar" class="quota-meter-bar bar" style="width: {{quota_percent}}%"></div>
{{! TODO: remove the hardcoded style }}
<div id="quota-meter-text" class="quota-meter-text"style="top: 6px">
- Using {{ quota_percent }}%
+ {{#local}}Using{{/local}} {{ quota_percent }}%
</div></div></script>
@@ -12,7 +12,7 @@
{{! TODO: remove the hardcoded styles }}
<div id="quota-meter" class="quota-meter" style="background-color: transparent"><div id="quota-meter-text" class="quota-meter-text" style="top: 6px; color: white">
- Using {{ nice_total_disk_usage }}
+ {{#local}}Using{{/local}} {{ nice_total_disk_usage }}
</div></div></script>
diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 templates/root/alternate_history.mako
--- a/templates/root/alternate_history.mako
+++ b/templates/root/alternate_history.mako
@@ -15,6 +15,37 @@
## a list of localized strings used in the backbone views, etc. (to be loaded and cached)
##! change on per page basis
<%
+ ## havent been localized
+ ##[
+ ## "anonymous user",
+ ## "Click to rename history",
+ ## "Click to see more actions",
+ ## "Edit history tags",
+ ## "Edit history annotation",
+ ## "Tags",
+ ## "Annotation",
+ ## "Click to edit annotation",
+ ## "You are over your disk ...w your allocated quota.",
+ ## "Show deleted",
+ ## "Show hidden",
+ ## "Display data in browser",
+ ## "Edit Attributes",
+ ## "Download",
+ ## "View details",
+ ## "Run this job again",
+ ## "Visualize",
+ ## "Edit dataset tags",
+ ## "Edit dataset annotation",
+ ## "Trackster",
+ ## "Circster",
+ ## "Scatterplot",
+ ## "GeneTrack",
+ ## "Local",
+ ## "Web",
+ ## "Current",
+ ## "main",
+ ## "Using"
+ ##]
strings_to_localize = [
# from history.mako
@@ -193,6 +224,7 @@
"libs/jquery/jstorage",
"libs/jquery/jquery.autocomplete", "galaxy.autocom_tagging",
"libs/json2",
+ ##"libs/bootstrap",
"libs/backbone/backbone-relational",
"mvc/base-mvc", "mvc/ui"
)}
@@ -220,7 +252,6 @@
${h.js(
"mvc/dataset/hda-model", "mvc/dataset/hda-edit",
"mvc/history/history-model", "mvc/history/history-panel",
-
##"mvc/tags", "mvc/annotations",
"mvc/user/user-model", "mvc/user/user-quotameter"
)}
@@ -251,6 +282,7 @@
top.Galaxy.paths = galaxy_paths;
+ top.Galaxy.localization = GalaxyLocalization;
window.Galaxy = top.Galaxy;
}
@@ -289,30 +321,27 @@
// i don't like this history+user relationship, but user authentication changes views/behaviour
history.user = user;
- //var historyPanel = new HistoryPanel({
- // model : new History( history, hdas ),
+ var historyPanel = new HistoryPanel({
+ model : new History( history, hdas ),
+ urlTemplates : galaxy_paths.attributes,
+ logger : console,
+ // is page sending in show settings? if so override history's
+ show_deleted : ${ 'true' if show_deleted == True else ( 'null' if show_deleted == None else 'false' ) },
+ show_hidden : ${ 'true' if show_hidden == True else ( 'null' if show_hidden == None else 'false' ) }
+ });
+ historyPanel.render();
+
+ // ...or LOAD FROM THE API
+ //historyPanel = new HistoryPanel({
+ // model: new History(),
// urlTemplates : galaxy_paths.attributes,
// logger : console,
// // is page sending in show settings? if so override history's
// show_deleted : ${ 'true' if show_deleted == True else ( 'null' if show_deleted == None else 'false' ) },
// show_hidden : ${ 'true' if show_hidden == True else ( 'null' if show_hidden == None else 'false' ) }
//});
- //historyPanel.render();
+ //historyPanel.model.loadFromApi( history.id );
- // ...or LOAD FROM THE API
- historyPanel = new HistoryPanel({
- model: new History(),
- urlTemplates : galaxy_paths.attributes,
- logger : console,
- // is page sending in show settings? if so override history's
- show_deleted : ${ 'true' if show_deleted == True else ( 'null' if show_deleted == None else 'false' ) },
- show_hidden : ${ 'true' if show_hidden == True else ( 'null' if show_hidden == None else 'false' ) }
- });
- historyPanel.model.loadFromApi( history.id, historyPanel.show_deleted );
-
- if( !Galaxy.currHistoryPanel ){ Galaxy.currHistoryPanel = historyPanel; }
- if( !( historyPanel in Galaxy.historyPanels ) ){ Galaxy.historyPanels.unshift( historyPanel ); }
-
// QUOTA METER is a cross-frame ui element (meter in masthead, over quota message in history)
// create it and join them here for now (via events)
@@ -331,7 +360,7 @@
quotaMeter.bind( 'quota:over', historyPanel.showQuotaMessage, historyPanel );
quotaMeter.bind( 'quota:under', historyPanel.hideQuotaMessage, historyPanel );
// having to add this to handle re-render of hview while overquota (the above do not fire)
- historyPanel.on( 'rendered', function(){
+ historyPanel.on( 'rendered rendered:initial', function(){
if( quotaMeter.isOverQuota() ){
historyPanel.showQuotaMessage();
}
@@ -344,6 +373,9 @@
}, quotaMeter );
+ if( !Galaxy.currHistoryPanel ){ Galaxy.currHistoryPanel = historyPanel; }
+ if( !( historyPanel in Galaxy.historyPanels ) ){ Galaxy.historyPanels.unshift( historyPanel ); }
+
return;
});
</script>
@@ -388,6 +420,13 @@
color: black;
}
+ #quota-message-container {
+ margin: 8px 0px 5px 0px;
+ }
+ #quota-message {
+ margin: 0px;
+ }
+
#history-subtitle-area {
/*border: 1px solid green;*/
}
@@ -397,7 +436,7 @@
}
#history-tag-area, #history-annotation-area {
- margin-top: 10px;
+ margin: 10px 0px 10px 0px;
}
</style>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/f548b977ce33/
changeset: f548b977ce33
user: carlfeberhard
date: 2012-11-08 22:14:15
summary: api/histories, show: state_ids now returns all ids (incl. deleted hdas); (alt)history: minor changes
affected #: 6 files
diff -r 6344832c535aab0a8cc4a57be1414fc179e8540b -r f548b977ce33c8e0ba59a2d1586d0122cd9b963f lib/galaxy/webapps/galaxy/api/histories.py
--- a/lib/galaxy/webapps/galaxy/api/histories.py
+++ b/lib/galaxy/webapps/galaxy/api/histories.py
@@ -80,7 +80,8 @@
if not dataset_dict['deleted']:
state_counts[ item_state ] = state_counts[ item_state ] + 1
- state_ids[ item_state ].append( trans.security.encode_id( dataset_dict[ 'id' ] ) )
+
+ state_ids[ item_state ].append( trans.security.encode_id( dataset_dict[ 'id' ] ) )
return ( state_counts, state_ids )
@@ -114,7 +115,6 @@
state = states.NEW
else:
-
if( ( state_counts[ states.RUNNING ] > 0 )
or ( state_counts[ states.SETTING_METADATA ] > 0 )
or ( state_counts[ states.UPLOAD ] > 0 ) ):
@@ -131,13 +131,10 @@
state = states.OK
history_data[ 'state' ] = state
-
history_data[ 'state_details' ] = state_counts
history_data[ 'state_ids' ] = state_ids
-
history_data[ 'contents_url' ] = url_for( 'history_contents', history_id=history_id )
-
except Exception, e:
msg = "Error in history API at showing history detail: %s" % ( str( e ) )
log.error( msg, exc_info=True )
diff -r 6344832c535aab0a8cc4a57be1414fc179e8540b -r f548b977ce33c8e0ba59a2d1586d0122cd9b963f static/scripts/mvc/history/history-model.js
--- a/static/scripts/mvc/history/history-model.js
+++ b/static/scripts/mvc/history/history-model.js
@@ -9,7 +9,7 @@
//TODO: bind change events from items and collection to this (itemLengths, states)
// uncomment this out see log messages
- //logger : console,
+ logger : console,
// values from api (may need more)
defaults : {
@@ -17,19 +17,14 @@
name : '',
state : '',
- ////TODO: wire these to items (or this)
- //show_deleted : false,
- //show_hidden : false,
- //
diskSize : 0,
deleted : false,
- tags : [],
+ //tags : [],
annotation : null,
- //TODO: quota msg and message? how to get those over the api?
- message : null,
- quotaMsg : false
+ //TODO: message? how to get over the api?
+ message : null
},
url : function(){
@@ -52,36 +47,43 @@
//this.on( 'change', function( currModel, changedList ){
// this.log( this + ' has changed:', currModel, changedList );
//});
- //this.bind( 'all', function( event ){
- // this.log( this + '', arguments );
- //});
+ this.bind( 'all', function( event ){
+ //this.log( this + '', arguments );
+ console.info( this + '', arguments );
+ });
},
// get data via the api (alternative to sending options,hdas to initialize)
- loadFromApi : function( historyId, callback ){
+ //TODO: this needs work - move to more straightforward deferred
+ loadFromApi : function( historyId, success ){
var history = this;
// fetch the history AND the user (mainly to see if they're logged in at this point)
history.attributes.id = historyId;
//TODO:?? really? fetch user here?
- jQuery.when( jQuery.ajax( 'api/users/current' ), history.fetch()
+ jQuery.when(
+ jQuery.ajax( 'api/users/current' ),
+ history.fetch()
).then( function( userResponse, historyResponse ){
- //console.warn( 'fetched user, history: ', userResponse, historyResponse );
+ console.warn( 'fetched user: ', userResponse[0] );
+ console.warn( 'fetched history: ', historyResponse[0] );
history.attributes.user = userResponse[0]; //? meh.
+ history.trigger( 'loaded', historyResponse );
history.log( history );
}).then( function(){
// ...then the hdas (using contents?ids=...)
jQuery.ajax( history.url() + '/contents?' + jQuery.param({
- ids : history.itemIdsFromStateIds().join( ',' )
+ ids : history.hdaIdsFromStateIds().join( ',' )
// reset the collection to the hdas returned
})).success( function( hdas ){
- //console.warn( 'fetched hdas' );
+ //console.warn( 'fetched hdas', hdas );
history.hdas.reset( hdas );
history.checkForUpdates();
- callback();
+ history.trigger( 'loaded:hdas', hdas );
+ if( success ){ callback( history ); }
});
});
},
diff -r 6344832c535aab0a8cc4a57be1414fc179e8540b -r f548b977ce33c8e0ba59a2d1586d0122cd9b963f static/scripts/mvc/history/history-panel.js
--- a/static/scripts/mvc/history/history-panel.js
+++ b/static/scripts/mvc/history/history-panel.js
@@ -20,7 +20,8 @@
??: still happening?
from loadFromApi:
- BUG: not showing previous annotations
+ BUG: not loading deleted datasets
+ FIXED: history_contents, show: state_ids returns all ids now (incl. deleted)
fixed:
BUG: upload, history size, doesn't change
@@ -217,6 +218,7 @@
this.setUpActionButton( newRender.find( '#history-action-popup' ) );
// render hda views (if any and any shown (show_deleted/hidden)
+ //TODO: this seems too elaborate
if( !this.model.hdas.length
|| !this.renderItems( newRender.find( '#' + this.model.get( 'id' ) + '-datasets' ) ) ){
// if history is empty or no hdas would be rendered, show the empty message
@@ -268,24 +270,27 @@
renderItems : function( $whereTo ){
this.hdaViews = {};
var historyView = this,
+ // only render the shown hdas
+ //TODO: switch to more general filtered pattern
visibleHdas = this.model.hdas.getVisible(
this.storage.get( 'show_deleted' ),
this.storage.get( 'show_hidden' )
);
- // only render the shown hdas
_.each( visibleHdas, function( hda ){
var hdaId = hda.get( 'id' ),
expanded = historyView.storage.get( 'expandedHdas' ).get( hdaId );
+
historyView.hdaViews[ hdaId ] = new HDAView({
model : hda,
expanded : expanded,
urlTemplates : historyView.hdaUrlTemplates
});
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.hdaViews[ hdaId ].render().$el );
});
return visibleHdas.length;
},
diff -r 6344832c535aab0a8cc4a57be1414fc179e8540b -r f548b977ce33c8e0ba59a2d1586d0122cd9b963f static/scripts/templates/compiled/template-history-historyPanel.js
--- a/static/scripts/templates/compiled/template-history-historyPanel.js
+++ b/static/scripts/templates/compiled/template-history-historyPanel.js
@@ -26,66 +26,71 @@
function program5(depth0,data) {
+
+ return "Click to see more actions";}
+
+function program7(depth0,data) {
+
var buffer = "", stack1, foundHelper;
buffer += "\n <div id=\"history-secondary-links\" style=\"float: right;\">\n <a id=\"history-tag\" title=\"";
foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(6, program6, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(6, program6, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\"\n class=\"icon-button tags tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n <a id=\"history-annotate\" title=\"";
- foundHelper = helpers.local;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(8, program8, data)}); }
else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(8, program8, data)}); }
if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\"\n class=\"icon-button tags tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n <a id=\"history-annotate\" title=\"";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\"\n class=\"icon-button annotate tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n </div>\n ";
return buffer;}
-function program6(depth0,data) {
+function program8(depth0,data) {
return "Edit history tags";}
-function program8(depth0,data) {
+function program10(depth0,data) {
return "Edit history annotation";}
-function program10(depth0,data) {
+function program12(depth0,data) {
var buffer = "", stack1, foundHelper;
buffer += "\n ";
foundHelper = helpers.warningmessagesmall;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); }
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(13, program13, data)}); }
else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); }
+ if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(13, program13, data)}); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n ";
return buffer;}
-function program11(depth0,data) {
+function program13(depth0,data) {
var stack1, foundHelper;
foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); }
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); }
else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); }
if(stack1 || stack1 === 0) { return stack1; }
else { return ''; }}
-function program12(depth0,data) {
+function program14(depth0,data) {
return "You are currently viewing a deleted history!";}
-function program14(depth0,data) {
+function program16(depth0,data) {
var buffer = "", stack1;
buffer += "\n <div id=\"history-tag-annotation\">\n\n <div id=\"history-tag-area\" style=\"display: none\">\n <strong>Tags:</strong>\n <div class=\"tag-elt\"></div>\n </div>\n\n <div id=\"history-annotation-area\" style=\"display: none\">\n <strong>Annotation / Notes:</strong>\n <div id=\"history-annotation-container\">\n <div id=\"history-annotation\" class=\"tooltip editable-text\" title=\"Click to edit annotation\">\n ";
stack1 = depth0.annotation;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(17, program17, data),fn:self.program(15, program15, data)});
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(19, program19, data),fn:self.program(17, program17, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n </div>\n </div>\n </div>\n </div>\n ";
return buffer;}
-function program15(depth0,data) {
+function program17(depth0,data) {
var buffer = "", stack1, foundHelper;
buffer += "\n ";
@@ -95,12 +100,12 @@
buffer += escapeExpression(stack1) + "\n ";
return buffer;}
-function program17(depth0,data) {
+function program19(depth0,data) {
return "\n <em>Describe or add notes to history</em>\n ";}
-function program19(depth0,data) {
+function program21(depth0,data) {
var buffer = "", stack1, foundHelper;
buffer += "\n <div id=\"message-container\">\n <div class=\"";
@@ -114,7 +119,7 @@
buffer += escapeExpression(stack1) + "\n </div><br />\n </div>\n ";
return buffer;}
-function program21(depth0,data) {
+function program23(depth0,data) {
return "Your history is empty. Click 'Get Data' on the left pane to start";}
@@ -125,29 +130,35 @@
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email;
stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n </div>\n\n <a id=\"history-action-popup\" href=\"javascript:void(0);\" style=\"float: right;\">\n <span class=\"ficon cog large\"></span>\n </a>\n <div style=\"clear: both;\"></div>\n </div>\n\n <div id=\"history-subtitle-area\">\n <div id=\"history-size\" style=\"float:left;\">";
+ buffer += "\n </div>\n\n <a id=\"history-action-popup\" class=\"tooltip\" title=\"";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\"\n href=\"javascript:void(0);\" style=\"float: right;\">\n <span class=\"ficon cog large\"></span>\n </a>\n <div style=\"clear: both;\"></div>\n </div>\n\n <div id=\"history-subtitle-area\">\n <div id=\"history-size\" style=\"float:left;\">";
foundHelper = helpers.nice_size;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.nice_size; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
buffer += escapeExpression(stack1) + "</div>\n ";
stack1 = depth0.user;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)});
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n <div style=\"clear: both;\"></div>\n </div>\n\n ";
stack1 = depth0.deleted;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)});
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n\n ";
buffer += "\n ";
buffer += "\n ";
stack1 = depth0.user;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)});
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(16, program16, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n\n ";
stack1 = depth0.message;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(19, program19, data)});
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(21, program21, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n\n <div id=\"quota-message-container\" style=\"display: none\">\n <div id=\"quota-message\" class=\"errormessage\">\n You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.\n </div>\n </div>\n</div>\n\n<div id=\"";
foundHelper = helpers.id;
@@ -155,9 +166,9 @@
else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
buffer += escapeExpression(stack1) + "-datasets\" class=\"history-datasets-list\"></div>\n\n<div class=\"infomessagesmall\" id=\"emptyHistoryMessage\" style=\"display: none;\">\n ";
foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(21, program21, data)}); }
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(23, program23, data)}); }
else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(21, program21, data)}); }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(23, program23, data)}); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n</div>";
return buffer;});
diff -r 6344832c535aab0a8cc4a57be1414fc179e8540b -r f548b977ce33c8e0ba59a2d1586d0122cd9b963f static/scripts/templates/history-templates.html
--- a/static/scripts/templates/history-templates.html
+++ b/static/scripts/templates/history-templates.html
@@ -120,7 +120,8 @@
{{/if}}
</div>
- <a id="history-action-popup" href="javascript:void(0);" style="float: right;">
+ <a id="history-action-popup" class="tooltip" title="{{#local}}Click to see more actions{{/local}}"
+ href="javascript:void(0);" style="float: right;"><span class="ficon cog large"></span></a><div style="clear: both;"></div>
diff -r 6344832c535aab0a8cc4a57be1414fc179e8540b -r f548b977ce33c8e0ba59a2d1586d0122cd9b963f templates/root/alternate_history.mako
--- a/templates/root/alternate_history.mako
+++ b/templates/root/alternate_history.mako
@@ -289,24 +289,31 @@
// i don't like this history+user relationship, but user authentication changes views/behaviour
history.user = user;
- var historyPanel = new HistoryPanel({
- model : new History( history, hdas ),
+ //var historyPanel = new HistoryPanel({
+ // model : new History( history, hdas ),
+ // urlTemplates : galaxy_paths.attributes,
+ // logger : console,
+ // // is page sending in show settings? if so override history's
+ // show_deleted : ${ 'true' if show_deleted == True else ( 'null' if show_deleted == None else 'false' ) },
+ // show_hidden : ${ 'true' if show_hidden == True else ( 'null' if show_hidden == None else 'false' ) }
+ //});
+ //historyPanel.render();
+
+ // ...or LOAD FROM THE API
+ historyPanel = new HistoryPanel({
+ model: new History(),
urlTemplates : galaxy_paths.attributes,
logger : console,
// is page sending in show settings? if so override history's
show_deleted : ${ 'true' if show_deleted == True else ( 'null' if show_deleted == None else 'false' ) },
show_hidden : ${ 'true' if show_hidden == True else ( 'null' if show_hidden == None else 'false' ) }
});
- historyPanel.render();
+ historyPanel.model.loadFromApi( history.id, historyPanel.show_deleted );
+
if( !Galaxy.currHistoryPanel ){ Galaxy.currHistoryPanel = historyPanel; }
if( !( historyPanel in Galaxy.historyPanels ) ){ Galaxy.historyPanels.unshift( historyPanel ); }
+
-
- // ...or LOAD FROM THE API
- //historyPanel = new HistoryView({ model: new History().setPaths( galaxy_paths ) });
- //historyPanel.loadFromApi( pageData.history.id );
-
-
// QUOTA METER is a cross-frame ui element (meter in masthead, over quota message in history)
// create it and join them here for now (via events)
//TODO: this really belongs in the masthead
@@ -389,6 +396,10 @@
#history-secondary-links {
}
+ #history-tag-area, #history-annotation-area {
+ margin-top: 10px;
+ }
+
</style><noscript>
https://bitbucket.org/galaxy/galaxy-central/changeset/29d47f28af66/
changeset: 29d47f28af66
user: carlfeberhard
date: 2012-11-08 22:15:03
summary: pack scripts
affected #: 2 files
diff -r f548b977ce33c8e0ba59a2d1586d0122cd9b963f -r 29d47f28af664cf58941085332666de032a7e7d5 static/scripts/packed/mvc/history/history-model.js
--- a/static/scripts/packed/mvc/history/history-model.js
+++ b/static/scripts/packed/mvc/history/history-model.js
@@ -1,1 +1,1 @@
-var History=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,tags:[],annotation:null,message:null,quotaMsg:false},url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b&&b.length){this.hdas.reset(b);this.checkForUpdates()}},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.log(b)}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.itemIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();c()})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.hdas.update(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},4000)}}).error(function(f,d,e){if(console&&console.warn){console.warn("Error getting history updates from the server:",f,d,e)}alert("Error getting history updates from the server.\n"+e)})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories",logger:console});
\ No newline at end of file
+var History=BaseModel.extend(LoggableMixin).extend({logger:console,defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,annotation:null,message:null},url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b&&b.length){this.hdas.reset(b);this.checkForUpdates()}this.bind("all",function(c){console.info(this+"",arguments)})},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){console.warn("fetched user: ",e[0]);console.warn("fetched history: ",d[0]);b.attributes.user=e[0];b.trigger("loaded",d);b.log(b)}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.hdaIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();b.trigger("loaded:hdas",d);if(c){callback(b)}})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.hdas.update(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},4000)}}).error(function(f,d,e){if(console&&console.warn){console.warn("Error getting history updates from the server:",f,d,e)}alert("Error getting history updates from the server.\n"+e)})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories",logger:console});
\ No newline at end of file
diff -r f548b977ce33c8e0ba59a2d1586d0122cd9b963f -r 29d47f28af664cf58941085332666de032a7e7d5 static/scripts/packed/templates/compiled/template-history-historyPanel.js
--- a/static/scripts/packed/templates/compiled/template-history-historyPanel.js
+++ b/static/scripts/packed/templates/compiled/template-history-historyPanel.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(f,s,q,m,A){q=q||f.helpers;var r="",j,i,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(F,E){var C="",D,B;C+='\n <div id="history-name" class="tooltip editable-text"\n title="Click to rename history">';B=q.name;if(B){D=B.call(F,{hash:{}})}else{D=F.name;D=typeof D===e?D():D}C+=d(D)+"</div>\n ";return C}function n(F,E){var C="",D,B;C+='\n <div id="history-name" class="tooltip"\n title="You must be logged in to edit your history name">';B=q.name;if(B){D=B.call(F,{hash:{}})}else{D=F.name;D=typeof D===e?D():D}C+=d(D)+"</div>\n ";return C}function l(F,E){var C="",D,B;C+='\n <div id="history-secondary-links" style="float: right;">\n <a id="history-tag" title="';B=q.local;if(B){D=B.call(F,{hash:{},inverse:p.noop,fn:p.program(6,k,E)})}else{D=F.local;D=typeof D===e?D():D}if(!q.local){D=c.call(F,D,{hash:{},inverse:p.noop,fn:p.program(6,k,E)})}if(D||D===0){C+=D}C+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';B=q.local;if(B){D=B.call(F,{hash:{},inverse:p.noop,fn:p.program(8,h,E)})}else{D=F.local;D=typeof D===e?D():D}if(!q.local){D=c.call(F,D,{hash:{},inverse:p.noop,fn:p.program(8,h,E)})}if(D||D===0){C+=D}C+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n </div>\n ';return C}function k(C,B){return"Edit history tags"}function h(C,B){return"Edit history annotation"}function z(F,E){var C="",D,B;C+="\n ";B=q.warningmessagesmall;if(B){D=B.call(F,{hash:{},inverse:p.noop,fn:p.program(11,y,E)})}else{D=F.warningmessagesmall;D=typeof D===e?D():D}if(!q.warningmessagesmall){D=c.call(F,D,{hash:{},inverse:p.noop,fn:p.program(11,y,E)})}if(D||D===0){C+=D}C+="\n ";return C}function y(E,D){var C,B;B=q.local;if(B){C=B.call(E,{hash:{},inverse:p.noop,fn:p.program(12,x,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(12,x,D)})}if(C||C===0){return C}else{return""}}function x(C,B){return"You are currently viewing a deleted history!"}function w(E,D){var B="",C;B+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>Tags:</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>Annotation / Notes:</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text" title="Click to edit annotation">\n ';C=E.annotation;C=q["if"].call(E,C,{hash:{},inverse:p.program(17,u,D),fn:p.program(15,v,D)});if(C||C===0){B+=C}B+="\n </div>\n </div>\n </div>\n </div>\n ";return B}function v(F,E){var C="",D,B;C+="\n ";B=q.annotation;if(B){D=B.call(F,{hash:{}})}else{D=F.annotation;D=typeof D===e?D():D}C+=d(D)+"\n ";return C}function u(C,B){return"\n <em>Describe or add notes to history</em>\n "}function t(F,E){var C="",D,B;C+='\n <div id="message-container">\n <div class="';B=q.status;if(B){D=B.call(F,{hash:{}})}else{D=F.status;D=typeof D===e?D():D}C+=d(D)+'message">\n ';B=q.message;if(B){D=B.call(F,{hash:{}})}else{D=F.message;D=typeof D===e?D():D}C+=d(D)+"\n </div><br />\n </div>\n ";return C}function g(C,B){return"Your history is empty. Click 'Get Data' on the left pane to start"}r+='\n<div id="history-controls">\n <div id="history-title-area" class="historyLinks">\n\n <div id="history-name-container" style="float: left;">\n ';r+="\n ";j=s.user;j=j==null||j===false?j:j.email;j=q["if"].call(s,j,{hash:{},inverse:p.program(3,n,A),fn:p.program(1,o,A)});if(j||j===0){r+=j}r+='\n </div>\n\n <a id="history-action-popup" href="javascript:void(0);" style="float: right;">\n <span class="ficon cog large"></span>\n </a>\n <div style="clear: both;"></div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';i=q.nice_size;if(i){j=i.call(s,{hash:{}})}else{j=s.nice_size;j=typeof j===e?j():j}r+=d(j)+"</div>\n ";j=s.user;j=j==null||j===false?j:j.email;j=q["if"].call(s,j,{hash:{},inverse:p.noop,fn:p.program(5,l,A)});if(j||j===0){r+=j}r+='\n <div style="clear: both;"></div>\n </div>\n\n ';j=s.deleted;j=q["if"].call(s,j,{hash:{},inverse:p.noop,fn:p.program(10,z,A)});if(j||j===0){r+=j}r+="\n\n ";r+="\n ";r+="\n ";j=s.user;j=j==null||j===false?j:j.email;j=q["if"].call(s,j,{hash:{},inverse:p.noop,fn:p.program(14,w,A)});if(j||j===0){r+=j}r+="\n\n ";j=s.message;j=q["if"].call(s,j,{hash:{},inverse:p.noop,fn:p.program(19,t,A)});if(j||j===0){r+=j}r+='\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.\n </div>\n </div>\n</div>\n\n<div id="';i=q.id;if(i){j=i.call(s,{hash:{}})}else{j=s.id;j=typeof j===e?j():j}r+=d(j)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';i=q.local;if(i){j=i.call(s,{hash:{},inverse:p.noop,fn:p.program(21,g,A)})}else{j=s.local;j=typeof j===e?j():j}if(!q.local){j=c.call(s,j,{hash:{},inverse:p.noop,fn:p.program(21,g,A)})}if(j||j===0){r+=j}r+="\n</div>";return r})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(g,t,r,n,B){r=r||g.helpers;var s="",k,j,e="function",d=this.escapeExpression,q=this,c=r.blockHelperMissing;function p(G,F){var D="",E,C;D+='\n <div id="history-name" class="tooltip editable-text"\n title="Click to rename history">';C=r.name;if(C){E=C.call(G,{hash:{}})}else{E=G.name;E=typeof E===e?E():E}D+=d(E)+"</div>\n ";return D}function o(G,F){var D="",E,C;D+='\n <div id="history-name" class="tooltip"\n title="You must be logged in to edit your history name">';C=r.name;if(C){E=C.call(G,{hash:{}})}else{E=G.name;E=typeof E===e?E():E}D+=d(E)+"</div>\n ";return D}function m(D,C){return"Click to see more actions"}function l(G,F){var D="",E,C;D+='\n <div id="history-secondary-links" style="float: right;">\n <a id="history-tag" title="';C=r.local;if(C){E=C.call(G,{hash:{},inverse:q.noop,fn:q.program(8,i,F)})}else{E=G.local;E=typeof E===e?E():E}if(!r.local){E=c.call(G,E,{hash:{},inverse:q.noop,fn:q.program(8,i,F)})}if(E||E===0){D+=E}D+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';C=r.local;if(C){E=C.call(G,{hash:{},inverse:q.noop,fn:q.program(10,A,F)})}else{E=G.local;E=typeof E===e?E():E}if(!r.local){E=c.call(G,E,{hash:{},inverse:q.noop,fn:q.program(10,A,F)})}if(E||E===0){D+=E}D+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n </div>\n ';return D}function i(D,C){return"Edit history tags"}function A(D,C){return"Edit history annotation"}function z(G,F){var D="",E,C;D+="\n ";C=r.warningmessagesmall;if(C){E=C.call(G,{hash:{},inverse:q.noop,fn:q.program(13,y,F)})}else{E=G.warningmessagesmall;E=typeof E===e?E():E}if(!r.warningmessagesmall){E=c.call(G,E,{hash:{},inverse:q.noop,fn:q.program(13,y,F)})}if(E||E===0){D+=E}D+="\n ";return D}function y(F,E){var D,C;C=r.local;if(C){D=C.call(F,{hash:{},inverse:q.noop,fn:q.program(14,x,E)})}else{D=F.local;D=typeof D===e?D():D}if(!r.local){D=c.call(F,D,{hash:{},inverse:q.noop,fn:q.program(14,x,E)})}if(D||D===0){return D}else{return""}}function x(D,C){return"You are currently viewing a deleted history!"}function w(F,E){var C="",D;C+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>Tags:</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>Annotation / Notes:</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text" title="Click to edit annotation">\n ';D=F.annotation;D=r["if"].call(F,D,{hash:{},inverse:q.program(19,u,E),fn:q.program(17,v,E)});if(D||D===0){C+=D}C+="\n </div>\n </div>\n </div>\n </div>\n ";return C}function v(G,F){var D="",E,C;D+="\n ";C=r.annotation;if(C){E=C.call(G,{hash:{}})}else{E=G.annotation;E=typeof E===e?E():E}D+=d(E)+"\n ";return D}function u(D,C){return"\n <em>Describe or add notes to history</em>\n "}function h(G,F){var D="",E,C;D+='\n <div id="message-container">\n <div class="';C=r.status;if(C){E=C.call(G,{hash:{}})}else{E=G.status;E=typeof E===e?E():E}D+=d(E)+'message">\n ';C=r.message;if(C){E=C.call(G,{hash:{}})}else{E=G.message;E=typeof E===e?E():E}D+=d(E)+"\n </div><br />\n </div>\n ";return D}function f(D,C){return"Your history is empty. Click 'Get Data' on the left pane to start"}s+='\n<div id="history-controls">\n <div id="history-title-area" class="historyLinks">\n\n <div id="history-name-container" style="float: left;">\n ';s+="\n ";k=t.user;k=k==null||k===false?k:k.email;k=r["if"].call(t,k,{hash:{},inverse:q.program(3,o,B),fn:q.program(1,p,B)});if(k||k===0){s+=k}s+='\n </div>\n\n <a id="history-action-popup" class="tooltip" title="';j=r.local;if(j){k=j.call(t,{hash:{},inverse:q.noop,fn:q.program(5,m,B)})}else{k=t.local;k=typeof k===e?k():k}if(!r.local){k=c.call(t,k,{hash:{},inverse:q.noop,fn:q.program(5,m,B)})}if(k||k===0){s+=k}s+='"\n href="javascript:void(0);" style="float: right;">\n <span class="ficon cog large"></span>\n </a>\n <div style="clear: both;"></div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';j=r.nice_size;if(j){k=j.call(t,{hash:{}})}else{k=t.nice_size;k=typeof k===e?k():k}s+=d(k)+"</div>\n ";k=t.user;k=k==null||k===false?k:k.email;k=r["if"].call(t,k,{hash:{},inverse:q.noop,fn:q.program(7,l,B)});if(k||k===0){s+=k}s+='\n <div style="clear: both;"></div>\n </div>\n\n ';k=t.deleted;k=r["if"].call(t,k,{hash:{},inverse:q.noop,fn:q.program(12,z,B)});if(k||k===0){s+=k}s+="\n\n ";s+="\n ";s+="\n ";k=t.user;k=k==null||k===false?k:k.email;k=r["if"].call(t,k,{hash:{},inverse:q.noop,fn:q.program(16,w,B)});if(k||k===0){s+=k}s+="\n\n ";k=t.message;k=r["if"].call(t,k,{hash:{},inverse:q.noop,fn:q.program(21,h,B)});if(k||k===0){s+=k}s+='\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.\n </div>\n </div>\n</div>\n\n<div id="';j=r.id;if(j){k=j.call(t,{hash:{}})}else{k=t.id;k=typeof k===e?k():k}s+=d(k)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';j=r.local;if(j){k=j.call(t,{hash:{},inverse:q.noop,fn:q.program(23,f,B)})}else{k=t.local;k=typeof k===e?k():k}if(!r.local){k=c.call(t,k,{hash:{},inverse:q.noop,fn:q.program(23,f,B)})}if(k||k===0){s+=k}s+="\n</div>";return s})})();
\ No newline at end of file
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/c2e7520982ef/
changeset: c2e7520982ef
user: carlfeberhard
date: 2012-11-08 20:42:26
summary: (alt)history: move show_deleted, show_hidden to the client. galaxy.util: added string_as_bool_or_none which parses True/False/None values from controller args.
affected #: 11 files
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 lib/galaxy/util/__init__.py
--- a/lib/galaxy/util/__init__.py
+++ b/lib/galaxy/util/__init__.py
@@ -339,6 +339,24 @@
else:
return False
+def string_as_bool_or_none( string ):
+ """
+ Returns True, None or False based on the argument:
+ True if passed True, 'True', 'Yes', or 'On'
+ None if passed None or 'None'
+ False otherwise
+
+ Note: string comparison is case-insensitive so lowecase versions of those
+ function equivalently.
+ """
+ string = str( string ).lower()
+ if string in ( 'true', 'yes', 'on' ):
+ return True
+ elif string == 'none':
+ return None
+ else:
+ return False
+
def listify( item ):
"""
Make a single item a single item list, or return a list if passed a
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 lib/galaxy/webapps/galaxy/controllers/root.py
--- a/lib/galaxy/webapps/galaxy/controllers/root.py
+++ b/lib/galaxy/webapps/galaxy/controllers/root.py
@@ -98,7 +98,8 @@
return trans.fill_template_mako( "/my_data.mako" )
@web.expose
- def history( self, trans, as_xml=False, show_deleted=False, show_hidden=False, hda_id=None, **kwd ):
+ #def history( self, trans, as_xml=False, show_deleted=False, show_hidden=False, hda_id=None, **kwd ):
+ def history( self, trans, as_xml=False, show_deleted=None, show_hidden=None, hda_id=None, **kwd ):
"""
Display the current history, creating a new history if necessary.
NOTE: No longer accepts "id" or "template" options for security reasons.
@@ -116,9 +117,9 @@
show_deleted=util.string_as_bool( show_deleted ),
show_hidden=util.string_as_bool( show_hidden ) )
else:
- show_deleted = util.string_as_bool( show_deleted )
- show_hidden = util.string_as_bool( show_hidden )
- show_purged = util.string_as_bool( show_deleted )
+ show_deleted = util.string_as_bool_or_none( show_deleted )
+ show_purged = show_deleted
+ show_hidden = util.string_as_bool_or_none( show_hidden )
datasets = []
history_panel_template = "root/history.mako"
@@ -128,6 +129,7 @@
if 'USE_ALTERNATE' in locals():
datasets = self.get_history_datasets( trans, history,
show_deleted=True, show_hidden=True, show_purged=True )
+ #datasets = self.get_history_datasets( trans, history, show_deleted, show_hidden, show_purged )
history_panel_template = "root/alternate_history.mako"
else:
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 static/scripts/mvc/history/history-model.js
--- a/static/scripts/mvc/history/history-model.js
+++ b/static/scripts/mvc/history/history-model.js
@@ -17,10 +17,10 @@
name : '',
state : '',
- //TODO: wire these to items (or this)
- show_deleted : false,
- show_hidden : false,
-
+ ////TODO: wire these to items (or this)
+ //show_deleted : false,
+ //show_hidden : false,
+ //
diskSize : 0,
deleted : false,
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 static/scripts/mvc/history/history-panel.js
--- a/static/scripts/mvc/history/history-panel.js
+++ b/static/scripts/mvc/history/history-panel.js
@@ -8,6 +8,8 @@
anon user, mako template init:
bug: rename url seems to be wrong url
+ BUG: shouldn't have tag/anno buttons (on hdas)
+
logged in, mako template:
BUG: meter is not updating RELIABLY on change:nice_size
BUG: am able to start upload even if over quota - 'runs' forever
@@ -54,6 +56,8 @@
show_deleted/hidden:
use storage
on/off ui
+ need urls
+ change template
move histview fadein/out in render to app?
don't draw body until it's first expand event
localize all
@@ -124,10 +128,30 @@
// data that needs to be persistant over page refreshes
// (note the key function which uses the history id as well)
- this.storage = new PersistantStorage(
- 'HistoryView.' + this.model.get( 'id' ),
- { expandedHdas : {} }
- );
+ this.storage = new PersistantStorage( 'HistoryView.' + this.model.get( 'id' ), {
+ expandedHdas : {},
+ show_deleted : false,
+ show_hidden : false
+ });
+ this.log( 'this.storage:', this.storage.get() );
+
+ // get the show_deleted/hidden settings giving priority to values passed into initialize, but
+ // using web storage otherwise
+ this.log( 'show_deleted:', attributes.show_deleted, 'show_hidden', attributes.show_hidden );
+ // if the page has specifically requested show_deleted/hidden, these will be either true or false
+ // (as opposed to undefined, null) - and we give priority to that setting
+ if( ( attributes.show_deleted === true ) || ( attributes.show_deleted === false ) ){
+ // save them to web storage
+ this.storage.set( 'show_deleted', attributes.show_deleted );
+ }
+ if( ( attributes.show_hidden === true ) || ( attributes.show_hidden === false ) ){
+ this.storage.set( 'show_hidden', attributes.show_hidden );
+ }
+ // pull show_deleted/hidden from the web storage if the page hasn't specified whether to show_deleted/hidden,
+ this.show_deleted = this.storage.get( 'show_deleted' );
+ this.show_hidden = this.storage.get( 'show_hidden' );
+ this.log( 'this.show_deleted:', this.show_deleted, 'show_hidden', this.show_hidden );
+ this.log( '(now) this.storage:', this.storage.get() );
// bind events from the model's hda collection
//this.model.bind( 'change', this.render, this );
@@ -189,7 +213,8 @@
// render the main template, tooltips
//NOTE: this is done before the items, since item views should handle theirs themselves
newRender.append( HistoryPanel.templates.historyPanel( modelJson ) );
- newRender.find( '.tooltip' ).tooltip();
+ newRender.find( '.tooltip' ).tooltip({ placement: 'bottom' });
+ this.setUpActionButton( newRender.find( '#history-action-popup' ) );
// render hda views (if any and any shown (show_deleted/hidden)
if( !this.model.hdas.length
@@ -227,13 +252,26 @@
return this;
},
+ setUpActionButton : function( $button ){
+ var historyPanel = this,
+ show_deletedText = ( this.storage.get( 'show_deleted' ) )?( 'Hide deleted' ):( 'Show deleted' ),
+ show_hiddenText = ( this.storage.get( 'show_hidden' ) )?( 'Hide hidden' ):( 'Show hidden' ),
+ menuActions = {};
+ menuActions[ _l( 'refresh' ) ] = function(){ window.location.reload(); };
+ menuActions[ _l( 'collapse all' ) ] = function(){ historyPanel.hideAllHdaBodies(); };
+ menuActions[ _l( show_deletedText ) ] = function(){ historyPanel.toggleShowDeleted(); };
+ menuActions[ _l( show_hiddenText ) ] = function(){ historyPanel.toggleShowHidden(); };
+ make_popupmenu( $button, menuActions );
+ },
+
// set up a view for each item to be shown, init with model and listeners, cache to map ( model.id : view )
renderItems : function( $whereTo ){
this.hdaViews = {};
var historyView = this,
- show_deleted = this.model.get( 'show_deleted' ),
- show_hidden = this.model.get( 'show_hidden' ),
- visibleHdas = this.model.hdas.getVisible( show_deleted, show_hidden );
+ visibleHdas = this.model.hdas.getVisible(
+ this.storage.get( 'show_deleted' ),
+ this.storage.get( 'show_hidden' )
+ );
// only render the shown hdas
_.each( visibleHdas, function( hda ){
@@ -293,6 +331,8 @@
async_save_text( "history-annotation-container", "history-annotation",
this.urls.annotate, "new_annotation", 18, true, 4 );
+
+ //this.$( 'button' ).button();
},
// update the history size display (curr. upper right of panel)
@@ -300,6 +340,10 @@
this.$el.find( '#history-size' ).text( this.model.get( 'nice_size' ) );
},
+ events : {
+ 'click #history-tag' : 'loadAndDisplayTags'
+ },
+
//TODO: this seems more like a per user message than a history message; IOW, this doesn't belong here
showQuotaMessage : function( userData ){
var msg = this.$el.find( '#quota-message-container' );
@@ -314,9 +358,14 @@
if( !msg.is( ':hidden' ) ){ msg.slideUp( 'fast' ); }
},
- events : {
- 'click #history-collapse-all' : 'hideAllHdaBodies',
- 'click #history-tag' : 'loadAndDisplayTags'
+ toggleShowDeleted : function( x, y, z ){
+ this.storage.set( 'show_deleted', !this.storage.get( 'show_deleted' ) );
+ this.render();
+ },
+
+ toggleShowHidden : function(){
+ this.storage.set( 'show_hidden', !this.storage.get( 'show_hidden' ) );
+ this.render();
},
// collapse all hda bodies
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 static/scripts/packed/mvc/dataset/hda-edit.js
--- /dev/null
+++ b/static/scripts/packed/mvc/dataset/hda-edit.js
@@ -0,0 +1,1 @@
+var HDAView=BaseView.extend(LoggableMixin).extend({tagName:"div",className:"historyItemContainer",initialize:function(a){this.log(this+".initialize:",a);if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}this.urls=this.renderUrls(a.urlTemplates,this.model.toJSON());this.expanded=a.expanded||false;this.model.bind("change",this.render,this)},renderUrls:function(d,a){var b=this,c={};_.each(d,function(e,f){if(_.isObject(e)){c[f]=b.renderUrls(e,a)}else{if(f==="meta_download"){c[f]=b.renderMetaDownloadUrls(e,a)}else{c[f]=_.template(e,a)}}});return c},renderMetaDownloadUrls:function(b,a){return _.map(a.meta_files,function(c){return{url:_.template(b,{id:a.id,file_type:c.file_type}),file_type:c.file_type}})},render:function(){var b=this,e=this.model.get("id"),c=this.model.get("state"),a=$("<div/>").attr("id","historyItem-"+e),d=(this.$el.children().size()===0);this._clearReferences();this.$el.attr("id","historyItemContainer-"+e);a.addClass("historyItemWrapper").addClass("historyItem").addClass("historyItem-"+c);a.append(this._render_warnings());a.append(this._render_titleBar());this.body=$(this._render_body());a.append(this.body);make_popup_menus(a);a.find(".tooltip").tooltip({placement:"bottom"});this.$el.fadeOut("fast",function(){b.$el.children().remove();b.$el.append(a).fadeIn("fast",function(){b.log(b+" rendered:",b.$el);var f="rendered";if(d){f+=":initial"}else{if(b.model.inReadyState()){f+=":ready"}}b.trigger(f)})});return this},_clearReferences:function(){this.displayButton=null;this.editButton=null;this.deleteButton=null;this.errButton=null;this.showParamsButton=null;this.rerunButton=null;this.visualizationsButton=null;this.tagButton=null;this.annotateButton=null},_render_warnings:function(){return $(jQuery.trim(HDAView.templates.messages(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_titleBar:function(){var a=$('<div class="historyItemTitleBar" style="overflow: hidden"></div>');a.append(this._render_titleButtons());a.append('<span class="state-icon"></span>');a.append(this._render_titleLink());return a},_render_titleButtons:function(){var a=$('<div class="historyItemButtons"></div>');a.append(this._render_displayButton());a.append(this._render_editButton());a.append(this._render_deleteButton());return a},_render_displayButton:function(){if((!this.model.inReadyState())||(this.model.get("state")===HistoryDatasetAssociation.STATES.ERROR)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var a={icon_class:"display"};if(this.model.get("purged")){a.enabled=false;a.title="Cannot display datasets removed from disk"}else{a.title="Display data in browser";a.href=this.urls.display}if(this.model.get("for_editing")){a.target="galaxy_main"}this.displayButton=new IconButtonView({model:new IconButton(a)});return this.displayButton.render().$el},_render_editButton:function(){if((this.model.get("state")===HistoryDatasetAssociation.STATES.UPLOAD)||(this.model.get("state")===HistoryDatasetAssociation.STATES.ERROR)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))||(!this.model.get("for_editing"))){return null}var c=this.model.get("purged"),a=this.model.get("deleted"),b={title:"Edit attributes",href:this.urls.edit,target:"galaxy_main",icon_class:"edit"};if(a||c){b.enabled=false;if(c){b.title="Cannot edit attributes of datasets removed from disk"}else{if(a){b.title="Undelete dataset to edit attributes"}}}this.editButton=new IconButtonView({model:new IconButton(b)});return this.editButton.render().$el},_render_deleteButton:function(){if((!this.model.get("for_editing"))||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var a={title:"Delete",href:this.urls["delete"],id:"historyItemDeleter-"+this.model.get("id"),icon_class:"delete"};if(this.model.get("deleted")||this.model.get("purged")){a={title:"Dataset is already deleted",icon_class:"delete",enabled:false}}this.deleteButton=new IconButtonView({model:new IconButton(a)});return this.deleteButton.render().$el},_render_titleLink:function(){return $(jQuery.trim(HDAView.templates.titleLink(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_hdaSummary:function(){var a=_.extend(this.model.toJSON(),{urls:this.urls});if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){_.extend(a,{dbkey_unknown_and_editable:true})}return HDAView.templates.hdaSummary(a)},_render_primaryActionButtons:function(c){var b=$("<div/>").attr("id","primary-actions-"+this.model.get("id")),a=this;_.each(c,function(d){b.append(d.call(a))});return b},_render_downloadButton:function(){if(this.model.get("purged")){return null}var a=HDAView.templates.downloadLinks(_.extend(this.model.toJSON(),{urls:this.urls}));return $(a)},_render_errButton:function(){if((this.model.get("state")!==HistoryDatasetAssociation.STATES.ERROR)||(!this.model.get("for_editing"))){return null}this.errButton=new IconButtonView({model:new IconButton({title:"View or report this error",href:this.urls.report_error,target:"galaxy_main",icon_class:"bug"})});return this.errButton.render().$el},_render_showParamsButton:function(){this.showParamsButton=new IconButtonView({model:new IconButton({title:"View details",href:this.urls.show_params,target:"galaxy_main",icon_class:"information"})});return this.showParamsButton.render().$el},_render_rerunButton:function(){if(!this.model.get("for_editing")){return null}this.rerunButton=new IconButtonView({model:new IconButton({title:"Run this job again",href:this.urls.rerun,target:"galaxy_main",icon_class:"arrow-circle"})});return this.rerunButton.render().$el},_render_visualizationsButton:function(){var c=this.model.get("dbkey"),a=this.model.get("visualizations"),f=this.urls.visualization,d={},g={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(!(this.model.hasData())||!(this.model.get("for_editing"))||!(a&&a.length)||!(f)){return null}this.visualizationsButton=new IconButtonView({model:new IconButton({title:"Visualize",href:f,icon_class:"chart_curve"})});var b=this.visualizationsButton.render().$el;b.addClass("visualize-icon");if(c){g.dbkey=c}function e(h){switch(h){case"trackster":return create_trackster_action_fn(f,g,c);case"scatterplot":return create_scatterplot_action_fn(f,g);default:return function(){window.parent.location=f+"/"+h+"?"+$.param(g)}}}if(a.length===1){b.attr("title",a[0]);b.click(e(a[0]))}else{_.each(a,function(i){var h=i.charAt(0).toUpperCase()+i.slice(1);d[h]=e(i)});make_popupmenu(b,d)}return b},_render_secondaryActionButtons:function(b){var c=$("<div/>"),a=this;c.attr("style","float: right;").attr("id","secondary-actions-"+this.model.get("id"));_.each(b,function(d){c.append(d.call(a))});return c},_render_tagButton:function(){if(!(this.model.hasData())||!(this.model.get("for_editing"))||(!this.urls.tags.get)){return null}this.tagButton=new IconButtonView({model:new IconButton({title:"Edit dataset tags",target:"galaxy_main",href:this.urls.tags.get,icon_class:"tags"})});return this.tagButton.render().$el},_render_annotateButton:function(){if(!(this.model.hasData())||!(this.model.get("for_editing"))||(!this.urls.annotation.get)){return null}this.annotateButton=new IconButtonView({model:new IconButton({title:"Edit dataset annotation",target:"galaxy_main",icon_class:"annotate"})});return this.annotateButton.render().$el},_render_displayApps:function(){if(!this.model.hasData()){return null}var a=$("<div/>").addClass("display-apps");if(!_.isEmpty(this.model.get("display_types"))){a.append(HDAView.templates.displayApps({displayApps:this.model.get("display_types")}))}if(!_.isEmpty(this.model.get("display_apps"))){a.append(HDAView.templates.displayApps({displayApps:this.model.get("display_apps")}))}return a},_render_tagArea:function(){if(!this.urls.tags.set){return null}return $(HDAView.templates.tagArea(_.extend(this.model.toJSON(),{urls:this.urls})))},_render_annotationArea:function(){if(!this.urls.annotation.get){return null}return $(HDAView.templates.annotationArea(_.extend(this.model.toJSON(),{urls:this.urls})))},_render_peek:function(){if(!this.model.get("peek")){return null}return $("<div/>").append($("<pre/>").attr("id","peek"+this.model.get("id")).addClass("peek").append(this.model.get("peek")))},_render_body_not_viewable:function(a){a.append($("<div>You do not have permission to view dataset.</div>"))},_render_body_uploading:function(a){a.append($("<div>Dataset is uploading</div>"))},_render_body_queued:function(a){a.append($("<div>Job is waiting to run.</div>"));a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_running:function(a){a.append("<div>Job is currently running.</div>");a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_error:function(a){if(!this.model.get("purged")){a.append($("<div>"+this.model.get("misc_blurb")+"</div>"))}a.append(("An error occurred running this job: <i>"+$.trim(this.model.get("misc_info"))+"</i>"));a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_errButton,this._render_showParamsButton,this._render_rerunButton]))},_render_body_discarded:function(a){a.append("<div>The job creating this dataset was cancelled before completion.</div>");a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_setting_metadata:function(a){a.append($("<div>Metadata is being auto-detected.</div>"))},_render_body_empty:function(a){a.append($("<div>No data: <i>"+this.model.get("misc_blurb")+"</i></div>"));a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_failed_metadata:function(a){a.append($(HDAView.templates.failedMetadata(this.model.toJSON())));this._render_body_ok(a)},_render_body_ok:function(a){a.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton,this._render_rerunButton]));return}a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_errButton,this._render_showParamsButton,this._render_rerunButton,this._render_visualizationsButton]));a.append(this._render_secondaryActionButtons([this._render_tagButton,this._render_annotateButton]));a.append('<div class="clear"/>');a.append(this._render_tagArea());a.append(this._render_annotationArea());a.append(this._render_displayApps());a.append(this._render_peek())},_render_body:function(){var a=$("<div/>").attr("id","info-"+this.model.get("id")).addClass("historyItemBody").attr("style","display: block");switch(this.model.get("state")){case HistoryDatasetAssociation.STATES.NOT_VIEWABLE:this._render_body_not_viewable(a);break;case HistoryDatasetAssociation.STATES.UPLOAD:this._render_body_uploading(a);break;case HistoryDatasetAssociation.STATES.QUEUED:this._render_body_queued(a);break;case HistoryDatasetAssociation.STATES.RUNNING:this._render_body_running(a);break;case HistoryDatasetAssociation.STATES.ERROR:this._render_body_error(a);break;case HistoryDatasetAssociation.STATES.DISCARDED:this._render_body_discarded(a);break;case HistoryDatasetAssociation.STATES.SETTING_METADATA:this._render_body_setting_metadata(a);break;case HistoryDatasetAssociation.STATES.EMPTY:this._render_body_empty(a);break;case HistoryDatasetAssociation.STATES.FAILED_METADATA:this._render_body_failed_metadata(a);break;case HistoryDatasetAssociation.STATES.OK:this._render_body_ok(a);break;default:a.append($('<div>Error: unknown dataset state "'+state+'".</div>'))}a.append('<div style="clear: both"></div>');if(this.expanded){a.show()}else{a.hide()}return a},events:{"click .historyItemTitle":"toggleBodyVisibility","click a.icon-button.tags":"loadAndDisplayTags","click a.icon-button.annotate":"loadAndDisplayAnnotation"},loadAndDisplayTags:function(b){this.log(this+".loadAndDisplayTags",b);var c=this.$el.find(".tag-area"),a=c.find(".tag-elt");if(c.is(":hidden")){if(!jQuery.trim(a.html())){$.ajax({url:this.urls.tags.get,error:function(){alert("Tagging failed")},success:function(d){a.html(d);a.find(".tooltip").tooltip();c.slideDown("fast")}})}else{c.slideDown("fast")}}else{c.slideUp("fast")}return false},loadAndDisplayAnnotation:function(b){this.log(this+".loadAndDisplayAnnotation",b);var d=this.$el.find(".annotation-area"),c=d.find(".annotation-elt"),a=this.urls.annotation.set;if(d.is(":hidden")){if(!jQuery.trim(c.html())){$.ajax({url:this.urls.annotation.get,error:function(){alert("Annotations failed")},success:function(e){if(e===""){e="<em>Describe or add notes to dataset</em>"}c.html(e);d.find(".tooltip").tooltip();async_save_text(c.attr("id"),c.attr("id"),a,"new_annotation",18,true,4);d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toggleBodyVisibility:function(b,a){var c=this.$el.find(".historyItemBody");a=(a===undefined)?(!c.is(":visible")):(a);if(a){c.slideDown("fast")}else{c.slideUp("fast")}this.trigger("toggleBodyVisibility",this.model.get("id"),a)},toString:function(){var a=(this.model)?(this.model+""):("(no model)");return"HDAView("+a+")"}});HDAView.templates={warningMsg:Handlebars.templates["template-warningmessagesmall"],messages:Handlebars.templates["template-history-warning-messages"],titleLink:Handlebars.templates["template-history-titleLink"],hdaSummary:Handlebars.templates["template-history-hdaSummary"],downloadLinks:Handlebars.templates["template-history-downloadLinks"],failedMetadata:Handlebars.templates["template-history-failedMetaData"],tagArea:Handlebars.templates["template-history-tagArea"],annotationArea:Handlebars.templates["template-history-annotationArea"],displayApps:Handlebars.templates["template-history-displayApps"]};function create_scatterplot_action_fn(a,b){action=function(){var d=$(window.parent.document).find("iframe#galaxy_main"),c=a+"/scatterplot?"+$.param(b);d.attr("src",c);$("div.popmenu-wrapper").remove();return false};return action}function create_trackster_action_fn(a,c,b){return function(){var d={};if(b){d.dbkey=b}$.ajax({url:a+"/list_tracks?f-"+$.param(d),dataType:"html",error:function(){alert("Could not add this dataset to browser.")},success:function(e){var f=window.parent;f.show_modal("View Data in a New or Saved Visualization","",{Cancel:function(){f.hide_modal()},"View in saved visualization":function(){f.show_modal("Add Data to Saved Visualization",e,{Cancel:function(){f.hide_modal()},"Add to visualization":function(){$(f.document).find("input[name=id]:checked").each(function(){var g=$(this).val();c.id=g;f.location=a+"/trackster?"+$.param(c)})}})},"View in new visualization":function(){f.location=a+"/trackster?"+$.param(c)}})}});return false}};
\ No newline at end of file
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 static/scripts/packed/mvc/dataset/hda-model.js
--- /dev/null
+++ b/static/scripts/packed/mvc/dataset/hda-model.js
@@ -0,0 +1,1 @@
+var HistoryDatasetAssociation=BaseModel.extend(LoggableMixin).extend({defaults:{history_id:null,model_class:"HistoryDatasetAssociation",hid:0,id:null,name:"",state:"",data_type:null,file_size:0,meta_files:[],misc_blurb:"",misc_info:"",deleted:false,purged:false,visible:false,accessible:false,for_editing:true},url:function(){return"api/histories/"+this.get("history_id")+"/contents/"+this.get("id")},initialize:function(){this.log(this+".initialize",this.attributes);this.log("\tparent history_id: "+this.get("history_id"));if(!this.get("accessible")){this.set("state",HistoryDatasetAssociation.STATES.NOT_VIEWABLE)}this.on("change:state",function(b,a){this.log(this+" has changed state:",b,a);if(this.inReadyState()){this.trigger("state:ready",this.get("id"),a,this.previous("state"),b)}})},isDeletedOrPurged:function(){return(this.get("deleted")||this.get("purged"))},isVisible:function(b,c){var a=true;if((!b)&&(this.get("deleted")||this.get("purged"))){a=false}if((!c)&&(!this.get("visible"))){a=false}return a},inReadyState:function(){var a=this.get("state");return((a===HistoryDatasetAssociation.STATES.NEW)||(a===HistoryDatasetAssociation.STATES.OK)||(a===HistoryDatasetAssociation.STATES.EMPTY)||(a===HistoryDatasetAssociation.STATES.FAILED_METADATA)||(a===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(a===HistoryDatasetAssociation.STATES.DISCARDED)||(a===HistoryDatasetAssociation.STATES.ERROR))},hasData:function(){return(this.get("file_size")>0)},toString:function(){var a=this.get("id")||"";if(this.get("name")){a+=':"'+this.get("name")+'"'}return"HistoryDatasetAssociation("+a+")"}});HistoryDatasetAssociation.STATES={UPLOAD:"upload",QUEUED:"queued",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",OK:"ok",EMPTY:"empty",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};var HDACollection=Backbone.Collection.extend(LoggableMixin).extend({model:HistoryDatasetAssociation,initialize:function(){},ids:function(){return this.map(function(a){return a.id})},getVisible:function(a,b){return this.filter(function(c){return c.isVisible(a,b)})},getStateLists:function(){var a={};_.each(_.values(HistoryDatasetAssociation.STATES),function(b){a[b]=[]});this.each(function(b){a[b.get("state")].push(b.get("id"))});return a},running:function(){var a=[];this.each(function(b){if(!b.inReadyState()){a.push(b.get("id"))}});return a},update:function(a){this.log(this+"update:",a);if(!(a&&a.length)){return}var b=this;_.each(a,function(e,c){var d=b.get(e);d.fetch()})},toString:function(){return("HDACollection("+this.ids().join(",")+")")}});
\ No newline at end of file
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 static/scripts/packed/mvc/history/history-model.js
--- /dev/null
+++ b/static/scripts/packed/mvc/history/history-model.js
@@ -0,0 +1,1 @@
+var History=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",show_deleted:false,show_hidden:false,diskSize:0,deleted:false,tags:[],annotation:null,message:null,quotaMsg:false},url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b&&b.length){this.hdas.reset(b);this.checkForUpdates()}},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.log(b)}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.itemIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();c()})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.hdas.update(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},4000)}}).error(function(f,d,e){if(console&&console.warn){console.warn("Error getting history updates from the server:",f,d,e)}alert("Error getting history updates from the server.\n"+e)})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories",logger:console});
\ No newline at end of file
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 static/scripts/packed/mvc/history/history-panel.js
--- /dev/null
+++ b/static/scripts/packed/mvc/history/history-panel.js
@@ -0,0 +1,1 @@
+var HistoryPanel=BaseView.extend(LoggableMixin).extend({el:"body.historyPage",initialize:function(a){this.log(this+".initialize:",a);if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}if(!a.urlTemplates.history){throw ("HDAView needs urlTemplates.history on initialize")}if(!a.urlTemplates.hda){throw ("HDAView needs urlTemplates.hda on initialize")}this.urlTemplates=a.urlTemplates.history;this.hdaUrlTemplates=a.urlTemplates.hda;this.storage=new PersistantStorage("HistoryView."+this.model.get("id"),{expandedHdas:{}});this.model.bind("change:nice_size",this.updateHistoryDiskSize,this);this.model.hdas.bind("add",this.add,this);this.model.hdas.bind("reset",this.addAll,this);this.model.hdas.bind("all",this.all,this);this.hdaViews={};this.urls={}},add:function(a){},addAll:function(){this.render()},all:function(a){},renderUrls:function(a){var b=this;b.urls={};_.each(this.urlTemplates,function(d,c){b.urls[c]=_.template(d,a)});return b.urls},render:function(){var b=this,d=b.toString()+".set-up",c=$("<div/>"),a=this.model.toJSON(),e=(this.$el.children().size()===0);a.urls=this.renderUrls(a);c.append(HistoryPanel.templates.historyPanel(a));c.find(".tooltip").tooltip();if(!this.model.hdas.length||!this.renderItems(c.find("#"+this.model.get("id")+"-datasets"))){c.find("#emptyHistoryMessage").show()}$(b).queue(d,function(f){b.$el.fadeOut("fast",function(){f()})});$(b).queue(d,function(f){b.$el.html("");b.$el.append(c.children());b.$el.fadeIn("fast",function(){f()})});$(b).queue(d,function(f){this.log(b+" rendered:",b.$el);b.setUpBehaviours();if(e){b.trigger("rendered:initial")}else{b.trigger("rendered")}f()});$(b).dequeue(d);return this},renderItems:function(c){this.hdaViews={};var b=this,a=this.model.get("show_deleted"),e=this.model.get("show_hidden"),d=this.model.hdas.getVisible(a,e);_.each(d,function(h){var g=h.get("id"),f=b.storage.get("expandedHdas").get(g);b.hdaViews[g]=new HDAView({model:h,expanded:f,urlTemplates:b.hdaUrlTemplates});b.setUpHdaListeners(b.hdaViews[g]);c.prepend(b.hdaViews[g].render().$el)});return d.length},setUpHdaListeners:function(b){var a=this;b.bind("toggleBodyVisibility",function(d,c){if(c){a.storage.get("expandedHdas").set(d,true)}else{a.storage.get("expandedHdas").deleteKey(d)}});b.bind("rendered:ready",function(){a.trigger("hda:rendered:ready")})},setUpBehaviours:function(){if(!(this.model.get("user")&&this.model.get("user").email)){return}var a=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(a.is(":hidden")){a.slideDown("fast")}else{a.slideUp("fast")}return false});async_save_text("history-name-container","history-name",this.urls.rename,"new_name",18);async_save_text("history-annotation-container","history-annotation",this.urls.annotate,"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},showQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(b.is(":hidden")){b.slideDown("fast")}},hideQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(!b.is(":hidden")){b.slideUp("fast")}},events:{"click #history-collapse-all":"hideAllHdaBodies","click #history-tag":"loadAndDisplayTags"},hideAllHdaBodies:function(){_.each(this.hdaViews,function(a){a.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},loadAndDisplayTags:function(c){this.log(this+".loadAndDisplayTags",c);var d=this.$el.find("#history-tag-area"),b=d.find(".tag-elt");this.log("\t tagArea",d," tagElt",b);if(d.is(":hidden")){if(!jQuery.trim(b.html())){var a=this;$.ajax({url:a.urls.tag,error:function(){alert("Tagging failed")},success:function(e){b.html(e);b.find(".tooltip").tooltip();d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toString:function(){var a=this.model.get("name")||"";return"HistoryView("+a+")"}});HistoryPanel.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};
\ No newline at end of file
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 static/scripts/templates/compiled/template-history-historyPanel.js
--- a/static/scripts/templates/compiled/template-history-historyPanel.js
+++ b/static/scripts/templates/compiled/template-history-historyPanel.js
@@ -7,232 +7,157 @@
function program1(depth0,data) {
var buffer = "", stack1, foundHelper;
- buffer += "\n <div id=\"history-name\" style=\"margin-right: 50px;\" class=\"tooltip editable-text\"\n title=\"Click to rename history\">";
+ buffer += "\n <div id=\"history-name\" class=\"tooltip editable-text\"\n title=\"Click to rename history\">";
foundHelper = helpers.name;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "</div>\n ";
+ buffer += escapeExpression(stack1) + "</div>\n ";
return buffer;}
function program3(depth0,data) {
var buffer = "", stack1, foundHelper;
- buffer += "\n <div id=\"history-name\" style=\"margin-right: 50px;\" class=\"tooltip\"\n title=\"You must be logged in to edit your history name\">";
+ buffer += "\n <div id=\"history-name\" class=\"tooltip\"\n title=\"You must be logged in to edit your history name\">";
foundHelper = helpers.name;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "</div>\n ";
+ buffer += escapeExpression(stack1) + "</div>\n ";
return buffer;}
function program5(depth0,data) {
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n <div id=\"history-secondary-links\" style=\"float: right;\">\n <a id=\"history-tag\" title=\"";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(6, program6, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(6, program6, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\"\n class=\"icon-button tags tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n <a id=\"history-annotate\" title=\"";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(8, program8, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(8, program8, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\"\n class=\"icon-button annotate tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n </div>\n ";
+ return buffer;}
+function program6(depth0,data) {
- return "refresh";}
+
+ return "Edit history tags";}
-function program7(depth0,data) {
+function program8(depth0,data) {
- return "collapse all";}
+ return "Edit history annotation";}
-function program9(depth0,data) {
+function program10(depth0,data) {
var buffer = "", stack1, foundHelper;
- buffer += "\n <a id=\"history-tag\" title=\"";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); }
+ buffer += "\n ";
+ foundHelper = helpers.warningmessagesmall;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); }
+ else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); }
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\"\n class=\"icon-button tags tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n <a id=\"history-annotate\" title=\"";
+ buffer += "\n ";
+ return buffer;}
+function program11(depth0,data) {
+
+ var stack1, foundHelper;
foundHelper = helpers.local;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); }
else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\"\n class=\"icon-button annotate tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n ";
- return buffer;}
-function program10(depth0,data) {
-
-
- return "Edit history tags";}
-
+ if(stack1 || stack1 === 0) { return stack1; }
+ else { return ''; }}
function program12(depth0,data) {
- return "Edit history annotation";}
+ return "You are currently viewing a deleted history!";}
function program14(depth0,data) {
- var buffer = "", stack1, foundHelper;
- buffer += "\n <a href=\"";
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.hide_deleted;
- stack1 = typeof stack1 === functionType ? stack1() : stack1;
- buffer += escapeExpression(stack1) + "\">";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(15, program15, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(15, program15, data)}); }
+ var buffer = "", stack1;
+ buffer += "\n <div id=\"history-tag-annotation\">\n\n <div id=\"history-tag-area\" style=\"display: none\">\n <strong>Tags:</strong>\n <div class=\"tag-elt\"></div>\n </div>\n\n <div id=\"history-annotation-area\" style=\"display: none\">\n <strong>Annotation / Notes:</strong>\n <div id=\"history-annotation-container\">\n <div id=\"history-annotation\" class=\"tooltip editable-text\" title=\"Click to edit annotation\">\n ";
+ stack1 = depth0.annotation;
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(17, program17, data),fn:self.program(15, program15, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "</a>\n ";
+ buffer += "\n </div>\n </div>\n </div>\n </div>\n ";
return buffer;}
function program15(depth0,data) {
-
- return "hide deleted";}
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n ";
+ foundHelper = helpers.annotation;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.annotation; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "\n ";
+ return buffer;}
function program17(depth0,data) {
- var buffer = "", stack1, foundHelper;
- buffer += "\n <a href=\"";
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.hide_hidden;
- stack1 = typeof stack1 === functionType ? stack1() : stack1;
- buffer += escapeExpression(stack1) + "\">";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(18, program18, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(18, program18, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "</a>\n ";
- return buffer;}
-function program18(depth0,data) {
-
- return "hide hidden";}
+ return "\n <em>Describe or add notes to history</em>\n ";}
-function program20(depth0,data) {
+function program19(depth0,data) {
var buffer = "", stack1, foundHelper;
- buffer += "\n";
- foundHelper = helpers.warningmessagesmall;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(21, program21, data)}); }
- else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(21, program21, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n";
- return buffer;}
-function program21(depth0,data) {
-
- var stack1, foundHelper;
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(22, program22, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(22, program22, data)}); }
- if(stack1 || stack1 === 0) { return stack1; }
- else { return ''; }}
-function program22(depth0,data) {
-
-
- return "You are currently viewing a deleted history!";}
-
-function program24(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "\n <div id=\"history-tag-area\" style=\"display: none\">\n <strong>Tags:</strong>\n <div class=\"tag-elt\"></div>\n </div>\n\n <div id=\"history-annotation-area\" style=\"display: none\">\n <strong>Annotation / Notes:</strong>\n <div id=\"history-annotation-container\">\n <div id=\"history-annotation\" class=\"tooltip editable-text\" title=\"Click to edit annotation\">\n ";
- stack1 = depth0.annotation;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(27, program27, data),fn:self.program(25, program25, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n </div>\n </div>\n </div>\n ";
- return buffer;}
-function program25(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n ";
- foundHelper = helpers.annotation;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.annotation; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "\n ";
- return buffer;}
-
-function program27(depth0,data) {
-
-
- return "\n <em>Describe or add notes to history</em>\n ";}
-
-function program29(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n<div id=\"message-container\">\n <div class=\"";
+ buffer += "\n <div id=\"message-container\">\n <div class=\"";
foundHelper = helpers.status;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.status; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "message\">\n ";
+ buffer += escapeExpression(stack1) + "message\">\n ";
foundHelper = helpers.message;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.message; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "\n </div><br />\n</div>\n";
+ buffer += escapeExpression(stack1) + "\n </div><br />\n </div>\n ";
return buffer;}
-function program31(depth0,data) {
+function program21(depth0,data) {
return "Your history is empty. Click 'Get Data' on the left pane to start";}
- buffer += "\n<div id=\"history-name-area\" class=\"historyLinks\">\n <div id=\"history-name-container\" style=\"position: relative;\">\n ";
- buffer += "\n <div id=\"history-size\" style=\"position: absolute; top: 3px; right: 0px;\">";
+ buffer += "\n<div id=\"history-controls\">\n <div id=\"history-title-area\" class=\"historyLinks\">\n\n <div id=\"history-name-container\" style=\"float: left;\">\n ";
+ buffer += "\n ";
+ stack1 = depth0.user;
+ stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email;
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data)});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n </div>\n\n <a id=\"history-action-popup\" href=\"javascript:void(0);\" style=\"float: right;\">\n <span class=\"ficon cog large\"></span>\n </a>\n <div style=\"clear: both;\"></div>\n </div>\n\n <div id=\"history-subtitle-area\">\n <div id=\"history-size\" style=\"float:left;\">";
foundHelper = helpers.nice_size;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.nice_size; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
buffer += escapeExpression(stack1) + "</div>\n ";
stack1 = depth0.user;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data)});
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n </div> \n</div>\n<div style=\"clear: both;\"></div>\n\n<div id=\"top-links\" class=\"historyLinks\">\n <a title=\"";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)}); }
+ buffer += "\n <div style=\"clear: both;\"></div>\n </div>\n\n ";
+ stack1 = depth0.deleted;
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\" class=\"icon-button arrow-circle tooltip\" href=\"";
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.base;
- stack1 = typeof stack1 === functionType ? stack1() : stack1;
- buffer += escapeExpression(stack1) + "\"></a>\n <a title='";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "' id=\"history-collapse-all\"\n class='icon-button toggle tooltip' href='javascript:void(0);'></a>\n <div style=\"width: 40px; float: right; white-space: nowrap;\">\n ";
+ buffer += "\n\n ";
+ buffer += "\n ";
+ buffer += "\n ";
stack1 = depth0.user;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n </div>\n</div>\n<div style=\"clear: both;\"></div>\n\n";
- buffer += "\n<div class=\"historyLinks\">\n ";
- stack1 = depth0.show_deleted;
stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n ";
- stack1 = depth0.show_hidden;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(17, program17, data)});
+ buffer += "\n\n ";
+ stack1 = depth0.message;
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(19, program19, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n</div>\n\n";
- stack1 = depth0.deleted;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(20, program20, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n\n";
- buffer += "\n";
- buffer += "\n<div style=\"margin: 0px 5px 10px 5px\">\n\n ";
- stack1 = depth0.user;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(24, program24, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n</div>\n\n";
- stack1 = depth0.message;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(29, program29, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n\n<div id=\"quota-message-container\" style=\"display: none\">\n <div id=\"quota-message\" class=\"errormessage\">\n You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.\n </div>\n</div>\n\n<div id=\"";
+ buffer += "\n\n <div id=\"quota-message-container\" style=\"display: none\">\n <div id=\"quota-message\" class=\"errormessage\">\n You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.\n </div>\n </div>\n</div>\n\n<div id=\"";
foundHelper = helpers.id;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
buffer += escapeExpression(stack1) + "-datasets\" class=\"history-datasets-list\"></div>\n\n<div class=\"infomessagesmall\" id=\"emptyHistoryMessage\" style=\"display: none;\">\n ";
foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(31, program31, data)}); }
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(21, program21, data)}); }
else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(31, program31, data)}); }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(21, program21, data)}); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n</div>";
return buffer;});
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 static/scripts/templates/history-templates.html
--- a/static/scripts/templates/history-templates.html
+++ b/static/scripts/templates/history-templates.html
@@ -106,86 +106,80 @@
--><script type="text/template" class="template-history" id="template-history-historyPanel">
{{! history name (if any) }}
-<div id="history-name-area" class="historyLinks">
- <div id="history-name-container" style="position: relative;">
- {{! TODO: factor out conditional css }}
- <div id="history-size" style="position: absolute; top: 3px; right: 0px;">{{nice_size}}</div>
- {{#if user.email}}
- <div id="history-name" style="margin-right: 50px;" class="tooltip editable-text"
+<div id="history-controls">
+ <div id="history-title-area" class="historyLinks">
+
+ <div id="history-name-container" style="float: left;">
+ {{! TODO: factor out conditional css }}
+ {{#if user.email}}
+ <div id="history-name" class="tooltip editable-text"
title="Click to rename history">{{name}}</div>
- {{else}}
- <div id="history-name" style="margin-right: 50px;" class="tooltip"
+ {{else}}
+ <div id="history-name" class="tooltip"
title="You must be logged in to edit your history name">{{name}}</div>
- {{/if}}
- </div>
-</div>
-<div style="clear: both;"></div>
+ {{/if}}
+ </div>
-<div id="top-links" class="historyLinks">
- <a title="{{#local}}refresh{{/local}}" class="icon-button arrow-circle tooltip" href="{{urls.base}}"></a>
- <a title='{{#local}}collapse all{{/local}}' id="history-collapse-all"
- class='icon-button toggle tooltip' href='javascript:void(0);'></a>
- <div style="width: 40px; float: right; white-space: nowrap;">
- {{#if user.email}}
- <a id="history-tag" title="{{#local}}Edit history tags{{/local}}"
- class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>
- <a id="history-annotate" title="{{#local}}Edit history annotation{{/local}}"
- class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>
- {{/if}}
- </div>
-</div>
-<div style="clear: both;"></div>
-
-{{! TODO: move to js with no reload - use each with historyLinks }}
-<div class="historyLinks">
- {{#if show_deleted}}
- <a href="{{urls.hide_deleted}}">{{#local}}hide deleted{{/local}}</a>
- {{/if}}
- {{#if show_hidden}}
- <a href="{{urls.hide_hidden}}">{{#local}}hide hidden{{/local}}</a>
- {{/if}}
-</div>
-
-{{#if deleted}}
-{{#warningmessagesmall}}{{#local}}You are currently viewing a deleted history!{{/local}}{{/warningmessagesmall}}
-{{/if}}
-
-{{! tags and annotations }}
-{{! TODO: move inline styles out }}
-<div style="margin: 0px 5px 10px 5px">
-
- {{#if user.email}}
- <div id="history-tag-area" style="display: none">
- <strong>Tags:</strong>
- <div class="tag-elt"></div>
+ <a id="history-action-popup" href="javascript:void(0);" style="float: right;">
+ <span class="ficon cog large"></span>
+ </a>
+ <div style="clear: both;"></div></div>
- <div id="history-annotation-area" style="display: none">
- <strong>Annotation / Notes:</strong>
- <div id="history-annotation-container">
- <div id="history-annotation" class="tooltip editable-text" title="Click to edit annotation">
- {{#if annotation}}
- {{annotation}}
- {{else}}
- <em>Describe or add notes to history</em>
- {{/if}}
+ <div id="history-subtitle-area">
+ <div id="history-size" style="float:left;">{{nice_size}}</div>
+ {{#if user.email}}
+ <div id="history-secondary-links" style="float: right;">
+ <a id="history-tag" title="{{#local}}Edit history tags{{/local}}"
+ class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>
+ <a id="history-annotate" title="{{#local}}Edit history annotation{{/local}}"
+ class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a></div>
+ {{/if}}
+ <div style="clear: both;"></div>
+ </div>
+
+ {{#if deleted}}
+ {{#warningmessagesmall}}{{#local}}You are currently viewing a deleted history!{{/local}}{{/warningmessagesmall}}
+ {{/if}}
+
+ {{! tags and annotations }}
+ {{! TODO: move inline styles out }}
+ {{#if user.email}}
+ <div id="history-tag-annotation">
+
+ <div id="history-tag-area" style="display: none">
+ <strong>Tags:</strong>
+ <div class="tag-elt"></div>
+ </div>
+
+ <div id="history-annotation-area" style="display: none">
+ <strong>Annotation / Notes:</strong>
+ <div id="history-annotation-container">
+ <div id="history-annotation" class="tooltip editable-text" title="Click to edit annotation">
+ {{#if annotation}}
+ {{annotation}}
+ {{else}}
+ <em>Describe or add notes to history</em>
+ {{/if}}
+ </div>
+ </div></div></div>
{{/if}}
-</div>
-{{#if message}}
-<div id="message-container">
- <div class="{{status}}message">
- {{message}}
- </div><br />
-</div>
-{{/if}}
+ {{#if message}}
+ <div id="message-container">
+ <div class="{{status}}message">
+ {{message}}
+ </div><br />
+ </div>
+ {{/if}}
-<div id="quota-message-container" style="display: none">
- <div id="quota-message" class="errormessage">
- You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.
+ <div id="quota-message-container" style="display: none">
+ <div id="quota-message" class="errormessage">
+ You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.
+ </div></div></div>
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 templates/root/alternate_history.mako
--- a/templates/root/alternate_history.mako
+++ b/templates/root/alternate_history.mako
@@ -42,9 +42,9 @@
'No data: ',
'format: ',
'database: ',
- # localized data.dbkey?? - localize in the datasetup above
+ #TODO localized data.dbkey??
'Info: ',
- # localized display_app.display_name?? - localize above
+ #TODO localized display_app.display_name??
# _( link_app.name )
# localized peek...ugh
'Error: unknown dataset state',
@@ -63,12 +63,6 @@
encoded_id_template = '<%= id %>'
url_dict = {
- # TODO:?? next 3 needed?
- 'base' : h.url_for( controller="/history" ),
- ##TODO: move these into the historyMV
- 'hide_deleted' : h.url_for( controller="/history", show_deleted=False ),
- 'hide_hidden' : h.url_for( controller="/history", show_hidden=False ),
-
##TODO: into their own MVs
'rename' : h.url_for( controller="/history", action="rename_async",
id=encoded_id_template ),
@@ -294,15 +288,14 @@
// add user data to history
// i don't like this history+user relationship, but user authentication changes views/behaviour
history.user = user;
- // is page sending in show settings? if so override history's
- //TODO: move into historyPanel
- history.show_deleted = ${ 'true' if show_deleted else 'false' };
- history.show_hidden = ${ 'true' if show_hidden else 'false' };
var historyPanel = new HistoryPanel({
- model : new History( history, hdas ),
- urlTemplates: galaxy_paths.attributes,
- logger : console
+ model : new History( history, hdas ),
+ urlTemplates : galaxy_paths.attributes,
+ logger : console,
+ // is page sending in show settings? if so override history's
+ show_deleted : ${ 'true' if show_deleted == True else ( 'null' if show_deleted == None else 'false' ) },
+ show_hidden : ${ 'true' if show_hidden == True else ( 'null' if show_hidden == None else 'false' ) }
});
historyPanel.render();
if( !Galaxy.currHistoryPanel ){ Galaxy.currHistoryPanel = historyPanel; }
@@ -317,6 +310,7 @@
// QUOTA METER is a cross-frame ui element (meter in masthead, over quota message in history)
// create it and join them here for now (via events)
//TODO: this really belongs in the masthead
+ //TODO: and the quota message (curr. in the history panel) belongs somewhere else
//window.currUser.logger = console;
var quotaMeter = new UserQuotaMeter({
@@ -351,30 +345,50 @@
<%def name="stylesheets()">
${parent.stylesheets()}
- ${h.css("base", "history", "autocomplete_tagging" )}
+ ${h.css(
+ "base",
+ "history",
+ "autocomplete_tagging"
+ )}
<style>
## TODO: move to base.less
.historyItemBody {
display: none;
}
- div.form-row {
- padding: 5px 5px 5px 0px;
+
+ #history-controls {
+ /*border: 1px solid white;*/
+ margin-bottom: 5px;
+ padding: 5px;
}
- #top-links {
- margin-bottom: 15px;
- }
- #history-name-container {
- color: gray;
- font-weight: bold;
+
+ #history-title-area {
+ margin: 0px 0px 5px 0px;
+ /*border: 1px solid red;*/
}
#history-name {
word-wrap: break-word;
+ font-weight: bold;
+ color: black;
}
.editable-text {
border: solid transparent 1px;
- padding: 3px;
- margin: -4px;
}
+ #history-name-container input {
+ width: 90%;
+ margin: -2px 0px -3px -4px;
+ font-weight: bold;
+ color: black;
+ }
+
+ #history-subtitle-area {
+ /*border: 1px solid green;*/
+ }
+ #history-size {
+ }
+ #history-secondary-links {
+ }
+
</style><noscript>
https://bitbucket.org/galaxy/galaxy-central/changeset/6344832c535a/
changeset: 6344832c535a
user: carlfeberhard
date: 2012-11-08 20:43:26
summary: pack scripts
affected #: 4 files
diff -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 -r 6344832c535aab0a8cc4a57be1414fc179e8540b static/scripts/packed/mvc/history/history-model.js
--- a/static/scripts/packed/mvc/history/history-model.js
+++ b/static/scripts/packed/mvc/history/history-model.js
@@ -1,1 +1,1 @@
-var History=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",show_deleted:false,show_hidden:false,diskSize:0,deleted:false,tags:[],annotation:null,message:null,quotaMsg:false},url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b&&b.length){this.hdas.reset(b);this.checkForUpdates()}},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.log(b)}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.itemIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();c()})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.hdas.update(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},4000)}}).error(function(f,d,e){if(console&&console.warn){console.warn("Error getting history updates from the server:",f,d,e)}alert("Error getting history updates from the server.\n"+e)})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories",logger:console});
\ No newline at end of file
+var History=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,tags:[],annotation:null,message:null,quotaMsg:false},url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b&&b.length){this.hdas.reset(b);this.checkForUpdates()}},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.log(b)}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.itemIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();c()})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.hdas.update(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},4000)}}).error(function(f,d,e){if(console&&console.warn){console.warn("Error getting history updates from the server:",f,d,e)}alert("Error getting history updates from the server.\n"+e)})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories",logger:console});
\ No newline at end of file
diff -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 -r 6344832c535aab0a8cc4a57be1414fc179e8540b static/scripts/packed/mvc/history/history-panel.js
--- a/static/scripts/packed/mvc/history/history-panel.js
+++ b/static/scripts/packed/mvc/history/history-panel.js
@@ -1,1 +1,1 @@
-var HistoryPanel=BaseView.extend(LoggableMixin).extend({el:"body.historyPage",initialize:function(a){this.log(this+".initialize:",a);if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}if(!a.urlTemplates.history){throw ("HDAView needs urlTemplates.history on initialize")}if(!a.urlTemplates.hda){throw ("HDAView needs urlTemplates.hda on initialize")}this.urlTemplates=a.urlTemplates.history;this.hdaUrlTemplates=a.urlTemplates.hda;this.storage=new PersistantStorage("HistoryView."+this.model.get("id"),{expandedHdas:{}});this.model.bind("change:nice_size",this.updateHistoryDiskSize,this);this.model.hdas.bind("add",this.add,this);this.model.hdas.bind("reset",this.addAll,this);this.model.hdas.bind("all",this.all,this);this.hdaViews={};this.urls={}},add:function(a){},addAll:function(){this.render()},all:function(a){},renderUrls:function(a){var b=this;b.urls={};_.each(this.urlTemplates,function(d,c){b.urls[c]=_.template(d,a)});return b.urls},render:function(){var b=this,d=b.toString()+".set-up",c=$("<div/>"),a=this.model.toJSON(),e=(this.$el.children().size()===0);a.urls=this.renderUrls(a);c.append(HistoryPanel.templates.historyPanel(a));c.find(".tooltip").tooltip();if(!this.model.hdas.length||!this.renderItems(c.find("#"+this.model.get("id")+"-datasets"))){c.find("#emptyHistoryMessage").show()}$(b).queue(d,function(f){b.$el.fadeOut("fast",function(){f()})});$(b).queue(d,function(f){b.$el.html("");b.$el.append(c.children());b.$el.fadeIn("fast",function(){f()})});$(b).queue(d,function(f){this.log(b+" rendered:",b.$el);b.setUpBehaviours();if(e){b.trigger("rendered:initial")}else{b.trigger("rendered")}f()});$(b).dequeue(d);return this},renderItems:function(c){this.hdaViews={};var b=this,a=this.model.get("show_deleted"),e=this.model.get("show_hidden"),d=this.model.hdas.getVisible(a,e);_.each(d,function(h){var g=h.get("id"),f=b.storage.get("expandedHdas").get(g);b.hdaViews[g]=new HDAView({model:h,expanded:f,urlTemplates:b.hdaUrlTemplates});b.setUpHdaListeners(b.hdaViews[g]);c.prepend(b.hdaViews[g].render().$el)});return d.length},setUpHdaListeners:function(b){var a=this;b.bind("toggleBodyVisibility",function(d,c){if(c){a.storage.get("expandedHdas").set(d,true)}else{a.storage.get("expandedHdas").deleteKey(d)}});b.bind("rendered:ready",function(){a.trigger("hda:rendered:ready")})},setUpBehaviours:function(){if(!(this.model.get("user")&&this.model.get("user").email)){return}var a=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(a.is(":hidden")){a.slideDown("fast")}else{a.slideUp("fast")}return false});async_save_text("history-name-container","history-name",this.urls.rename,"new_name",18);async_save_text("history-annotation-container","history-annotation",this.urls.annotate,"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},showQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(b.is(":hidden")){b.slideDown("fast")}},hideQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(!b.is(":hidden")){b.slideUp("fast")}},events:{"click #history-collapse-all":"hideAllHdaBodies","click #history-tag":"loadAndDisplayTags"},hideAllHdaBodies:function(){_.each(this.hdaViews,function(a){a.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},loadAndDisplayTags:function(c){this.log(this+".loadAndDisplayTags",c);var d=this.$el.find("#history-tag-area"),b=d.find(".tag-elt");this.log("\t tagArea",d," tagElt",b);if(d.is(":hidden")){if(!jQuery.trim(b.html())){var a=this;$.ajax({url:a.urls.tag,error:function(){alert("Tagging failed")},success:function(e){b.html(e);b.find(".tooltip").tooltip();d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toString:function(){var a=this.model.get("name")||"";return"HistoryView("+a+")"}});HistoryPanel.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};
\ No newline at end of file
+var HistoryPanel=BaseView.extend(LoggableMixin).extend({el:"body.historyPage",initialize:function(a){this.log(this+".initialize:",a);if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}if(!a.urlTemplates.history){throw ("HDAView needs urlTemplates.history on initialize")}if(!a.urlTemplates.hda){throw ("HDAView needs urlTemplates.hda on initialize")}this.urlTemplates=a.urlTemplates.history;this.hdaUrlTemplates=a.urlTemplates.hda;this.storage=new PersistantStorage("HistoryView."+this.model.get("id"),{expandedHdas:{},show_deleted:false,show_hidden:false});this.log("this.storage:",this.storage.get());this.log("show_deleted:",a.show_deleted,"show_hidden",a.show_hidden);if((a.show_deleted===true)||(a.show_deleted===false)){this.storage.set("show_deleted",a.show_deleted)}if((a.show_hidden===true)||(a.show_hidden===false)){this.storage.set("show_hidden",a.show_hidden)}this.show_deleted=this.storage.get("show_deleted");this.show_hidden=this.storage.get("show_hidden");this.log("this.show_deleted:",this.show_deleted,"show_hidden",this.show_hidden);this.log("(now) this.storage:",this.storage.get());this.model.bind("change:nice_size",this.updateHistoryDiskSize,this);this.model.hdas.bind("add",this.add,this);this.model.hdas.bind("reset",this.addAll,this);this.model.hdas.bind("all",this.all,this);this.hdaViews={};this.urls={}},add:function(a){},addAll:function(){this.render()},all:function(a){},renderUrls:function(a){var b=this;b.urls={};_.each(this.urlTemplates,function(d,c){b.urls[c]=_.template(d,a)});return b.urls},render:function(){var b=this,d=b.toString()+".set-up",c=$("<div/>"),a=this.model.toJSON(),e=(this.$el.children().size()===0);a.urls=this.renderUrls(a);c.append(HistoryPanel.templates.historyPanel(a));c.find(".tooltip").tooltip({placement:"bottom"});this.setUpActionButton(c.find("#history-action-popup"));if(!this.model.hdas.length||!this.renderItems(c.find("#"+this.model.get("id")+"-datasets"))){c.find("#emptyHistoryMessage").show()}$(b).queue(d,function(f){b.$el.fadeOut("fast",function(){f()})});$(b).queue(d,function(f){b.$el.html("");b.$el.append(c.children());b.$el.fadeIn("fast",function(){f()})});$(b).queue(d,function(f){this.log(b+" rendered:",b.$el);b.setUpBehaviours();if(e){b.trigger("rendered:initial")}else{b.trigger("rendered")}f()});$(b).dequeue(d);return this},setUpActionButton:function(e){var c=this,d=(this.storage.get("show_deleted"))?("Hide deleted"):("Show deleted"),a=(this.storage.get("show_hidden"))?("Hide hidden"):("Show hidden"),b={};b[_l("refresh")]=function(){window.location.reload()};b[_l("collapse all")]=function(){c.hideAllHdaBodies()};b[_l(d)]=function(){c.toggleShowDeleted()};b[_l(a)]=function(){c.toggleShowHidden()};make_popupmenu(e,b)},renderItems:function(b){this.hdaViews={};var a=this,c=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"));_.each(c,function(f){var e=f.get("id"),d=a.storage.get("expandedHdas").get(e);a.hdaViews[e]=new HDAView({model:f,expanded:d,urlTemplates:a.hdaUrlTemplates});a.setUpHdaListeners(a.hdaViews[e]);b.prepend(a.hdaViews[e].render().$el)});return c.length},setUpHdaListeners:function(b){var a=this;b.bind("toggleBodyVisibility",function(d,c){if(c){a.storage.get("expandedHdas").set(d,true)}else{a.storage.get("expandedHdas").deleteKey(d)}});b.bind("rendered:ready",function(){a.trigger("hda:rendered:ready")})},setUpBehaviours:function(){if(!(this.model.get("user")&&this.model.get("user").email)){return}var a=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(a.is(":hidden")){a.slideDown("fast")}else{a.slideUp("fast")}return false});async_save_text("history-name-container","history-name",this.urls.rename,"new_name",18);async_save_text("history-annotation-container","history-annotation",this.urls.annotate,"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},events:{"click #history-tag":"loadAndDisplayTags"},showQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(b.is(":hidden")){b.slideDown("fast")}},hideQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(!b.is(":hidden")){b.slideUp("fast")}},toggleShowDeleted:function(a,c,b){this.storage.set("show_deleted",!this.storage.get("show_deleted"));this.render()},toggleShowHidden:function(){this.storage.set("show_hidden",!this.storage.get("show_hidden"));this.render()},hideAllHdaBodies:function(){_.each(this.hdaViews,function(a){a.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},loadAndDisplayTags:function(c){this.log(this+".loadAndDisplayTags",c);var d=this.$el.find("#history-tag-area"),b=d.find(".tag-elt");this.log("\t tagArea",d," tagElt",b);if(d.is(":hidden")){if(!jQuery.trim(b.html())){var a=this;$.ajax({url:a.urls.tag,error:function(){alert("Tagging failed")},success:function(e){b.html(e);b.find(".tooltip").tooltip();d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toString:function(){var a=this.model.get("name")||"";return"HistoryView("+a+")"}});HistoryPanel.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};
\ No newline at end of file
diff -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 -r 6344832c535aab0a8cc4a57be1414fc179e8540b static/scripts/packed/templates/compiled/template-history-historyPanel.js
--- a/static/scripts/packed/templates/compiled/template-history-historyPanel.js
+++ b/static/scripts/packed/templates/compiled/template-history-historyPanel.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(l,z,x,s,G){x=x||l.helpers;var y="",o,n,f="function",e=this.escapeExpression,v=this,c=x.blockHelperMissing;function u(L,K){var I="",J,H;I+='\n <div id="history-name" style="margin-right: 50px;" class="tooltip editable-text"\n title="Click to rename history">';H=x.name;if(H){J=H.call(L,{hash:{}})}else{J=L.name;J=typeof J===f?J():J}I+=e(J)+"</div>\n ";return I}function t(L,K){var I="",J,H;I+='\n <div id="history-name" style="margin-right: 50px;" class="tooltip"\n title="You must be logged in to edit your history name">';H=x.name;if(H){J=H.call(L,{hash:{}})}else{J=L.name;J=typeof J===f?J():J}I+=e(J)+"</div>\n ";return I}function r(I,H){return"refresh"}function q(I,H){return"collapse all"}function k(L,K){var I="",J,H;I+='\n <a id="history-tag" title="';H=x.local;if(H){J=H.call(L,{hash:{},inverse:v.noop,fn:v.program(10,F,K)})}else{J=L.local;J=typeof J===f?J():J}if(!x.local){J=c.call(L,J,{hash:{},inverse:v.noop,fn:v.program(10,F,K)})}if(J||J===0){I+=J}I+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';H=x.local;if(H){J=H.call(L,{hash:{},inverse:v.noop,fn:v.program(12,E,K)})}else{J=L.local;J=typeof J===f?J():J}if(!x.local){J=c.call(L,J,{hash:{},inverse:v.noop,fn:v.program(12,E,K)})}if(J||J===0){I+=J}I+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n ';return I}function F(I,H){return"Edit history tags"}function E(I,H){return"Edit history annotation"}function D(L,K){var I="",J,H;I+='\n <a href="';J=L.urls;J=J==null||J===false?J:J.hide_deleted;J=typeof J===f?J():J;I+=e(J)+'">';H=x.local;if(H){J=H.call(L,{hash:{},inverse:v.noop,fn:v.program(15,C,K)})}else{J=L.local;J=typeof J===f?J():J}if(!x.local){J=c.call(L,J,{hash:{},inverse:v.noop,fn:v.program(15,C,K)})}if(J||J===0){I+=J}I+="</a>\n ";return I}function C(I,H){return"hide deleted"}function B(L,K){var I="",J,H;I+='\n <a href="';J=L.urls;J=J==null||J===false?J:J.hide_hidden;J=typeof J===f?J():J;I+=e(J)+'">';H=x.local;if(H){J=H.call(L,{hash:{},inverse:v.noop,fn:v.program(18,A,K)})}else{J=L.local;J=typeof J===f?J():J}if(!x.local){J=c.call(L,J,{hash:{},inverse:v.noop,fn:v.program(18,A,K)})}if(J||J===0){I+=J}I+="</a>\n ";return I}function A(I,H){return"hide hidden"}function p(L,K){var I="",J,H;I+="\n";H=x.warningmessagesmall;if(H){J=H.call(L,{hash:{},inverse:v.noop,fn:v.program(21,m,K)})}else{J=L.warningmessagesmall;J=typeof J===f?J():J}if(!x.warningmessagesmall){J=c.call(L,J,{hash:{},inverse:v.noop,fn:v.program(21,m,K)})}if(J||J===0){I+=J}I+="\n";return I}function m(K,J){var I,H;H=x.local;if(H){I=H.call(K,{hash:{},inverse:v.noop,fn:v.program(22,j,J)})}else{I=K.local;I=typeof I===f?I():I}if(!x.local){I=c.call(K,I,{hash:{},inverse:v.noop,fn:v.program(22,j,J)})}if(I||I===0){return I}else{return""}}function j(I,H){return"You are currently viewing a deleted history!"}function i(K,J){var H="",I;H+='\n <div id="history-tag-area" style="display: none">\n <strong>Tags:</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>Annotation / Notes:</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text" title="Click to edit annotation">\n ';I=K.annotation;I=x["if"].call(K,I,{hash:{},inverse:v.program(27,g,J),fn:v.program(25,h,J)});if(I||I===0){H+=I}H+="\n </div>\n </div>\n </div>\n ";return H}function h(L,K){var I="",J,H;I+="\n ";H=x.annotation;if(H){J=H.call(L,{hash:{}})}else{J=L.annotation;J=typeof J===f?J():J}I+=e(J)+"\n ";return I}function g(I,H){return"\n <em>Describe or add notes to history</em>\n "}function d(L,K){var I="",J,H;I+='\n<div id="message-container">\n <div class="';H=x.status;if(H){J=H.call(L,{hash:{}})}else{J=L.status;J=typeof J===f?J():J}I+=e(J)+'message">\n ';H=x.message;if(H){J=H.call(L,{hash:{}})}else{J=L.message;J=typeof J===f?J():J}I+=e(J)+"\n </div><br />\n</div>\n";return I}function w(I,H){return"Your history is empty. Click 'Get Data' on the left pane to start"}y+='\n<div id="history-name-area" class="historyLinks">\n <div id="history-name-container" style="position: relative;">\n ';y+='\n <div id="history-size" style="position: absolute; top: 3px; right: 0px;">';n=x.nice_size;if(n){o=n.call(z,{hash:{}})}else{o=z.nice_size;o=typeof o===f?o():o}y+=e(o)+"</div>\n ";o=z.user;o=o==null||o===false?o:o.email;o=x["if"].call(z,o,{hash:{},inverse:v.program(3,t,G),fn:v.program(1,u,G)});if(o||o===0){y+=o}y+='\n </div> \n</div>\n<div style="clear: both;"></div>\n\n<div id="top-links" class="historyLinks">\n <a title="';n=x.local;if(n){o=n.call(z,{hash:{},inverse:v.noop,fn:v.program(5,r,G)})}else{o=z.local;o=typeof o===f?o():o}if(!x.local){o=c.call(z,o,{hash:{},inverse:v.noop,fn:v.program(5,r,G)})}if(o||o===0){y+=o}y+='" class="icon-button arrow-circle tooltip" href="';o=z.urls;o=o==null||o===false?o:o.base;o=typeof o===f?o():o;y+=e(o)+"\"></a>\n <a title='";n=x.local;if(n){o=n.call(z,{hash:{},inverse:v.noop,fn:v.program(7,q,G)})}else{o=z.local;o=typeof o===f?o():o}if(!x.local){o=c.call(z,o,{hash:{},inverse:v.noop,fn:v.program(7,q,G)})}if(o||o===0){y+=o}y+="' id=\"history-collapse-all\"\n class='icon-button toggle tooltip' href='javascript:void(0);'></a>\n <div style=\"width: 40px; float: right; white-space: nowrap;\">\n ";o=z.user;o=o==null||o===false?o:o.email;o=x["if"].call(z,o,{hash:{},inverse:v.noop,fn:v.program(9,k,G)});if(o||o===0){y+=o}y+='\n </div>\n</div>\n<div style="clear: both;"></div>\n\n';y+='\n<div class="historyLinks">\n ';o=z.show_deleted;o=x["if"].call(z,o,{hash:{},inverse:v.noop,fn:v.program(14,D,G)});if(o||o===0){y+=o}y+="\n ";o=z.show_hidden;o=x["if"].call(z,o,{hash:{},inverse:v.noop,fn:v.program(17,B,G)});if(o||o===0){y+=o}y+="\n</div>\n\n";o=z.deleted;o=x["if"].call(z,o,{hash:{},inverse:v.noop,fn:v.program(20,p,G)});if(o||o===0){y+=o}y+="\n\n";y+="\n";y+='\n<div style="margin: 0px 5px 10px 5px">\n\n ';o=z.user;o=o==null||o===false?o:o.email;o=x["if"].call(z,o,{hash:{},inverse:v.noop,fn:v.program(24,i,G)});if(o||o===0){y+=o}y+="\n</div>\n\n";o=z.message;o=x["if"].call(z,o,{hash:{},inverse:v.noop,fn:v.program(29,d,G)});if(o||o===0){y+=o}y+='\n\n<div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.\n </div>\n</div>\n\n<div id="';n=x.id;if(n){o=n.call(z,{hash:{}})}else{o=z.id;o=typeof o===f?o():o}y+=e(o)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';n=x.local;if(n){o=n.call(z,{hash:{},inverse:v.noop,fn:v.program(31,w,G)})}else{o=z.local;o=typeof o===f?o():o}if(!x.local){o=c.call(z,o,{hash:{},inverse:v.noop,fn:v.program(31,w,G)})}if(o||o===0){y+=o}y+="\n</div>";return y})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(f,s,q,m,A){q=q||f.helpers;var r="",j,i,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(F,E){var C="",D,B;C+='\n <div id="history-name" class="tooltip editable-text"\n title="Click to rename history">';B=q.name;if(B){D=B.call(F,{hash:{}})}else{D=F.name;D=typeof D===e?D():D}C+=d(D)+"</div>\n ";return C}function n(F,E){var C="",D,B;C+='\n <div id="history-name" class="tooltip"\n title="You must be logged in to edit your history name">';B=q.name;if(B){D=B.call(F,{hash:{}})}else{D=F.name;D=typeof D===e?D():D}C+=d(D)+"</div>\n ";return C}function l(F,E){var C="",D,B;C+='\n <div id="history-secondary-links" style="float: right;">\n <a id="history-tag" title="';B=q.local;if(B){D=B.call(F,{hash:{},inverse:p.noop,fn:p.program(6,k,E)})}else{D=F.local;D=typeof D===e?D():D}if(!q.local){D=c.call(F,D,{hash:{},inverse:p.noop,fn:p.program(6,k,E)})}if(D||D===0){C+=D}C+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';B=q.local;if(B){D=B.call(F,{hash:{},inverse:p.noop,fn:p.program(8,h,E)})}else{D=F.local;D=typeof D===e?D():D}if(!q.local){D=c.call(F,D,{hash:{},inverse:p.noop,fn:p.program(8,h,E)})}if(D||D===0){C+=D}C+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n </div>\n ';return C}function k(C,B){return"Edit history tags"}function h(C,B){return"Edit history annotation"}function z(F,E){var C="",D,B;C+="\n ";B=q.warningmessagesmall;if(B){D=B.call(F,{hash:{},inverse:p.noop,fn:p.program(11,y,E)})}else{D=F.warningmessagesmall;D=typeof D===e?D():D}if(!q.warningmessagesmall){D=c.call(F,D,{hash:{},inverse:p.noop,fn:p.program(11,y,E)})}if(D||D===0){C+=D}C+="\n ";return C}function y(E,D){var C,B;B=q.local;if(B){C=B.call(E,{hash:{},inverse:p.noop,fn:p.program(12,x,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(12,x,D)})}if(C||C===0){return C}else{return""}}function x(C,B){return"You are currently viewing a deleted history!"}function w(E,D){var B="",C;B+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>Tags:</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>Annotation / Notes:</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text" title="Click to edit annotation">\n ';C=E.annotation;C=q["if"].call(E,C,{hash:{},inverse:p.program(17,u,D),fn:p.program(15,v,D)});if(C||C===0){B+=C}B+="\n </div>\n </div>\n </div>\n </div>\n ";return B}function v(F,E){var C="",D,B;C+="\n ";B=q.annotation;if(B){D=B.call(F,{hash:{}})}else{D=F.annotation;D=typeof D===e?D():D}C+=d(D)+"\n ";return C}function u(C,B){return"\n <em>Describe or add notes to history</em>\n "}function t(F,E){var C="",D,B;C+='\n <div id="message-container">\n <div class="';B=q.status;if(B){D=B.call(F,{hash:{}})}else{D=F.status;D=typeof D===e?D():D}C+=d(D)+'message">\n ';B=q.message;if(B){D=B.call(F,{hash:{}})}else{D=F.message;D=typeof D===e?D():D}C+=d(D)+"\n </div><br />\n </div>\n ";return C}function g(C,B){return"Your history is empty. Click 'Get Data' on the left pane to start"}r+='\n<div id="history-controls">\n <div id="history-title-area" class="historyLinks">\n\n <div id="history-name-container" style="float: left;">\n ';r+="\n ";j=s.user;j=j==null||j===false?j:j.email;j=q["if"].call(s,j,{hash:{},inverse:p.program(3,n,A),fn:p.program(1,o,A)});if(j||j===0){r+=j}r+='\n </div>\n\n <a id="history-action-popup" href="javascript:void(0);" style="float: right;">\n <span class="ficon cog large"></span>\n </a>\n <div style="clear: both;"></div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';i=q.nice_size;if(i){j=i.call(s,{hash:{}})}else{j=s.nice_size;j=typeof j===e?j():j}r+=d(j)+"</div>\n ";j=s.user;j=j==null||j===false?j:j.email;j=q["if"].call(s,j,{hash:{},inverse:p.noop,fn:p.program(5,l,A)});if(j||j===0){r+=j}r+='\n <div style="clear: both;"></div>\n </div>\n\n ';j=s.deleted;j=q["if"].call(s,j,{hash:{},inverse:p.noop,fn:p.program(10,z,A)});if(j||j===0){r+=j}r+="\n\n ";r+="\n ";r+="\n ";j=s.user;j=j==null||j===false?j:j.email;j=q["if"].call(s,j,{hash:{},inverse:p.noop,fn:p.program(14,w,A)});if(j||j===0){r+=j}r+="\n\n ";j=s.message;j=q["if"].call(s,j,{hash:{},inverse:p.noop,fn:p.program(19,t,A)});if(j||j===0){r+=j}r+='\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.\n </div>\n </div>\n</div>\n\n<div id="';i=q.id;if(i){j=i.call(s,{hash:{}})}else{j=s.id;j=typeof j===e?j():j}r+=d(j)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';i=q.local;if(i){j=i.call(s,{hash:{},inverse:p.noop,fn:p.program(21,g,A)})}else{j=s.local;j=typeof j===e?j():j}if(!q.local){j=c.call(s,j,{hash:{},inverse:p.noop,fn:p.program(21,g,A)})}if(j||j===0){r+=j}r+="\n</div>";return r})})();
\ No newline at end of file
diff -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 -r 6344832c535aab0a8cc4a57be1414fc179e8540b static/scripts/packed/viz/circster.js
--- a/static/scripts/packed/viz/circster.js
+++ b/static/scripts/packed/viz/circster.js
@@ -1,1 +1,1 @@
-define(["libs/underscore","libs/d3","viz/visualization"],function(g,l,i){var m=Backbone.Model.extend({is_visible:function(q,n){var o=q.getBoundingClientRect(),p=$("svg")[0].getBoundingClientRect();if(o.right<0||o.left>p.right||o.bottom<0||o.top>p.bottom){return false}return true}});var h={drawTicks:function(r,q,v,p,n){var u=r.append("g").selectAll("g").data(q).enter().append("g").selectAll("g").data(v).enter().append("g").attr("class","tick").attr("transform",function(w){return"rotate("+(w.angle*180/Math.PI-90)+")translate("+w.radius+",0)"});var t=[],s=[],o=function(w){return w.angle>Math.PI?"end":null};if(n){t=[0,0,0,-4];s=[4,0,"",".35em"];o=null}else{t=[1,0,4,0];s=[0,4,".35em",""]}u.append("line").attr("x1",t[0]).attr("y1",t[1]).attr("x2",t[2]).attr("y1",t[3]).style("stroke","#000");u.append("text").attr("x",s[0]).attr("y",s[1]).attr("dx",s[2]).attr("dy",s[3]).attr("text-anchor",o).attr("transform",p).text(function(w){return w.label})},formatNum:function(o,n){var q=null;if(o<1){q=o.toPrecision(n)}else{var p=Math.round(o.toPrecision(n));if(o<1000){q=p}else{if(o<1000000){q=Math.round((p/1000).toPrecision(3)).toFixed(0)+"K"}else{if(o<1000000000){q=Math.round((p/1000000).toPrecision(3)).toFixed(0)+"M"}}}}return q}};var c=Backbone.Model.extend({});var a=Backbone.View.extend({className:"circster",initialize:function(n){this.total_gap=n.total_gap;this.genome=n.genome;this.dataset_arc_height=n.dataset_arc_height;this.track_gap=10;this.label_arc_height=50;this.scale=1;this.circular_views=null;this.chords_views=null;this.model.get("tracks").on("add",this.add_track,this);this.model.get("tracks").on("remove",this.remove_track,this);this.get_circular_tracks()},get_circular_tracks:function(){return this.model.get("tracks").filter(function(n){return n.get("track_type")!=="DiagonalHeatmapTrack"})},get_chord_tracks:function(){return this.model.get("tracks").filter(function(n){return n.get("track_type")==="DiagonalHeatmapTrack"})},get_tracks_bounds:function(){var o=this.get_circular_tracks();dataset_arc_height=this.dataset_arc_height,min_dimension=Math.min(this.$el.width(),this.$el.height()),radius_start=min_dimension/2-o.length*(this.dataset_arc_height+this.track_gap)-(this.label_arc_height+this.track_gap),tracks_start_radii=l.range(radius_start,min_dimension/2,this.dataset_arc_height+this.track_gap);var n=this;return g.map(tracks_start_radii,function(p){return[p,p+n.dataset_arc_height]})},render:function(){var w=this,q=this.dataset_arc_height,n=w.$el.width(),v=w.$el.height(),s=this.get_circular_tracks(),p=this.get_chord_tracks(),r=this.get_tracks_bounds(),o=l.select(w.$el[0]).append("svg").attr("width",n).attr("height",v).attr("pointer-events","all").append("svg:g").call(l.behavior.zoom().on("zoom",function(){var x=l.event.scale;o.attr("transform","translate("+l.event.translate+") scale("+x+")");if(w.scale!==x){if(w.zoom_drag_timeout){clearTimeout(w.zoom_drag_timeout)}w.zoom_drag_timeout=setTimeout(function(){},400)}})).attr("transform","translate("+n/2+","+v/2+")").append("svg:g").attr("class","tracks");this.circular_views=s.map(function(y,z){var A=(y.get("track_type")==="LineTrack"?d:e),x=new A({el:o.append("g")[0],track:y,radius_bounds:r[z],genome:w.genome,total_gap:w.total_gap});x.render();return x});this.chords_views=p.map(function(y){var x=new j({el:o.append("g")[0],track:y,radius_bounds:r[0],genome:w.genome,total_gap:w.total_gap});x.render();return x});var u=this.circular_views[this.circular_views.length-1].radius_bounds[1],t=[u,u+this.label_arc_height];this.label_track_view=new b({el:o.append("g")[0],track:new c(),radius_bounds:t,genome:w.genome,total_gap:w.total_gap});this.label_track_view.render()},add_track:function(t){if(t.get("track_type")==="DiagonalHeatmapTrack"){var p=this.circular_views[0].radius_bounds,s=new j({el:l.select("g.tracks").append("g")[0],track:t,radius_bounds:p,genome:this.genome,total_gap:this.total_gap});s.render();this.chords_views.push(s)}else{var r=this.get_tracks_bounds();g.each(this.circular_views,function(v,w){v.update_radius_bounds(r[w])});g.each(this.chords_views,function(v){v.update_radius_bounds(r[0])});var q=this.circular_views.length,u=(t.get("track_type")==="LineTrack"?d:e),n=new u({el:l.select("g.tracks").append("g")[0],track:t,radius_bounds:r[q],genome:this.genome,total_gap:this.total_gap});n.render();this.circular_views.push(n);var o=r[r.length-1];o[1]=o[0];this.label_track_view.update_radius_bounds(o)}},remove_track:function(o,q,p){var n=this.circular_views[p.index];this.circular_views.splice(p.index,1);n.$el.remove();var r=this.get_tracks_bounds();g.each(this.circular_views,function(s,t){s.update_radius_bounds(r[t])})}});var k=Backbone.View.extend({tagName:"g",initialize:function(n){this.bg_stroke="ccc";this.loading_bg_fill="000";this.bg_fill="ccc";this.total_gap=n.total_gap;this.track=n.track;this.radius_bounds=n.radius_bounds;this.genome=n.genome;this.chroms_layout=this._chroms_layout();this.data_bounds=[];this.scale=1;this.parent_elt=l.select(this.$el[0])},get_fill_color:function(){var n=this.track.get("config").get_value("block_color");if(!n){n=this.track.get("config").get_value("color")}return n},render:function(){var r=this.parent_elt;if(!r){console.log("no parent elt")}var q=this.chroms_layout,t=l.svg.arc().innerRadius(this.radius_bounds[0]).outerRadius(this.radius_bounds[1]),n=r.selectAll("g").data(q).enter().append("svg:g"),p=n.append("path").attr("d",t).attr("class","chrom-background").style("stroke",this.bg_stroke).style("fill",this.loading_bg_fill);p.append("title").text(function(v){return v.data.chrom});var o=this,s=o.track.get("data_manager"),u=(s?s.data_is_ready():true);$.when(u).then(function(){$.when(o._render_data(r)).then(function(){p.style("fill",o.bg_fill);o.render_labels()})})},render_labels:function(){},update_radius_bounds:function(o){this.radius_bounds=o;var n=l.svg.arc().innerRadius(this.radius_bounds[0]).outerRadius(this.radius_bounds[1]);this.parent_elt.selectAll("g>path.chrom-background").transition().duration(1000).attr("d",n);this._transition_chrom_data();this._transition_labels()},update_scale:function(q){var p=this.scale;this.scale=q;if(q<=p){return}var o=this,n=new m();this.parent_elt.selectAll("path.chrom-data").filter(function(s,r){return n.is_visible(this)}).each(function(x,t){var w=l.select(this),s=w.attr("chrom"),v=o.genome.get_chrom_region(s),u=o.track.get("data_manager"),r;if(!u.can_get_more_detailed_data(v)){return}r=o.track.get("data_manager").get_more_detailed_data(v,"Coverage",0,q);$.when(r).then(function(A){w.remove();o._update_data_bounds();var z=g.find(o.chroms_layout,function(B){return B.data.chrom===s});var y=o.get_fill_color();o._render_chrom_data(o.parent_elt,z,A).style("stroke",y).style("fill",y)})});return o},_transition_chrom_data:function(){var o=this.track,q=this.chroms_layout,n=this.parent_elt.selectAll("g>path.chrom-data"),r=n[0].length;if(r>0){var p=this;$.when(o.get("data_manager").get_genome_wide_data(this.genome)).then(function(t){var s=g.reject(g.map(t,function(u,v){var w=null,x=p._get_path_function(q[v],u);if(x){w=x(u.data)}return w}),function(u){return u===null});n.each(function(v,u){l.select(this).transition().duration(1000).attr("d",s[u])})})}},_transition_labels:function(){},_update_data_bounds:function(){var n=this.data_bounds;this.data_bounds=this.get_data_bounds(this.track.get("data_manager").get_genome_wide_data(this.genome));if(this.data_bounds[0]<n[0]||this.data_bounds[1]>n[1]){this._transition_chrom_data()}},_render_data:function(q){var p=this,o=this.chroms_layout,n=this.track,r=$.Deferred();$.when(n.get("data_manager").get_genome_wide_data(this.genome)).then(function(t){p.data_bounds=p.get_data_bounds(t);layout_and_data=g.zip(o,t),chroms_data_layout=g.map(layout_and_data,function(u){var v=u[0],w=u[1];return p._render_chrom_data(q,v,w)});var s=p.get_fill_color();p.parent_elt.selectAll("path.chrom-data").style("stroke",s).style("fill",s);r.resolve(q)});return r},_render_chrom_data:function(n,o,p){},_get_path_function:function(o,n){},_chroms_layout:function(){var o=this.genome.get_chroms_info(),q=l.layout.pie().value(function(s){return s.len}).sort(null),r=q(o),n=this.total_gap/o.length,p=g.map(r,function(u,t){var s=u.endAngle-n;u.endAngle=(s>u.startAngle?s:u.startAngle);return u});return p}});var b=k.extend({initialize:function(n){k.prototype.initialize.call(this,n);this.innerRadius=this.radius_bounds[0];this.radius_bounds[0]=this.radius_bounds[1];this.bg_stroke="fff";this.bg_fill="fff";this.min_arc_len=0.08},_render_data:function(p){var o=this,n=p.selectAll("g");n.selectAll("path").attr("id",function(t){return"label-"+t.data.chrom});n.append("svg:text").filter(function(t){return t.endAngle-t.startAngle>o.min_arc_len}).attr("text-anchor","middle").append("svg:textPath").attr("xlink:href",function(t){return"#label-"+t.data.chrom}).attr("startOffset","25%").attr("font-weight","bold").text(function(t){return t.data.chrom});var q=function(v){var t=(v.endAngle-v.startAngle)/v.value,u=l.range(0,v.value,25000000).map(function(w,x){return{radius:o.innerRadius,angle:w*t+v.startAngle,label:x===0?0:(x%3?null:o.formatNum(w))}});if(u.length<4){u[u.length-1].label=o.formatNum(Math.round((u[u.length-1].angle-v.startAngle)/t))}return u};var s=function(t){return t.angle>Math.PI?"rotate(180)translate(-16)":null};var r=g.filter(this.chroms_layout,function(t){return t.endAngle-t.startAngle>o.min_arc_len});this.drawTicks(this.parent_elt,r,q,s)}});g.extend(b.prototype,h);var f=k.extend({_quantile:function(o,n){o.sort(l.ascending);return l.quantile(o,n)},_render_chrom_data:function(n,q,o){var r=this._get_path_function(q,o);if(!r){return null}var p=n.datum(o.data),s=p.append("path").attr("class","chrom-data").attr("chrom",q.data.chrom).attr("d",r);return s},_get_path_function:function(q,p){if(typeof p==="string"||!p.data||p.data.length===0){return null}var n=l.scale.linear().domain(this.data_bounds).range(this.radius_bounds).clamp(true);var r=l.scale.linear().domain([0,p.data.length]).range([q.startAngle,q.endAngle]);var o=l.svg.line.radial().interpolate("linear").radius(function(s){return n(s[1])}).angle(function(t,s){return r(s)});return l.svg.area.radial().interpolate(o.interpolate()).innerRadius(n(0)).outerRadius(o.radius()).angle(o.angle())},render_labels:function(){var n=this,q=function(){return"rotate(90)"};var p=g.filter(this.chroms_layout,function(r){return r.endAngle-r.startAngle>0.08}),o=g.filter(p,function(s,r){return r%3===0});this.drawTicks(this.parent_elt,o,this._data_bounds_ticks_fn(),q,true)},_transition_labels:function(){var o=this,q=g.filter(this.chroms_layout,function(r){return r.endAngle-r.startAngle>0.08}),p=g.filter(q,function(s,r){return r%3===0}),n=g.flatten(g.map(p,function(r){return o._data_bounds_ticks_fn()(r)}));this.parent_elt.selectAll("g.tick").data(n).transition().attr("transform",function(r){return"rotate("+(r.angle*180/Math.PI-90)+")translate("+r.radius+",0)"})},_data_bounds_ticks_fn:function(){var n=this;visibleChroms=0;return function(o){return[{radius:n.radius_bounds[0],angle:o.startAngle,label:n.formatNum(n.data_bounds[0])},{radius:n.radius_bounds[1],angle:o.startAngle,label:n.formatNum(n.data_bounds[1])}]}},get_data_bounds:function(n){}});g.extend(f.prototype,h);var e=f.extend({get_data_bounds:function(o){var n=g.map(o,function(p){if(typeof p==="string"||!p.max){return 0}return p.max});return[0,(n&&typeof n!=="string"?this._quantile(values,0.98):0)]}});var d=f.extend({get_data_bounds:function(o){var n=g.flatten(g.map(o,function(p){if(p){return g.map(p.data,function(q){return q[1]})}else{return 0}}));return[g.min(n),this._quantile(n,0.98)]}});var j=k.extend({render:function(){var n=this;$.when(n.track.get("data_manager").data_is_ready()).then(function(){$.when(n.track.get("data_manager").get_genome_wide_data(n.genome)).then(function(q){var p=[],o=n.genome.get_chroms_info();g.each(q,function(u,t){var r=o[t].chrom;var s=g.map(u.data,function(w){var v=n._get_region_angle(r,w[1]),x=n._get_region_angle(w[3],w[4]);return{source:{startAngle:v,endAngle:v+0.01},target:{startAngle:x,endAngle:x+0.01}}});p=p.concat(s)});n.parent_elt.append("g").attr("class","chord").selectAll("path").data(p).enter().append("path").style("fill",n.get_fill_color()).attr("d",l.svg.chord().radius(n.radius_bounds[0])).style("opacity",1)})})},update_radius_bounds:function(n){this.radius_bounds=n;this.parent_elt.selectAll("path").transition().attr("d",l.svg.chord().radius(this.radius_bounds[0]))},_get_region_angle:function(p,n){var o=g.find(this.chroms_layout,function(q){return q.data.chrom===p});return o.endAngle-((o.endAngle-o.startAngle)*(o.data.len-n)/o.data.len)}});return{CircsterView:a}});
\ No newline at end of file
+define(["libs/underscore","libs/d3","viz/visualization"],function(g,l,i){var m=Backbone.Model.extend({is_visible:function(q,n){var o=q.getBoundingClientRect(),p=$("svg")[0].getBoundingClientRect();if(o.right<0||o.left>p.right||o.bottom<0||o.top>p.bottom){return false}return true}});var h={drawTicks:function(r,q,v,p,n){var u=r.append("g").selectAll("g").data(q).enter().append("g").selectAll("g").data(v).enter().append("g").attr("class","tick").attr("transform",function(w){return"rotate("+(w.angle*180/Math.PI-90)+")translate("+w.radius+",0)"});var t=[],s=[],o=function(w){return w.angle>Math.PI?"end":null};if(n){t=[0,0,0,-4];s=[4,0,"",".35em"];o=null}else{t=[1,0,4,0];s=[0,4,".35em",""]}u.append("line").attr("x1",t[0]).attr("y1",t[1]).attr("x2",t[2]).attr("y1",t[3]).style("stroke","#000");u.append("text").attr("x",s[0]).attr("y",s[1]).attr("dx",s[2]).attr("dy",s[3]).attr("text-anchor",o).attr("transform",p).text(function(w){return w.label})},formatNum:function(o,n){var q=null;if(o<1){q=o.toPrecision(n)}else{var p=Math.round(o.toPrecision(n));if(o<1000){q=p}else{if(o<1000000){q=Math.round((p/1000).toPrecision(3)).toFixed(0)+"K"}else{if(o<1000000000){q=Math.round((p/1000000).toPrecision(3)).toFixed(0)+"M"}}}}return q}};var c=Backbone.Model.extend({});var a=Backbone.View.extend({className:"circster",initialize:function(n){this.total_gap=n.total_gap;this.genome=n.genome;this.dataset_arc_height=n.dataset_arc_height;this.track_gap=10;this.label_arc_height=50;this.scale=1;this.circular_views=null;this.chords_views=null;this.model.get("tracks").on("add",this.add_track,this);this.model.get("tracks").on("remove",this.remove_track,this);this.get_circular_tracks()},get_circular_tracks:function(){return this.model.get("tracks").filter(function(n){return n.get("track_type")!=="DiagonalHeatmapTrack"})},get_chord_tracks:function(){return this.model.get("tracks").filter(function(n){return n.get("track_type")==="DiagonalHeatmapTrack"})},get_tracks_bounds:function(){var o=this.get_circular_tracks();dataset_arc_height=this.dataset_arc_height,min_dimension=Math.min(this.$el.width(),this.$el.height()),radius_start=min_dimension/2-o.length*(this.dataset_arc_height+this.track_gap)-(this.label_arc_height+this.track_gap),tracks_start_radii=l.range(radius_start,min_dimension/2,this.dataset_arc_height+this.track_gap);var n=this;return g.map(tracks_start_radii,function(p){return[p,p+n.dataset_arc_height]})},render:function(){var w=this,q=this.dataset_arc_height,n=w.$el.width(),v=w.$el.height(),s=this.get_circular_tracks(),p=this.get_chord_tracks(),r=this.get_tracks_bounds(),o=l.select(w.$el[0]).append("svg").attr("width",n).attr("height",v).attr("pointer-events","all").append("svg:g").call(l.behavior.zoom().on("zoom",function(){var x=l.event.scale;o.attr("transform","translate("+l.event.translate+") scale("+x+")");if(w.scale!==x){if(w.zoom_drag_timeout){clearTimeout(w.zoom_drag_timeout)}w.zoom_drag_timeout=setTimeout(function(){},400)}})).attr("transform","translate("+n/2+","+v/2+")").append("svg:g").attr("class","tracks");this.circular_views=s.map(function(y,z){var A=(y.get("track_type")==="LineTrack"?d:e),x=new A({el:o.append("g")[0],track:y,radius_bounds:r[z],genome:w.genome,total_gap:w.total_gap});x.render();return x});this.chords_views=p.map(function(y){var x=new j({el:o.append("g")[0],track:y,radius_bounds:r[0],genome:w.genome,total_gap:w.total_gap});x.render();return x});var u=this.circular_views[this.circular_views.length-1].radius_bounds[1],t=[u,u+this.label_arc_height];this.label_track_view=new b({el:o.append("g")[0],track:new c(),radius_bounds:t,genome:w.genome,total_gap:w.total_gap});this.label_track_view.render()},add_track:function(t){if(t.get("track_type")==="DiagonalHeatmapTrack"){var p=this.circular_views[0].radius_bounds,s=new j({el:l.select("g.tracks").append("g")[0],track:t,radius_bounds:p,genome:this.genome,total_gap:this.total_gap});s.render();this.chords_views.push(s)}else{var r=this.get_tracks_bounds();g.each(this.circular_views,function(v,w){v.update_radius_bounds(r[w])});g.each(this.chords_views,function(v){v.update_radius_bounds(r[0])});var q=this.circular_views.length,u=(t.get("track_type")==="LineTrack"?d:e),n=new u({el:l.select("g.tracks").append("g")[0],track:t,radius_bounds:r[q],genome:this.genome,total_gap:this.total_gap});n.render();this.circular_views.push(n);var o=r[r.length-1];o[1]=o[0];this.label_track_view.update_radius_bounds(o)}},remove_track:function(o,q,p){var n=this.circular_views[p.index];this.circular_views.splice(p.index,1);n.$el.remove();var r=this.get_tracks_bounds();g.each(this.circular_views,function(s,t){s.update_radius_bounds(r[t])})}});var k=Backbone.View.extend({tagName:"g",initialize:function(n){this.bg_stroke="ccc";this.loading_bg_fill="000";this.bg_fill="ccc";this.total_gap=n.total_gap;this.track=n.track;this.radius_bounds=n.radius_bounds;this.genome=n.genome;this.chroms_layout=this._chroms_layout();this.data_bounds=[];this.scale=1;this.parent_elt=l.select(this.$el[0])},get_fill_color:function(){var n=this.track.get("config").get_value("block_color");if(!n){n=this.track.get("config").get_value("color")}return n},render:function(){var r=this.parent_elt;if(!r){console.log("no parent elt")}var q=this.chroms_layout,t=l.svg.arc().innerRadius(this.radius_bounds[0]).outerRadius(this.radius_bounds[1]),n=r.selectAll("g").data(q).enter().append("svg:g"),p=n.append("path").attr("d",t).attr("class","chrom-background").style("stroke",this.bg_stroke).style("fill",this.loading_bg_fill);p.append("title").text(function(v){return v.data.chrom});var o=this,s=o.track.get("data_manager"),u=(s?s.data_is_ready():true);$.when(u).then(function(){$.when(o._render_data(r)).then(function(){p.style("fill",o.bg_fill);o.render_labels()})})},render_labels:function(){},update_radius_bounds:function(o){this.radius_bounds=o;var n=l.svg.arc().innerRadius(this.radius_bounds[0]).outerRadius(this.radius_bounds[1]);this.parent_elt.selectAll("g>path.chrom-background").transition().duration(1000).attr("d",n);this._transition_chrom_data();this._transition_labels()},update_scale:function(q){var p=this.scale;this.scale=q;if(q<=p){return}var o=this,n=new m();this.parent_elt.selectAll("path.chrom-data").filter(function(s,r){return n.is_visible(this)}).each(function(x,t){var w=l.select(this),s=w.attr("chrom"),v=o.genome.get_chrom_region(s),u=o.track.get("data_manager"),r;if(!u.can_get_more_detailed_data(v)){return}r=o.track.get("data_manager").get_more_detailed_data(v,"Coverage",0,q);$.when(r).then(function(A){w.remove();o._update_data_bounds();var z=g.find(o.chroms_layout,function(B){return B.data.chrom===s});var y=o.get_fill_color();o._render_chrom_data(o.parent_elt,z,A).style("stroke",y).style("fill",y)})});return o},_transition_chrom_data:function(){var o=this.track,q=this.chroms_layout,n=this.parent_elt.selectAll("g>path.chrom-data"),r=n[0].length;if(r>0){var p=this;$.when(o.get("data_manager").get_genome_wide_data(this.genome)).then(function(t){var s=g.reject(g.map(t,function(u,v){var w=null,x=p._get_path_function(q[v],u);if(x){w=x(u.data)}return w}),function(u){return u===null});n.each(function(v,u){l.select(this).transition().duration(1000).attr("d",s[u])})})}},_transition_labels:function(){},_update_data_bounds:function(){var n=this.data_bounds;this.data_bounds=this.get_data_bounds(this.track.get("data_manager").get_genome_wide_data(this.genome));if(this.data_bounds[0]<n[0]||this.data_bounds[1]>n[1]){this._transition_chrom_data()}},_render_data:function(q){var p=this,o=this.chroms_layout,n=this.track,r=$.Deferred();$.when(n.get("data_manager").get_genome_wide_data(this.genome)).then(function(t){p.data_bounds=p.get_data_bounds(t);layout_and_data=g.zip(o,t),chroms_data_layout=g.map(layout_and_data,function(u){var v=u[0],w=u[1];return p._render_chrom_data(q,v,w)});var s=p.get_fill_color();p.parent_elt.selectAll("path.chrom-data").style("stroke",s).style("fill",s);r.resolve(q)});return r},_render_chrom_data:function(n,o,p){},_get_path_function:function(o,n){},_chroms_layout:function(){var o=this.genome.get_chroms_info(),q=l.layout.pie().value(function(s){return s.len}).sort(null),r=q(o),n=this.total_gap/o.length,p=g.map(r,function(u,t){var s=u.endAngle-n;u.endAngle=(s>u.startAngle?s:u.startAngle);return u});return p}});var b=k.extend({initialize:function(n){k.prototype.initialize.call(this,n);this.innerRadius=this.radius_bounds[0];this.radius_bounds[0]=this.radius_bounds[1];this.bg_stroke="fff";this.bg_fill="fff";this.min_arc_len=0.08},_render_data:function(p){var o=this,n=p.selectAll("g");n.selectAll("path").attr("id",function(t){return"label-"+t.data.chrom});n.append("svg:text").filter(function(t){return t.endAngle-t.startAngle>o.min_arc_len}).attr("text-anchor","middle").append("svg:textPath").attr("xlink:href",function(t){return"#label-"+t.data.chrom}).attr("startOffset","25%").attr("font-weight","bold").text(function(t){return t.data.chrom});var q=function(v){var t=(v.endAngle-v.startAngle)/v.value,u=l.range(0,v.value,25000000).map(function(w,x){return{radius:o.innerRadius,angle:w*t+v.startAngle,label:x===0?0:(x%3?null:o.formatNum(w))}});if(u.length<4){u[u.length-1].label=o.formatNum(Math.round((u[u.length-1].angle-v.startAngle)/t))}return u};var s=function(t){return t.angle>Math.PI?"rotate(180)translate(-16)":null};var r=g.filter(this.chroms_layout,function(t){return t.endAngle-t.startAngle>o.min_arc_len});this.drawTicks(this.parent_elt,r,q,s)}});g.extend(b.prototype,h);var f=k.extend({_quantile:function(o,n){o.sort(l.ascending);return l.quantile(o,n)},_render_chrom_data:function(n,q,o){var r=this._get_path_function(q,o);if(!r){return null}var p=n.datum(o.data),s=p.append("path").attr("class","chrom-data").attr("chrom",q.data.chrom).attr("d",r);return s},_get_path_function:function(q,p){if(typeof p==="string"||!p.data||p.data.length===0){return null}var n=l.scale.linear().domain(this.data_bounds).range(this.radius_bounds).clamp(true);var r=l.scale.linear().domain([0,p.data.length]).range([q.startAngle,q.endAngle]);var o=l.svg.line.radial().interpolate("linear").radius(function(s){return n(s[1])}).angle(function(t,s){return r(s)});return l.svg.area.radial().interpolate(o.interpolate()).innerRadius(n(0)).outerRadius(o.radius()).angle(o.angle())},render_labels:function(){var n=this,q=function(){return"rotate(90)"};var p=g.filter(this.chroms_layout,function(r){return r.endAngle-r.startAngle>0.08}),o=g.filter(p,function(s,r){return r%3===0});this.drawTicks(this.parent_elt,o,this._data_bounds_ticks_fn(),q,true)},_transition_labels:function(){if(this.data_bounds.length===0){return}var o=this,q=g.filter(this.chroms_layout,function(r){return r.endAngle-r.startAngle>0.08}),p=g.filter(q,function(s,r){return r%3===0}),n=g.flatten(g.map(p,function(r){return o._data_bounds_ticks_fn()(r)}));this.parent_elt.selectAll("g.tick").data(n).transition().attr("transform",function(r){return"rotate("+(r.angle*180/Math.PI-90)+")translate("+r.radius+",0)"})},_data_bounds_ticks_fn:function(){var n=this;visibleChroms=0;return function(o){return[{radius:n.radius_bounds[0],angle:o.startAngle,label:n.formatNum(n.data_bounds[0])},{radius:n.radius_bounds[1],angle:o.startAngle,label:n.formatNum(n.data_bounds[1])}]}},get_data_bounds:function(n){}});g.extend(f.prototype,h);var e=f.extend({get_data_bounds:function(o){var n=g.map(o,function(p){if(typeof p==="string"||!p.max){return 0}return p.max});return[0,(n&&typeof n!=="string"?this._quantile(values,0.98):0)]}});var d=f.extend({get_data_bounds:function(o){var n=g.flatten(g.map(o,function(p){if(p){return g.map(p.data,function(q){return q[1]})}else{return 0}}));return[g.min(n),this._quantile(n,0.98)]}});var j=k.extend({render:function(){var n=this;$.when(n.track.get("data_manager").data_is_ready()).then(function(){$.when(n.track.get("data_manager").get_genome_wide_data(n.genome)).then(function(q){var p=[],o=n.genome.get_chroms_info();g.each(q,function(u,t){var r=o[t].chrom;var s=g.map(u.data,function(w){var v=n._get_region_angle(r,w[1]),x=n._get_region_angle(w[3],w[4]);return{source:{startAngle:v,endAngle:v+0.01},target:{startAngle:x,endAngle:x+0.01}}});p=p.concat(s)});n.parent_elt.append("g").attr("class","chord").selectAll("path").data(p).enter().append("path").style("fill",n.get_fill_color()).attr("d",l.svg.chord().radius(n.radius_bounds[0])).style("opacity",1)})})},update_radius_bounds:function(n){this.radius_bounds=n;this.parent_elt.selectAll("path").transition().attr("d",l.svg.chord().radius(this.radius_bounds[0]))},_get_region_angle:function(p,n){var o=g.find(this.chroms_layout,function(q){return q.data.chrom===p});return o.endAngle-((o.endAngle-o.startAngle)*(o.data.len-n)/o.data.len)}});return{CircsterView:a}});
\ 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: greg: Add the shed_tool_data_table_config to the functional test's app.
by Bitbucket 08 Nov '12
by Bitbucket 08 Nov '12
08 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/86fbf6e15f79/
changeset: 86fbf6e15f79
user: greg
date: 2012-11-08 17:41:21
summary: Add the shed_tool_data_table_config to the functional test's app.
affected #: 1 file
diff -r 762d4010a9a534ce5237d7a0bb6d317a9d9501ac -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c scripts/functional_tests.py
--- a/scripts/functional_tests.py
+++ b/scripts/functional_tests.py
@@ -169,6 +169,7 @@
tool_data_table_config_path = 'tool_data_table_conf.test.xml'
else:
tool_data_table_config_path = 'tool_data_table_conf.xml'
+ shed_tool_data_table_config = 'shed_tool_data_table_conf.xml'
tool_dependency_dir = os.environ.get( 'GALAXY_TOOL_DEPENDENCY_DIR', None )
use_distributed_object_store = os.environ.get( 'GALAXY_USE_DISTRIBUTED_OBJECT_STORE', False )
@@ -266,6 +267,7 @@
tool_parse_help = False,
test_conf = "test.conf",
tool_data_table_config_path = tool_data_table_config_path,
+ shed_tool_data_table_config = shed_tool_data_table_config,
log_destination = "stdout",
use_heartbeat = False,
allow_user_creation = True,
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dan: Provide a warning message when uploading files to a toolshed repository and a tool_dependencies.xml has been provided, but tool_dependencies metadata has not been generated.
by Bitbucket 08 Nov '12
by Bitbucket 08 Nov '12
08 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/762d4010a9a5/
changeset: 762d4010a9a5
user: dan
date: 2012-11-08 16:52:45
summary: Provide a warning message when uploading files to a toolshed repository and a tool_dependencies.xml has been provided, but tool_dependencies metadata has not been generated.
affected #: 1 file
diff -r d3054b066218eacd366e618cc97535d059d8bf6a -r 762d4010a9a534ce5237d7a0bb6d317a9d9501ac lib/galaxy/webapps/community/controllers/upload.py
--- a/lib/galaxy/webapps/community/controllers/upload.py
+++ b/lib/galaxy/webapps/community/controllers/upload.py
@@ -160,6 +160,7 @@
# Get the new repository tip.
if tip == repository.tip:
message = 'No changes to repository. '
+ status = 'warning'
else:
if ( isgzip or isbz2 ) and uncompress_file:
uncompress_str = ' uncompressed and '
@@ -182,6 +183,16 @@
message += " %d files were removed from the repository root. " % len( files_to_remove )
kwd[ 'message' ] = message
set_repository_metadata_due_to_new_tip( trans, repository, content_alert_str=content_alert_str, **kwd )
+ #provide a warning message if a tool_dependencies.xml file is provided, but tool dependencies weren't loaded due to e.g. a requirement tag mismatch
+ if get_config_from_disk( 'tool_dependencies.xml', repo_dir ):
+ if repository.metadata_revisions:
+ metadata_dict = repository.metadata_revisions[0].metadata
+ else:
+ metadata_dict = {}
+ if 'tool_dependencies' not in metadata_dict:
+ message += 'Name, version and type from a tool requirement tag does not match the information in the "tool_dependencies.xml". '
+ status = 'warning'
+ log.debug( 'Error in tool dependencies for repository %s: %s.' % ( repository.id, repository.name ) )
# Reset the tool_data_tables by loading the empty tool_data_table_conf.xml file.
reset_tool_data_tables( trans.app )
trans.response.send_redirect( web.url_for( controller='repository',
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Add the new ched_tool_data_table_config setting to the tool shed's config object.
by Bitbucket 08 Nov '12
by Bitbucket 08 Nov '12
08 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/d3054b066218/
changeset: d3054b066218
user: greg
date: 2012-11-08 16:32:30
summary: Add the new ched_tool_data_table_config setting to the tool shed's config object.
affected #: 1 file
diff -r b5ce9451c5d190f0507f3b2c484afe937f12a045 -r d3054b066218eacd366e618cc97535d059d8bf6a lib/galaxy/webapps/community/config.py
--- a/lib/galaxy/webapps/community/config.py
+++ b/lib/galaxy/webapps/community/config.py
@@ -48,6 +48,7 @@
self.tool_secret = kwargs.get( "tool_secret", "" )
self.tool_data_path = resolve_path( kwargs.get( "tool_data_path", "shed-tool-data" ), os.getcwd() )
self.tool_data_table_config_path = resolve_path( kwargs.get( 'tool_data_table_config_path', 'tool_data_table_conf.xml' ), self.root )
+ self.shed_tool_data_table_config = resolve_path( kwargs.get( 'shed_tool_data_table_config', 'shed_tool_data_table_conf.xml' ), self.root )
self.ftp_upload_dir = kwargs.get( 'ftp_upload_dir', None )
# Location for dependencies
if 'tool_dependency_dir' in kwargs:
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Attempt to make sure .sample files included in an installed tool shed repository are only copied to ~/tool-data if they are sample data index files.
by Bitbucket 08 Nov '12
by Bitbucket 08 Nov '12
08 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/b5ce9451c5d1/
changeset: b5ce9451c5d1
user: greg
date: 2012-11-08 16:01:08
summary: Attempt to make sure .sample files included in an installed tool shed repository are only copied to ~/tool-data if they are sample data index files.
affected #: 1 file
diff -r 5ff899b77dffce59580991a4b1d4dfbcdc091090 -r b5ce9451c5d190f0507f3b2c484afe937f12a045 lib/galaxy/util/shed_util.py
--- a/lib/galaxy/util/shed_util.py
+++ b/lib/galaxy/util/shed_util.py
@@ -7,6 +7,7 @@
from galaxy.web.form_builder import SelectField
from galaxy.tools import parameters
from galaxy.datatypes.checkers import *
+from galaxy.datatypes.sniff import is_column_based
from galaxy.util.json import *
from galaxy.util import inflector
from galaxy.tools.search import ToolBoxSearch
@@ -546,15 +547,20 @@
shutil.copy( full_source_path, os.path.join( dest_path, copied_file ) )
def copy_sample_files( app, sample_files, tool_path=None, sample_files_copied=None, dest_path=None ):
"""
- Copy all files to dest_path in the local Galaxy environment that have not already been copied. Those that have been copied
- are contained in sample_files_copied. The default value for dest_path is ~/tool-data.
+ Copy all appropriate files to dest_path in the local Galaxy environment that have not already been copied. Those that have been copied
+ are contained in sample_files_copied. The default value for dest_path is ~/tool-data. We need to be careful to copy only appropriate
+ files here because tool shed repositories can contain files ending in .sample that should not be copied to the ~/tool-data directory.
"""
+ filenames_not_to_copy = [ 'tool_data_table_conf.xml.sample' ]
sample_files_copied = util.listify( sample_files_copied )
for filename in sample_files:
- if filename not in sample_files_copied:
+ filename_sans_path = os.path.split( filename )[ 1 ]
+ if filename_sans_path not in filenames_not_to_copy and filename not in sample_files_copied:
if tool_path:
filename=os.path.join( tool_path, filename )
- copy_sample_file( app, filename, dest_path=dest_path )
+ # Attempt to ensure we're copying an appropriate file.
+ if is_data_index_sample_file( filename ):
+ copy_sample_file( app, filename, dest_path=dest_path )
def create_repo_info_dict( repository, owner, repository_clone_url, changeset_revision, ctx_rev, metadata ):
repo_info_dict = {}
repo_info_dict[ repository.name ] = ( repository.description,
@@ -1539,9 +1545,11 @@
if shed_tool_conf == file_name:
return index, shed_tool_conf_dict
def get_tool_index_sample_files( sample_files ):
+ """Try to return the list of all appropriate tool data sample files included in the repository."""
tool_index_sample_files = []
for s in sample_files:
- if s.endswith( '.loc.sample' ):
+ # The problem with this is that Galaxy does not follow a standard naming convention for file names.
+ if s.endswith( '.loc.sample' ) or s.endswith( '.xml.sample' ) or s.endswith( '.txt.sample' ):
tool_index_sample_files.append( s )
return tool_index_sample_files
def get_tool_dependency( trans, id ):
@@ -1846,6 +1854,29 @@
parent_id=tool_version_using_parent_id.id )
sa_session.add( tool_version_association )
sa_session.flush()
+def is_data_index_sample_file( file_path ):
+ """
+ Attempt to determine if a .sample file is appropriate for copying to ~/tool-data when a tool shed repository is being installed
+ into a Galaxy instance.
+ """
+ # Currently most data index files are tabular, so check that first. We'll assume that if the file is tabular, it's ok to copy.
+ if is_column_based( file_path ):
+ return True
+ # If the file is any of the following, don't copy it.
+ if check_html( file_path ):
+ return False
+ if check_image( file_path ):
+ return False
+ if check_binary( name=file_path ):
+ return False
+ if is_bz2( file_path ):
+ return False
+ if is_gzip( file_path ):
+ return False
+ if check_zip( file_path ):
+ return False
+ # Default to copying the file if none of the above are true.
+ return True
def is_downloadable( metadata_dict ):
return 'datatypes' in metadata_dict or 'tools' in metadata_dict or 'workflows' in metadata_dict
def load_installed_datatype_converters( app, installed_repository_dict, deactivate=False ):
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dan: Add shed_tool_data_table_conf.xml.sample to buildbot_setup.sh.
by Bitbucket 08 Nov '12
by Bitbucket 08 Nov '12
08 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/5ff899b77dff/
changeset: 5ff899b77dff
user: dan
date: 2012-11-08 03:16:17
summary: Add shed_tool_data_table_conf.xml.sample to buildbot_setup.sh.
affected #: 1 file
diff -r 982b9522efca2abf46637870e06c7abf1204be6d -r 5ff899b77dffce59580991a4b1d4dfbcdc091090 buildbot_setup.sh
--- a/buildbot_setup.sh
+++ b/buildbot_setup.sh
@@ -68,6 +68,7 @@
datatypes_conf.xml.sample
universe_wsgi.ini.sample
tool_data_table_conf.xml.sample
+shed_tool_data_table_conf.xml.sample
migrated_tools_conf.xml.sample
tool-data/shared/ensembl/builds.txt.sample
tool-data/shared/igv/igv_build_sites.txt.sample
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
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/982b9522efca/
changeset: 982b9522efca
user: dan
date: 2012-11-08 03:06:54
summary: Fix for params_to_incoming.
affected #: 2 files
diff -r ec51a727a497d5912fdd4269571d7c26d7523436 -r 982b9522efca2abf46637870e06c7abf1204be6d lib/galaxy/tools/parameters/__init__.py
--- a/lib/galaxy/tools/parameters/__init__.py
+++ b/lib/galaxy/tools/parameters/__init__.py
@@ -115,5 +115,5 @@
incoming[ new_name_prefix + input.test_param.name ] = values[ input.test_param.name ]
params_to_incoming( incoming, input.cases[current].inputs, values, app, new_name_prefix )
else:
- incoming[ name_prefix + input.name ] = input.to_string( input_values.get( input.name ), app )
+ incoming[ name_prefix + input.name ] = input.to_html_value( input_values.get( input.name ), app )
diff -r ec51a727a497d5912fdd4269571d7c26d7523436 -r 982b9522efca2abf46637870e06c7abf1204be6d lib/galaxy/tools/parameters/basic.py
--- a/lib/galaxy/tools/parameters/basic.py
+++ b/lib/galaxy/tools/parameters/basic.py
@@ -106,6 +106,10 @@
"""
return value
+ def to_html_value( self, value, app ):
+ """Convert an object value to the value expected from an html post"""
+ return self.to_string( value, app )
+
def to_string( self, value, app ):
"""Convert a value to a string representation suitable for persisting"""
return str( value )
@@ -370,6 +374,11 @@
return form_builder.CheckboxField( self.name, checked, refresh_on_change = self.refresh_on_change )
def from_html( self, value, trans=None, other_values={} ):
return form_builder.CheckboxField.is_checked( value )
+ def to_html_value( self, value, app ):
+ if value:
+ return [ 'true', 'true' ]
+ else:
+ return [ 'true' ]
def to_python( self, value, app ):
return ( value == 'True' )
def get_initial_value( self, trans, context ):
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
07 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/ec51a727a497/
changeset: ec51a727a497
user: clements
date: 2012-11-02 07:25:39
summary: Modified docstrings so that Sphinx would not complain about them. However, I couldn't get Sphinx to be happy with all docstrings, so we are still getting 10 warnings (down from over 70 though).
affected #: 25 files
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/datatypes/converters/fastq_to_fqtoc.py
--- a/lib/galaxy/datatypes/converters/fastq_to_fqtoc.py
+++ b/lib/galaxy/datatypes/converters/fastq_to_fqtoc.py
@@ -6,11 +6,13 @@
def main():
"""
- The format of the file is JSON:
- { "sections" : [
- { "start" : "x", "end" : "y", "sequences" : "z" },
- ...
- ]}
+ The format of the file is JSON::
+
+ { "sections" : [
+ { "start" : "x", "end" : "y", "sequences" : "z" },
+ ...
+ ]}
+
This works only for UNCOMPRESSED fastq files. The Python GzipFile does not provide seekable
offsets via tell(), so clients just have to split the slow way
"""
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/datatypes/converters/interval_to_fli.py
--- a/lib/galaxy/datatypes/converters/interval_to_fli.py
+++ b/lib/galaxy/datatypes/converters/interval_to_fli.py
@@ -1,12 +1,16 @@
'''
Creates a feature location index (FLI) for a given BED/GFF file.
-FLI index has the form:
+FLI index has the form::
+
[line_length]
<symbol1_in_lowercase><tab><symbol1><tab><location><symbol2_in_lowercase><tab><symbol2><tab><location>
...
+
where location is formatted as:
+
contig:start-end
+
and symbols are sorted in lexigraphical order.
'''
@@ -94,4 +98,4 @@
out.close()
if __name__ == '__main__':
- main()
\ No newline at end of file
+ main()
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/datatypes/converters/pbed_ldreduced_converter.py
--- a/lib/galaxy/datatypes/converters/pbed_ldreduced_converter.py
+++ b/lib/galaxy/datatypes/converters/pbed_ldreduced_converter.py
@@ -78,10 +78,14 @@
"""
need to work with rgenetics composite datatypes
so in and out are html files with data in extrafiles path
- <command interpreter="python">
- pbed_ldreduced_converter.py '$input1.extra_files_path/$input1.metadata.base_name' '$winsize' '$winmove' '$r2thresh'
- '$output1' '$output1.files_path' 'plink'
- </command>
+
+ .. raw:: xml
+
+ <command interpreter="python">
+ pbed_ldreduced_converter.py '$input1.extra_files_path/$input1.metadata.base_name' '$winsize' '$winmove' '$r2thresh'
+ '$output1' '$output1.files_path' 'plink'
+ </command>
+
"""
nparm = 7
if len(sys.argv) < nparm:
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/datatypes/data.py
--- a/lib/galaxy/datatypes/data.py
+++ b/lib/galaxy/datatypes/data.py
@@ -800,11 +800,12 @@
def get_file_peek( file_name, is_multi_byte=False, WIDTH=256, LINE_COUNT=5, skipchars=[] ):
"""
- Returns the first LINE_COUNT lines wrapped to WIDTH::
+ Returns the first LINE_COUNT lines wrapped to WIDTH
- ## >>> fname = get_test_fname('4.bed')
- ## >>> get_file_peek(fname)
- ## 'chr22 30128507 31828507 uc003bnx.1_cds_2_0_chr22_29227_f 0 +\n'
+ ## >>> fname = get_test_fname('4.bed')
+ ## >>> get_file_peek(fname)
+ ## 'chr22 30128507 31828507 uc003bnx.1_cds_2_0_chr22_29227_f 0 +\n'
+
"""
# Set size for file.readline() to a negative number to force it to
# read until either a newline or EOF. Needed for datasets with very
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/datatypes/tabular.py
--- a/lib/galaxy/datatypes/tabular.py
+++ b/lib/galaxy/datatypes/tabular.py
@@ -46,6 +46,7 @@
process all data lines.
Items of interest:
+
1. We treat 'overwrite' as always True (we always want to set tabular metadata when called).
2. If a tabular file has no data, it will have one column of type 'str'.
3. We used to check only the first 100 lines when setting metadata and this class's
@@ -356,15 +357,18 @@
Determines whether the file is in SAM format
A file in SAM format consists of lines of tab-separated data.
- The following header line may be the first line:
- @QNAME FLAG RNAME POS MAPQ CIGAR MRNM MPOS ISIZE SEQ QUAL
- or
- @QNAME FLAG RNAME POS MAPQ CIGAR MRNM MPOS ISIZE SEQ QUAL OPT
+ The following header line may be the first line::
+
+ @QNAME FLAG RNAME POS MAPQ CIGAR MRNM MPOS ISIZE SEQ QUAL
+ or
+ @QNAME FLAG RNAME POS MAPQ CIGAR MRNM MPOS ISIZE SEQ QUAL OPT
+
Data in the OPT column is optional and can consist of tab-separated data
For complete details see http://samtools.sourceforge.net/SAM1.pdf
- Rules for sniffing as True:
+ Rules for sniffing as True::
+
There must be 11 or more columns of data on each line
Columns 2 (FLAG), 4(POS), 5 (MAPQ), 8 (MPOS), and 9 (ISIZE) must be numbers (9 can be negative)
We will only check that up to the first 5 alignments are correctly formatted.
@@ -579,10 +583,11 @@
A file in ELAND export format consists of lines of tab-separated data.
There is no header.
- Rules for sniffing as True:
- There must be 22 columns on each line
- LANE, TILEm X, Y, INDEX, READ_NO, SEQ, QUAL, POSITION, *STRAND, FILT must be correct
- We will only check that up to the first 5 alignments are correctly formatted.
+ Rules for sniffing as True::
+
+ - There must be 22 columns on each line
+ - LANE, TILEm X, Y, INDEX, READ_NO, SEQ, QUAL, POSITION, *STRAND, FILT must be correct
+ - We will only check that up to the first 5 alignments are correctly formatted.
"""
import gzip
try:
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/objectstore/__init__.py
--- a/lib/galaxy/objectstore/__init__.py
+++ b/lib/galaxy/objectstore/__init__.py
@@ -51,6 +51,7 @@
store, False otherwise.
FIELD DESCRIPTIONS (these apply to all the methods in this class):
+
:type obj: object
:param obj: A Galaxy object with an assigned database ID accessible via
the .id attribute.
@@ -118,6 +119,7 @@
"""
Deletes the object identified by `obj`.
See `exists` method for the description of other fields.
+
:type entire_dir: bool
:param entire_dir: If True, delete the entire directory pointed to by
extra_dir. For safety reasons, this option applies
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/quota/__init__.py
--- a/lib/galaxy/quota/__init__.py
+++ b/lib/galaxy/quota/__init__.py
@@ -41,6 +41,7 @@
def get_quota( self, user, nice_size=False ):
"""
Calculated like so:
+
1. Anonymous users get the default quota.
2. Logged in users start with the highest of their associated '='
quotas or the default quota, if there are no associated '='
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/security/__init__.py
--- a/lib/galaxy/security/__init__.py
+++ b/lib/galaxy/security/__init__.py
@@ -173,17 +173,21 @@
which the request is sent. We cannot use trans.user_is_admin() because the controller is
what is important since admin users do not necessarily have permission to do things
on items outside of the admin view.
+
If cntrller is from the admin side ( e.g., library_admin ):
- -if item is public, all roles, including private roles, are legitimate.
- -if item is restricted, legitimate roles are derived from the users and groups associated
- with each role that is associated with the access permission ( i.e., DATASET_MANAGE_PERMISSIONS or
- LIBRARY_MANAGE ) on item. Legitimate roles will include private roles.
+
+ - if item is public, all roles, including private roles, are legitimate.
+ - if item is restricted, legitimate roles are derived from the users and groups associated
+ with each role that is associated with the access permission ( i.e., DATASET_MANAGE_PERMISSIONS or
+ LIBRARY_MANAGE ) on item. Legitimate roles will include private roles.
+
If cntrller is not from the admin side ( e.g., root, library ):
- -if item is public, all non-private roles, except for the current user's private role,
- are legitimate.
- -if item is restricted, legitimate roles are derived from the users and groups associated
- with each role that is associated with the access permission on item. Private roles, except
- for the current user's private role, will be excluded.
+
+ - if item is public, all non-private roles, except for the current user's private role,
+ are legitimate.
+ - if item is restricted, legitimate roles are derived from the users and groups associated
+ with each role that is associated with the access permission on item. Private roles, except
+ for the current user's private role, will be excluded.
"""
admin_controller = cntrller in [ 'library_admin' ]
roles = set()
@@ -1063,9 +1067,10 @@
comma-separated string of folder ids. This method works with the show_library_item()
method below, and it returns libraries for which the received user has permission to
perform the received actions. Here is an example call to this method to return all
- libraries for which the received user has LIBRARY_ADD permission:
- libraries = trans.app.security_agent.get_permitted_libraries( trans, user,
- [ trans.app.security_agent.permitted_actions.LIBRARY_ADD ] )
+ libraries for which the received user has LIBRARY_ADD permission::
+
+ libraries = trans.app.security_agent.get_permitted_libraries( trans, user,
+ [ trans.app.security_agent.permitted_actions.LIBRARY_ADD ] )
"""
all_libraries = trans.sa_session.query( trans.app.model.Library ) \
.filter( trans.app.model.Library.table.c.deleted == False ) \
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/tool_shed/tool_dependencies/install_util.py
--- a/lib/galaxy/tool_shed/tool_dependencies/install_util.py
+++ b/lib/galaxy/tool_shed/tool_dependencies/install_util.py
@@ -250,10 +250,11 @@
def set_environment( app, elem, tool_shed_repository ):
"""
Create a ToolDependency to set an environment variable. This is different from the process used to set an environment variable that is associated
- with a package. An example entry in a tool_dependencies.xml file is:
- <set_environment version="1.0">
- <environment_variable name="R_SCRIPT_PATH" action="set_to">$REPOSITORY_INSTALL_DIR</environment_variable>
- </set_environment>
+ with a package. An example entry in a tool_dependencies.xml file is::
+
+ <set_environment version="1.0">
+ <environment_variable name="R_SCRIPT_PATH" action="set_to">$REPOSITORY_INSTALL_DIR</environment_variable>
+ </set_environment>
"""
sa_session = app.model.context.current
tool_dependency = None
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -112,16 +112,20 @@
def init_tools( self, config_filename ):
"""
Read the configuration file and load each tool. The following tags are currently supported:
- <toolbox>
- <tool file="data_source/upload.xml"/> # tools outside sections
- <label text="Basic Tools" id="basic_tools" /> # labels outside sections
- <workflow id="529fd61ab1c6cc36" /> # workflows outside sections
- <section name="Get Data" id="getext"> # sections
- <tool file="data_source/biomart.xml" /> # tools inside sections
- <label text="In Section" id="in_section" /> # labels inside sections
- <workflow id="adb5f5c93f827949" /> # workflows inside sections
- </section>
- </toolbox>
+
+ .. raw:: xml
+
+ <toolbox>
+ <tool file="data_source/upload.xml"/> # tools outside sections
+ <label text="Basic Tools" id="basic_tools" /> # labels outside sections
+ <workflow id="529fd61ab1c6cc36" /> # workflows outside sections
+ <section name="Get Data" id="getext"> # sections
+ <tool file="data_source/biomart.xml" /> # tools inside sections
+ <label text="In Section" id="in_section" /> # labels inside sections
+ <workflow id="adb5f5c93f827949" /> # workflows inside sections
+ </section>
+ </toolbox>
+
"""
if self.app.config.get_bool( 'enable_tool_tags', False ):
log.info("removing all tool tag associations (" + str( self.sa_session.query( self.app.model.ToolTagAssociation ).count() ) + ")" )
@@ -740,7 +744,8 @@
class ToolOutput( object ):
"""
Represents an output datasets produced by a tool. For backward
- compatibility this behaves as if it were the tuple:
+ compatibility this behaves as if it were the tuple::
+
(format, metadata_source, parent)
"""
@@ -1079,7 +1084,7 @@
else:
self.trackster_conf = None
def parse_inputs( self, root ):
- """
+ r"""
Parse the "<inputs>" element and create appropriate `ToolParameter`s.
This implementation supports multiple pages and grouping constructs.
"""
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/tools/data/__init__.py
--- a/lib/galaxy/tools/data/__init__.py
+++ b/lib/galaxy/tools/data/__init__.py
@@ -31,10 +31,11 @@
def load_from_config_file( self, config_filename, tool_data_path, from_shed_config=False ):
"""
This method is called under 3 conditions:
- 1) When the ToolDataTableManager is initialized (see __init__ above).
- 2) Just after the ToolDataTableManager is initialized and the additional entries defined by shed_tool_data_table_conf.xml
+
+ 1. When the ToolDataTableManager is initialized (see __init__ above).
+ 2. Just after the ToolDataTableManager is initialized and the additional entries defined by shed_tool_data_table_conf.xml
are being loaded into the ToolDataTableManager.data_tables.
- 3) When a tool shed repository that includes a tool_data_table_conf.xml.sample file is being installed into a local
+ 3. When a tool shed repository that includes a tool_data_table_conf.xml.sample file is being installed into a local
Galaxy instance. In this case, we have 2 entry types to handle, files whose root tag is <tables>, for example:
"""
tree = util.parse_xml( config_filename )
@@ -57,20 +58,24 @@
def add_new_entries_from_config_file( self, config_filename, tool_data_path, shed_tool_data_table_config, persist=False ):
"""
This method is called when a tool shed repository that includes a tool_data_table_conf.xml.sample file is being
- installed into a local galaxy instance. We have 2 cases to handle, files whose root tag is <tables>, for example:
- <tables>
+ installed into a local galaxy instance. We have 2 cases to handle, files whose root tag is <tables>, for example::
+
+ <tables>
+ <!-- Location of Tmap files -->
+ <table name="tmap_indexes" comment_char="#">
+ <columns>value, dbkey, name, path</columns>
+ <file path="tool-data/tmap_index.loc" />
+ </table>
+ </tables>
+
+ and files whose root tag is <table>, for example::
+
<!-- Location of Tmap files --><table name="tmap_indexes" comment_char="#"><columns>value, dbkey, name, path</columns><file path="tool-data/tmap_index.loc" /></table>
- </tables>
- and files whose root tag is <table>, for example:
- <!-- Location of Tmap files -->
- <table name="tmap_indexes" comment_char="#">
- <columns>value, dbkey, name, path</columns>
- <file path="tool-data/tmap_index.loc" />
- </table>
+
"""
tree = util.parse_xml( config_filename )
root = tree.getroot()
@@ -119,13 +124,14 @@
class TabularToolDataTable( ToolDataTable ):
"""
Data stored in a tabular / separated value format on disk, allows multiple
- files to be merged but all must have the same column definitions.
+ files to be merged but all must have the same column definitions::
- <table type="tabular" name="test">
- <column name='...' index = '...' />
- <file path="..." />
- <file path="..." />
- </table>
+ <table type="tabular" name="test">
+ <column name='...' index = '...' />
+ <file path="..." />
+ <file path="..." />
+ </table>
+
"""
type_key = 'tabular'
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/tools/parameters/dynamic_options.py
--- a/lib/galaxy/tools/parameters/dynamic_options.py
+++ b/lib/galaxy/tools/parameters/dynamic_options.py
@@ -64,16 +64,20 @@
Type: data_meta
- When no 'from_' source has been specified in the <options> tag, this will populate the options list with (meta_value, meta_value, False).
+ When no 'from' source has been specified in the <options> tag, this will populate the options list with (meta_value, meta_value, False).
Otherwise, options which do not match the metadata value in the column are discarded.
Required Attributes:
- ref: Name of input dataset
- key: Metadata key to use for comparison
- column: column in options to compare with (not required when not associated with input options)
+
+ - ref: Name of input dataset
+ - key: Metadata key to use for comparison
+ - column: column in options to compare with (not required when not associated with input options)
+
Optional Attributes:
- multiple: Option values are multiple, split column by separator (True)
- separator: When multiple split by this (,)
+
+ - multiple: Option values are multiple, split column by separator (True)
+ - separator: When multiple split by this (,)
+
"""
def __init__( self, d_option, elem ):
Filter.__init__( self, d_option, elem )
@@ -132,12 +136,16 @@
Type: param_value
Required Attributes:
- ref: Name of input value
- column: column in options to compare with
+
+ - ref: Name of input value
+ - column: column in options to compare with
+
Optional Attributes:
- keep: Keep columns matching value (True)
- Discard columns matching value (False)
- ref_attribute: Period (.) separated attribute chain of input (ref) to use as value for filter
+
+ - keep: Keep columns matching value (True)
+ Discard columns matching value (False)
+ - ref_attribute: Period (.) separated attribute chain of input (ref) to use as value for filter
+
"""
def __init__( self, d_option, elem ):
Filter.__init__( self, d_option, elem )
@@ -294,13 +302,15 @@
Type: remove_value
- Required Attributes:
+ Required Attributes::
+
value: value to remove from select list
or
ref: param to refer to
or
meta_ref: dataset to refer to
key: metadata key to compare to
+
"""
def __init__( self, d_option, elem ):
Filter.__init__( self, d_option, elem )
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/util/heartbeat.py
--- a/lib/galaxy/util/heartbeat.py
+++ b/lib/galaxy/util/heartbeat.py
@@ -134,7 +134,9 @@
Scans a given backtrace stack frames, returns a single
quadraple of [filename, line, function-name, text] of
the single, deepest, most interesting frame.
- Interesting being:
+
+ Interesting being::
+
inside the galaxy source code ("/lib/galaxy"),
prefreably not an egg.
"""
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/util/shed_util.py
--- a/lib/galaxy/util/shed_util.py
+++ b/lib/galaxy/util/shed_util.py
@@ -2397,11 +2397,13 @@
def update_existing_tool_dependency( app, repository, original_dependency_dict, new_dependencies_dict ):
"""
Update an exsiting tool dependency whose definition was updated in a change set pulled by a Galaxy administrator when getting updates
- to an installed tool shed repository. The original_dependency_dict is a single tool dependency definition, an example of which is:
- {"name": "bwa",
- "readme": "\\nCompiling BWA requires zlib and libpthread to be present on your system.\\n ",
- "type": "package",
- "version": "0.6.2"}
+ to an installed tool shed repository. The original_dependency_dict is a single tool dependency definition, an example of which is::
+
+ {"name": "bwa",
+ "readme": "\\nCompiling BWA requires zlib and libpthread to be present on your system.\\n ",
+ "type": "package",
+ "version": "0.6.2"}
+
The new_dependencies_dict is the dictionary generated by the generate_tool_dependency_metadata method.
"""
new_tool_dependency = None
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/util/topsort.py
--- a/lib/galaxy/util/topsort.py
+++ b/lib/galaxy/util/topsort.py
@@ -9,18 +9,24 @@
value is a list, representing a total ordering that respects all
the input constraints.
E.g.,
+
topsort( [(1,2), (3,3)] )
+
may return any of (but nothing other than)
+
[3, 1, 2]
[1, 3, 2]
[1, 2, 3]
+
because those are the permutations of the input elements that
respect the "1 precedes 2" and "3 precedes 3" input constraints.
Note that a constraint of the form (x, x) is really just a trick
to make sure x appears *somewhere* in the output list.
If there's a cycle in the constraints, say
+
topsort( [(1,2), (2,1)] )
+
then CycleError is raised, and the exception object supports
many methods to help analyze and break the cycles. This requires
a good deal more code than topsort itself!
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/visualization/data_providers/genome.py
--- a/lib/galaxy/visualization/data_providers/genome.py
+++ b/lib/galaxy/visualization/data_providers/genome.py
@@ -610,11 +610,16 @@
def process_data( self, iterator, start_val=0, max_vals=None, **kwargs ):
"""
- Returns a dict with the following attributes:
+ Returns a dict with the following attributes::
+
data - a list of variants with the format
+
+ .. raw:: text
+
[<guid>, <start>, <end>, <name>, cigar, seq]
message - error/informative message
+
"""
rval = []
message = None
@@ -893,13 +898,17 @@
def process_data( self, iterator, start_val=0, max_vals=None, **kwargs ):
"""
- Returns a dict with the following attributes:
+ Returns a dict with the following attributes::
+
data - a list of reads with the format
- [<guid>, <start>, <end>, <name>, <read_1>, <read_2>, [empty], <mapq_scores>]
+ [<guid>, <start>, <end>, <name>, <read_1>, <read_2>, [empty], <mapq_scores>]
+
where <read_1> has the format
[<start>, <end>, <cigar>, <strand>, <read_seq>]
+
and <read_2> has the format
[<start>, <end>, <cigar>, <strand>, <read_seq>]
+
Field 7 is empty so that mapq scores' location matches that in single-end reads.
For single-end reads, read has format:
[<guid>, <start>, <end>, <name>, <cigar>, <strand>, <seq>, <mapq_score>]
@@ -910,6 +919,7 @@
max_low - lowest coordinate for the returned reads
max_high - highest coordinate for the returned reads
message - error/informative message
+
"""
# No iterator indicates no reads.
if iterator is None:
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/visualization/data_providers/phyloviz/newickparser.py
--- a/lib/galaxy/visualization/data_providers/phyloviz/newickparser.py
+++ b/lib/galaxy/visualization/data_providers/phyloviz/newickparser.py
@@ -112,9 +112,12 @@
def parseNode(self, string, depth):
""" Recursive method for parsing newick string, works by stripping down the string into substring
of newick contained with brackers, which is used to call itself.
- Eg ... ( A, B, (D, E)C, F, G ) ...
+
+ Eg ... ( A, B, (D, E)C, F, G ) ...
+
We will make the preceeding nodes first A, B, then the internal node C, its children D, E,
- and finally the succeeding nodes F, G"""
+ and finally the succeeding nodes F, G
+ """
# Base case where there is only an empty string
if string == "":
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/web/form_builder.py
--- a/lib/galaxy/web/form_builder.py
+++ b/lib/galaxy/web/form_builder.py
@@ -708,9 +708,12 @@
selected_value='none', refresh_on_change=False, multiple=False, display=None, size=None ):
"""
Build a SelectField given a set of objects. The received params are:
+
- objs: the set of objects used to populate the option list
- label_attr: the attribute of each obj (e.g., name, email, etc ) whose value is used to populate each option label.
+
- If the string 'self' is passed as label_attr, each obj in objs is assumed to be a string, so the obj itself is used
+
- select_field_name: the name of the SelectField
- initial_value: the value of the first option in the SelectField - allows for an option telling the user to select something
- selected_value: the value of the currently selected option
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/web/framework/__init__.py
--- a/lib/galaxy/web/framework/__init__.py
+++ b/lib/galaxy/web/framework/__init__.py
@@ -624,6 +624,7 @@
def handle_user_login( self, user ):
"""
Login a new user (possibly newly created)
+
- create a new session
- associate new session with user
- if old session had a history and it was not associated with a user, associate it with the new session,
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/webapps/community/config.py
--- a/lib/galaxy/webapps/community/config.py
+++ b/lib/galaxy/webapps/community/config.py
@@ -140,7 +140,7 @@
def get_database_engine_options( kwargs ):
"""
Allow options for the SQLAlchemy database engine to be passed by using
- the prefix "database_engine_option_".
+ the prefix "database_engine_option".
"""
conversions = {
'convert_unicode': string_as_bool,
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/webapps/galaxy/api/genomes.py
--- a/lib/galaxy/webapps/galaxy/api/genomes.py
+++ b/lib/galaxy/webapps/galaxy/api/genomes.py
@@ -48,25 +48,25 @@
POST /api/genomes
Download and/or index a genome.
- Parameters:
+ Parameters::
- dbkey DB key of the build to download, ignored unless 'UCSC' is specified as the source
- ncbi_name NCBI's genome identifier, ignored unless NCBI is specified as the source
- ensembl_dbkey Ensembl's genome identifier, ignored unless Ensembl is specified as the source
- url_dbkey DB key to use for this build, ignored unless URL is specified as the source
- source Data source for this build. Can be: UCSC, Ensembl, NCBI, URL
- indexers POST array of indexers to run after downloading (indexers[] = first, indexers[] = second, ...)
- func Allowed values:
- 'download' Download and index
- 'index' Index only
-
- Returns:
+ dbkey DB key of the build to download, ignored unless 'UCSC' is specified as the source
+ ncbi_name NCBI's genome identifier, ignored unless NCBI is specified as the source
+ ensembl_dbkey Ensembl's genome identifier, ignored unless Ensembl is specified as the source
+ url_dbkey DB key to use for this build, ignored unless URL is specified as the source
+ source Data source for this build. Can be: UCSC, Ensembl, NCBI, URL
+ indexers POST array of indexers to run after downloading (indexers[] = first, indexers[] = second, ...)
+ func Allowed values:
+ 'download' Download and index
+ 'index' Index only
+
+ Returns::
- If no error:
- dict( status: 'ok', job: <job ID> )
+ If no error:
+ dict( status: 'ok', job: <job ID> )
- If error:
- dict( status: 'error', error: <error message> )
+ If error:
+ dict( status: 'error', error: <error message> )
"""
params = util.Params( payload )
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/webapps/galaxy/api/tools.py
--- a/lib/galaxy/webapps/galaxy/api/tools.py
+++ b/lib/galaxy/webapps/galaxy/api/tools.py
@@ -13,12 +13,15 @@
@web.expose_api
def index( self, trans, **kwds ):
"""
- GET /api/tools: returns a list of tools defined by parameters
+ GET /api/tools: returns a list of tools defined by parameters::
+
parameters:
+
in_panel - if true, tools are returned in panel structure,
including sections and labels
trackster - if true, only tools that are compatible with
Trackster are returned
+
"""
# Read params.
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/webapps/galaxy/controllers/workflow.py
--- a/lib/galaxy/webapps/galaxy/controllers/workflow.py
+++ b/lib/galaxy/webapps/galaxy/controllers/workflow.py
@@ -1980,8 +1980,8 @@
def edgelist_for_workflow_steps( steps ):
"""
- Create a list of tuples representing edges between `WorkflowSteps` based
- on associated `WorkflowStepConnection`s
+ Create a list of tuples representing edges between ``WorkflowSteps`` based
+ on associated ``WorkflowStepConnection``s
"""
edges = []
steps_to_index = dict( ( step, i ) for i, step in enumerate( steps ) )
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/webapps/reports/config.py
--- a/lib/galaxy/webapps/reports/config.py
+++ b/lib/galaxy/webapps/reports/config.py
@@ -56,7 +56,7 @@
def get_database_engine_options( kwargs ):
"""
Allow options for the SQLAlchemy database engine to be passed by using
- the prefix "database_engine_option_".
+ the prefix "database_engine_option".
"""
conversions = {
'convert_unicode': string_as_bool,
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/mimeparse.py
--- a/lib/mimeparse.py
+++ b/lib/mimeparse.py
@@ -39,18 +39,21 @@
return (type.strip(), subtype.strip(), params)
def parse_media_range(range):
- """Carves up a media range and returns a tuple of the
- (type, subtype, params) where 'params' is a dictionary
- of all the parameters for the media range.
- For example, the media range 'application/*;q=0.5' would
- get parsed into:
+ r"""
+ Carves up a media range and returns a tuple of the
+ (type, subtype, params) where 'params' is a dictionary
+ of all the parameters for the media range.
+ For example, the media range 'application/*;q=0.5' would
+ get parsed into:
- ('application', '*', {'q', '0.5'})
+ .. raw:: text
- In addition this function also guarantees that there
- is a value for 'q' in the params dictionary, filling it
- in with a proper default if necessary.
- """
+ ('application', '*', {'q', '0.5'})
+
+ In addition this function also guarantees that there
+ is a value for 'q' in the params dictionary, filling it
+ in with a proper default if necessary.
+ """
(type, subtype, params) = parse_mime_type(range)
if not params.has_key('q') or not params['q'] or \
not float(params['q']) or float(params['q']) > 1\
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
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/bc5fa254bafc/
changeset: bc5fa254bafc
user: greg
date: 2012-11-07 22:36:28
summary: Maintain entries for Galaxy's ToolDataTableManager acquired from installed tool shed repositrories that contain a valid file named tool_data_table_conf.xmnl.sample in a separate config file name shed_tool_data_table_conf.xml. This will ensure that manual edits to the original tool_data_table_conf.xml will not be munged when Galaxy's tool shed installation process automatically adds entries into the file. This enhancement alos includes a bug fix where ToolDataTableEntries that should have been persisted to the XML file were not being handled correctly.
affected #: 11 files
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 lib/galaxy/app.py
--- a/lib/galaxy/app.py
+++ b/lib/galaxy/app.py
@@ -76,8 +76,13 @@
self.genomes = Genomes( self )
# Data providers registry.
self.data_provider_registry = DataProviderRegistry()
- # Tool data tables
- self.tool_data_tables = galaxy.tools.data.ToolDataTableManager( self.config.tool_data_path, self.config.tool_data_table_config_path )
+ # Initialize tool data tables using the config defined by self.config.tool_data_table_config_path.
+ self.tool_data_tables = galaxy.tools.data.ToolDataTableManager( tool_data_path=self.config.tool_data_path,
+ config_filename=self.config.tool_data_table_config_path )
+ # Load additional entries defined by self.config.shed_tool_data_table_config into tool data tables.
+ self.tool_data_tables.load_from_config_file( config_filename=self.config.shed_tool_data_table_config,
+ tool_data_path=self.tool_data_tables.tool_data_path,
+ from_shed_config=True )
# Initialize the tools, making sure the list of tool configs includes the reserved migrated_tools_conf.xml file.
tool_configs = self.config.tool_configs
if self.config.migrated_tools_config not in tool_configs:
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 lib/galaxy/config.py
--- a/lib/galaxy/config.py
+++ b/lib/galaxy/config.py
@@ -66,6 +66,7 @@
tcf = 'tool_conf.xml'
self.tool_configs = [ resolve_path( p, self.root ) for p in listify( tcf ) ]
self.tool_data_table_config_path = resolve_path( kwargs.get( 'tool_data_table_config_path', 'tool_data_table_conf.xml' ), self.root )
+ self.shed_tool_data_table_config = resolve_path( kwargs.get( 'shed_tool_data_table_config', 'shed_tool_data_table_conf.xml' ), self.root )
self.enable_tool_shed_check = string_as_bool( kwargs.get( 'enable_tool_shed_check', False ) )
try:
self.hours_between_check = int( kwargs.get( 'hours_between_check', 12 ) )
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 lib/galaxy/tool_shed/install_manager.py
--- a/lib/galaxy/tool_shed/install_manager.py
+++ b/lib/galaxy/tool_shed/install_manager.py
@@ -184,7 +184,8 @@
relative_install_dir=relative_install_dir,
repository_files_dir=None,
resetting_all_metadata_on_repository=False,
- updating_installed_repository=False )
+ updating_installed_repository=False,
+ persist=True )
tool_shed_repository.metadata = metadata_dict
self.app.sa_session.add( tool_shed_repository )
self.app.sa_session.flush()
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 lib/galaxy/tool_shed/migrate/common.py
--- a/lib/galaxy/tool_shed/migrate/common.py
+++ b/lib/galaxy/tool_shed/migrate/common.py
@@ -41,8 +41,13 @@
self.datatypes_registry = galaxy.datatypes.registry.Registry()
# Load the data types in the Galaxy distribution, which are defined in self.config.datatypes_config.
self.datatypes_registry.load_datatypes( self.config.root, self.config.datatypes_config )
- # Tool data tables
- self.tool_data_tables = galaxy.tools.data.ToolDataTableManager( self.config.tool_data_path, self.config.tool_data_table_config_path )
+ # Initialize tool data tables using the config defined by self.config.tool_data_table_config_path.
+ self.tool_data_tables = galaxy.tools.data.ToolDataTableManager( tool_data_path=self.config.tool_data_path,
+ config_filename=self.config.tool_data_table_config_path )
+ # Load additional entries defined by self.config.shed_tool_data_table_config into tool data tables.
+ self.tool_data_tables.load_from_config_file( config_filename=self.config.shed_tool_data_table_config,
+ tool_data_path=self.tool_data_tables.tool_data_path,
+ from_shed_config=True )
# Initialize the tools, making sure the list of tool configs includes the reserved migrated_tools_conf.xml file.
tool_configs = self.config.tool_configs
if self.config.migrated_tools_config not in tool_configs:
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 lib/galaxy/tools/data/__init__.py
--- a/lib/galaxy/tools/data/__init__.py
+++ b/lib/galaxy/tools/data/__init__.py
@@ -15,17 +15,28 @@
"""Manages a collection of tool data tables"""
def __init__( self, tool_data_path, config_filename=None ):
self.tool_data_path = tool_data_path
- self.data_tables = {}
- # Store config elements for on-the-fly persistence.
- self.data_table_elems = []
+ # This stores all defined data table entries from both the tool_data_table_conf.xml file and the shed_tool_data_table_conf.xml file
+ # at server startup. If tool shed repositories are installed that contain a valid file named tool_data_table_conf.xml.sample, entries
+ # from that file are inserted into this dict at the time of installation.
+ self.data_tables = {}
+ # Store config elements for on-the-fly persistence to the defined shed_tool_data_table_config file name.
+ self.shed_data_table_elems = []
self.data_table_elem_names = []
if config_filename:
- self.load_from_config_file( config_filename, self.tool_data_path )
+ self.load_from_config_file( config_filename, self.tool_data_path, from_shed_config=False )
def __getitem__( self, key ):
return self.data_tables.__getitem__( key )
def __contains__( self, key ):
return self.data_tables.__contains__( key )
- def load_from_config_file( self, config_filename, tool_data_path ):
+ def load_from_config_file( self, config_filename, tool_data_path, from_shed_config=False ):
+ """
+ This method is called under 3 conditions:
+ 1) When the ToolDataTableManager is initialized (see __init__ above).
+ 2) Just after the ToolDataTableManager is initialized and the additional entries defined by shed_tool_data_table_conf.xml
+ are being loaded into the ToolDataTableManager.data_tables.
+ 3) When a tool shed repository that includes a tool_data_table_conf.xml.sample file is being installed into a local
+ Galaxy instance. In this case, we have 2 entry types to handle, files whose root tag is <tables>, for example:
+ """
tree = util.parse_xml( config_filename )
root = tree.getroot()
table_elems = []
@@ -36,13 +47,14 @@
table_elem_name = table_elem.get( 'name', None )
if table_elem_name and table_elem_name not in self.data_table_elem_names:
self.data_table_elem_names.append( table_elem_name )
- self.data_table_elems.append( table_elem )
+ if from_shed_config:
+ self.shed_data_table_elems.append( table_elem )
table = tool_data_table_types[ type ]( table_elem, tool_data_path )
if table.name not in self.data_tables:
self.data_tables[ table.name ] = table
log.debug( "Loaded tool data table '%s'", table.name )
return table_elems
- def add_new_entries_from_config_file( self, config_filename, tool_data_path, tool_data_table_config_path, persist=False ):
+ def add_new_entries_from_config_file( self, config_filename, tool_data_path, shed_tool_data_table_config, persist=False ):
"""
This method is called when a tool shed repository that includes a tool_data_table_conf.xml.sample file is being
installed into a local galaxy instance. We have 2 cases to handle, files whose root tag is <tables>, for example:
@@ -65,7 +77,9 @@
# Make a copy of the current list of data_table_elem_names so we can persist later if changes to the config file are necessary.
original_data_table_elem_names = [ name for name in self.data_table_elem_names ]
if root.tag == 'tables':
- table_elems = self.load_from_config_file( config_filename, tool_data_path )
+ table_elems = self.load_from_config_file( config_filename=config_filename,
+ tool_data_path=tool_data_path,
+ from_shed_config=True )
else:
table_elems = []
type = root.get( 'type', 'tabular' )
@@ -74,23 +88,22 @@
table_elem_name = root.get( 'name', None )
if table_elem_name and table_elem_name not in self.data_table_elem_names:
self.data_table_elem_names.append( table_elem_name )
- self.data_table_elems.append( root )
+ self.shed_data_table_elems.append( root )
table = tool_data_table_types[ type ]( root, tool_data_path )
if table.name not in self.data_tables:
self.data_tables[ table.name ] = table
log.debug( "Added new tool data table '%s'", table.name )
if persist and self.data_table_elem_names != original_data_table_elem_names:
# Persist Galaxy's version of the changed tool_data_table_conf.xml file.
- self.to_xml_file( tool_data_table_config_path )
+ self.to_xml_file( shed_tool_data_table_config )
return table_elems
- def to_xml_file( self, tool_data_table_config_path ):
- """Write the current in-memory version of the tool_data-table_conf.xml file to disk."""
- full_path = os.path.abspath( tool_data_table_config_path )
+ def to_xml_file( self, shed_tool_data_table_config ):
+ """Write the current in-memory version of the shed_tool_data_table_conf.xml file to disk."""
+ full_path = os.path.abspath( shed_tool_data_table_config )
fd, filename = tempfile.mkstemp()
os.write( fd, '<?xml version="1.0"?>\n' )
- os.write( fd, "<!-- Use the file tool_data_table_conf.xml.oldlocstyle if you don't want to update your loc files as changed in revision 4550:535d276c92bc-->\n" )
os.write( fd, '<tables>\n' )
- for elem in self.data_table_elems:
+ for elem in self.shed_data_table_elems:
os.write( fd, '%s' % util.xml_to_string( elem ) )
os.write( fd, '</tables>\n' )
os.close( fd )
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 lib/galaxy/util/shed_util.py
--- a/lib/galaxy/util/shed_util.py
+++ b/lib/galaxy/util/shed_util.py
@@ -753,12 +753,15 @@
tool_dependencies_dict[ 'set_environment' ] = [ requirements_dict ]
return tool_dependencies_dict
def generate_metadata_for_changeset_revision( app, repository, repository_clone_url, shed_config_dict={}, relative_install_dir=None, repository_files_dir=None,
- resetting_all_metadata_on_repository=False, updating_installed_repository=False ):
+ resetting_all_metadata_on_repository=False, updating_installed_repository=False, persist=False ):
"""
Generate metadata for a repository using it's files on disk. To generate metadata for changeset revisions older than the repository tip,
the repository will have been cloned to a temporary location and updated to a specified changeset revision to access that changeset revision's
disk files, so the value of repository_files_dir will not always be repository.repo_path (it could be an absolute path to a temporary directory
containing a clone). If it is an absolute path, the value of relative_install_dir must contain repository.repo_path.
+
+ The value of persist will be True when the installed repository contains a valid tool_data_table_conf.xml.sample file, in which case the entries
+ should ultimately be persisted to the file referred to by app.config.shed_tool_data_table_config.
"""
if updating_installed_repository:
# Keep the original tool shed repository metadata if setting metadata on a repository installed into a local Galaxy instance for which
@@ -810,9 +813,9 @@
relative_path, filename = os.path.split( sample_file )
if filename == 'tool_data_table_conf.xml.sample':
new_table_elems = app.tool_data_tables.add_new_entries_from_config_file( config_filename=sample_file,
- tool_data_path=app.config.tool_data_path,
- tool_data_table_config_path=app.config.tool_data_table_config_path,
- persist=False )
+ tool_data_path=original_tool_data_path,
+ shed_tool_data_table_config=app.config.shed_tool_data_table_config,
+ persist=persist )
for root, dirs, files in os.walk( files_dir ):
if root.find( '.hg' ) < 0 and root.find( 'hgrc' ) < 0:
if '.hg' in dirs:
@@ -1768,15 +1771,15 @@
return tool, message, sample_files
def handle_sample_tool_data_table_conf_file( app, filename, persist=False ):
"""
- Parse the incoming filename and add new entries to the in-memory app.tool_data_tables dictionary. If persist is True (should only occur)
- if call is from the Galaxy side (not the tool shed), the new entries will be appended to Galaxy's tool_data_table_conf.xml file on disk.
+ Parse the incoming filename and add new entries to the in-memory app.tool_data_tables dictionary. If persist is True (should only occur
+ if call is from the Galaxy side, not the tool shed), the new entries will be appended to Galaxy's shed_tool_data_table_conf.xml file on disk.
"""
error = False
message = ''
try:
new_table_elems = app.tool_data_tables.add_new_entries_from_config_file( config_filename=filename,
tool_data_path=app.config.tool_data_path,
- tool_data_table_config_path=app.config.tool_data_table_config_path,
+ shed_tool_data_table_config=app.config.shed_tool_data_table_config,
persist=persist )
except Exception, e:
message = str( e )
@@ -2143,7 +2146,8 @@
relative_install_dir=relative_install_dir,
repository_files_dir=None,
resetting_all_metadata_on_repository=False,
- updating_installed_repository=False )
+ updating_installed_repository=False,
+ persist=False )
repository.metadata = metadata_dict
if metadata_dict != original_metadata_dict:
update_in_shed_tool_config( trans.app, repository )
@@ -2221,7 +2225,8 @@
relative_install_dir=repo_dir,
repository_files_dir=work_dir,
resetting_all_metadata_on_repository=True,
- updating_installed_repository=False )
+ updating_installed_repository=False,
+ persist=False )
if current_metadata_dict:
if not metadata_changeset_revision and not metadata_dict:
# We're at the first change set in the change log.
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 lib/galaxy/webapps/community/controllers/common.py
--- a/lib/galaxy/webapps/community/controllers/common.py
+++ b/lib/galaxy/webapps/community/controllers/common.py
@@ -10,9 +10,8 @@
from galaxy.util.shed_util import generate_clone_url_for_repository_in_tool_shed, generate_message_for_invalid_tools, generate_metadata_for_changeset_revision
from galaxy.util.shed_util import get_changectx_for_changeset, get_config_from_disk, get_configured_ui, get_file_context_from_ctx, get_named_tmpfile_from_ctx
from galaxy.util.shed_util import get_parent_id, get_repository_in_tool_shed, get_repository_metadata_by_changeset_revision
-from galaxy.util.shed_util import handle_sample_files_and_load_tool_from_disk, handle_sample_files_and_load_tool_from_tmp_config
-from galaxy.util.shed_util import handle_sample_tool_data_table_conf_file, INITIAL_CHANGELOG_HASH, is_downloadable, load_tool_from_config, remove_dir
-from galaxy.util.shed_util import reset_tool_data_tables, reversed_upper_bounded_changelog, strip_path
+from galaxy.util.shed_util import handle_sample_files_and_load_tool_from_disk, handle_sample_files_and_load_tool_from_tmp_config, INITIAL_CHANGELOG_HASH
+from galaxy.util.shed_util import is_downloadable, load_tool_from_config, remove_dir, reset_tool_data_tables, reversed_upper_bounded_changelog, strip_path
from galaxy.web.base.controller import *
from galaxy.web.base.controllers.admin import *
from galaxy.webapps.community import model
@@ -640,7 +639,8 @@
relative_install_dir=repo_dir,
repository_files_dir=None,
resetting_all_metadata_on_repository=False,
- updating_installed_repository=False )
+ updating_installed_repository=False,
+ persist=False )
if metadata_dict:
downloadable = is_downloadable( metadata_dict )
repository_metadata = None
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
--- a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
+++ b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
@@ -447,6 +447,12 @@
@web.expose
@web.require_admin
def deactivate_or_uninstall_repository( self, trans, **kwd ):
+ """
+ Handle all changes when a tool shed repository is being deactivated or uninstalled. Notice that if the repository contents include
+ a file named tool_data_table_conf.xml.sample, it's entries are not removed from the defined config.shed_tool_data_table_config. This
+ is because it becomes a bit complex to determine if other installed repositories include tools that require the same entry. For now
+ we'll never delete entries from config.shed_tool_data_table_config, but we may choose to do so in the future if it becomes necessary.
+ """
params = util.Params( kwd )
message = util.restore_text( params.get( 'message', '' ) )
status = params.get( 'status', 'done' )
@@ -753,7 +759,8 @@
relative_install_dir=relative_install_dir,
repository_files_dir=None,
resetting_all_metadata_on_repository=False,
- updating_installed_repository=False )
+ updating_installed_repository=False,
+ persist=True )
tool_shed_repository.metadata = metadata_dict
trans.sa_session.add( tool_shed_repository )
trans.sa_session.flush()
@@ -1491,7 +1498,8 @@
relative_install_dir=relative_install_dir,
repository_files_dir=None,
resetting_all_metadata_on_repository=False,
- updating_installed_repository=False )
+ updating_installed_repository=False,
+ persist=False )
repository.metadata = metadata_dict
if metadata_dict != original_metadata_dict:
update_in_shed_tool_config( trans.app, repository )
@@ -1675,7 +1683,8 @@
relative_install_dir=relative_install_dir,
repository_files_dir=None,
resetting_all_metadata_on_repository=False,
- updating_installed_repository=True )
+ updating_installed_repository=True,
+ persist=True )
repository.metadata = metadata_dict
# Update the repository changeset_revision in the database.
repository.changeset_revision = latest_changeset_revision
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 run.sh
--- a/run.sh
+++ b/run.sh
@@ -13,6 +13,7 @@
reports_wsgi.ini.sample
shed_tool_conf.xml.sample
tool_conf.xml.sample
+ shed_tool_data_table_conf.xml.sample
tool_data_table_conf.xml.sample
tool_sheds_conf.xml.sample
openid_conf.xml.sample
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 shed_tool_data_table_conf.xml.sample
--- /dev/null
+++ b/shed_tool_data_table_conf.xml.sample
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<tables>
+</tables>
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 universe_wsgi.ini.sample
--- a/universe_wsgi.ini.sample
+++ b/universe_wsgi.ini.sample
@@ -149,6 +149,16 @@
#enable_tool_shed_check = False
#hours_between_check = 12
+# XML config file that contains data table entries for the ToolDataTableManager. This file is manually
+# maintained by the Galaxy administrator.
+#tool_data_table_config_path = tool_data_table_conf.xml
+
+# XML config file that contains additional data table entries for the ToolDataTableManager. This file
+# is automatically generated based on the current installed tool shed repositories that contain valid
+# tool_data_table_conf.xml.sample files. At the time of installation, these entries are automatically
+# added to the following file, which is parsed and applied to the ToolDataTableManager at server start up.
+#shed_tool_data_table_config = shed_tool_data_table_conf.xml
+
# Directory where data used by tools is located, see the samples in that
# directory and the wiki for help:
# http://wiki.g2.bx.psu.edu/Admin/Data%20Integration
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dan: Allow unhiding all datasets in the current history.
by Bitbucket 07 Nov '12
by Bitbucket 07 Nov '12
07 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/dbff28bde968/
changeset: dbff28bde968
user: dan
date: 2012-11-07 19:50:06
summary: Allow unhiding all datasets in the current history.
affected #: 3 files
diff -r 932585f1dd8d67c28d2c22003af0d9ae318ef947 -r dbff28bde968a05b787dd53cfca182c53a81eeb7 lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py
+++ b/lib/galaxy/model/__init__.py
@@ -694,6 +694,9 @@
@property
def get_disk_size_bytes( self ):
return self.get_disk_size( nice_size=False )
+ def unhide_datasets( self ):
+ for dataset in self.datasets:
+ dataset.mark_unhidden()
def get_disk_size( self, nice_size=False ):
# unique datasets only
db_session = object_session( self )
diff -r 932585f1dd8d67c28d2c22003af0d9ae318ef947 -r dbff28bde968a05b787dd53cfca182c53a81eeb7 lib/galaxy/webapps/galaxy/controllers/history.py
--- a/lib/galaxy/webapps/galaxy/controllers/history.py
+++ b/lib/galaxy/webapps/galaxy/controllers/history.py
@@ -550,6 +550,20 @@
return trans.show_ok_message( "History deleted, a new history is active", refresh_frames=['history'] )
@web.expose
+ def unhide_datasets( self, trans, current=False, ids=None ):
+ """Unhide the datasets in the active history -- this does not require a logged in user."""
+ if not ids and util.string_as_bool( current ):
+ histories = [ trans.get_history() ]
+ refresh_frames = ['history']
+ else:
+ raise NotImplementedError( "You can currently only unhide all the datasets of the current history." )
+ for history in histories:
+ history.unhide_datasets()
+ trans.sa_session.add( history )
+ trans.sa_session.flush()
+ return trans.show_ok_message( "Your datasets have been unhidden.", refresh_frames=refresh_frames )
+
+ @web.expose
@web.require_login( "rate items" )
@web.json
def rate_async( self, trans, id, rating ):
diff -r 932585f1dd8d67c28d2c22003af0d9ae318ef947 -r dbff28bde968a05b787dd53cfca182c53a81eeb7 templates/root/index.mako
--- a/templates/root/index.mako
+++ b/templates/root/index.mako
@@ -43,6 +43,11 @@
"${_("Show Hidden Datasets")}": function() {
galaxy_history.location = "${h.url_for( controller='root', action='history', show_hidden=True)}";
},
+ "${_("Unhide Hidden Datasets")}": function() {
+ if ( confirm( "Really unhide all hidden datasets?" ) ) {
+ galaxy_main.location = "${h.url_for( controller='history', action='unhide_datasets', current=True )}";
+ }
+ },
"${_("Purge Deleted Datasets")}": function() {
if ( confirm( "Really delete all deleted datasets permanently? This cannot be undone." ) ) {
galaxy_main.location = "${h.url_for( controller='history', action='purge_deleted_datasets' )}";
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: Circster: do not transition labels if there are no data bounds (and hence nothing to transition).
by Bitbucket 07 Nov '12
by Bitbucket 07 Nov '12
07 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/932585f1dd8d/
changeset: 932585f1dd8d
user: jgoecks
date: 2012-11-07 19:16:07
summary: Circster: do not transition labels if there are no data bounds (and hence nothing to transition).
affected #: 1 file
diff -r 7bd34ce09e9fd795df2088be9c13c695b00424cd -r 932585f1dd8d67c28d2c22003af0d9ae318ef947 static/scripts/viz/circster.js
--- a/static/scripts/viz/circster.js
+++ b/static/scripts/viz/circster.js
@@ -803,6 +803,9 @@
// FIXME: (a) pull out function for getting labeled chroms? and (b) function used in transition below
// is copied from UseTicks mixin, so pull out and make generally available.
+ // If there are no data bounds, nothing to transition.
+ if (this.data_bounds.length === 0) { return; }
+
// Transition labels to new radius bounds.
var self = this,
visibleChroms = _.filter(this.chroms_layout, function(c) { return c.endAngle - c.startAngle > 0.08; }),
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dannon: Move doc/build to an appropriate location in .hgignore
by Bitbucket 07 Nov '12
by Bitbucket 07 Nov '12
07 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/7bd34ce09e9f/
changeset: 7bd34ce09e9f
user: dannon
date: 2012-11-07 17:02:43
summary: Move doc/build to an appropriate location in .hgignore
affected #: 1 file
diff -r 0a20563f9d46749d041c079907492bf9d4866628 -r 7bd34ce09e9fd795df2088be9c13c695b00424cd .hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -41,8 +41,6 @@
static/welcome.html.*
static/welcome.html
-doc/build
-
# Tool data.
tool-data/annotation_profiler_options.xml
tool-data/annotation_profiler_valid_builds.txt
@@ -74,6 +72,9 @@
*/variables.less
static/june_2007_style/blue/base_sprites.less
+# Documentation build files.
+doc/build
+
# Misc
*.orig
.DS_Store
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