galaxy-dev
Threads by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- 10009 discussions
23 Nov '09
details: http://www.bx.psu.edu/hg/galaxy/rev/b9b9fe0612b9
changeset: 3112:b9b9fe0612b9
user: Kanwei Li <kanwei(a)gmail.com>
date: Thu Nov 19 18:55:35 2009 -0500
description:
trackster: load block data incrementally, huge performance gains from drawing smaller tiles
diffstat:
lib/galaxy/visualization/tracks/data/interval_index.py | 4 +-
static/scripts/packed/galaxy.base.js | 2 +-
static/scripts/packed/trackster.js | 2 +-
static/scripts/trackster.js | 81 +++++++++----------
4 files changed, 42 insertions(+), 47 deletions(-)
diffs (233 lines):
diff -r b70e23d80a75 -r b9b9fe0612b9 lib/galaxy/visualization/tracks/data/interval_index.py
--- a/lib/galaxy/visualization/tracks/data/interval_index.py Thu Nov 19 12:56:24 2009 -0500
+++ b/lib/galaxy/visualization/tracks/data/interval_index.py Thu Nov 19 18:55:35 2009 -0500
@@ -18,11 +18,10 @@
index = Indexes( self.converted_dataset.file_name )
results = []
- uid = 0
for start, end, offset in index.find(chrom, start, end):
source.seek(offset)
feature = source.readline().split()
- payload = { 'uid': uid, 'start': start, 'end': end, 'name': feature[3] }
+ payload = { 'uid': offset, 'start': start, 'end': end, 'name': feature[3] }
try:
payload['strand'] = feature[5]
except IndexError:
@@ -44,6 +43,5 @@
pass
results.append(payload)
- uid += 1
return results
diff -r b70e23d80a75 -r b9b9fe0612b9 static/scripts/packed/galaxy.base.js
--- a/static/scripts/packed/galaxy.base.js Thu Nov 19 12:56:24 2009 -0500
+++ b/static/scripts/packed/galaxy.base.js Thu Nov 19 18:55:35 2009 -0500
@@ -1,1 +1,1 @@
-$.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")}})};jQuery(document).ready(function(){jQuery("a[confirm]").click(function(){return confirm(jQuery(this).attr("confirm"))});jQuery("div[popupmenu]").each(function(){var c={};$(this).find("a").each(function(){var b=$(this).attr("confirm"),d=$(this).attr("href"),e=$(this).attr("target");c[$(this).text()]=function(){if(!b||confirm(b)){var g=window;if(e=="_parent"){g=window.parent}g.location=d}}});var a=$("#"+$(this).attr("popupmenu"));make_popupmenu(a,c);$(this).remove();a.show()})});function ensure_popup_helper(){if($("#popup-helper").length==0){$("<div id='popup-helper'/>").css({background:"white",opacity:0,zIndex:15000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function make_popupmenu(d,c){ens
ure_popup_helper();var a=$(d);var b=$("<ul id='"+d.attr("id")+"-menu'></ul>");$.each(c,function(g,f){if(f){$("<li/>").html(g).click(f).appendTo(b)}else{$("<li class='head'/>").html(g).appendTo(b)}});var e=$("<div class='popmenu-wrapper'>");e.append(b).append("<div class='overlay-border'>").css("position","absolute").appendTo("body").hide();attach_popupmenu(d,e)}function attach_popupmenu(b,d){var a=function(){d.unbind().hide();$("#popup-helper").unbind("click.popupmenu").hide()};var c=function(g){var h=$(b).offset();$("#popup-helper").bind("click.popupmenu",a).show();d.click(a).css({left:0,top:-1000}).show();var f=g.pageX-d.width()/2;f=Math.min(f,$(document).scrollLeft()+$(window).width()-$(d).width()-20);f=Math.max(f,$(document).scrollLeft()+20);d.css({top:g.pageY-5,left:f});return false};$(b).click(c)};
\ No newline at end of file
+$.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")}})};jQuery(document).ready(function(){jQuery("a[confirm]").click(function(){return confirm(jQuery(this).attr("confirm"))});make_popup_menus()});function make_popup_menus(){jQuery("div[popupmenu]").each(function(){var c={};$(this).find("a").each(function(){var b=$(this).attr("confirm"),d=$(this).attr("href"),e=$(this).attr("target");c[$(this).text()]=function(){if(!b||confirm(b)){var g=window;if(e=="_parent"){g=window.parent}g.location=d}}});var a=$("#"+$(this).attr("popupmenu"));make_popupmenu(a,c);$(this).remove();a.show()})}function ensure_popup_helper(){if($("#popup-helper").length==0){$("<div id='popup-helper'/>").css({background:"white",opacity:0,zIndex:15000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("
body").hide()}}function make_popupmenu(d,c){ensure_popup_helper();var a=$(d);var b=$("<ul id='"+d.attr("id")+"-menu'></ul>");$.each(c,function(g,f){if(f){$("<li/>").html(g).click(f).appendTo(b)}else{$("<li class='head'/>").html(g).appendTo(b)}});var e=$("<div class='popmenu-wrapper'>");e.append(b).append("<div class='overlay-border'>").css("position","absolute").appendTo("body").hide();attach_popupmenu(d,e)}function attach_popupmenu(b,d){var a=function(){d.unbind().hide();$("#popup-helper").unbind("click.popupmenu").hide()};var c=function(g){var h=$(b).offset();$("#popup-helper").bind("click.popupmenu",a).show();d.click(a).css({left:0,top:-1000}).show();var f=g.pageX-d.width()/2;f=Math.min(f,$(document).scrollLeft()+$(window).width()-$(d).width()-20);f=Math.max(f,$(document).scrollLeft()+20);d.css({top:g.pageY-5,left:f});return false};$(b).click(c)}var array_length=function(a){if(a.length){return a.length}var b=0;for(element in a){b++}return b};
\ No newline at end of file
diff -r b70e23d80a75 -r b9b9fe0612b9 static/scripts/packed/trackster.js
--- a/static/scripts/packed/trackster.js Thu Nov 19 12:56:24 2009 -0500
+++ b/static/scripts/packed/trackster.js Thu Nov 19 18:55:35 2009 -0500
@@ -1,1 +1,1 @@
-var DENSITY=1000,DATA_ERROR="There was an error in indexing this dataset.",DATA_NONE="No data for this chrom/contig.",DATA_PENDING="Currently indexing... please wait",DATA_LOADING="Loading data...",CACHED_TILES=10,CACHED_DATA=20,CONTEXT=$("<canvas></canvas>").get(0).getContext("2d"),RIGHT_STRAND,LEFT_STRAND;var right_img=new Image();right_img.src="../images/visualization/strand_right.png";right_img.onload=function(){RIGHT_STRAND=CONTEXT.createPattern(right_img,"repeat")};var left_img=new Image();left_img.src="../images/visualization/strand_left.png";left_img.onload=function(){LEFT_STRAND=CONTEXT.createPattern(left_img,"repeat")};var right_img_inv=new Image();right_img_inv.src="../images/visualization/strand_right_inv.png";right_img_inv.onload=function(){RIGHT_STRAND_INV=CONTEXT.createPattern(right_img_inv,"repeat")};var left_img_inv=new Image();left_img_inv.src="../images/visualization/strand_left_inv.png";left_img_inv.onload=function(){LEFT_STRAND_INV=CONTEXT.createPattern(
left_img_inv,"repeat")};function commatize(b){b+="";var a=/(\d+)(\d{3})/;while(a.test(b)){b=b.replace(a,"$1,$2")}return b}var Cache=function(a){this.num_elements=a;this.obj_cache={};this.key_ary=[]};$.extend(Cache.prototype,{get:function(b){var a=this.key_ary.indexOf(b);if(a!=-1){this.key_ary.splice(a,1);this.key_ary.push(b)}return this.obj_cache[b]},set:function(b,c){if(!this.obj_cache[b]){if(this.key_ary.length>=this.num_elements){var a=this.key_ary.shift();delete this.obj_cache[a]}this.key_ary.push(b)}this.obj_cache[b]=c;return c}});var View=function(b,a){this.chrom=b;this.tracks=[];this.max_low=0;this.max_high=a;this.center=(this.max_high-this.max_low)/2;this.span=this.max_high-this.max_low;this.zoom_factor=2;this.zoom_level=0};$.extend(View.prototype,{add_track:function(a){a.view=this;this.tracks.push(a);if(a.init){a.init()}},redraw:function(){var d=this.span/Math.pow(this.zoom_factor,this.zoom_level),b=this.center-(d/2),e=b+d;if(b<0){b=0;e=b+d}else{if(e>this.max_high){
e=this.max_high;b=e-d}}this.low=Math.floor(b);this.high=Math.ceil(e);this.center=Math.round(this.low+(this.high-this.low)/2);$("#overview-box").css({left:(this.low/this.span)*$("#overview-viewport").width(),width:Math.max(12,((this.high-this.low)/this.span)*$("#overview-viewport").width())}).show();$("#low").val(commatize(this.low));$("#high").val(commatize(this.high));for(var c=0,a=this.tracks.length;c<a;c++){this.tracks[c].draw()}$("#bottom-spacer").remove();$("#viewport").append('<div id="bottom-spacer" style="height: 200px;"></div>')},zoom_in:function(a){if(this.max_high===0||this.high-this.low<30){return}if(a){this.center=a/$(document).width()*(this.high-this.low)+this.low}this.zoom_level+=1;this.redraw()},zoom_out:function(){if(this.max_high===0){return}if(this.zoom_level<=0){this.zoom_level=0;return}this.zoom_level-=1;this.redraw()}});var Track=function(a,b){this.name=a;this.parent_element=b;this.make_container()};$.extend(Track.prototype,{make_container:function(){th
is.header_div=$("<div class='track-header'>").text(this.name);this.content_div=$("<div class='track-content'>");this.container_div=$("<div class='track'></div>").append(this.header_div).append(this.content_div);this.parent_element.append(this.container_div)}});var TiledTrack=function(){this.tile_cache=new Cache(CACHED_TILES)};$.extend(TiledTrack.prototype,Track.prototype,{draw:function(){var h=this.view.low,d=this.view.high,e=d-h;var c=Math.pow(10,Math.ceil(Math.log(e/DENSITY)/Math.log(10)));c=Math.max(c,0.1);c=Math.min(c,1000000);var j=$("<div style='position: relative;'></div>");this.content_div.children(":first").remove();this.content_div.append(j);var k=this.content_div.width()/e;var g;var a=Math.floor(h/c/DENSITY);while((a*DENSITY*c)<d){var i=this.content_div.width()+"_"+this.view.zoom_level+"_"+a;var b=this.tile_cache.get(i);if(b){var f=a*DENSITY*c;b.css({left:(f-this.view.low)*k});j.append(b)}else{g=this.draw_tile(c,a,j,k);if(g){this.tile_cache.set(i,g)}}a+=1}}});var
LabelTrack=function(a){Track.call(this,null,a);this.container_div.addClass("label-track")};$.extend(LabelTrack.prototype,Track.prototype,{draw:function(){var c=this.view,d=c.high-c.low,g=Math.floor(Math.pow(10,Math.floor(Math.log(d)/Math.log(10)))),a=Math.floor(c.low/g)*g,e=this.content_div.width(),b=$("<div style='position: relative; height: 1.3em;'></div>");while(a<c.high){var f=(a-c.low)/d*e;b.append($("<div class='label'>"+commatize(a)+"</div>").css({position:"absolute",left:f-1}));a+=g}this.content_div.children(":first").remove();this.content_div.append(b)}});var LineTrack=function(c,b,a){Track.call(this,c,$("#viewport"));TiledTrack.call(this);this.track_type="line";this.height_px=(a?a:100);this.container_div.addClass("line-track");this.dataset_id=b;this.cache=new Cache(CACHED_DATA)};$.extend(LineTrack.prototype,TiledTrack.prototype,{init:function(){var a=this;a.content_div.text(DATA_LOADING);$.getJSON(data_url,{stats:true,track_type:a.track_type,chrom:a.view.chrom,low:
null,high:null,dataset_id:a.dataset_id},function(c){if(!c||c=="error"){a.container_div.addClass("error");a.content_div.text(DATA_ERROR)}else{if(c=="no data"){a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}else{if(c=="pending"){a.container_div.addClass("pending");a.content_div.text(DATA_PENDING);setTimeout(function(){a.init()},5000)}else{a.content_div.text("");a.content_div.css("height",a.height_px+"px");a.min_value=c.min;a.max_value=c.max;a.vertical_range=a.max_value-a.min_value;var d=$("<div class='yaxislabel'>"+a.min_value+"</div>");var b=$("<div class='yaxislabel'>"+a.max_value+"</div>");b.css({position:"relative",top:"35px"});b.prependTo(a.container_div);d.css({position:"relative",top:a.height_px+32+"px",});d.prependTo(a.container_div);a.draw()}}}})},get_data:function(d,b){var c=this,a=b*DENSITY*d,f=(b+1)*DENSITY*d,e=d+"_"+b;$.getJSON(data_url,{track_type:this.track_type,chrom:this.view.chrom,low:a,high:f,dataset_id:this.dataset_id},function(g){c.cache[
e]=g;$(document).trigger("redraw")})},draw_tile:function(d,a,m,o){if(!this.vertical_range){return}var h=a*DENSITY*d,b=DENSITY*d,c=$("<canvas class='tile'></canvas>"),l=d+"_"+a;if(!this.cache[l]){this.get_data(d,a);return}var g=this.cache[l];c.css({position:"absolute",top:0,left:(h-this.view.low)*o});c.get(0).width=Math.ceil(b*o);c.get(0).height=this.height_px;var n=c.get(0).getContext("2d");var e=false;n.beginPath();for(var f=0;f<g.length-1;f++){var k=g[f][0]-h;var j=g[f][1];if(isNaN(j)){e=false}else{k=k*o;j=(j-this.min_value)/this.vertical_range*this.height_px;if(e){n.lineTo(k,j)}else{n.moveTo(k,j);e=true}}}n.stroke();m.append(c);return c}});var FeatureTrack=function(c,b,a){Track.call(this,c,$("#viewport"));TiledTrack.call(this);this.track_type="feature";this.height_px=(a?a:100);this.container_div.addClass("feature-track");this.dataset_id=b;this.zo_slots={};this.show_labels_scale=0.001;this.showing_labels=false;this.vertical_gap=10;this.base_color="#2C3143"};$.extend(Featur
eTrack.prototype,TiledTrack.prototype,{init:function(){var a=this;a.content_div.text(DATA_LOADING);$.getJSON(data_url,{track_type:a.track_type,low:a.view.max_low,high:a.view.max_high,dataset_id:a.dataset_id,chrom:a.view.chrom},function(b){if(b=="error"){a.container_div.addClass("error");a.content_div.text(DATA_ERROR)}else{if(b.length===0||b=="no data"){a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}else{if(b=="pending"){a.container_div.addClass("pending");a.content_div.text(DATA_PENDING);setTimeout(function(){a.init()},5000)}else{a.content_div.text("");a.content_div.css("height",a.height_px+"px");a.values=b;a.calc_slots();a.slots=a.zo_slots;a.draw()}}}})},calc_slots:function(o){var c=[],b=this.content_div.width()/(this.view.high-this.view.low),g=this.show_labels_scale,a=this.view.max_high,e=this.view.max_low;if(o){this.zi_slots={}}var m=$("<canvas></canvas>").get(0).getContext("2d");for(var f=0,h=this.values.length;f<h;f++){var k,l,n=this.values[f];if(o){k=
Math.floor((n.start-e)*g);k-=m.measureText(n.name).width;l=Math.ceil((n.end-e)*g)}else{k=Math.floor((n.start-e)*b);l=Math.ceil((n.end-e)*b)}var d=0;while(true){if(c[d]===undefined||c[d]<k){c[d]=l;if(o){this.zi_slots[n.name]=d}else{this.zo_slots[n.name]=d}break}d++}}this.height_px=c.length*this.vertical_gap+15;this.content_div.css("height",this.height_px+"px")},draw_tile:function(w,B,g,n){if(!this.values){return null}if(n>this.show_labels_scale&&!this.showing_labels){this.showing_labels=true;if(!this.zi_slots){this.calc_slots(true)}this.slots=this.zi_slots}else{if(n<=this.show_labels_scale&&this.showing_labels){this.showing_labels=false;this.slots=this.zo_slots}}var C=B*DENSITY*w,c=(B+1)*DENSITY*w,q=DENSITY*w;var u=Math.ceil(q*n),t=this.height_px,s=$("<canvas class='tile'></canvas>");s.css({position:"absolute",top:0,left:(C-this.view.low)*n});s.get(0).width=u;s.get(0).height=t;var v=s.get(0).getContext("2d");v.fillStyle=this.base_color;v.font="10px monospace";v.textAlign="rig
ht";var y=0;for(var z=0,A=this.values.length;z<A;z++){var f=this.values[z];if(f.start<=c&&f.end>=C){var e=Math.floor(Math.max(0,(f.start-C)*n)),h=Math.ceil(Math.min(u,(f.end-C)*n)),d=this.slots[f.name]*this.vertical_gap;var a,G,b=null,o=null;if(f.thick_start&&f.thick_end){b=Math.floor(Math.max(0,(f.thick_start-C)*n));o=Math.ceil(Math.min(u,(f.thick_end-C)*n))}if(!this.showing_labels){v.fillRect(e,d+5,h-e,1)}else{if(v.fillText){v.fillText(f.name,e-1,d+8)}var E=f.blocks;if(E){if(f.strand){if(f.strand=="+"){v.fillStyle=RIGHT_STRAND}else{if(f.strand=="-"){v.fillStyle=LEFT_STRAND}}v.fillRect(e,d,h-e,10);v.fillStyle=this.base_color}for(var x=0,F=E.length;x<F;x++){var m=E[x],l=Math.floor(Math.max(0,(m[0]-C)*n)),D=Math.ceil(Math.min(u,(m[1]-C)*n));a=5;G=3;v.fillRect(l,d+G,D-l,a);if(b&&(l<o||D>b)){a=9;G=1;var r=Math.max(l,b),p=Math.min(D,o);v.fillRect(r,d+G,p-r,a)}}}else{a=9;G=1;v.fillRect(e,d+G,h-e,a);if(f.strand){if(f.strand=="+"){v.fillStyle=RIGHT_STRAND_INV}else{if(f.strand=="-")
{v.fillStyle=LEFT_STRAND_INV}}v.fillRect(e,d,h-e,10);v.fillStyle=this.base_color}}}y++}}g.append(s);return s}});
\ No newline at end of file
+var DEBUG=false;var DENSITY=1000,FEATURE_LEVELS=100,DATA_ERROR="There was an error in indexing this dataset.",DATA_NONE="No data for this chrom/contig.",DATA_PENDING="Currently indexing... please wait",DATA_LOADING="Loading data...",CACHED_TILES_FEATURE=10,CACHED_TILES_LINE=30,CACHED_DATA=20,CONTEXT=$("<canvas></canvas>").get(0).getContext("2d"),RIGHT_STRAND,LEFT_STRAND;var right_img=new Image();right_img.src="../images/visualization/strand_right.png";right_img.onload=function(){RIGHT_STRAND=CONTEXT.createPattern(right_img,"repeat")};var left_img=new Image();left_img.src="../images/visualization/strand_left.png";left_img.onload=function(){LEFT_STRAND=CONTEXT.createPattern(left_img,"repeat")};var right_img_inv=new Image();right_img_inv.src="../images/visualization/strand_right_inv.png";right_img_inv.onload=function(){RIGHT_STRAND_INV=CONTEXT.createPattern(right_img_inv,"repeat")};var left_img_inv=new Image();left_img_inv.src="../images/visualization/strand_left_inv.png";left_
img_inv.onload=function(){LEFT_STRAND_INV=CONTEXT.createPattern(left_img_inv,"repeat")};function commatize(b){b+="";var a=/(\d+)(\d{3})/;while(a.test(b)){b=b.replace(a,"$1,$2")}return b}var Cache=function(a){this.num_elements=a;this.obj_cache={};this.key_ary=[]};$.extend(Cache.prototype,{get:function(b){var a=this.key_ary.indexOf(b);if(a!=-1){this.key_ary.splice(a,1);this.key_ary.push(b)}return this.obj_cache[b]},set:function(b,c){if(!this.obj_cache[b]){if(this.key_ary.length>=this.num_elements){var a=this.key_ary.shift();delete this.obj_cache[a]}this.key_ary.push(b)}this.obj_cache[b]=c;return c}});var View=function(b,a){this.chrom=b;this.tracks=[];this.max_low=0;this.max_high=a;this.center=(this.max_high-this.max_low)/2;this.span=this.max_high-this.max_low;this.zoom_factor=2;this.zoom_level=0};$.extend(View.prototype,{add_track:function(a){a.view=this;this.tracks.push(a);if(a.init){a.init()}},redraw:function(){var d=this.span/Math.pow(this.zoom_factor,this.zoom_level),b=thi
s.center-(d/2),e=b+d;if(b<0){b=0;e=b+d}else{if(e>this.max_high){e=this.max_high;b=e-d}}this.low=Math.floor(b);this.high=Math.ceil(e);this.center=Math.round(this.low+(this.high-this.low)/2);this.resolution=Math.pow(10,Math.ceil(Math.log((this.high-this.low)/DENSITY)/Math.LN10));this.zoom_res=Math.max(1,Math.ceil(Math.log(this.resolution,FEATURE_LEVELS)/Math.log(FEATURE_LEVELS)));$("#overview-box").css({left:(this.low/this.span)*$("#overview-viewport").width(),width:Math.max(12,((this.high-this.low)/this.span)*$("#overview-viewport").width())}).show();$("#low").val(commatize(this.low));$("#high").val(commatize(this.high));for(var c=0,a=this.tracks.length;c<a;c++){this.tracks[c].draw()}$("#bottom-spacer").remove();$("#viewport").append('<div id="bottom-spacer" style="height: 200px;"></div>')},zoom_in:function(a){if(this.max_high===0||this.high-this.low<30){return}if(a){this.center=a/$(document).width()*(this.high-this.low)+this.low}this.zoom_level+=1;this.redraw()},zoom_out:fun
ction(){if(this.max_high===0){return}if(this.zoom_level<=0){this.zoom_level=0;return}this.zoom_level-=1;this.redraw()}});var Track=function(a,b){this.name=a;this.parent_element=b;this.make_container()};$.extend(Track.prototype,{make_container:function(){this.header_div=$("<div class='track-header'>").text(this.name);this.content_div=$("<div class='track-content'>");this.container_div=$("<div class='track'></div>").append(this.header_div).append(this.content_div);this.parent_element.append(this.container_div)}});var TiledTrack=function(){};$.extend(TiledTrack.prototype,Track.prototype,{draw:function(){var i=this.view.low,e=this.view.high,f=e-i,d=this.view.resolution;if(DEBUG){$("#debug").text(d+" "+this.view.zoom_res)}var k=$("<div style='position: relative;'></div>");this.content_div.children(":first").remove();this.content_div.append(k);var l=this.content_div.width()/f;var h;var a=Math.floor(i/d/DENSITY);while((a*DENSITY*d)<e){var j=this.content_div.width()+"_"+this.view.zo
om_level+"_"+a;var c=this.tile_cache.get(j);if(c){var g=a*DENSITY*d;var b=(g-i)*l;if(this.left_offset){b-=this.left_offset}c.css({left:b});k.append(c)}else{h=this.draw_tile(d,a,k,l);if(h){this.tile_cache.set(j,h)}}a+=1}}});var LabelTrack=function(a){Track.call(this,null,a);this.container_div.addClass("label-track")};$.extend(LabelTrack.prototype,Track.prototype,{draw:function(){var c=this.view,d=c.high-c.low,g=Math.floor(Math.pow(10,Math.floor(Math.log(d)/Math.log(10)))),a=Math.floor(c.low/g)*g,e=this.content_div.width(),b=$("<div style='position: relative; height: 1.3em;'></div>");while(a<c.high){var f=(a-c.low)/d*e;b.append($("<div class='label'>"+commatize(a)+"</div>").css({position:"absolute",left:f-1}));a+=g}this.content_div.children(":first").remove();this.content_div.append(b)}});var LineTrack=function(c,b,a){this.tile_cache=new Cache(CACHED_TILES_LINE);Track.call(this,c,$("#viewport"));TiledTrack.call(this);this.track_type="line";this.height_px=(a?a:100);this.contain
er_div.addClass("line-track");this.dataset_id=b;this.data_queue={};this.cache=new Cache(CACHED_DATA)};$.extend(LineTrack.prototype,TiledTrack.prototype,{init:function(){var a=this;a.content_div.text(DATA_LOADING);$.getJSON(data_url,{stats:true,track_type:a.track_type,chrom:a.view.chrom,low:null,high:null,dataset_id:a.dataset_id},function(c){if(!c||c=="error"){a.container_div.addClass("error");a.content_div.text(DATA_ERROR)}else{if(c=="no data"){a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}else{if(c=="pending"){a.container_div.addClass("pending");a.content_div.text(DATA_PENDING);setTimeout(function(){a.init()},5000)}else{a.content_div.text("");a.content_div.css("height",a.height_px+"px");a.min_value=c.min;a.max_value=c.max;a.vertical_range=a.max_value-a.min_value;var d=$("<div class='yaxislabel'>"+a.min_value+"</div>");var b=$("<div class='yaxislabel'>"+a.max_value+"</div>");b.css({position:"relative",top:"35px"});b.prependTo(a.container_div);d.css({positi
on:"relative",top:a.height_px+32+"px"});d.prependTo(a.container_div);a.draw()}}}})},get_data:function(d,b){var c=this,a=b*DENSITY*d,f=(b+1)*DENSITY*d,e=d+"_"+b;if(!c.data_queue[e]){c.data_queue[e]=true;$.getJSON(data_url,{track_type:this.track_type,chrom:this.view.chrom,low:a,high:f,dataset_id:this.dataset_id,resolution:this.view.resolution},function(g){c.cache.set(e,g);delete c.data_queue[e];c.draw()})}},draw_tile:function(d,a,m,o){if(!this.vertical_range){return}var h=a*DENSITY*d,b=DENSITY*d,c=$("<canvas class='tile'></canvas>"),l=d+"_"+a;if(!this.cache.get(l)){this.get_data(d,a);return}var g=this.cache.get(l);c.css({position:"absolute",top:0,left:(h-this.view.low)*o});c.get(0).width=Math.ceil(b*o);c.get(0).height=this.height_px;var n=c.get(0).getContext("2d");var e=false;n.beginPath();for(var f=0;f<g.length-1;f++){var k=g[f][0]-h;var j=g[f][1];if(isNaN(j)){e=false}else{k=k*o;j=(j-this.min_value)/this.vertical_range*this.height_px;if(e){n.lineTo(k,j)}else{n.moveTo(k,j);e=t
rue}}}n.stroke();m.append(c);return c}});var FeatureTrack=function(c,b,a){this.tile_cache=new Cache(CACHED_TILES_FEATURE);Track.call(this,c,$("#viewport"));TiledTrack.call(this);this.track_type="feature";this.height_px=(a?a:100);this.container_div.addClass("feature-track");this.dataset_id=b;this.zo_slots={};this.show_labels_scale=0.001;this.showing_labels=false;this.vertical_gap=10;this.base_color="#2C3143";this.default_font="9px Monaco, Lucida Console, monospace";this.left_offset=200;this.inc_slots={};this.data_queue={};this.data_cache=new Cache(20)};$.extend(FeatureTrack.prototype,TiledTrack.prototype,{init:function(){var a=this;a.content_div.text(DATA_LOADING);$.getJSON(data_url,{track_type:a.track_type,low:a.view.max_low,high:a.view.max_high,dataset_id:a.dataset_id,chrom:a.view.chrom},function(b){if(b=="error"){a.container_div.addClass("error");a.content_div.text(DATA_ERROR)}else{if(b.length===0||b=="no data"){a.container_div.addClass("nodata");a.content_div.text(DATA_NO
NE)}else{if(b=="pending"){a.container_div.addClass("pending");a.content_div.text(DATA_PENDING);setTimeout(function(){a.init()},5000)}else{a.content_div.text("");a.content_div.css("height",a.height_px+"px");a.values=b;a.calc_slots();a.slots=a.zo_slots;a.draw()}}}})},get_data:function(a,d){var b=this,c=a+"_"+d;if(!b.data_queue[c]){b.data_queue[c]=true;$.getJSON(data_url,{track_type:b.track_type,chrom:b.view.chrom,low:a,high:d,dataset_id:b.dataset_id,include_blocks:true},function(e){b.data_cache.set(c,e);delete b.data_queue[c];b.draw()})}},calc_slots:function(){var c=[],b=this.content_div.width()/(this.view.high-this.view.low),a=this.view.max_high,e=this.view.max_low;for(var f=0,g=this.values.length;f<g;f++){var h,k,l=this.values[f];h=Math.floor((l.start-e)*b);k=Math.ceil((l.end-e)*b);var d=0;while(true){if(c[d]===undefined||c[d]<h){c[d]=k;this.zo_slots[l.uid]=d;break}d++}}this.height_px=c.length*this.vertical_gap+15;this.content_div.css("height",this.height_px+"px")},increment
al_slots:function(a,b){if(!this.inc_slots[a]){this.inc_slots[a]={};this.inc_slots[a].w_scale=DENSITY/Math.pow(FEATURE_LEVELS,a+1)}var k=this.inc_slots[a];var d=[],l=[],c=0,m=$("<canvas></canvas>").get(0).getContext("2d"),f=this.view.max_low;for(var g=0,h=b.length;g<h;g++){var n=b[g];if(k[n.uid]){c=Math.max(c,k[n.uid]);d[k[n.uid]]=Math.ceil((n.end-f)*k.w_scale)}else{l.push(n)}}for(var g=0,h=l.length;g<h;g++){var n=l[g];f_start=Math.floor((n.start-f)*k.w_scale);f_start-=m.measureText(n.name).width;f_end=Math.ceil((n.end-f)*k.w_scale);var e=0;while(true){if(d[e]===undefined||d[e]<f_start){d[e]=f_end;k[n.uid]=e;c=Math.max(c,e);break}e++}}return c},draw_tile:function(A,F,n,r){if(!this.values){return}var G=F*DENSITY*A,c=(F+1)*DENSITY*A,v=DENSITY*A;var K,u,h;if(r>this.show_labels_scale){if(!this.showing_labels){this.showing_labels=true}for(var B in this.data_cache.obj_cache){var p=B.split("_"),e=p[0],d=p[1];if(e<=G&&d>=c){K=this.data_cache.get(B);break}}if(!K){this.data_queue[[G,c]
]=true;this.get_data(G,c);return}h=this.incremental_slots(this.view.zoom_res,K)*this.vertical_gap+15;u=this.inc_slots[this.view.zoom_res]}else{if(this.showing_labels){this.showing_labels=false}h=this.height_px;u=this.zo_slots;K=this.values}var y=Math.ceil(v*r),x=$("<canvas class='tile'></canvas>");x.css({position:"absolute",top:0,left:(G-this.view.low)*r-this.left_offset});x.get(0).width=y+this.left_offset;x.get(0).height=h;var z=x.get(0).getContext("2d");z.fillStyle=this.base_color;z.font=this.default_font;z.textAlign="right";var C=0;for(var D=0,E=K.length;D<E;D++){var m=K[D];if(m.start<=c&&m.end>=G){var g=Math.floor(Math.max(0,(m.start-G)*r)),l=Math.ceil(Math.min(y,(m.end-G)*r)),f=u[m.uid]*this.vertical_gap;var a,L,b=null,s=null;if(m.thick_start&&m.thick_end){b=Math.floor(Math.max(0,(m.thick_start-G)*r));s=Math.ceil(Math.min(y,(m.thick_end-G)*r))}if(!this.showing_labels){z.fillRect(g+this.left_offset,f+5,l-g,1)}else{if(z.fillText&&m.start>G){z.fillText(m.name,g-1+this.left
_offset,f+8)}var I=m.blocks;if(I){if(m.strand){if(m.strand=="+"){z.fillStyle=RIGHT_STRAND}else{if(m.strand=="-"){z.fillStyle=LEFT_STRAND}}z.fillRect(g+this.left_offset,f,l-g,10);z.fillStyle=this.base_color}for(var B=0,J=I.length;B<J;B++){var q=I[B],o=Math.floor(Math.max(0,(q[0]-G)*r)),H=Math.ceil(Math.min(y,(q[1]-G)*r));if(o>H){continue}a=5;L=3;z.fillRect(o+this.left_offset,f+L,H-o,a);if(b&&(o<s||H>b)){a=9;L=1;var w=Math.max(o,b),t=Math.min(H,s);z.fillRect(w+this.left_offset,f+L,t-w,a)}}}else{a=9;L=1;z.fillRect(g+this.left_offset,f+L,l-g,a);if(m.strand){if(m.strand=="+"){z.fillStyle=RIGHT_STRAND_INV}else{if(m.strand=="-"){z.fillStyle=LEFT_STRAND_INV}}z.fillRect(g+this.left_offset,f,l-g,10);z.fillStyle=this.base_color}}}C++}}n.append(x);return x}});
\ No newline at end of file
diff -r b70e23d80a75 -r b9b9fe0612b9 static/scripts/trackster.js
--- a/static/scripts/trackster.js Thu Nov 19 12:56:24 2009 -0500
+++ b/static/scripts/trackster.js Thu Nov 19 18:55:35 2009 -0500
@@ -1,7 +1,7 @@
/* Trackster
2009, James Taylor, Kanwei Li
*/
-var DEBUG = true;
+var DEBUG = false;
var DENSITY = 1000,
FEATURE_LEVELS = 100,
@@ -109,7 +109,7 @@
// 10^log10(range / DENSITY) Close approximation for browser window, assuming DENSITY = window width
this.resolution = Math.pow( 10, Math.ceil( Math.log( (this.high - this.low) / DENSITY ) / Math.LN10 ) );
- this.zoom_res = Math.max(1,Math.ceil( Math.log( (this.high - this.low) / FEATURE_LEVELS ) / Math.log(FEATURE_LEVELS) ));
+ this.zoom_res = Math.max(1,Math.ceil( Math.log( this.resolution, FEATURE_LEVELS ) / Math.log(FEATURE_LEVELS) ));
// Overview
$("#overview-box").css( {
@@ -404,7 +404,7 @@
});
},
get_data: function( low, high ) {
- console.log("getting: ", low, high);
+ // console.log("getting: ", low, high);
var track = this,
key = low + '_' + high;
@@ -420,39 +420,24 @@
});
}
},
- calc_slots: function( include_labels ) {
+ calc_slots: function() {
// console.log("num vals: " + this.values.length);
var end_ary = [],
scale = this.content_div.width() / (this.view.high - this.view.low),
- labels_scale = this.show_labels_scale,
max_high = this.view.max_high,
max_low = this.view.max_low;
// console.log(scale, this.view.high, this.view.low);
- if (include_labels) {
- this.zi_slots = {};
- }
- var dummy_canvas = $("<canvas></canvas>").get(0).getContext("2d");
for (var i = 0, len = this.values.length; i < len; i++) {
var f_start, f_end, feature = this.values[i];
- if (include_labels) {
- f_start = Math.floor( (feature.start - max_low) * labels_scale );
- f_start -= dummy_canvas.measureText(feature.name).width;
- f_end = Math.ceil( (feature.end - max_low) * labels_scale );
- } else {
- f_start = Math.floor( (feature.start - max_low) * scale );
- f_end = Math.ceil( (feature.end - max_low) * scale );
- }
+ f_start = Math.floor( (feature.start - max_low) * scale );
+ f_end = Math.ceil( (feature.end - max_low) * scale );
+
// if (include_labels) { console.log(f_start, f_end); }
-
var j = 0;
while (true) {
if (end_ary[j] === undefined || end_ary[j] < f_start) {
end_ary[j] = f_end;
- if (include_labels) {
- this.zi_slots[feature.uid] = j;
- } else {
- this.zo_slots[feature.uid] = j;
- }
+ this.zo_slots[feature.uid] = j;
break;
}
j++;
@@ -464,20 +449,23 @@
incremental_slots: function( level, features ) {
if (!this.inc_slots[level]) {
this.inc_slots[level] = {};
- this.inc_slots[level].w_scale = 1000 / Math.pow(FEATURE_LEVELS, level);
+ this.inc_slots[level].w_scale = DENSITY / Math.pow(FEATURE_LEVELS, level+1);
+ // this.inc_slots[level].w_scale = 1000 / (this.view.high - this.view.low);
+
}
var slots = this.inc_slots[level];
- if (slots[uid]) {
- return slots[uid];
- }
+ // console.log(level, slots.w_scale, slots);
var end_ary = [],
undone = [],
- max_high = this.view.max_high,
+ highest_slot = 0, // To measure how big to draw canvas
+ dummy_canvas = $("<canvas></canvas>").get(0).getContext("2d"),
max_low = this.view.max_low;
for (var i = 0, len = features.length; i < len; i++) {
var feature = features[i];
+ // console.log(feature.name, feature.uid, slots[feature.uid]);
if (slots[feature.uid]) {
+ highest_slot = Math.max(highest_slot, slots[feature.uid]);
end_ary[ slots[feature.uid] ] = Math.ceil( (feature.end - max_low) * slots.w_scale );
} else {
undone.push(feature);
@@ -488,6 +476,19 @@
f_start = Math.floor( (feature.start - max_low) * slots.w_scale );
f_start -= dummy_canvas.measureText(feature.name).width;
f_end = Math.ceil( (feature.end - max_low) * slots.w_scale );
+ // console.log(f_start, f_end, feature.name);
+ var j = 0;
+ while (true) {
+ if (end_ary[j] === undefined || end_ary[j] < f_start) {
+ end_ary[j] = f_end;
+ slots[feature.uid] = j;
+ highest_slot = Math.max(highest_slot, j);
+ break;
+ }
+ j++;
+ }
+ }
+ return highest_slot;
},
draw_tile: function( resolution, tile_index, parent_element, w_scale ) {
@@ -499,14 +500,10 @@
tile_span = DENSITY * resolution;
// console.log("drawing " + tile_index);
// Once we zoom in enough, show name labels
- var data;
+ var data, slots, required_height;
if (w_scale > this.show_labels_scale) {
if (!this.showing_labels) {
this.showing_labels = true;
- if (!this.zi_slots) {
- this.calc_slots(true);
- }
- this.slots = this.zi_slots;
}
for (var k in this.data_cache.obj_cache) {
var k_split = k.split("_"), k_low = k_split[0], k_high = k_split[1];
@@ -520,20 +517,20 @@
this.get_data(tile_low, tile_high);
return;
}
-
+ required_height = this.incremental_slots( this.view.zoom_res, data ) * this.vertical_gap + 15;
+ // console.log(required_height);
+ slots = this.inc_slots[this.view.zoom_res];
} else {
if (this.showing_labels) {
this.showing_labels = false;
- this.slots = this.zo_slots;
}
+ required_height = this.height_px;
+ slots = this.zo_slots;
data = this.values;
}
- // console.log(this.slots);
-
-
+
// console.log(tile_low, tile_high, tile_length, w_scale);
var width = Math.ceil( tile_span * w_scale ),
- height = this.height_px,
new_canvas = $("<canvas class='tile'></canvas>");
new_canvas.css({
@@ -542,7 +539,7 @@
left: ( tile_low - this.view.low ) * w_scale - this.left_offset
});
new_canvas.get(0).width = width + this.left_offset;
- new_canvas.get(0).height = height;
+ new_canvas.get(0).height = required_height;
// console.log(( tile_low - this.view.low ) * w_scale, tile_index, w_scale);
var ctx = new_canvas.get(0).getContext("2d");
ctx.fillStyle = this.base_color;
@@ -555,7 +552,7 @@
if (feature.start <= tile_high && feature.end >= tile_low) {
var f_start = Math.floor( Math.max(0, (feature.start - tile_low) * w_scale) ),
f_end = Math.ceil( Math.min(width, (feature.end - tile_low) * w_scale) ),
- y_center = this.slots[feature.uid] * this.vertical_gap;
+ y_center = slots[feature.uid] * this.vertical_gap;
var thickness, y_start, thick_start = null, thick_end = null;
if (feature.thick_start && feature.thick_end) {
@@ -569,7 +566,7 @@
// Showing labels, blocks, details
if (ctx.fillText && feature.start > tile_low) {
ctx.fillText(feature.name, f_start - 1 + this.left_offset, y_center + 8);
- // ctx.fillText(commatize(feature.start), f_start - 1, y_center + 8);
+ // ctx.fillText(commatize(feature.start), f_start - 1 + this.left_offset, y_center + 8);
}
var blocks = feature.blocks;
if (blocks) {
1
0
23 Nov '09
details: http://www.bx.psu.edu/hg/galaxy/rev/5c46679d0755
changeset: 3113:5c46679d0755
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Fri Nov 20 08:46:49 2009 -0500
description:
Eliminate the ability to delete/undelete/purge users until the grid helper can access config settings.
diffstat:
lib/galaxy/web/controllers/admin.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (23 lines):
diff -r b9b9fe0612b9 -r 5c46679d0755 lib/galaxy/web/controllers/admin.py
--- a/lib/galaxy/web/controllers/admin.py Thu Nov 19 18:55:35 2009 -0500
+++ b/lib/galaxy/web/controllers/admin.py Fri Nov 20 08:46:49 2009 -0500
@@ -91,14 +91,14 @@
grids.GridAction( "Create new user", dict( controller='admin', action='users', operation='create' ) )
]
operations = [
- grids.GridOperation( "Manage Roles & Groups", condition=( lambda item: not item.deleted ), allow_multiple=False )
+ grids.GridOperation( "Manage Roles & Groups", condition=( lambda item: not item.deleted ), allow_multiple=False ),
+ grids.GridOperation( "Reset Password", condition=( lambda item: not item.deleted ), allow_multiple=True, allow_popup=False )
]
#TODO: enhance to account for trans.app.config.allow_user_deletion here so that we can eliminate these operations if
# the setting is False
- operations.append( grids.GridOperation( "Reset Password", condition=( lambda item: not item.deleted ), allow_multiple=True, allow_popup=False ) )
- operations.append( grids.GridOperation( "Delete", condition=( lambda item: not item.deleted ), allow_multiple=True ) )
- operations.append( grids.GridOperation( "Undelete", condition=( lambda item: item.deleted and not item.purged ), allow_multiple=True ) )
- operations.append( grids.GridOperation( "Purge", condition=( lambda item: item.deleted and not item.purged ), allow_multiple=True ) )
+ #operations.append( grids.GridOperation( "Delete", condition=( lambda item: not item.deleted ), allow_multiple=True ) )
+ #operations.append( grids.GridOperation( "Undelete", condition=( lambda item: item.deleted and not item.purged ), allow_multiple=True ) )
+ #operations.append( grids.GridOperation( "Purge", condition=( lambda item: item.deleted and not item.purged ), allow_multiple=True ) )
standard_filters = [
grids.GridColumnFilter( "Active", args=dict( deleted=False ) ),
grids.GridColumnFilter( "Deleted", args=dict( deleted=True, purged=False ) ),
1
0
23 Nov '09
details: http://www.bx.psu.edu/hg/galaxy/rev/c507bad7e373
changeset: 3109:c507bad7e373
user: Kanwei Li <kanwei(a)gmail.com>
date: Wed Nov 18 13:45:53 2009 -0500
description:
revert to sqlite default in universe.sample
diffstat:
lib/galaxy/datatypes/converters/wiggle_to_array_tree_converter.py | 6 +-
lib/galaxy/visualization/tracks/data/array_tree.py | 30 +-
lib/galaxy/visualization/tracks/data/interval_index.py | 26 +-
static/scripts/trackster.js | 116 +++++++++--
universe_wsgi.ini.sample | 12 +-
5 files changed, 131 insertions(+), 59 deletions(-)
diffs (352 lines):
diff -r bcb3c0eeb72f -r c507bad7e373 lib/galaxy/datatypes/converters/wiggle_to_array_tree_converter.py
--- a/lib/galaxy/datatypes/converters/wiggle_to_array_tree_converter.py Wed Nov 18 13:37:41 2009 -0500
+++ b/lib/galaxy/datatypes/converters/wiggle_to_array_tree_converter.py Wed Nov 18 13:45:53 2009 -0500
@@ -8,7 +8,7 @@
from bx.arrays.array_tree import *
from bx.arrays.wiggle import IntervalReader
-BLOCK_SIZE = 1000
+BLOCK_SIZE = 100
def main():
@@ -20,8 +20,8 @@
# Fill array from wiggle
d = array_tree_dict_from_wiggle_reader( reader, {}, block_size = BLOCK_SIZE )
- for value in d.itervalues():
- value.root.build_summary()
+ for array_tree in d.itervalues():
+ array_tree.root.build_summary()
f = open( out_fname, "w" )
FileArrayTreeDict.dict_to_file( d, f )
diff -r bcb3c0eeb72f -r c507bad7e373 lib/galaxy/visualization/tracks/data/array_tree.py
--- a/lib/galaxy/visualization/tracks/data/array_tree.py Wed Nov 18 13:37:41 2009 -0500
+++ b/lib/galaxy/visualization/tracks/data/array_tree.py Wed Nov 18 13:45:53 2009 -0500
@@ -12,9 +12,6 @@
# Maybe this should be included in the datatype itself, so users can add their
# own types to the browser as long as they return the right format of data?
-# FIXME: Assuming block size is always 1000 for the moment
-BLOCK_SIZE = 1000
-
class ArrayTreeDataProvider( object ):
def __init__( self, dataset, original_dataset ):
self.dataset = dataset
@@ -32,32 +29,33 @@
return { 'max': float( max(root_summary.maxs) ), 'min': float( min(root_summary.mins) ) }
def get_data( self, chrom, start, end, **kwargs ):
- start = int( start )
- end = int( end )
- resolution = max(1, ceil(float(kwargs['resolution'])))
-
- level = int( floor( log( resolution, BLOCK_SIZE ) ) )
- level = max( level, 0 )
- stepsize = BLOCK_SIZE ** level
- step1 = stepsize * BLOCK_SIZE
-
- # Open the file
f = open( self.dataset.file_name )
d = FileArrayTreeDict( f )
+
# Get the right chromosome
try:
chrom_array_tree = d[chrom]
except KeyError:
return None
+
+ block_size = chrom_array_tree.block_size
+ start = int( start )
+ end = int( end )
+ resolution = max(1, ceil(float(kwargs['resolution'])))
+
+ level = int( floor( log( resolution, block_size ) ) )
+ level = max( level, 0 )
+ stepsize = block_size ** level
+ step1 = stepsize * block_size
+
# Is the requested level valid?
assert 0 <= level <= chrom_array_tree.levels
- # Calculate the actual start/range/step of the block we're getting
results = []
- for block_start in range( start, end, stepsize * BLOCK_SIZE ):
+ for block_start in range( start, end, stepsize * block_size ):
# print block_start
# Return either data point or a summary depending on the level
- indexes = range( block_start, block_start + stepsize * BLOCK_SIZE, stepsize )
+ indexes = range( block_start, block_start + stepsize * block_size, stepsize )
if level > 0:
s = chrom_array_tree.get_summary( block_start, level )
if s is not None:
diff -r bcb3c0eeb72f -r c507bad7e373 lib/galaxy/visualization/tracks/data/interval_index.py
--- a/lib/galaxy/visualization/tracks/data/interval_index.py Wed Nov 18 13:37:41 2009 -0500
+++ b/lib/galaxy/visualization/tracks/data/interval_index.py Wed Nov 18 13:45:53 2009 -0500
@@ -27,19 +27,21 @@
payload['strand'] = feature[5]
except IndexError:
pass
- try:
- block_sizes = [ int(n) for n in feature[10].split(',') if n != '']
- block_starts = [ int(n) for n in feature[11].split(',') if n != '' ]
- blocks = zip(block_sizes, block_starts)
- payload['blocks'] = [ (start + block[1], start + block[1] + block[0]) for block in blocks]
- except IndexError:
- pass
+
+ if 'include_blocks' in kwargs:
+ try:
+ block_sizes = [ int(n) for n in feature[10].split(',') if n != '']
+ block_starts = [ int(n) for n in feature[11].split(',') if n != '' ]
+ blocks = zip(block_sizes, block_starts)
+ payload['blocks'] = [ (start + block[1], start + block[1] + block[0]) for block in blocks]
+ except IndexError:
+ pass
- try:
- payload['thick_start'] = int(feature[6])
- payload['thick_end'] = int(feature[7])
- except IndexError:
- pass
+ try:
+ payload['thick_start'] = int(feature[6])
+ payload['thick_end'] = int(feature[7])
+ except IndexError:
+ pass
results.append(payload)
uid += 1
diff -r bcb3c0eeb72f -r c507bad7e373 static/scripts/trackster.js
--- a/static/scripts/trackster.js Wed Nov 18 13:37:41 2009 -0500
+++ b/static/scripts/trackster.js Wed Nov 18 13:45:53 2009 -0500
@@ -1,9 +1,10 @@
/* Trackster
2009, James Taylor, Kanwei Li
*/
-var DEBUG = false;
+var DEBUG = true;
var DENSITY = 1000,
+ FEATURE_LEVELS = 100,
DATA_ERROR = "There was an error in indexing this dataset.",
DATA_NONE = "No data for this chrom/contig.",
DATA_PENDING = "Currently indexing... please wait",
@@ -108,6 +109,7 @@
// 10^log10(range / DENSITY) Close approximation for browser window, assuming DENSITY = window width
this.resolution = Math.pow( 10, Math.ceil( Math.log( (this.high - this.low) / DENSITY ) / Math.LN10 ) );
+ this.zoom_res = Math.max(1,Math.ceil( Math.log( (this.high - this.low) / FEATURE_LEVELS ) / Math.log(FEATURE_LEVELS) ));
// Overview
$("#overview-box").css( {
@@ -171,7 +173,7 @@
resolution = this.view.resolution;
- if (DEBUG) { $("#debug").text(resolution); }
+ if (DEBUG) { $("#debug").text(resolution + " " + this.view.zoom_res); }
var parent_element = $("<div style='position: relative;'></div>");
this.content_div.children( ":first" ).remove();
@@ -279,7 +281,7 @@
max_label.css({ position: "relative", top: "35px" });
max_label.prependTo(track.container_div)
- min_label.css({ position: "relative", top: track.height_px + 32 + "px", });
+ min_label.css({ position: "relative", top: track.height_px + 32 + "px" });
min_label.prependTo(track.container_div);
track.draw();
@@ -297,7 +299,7 @@
$.getJSON( data_url, { track_type: this.track_type, chrom: this.view.chrom,
low: low, high: high, dataset_id: this.dataset_id,
resolution: this.view.resolution }, function ( data ) {
- track.cache[key] = data;
+ track.cache.set(key, data);
delete track.data_queue[key];
track.draw();
});
@@ -313,12 +315,12 @@
canvas = $("<canvas class='tile'></canvas>"),
key = resolution + "_" + tile_index;
- if (!this.cache[key]) {
+ if (!this.cache.get(key)) {
this.get_data( resolution, tile_index );
return;
}
- var data = this.cache[key];
+ var data = this.cache.get(key);
canvas.css( {
position: "absolute",
top: 0,
@@ -368,7 +370,11 @@
this.showing_labels = false;
this.vertical_gap = 10;
this.base_color = "#2C3143";
+ this.default_font = "9px Monaco, Lucida Console, monospace";
this.left_offset = 200;
+ this.inc_slots = {};
+ this.data_queue = {};
+ this.data_cache = new Cache(20);
};
$.extend( FeatureTrack.prototype, TiledTrack.prototype, {
init: function() {
@@ -397,6 +403,23 @@
}
});
},
+ get_data: function( low, high ) {
+ console.log("getting: ", low, high);
+ var track = this,
+ key = low + '_' + high;
+
+ if (!track.data_queue[key]) {
+ track.data_queue[key] = true;
+ $.getJSON( data_url, { track_type: track.track_type, chrom: track.view.chrom,
+ low: low, high: high, dataset_id: track.dataset_id,
+ include_blocks: true }, function ( data ) {
+ track.data_cache.set(key, data);
+ // console.log("datacache", track.data_cache.get(key));
+ delete track.data_queue[key];
+ track.draw();
+ });
+ }
+ },
calc_slots: function( include_labels ) {
// console.log("num vals: " + this.values.length);
var end_ary = [],
@@ -438,27 +461,76 @@
this.height_px = end_ary.length * this.vertical_gap + 15;
this.content_div.css( "height", this.height_px + "px" );
},
+ incremental_slots: function( level, features ) {
+ if (!this.inc_slots[level]) {
+ this.inc_slots[level] = {};
+ this.inc_slots[level].w_scale = 1000 / Math.pow(FEATURE_LEVELS, level);
+ }
+ var slots = this.inc_slots[level];
+ if (slots[uid]) {
+ return slots[uid];
+ }
+ var end_ary = [],
+ undone = [],
+ max_high = this.view.max_high,
+ max_low = this.view.max_low;
+
+ for (var i = 0, len = features.length; i < len; i++) {
+ var feature = features[i];
+ if (slots[feature.uid]) {
+ end_ary[ slots[feature.uid] ] = Math.ceil( (feature.end - max_low) * slots.w_scale );
+ } else {
+ undone.push(feature);
+ }
+ }
+ for (var i = 0, len = undone.length; i < len; i++) {
+ var feature = undone[i];
+ f_start = Math.floor( (feature.start - max_low) * slots.w_scale );
+ f_start -= dummy_canvas.measureText(feature.name).width;
+ f_end = Math.ceil( (feature.end - max_low) * slots.w_scale );
+
+ },
draw_tile: function( resolution, tile_index, parent_element, w_scale ) {
- if (!this.values) { // Still loading
- return null;
+ if (!this.values) {
+ return;
}
+ var tile_low = tile_index * DENSITY * resolution,
+ tile_high = ( tile_index + 1 ) * DENSITY * resolution,
+ tile_span = DENSITY * resolution;
// console.log("drawing " + tile_index);
// Once we zoom in enough, show name labels
- if (w_scale > this.show_labels_scale && !this.showing_labels) {
- this.showing_labels = true;
- if (!this.zi_slots) {
- this.calc_slots(true);
+ var data;
+ if (w_scale > this.show_labels_scale) {
+ if (!this.showing_labels) {
+ this.showing_labels = true;
+ if (!this.zi_slots) {
+ this.calc_slots(true);
+ }
+ this.slots = this.zi_slots;
}
- this.slots = this.zi_slots;
- } else if (w_scale <= this.show_labels_scale && this.showing_labels) {
- this.showing_labels = false;
- this.slots = this.zo_slots;
+ for (var k in this.data_cache.obj_cache) {
+ var k_split = k.split("_"), k_low = k_split[0], k_high = k_split[1];
+ if (k_low <= tile_low && k_high >= tile_high) {
+ data = this.data_cache.get(k);
+ break;
+ }
+ }
+ if (!data) {
+ this.data_queue[ [tile_low, tile_high] ] = true;
+ this.get_data(tile_low, tile_high);
+ return;
+ }
+
+ } else {
+ if (this.showing_labels) {
+ this.showing_labels = false;
+ this.slots = this.zo_slots;
+ }
+ data = this.values;
}
// console.log(this.slots);
- var tile_low = tile_index * DENSITY * resolution,
- tile_high = ( tile_index + 1 ) * DENSITY * resolution,
- tile_span = DENSITY * resolution;
+
// console.log(tile_low, tile_high, tile_length, w_scale);
var width = Math.ceil( tile_span * w_scale ),
height = this.height_px,
@@ -474,12 +546,12 @@
// console.log(( tile_low - this.view.low ) * w_scale, tile_index, w_scale);
var ctx = new_canvas.get(0).getContext("2d");
ctx.fillStyle = this.base_color;
- ctx.font = "10px monospace";
+ ctx.font = this.default_font;
ctx.textAlign = "right";
var j = 0;
- for (var i = 0, len = this.values.length; i < len; i++) {
- var feature = this.values[i];
+ for (var i = 0, len = data.length; i < len; i++) {
+ var feature = data[i];
if (feature.start <= tile_high && feature.end >= tile_low) {
var f_start = Math.floor( Math.max(0, (feature.start - tile_low) * w_scale) ),
f_end = Math.ceil( Math.min(width, (feature.end - tile_low) * w_scale) ),
diff -r bcb3c0eeb72f -r c507bad7e373 universe_wsgi.ini.sample
--- a/universe_wsgi.ini.sample Wed Nov 18 13:37:41 2009 -0500
+++ b/universe_wsgi.ini.sample Wed Nov 18 13:45:53 2009 -0500
@@ -31,15 +31,15 @@
paste.app_factory = galaxy.web.buildapp:app_factory
# By default, Galaxy uses a SQLite database found here
-#database_file = database/universe.sqlite
+database_file = database/universe.sqlite
# 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
+#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
# If using MySQL, see:
# http://rapd.wordpress.com/2008/03/02/sqlalchemy-sqlerror-operationalerror-2…
1
0
23 Nov '09
details: http://www.bx.psu.edu/hg/galaxy/rev/b70e23d80a75
changeset: 3111:b70e23d80a75
user: Enis Afgan <afgane(a)gmail.com>
date: Thu Nov 19 12:56:24 2009 -0500
description:
Fixed a bug in cloud store update. Also, added method comments to EC2 cloud provider implementation class.
diffstat:
lib/galaxy/cloud/providers/ec2.py | 90 ++++++++++++++++++++---------
lib/galaxy/cloud/providers/eucalyptus.py | 32 +++++-----
templates/cloud/list_images.mako | 2 +
3 files changed, 81 insertions(+), 43 deletions(-)
diffs (316 lines):
diff -r 53de6aea6445 -r b70e23d80a75 lib/galaxy/cloud/providers/ec2.py
--- a/lib/galaxy/cloud/providers/ec2.py Wed Nov 18 16:18:09 2009 -0500
+++ b/lib/galaxy/cloud/providers/ec2.py Thu Nov 19 12:56:24 2009 -0500
@@ -94,13 +94,16 @@
log.info( "EC2 cloud manager stopped" )
def put( self, uci_wrapper ):
- # Get rid of UCI from state description
+ """
+ Add uci_wrapper object to the end of the request queue to be handled by
+ this cloud provider.
+ """
state = uci_wrapper.get_uci_state()
uci_wrapper.change_state( state.split('U')[0] ) # remove 'UCI' from end of state description (i.e., mark as accepted and ready for processing)
self.queue.put( uci_wrapper )
def run_next( self ):
- """Run the next job, waiting until one is available if necessary"""
+ """Process next request, waiting until one is available if necessary."""
cnt = 0
while 1:
@@ -125,7 +128,7 @@
def get_connection( self, uci_wrapper ):
"""
- Establishes EC2 cloud connection using user's credentials associated with given UCI
+ Establishes cloud connection using user's credentials associated with given UCI
"""
log.debug( 'Establishing %s cloud connection.' % self.type )
provider = uci_wrapper.get_provider()
@@ -152,7 +155,10 @@
def check_key_pair( self, uci_wrapper, conn ):
"""
- Generate key pair using user's credentials
+ Check if a key pair associated with this UCI exists on cloud provider.
+ If yes, return key pair name; otherwise, generate a key pair with the cloud
+ provider and, again, return key pair name.
+ Key pair name for given UCI is generated from UCI's name and suffix '_kp'
"""
kp = None
kp_name = uci_wrapper.get_name().replace(' ','_') + "_kp"
@@ -200,6 +206,7 @@
return None
def create_key_pair( self, conn, kp_name ):
+ """ Initiate creation of key pair under kp_name by current cloud provider. """
try:
return conn.create_key_pair( kp_name )
except boto.exception.EC2ResponseError, e:
@@ -226,8 +233,8 @@
def create_uci( self, uci_wrapper ):
"""
- Creates User Configured Instance (UCI). Essentially, creates storage volume on cloud provider
- and registers relevant information in Galaxy database.
+ Create User Configured Instance (UCI) - i.e., create storage volume on cloud provider
+ and register relevant information in local Galaxy database.
"""
conn = self.get_connection( uci_wrapper )
if uci_wrapper.get_uci_availability_zone()=='':
@@ -279,8 +286,11 @@
def delete_uci( self, uci_wrapper ):
"""
- Deletes UCI. NOTE that this implies deletion of any and all data associated
+ Delete UCI - i.e., delete all storage volumes associated with this UCI.
+ NOTE that this implies deletion of any and all data associated
with this UCI from the cloud. All data will be deleted.
+ Information in local Galaxy database is marked as deleted but not actually removed
+ from the database.
"""
conn = self.get_connection( uci_wrapper )
vl = [] # volume list
@@ -318,7 +328,8 @@
def snapshot_uci( self, uci_wrapper ):
"""
- Creates snapshot of all storage volumes associated with this UCI.
+ Initiate creation of a snapshot by cloud provider for all storage volumes
+ associated with this UCI.
"""
if uci_wrapper.get_uci_state() != uci_states.ERROR:
conn = self.get_connection( uci_wrapper )
@@ -362,7 +373,7 @@
def start_uci( self, uci_wrapper ):
"""
- Starts instance(s) of given UCI on the cloud.
+ Start instance(s) of given UCI on the cloud.
"""
if uci_wrapper.get_uci_state() != uci_states.ERROR:
conn = self.get_connection( uci_wrapper )
@@ -461,7 +472,7 @@
def stop_uci( self, uci_wrapper):
"""
- Stops all of cloud instances associated with given UCI.
+ Stop all of cloud instances associated with given UCI.
"""
conn = self.get_connection( uci_wrapper )
@@ -543,11 +554,15 @@
def update( self ):
"""
- Runs a global status update on all instances that are in 'running', 'pending', or 'shutting-down' state.
- Also, runs update on all storage volumes that are in 'in-use', 'creating', or 'None' state.
+ Run status update on all instances that are in 'running', 'pending', or 'shutting-down' state.
+ Run status update on all storage volumes whose status is 'in-use', 'creating', or 'None'.
+ Run status update on all snapshots whose status is 'pending' or 'delete'
+ Run status update on any zombie UCIs, i.e., UCI's that is in 'submitted' state for an
+ extended period of time.
+
Reason behind this method is to sync state of local DB and real-world resources
"""
- log.debug( "Running general status update for EC2 UCIs..." )
+ log.debug( "Running general status update for %s UCIs..." % self.type )
# Update instances
instances = self.sa_session.query( model.CloudInstance ) \
.filter( or_( model.CloudInstance.table.c.state==instance_states.RUNNING,
@@ -610,7 +625,11 @@
self.process_zombie( z_inst )
def update_instance( self, inst ):
-
+ """
+ Update information in local database for given instance as it is obtained from cloud provider.
+ Along with updating information about given instance, information about the UCI controlling
+ this instance is also updated.
+ """
# Get credentials associated wit this instance
uci_id = inst.uci_id
uci = self.sa_session.query( model.UCI ).get( uci_id )
@@ -683,6 +702,11 @@
return None
def update_store( self, store ):
+ """
+ Update information in local database for given storage volume as it is obtained from cloud provider.
+ Along with updating information about given storage volume, information about the UCI controlling
+ this storage volume is also updated.
+ """
# Get credentials associated wit this store
uci_id = store.uci_id
uci = self.sa_session.query( model.UCI ).get( uci_id )
@@ -705,6 +729,7 @@
# Update store status in local DB with info from cloud provider
if len(vl) > 0:
try:
+ log.debug( "Storage volume '%s' current status: '%s'" % (store.volume_id, vl[0].status ) )
if store.status != vl[0].status:
# In case something failed during creation of UCI but actual storage volume was created and yet
# UCI state remained as 'new', try to remedy this by updating UCI state here
@@ -721,18 +746,19 @@
store.status = vl[0].status
self.sa_session.add( store )
self.sa_session.flush()
- if store.inst.instance_id != vl[0].instance_id:
- store.inst.instance_id = vl[0].instance_id
- self.sa_session.add( store )
- self.sa_session.flush()
- if store.attach_time != vl[0].attach_time:
- store.attach_time = vl[0].attach_time
- self.sa_session.add( store )
- self.sa_session.flush()
- if store.device != vl[0].device:
- store.device = vl[0].device
- self.sa_session.add( store )
- self.sa_session.flush()
+ if store.inst != None:
+ if store.inst.instance_id != vl[0].instance_id:
+ store.inst.instance_id = vl[0].instance_id
+ self.sa_session.add( store )
+ self.sa_session.flush()
+ if store.attach_time != vl[0].attach_time:
+ store.attach_time = vl[0].attach_time
+ self.sa_session.add( store )
+ self.sa_session.flush()
+ if store.device != vl[0].device:
+ store.device = vl[0].device
+ self.sa_session.add( store )
+ self.sa_session.flush()
except boto.exception.EC2ResponseError, e:
err = "Updating status of volume(s) from cloud failed for UCI '"+ uci.name + "' during general status update: " + str( e )
log.error( err )
@@ -753,6 +779,11 @@
self.sa_session.flush()
def update_snapshot( self, snapshot ):
+ """
+ Update information in local database for given snapshot as it is obtained from cloud provider.
+ Along with updating information about given snapshot, information about the UCI controlling
+ this snapshot is also updated.
+ """
# Get credentials associated wit this store
uci_id = snapshot.uci_id
uci = self.sa_session.query( model.UCI ).get( uci_id )
@@ -799,6 +830,9 @@
self.sa_session.flush()
def delete_snapshot( self, snapshot ):
+ """
+ Initiate deletion of given snapshot from cloud provider.
+ """
if snapshot.status == snapshot_status.DELETE:
# Get credentials associated wit this store
uci_id = snapshot.uci_id
@@ -845,7 +879,7 @@
def process_zombie( self, inst ):
"""
- Attempt at discovering if starting an instance was successful but local database was not updated
+ Attempt at discovering if starting a cloud instance was successful but local database was not updated
accordingly or if something else failed and instance was never started. Currently, no automatic
repairs are being attempted; instead, appropriate error messages are set.
"""
@@ -921,7 +955,7 @@
def get_connection_from_uci( self, uci ):
"""
- Establishes and returns connection to cloud provider. Information needed to do so is obtained
+ Establish and return connection to cloud provider. Information needed to do so is obtained
directly from uci database object.
"""
log.debug( 'Establishing %s cloud connection' % self.type )
diff -r 53de6aea6445 -r b70e23d80a75 lib/galaxy/cloud/providers/eucalyptus.py
--- a/lib/galaxy/cloud/providers/eucalyptus.py Wed Nov 18 16:18:09 2009 -0500
+++ b/lib/galaxy/cloud/providers/eucalyptus.py Thu Nov 19 12:56:24 2009 -0500
@@ -94,7 +94,7 @@
def put( self, uci_wrapper ):
"""
- Adds uci_wrapper object to the end of the request queue to be handled by
+ Add uci_wrapper object to the end of the request queue to be handled by
this cloud provider.
"""
state = uci_wrapper.get_uci_state()
@@ -536,7 +536,7 @@
Reason behind this method is to sync state of local DB and real-world resources
"""
- log.debug( "Running general status update for EPC UCIs..." )
+ log.debug( "Running general status update for %s UCIs..." % self.type )
# Update instances
instances = self.sa_session.query( model.CloudInstance ) \
.filter( or_( model.CloudInstance.table.c.state==instance_states.RUNNING,
@@ -695,7 +695,8 @@
# Update store status in local DB with info from cloud provider
if len(vl) > 0:
try:
- if store.status != vl[0].status and store.availability_zone != 'epc':
+ log.debug( "Storage volume '%s' current status: '%s'" % (store.volume_id, vl[0].status ) )
+ if store.status != vl[0].status:
# In case something failed during creation of UCI but actual storage volume was created and yet
# UCI state remained as 'new', try to remedy this by updating UCI state here
if ( store.status == None ) and ( store.volume_id != None ):
@@ -718,10 +719,11 @@
store.status = vl[0].status
self.sa_session.add( store )
self.sa_session.flush()
- if store.inst.instance_id != vl[0].instance_id:
- store.inst.instance_id = vl[0].instance_id
- self.sa_session.add( store )
- self.sa_session.flush()
+ if store.inst != None:
+ if store.inst.instance_id != vl[0].instance_id:
+ store.inst.instance_id = vl[0].instance_id
+ self.sa_session.add( store )
+ self.sa_session.flush()
if store.attach_time != vl[0].attach_time:
store.attach_time = vl[0].attach_time
self.sa_session.add( store )
@@ -937,7 +939,7 @@
def get_connection_from_uci( self, uci ):
"""
- Establishes and returns connection to cloud provider. Information needed to do so is obtained
+ Establish and return connection to cloud provider. Information needed to do so is obtained
directly from uci database object.
"""
log.debug( 'Establishing %s cloud connection' % self.type )
@@ -946,13 +948,13 @@
# Get connection
try:
region = RegionInfo( None, uci.credentials.provider.region_name, uci.credentials.provider.region_endpoint )
- log.debug( "[%s] Using following command to connect to cloud provider: "
- "conn = EC2Connection( aws_access_key_id=%s, "
- "aws_secret_access_key=%s, "
- "port=%s, "
- "is_secure=%s, "
- "region=region, "
- "path=%s )" % ( self.type, a_key, s_key, uci.credentials.provider.is_secure, uci.credentials.provider.port, uci.credentials.provider.path ) )
+# log.debug( "[%s] Using following command to connect to cloud provider: "
+# "conn = EC2Connection( aws_access_key_id=%s, "
+# "aws_secret_access_key=%s, "
+# "port=%s, "
+# "is_secure=%s, "
+# "region=region, "
+# "path=%s )" % ( self.type, a_key, s_key, uci.credentials.provider.is_secure, uci.credentials.provider.port, uci.credentials.provider.path ) )
conn = EC2Connection( aws_access_key_id=a_key,
aws_secret_access_key=s_key,
is_secure=uci.credentials.provider.is_secure,
diff -r 53de6aea6445 -r b70e23d80a75 templates/cloud/list_images.mako
--- a/templates/cloud/list_images.mako Wed Nov 18 16:18:09 2009 -0500
+++ b/templates/cloud/list_images.mako Thu Nov 19 12:56:24 2009 -0500
@@ -78,6 +78,8 @@
</tr>
%endfor
</table>
+
+ <p /></p><a href="${h.url_for( controller='cloud', action='add_new_image' )}" target="galaxy_main">Add another machine image</a>
%else:
<h3>There are no registered machine images.</h3><br />
<a href="${h.url_for( controller='cloud', action='add_new_image' )}" target="galaxy_main">Add machine image now?</a>
1
0
23 Nov '09
details: http://www.bx.psu.edu/hg/galaxy/rev/53de6aea6445
changeset: 3110:53de6aea6445
user: Nate Coraor <nate(a)bx.psu.edu>
date: Wed Nov 18 16:18:09 2009 -0500
description:
Only fix OS X platform name on 2.5, the only version on which it's broken
diffstat:
lib/galaxy/__init__.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (15 lines):
diff -r c507bad7e373 -r 53de6aea6445 lib/galaxy/__init__.py
--- a/lib/galaxy/__init__.py Wed Nov 18 13:45:53 2009 -0500
+++ b/lib/galaxy/__init__.py Wed Nov 18 16:18:09 2009 -0500
@@ -12,8 +12,9 @@
import os, sys
from distutils.sysconfig import get_config_vars
-if ( os.uname()[-1] in ( 'i386', 'ppc' ) and sys.platform == 'darwin' and os.path.abspath( sys.prefix ).startswith( '/System' ) ) or \
- ( sys.platform == 'darwin' and get_config_vars().get('UNIVERSALSDK', '').strip() ):
+if sys.version_info[:2] == ( 2, 5 ) and \
+ ( ( os.uname()[-1] in ( 'i386', 'ppc' ) and sys.platform == 'darwin' and os.path.abspath( sys.prefix ).startswith( '/System' ) ) or \
+ ( sys.platform == 'darwin' and get_config_vars().get('UNIVERSALSDK', '').strip() ) ):
# Has to be before anything imports pkg_resources
def _get_platform_monkeypatch():
plat = distutils.util._get_platform()
1
0
details: http://www.bx.psu.edu/hg/galaxy/rev/bcb3c0eeb72f
changeset: 3108:bcb3c0eeb72f
user: Enis Afgan <afgane(a)gmail.com>
date: Wed Nov 18 13:37:41 2009 -0500
description:
merge
diffstat:
lib/galaxy/web/framework/helpers/grids.py | 3 +++
static/images/mag_glass.png |
templates/grid_base.mako | 35 +++++++++++++++++++++++++++++++++++
templates/grid_common.mako | 13 ++++++++-----
4 files changed, 46 insertions(+), 5 deletions(-)
diffs (97 lines):
diff -r 5fbda2fdb3ca -r bcb3c0eeb72f lib/galaxy/web/framework/helpers/grids.py
--- a/lib/galaxy/web/framework/helpers/grids.py Wed Nov 18 13:36:37 2009 -0500
+++ b/lib/galaxy/web/framework/helpers/grids.py Wed Nov 18 13:37:41 2009 -0500
@@ -120,6 +120,9 @@
column_filter = from_json_string_recurse( column_filter )
if len( column_filter ) == 1:
column_filter = column_filter[0]
+ # If filter criterion is empty, do nothing.
+ if column_filter == '':
+ continue
# Update query.
query = column.filter( trans.sa_session, query, column_filter )
# Upate current filter dict.
diff -r 5fbda2fdb3ca -r bcb3c0eeb72f static/images/mag_glass.png
Binary file static/images/mag_glass.png has changed
diff -r 5fbda2fdb3ca -r bcb3c0eeb72f templates/grid_base.mako
--- a/templates/grid_base.mako Wed Nov 18 13:36:37 2009 -0500
+++ b/templates/grid_base.mako Wed Nov 18 13:37:41 2009 -0500
@@ -62,6 +62,21 @@
t2.autocomplete("${h.url_for( controller='history', action='name_autocomplete_data' )}", autocomplete_options);
}
+
+ // Initialize submit image elements.
+ $('.submit-image').each( function()
+ {
+ // On mousedown, add class to simulate click.
+ $(this).mousedown( function() {
+ $(this).addClass('gray-background');
+ });
+
+ // On mouseup, add class to simulate click.
+ $(this).mouseup( function() {
+ $(this).removeClass('gray-background');
+ });
+
+ });
});
## Can this be moved into base.mako?
%if refresh_frames:
@@ -168,6 +183,26 @@
text-align: center;
display: inline-block;
}
+ .submit-image {
+ vertical-align: text-bottom;
+ margin: 0;
+ padding: 0;
+ }
+ .no-padding-or-margin {
+ margin: 0;
+ padding: 0;
+ }
+ .gray-background {
+ background-color: #DDDDDD;
+ }
+ .text-filter-val {
+ border: solid 1px #AAAAAA;
+ padding: 1px 3px 1px 3px;
+ margin-right: 5px;
+ -moz-border-radius: .5em;
+ -webkit-border-radius: .5em;
+ font-style: italic;
+ }
</style>
</%def>
diff -r 5fbda2fdb3ca -r bcb3c0eeb72f templates/grid_common.mako
--- a/templates/grid_common.mako Wed Nov 18 13:36:37 2009 -0500
+++ b/templates/grid_common.mako Wed Nov 18 13:37:41 2009 -0500
@@ -32,10 +32,11 @@
<% column_filter = cur_filter_dict[column.key] %>
%if isinstance( column_filter, basestring ):
%if column_filter != "All":
- <span style="font-style: italic">${cur_filter_dict[column.key]}</span>
- <% filter_all = GridColumnFilter( "", { column.key : "All" } ) %>
- <a href="${url( filter_all.get_url_args() )}"><img src="${h.url_for('/static/images/delete_tag_icon_gray.png')}"/></a>
- |
+ <span class='text-filter-val'>
+ ${cur_filter_dict[column.key]}
+ <% filter_all = GridColumnFilter( "", { column.key : "All" } ) %>
+ <a href="${url( filter_all.get_url_args() )}"><img src="${h.url_for('/static/images/delete_tag_icon_gray.png')}"/></a>
+ </span>
%endif
%elif isinstance( column_filter, list ):
%for i, filter in enumerate( column_filter ):
@@ -53,7 +54,9 @@
%endif
%endif
- <span><input id="input-${column.key}-filter" name="f-${column.key}" type="text" value="" size="15"/></span>
+ <span>
+ <input class="no-padding-or-margin" id="input-${column.key}-filter" name="f-${column.key}" type="text" value="" size="15"/>
+ <input class='submit-image' type='image' src='${h.url_for('/static/images/mag_glass.png')}' alt='Filter'/></span>
</form>
%else:
%for i, filter in enumerate( column.get_accepted_filters() ):
1
0
23 Nov '09
details: http://www.bx.psu.edu/hg/galaxy/rev/5fbda2fdb3ca
changeset: 3107:5fbda2fdb3ca
user: Enis Afgan <afgane(a)gmail.com>
date: Wed Nov 18 13:36:37 2009 -0500
description:
Fixed table migration bug encountered with PostgreSQL.
diffstat:
lib/galaxy/cloud/__init__.py | 12 ++++++++++--
lib/galaxy/cloud/providers/ec2.py | 8 ++++++--
lib/galaxy/cloud/providers/eucalyptus.py | 14 +++++++++-----
lib/galaxy/model/__init__.py | 1 -
lib/galaxy/model/mapping.py | 6 +++---
lib/galaxy/model/migrate/versions/0026_cloud_tables.py | 4 ++--
templates/cloud/view_instance.mako | 6 ++++--
universe_wsgi.ini.sample | 12 ++++++------
8 files changed, 40 insertions(+), 23 deletions(-)
diffs (258 lines):
diff -r f4c2bf76b2e2 -r 5fbda2fdb3ca lib/galaxy/cloud/__init__.py
--- a/lib/galaxy/cloud/__init__.py Wed Nov 18 10:57:24 2009 -0500
+++ b/lib/galaxy/cloud/__init__.py Wed Nov 18 13:36:37 2009 -0500
@@ -45,6 +45,14 @@
ERROR = "error"
)
+store_status = Bunch(
+ WAITING = "waiting",
+ IN_USE = "in-use",
+ CREATING = "creating",
+ DELETED = 'deleted',
+ ERROR = "error"
+)
+
snapshot_status = Bunch(
SUBMITTED = 'submitted',
PENDING = 'pending',
@@ -413,7 +421,7 @@
be given in following format: 'vol-78943248'
"""
vol = self.sa_session.query( model.CloudStore ).filter( model.CloudStore.table.c.volume_id == vol_id ).first()
- vol.i_id = instance_id
+ vol.inst.instance_id = instance_id
self.sa_session.add( vol )
self.sa_session.flush()
@@ -559,7 +567,7 @@
def get_mi_id( self, instance_id=0 ):
uci = self.sa_session.query( model.UCI ).get( self.uci_id )
self.sa_session.refresh( uci )
- return uci.instance[instance_id].mi_id
+ return uci.instance[instance_id].image.image_id
def get_public_dns( self, instance_id=0 ):
uci = self.sa_session.query( model.UCI ).get( self.uci_id )
diff -r f4c2bf76b2e2 -r 5fbda2fdb3ca lib/galaxy/cloud/providers/ec2.py
--- a/lib/galaxy/cloud/providers/ec2.py Wed Nov 18 10:57:24 2009 -0500
+++ b/lib/galaxy/cloud/providers/ec2.py Wed Nov 18 13:36:37 2009 -0500
@@ -49,6 +49,7 @@
)
store_status = Bunch(
+ WAITING = "waiting",
IN_USE = "in-use",
CREATING = "creating",
DELETED = 'deleted',
@@ -441,6 +442,8 @@
s = reservation.instances[0].state
uci_wrapper.change_state( s, i_id, s )
uci_wrapper.set_security_group_name( self.security_group, i_id=i_id )
+ vol_id = uci_wrapper.get_store_volume_id( store_id=0 ) # TODO: Once more that one vol/UCI is allowed, update this!
+ uci_wrapper.set_store_status( vol_id, store_status.WAITING )
log.debug( "Instance of UCI '%s' started, current state: '%s'" % ( uci_wrapper.get_name(), uci_wrapper.get_uci_state() ) )
except boto.exception.EC2ResponseError, e:
err = "EC2 response error when retrieving instance information for UCI '" + uci_wrapper.get_name() + "': " + str( e )
@@ -560,6 +563,7 @@
stores = self.sa_session.query( model.CloudStore ) \
.filter( or_( model.CloudStore.table.c.status==store_status.IN_USE,
model.CloudStore.table.c.status==store_status.CREATING,
+ model.CloudStore.table.c.status==store_status.WAITING,
model.CloudStore.table.c.status==None ) ) \
.all()
for store in stores:
@@ -717,8 +721,8 @@
store.status = vl[0].status
self.sa_session.add( store )
self.sa_session.flush()
- if store.i_id != vl[0].instance_id:
- store.i_id = vl[0].instance_id
+ if store.inst.instance_id != vl[0].instance_id:
+ store.inst.instance_id = vl[0].instance_id
self.sa_session.add( store )
self.sa_session.flush()
if store.attach_time != vl[0].attach_time:
diff -r f4c2bf76b2e2 -r 5fbda2fdb3ca lib/galaxy/cloud/providers/eucalyptus.py
--- a/lib/galaxy/cloud/providers/eucalyptus.py Wed Nov 18 10:57:24 2009 -0500
+++ b/lib/galaxy/cloud/providers/eucalyptus.py Wed Nov 18 13:36:37 2009 -0500
@@ -49,6 +49,7 @@
)
store_status = Bunch(
+ WAITING = "waiting",
IN_USE = "in-use",
CREATING = "creating",
DELETED = 'deleted',
@@ -428,6 +429,8 @@
uci_wrapper.set_instance_id( i_index, i_id )
s = reservation.instances[0].state
uci_wrapper.change_state( s, i_id, s )
+ vol_id = uci_wrapper.get_store_volume_id( store_id=0 ) # TODO: Once more that one vol/UCI is allowed, update this!
+ uci_wrapper.set_store_status( vol_id, store_status.WAITING )
log.debug( "Instance of UCI '%s' started, current state: '%s'" % ( uci_wrapper.get_name(), uci_wrapper.get_uci_state() ) )
except boto.exception.EC2ResponseError, e:
err = "EC2 response error when retrieving instance information for UCI '" + uci_wrapper.get_name() + "': " + str( e )
@@ -497,7 +500,7 @@
## log.debug ( 'Error detaching volume; still going to try and stop instance %s.' % dbInstances.instance_id )
# store.attach_time = None
# store.device = None
-# store.i_id = None
+# store.inst.instance_id = None
# store.status = volStat
# log.debug ( '***** volume status: %s' % volStat )
#
@@ -549,6 +552,7 @@
stores = self.sa_session.query( model.CloudStore ) \
.filter( or_( model.CloudStore.table.c.status==store_status.IN_USE,
model.CloudStore.table.c.status==store_status.CREATING,
+ model.CloudStore.table.c.status==store_status.WAITING,
model.CloudStore.table.c.status==None ) ) \
.all()
for store in stores:
@@ -691,7 +695,7 @@
# Update store status in local DB with info from cloud provider
if len(vl) > 0:
try:
- if store.status != vl[0].status:
+ if store.status != vl[0].status and store.availability_zone != 'epc':
# In case something failed during creation of UCI but actual storage volume was created and yet
# UCI state remained as 'new', try to remedy this by updating UCI state here
if ( store.status == None ) and ( store.volume_id != None ):
@@ -714,8 +718,8 @@
store.status = vl[0].status
self.sa_session.add( store )
self.sa_session.flush()
- if store.i_id != vl[0].instance_id:
- store.i_id = vl[0].instance_id
+ if store.inst.instance_id != vl[0].instance_id:
+ store.inst.instance_id = vl[0].instance_id
self.sa_session.add( store )
self.sa_session.flush()
if store.attach_time != vl[0].attach_time:
@@ -981,7 +985,7 @@
# try:
# volumes = conn.get_all_volumes( vols )
# for i, v in enumerate( volumes ):
-# uci.store[i].i_id = v.instance_id
+# uci.store[i].inst.instance_id = v.instance_id
# uci.store[i].status = v.status
# uci.store[i].device = v.device
# uci.store[i].flush()
diff -r f4c2bf76b2e2 -r 5fbda2fdb3ca lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py Wed Nov 18 10:57:24 2009 -0500
+++ b/lib/galaxy/model/__init__.py Wed Nov 18 13:36:37 2009 -0500
@@ -1077,7 +1077,6 @@
def __init__( self ):
self.id = None
self.volume_id = None
- self.i_id = None
self.user = None
self.size = None
self.availability_zone = None
diff -r f4c2bf76b2e2 -r 5fbda2fdb3ca lib/galaxy/model/mapping.py
--- a/lib/galaxy/model/mapping.py Wed Nov 18 10:57:24 2009 -0500
+++ b/lib/galaxy/model/mapping.py Wed Nov 18 13:36:37 2009 -0500
@@ -429,7 +429,7 @@
Column( "type", TEXT ),
Column( "reservation_id", TEXT ),
Column( "instance_id", TEXT ),
- Column( "mi_id", TEXT, ForeignKey( "cloud_image.image_id" ), index=True ),
+ Column( "mi_id", Integer, ForeignKey( "cloud_image.id" ), index=True ),
Column( "state", TEXT ),
Column( "error", TEXT ),
Column( "public_dns", TEXT ),
@@ -447,7 +447,7 @@
Column( "volume_id", TEXT ),
Column( "size", Integer, nullable=False ),
Column( "availability_zone", TEXT ),
- Column( "i_id", TEXT, ForeignKey( "cloud_instance.instance_id" ) ),
+ Column( "inst_id", Integer, ForeignKey( "cloud_instance.id" ) ),
Column( "status", TEXT ),
Column( "device", TEXT ),
Column( "space_consumed", Integer ),
@@ -1133,7 +1133,7 @@
assign_mapper( context, CloudStore, CloudStore.table,
properties=dict( user=relation( User ),
- i=relation( CloudInstance ),
+ inst=relation( CloudInstance ),
snapshot=relation( CloudSnapshot, backref="store" )
) )
diff -r f4c2bf76b2e2 -r 5fbda2fdb3ca lib/galaxy/model/migrate/versions/0026_cloud_tables.py
--- a/lib/galaxy/model/migrate/versions/0026_cloud_tables.py Wed Nov 18 10:57:24 2009 -0500
+++ b/lib/galaxy/model/migrate/versions/0026_cloud_tables.py Wed Nov 18 13:36:37 2009 -0500
@@ -56,7 +56,7 @@
Column( "type", TEXT ),
Column( "reservation_id", TEXT ),
Column( "instance_id", TEXT ),
- Column( "mi_id", TEXT, ForeignKey( "cloud_image.id" ), index=True ),
+ Column( "mi_id", Integer, ForeignKey( "cloud_image.id" ), index=True ),
Column( "state", TEXT ),
Column( "error", TEXT ),
Column( "public_dns", TEXT ),
@@ -74,7 +74,7 @@
Column( "volume_id", TEXT ),
Column( "size", Integer, nullable=False ),
Column( "availability_zone", TEXT ),
- Column( "i_id", TEXT, ForeignKey( "cloud_instance.id" ) ),
+ Column( "inst_id", Integer, ForeignKey( "cloud_instance.id" ) ),
Column( "status", TEXT ),
Column( "device", TEXT ),
Column( "space_consumed", Integer ),
diff -r f4c2bf76b2e2 -r 5fbda2fdb3ca templates/cloud/view_instance.mako
--- a/templates/cloud/view_instance.mako Wed Nov 18 10:57:24 2009 -0500
+++ b/templates/cloud/view_instance.mako Wed Nov 18 13:36:37 2009 -0500
@@ -67,7 +67,7 @@
%endif
<tr>
<td> AMI: </td>
- <td> ${liveInstance.mi_id} </td>
+ <td> ${liveInstance.image.image_id} </td>
</tr>
<tr>
<td> State:</td>
@@ -81,6 +81,7 @@
<td> Storage size:</td>
<td> ${liveInstance.uci.total_size} </td>
</tr>
+ %if liveInstance.public_dns != None and liveInstance.public_dns != '':
<tr>
<td> Public DNS:</td>
<%
@@ -88,7 +89,8 @@
%>
<td> <a href="${lnk}" target="_blank">${liveInstance.public_dns}</a></td>
</tr>
- %if liveInstance.private_dns != None:
+ %endif
+ %if liveInstance.private_dns != None and liveInstance.private_dns != '':
<tr>
<td> Private DNS:</td>
<td> ${liveInstance.private_dns}</td>
diff -r f4c2bf76b2e2 -r 5fbda2fdb3ca universe_wsgi.ini.sample
--- a/universe_wsgi.ini.sample Wed Nov 18 10:57:24 2009 -0500
+++ b/universe_wsgi.ini.sample Wed Nov 18 13:36:37 2009 -0500
@@ -31,15 +31,15 @@
paste.app_factory = galaxy.web.buildapp:app_factory
# By default, Galaxy uses a SQLite database found here
-database_file = database/universe.sqlite
+#database_file = database/universe.sqlite
# 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
+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
# If using MySQL, see:
# http://rapd.wordpress.com/2008/03/02/sqlalchemy-sqlerror-operationalerror-2…
1
0
23 Nov '09
details: http://www.bx.psu.edu/hg/galaxy/rev/f4c2bf76b2e2
changeset: 3105:f4c2bf76b2e2
user: James Taylor <james(a)jamestaylor.org>
date: Wed Nov 18 10:57:24 2009 -0500
description:
Change a few foreign keys, this may change behavior of the cloud stuff, needs to be checked.
diffstat:
lib/galaxy/model/migrate/versions/0026_cloud_tables.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r 2beaa0783b69 -r f4c2bf76b2e2 lib/galaxy/model/migrate/versions/0026_cloud_tables.py
--- a/lib/galaxy/model/migrate/versions/0026_cloud_tables.py Wed Nov 18 10:47:14 2009 -0500
+++ b/lib/galaxy/model/migrate/versions/0026_cloud_tables.py Wed Nov 18 10:57:24 2009 -0500
@@ -56,7 +56,7 @@
Column( "type", TEXT ),
Column( "reservation_id", TEXT ),
Column( "instance_id", TEXT ),
- Column( "mi_id", TEXT, ForeignKey( "cloud_image.image_id" ), index=True ),
+ Column( "mi_id", TEXT, ForeignKey( "cloud_image.id" ), index=True ),
Column( "state", TEXT ),
Column( "error", TEXT ),
Column( "public_dns", TEXT ),
@@ -74,7 +74,7 @@
Column( "volume_id", TEXT ),
Column( "size", Integer, nullable=False ),
Column( "availability_zone", TEXT ),
- Column( "i_id", TEXT, ForeignKey( "cloud_instance.instance_id" ) ),
+ Column( "i_id", TEXT, ForeignKey( "cloud_instance.id" ) ),
Column( "status", TEXT ),
Column( "device", TEXT ),
Column( "space_consumed", Integer ),
1
0
23 Nov '09
details: http://www.bx.psu.edu/hg/galaxy/rev/fb7dd12ea39c
changeset: 3106:fb7dd12ea39c
user: jeremy goecks <jeremy.goecks(a)emory.edu>
date: Wed Nov 18 11:51:09 2009 -0500
description:
Tweaks to grid filter UI: (1) added search image/submit button for initiating search and (2) styled text filter criteria.
diffstat:
lib/galaxy/web/framework/helpers/grids.py | 3 +++
static/images/mag_glass.png |
templates/grid_base.mako | 35 +++++++++++++++++++++++++++++++++++
templates/grid_common.mako | 13 ++++++++-----
4 files changed, 46 insertions(+), 5 deletions(-)
diffs (97 lines):
diff -r f4c2bf76b2e2 -r fb7dd12ea39c lib/galaxy/web/framework/helpers/grids.py
--- a/lib/galaxy/web/framework/helpers/grids.py Wed Nov 18 10:57:24 2009 -0500
+++ b/lib/galaxy/web/framework/helpers/grids.py Wed Nov 18 11:51:09 2009 -0500
@@ -120,6 +120,9 @@
column_filter = from_json_string_recurse( column_filter )
if len( column_filter ) == 1:
column_filter = column_filter[0]
+ # If filter criterion is empty, do nothing.
+ if column_filter == '':
+ continue
# Update query.
query = column.filter( trans.sa_session, query, column_filter )
# Upate current filter dict.
diff -r f4c2bf76b2e2 -r fb7dd12ea39c static/images/mag_glass.png
Binary file static/images/mag_glass.png has changed
diff -r f4c2bf76b2e2 -r fb7dd12ea39c templates/grid_base.mako
--- a/templates/grid_base.mako Wed Nov 18 10:57:24 2009 -0500
+++ b/templates/grid_base.mako Wed Nov 18 11:51:09 2009 -0500
@@ -62,6 +62,21 @@
t2.autocomplete("${h.url_for( controller='history', action='name_autocomplete_data' )}", autocomplete_options);
}
+
+ // Initialize submit image elements.
+ $('.submit-image').each( function()
+ {
+ // On mousedown, add class to simulate click.
+ $(this).mousedown( function() {
+ $(this).addClass('gray-background');
+ });
+
+ // On mouseup, add class to simulate click.
+ $(this).mouseup( function() {
+ $(this).removeClass('gray-background');
+ });
+
+ });
});
## Can this be moved into base.mako?
%if refresh_frames:
@@ -168,6 +183,26 @@
text-align: center;
display: inline-block;
}
+ .submit-image {
+ vertical-align: text-bottom;
+ margin: 0;
+ padding: 0;
+ }
+ .no-padding-or-margin {
+ margin: 0;
+ padding: 0;
+ }
+ .gray-background {
+ background-color: #DDDDDD;
+ }
+ .text-filter-val {
+ border: solid 1px #AAAAAA;
+ padding: 1px 3px 1px 3px;
+ margin-right: 5px;
+ -moz-border-radius: .5em;
+ -webkit-border-radius: .5em;
+ font-style: italic;
+ }
</style>
</%def>
diff -r f4c2bf76b2e2 -r fb7dd12ea39c templates/grid_common.mako
--- a/templates/grid_common.mako Wed Nov 18 10:57:24 2009 -0500
+++ b/templates/grid_common.mako Wed Nov 18 11:51:09 2009 -0500
@@ -32,10 +32,11 @@
<% column_filter = cur_filter_dict[column.key] %>
%if isinstance( column_filter, basestring ):
%if column_filter != "All":
- <span style="font-style: italic">${cur_filter_dict[column.key]}</span>
- <% filter_all = GridColumnFilter( "", { column.key : "All" } ) %>
- <a href="${url( filter_all.get_url_args() )}"><img src="${h.url_for('/static/images/delete_tag_icon_gray.png')}"/></a>
- |
+ <span class='text-filter-val'>
+ ${cur_filter_dict[column.key]}
+ <% filter_all = GridColumnFilter( "", { column.key : "All" } ) %>
+ <a href="${url( filter_all.get_url_args() )}"><img src="${h.url_for('/static/images/delete_tag_icon_gray.png')}"/></a>
+ </span>
%endif
%elif isinstance( column_filter, list ):
%for i, filter in enumerate( column_filter ):
@@ -53,7 +54,9 @@
%endif
%endif
- <span><input id="input-${column.key}-filter" name="f-${column.key}" type="text" value="" size="15"/></span>
+ <span>
+ <input class="no-padding-or-margin" id="input-${column.key}-filter" name="f-${column.key}" type="text" value="" size="15"/>
+ <input class='submit-image' type='image' src='${h.url_for('/static/images/mag_glass.png')}' alt='Filter'/></span>
</form>
%else:
%for i, filter in enumerate( column.get_accepted_filters() ):
1
0
details: http://www.bx.psu.edu/hg/galaxy/rev/2beaa0783b69
changeset: 3104:2beaa0783b69
user: James Taylor <james(a)jamestaylor.org>
date: Wed Nov 18 10:47:14 2009 -0500
description:
Another tweak to cloud table order
diffstat:
lib/galaxy/model/migrate/versions/0026_cloud_tables.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (14 lines):
diff -r cffcf1cae94c -r 2beaa0783b69 lib/galaxy/model/migrate/versions/0026_cloud_tables.py
--- a/lib/galaxy/model/migrate/versions/0026_cloud_tables.py Wed Nov 18 10:43:08 2009 -0500
+++ b/lib/galaxy/model/migrate/versions/0026_cloud_tables.py Wed Nov 18 10:47:14 2009 -0500
@@ -138,9 +138,9 @@
CloudImage_table.create()
UCI_table.create()
+ CloudInstance_table.create()
CloudStore_table.create()
CloudSnapshot_table.create()
- CloudInstance_table.create()
def downgrade():
metadata.reflect()
1
0