merging heads

This commit is contained in:
Nate Coraor
2008-11-20 16:17:22 -05:00
59 changed files with 1549 additions and 1256 deletions
+3 -1
View File
@@ -38,10 +38,12 @@ class Configuration( object ):
self.id_secret = kwargs.get( "id_secret", "USING THE DEFAULT IS NOT SECURE!" )
self.use_remote_user = string_as_bool( kwargs.get( "use_remote_user", "False" ) )
self.remote_user_maildomain = kwargs.get( "remote_user_maildomain", None )
self.require_login = string_as_bool( kwargs.get( "require_login", "False" ) )
self.allow_user_creation = string_as_bool( kwargs.get( "allow_user_creation", "True" ) )
self.template_path = resolve_path( kwargs.get( "template_path", "templates" ), self.root )
self.template_cache = resolve_path( kwargs.get( "template_cache_path", "database/compiled_templates" ), self.root )
self.local_job_queue_workers = int( kwargs.get( "local_job_queue_workers", "5" ) )
self.cluster_job_queue_workers = int( kwargs.get( "cluster_job_queue_workers", "5" ) )
self.cluster_job_queue_workers = int( kwargs.get( "cluster_job_queue_workers", "3" ) )
self.job_scheduler_policy = kwargs.get("job_scheduler_policy", "FIFO")
self.job_queue_cleanup_interval = int( kwargs.get("job_queue_cleanup_interval", "5") )
self.job_working_directory = resolve_path( kwargs.get( "job_working_directory", "database/job_working_directory" ), self.root )
+7 -1
View File
@@ -391,7 +391,10 @@ assign_mapper( context, HistoryDatasetAssociation, HistoryDatasetAssociation.tab
children=relation(
HistoryDatasetAssociation,
primaryjoin=( HistoryDatasetAssociation.table.c.parent_id == HistoryDatasetAssociation.table.c.id ),
backref=backref( "parent", primaryjoin=( HistoryDatasetAssociation.table.c.parent_id == HistoryDatasetAssociation.table.c.id ), remote_side=[HistoryDatasetAssociation.table.c.id], uselist=False ) )
backref=backref( "parent", primaryjoin=( HistoryDatasetAssociation.table.c.parent_id == HistoryDatasetAssociation.table.c.id ), remote_side=[HistoryDatasetAssociation.table.c.id], uselist=False ) ),
visible_children=relation(
HistoryDatasetAssociation,
primaryjoin=( ( HistoryDatasetAssociation.table.c.parent_id == HistoryDatasetAssociation.table.c.id ) & ( HistoryDatasetAssociation.table.c.visible == True ) ) )
) )
assign_mapper( context, Dataset, Dataset.table,
@@ -531,6 +534,9 @@ assign_mapper( context, LibraryFolderDatasetAssociation, LibraryFolderDatasetAss
LibraryFolderDatasetAssociation,
primaryjoin=( LibraryFolderDatasetAssociation.table.c.parent_id == LibraryFolderDatasetAssociation.table.c.id ),
backref=backref( "parent", primaryjoin=( LibraryFolderDatasetAssociation.table.c.parent_id == LibraryFolderDatasetAssociation.table.c.id ), remote_side=[LibraryFolderDatasetAssociation.table.c.id] ) ),
visible_children=relation(
LibraryFolderDatasetAssociation,
primaryjoin=( ( LibraryFolderDatasetAssociation.table.c.parent_id == LibraryFolderDatasetAssociation.table.c.id ) & ( LibraryFolderDatasetAssociation.table.c.visible == True ) ) ),
tags=relation(
LibraryTagDatasetAssociation,
primaryjoin=( LibraryFolderDatasetAssociation.table.c.id == LibraryTagDatasetAssociation.table.c.dataset_id ),
+12
View File
@@ -246,6 +246,18 @@ def string_as_bool( string ):
else:
return False
def listify( item ):
"""
Make a single item a single item list, or return a list if passed a
list. Passing a None returns an empty list.
"""
if item is None:
return []
elif isinstance( item, list ):
return item
else:
return [ item ]
def commaify(amount):
orig = amount
new = re.sub("^(-?\d+)(\d{3})", '\g<1>,\g<2>', amount)
+1 -1
View File
@@ -2,5 +2,5 @@
The Galaxy web application.
"""
from framework import expose, json, require_login, url_for, error, form, FormBuilder
from framework import expose, json, require_login, require_admin, url_for, error, form, FormBuilder
File diff suppressed because it is too large Load Diff
+6 -1
View File
@@ -25,7 +25,10 @@ class RootController( BaseController ):
@web.expose
def tool_menu( self, trans ):
return trans.fill_template('/root/tool_menu.mako', toolbox=self.get_toolbox() )
if trans.app.config.require_login and not trans.user:
return trans.fill_template( '/no_access.mako', message = 'Please log in to access Galaxy tools.' )
else:
return trans.fill_template('/root/tool_menu.mako', toolbox=self.get_toolbox() )
@web.expose
def tool_help( self, trans, id ):
@@ -51,6 +54,8 @@ class RootController( BaseController ):
NOTE: No longer accepts "id" or "template" options for security reasons.
"""
history = trans.get_history()
if trans.app.config.require_login and not trans.user:
return trans.fill_template( '/no_access.mako', message = 'Please log in to access Galaxy histories.' )
if as_xml:
trans.response.set_content_type('text/xml')
return trans.fill_template_mako( "root/history_as_xml.mako", history=history )
+57 -18
View File
@@ -9,6 +9,17 @@ from random import choice
log = logging.getLogger( __name__ )
require_login_template = """
<h1>Welcome to Galaxy</h1>
<p>
This installation of Galaxy has been configured such that only users who are logged in may use it.%s
</p>
<p/>
"""
require_login_nocreation_template = require_login_template % ""
require_login_creation_template = require_login_template % " If you don't already have an account, <a href='%s'>you may create one</a>."
class User( BaseController ):
@web.expose
@@ -75,6 +86,10 @@ class User( BaseController ):
m0 = trans.app.memory_usage.memory()
email_error = password_error = None
# Attempt login
if trans.app.config.require_login:
refresh_frames = [ 'masthead', 'history', 'tools' ]
else:
refresh_frames = [ 'masthead', 'history' ]
if email or password:
user = trans.app.model.User.filter_by( email=email ).first()
if not user:
@@ -87,33 +102,50 @@ class User( BaseController ):
else:
trans.handle_user_login( user )
trans.log_event( "User logged in" )
return trans.show_ok_message( "Now logged in as " + user.email, refresh_frames=['masthead', 'history'] )
return trans.show_ok_message( "Now logged in as " + user.email, refresh_frames=refresh_frames )
if trans.app.memory_usage:
m1 = trans.app.memory_usage.memory( m0, pretty=True )
log.info( "End of user/login, memory used increased by %s" % m1 )
return trans.show_form(
web.FormBuilder( web.url_for(), "Login", submit_text="Login" )
.add_text( "email", "Email address", value=email, error=email_error )
form = web.FormBuilder( web.url_for(), "Login", submit_text="Login" ) \
.add_text( "email", "Email address", value=email, error=email_error ) \
.add_password( "password", "Password", value='', error=password_error,
help="<a href='%s'>Forgot password? Reset here</a>" % web.url_for( action='reset_password' ) ) )
help="<a href='%s'>Forgot password? Reset here</a>" % web.url_for( action='reset_password' ) )
if trans.app.config.require_login:
if trans.app.config.allow_user_creation:
return trans.show_form( form, header = require_login_creation_template % web.url_for( action = 'create' ) )
else:
return trans.show_form( form, header = require_login_nocreation_template )
else:
return trans.show_form( form )
@web.expose
def logout( self, trans ):
if trans.app.memory_usage:
# Keep track of memory usage
m0 = trans.app.memory_usage.memory()
if trans.app.config.require_login:
refresh_frames = [ 'masthead', 'history', 'tools' ]
else:
refresh_frames = [ 'masthead', 'history' ]
# Since logging an event requires a session, we'll log prior to ending the session
trans.log_event( "User logged out" )
trans.handle_user_logout()
if trans.app.memory_usage:
m1 = trans.app.memory_usage.memory( m0, pretty=True )
log.info( "End of user/logout, memory used increased by %s" % m1 )
return trans.show_ok_message( "You are no longer logged in", refresh_frames=['masthead', 'history'] )
return trans.show_ok_message( "You are no longer logged in.", refresh_frames=refresh_frames )
@web.expose
def create( self, trans, email='', password='', confirm='',subscribe=False ):
def create( self, trans, email='', password='', confirm='', subscribe=False ):
if trans.app.memory_usage:
# Keep track of memory usage
m0 = trans.app.memory_usage.memory()
if trans.app.config.require_login:
refresh_frames = [ 'masthead', 'history', 'tools' ]
else:
refresh_frames = [ 'masthead', 'history' ]
if not trans.app.config.allow_user_creation and not trans.user_is_admin():
return trans.show_error_message( 'User registration is disabled. Please contact your local Galaxy administrator for an account.' )
email_error = password_error = confirm_error = None
if email:
if len( email ) == 0 or "@" not in email or "." not in email:
@@ -130,29 +162,36 @@ class User( BaseController ):
user = trans.app.model.User( email=email )
user.set_password_cleartext( password )
user.flush()
trans.app.security_agent.setup_new_user( user )
trans.handle_user_login( user )
trans.log_event( "User created a new account" )
trans.log_event( "User logged in" )
if trans.user_is_admin():
trans.app.security_agent.create_private_user_role( user )
trans.app.security_agent.user_set_default_permissions( user )
trans.log_event( "Admin created a new account" )
msg = 'Created account ' + user.email
else:
trans.app.security_agent.setup_new_user( user )
trans.handle_user_login( user )
trans.log_event( "User created a new account" )
trans.log_event( "User logged in" )
msg = 'Now logged in as ' + user.email
#subscribe user to email list
if subscribe:
mail = os.popen("%s -t" % trans.app.config.sendmail_path, 'w')
mail.write("To: %s\nFrom: %s\nSubject: Join Mailing List\n\nJoin Mailing list." % (trans.app.config.mailing_join_addr,email) )
if mail.close():
return trans.show_warn_message( "Now logged in as " + user.email+". However, subscribing to the mailing list has failed.", refresh_frames=['masthead', 'history'] )
return trans.show_warn_message( msg + ". However, subscribing to the mailing list has failed.", refresh_frames=refresh_frames )
if trans.app.memory_usage:
m1 = trans.app.memory_usage.memory( m0, pretty=True )
log.info( "End of user/create, memory used increased by %s" % m1 )
return trans.show_ok_message( "Now logged in as " + user.email, refresh_frames=['masthead', 'history'] )
return trans.show_ok_message( msg, refresh_frames=refresh_frames )
return trans.show_form(
web.FormBuilder( web.url_for(), "Create account", submit_text="Create" )
.add_text( "email", "Email address", value=email, error=email_error )
.add_password( "password", "Password", value='', error=password_error )
.add_password( "confirm", "Confirm password", value='', error=confirm_error )
.add_password( "password", "Password", value='', error=password_error )
.add_password( "confirm", "Confirm password", value='', error=confirm_error )
.add_input( "checkbox","Subscribe To Mailing List","subscribe", value='subscribe' ) )
@web.expose
def reset_password(self, trans, email=None, **kwd):
def reset_password( self, trans, email=None, **kwd ):
error = ''
reset_user = trans.app.model.User.filter_by( email=email ).first()
user = trans.get_user()
@@ -167,11 +206,11 @@ class User( BaseController ):
mail = os.popen("%s -t" % trans.app.config.sendmail_path, 'w')
mail.write("To: %s\nFrom: no-reply@%s\nSubject: Galaxy Password Reset\n\nYour password has been reset to \"%s\" (no quotes)." % (email, trans.request.remote_addr, new_pass) )
if mail.close():
return trans.show_ok_message( "Failed to reset password! If this problem persist, submit a bug report.")
return trans.show_error_message( 'Failed to reset password. If this problem persists, please submit a bug report.' )
reset_user.set_password_cleartext( new_pass )
reset_user.flush()
trans.log_event( "User reset password: %s" % email )
return trans.show_ok_message( "Password has been reset and emailed to: %s." % email)
return trans.show_ok_message( "Password has been reset and emailed to: %s. <a href='%s'>Click here</a> to return to the login form." % ( email, web.url_for( action='login' ) ) )
elif email != None:
error = "The specified user does not exist"
return trans.show_form(
+36 -3
View File
@@ -60,6 +60,19 @@ def require_login( verb="perform this action" ):
return decorator
return argcatcher
def require_admin( func ):
def decorator( self, trans, *args, **kwargs ):
admin_users = trans.app.config.get( "admin_users", "" ).split( "," )
if not admin_users:
return trans.show_error_message( "You must be an administrator to access this feature, and no administrators are set in the Galaxy configuration." )
user = trans.get_user()
if not user:
return trans.show_error_message( "You must be an administrator to access this feature, and currently you are not logged in." )
if not user.email in admin_users:
return trans.show_error_message( "You must be an administrator to access this feature." )
return func( self, trans, *args, **kwargs )
return decorator
NOT_SET = object()
class MessageException( Exception ):
@@ -117,6 +130,8 @@ class UniverseWebTransaction( base.DefaultWebTransaction ):
self.workflow_building_mode = False
# Always have a valid galaxy session
self.__ensure_valid_session()
if self.app.config.require_login:
self.__ensure_logged_in_user( environ )
@property
def sa_session( self ):
"""
@@ -240,6 +255,18 @@ class UniverseWebTransaction( base.DefaultWebTransaction ):
if prev_galaxy_session:
objects_to_flush.append( prev_galaxy_session )
sa_session.flush( objects_to_flush )
def __ensure_logged_in_user( self, environ ):
allowed_paths = (
url_for( controller='root', action='index' ),
url_for( controller='root', action='tool_menu' ),
url_for( controller='root', action='masthead' ),
url_for( controller='root', action='history' ),
url_for( controller='user', action='login' ),
url_for( controller='user', action='create' ),
url_for( controller='user', action='reset_password' ),
)
if self.galaxy_session.user is None and environ['PATH_INFO'] not in allowed_paths:
self.response.send_redirect( url_for( controller='root', action='index' ) )
def __create_new_session( self, prev_galaxy_session=None, user_for_new_session=None ):
"""
Create a new GalaxySession for this request, possibly with a connection
@@ -369,7 +396,13 @@ class UniverseWebTransaction( base.DefaultWebTransaction ):
self.galaxy_session.user = user
self.sa_session.flush( [ self.galaxy_session ] )
user = property( get_user, set_user )
def user_is_admin( self ):
admin_users = self.app.config.get( "admin_users", "" ).split( "," )
if self.user and admin_users and self.user.email in admin_users:
return True
return False
def get_toolbox(self):
"""Returns the application toolbox"""
return self.app.toolbox
@@ -415,12 +448,12 @@ class UniverseWebTransaction( base.DefaultWebTransaction ):
Convenience method for displaying an warn message. See `show_message`.
"""
return self.show_message( message, 'warning', refresh_frames )
def show_form( self, form ):
def show_form( self, form, header=None ):
"""
Convenience method for displaying a simple page with a single HTML
form.
"""
return self.fill_template( "form.mako", form=form )
return self.fill_template( "form.mako", form=form, header=header )
def fill_template(self, filename, **kwargs):
"""
Fill in a template, putting any keyword arguments on the context.
+10 -12
View File
@@ -84,15 +84,19 @@ class WebApplication( object ):
friendly objects, finds the appropriate method to handle the request
and calls it.
"""
# Setup the transaction
trans = self.transaction_factory( environ )
# Map url using routes
path_info = trans.request.path_info
path_info = environ.get( 'PATH_INFO', '' )
map = self.mapper.match( path_info )
if map == None:
raise httpexceptions.HTTPNotFound( "No route for " + path_info )
# Save the complete mapper dict, we pop things off so they don't get passed down
raw_map = dict( map )
# Setup routes
rc = routes.request_config()
rc.mapper = self.mapper
rc.mapper_dict = map
rc.environ = environ
# Setup the transaction
trans = self.transaction_factory( environ )
rc.redirect = trans.response.send_redirect
# Get the controller class
controller_name = map.pop( 'controller', None )
controller = self.controllers.get( controller_name, None )
@@ -111,12 +115,6 @@ class WebApplication( object ):
# Is the method callable
if not callable( method ):
raise httpexceptions.HTTPNotFound( "Action not callable for " + path_info )
# Setup routes
rc = routes.request_config()
rc.mapper = self.mapper
rc.mapper_dict = raw_map
rc.environ = environ
rc.redirect = trans.response.send_redirect
# Combine mapper args and query string / form args and call
kwargs = trans.request.params.mixed()
kwargs.update( map )
@@ -336,4 +334,4 @@ def flatten( seq ):
for y in flatten( x, encoding ):
yield y
else:
yield x
yield x
+13 -3
View File
@@ -79,7 +79,12 @@ function make_left_panel( panel_el, center_el, border_el ) {
}
}
).find( "div" ).show();;
var force_panel = function( op ) {
if ( ( hidden && op == 'show' ) || ( ! hidden && op == 'hide' ) ) {
toggle();
}
}
return { force_panel: force_panel };
};
function make_right_panel( panel_el, center_el, border_el ) {
@@ -173,7 +178,12 @@ function make_right_panel( panel_el, center_el, border_el ) {
}
}
).find( "div" ).show();
return { handle_minwidth_hint: handle_minwidth_hint };
var force_panel = function( op ) {
if ( ( hidden && op == 'show' ) || ( ! hidden && op == 'hide' ) ) {
toggle();
}
}
return { handle_minwidth_hint: handle_minwidth_hint, force_panel: force_panel };
};
// Modal dialog boxes
@@ -234,4 +244,4 @@ function make_popupmenu( button_element, options ) {
} );
};
$( button_element ).click( click );
};
};
+1 -1
View File
@@ -1 +1 @@
var hidden_width=7;var border_tweak=9;var jq=jQuery;function ensure_dd_helper(){if(jq("#DD-helper").length==0){$("<div id='DD-helper'/>").css({background:"white",opacity:0,zIndex:9000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function make_left_panel(E,A,B){var D=false;var C=null;resize=function(F){var G=F;if(F<0){F=0}jq(E).css("width",F);jq(B).css("left",G);jq(A).css("left",F+7);if(document.recalc){document.recalc()}};toggle=function(){if(D){jq(B).removeClass("hover");jq(B).animate({left:C},"fast");jq(E).css("left",-C).show().animate({left:0},"fast",function(){resize(C);jq(B).removeClass("hidden")});D=false}else{C=jq(B).position().left;jq(A).css("left",hidden_width);if(document.recalc){document.recalc()}jq(B).removeClass("hover");jq(E).animate({left:-C},"fast");jq(B).animate({left:-1},"fast",function(){jq(this).addClass("hidden")});D=true}};jq(B).hover(function(){jq(this).addClass("hover")},function(){jq(this).removeClass("hover")}).draggable({start:function(F,G){jq("#DD-helper").show()},stop:function(F,G){jq("#DD-helper").hide();return false},drag:function(F,G){x=G.position.left;x=Math.min(400,Math.max(100,x));if(D){jq(E).css("left",0);jq(B).removeClass("hidden");D=false}resize(x);G.position.left=x;G.position.top=$(this).data("draggable").originalPosition.top},click:function(){toggle()}}).find("div").show()}function make_right_panel(A,E,G){var I=false;var F=false;var C=null;var D=function(J){jq(A).css("width",J);jq(E).css("right",J+9);jq(G).css("right",J).css("left","");if(document.recalc){document.recalc()}};var H=function(){if(I){jq(G).removeClass("hover");jq(G).animate({right:C},"fast");jq(A).css("right",-C).show().animate({right:0},"fast",function(){D(C);jq(G).removeClass("hidden")});I=false}else{C=jq(document).width()-jq(G).position().left-border_tweak;jq(E).css("right",hidden_width+1);if(document.recalc){document.recalc()}jq(G).removeClass("hover");jq(A).animate({right:-C},"fast");jq(G).animate({right:-1},"fast",function(){jq(this).addClass("hidden")});I=true}F=false};var B=function(J){var K=jq(E).width()-(I?C:0);if(K<J){if(!I){H();F=true}}else{if(F){H();F=false}}};jq(G).hover(function(){jq(this).addClass("hover")},function(){jq(this).removeClass("hover")}).draggable({start:function(J,K){jq("#DD-helper").show()},stop:function(J,K){x=K.position.left;w=jq(window).width();x=Math.min(w-100,x);x=Math.max(w-400,x);D(w-x-border_tweak);jq("#DD-helper").hide();return false},click:function(){H()},drag:function(J,K){x=K.position.left;w=jq(window).width();x=Math.min(w-100,x);x=Math.max(w-400,x);if(I){jq(A).css("right",0);jq(G).removeClass("hidden");I=false}D(w-x-border_tweak);K.position.left=x;K.position.top=$(this).data("draggable").originalPosition.top}}).find("div").show();return{handle_minwidth_hint:B}}function hide_modal(){$(".dialog-box-container").fadeOut(function(){$("#overlay").hide()})}function show_modal(E,B,D,C){$(".dialog-box").find(".title").html(E);var A=$(".dialog-box").find(".buttons").html("");if(D){$.each(D,function(F,G){A.append($("<button/>").text(F).click(G));A.append(" ")});A.show()}else{A.hide()}var A=$(".dialog-box").find(".extra_buttons").html("");if(C){$.each(C,function(F,G){A.append($("<button/>").text(F).click(G));A.append(" ")});A.show()}else{A.hide()}if(B=="progress"){B=$("<img src='../images/yui/rel_interstitial_loading.gif')' />")}$(".dialog-box").find(".body").html(B);if(!$(".dialog-box-container").is(":visible")){$("#overlay").show();$(".dialog-box-container").fadeIn()}}function make_popupmenu(D,B){var A=$("<div class='popupmenu'><div class='popupmenu-top'><div class='popupmenu-top-inner'/></div></div>").appendTo("body");$.each(B,function(G,F){$("<div class='popupmenu-item' />").html(G).click(F).appendTo(A)});var C=function(){$(A).unbind().hide();$("#popup-helper").unbind().hide()};var E=function(){var F=$(D).offset();$("#popup-helper").mousedown(C).show();$(A).click(C).css({top:-1000}).show().css({top:F.top+$(D).height()+9,left:F.left+$(D).width()-$(A).width()})};$(D).click(E)};
var hidden_width=7;var border_tweak=9;var jq=jQuery;function ensure_dd_helper(){if(jq("#DD-helper").length==0){$("<div id='DD-helper'/>").css({background:"white",opacity:0,zIndex:9000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function make_left_panel(F,B,C){var E=false;var D=null;resize=function(G){var H=G;if(G<0){G=0}jq(F).css("width",G);jq(C).css("left",H);jq(B).css("left",G+7);if(document.recalc){document.recalc()}};toggle=function(){if(E){jq(C).removeClass("hover");jq(C).animate({left:D},"fast");jq(F).css("left",-D).show().animate({left:0},"fast",function(){resize(D);jq(C).removeClass("hidden")});E=false}else{D=jq(C).position().left;jq(B).css("left",hidden_width);if(document.recalc){document.recalc()}jq(C).removeClass("hover");jq(F).animate({left:-D},"fast");jq(C).animate({left:-1},"fast",function(){jq(this).addClass("hidden")});E=true}};jq(C).hover(function(){jq(this).addClass("hover")},function(){jq(this).removeClass("hover")}).draggable({start:function(G,H){jq("#DD-helper").show()},stop:function(G,H){jq("#DD-helper").hide();return false},drag:function(G,H){x=H.position.left;x=Math.min(400,Math.max(100,x));if(E){jq(F).css("left",0);jq(C).removeClass("hidden");E=false}resize(x);H.position.left=x;H.position.top=$(this).data("draggable").originalPosition.top},click:function(){toggle()}}).find("div").show();var A=function(G){if((E&&G=="show")||(!E&&G=="hide")){toggle()}};return{force_panel:A}}function make_right_panel(A,E,H){var J=false;var G=false;var C=null;var D=function(K){jq(A).css("width",K);jq(E).css("right",K+9);jq(H).css("right",K).css("left","");if(document.recalc){document.recalc()}};var I=function(){if(J){jq(H).removeClass("hover");jq(H).animate({right:C},"fast");jq(A).css("right",-C).show().animate({right:0},"fast",function(){D(C);jq(H).removeClass("hidden")});J=false}else{C=jq(document).width()-jq(H).position().left-border_tweak;jq(E).css("right",hidden_width+1);if(document.recalc){document.recalc()}jq(H).removeClass("hover");jq(A).animate({right:-C},"fast");jq(H).animate({right:-1},"fast",function(){jq(this).addClass("hidden")});J=true}G=false};var B=function(K){var L=jq(E).width()-(J?C:0);if(L<K){if(!J){I();G=true}}else{if(G){I();G=false}}};jq(H).hover(function(){jq(this).addClass("hover")},function(){jq(this).removeClass("hover")}).draggable({start:function(K,L){jq("#DD-helper").show()},stop:function(K,L){x=L.position.left;w=jq(window).width();x=Math.min(w-100,x);x=Math.max(w-400,x);D(w-x-border_tweak);jq("#DD-helper").hide();return false},click:function(){I()},drag:function(K,L){x=L.position.left;w=jq(window).width();x=Math.min(w-100,x);x=Math.max(w-400,x);if(J){jq(A).css("right",0);jq(H).removeClass("hidden");J=false}D(w-x-border_tweak);L.position.left=x;L.position.top=$(this).data("draggable").originalPosition.top}}).find("div").show();var F=function(K){if((J&&K=="show")||(!J&&K=="hide")){I()}};return{handle_minwidth_hint:B,force_panel:F}}function hide_modal(){$(".dialog-box-container").fadeOut(function(){$("#overlay").hide()})}function show_modal(E,B,D,C){$(".dialog-box").find(".title").html(E);var A=$(".dialog-box").find(".buttons").html("");if(D){$.each(D,function(F,G){A.append($("<button/>").text(F).click(G));A.append(" ")});A.show()}else{A.hide()}var A=$(".dialog-box").find(".extra_buttons").html("");if(C){$.each(C,function(F,G){A.append($("<button/>").text(F).click(G));A.append(" ")});A.show()}else{A.hide()}if(B=="progress"){B=$("<img src='../images/yui/rel_interstitial_loading.gif')' />")}$(".dialog-box").find(".body").html(B);if(!$(".dialog-box-container").is(":visible")){$("#overlay").show();$(".dialog-box-container").fadeIn()}}function make_popupmenu(D,B){var A=$("<div class='popupmenu'><div class='popupmenu-top'><div class='popupmenu-top-inner'/></div></div>").appendTo("body");$.each(B,function(G,F){$("<div class='popupmenu-item' />").html(G).click(F).appendTo(A)});var C=function(){$(A).unbind().hide();$("#popup-helper").unbind().hide()};var E=function(){var F=$(D).offset();$("#popup-helper").mousedown(C).show();$(A).click(C).css({top:-1000}).show().css({top:F.top+$(D).height()+9,left:F.left+$(D).width()-$(A).width()})};$(D).click(E)};
@@ -1 +1 @@
$.ui.plugin.add("draggable","scrollPanel",{drag:function(G,H){var J=$(this).data("draggable");clearTimeout(J.timeout);var B=H.options,D=J.element,A=B.panel,C=A.position(),I=A.width(),E=A.height();viewport=A.parent();viewport_w=viewport.width(),viewport_h=viewport.height(),element_w=D.width(),element_h=D.height(),moved=false,close=5,nudge=23,p_min_x=-(I-viewport_w),p_min_y=-(E-viewport_h),p_max_x=0,p_max_y=0,min_vis_x=-C.left,max_vis_x=min_vis_x+viewport_w,min_vis_y=-C.top,max_vis_y=min_vis_y+viewport_h,mouse_x=H.position.left+J.offset.click.left;mouse_y=H.position.top+J.offset.click.top;if((C.left<p_max_x)&&(mouse_x-close<min_vis_x)){var K=Math.min(nudge,p_max_x-C.left);A.css("left",C.left+K);moved=true;J.offset.parent.left+=K;H.position.left-=K}if((!moved)&&(C.left>p_min_x)&&(mouse_x+close>max_vis_x)){var K=Math.min(nudge,C.left-p_min_x);A.css("left",C.left-K);moved=true;J.offset.parent.left-=K;H.position.left+=K}if((!moved)&&(C.top<p_max_y)&&(mouse_y-close<min_vis_y)){var K=Math.min(nudge,p_max_y-C.top);A.css("top",C.top+K);var F=A.position().top-C.top;J.offset.parent.top+=F;H.position.top-=F;moved=true}if((!moved)&&(C.top>p_min_y)&&(mouse_y+close>max_vis_y)){var K=Math.min(nudge,C.top-p_min_x);A.css("top",(C.top-K)+"px");var F=C.top-A.position().top;J.offset.parent.top-=F;H.position.top+=F;moved=true}H.position.left=Math.max(H.position.left,0);H.position.top=Math.max(H.position.top,0);H.position.left=Math.min(H.position.left,I-element_w);H.position.top=Math.min(H.position.top,E-element_h);if(moved){$.ui.ddmanager.prepareOffsets(J,G)}if(moved){J.old_e=G;J.timeout=setTimeout(function(){J.mouseMove(G)},50)}},stop:function(C,B){var A=$(this).data("draggable");clearTimeout(A.timeout)}});
$.ui.plugin.add("draggable","scrollPanel",{drag:function(G,H){var J=$(this).data("draggable");clearTimeout(J.timeout);var B=H.options,D=J.element,A=B.panel,C=A.position(),I=A.width(),E=A.height();viewport=A.parent();viewport_w=viewport.width(),viewport_h=viewport.height(),element_w=D.width(),element_h=D.height(),moved=false,close_dist=5,nudge=23,p_min_x=-(I-viewport_w),p_min_y=-(E-viewport_h),p_max_x=0,p_max_y=0,min_vis_x=-C.left,max_vis_x=min_vis_x+viewport_w,min_vis_y=-C.top,max_vis_y=min_vis_y+viewport_h,mouse_x=H.position.left+J.offset.click.left;mouse_y=H.position.top+J.offset.click.top;if((C.left<p_max_x)&&(mouse_x-close_dist<min_vis_x)){var K=Math.min(nudge,p_max_x-C.left);A.css("left",C.left+K);moved=true;J.offset.parent.left+=K;H.position.left-=K}if((!moved)&&(C.left>p_min_x)&&(mouse_x+close_dist>max_vis_x)){var K=Math.min(nudge,C.left-p_min_x);A.css("left",C.left-K);moved=true;J.offset.parent.left-=K;H.position.left+=K}if((!moved)&&(C.top<p_max_y)&&(mouse_y-close_dist<min_vis_y)){var K=Math.min(nudge,p_max_y-C.top);A.css("top",C.top+K);var F=A.position().top-C.top;J.offset.parent.top+=F;H.position.top-=F;moved=true}if((!moved)&&(C.top>p_min_y)&&(mouse_y+close_dist>max_vis_y)){var K=Math.min(nudge,C.top-p_min_x);A.css("top",(C.top-K)+"px");var F=C.top-A.position().top;J.offset.parent.top-=F;H.position.top+=F;moved=true}H.position.left=Math.max(H.position.left,0);H.position.top=Math.max(H.position.top,0);H.position.left=Math.min(H.position.left,I-element_w);H.position.top=Math.min(H.position.top,E-element_h);if(moved){$.ui.ddmanager.prepareOffsets(J,G)}if(moved){J.old_e=G;J.timeout=setTimeout(function(){J.mouseMove(G)},50)}},stop:function(C,B){var A=$(this).data("draggable");clearTimeout(A.timeout)}});
@@ -1,4 +1,5 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
## Render a row
<%def name="render_row( group, members, roles, ctr, anchored, curr_anchor )">
@@ -36,12 +37,12 @@
</tr>
</%def>
%if msg:
<div class="donemessage">${msg}</div>
%endif
<a name="TOP"><h2>Deleted Groups</h2></a>
%if msg:
${render_msg( msg, messagetype )}
%endif
%if len( groups_members_roles ) == 0:
There are no deleted Galaxy groups
%else:
@@ -1,4 +1,5 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
## Render a row
<%def name="render_row( role, groups, users, ctr, anchored, curr_anchor )">
@@ -36,12 +37,12 @@
</tr>
</%def>
%if msg:
<div class="donemessage">${msg}</div>
%endif
<a name="TOP"><h2>Deleted Roles</h2></a>
%if msg:
${render_msg( msg, messagetype )}
%endif
%if len( roles_groups_users ) == 0:
There are no deleted Galaxy roles
%else:
@@ -1,4 +1,5 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
## Render a user row
<%def name="render_user_row( user, ctr )">
@@ -29,16 +30,15 @@
</tr>
</%def>
%if msg:
<div class="donemessage">${msg}</div>
%endif
<a name="TOP"><h2>Create Group</h2></a>
%if msg:
${render_msg( msg, messagetype )}
%endif
<form name="group_create" action="${h.url_for( controller='admin', action='new_group' )}" method="post" >
<table class="manage-table colored" border="0" cellspacing="0" cellpadding="0" width="100%">
<tr><td colspan="2">Name: <input name="name" type="textfield" value="" size=40"></td></tr>
<tr><td colspan="2">Name: <input name="name" type="textfield" value="" size=40"/></td></tr>
<%
render_quick_find = len( users ) > 50
ctr = 0
@@ -1,73 +0,0 @@
<%inherit file="/base.mako"/>
<%def name="title()">Permitted Actions on Datasets</%def>
<div class="toolForm">
<div class="form-row">
<a href="${h.url_for( controller='admin', action='libraries' )}">Libraries</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="${h.url_for( controller='admin', action='groups' )}">Groups</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<tr><td><a href="${h.url_for( controller='admin', action='users' )}">Users</a></td></tr>
</div>
<h3 align="center">Manage Permitted Actions on Datasets for Group '${group.name}'</h3>
<table align="center" class="colored">
%if msg:
<tr><td colspan="3"><p class="ok_bgr">${msg}</p></td></tr>
%endif
<tr><td colspan="3">&nbsp;</td>
%if len( group.datasets ) == 0:
<tr><td colspan="3">The group you selected has no associated datasets.</td></tr>
%else:
<tr class="header">
<td>Association Names/Info</td>
<td>Permitted Actions</td>
</tr>
<% ctr = 0 %>
<form name="group_dataset_permitted_actions_edit" action="${h.url_for( controller='admin',
action='group_dataset_permitted_actions_edit',
group_id=group.id )}" method="post" >
<input type="hidden" name="gdas" value="${ ','.join( [ str(gda.id) for gda in gdas ] ) }"/>
%for gda in gdas:
<% permissions = trans.app.security_agent.get_dataset_permissions( gda, group.id ) %>
%if ctr % 2 == 1:
<tr class="odd_row">
%else:
<tr class="tr">
%endif
<td>
%if gda.dataset.library_associations:
<strong>Library name(s):</strong><br/>
%endif
<ul>
%for da in gda.dataset.library_associations:
<li>${da.name} (${da.info})</li>
%endfor
</ul>
%if gda.dataset.history_associations:
<strong>History name(s):</strong><br/>
%endif
<ul>
%for da in gda.dataset.history_associations:
<li>${da.name} (${da.info})</li>
%endfor
</ul>
</td>
<td>
%for pa in trans.app.model.Dataset.permitted_actions:
<% pa_val = trans.app.security_agent.permitted_actions.__dict__[pa] %>
<input type="checkbox" name="gda_actions_${gda.id}" value="${pa}"
%if pa_val in permissions[1]:
checked
%endif
/>
${pa_val}<br/>${trans.app.security_agent.get_permitted_action_description(pa)}<br/>
<br/>
%endfor
<br/>
</td>
</tr>
<% ctr += 1 %>
%endfor
<tr><td colspan="3"><center><button name="group_dataset_permitted_actions_edit_button" value="group_dataset_permitted_actions_edit">Update</button></center></td></tr>
</form>
%endif
</table>
</div>
@@ -1,4 +1,5 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
## Render a row
<%def name="render_row( user, ctr, anchored, curr_anchor, check )">
@@ -17,12 +18,12 @@
</tr>
</%def>
%if msg:
<div class="donemessage">${msg}</div>
%endif
<a name="TOP"><h2>Members of group '${group.name}'</h2></a>
%if msg:
${render_msg( msg, messagetype )}
%endif
%if len( users ) == 0:
<tr><td>There are no Galaxy users</td></tr>
%else:
@@ -1,4 +1,5 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
## Render a row
<%def name="render_row( role, ctr, anchored, curr_anchor, check )">
@@ -17,12 +18,12 @@
</tr>
</%def>
%if msg:
<div class="donemessage">${msg}</div>
%endif
<a name="TOP"><h2>Roles associated with group '${group.name}'</h2></a>
%if msg:
${render_msg( msg, messagetype )}
%endif
%if len( roles ) == 0:
<tr><td>There are no Galaxy roles</td></tr>
%else:
+5 -4
View File
@@ -1,4 +1,5 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
<%
import galaxy.model
@@ -48,10 +49,6 @@
</tr>
</%def>
%if msg:
<div class="donemessage">${msg}</div>
%endif
<a name="TOP"><h2>Groups</h2></a>
<ul class="manage-table-actions">
@@ -59,6 +56,10 @@
<li><a class="action-button" href="${h.url_for( controller='admin', action='deleted_groups' )}">Manage deleted groups</a></li>
</ul>
%if msg:
${render_msg( msg, messagetype )}
%endif
%if len( groups_members_roles ) == 0:
There are no Galaxy groups
%else:
@@ -1,13 +0,0 @@
<%inherit file="/base.mako"/>
<%def name="title()">Dataset Security</%def>
<div class="toolForm">
<div class="toolFormTitle">Dataset Security</div>
<table align="center" class="colored">
%if msg:
<tr><td><p class="ok_bgr">${msg}</p></td></tr>
%endif
<tr><td><a href="${h.url_for( controller='admin', action='groups' )}">Groups</a></td></tr>
<tr><td><a href="${h.url_for( controller='admin', action='users' )}">Users</a></td></tr>
</table>
</div>
@@ -1,4 +1,5 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
<%def name="javascripts()">
${parent.javascripts()}
@@ -42,6 +43,10 @@ $().ready(function() {
});
</script>
%if msg:
${render_msg( msg, messagetype )}
%endif
<div class="toolForm">
<div class="toolFormTitle">Role '${role.name}'</div>
<div class="toolFormBody">
@@ -1,4 +1,5 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
## Render a user row
<%def name="render_user_row( user, ctr )">
@@ -29,18 +30,17 @@
</tr>
</%def>
%if msg:
<div class="donemessage">${msg}</div>
%endif
<a name="TOP"><h2>Create Role</h2></a>
%if msg:
${render_msg( msg, messagetype )}
%endif
<form name="role_create" action="${h.url_for( controller='admin', action='new_role' )}" method="post" >
<table class="manage-table colored" border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td>Name: <input name="name" type="textfield" value="" size=40"></td>
<td>Description: <input name="description" type="textfield" value="" size=40"></td>
<td>Name: <input name="name" type="textfield" value="" size=40"/></td>
<td>Description: <input name="description" type="textfield" value="" size=40"/></td>
</tr>
<%
render_quick_find = len( users ) > 50
+5 -6
View File
@@ -1,8 +1,7 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
<%
from galaxy.web.controllers.admin import entities, unentities
from xml.sax.saxutils import escape, unescape
import galaxy.model
%>
@@ -43,10 +42,6 @@
</tr>
</%def>
%if msg:
<div class="donemessage">${msg}</div>
%endif
<a name="TOP"><h2>Non-private Roles</h2></a>
<ul class="manage-table-actions">
@@ -54,6 +49,10 @@
<li><a class="action-button" href="${h.url_for( controller='admin', action='deleted_roles' )}">Manage deleted roles</a></li>
</ul>
%if msg:
${render_msg( msg, messagetype )}
%endif
%if len( roles ) == 0:
There are no non-private Galaxy roles
%else:
+4 -3
View File
@@ -1,4 +1,5 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
<%
import galaxy.model
@@ -30,12 +31,12 @@
</li>
</%def>
<h2>User '${user.email}'</h2>
%if msg:
<div class="donemessage">${msg}</div>
${render_msg( msg, messagetype )}
%endif
<h2>User '${user.email}'</h2>
%if len( groups ) == 0 and len( roles ) == 0:
User '${user.email}' belongs to no groups and is associated with no roles
%else:
@@ -1,4 +1,5 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
## Render a row
<%def name="render_row( group, ctr, anchored, curr_anchor, check )">
@@ -17,12 +18,12 @@
</tr>
</%def>
%if msg:
<div class="donemessage">${msg}</div>
%endif
<a name="TOP"><h2>User '${user.email}' Associated Groups</h2></a>
%if msg:
${render_msg( msg, messagetype )}
%endif
%if len( groups ) == 0:
<tr><td>User ${user.email} is not a member of any groups</td></tr>
%else:
+7 -2
View File
@@ -1,4 +1,5 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
<%
import galaxy.model
@@ -39,11 +40,15 @@
</tr>
</%def>
<a name="TOP"><h2>Users</h2></a>
%if msg:
<div class="donemessage">${msg}</div>
${render_msg( msg, messagetype )}
%endif
<a name="TOP"><h2>Users</h2></a>
<ul class="manage-table-actions">
<li><a class="action-button" href="${h.url_for( controller='user', action='create' )}">Create a new user</a></li>
</ul>
%if len( users_groups_roles ) == 0:
There are no Galaxy users
+2 -1
View File
@@ -94,11 +94,12 @@
</div>
<div class="toolSectionPad"></div>
<div class="toolSectionTitle">
<span>Tools</span>
<span>Server</span>
</div>
<div class="toolSectionBody">
<div class="toolSectionBg">
<div class="toolTitle"><a href="${h.url_for( action='reload_tool' )}" target="galaxy_main">Reload a tool's configuration</a></div>
<div class="toolTitle"><a href="${h.url_for( action='memdump' )}" target="galaxy_main">Profile memory usage</a></div>
</div>
</div>
</div>
@@ -1,30 +1,22 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
<%def name="title()">Add Dataset to Library from History</%def>
%if error_msg:
<p>
<div class="errormessage">${error_msg}</div>
<div style="clear: both"></div>
</p>
%if msg:
${render_msg( msg, messagetype )}
%endif
%if ok_msg:
<p>
<div class="donemessage">${ok_msg}</div>
<div style="clear: both"></div>
</p>
%endif
<p/>
<div class="toolForm">
<div class="toolFormTitle">Active Datasets in your current history (${history.name})</div>
<div class="toolFormBody">
<form name="add_dataset_from_history">
<input type="hidden" name="folder_id" value="${folder.id}">
%for dataset in history.active_datasets:
<div class="form-row">
<input name="ids" value="${dataset.id}" type="checkbox">${dataset.hid}: ${dataset.name}
</div>
%endfor
<input type="submit" name="submit" value="Add Datasets">
</form>
</div>
<div class="toolFormTitle">Active datasets in your current history (${history.name})</div>
<div class="toolFormBody">
<form name="add_dataset_from_history">
<input type="hidden" name="folder_id" value="${folder.id}"/>
%for dataset in history.active_datasets:
<div class="form-row">
<input name="ids" value="${dataset.id}" type="checkbox"/>${dataset.hid}: ${dataset.name}
</div>
%endfor
<input type="submit" name="add_dataset_from_history_button" value="Add selected datasets"/>
</form>
</div>
</div>
+24 -20
View File
@@ -1,5 +1,6 @@
<%inherit file="/base.mako"/>
<%namespace file="common.mako" import="render_dataset" />
<%namespace file="/message.mako" import="render_msg" />
<%def name="title()">Import from Library</%def>
<%def name="stylesheets()">
@@ -58,7 +59,7 @@
});
function checkForm() {
if ( $("select#action_on_datasets_select option:selected").text() == "delete" ) {
if ( confirm( "Are you sure you want to delete these datasets?" ) ) {
if ( confirm( "Click OK to delete these datasets?" ) ) {
return true;
} else {
return false;
@@ -67,7 +68,7 @@
}
</script>
<%def name="render_folder( parent, parent_pad, deleted )">
<%def name="render_folder( parent, parent_pad, deleted, created_lfda_ids )">
<%
##if not trans.app.security_agent.check_folder_contents( trans.user, parent ):
## return ""
@@ -80,6 +81,11 @@
expander = "/static/images/silk/resultset_next.png"
folder = "/static/images/silk/folder.png"
subfolder = True
if created_lfda_ids and not isinstance ( created_lfda_ids, list ):
created_lfda_id_list = created_lfda_ids.split( ',' )
if created_lfda_id_list:
created_lfda_ids = [ int( lfda_id ) for lfda_id in created_lfda_id_list ]
%>
<li class="folderRow libraryOrFolderRow" style="padding-left: ${pad}px;">
<div class="rowTitle">
@@ -92,12 +98,12 @@
</div>
%if not deleted:
<div popupmenu="folder-${parent.id}-popup">
<a class="action-button" href="${h.url_for( action='dataset', folder_id=parent.id )}">Add new dataset to this folder</a>
<a class="action-button" href="${h.url_for( action='dataset', folder_id=parent.id )}">Add a new dataset to this folder</a>
<a class="action-button" href="${h.url_for( action='add_dataset_to_folder_from_history', folder_id=parent.id )}">Copy a dataset from your history to this folder</a>
<a class="action-button" href="${h.url_for( action='folder', new=True, id=parent.id )}">Create a new sub-folder in this folder</a>
<a class="action-button" href="${h.url_for( action='folder', rename=True, id=parent.id )}">Rename this folder</a>
%if subfolder:
<a class="action-button" confirm="Are you sure you want to delete folder '${parent.name}'?" href="${h.url_for( action='folder', delete=True, id=parent.id )}">Remove this folder and its contents from the library</a>
<a class="action-button" confirm="Click OK to delete the folder '${parent.name}'?" href="${h.url_for( action='folder', delete=True, id=parent.id )}">Remove this folder and its contents from the library</a>
%endif
</div>
%endif
@@ -119,11 +125,17 @@
%>
%endif
%for folder in parent_folders:
${render_folder( folder, pad, deleted )}
${render_folder( folder, pad, deleted, created_lfda_ids )}
%endfor
%for dataset in parent_datasets:
##%if trans.app.security_agent.allow_action( trans.user, trans.app.security_agent.permitted_actions.DATASET_ACCESS, dataset=dataset.dataset ):
<li class="datasetRow" style="padding-left: ${pad + 18}px;">${render_dataset( dataset, deleted )}</li>
<%
if created_lfda_ids and dataset.id in created_lfda_ids:
selected = True
else:
selected = False
%>
<li class="datasetRow" style="padding-left: ${pad + 18}px;">${render_dataset( dataset, selected, deleted )}</li>
##%endif
%endfor
</ul>
@@ -136,18 +148,6 @@
Libraries
</h2>
%if msg:
<%
try:
messagetype
except:
messagetype = "done"
%>
<p />
<div class="${messagetype}message">${msg}</div>
<p />
%endif
<ul class="manage-table-actions">
%if not deleted:
<li>
@@ -159,6 +159,10 @@
%endif
</ul>
%if msg:
${render_msg( msg, messagetype )}
%endif
%if not libraries:
%if deleted:
There are no deleted libraries
@@ -199,7 +203,7 @@
</div>
</li>
<ul>
${render_folder( library.root_folder, 0, deleted )}
${render_folder( library.root_folder, 0, deleted, created_lfda_ids )}
</ul>
<br/>
##%endif
@@ -209,7 +213,7 @@
<p>
<b>Perform action on selected datasets:</b>
<select name="action" id="action_on_datasets_select">
<option value="edit">Edit permissions on selected datasets</option>
<option value="edit">Edit selected datasets' attributes and permissions</option>
<option value="delete">Remove selected datasets from this library</option>
</select>
<input type="submit" class="primary-button" name="action_on_datasets_button" id="action_on_datasets_button" value="Go"/>
+69 -74
View File
@@ -4,7 +4,7 @@
</%doc>
## Render the dataset `data`
<%def name="render_dataset( data, deleted )">
<%def name="render_dataset( data, selected, deleted )">
<%
if data.state in ['no state','',None]:
data_state = "queued"
@@ -17,86 +17,81 @@
<div class="historyItemWrapper historyItem historyItem-${data_state}" id="historyItem-${data.id}">
##%endif
## Header row for history items (name, state, action buttons)
## Header row for history items (name, state, action buttons)
<div style="overflow: hidden;" class="historyItemTitleBar">
<div style="float: left; padding-right: 3px;">
<div style='display: none;' id="progress-${data.id}">
<img src="${h.url_for('/static/style/data_running.gif')}" border="0" align="middle" >
</div>
%if data_state == 'running':
<div><img src="${h.url_for('/static/style/data_running.gif')}" border="0" align="middle"></div>
%elif data_state != 'ok':
<div><img src="${h.url_for( "/static/style/data_%s.png" % data_state )}" border="0" align="middle"></div>
%endif
<div style='display: none;' id="progress-${data.id}">
<img src="${h.url_for('/static/style/data_running.gif')}" border="0" align="middle" >
</div>
%if data_state == 'running':
<div><img src="${h.url_for('/static/style/data_running.gif')}" border="0" align="middle"></div>
%elif data_state != 'ok':
<div><img src="${h.url_for( "/static/style/data_%s.png" % data_state )}" border="0" align="middle"></div>
%endif
</div>
<%doc>
<div style="float: right;">
<a href="${h.url_for( controller='dataset', dataset_id=data.id, action='display', filename='index')}" target="galaxy_main"><img src="${h.url_for('/static/images/eye_icon.png')}" rollover="${h.url_for('/static/images/eye_icon_dark.png')}" width='16' height='16' alt='display data' title='display data' class='displayButton' border='0'></a>
<a href="${h.url_for( action='edit', id=data.id )}" target="galaxy_main"><img src="${h.url_for('/static/images/pencil_icon.png')}" rollover="${h.url_for('/static/images/pencil_icon_dark.png')}" width='16' height='16' alt='edit attributes' title='edit attributes' class='editButton' border='0'></a>
<a href="${h.url_for( action='delete', id=data.id )}" class="historyItemDelete" id="historyItemDelter-${data.id}"><img src="${h.url_for('/static/images/delete_icon.png')}" rollover="${h.url_for('/static/images/delete_icon_dark.png')}" width='16' height='16' alt='delete' class='deleteButton' border='0'></a>
</div>
</%doc>
<table cellspacing="0" cellpadding="0" border="0" width="100%"><tr>
<td width="*">
<input type="checkbox" name="dataset_ids" value="${data.id}"/>
<span class="historyItemTitle"><b>${data.display_name()}</b></span>
%if not deleted:
<a id="dataset-${data.id}-popup" class="popup-arrow" style="display: none;">&#9660;</a>
<div popupmenu="dataset-${data.id}-popup">
<a class="action-button" href="${h.url_for( action='dataset', id=data.id )}">Edit this dataset's attributes and permissions</a>
<a class="action-button" confirm="Are you sure you want to delete dataset '${data.name}'?" href="${h.url_for( action='dataset', delete=True, id=data.id )}">Remove this dataset from the library</a>
</div>
%endif
</td>
<td width="100">${data.ext}</td>
<td width="50"><span class="${data.dbkey}">${data.dbkey}</span></td>
<td width="200">${data.info}</td>
</tr></table>
</div>
## Body for history items, extra info and actions, data "peek"
<div id="info${data.id}" class="historyItemBody">
<div>
${data.blurb}
<%doc>
<div style="float: right;">
<a href="${h.url_for( controller='dataset', dataset_id=data.id, action='display', filename='index')}" target="galaxy_main"><img src="${h.url_for('/static/images/eye_icon.png')}" rollover="${h.url_for('/static/images/eye_icon_dark.png')}" width='16' height='16' alt='display data' title='display data' class='displayButton' border='0'></a>
<a href="${h.url_for( action='edit', id=data.id )}" target="galaxy_main"><img src="${h.url_for('/static/images/pencil_icon.png')}" rollover="${h.url_for('/static/images/pencil_icon_dark.png')}" width='16' height='16' alt='edit attributes' title='edit attributes' class='editButton' border='0'></a>
<a href="${h.url_for( action='delete', id=data.id )}" class="historyItemDelete" id="historyItemDelter-${data.id}"><img src="${h.url_for('/static/images/delete_icon.png')}" rollover="${h.url_for('/static/images/delete_icon_dark.png')}" width='16' height='16' alt='delete' class='deleteButton' border='0'></a>
</div>
<div>
%if data.has_data:
<a href="${h.url_for( action='display', id=data.id, tofile='yes', toext='data.ext' )}" target="_blank">save</a>
%for display_app in data.datatype.get_display_types():
<% display_links = data.datatype.get_display_links( data, display_app, app, request.base ) %>
%if len( display_links ) > 0:
| ${data.datatype.get_display_label(display_app)}
%for display_name, display_link in display_links:
<a target="_blank" href="${display_link}">${display_name}</a>
%endfor
%endif
%endfor
%endif
</div>
%if data.peek != "no peek":
<div><pre id="peek${data.id}" class="peek">${data.display_peek()}</pre></div>
%endif
## Recurse for child datasets
%if len( data.children ) > 0:
## FIXME: This should not be in the template, there should
## be a 'visible_children' method on dataset.
<%
children = []
for child in data.children:
if child.visible:
children.append( child )
%>
%if len( children ) > 0:
<div>
There are ${len( children )} secondary datasets.
%for idx, child in enumerate(children):
${render_dataset( child, idx + 1 )}
</%doc>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width="*">
%if selected:
<input type="checkbox" name="dataset_ids" value="${data.id}" checked/>
%else:
<input type="checkbox" name="dataset_ids" value="${data.id}"/>
%endif
<span class="historyItemTitle"><b>${data.display_name()}</b></span>
%if not deleted:
<a id="dataset-${data.id}-popup" class="popup-arrow" style="display: none;">&#9660;</a>
<div popupmenu="dataset-${data.id}-popup">
<a class="action-button" href="${h.url_for( action='dataset', id=data.id )}">Edit this dataset's attributes and permissions</a>
<a class="action-button" confirm="Click OK to remove dataset '${data.name}'?" href="${h.url_for( action='dataset', delete=True, id=data.id )}">Remove this dataset from the library</a>
</div>
%endif
</td>
<td width="100">${data.ext}</td>
<td width="50"><span class="${data.dbkey}">${data.dbkey}</span></td>
<td width="200">${data.info}</td>
</tr>
</table>
</div>
## Body for history items, extra info and actions, data "peek"
<div id="info${data.id}" class="historyItemBody">
<div>
${data.blurb}
</div>
<div>
%if data.has_data:
<a href="${h.url_for( action='display', id=data.id, tofile='yes', toext='data.ext' )}" target="_blank">save</a>
%for display_app in data.datatype.get_display_types():
<% display_links = data.datatype.get_display_links( data, display_app, app, request.base ) %>
%if len( display_links ) > 0:
| ${data.datatype.get_display_label(display_app)}
%for display_name, display_link in display_links:
<a target="_blank" href="${display_link}">${display_name}</a>
%endfor
</div>
%endif
%endif
%endfor
%endif
</div>
%if data.peek != "no peek":
<div><pre id="peek${data.id}" class="peek">${data.display_peek()}</pre></div>
%endif
## Recurse for child datasets
%if len( data.visible_children ) > 0:
<div>
There are ${len( data.visible_children )} secondary datasets.
%for idx, child in enumerate( data.visible_children ):
${ render_dataset( child, selected, deleted ) }
%endfor
</div>
%endif
</div>
</%def>
+17 -11
View File
@@ -17,10 +17,17 @@
</select>
</%def>
<%
roles = trans.app.model.Role.filter( trans.app.model.Role.table.c.type != trans.app.model.Role.types.PRIVATE ).all()
%>
%if isinstance( dataset, list ):
${render_permission_form( dataset[0].dataset, h.url_for( action='dataset' ), 'id', ",".join( [ str(d.id) for d in dataset ] ), trans.app.model.Role.query().all() )}
<%
name_str = ' - ( %d of them )' % len( dataset )
%>
${render_permission_form( dataset[0].dataset, name_str, h.url_for( action='dataset' ), 'id', ",".join( [ str(d.id) for d in dataset ] ), roles )}
%else:
${render_permission_form( dataset.dataset, h.url_for( action='dataset' ), 'id', dataset.id, trans.app.model.Role.query().all() )}
${render_permission_form( dataset.dataset, dataset.name, h.url_for( action='dataset' ), 'id', dataset.id, roles )}
%endif
%if not isinstance( dataset, list ):
@@ -28,18 +35,18 @@
<div class="toolFormTitle">Edit Attributes</div>
<div class="toolFormBody">
<form name="edit_attributes" action="${h.url_for( controller='admin', action='dataset' )}" method="post">
<input type="hidden" name="id" value="${dataset.id}">
<input type="hidden" name="id" value="${dataset.id}"/>
<div class="form-row">
<label>Name:</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="text" name="name" value="${dataset.name}" size="40">
<input type="text" name="name" value="${dataset.name}" size="40"/>
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
<label>Info:</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="text" name="info" value="${dataset.info}" size="40">
<input type="text" name="info" value="${dataset.info}" size="40"/>
</div>
<div style="clear: both"></div>
</div>
@@ -55,13 +62,13 @@
%endif
%endfor
<div class="form-row">
<input type="submit" name="save" value="Save">
<input type="submit" name="save" value="Save"/>
</div>
</form>
<form name="auto_detect" action="${h.url_for( controller='admin', action='dataset' )}" method="post">
<input type="hidden" name="id" value="${dataset.id}">
<input type="hidden" name="id" value="${dataset.id}"/>
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="submit" name="detect" value="Auto-detect">
<input type="submit" name="detect" value="Auto-detect"/>
</div>
<div class="toolParamHelp" style="clear: both;">
This will inspect the dataset and attempt to correct the above column values
@@ -75,7 +82,7 @@
<div class="toolFormTitle">Change data type</div>
<div class="toolFormBody">
<form name="change_datatype" action="${h.url_for( controller='admin', action='dataset' )}" method="post">
<input type="hidden" name="id" value="${dataset.id}">
<input type="hidden" name="id" value="${dataset.id}"/>
<div class="form-row">
<label>New Type:</label>
<div style="float: left; width: 250px; margin-right: 10px;">
@@ -89,11 +96,10 @@
<div style="clear: both"></div>
</div>
<div class="form-row">
<input type="submit" name="change" value="Save">
<input type="submit" name="change" value="Save"/>
</div>
</form>
</div>
</div>
<p/>
%endif
<a href="${h.url_for( controller='admin', action='library_browser' )}">Return to the library browser</a>
+6 -5
View File
@@ -1,20 +1,21 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
<% import os %>
%if msg:
<p class="ok_bgr">${msg}</p></td></tr>
${render_msg( msg, messagetype )}
%endif
<div class="toolForm" id="new_dataset">
<div class="toolFormTitle">Create a new library dataset</div>
<div class="toolFormBody">
<form name="tool_form" action="${h.url_for( controller='admin', action='dataset' )}" enctype="multipart/form-data" method="post">
<input type="hidden" name="folder_id" value="${folder_id}">
<input type="hidden" name="folder_id" value="${folder_id}"/>
<div class="form-row">
<label>File:</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="file" name="file_data">
<input type="file" name="file_data"/>
</div>
<div class="toolParamHelp" style="clear: both;">
Upload a single file. Use the "Server Directory" feature below to upload an entire directory of files.
@@ -52,7 +53,7 @@
<label>Convert spaces to tabs:</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<div>
<input type="checkbox" name="space_to_tab" value="Yes">Yes
<input type="checkbox" name="space_to_tab" value="Yes"/>Yes
</div>
</div>
<div class="toolParamHelp" style="clear: both;">
@@ -102,7 +103,7 @@
</div>
<div style="clear: both"></div>
<div class="form-row">
<input type="submit" class="primary-button" name="new_dataset_button" value="Add Dataset(s) to Folder">
<input type="submit" class="primary-button" name="new_dataset_button" value="Add Dataset(s) to Folder"/>
</div>
</form>
</div>
+7 -6
View File
@@ -1,7 +1,8 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
%if msg:
<p class="ok_bgr">${msg}</p></td></tr>
${render_msg( msg, messagetype )}
%endif
<div class="toolForm">
@@ -11,30 +12,30 @@
<div class="form-row">
<label>Name:</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="text" name="name" value="New Folder" size="40">
<input type="text" name="name" value="New Folder" size="40"/>
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
<label>Description:</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="text" name="description" value="" size="40">
<input type="text" name="description" value="" size="40"/>
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="hidden" name="new" value="submitted" size="40">
<input type="hidden" name="new" value="submitted" size="40"/>
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="hidden" name="id" value="${folder.id}" size="40">
<input type="hidden" name="id" value="${folder.id}" size="40"/>
</div>
<div style="clear: both"></div>
</div>
<input type="submit" name="new_folder_button" value="Create">
<input type="submit" name="new_folder_button" value="Create"/>
</form>
</div>
</div>
+6 -5
View File
@@ -1,7 +1,8 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
%if msg:
<p class="ok_bgr">${msg}</p></td></tr>
${render_msg( msg, messagetype )}
%endif
<div class="toolForm">
@@ -11,24 +12,24 @@
<div class="form-row">
<label>Name:</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="text" name="name" value="New Library" size="40">
<input type="text" name="name" value="New Library" size="40"/>
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
<label>Description:</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="text" name="description" value="" size="40">
<input type="text" name="description" value="" size="40"/>
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="hidden" name="new" value="submitted" size="40">
<input type="hidden" name="new" value="submitted" size="40"/>
</div>
<div style="clear: both"></div>
</div>
<input type="submit" name="create_library_button" value="Create">
<input type="submit" name="create_library_button" value="Create"/>
</form>
</div>
</div>
+7 -6
View File
@@ -1,7 +1,8 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
%if msg:
<p class="ok_bgr">${msg}</p></td></tr>
${render_msg( msg, messagetype )}
%endif
<div class="toolForm">
@@ -11,30 +12,30 @@
<div class="form-row">
<label>Name:</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="text" name="name" value="${folder.name}" size="40">
<input type="text" name="name" value="${folder.name}" size="40"/>
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
<label>Description:</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="text" name="description" value="${folder.description}" size="40">
<input type="text" name="description" value="${folder.description}" size="40"/>
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="hidden" name="rename" value="submitted" size="40">
<input type="hidden" name="rename" value="submitted" size="40"/>
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="hidden" name="id" value="${folder.id}" size="40">
<input type="hidden" name="id" value="${folder.id}" size="40"/>
</div>
<div style="clear: both"></div>
</div>
<input type="submit" name="rename_folder_button" value="Save">
<input type="submit" name="rename_folder_button" value="Save"/>
</form>
</div>
</div>
+8 -7
View File
@@ -1,7 +1,8 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
%if msg:
<p class="ok_bgr">${msg}</p></td></tr>
${render_msg( msg, messagetype )}
%endif
<div class="toolForm">
@@ -11,37 +12,37 @@
<div class="form-row">
<label>Name:</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="text" name="name" value="${library.name}" size="40">
<input type="text" name="name" value="${library.name}" size="40"/>
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
<label>Description:</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="text" name="description" value="${library.description}" size="40">
<input type="text" name="description" value="${library.description}" size="40"/>
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
<label>Also change the root folder's name:</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="checkbox" name="root_folder" value="" size="40">
<input type="checkbox" name="root_folder"/>
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="hidden" name="rename" value="submitted" size="40">
<input type="hidden" name="rename" value="submitted"/>
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="hidden" name="id" value="${library.id}" size="40">
<input type="hidden" name="id" value="${library.id}"/>
</div>
<div style="clear: both"></div>
</div>
<input type="submit" name="rename_library_button" value="Save">
<input type="submit" name="rename_library_button" value="Save"/>
</form>
</div>
</div>
+2 -1
View File
@@ -1,4 +1,5 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
<%def name="title()">Memory Profiling</%def>
<%
@@ -44,7 +45,7 @@
</%def>
%if msg:
<div class="donemessage">${msg}</div>
${render_msg( msg, messagetype )}
%endif
%if heap is None:
+2 -1
View File
@@ -1,7 +1,8 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
%if msg:
<div class="donemessage">${msg}</div>
${render_msg( msg, messagetype )}
%endif
<div class="toolForm">
+10 -10
View File
@@ -1,16 +1,16 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>${self.title()}</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
${self.stylesheets()}
${self.javascripts()}
</head>
<head>
<title>${self.title()}</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
${self.stylesheets()}
${self.javascripts()}
</head>
<body>
${next.body()}
</body>
<body>
${next.body()}
</body>
</html>
## Default title
@@ -28,4 +28,4 @@ ${self.javascripts()}
## <![endif]-->
<script type="text/javascript" src="${h.url_for('/static/scripts/jquery.js')}"></script>
<script type="text/javascript" src="${h.url_for('/static/scripts/galaxy.base.js')}"></script>
</%def>
</%def>
+31 -27
View File
@@ -10,7 +10,7 @@
%>
<%def name="init()">
## Override
## Override
</%def>
## Default title
@@ -40,10 +40,10 @@
## Default javascripts
<%def name="javascripts()">
<!--[if lt IE 7]>
<script type='text/javascript' src="/static/scripts/IE7.js"> </script>
<script type='text/javascript' src="/static/scripts/ie7-recalc.js"> </script>
<![endif]-->
<!--[if lt IE 7]>
<script type='text/javascript' src="/static/scripts/IE7.js"> </script>
<script type='text/javascript' src="/static/scripts/ie7-recalc.js"> </script>
<![endif]-->
</%def>
## Default late-load javascripts
@@ -57,14 +57,16 @@
ensure_dd_helper();
%if self.has_left_panel:
var lp = make_left_panel( $("#left"), $("#center"), $("#left-border" ) );
force_left_panel = lp.force_panel;
%endif
%if self.has_right_panel:
var rp = make_right_panel( $("#right"), $("#center"), $("#right-border" ) );
handle_minwidth_hint = rp.handle_minwidth_hint;
force_right_panel = rp.force_panel;
%endif
</script>
</%def>
## Masthead
<%def name="masthead()">
<iframe name="galaxy_masthead" src="${h.url_for( controller='root', action='masthead', active_view=self.active_view )}" width="38" height="100%" frameborder="0" scroll="no" style="margin: 0; border: 0 none; width: 100%; height: 38px; overflow: hidden;"> </iframe>
@@ -80,40 +82,42 @@
${self.init()}
<head>
<title>${self.title()}</title>
${self.javascripts()}
${self.stylesheets()}
<title>${self.title()}</title>
${self.javascripts()}
${self.stylesheets()}
</head>
<body scroll="no">
## Background displays first
<div id="background"></div>
## Layer iframes over backgrounds
<div id="masthead">
${self.masthead()}
</div>
## Background displays first
<div id="background"></div>
## Layer iframes over backgrounds
<div id="masthead">
${self.masthead()}
</div>
<div id="messagebox" class="panel-${self.message_box_class}-message">
%if self.message_box_visible:
${self.message_box_content()}
%endif
</div>
%if self.has_left_panel:
<div id="left">
${self.left_panel()}
</div>
<div id="left-border"><div id="left-border-inner" style="display: none;"></div></div>
<div id="left">
${self.left_panel()}
</div>
<div id="left-border">
<div id="left-border-inner" style="display: none;"></div>
</div>
%endif
<div id="center">
${self.center_panel()}
</div>
<div id="center">
${self.center_panel()}
</div>
%if self.has_right_panel:
<div id="right-border"><div id="right-border-inner" style="display: none;"></div></div>
<div id="right">
${self.right_panel()}
</div>
<div id="right-border"><div id="right-border-inner" style="display: none;"></div></div>
<div id="right">
${self.right_panel()}
</div>
%endif
## Allow other body level elements
${next.body()}
${next.body()}
</body>
## Scripts can be loaded later since they progressively add features to
## the panels, but do not change layout
+4 -4
View File
@@ -25,7 +25,7 @@
if data.id in source_dataset_ids:
checked = " checked"
%>
<div class="form-row"><input type="checkbox" name="source_dataset_ids" value="${data.id}"${checked}> ${data.hid}: ${data.name}</div>
<div class="form-row"><input type="checkbox" name="source_dataset_ids" value="${data.id}"${checked}/> ${data.hid}: ${data.name}</div>
%endfor
</div>
</div>
@@ -41,7 +41,7 @@
if hist == trans.get_history():
cur_history_text = " <strong>(current history)</strong>"
%>
<div class="form-row"><input type="checkbox" name="target_history_ids" value="${hist.id}"${checked}> ${i + 1}${cur_history_text}: ${hist.name}</div>
<div class="form-row"><input type="checkbox" name="target_history_ids" value="${hist.id}"${checked}/> ${i + 1}${cur_history_text}: ${hist.name}</div>
%endfor
%if trans.get_user():
<%
@@ -50,12 +50,12 @@
checked = " checked"
%>
<br>
<div class="form-row"><input type="checkbox" name="target_history_ids" value="create_new_history"${checked}>New history named: <input type="textbox" name="new_history_name" value="${new_history_name}"></div>
<div class="form-row"><input type="checkbox" name="target_history_ids" value="create_new_history"${checked}/>New history named: <input type="textbox" name="new_history_name" value="${new_history_name}"/></div>
%endif
</div>
</div>
<div style="clear: both"></div>
<div class="form-row" align="center"><input type="submit" class="primary-button" name="do_copy" value="Copy History Items"></div>
<div class="form-row" align="center"><input type="submit" class="primary-button" name="do_copy" value="Copy History Items"/></div>
</form>
</div>
</p>
+167 -182
View File
@@ -3,201 +3,186 @@
<%def name="datatype( dataset, datatypes )">
<select name="datatype">
## $datatypes.sort()
%for ext in datatypes:
%if dataset.ext == ext:
<option value="${ext}" selected="yes">${ext}</option>
%else:
<option value="${ext}">${ext}</option>
%endif
%endfor
</select>
<select name="datatype">
## $datatypes.sort()
%for ext in datatypes:
%if dataset.ext == ext:
<option value="${ext}" selected="yes">${ext}</option>
%else:
<option value="${ext}">${ext}</option>
%endif
%endfor
</select>
</%def>
<%
if isinstance( data, trans.app.model.HistoryDatasetAssociation ):
id_name = 'id'
elif isinstance( data, trans.app.model.LibraryFolderDatasetAssociation ):
id_name = 'lid'
if isinstance( data, trans.app.model.HistoryDatasetAssociation ):
id_name = 'id'
elif isinstance( data, trans.app.model.LibraryFolderDatasetAssociation ):
id_name = 'lid'
%>
%if ( id_name == 'id' or trans.app.security_agent.allow_action( trans.user, data.permitted_actions.DATASET_EDIT_METADATA, dataset = data ) ):
<div class="toolForm">
<div class="toolFormTitle">Edit Attributes</div>
<div class="toolFormBody">
<form name="edit_attributes" action="${h.url_for( action='edit' )}" method="post">
<input type="hidden" name="${id_name}" value="${data.id}">
<div class="form-row">
<label>
Name:
</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="text" name="name" value="${data.name}" size="40">
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
<label>
Info:
</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="text" name="info" value="${data.info}" size="40">
</div>
<div style="clear: both"></div>
</div>
%for name, spec in data.metadata.spec.items():
%if spec.visible:
<div class="form-row">
<label>
${spec.desc}:
</label>
<div style="float: left; width: 250px; margin-right: 10px;">
${data.metadata.get_html_by_name( name )}
</div>
<div style="clear: both"></div>
</div>
%endif
%endfor
<div class="form-row">
<input type="submit" name="save" value="Save">
</div>
</form>
<form name="auto_detect" action="${h.url_for( action='edit' )}" method="post">
<input type="hidden" name="${id_name}" value="${data.id}">
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="submit" name="detect" value="Auto-detect">
</div>
<div class="toolParamHelp" style="clear: both;">
This will inspect the dataset and attempt to correct the above column values
if they are not accurate.
</div>
</form>
%if data.missing_meta():
<div class="errormessagesmall">Required metadata values are missing. Some of these values may not be editable by the user. Selecting "Auto-detect" will attempt to fix these values.</div>
%endif
</div>
</div>
<p />
%if id_name == 'id':
<% converters = data.get_converter_types() %>
%if len( converters ) > 0:
<div class="toolForm">
<div class="toolFormTitle">Convert to new format</div>
<div class="toolForm">
<div class="toolFormTitle">Edit Attributes</div>
<div class="toolFormBody">
<form name="convert_data" action="${h.url_for( action='edit' )}" method="post">
<input type="hidden" name="${id_name}" value="${data.id}">
<div class="form-row">
<label>
Convert to:
</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<select name="target_type">
%for key, value in converters.items():
<option value="${key}">${value.name[8:]}</option>
%endfor
</select>
</div>
<div class="toolParamHelp" style="clear: both;">
This will create a new dataset with the contents of this
dataset converted to a new format.
</div>
<div style="clear: both"></div>
<form name="edit_attributes" action="${h.url_for( action='edit' )}" method="post">
<input type="hidden" name="${id_name}" value="${data.id}"/>
<div class="form-row">
<label>
Name:
</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="text" name="name" value="${data.name}" size="40"/>
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
<input type="submit" name="convert_data" value="Convert">
<label>
Info:
</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="text" name="info" value="${data.info}" size="40"/>
</div>
<div style="clear: both"></div>
</div>
%for name, spec in data.metadata.spec.items():
%if spec.visible:
<div class="form-row">
<label>
${spec.desc}:
</label>
<div style="float: left; width: 250px; margin-right: 10px;">
${data.metadata.get_html_by_name( name )}
</div>
<div style="clear: both"></div>
</div>
%endif
%endfor
<div class="form-row">
<input type="submit" name="save" value="Save"/>
</div>
</form>
</div>
</div>
<p />
%endif
%endif
<div class="toolForm">
<div class="toolFormTitle">Change data type</div>
<div class="toolFormBody">
<form name="change_datatype" action="${h.url_for( action='edit' )}" method="post">
<input type="hidden" name="${id_name}" value="${data.id}">
<div class="form-row">
<label>
New Type:
</label>
<div style="float: left; width: 250px; margin-right: 10px;">
${datatype( data, datatypes )}
</div>
<div class="toolParamHelp" style="clear: both;">
This will change the datatype of the existing dataset
but <i>not</i> modify its contents. Use this if Galaxy
has incorrectly guessed the type of your dataset.
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
<input type="submit" name="change" value="Save">
</div>
</form>
</div>
</div>
<p />
%else:
<div class="toolForm">
<div class="toolFormTitle">View Attributes</div>
<div class="toolFormBody">
<div class="form-row">
<strong>Name:</strong> ${data.name}
<div style="clear: both"></div>
<strong>Info:</strong> ${data.info}
<div style="clear: both"></div>
<strong>Data Format:</strong> ${data.ext}
<div style="clear: both"></div>
%for element in metadata:
<strong>${element.spec.desc}:</strong> ${element.value[0]}
<div style="clear: both"></div>
%endfor
</div>
</div>
</div>
<p />
%endif
%if trans.app.security_agent.allow_action( trans.user, data.permitted_actions.DATASET_MANAGE_PERMISSIONS, dataset = data ):
<%namespace file="/dataset/security_common.mako" import="render_permission_form" />
${render_permission_form( data.dataset, h.url_for( action='edit' ), id_name, data.id, trans.user.all_roles() )}
%elif trans.user:
<div class="toolForm">
<div class="toolFormTitle">View permissions</div>
<div class="toolFormBody">
<div class="form-row">
%if data.dataset.actions:
<ul>
%for action, roles in trans.app.security_agent.get_dataset_permissions( data.dataset ).items():
%if roles:
<li>${action.description}</li>
<ul>
%for role in roles:
<li>${role.name}</li>
%endfor
</ul>
%endif
%endfor
</ul>
%else:
<p>This dataset is accessible by everyone (it is public).</p>
<form name="auto_detect" action="${h.url_for( action='edit' )}" method="post">
<input type="hidden" name="${id_name}" value="${data.id}"/>
<div style="float: left; width: 250px; margin-right: 10px;">
<input type="submit" name="detect" value="Auto-detect"/>
</div>
<div class="toolParamHelp" style="clear: both;">
This will inspect the dataset and attempt to correct the above column values if they are not accurate.
</div>
</form>
%if data.missing_meta():
<div class="errormessagesmall">Required metadata values are missing. Some of these values may not be editable by the user. Selecting "Auto-detect" will attempt to fix these values.</div>
%endif
</div>
</div>
</div>
<p />
%if id_name == 'id':
<% converters = data.get_converter_types() %>
%if len( converters ) > 0:
<div class="toolForm">
<div class="toolFormTitle">Convert to new format</div>
<div class="toolFormBody">
<form name="convert_data" action="${h.url_for( action='edit' )}" method="post">
<input type="hidden" name="${id_name}" value="${data.id}"/>
<div class="form-row">
<label>
Convert to:
</label>
<div style="float: left; width: 250px; margin-right: 10px;">
<select name="target_type">
%for key, value in converters.items():
<option value="${key}">${value.name[8:]}</option>
%endfor
</select>
</div>
<div class="toolParamHelp" style="clear: both;">
This will create a new dataset with the contents of this dataset converted to a new format.
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
<input type="submit" name="convert_data" value="Convert"/>
</div>
</form>
</div>
</div>
<p />
%endif
%endif
<div class="toolForm">
<div class="toolFormTitle">Change data type</div>
<div class="toolFormBody">
<form name="change_datatype" action="${h.url_for( action='edit' )}" method="post">
<input type="hidden" name="${id_name}" value="${data.id}"/>
<div class="form-row">
<label>
New Type:
</label>
<div style="float: left; width: 250px; margin-right: 10px;">
${datatype( data, datatypes )}
</div>
<div class="toolParamHelp" style="clear: both;">
This will change the datatype of the existing dataset
but <i>not</i> modify its contents. Use this if Galaxy
has incorrectly guessed the type of your dataset.
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
<input type="submit" name="change" value="Save"/>
</div>
</form>
</div>
</div>
<p />
%else:
<div class="toolForm">
<div class="toolFormTitle">View Attributes</div>
<div class="toolFormBody">
<div class="form-row">
<strong>Name:</strong> ${data.name}
<div style="clear: both"></div>
<strong>Info:</strong> ${data.info}
<div style="clear: both"></div>
<strong>Data Format:</strong> ${data.ext}
<div style="clear: both"></div>
%for element in metadata:
<strong>${element.spec.desc}:</strong> ${element.value[0]}
<div style="clear: both"></div>
%endfor
</div>
</div>
</div>
<p />
%endif
%if trans.app.security_agent.allow_action( trans.user, data.permitted_actions.DATASET_MANAGE_PERMISSIONS, dataset = data ):
<%namespace file="/dataset/security_common.mako" import="render_permission_form" />
${render_permission_form( data.dataset, data.name, h.url_for( action='edit' ), id_name, data.id, trans.user.all_roles() )}
%elif trans.user:
<div class="toolForm">
<div class="toolFormTitle">View permissions</div>
<div class="toolFormBody">
<div class="form-row">
%if data.dataset.actions:
<ul>
%for action, roles in trans.app.security_agent.get_dataset_permissions( data.dataset ).items():
%if roles:
<li>${action.description}</li>
<ul>
%for role in roles:
<li>${role.name}</li>
%endfor
</ul>
%endif
%endfor
</ul>
%else:
<p>This dataset is accessible by everyone (it is public).</p>
%endif
</div>
</div>
</div>
%endif
+50 -50
View File
@@ -27,59 +27,59 @@
</div>
</%def>
<%def name="render_permission_form( obj, form_url, id_name, id, all_roles )">
<%
if isinstance( obj, trans.app.model.User ):
current_actions = obj.default_permissions
elif isinstance( obj, trans.app.model.History ):
current_actions = obj.default_permissions
elif isinstance( obj, trans.app.model.Dataset ):
current_actions = obj.actions
else:
current_actions = obj.dataset.actions
%>
<script type="text/javascript">
var q = jQuery.noConflict();
q( document ).ready( function () {
q('.role_add_button').click(function() {
var action = this.id.substring( 0, this.id.lastIndexOf( '_add_button' ) )
var in_select = '#' + action + '_in_select';
var out_select = '#' + action + '_out_select';
return !q(out_select + ' option:selected').remove().appendTo(in_select);
});
q('.role_remove_button').click(function() {
var action = this.id.substring( 0, this.id.lastIndexOf( '_remove_button' ) )
var in_select = '#' + action + '_in_select';
var out_select = '#' + action + '_out_select';
return !q(in_select + ' option:selected').remove().appendTo(out_select);
});
q('form#edit_role_associations').submit(function() {
q('.in_select option').each(function(i) {
q(this).attr("selected", "selected");
<%def name="render_permission_form( obj, obj_name, form_url, id_name, id, all_roles )">
<%
if isinstance( obj, trans.app.model.User ):
current_actions = obj.default_permissions
obj_str = 'user %s' % obj_name
elif isinstance( obj, trans.app.model.History ):
current_actions = obj.default_permissions
obj_str = 'history %s' % obj_name
elif isinstance( obj, trans.app.model.Dataset ):
current_actions = obj.actions
obj_str = 'dataset(s) %s' % obj_name
else:
current_actions = obj.dataset.actions
obj_str = 'unknown object %s' %obj_name
%>
<script type="text/javascript">
var q = jQuery.noConflict();
q( document ).ready( function () {
q( '.role_add_button' ).click( function() {
var action = this.id.substring( 0, this.id.lastIndexOf( '_add_button' ) )
var in_select = '#' + action + '_in_select';
var out_select = '#' + action + '_out_select';
return !q( out_select + ' option:selected' ).remove().appendTo( in_select );
});
q( '.role_remove_button' ).click( function() {
var action = this.id.substring( 0, this.id.lastIndexOf( '_remove_button' ) )
var in_select = '#' + action + '_in_select';
var out_select = '#' + action + '_out_select';
return !q( in_select + ' option:selected' ).remove().appendTo( out_select );
});
q( 'form#edit_role_associations' ).submit( function() {
q( '.in_select option' ).each(function( i ) {
q( this ).attr( "selected", "selected" );
});
});
});
});
</script>
<div class="toolForm">
<div class="toolFormTitle">Associate with roles and set permissions</div>
<div class="toolFormBody">
<form name="edit_role_associations" id="edit_role_associations" action="${form_url}" method="post">
<input type="hidden" name="${id_name}" value="${id}">
<div class="form-row">
</div>
%for k, v in trans.app.model.Dataset.permitted_actions.items():
</script>
<div class="toolForm">
<div class="toolFormTitle">Associate with roles and set permissions on ${obj_str} </div>
<div class="toolFormBody">
<form name="edit_role_associations" id="edit_role_associations" action="${form_url}" method="post">
<input type="hidden" name="${id_name}" value="${id}"/>
<div class="form-row"></div>
%for k, v in trans.app.model.Dataset.permitted_actions.items():
<div class="form-row">
${render_select( current_actions, k, v, all_roles )}
</div>
%endfor
<div class="form-row">
${render_select( current_actions, k, v, all_roles )}
<input type="submit" name="update_roles" value="Save"/>
</div>
%endfor
<div class="form-row">
<input type="submit" name="update_roles" value="Save"/>
</div>
</form>
</form>
</div>
</div>
</div>
<p/>
<p/>
</%def>
+4
View File
@@ -10,6 +10,10 @@ $(function(){
</script>
</%def>
%if header:
${header}
%endif
<div class="toolForm">
<div class="toolFormTitle">${form.title}</div>
<div class="toolFormBody">
+1 -1
View File
@@ -3,5 +3,5 @@
<%namespace file="/dataset/security_common.mako" import="render_permission_form" />
%if trans.user:
${render_permission_form( trans.history, h.url_for(), 'id', None, trans.user.all_roles() )}
${render_permission_form( trans.history, trans.history.name, h.url_for(), 'id', None, trans.user.all_roles() )}
%endif
+81 -59
View File
@@ -1,5 +1,6 @@
<%inherit file="/base.mako"/>
<%namespace file="common.mako" import="render_dataset" />
<%namespace file="/message.mako" import="render_msg" />
<%def name="title()">Import from Library</%def>
<%def name="stylesheets()">
@@ -78,67 +79,88 @@
<![endif]>
<%def name="render_folder( parent, parent_pad )">
<%
if not trans.app.security_agent.check_folder_contents( trans.user, parent ):
return ""
pad = parent_pad + 20
if parent_pad == 0:
expander = "/static/images/silk/resultset_bottom.png"
folder = "/static/images/silk/folder_page.png"
subfolder = False
else:
expander = "/static/images/silk/resultset_next.png"
folder = "/static/images/silk/folder.png"
subfolder = True
%>
<li class="folderRow libraryOrFolderRow" style="padding-left: ${pad}px;">
<div class="rowTitle">
<img src="${h.url_for( expander )}" class="expanderIcon"/><img src="${h.url_for( folder )}" class="rowIcon"/>
${parent.name}
%if parent.description:
<i>- ${parent.description}</i>
%endif
</div>
</li>
%if subfolder:
<ul id="subFolder">
%else:
<ul>
%endif
%for folder in parent.active_folders:
${render_folder( folder, pad )}
%endfor
%for dataset in parent.active_datasets:
%if trans.app.security_agent.allow_action( trans.user, trans.app.security_agent.permitted_actions.DATASET_ACCESS, dataset=dataset.dataset ):
<li class="datasetRow" style="padding-left: ${pad + 18}px;">${render_dataset( dataset )}</li>
%endif
%endfor
<%
if not trans.app.security_agent.check_folder_contents( trans.user, parent ):
return ""
pad = parent_pad + 20
if parent_pad == 0:
expander = "/static/images/silk/resultset_bottom.png"
folder = "/static/images/silk/folder_page.png"
subfolder = False
else:
expander = "/static/images/silk/resultset_next.png"
folder = "/static/images/silk/folder.png"
subfolder = True
%>
<li class="folderRow libraryOrFolderRow" style="padding-left: ${pad}px;">
<div class="rowTitle">
<img src="${h.url_for( expander )}" class="expanderIcon"/><img src="${h.url_for( folder )}" class="rowIcon"/>
${parent.name}
%if parent.description:
<i>- ${parent.description}</i>
%endif
</div>
</li>
%if subfolder:
<ul id="subFolder">
%else:
<ul>
%endif
%for folder in parent.active_folders:
${render_folder( folder, pad )}
%endfor
%for dataset in parent.active_datasets:
%if trans.app.security_agent.allow_action( trans.user, trans.app.security_agent.permitted_actions.DATASET_ACCESS, dataset=dataset.dataset ):
<li class="datasetRow" style="padding-left: ${pad + 18}px;">${render_dataset( dataset )}</li>
%endif
%endfor
</ul>
</%def>
<h2>Libraries</h2>
<form name="import_from_library" action="${h.url_for( '/library/import_datasets' )}" method="post">
<ul>
%for library in libraries:
%if trans.app.security_agent.check_folder_contents( trans.user, library ):
<li class="libraryRow libraryOrFolderRow" id="libraryRow"><div class="rowTitle"><table cellspacing="0" cellpadding="0" border="0" width="100%" class="libraryTitle"><tr>
<th width="*">
<img src="${h.url_for( '/static/images/silk/resultset_bottom.png' )}" class="expanderIcon"/><img src="${h.url_for( '/static/images/silk/book_open.png' )}" class="rowIcon"/>
${library.name}
%if library.description:
<i>- ${library.description}</i>
%if msg:
${render_msg( msg, messagetype )}
%endif
%if not libraries:
No libraries contain datasets that you are allowed to access
%else:
<% can_access = False %>
<form name="import_from_library" action="${h.url_for( '/library/import_datasets' )}" method="post">
<ul>
%for library in libraries:
%if trans.app.security_agent.check_folder_contents( trans.user, library ):
<% can_access = True %>
<li class="libraryRow libraryOrFolderRow" id="libraryRow">
<div class="rowTitle">
<table cellspacing="0" cellpadding="0" border="0" width="100%" class="libraryTitle">
<tr>
<th width="*">
<img src="${h.url_for( '/static/images/silk/resultset_bottom.png' )}" class="expanderIcon"/><img src="${h.url_for( '/static/images/silk/book_open.png' )}" class="rowIcon"/>
${library.name}
%if library.description:
<i>- ${library.description}</i>
%endif
</th>
<th width="100">Format</th>
<th width="50">Db</th>
<th width="200">Info</th>
</tr>
</table>
</div>
</li>
<ul>
${render_folder( library.root_folder, 0 )}
</ul>
<br/>
%endif
%endfor
</ul>
%if can_access:
<input type="submit" class="primary-button" name="import_dataset" value="Import selected datasets"/>
%else:
No libraries contain datasets that you are allowed to access
%endif
</th>
<th width="100">Format</th>
<th width="50">Db</th>
<th width="200">Info</th>
</tr></table></div></li>
<ul>
${render_folder( library.root_folder, 0 )}
</ul>
<br/>
%endif
%endfor
</ul>
<input type="submit" class="primary-button" name="import_dataset" value="Import selected datasets"/>
</form>
</form>
%endif
+64 -80
View File
@@ -17,91 +17,75 @@
<div class="historyItemWrapper historyItem historyItem-${data_state}" id="historyItem-${data.id}">
%endif
## Header row for history items (name, state, action buttons)
## Header row for history items (name, state, action buttons)
<div style="overflow: hidden;" class="historyItemTitleBar">
<div style="float: left; padding-right: 3px;">
<div style='display: none;' id="progress-${data.id}">
<img src="${h.url_for('/static/style/data_running.gif')}" border="0" align="middle" >
</div>
%if data_state == 'running':
<div><img src="${h.url_for('/static/style/data_running.gif')}" border="0" align="middle"></div>
%elif data_state != 'ok':
<div><img src="${h.url_for( "/static/style/data_%s.png" % data_state )}" border="0" align="middle"></div>
%endif
<div style='display: none;' id="progress-${data.id}">
<img src="${h.url_for('/static/style/data_running.gif')}" border="0" align="middle" >
</div>
%if data_state == 'running':
<div><img src="${h.url_for('/static/style/data_running.gif')}" border="0" align="middle"></div>
%elif data_state != 'ok':
<div><img src="${h.url_for( "/static/style/data_%s.png" % data_state )}" border="0" align="middle"></div>
%endif
</div>
<%doc>
<div style="float: right;">
<a href="${h.url_for( controller='dataset', dataset_id=data.id, action='display', filename='index')}" target="galaxy_main"><img src="${h.url_for('/static/images/eye_icon.png')}" rollover="${h.url_for('/static/images/eye_icon_dark.png')}" width='16' height='16' alt='display data' title='display data' class='displayButton' border='0'></a>
<a href="${h.url_for( action='edit', id=data.id )}" target="galaxy_main"><img src="${h.url_for('/static/images/pencil_icon.png')}" rollover="${h.url_for('/static/images/pencil_icon_dark.png')}" width='16' height='16' alt='edit attributes' title='edit attributes' class='editButton' border='0'></a>
<a href="${h.url_for( action='delete', id=data.id )}" class="historyItemDelete" id="historyItemDelter-${data.id}"><img src="${h.url_for('/static/images/delete_icon.png')}" rollover="${h.url_for('/static/images/delete_icon_dark.png')}" width='16' height='16' alt='delete' class='deleteButton' border='0'></a>
</div>
</%doc>
<table cellspacing="0" cellpadding="0" border="0" width="100%"><tr>
<td width="*">
<div style="float: right; padding-right: 2px;">
<a href="${h.url_for( controller='root', action='edit', lid=data.id )}">
<img src="${h.url_for('/static/images/pencil_icon.png')}"
rollover="${h.url_for('/static/images/pencil_icon_dark.png')}"
width='16' height='16' alt='view or edit attributes' title='view or edit attributes'
class='editButton' style='vertical-align: middle' border='0'>
</a>
</div>
<input type="checkbox" name="import_ids" value="${data.id}"/>
<span class="historyItemTitle"><b>${data.display_name()}</b></span>
</td>
<td width="100">${data.ext}</td>
<td width="50"><span class="${data.dbkey}">${data.dbkey}</span></td>
<td width="200">${data.info}</td>
</tr></table>
</div>
## Body for history items, extra info and actions, data "peek"
<div id="info${data.id}" class="historyItemBody">
%if not trans.app.security_agent.allow_action( trans.user, data.permitted_actions.DATASET_ACCESS, dataset = data.dataset ):
<div>You do not have permission to view this dataset.</div>
%else:
<div>
${data.blurb}
</div>
<div>
%if data.has_data:
<a href="${h.url_for( action='display', id=data.id, tofile='yes', toext='data.ext' )}" target="_blank">save</a>
%for display_app in data.datatype.get_display_types():
<% display_links = data.datatype.get_display_links( data, display_app, app, request.base ) %>
%if len( display_links ) > 0:
| ${data.datatype.get_display_label(display_app)}
%for display_name, display_link in display_links:
<a target="_blank" href="${display_link}">${display_name}</a>
%endfor
%endif
%endfor
%endif
</div>
%if data.peek != "no peek":
<div><pre id="peek${data.id}" class="peek">${data.display_peek()}</pre></div>
%endif
%endif
## Recurse for child datasets
%if len( data.children ) > 0:
## FIXME: This should not be in the template, there should
## be a 'visible_children' method on dataset.
<%
children = []
for child in data.children:
if child.visible:
children.append( child )
%>
%if len( children ) > 0:
<div>
There are ${len( children )} secondary datasets.
%for idx, child in enumerate(children):
${render_dataset( child, idx + 1 )}
%endfor
<%doc>
<div style="float: right;">
<a href="${h.url_for( controller='dataset', dataset_id=data.id, action='display', filename='index')}" target="galaxy_main"><img src="${h.url_for('/static/images/eye_icon.png')}" rollover="${h.url_for('/static/images/eye_icon_dark.png')}" width='16' height='16' alt='display data' title='display data' class='displayButton' border='0'></a>
<a href="${h.url_for( action='edit', id=data.id )}" target="galaxy_main"><img src="${h.url_for('/static/images/pencil_icon.png')}" rollover="${h.url_for('/static/images/pencil_icon_dark.png')}" width='16' height='16' alt='edit attributes' title='edit attributes' class='editButton' border='0'></a>
<a href="${h.url_for( action='delete', id=data.id )}" class="historyItemDelete" id="historyItemDelter-${data.id}"><img src="${h.url_for('/static/images/delete_icon.png')}" rollover="${h.url_for('/static/images/delete_icon_dark.png')}" width='16' height='16' alt='delete' class='deleteButton' border='0'></a>
</div>
</%doc>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width="*">
<div style="float: right; padding-right: 2px;">
<a href="${h.url_for( controller='root', action='edit', lid=data.id )}">
<img src="${h.url_for('/static/images/pencil_icon.png')}" rollover="${h.url_for('/static/images/pencil_icon_dark.png')}" width='16' height='16' alt='view or edit attributes' title='view or edit attributes' class='editButton' style='vertical-align: middle' border='0'>
</a>
</div>
<input type="checkbox" name="import_ids" value="${data.id}"/>
<span class="historyItemTitle"><b>${data.display_name()}</b></span>
</td>
<td width="100">${data.ext}</td>
<td width="50"><span class="${data.dbkey}">${data.dbkey}</span></td>
<td width="200">${data.info}</td>
</tr>
</table>
</div>
## Body for history items, extra info and actions, data "peek"
<div id="info${data.id}" class="historyItemBody">
%if not trans.app.security_agent.allow_action( trans.user, data.permitted_actions.DATASET_ACCESS, dataset = data.dataset ):
<div>You do not have permission to view this dataset.</div>
%else:
<div>${data.blurb}</div>
<div>
%if data.has_data:
<a href="${h.url_for( action='display', id=data.id, tofile='yes', toext='data.ext' )}" target="_blank">save</a>
%for display_app in data.datatype.get_display_types():
<% display_links = data.datatype.get_display_links( data, display_app, app, request.base ) %>
%if len( display_links ) > 0:
| ${data.datatype.get_display_label(display_app)}
%for display_name, display_link in display_links:
<a target="_blank" href="${display_link}">${display_name}</a>
%endfor
%endif
%endfor
%endif
</div>
%if data.peek != "no peek":
<div><pre id="peek${data.id}" class="peek">${data.display_peek()}</pre></div>
%endif
</div>
%endif
## Recurse for child datasets
%if len( data.visible_children ) > 0:
<div>
There are ${len( data.visible_children )} secondary datasets.
%for idx, child in enumerate( data.visible_children ):
${render_dataset( child )}
%endfor
</div>
%endif
</div>
</%def>
+36 -25
View File
@@ -1,32 +1,43 @@
<%inherit file="/base.mako"/>
<%def name="javascripts()">
${parent.javascripts()}
<script type="text/javascript">
%if 'masthead' in refresh_frames:
if ( parent.frames && parent.frames.galaxy_masthead ) {
parent.frames.galaxy_masthead.location.href="${h.url_for( controller='root', action='masthead')}";
}
else if ( parent.parent && parent.parent.frames && parent.parent.frames.galaxy_masthead ) {
parent.parent.frames.galaxy_masthead.location.href="${h.url_for( controller='root', action='masthead')}";
}
%endif
%if 'history' in refresh_frames:
if ( parent.frames && parent.frames.galaxy_history ) {
parent.frames.galaxy_history.location.href="${h.url_for( controller='root', action='history')}";
}
%endif
%if 'tools' in refresh_frames:
if ( parent.frames && parent.frames.galaxy_tools ) {
parent.frames.galaxy_tools.location.href="${h.url_for( controller='root', action='tool_menu')}";
}
%endif
${parent.javascripts()}
<script type="text/javascript">
%if 'masthead' in refresh_frames:
if ( parent.frames && parent.frames.galaxy_masthead ) {
parent.frames.galaxy_masthead.location.href="${h.url_for( controller='root', action='masthead')}";
}
else if ( parent.parent && parent.parent.frames && parent.parent.frames.galaxy_masthead ) {
parent.parent.frames.galaxy_masthead.location.href="${h.url_for( controller='root', action='masthead')}";
}
%endif
%if 'history' in refresh_frames:
if ( parent.frames && parent.frames.galaxy_history ) {
parent.frames.galaxy_history.location.href="${h.url_for( controller='root', action='history')}";
if ( parent.force_right_panel ) {
parent.force_right_panel( 'show' );
}
}
%endif
%if 'tools' in refresh_frames:
if ( parent.frames && parent.frames.galaxy_tools ) {
parent.frames.galaxy_tools.location.href="${h.url_for( controller='root', action='tool_menu')}";
if ( parent.force_left_panel ) {
parent.force_left_panel( 'show' );
}
}
%endif
if ( parent.handle_minwidth_hint )
{
parent.handle_minwidth_hint( -1 );
}
</script>
if ( parent.handle_minwidth_hint )
{
parent.handle_minwidth_hint( -1 );
}
</script>
</%def>
<div class="${message_type}message">${message}</div>
## Render a message
<%def name="render_msg( msg, messagetype='done' )">
<div class="${messagetype}message">${msg}</div>
</%def>
+15
View File
@@ -0,0 +1,15 @@
<%inherit file="/base.mako"/>
<%def name="javascripts()">
${parent.javascripts()}
<script type="text/javascript">
if ( parent.force_left_panel ) {
parent.force_left_panel( 'hide' );
}
if ( parent.force_right_panel ) {
parent.force_right_panel( 'hide' );
}
</script>
</%def>
<div class="errormessage">${message}</div>
+14 -5
View File
@@ -6,6 +6,13 @@
self.has_right_panel=True
self.active_view="analysis"
%>
%if trans.app.config.require_login and not trans.user:
<script type="text/javascript">
if ( window != top ) {
top.location.href = location.href;
}
</script>
%endif
</%def>
<%def name="left_panel()">
@@ -13,7 +20,7 @@
<div class='unified-panel-header-inner'>Tools</div>
</div>
<div class="unified-panel-body" style="overflow: hidden;">
<iframe name="galaxy_tools" src="${h.url_for( 'tool_menu' )}" frameborder="0" style="position: absolute; margin: 0; border: 0 none; height: 100%; width: 100%;"> </iframe>
<iframe name="galaxy_tools" src="${h.url_for( controller='root', action='tool_menu' )}" frameborder="0" style="position: absolute; margin: 0; border: 0 none; height: 100%; width: 100%;"> </iframe>
</div>
</%def>
@@ -21,7 +28,9 @@
## If a specific tool id was specified, load it in the middle frame
<%
if tool_id is not None:
if trans.app.config.require_login and not trans.user:
center_url = h.url_for( controller='user', action='login' )
elif tool_id is not None:
center_url = h.url_for( 'tool_runner', tool_id=tool_id, from_noframe=True )
elif m_c is not None:
center_url = h.url_for( controller=m_c, action=m_a )
@@ -37,12 +46,12 @@
<div class="unified-panel-header" unselectable="on">
<div class="unified-panel-header-inner">
<div style="float: right">
<a class='panel-header-button' href="${h.url_for( action='history_options' )}" target="galaxy_main"><span>Options</span></a>
<a class='panel-header-button' href="${h.url_for( controller='root', action='history_options' )}" target="galaxy_main"><span>Options</span></a>
</div>
<div class="panel-header-text">History</div>
</div>
</div>
<div class="unified-panel-body" style="overflow: hidden;">
<iframe name="galaxy_history" width="100%" height="100%" frameborder="0" style="position: absolute; margin: 0; border: 0 none; height: 100%;" src="${h.url_for( action='history' )}"></iframe>
<iframe name="galaxy_history" width="100%" height="100%" frameborder="0" style="position: absolute; margin: 0; border: 0 none; height: 100%;" src="${h.url_for( controller='root', action='history' )}"></iframe>
</div>
</%def>
</%def>
+32 -23
View File
@@ -16,27 +16,29 @@
<img border="0" src="${h.url_for('/static/images/galaxyIcon_noText.png')}"></a></td>
<td align="left" valign="middle"><div class="pageTitle">Galaxy${brand}</div></td>
<td align="right" valign="middle">
View: <span class="link-group">
<span
%if active_view == "analysis":
class="active-link"
%if not app.config.require_login or ( app.config.require_login and trans.user):
View: <span class="link-group">
<span
%if active_view == "analysis":
class="active-link"
%endif
><a target="_parent" href="${h.url_for( controller='root', action='index' )}">analysis</a></span>
| <span
%if active_view == "workflow":
class="active-link"
%endif
><a target="_parent" href="${h.url_for( controller='workflow', action='index' )}">workflow</a></span>
%if admin_user == "true":
| <span
%if active_view == "admin":
class="active-link"
%endif
><a target="_parent" href="${h.url_for( controller='admin', action='index' )}">admin</a></span>
%endif
><a target="_parent" href="${h.url_for( controller='root', action='index' )}">analysis</a></span>
| <span
%if active_view == "workflow":
class="active-link"
%endif
><a target="_parent" href="${h.url_for( controller='workflow', action='index' )}">workflow</a></span>
%if admin_user == "true":
| <span
%if active_view == "admin":
class="active-link"
%endif
><a target="_parent" href="${h.url_for( controller='admin', action='index' )}">admin</a></span>
%endif
</span>
&nbsp;&nbsp;&nbsp;
</span>
&nbsp;&nbsp;&nbsp;
%endif
<span class="link-group">
Info: <span><a href="${bugs_email}">report bugs</a></span>
| <span><a target="_blank" href="${wiki_url}">wiki</a></span>
@@ -51,10 +53,17 @@
%else:
%if t.user:
Logged in as ${t.user.email}: <span><a target="galaxy_main" href="${h.url_for( controller='user', action='index' )}">manage</a></span>
| <span><a target="galaxy_main" href="${h.url_for( controller='user', action='logout' )}">logout</a></span>
%if app.config.require_login:
| <span><a target="_parent" href="${h.url_for( controller='root', action='index', m_c='user', m_a='logout' )}">logout</a></span>
%else:
| <span><a target="galaxy_main" href="${h.url_for( controller='user', action='logout' )}">logout</a></span>
%endif
%else:
Account: <span><a target="galaxy_main" href="${h.url_for( controller='user', action='create' )}">create</a></span>
| <span><a target="galaxy_main" href="${h.url_for( controller='user', action='login' )}">login</a></span>
Account:
%if app.config.allow_user_creation:
<span><a target="galaxy_main" href="${h.url_for( controller='user', action='create' )}">create</a></span> |
%endif
<span><a target="galaxy_main" href="${h.url_for( controller='user', action='login' )}">login</a></span>
%endif
%endif
&nbsp;
+1 -1
View File
@@ -3,5 +3,5 @@
<%namespace file="/dataset/security_common.mako" import="render_permission_form" />
%if trans.user:
${render_permission_form( trans.user, h.url_for(), 'id', None, trans.user.all_roles() )}
${render_permission_form( trans.user, trans.user.email, h.url_for(), 'id', None, trans.user.all_roles() )}
%endif
+25
View File
@@ -0,0 +1,25 @@
chr1 147962006 147975713 NM_005997 0 - 147962192 147975670 0 6 574,145,177,115,153,160, 0,1543,7859,9048,9340,13547,
chr1 147984101 148035079 BC007833 0 + 147984545 148033414 0 14 529,32,81,131,118,153,300,206,84,49,85,130,46,1668, 0,25695,28767,33118,33695,33998,35644,38005,39629,40577,41402,43885,48367,49310,
chr1 148077485 148111797 NM_002651 0 - 148078400 148111728 0 12 1097,121,133,266,124,105,110,228,228,45,937,77, 0,2081,2472,6871,9907,10257,11604,14199,15637,18274,23636,34235,
chr1 148185113 148187485 NM_002796 0 + 148185136 148187378 0 7 163,207,147,82,117,89,120, 0,416,877,1199,1674,1977,2252,
chr2 118288484 118306183 NM_006773 0 + 118288583 118304530 0 14 184,285,144,136,101,200,115,140,162,153,114,57,178,1796, 0,2765,4970,6482,6971,7183,7468,9890,10261,10768,11590,14270,14610,15903,
chr2 118389378 118390700 BC005078 0 - 118390395 118390500 0 1 1322, 0,
chr2 220108603 220116964 NM_001927 0 + 220108689 220116217 0 9 664,61,96,162,126,221,44,83,789, 0,1718,1874,2118,2451,2963,5400,7286,7572,
chr2 220229182 220233943 NM_024536 0 - 220229609 220233765 0 4 1687,180,574,492, 0,1990,2660,4269,
chr5 131170738 131357870 AF099740 0 - 131311206 131357817 0 31 112,124,120,81,65,40,120,129,61,88,94,79,72,102,144,117,89,73,96,135,135,78,74,52,33,179,100,102,65,115,248, 0,11593,44117,47607,104668,109739,114675,126366,135488,137518,138009,140437,152389,153373,155388,159269,160793,162981,164403,165577,166119,167611,169501,178260,179675,180901,181658,182260,182953,183706,186884,
chr5 131424245 131426795 NM_000588 0 + 131424298 131426383 0 5 215,42,90,42,535, 0,313,1658,1872,2015,
chr5 131556201 131590458 NM_004199 0 - 131556601 131582218 0 15 471,97,69,66,54,100,71,177,194,240,138,152,97,100,170, 0,2316,2802,5596,6269,11138,11472,15098,16528,17674,21306,24587,25142,25935,34087,
chr5 131621285 131637046 NM_003687 0 + 131621326 131635821 0 7 134,152,82,179,164,118,1430, 0,4915,8770,13221,13609,14097,14331,
chr6 108298214 108386086 NM_007214 0 - 108299600 108385906 0 21 1530,105,99,102,159,174,60,83,148,155,93,133,95,109,51,59,62,113,115,100,304, 0,2490,6246,10831,12670,23164,23520,27331,31052,32526,34311,36130,36365,38609,41028,42398,43048,51479,54500,59097,87568,
chr6 108593954 108616704 NM_003269 0 + 108594662 108615360 0 9 733,146,88,236,147,97,150,106,1507, 0,5400,8778,10445,12037,14265,14749,15488,21243,
chr6 108639410 108689143 NM_152827 0 - 108640045 108688818 0 3 741,125,487, 0,2984,49246,
chr6 108722790 108950942 NM_145315 0 + 108722976 108950321 0 13 325,224,52,102,131,100,59,83,71,101,141,114,750, 0,28931,52094,60760,61796,71339,107102,152319,181970,182297,215317,224802,227402,
chr7 113320332 113924911 AK131266 0 + 113862563 113893433 0 20 285,91,178,90,58,75,138,51,201,178,214,105,88,84,77,102,122,70,164,1124, 0,201692,340175,448290,451999,484480,542213,543265,543478,545201,556083,558358,565876,567599,573029,573245,575738,577123,577946,603455,
chr7 116511232 116557294 NM_003391 0 - 116512159 116556994 0 5 1157,265,278,227,383, 0,20384,37843,43339,45679,
chr7 116713967 116902666 NM_000492 0 + 116714099 116901113 0 27 185,111,109,216,90,164,126,247,93,183,192,95,87,724,129,38,251,80,151,228,101,249,156,90,173,106,1754, 0,24290,29071,50936,54313,55285,56585,60137,62053,68678,79501,107776,110390,111971,114967,122863,123569,126711,130556,131618,134650,147559,162475,172879,184725,185496,186945,
chr7 116944658 117107512 AF377960 0 - 116945541 116979926 0 23 1129,102,133,64,186,206,179,188,153,100,87,80,96,276,118,255,151,100,204,1654,225,108,173, 0,7364,8850,10413,13893,14398,17435,24259,24615,35177,35359,45901,47221,49781,56405,66857,69787,72208,73597,80474,100111,150555,162681,
chr8 118880786 119193239 NM_000127 0 - 118881131 119192466 0 11 531,172,161,90,96,119,133,120,108,94,1735, 0,5355,7850,13505,19068,20309,23098,30863,36077,37741,310718,
chr9 128763240 128783870 NM_174933 0 + 128764156 128783586 0 12 261,118,74,159,76,48,56,63,129,117,127,370, 0,522,875,5630,12374,12603,15040,15175,18961,19191,20037,20260,
chr9 128787362 128789566 NM_014908 0 - 128787519 128789136 0 1 2204, 0,
chr9 128789530 128848928 NM_015354 0 + 128789552 128848511 0 44 54,55,74,85,81,45,93,120,212,115,201,90,66,120,127,153,127,88,77,115,121,67,129,140,107,207,170,70,68,196,78,86,146,182,201,93,159,138,75,228,132,74,130,594, 0,1491,5075,8652,9254,10312,11104,11317,20808,21702,23060,25462,31564,32908,33566,34851,35204,35595,35776,37202,38860,39111,39891,40349,42422,45499,45827,46675,47158,47621,50453,50840,51474,51926,53831,54186,55119,55619,57449,57605,57947,58352,58541,58804,
chr9 128849867 128870133 NM_020145 0 - 128850516 128869987 0 11 757,241,101,90,24,63,93,134,129,142,209, 0,1071,1736,2085,2635,4201,6376,6736,13056,14247,20057,
+1
View File
@@ -0,0 +1 @@
chr22 30128507 31828507 uc003bnx.1_cds_2_0_chr22_29227_f 0 +
+134
View File
@@ -0,0 +1,134 @@
chr7 115444712 115444739 CCDS5763.1_cds_0_0_chr7_115444713_f 0 +
chr7 115468538 115468624 CCDS5763.1_cds_1_0_chr7_115468539_f 0 +
chr7 115483024 115483277 CCDS5763.1_cds_2_0_chr7_115483025_f 0 +
chr7 115484165 115484501 CCDS5763.1_cds_3_0_chr7_115484166_f 0 +
chr7 115485764 115485980 CCDS5763.1_cds_4_0_chr7_115485765_f 0 +
chr7 115486322 115486481 CCDS5763.1_cds_5_0_chr7_115486323_f 0 +
chr7 115491298 115491487 CCDS5763.1_cds_6_0_chr7_115491299_f 0 +
chr7 115468538 115468624 CCDS5764.1_cds_0_0_chr7_115468539_f 0 +
chr7 115483024 115483277 CCDS5764.1_cds_1_0_chr7_115483025_f 0 +
chr7 115484165 115484501 CCDS5764.1_cds_2_0_chr7_115484166_f 0 +
chr7 115485764 115485980 CCDS5764.1_cds_3_0_chr7_115485765_f 0 +
chr7 115486322 115486481 CCDS5764.1_cds_4_0_chr7_115486323_f 0 +
chr7 115491298 115491487 CCDS5764.1_cds_5_0_chr7_115491299_f 0 +
chr7 115733786 115733936 CCDS5766.1_cds_0_0_chr7_115733787_f 0 +
chr7 115734264 115734452 CCDS5766.1_cds_1_0_chr7_115734265_f 0 +
chr7 115739975 115740126 CCDS5766.1_cds_2_0_chr7_115739976_f 0 +
chr7 115733786 115733936 CCDS5765.1_cds_0_0_chr7_115733787_f 0 +
chr7 115739975 115740164 CCDS5765.1_cds_1_0_chr7_115739976_f 0 +
chr7 115759067 115759097 CCDS5767.1_cds_0_0_chr7_115759068_f 0 +
chr7 115760529 115760694 CCDS5767.1_cds_1_0_chr7_115760530_f 0 +
chr7 115792950 115793292 CCDS5767.1_cds_2_0_chr7_115792951_f 0 +
chr7 116096616 116096655 CCDS5768.1_cds_0_0_chr7_116096617_f 0 +
chr7 116122131 116122195 CCDS5768.1_cds_1_0_chr7_116122132_f 0 +
chr7 116126998 116127050 CCDS5768.1_cds_2_0_chr7_116126999_f 0 +
chr7 116132776 116132840 CCDS5768.1_cds_3_0_chr7_116132777_f 0 +
chr7 116138181 116138388 CCDS5768.1_cds_4_0_chr7_116138182_f 0 +
chr7 116140267 116140347 CCDS5768.1_cds_5_0_chr7_116140268_f 0 +
chr7 116144237 116144316 CCDS5768.1_cds_6_0_chr7_116144238_f 0 +
chr7 116146073 116146145 CCDS5768.1_cds_7_0_chr7_116146074_f 0 +
chr7 116150064 116150127 CCDS5768.1_cds_8_0_chr7_116150065_f 0 +
chr7 116151731 116151872 CCDS5768.1_cds_9_0_chr7_116151732_f 0 +
chr7 116187545 116187696 CCDS5770.1_cds_0_0_chr7_116187546_f 0 +
chr7 116333766 116333849 CCDS5770.1_cds_1_0_chr7_116333767_f 0 +
chr7 116353565 116353725 CCDS5770.1_cds_2_0_chr7_116353566_f 0 +
chr7 116363797 116363852 CCDS5770.1_cds_3_0_chr7_116363798_f 0 +
chr7 116364495 116364611 CCDS5770.1_cds_4_0_chr7_116364496_f 0 +
chr7 116365889 116365965 CCDS5770.1_cds_5_0_chr7_116365890_f 0 +
chr7 116368128 116368197 CCDS5770.1_cds_6_0_chr7_116368129_f 0 +
chr7 116370085 116370240 CCDS5770.1_cds_7_0_chr7_116370086_f 0 +
chr7 116372439 116372537 CCDS5770.1_cds_8_0_chr7_116372440_f 0 +
chr7 116404866 116404981 CCDS5770.1_cds_9_0_chr7_116404867_f 0 +
chr7 116423325 116423398 CCDS5770.1_cds_10_0_chr7_116423326_f 0 +
chr7 116424838 116424941 CCDS5770.1_cds_11_0_chr7_116424839_f 0 +
chr7 116443791 116443942 CCDS5770.1_cds_12_0_chr7_116443792_f 0 +
chr7 116453088 116453181 CCDS5770.1_cds_13_0_chr7_116453089_f 0 +
chr7 116455927 116456067 CCDS5770.1_cds_14_0_chr7_116455928_f 0 +
chr7 116456865 116456985 CCDS5770.1_cds_15_0_chr7_116456866_f 0 +
chr7 116187545 116187696 CCDS5769.1_cds_0_0_chr7_116187546_f 0 +
chr7 116333766 116333849 CCDS5769.1_cds_1_0_chr7_116333767_f 0 +
chr7 116353565 116353725 CCDS5769.1_cds_2_0_chr7_116353566_f 0 +
chr7 116363797 116363852 CCDS5769.1_cds_3_0_chr7_116363798_f 0 +
chr7 116364495 116364611 CCDS5769.1_cds_4_0_chr7_116364496_f 0 +
chr7 116365889 116365965 CCDS5769.1_cds_5_0_chr7_116365890_f 0 +
chr7 116370085 116370240 CCDS5769.1_cds_6_0_chr7_116370086_f 0 +
chr7 116372439 116372537 CCDS5769.1_cds_7_0_chr7_116372440_f 0 +
chr7 116404866 116404981 CCDS5769.1_cds_8_0_chr7_116404867_f 0 +
chr7 116423325 116423398 CCDS5769.1_cds_9_0_chr7_116423326_f 0 +
chr7 116424838 116424941 CCDS5769.1_cds_10_0_chr7_116424839_f 0 +
chr7 116443791 116443942 CCDS5769.1_cds_11_0_chr7_116443792_f 0 +
chr7 116453088 116453181 CCDS5769.1_cds_12_0_chr7_116453089_f 0 +
chr7 116455927 116456067 CCDS5769.1_cds_13_0_chr7_116455928_f 0 +
chr7 116463766 116463862 CCDS5769.1_cds_14_0_chr7_116463767_f 0 +
chr7 116512159 116512389 CCDS5771.1_cds_0_0_chr7_116512160_r 0 -
chr7 116531616 116531881 CCDS5771.1_cds_1_0_chr7_116531617_r 0 -
chr7 116549075 116549353 CCDS5771.1_cds_2_0_chr7_116549076_r 0 -
chr7 116554571 116554798 CCDS5771.1_cds_3_0_chr7_116554572_r 0 -
chr7 116556911 116556994 CCDS5771.1_cds_4_0_chr7_116556912_r 0 -
chr7 116597600 116597753 CCDS5772.1_cds_0_0_chr7_116597601_r 0 -
chr7 116601356 116601470 CCDS5772.1_cds_1_0_chr7_116601357_r 0 -
chr7 116602616 116602722 CCDS5772.1_cds_2_0_chr7_116602617_r 0 -
chr7 116613942 116614052 CCDS5772.1_cds_3_0_chr7_116613943_r 0 -
chr7 116615015 116615072 CCDS5772.1_cds_4_0_chr7_116615016_r 0 -
chr7 116616073 116616149 CCDS5772.1_cds_5_0_chr7_116616074_r 0 -
chr7 116616990 116617115 CCDS5772.1_cds_6_0_chr7_116616991_r 0 -
chr7 116618730 116618865 CCDS5772.1_cds_7_0_chr7_116618731_r 0 -
chr7 116619702 116619814 CCDS5772.1_cds_8_0_chr7_116619703_r 0 -
chr7 116654167 116654279 CCDS5772.1_cds_9_0_chr7_116654168_r 0 -
chr7 116656241 116656364 CCDS5772.1_cds_10_0_chr7_116656242_r 0 -
chr7 116660840 116660940 CCDS5772.1_cds_11_0_chr7_116660841_r 0 -
chr7 116661360 116661465 CCDS5772.1_cds_12_0_chr7_116661361_r 0 -
chr7 116714099 116714152 CCDS5773.1_cds_0_0_chr7_116714100_f 0 +
chr7 116738257 116738368 CCDS5773.1_cds_1_0_chr7_116738258_f 0 +
chr7 116743038 116743147 CCDS5773.1_cds_2_0_chr7_116743039_f 0 +
chr7 116764903 116765119 CCDS5773.1_cds_3_0_chr7_116764904_f 0 +
chr7 116768280 116768370 CCDS5773.1_cds_4_0_chr7_116768281_f 0 +
chr7 116769252 116769416 CCDS5773.1_cds_5_0_chr7_116769253_f 0 +
chr7 116770552 116770678 CCDS5773.1_cds_6_0_chr7_116770553_f 0 +
chr7 116774104 116774351 CCDS5773.1_cds_7_0_chr7_116774105_f 0 +
chr7 116776020 116776113 CCDS5773.1_cds_8_0_chr7_116776021_f 0 +
chr7 116782645 116782828 CCDS5773.1_cds_9_0_chr7_116782646_f 0 +
chr7 116793468 116793660 CCDS5773.1_cds_10_0_chr7_116793469_f 0 +
chr7 116821743 116821838 CCDS5773.1_cds_11_0_chr7_116821744_f 0 +
chr7 116824357 116824444 CCDS5773.1_cds_12_0_chr7_116824358_f 0 +
chr7 116825938 116826662 CCDS5773.1_cds_13_0_chr7_116825939_f 0 +
chr7 116828934 116829063 CCDS5773.1_cds_14_0_chr7_116828935_f 0 +
chr7 116836830 116836868 CCDS5773.1_cds_15_0_chr7_116836831_f 0 +
chr7 116837536 116837787 CCDS5773.1_cds_16_0_chr7_116837537_f 0 +
chr7 116840678 116840758 CCDS5773.1_cds_17_0_chr7_116840679_f 0 +
chr7 116844523 116844674 CCDS5773.1_cds_18_0_chr7_116844524_f 0 +
chr7 116845585 116845813 CCDS5773.1_cds_19_0_chr7_116845586_f 0 +
chr7 116848617 116848718 CCDS5773.1_cds_20_0_chr7_116848618_f 0 +
chr7 116861526 116861775 CCDS5773.1_cds_21_0_chr7_116861527_f 0 +
chr7 116876442 116876598 CCDS5773.1_cds_22_0_chr7_116876443_f 0 +
chr7 116886846 116886936 CCDS5773.1_cds_23_0_chr7_116886847_f 0 +
chr7 116898692 116898865 CCDS5773.1_cds_24_0_chr7_116898693_f 0 +
chr7 116899463 116899569 CCDS5773.1_cds_25_0_chr7_116899464_f 0 +
chr7 116900912 116901113 CCDS5773.1_cds_26_0_chr7_116900913_f 0 +
chr7 116945541 116945787 CCDS5774.1_cds_0_0_chr7_116945542_r 0 -
chr7 116952022 116952124 CCDS5774.1_cds_1_0_chr7_116952023_r 0 -
chr7 116953508 116953641 CCDS5774.1_cds_2_0_chr7_116953509_r 0 -
chr7 116955071 116955135 CCDS5774.1_cds_3_0_chr7_116955072_r 0 -
chr7 116958551 116958737 CCDS5774.1_cds_4_0_chr7_116958552_r 0 -
chr7 116959056 116959262 CCDS5774.1_cds_5_0_chr7_116959057_r 0 -
chr7 116962093 116962272 CCDS5774.1_cds_6_0_chr7_116962094_r 0 -
chr7 116968917 116969105 CCDS5774.1_cds_7_0_chr7_116968918_r 0 -
chr7 116969273 116969426 CCDS5774.1_cds_8_0_chr7_116969274_r 0 -
chr7 116979835 116979935 CCDS5774.1_cds_9_0_chr7_116979836_r 0 -
chr7 116980017 116980104 CCDS5774.1_cds_10_0_chr7_116980018_r 0 -
chr7 116990559 116990639 CCDS5774.1_cds_11_0_chr7_116990560_r 0 -
chr7 116991879 116991975 CCDS5774.1_cds_12_0_chr7_116991880_r 0 -
chr7 116994439 116994715 CCDS5774.1_cds_13_0_chr7_116994440_r 0 -
chr7 117001063 117001181 CCDS5774.1_cds_14_0_chr7_117001064_r 0 -
chr7 117011515 117011770 CCDS5774.1_cds_15_0_chr7_117011516_r 0 -
chr7 117014445 117014596 CCDS5774.1_cds_16_0_chr7_117014446_r 0 -
chr7 117016866 117016966 CCDS5774.1_cds_17_0_chr7_117016867_r 0 -
chr7 117018255 117018459 CCDS5774.1_cds_18_0_chr7_117018256_r 0 -
chr7 117025132 117026786 CCDS5774.1_cds_19_0_chr7_117025133_r 0 -
chr7 117044769 117044994 CCDS5774.1_cds_20_0_chr7_117044770_r 0 -
chr7 117095213 117095321 CCDS5774.1_cds_21_0_chr7_117095214_r 0 -
chr7 117107339 117107420 CCDS5774.1_cds_22_0_chr7_117107340_r 0 -
chr5 131424298 131424460 CCDS4149.1_cds_0_0_chr5_131424299_f 0 +
chr5 131424558 131424600 CCDS4149.1_cds_1_0_chr5_131424559_f 0 +
chr5 131425903 131425993 CCDS4149.1_cds_2_0_chr5_131425904_f 0 +
chr5 131426117 131426159 CCDS4149.1_cds_3_0_chr5_131426118_f 0 +
+70 -1
View File
@@ -562,6 +562,7 @@ class TwillTestCase( unittest.TestCase ):
tc.fv( "1", "4", group_id ) # form field 4 is the check box named 'groups'
tc.submit( "create_role_button" )
except AssertionError, err:
self.home()
errmsg = 'Exception caught attempting to create role: %s' % str( err )
raise AssertionError( errmsg )
self.home()
@@ -601,6 +602,7 @@ class TwillTestCase( unittest.TestCase ):
tc.fv( "1", "3", role_id ) # form field 3 is the check box named 'roles'
tc.submit( "create_group_button" )
except AssertionError, err:
self.home()
errmsg = 'Exception caught attempting to create group: %s' % str( err )
raise AssertionError( errmsg )
self.home()
@@ -616,6 +618,7 @@ class TwillTestCase( unittest.TestCase ):
tc.fv( "1", "1", user_id ) # form field 1 is the check box named 'members'
tc.submit( "group_members_edit_button" )
except AssertionError, err:
self.home()
raise AssertionError( 'Exception caught attempting to create group: %s' % str( err ) )
self.home()
def associate_groups_with_role( self, role_id, group_ids=[] ):
@@ -631,6 +634,7 @@ class TwillTestCase( unittest.TestCase ):
tc.submit( "groups_add_button" )
tc.submit( "role_button" )
except AssertionError, err:
self.home()
raise AssertionError( 'Exception caught attempting to associated groups with a role: %s' % str( err ) )
except:
pass
@@ -667,9 +671,10 @@ class TwillTestCase( unittest.TestCase ):
tc.fv( "1", "2", description ) # form field 1 is the field named name...
tc.submit( "create_library_button" )
except AssertionError, err:
self.home()
raise AssertionError( 'Exception caught attempting to create library: %s' % str( err ) )
self.home()
def rename_library( self, library_id, name='New Test Library Renamed', description='New Test Library Description Re-described' ):
def rename_library( self, library_id, name='New Test Library Renamed', description='New Test Library Description Re-described', root_folder='' ):
"""Rename a library"""
try:
self.visit_url( "%s/admin/library?rename=True&id=%s" % ( self.url, library_id ) )
@@ -677,8 +682,11 @@ class TwillTestCase( unittest.TestCase ):
self.check_page_for_string( 'Edit library name and description' )
tc.fv( "1", "name", name ) # form field 1 is the field named name...
tc.fv( "1", "description", description ) # form field 2 is the field named description...
if root_folder:
tc.fv( "1", "root_folder", root_folder )
tc.submit( "rename_library_button" )
except AssertionError, err:
self.home()
raise AssertionError( 'Exception caught attempting to rename a library: %s' % str( err ) )
self.home()
def add_folder( self, folder_id, name='New Test Folder', description='New Test Folder Description' ):
@@ -691,6 +699,7 @@ class TwillTestCase( unittest.TestCase ):
tc.fv( "1", "description", description ) # form field 2 is the field named description...
tc.submit( "new_folder_button" )
except AssertionError, err:
self.home()
raise AssertionError( 'Exception caught attempting to create a new folder: %s' % str( err ) )
self.home()
def rename_folder( self, folder_id, name='New Test Folder Renamed', description='New Test Folder Description Re-described' ):
@@ -703,6 +712,7 @@ class TwillTestCase( unittest.TestCase ):
tc.fv( "1", "description", description ) # form field 2 is the field named description...
tc.submit( "rename_folder_button" )
except AssertionError, err:
self.home()
raise AssertionError( 'Exception caught attempting to rename a library: %s' % str( err ) )
self.home()
def add_dataset( self, filename, folder_id, extension='auto', dbkey='hg18', roles=[] ):
@@ -719,9 +729,68 @@ class TwillTestCase( unittest.TestCase ):
for role_id in roles:
tc.fv( "1", "roles", role_id ) # form field 7 is the select list named out_groups, note the buttons...
tc.submit( "new_dataset_button" )
self.last_page()
self.check_page_for_string( '1 new datasets added to the library ( each is selected below )' )
except AssertionError, err:
self.home()
raise AssertionError( 'Exception caught attempting to create add a dataset to a folder: %s' % str( err ) )
self.home()
def add_dataset_to_folder_from_history( self, folder_id ):
"""Copy a dataset from the current history to a library folder"""
try:
# Create a new history
self.new_history()
self.upload_file( "1.bed" )
self.verify_dataset_correctness( "1.bed" )
self.visit_url( "%s/admin/add_dataset_to_folder_from_history?folder_id=%s" % ( self.url, folder_id ) )
self.last_page()
self.check_page_for_string( 'Active datasets in your current history' )
tc.fv( "1", "folder_id", folder_id )
tc.fv( "1", "ids", "1" )
tc.submit( "add_dataset_from_history_button" )
self.last_page()
self.check_page_for_string( 'Added the following datasets to the library folder: 1.bed' )
except AssertionError, err:
self.home()
raise AssertionError( 'Exception caught attempting to create add a dataset to a folder: %s' % str( err ) )
self.home()
def add_datasets_from_library_dir( self, folder_id, extension='auto', dbkey='hg18', roles=[] ):
"""Add a directory of datasets to a folder"""
try:
self.visit_url( "%s/admin/dataset?folder_id=%s" % ( self.url, folder_id ) )
self.last_page()
self.check_page_for_string( 'Create a new library dataset' )
tc.fv( "1", "folder_id", folder_id )
tc.fv( "1", "extension", extension )
tc.fv( "1", "dbkey", dbkey )
library_dir = "%s" % self.file_dir
tc.fv( "1", "server_dir", "library" )
for role_id in roles:
tc.fv( "1", "roles", role_id )
tc.submit( "new_dataset_button" )
self.last_page()
self.check_page_for_string( '3 new datasets added to the library ( each is selected below )' )
self.check_page_for_string( "3.bed" )
self.check_page_for_string( "4.bed" )
self.check_page_for_string( "5.bed" )
tc.submit( "action_on_datasets_button" )
self.last_page()
self.check_page_for_string( '( 3 of them )' )
self.check_page_for_string( 'New Test Role' )
self.check_page_for_string( 'Another Test Role' )
tc.find( "update_roles" )
# NOTE: we cannot submit the form because of a bug in twill ( it cannot handle select lists
# that include no option fields. Since the "manage permissions" and "edit metadata" select
# lists have no options ( no roles associated ), submitting the form will throw a
# ParseError: <unprintable ParseError object> exception. Uncomment the following 3 lines
# when twill fixes this bug...
# tc.submit( "update_roles" )
# self.last_page()
# self.check_page_for_string( 'Libraries' )
except AssertionError, err:
self.home()
raise AssertionError( 'Exception caught attempting to create add a directory of datasets to a folder: %s' % str( err ) )
self.home()
def mark_library_deleted( self, library_id ):
"""Mark a library as deleted"""
self.visit_url( "%s/admin/library?id=%s&delete=True" % ( self.url, library_id ) )
+1
View File
@@ -75,6 +75,7 @@ def setup():
log_destination = "stdout",
use_heartbeat=False,
admin_users = 'test@bx.psu.edu',
library_import_dir = galaxy_test_file_dir,
global_conf= { "__file__": "universe_wsgi.ini.sample" } )
log.info( "Embedded Universe application started" )
+39 -23
View File
@@ -40,7 +40,7 @@ class TestHistory( TwillTestCase ):
self.check_page_for_string( security_msg )
self.visit_url( "%s/admin/dataset" % self.url )
self.check_page_for_string( security_msg )
def test_05_login_as_admin( self ):
def test_03_login_as_admin( self ):
"""Testing logging in as an admin user"""
self.login( email='test@bx.psu.edu' ) #This is configured as our admin user
self.visit_page( "admin" )
@@ -72,7 +72,7 @@ class TestHistory( TwillTestCase ):
self.visit_page( "admin" )
self.check_page_for_string( security_msg )
self.logout()
def test_10_create_role( self ):
def test_06_create_role( self ):
"""Testing creating new non-private role with 2 members"""
self.login( email=testuser1.email )
self.create_role( user_ids=[ str( testuser1.id ), str( testuser2.id ) ] )
@@ -80,14 +80,14 @@ class TestHistory( TwillTestCase ):
# Get the role object for later tests
global new_test_role
new_test_role = galaxy.model.Role.filter( galaxy.model.Role.table.c.name==name ).first()
def test_15_create_group( self ):
def test_09_create_group( self ):
"""Testing creating new group with 2 members and 1 associated role"""
name = 'New Test Group'
self.create_group( name=name, user_ids=[ str( testuser1.id ), str( testuser2.id ) ], role_ids=[ str( new_test_role.id ) ] )
# Get the group object for later tests
global new_test_group
new_test_group = galaxy.model.Group.filter( galaxy.model.Group.table.c.name==name ).first()
def test_20_add_group_member( self ):
def test_12_add_group_member( self ):
"""Testing editing membership of an existing group"""
name = 'Another Test Group'
self.create_group( name=name )
@@ -97,7 +97,7 @@ class TestHistory( TwillTestCase ):
self.add_group_members( str( another_test_group.id ), [ str( testuser3.id ) ] )
self.visit_url( "%s/admin/group_members_edit?group_id=%s" % ( self.url, str( another_test_group.id ) ) )
self.check_page_for_string( testuser3.email )
def test_25_associate_groups_with_role( self ):
def test_15_associate_groups_with_role( self ):
"""Testing adding existing groups to an existing role"""
# NOTE: To get this to work with twill, all select lists on the ~/admin/role page must contain at least
# 1 option value or twill throws an exception, which is: ParseError: OPTION outside of SELECT
@@ -115,7 +115,7 @@ class TestHistory( TwillTestCase ):
self.associate_groups_with_role( str( another_test_role.id ), group_ids=[ str( new_test_group.id ) ] )
self.visit_page( 'admin/roles' )
self.check_page_for_string( new_test_group.name )
def test_30_create_library( self ):
def test_18_create_library( self ):
"""Testing creating new library"""
name = 'New Test Library'
description = 'New Test Library Description'
@@ -127,20 +127,20 @@ class TestHistory( TwillTestCase ):
library = galaxy.model.Library.filter( and_( galaxy.model.Library.table.c.name==name,
galaxy.model.Library.table.c.description==description,
galaxy.model.Library.table.c.deleted==False ) ).first()
def test_35_rename_library( self ):
def test_21_rename_library( self ):
"""Testing renaming a library"""
self.rename_library( str( library.id ), name='New Test Library Renamed', description='New Test Library Description Re-described' )
self.rename_library( str( library.id ), name='New Test Library Renamed', description='New Test Library Description Re-described', root_folder='on' )
self.visit_page( 'admin/libraries' )
self.check_page_for_string( "New Test Library Renamed" )
# Rename it back to what it was originally
self.rename_library( str( library.id ), name='New Test Library', description='New Test Library Description' )
def test_40_rename_root_folder( self ):
self.rename_library( str( library.id ), name='New Test Library', description='New Test Library Description', root_folder='on' )
def test_24_rename_root_folder( self ):
"""Testing renaming a library root folder"""
folder = library.root_folder
self.rename_folder( str( folder.id ), name='New Test Library Root Folder', description='New Test Library Root Folder Description' )
self.visit_page( 'admin/libraries' )
self.check_page_for_string( "New Test Library Root Folder" )
def test_45_add_public_dataset_to_root_folder( self ):
def test_27_add_public_dataset_to_root_folder( self ):
"""Testing adding a public dataset to a library root folder"""
folder = library.root_folder
self.add_dataset( '1.bed', str( folder.id ), extension='bed', dbkey='hg18', roles=[] )
@@ -148,29 +148,42 @@ class TestHistory( TwillTestCase ):
self.check_page_for_string( "1.bed" )
self.check_page_for_string( "bed" )
self.check_page_for_string( "hg18" )
def test_50_add_new_folder( self ):
"""Testing adding a folder to a library root folder"""
def test_30_copy_dataset_from_history_to_root_folder( self ):
"""Testing copying a dataset from the current history to a library root folder"""
folder = library.root_folder
self.add_folder( str( folder.id ), name='New Test Folder', description='New Test Folder Description' )
self.add_dataset_to_folder_from_history( str( folder.id ) )
def test_33_add_new_folder( self ):
"""Testing adding a folder to a library root folder"""
root_folder = library.root_folder
name = 'New Test Folder'
description = 'New Test Folder Description'
self.add_folder( str( root_folder.id ), name=name, description=description )
global new_test_folder
new_test_folder = galaxy.model.LibraryFolder.filter( and_( galaxy.model.LibraryFolder.table.c.parent_id==root_folder.id,
galaxy.model.LibraryFolder.table.c.name==name,
galaxy.model.LibraryFolder.table.c.description==description ) ).first()
self.visit_page( 'admin/libraries' )
self.check_page_for_string( "New Test Folder" )
def test_55_mark_group_deleted( self ):
def test_36_add_datasets_from_library_dir( self ):
"""Testing adding several datasets from library directory to sub-folder"""
self.add_datasets_from_library_dir( str( new_test_folder.id ), roles=[ str( new_test_role.id ) ] )
def test_39_mark_group_deleted( self ):
"""Testing marking a group as deleted"""
self.visit_page( "admin/groups" )
self.check_page_for_string( another_test_group.name )
self.mark_group_deleted( str( another_test_group.id ) )
def test_60_undelete_group( self ):
def test_42_undelete_group( self ):
"""Testing undeleting a deleted group"""
self.undelete_group( str( another_test_group.id ) )
def test_65_mark_role_deleted( self ):
def test_45_mark_role_deleted( self ):
"""Testing marking a role as deleted"""
self.visit_page( "admin/roles" )
self.check_page_for_string( another_test_role.name )
self.mark_role_deleted( str( another_test_role.id ) )
def test_70_undelete_role( self ):
def test_48_undelete_role( self ):
"""Testing undeleting a deleted role"""
self.undelete_role( str( another_test_role.id ) )
def test_75_mark_library_deleted( self ):
def test_51_mark_library_deleted( self ):
"""Testing marking a library as deleted"""
self.mark_library_deleted( str( library.id ) )
# Make sure the library was deleted
@@ -179,19 +192,22 @@ class TestHistory( TwillTestCase ):
raise AssertionError( 'The library id %s named "%s" has not been marked as deleted.' % ( str( library.id ), library.name ) )
def check_folder( library_folder ):
for folder in library_folder.folders:
folder.refresh()
# Make sure all of the library_folders are deleted
if not folder.deleted:
raise AssertionError( 'The library_folder named "%s" has not been marked as deleted ( library.id: %s ).' % ( folder.name, str( library.id ) ) )
check_folder( folder )
# Make sure all of the library_folder_dataset_associations are deleted
for lfda in library_folder.datasets:
lfda.refresh()
if not lfda.deleted:
raise AssertionError( 'The library_folder_dataset_association id %s named "%s" has not been marked as deleted ( library.id: %s ).' % ( str( lfda.id ), lfda.name, str( library.id ) ) )
# Make sure none of the datasets have been deleted since that should occur only when the library is purged
lfda.dataset.refresh()
if lfda.dataset.deleted:
raise AssertionError( 'The dataset with id "%s" has been marked as deleted when it should not have been.' % lfda.dataset.id )
check_folder( library.root_folder )
def test_80_mark_library_undeleted( self ):
def test_54_mark_library_undeleted( self ):
"""Testing marking a library as not deleted"""
self.mark_library_undeleted( str( library.id ) )
# Make sure the library is undeleted
@@ -220,7 +236,7 @@ class TestHistory( TwillTestCase ):
library.refresh()
if not library.deleted:
raise AssertionError( 'The library id %s named "%s" has not been marked as deleted after it was undeleted.' % ( str( library.id ), library.name ) )
def test_85_purge_group( self ):
def test_57_purge_group( self ):
"""Testing purging a group"""
group_id = str( another_test_group.id )
self.purge_group( group_id )
@@ -232,7 +248,7 @@ class TestHistory( TwillTestCase ):
gra = galaxy.model.GroupRoleAssociation.filter( galaxy.model.GroupRoleAssociation.table.c.group_id == group_id ).all()
if gra:
raise AssertionError( "Purging the group did not delete the GroupRoleAssociations for group_id '%s'" % group_id )
def test_90_purge_role( self ):
def test_60_purge_role( self ):
"""Testing purging a role"""
role_id = str( another_test_role.id )
self.purge_role( role_id )
@@ -244,7 +260,7 @@ class TestHistory( TwillTestCase ):
adra = galaxy.model.ActionDatasetRoleAssociation.filter( galaxy.model.ActionDatasetRoleAssociation.table.c.role_id == role_id ).all()
if adra:
raise AssertionError( "Purging the role did not delete the ActionDatasetRoleAssociations for role_id '%s'" % role_id )
def test_95_purge_library( self ):
def test_63_purge_library( self ):
"""Testing purging a library"""
self.purge_library( str( library.id ) )
# Make sure the library was purged
+92 -74
View File
@@ -14,42 +14,17 @@ threadpool_workers = 10
# Specifies the factory for the universe WSGI application
paste.app_factory = galaxy.web.buildapp:app_factory
log_level = DEBUG
# Log memory usage
log_memory_usage = False
# Log events
log_events = True
# Should jobs be tracked through the database, rather than in memory
## track_jobs_in_database = true
# Enable job recovery (if Galaxy is restarted while cluster jobs are running,
# it can "recover" them when it starts). This is not safe to use if you are
# running more than one Galaxy server using the same database.
#enable_job_recovery = True
# Number of concurrent jobs to run (local runner)
local_job_queue_workers = 5
# Job scheduling policy to be used.
# module/package name and classname should be in "module:classname" format.
# Comment / uncomment the following policies depending upon which is to be used.
#job_scheduler_policy = FIFO
job_scheduler_policy = galaxy.jobs.schedulingpolicy.roundrobin:UserRoundRobin
# Job queue cleanup interval in minutes. Currently only used by RoundRobin
job_queue_cleanup_interval = 30
# Database connection
# By default, Galaxy uses a SQLite database found here
database_file = database/universe.sqlite
# You may use a SQLAlchemy connection string to specify an external database instead
## database_connection = postgres:///galaxy
## database_engine_option_echo = true
## database_engine_option_echo_pool = true
## database_engine_option_pool_size = 10
## database_engine_option_max_overflow = 20
# You may use a SQLAlchemy connection string to specify an external database
# instead. PostgreSQL and MySQL are supported.
#database_connection = postgres:///galaxy
#database_engine_option_echo = true
#database_engine_option_echo_pool = true
#database_engine_option_pool_size = 10
#database_engine_option_max_overflow = 20
# Where dataset files are saved
file_path = database/files
@@ -75,25 +50,9 @@ session_secret = changethisinproduction
# Galaxy session security
id_secret = changethisinproductiontoo
# Use user provided in an upstream server's $REMOTE_USER variable
## use_remote_user = False
# If use_remote_user is enabled and your external authentication
# method just returns bare usernames, set a default mail domain
## remote_user_maildomain = example.org
# Configuration for debugging middleware
debug = true
use_lint = false
# NEVER enable this on a public site (even test or QA)
use_interactive = true
# Admin Users - this should be a comma-separated list of valid Galaxy users
#admin_users = user1@bx.psu.edu,user2@bx.psu.edu
# Files in directories under this directory can be directly imported through
# the library admin's "add dataset" tool
## library_import_dir = /var/opt/galaxy/import
#library_import_dir = /var/opt/galaxy/import
# path to sendmail
sendmail_path = /usr/sbin/sendmail
@@ -101,15 +60,6 @@ sendmail_path = /usr/sbin/sendmail
# Address to join mailing list
mailing_join_addr = galaxy-user-join@bx.psu.edu
# Write thread status periodically to 'heartbeat.log' (careful, uses disk space rapidly!)
## use_heartbeat = True
# Enable the memory debugging interface (careful, negatively impacts server performance)
## use_memdump = True
# Profiling middleware (cProfile based)
## use_profile = True
# For use by 'report this error' link on error-state datasets
#smtp_server = smtp.example.org
#error_email_to = galaxy-bugs@example.org
@@ -141,7 +91,77 @@ static_style_dir = %(here)s/static/june_2007_style/blue
#wiki_url = /path/to/my/local/wiki
#bugs_email = mailto:galaxy-bugs@example.org
# ---- Job Runners ----------------------------------------------------------
# ---- Logging and Debugging ------------------------------------------------
# Verbosity of log messages
log_level = DEBUG
# Log memory usage
log_memory_usage = False
# Log events
log_events = True
# Configuration for debugging middleware
debug = True
use_lint = False
# Interactive debugging - NEVER enable this on a public site
use_interactive = True
# Write thread status periodically to 'heartbeat.log' (careful, uses disk space rapidly!)
#use_heartbeat = False
# Enable the memory debugging interface (careful, negatively impacts server performance)
#use_memdump = False
# Profiling middleware (cProfile based)
#use_profile = False
# ---- Users and Security ---------------------------------------------------
# User authentication can be delegated to an upstream proxy server (usually
# Apache). This is explained on the Galaxy wiki:
#
# http://g2.trac.bx.psu.edu/wiki/HowToInstall/ApacheProxy
# Use user provided in an upstream server's $REMOTE_USER variable
#use_remote_user = False
# If use_remote_user is enabled and your external authentication
# method just returns bare usernames, set a default mail domain
#remote_user_maildomain = example.org
# this should be a comma-separated list of valid Galaxy users
#admin_users = user1@example.org,user2@example.org
# Force everyone to log in (disable anonymous access)
#require_login = False
# Can users register new accounts?
#allow_user_creation = True
# ---- Job Execution --------------------------------------------------------
# Number of concurrent jobs to run (local job runner)
#local_job_queue_workers = 5
# Should jobs be tracked through the database, rather than in memory
#track_jobs_in_database = False
# Enable job recovery (if Galaxy is restarted while cluster jobs are running,
# it can "recover" them when it starts). This is not safe to use if you are
# running more than one Galaxy server using the same database.
#enable_job_recovery = True
# Job scheduling policy to be used.
# module/package name and classname should be in "module:classname" format.
# Comment / uncomment the following policies depending upon which is to be used.
#job_scheduler_policy = FIFO
job_scheduler_policy = galaxy.jobs.schedulingpolicy.roundrobin:UserRoundRobin
# Job queue cleanup interval in minutes. Currently only used by RoundRobin
job_queue_cleanup_interval = 30
# Clustering Galaxy is not a straightforward process and requires a lot of
# pre-configuration. See the ClusteringGalaxy Wiki before attempting to set
@@ -152,23 +172,21 @@ static_style_dir = %(here)s/static/june_2007_style/blue
# If running normally (without a cluster), do not change anything in this
# section.
# start_job_runners: Comma-separated list of job runners to start. local is
# always started. If left commented, no jobs will be run on the cluster, even
# if a cluster URL is explicitly defined in the [galaxy:tool_runners] section
# below. The runners currently available are 'pbs' and 'sge'.
# Comma-separated list of job runners to start. local is always started. If
# left commented, no jobs will be run on the cluster, even if a cluster URL is
# explicitly defined in the [galaxy:tool_runners] section below. The runners
# currently available are 'pbs' and 'sge'.
#start_job_runners = pbs
# default_cluster_job_runner: The URL for the default runner to use when a tool
# doesn't explicity define a runner below. For help on the cluster URL format,
# see the ClusteringGalaxy Wiki. Leave commented if not using a cluster job
# runner.
# The URL for the default runner to use when a tool doesn't explicity define a
# runner below. For help on the cluster URL format, see the ClusteringGalaxy
# Wiki. Leave commented if not using a cluster job runner.
#default_cluster_job_runner = pbs:///
# cluster_job_queue_workers: The cluster runners have their own thread pools
# used to prepare and finish jobs (so that these operations do not block normal
# queue operation). The value here is the number of worker threads available
# to each runner.
#cluster_job_queue_workers = 5
# The cluster runners have their own thread pools used to prepare and finish
# jobs (so that these operations do not block normal queue operation). The
# value here is the number of worker threads available to each runner.
#cluster_job_queue_workers = 3
# The PBS options are described in detail in the Galaxy Configuration section of
# the ClusteringGalaxy Wiki, and are only necessary when using file staging.