galaxy-commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
November 2012
- 1 participants
- 133 discussions
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 09 Nov '12
by Bitbucket 09 Nov '12
09 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 09 Nov '12
by Bitbucket 09 Nov '12
09 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