1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/e0e98d8937f4/
changeset: e0e98d8937f4
user: dannon
date: 2013-03-12 20:39:52
summary: Remove unused import.
affected #: 1 file
diff -r a9cb31de456c2e9bcdb1022adc1fc972df7bc73a -r e0e98d8937f4c01d65208dc65af9fe33bae62e0d lib/galaxy/webapps/galaxy/controllers/tool_runner.py
--- a/lib/galaxy/webapps/galaxy/controllers/tool_runner.py
+++ b/lib/galaxy/webapps/galaxy/controllers/tool_runner.py
@@ -12,7 +12,6 @@
from galaxy.tools.parameters.basic import DataToolParameter, UnvalidatedValue
from galaxy.util.bunch import Bunch
from galaxy.util.hash_util import is_hashable
-from galaxy.util import biostar
from galaxy.web import error, url_for
from galaxy.web.base.controller import BaseUIController
from galaxy.web.form_builder import SelectField
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 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/a9cb31de456c/
changeset: a9cb31de456c
user: dan
date: 2013-03-12 20:37:05
summary: Do not display empty Sections in the workflow editor tool list.
affected #: 1 file
diff -r ad68e867b900920043d75e109e36e24f88d7a698 -r a9cb31de456c2e9bcdb1022adc1fc972df7bc73a templates/webapps/galaxy/workflow/editor.mako
--- a/templates/webapps/galaxy/workflow/editor.mako
+++ b/templates/webapps/galaxy/workflow/editor.mako
@@ -909,7 +909,7 @@
<div class="toolSectionWrapper">
%if key.startswith( 'tool' ):
${render_tool( val, False )}
- %elif key.startswith( 'section' ):
+ %elif key.startswith( 'section' ) and val.elems:
<% section = val %><div class="toolSectionTitle" id="title_${section.id}"><span>${section.name}</span>
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 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/ad68e867b900/
changeset: ad68e867b900
user: dan
date: 2013-03-12 20:32:32
summary: Add Data Manager Tools to the workflow editor tool list, when user is admin.
affected #: 1 file
diff -r a8caad109542661a7222c504a529ab5afbe303fb -r ad68e867b900920043d75e109e36e24f88d7a698 templates/webapps/galaxy/workflow/editor.mako
--- a/templates/webapps/galaxy/workflow/editor.mako
+++ b/templates/webapps/galaxy/workflow/editor.mako
@@ -930,6 +930,23 @@
%endif
</div>
%endfor
+ ## Data Manager Tools
+ %if trans.user_is_admin() and trans.app.data_managers.data_managers:
+ <div> </div>
+ <div class="toolSectionWrapper">
+ <div class="toolSectionTitle" id="title___DATA_MANAGER_TOOLS__">
+ <span>Data Manager Tools</span>
+ </div>
+ <div id="__DATA_MANAGER_TOOLS__" class="toolSectionBody">
+ <div class="toolSectionBg">
+ %for data_manager_id, data_manager_val in trans.app.data_managers.data_managers.items():
+ ${ render_tool( data_manager_val.tool, True ) }
+ %endfor
+ </div>
+ </div>
+ </div>
+ %endif
+ ## End Data Manager Tools
</div>
## Feedback when search returns no results.
<div id="search-no-results" style="display: none; padding-top: 5px">
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 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/a7475ad6ecfc/
changeset: a7475ad6ecfc
user: greg
date: 2013-03-12 20:02:03
summary: Handle exceptions when attempting to parse a datatypes_conf.xml file in a tool shed repository.
affected #: 1 file
diff -r 01e294adf7ac8715039d0baed1d44417e338c1a4 -r a7475ad6ecfc0f1fcdab3cfacce586a107aa8057 lib/tool_shed/util/shed_util_common.py
--- a/lib/tool_shed/util/shed_util_common.py
+++ b/lib/tool_shed/util/shed_util_common.py
@@ -1190,7 +1190,11 @@
return metadata_dict
def generate_datatypes_metadata( app, repository_clone_url, repository_files_dir, datatypes_config, metadata_dict ):
"""Update the received metadata_dict with information from the parsed datatypes_config."""
- tree = ElementTree.parse( datatypes_config )
+ try:
+ tree = ElementTree.parse( datatypes_config )
+ except Exception, e:
+ log.debug( "Exception attempting to parse %s: %s" % ( str( datatypes_config ), str( e ) ) )
+ return metadata_dict
root = tree.getroot()
ElementInclude.include( root )
repository_datatype_code_files = []
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/f6bc826d0ec2/
changeset: f6bc826d0ec2
user: carlfeberhard
date: 2013-03-12 18:28:58
summary: browser tests: better parsing of environ vars, prevent subprocess hanging, allow setting debug flags via environ var
affected #: 3 files
diff -r d8009117d5a0af02767c27162a2d5bd3befb9b5d -r f6bc826d0ec20da52746e0703774175e835aee94 test/casperjs/casperjs_runner.py
--- a/test/casperjs/casperjs_runner.py
+++ b/test/casperjs/casperjs_runner.py
@@ -47,6 +47,7 @@
_TODO = """
get data back from js scripts (uploaded files, etc.)
use returned json to output list of failed assertions if code == 2
+ better way to turn debugging on from the environment
"""
# ====================================================================
@@ -72,7 +73,7 @@
debug = False
# bit of a hack - this is the beginning of the last string when capserjs --verbose=true --logLevel=debug
# use this to get subprocess to stop waiting for output
- casper_done_str = '[info] [phantom] Done'
+ casper_done_str = '# Tests complete'
# convert js test results to unittest.TestResults
results_adapter = None #CasperJsonToUnittestResultsConverter()
@@ -140,8 +141,11 @@
command_line_list.append( '--return-json' )
# check flag to output (very) verbose debugging messages from casperjs and tests
- if self.debug:
+ #NOTE: this can be set in the class or by using the debug_these_tests flag in server_env
+ if( ( self.debug )
+ or ( rel_script_path in self.env.debug_these_tests ) ):
command_line_list.extend([ '--verbose=true', '--logLevel=debug' ])
+ #TODO: add capture, html output flags
#TODO: allow casperjs cli options ('--includes='), ?in args, kwargs?
command_line_list.extend( args )
@@ -297,16 +301,15 @@
class Test_01_User( CasperJSTestCase ):
"""TestCase that uses javascript and a headless browser to test dynamic pages.
"""
- #debug = True
def test_10_registration( self ):
"""User registration tests: register new user, logout, attempt bad registrations.
"""
# all keywords will be compiled into a single JSON obj and passed to the server
#self.run_js_script( 'registration-tests.js',
+ # testUser=test_user )
# # this causes a time out in history-panel-tests: why?
# # also: I can't seem to bump the timeout to an error (using a handler) - causes script to hang
# # removing for the sake of bbot
- # testUser=test_user )
self.run_js_script( 'registration-tests.js' )
#TODO:?? could theoretically do db cleanup, checks here with SQLALX
@@ -321,7 +324,6 @@
class Test_02_Tools( CasperJSTestCase ):
"""(Minimal) casperjs tests for tools.
"""
- #debug = True
def test_10_upload( self ):
"""Tests uploading files
"""
@@ -331,7 +333,6 @@
class Test_03_HistoryPanel( CasperJSTestCase ):
"""(Minimal) casperjs tests for tools.
"""
- #debug = True
def test_00_history_panel( self ):
"""Test history panel basics (controls, structure, refresh, history options menu, etc.).
"""
@@ -347,6 +348,8 @@
# ==================================================================== MAIN
if __name__ == '__main__':
log.setLevel( logging.DEBUG )
+ from server_env import log as server_env_log
+ server_env_log.setLevel( logging.DEBUG )
setup_module()
#TODO: server_env config doesn't work with unittest's lame main fn
unittest.main()
diff -r d8009117d5a0af02767c27162a2d5bd3befb9b5d -r f6bc826d0ec20da52746e0703774175e835aee94 test/casperjs/server_env.py
--- a/test/casperjs/server_env.py
+++ b/test/casperjs/server_env.py
@@ -22,6 +22,7 @@
ENV_FILE_DIR = 'GALAXY_TEST_FILE_DIR'
ENV_TOOL_SHED_TEST_FILE = 'GALAXY_TOOL_SHED_TEST_FILE'
ENV_SAVED_FILES_DIR = 'GALAXY_TEST_SAVE' # AKA: twilltestcase.keepOutdir
+ ENV_DEBUG_THESE_TESTS = 'GALAXY_DEBUG_THESE_TESTS'
DEFAULT_PROTOCOL = 'http'
DEFAULT_HOST = 'localhost'
@@ -33,8 +34,7 @@
does not yet exist.
"""
# singleton pattern
- if( ( not cls._instance )
- or ( config ) ):
+ if not cls._instance:
log.debug( 'creating singleton instance of "%s", config: %s', str( cls ), str( config ) )
cls._instance = cls( config )
return cls._instance
@@ -43,60 +43,93 @@
self.config = env_config_dict or {}
self.protocol = self._get_setting_from_config_or_env(
- 'protocol', self.ENV_PROTOCOL, self.DEFAULT_PROTOCOL )
+ 'protocol', self.ENV_PROTOCOL, self.DEFAULT_PROTOCOL ) #TODO: required=True )
self.host = self._get_setting_from_config_or_env(
- 'host', self.ENV_HOST, self.DEFAULT_HOST )
+ 'host', self.ENV_HOST, self.DEFAULT_HOST ) #TODO: required=True )
self.port = self._get_setting_from_config_or_env(
- 'port', self.ENV_PORT, self.DEFAULT_PORT )
+ 'port', self.ENV_PORT, self.DEFAULT_PORT ) #TODO: required=True )
+ #TODO: move these setters/init'rs into a parser dict
self.history_id = self._get_setting_from_config_or_env(
- 'history_id', self.ENV_HISTORY_ID, default=None )
+ 'history_id', self.ENV_HISTORY_ID )
self.file_dir = self._get_setting_from_config_or_env(
- 'file_dir', self.ENV_FILE_DIR, default=None )
-
+ 'file_dir', self.ENV_FILE_DIR )
self.tool_shed_test_file = self._get_setting_from_config_or_env(
- 'tool_shed_test_file', self.ENV_TOOL_SHED_TEST_FILE, default=None )
+ 'tool_shed_test_file', self.ENV_TOOL_SHED_TEST_FILE )
self.shed_tools_dict = self._get_shed_tools_dict()
+ # saved output goes here: test diffs, screenshots, html, etc.
self.saved_output_dir = self._get_setting_from_config_or_env(
- 'saved_output_dir', self.ENV_SAVED_FILES_DIR, default=None )
- self._init_saved_files_dir()
+ 'saved_output_dir', self.ENV_SAVED_FILES_DIR )
+ self._create_saved_output_dir()
- def _get_setting_from_config_or_env( self, config_name, env_name, default=False ):
+ # if a test script (e.g. 'history-panel-tests.js') is listed in this var,
+ # the test will output additional/full debug info
+ self.debug_these_tests = self._get_setting_from_config_or_env(
+ 'debug_these_tests', self.ENV_DEBUG_THESE_TESTS )
+ self._parse_debug_these_tests()
+
+ log.debug( 'server_env: %s', str( self.as_dict() ) )
+
+ def as_dict( self, attributes=None ):
+ if not attributes:
+ #TODO:?? raise to class scope?
+ attributes = [ 'protocol', 'host', 'port', 'history_id', 'file_dir',
+ 'tool_shed_test_file', 'shed_tools_dict', 'saved_output_dir', 'debug_these_tests' ]
+ this_dict = {}
+ for attr_name in attributes:
+ attr_val = getattr( self, attr_name )
+ this_dict[ attr_name ] = attr_val
+ return this_dict
+
+ def _get_setting_from_config_or_env( self, config_name, env_name, default=None ):
"""Try to get a setting from (in order):
TestEnvironment.config, the os env, or some default (if not False).
"""
- #TODO: if falsy value needed, use None - not ideal
- config = self.config.get( config_name, None )
- env = os.environ.get( env_name, None )
- if( ( not ( config or env ) )
- and ( default == False ) ):
- raise AttributeError( '"%s" was not set via config or %s or default' %( config_name, env_name ) )
- return config or env or default
+ config_val = self.config.get( config_name, None )
+ env_val = os.environ.get( env_name, None )
+ return config_val or env_val or default
def _get_shed_tools_dict( self ):
"""Read the shed tools from the tool shed test file if given,
otherwise an empty dict.
"""
+ shed_tools_dict = {}
if self.tool_shed_test_file:
- f = open( self.tool_shed_test_file, 'r' )
- text = f.read()
- f.close()
- return from_json_string( text )
- else:
- return {}
+ try:
+ f = open( self.tool_shed_test_file, 'r' )
+ text = f.read()
+ f.close()
+ shed_tools_dict = from_json_string( text )
+ except Exception, exc:
+ log.error( 'Error reading tool shed test file "%s": %s', self.tool_shed_test_file, exc, exc_info=True )
- def _init_saved_files_dir( self ):
+ return shed_tools_dict
+
+ def _create_saved_output_dir( self ):
"""Set up the desired directory to save test output.
"""
- if self.saved_output_dir > '':
+ if self.saved_output_dir:
try:
- os.makedirs( self.saved_output_dir )
+ if not os.path.exists( self.saved_output_dir ):
+ os.makedirs( self.saved_output_dir )
except Exception, exc:
log.error( 'unable to create saved files directory "%s": %s',
self.saved_output_dir, exc, exc_info=True )
self.saved_output_dir = None
+ def _parse_debug_these_tests( self, delim=',' ):
+ """Simple parser for the list of test scripts on which to set debug=True.
+ """
+ debug_list = []
+ if self.debug_these_tests:
+ try:
+ debug_list = self.debug_these_tests.split( delim )
+ except Exception, exc:
+ log.error( 'unable to parse debug_these_tests "%s": %s',
+ self.debug_these_tests, exc, exc_info=True )
+ self.debug_these_tests = debug_list
+
@property
def url( self ):
"""Builds and returns the url of the test server.
diff -r d8009117d5a0af02767c27162a2d5bd3befb9b5d -r f6bc826d0ec20da52746e0703774175e835aee94 test/casperjs/spaceghost.js
--- a/test/casperjs/spaceghost.js
+++ b/test/casperjs/spaceghost.js
@@ -432,7 +432,10 @@
var returnCode = ( this.test.testResults.failed )?( 2 ):( 0 );
// if --return-json is used: output json and exit
+ //NOTE: used by the test runner to gather JSON test info from stdout
if( this.options.returnJsonOnly ){
+ // echo a string to indicate that tests are complete (used in casperjs_runner.py to stop process)
+ this.echo( '# Tests complete' );
this.outputStateAsJson();
this.exit( returnCode );
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 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/d8009117d5a0/
changeset: d8009117d5a0
user: inithello
date: 2013-03-12 16:29:12
summary: Automated script to mark repositories as deprecated if no metadata records are associated with the repository, and the repository is older than the specified cutoff date.
affected #: 1 file
diff -r 2c56c1e49f288ed53234f485c0f19606d013dd1b -r d8009117d5a0af02767c27162a2d5bd3befb9b5d lib/tool_shed/scripts/deprecate_repositories_without_metadata.py
--- /dev/null
+++ b/lib/tool_shed/scripts/deprecate_repositories_without_metadata.py
@@ -0,0 +1,169 @@
+#!/usr/bin/env python
+
+import os, sys, logging, string, textwrap
+
+new_path = [ os.path.join( os.getcwd(), "lib" ) ]
+new_path.extend( sys.path[1:] )
+sys.path = new_path
+
+log = logging.getLogger()
+log.setLevel( 10 )
+log.addHandler( logging.StreamHandler( sys.stdout ) )
+
+from galaxy import eggs
+import pkg_resources
+pkg_resources.require( "SQLAlchemy >= 0.4" )
+
+import time, ConfigParser, shutil
+from datetime import datetime, timedelta
+from time import strftime
+from optparse import OptionParser
+
+from galaxy.tools import parameters
+from tool_shed.util.shed_util_common import url_join
+import galaxy.webapps.tool_shed.config as tool_shed_config
+import galaxy.webapps.tool_shed.model.mapping
+import sqlalchemy as sa
+from galaxy.model.orm import and_, not_, distinct
+from galaxy.util import send_mail as galaxy_send_mail
+
+assert sys.version_info[:2] >= ( 2, 4 )
+
+def build_citable_url( host, repository ):
+ return url_join( host, 'view', repository.user.username, repository.name )
+
+def main():
+ '''
+ Script to deprecate any repositories that are older than n days, and have been empty since creation.
+ '''
+ parser = OptionParser()
+ parser.add_option( "-d", "--days", dest="days", action="store", type="int", help="number of days (14)", default=14 )
+ parser.add_option( "-i", "--info_only", action="store_true", dest="info_only", help="info about the requested action", default=False )
+ parser.add_option( "-v", "--verbose", action="store_true", dest="verbose", help="verbose mode, print the name of each repository", default=False )
+ ( options, args ) = parser.parse_args()
+ ini_file = args[0]
+ config_parser = ConfigParser.ConfigParser( {'here':os.getcwd()} )
+ config_parser.read( ini_file )
+ config_dict = {}
+ for key, value in config_parser.items( "app:main" ):
+ config_dict[key] = value
+ config = tool_shed_config.Configuration( **config_dict )
+
+ app = DeprecateRepositoriesApplication( config )
+ cutoff_time = datetime.utcnow() - timedelta( days=options.days )
+ now = strftime( "%Y-%m-%d %H:%M:%S" )
+ print "\n####################################################################################"
+ print "# %s - Handling stuff older than %i days" % ( now, options.days )
+
+ if options.info_only:
+ print "# Displaying info only ( --info_only )"
+
+ deprecate_repositories( app, cutoff_time, days=options.days, info_only=options.info_only, verbose=options.verbose )
+
+def send_mail_to_owner( app, name, owner, email, repositories_deprecated, days=14 ):
+ '''
+ Sends an email to the owner of the provided repository.
+ '''
+ smtp_server = app.config.get( 'smtp_server', None )
+ from_address = app.config.get( 'email_from', None )
+ # Since there is no way to programmatically determine the URL for the tool shed from the .ini file, this method requires that
+ # an environment variable named TOOL_SHED_CANONICAL_URL be set, pointing to the tool shed that is being checked.
+ url = os.environ.get( 'TOOL_SHED_CANONICAL_URL', None )
+ if None in [ smtp_server, from_address ]:
+ print '# Mail not configured, not sending email to repository owner.'
+ return
+ elif url is None:
+ print '# Environment variable TOOL_SHED_CANONICAL_URL not set, not sending email to repository owner.'
+ return
+ subject = "Regarding your tool shed repositories at %s" % url
+ message_body_template = 'The tool shed automated repository checker has discovered that one or more of your repositories hosted ' + \
+ 'at this tool shed url ${url} have remained empty for over ${days} days, so they have been marked as deprecated. If you have plans ' + \
+ 'for these repositories, you can mark them as un-deprecated at any time.'
+ message_template = string.Template( message_body_template )
+ body = '\n'.join( textwrap.wrap( message_template.safe_substitute( days=days, url=url ), width=95 ) )
+ body += '\n\n'
+ body += 'Repositories that were deprecated:\n'
+ body += '\n'.join( [ build_citable_url( url, repository ) for repository in repositories_deprecated ] )
+ try:
+ galaxy_send_mail( from_address, repository.user.email, subject, body, app.config )
+ print "# An email has been sent to %s, the owner of %s." % ( repository.user.username, ', '.join( [ repository.name for repository in repositories_deprecated ] ) )
+ return True
+ except Exception, e:
+ print "# An error occurred attempting to send email: %s" % str( e )
+ return False
+
+def deprecate_repositories( app, cutoff_time, days=14, info_only=False, verbose=False ):
+ # This method will get a list of repositories that were created on or before cutoff_time, but have never
+ # had any metadata records associated with them. Then it will iterate through that list and deprecate the
+ # repositories, sending an email to each repository owner.
+ dataset_count = 0
+ disk_space = 0
+ start = time.time()
+ repository_ids_to_not_check = []
+ # Get a unique list of repository ids from the repository_metadata table. Any repository ID found in this table is not
+ # empty, and will not be checked.
+ metadata_records = sa.select( [ distinct( app.model.RepositoryMetadata.table.c.repository_id ) ],
+ from_obj=app.model.RepositoryMetadata.table ) \
+ .execute()
+ for metadata_record in metadata_records:
+ repository_ids_to_not_check.append( metadata_record.repository_id )
+ # Get the repositories that are A) not present in the above list, and b) older than the specified time.
+ # This will yield a list of repositories that have been created more than n days ago, but never populated.
+ repository_query = sa.select( [ app.model.Repository.table.c.id ],
+ whereclause = and_( app.model.Repository.table.c.create_time < cutoff_time,
+ app.model.Repository.table.c.deprecated == False,
+ app.model.Repository.table.c.deleted == False,
+ not_( app.model.Repository.table.c.id.in_( repository_ids_to_not_check ) ) ),
+ from_obj = [ app.model.Repository.table ] )
+ query_result = repository_query.execute()
+ repositories = []
+ repositories_by_owner = {}
+ repository_ids = [ row.id for row in query_result ]
+ # Iterate through the list of repository ids for empty repositories and deprecate them unless info_only is set.
+ for repository_id in repository_ids:
+ repository = app.sa_session.query( app.model.Repository ) \
+ .filter( app.model.Repository.table.c.id == repository_id ) \
+ .one()
+ owner = repository.user
+ if info_only:
+ print '# Repository %s owned by %s would have been deprecated, but info_only was set.' % ( repository.name, repository.user.username )
+ else:
+ if verbose:
+ print '# Deprecating repository %s owned by %s.' % ( repository.name, owner.username )
+ if owner.username not in repositories_by_owner:
+ repositories_by_owner[ owner.username ] = dict( owner=owner, repositories=[] )
+ repositories_by_owner[ owner.username ][ 'repositories' ].append( repository )
+ repositories.append( repository )
+ # Send an email to each repository owner, listing the repositories that were deprecated.
+ for repository_owner in repositories_by_owner:
+ for repository in repositories_by_owner[ repository_owner ][ 'repositories' ]:
+ repository.deprecated = True
+ app.sa_session.add( repository )
+ app.sa_session.flush()
+ owner = repositories_by_owner[ repository_owner ][ 'owner' ]
+ send_mail_to_owner( app, repository.name, owner.username, owner.email, repositories_by_owner[ repository_owner ][ 'repositories' ], days )
+ stop = time.time()
+ print '# Deprecated %d repositories.' % len( repositories )
+ print "# Elapsed time: ", stop - start
+ print "####################################################################################"
+
+class DeprecateRepositoriesApplication( object ):
+ """Encapsulates the state of a Universe application"""
+ def __init__( self, config ):
+ if config.database_connection is False:
+ config.database_connection = "sqlite:///%s?isolation_level=IMMEDIATE" % config.database
+ # Setup the database engine and ORM
+ self.model = galaxy.webapps.tool_shed.model.mapping.init( config.file_path, config.database_connection, engine_options={}, create_tables=False )
+ self.config = config
+ @property
+ def sa_session( self ):
+ """
+ Returns a SQLAlchemy session -- currently just gets the current
+ session from the threadlocal session context, but this is provided
+ to allow migration toward a more SQLAlchemy 0.4 style of use.
+ """
+ return self.model.context.current
+ def shutdown( self ):
+ pass
+
+if __name__ == "__main__": main()
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/86411cd12e2f/
changeset: 86411cd12e2f
user: carlfeberhard
date: 2013-03-12 15:42:41
summary: history panel: have 'new' state HDAs display their body properly
affected #: 3 files
diff -r 6ea891cafbbb7f9435887ca86b0823e1b8709882 -r 86411cd12e2f591f6f6f7502a8481d832bcf56c0 static/scripts/mvc/dataset/hda-base.js
--- a/static/scripts/mvc/dataset/hda-base.js
+++ b/static/scripts/mvc/dataset/hda-base.js
@@ -358,6 +358,7 @@
//TODO: not a fan of this dispatch
switch( this.model.get( 'state' ) ){
case HistoryDatasetAssociation.STATES.NEW :
+ this._render_body_new( body );
break;
case HistoryDatasetAssociation.STATES.NOT_VIEWABLE :
this._render_body_not_viewable( body );
@@ -400,12 +401,21 @@
this._setUpBehaviors( body );
},
+ /** Render a new dataset - this should be a transient state that's never shown
+ * in case it does tho, we'll make sure there's some information here
+ * @param {jQuery} parent DOM to which to append this body
+ */
+ _render_body_new : function( parent ){
+ var newMsg = 'This is a new dataset and not all of its data are available yet';
+ parent.append( $( '<div>' + _l( newMsg ) + '</div>' ) );
+ },
+
/** Render inaccessible, not-owned by curr user.
* @param {jQuery} parent DOM to which to append this body
*/
_render_body_not_viewable : function( parent ){
//TODO: revisit - still showing display, edit, delete (as common) - that CAN'T be right
- parent.append( $( '<div>' + _l( 'You do not have permission to view dataset' ) + '.</div>' ) );
+ parent.append( $( '<div>' + _l( 'You do not have permission to view dataset' ) + '</div>' ) );
},
/** Render an HDA still being uploaded.
@@ -419,7 +429,7 @@
* @param {jQuery} parent DOM to which to append this body
*/
_render_body_queued : function( parent ){
- parent.append( $( '<div>' + _l( 'Job is waiting to run' ) + '.</div>' ) );
+ parent.append( $( '<div>' + _l( 'Job is waiting to run' ) + '</div>' ) );
parent.append( this._render_primaryActionButtons( this.defaultPrimaryActionButtonRenderers ));
},
@@ -427,7 +437,7 @@
* @param {jQuery} parent DOM to which to append this body
*/
_render_body_paused: function( parent ){
- parent.append( $( '<div>' + _l( 'Job is paused. Use the history menu to resume' ) + '.</div>' ) );
+ parent.append( $( '<div>' + _l( 'Job is paused. Use the history menu to resume' ) + '</div>' ) );
parent.append( this._render_primaryActionButtons( this.defaultPrimaryActionButtonRenderers ));
},
@@ -435,7 +445,7 @@
* @param {jQuery} parent DOM to which to append this body
*/
_render_body_running : function( parent ){
- parent.append( '<div>' + _l( 'Job is currently running' ) + '.</div>' );
+ parent.append( '<div>' + _l( 'Job is currently running' ) + '</div>' );
parent.append( this._render_primaryActionButtons( this.defaultPrimaryActionButtonRenderers ));
},
diff -r 6ea891cafbbb7f9435887ca86b0823e1b8709882 -r 86411cd12e2f591f6f6f7502a8481d832bcf56c0 static/style/base.less
--- a/static/style/base.less
+++ b/static/style/base.less
@@ -1650,6 +1650,15 @@
}
}
+div.historyItem-new {
+ .state-icon {
+ .fa-icon();
+ &:before {
+ content: "\f071";
+ }
+ }
+}
+
// Special case for showing the spinner but not changing the background
div.historyItemTitleBar.spinner .state-icon {
background: url(data_running.gif) 0 1px no-repeat !important;
diff -r 6ea891cafbbb7f9435887ca86b0823e1b8709882 -r 86411cd12e2f591f6f6f7502a8481d832bcf56c0 static/style/blue/base.css
--- a/static/style/blue/base.css
+++ b/static/style/blue/base.css
@@ -1133,6 +1133,7 @@
div.historyItem-queued{background:#eeeeee;}
div.historyItem-noPermission{filter:alpha(opacity=60);-moz-opacity:.60;opacity:.60;}
div.historyItem-paused{background:#d9edf7;}div.historyItem-paused .state-icon{font-family:FontAwesome;font-size:1.1666666666666667em;background-image:none !important;background-position:0% 0%;background-repeat:repeat;}div.historyItem-paused .state-icon:before{content:"\f04c";}
+div.historyItem-new .state-icon{font-family:FontAwesome;font-size:1.1666666666666667em;background-image:none !important;background-position:0% 0%;background-repeat:repeat;}div.historyItem-new .state-icon:before{content:"\f071";}
div.historyItemTitleBar.spinner .state-icon{background:url(data_running.gif) 0 1px no-repeat !important;}
div.historyItemButtons{float:right;}
div.historyItemBody div{padding-top:2px;}
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.