galaxy-commits
Threads by month
- ----- 2025 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 15302 discussions

commit/galaxy-central: jgoecks: Include post-job actions when importing and exporting workflows. Fixes #518
by Bitbucket 08 Jun '11
by Bitbucket 08 Jun '11
08 Jun '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/576e78ba4141/
changeset: 576e78ba4141
user: jgoecks
date: 2011-06-08 21:16:20
summary: Include post-job actions when importing and exporting workflows. Fixes #518
affected #: 1 file (926 bytes)
--- a/lib/galaxy/web/controllers/workflow.py Wed Jun 08 14:41:45 2011 -0400
+++ b/lib/galaxy/web/controllers/workflow.py Wed Jun 08 15:16:20 2011 -0400
@@ -1592,6 +1592,15 @@
'annotation' : annotation_str
}
+ # Add post-job actions to step dict.
+ if module.type == 'tool':
+ pja_dict = {}
+ for pja in step.post_job_actions:
+ pja_dict[pja.action_type+pja.output_name] = dict( action_type = pja.action_type,
+ output_name = pja.output_name,
+ action_arguments = pja.action_arguments )
+ step_dict[ 'post_job_actions' ] = pja_dict
+
# Data inputs
step_dict['inputs'] = []
if module.type == "data_input":
@@ -1695,6 +1704,12 @@
if annotation:
annotation = sanitize_html( annotation, 'utf-8', 'text/html' )
self.add_item_annotation( trans.sa_session, trans.get_user(), step, annotation )
+ # Unpack and add post-job actions.
+ post_job_actions = step_dict.get( 'post_job_actions', {} )
+ for name, pja_dict in post_job_actions.items():
+ pja = PostJobAction( pja_dict[ 'action_type' ],
+ step, pja_dict[ 'output_name' ],
+ pja_dict[ 'action_arguments' ] )
# Second pass to deal with connections between steps
for step in steps:
# Input connections
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
2 new changesets in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/8166f7585484/
changeset: 8166f7585484
user: natefoo
date: 2011-06-08 19:25:45
summary: Don't provde the output filename to the upload tool if it's outside Galaxy's files_path, since this means we're only linking data and the output paths are not used (and may contain non-shell-safe characters). Fixes issue #533.
affected #: 1 file (299 bytes)
--- a/tools/data_source/upload.xml Wed Jun 08 12:46:11 2011 -0400
+++ b/tools/data_source/upload.xml Wed Jun 08 13:25:45 2011 -0400
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<tool name="Upload File" id="upload1" version="1.1.2">
+<tool name="Upload File" id="upload1" version="1.1.3"><description>
from your computer
</description>
@@ -11,7 +11,12 @@
#while $varExists('output%i' % $outnum):
#set $output = $getVar('output%i' % $outnum)
#set $outnum += 1
- ${output.dataset.dataset.id}:${output.files_path}:${output}
+ #set $file_name = $output.file_name
+ ## FIXME: This is not future-proof for other uses of external_filename (other than for use by the library upload's "link data" feature)
+ #if $output.dataset.dataset.external_filename:
+ #set $file_name = "None"
+ #end if
+ ${output.dataset.dataset.id}:${output.files_path}:${file_name}
#end while
</command><inputs nginx_upload="true">
http://bitbucket.org/galaxy/galaxy-central/changeset/b2fa1535d02e/
changeset: b2fa1535d02e
user: natefoo
date: 2011-06-08 19:26:06
summary: merge.
affected #: 6 files (2.7 KB)
--- a/lib/galaxy/tools/__init__.py Wed Jun 08 13:25:45 2011 -0400
+++ b/lib/galaxy/tools/__init__.py Wed Jun 08 13:26:06 2011 -0400
@@ -756,13 +756,14 @@
case.inputs = self.parse_input_elem(
ElementTree.XML( "<when>%s</when>" % case_inputs ), enctypes, context )
else:
- case.inputs = {}
+ case.inputs = odict()
group.cases.append( case )
else:
# Should have one child "input" which determines the case
input_elem = elem.find( "param" )
assert input_elem is not None, "<conditional> must have a child <param>"
group.test_param = self.parse_param_elem( input_elem, enctypes, context )
+ possible_cases = list( group.test_param.legal_values ) #store possible cases, undefined whens will have no inputs
# Must refresh when test_param changes
group.test_param.refresh_on_change = True
# And a set of possible cases
@@ -771,6 +772,16 @@
case.value = case_elem.get( "value" )
case.inputs = self.parse_input_elem( case_elem, enctypes, context )
group.cases.append( case )
+ try:
+ possible_cases.remove( case.value )
+ except:
+ log.warning( "A when tag has been defined for '%s (%s) --> %s', but does not appear to be selectable." % ( group.name, group.test_param.name, case.value ) )
+ for unspecified_case in possible_cases:
+ log.warning( "A when tag has not been defined for '%s (%s) --> %s', assuming empty inputs." % ( group.name, group.test_param.name, unspecified_case ) )
+ case = ConditionalWhen()
+ case.value = unspecified_case
+ case.inputs = odict()
+ group.cases.append( case )
rval[group.name] = group
elif elem.tag == "upload_dataset":
group = UploadDataset()
--- a/lib/galaxy/tools/parameters/basic.py Wed Jun 08 13:25:45 2011 -0400
+++ b/lib/galaxy/tools/parameters/basic.py Wed Jun 08 13:26:06 2011 -0400
@@ -318,7 +318,7 @@
checked = self.checked
if value is not None:
checked = form_builder.CheckboxField.is_checked( value )
- return form_builder.CheckboxField( self.name, checked )
+ return form_builder.CheckboxField( self.name, checked, refresh_on_change = self.refresh_on_change )
def from_html( self, value, trans=None, other_values={} ):
return form_builder.CheckboxField.is_checked( value )
def to_python( self, value, app ):
@@ -330,6 +330,9 @@
return self.truevalue
else:
return self.falsevalue
+ @property
+ def legal_values( self ):
+ return [ self.truevalue, self.falsevalue ]
class FileToolParameter( ToolParameter ):
"""
--- a/lib/galaxy/tools/parameters/grouping.py Wed Jun 08 13:25:45 2011 -0400
+++ b/lib/galaxy/tools/parameters/grouping.py Wed Jun 08 13:26:06 2011 -0400
@@ -414,7 +414,10 @@
return "Conditional (%s)" % self.name
def get_current_case( self, value, trans ):
# Convert value to user representation
- str_value = self.test_param.filter_value( value, trans )
+ if isinstance( value, bool ):
+ str_value = self.test_param.to_param_dict_string( value )
+ else:
+ str_value = self.test_param.filter_value( value, trans )
# Find the matching case
for index, case in enumerate( self.cases ):
if str_value == case.value:
--- a/lib/galaxy/web/form_builder.py Wed Jun 08 13:25:45 2011 -0400
+++ b/lib/galaxy/web/form_builder.py Wed Jun 08 13:26:06 2011 -0400
@@ -88,9 +88,17 @@
>>> print CheckboxField( "bar", checked="yes" ).get_html()
<input type="checkbox" id="bar" name="bar" value="true" checked="checked"><input type="hidden" name="bar" value="true">
"""
- def __init__( self, name, checked=None ):
+ def __init__( self, name, checked=None, refresh_on_change = False, refresh_on_change_values = None ):
self.name = name
self.checked = ( checked == True ) or ( isinstance( checked, basestring ) and ( checked.lower() in ( "yes", "true", "on" ) ) )
+ self.refresh_on_change = refresh_on_change
+ self.refresh_on_change_values = refresh_on_change_values or []
+ if self.refresh_on_change:
+ self.refresh_on_change_text = ' refresh_on_change="true" '
+ if self.refresh_on_change_values:
+ self.refresh_on_change_text = '%s refresh_on_change_values="%s" ' % ( self.refresh_on_change_text, ",".join( self.refresh_on_change_values ) )
+ else:
+ self.refresh_on_change_text = ''
def get_html( self, prefix="", disabled=False ):
if self.checked:
checked_text = ' checked="checked"'
@@ -102,8 +110,8 @@
# parsing the request, the value 'true' in the hidden field actually means it is NOT checked.
# See the is_checked() method below. The prefix is necessary in each case to ensure functional
# correctness when the param is inside a conditional.
- return '<input type="checkbox" id="%s" name="%s" value="true"%s%s><input type="hidden" name="%s%s" value="true"%s>' \
- % ( id_name, id_name, checked_text, self.get_disabled_str( disabled ), prefix, self.name, self.get_disabled_str( disabled ) )
+ return '<input type="checkbox" id="%s" name="%s" value="true"%s%s%s><input type="hidden" name="%s%s" value="true"%s>' \
+ % ( id_name, id_name, checked_text, self.get_disabled_str( disabled ), self.refresh_on_change_text, prefix, self.name, self.get_disabled_str( disabled ) )
@staticmethod
def is_checked( value ):
if value == True:
@@ -253,7 +261,7 @@
<div><input type="checkbox" name="bar" value="3" id="bar|3"><label class="inline" for="bar|3">automatic</label></div><div><input type="checkbox" name="bar" value="4" id="bar|4" checked='checked'><label class="inline" for="bar|4">bazooty</label></div>
"""
- def __init__( self, name, multiple=None, display=None, refresh_on_change=False, refresh_on_change_values=[], size=None ):
+ def __init__( self, name, multiple=None, display=None, refresh_on_change=False, refresh_on_change_values=None, size=None ):
self.name = name
self.multiple = multiple or False
self.size = size
@@ -266,7 +274,7 @@
raise Exception, "Unknown display type: %s" % display
self.display = display
self.refresh_on_change = refresh_on_change
- self.refresh_on_change_values = refresh_on_change_values
+ self.refresh_on_change_values = refresh_on_change_values or []
if self.refresh_on_change:
self.refresh_on_change_text = ' refresh_on_change="true"'
if self.refresh_on_change_values:
--- a/static/scripts/galaxy.base.js Wed Jun 08 13:25:45 2011 -0400
+++ b/static/scripts/galaxy.base.js Wed Jun 08 13:26:06 2011 -0400
@@ -588,6 +588,23 @@
select_field.get(0).form.submit();
});
+ // checkboxes refresh on change
+ $(":checkbox[refresh_on_change='true']").click( function() {
+ var select_field = $(this),
+ select_val = select_field.val(),
+ refresh = false,
+ ref_on_change_vals = select_field.attr("refresh_on_change_values");
+ if (ref_on_change_vals) {
+ ref_on_change_vals = ref_on_change_vals.split(',');
+ var last_selected_value = select_field.attr("last_selected_value");
+ if ($.inArray(select_val, ref_on_change_vals) === -1 && $.inArray(last_selected_value, ref_on_change_vals) === -1) {
+ return;
+ }
+ }
+ $(window).trigger("refresh_on_change");
+ select_field.get(0).form.submit();
+ });
+
// Links with confirmation
$( "a[confirm]" ).click( function() {
return confirm( $(this).attr("confirm") );
--- a/static/scripts/packed/galaxy.base.js Wed Jun 08 13:25:45 2011 -0400
+++ b/static/scripts/packed/galaxy.base.js Wed Jun 08 13:26:06 2011 -0400
@@ -1,1 +1,1 @@
-if(!Array.indexOf){Array.prototype.indexOf=function(c){for(var b=0,a=this.length;b<a;b++){if(this[b]==c){return b}}return -1}}function obj_length(c){if(c.length!==undefined){return c.length}var b=0;for(var a in c){b++}return b}$.fn.makeAbsolute=function(a){return this.each(function(){var b=$(this);var c=b.position();b.css({position:"absolute",marginLeft:0,marginTop:0,top:c.top,left:c.left,right:$(window).width()-(c.left+b.width())});if(a){b.remove().appendTo("body")}})};function make_popupmenu(b,c){var a=(b.data("menu_options"));b.data("menu_options",c);if(a){return}b.bind("click.show_popup",function(d){$(".popmenu-wrapper").remove();setTimeout(function(){var g=$("<ul id='"+b.attr("id")+"-menu'></ul>");var f=b.data("menu_options");if(obj_length(f)<=0){$("<li>No Options.</li>").appendTo(g)}$.each(f,function(j,i){if(i){$("<li/>").html(j).click(i).appendTo(g)}else{$("<li class='head'/>").html(j).appendTo(g)}});var h=$("<div class='popmenu-wrapper' style='position: absolute;left: 0; top: -1000;'>");h.append(g).append("<div class='overlay-border'>").appendTo("body");var e=d.pageX-h.width()/2;e=Math.min(e,$(document).scrollLeft()+$(window).width()-$(h).width()-20);e=Math.max(e,$(document).scrollLeft()+20);h.css({top:d.pageY-15,left:e})},10);setTimeout(function(){var f=function(h){$(h).bind("click.close_popup",function(){$(".popmenu-wrapper").remove();h.unbind("click.close_popup")})};f($(window.document));f($(window.top.document));for(var e=window.top.frames.length;e--;){var g=$(window.top.frames[e].document);f(g)}},50);return false})}function make_popup_menus(){jQuery("div[popupmenu]").each(function(){var a={};var c=$(this);c.find("a").each(function(){var f=$(this),h=f.get(0);var d=h.getAttribute("confirm"),e=h.getAttribute("href"),g=h.getAttribute("target");if(!e){a[f.text()]=null}else{a[f.text()]=function(){if(!d||confirm(d)){var i;if(g=="_parent"){window.parent.location=e}else{if(g=="_top"){window.top.location=e}else{if(g=="demo"){if(i==undefined||i.closed){i=window.open(e,g);i.creator=self}}else{window.location=e}}}}}}});var b=$("#"+c.attr("popupmenu"));b.find("a").bind("click",function(d){d.stopPropagation();return true});make_popupmenu(b,a);b.addClass("popup");c.remove()})}function naturalSort(j,h){var p=/(-?[0-9\.]+)/g,k=j.toString().toLowerCase()||"",g=h.toString().toLowerCase()||"",l=String.fromCharCode(0),n=k.replace(p,l+"$1"+l).split(l),e=g.replace(p,l+"$1"+l).split(l),d=(new Date(k)).getTime(),o=d?(new Date(g)).getTime():null;if(o){if(d<o){return -1}else{if(d>o){return 1}}}var m,f;for(var i=0,c=Math.max(n.length,e.length);i<c;i++){m=parseFloat(n[i])||n[i];f=parseFloat(e[i])||e[i];if(m<f){return -1}else{if(m>f){return 1}}}return 0}function replace_big_select_inputs(a,b){if(!jQuery().autocomplete){return}if(a===undefined){a=20}if(b===undefined){b=3000}$("select").each(function(){var d=$(this);var g=d.find("option").length;if((g<a)||(g>b)){return}if(d.attr("multiple")===true){return}if(d.hasClass("no-autocomplete")){return}var m=d.attr("value");var c=$("<input type='text' class='text-and-autocomplete-select'></input>");c.attr("size",40);c.attr("name",d.attr("name"));c.attr("id",d.attr("id"));c.click(function(){var n=$(this).val();$(this).val("Loading...");$(this).showAllInCache();$(this).val(n);$(this).select()});var e=[];var i={};d.children("option").each(function(){var o=$(this).text();var n=$(this).attr("value");e.push(o);i[o]=n;i[n]=n;if(n==m){c.attr("value",o)}});if(m===""||m==="?"){c.attr("value","Click to Search or Select")}if(d.attr("name")=="dbkey"){e=e.sort(naturalSort)}var f={selectFirst:false,autoFill:false,mustMatch:false,matchContains:true,max:b,minChars:0,hideForLessThanMinChars:false};c.autocomplete(e,f);d.replaceWith(c);var k=function(){var o=c.attr("value");var n=i[o];if(n!==null&&n!==undefined){c.attr("value",n)}else{if(m!==""){c.attr("value",m)}else{c.attr("value","?")}}};c.parents("form").submit(function(){k()});$(document).bind("convert_to_values",function(){k()});if(d.attr("refresh_on_change")=="true"){var h=d.attr("refresh_on_change_values"),l=d.attr("last_selected_value");if(h!==undefined){h=h.split(",")}var j=function(){var n=i[c.attr("value")];if(l!==n&&n!==null&&n!==undefined){if(h!==undefined&&$.inArray(n,h)===-1&&$.inArray(l,h)===-1){return}c.attr("value",n);$(window).trigger("refresh_on_change");c.parents("form").submit()}};c.bind("result",j);c.keyup(function(n){if(n.keyCode===13){j()}});c.keydown(function(n){if(n.keyCode===13){return false}})}})}function async_save_text(d,f,e,a,c,h,i,g,b){if(c===undefined){c=30}if(i===undefined){i=4}$("#"+d).live("click",function(){if($("#renaming-active").length>0){return}var l=$("#"+f),k=l.text(),j;if(h){j=$("<textarea></textarea>").attr({rows:i,cols:c}).text($.trim(k))}else{j=$("<input type='text'></input>").attr({value:$.trim(k),size:c})}j.attr("id","renaming-active");j.blur(function(){$(this).remove();l.show();if(b){b(j)}});j.keyup(function(n){if(n.keyCode===27){$(this).trigger("blur")}else{if(n.keyCode===13){var m={};m[a]=$(this).val();$(this).trigger("blur");$.ajax({url:e,data:m,error:function(){alert("Text editing for elt "+f+" failed")},success:function(o){if(o!==""){l.text(o)}else{l.html("<em>None</em>")}if(b){b(j)}}})}}});if(g){g(j)}l.hide();j.insertAfter(l);j.focus();j.select();return})}function init_history_items(d,a,c){var b=function(){try{var e=$.jStorage.get("history_expand_state");if(e){for(var g in e){$("#"+g+" div.historyItemBody").show()}}}catch(f){$.jStorage.deleteKey("history_expand_state")}if($.browser.mozilla){$("div.historyItemBody").each(function(){if(!$(this).is(":visible")){$(this).find("pre.peek").css("overflow","hidden")}})}d.each(function(){var j=this.id,h=$(this).children("div.historyItemBody"),i=h.find("pre.peek");$(this).find(".historyItemTitleBar > .historyItemTitle").wrap("<a href='javascript:void(0);'></a>").click(function(){var k;if(h.is(":visible")){if($.browser.mozilla){i.css("overflow","hidden")}h.slideUp("fast");if(!c){k=$.jStorage.get("history_expand_state");if(k){delete k[j];$.jStorage.set("history_expand_state",k)}}}else{h.slideDown("fast",function(){if($.browser.mozilla){i.css("overflow","auto")}});if(!c){k=$.jStorage.get("history_expand_state");if(!k){k={}}k[j]=true;$.jStorage.set("history_expand_state",k)}}return false})});$("#top-links > a.toggle").click(function(){var h=$.jStorage.get("history_expand_state");if(!h){h={}}$("div.historyItemBody:visible").each(function(){if($.browser.mozilla){$(this).find("pre.peek").css("overflow","hidden")}$(this).slideUp("fast");if(h){delete h[$(this).parent().attr("id")]}});$.jStorage.set("history_expand_state",h)}).show()};b()}function commatize(b){b+="";var a=/(\d+)(\d{3})/;while(a.test(b)){b=b.replace(a,"$1,$2")}return b}function reset_tool_search(a){var c=$("#galaxy_tools").contents();if(c.length===0){c=$(document)}$(this).removeClass("search_active");c.find(".toolTitle").removeClass("search_match");c.find(".toolSectionBody").hide();c.find(".toolTitle").show();c.find(".toolPanelLabel").show();c.find(".toolSectionWrapper").each(function(){if($(this).attr("id")!="recently_used_wrapper"){$(this).show()}else{if($(this).hasClass("user_pref_visible")){$(this).show()}}});c.find("#search-no-results").hide();c.find("#search-spinner").hide();if(a){var b=c.find("#tool-search-query");b.val("search tools");b.css("font-style","italic")}}var GalaxyAsync=function(a){this.url_dict={};this.log_action=(a===undefined?false:a)};GalaxyAsync.prototype.set_func_url=function(a,b){this.url_dict[a]=b};GalaxyAsync.prototype.set_user_pref=function(a,b){var c=this.url_dict[arguments.callee];if(c===undefined){return false}$.ajax({url:c,data:{pref_name:a,pref_value:b},error:function(){return false},success:function(){return true}})};GalaxyAsync.prototype.log_user_action=function(c,b,d){if(!this.log_action){return}var a=this.url_dict[arguments.callee];if(a===undefined){return false}$.ajax({url:a,data:{action:c,context:b,params:d},error:function(){return false},success:function(){return true}})};$(document).ready(function(){$("select[refresh_on_change='true']").change(function(){var a=$(this),e=a.val(),d=false,c=a.attr("refresh_on_change_values");if(c){c=c.split(",");var b=a.attr("last_selected_value");if($.inArray(e,c)===-1&&$.inArray(b,c)===-1){return}}$(window).trigger("refresh_on_change");$(document).trigger("convert_to_values");a.get(0).form.submit()});$("a[confirm]").click(function(){return confirm($(this).attr("confirm"))});if($.fn.tipsy){$(".tooltip").tipsy({gravity:"s"})}make_popup_menus();replace_big_select_inputs(20,1500);$("a").click(function(){var b=$(this);var c=(parent.frames&&parent.frames.galaxy_main);if((b.attr("target")=="galaxy_main")&&(!c)){var a=b.attr("href");if(a.indexOf("?")==-1){a+="?"}else{a+="&"}a+="use_panels=True";b.attr("href",a);b.attr("target","_self")}return b})});
\ No newline at end of file
+if(!Array.indexOf){Array.prototype.indexOf=function(c){for(var b=0,a=this.length;b<a;b++){if(this[b]==c){return b}}return -1}}function obj_length(c){if(c.length!==undefined){return c.length}var b=0;for(var a in c){b++}return b}$.fn.makeAbsolute=function(a){return this.each(function(){var b=$(this);var c=b.position();b.css({position:"absolute",marginLeft:0,marginTop:0,top:c.top,left:c.left,right:$(window).width()-(c.left+b.width())});if(a){b.remove().appendTo("body")}})};function make_popupmenu(b,c){var a=(b.data("menu_options"));b.data("menu_options",c);if(a){return}b.bind("click.show_popup",function(d){$(".popmenu-wrapper").remove();setTimeout(function(){var g=$("<ul id='"+b.attr("id")+"-menu'></ul>");var f=b.data("menu_options");if(obj_length(f)<=0){$("<li>No Options.</li>").appendTo(g)}$.each(f,function(j,i){if(i){$("<li/>").html(j).click(i).appendTo(g)}else{$("<li class='head'/>").html(j).appendTo(g)}});var h=$("<div class='popmenu-wrapper' style='position: absolute;left: 0; top: -1000;'>");h.append(g).append("<div class='overlay-border'>").appendTo("body");var e=d.pageX-h.width()/2;e=Math.min(e,$(document).scrollLeft()+$(window).width()-$(h).width()-20);e=Math.max(e,$(document).scrollLeft()+20);h.css({top:d.pageY-15,left:e})},10);setTimeout(function(){var f=function(h){$(h).bind("click.close_popup",function(){$(".popmenu-wrapper").remove();h.unbind("click.close_popup")})};f($(window.document));f($(window.top.document));for(var e=window.top.frames.length;e--;){var g=$(window.top.frames[e].document);f(g)}},50);return false})}function make_popup_menus(){jQuery("div[popupmenu]").each(function(){var a={};var c=$(this);c.find("a").each(function(){var f=$(this),h=f.get(0);var d=h.getAttribute("confirm"),e=h.getAttribute("href"),g=h.getAttribute("target");if(!e){a[f.text()]=null}else{a[f.text()]=function(){if(!d||confirm(d)){var i;if(g=="_parent"){window.parent.location=e}else{if(g=="_top"){window.top.location=e}else{if(g=="demo"){if(i==undefined||i.closed){i=window.open(e,g);i.creator=self}}else{window.location=e}}}}}}});var b=$("#"+c.attr("popupmenu"));b.find("a").bind("click",function(d){d.stopPropagation();return true});make_popupmenu(b,a);b.addClass("popup");c.remove()})}function naturalSort(j,h){var p=/(-?[0-9\.]+)/g,k=j.toString().toLowerCase()||"",g=h.toString().toLowerCase()||"",l=String.fromCharCode(0),n=k.replace(p,l+"$1"+l).split(l),e=g.replace(p,l+"$1"+l).split(l),d=(new Date(k)).getTime(),o=d?(new Date(g)).getTime():null;if(o){if(d<o){return -1}else{if(d>o){return 1}}}var m,f;for(var i=0,c=Math.max(n.length,e.length);i<c;i++){m=parseFloat(n[i])||n[i];f=parseFloat(e[i])||e[i];if(m<f){return -1}else{if(m>f){return 1}}}return 0}function replace_big_select_inputs(a,b){if(!jQuery().autocomplete){return}if(a===undefined){a=20}if(b===undefined){b=3000}$("select").each(function(){var d=$(this);var g=d.find("option").length;if((g<a)||(g>b)){return}if(d.attr("multiple")===true){return}if(d.hasClass("no-autocomplete")){return}var m=d.attr("value");var c=$("<input type='text' class='text-and-autocomplete-select'></input>");c.attr("size",40);c.attr("name",d.attr("name"));c.attr("id",d.attr("id"));c.click(function(){var n=$(this).val();$(this).val("Loading...");$(this).showAllInCache();$(this).val(n);$(this).select()});var e=[];var i={};d.children("option").each(function(){var o=$(this).text();var n=$(this).attr("value");e.push(o);i[o]=n;i[n]=n;if(n==m){c.attr("value",o)}});if(m===""||m==="?"){c.attr("value","Click to Search or Select")}if(d.attr("name")=="dbkey"){e=e.sort(naturalSort)}var f={selectFirst:false,autoFill:false,mustMatch:false,matchContains:true,max:b,minChars:0,hideForLessThanMinChars:false};c.autocomplete(e,f);d.replaceWith(c);var k=function(){var o=c.attr("value");var n=i[o];if(n!==null&&n!==undefined){c.attr("value",n)}else{if(m!==""){c.attr("value",m)}else{c.attr("value","?")}}};c.parents("form").submit(function(){k()});$(document).bind("convert_to_values",function(){k()});if(d.attr("refresh_on_change")=="true"){var h=d.attr("refresh_on_change_values"),l=d.attr("last_selected_value");if(h!==undefined){h=h.split(",")}var j=function(){var n=i[c.attr("value")];if(l!==n&&n!==null&&n!==undefined){if(h!==undefined&&$.inArray(n,h)===-1&&$.inArray(l,h)===-1){return}c.attr("value",n);$(window).trigger("refresh_on_change");c.parents("form").submit()}};c.bind("result",j);c.keyup(function(n){if(n.keyCode===13){j()}});c.keydown(function(n){if(n.keyCode===13){return false}})}})}function async_save_text(d,f,e,a,c,h,i,g,b){if(c===undefined){c=30}if(i===undefined){i=4}$("#"+d).live("click",function(){if($("#renaming-active").length>0){return}var l=$("#"+f),k=l.text(),j;if(h){j=$("<textarea></textarea>").attr({rows:i,cols:c}).text($.trim(k))}else{j=$("<input type='text'></input>").attr({value:$.trim(k),size:c})}j.attr("id","renaming-active");j.blur(function(){$(this).remove();l.show();if(b){b(j)}});j.keyup(function(n){if(n.keyCode===27){$(this).trigger("blur")}else{if(n.keyCode===13){var m={};m[a]=$(this).val();$(this).trigger("blur");$.ajax({url:e,data:m,error:function(){alert("Text editing for elt "+f+" failed")},success:function(o){if(o!==""){l.text(o)}else{l.html("<em>None</em>")}if(b){b(j)}}})}}});if(g){g(j)}l.hide();j.insertAfter(l);j.focus();j.select();return})}function init_history_items(d,a,c){var b=function(){try{var e=$.jStorage.get("history_expand_state");if(e){for(var g in e){$("#"+g+" div.historyItemBody").show()}}}catch(f){$.jStorage.deleteKey("history_expand_state")}if($.browser.mozilla){$("div.historyItemBody").each(function(){if(!$(this).is(":visible")){$(this).find("pre.peek").css("overflow","hidden")}})}d.each(function(){var j=this.id,h=$(this).children("div.historyItemBody"),i=h.find("pre.peek");$(this).find(".historyItemTitleBar > .historyItemTitle").wrap("<a href='javascript:void(0);'></a>").click(function(){var k;if(h.is(":visible")){if($.browser.mozilla){i.css("overflow","hidden")}h.slideUp("fast");if(!c){k=$.jStorage.get("history_expand_state");if(k){delete k[j];$.jStorage.set("history_expand_state",k)}}}else{h.slideDown("fast",function(){if($.browser.mozilla){i.css("overflow","auto")}});if(!c){k=$.jStorage.get("history_expand_state");if(!k){k={}}k[j]=true;$.jStorage.set("history_expand_state",k)}}return false})});$("#top-links > a.toggle").click(function(){var h=$.jStorage.get("history_expand_state");if(!h){h={}}$("div.historyItemBody:visible").each(function(){if($.browser.mozilla){$(this).find("pre.peek").css("overflow","hidden")}$(this).slideUp("fast");if(h){delete h[$(this).parent().attr("id")]}});$.jStorage.set("history_expand_state",h)}).show()};b()}function commatize(b){b+="";var a=/(\d+)(\d{3})/;while(a.test(b)){b=b.replace(a,"$1,$2")}return b}function reset_tool_search(a){var c=$("#galaxy_tools").contents();if(c.length===0){c=$(document)}$(this).removeClass("search_active");c.find(".toolTitle").removeClass("search_match");c.find(".toolSectionBody").hide();c.find(".toolTitle").show();c.find(".toolPanelLabel").show();c.find(".toolSectionWrapper").each(function(){if($(this).attr("id")!="recently_used_wrapper"){$(this).show()}else{if($(this).hasClass("user_pref_visible")){$(this).show()}}});c.find("#search-no-results").hide();c.find("#search-spinner").hide();if(a){var b=c.find("#tool-search-query");b.val("search tools");b.css("font-style","italic")}}var GalaxyAsync=function(a){this.url_dict={};this.log_action=(a===undefined?false:a)};GalaxyAsync.prototype.set_func_url=function(a,b){this.url_dict[a]=b};GalaxyAsync.prototype.set_user_pref=function(a,b){var c=this.url_dict[arguments.callee];if(c===undefined){return false}$.ajax({url:c,data:{pref_name:a,pref_value:b},error:function(){return false},success:function(){return true}})};GalaxyAsync.prototype.log_user_action=function(c,b,d){if(!this.log_action){return}var a=this.url_dict[arguments.callee];if(a===undefined){return false}$.ajax({url:a,data:{action:c,context:b,params:d},error:function(){return false},success:function(){return true}})};$(document).ready(function(){$("select[refresh_on_change='true']").change(function(){var a=$(this),e=a.val(),d=false,c=a.attr("refresh_on_change_values");if(c){c=c.split(",");var b=a.attr("last_selected_value");if($.inArray(e,c)===-1&&$.inArray(b,c)===-1){return}}$(window).trigger("refresh_on_change");$(document).trigger("convert_to_values");a.get(0).form.submit()});$(":checkbox[refresh_on_change='true']").click(function(){var a=$(this),e=a.val(),d=false,c=a.attr("refresh_on_change_values");if(c){c=c.split(",");var b=a.attr("last_selected_value");if($.inArray(e,c)===-1&&$.inArray(b,c)===-1){return}}$(window).trigger("refresh_on_change");a.get(0).form.submit()});$("a[confirm]").click(function(){return confirm($(this).attr("confirm"))});if($.fn.tipsy){$(".tooltip").tipsy({gravity:"s"})}make_popup_menus();replace_big_select_inputs(20,1500);$("a").click(function(){var b=$(this);var c=(parent.frames&&parent.frames.galaxy_main);if((b.attr("target")=="galaxy_main")&&(!c)){var a=b.attr("href");if(a.indexOf("?")==-1){a+="?"}else{a+="&"}a+="use_panels=True";b.attr("href",a);b.attr("target","_self")}return b})});
\ No newline at end of file
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
2 new changesets in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/3d876a5e313b/
changeset: 3d876a5e313b
user: dan
date: 2011-06-08 19:04:57
summary: Allow conditional statements to not define a 'when' tag for all cases. When a 'when' is not defined, sub-inputs will be empty. Resolves #465.
affected #: 1 file (885 bytes)
--- a/lib/galaxy/tools/__init__.py Wed Jun 08 12:46:11 2011 -0400
+++ b/lib/galaxy/tools/__init__.py Wed Jun 08 13:04:57 2011 -0400
@@ -756,13 +756,14 @@
case.inputs = self.parse_input_elem(
ElementTree.XML( "<when>%s</when>" % case_inputs ), enctypes, context )
else:
- case.inputs = {}
+ case.inputs = odict()
group.cases.append( case )
else:
# Should have one child "input" which determines the case
input_elem = elem.find( "param" )
assert input_elem is not None, "<conditional> must have a child <param>"
group.test_param = self.parse_param_elem( input_elem, enctypes, context )
+ possible_cases = list( group.test_param.legal_values ) #store possible cases, undefined whens will have no inputs
# Must refresh when test_param changes
group.test_param.refresh_on_change = True
# And a set of possible cases
@@ -771,6 +772,16 @@
case.value = case_elem.get( "value" )
case.inputs = self.parse_input_elem( case_elem, enctypes, context )
group.cases.append( case )
+ try:
+ possible_cases.remove( case.value )
+ except:
+ log.warning( "A when tag has been defined for '%s (%s) --> %s', but does not appear to be selectable." % ( group.name, group.test_param.name, case.value ) )
+ for unspecified_case in possible_cases:
+ log.warning( "A when tag has not been defined for '%s (%s) --> %s', assuming empty inputs." % ( group.name, group.test_param.name, unspecified_case ) )
+ case = ConditionalWhen()
+ case.value = unspecified_case
+ case.inputs = odict()
+ group.cases.append( case )
rval[group.name] = group
elif elem.tag == "upload_dataset":
group = UploadDataset()
http://bitbucket.org/galaxy/galaxy-central/changeset/91b35c84d7ce/
changeset: 91b35c84d7ce
user: dan
date: 2011-06-08 19:05:03
summary: Allow boolean inputs (checkbox) to be used as the parameter selector for conditional grouping inputs. Resolves #393.
affected #: 5 files (1.9 KB)
--- a/lib/galaxy/tools/parameters/basic.py Wed Jun 08 13:04:57 2011 -0400
+++ b/lib/galaxy/tools/parameters/basic.py Wed Jun 08 13:05:03 2011 -0400
@@ -318,7 +318,7 @@
checked = self.checked
if value is not None:
checked = form_builder.CheckboxField.is_checked( value )
- return form_builder.CheckboxField( self.name, checked )
+ return form_builder.CheckboxField( self.name, checked, refresh_on_change = self.refresh_on_change )
def from_html( self, value, trans=None, other_values={} ):
return form_builder.CheckboxField.is_checked( value )
def to_python( self, value, app ):
@@ -330,6 +330,9 @@
return self.truevalue
else:
return self.falsevalue
+ @property
+ def legal_values( self ):
+ return [ self.truevalue, self.falsevalue ]
class FileToolParameter( ToolParameter ):
"""
--- a/lib/galaxy/tools/parameters/grouping.py Wed Jun 08 13:04:57 2011 -0400
+++ b/lib/galaxy/tools/parameters/grouping.py Wed Jun 08 13:05:03 2011 -0400
@@ -414,7 +414,10 @@
return "Conditional (%s)" % self.name
def get_current_case( self, value, trans ):
# Convert value to user representation
- str_value = self.test_param.filter_value( value, trans )
+ if isinstance( value, bool ):
+ str_value = self.test_param.to_param_dict_string( value )
+ else:
+ str_value = self.test_param.filter_value( value, trans )
# Find the matching case
for index, case in enumerate( self.cases ):
if str_value == case.value:
--- a/lib/galaxy/web/form_builder.py Wed Jun 08 13:04:57 2011 -0400
+++ b/lib/galaxy/web/form_builder.py Wed Jun 08 13:05:03 2011 -0400
@@ -88,9 +88,17 @@
>>> print CheckboxField( "bar", checked="yes" ).get_html()
<input type="checkbox" id="bar" name="bar" value="true" checked="checked"><input type="hidden" name="bar" value="true">
"""
- def __init__( self, name, checked=None ):
+ def __init__( self, name, checked=None, refresh_on_change = False, refresh_on_change_values = None ):
self.name = name
self.checked = ( checked == True ) or ( isinstance( checked, basestring ) and ( checked.lower() in ( "yes", "true", "on" ) ) )
+ self.refresh_on_change = refresh_on_change
+ self.refresh_on_change_values = refresh_on_change_values or []
+ if self.refresh_on_change:
+ self.refresh_on_change_text = ' refresh_on_change="true" '
+ if self.refresh_on_change_values:
+ self.refresh_on_change_text = '%s refresh_on_change_values="%s" ' % ( self.refresh_on_change_text, ",".join( self.refresh_on_change_values ) )
+ else:
+ self.refresh_on_change_text = ''
def get_html( self, prefix="", disabled=False ):
if self.checked:
checked_text = ' checked="checked"'
@@ -102,8 +110,8 @@
# parsing the request, the value 'true' in the hidden field actually means it is NOT checked.
# See the is_checked() method below. The prefix is necessary in each case to ensure functional
# correctness when the param is inside a conditional.
- return '<input type="checkbox" id="%s" name="%s" value="true"%s%s><input type="hidden" name="%s%s" value="true"%s>' \
- % ( id_name, id_name, checked_text, self.get_disabled_str( disabled ), prefix, self.name, self.get_disabled_str( disabled ) )
+ return '<input type="checkbox" id="%s" name="%s" value="true"%s%s%s><input type="hidden" name="%s%s" value="true"%s>' \
+ % ( id_name, id_name, checked_text, self.get_disabled_str( disabled ), self.refresh_on_change_text, prefix, self.name, self.get_disabled_str( disabled ) )
@staticmethod
def is_checked( value ):
if value == True:
@@ -253,7 +261,7 @@
<div><input type="checkbox" name="bar" value="3" id="bar|3"><label class="inline" for="bar|3">automatic</label></div><div><input type="checkbox" name="bar" value="4" id="bar|4" checked='checked'><label class="inline" for="bar|4">bazooty</label></div>
"""
- def __init__( self, name, multiple=None, display=None, refresh_on_change=False, refresh_on_change_values=[], size=None ):
+ def __init__( self, name, multiple=None, display=None, refresh_on_change=False, refresh_on_change_values=None, size=None ):
self.name = name
self.multiple = multiple or False
self.size = size
@@ -266,7 +274,7 @@
raise Exception, "Unknown display type: %s" % display
self.display = display
self.refresh_on_change = refresh_on_change
- self.refresh_on_change_values = refresh_on_change_values
+ self.refresh_on_change_values = refresh_on_change_values or []
if self.refresh_on_change:
self.refresh_on_change_text = ' refresh_on_change="true"'
if self.refresh_on_change_values:
--- a/static/scripts/galaxy.base.js Wed Jun 08 13:04:57 2011 -0400
+++ b/static/scripts/galaxy.base.js Wed Jun 08 13:05:03 2011 -0400
@@ -588,6 +588,23 @@
select_field.get(0).form.submit();
});
+ // checkboxes refresh on change
+ $(":checkbox[refresh_on_change='true']").click( function() {
+ var select_field = $(this),
+ select_val = select_field.val(),
+ refresh = false,
+ ref_on_change_vals = select_field.attr("refresh_on_change_values");
+ if (ref_on_change_vals) {
+ ref_on_change_vals = ref_on_change_vals.split(',');
+ var last_selected_value = select_field.attr("last_selected_value");
+ if ($.inArray(select_val, ref_on_change_vals) === -1 && $.inArray(last_selected_value, ref_on_change_vals) === -1) {
+ return;
+ }
+ }
+ $(window).trigger("refresh_on_change");
+ select_field.get(0).form.submit();
+ });
+
// Links with confirmation
$( "a[confirm]" ).click( function() {
return confirm( $(this).attr("confirm") );
--- a/static/scripts/packed/galaxy.base.js Wed Jun 08 13:04:57 2011 -0400
+++ b/static/scripts/packed/galaxy.base.js Wed Jun 08 13:05:03 2011 -0400
@@ -1,1 +1,1 @@
-if(!Array.indexOf){Array.prototype.indexOf=function(c){for(var b=0,a=this.length;b<a;b++){if(this[b]==c){return b}}return -1}}function obj_length(c){if(c.length!==undefined){return c.length}var b=0;for(var a in c){b++}return b}$.fn.makeAbsolute=function(a){return this.each(function(){var b=$(this);var c=b.position();b.css({position:"absolute",marginLeft:0,marginTop:0,top:c.top,left:c.left,right:$(window).width()-(c.left+b.width())});if(a){b.remove().appendTo("body")}})};function make_popupmenu(b,c){var a=(b.data("menu_options"));b.data("menu_options",c);if(a){return}b.bind("click.show_popup",function(d){$(".popmenu-wrapper").remove();setTimeout(function(){var g=$("<ul id='"+b.attr("id")+"-menu'></ul>");var f=b.data("menu_options");if(obj_length(f)<=0){$("<li>No Options.</li>").appendTo(g)}$.each(f,function(j,i){if(i){$("<li/>").html(j).click(i).appendTo(g)}else{$("<li class='head'/>").html(j).appendTo(g)}});var h=$("<div class='popmenu-wrapper' style='position: absolute;left: 0; top: -1000;'>");h.append(g).append("<div class='overlay-border'>").appendTo("body");var e=d.pageX-h.width()/2;e=Math.min(e,$(document).scrollLeft()+$(window).width()-$(h).width()-20);e=Math.max(e,$(document).scrollLeft()+20);h.css({top:d.pageY-15,left:e})},10);setTimeout(function(){var f=function(h){$(h).bind("click.close_popup",function(){$(".popmenu-wrapper").remove();h.unbind("click.close_popup")})};f($(window.document));f($(window.top.document));for(var e=window.top.frames.length;e--;){var g=$(window.top.frames[e].document);f(g)}},50);return false})}function make_popup_menus(){jQuery("div[popupmenu]").each(function(){var a={};var c=$(this);c.find("a").each(function(){var f=$(this),h=f.get(0);var d=h.getAttribute("confirm"),e=h.getAttribute("href"),g=h.getAttribute("target");if(!e){a[f.text()]=null}else{a[f.text()]=function(){if(!d||confirm(d)){var i;if(g=="_parent"){window.parent.location=e}else{if(g=="_top"){window.top.location=e}else{if(g=="demo"){if(i==undefined||i.closed){i=window.open(e,g);i.creator=self}}else{window.location=e}}}}}}});var b=$("#"+c.attr("popupmenu"));b.find("a").bind("click",function(d){d.stopPropagation();return true});make_popupmenu(b,a);b.addClass("popup");c.remove()})}function naturalSort(j,h){var p=/(-?[0-9\.]+)/g,k=j.toString().toLowerCase()||"",g=h.toString().toLowerCase()||"",l=String.fromCharCode(0),n=k.replace(p,l+"$1"+l).split(l),e=g.replace(p,l+"$1"+l).split(l),d=(new Date(k)).getTime(),o=d?(new Date(g)).getTime():null;if(o){if(d<o){return -1}else{if(d>o){return 1}}}var m,f;for(var i=0,c=Math.max(n.length,e.length);i<c;i++){m=parseFloat(n[i])||n[i];f=parseFloat(e[i])||e[i];if(m<f){return -1}else{if(m>f){return 1}}}return 0}function replace_big_select_inputs(a,b){if(!jQuery().autocomplete){return}if(a===undefined){a=20}if(b===undefined){b=3000}$("select").each(function(){var d=$(this);var g=d.find("option").length;if((g<a)||(g>b)){return}if(d.attr("multiple")===true){return}if(d.hasClass("no-autocomplete")){return}var m=d.attr("value");var c=$("<input type='text' class='text-and-autocomplete-select'></input>");c.attr("size",40);c.attr("name",d.attr("name"));c.attr("id",d.attr("id"));c.click(function(){var n=$(this).val();$(this).val("Loading...");$(this).showAllInCache();$(this).val(n);$(this).select()});var e=[];var i={};d.children("option").each(function(){var o=$(this).text();var n=$(this).attr("value");e.push(o);i[o]=n;i[n]=n;if(n==m){c.attr("value",o)}});if(m===""||m==="?"){c.attr("value","Click to Search or Select")}if(d.attr("name")=="dbkey"){e=e.sort(naturalSort)}var f={selectFirst:false,autoFill:false,mustMatch:false,matchContains:true,max:b,minChars:0,hideForLessThanMinChars:false};c.autocomplete(e,f);d.replaceWith(c);var k=function(){var o=c.attr("value");var n=i[o];if(n!==null&&n!==undefined){c.attr("value",n)}else{if(m!==""){c.attr("value",m)}else{c.attr("value","?")}}};c.parents("form").submit(function(){k()});$(document).bind("convert_to_values",function(){k()});if(d.attr("refresh_on_change")=="true"){var h=d.attr("refresh_on_change_values"),l=d.attr("last_selected_value");if(h!==undefined){h=h.split(",")}var j=function(){var n=i[c.attr("value")];if(l!==n&&n!==null&&n!==undefined){if(h!==undefined&&$.inArray(n,h)===-1&&$.inArray(l,h)===-1){return}c.attr("value",n);$(window).trigger("refresh_on_change");c.parents("form").submit()}};c.bind("result",j);c.keyup(function(n){if(n.keyCode===13){j()}});c.keydown(function(n){if(n.keyCode===13){return false}})}})}function async_save_text(d,f,e,a,c,h,i,g,b){if(c===undefined){c=30}if(i===undefined){i=4}$("#"+d).live("click",function(){if($("#renaming-active").length>0){return}var l=$("#"+f),k=l.text(),j;if(h){j=$("<textarea></textarea>").attr({rows:i,cols:c}).text($.trim(k))}else{j=$("<input type='text'></input>").attr({value:$.trim(k),size:c})}j.attr("id","renaming-active");j.blur(function(){$(this).remove();l.show();if(b){b(j)}});j.keyup(function(n){if(n.keyCode===27){$(this).trigger("blur")}else{if(n.keyCode===13){var m={};m[a]=$(this).val();$(this).trigger("blur");$.ajax({url:e,data:m,error:function(){alert("Text editing for elt "+f+" failed")},success:function(o){if(o!==""){l.text(o)}else{l.html("<em>None</em>")}if(b){b(j)}}})}}});if(g){g(j)}l.hide();j.insertAfter(l);j.focus();j.select();return})}function init_history_items(d,a,c){var b=function(){try{var e=$.jStorage.get("history_expand_state");if(e){for(var g in e){$("#"+g+" div.historyItemBody").show()}}}catch(f){$.jStorage.deleteKey("history_expand_state")}if($.browser.mozilla){$("div.historyItemBody").each(function(){if(!$(this).is(":visible")){$(this).find("pre.peek").css("overflow","hidden")}})}d.each(function(){var j=this.id,h=$(this).children("div.historyItemBody"),i=h.find("pre.peek");$(this).find(".historyItemTitleBar > .historyItemTitle").wrap("<a href='javascript:void(0);'></a>").click(function(){var k;if(h.is(":visible")){if($.browser.mozilla){i.css("overflow","hidden")}h.slideUp("fast");if(!c){k=$.jStorage.get("history_expand_state");if(k){delete k[j];$.jStorage.set("history_expand_state",k)}}}else{h.slideDown("fast",function(){if($.browser.mozilla){i.css("overflow","auto")}});if(!c){k=$.jStorage.get("history_expand_state");if(!k){k={}}k[j]=true;$.jStorage.set("history_expand_state",k)}}return false})});$("#top-links > a.toggle").click(function(){var h=$.jStorage.get("history_expand_state");if(!h){h={}}$("div.historyItemBody:visible").each(function(){if($.browser.mozilla){$(this).find("pre.peek").css("overflow","hidden")}$(this).slideUp("fast");if(h){delete h[$(this).parent().attr("id")]}});$.jStorage.set("history_expand_state",h)}).show()};b()}function commatize(b){b+="";var a=/(\d+)(\d{3})/;while(a.test(b)){b=b.replace(a,"$1,$2")}return b}function reset_tool_search(a){var c=$("#galaxy_tools").contents();if(c.length===0){c=$(document)}$(this).removeClass("search_active");c.find(".toolTitle").removeClass("search_match");c.find(".toolSectionBody").hide();c.find(".toolTitle").show();c.find(".toolPanelLabel").show();c.find(".toolSectionWrapper").each(function(){if($(this).attr("id")!="recently_used_wrapper"){$(this).show()}else{if($(this).hasClass("user_pref_visible")){$(this).show()}}});c.find("#search-no-results").hide();c.find("#search-spinner").hide();if(a){var b=c.find("#tool-search-query");b.val("search tools");b.css("font-style","italic")}}var GalaxyAsync=function(a){this.url_dict={};this.log_action=(a===undefined?false:a)};GalaxyAsync.prototype.set_func_url=function(a,b){this.url_dict[a]=b};GalaxyAsync.prototype.set_user_pref=function(a,b){var c=this.url_dict[arguments.callee];if(c===undefined){return false}$.ajax({url:c,data:{pref_name:a,pref_value:b},error:function(){return false},success:function(){return true}})};GalaxyAsync.prototype.log_user_action=function(c,b,d){if(!this.log_action){return}var a=this.url_dict[arguments.callee];if(a===undefined){return false}$.ajax({url:a,data:{action:c,context:b,params:d},error:function(){return false},success:function(){return true}})};$(document).ready(function(){$("select[refresh_on_change='true']").change(function(){var a=$(this),e=a.val(),d=false,c=a.attr("refresh_on_change_values");if(c){c=c.split(",");var b=a.attr("last_selected_value");if($.inArray(e,c)===-1&&$.inArray(b,c)===-1){return}}$(window).trigger("refresh_on_change");$(document).trigger("convert_to_values");a.get(0).form.submit()});$("a[confirm]").click(function(){return confirm($(this).attr("confirm"))});if($.fn.tipsy){$(".tooltip").tipsy({gravity:"s"})}make_popup_menus();replace_big_select_inputs(20,1500);$("a").click(function(){var b=$(this);var c=(parent.frames&&parent.frames.galaxy_main);if((b.attr("target")=="galaxy_main")&&(!c)){var a=b.attr("href");if(a.indexOf("?")==-1){a+="?"}else{a+="&"}a+="use_panels=True";b.attr("href",a);b.attr("target","_self")}return b})});
\ No newline at end of file
+if(!Array.indexOf){Array.prototype.indexOf=function(c){for(var b=0,a=this.length;b<a;b++){if(this[b]==c){return b}}return -1}}function obj_length(c){if(c.length!==undefined){return c.length}var b=0;for(var a in c){b++}return b}$.fn.makeAbsolute=function(a){return this.each(function(){var b=$(this);var c=b.position();b.css({position:"absolute",marginLeft:0,marginTop:0,top:c.top,left:c.left,right:$(window).width()-(c.left+b.width())});if(a){b.remove().appendTo("body")}})};function make_popupmenu(b,c){var a=(b.data("menu_options"));b.data("menu_options",c);if(a){return}b.bind("click.show_popup",function(d){$(".popmenu-wrapper").remove();setTimeout(function(){var g=$("<ul id='"+b.attr("id")+"-menu'></ul>");var f=b.data("menu_options");if(obj_length(f)<=0){$("<li>No Options.</li>").appendTo(g)}$.each(f,function(j,i){if(i){$("<li/>").html(j).click(i).appendTo(g)}else{$("<li class='head'/>").html(j).appendTo(g)}});var h=$("<div class='popmenu-wrapper' style='position: absolute;left: 0; top: -1000;'>");h.append(g).append("<div class='overlay-border'>").appendTo("body");var e=d.pageX-h.width()/2;e=Math.min(e,$(document).scrollLeft()+$(window).width()-$(h).width()-20);e=Math.max(e,$(document).scrollLeft()+20);h.css({top:d.pageY-15,left:e})},10);setTimeout(function(){var f=function(h){$(h).bind("click.close_popup",function(){$(".popmenu-wrapper").remove();h.unbind("click.close_popup")})};f($(window.document));f($(window.top.document));for(var e=window.top.frames.length;e--;){var g=$(window.top.frames[e].document);f(g)}},50);return false})}function make_popup_menus(){jQuery("div[popupmenu]").each(function(){var a={};var c=$(this);c.find("a").each(function(){var f=$(this),h=f.get(0);var d=h.getAttribute("confirm"),e=h.getAttribute("href"),g=h.getAttribute("target");if(!e){a[f.text()]=null}else{a[f.text()]=function(){if(!d||confirm(d)){var i;if(g=="_parent"){window.parent.location=e}else{if(g=="_top"){window.top.location=e}else{if(g=="demo"){if(i==undefined||i.closed){i=window.open(e,g);i.creator=self}}else{window.location=e}}}}}}});var b=$("#"+c.attr("popupmenu"));b.find("a").bind("click",function(d){d.stopPropagation();return true});make_popupmenu(b,a);b.addClass("popup");c.remove()})}function naturalSort(j,h){var p=/(-?[0-9\.]+)/g,k=j.toString().toLowerCase()||"",g=h.toString().toLowerCase()||"",l=String.fromCharCode(0),n=k.replace(p,l+"$1"+l).split(l),e=g.replace(p,l+"$1"+l).split(l),d=(new Date(k)).getTime(),o=d?(new Date(g)).getTime():null;if(o){if(d<o){return -1}else{if(d>o){return 1}}}var m,f;for(var i=0,c=Math.max(n.length,e.length);i<c;i++){m=parseFloat(n[i])||n[i];f=parseFloat(e[i])||e[i];if(m<f){return -1}else{if(m>f){return 1}}}return 0}function replace_big_select_inputs(a,b){if(!jQuery().autocomplete){return}if(a===undefined){a=20}if(b===undefined){b=3000}$("select").each(function(){var d=$(this);var g=d.find("option").length;if((g<a)||(g>b)){return}if(d.attr("multiple")===true){return}if(d.hasClass("no-autocomplete")){return}var m=d.attr("value");var c=$("<input type='text' class='text-and-autocomplete-select'></input>");c.attr("size",40);c.attr("name",d.attr("name"));c.attr("id",d.attr("id"));c.click(function(){var n=$(this).val();$(this).val("Loading...");$(this).showAllInCache();$(this).val(n);$(this).select()});var e=[];var i={};d.children("option").each(function(){var o=$(this).text();var n=$(this).attr("value");e.push(o);i[o]=n;i[n]=n;if(n==m){c.attr("value",o)}});if(m===""||m==="?"){c.attr("value","Click to Search or Select")}if(d.attr("name")=="dbkey"){e=e.sort(naturalSort)}var f={selectFirst:false,autoFill:false,mustMatch:false,matchContains:true,max:b,minChars:0,hideForLessThanMinChars:false};c.autocomplete(e,f);d.replaceWith(c);var k=function(){var o=c.attr("value");var n=i[o];if(n!==null&&n!==undefined){c.attr("value",n)}else{if(m!==""){c.attr("value",m)}else{c.attr("value","?")}}};c.parents("form").submit(function(){k()});$(document).bind("convert_to_values",function(){k()});if(d.attr("refresh_on_change")=="true"){var h=d.attr("refresh_on_change_values"),l=d.attr("last_selected_value");if(h!==undefined){h=h.split(",")}var j=function(){var n=i[c.attr("value")];if(l!==n&&n!==null&&n!==undefined){if(h!==undefined&&$.inArray(n,h)===-1&&$.inArray(l,h)===-1){return}c.attr("value",n);$(window).trigger("refresh_on_change");c.parents("form").submit()}};c.bind("result",j);c.keyup(function(n){if(n.keyCode===13){j()}});c.keydown(function(n){if(n.keyCode===13){return false}})}})}function async_save_text(d,f,e,a,c,h,i,g,b){if(c===undefined){c=30}if(i===undefined){i=4}$("#"+d).live("click",function(){if($("#renaming-active").length>0){return}var l=$("#"+f),k=l.text(),j;if(h){j=$("<textarea></textarea>").attr({rows:i,cols:c}).text($.trim(k))}else{j=$("<input type='text'></input>").attr({value:$.trim(k),size:c})}j.attr("id","renaming-active");j.blur(function(){$(this).remove();l.show();if(b){b(j)}});j.keyup(function(n){if(n.keyCode===27){$(this).trigger("blur")}else{if(n.keyCode===13){var m={};m[a]=$(this).val();$(this).trigger("blur");$.ajax({url:e,data:m,error:function(){alert("Text editing for elt "+f+" failed")},success:function(o){if(o!==""){l.text(o)}else{l.html("<em>None</em>")}if(b){b(j)}}})}}});if(g){g(j)}l.hide();j.insertAfter(l);j.focus();j.select();return})}function init_history_items(d,a,c){var b=function(){try{var e=$.jStorage.get("history_expand_state");if(e){for(var g in e){$("#"+g+" div.historyItemBody").show()}}}catch(f){$.jStorage.deleteKey("history_expand_state")}if($.browser.mozilla){$("div.historyItemBody").each(function(){if(!$(this).is(":visible")){$(this).find("pre.peek").css("overflow","hidden")}})}d.each(function(){var j=this.id,h=$(this).children("div.historyItemBody"),i=h.find("pre.peek");$(this).find(".historyItemTitleBar > .historyItemTitle").wrap("<a href='javascript:void(0);'></a>").click(function(){var k;if(h.is(":visible")){if($.browser.mozilla){i.css("overflow","hidden")}h.slideUp("fast");if(!c){k=$.jStorage.get("history_expand_state");if(k){delete k[j];$.jStorage.set("history_expand_state",k)}}}else{h.slideDown("fast",function(){if($.browser.mozilla){i.css("overflow","auto")}});if(!c){k=$.jStorage.get("history_expand_state");if(!k){k={}}k[j]=true;$.jStorage.set("history_expand_state",k)}}return false})});$("#top-links > a.toggle").click(function(){var h=$.jStorage.get("history_expand_state");if(!h){h={}}$("div.historyItemBody:visible").each(function(){if($.browser.mozilla){$(this).find("pre.peek").css("overflow","hidden")}$(this).slideUp("fast");if(h){delete h[$(this).parent().attr("id")]}});$.jStorage.set("history_expand_state",h)}).show()};b()}function commatize(b){b+="";var a=/(\d+)(\d{3})/;while(a.test(b)){b=b.replace(a,"$1,$2")}return b}function reset_tool_search(a){var c=$("#galaxy_tools").contents();if(c.length===0){c=$(document)}$(this).removeClass("search_active");c.find(".toolTitle").removeClass("search_match");c.find(".toolSectionBody").hide();c.find(".toolTitle").show();c.find(".toolPanelLabel").show();c.find(".toolSectionWrapper").each(function(){if($(this).attr("id")!="recently_used_wrapper"){$(this).show()}else{if($(this).hasClass("user_pref_visible")){$(this).show()}}});c.find("#search-no-results").hide();c.find("#search-spinner").hide();if(a){var b=c.find("#tool-search-query");b.val("search tools");b.css("font-style","italic")}}var GalaxyAsync=function(a){this.url_dict={};this.log_action=(a===undefined?false:a)};GalaxyAsync.prototype.set_func_url=function(a,b){this.url_dict[a]=b};GalaxyAsync.prototype.set_user_pref=function(a,b){var c=this.url_dict[arguments.callee];if(c===undefined){return false}$.ajax({url:c,data:{pref_name:a,pref_value:b},error:function(){return false},success:function(){return true}})};GalaxyAsync.prototype.log_user_action=function(c,b,d){if(!this.log_action){return}var a=this.url_dict[arguments.callee];if(a===undefined){return false}$.ajax({url:a,data:{action:c,context:b,params:d},error:function(){return false},success:function(){return true}})};$(document).ready(function(){$("select[refresh_on_change='true']").change(function(){var a=$(this),e=a.val(),d=false,c=a.attr("refresh_on_change_values");if(c){c=c.split(",");var b=a.attr("last_selected_value");if($.inArray(e,c)===-1&&$.inArray(b,c)===-1){return}}$(window).trigger("refresh_on_change");$(document).trigger("convert_to_values");a.get(0).form.submit()});$(":checkbox[refresh_on_change='true']").click(function(){var a=$(this),e=a.val(),d=false,c=a.attr("refresh_on_change_values");if(c){c=c.split(",");var b=a.attr("last_selected_value");if($.inArray(e,c)===-1&&$.inArray(b,c)===-1){return}}$(window).trigger("refresh_on_change");a.get(0).form.submit()});$("a[confirm]").click(function(){return confirm($(this).attr("confirm"))});if($.fn.tipsy){$(".tooltip").tipsy({gravity:"s"})}make_popup_menus();replace_big_select_inputs(20,1500);$("a").click(function(){var b=$(this);var c=(parent.frames&&parent.frames.galaxy_main);if((b.attr("target")=="galaxy_main")&&(!c)){var a=b.attr("href");if(a.indexOf("?")==-1){a+="?"}else{a+="&"}a+="use_panels=True";b.attr("href",a);b.attr("target","_self")}return b})});
\ No newline at end of file
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

commit/galaxy-central: jgoecks: Disable grid controls and content when new content is being fetched. Fixes #272
by Bitbucket 08 Jun '11
by Bitbucket 08 Jun '11
08 Jun '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/c6b9d40bdd0e/
changeset: c6b9d40bdd0e
user: jgoecks
date: 2011-06-08 18:46:11
summary: Disable grid controls and content when new content is being fetched. Fixes #272
affected #: 1 file (8 bytes)
--- a/templates/grid_base.mako Wed Jun 08 12:10:51 2011 -0400
+++ b/templates/grid_base.mako Wed Jun 08 12:46:11 2011 -0400
@@ -689,7 +689,7 @@
width : 100%;
height : 100%;
z-index : 14000;
- position : absolute;
+ position : fixed;
display: none;
}
## If page is displayed in panels, pad from edges for readability.
@@ -708,6 +708,7 @@
<%namespace file="./grid_common.mako" import="*" /><%def name="make_grid( grid )">
+ <div class="loading-elt-overlay"></div><table><tr><td width="75%">${self.render_grid_header( grid )}</td>
@@ -769,9 +770,7 @@
if show_item_checkboxes or multiple_item_ops_exist:
show_item_checkboxes = True
%>
-
<form action="${url()}" method="post" onsubmit="return false;">
- <div class="loading-elt-overlay"></div><table id="grid-table" class="grid"><thead id="grid-table-header"><tr>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

commit/galaxy-central: natefoo: Remove hardcoding of universe_wsgi.ini, fixes issue #358 (except for the sample cleanup scripts which, as samples, are expected to be modified by the site anyway).
by Bitbucket 08 Jun '11
by Bitbucket 08 Jun '11
08 Jun '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/73daddf1324d/
changeset: 73daddf1324d
user: natefoo
date: 2011-06-08 18:10:51
summary: Remove hardcoding of universe_wsgi.ini, fixes issue #358 (except for the sample cleanup scripts which, as samples, are expected to be modified by the site anyway).
affected #: 10 files (2.6 KB)
--- a/lib/galaxy/app.py Wed Jun 08 11:52:42 2011 -0400
+++ b/lib/galaxy/app.py Wed Jun 08 12:10:51 2011 -0400
@@ -29,7 +29,7 @@
db_url = "sqlite:///%s?isolation_level=IMMEDIATE" % self.config.database
# Initialize database / check for appropriate schema version
from galaxy.model.migrate.check import create_or_verify_database
- create_or_verify_database( db_url, self.config.database_engine_options )
+ create_or_verify_database( db_url, kwargs.get( 'global_conf', {} ).get( '__file__', None ), self.config.database_engine_options )
# Setup the database engine and ORM
from galaxy.model import mapping
self.model = mapping.init( self.config.file_path,
--- a/lib/galaxy/eggs/__init__.py Wed Jun 08 11:52:42 2011 -0400
+++ b/lib/galaxy/eggs/__init__.py Wed Jun 08 12:10:51 2011 -0400
@@ -247,7 +247,7 @@
Reads the eggs.ini file for use with checking and fetching.
"""
config_file = os.path.join( galaxy_dir, 'eggs.ini' )
- def __init__( self, platform=None ):
+ def __init__( self, galaxy_config_file, platform=None ):
self.eggs = {}
self.config = CaseSensitiveConfigParser()
self.repo = None
@@ -256,7 +256,7 @@
self.py_platform = None
if platform is not None:
self.py_platform = platform.split( '-' )[0]
- self.galaxy_config = GalaxyConfig()
+ self.galaxy_config = GalaxyConfig( galaxy_config_file )
self.parse()
def parse( self ):
self.config.read( Crate.config_file )
@@ -349,12 +349,14 @@
raise EggNotFetchable( missing )
class GalaxyConfig( object ):
- config_file = os.path.join( galaxy_dir, "universe_wsgi.ini" )
always_conditional = ( 'GeneTrack', 'pysam', 'ctypes', 'python_daemon' )
- def __init__( self ):
- self.config = ConfigParser.ConfigParser()
- if self.config.read( GalaxyConfig.config_file ) == []:
- raise Exception( "error: unable to read Galaxy config from %s" % GalaxyConfig.config_file )
+ def __init__( self, config_file ):
+ if config_file is None:
+ self.config = None
+ else:
+ self.config = ConfigParser.ConfigParser()
+ if self.config.read( config_file ) == []:
+ raise Exception( "error: unable to read Galaxy config from %s" % config_file )
def check_conditional( self, egg_name ):
def check_pysam():
# can't build pysam on solaris < 10
@@ -364,6 +366,10 @@
if int( minor ) < 10:
return False
return True
+ # If we're using require() we may not have a Galaxy config file, but if
+ # we're using require(), we don't care about conditionals.
+ if self.config is None:
+ return True
if egg_name == "pysqlite":
# SQLite is different since it can be specified in two config vars and defaults to True
try:
@@ -396,7 +402,7 @@
env = get_env()
def require( req_str ):
- c = Crate()
+ c = Crate( None )
req = pkg_resources.Requirement.parse( req_str )
# TODO: This breaks egg version requirements. Not currently a problem, but
# it could become one.
--- a/lib/galaxy/eggs/dist.py Wed Jun 08 11:52:42 2011 -0400
+++ b/lib/galaxy/eggs/dist.py Wed Jun 08 12:10:51 2011 -0400
@@ -39,10 +39,10 @@
Holds eggs with info on how to build them for distribution.
"""
dist_config_file = os.path.join( galaxy_dir, 'dist-eggs.ini' )
- def __init__( self, build_on='all' ):
+ def __init__( self, galaxy_config_file, build_on='all' ):
self.dist_config = CaseSensitiveConfigParser()
self.build_on = build_on
- ScrambleCrate.__init__( self )
+ ScrambleCrate.__init__( self, galaxy_config_file )
def parse( self ):
self.dist_config.read( DistScrambleCrate.dist_config_file )
self.hosts = dict( self.dist_config.items( 'hosts' ) )
--- a/lib/galaxy/model/migrate/check.py Wed Jun 08 11:52:42 2011 -0400
+++ b/lib/galaxy/model/migrate/check.py Wed Jun 08 12:10:51 2011 -0400
@@ -20,7 +20,7 @@
"mysql" : "MySQL_python"
}
-def create_or_verify_database( url, engine_options={} ):
+def create_or_verify_database( url, galaxy_config_file, engine_options={} ):
"""
Check that the database is use-able, possibly creating it if empty (this is
the only time we automatically create tables, otherwise we force the
@@ -98,8 +98,11 @@
# Verify that the code and the DB are in sync
db_schema = schema.ControlledSchema( engine, migrate_repository )
if migrate_repository.versions.latest != db_schema.version:
- raise Exception( "Your database has version '%d' but this code expects version '%d'. Please backup your database and then migrate the schema by running 'sh manage_db.sh upgrade'."
- % ( db_schema.version, migrate_repository.versions.latest ) )
+ config_arg = ''
+ if os.path.abspath( os.path.join( os.getcwd(), 'universe_wsgi.ini' ) ) != galaxy_config_file:
+ config_arg = ' -c %s' % galaxy_config_file.replace( os.path.abspath( os.getcwd() ), '.' )
+ raise Exception( "Your database has version '%d' but this code expects version '%d'. Please backup your database and then migrate the schema by running 'sh manage_db.sh%s upgrade'."
+ % ( db_schema.version, migrate_repository.versions.latest, config_arg ) )
else:
log.info( "At database version %d" % db_schema.version )
@@ -123,4 +126,4 @@
finally:
for message in "".join( sys.stdout.buffer ).split( "\n" ):
log.info( message )
- sys.stdout = old_stdout
\ No newline at end of file
+ sys.stdout = old_stdout
--- a/run.sh Wed Jun 08 11:52:42 2011 -0400
+++ b/run.sh Wed Jun 08 12:10:51 2011 -0400
@@ -32,7 +32,7 @@
[ "$arg" = "--stop-daemon" ] && FETCH_EGGS=0; break
done
if [ $FETCH_EGGS -eq 1 ]; then
- python ./scripts/check_eggs.py quiet
+ python ./scripts/check_eggs.py -q
if [ $? -ne 0 ]; then
echo "Some eggs are out of date, attempting to fetch..."
python ./scripts/fetch_eggs.py
--- a/scripts/check_eggs.py Wed Jun 08 11:52:42 2011 -0400
+++ b/scripts/check_eggs.py Wed Jun 08 12:10:51 2011 -0400
@@ -3,27 +3,35 @@
usage: check_eggs.py
"""
import os, sys, logging
+from optparse import OptionParser
+
+parser = OptionParser()
+parser.add_option( '-c', '--config', dest='config', help='Path to Galaxy config file (universe_wsgi.ini)', default='universe_wsgi.ini' )
+parser.add_option( '-q', '--quiet', dest='quiet', action="store_true", help='Quiet (no output, only set return code)', default=False )
+( options, args ) = parser.parse_args()
+
+if not os.path.exists( options.config ):
+ print "Config file does not exist (see 'python %s --help'): %s" % ( sys.argv[0], options.config )
+ sys.exit( 1 )
root = logging.getLogger()
root.setLevel( 10 )
root.addHandler( logging.StreamHandler( sys.stdout ) )
+config_arg = ''
+if options.config != 'universe_wsgi.ini':
+ config_arg = '-c %s' % options.config
+
lib = os.path.abspath( os.path.join( os.path.dirname( __file__ ), "..", "lib" ) )
sys.path.append( lib )
-try:
- assert sys.argv[1] == 'quiet'
- quiet = True
-except:
- quiet = False
-
from galaxy.eggs import Crate
-c = Crate()
+c = Crate( options.config )
if c.config_missing:
- if not quiet:
+ if not options.quiet:
print "Some of your Galaxy eggs are out of date. Please update them"
print "by running:"
- print " python scripts/fetch_eggs.py"
+ print " python scripts/fetch_eggs.py %s" % config_arg
sys.exit( 1 )
sys.exit( 0 )
--- a/scripts/dist-scramble.py Wed Jun 08 11:52:42 2011 -0400
+++ b/scripts/dist-scramble.py Wed Jun 08 12:10:51 2011 -0400
@@ -1,11 +1,10 @@
-"""
-usage: dist-scramble.py <egg_name> [platform]
- egg_name - The egg to scramble (as defined in eggs.ini)
- platform - The platform to scramble on (as defined in
- dist-eggs.ini). Leave blank for all.
- Platform-inspecific eggs ignore this argument.
-"""
import os, sys, logging
+from optparse import OptionParser
+
+parser = OptionParser()
+parser.add_option( '-e', '--egg-name', dest='egg_name', help='Egg name (as defined in eggs.ini) to scramble (required)' )
+parser.add_option( '-p', '--platform', dest='platform', help='Scramble for a specific platform (by default, eggs are scrambled for all platforms, see dist-eggs.ini for platform names)' )
+( options, args ) = parser.parse_args()
root = logging.getLogger()
root.setLevel( 10 )
@@ -17,18 +16,20 @@
from galaxy.eggs.dist import DistScrambleCrate, ScrambleFailure
from galaxy.eggs import EggNotFetchable
-if len( sys.argv ) > 3 or len( sys.argv ) < 2:
- print __doc__
+if not options.egg_name:
+ print "ERROR: You must specify an egg to scramble (-e)"
+ parser.print_help()
sys.exit( 1 )
-elif len( sys.argv ) == 3:
- c = DistScrambleCrate( sys.argv[2] )
+
+if options.platform:
+ c = DistScrambleCrate( None, options.platform )
else:
- c = DistScrambleCrate()
+ c = DistScrambleCrate( None )
try:
- eggs = c[sys.argv[1]]
+ eggs = c[options.egg_name]
except:
- print "error: %s not in eggs.ini" % sys.argv[1]
+ print "ERROR: %s not in eggs.ini" % options.egg_name
sys.exit( 1 )
failed = []
for egg in eggs:
--- a/scripts/fetch_eggs.py Wed Jun 08 11:52:42 2011 -0400
+++ b/scripts/fetch_eggs.py Wed Jun 08 12:10:51 2011 -0400
@@ -1,15 +1,15 @@
-"""
-usage: fetch_eggs.py [egg_name] [platform]
- With no arguments, fetches all eggs necessary according to the
- settings in universe_wsgi.ini.
- egg_name - Fetch only this egg (as defined in eggs.ini) or 'all' for
- all eggs (even those not required by your settings).
- platform - Fetch eggs for a specific platform (if not provided, fetch
- eggs for *this* platform). Useful for fetching eggs for cluster
- nodes which are of a different architecture than the head node.
- Platform name can be determined with the get_platforms.py script.
-"""
import os, sys, logging
+from optparse import OptionParser
+
+parser = OptionParser()
+parser.add_option( '-c', '--config', dest='config', help='Path to Galaxy config file (universe_wsgi.ini)', default='universe_wsgi.ini' )
+parser.add_option( '-e', '--egg-name', dest='egg_name', help='Egg name (as defined in eggs.ini) to fetch, or "all" for all eggs, even those not needed by your configuration' )
+parser.add_option( '-p', '--platform', dest='platform', help='Fetch for a specific platform (by default, eggs are fetched for *this* platform' )
+( options, args ) = parser.parse_args()
+
+if not os.path.exists( options.config ):
+ print "Config file does not exist (see 'python %s --help'): %s" % ( sys.argv[0], options.config )
+ sys.exit( 1 )
root = logging.getLogger()
root.setLevel( 10 )
@@ -21,18 +21,18 @@
from galaxy.eggs import Crate, EggNotFetchable
import pkg_resources
+if options.platform:
+ c = Crate( options.config, platform = options.platform )
+else:
+ c = Crate( options.config )
try:
- c = Crate( platform = sys.argv[2] )
-except:
- c = Crate()
-try:
- if len( sys.argv ) == 1:
+ if not options.egg_name:
c.resolve() # Only fetch eggs required by the config
- elif sys.argv[1] == 'all':
+ elif options.egg_name == 'all':
c.resolve( all=True ) # Fetch everything
else:
# Fetch a specific egg
- name = sys.argv[1]
+ name = options.egg_name
try:
egg = c[name]
except:
@@ -41,12 +41,15 @@
dist = egg.resolve()[0]
print "%s %s is installed at %s" % ( dist.project_name, dist.version, dist.location )
except EggNotFetchable, e:
+ config_arg = ''
+ if options.config != 'universe_wsgi.ini':
+ config_arg = '-c %s ' % options.config
try:
- assert sys.argv[1] != 'all'
+ assert options.egg_name != 'all'
egg = e.eggs[0]
print "%s %s couldn't be downloaded automatically. You can try" % ( egg.name, egg.version )
print "building it by hand with:"
- print " python scripts/scramble.py %s"
+ print " python scripts/scramble.py %s-e %s" % ( config_arg, egg.name )
except ( AssertionError, IndexError ):
print "One or more of the python eggs necessary to run Galaxy couldn't be"
print "downloaded automatically. You can try building them by hand (all"
@@ -54,6 +57,6 @@
print " python scripts/scramble.py"
print "Or individually:"
for egg in e.eggs:
- print " python scripts/scramble.py %s" % egg.name
+ print " python scripts/scramble.py %s-e %s" % ( config_arg, egg.name )
sys.exit( 1 )
sys.exit( 0 )
--- a/scripts/manage_db.py Wed Jun 08 11:52:42 2011 -0400
+++ b/scripts/manage_db.py Wed Jun 08 12:10:51 2011 -0400
@@ -21,7 +21,15 @@
config_file = 'community_wsgi.ini'
repo = 'lib/galaxy/webapps/community/model/migrate'
else:
+ # Poor man's optparse
config_file = 'universe_wsgi.ini'
+ if '-c' in sys.argv:
+ pos = sys.argv.index( '-c' )
+ sys.argv.pop(pos)
+ config_file = sys.argv.pop( pos )
+ if not os.path.exists( config_file ):
+ print "Galaxy config file does not exist (hint: use '-c config.ini' for non-standard locations): %s" % config_file
+ sys.exit( 1 )
repo = 'lib/galaxy/model/migrate'
cp = SafeConfigParser()
--- a/scripts/scramble.py Wed Jun 08 11:52:42 2011 -0400
+++ b/scripts/scramble.py Wed Jun 08 12:10:51 2011 -0400
@@ -1,11 +1,14 @@
-"""
-usage: scramble.py [egg_name]
- With no arguments, scrambles all eggs necessary according to the
- settings in universe_wsgi.ini.
- egg_name - Scramble only this egg (as defined in eggs.ini) or 'all'
- for all eggs (even those not required by your settings).
-"""
import os, sys, logging
+from optparse import OptionParser
+
+parser = OptionParser()
+parser.add_option( '-c', '--config', dest='config', help='Path to Galaxy config file (universe_wsgi.ini)', default='universe_wsgi.ini' )
+parser.add_option( '-e', '--egg-name', dest='egg_name', help='Egg name (as defined in eggs.ini) to fetch, or "all" for all eggs, even those not needed by your configuration' )
+( options, args ) = parser.parse_args()
+
+if not os.path.exists( options.config ):
+ print "Config file does not exist (see 'python %s --help'): %s" % ( sys.argv[0], options.config )
+ sys.exit( 1 )
root = logging.getLogger()
root.setLevel( 10 )
@@ -16,22 +19,25 @@
from galaxy.eggs.scramble import ScrambleCrate, ScrambleFailure, EggNotFetchable
-c = ScrambleCrate()
+c = ScrambleCrate( options.config )
try:
- if len( sys.argv ) == 1:
+ if not options.egg_name:
eggs = c.scramble()
- elif sys.argv[1] == 'all':
+ elif options.egg_name == 'all':
c.scramble( all=True )
else:
# Scramble a specific egg
- name = sys.argv[1]
+ name = options.egg_name
try:
egg = c[name]
except:
print "error: %s not in eggs.ini" % name
sys.exit( 1 )
for dependency in egg.dependencies:
+ config_arg = ''
+ if options.config != 'universe_wsgi.ini':
+ config_arg = '-c %s' % options.config
print "Checking %s dependency: %s" % ( egg.name, dependency )
try:
c[dependency].require()
@@ -39,7 +45,7 @@
degg = e.eggs[0]
print "%s build dependency %s %s couldn't be downloaded" % ( egg.name, degg.name, degg.version )
print "automatically. You can try building it by hand with:"
- print " python scripts/scramble.py %s" % degg.name
+ print " python scripts/scramble.py %s-e %s" % ( config_agr, degg.name )
sys.exit( 1 )
egg.scramble()
sys.exit( 0 )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/6005fbf6fc4d/
changeset: 6005fbf6fc4d
user: jgoecks
date: 2011-06-08 17:32:55
summary: Unicode fixes and refactoring.
affected #: 3 files (231 bytes)
--- a/lib/galaxy/tools/search/__init__.py Wed Jun 08 11:15:42 2011 -0400
+++ b/lib/galaxy/tools/search/__init__.py Wed Jun 08 11:32:55 2011 -0400
@@ -1,4 +1,5 @@
from galaxy.eggs import require
+from galaxy.web.framework.helpers import to_unicode
# Whoosh is compatible with Python 2.5+ Try to import Whoosh and set flag to indicate whether tool search is enabled.
try:
require( "Whoosh" )
@@ -35,12 +36,6 @@
writer = self.index.writer()
## TODO: would also be nice to search section headers.
for id, tool in self.toolbox.tools_by_id.iteritems():
- def to_unicode( a_basestr ):
- if type( a_basestr ) is str:
- return unicode( a_basestr, 'utf-8' )
- else:
- return a_basestr
-
writer.add_document( id=id, title=to_unicode(tool.name), description=to_unicode(tool.description), help=to_unicode(tool.help) )
writer.commit()
--- a/lib/galaxy/web/controllers/root.py Wed Jun 08 11:15:42 2011 -0400
+++ b/lib/galaxy/web/controllers/root.py Wed Jun 08 11:32:55 2011 -0400
@@ -8,6 +8,7 @@
from galaxy.util.sanitize_html import sanitize_html
from galaxy.model.orm import *
from galaxy.model.item_attrs import UsesAnnotations
+from galaxy.web.framework.helpers import to_unicode
log = logging.getLogger( __name__ )
@@ -329,7 +330,7 @@
trans.sa_session.flush()
if trans.app.config.set_metadata_externally:
trans.app.datatypes_registry.set_external_metadata_tool.tool_action.execute( trans.app.datatypes_registry.set_external_metadata_tool, trans, incoming = { 'input1':data }, overwrite = False ) #overwrite is False as per existing behavior
- return trans.show_ok_message( "Changed the type of dataset '%s' to %s" % ( data.name, params.datatype ), refresh_frames=['history'] )
+ return trans.show_ok_message( "Changed the type of dataset '%s' to %s" % ( to_unicode( data.name ), params.datatype ), refresh_frames=['history'] )
else:
return trans.show_error_message( "You are unable to change datatypes in this manner. Changing %s to %s is not allowed." % ( data.extension, params.datatype ) )
elif params.save:
--- a/templates/dataset/copy_view.mako Wed Jun 08 11:15:42 2011 -0400
+++ b/templates/dataset/copy_view.mako Wed Jun 08 11:32:55 2011 -0400
@@ -66,7 +66,7 @@
%><div class="form-row"><input type="checkbox" name="source_dataset_ids" id="dataset_${encoded_id}" value="${encoded_id}"${checked}/>
- <label for="dataset_${encoded_id}" style="display: inline;font-weight:normal;"> ${data.hid}: ${data.name}</label>
+ <label for="dataset_${encoded_id}" style="display: inline;font-weight:normal;"> ${data.hid}: ${h.to_unicode(data.name)}</label></div>
%endfor
%else:
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

commit/galaxy-central: afgane: Do not display non-functional buttons for editing tags/annotations on history Show Structure page
by Bitbucket 08 Jun '11
by Bitbucket 08 Jun '11
08 Jun '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/5b5f693ca5cb/
changeset: 5b5f693ca5cb
user: afgane
date: 2011-06-08 17:15:42
summary: Do not display non-functional buttons for editing tags/annotations on history Show Structure page
affected #: 2 files (106 bytes)
--- a/templates/history/display_structured.mako Tue Jun 07 14:53:53 2011 -0400
+++ b/templates/history/display_structured.mako Wed Jun 08 11:15:42 2011 -0400
@@ -91,7 +91,7 @@
</%def><%def name="render_item_hda( hda, children )">
- ${render_dataset( hda, hda.hid )}
+ ${render_dataset( hda, hda.hid, display_structured=True )}
</%def><%def name="render_item_job( job, children )">
--- a/templates/root/history_common.mako Tue Jun 07 14:53:53 2011 -0400
+++ b/templates/root/history_common.mako Wed Jun 08 11:15:42 2011 -0400
@@ -1,6 +1,6 @@
<% _=n_ %>
## Render the dataset `data` as history item, using `hid` as the displayed id
-<%def name="render_dataset( data, hid, show_deleted_on_refresh = False, for_editing = True )">
+<%def name="render_dataset( data, hid, show_deleted_on_refresh = False, for_editing = True, display_structured = False )"><%
dataset_id = trans.security.encode_id( data.id )
from galaxy.datatypes.metadata import FileParameter
@@ -171,10 +171,12 @@
new-url="${h.url_for( controller='tracks', action='index', dataset_id=dataset_id, default_dbkey=data.dbkey)}" title="Visualize in Trackster"></a>
%endif
%if trans.user:
- <div style="float: right">
- <a href="${h.url_for( controller='tag', action='retag', item_class=data.__class__.__name__, item_id=dataset_id )}" target="galaxy_main" title="Edit dataset tags" class="icon-button tags tooltip"></a>
- <a href="${h.url_for( controller='dataset', action='annotate', id=dataset_id )}" target="galaxy_main" title="Edit dataset annotation" class="icon-button annotate tooltip"></a>
- </div>
+ %if not display_structured:
+ <div style="float: right">
+ <a href="${h.url_for( controller='tag', action='retag', item_class=data.__class__.__name__, item_id=dataset_id )}" target="galaxy_main" title="Edit dataset tags" class="icon-button tags tooltip"></a>
+ <a href="${h.url_for( controller='dataset', action='annotate', id=dataset_id )}" target="galaxy_main" title="Edit dataset annotation" class="icon-button annotate tooltip"></a>
+ </div>
+ %endif
<div style="clear: both"></div><div class="tag-area" style="display: none"><strong>Tags:</strong>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

commit/galaxy-central: greg: Revert change set 2b4d50205705, adding a [missing] comment so all meta data items will always be displayed on the ldda_info page.
by Bitbucket 07 Jun '11
by Bitbucket 07 Jun '11
07 Jun '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/515151397bc5/
changeset: 515151397bc5
user: greg
date: 2011-06-07 20:53:53
summary: Revert change set 2b4d50205705, adding a [missing] comment so all meta data items will always be displayed on the ldda_info page.
affected #: 1 file (12 bytes)
--- a/templates/library/common/ldda_info.mako Tue Jun 07 14:36:46 2011 -0400
+++ b/templates/library/common/ldda_info.mako Tue Jun 07 14:53:53 2011 -0400
@@ -135,23 +135,22 @@
<div class="form-row"><div>${ldda.blurb}</div></div>
+ ## We want to display all metadata item here, whether marked visible or not since they are all pretty useful
%for name, spec in ldda.metadata.spec.items():
- %if spec.visible:
- <div class="form-row">
- <label>${spec.desc.replace( ' (click box & select)', '' )}:</label>
- <%
- metadata_val = ldda.metadata.get( name )
- if isinstance( metadata_val, trans.model.MetadataFile ):
- metadata_val = metadata_val.file_name
- elif isinstance( metadata_val, list ):
- # Make sure list items are strings
- metadata_val = [ str( item ) for item in metadata_val ]
- metadata_val = ', '.join( metadata_val )
- %>
- ${metadata_val}
- <div style="clear: both"></div>
- </div>
- %endif
+ <div class="form-row">
+ <label>${spec.desc.replace( ' (click box & select)', '' )}:</label>
+ <%
+ metadata_val = ldda.metadata.get( name )
+ if isinstance( metadata_val, trans.model.MetadataFile ):
+ metadata_val = metadata_val.file_name
+ elif isinstance( metadata_val, list ):
+ # Make sure list items are strings
+ metadata_val = [ str( item ) for item in metadata_val ]
+ metadata_val = ', '.join( metadata_val )
+ %>
+ ${metadata_val}
+ <div style="clear: both"></div>
+ </div>
%endfor
%if ldda.peek != "no peek":
<div class="form-row">
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0

commit/galaxy-central: richard_burhans: allow lines starting with arbitrary characters to be excluded from the peek
by Bitbucket 07 Jun '11
by Bitbucket 07 Jun '11
07 Jun '11
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/bcc9c7aa5569/
changeset: bcc9c7aa5569
user: richard_burhans
date: 2011-06-07 20:36:46
summary: allow lines starting with arbitrary characters to be excluded from the peek
affected #: 1 file (243 bytes)
--- a/lib/galaxy/datatypes/data.py Tue Jun 07 14:31:58 2011 -0400
+++ b/lib/galaxy/datatypes/data.py Tue Jun 07 14:36:46 2011 -0400
@@ -417,13 +417,13 @@
if line and not line.startswith( '#' ):
data_lines += 1
return data_lines
- def set_peek( self, dataset, line_count=None, is_multi_byte=False ):
+ def set_peek( self, dataset, line_count=None, is_multi_byte=False, skipchars=[] ):
"""
Set the peek. This method is used by various subclasses of Text.
"""
if not dataset.dataset.purged:
# The file must exist on disk for the get_file_peek() method
- dataset.peek = get_file_peek( dataset.file_name, is_multi_byte=is_multi_byte )
+ dataset.peek = get_file_peek( dataset.file_name, is_multi_byte=is_multi_byte, skipchars=skipchars )
if line_count is None:
# See if line_count is stored in the metadata
if dataset.metadata.data_lines:
@@ -461,7 +461,7 @@
path, name = os.path.split(__file__)
full_path = os.path.join( path, 'test', fname )
return full_path
-def get_file_peek( file_name, is_multi_byte=False, WIDTH=256, LINE_COUNT=5 ):
+def get_file_peek( file_name, is_multi_byte=False, WIDTH=256, LINE_COUNT=5, skipchars=[] ):
"""
Returns the first LINE_COUNT lines wrapped to WIDTH
@@ -489,8 +489,14 @@
data_checked = True
if file_type in [ 'gzipped', 'binary' ]:
break
- lines.append( line )
- count += 1
+ skip_line = False
+ for skipchar in skipchars:
+ if line.startswith( skipchar ):
+ skip_line = True
+ break
+ if not skip_line:
+ lines.append( line )
+ count += 1
temp.close()
if file_type in [ 'gzipped', 'binary' ]:
text = "%s file" % file_type
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
2 new changesets in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/dc97d0a852cb/
changeset: dc97d0a852cb
user: jgoecks
date: 2011-06-07 20:31:35
summary: Rename and reorder Cuffdiff outputs for clarity.
affected #: 1 file (172 bytes)
--- a/tools/ngs_rna/cuffdiff_wrapper.xml Tue Jun 07 11:32:11 2011 -0400
+++ b/tools/ngs_rna/cuffdiff_wrapper.xml Tue Jun 07 14:31:35 2011 -0400
@@ -132,17 +132,17 @@
</inputs><outputs>
- <data format="tabular" name="isoforms_exp" label="${tool.name} on ${on_string}: isoform expression"/>
- <data format="tabular" name="genes_exp" label="${tool.name} on ${on_string}: gene expression"/>
- <data format="tabular" name="tss_groups_exp" label="${tool.name} on ${on_string}: TSS groups expression"/>
- <data format="tabular" name="cds_exp_fpkm_tracking" label="${tool.name} on ${on_string}: CDS Expression FPKM Tracking"/>
- <data format="tabular" name="isoforms_fpkm_tracking" label="${tool.name} on ${on_string}: isoform FPKM tracking"/>
+ <data format="tabular" name="splicing_diff" label="${tool.name} on ${on_string}: splicing differential expression testing"/>
+ <data format="tabular" name="promoters_diff" label="${tool.name} on ${on_string}: promoters differential expression testing"/>
+ <data format="tabular" name="cds_diff" label="${tool.name} on ${on_string}: CDS overloading diffential expression testing"/>
+ <data format="tabular" name="cds_exp_fpkm_tracking" label="${tool.name} on ${on_string}: CDS FPKM differential expression testing"/>
+ <data format="tabular" name="cds_fpkm_tracking" label="${tool.name} on ${on_string}: CDS FPKM tracking"/>
+ <data format="tabular" name="tss_groups_exp" label="${tool.name} on ${on_string}: TSS groups differential expression testing"/>
+ <data format="tabular" name="tss_groups_fpkm_tracking" label="${tool.name} on ${on_string}: TSS groups FPKM tracking" />
+ <data format="tabular" name="genes_exp" label="${tool.name} on ${on_string}: gene differential expression testing"/><data format="tabular" name="genes_fpkm_tracking" label="${tool.name} on ${on_string}: gene FPKM tracking"/>
- <data format="tabular" name="tss_groups_fpkm_tracking" label="${tool.name} on ${on_string}: TSS groups FPKM tracking" />
- <data format="tabular" name="cds_fpkm_tracking" label="${tool.name} on ${on_string}: CDS FPKM tracking"/>
- <data format="tabular" name="splicing_diff" label="${tool.name} on ${on_string}: splicing diff"/>
- <data format="tabular" name="promoters_diff" label="${tool.name} on ${on_string}: promoters diff"/>
- <data format="tabular" name="cds_diff" label="${tool.name} on ${on_string}: CDS diff"/>
+ <data format="tabular" name="isoforms_exp" label="${tool.name} on ${on_string}: transcript differential expression testing"/>
+ <data format="tabular" name="isoforms_fpkm_tracking" label="${tool.name} on ${on_string}: transcript FPKM tracking"/></outputs><tests>
@@ -164,17 +164,17 @@
Line diffs are needed because cuffdiff does not produce deterministic output.
TODO: can we find datasets that lead to deterministic behavior?
-->
- <output name="isoforms_exp" file="cuffdiff_out1.txt" lines_diff="200"/>
- <output name="genes_exp" file="cuffdiff_out2.txt" lines_diff="200"/>
- <output name="tss_groups_exp" file="cuffdiff_out3.txt"/>
- <output name="cds_exp_fpkm_tracking" file="cuffdiff_out4.txt"/>
- <output name="isoforms_fpkm_tracking" file="cuffdiff_out5.txt" lines_diff="200"/>
- <output name="genes_fpkm_tracking" file="cuffdiff_out6.txt" lines_diff="200"/>
- <output name="tss_groups_fpkm_tracking" file="cuffdiff_out7.txt"/>
- <output name="cds_fpkm_tracking" file="cuffdiff_out8.txt"/><output name="splicing_diff" file="cuffdiff_out9.txt"/><output name="promoters_diff" file="cuffdiff_out10.txt"/><output name="cds_diff" file="cuffdiff_out11.txt"/>
+ <output name="cds_exp_fpkm_tracking" file="cuffdiff_out4.txt"/>
+ <output name="cds_fpkm_tracking" file="cuffdiff_out8.txt"/>
+ <output name="tss_groups_exp" file="cuffdiff_out3.txt"/>
+ <output name="tss_groups_fpkm_tracking" file="cuffdiff_out7.txt"/>
+ <output name="genes_exp" file="cuffdiff_out2.txt" lines_diff="200"/>
+ <output name="genes_fpkm_tracking" file="cuffdiff_out6.txt" lines_diff="200"/>
+ <output name="isoforms_exp" file="cuffdiff_out1.txt" lines_diff="200"/>
+ <output name="isoforms_fpkm_tracking" file="cuffdiff_out5.txt" lines_diff="200"/></test></tests>
http://bitbucket.org/galaxy/galaxy-central/changeset/801a4a2a5921/
changeset: 801a4a2a5921
user: jgoecks
date: 2011-06-07 20:31:58
summary: Merge.
affected #: 1 file (105 bytes)
--- a/templates/library/common/ldda_info.mako Tue Jun 07 14:31:35 2011 -0400
+++ b/templates/library/common/ldda_info.mako Tue Jun 07 14:31:58 2011 -0400
@@ -136,20 +136,22 @@
<div>${ldda.blurb}</div></div>
%for name, spec in ldda.metadata.spec.items():
- <div class="form-row">
- <label>${spec.desc.replace( ' (click box & select)', '' )}:</label>
- <%
- metadata_val = ldda.metadata.get( name )
- if isinstance( metadata_val, trans.model.MetadataFile ):
- metadata_val = metadata_val.file_name
- elif isinstance( metadata_val, list ):
- # Make sure list items are strings
- metadata_val = [ str( item ) for item in metadata_val ]
- metadata_val = ', '.join( metadata_val )
- %>
- ${metadata_val}
- <div style="clear: both"></div>
- </div>
+ %if spec.visible:
+ <div class="form-row">
+ <label>${spec.desc.replace( ' (click box & select)', '' )}:</label>
+ <%
+ metadata_val = ldda.metadata.get( name )
+ if isinstance( metadata_val, trans.model.MetadataFile ):
+ metadata_val = metadata_val.file_name
+ elif isinstance( metadata_val, list ):
+ # Make sure list items are strings
+ metadata_val = [ str( item ) for item in metadata_val ]
+ metadata_val = ', '.join( metadata_val )
+ %>
+ ${metadata_val}
+ <div style="clear: both"></div>
+ </div>
+ %endif
%endfor
%if ldda.peek != "no peek":
<div class="form-row">
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0