galaxy-commits
Threads by month
- ----- 2026 -----
- 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
- 15302 discussions
commit/galaxy-central: james_taylor: error middleware: return writable from start_response correctly
by Bitbucket 04 Feb '13
by Bitbucket 04 Feb '13
04 Feb '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/d7f4d3a8d0b2/
changeset: d7f4d3a8d0b2
user: james_taylor
date: 2013-02-04 06:09:23
summary: error middleware: return writable from start_response correctly
affected #: 1 file
diff -r 0c1b71a50ccb5b6f5aff233b40355d84141960c6 -r d7f4d3a8d0b273163ae3d04872e211b7dcfbeba9 lib/galaxy/web/framework/middleware/error.py
--- a/lib/galaxy/web/framework/middleware/error.py
+++ b/lib/galaxy/web/framework/middleware/error.py
@@ -200,7 +200,9 @@
def __call__(self, *args):
self.response_started = True
- self.start_response(*args)
+ # Return whatever the wrapped start_response would have
+ # returned
+ return self.start_response(*args)
class CatchingIter(object):
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: james_taylor: genetrack: missed one reference to display application
by Bitbucket 03 Feb '13
by Bitbucket 03 Feb '13
03 Feb '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/0c1b71a50ccb/
changeset: 0c1b71a50ccb
user: james_taylor
date: 2013-02-04 05:39:06
summary: genetrack: missed one reference to display application
affected #: 1 file
diff -r 898c9e140da953fe18ebfda5a96b9810d372706d -r 0c1b71a50ccb5b6f5aff233b40355d84141960c6 datatypes_conf.xml.sample
--- a/datatypes_conf.xml.sample
+++ b/datatypes_conf.xml.sample
@@ -114,7 +114,6 @@
<converter file="interval_to_tabix_converter.xml" target_datatype="tabix" depends_on="bgzip"/><converter file="interval_to_summary_tree_converter.xml" target_datatype="summary_tree"/><!-- <display file="ucsc/interval_as_bed.xml" inherit="True" /> -->
- <display file="genetrack.xml" inherit="True"/><display file="ensembl/ensembl_interval_as_bed.xml" inherit="True"/><display file="gbrowse/gbrowse_interval_as_bed.xml" inherit="True"/><display file="rviewer/bed.xml" inherit="True"/>
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: james_taylor: remove comment from sentry middleware that is not a valid doctest
by Bitbucket 03 Feb '13
by Bitbucket 03 Feb '13
03 Feb '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/898c9e140da9/
changeset: 898c9e140da9
user: james_taylor
date: 2013-02-04 05:27:04
summary: remove comment from sentry middleware that is not a valid doctest
affected #: 1 file
diff -r b59a3df615c3542cb05ad68dc851669928a586d8 -r 898c9e140da953fe18ebfda5a96b9810d372706d lib/galaxy/web/framework/middleware/sentry.py
--- a/lib/galaxy/web/framework/middleware/sentry.py
+++ b/lib/galaxy/web/framework/middleware/sentry.py
@@ -16,9 +16,6 @@
"""
A WSGI middleware which will attempt to capture any
uncaught exceptions and send them to Sentry.
-
- >>> from raven.base import Client
- >>> application = Sentry(application, Client())
"""
def __init__(self, application, dsn):
self.application = application
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/b59a3df615c3/
changeset: b59a3df615c3
user: james_taylor
date: 2013-02-04 05:22:16
summary: Add some missing files
affected #: 2 files
diff -r 17c40da527fe8fee481ead85bdf8069776fc8f44 -r b59a3df615c3542cb05ad68dc851669928a586d8 lib/galaxy/web/framework/middleware/request_id.py
--- /dev/null
+++ b/lib/galaxy/web/framework/middleware/request_id.py
@@ -0,0 +1,12 @@
+import uuid
+
+class RequestIDMiddleware( object ):
+ """
+ A WSGI middleware that creates a unique ID for the request and
+ puts it in the environment
+ """
+ def __init__( self, app, global_conf=None ):
+ self.app = app
+ def __call__( self, environ, start_response ):
+ environ['request_id'] = uuid.uuid1().hex
+ return self.app( environ, start_response )
\ No newline at end of file
diff -r 17c40da527fe8fee481ead85bdf8069776fc8f44 -r b59a3df615c3542cb05ad68dc851669928a586d8 static/scripts/packed/libs/jquery/select2.js
--- /dev/null
+++ b/static/scripts/packed/libs/jquery/select2.js
@@ -0,0 +1,1 @@
+(function(a){if(typeof a.fn.each2=="undefined"){a.fn.extend({each2:function(f){var d=a([0]),e=-1,b=this.length;while(++e<b&&(d.context=d[0]=this[e])&&f.call(d[0],e,d)!==false){}return this}})}})(jQuery);(function(j,l){if(window.Select2!==l){return}var c,e,v,B,t,a;c={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(C){C=C.which?C.which:C;switch(C){case c.LEFT:case c.RIGHT:case c.UP:case c.DOWN:return true}return false},isControl:function(D){var C=D.which;switch(C){case c.SHIFT:case c.CTRL:case c.ALT:return true}if(D.metaKey){return true}return false},isFunctionKey:function(C){C=C.which?C.which:C;return C>=112&&C<=123}};t=(function(){var C=1;return function(){return C++}}());function b(F,G){var E=0,C=G.length,D;if(typeof F==="undefined"){return -1}if(F.constructor===String){for(;E<C;E=E+1){if(F.localeCompare(G[E])===0){return E}}}else{for(;E<C;E=E+1){D=G[E];if(D.constructor===String){if(D.localeCompare(F)===0){return E}}else{if(D===F){return E}}}}return -1}function q(D,C){if(D===C){return true}if(D===l||C===l){return false}if(D===null||C===null){return false}if(D.constructor===String){return D.localeCompare(C)===0}if(C.constructor===String){return C.localeCompare(D)===0}return false}function m(D,F){var G,E,C;if(D===null||D.length<1){return[]}G=D.split(F);for(E=0,C=G.length;E<C;E=E+1){G[E]=j.trim(G[E])}return G}function n(C){return C.outerWidth()-C.width()}function z(D){var C="keyup-change-value";D.bind("keydown",function(){if(j.data(D,C)===l){j.data(D,C,D.val())}});D.bind("keyup",function(){var E=j.data(D,C);if(E!==l&&D.val()!==E){j.removeData(D,C);D.trigger("keyup-change")}})}j(document).delegate("body","mousemove",function(C){j.data(document,"select2-lastpos",{x:C.pageX,y:C.pageY})});function u(C){C.bind("mousemove",function(E){var D=j.data(document,"select2-lastpos");if(D===l||D.x!==E.pageX||D.y!==E.pageY){j(E.target).trigger("mousemove-filtered",E)}})}function f(F,D,C){C=C||l;var E;return function(){var G=arguments;window.clearTimeout(E);E=window.setTimeout(function(){D.apply(C,G)},F)}}function A(E){var C=false,D;return function(){if(C===false){D=E();C=true}return D}}function g(C,E){var D=f(C,function(F){E.trigger("scroll-debounced",F)});E.bind("scroll",function(F){if(b(F.target,E.get())>=0){D(F)}})}function d(C){C.preventDefault();C.stopPropagation()}function x(D){if(!a){var C=D[0].currentStyle||window.getComputedStyle(D[0],null);a=j("<div></div>").css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:C.fontSize,fontFamily:C.fontFamily,fontStyle:C.fontStyle,fontWeight:C.fontWeight,letterSpacing:C.letterSpacing,textTransform:C.textTransform,whiteSpace:"nowrap"});j("body").append(a)}a.text(D.val());return a.width()}function i(G,F,D){var E=G.toUpperCase().indexOf(F.toUpperCase()),C=F.length;if(E<0){D.push(G);return}D.push(G.substring(0,E));D.push("<span class='select2-match'>");D.push(G.substring(E,E+C));D.push("</span>");D.push(G.substring(E+C,G.length))}function p(D){var F,C=0,E=null,G=D.quietMillis||100;return function(H){window.clearTimeout(F);F=window.setTimeout(function(){C+=1;var I=C,L=D.data,M=D.transport||j.ajax,K=D.traditional||false,J=D.type||"GET";L=L.call(this,H.term,H.page,H.context);if(null!==E){E.abort()}E=M.call(null,{url:D.url,dataType:D.dataType,data:L,type:J,traditional:K,success:function(O){if(I<C){return}var N=D.results(O,H.page);H.callback(N)}})},G)}}function r(C){var E=C,D,F=function(G){return""+G.text};if(!j.isArray(E)){F=E.text;if(!j.isFunction(F)){D=E.text;F=function(G){return G[D]}}E=E.results}return function(I){var H=I.term,G={results:[]},J;if(H===""){I.callback({results:E});return}J=function(L,N){var M,K;L=L[0];if(L.children){M={};for(K in L){if(L.hasOwnProperty(K)){M[K]=L[K]}}M.children=[];j(L.children).each2(function(O,P){J(P,M.children)});if(M.children.length){N.push(M)}}else{if(I.matcher(H,F(L))){N.push(L)}}};j(E).each2(function(L,K){J(K,G.results)});I.callback(G)}}function o(C){if(j.isFunction(C)){return C}return function(F){var E=F.term,D={results:[]};j(C).each(function(){var G=this.text!==l,H=G?this.text:this;if(E===""||F.matcher(E,H)){D.results.push(G?this:{id:this,text:this})}});F.callback(D)}}function k(C,D){if(j.isFunction(C)){return true}if(!C){return false}throw new Error("formatterName must be a function or a falsy value")}function s(C){return j.isFunction(C)?C():C}function h(C){var D=0;j.each(C,function(E,F){if(F.children){D+=h(F.children)}else{D++}});return D}function y(K,L,I,C){var D=K,M=false,F,J,G,E,H;if(!C.createSearchChoice||!C.tokenSeparators||C.tokenSeparators.length<1){return l}while(true){J=-1;for(G=0,E=C.tokenSeparators.length;G<E;G++){H=C.tokenSeparators[G];J=K.indexOf(H);if(J>=0){break}}if(J<0){break}F=K.substring(0,J);K=K.substring(J+H.length);if(F.length>0){F=C.createSearchChoice(F,L);if(F!==l&&F!==null&&C.id(F)!==l&&C.id(F)!==null){M=false;for(G=0,E=L.length;G<E;G++){if(q(C.id(F),C.id(L[G]))){M=true;break}}if(!M){I(F)}}}}if(D.localeCompare(K)!=0){return K}}j(document).ready(function(){j(document).delegate("body","mousedown touchend",function(E){var D=j(E.target).closest("div.select2-container").get(0),C;if(D){j(document).find("div.select2-container-active").each(function(){if(this!==D){j(this).data("select2").blur()}})}else{D=j(E.target).closest("div.select2-drop").get(0);j(document).find("div.select2-drop-active").each(function(){if(this!==D){j(this).data("select2").blur()}})}D=j(E.target);C=D.attr("for");if("LABEL"===E.target.tagName&&C&&C.length>0){D=j("#"+C);D=D.data("select2");if(D!==l){D.focus();E.preventDefault()}}})});function w(C,D){var E=function(){};E.prototype=new C;E.prototype.constructor=E;E.prototype.parent=C.prototype;E.prototype=j.extend(E.prototype,D);return E}e=w(Object,{bind:function(D){var C=this;return function(){D.apply(C,arguments)}},init:function(E){var D,C,F=".select2-results";this.opts=E=this.prepareOpts(E);this.id=E.id;if(E.element.data("select2")!==l&&E.element.data("select2")!==null){this.destroy()}this.enabled=true;this.container=this.createContainer();this.containerId="s2id_"+(E.element.attr("id")||"autogen"+t());this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1");this.container.attr("id",this.containerId);this.body=A(function(){return E.element.closest("body")});if(E.element.attr("class")!==l){this.container.addClass(E.element.attr("class").replace(/validate\[[\S ]+] ?/,""))}this.container.css(s(E.containerCss));this.container.addClass(s(E.containerCssClass));this.opts.element.data("select2",this).hide().before(this.container);this.container.data("select2",this);this.dropdown=this.container.find(".select2-drop");this.dropdown.addClass(s(E.dropdownCssClass));this.dropdown.data("select2",this);this.results=D=this.container.find(F);this.search=C=this.container.find("input.select2-input");C.attr("tabIndex",this.opts.element.attr("tabIndex"));this.resultsPage=0;this.context=null;this.initContainer();this.initContainerWidth();u(this.results);this.dropdown.delegate(F,"mousemove-filtered",this.bind(this.highlightUnderEvent));g(80,this.results);this.dropdown.delegate(F,"scroll-debounced",this.bind(this.loadMoreIfNeeded));if(j.fn.mousewheel){D.mousewheel(function(K,L,I,H){var J=D.scrollTop(),G;if(H>0&&J-H<=0){D.scrollTop(0);d(K)}else{if(H<0&&D.get(0).scrollHeight-D.scrollTop()+H<=D.height()){D.scrollTop(D.get(0).scrollHeight-D.height());d(K)}}})}z(C);C.bind("keyup-change",this.bind(this.updateResults));C.bind("focus",function(){C.addClass("select2-focused");if(C.val()===" "){C.val("")}});C.bind("blur",function(){C.removeClass("select2-focused")});this.dropdown.delegate(F,"mouseup",this.bind(function(G){if(j(G.target).closest(".select2-result-selectable:not(.select2-disabled)").length>0){this.highlightUnderEvent(G);this.selectHighlighted(G)}else{this.focusSearch()}d(G)}));this.dropdown.bind("click mouseup mousedown",function(G){G.stopPropagation()});if(j.isFunction(this.opts.initSelection)){this.initSelection();this.monitorSource()}if(E.element.is(":disabled")||E.element.is("[readonly='readonly']")){this.disable()}},destroy:function(){var C=this.opts.element.data("select2");if(C!==l){C.container.remove();C.dropdown.remove();C.opts.element.removeData("select2").unbind(".select2").show()}},prepareOpts:function(G){var E,D,C,F;E=G.element;if(E.get(0).tagName.toLowerCase()==="select"){this.select=D=G.element}if(D){j.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in G){throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}})}G=j.extend({},{populateResults:function(H,L,N){var M,K,P,J,I=this.opts.id,O=this;M=function(V,Q,U){var W,S,ab,Y,aa,R,Z,X,T;for(W=0,S=V.length;W<S;W=W+1){ab=V[W];Y=I(ab)!==l;aa=ab.children&&ab.children.length>0;R=j("<li></li>");R.addClass("select2-results-dept-"+U);R.addClass("select2-result");R.addClass(Y?"select2-result-selectable":"select2-result-unselectable");if(aa){R.addClass("select2-result-with-children")}R.addClass(O.opts.formatResultCssClass(ab));Z=j("<div></div>");Z.addClass("select2-result-label");T=G.formatResult(ab,Z,N);if(T!==l){Z.html(O.opts.escapeMarkup(T))}R.append(Z);if(aa){X=j("<ul></ul>");X.addClass("select2-result-sub");M(ab.children,X,U+1);R.append(X)}R.data("select2-data",ab);Q.append(R)}};M(L,H,0)}},j.fn.select2.defaults,G);if(typeof(G.id)!=="function"){C=G.id;G.id=function(H){return H[C]}}if(D){G.query=this.bind(function(K){var J={results:[],more:false},I=K.term,H,M,L;L=function(N,P){var O;if(N.is("option")){if(K.matcher(I,N.text(),N)){P.push({id:N.attr("value"),text:N.text(),element:N.get(),css:N.attr("class")})}}else{if(N.is("optgroup")){O={text:N.attr("label"),children:[],element:N.get(),css:N.attr("class")};N.children().each2(function(Q,R){L(R,O.children)});if(O.children.length>0){P.push(O)}}}};H=E.children();if(this.getPlaceholder()!==l&&H.length>0){M=H[0];if(j(M).text()===""){H=H.not(M)}}H.each2(function(N,O){L(O,J.results)});K.callback(J)});G.id=function(H){return H.id};G.formatResultCssClass=function(H){return H.css}}else{if(!("query" in G)){if("ajax" in G){F=G.element.data("ajax-url");if(F&&F.length>0){G.ajax.url=F}G.query=p(G.ajax)}else{if("data" in G){G.query=r(G.data)}else{if("tags" in G){G.query=o(G.tags);G.createSearchChoice=function(H){return{id:H,text:H}};G.initSelection=function(H,J){var I=[];j(m(H.val(),G.separator)).each(function(){var M=this,L=this,K=G.tags;if(j.isFunction(K)){K=K()}j(K).each(function(){if(q(this.id,M)){L=this.text;return false}});I.push({id:M,text:L})});J(I)}}}}}}if(typeof(G.query)!=="function"){throw"query function not defined for Select2 "+G.element.attr("id")}return G},monitorSource:function(){this.opts.element.bind("change.select2",this.bind(function(C){if(this.opts.element.data("select2-change-triggered")!==true){this.initSelection()}}))},triggerChange:function(C){C=C||{};C=j.extend({},C,{type:"change",val:this.val()});this.opts.element.data("select2-change-triggered",true);this.opts.element.trigger(C);this.opts.element.data("select2-change-triggered",false);this.opts.element.click();if(this.opts.blurOnChange){this.opts.element.blur()}},enable:function(){if(this.enabled){return}this.enabled=true;this.container.removeClass("select2-container-disabled")},disable:function(){if(!this.enabled){return}this.close();this.enabled=false;this.container.addClass("select2-container-disabled")},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var G=this.container.offset(),O=this.container.outerHeight(),D=this.container.outerWidth(),F=this.dropdown.outerHeight(),K=j(window).scrollTop()+document.documentElement.clientHeight,C=G.top+O,N=G.left,L=C+F<=K,J=(G.top-F)>=this.body().scrollTop(),E=this.dropdown.hasClass("select2-drop-above"),H,M,I;if(this.body().css("position")!=="static"){H=this.body().offset();C-=H.top;N-=H.left}if(E){M=true;if(!J&&L){M=false}}else{M=false;if(!L&&J){M=true}}if(M){C=G.top-F;this.container.addClass("select2-drop-above");this.dropdown.addClass("select2-drop-above")}else{this.container.removeClass("select2-drop-above");this.dropdown.removeClass("select2-drop-above")}I=j.extend({top:C,left:N,width:D},s(this.opts.dropdownCss));this.dropdown.css(I)},shouldOpen:function(){var C;if(this.opened()){return false}C=j.Event("open");this.opts.element.trigger(C);return !C.isDefaultPrevented()},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above");this.dropdown.removeClass("select2-drop-above")},open:function(){if(!this.shouldOpen()){return false}window.setTimeout(this.bind(this.opening),1);return true},opening:function(){var F=this.containerId,D=this.containerSelector,C="scroll."+F,E="resize."+F;this.container.parents().each(function(){j(this).bind(C,function(){var G=j(D);if(G.length==0){j(this).unbind(C)}G.select2("close")})});j(window).bind(E,function(){var G=j(D);if(G.length==0){j(window).unbind(E)}G.select2("close")});this.clearDropdownAlignmentPreference();if(this.search.val()===" "){this.search.val("")}this.container.addClass("select2-dropdown-open").addClass("select2-container-active");this.updateResults(true);if(this.dropdown[0]!==this.body().children().last()[0]){this.dropdown.detach().appendTo(this.body())}this.dropdown.show();this.positionDropdown();this.dropdown.addClass("select2-drop-active");this.ensureHighlightVisible();this.focusSearch()},close:function(){if(!this.opened()){return}var C=this;this.container.parents().each(function(){j(this).unbind("scroll."+C.containerId)});j(window).unbind("resize."+this.containerId);this.clearDropdownAlignmentPreference();this.dropdown.hide();this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active");this.results.empty();this.clearSearch();this.opts.element.trigger(j.Event("close"))},clearSearch:function(){},ensureHighlightVisible:function(){var F=this.results,E,C,J,I,G,H,D;C=this.highlight();if(C<0){return}if(C==0){F.scrollTop(0);return}E=F.find(".select2-result-selectable");J=j(E[C]);I=J.offset().top+J.outerHeight();if(C===E.length-1){D=F.find("li.select2-more-results");if(D.length>0){I=D.offset().top+D.outerHeight()}}G=F.offset().top+F.outerHeight();if(I>G){F.scrollTop(F.scrollTop()+(I-G))}H=J.offset().top-F.offset().top;if(H<0){F.scrollTop(F.scrollTop()+H)}},moveHighlight:function(F){var E=this.results.find(".select2-result-selectable"),D=this.highlight();while(D>-1&&D<E.length){D+=F;var C=j(E[D]);if(C.hasClass("select2-result-selectable")&&!C.hasClass("select2-disabled")){this.highlight(D);break}}},highlight:function(C){var D=this.results.find(".select2-result-selectable").not(".select2-disabled");if(arguments.length===0){return b(D.filter(".select2-highlighted")[0],D.get())}if(C>=D.length){C=D.length-1}if(C<0){C=0}D.removeClass("select2-highlighted");j(D[C]).addClass("select2-highlighted");this.ensureHighlightVisible()},countSelectableResults:function(){return this.results.find(".select2-result-selectable").not(".select2-disabled").length},highlightUnderEvent:function(D){var C=j(D.target).closest(".select2-result-selectable");if(C.length>0&&!C.is(".select2-highlighted")){var E=this.results.find(".select2-result-selectable");this.highlight(E.index(C))}else{if(C.length==0){this.results.find(".select2-highlighted").removeClass("select2-highlighted")}}},loadMoreIfNeeded:function(){var G=this.results,F=G.find("li.select2-more-results"),J,I=-1,H=this.resultsPage+1,C=this,E=this.search.val(),D=this.context;if(F.length===0){return}J=F.offset().top-G.offset().top-G.height();if(J<=0){F.addClass("select2-active");this.opts.query({term:E,page:H,context:D,matcher:this.opts.matcher,callback:this.bind(function(K){if(!C.opened()){return}C.opts.populateResults.call(this,G,K.results,{term:E,page:H,context:D});if(K.more===true){F.detach().appendTo(G).text(C.opts.formatLoadMore(H+1));window.setTimeout(function(){C.loadMoreIfNeeded()},10)}else{F.remove()}C.positionDropdown();C.resultsPage=H})})}},tokenize:function(){},updateResults:function(H){var K=this.search,F=this.results,C=this.opts,E,J=this,I;if(H!==true&&(this.showSearchInput===false||!this.opened())){return}K.addClass("select2-active");function G(){F.scrollTop(0);K.removeClass("select2-active");J.positionDropdown()}function D(L){F.html(J.opts.escapeMarkup(L));G()}if(C.maximumSelectionSize>=1){E=this.data();if(j.isArray(E)&&E.length>=C.maximumSelectionSize&&k(C.formatSelectionTooBig,"formatSelectionTooBig")){D("<li class='select2-selection-limit'>"+C.formatSelectionTooBig(C.maximumSelectionSize)+"</li>");return}}if(K.val().length<C.minimumInputLength&&k(C.formatInputTooShort,"formatInputTooShort")){D("<li class='select2-no-results'>"+C.formatInputTooShort(K.val(),C.minimumInputLength)+"</li>");return}else{D("<li class='select2-searching'>"+C.formatSearching()+"</li>")}I=this.tokenize();if(I!=l&&I!=null){K.val(I)}this.resultsPage=1;C.query({term:K.val(),page:this.resultsPage,context:null,matcher:C.matcher,callback:this.bind(function(M){var L;if(!this.opened()){return}this.context=(M.context===l)?null:M.context;if(this.opts.createSearchChoice&&K.val()!==""){L=this.opts.createSearchChoice.call(null,K.val(),M.results);if(L!==l&&L!==null&&J.id(L)!==l&&J.id(L)!==null){if(j(M.results).filter(function(){return q(J.id(this),J.id(L))}).length===0){M.results.unshift(L)}}}if(M.results.length===0&&k(C.formatNoMatches,"formatNoMatches")){D("<li class='select2-no-results'>"+C.formatNoMatches(K.val())+"</li>");return}F.empty();J.opts.populateResults.call(this,F,M.results,{term:K.val(),page:this.resultsPage,context:null});if(M.more===true&&k(C.formatLoadMore,"formatLoadMore")){F.append("<li class='select2-more-results'>"+J.opts.escapeMarkup(C.formatLoadMore(this.resultsPage))+"</li>");window.setTimeout(function(){J.loadMoreIfNeeded()},10)}this.postprocessResults(M,H);G()})})},cancel:function(){this.close()},blur:function(){this.close();this.container.removeClass("select2-container-active");this.dropdown.removeClass("select2-drop-active");if(this.search[0]===document.activeElement){this.search.blur()}this.clearSearch();this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){this.search.show();this.search.focus();window.setTimeout(this.bind(function(){this.search.show();this.search.focus();this.search.val(this.search.val())}),10)},selectHighlighted:function(){var C=this.highlight(),D=this.results.find(".select2-highlighted").not(".select2-disabled"),E=D.closest(".select2-result-selectable").data("select2-data");if(E){D.addClass("select2-disabled");this.highlight(C);this.onSelect(E)}},getPlaceholder:function(){return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder},initContainerWidth:function(){function D(){var H,F,I,G,E;if(this.opts.width==="off"){return null}else{if(this.opts.width==="element"){return this.opts.element.outerWidth()===0?"auto":this.opts.element.outerWidth()+"px"}else{if(this.opts.width==="copy"||this.opts.width==="resolve"){H=this.opts.element.attr("style");if(H!==l){F=H.split(";");for(G=0,E=F.length;G<E;G=G+1){I=F[G].replace(/\s/g,"").match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/);if(I!==null&&I.length>=1){return I[1]}}}if(this.opts.width==="resolve"){H=this.opts.element.css("width");if(H.indexOf("%")>0){return H}return(this.opts.element.outerWidth()===0?"auto":this.opts.element.outerWidth()+"px")}return null}else{if(j.isFunction(this.opts.width)){return this.opts.width()}else{return this.opts.width}}}}}var C=D.call(this);if(C!==null){this.container.attr("style","width: "+C)}}});v=w(e,{createContainer:function(){var C=j("<div></div>",{"class":"select2-container"}).html([" <a href='#' onclick='return false;' class='select2-choice'>"," <span></span><abbr class='select2-search-choice-close' style='display:none;'></abbr>"," <div><b></b></div>","</a>"," <div class='select2-drop select2-offscreen'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return C},opening:function(){this.search.show();this.parent.opening.apply(this,arguments);this.dropdown.removeClass("select2-offscreen")},close:function(){if(!this.opened()){return}this.parent.close.apply(this,arguments);this.dropdown.removeAttr("style").addClass("select2-offscreen").insertAfter(this.selection).show()},focus:function(){this.close();this.selection.focus()},isFocused:function(){return this.selection[0]===document.activeElement},cancel:function(){this.parent.cancel.apply(this,arguments);this.selection.focus()},initContainer:function(){var E,D=this.container,F=this.dropdown,C=false;this.selection=E=D.find(".select2-choice");this.search.bind("keydown",this.bind(function(G){if(!this.enabled){return}if(G.which===c.PAGE_UP||G.which===c.PAGE_DOWN){d(G);return}if(this.opened()){switch(G.which){case c.UP:case c.DOWN:this.moveHighlight((G.which===c.UP)?-1:1);d(G);return;case c.TAB:case c.ENTER:this.selectHighlighted();d(G);return;case c.ESC:this.cancel(G);d(G);return}}else{if(G.which===c.TAB||c.isControl(G)||c.isFunctionKey(G)||G.which===c.ESC){return}if(this.opts.openOnEnter===false&&G.which===c.ENTER){return}this.open();if(G.which===c.ENTER){return}}}));this.search.bind("focus",this.bind(function(){this.selection.attr("tabIndex","-1")}));this.search.bind("blur",this.bind(function(){if(!this.opened()){this.container.removeClass("select2-container-active")}window.setTimeout(this.bind(function(){this.selection.attr("tabIndex",this.opts.element.attr("tabIndex"))}),10)}));E.bind("mousedown",this.bind(function(G){C=true;if(this.opened()){this.close();this.selection.focus()}else{if(this.enabled){this.open()}}C=false}));F.bind("mousedown",this.bind(function(){this.search.focus()}));E.bind("focus",this.bind(function(){this.container.addClass("select2-container-active");this.search.attr("tabIndex","-1")}));E.bind("blur",this.bind(function(){if(!this.opened()){this.container.removeClass("select2-container-active")}window.setTimeout(this.bind(function(){this.search.attr("tabIndex",this.opts.element.attr("tabIndex"))}),10)}));E.bind("keydown",this.bind(function(H){if(!this.enabled){return}if(H.which===c.PAGE_UP||H.which===c.PAGE_DOWN){d(H);return}if(H.which===c.TAB||c.isControl(H)||c.isFunctionKey(H)||H.which===c.ESC){return}if(this.opts.openOnEnter===false&&H.which===c.ENTER){return}if(H.which==c.DELETE){if(this.opts.allowClear){this.clear()}return}this.open();if(H.which===c.ENTER){d(H);return}if(H.which<48){d(H);return}var G=String.fromCharCode(H.which).toLowerCase();if(H.shiftKey){G=G.toUpperCase()}this.search.focus();this.search.val(G);d(H)}));E.delegate("abbr","mousedown",this.bind(function(G){if(!this.enabled){return}this.clear();d(G);this.close();this.triggerChange();this.selection.focus()}));this.setPlaceholder();this.search.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")}))},clear:function(){this.opts.element.val("");this.selection.find("span").empty();this.selection.removeData("select2-data");this.setPlaceholder()},initSelection:function(){var D;if(this.opts.element.val()===""){this.close();this.setPlaceholder()}else{var C=this;this.opts.initSelection.call(null,this.opts.element,function(E){if(E!==l&&E!==null){C.updateSelection(E);C.close();C.setPlaceholder()}})}},prepareOpts:function(){var C=this.parent.prepareOpts.apply(this,arguments);if(C.element.get(0).tagName.toLowerCase()==="select"){C.initSelection=function(D,F){var E=D.find(":selected");if(j.isFunction(F)){F({id:E.attr("value"),text:E.text()})}}}return C},setPlaceholder:function(){var C=this.getPlaceholder();if(this.opts.element.val()===""&&C!==l){if(this.select&&this.select.find("option:first").text()!==""){return}this.selection.find("span").html(this.opts.escapeMarkup(C));this.selection.addClass("select2-default");this.selection.find("abbr").hide()}},postprocessResults:function(F,D){var E=0,C=this,G=true;this.results.find(".select2-result-selectable").each2(function(H,I){if(q(C.id(I.data("select2-data")),C.opts.element.val())){E=H;return false}});this.highlight(E);if(D===true){G=this.showSearchInput=h(F.results)>=this.opts.minimumResultsForSearch;this.dropdown.find(".select2-search")[G?"removeClass":"addClass"]("select2-search-hidden");j(this.dropdown,this.container)[G?"addClass":"removeClass"]("select2-with-searchbox")}},onSelect:function(D){var C=this.opts.element.val();this.opts.element.val(this.id(D));this.updateSelection(D);this.close();this.selection.focus();if(!q(C,this.id(D))){this.triggerChange()}},updateSelection:function(E){var C=this.selection.find("span"),D;this.selection.data("select2-data",E);C.empty();D=this.opts.formatSelection(E,C);if(D!==l){C.append(this.opts.escapeMarkup(D))}this.selection.removeClass("select2-default");if(this.opts.allowClear&&this.getPlaceholder()!==l){this.selection.find("abbr").show()}},val:function(){var E,D=null,C=this;if(arguments.length===0){return this.opts.element.val()}E=arguments[0];if(this.select){this.select.val(E).find(":selected").each2(function(F,G){D={id:G.attr("value"),text:G.text()};return false});this.updateSelection(D);this.setPlaceholder()}else{if(this.opts.initSelection===l){throw new Error("cannot call val() if initSelection() is not defined")}if(!E){this.clear();return}this.opts.element.val(E);this.opts.initSelection(this.opts.element,function(F){C.opts.element.val(!F?"":C.id(F));C.updateSelection(F);C.setPlaceholder()})}},clearSearch:function(){this.search.val("")},data:function(D){var C;if(arguments.length===0){C=this.selection.data("select2-data");if(C==l){C=null}return C}else{if(!D||D===""){this.clear()}else{this.opts.element.val(!D?"":this.id(D));this.updateSelection(D)}}}});B=w(e,{createContainer:function(){var C=j("<div></div>",{"class":"select2-container select2-container-multi"}).html([" <ul class='select2-choices'>"," <li class='select2-search-field'>"," <input type='text' autocomplete='off' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi' style='display:none;'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return C},prepareOpts:function(){var C=this.parent.prepareOpts.apply(this,arguments);if(C.element.get(0).tagName.toLowerCase()==="select"){C.initSelection=function(D,F){var E=[];D.find(":selected").each2(function(G,H){E.push({id:H.attr("value"),text:H.text()})});if(j.isFunction(F)){F(E)}}}return C},initContainer:function(){var C=".select2-choices",D;this.searchContainer=this.container.find(".select2-search-field");this.selection=D=this.container.find(C);this.search.bind("keydown",this.bind(function(F){if(!this.enabled){return}if(F.which===c.BACKSPACE&&this.search.val()===""){this.close();var G,E=D.find(".select2-search-choice-focus");if(E.length>0){this.unselect(E.first());this.search.width(10);d(F);return}G=D.find(".select2-search-choice");if(G.length>0){G.last().addClass("select2-search-choice-focus")}}else{D.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")}if(this.opened()){switch(F.which){case c.UP:case c.DOWN:this.moveHighlight((F.which===c.UP)?-1:1);d(F);return;case c.ENTER:case c.TAB:this.selectHighlighted();d(F);return;case c.ESC:this.cancel(F);d(F);return}}if(F.which===c.TAB||c.isControl(F)||c.isFunctionKey(F)||F.which===c.BACKSPACE||F.which===c.ESC){return}if(this.opts.openOnEnter===false&&F.which===c.ENTER){return}this.open();if(F.which===c.PAGE_UP||F.which===c.PAGE_DOWN){d(F)}}));this.search.bind("keyup",this.bind(this.resizeSearch));this.search.bind("blur",this.bind(function(E){this.container.removeClass("select2-container-active");this.search.removeClass("select2-focused");this.clearSearch();E.stopImmediatePropagation()}));this.container.delegate(C,"mousedown",this.bind(function(E){if(!this.enabled){return}if(j(E.target).closest(".select2-search-choice").length>0){return}this.clearPlaceholder();this.open();this.focusSearch();E.preventDefault()}));this.container.delegate(C,"focus",this.bind(function(){if(!this.enabled){return}this.container.addClass("select2-container-active");this.dropdown.addClass("select2-drop-active");this.clearPlaceholder()}));this.clearSearch()},enable:function(){if(this.enabled){return}this.parent.enable.apply(this,arguments);this.search.removeAttr("disabled")},disable:function(){if(!this.enabled){return}this.parent.disable.apply(this,arguments);this.search.attr("disabled",true)},initSelection:function(){var D;if(this.opts.element.val()===""){this.updateSelection([]);this.close();this.clearSearch()}if(this.select||this.opts.element.val()!==""){var C=this;this.opts.initSelection.call(null,this.opts.element,function(E){if(E!==l&&E!==null){C.updateSelection(E);C.close();C.clearSearch()}})}},clearSearch:function(){var C=this.getPlaceholder();if(C!==l&&this.getVal().length===0&&this.search.hasClass("select2-focused")===false){this.search.val(C).addClass("select2-default");this.resizeSearch()}else{this.search.val(" ").width(10)}},clearPlaceholder:function(){if(this.search.hasClass("select2-default")){this.search.val("").removeClass("select2-default")}else{if(this.search.val()===" "){this.search.val("")}}},opening:function(){this.parent.opening.apply(this,arguments);this.clearPlaceholder();this.resizeSearch();this.focusSearch()},close:function(){if(!this.opened()){return}this.parent.close.apply(this,arguments)},focus:function(){this.close();this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(F){var E=[],D=[],C=this;j(F).each(function(){if(b(C.id(this),E)<0){E.push(C.id(this));D.push(this)}});F=D;this.selection.find(".select2-search-choice").remove();j(F).each(function(){C.addSelectedChoice(this)});C.postprocessResults()},tokenize:function(){var C=this.search.val();C=this.opts.tokenizer(C,this.data(),this.bind(this.onSelect),this.opts);if(C!=null&&C!=l){this.search.val(C);if(C.length>0){this.open()}}},onSelect:function(C){this.addSelectedChoice(C);if(this.select){this.postprocessResults()}if(this.opts.closeOnSelect){this.close();this.search.width(10)}else{if(this.countSelectableResults()>0){this.search.width(10);this.resizeSearch();this.positionDropdown()}else{this.close()}}this.triggerChange({added:C});this.focusSearch()},cancel:function(){this.close();this.focusSearch()},addSelectedChoice:function(E){var C=j("<li class='select2-search-choice'><div></div><a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),G=this.id(E),F=this.getVal(),D;D=this.opts.formatSelection(E,C);C.find("div").replaceWith("<div>"+this.opts.escapeMarkup(D)+"</div>");C.find(".select2-search-choice-close").bind("mousedown",d).bind("click dblclick",this.bind(function(H){if(!this.enabled){return}j(H.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(j(H.target));this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");this.close();this.focusSearch()})).dequeue();d(H)})).bind("focus",this.bind(function(){if(!this.enabled){return}this.container.addClass("select2-container-active");this.dropdown.addClass("select2-drop-active")}));C.data("select2-data",E);C.insertBefore(this.searchContainer);F.push(G);this.setVal(F)},unselect:function(D){var F=this.getVal(),E,C;D=D.closest(".select2-search-choice");if(D.length===0){throw"Invalid argument: "+D+". Must be .select2-search-choice"}E=D.data("select2-data");C=b(this.id(E),F);if(C>=0){F.splice(C,1);this.setVal(F);if(this.select){this.postprocessResults()}}D.remove();this.triggerChange({removed:E})},postprocessResults:function(){var E=this.getVal(),F=this.results.find(".select2-result-selectable"),D=this.results.find(".select2-result-with-children"),C=this;F.each2(function(H,G){var I=C.id(G.data("select2-data"));if(b(I,E)>=0){G.addClass("select2-disabled").removeClass("select2-result-selectable")}else{G.removeClass("select2-disabled").addClass("select2-result-selectable")}});D.each2(function(G,H){if(H.find(".select2-result-selectable").length==0){H.addClass("select2-disabled")}else{H.removeClass("select2-disabled")}});F.each2(function(H,G){if(!G.hasClass("select2-disabled")&&G.hasClass("select2-result-selectable")){C.highlight(0);return false}})},resizeSearch:function(){var H,F,E,C,D,G=n(this.search);H=x(this.search)+10;F=this.search.offset().left;E=this.selection.width();C=this.selection.offset().left;D=E-(F-C)-G;if(D<H){D=E-G}if(D<40){D=E-G}this.search.width(D)},getVal:function(){var C;if(this.select){C=this.select.val();return C===null?[]:C}else{C=this.opts.element.val();return m(C,this.opts.separator)}},setVal:function(D){var C;if(this.select){this.select.val(D)}else{C=[];j(D).each(function(){if(b(this,C)<0){C.push(this)}});this.opts.element.val(C.length===0?"":C.join(this.opts.separator))}},val:function(){var E,D=[],C=this;if(arguments.length===0){return this.getVal()}E=arguments[0];if(!E){this.opts.element.val("");this.updateSelection([]);this.clearSearch();return}this.setVal(E);if(this.select){this.select.find(":selected").each(function(){D.push({id:j(this).attr("value"),text:j(this).text()})});this.updateSelection(D)}else{if(this.opts.initSelection===l){throw new Error("val() cannot be called if initSelection() is not defined")}this.opts.initSelection(this.opts.element,function(G){var F=j(G).map(C.id);C.setVal(F);C.updateSelection(G);C.clearSearch()})}this.clearSearch()},onSortStart:function(){if(this.select){throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.")}this.search.width(0);this.searchContainer.hide()},onSortEnd:function(){var D=[],C=this;this.searchContainer.show();this.searchContainer.appendTo(this.searchContainer.parent());this.resizeSearch();this.selection.find(".select2-search-choice").each(function(){D.push(C.opts.id(j(this).data("select2-data")))});this.setVal(D);this.triggerChange()},data:function(D){var C=this,E;if(arguments.length===0){return this.selection.find(".select2-search-choice").map(function(){return j(this).data("select2-data")}).get()}else{if(!D){D=[]}E=j.map(D,function(F){return C.opts.id(F)});this.setVal(E);this.updateSelection(D);this.clearSearch()}}});j.fn.select2=function(){var F=Array.prototype.slice.call(arguments,0),G,E,H,D,C=["val","destroy","opened","open","close","focus","isFocused","container","onSortStart","onSortEnd","enable","disable","positionDropdown","data"];this.each(function(){if(F.length===0||typeof(F[0])==="object"){G=F.length===0?{}:j.extend({},F[0]);G.element=j(this);if(G.element.get(0).tagName.toLowerCase()==="select"){D=G.element.attr("multiple")}else{D=G.multiple||false;if("tags" in G){G.multiple=D=true}}E=D?new B():new v();E.init(G)}else{if(typeof(F[0])==="string"){if(b(F[0],C)<0){throw"Unknown method: "+F[0]}H=l;E=j(this).data("select2");if(E===l){return}if(F[0]==="container"){H=E.container}else{H=E[F[0]].apply(E,F.slice(1))}if(H!==l){return false}}else{throw"Invalid arguments to select2 plugin: "+F}}});return(H===l)?this:H};j.fn.select2.defaults={width:"copy",closeOnSelect:true,openOnEnter:true,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(C,D,F){var E=[];i(C.text,F.term,E);return E.join("")},formatSelection:function(D,C){return D?D.text:l},formatResultCssClass:function(C){return l},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(C,D){return"Please enter "+(D-C.length)+" more characters"},formatSelectionTooBig:function(C){return"You can only select "+C+" item"+(C==1?"":"s")},formatLoadMore:function(C){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumSelectionSize:0,id:function(C){return C.id},matcher:function(C,D){return D.toUpperCase().indexOf(C.toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:y,escapeMarkup:function(C){if(C&&typeof(C)==="string"){return C.replace(/&/g,"&")}return C},blurOnChange:false};window.Select2={query:{ajax:p,local:r,tags:o},util:{debounce:f,markMatch:i},"class":{"abstract":e,single:v,multi:B}}}(jQuery));
\ 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 commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/b7e8d3695852/
changeset: b7e8d3695852
user: james_taylor
date: 2013-02-04 05:12:58
summary: templates: Move external_services templates into templates/webapps/galaxy
affected #: 6 files
diff -r 35e476a0c0c4a453396010629030c77575fbec95 -r b7e8d36958522a031a937dc50034b3a57fefe3ed templates/external_services/generic_jquery_grid.mako
--- a/templates/external_services/generic_jquery_grid.mako
+++ /dev/null
@@ -1,59 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="json_common.mako" import="display_item" />
-
-<%def name="title()">${param_dict['service_instance'].name}: ${action.label}</%def>
-
-<%def name="display_json_grid_result( headers, rows )">
- %for row in rows:
- %for name in headers:
- <div class="form-row">
- <label>${name}</label>
- ${display_item( row.get( name ) )}
- <div style="clear: both"></div>
- </div>
- %endfor
- %endfor
-</%def>
-
-<%
- #HACK!!!! need to use better method of displaying jqGrid here, needs to allow paging as optionally available.
- if 'Rows' in result: #paged
- records = result['Records']
- total = result['Total']
- rows = result['Rows']
- page = result['Page']
- else:
- rows = result
- records = None
- total = None
- page = None
- headers = rows[0].keys()
-%>
-
-<div class="toolForm">
- <div class="toolFormTitle">${action.label} of ${param_dict['service_instance'].name} (${param_dict['service'].name}) on ${param_dict['item'].name}</div>
- <div class="toolFormBody">
- %if records:
- <div class="form-row">
- <label>Records</label>
- ${records}
- <div style="clear: both"></div>
- </div>
- %endif
- %if total:
- <div class="form-row">
- <label>Total</label>
- ${total}
- <div style="clear: both"></div>
- </div>
- %endif
- %if page:
- <div class="form-row">
- <label>Page</label>
- ${page}
- <div style="clear: both"></div>
- </div>
- %endif
- ${display_json_grid_result( headers, rows )}
- </div>
-</div>
diff -r 35e476a0c0c4a453396010629030c77575fbec95 -r b7e8d36958522a031a937dc50034b3a57fefe3ed templates/external_services/generic_json.mako
--- a/templates/external_services/generic_json.mako
+++ /dev/null
@@ -1,11 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="json_common.mako" import="display_item" />
-
-<%def name="title()">${action.label} of ${param_dict['service_instance'].name} (${param_dict['service'].name}) on ${param_dict['item'].name}</%def>
-
-<div class="toolForm">
- <div class="toolFormTitle">${action.label} of ${param_dict['service_instance'].name} (${param_dict['service'].name}) on ${param_dict['item'].name}</i></div>
- <div class="toolFormBody">
- ${display_item( result )}
- </div>
-</div>
diff -r 35e476a0c0c4a453396010629030c77575fbec95 -r b7e8d36958522a031a937dc50034b3a57fefe3ed templates/external_services/json_common.mako
--- a/templates/external_services/json_common.mako
+++ /dev/null
@@ -1,28 +0,0 @@
-
-<%def name="display_dict( result_dict )">
- %for key, value in result_dict.items():
- <div class="form-row">
- <label>${key}</label>
- ${display_item( value )}
- <div style="clear: both"></div>
- </div>
- %endfor
-</%def>
-
-<%def name="display_list( items )">
- <ul>
- %for item in items:
- <li>${display_item( item ) }</li>
- %endfor
- </ul>
-</%def>
-
-<%def name="display_item( item )">
- %if isinstance( item, ( list, tuple ) ):
- ${display_list( item )}
- %elif isinstance( item, dict ):
- ${display_dict( item )}
- %else:
- ${item}
- %endif
-</%def>
diff -r 35e476a0c0c4a453396010629030c77575fbec95 -r b7e8d36958522a031a937dc50034b3a57fefe3ed templates/webapps/galaxy/external_services/generic_jquery_grid.mako
--- /dev/null
+++ b/templates/webapps/galaxy/external_services/generic_jquery_grid.mako
@@ -0,0 +1,59 @@
+<%inherit file="/base.mako"/>
+<%namespace file="json_common.mako" import="display_item" />
+
+<%def name="title()">${param_dict['service_instance'].name}: ${action.label}</%def>
+
+<%def name="display_json_grid_result( headers, rows )">
+ %for row in rows:
+ %for name in headers:
+ <div class="form-row">
+ <label>${name}</label>
+ ${display_item( row.get( name ) )}
+ <div style="clear: both"></div>
+ </div>
+ %endfor
+ %endfor
+</%def>
+
+<%
+ #HACK!!!! need to use better method of displaying jqGrid here, needs to allow paging as optionally available.
+ if 'Rows' in result: #paged
+ records = result['Records']
+ total = result['Total']
+ rows = result['Rows']
+ page = result['Page']
+ else:
+ rows = result
+ records = None
+ total = None
+ page = None
+ headers = rows[0].keys()
+%>
+
+<div class="toolForm">
+ <div class="toolFormTitle">${action.label} of ${param_dict['service_instance'].name} (${param_dict['service'].name}) on ${param_dict['item'].name}</div>
+ <div class="toolFormBody">
+ %if records:
+ <div class="form-row">
+ <label>Records</label>
+ ${records}
+ <div style="clear: both"></div>
+ </div>
+ %endif
+ %if total:
+ <div class="form-row">
+ <label>Total</label>
+ ${total}
+ <div style="clear: both"></div>
+ </div>
+ %endif
+ %if page:
+ <div class="form-row">
+ <label>Page</label>
+ ${page}
+ <div style="clear: both"></div>
+ </div>
+ %endif
+ ${display_json_grid_result( headers, rows )}
+ </div>
+</div>
diff -r 35e476a0c0c4a453396010629030c77575fbec95 -r b7e8d36958522a031a937dc50034b3a57fefe3ed templates/webapps/galaxy/external_services/generic_json.mako
--- /dev/null
+++ b/templates/webapps/galaxy/external_services/generic_json.mako
@@ -0,0 +1,11 @@
+<%inherit file="/base.mako"/>
+<%namespace file="json_common.mako" import="display_item" />
+
+<%def name="title()">${action.label} of ${param_dict['service_instance'].name} (${param_dict['service'].name}) on ${param_dict['item'].name}</%def>
+
+<div class="toolForm">
+ <div class="toolFormTitle">${action.label} of ${param_dict['service_instance'].name} (${param_dict['service'].name}) on ${param_dict['item'].name}</i></div>
+ <div class="toolFormBody">
+ ${display_item( result )}
+ </div>
+</div>
diff -r 35e476a0c0c4a453396010629030c77575fbec95 -r b7e8d36958522a031a937dc50034b3a57fefe3ed templates/webapps/galaxy/external_services/json_common.mako
--- /dev/null
+++ b/templates/webapps/galaxy/external_services/json_common.mako
@@ -0,0 +1,28 @@
+
+<%def name="display_dict( result_dict )">
+ %for key, value in result_dict.items():
+ <div class="form-row">
+ <label>${key}</label>
+ ${display_item( value )}
+ <div style="clear: both"></div>
+ </div>
+ %endfor
+</%def>
+
+<%def name="display_list( items )">
+ <ul>
+ %for item in items:
+ <li>${display_item( item ) }</li>
+ %endfor
+ </ul>
+</%def>
+
+<%def name="display_item( item )">
+ %if isinstance( item, ( list, tuple ) ):
+ ${display_list( item )}
+ %elif isinstance( item, dict ):
+ ${display_dict( item )}
+ %else:
+ ${item}
+ %endif
+</%def>
https://bitbucket.org/galaxy/galaxy-central/commits/17c40da527fe/
changeset: 17c40da527fe
user: james_taylor
date: 2013-02-04 05:21:17
summary: genetrack: Purge all genetrack support (since it no longer exists), other than leaving filetype for backward compatibility
affected #: 13 files
diff -r b7e8d36958522a031a937dc50034b3a57fefe3ed -r 17c40da527fe8fee481ead85bdf8069776fc8f44 datatypes_conf.xml.sample
--- a/datatypes_conf.xml.sample
+++ b/datatypes_conf.xml.sample
@@ -26,7 +26,6 @@
<converter file="bed_to_summary_tree_converter.xml" target_datatype="summary_tree"/><converter file="bed_to_fli_converter.xml" target_datatype="fli"/><!-- <display file="ucsc/interval_as_bed.xml" /> -->
- <display file="genetrack.xml" /><display file="igb/bed.xml" /></datatype><datatype extension="bedgraph" type="galaxy.datatypes.interval:BedGraph" display_in_upload="true">
@@ -34,7 +33,6 @@
</datatype><datatype extension="bedstrict" type="galaxy.datatypes.interval:BedStrict" /><datatype extension="bed6" type="galaxy.datatypes.interval:Bed6">
- <converter file="bed_to_genetrack_converter.xml" target_datatype="genetrack"/></datatype><datatype extension="bed12" type="galaxy.datatypes.interval:Bed12" /><datatype extension="len" type="galaxy.datatypes.chrominfo:ChromInfo" display_in_upload="true">
diff -r b7e8d36958522a031a937dc50034b3a57fefe3ed -r 17c40da527fe8fee481ead85bdf8069776fc8f44 display_applications/genetrack.xml
--- a/display_applications/genetrack.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<display id="genetrack_interval" version="1.0.0" name="view in">
- <link id="genetrack" name="GeneTrack">
- <url target_frame="galaxy_main">http://genetrack.g2.bx.psu.edu/galaxy?filename=${encoded_filename.qp}&h…</url>
- <param type="data" name="bed_file" viewable="False" format="bed6,genetrack"/><!-- for now, we'll explicitly take care of the multi-step conversion; walk genetrack datatype down as a conversion of genetrack to genetrack doesn't exist and would likely be pointless -->
- <param type="data" dataset="bed_file" name="genetrack_file" format="genetrack" viewable="False" />
- <param type="template" name="galaxy_url" strip="True" >
- ${BASE_URL}/tool_runner?tool_id=predict2genetrack
- </param>
- <param type="template" name="hash_key" strip="True" >
- #from galaxy.util.hash_util import hmac_new
- ${hmac_new( $APP.config.tool_secret, $genetrack_file.file_name )}
- </param>
- <param type="template" name="encoded_filename" strip="True" >
- #import binascii
- ${binascii.hexlify( $genetrack_file.file_name )}
- </param>
- </link>
-</display>
diff -r b7e8d36958522a031a937dc50034b3a57fefe3ed -r 17c40da527fe8fee481ead85bdf8069776fc8f44 lib/galaxy/config.py
--- a/lib/galaxy/config.py
+++ b/lib/galaxy/config.py
@@ -143,7 +143,6 @@
self.sanitize_all_html = string_as_bool( kwargs.get( 'sanitize_all_html', True ) )
self.ucsc_display_sites = kwargs.get( 'ucsc_display_sites', "main,test,archaea,ucla" ).lower().split(",")
self.gbrowse_display_sites = kwargs.get( 'gbrowse_display_sites', "modencode,sgd_yeast,tair,wormbase,wormbase_ws120,wormbase_ws140,wormbase_ws170,wormbase_ws180,wormbase_ws190,wormbase_ws200,wormbase_ws204,wormbase_ws210,wormbase_ws220,wormbase_ws225" ).lower().split(",")
- self.genetrack_display_sites = kwargs.get( 'genetrack_display_sites', "main,test" ).lower().split(",")
self.brand = kwargs.get( 'brand', None )
self.support_url = kwargs.get( 'support_url', 'http://wiki.g2.bx.psu.edu/Support' )
self.wiki_url = kwargs.get( 'wiki_url', 'http://g2.trac.bx.psu.edu/' )
diff -r b7e8d36958522a031a937dc50034b3a57fefe3ed -r 17c40da527fe8fee481ead85bdf8069776fc8f44 lib/galaxy/datatypes/converters/bed_to_genetrack_converter.py
--- a/lib/galaxy/datatypes/converters/bed_to_genetrack_converter.py
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env python
-
-#FIXME: THIS IS 1:1 COPY OF THE SAME FUNCTIONED TOOL - ALLOW REGULAR TOOLS TO MASCARADE AS CONVERTERS
-
-"""
-Wraps genetrack.scripts.tabs2genetrack so the tool can be executed from Galaxy.
-
-usage: %prog input output shift
-"""
-
-import sys, shutil, os
-from galaxy import eggs
-import pkg_resources
-pkg_resources.require( "GeneTrack" )
-
-from genetrack.scripts import tabs2genetrack
-from genetrack import logger
-
-if __name__ == "__main__":
- import os
- os.environ[ 'LC_ALL' ] = 'C'
- #os.system( 'export' )
-
- parser = tabs2genetrack.option_parser()
-
- options, args = parser.parse_args()
-
- # uppercase the format
- options.format = options.format.upper()
-
- if options.format not in ('BED', 'GFF'):
- sys.stdout = sys.stderr
- parser.print_help()
- sys.exit(-1)
-
- logger.disable(options.verbosity)
-
- # missing file names
- if not (options.inpname and options.outname and options.format):
- parser.print_help()
- sys.exit(-1)
- else:
- tabs2genetrack.transform(inpname=options.inpname, outname=options.outname,\
- format=options.format, shift=options.shift, index=options.index, options=options)
diff -r b7e8d36958522a031a937dc50034b3a57fefe3ed -r 17c40da527fe8fee481ead85bdf8069776fc8f44 lib/galaxy/datatypes/converters/bed_to_genetrack_converter.xml
--- a/lib/galaxy/datatypes/converters/bed_to_genetrack_converter.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<tool id="CONVERTER_bed_to_genetrack_0" name="Convert BED to GeneTrack Index" version="1.0.1">
-<!-- FIXME: THIS IS ALMOST 1:1 COPY OF THE SAME FUNCTIONED TOOL - ALLOW REGULAR TOOLS TO MASCARADE AS CONVERTERS
-Using a shift of 0, but tool allows specifying...
--->
-<!-- <description>__NOT_USED_CURRENTLY_FOR_CONVERTERS__</description> -->
- <command interpreter="python">bed_to_genetrack_converter.py -i $input1 -o $output1 -s 0 -v 0 -f BED -x</command>
- <inputs>
- <page>
- <param format="bed6" name="input1" type="data" label="Choose BED file"/>
- </page>
- </inputs>
- <outputs>
- <data format="genetrack" name="output1"/>
- </outputs>
- <help>
- </help>
-</tool>
diff -r b7e8d36958522a031a937dc50034b3a57fefe3ed -r 17c40da527fe8fee481ead85bdf8069776fc8f44 lib/galaxy/datatypes/tracks.py
--- a/lib/galaxy/datatypes/tracks.py
+++ b/lib/galaxy/datatypes/tracks.py
@@ -10,27 +10,30 @@
log = logging.getLogger(__name__)
+# GeneTrack is no longer supported but leaving the datatype since
+# files of this type may still exist
+
class GeneTrack( binary.Binary ):
file_ext = "genetrack"
def __init__(self, **kwargs):
super( GeneTrack, self ).__init__( **kwargs )
- self.add_display_app( 'genetrack', 'View in', '', 'genetrack_link' )
- def get_display_links( self, dataset, type, app, base_url, target_frame='galaxy_main', **kwd ): #Force target_frame to be 'galaxy_main'
- return binary.Binary.get_display_links( self, dataset, type, app, base_url, target_frame=target_frame, **kwd )
- def genetrack_link( self, hda, type, app, base_url ):
- ret_val = []
- if hda.dataset.has_data():
- # Get the disk file name and data id
- file_name = hda.dataset.get_file_name()
- data_id = quote_plus( str( hda.id ) )
- galaxy_url = quote_plus( "%s%s" % ( base_url, url_for( controller = 'tool_runner', tool_id='predict2genetrack' ) ) )
- # Make it secure
- hashkey = quote_plus( hmac_new( app.config.tool_secret, file_name ) )
- encoded = quote_plus( binascii.hexlify( file_name ) )
- for name, url in util.get_genetrack_sites():
- if name.lower() in app.config.genetrack_display_sites:
- # send both parameters filename and hashkey
- link = "%s?filename=%s&hashkey=%s&input=%s&GALAXY_URL=%s" % ( url, encoded, hashkey, data_id, galaxy_url )
- ret_val.append( ( name, link ) )
- return ret_val
+ # self.add_display_app( 'genetrack', 'View in', '', 'genetrack_link' )
+ # def get_display_links( self, dataset, type, app, base_url, target_frame='galaxy_main', **kwd ): #Force target_frame to be 'galaxy_main'
+ # return binary.Binary.get_display_links( self, dataset, type, app, base_url, target_frame=target_frame, **kwd )
+ # def genetrack_link( self, hda, type, app, base_url ):
+ # ret_val = []
+ # if hda.dataset.has_data():
+ # # Get the disk file name and data id
+ # file_name = hda.dataset.get_file_name()
+ # data_id = quote_plus( str( hda.id ) )
+ # galaxy_url = quote_plus( "%s%s" % ( base_url, url_for( controller = 'tool_runner', tool_id='predict2genetrack' ) ) )
+ # # Make it secure
+ # hashkey = quote_plus( hmac_new( app.config.tool_secret, file_name ) )
+ # encoded = quote_plus( binascii.hexlify( file_name ) )
+ # for name, url in util.get_genetrack_sites():
+ # if name.lower() in app.config.genetrack_display_sites:
+ # # send both parameters filename and hashkey
+ # link = "%s?filename=%s&hashkey=%s&input=%s&GALAXY_URL=%s" % ( url, encoded, hashkey, data_id, galaxy_url )
+ # ret_val.append( ( name, link ) )
+ # return ret_val
diff -r b7e8d36958522a031a937dc50034b3a57fefe3ed -r 17c40da527fe8fee481ead85bdf8069776fc8f44 lib/galaxy/eggs/__init__.py
--- a/lib/galaxy/eggs/__init__.py
+++ b/lib/galaxy/eggs/__init__.py
@@ -349,7 +349,7 @@
raise EggNotFetchable( missing )
class GalaxyConfig( object ):
- always_conditional = ( 'GeneTrack', 'pysam', 'ctypes', 'python_daemon' )
+ always_conditional = ( 'pysam', 'ctypes', 'python_daemon' )
def __init__( self, config_file ):
if config_file is None:
self.config = None
@@ -387,7 +387,6 @@
"guppy": lambda: self.config.get( "app:main", "use_memdump" ),
"python_openid": lambda: self.config.get( "app:main", "enable_openid" ),
"python_daemon": lambda: sys.version_info[:2] >= ( 2, 5 ),
- "GeneTrack": lambda: sys.version_info[:2] >= ( 2, 5 ),
"ctypes": lambda: ( "drmaa" in self.config.get( "app:main", "start_job_runners" ).split(",") ) and sys.version_info[:2] == ( 2, 4 ),
"pysam": lambda: check_pysam()
}.get( egg_name, lambda: True )()
diff -r b7e8d36958522a031a937dc50034b3a57fefe3ed -r 17c40da527fe8fee481ead85bdf8069776fc8f44 lib/galaxy/util/__init__.py
--- a/lib/galaxy/util/__init__.py
+++ b/lib/galaxy/util/__init__.py
@@ -432,11 +432,6 @@
if build in site['builds']:
sites.append((site['name'],site['url']))
return sites
-def get_genetrack_sites():
- sites = []
- for site in genetrack_sites:
- sites.append( ( site['name'], site['url'] ) )
- return sites
def read_dbnames(filename):
""" Read build names from file """
@@ -773,7 +768,6 @@
ncbi_names = read_ncbi( os.path.join( galaxy_root_path, "tool-data", "shared", "ncbi", "builds.txt" ) )
ucsc_build_sites = read_build_sites( os.path.join( galaxy_root_path, "tool-data", "shared", "ucsc", "ucsc_build_sites.txt" ) )
gbrowse_build_sites = read_build_sites( os.path.join( galaxy_root_path, "tool-data", "shared", "gbrowse", "gbrowse_build_sites.txt" ) )
-genetrack_sites = read_build_sites( os.path.join( galaxy_root_path, "tool-data", "shared", "genetrack", "genetrack_sites.txt" ), check_builds=False )
dlnames = dict(ucsc=ucsc_names, ensembl=ensembl_names, ncbi=ncbi_names)
def galaxy_directory():
diff -r b7e8d36958522a031a937dc50034b3a57fefe3ed -r 17c40da527fe8fee481ead85bdf8069776fc8f44 templates/genetrack/base.html
--- a/templates/genetrack/base.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>${self.title()}</title>
-<link rel="stylesheet" href="${h.url_for('/static/genetrack/genetrack.css')}" type="text/css" media="screen">
-<script type="text/javascript" src="${h.url_for('/static/genetrack/genetrack.js')}">var dummy1=0;</script>
-</head>
-
-<%def name="title()">
- Title
-</%def>
-
-<%def name="footer()">
- <div align="center" id="footer">
- <a href="/">Home</a> | <a href="${h.url_for(controller='genetrack',action='search',dataset_id=dataset_id)}">Search</a>
- </div>
- <div align="center" id="tag">
- Powered by <a href="http://genetrack.googlecode.com">GeneTrack</a> |
- <a href="http://atlas.bx.psu.edu/">Penn State Genome Cartography (2008)</a>
- </div>
-</%def>
-
-<body>
- ${self.body()}
- ${self.footer()}
-</body>
-
-</html>
diff -r b7e8d36958522a031a937dc50034b3a57fefe3ed -r 17c40da527fe8fee481ead85bdf8069776fc8f44 templates/genetrack/index.html
--- a/templates/genetrack/index.html
+++ /dev/null
@@ -1,75 +0,0 @@
-## index.html
-<%inherit file="base.html"/>
-<%def name="title()">
- Index
-</%def>
-
-<h1 align="center">${conf.TITLE}</h1>
-
-<form action="" method="get">
-
-<table align="center" cellpadding="2" cellspacing="1" width="100%">
-
-
- % if form.errors():
- <tr class="error"><td align="center">
- % for ekey, evalue in form.errors().items():
- <b>ERROR:</b> ${ekey}: ${evalue}<br>
- % endfor
- </td></tr>
- % endif
-
- <tr class="grey">
- <td colspan="4" align="center">
- <a href="javascript:toggle('options')">More</a><img src="/static/images/thumbtack_icon.png" align="absmiddle" border="0">
-
- Chromosome: ${form.chrom.tag()}
- Feature: ${form.feature.tag()}
- Width: ${form.zoom.tag()}
- Plot: ${form.plot.tag()}
- <input type="submit" name="submit" value="Display!">
- <div id="options" style="display:none" class="selected">
- <table cellpadding="3">
- <tr>
- <td>
- <!-- Nucleosome:${form.nuc_track.tag()}
- ORF:${form.orf_track.tag()}
- -->
- Fit threshold: ${form.min_fit.tag()}
- Image width: ${form.img_size.tag()}
- </td>
- </tr>
- </table>
- </div>
-
- </td>
- </tr>
-
- <tr>
- <td align="center">
- <input type="submit" name="move_left" value="<< Move Left">
-
- <input type="submit" name="zoom_out" value="Shrink -">
-
- <input type="submit" name="zoom_in" value="Magnify +">
-
- <input type="submit" name="move_right" value="Move Right >>">
- </td>
- </tr>
-
- <tr>
- <td align="center">
- <img src="${h.url_for('/static/genetrack/plots/' + param.fname)}" align="center" border="0">
- </td>
- </tr>
-
- <tr>
- <td align="center">
- <!-- <a href='/search'>Search</a> -->
- </td>
- </tr>
-
-</table>
-
-<input type="hidden" id="dataset_id" name="dataset_id" value="${dataset_id}" />
-</form>
diff -r b7e8d36958522a031a937dc50034b3a57fefe3ed -r 17c40da527fe8fee481ead85bdf8069776fc8f44 templates/genetrack/invalid.html
--- a/templates/genetrack/invalid.html
+++ /dev/null
@@ -1,3 +0,0 @@
-## index.html
-<%inherit file="base.html"/>
-<h1>This dataset is not a valid GeneTrack dataset.</h1>
diff -r b7e8d36958522a031a937dc50034b3a57fefe3ed -r 17c40da527fe8fee481ead85bdf8069776fc8f44 templates/genetrack/search.html
--- a/templates/genetrack/search.html
+++ /dev/null
@@ -1,55 +0,0 @@
-## search.html
-<%!
-from itertools import cycle
-colors = cycle( [ 'even', 'odd' ] )
-%>
-
-<%inherit file="base.html"/>
-<%def name="title()">
- Search
-</%def>
-
-<h1 align="center">Search</h1>
-
-<div align="center">
- <form action="search" method="get">
- Search terms <input type="text" name="word" value="${param.word}">
- <input type="hidden" name="dataset_id" id="dataset_id" value="${dataset_id}" />
- <input type="submit" name="submit" value="Search!">
- </form>
-</div>
-
-% if param.word:
-
- % if len(query)>0:
- <h4 align="center">Showing the best ${len(query)} matches</h4>
-
- <table align="center" class="data_table" cellpadding="6" cellspacing="0">
- <tr align="center">
- <th width="25%">Name</td>
- <th width="25%">Chromosome</td>
- <th width="25%">Start:End</td>
- <th width="25%">Type</td>
- </tr>
- % for color, row in zip(colors, query):
- ${makerow(color, row)}
- % endfor
- </table>
-
- % else:
- <h4 align="center">No results found</h4>
- % endif
-
-%endif
-
-<br>
-<%def name="makerow(color, row)">
- <tr class="${color}" align="center">
- <td><a href="${h.url_for(controller='genetrack', action='index', chrom=row.chrom, feature=row.start, dataset_id=dataset_id)}">${row.name}</a></td>
- <td>${row.chrom}</td>
- <td>${row.start}:${row.end}</td>
- <td>${row.label.name}</td>
- </tr>
-</%def>
-
-</form>
diff -r b7e8d36958522a031a937dc50034b3a57fefe3ed -r 17c40da527fe8fee481ead85bdf8069776fc8f44 tool-data/shared/genetrack/genetrack_sites.txt
--- a/tool-data/shared/genetrack/genetrack_sites.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-# GeneTrack sites
-#
-# The key(s) should be added to universe_wsgi.ini as the value of
-# genetrack_display_sites
-#
-# key site url
-psu_galaxy http://genetrack.g2.bx.psu.edu/galaxy
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: james_taylor: templates: Move tool_form templates into templates/webapps/galaxy
by Bitbucket 03 Feb '13
by Bitbucket 03 Feb '13
03 Feb '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/35e476a0c0c4/
changeset: 35e476a0c0c4
user: james_taylor
date: 2013-02-04 05:10:37
summary: templates: Move tool_form templates into templates/webapps/galaxy
affected #: 4 files
diff -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 -r 35e476a0c0c4a453396010629030c77575fbec95 templates/tool_executed.mako
--- a/templates/tool_executed.mako
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-
-<head>
-<title>Galaxy</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<link href="${h.url_for('/static/style/base.css')}" rel="stylesheet" type="text/css" />
-<script type="text/javascript">
- var inside_galaxy_frameset = false;
-
- if ( parent.frames && parent.frames.galaxy_history ) {
- parent.frames.galaxy_history.location.href="${h.url_for( controller='root', action='history' )}";
- inside_galaxy_frameset = true;
- }
-
- %if trans.user:
- if (inside_galaxy_frameset)
- {
- //parent.frames.galaxy_tools.update_recently_used();
- }
- %endif
-
- if ( parent.handle_minwidth_hint ) {
- parent.handle_minwidth_hint( -1 );
- }
-
- function main() {
- // If called from outside the galaxy frameset, redirect there
- %if tool.options.refresh:
- if ( ! inside_galaxy_frameset ) {
- setTimeout( "refresh()", 1000 );
- document.getElementById( "refresh_message" ).style.display = "block";
- }
- %endif
- }
-
- function refresh() {
- top.location.href = '${h.url_for( "/" )}';
- }
-
-</script>
-
-</head>
-
-<body onLoad="main()">
-
-<div class="donemessagelarge">
-
-<p>The following job has been successfully added to the queue:</p>
-
-%for data in out_data.values():
- <div style="padding: 10px"><b> ${data.hid}: ${data.name}</b></div>
-%endfor
-
-<p>
-You can check the status of queued jobs and view the resulting
-data by refreshing the <b>History</b> pane. When the job has been run
-the status will change from 'running' to 'finished' if completed
-successfully or 'error' if problems were encountered.
-</p>
-
-%if tool.options.refresh:
-<p id="refresh_message" style="display: none;">You are now being redirected back to <a href="${h.url_for( '/' )}">Galaxy</a></div>
-%endif
-
-</div>
-
-</body>
-
-</html>
diff -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 -r 35e476a0c0c4a453396010629030c77575fbec95 templates/tool_form.mako
--- a/templates/tool_form.mako
+++ /dev/null
@@ -1,357 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-<%namespace file="/base_panels.mako" import="overlay" />
-
-<%def name="stylesheets()">
- ${h.css( "autocomplete_tagging", "base", "panel_layout", "library" )}
- <style type="text/css">
- html, body {
- background-color: #fff;
- }
- </style>
-</%def>
-
-<%def name="javascripts()">
- ${parent.javascripts()}
- ${h.js( "galaxy.panels", "libs/jquery/select2", "libs/jquery/jstorage" )}
- <script type="text/javascript">
- $(function() {
- $(window).bind("refresh_on_change", function() {
- $(':file').each( function() {
- var file = $(this);
- var file_value = file.val();
- if (file_value) {
- // disable file input, since we don't want to upload the file on refresh
- var file_name = $(this).attr("name");
- file.attr( { name: 'replaced_file_input_' + file_name, disabled: true } );
- // create a new hidden field which stores the filename and has the original name of the file input
- var new_file_input = $(document.createElement('input'));
- new_file_input.attr( { "type": "hidden", "value": file_value, "name": file_name } );
- file.after(new_file_input);
- }
- });
- });
-
- // For drilldown parameters: add expand/collapse buttons and collapse initially-collapsed elements
- $( 'div.drilldown-container' ).each( function() {
- $(this).find('span.form-toggle' ).each( function() {
- var show_hide_click_elt = $(this);
- var group_id = show_hide_click_elt.attr('id').substring( 0, show_hide_click_elt.attr('id').lastIndexOf( '-click' ) );
- $('#' + group_id + '-container').each( function() {
- var show_hide_elt = $(this);
- if ( show_hide_click_elt.hasClass( 'toggle-expand' ) ) {
- show_hide_elt.hide();
- }
- show_hide_click_elt.click( function() {
- if ( show_hide_click_elt.hasClass("toggle") ){
- show_hide_click_elt.addClass("toggle-expand");
- show_hide_click_elt.removeClass("toggle");
- show_hide_elt.slideUp( 'fast' );
- }
- else {
- show_hide_click_elt.addClass("toggle");
- show_hide_click_elt.removeClass("toggle-expand");
- show_hide_elt.slideDown( 'fast' );
- }
- });
- });
- });
- });
-
- function checkUncheckAll( name, check ) {
- $("input[name='" + name + "'][type='checkbox']").attr('checked', !!check);
- }
-
- // Inserts the Select All / Unselect All buttons for checkboxes
- $("div.checkUncheckAllPlaceholder").each( function() {
- var check_name = $(this).attr("checkbox_name");
- select_link = $("<a class='action-button'></a>").text("Select All").click(function() {
- checkUncheckAll(check_name, true);
- });
- unselect_link = $("<a class='action-button'></a>").text("Unselect All").click(function() {
- checkUncheckAll(check_name, false);
- });
- $(this).append(select_link).append(" ").append(unselect_link);
- });
-
- $(".add-librarydataset").live("click", function() {
- var link = $(this);
- $.ajax({
- url: "/visualization/list_libraries",
- error: function(xhr, ajaxOptions, thrownError) { alert( "Grid failed" ); console.log(xhr, ajaxOptions, thrownError); },
- success: function(table_html) {
- show_modal(
- "Select Library Dataset",
- table_html, {
- "Cancel": function() {
- hide_modal();
- },
- "Select": function() {
- var names = [];
- var ids = [];
- counter = 1;
- $('input[name=ldda_ids]:checked').each(function() {
- var name = $.trim( $(this).siblings("label").text() );
- var id = $(this).val();
- names.push( counter + ". " + name );
- counter += 1;
- ids.push(id);
- });
- link.html( names.join("<br/>") );
- link.siblings("input[type=hidden]").val( ids.join("||") );
- hide_modal();
- }
- }
- );
- }
- });
- });
- });
-
- %if not add_frame.debug:
- if( window.name != "galaxy_main" ) {
- location.replace( '${h.url_for( controller='root', action='index', tool_id=tool.id )}' );
- }
- %endif
-
- </script>
-
-</%def>
-
-<%def name="do_inputs( inputs, tool_state, errors, prefix, other_values=None )">
- <%
- from galaxy.util.expressions import ExpressionContext
- other_values = ExpressionContext( tool_state, other_values )
- %>
- %for input_index, input in enumerate( inputs.itervalues() ):
- %if not input.visible:
- <% pass %>
- %elif input.type == "repeat":
- <div class="repeat-group">
- <div class="form-title-row"><strong>${input.title_plural}</strong>
- %if input.help:
- <div class="toolParamHelp" style="clear: both;">
- ${input.help}
- </div>
- %endif
- </div>
- <%
- repeat_state = tool_state[input.name]
- num_repeats = len( repeat_state )
- %>
- %for i in range( num_repeats ):
- <div class="repeat-group-item">
- <%
- if input.name in errors:
- rep_errors = errors[input.name][i]
- else:
- rep_errors = dict()
- index = repeat_state[i]['__index__']
- %>
- <div class="form-title-row"><strong>${input.title} ${i + 1}</strong></div>
- ${do_inputs( input.inputs, repeat_state[i], rep_errors, prefix + input.name + "_" + str(index) + "|", other_values )}
- %if input.min < num_repeats:
- <div class="form-row"><input type="submit" class="btn" name="${prefix}${input.name}_${index}_remove" value="Remove ${input.title} ${i+1}"></div>
- %endif
- </div>
- %if rep_errors.has_key( '__index__' ):
- <div><img style="vertical-align: middle;" src="${h.url_for('/static/style/error_small.png')}"> <span style="vertical-align: middle;">${rep_errors['__index__']}</span></div>
- %endif
- %endfor
- %if input.max > num_repeats:
- <div class="form-row"><input type="submit" class="btn" name="${prefix}${input.name}_add" value="Add new ${input.title}"></div>
- %endif
- </div>
- %elif input.type == "conditional":
- <%
- group_state = tool_state[input.name]
- group_errors = errors.get( input.name, {} )
- current_case = group_state['__current_case__']
- group_prefix = prefix + input.name + "|"
- %>
- %if input.value_ref_in_group:
- ${row_for_param( group_prefix, input.test_param, group_state, group_errors, other_values )}
- %endif
- ${do_inputs( input.cases[current_case].inputs, group_state, group_errors, group_prefix, other_values )}
- %elif input.type == "upload_dataset":
- %if input.get_datatype( trans, other_values ).composite_type is None: #have non-composite upload appear as before
- <%
- if input.name in errors:
- rep_errors = errors[input.name][0]
- else:
- rep_errors = dict()
- %>
- ${do_inputs( input.inputs, tool_state[input.name][0], rep_errors, prefix + input.name + "_" + str( 0 ) + "|", other_values )}
- %else:
- <div class="repeat-group">
- <div class="form-title-row"><strong>${input.group_title( other_values )}</strong></div>
- <%
- repeat_state = tool_state[input.name]
- %>
- %for i in range( len( repeat_state ) ):
- <div class="repeat-group-item">
- <%
- if input.name in errors:
- rep_errors = errors[input.name][i]
- else:
- rep_errors = dict()
- index = repeat_state[i]['__index__']
- %>
- <div class="form-title-row"><strong>File Contents for ${input.title_by_index( trans, i, other_values )}</strong></div>
- ${do_inputs( input.inputs, repeat_state[i], rep_errors, prefix + input.name + "_" + str(index) + "|", other_values )}
- ##<div class="form-row"><input type="submit" name="${prefix}${input.name}_${index}_remove" value="Remove ${input.title} ${i+1}"></div>
- </div>
- %endfor
- ##<div class="form-row"><input type="submit" name="${prefix}${input.name}_add" value="Add new ${input.title}"></div>
- </div>
- %endif
- %else:
- ${row_for_param( prefix, input, tool_state, errors, other_values )}
- %endif
- %endfor
-</%def>
-
-<%def name="row_for_param( prefix, param, parent_state, parent_errors, other_values )">
- <%
- if parent_errors.has_key( param.name ):
- cls = "form-row form-row-error"
- else:
- cls = "form-row"
-
- label = param.get_label()
-
- field = param.get_html_field( trans, parent_state[ param.name ], other_values )
- field.refresh_on_change = param.refresh_on_change
-
- # Field may contain characters submitted by user and these characters may be unicode; handle non-ascii characters gracefully.
- field_html = field.get_html( prefix )
- if type( field_html ) is not unicode:
- field_html = unicode( field_html, 'utf-8', 'replace' )
-
- if param.type == "hidden":
- return field_html
- %>
- <div class="${cls}">
- %if label:
- <label for="${param.name}">${label}:</label>
- %endif
- <div class="form-row-input">${field_html}</div>
- %if parent_errors.has_key( param.name ):
- <div class="form-row-error-message">
- <div><img style="vertical-align: middle;" src="${h.url_for('/static/style/error_small.png')}"> <span style="vertical-align: middle;">${parent_errors[param.name]}</span></div>
- </div>
- %endif
-
- %if param.help:
- <div class="toolParamHelp" style="clear: both;">
- ${param.help}
- </div>
- %endif
-
- <div style="clear: both;"></div>
-
- </div>
-</%def>
-
-<% overlay(visible=False) %>
-
-%if add_frame.from_noframe:
- <div class="warningmessage">
- <strong>Welcome to Galaxy</strong>
- <hr/>
- It appears that you found this tool from a link outside of Galaxy.
- If you're not familiar with Galaxy, please consider visiting the
- <a href="${h.url_for( controller='root' )}" target="_top">welcome page</a>.
- To learn more about what Galaxy is and what it can do for you, please visit
- the <a href="${add_frame.wiki_url}" target="_top">Galaxy wiki</a>.
- </div>
- <br/>
-%endif
-
-<%
- # Render an error message if a dynamically generated select list is missing a required
- # index file or entry in the tool_data_table_conf.xml file.
- message = ""
- params_with_missing_data_table_entry = tool.params_with_missing_data_table_entry
- params_with_missing_index_file = tool.params_with_missing_index_file
- if params_with_missing_data_table_entry:
- param = params_with_missing_data_table_entry[0]
- message += "Data table named '%s' is required by tool but not configured. " % param.options.missing_tool_data_table_name
- if tool.params_with_missing_index_file:
- param = params_with_missing_index_file[0]
- message += "Index file named '%s' is required by tool but not available. " % param.options.missing_index_file
-
- # Handle calculating the redirect url for the special case where we have nginx proxy
- # upload and need to do url_for on the redirect portion of the tool action.
- try:
- tool_url = h.url_for(tool.action)
- except AttributeError:
- assert len(tool.action) == 2
- tool_url = tool.action[0] + h.url_for(tool.action[1])
-%>
-
-<%
- # Name of the tool in lower case
- low_tool_name = tool.name.lower()
-%>
-
-%if tool_id_version_message:
- ${render_msg( tool_id_version_message, 'warning' )}
-%endif
-
-<div class="toolForm" id="${tool.id}">
- <form id="tool_form" name="tool_form" action="${tool_url}" enctype="${tool.enctype}" target="${tool.target}" method="${tool.method}">
- %if tool.has_multiple_pages:
- <div class="toolFormTitle">${tool.name} (step ${tool_state.page+1} of ${tool.npages})
- %elif not tool_version_select_field:
- <div class="toolFormTitle">${tool.name} (version ${tool.version})
- %else:
- <div class="toolFormTitle">${tool.name} ${tool_version_select_field.get_html()}
- %endif
- %if trans.app.config.biostar:
- <!-- BioStar links -->
- <a href="${trans.app.config.biostar}/new/post/tagged/${low_tool_name}" target="galaxy_main" class="icon-button general-question tooltip close-side-panels" data-original-title="Ask a tool related question"></a>
- <a href="${trans.app.config.biostar}/show/tag/${low_tool_name}/" target="galaxy_main" class="icon-button tag-question tooltip close-side-panels" data-original-title="See tool related posts" ></a>
- <!-- End of BioStar links -->
- %endif
- </div>
- <div class="toolFormBody">
- <input type="hidden" name="refresh" value="refresh">
- <input type="hidden" name="tool_id" value="${tool.id}">
- <input type="hidden" name="tool_state" value="${util.object_to_string( tool_state.encode( tool, app ) )}">
- %if tool.display_by_page[tool_state.page]:
- ${trans.fill_template_string( tool.display_by_page[tool_state.page], context=tool.get_param_html_map( trans, tool_state.page, tool_state.inputs ) )}
- <input type="submit" class="btn btn-primary" name="runtool_btn" value="Execute">
- %else:
- ${do_inputs( tool.inputs_by_page[ tool_state.page ], tool_state.inputs, errors, "" )}
- <div class="form-row form-actions">
- %if tool_state.page == tool.last_page:
- <input type="submit" class="btn btn-primary" name="runtool_btn" value="Execute">
- %else:
- <input type="submit" class="btn btn-primary" name="runtool_btn" value="Next step">
- %endif
- </div>
- %endif
- </div>
- </form>
-</div>
-%if tool.help:
- <div class="toolHelp">
- <div class="toolHelpBody">
- <%
- if tool.has_multiple_pages:
- tool_help = tool.help_by_page[tool_state.page]
- else:
- tool_help = tool.help
-
- # Help is Mako template, so render using current static path.
- tool_help = tool_help.render( static_path=h.url_for( '/static' ) )
-
- # Convert to unicode to display non-ascii characters.
- if type( tool_help ) is not unicode:
- tool_help = unicode( tool_help, 'utf-8')
- %>
- ${tool_help}
- </div>
- </div>
-%endif
diff -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 -r 35e476a0c0c4a453396010629030c77575fbec95 templates/webapps/galaxy/tool_executed.mako
--- /dev/null
+++ b/templates/webapps/galaxy/tool_executed.mako
@@ -0,0 +1,70 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+
+<head>
+<title>Galaxy</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link href="${h.url_for('/static/style/base.css')}" rel="stylesheet" type="text/css" />
+<script type="text/javascript">
+ var inside_galaxy_frameset = false;
+
+ if ( parent.frames && parent.frames.galaxy_history ) {
+ parent.frames.galaxy_history.location.href="${h.url_for( controller='root', action='history' )}";
+ inside_galaxy_frameset = true;
+ }
+
+ %if trans.user:
+ if (inside_galaxy_frameset)
+ {
+ //parent.frames.galaxy_tools.update_recently_used();
+ }
+ %endif
+
+ if ( parent.handle_minwidth_hint ) {
+ parent.handle_minwidth_hint( -1 );
+ }
+
+ function main() {
+ // If called from outside the galaxy frameset, redirect there
+ %if tool.options.refresh:
+ if ( ! inside_galaxy_frameset ) {
+ setTimeout( "refresh()", 1000 );
+ document.getElementById( "refresh_message" ).style.display = "block";
+ }
+ %endif
+ }
+
+ function refresh() {
+ top.location.href = '${h.url_for( "/" )}';
+ }
+
+</script>
+
+</head>
+
+<body onLoad="main()">
+
+<div class="donemessagelarge">
+
+<p>The following job has been successfully added to the queue:</p>
+
+%for data in out_data.values():
+ <div style="padding: 10px"><b> ${data.hid}: ${data.name}</b></div>
+%endfor
+
+<p>
+You can check the status of queued jobs and view the resulting
+data by refreshing the <b>History</b> pane. When the job has been run
+the status will change from 'running' to 'finished' if completed
+successfully or 'error' if problems were encountered.
+</p>
+
+%if tool.options.refresh:
+<p id="refresh_message" style="display: none;">You are now being redirected back to <a href="${h.url_for( '/' )}">Galaxy</a></div>
+%endif
+
+</div>
+
+</body>
+
+</html>
diff -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 -r 35e476a0c0c4a453396010629030c77575fbec95 templates/webapps/galaxy/tool_form.mako
--- /dev/null
+++ b/templates/webapps/galaxy/tool_form.mako
@@ -0,0 +1,357 @@
+<%inherit file="/base.mako"/>
+<%namespace file="/message.mako" import="render_msg" />
+<%namespace file="/base_panels.mako" import="overlay" />
+
+<%def name="stylesheets()">
+ ${h.css( "autocomplete_tagging", "base", "panel_layout", "library" )}
+ <style type="text/css">
+ html, body {
+ background-color: #fff;
+ }
+ </style>
+</%def>
+
+<%def name="javascripts()">
+ ${parent.javascripts()}
+ ${h.js( "galaxy.panels", "libs/jquery/select2", "libs/jquery/jstorage" )}
+ <script type="text/javascript">
+ $(function() {
+ $(window).bind("refresh_on_change", function() {
+ $(':file').each( function() {
+ var file = $(this);
+ var file_value = file.val();
+ if (file_value) {
+ // disable file input, since we don't want to upload the file on refresh
+ var file_name = $(this).attr("name");
+ file.attr( { name: 'replaced_file_input_' + file_name, disabled: true } );
+ // create a new hidden field which stores the filename and has the original name of the file input
+ var new_file_input = $(document.createElement('input'));
+ new_file_input.attr( { "type": "hidden", "value": file_value, "name": file_name } );
+ file.after(new_file_input);
+ }
+ });
+ });
+
+ // For drilldown parameters: add expand/collapse buttons and collapse initially-collapsed elements
+ $( 'div.drilldown-container' ).each( function() {
+ $(this).find('span.form-toggle' ).each( function() {
+ var show_hide_click_elt = $(this);
+ var group_id = show_hide_click_elt.attr('id').substring( 0, show_hide_click_elt.attr('id').lastIndexOf( '-click' ) );
+ $('#' + group_id + '-container').each( function() {
+ var show_hide_elt = $(this);
+ if ( show_hide_click_elt.hasClass( 'toggle-expand' ) ) {
+ show_hide_elt.hide();
+ }
+ show_hide_click_elt.click( function() {
+ if ( show_hide_click_elt.hasClass("toggle") ){
+ show_hide_click_elt.addClass("toggle-expand");
+ show_hide_click_elt.removeClass("toggle");
+ show_hide_elt.slideUp( 'fast' );
+ }
+ else {
+ show_hide_click_elt.addClass("toggle");
+ show_hide_click_elt.removeClass("toggle-expand");
+ show_hide_elt.slideDown( 'fast' );
+ }
+ });
+ });
+ });
+ });
+
+ function checkUncheckAll( name, check ) {
+ $("input[name='" + name + "'][type='checkbox']").attr('checked', !!check);
+ }
+
+ // Inserts the Select All / Unselect All buttons for checkboxes
+ $("div.checkUncheckAllPlaceholder").each( function() {
+ var check_name = $(this).attr("checkbox_name");
+ select_link = $("<a class='action-button'></a>").text("Select All").click(function() {
+ checkUncheckAll(check_name, true);
+ });
+ unselect_link = $("<a class='action-button'></a>").text("Unselect All").click(function() {
+ checkUncheckAll(check_name, false);
+ });
+ $(this).append(select_link).append(" ").append(unselect_link);
+ });
+
+ $(".add-librarydataset").live("click", function() {
+ var link = $(this);
+ $.ajax({
+ url: "/visualization/list_libraries",
+ error: function(xhr, ajaxOptions, thrownError) { alert( "Grid failed" ); console.log(xhr, ajaxOptions, thrownError); },
+ success: function(table_html) {
+ show_modal(
+ "Select Library Dataset",
+ table_html, {
+ "Cancel": function() {
+ hide_modal();
+ },
+ "Select": function() {
+ var names = [];
+ var ids = [];
+ counter = 1;
+ $('input[name=ldda_ids]:checked').each(function() {
+ var name = $.trim( $(this).siblings("label").text() );
+ var id = $(this).val();
+ names.push( counter + ". " + name );
+ counter += 1;
+ ids.push(id);
+ });
+ link.html( names.join("<br/>") );
+ link.siblings("input[type=hidden]").val( ids.join("||") );
+ hide_modal();
+ }
+ }
+ );
+ }
+ });
+ });
+ });
+
+ %if not add_frame.debug:
+ if( window.name != "galaxy_main" ) {
+ location.replace( '${h.url_for( controller='root', action='index', tool_id=tool.id )}' );
+ }
+ %endif
+
+ </script>
+
+</%def>
+
+<%def name="do_inputs( inputs, tool_state, errors, prefix, other_values=None )">
+ <%
+ from galaxy.util.expressions import ExpressionContext
+ other_values = ExpressionContext( tool_state, other_values )
+ %>
+ %for input_index, input in enumerate( inputs.itervalues() ):
+ %if not input.visible:
+ <% pass %>
+ %elif input.type == "repeat":
+ <div class="repeat-group">
+ <div class="form-title-row"><strong>${input.title_plural}</strong>
+ %if input.help:
+ <div class="toolParamHelp" style="clear: both;">
+ ${input.help}
+ </div>
+ %endif
+ </div>
+ <%
+ repeat_state = tool_state[input.name]
+ num_repeats = len( repeat_state )
+ %>
+ %for i in range( num_repeats ):
+ <div class="repeat-group-item">
+ <%
+ if input.name in errors:
+ rep_errors = errors[input.name][i]
+ else:
+ rep_errors = dict()
+ index = repeat_state[i]['__index__']
+ %>
+ <div class="form-title-row"><strong>${input.title} ${i + 1}</strong></div>
+ ${do_inputs( input.inputs, repeat_state[i], rep_errors, prefix + input.name + "_" + str(index) + "|", other_values )}
+ %if input.min < num_repeats:
+ <div class="form-row"><input type="submit" class="btn" name="${prefix}${input.name}_${index}_remove" value="Remove ${input.title} ${i+1}"></div>
+ %endif
+ </div>
+ %if rep_errors.has_key( '__index__' ):
+ <div><img style="vertical-align: middle;" src="${h.url_for('/static/style/error_small.png')}"> <span style="vertical-align: middle;">${rep_errors['__index__']}</span></div>
+ %endif
+ %endfor
+ %if input.max > num_repeats:
+ <div class="form-row"><input type="submit" class="btn" name="${prefix}${input.name}_add" value="Add new ${input.title}"></div>
+ %endif
+ </div>
+ %elif input.type == "conditional":
+ <%
+ group_state = tool_state[input.name]
+ group_errors = errors.get( input.name, {} )
+ current_case = group_state['__current_case__']
+ group_prefix = prefix + input.name + "|"
+ %>
+ %if input.value_ref_in_group:
+ ${row_for_param( group_prefix, input.test_param, group_state, group_errors, other_values )}
+ %endif
+ ${do_inputs( input.cases[current_case].inputs, group_state, group_errors, group_prefix, other_values )}
+ %elif input.type == "upload_dataset":
+ %if input.get_datatype( trans, other_values ).composite_type is None: #have non-composite upload appear as before
+ <%
+ if input.name in errors:
+ rep_errors = errors[input.name][0]
+ else:
+ rep_errors = dict()
+ %>
+ ${do_inputs( input.inputs, tool_state[input.name][0], rep_errors, prefix + input.name + "_" + str( 0 ) + "|", other_values )}
+ %else:
+ <div class="repeat-group">
+ <div class="form-title-row"><strong>${input.group_title( other_values )}</strong></div>
+ <%
+ repeat_state = tool_state[input.name]
+ %>
+ %for i in range( len( repeat_state ) ):
+ <div class="repeat-group-item">
+ <%
+ if input.name in errors:
+ rep_errors = errors[input.name][i]
+ else:
+ rep_errors = dict()
+ index = repeat_state[i]['__index__']
+ %>
+ <div class="form-title-row"><strong>File Contents for ${input.title_by_index( trans, i, other_values )}</strong></div>
+ ${do_inputs( input.inputs, repeat_state[i], rep_errors, prefix + input.name + "_" + str(index) + "|", other_values )}
+ ##<div class="form-row"><input type="submit" name="${prefix}${input.name}_${index}_remove" value="Remove ${input.title} ${i+1}"></div>
+ </div>
+ %endfor
+ ##<div class="form-row"><input type="submit" name="${prefix}${input.name}_add" value="Add new ${input.title}"></div>
+ </div>
+ %endif
+ %else:
+ ${row_for_param( prefix, input, tool_state, errors, other_values )}
+ %endif
+ %endfor
+</%def>
+
+<%def name="row_for_param( prefix, param, parent_state, parent_errors, other_values )">
+ <%
+ if parent_errors.has_key( param.name ):
+ cls = "form-row form-row-error"
+ else:
+ cls = "form-row"
+
+ label = param.get_label()
+
+ field = param.get_html_field( trans, parent_state[ param.name ], other_values )
+ field.refresh_on_change = param.refresh_on_change
+
+ # Field may contain characters submitted by user and these characters may be unicode; handle non-ascii characters gracefully.
+ field_html = field.get_html( prefix )
+ if type( field_html ) is not unicode:
+ field_html = unicode( field_html, 'utf-8', 'replace' )
+
+ if param.type == "hidden":
+ return field_html
+ %>
+ <div class="${cls}">
+ %if label:
+ <label for="${param.name}">${label}:</label>
+ %endif
+ <div class="form-row-input">${field_html}</div>
+ %if parent_errors.has_key( param.name ):
+ <div class="form-row-error-message">
+ <div><img style="vertical-align: middle;" src="${h.url_for('/static/style/error_small.png')}"> <span style="vertical-align: middle;">${parent_errors[param.name]}</span></div>
+ </div>
+ %endif
+
+ %if param.help:
+ <div class="toolParamHelp" style="clear: both;">
+ ${param.help}
+ </div>
+ %endif
+
+ <div style="clear: both;"></div>
+
+ </div>
+</%def>
+
+<% overlay(visible=False) %>
+
+%if add_frame.from_noframe:
+ <div class="warningmessage">
+ <strong>Welcome to Galaxy</strong>
+ <hr/>
+ It appears that you found this tool from a link outside of Galaxy.
+ If you're not familiar with Galaxy, please consider visiting the
+ <a href="${h.url_for( controller='root' )}" target="_top">welcome page</a>.
+ To learn more about what Galaxy is and what it can do for you, please visit
+ the <a href="${add_frame.wiki_url}" target="_top">Galaxy wiki</a>.
+ </div>
+ <br/>
+%endif
+
+<%
+ # Render an error message if a dynamically generated select list is missing a required
+ # index file or entry in the tool_data_table_conf.xml file.
+ message = ""
+ params_with_missing_data_table_entry = tool.params_with_missing_data_table_entry
+ params_with_missing_index_file = tool.params_with_missing_index_file
+ if params_with_missing_data_table_entry:
+ param = params_with_missing_data_table_entry[0]
+ message += "Data table named '%s' is required by tool but not configured. " % param.options.missing_tool_data_table_name
+ if tool.params_with_missing_index_file:
+ param = params_with_missing_index_file[0]
+ message += "Index file named '%s' is required by tool but not available. " % param.options.missing_index_file
+
+ # Handle calculating the redirect url for the special case where we have nginx proxy
+ # upload and need to do url_for on the redirect portion of the tool action.
+ try:
+ tool_url = h.url_for(tool.action)
+ except AttributeError:
+ assert len(tool.action) == 2
+ tool_url = tool.action[0] + h.url_for(tool.action[1])
+%>
+
+<%
+ # Name of the tool in lower case
+ low_tool_name = tool.name.lower()
+%>
+
+%if tool_id_version_message:
+ ${render_msg( tool_id_version_message, 'warning' )}
+%endif
+
+<div class="toolForm" id="${tool.id}">
+ <form id="tool_form" name="tool_form" action="${tool_url}" enctype="${tool.enctype}" target="${tool.target}" method="${tool.method}">
+ %if tool.has_multiple_pages:
+ <div class="toolFormTitle">${tool.name} (step ${tool_state.page+1} of ${tool.npages})
+ %elif not tool_version_select_field:
+ <div class="toolFormTitle">${tool.name} (version ${tool.version})
+ %else:
+ <div class="toolFormTitle">${tool.name} ${tool_version_select_field.get_html()}
+ %endif
+ %if trans.app.config.biostar:
+ <!-- BioStar links -->
+ <a href="${trans.app.config.biostar}/new/post/tagged/${low_tool_name}" target="galaxy_main" class="icon-button general-question tooltip close-side-panels" data-original-title="Ask a tool related question"></a>
+ <a href="${trans.app.config.biostar}/show/tag/${low_tool_name}/" target="galaxy_main" class="icon-button tag-question tooltip close-side-panels" data-original-title="See tool related posts" ></a>
+ <!-- End of BioStar links -->
+ %endif
+ </div>
+ <div class="toolFormBody">
+ <input type="hidden" name="refresh" value="refresh">
+ <input type="hidden" name="tool_id" value="${tool.id}">
+ <input type="hidden" name="tool_state" value="${util.object_to_string( tool_state.encode( tool, app ) )}">
+ %if tool.display_by_page[tool_state.page]:
+ ${trans.fill_template_string( tool.display_by_page[tool_state.page], context=tool.get_param_html_map( trans, tool_state.page, tool_state.inputs ) )}
+ <input type="submit" class="btn btn-primary" name="runtool_btn" value="Execute">
+ %else:
+ ${do_inputs( tool.inputs_by_page[ tool_state.page ], tool_state.inputs, errors, "" )}
+ <div class="form-row form-actions">
+ %if tool_state.page == tool.last_page:
+ <input type="submit" class="btn btn-primary" name="runtool_btn" value="Execute">
+ %else:
+ <input type="submit" class="btn btn-primary" name="runtool_btn" value="Next step">
+ %endif
+ </div>
+ %endif
+ </div>
+ </form>
+</div>
+%if tool.help:
+ <div class="toolHelp">
+ <div class="toolHelpBody">
+ <%
+ if tool.has_multiple_pages:
+ tool_help = tool.help_by_page[tool_state.page]
+ else:
+ tool_help = tool.help
+
+ # Help is Mako template, so render using current static path.
+ tool_help = tool_help.render( static_path=h.url_for( '/static' ) )
+
+ # Convert to unicode to display non-ascii characters.
+ if type( tool_help ) is not unicode:
+ tool_help = unicode( tool_help, 'utf-8')
+ %>
+ ${tool_help}
+ </div>
+ </div>
+%endif
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: james_taylor: template: Move templates used *only* by the galaxy webapp into templates/webapps/galaxy
by Bitbucket 03 Feb '13
by Bitbucket 03 Feb '13
03 Feb '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/4c6e63dc04c9/
changeset: 4c6e63dc04c9
user: james_taylor
date: 2013-02-04 05:07:11
summary: template: Move templates used *only* by the galaxy webapp into templates/webapps/galaxy
affected #: 258 files
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/cloud/index.mako
--- a/templates/cloud/index.mako
+++ /dev/null
@@ -1,291 +0,0 @@
-<%inherit file="/webapps/galaxy/base_panels.mako"/>
-
-<%def name="init()">
-<%
- self.has_left_panel=False
- self.has_right_panel=False
- self.active_view="shared"
- self.message_box_visible=False
-%>
-</%def>
-
-<%def name="stylesheets()">
- ${parent.stylesheets()}
- ${h.css( "autocomplete_tagging" )}
- <style type="text/css">
- #new_history_p{
- line-height:2.5em;
- margin:0em 0em .5em 0em;
- }
- #new_history_cbx{
- margin-right:.5em;
- }
- #new_history_input{
- display:none;
- line-height:1em;
- }
- #ec_button_container{
- float:right;
- }
- #hidden_options{
- display:none;
- }
- div.toolForm{
- margin-top: 10px;
- margin-bottom: 10px;
- }
- div.toolFormTitle{
- cursor:pointer;
- }
- .title_ul_text{
- text-decoration:underline;
- }
- .step-annotation {
- margin-top: 0.25em;
- font-weight: normal;
- font-size: 97%;
- }
- .workflow-annotation {
- margin-bottom: 1em;
- }
- #loading_indicator{
- position:fixed;
- top:40px;
- }
- </style>
-</%def>
-
-<%def name="javascripts()">
- ${parent.javascripts()}
- <script type="text/javascript">
- var ACCOUNT_URL = "${h.url_for( controller='/cloudlaunch', action='get_account_info')}";
- var PKEY_DL_URL = "${h.url_for( controller='/cloudlaunch', action='get_pkey')}";
- var cloudlaunch_clusters = [];
-
- $(document).ready(function(){
- $('#id_existing_instance').change(function(){
- var ei_name = $(this).val();
- if (ei_name === "New Cluster"){
- //For new instances, need to see the cluster name field.
- $('#id_cluster_name').val("New Cluster")
- $('#cluster_name_wrapper').show('fast');
- }else{
- //Hide the Cluster Name field, but set the value
- $('#id_cluster_name').val($(this).val());
- $('#cluster_name_wrapper').hide('fast');
- }
- });
- //When id_secret and id_key are complete, submit to get_account_info
- $("#id_secret, #id_key_id").bind("paste input propertychange", function(){
- secret_el = $("#id_secret");
- key_el = $("#id_key_id");
- if (secret_el.val().length === 40 && key_el.val().length === 20){
- //Submit these to get_account_info, unhide fields, and update as appropriate
- $.ajax({type: "POST",
- url: ACCOUNT_URL,
- dataType: 'json',
- data: {key_id: key_el.val(),secret:secret_el.val()},
- success: function(result){
- cloudlaunch_clusters = result.clusters;
- var kplist = $("#id_keypair");
- var clusterlist = $("#id_existing_instance");
- kplist.find('option').remove();
- clusterlist.find('option').remove();
- //Update fields with appropriate elements
- clusterlist.append($('<option/>').val('New Cluster').text('New Cluster'));
- if (_.size(result.clusters) > 0){
- _.each(result.clusters, function(cluster, index){
- clusterlist.append($('<option/>').val(cluster.name).text(cluster.name));
- });
- $('#existing_instance_wrapper').show();
- }
- if (!_.include(result.keypairs, '${default_keypair}')){
- kplist.append($('<option/>').val('${default_keypair}').text('Create New - ${default_keypair}'));
- }
- _.each(result.keypairs, function(keypair, index){
- kplist.append($('<option/>').val(keypair).text(keypair));
- });
- $('#hidden_options').show('fast');
- }
- });
- }
- });
- $('#loading_indicator').ajaxStart(function(){
- $(this).show('fast');
- }).ajaxStop(function(){
- $(this).hide('fast');
- });
- $('form').ajaxForm({
- type: 'POST',
- dataType: 'json',
- beforeSubmit: function(data, form){
- if ($('#id_password').val() != $('#id_password_confirm').val()){
- //Passwords don't match.
- form.prepend('<div class="errormessage">Passwords do not match</div>');
- return false;
- }else{
- //Clear errors
- $('.errormessage').remove()
- //Hide the form, show pending box with spinner.
- $('#launchFormContainer').hide('fast');
- $('#responsePanel').show('fast');
- }
- //Dig up zone info for selected cluster, set hidden input.
- //This is not necessary to present to the user though the interface may prove useful.
- var ei_val = _.find(data, function(f_obj){return f_obj.name === 'existing_instance'});
- if( ei_val && (ei_val.value !== "New Cluster")){
- var cluster = _.find(cloudlaunch_clusters, function(cluster){return cluster.name === ei_val.value});
- var zdata = _.find(data, function(f_obj){return f_obj.name === 'zone'});
- zdata.value = cluster.zone;
- }
- },
- success: function(data){
- //Success Message, link to key download if required, link to server itself.
- $('#launchPending').hide('fast');
- //Set appropriate fields (dns, key, ami) and then display.
- if(data.kp_material_tag){
- var kp_download_link = $('<a/>').attr('href', PKEY_DL_URL + '?kp_material_tag=' + data.kp_material_tag)
- .attr('target','_blank')
- .text("Download your key now");
- $('#keypairInfo').append(kp_download_link);
- $('#keypairInfo').show();
- }
- $('.kp_name').text(data.kp_name);
- $('#instance_id').text(data.instance_id);
- $('#image_id').text(data.image_id);
- $('#instance_link').html($('<a/>')
- .attr('href', 'http://' + data.public_dns_name + '/cloud')
- .attr('target','_blank')
- .text(data.public_dns_name + '/cloud'));
- $('#instance_dns').text(data.public_dns_name);
- $('#launchSuccess').show('fast');
- },
- error: function(jqXHR, textStatus, errorThrown){
- $('#launchFormContainer').prepend('<div class="errormessage">' + errorThrown + " : " + jqXHR.responseText + '</div>');
- $('#responsePanel').hide('fast');
- $('#launchFormContainer').show('fast');
- }
- });
- });
- </script>
-</%def>
-
-<%def name="center_panel()">
- <div style="overflow: auto; height: 100%;">
- <div class="page-container" style="padding: 10px;">
- <div id="loading_indicator"></div>
- <h2>Launch a Galaxy Cloud Instance</h2>
- <div id="launchFormContainer" class="toolForm">
- <form id="cloudlaunch_form" action="${h.url_for( controller='/cloudlaunch', action='launch_instance')}" method="post">
-
- <p>To launch a Galaxy Cloud Cluster, enter your AWS Secret Key ID, and Secret Key. Galaxy will use
- these to present appropriate options for launching your cluster. Note that using this form to
- launch computational resources in the Amazon Cloud will result in costs to the account indicated
- above. See <a href="http://aws.amazon.com/ec2/pricing/">Amazon's pricing</a> for more information.
- options for launching your cluster.</p></p>
-
- <div class="form-row">
- <label for="id_key_id">Key ID</label>
- <input type="text" size="30" maxlength="20" name="key_id" id="id_key_id" value=""/><br/>
- <div class="toolParamHelp">
- This is the text string that uniquely identifies your account, found in the
- <a href="https://portal.aws.amazon.com/gp/aws/securityCredentials">Security Credentials section of the AWS Console</a>.
- </div>
- </div>
-
- <div class="form-row">
- <label for="id_secret">Secret Key</label>
- <input type="text" size="50" maxlength="40" name="secret" id="id_secret" value=""/><br/>
- <div class="toolParamHelp">
- This is your AWS Secret Key, also found in the <a href="https://portal.aws.amazon.com/gp/aws/securityCredentials">Security
-Credentials section of the AWS Console</a>. </div>
- </div>
-
- <div id="hidden_options">
- <div id='existing_instance_wrapper' style="display:none;" class="form-row">
- <label for="id_existing_instance">Instances in your account</label>
- <select name="existing_instance" id="id_existing_instance">
- </select>
- <input id='id_zone' type='hidden' name='zone' value=''/>
- </div>
- <div id='cluster_name_wrapper' class="form-row">
- <label for="id_cluster_name">Cluster Name</label>
- <input type="text" size="40" class="text-and-autocomplete-select" name="cluster_name" id="id_cluster_name"/><br/>
- <div class="toolParamHelp">
- This is the name for your cluster. You'll use this when you want to restart.
- </div>
- </div>
-
- <div class="form-row">
- <label for="id_password">Cluster Password</label>
- <input type="password" size="40" name="password" id="id_password"/><br/>
- </div>
-
- <div class="form-row">
- <label for="id_password_confirm">Cluster Password - Confirmation</label>
- <input type="password" size="40" name="password_confirm" id="id_password_confirm"/><br/>
- </div>
-
-
- <div class="form-row">
- <label for="id_keypair">Key Pair</label>
- <select name="keypair" id="id_keypair">
- <option name="Create" value="cloudman_keypair">cloudman_keypair</option>
- </select>
- </div>
-
- %if share_string:
- <input type='hidden' name='share_string' value='${share_string}'/>
- %else:
- <!-- DBEDIT temporary hide share string due to it being broken on the cloudman end -->
- <div class="form-row" style="display:none;">
- <label for="id_share_string">Instance Share String (optional)</label>
- <input type="text" size="120" name="share_string" id="id_share_string"/><br/>
- </div>
- %endif
-
- <div class="form-row">
- <label for="id_instance_type">Instance Type</label>
- <select name="instance_type" id="id_instance_type">
- <option value="m1.large">Large</option>
- <option value="m1.xlarge">Extra Large</option>
- <option value="m2.4xlarge">High-Memory Quadruple Extra Large</option>
- </select>
- </div>
- <div class="form-row">
- <p>Requesting the instance may take a moment, please be patient. Do not refresh your browser or navigate away from the page</p>
- <input type="submit" value="Submit" id="id_submit"/>
- </div>
- </div>
- <div class="form-row">
- <div id="loading_indicator" style="position:relative;left:10px;right:0px"></div>
- </div>
- </form>
- </div>
- <div id="responsePanel" class="toolForm" style="display:none;">
- <div id="launchPending">Launch Pending, please be patient.</div>
- <div id="launchSuccess" style="display:none;">
- <div id="keypairInfo" style="display:none;margin-bottom:20px;">
- <h3>Very Important Key Pair Information</h3>
- <p>A new key pair named <strong><span class="kp_name">kp_name</span></strong> has been created in your AWS
- account and will be used to access this instance via ssh. It is
- <strong>very important</strong> that you save the following private key
- as it is not saved on this Galaxy instance and will be permanently lost if not saved. Additionally, this link will
- only allow a single download, after which the key is removed from the Galaxy server permanently.<br/>
- </div>
- <div>
- <h3>Access Information</h3>
- <ul>
- <li>Your instance '<span id="instance_id">undefined</span>' has been successfully launched using the
- '<span id="image_id">undefined</span>' AMI.</li>
- <li>While it may take a few moments to boot, you will be able to access the cloud control
- panel at <span id="instance_link">undefined.</span>.</li>
- <li>SSH access is also available using your private key. From the terminal, you would execute something like:</br> `ssh -i <span class="kp_name">undefined</span>.pem ubuntu@<span
-id="instance_dns">undefined</span>`</li>
- </ul>
- </div>
- </div>
- </div>
- </div>
-</%def>
-
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/cloud/run.mako
--- a/templates/cloud/run.mako
+++ /dev/null
@@ -1,41 +0,0 @@
-<%inherit file="/webapps/galaxy/base_panels.mako"/>
-
-<%def name="init()">
-<%
- self.has_left_panel=False
- self.has_right_panel=False
- self.active_view="shared"
- self.message_box_visible=False
-%>
-</%def>
-
-
-<%def name="center_panel()">
- <div style="overflow: auto; height: 100%;">
- <div class="page-container" style="padding: 10px;">
- <h2>Launching a Galaxy Cloud Instance</h2>
-%if error:
- <p>${error}</p>
-%elif instance:
- %if kp_material:
- <h3>Very Important Key Pair Information</h3>
- <p>A new key pair named '${kp_name}' has been created in your AWS
- account and will be used to access this instance via ssh. It is
- <strong>very important</strong> that you save the following private key
- as it is not saved on this Galaxy instance and will be permanently lost
- once you leave this page. To do this, save the following key block as
- a plain text file named '${kp_name}'.</p>
- <pre>${kp_material}</pre>
- %endif
- <p>The instance '${instance.id} has been successfully launched using the
- '${instance.image_id}' AMI.<br/> Access it at <a
- href="http://${instance.public_dns_name}">http://${instance.public_dns_name}</a></p>
- <p>SSH access is available using your private key '${kp_name}'.</p>
-%else:
- <p> Unknown failure, no instance. Please refer to your AWS console at <a
- href="https://console.aws.amazon.com">https://console.aws.amazon.com</a></p>
-%endif
- </div>
- </div>
-</%def>
-
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/copy_view.mako
--- a/templates/dataset/copy_view.mako
+++ /dev/null
@@ -1,141 +0,0 @@
-<%inherit file="/base.mako"/>
-<%def name="title()">Copy History Items</%def>
-
-<%def name="javascripts()">
-
- ${parent.javascripts()}
-
- <script type="text/javascript">
- $(function() {
- $("#select-multiple").click(function() {
- $("#single-dest-select").val("");
- $("#single-destination").hide();
- $("#multiple-destination").show();
- });
- });
- %if 'history' in refresh_frames:
- if ( parent.frames && parent.frames.galaxy_history ) {
- parent.frames.galaxy_history.location.href="${h.url_for( controller='root', action='history')}";
- if ( parent.force_right_panel ) {
- parent.force_right_panel( 'show' );
- }
- }
- %endif
- </script>
-
-</%def>
-
-%if error_msg:
- <p>
- <div class="errormessage">${error_msg}</div>
- <div style="clear: both"></div>
- </p>
-%endif
-%if done_msg:
- <p>
- <div class="donemessage">${done_msg}</div>
- <div style="clear: both"></div>
- </p>
-%endif
-<p>
- <div class="infomessage">Copy any number of history items from one history to another.</div>
- <div style="clear: both"></div>
-</p>
-<p>
- <form method="post">
- <div class="toolForm" style="float: left; width: 45%; padding: 0px;">
- <div class="toolFormTitle">Source History:<br />
- <select id="source_history" name="source_history" refresh_on_change="true" style="font-weight: normal;">
- %for i, hist in enumerate(target_histories):
- <%
- selected = ""
- current_history_text = ""
- if hist == source_history:
- selected = "selected='selected'"
- if hist == current_history:
- current_history_text = " (current history)"
-
- %>
- <option value="${trans.security.encode_id(hist.id)}" ${selected}>
- ${i + 1}: ${h.truncate(util.unicodify( hist.name ), 30)}${current_history_text}
- </option>
- %endfor
- </select>
- </div>
- <div class="toolFormBody">
- %if len(source_datasets) > 0:
- %for data in source_datasets:
- <%
- checked = ""
- encoded_id = trans.security.encode_id(data.id)
- if data.id in source_dataset_ids:
- checked = " checked='checked'"
- %>
- <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}: ${h.to_unicode(data.name)}</label>
- </div>
- %endfor
- %else:
- <div class="form-row">This history has no datasets.</div>
- %endif
- </div>
- </div>
- <div style="float: left; padding-left: 10px; font-size: 36px;">→</div>
- <div class="toolForm" style="float: right; width: 45%; padding: 0px;">
- <div class="toolFormTitle">Destination History:</div>
- <div class="toolFormBody">
- <div class="form-row" id="single-destination">
- <select id="single-dest-select" name="target_history_id">
- <option value=""></option>
- %for i, hist in enumerate(target_histories):
- <%
- encoded_id = trans.security.encode_id(hist.id)
- source_history_text = ""
- selected = ""
- if hist == source_history:
- source_history_text = " (source history)"
- if encoded_id == target_history_id:
- selected = " selected='selected'"
- %>
- <option value="${encoded_id}"${selected}>${i + 1}: ${h.truncate( util.unicodify( hist.name ), 30)}${source_history_text}</option>
- %endfor
- </select><br /><br />
- <a style="margin-left: 10px;" href="javascript:void(0);" id="select-multiple">Choose multiple histories</a>
- </div>
- <div id="multiple-destination" style="display: none;">
- %for i, hist in enumerate( target_histories ):
- <%
- cur_history_text = ""
- encoded_id = trans.security.encode_id(hist.id)
- if hist == source_history:
- cur_history_text = " <strong>(source history)</strong>"
- %>
- <div class="form-row">
- <input type="checkbox" name="target_history_ids" id="hist_${encoded_id}" value="${encoded_id}"/>
- <label for="hist_${encoded_id}" style="display: inline; font-weight:normal;">${i + 1}: ${ util.unicodify( hist.name ) }${cur_history_text}</label>
- </div>
- %endfor
- </div>
- %if trans.get_user():
- <%
- checked = ""
- if "create_new_history" in target_history_ids:
- checked = " checked='checked'"
- %>
- <hr />
- <div style="text-align: center; color: #888;">— OR —</div>
- <div class="form-row">
- <label for="new_history_name" style="display: inline; font-weight:normal;">New history named:</label>
- <input type="textbox" name="new_history_name" />
- </div>
- %endif
- </div>
- </div>
- <div style="clear: both"></div>
- <div class="form-row" align="center">
- <input type="submit" class="primary-button" name="do_copy" value="Copy History Items"/>
- </div>
- </form>
- </div>
-</p>
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/display.mako
--- a/templates/dataset/display.mako
+++ /dev/null
@@ -1,111 +0,0 @@
-## Because HDAs do not have many of the properties that other sharable items have, we need to override most of the default code for display.
-<%inherit file="/display_base.mako"/>
-<%namespace file="/display_common.mako" import="*" />
-<%namespace file="/tagging_common.mako" import="render_individual_tagging_element, render_community_tagging_element" />
-
-<%def name="javascripts()">
- ${parent.javascripts()}
-</%def>
-
-<%def name="init()">
-<%
- self.has_left_panel=False
- self.has_right_panel=True
- self.message_box_visible=False
- self.active_view="user"
- self.overlay_visible=False
-%>
-</%def>
-
-<%def name="title()">
- Galaxy | ${get_class_display_name( item.__class__ )} | ${get_item_name( item ) | h}
-</%def>
-
-<%def name="render_item_links( data )">
- ## Provide links to save data and import dataset.
- <a href="${h.url_for( controller='/dataset', action='display', dataset_id=trans.security.encode_id( data.id ), to_ext=data.ext )}" class="icon-button disk tooltip" title="Save dataset"></a>
- <a
- href="${h.url_for( controller='/dataset', action='imp', dataset_id=trans.security.encode_id( data.id ) )}"
- class="icon-button import tooltip"
- title="Import dataset"></a>
-</%def>
-
-<%def name="render_item( data, data_to_render )">
- %if truncated:
- <div class="warningmessagelarge">
- This dataset is large and only the first megabyte is shown below. |
- <a href="${h.url_for( controller='dataset', action='display_by_username_and_slug', username=data.history.user.username, slug=trans.security.encode_id( data.id ), preview=False )}">Show all</a>
- </div>
- %endif
- ## TODO: why is the default font size so small?
- <pre style="font-size: 135%">${ data_to_render | h }</pre>
-</%def>
-
-
-<%def name="center_panel()">
- <div class="unified-panel-header" unselectable="on">
- <div class="unified-panel-header-inner">
- ${get_class_display_name( item.__class__ )}
- | ${get_item_name( item ) | h}
- </div>
- </div>
-
- <div class="unified-panel-body">
- <div style="overflow: auto; height: 100%;">
- <div class="page-body">
- <div style="float: right">
- ${self.render_item_links( item )}
- </div>
- <div>
- ${self.render_item_header( item )}
- </div>
-
- ${self.render_item( item, item_data )}
- </div>
- </div>
- </div>
-</%def>
-
-<%def name="right_panel()">
- <div class="unified-panel-header" unselectable="on">
- <div class="unified-panel-header-inner">
- About this ${get_class_display_name( item.__class__ )}
- </div>
- </div>
-
- <div class="unified-panel-body">
- <div style="overflow: auto; height: 100%;">
- <div style="padding: 10px;">
- <h4>Author</h4>
-
- <p>${item.history.user.username | h}</p>
-
- <div><img src="https://secure.gravatar.com/avatar/${h.md5(item.history.user.email)}?d=iden…"></div>
-
- ## Page meta.
-
- ## No links for datasets right now.
-
- ## Tags.
- <p>
- <h4>Tags</h4>
- <p>
- ## Community tags.
- <div>
- Community:
- ${render_community_tagging_element( tagged_item=item, tag_click_fn='community_tag_click', use_toggle_link=False )}
- %if len ( item.tags ) == 0:
- none
- %endif
- </div>
- ## Individual tags.
- <p>
- <div>
- Yours:
- ${render_individual_tagging_element( user=trans.get_user(), tagged_item=item, elt_context='view.mako', use_toggle_link=False, tag_click_fn='community_tag_click' )}
- </div>
- </div>
- </div>
- </div>
-
-</%def>
\ No newline at end of file
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/display_application/display.mako
--- a/templates/dataset/display_application/display.mako
+++ /dev/null
@@ -1,12 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-<%def name="title()">Display Application: ${display_link.link.display_application.name} ${display_link.link.name}</%def>
-%for message, status in msg:
- ${render_msg( message, status )}
-%endfor
-%if refresh:
-<%def name="metas()"><meta http-equiv="refresh" content="10" /></%def>
-<p>
-This page will <a href="${trans.request.url}">refresh</a> after 10 seconds.
-</p>
-%endif
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/edit_attributes.mako
--- a/templates/dataset/edit_attributes.mako
+++ /dev/null
@@ -1,202 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-<%namespace file="/message.mako" name="message_ns" import="handle_refresh_frames" />
-
-<%def name="title()">${_('Edit Dataset Attributes')}</%def>
-
-<%def name="stylesheets()">
- ${h.css( "base", "autocomplete_tagging" )}
-</%def>
-
-<%def name="javascripts()">
- ${parent.javascripts()}
- ${message_ns.handle_refresh_frames()}
- ${h.js( "libs/jquery/jquery.autocomplete", "galaxy.autocom_tagging" )}
-</%def>
-
-<%def name="datatype( dataset, datatypes )">
- <select name="datatype">
- %for ext in datatypes:
- %if dataset.ext == ext:
- <option value="${ext}" selected="yes">${_(ext)}</option>
- %else:
- <option value="${ext}">${_(ext)}</option>
- %endif
- %endfor
- </select>
-</%def>
-
-%if message:
- ${render_msg( message, status )}
-%endif
-
-
-<ul class="nav nav-tabs">
- <li class="active"><a href="#attributes" data-toggle="tab">Attributes</a></li>
- <li><a href="#convert" data-toggle="tab">Convert Format</a></li>
- <li><a href="#datatype" data-toggle="tab">Datatype</a></li>
- <li><a href="#permissions" data-toggle="tab">Permissions</a></li>
-</ul>
-
-<div class="tab-content">
-
-<div class="tab-pane active toolForm" id="attributes">
- <div class="toolFormTitle">${_('Edit Attributes')}</div>
- <div class="toolFormBody">
- <form name="edit_attributes" action="${h.url_for( controller='dataset', action='edit', dataset_id=dataset_id )}" method="post">
- <div class="form-row">
- <label>
- Name:
- </label>
- <div style="float: left; width: 250px; margin-right: 10px;">
- <input type="text" name="name" value="${data.get_display_name() | h}" size="40"/>
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <label>
- Info:
- </label>
- <div style="float: left; width: 250px; margin-right: 10px;">
- <textarea name="info" cols="40" rows="2">${ util.unicodify( data.info ) | h}</textarea>
- </div>
- <div style="clear: both"></div>
- </div>
- %if trans.get_user() is not None:
- <div class="form-row">
- <label>
- Annotation / Notes:
- </label>
- <div style="float: left; width: 250px; margin-right: 10px;">
- <textarea name="annotation" cols="40" rows="2">${data_annotation | h}</textarea>
- </div>
- <div style="clear: both"></div>
- <div class="toolParamHelp">Add an annotation or notes to a dataset; annotations are available when a history is viewed.</div>
- </div>
- %endif
- %for name, spec in data.metadata.spec.items():
- %if spec.visible:
- <div class="form-row">
- <label>
- ${spec.desc}:
- </label>
- <div style="float: left; width: 250px; margin-right: 10px;">
- ${data.metadata.get_html_by_name( name, trans=trans )}
- </div>
- <div style="clear: both"></div>
- </div>
- %endif
- %endfor
- <div class="form-row">
- <input type="submit" name="save" value="${_('Save')}"/>
- </div>
- </form>
- <form name="auto_detect" action="${h.url_for( controller='dataset', action='edit', dataset_id=dataset_id )}" method="post">
- <div class="form-row">
- <div style="float: left; width: 250px; margin-right: 10px;">
- <input type="submit" name="detect" value="${_('Auto-detect')}"/>
- </div>
- <div class="toolParamHelp" style="clear: both;">
- This will inspect the dataset and attempt to correct the above column values if they are not accurate.
- </div>
- </div>
- </form>
- %if data.missing_meta():
- <div class="form-row">
- <div class="errormessagesmall">${_('Required metadata values are missing. Some of these values may not be editable by the user. Selecting "Auto-detect" will attempt to fix these values.')}</div>
- </div>
- %endif
- </div>
-</div>
-
-<div class="tab-pane toolForm" id="convert">
- <div class="toolFormTitle">${_('Convert to new format')}</div>
- <div class="toolFormBody">
- <% converters = data.get_converter_types() %>
- %if len( converters ) > 0:
- <form name="convert_data" action="${h.url_for( controller='dataset', action='edit', dataset_id=dataset_id )}" method="post">
- <div class="form-row">
- <div style="float: left; width: 250px; margin-right: 10px;">
- <select name="target_type">
- %for key, value in converters.items():
- <option value="${key}">${value.name}</option>
- %endfor
- </select>
- </div>
- <div class="toolParamHelp" style="clear: both;">
- This will create a new dataset with the contents of this dataset converted to a new format.
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <input type="submit" name="convert_data" value="${_('Convert')}"/>
- </div>
- </form>
- %else:
- No conversions available
- %endif
- </div>
-</div>
-
-<div class="tab-pane toolForm" id="datatype">
- <div class="toolFormTitle">${_('Change data type')}</div>
- <div class="toolFormBody">
- %if data.datatype.allow_datatype_change:
- <form name="change_datatype" action="${h.url_for( controller='dataset', action='edit', dataset_id=dataset_id )}" method="post">
- <div class="form-row">
- <label>
- ${_('New Type')}:
- </label>
- <div style="float: left; width: 250px; margin-right: 10px;">
- ${datatype( data, datatypes )}
- </div>
- <div class="toolParamHelp" style="clear: both;">
- ${_('This will change the datatype of the existing dataset but <i>not</i> modify its contents. Use this if Galaxy has incorrectly guessed the type of your dataset.')}
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <input type="submit" name="change" value="${_('Save')}"/>
- </div>
- </form>
- %else:
- <div class="form-row">
- <div class="warningmessagesmall">${_('Changing the datatype of this dataset is not allowed.')}</div>
- </div>
- %endif
- </div>
-</div>
-<p />
-
-<div class="tab-pane" id="permissions">
-%if trans.app.security_agent.can_manage_dataset( current_user_roles, data.dataset ):
- <%namespace file="/dataset/security_common.mako" import="render_permission_form" />
- ${render_permission_form( data.dataset, data.get_display_name(), h.url_for( controller='dataset', action='edit', dataset_id=dataset_id ), all_roles )}
-%elif trans.user:
- <div class="toolForm">
- <div class="toolFormTitle">View Permissions</div>
- <div class="toolFormBody">
- <div class="form-row">
- %if data.dataset.actions:
- <ul>
- %for action, roles in trans.app.security_agent.get_permissions( data.dataset ).items():
- %if roles:
- <li>${action.description}</li>
- <ul>
- %for role in roles:
- <li>${role.name}</li>
- %endfor
- </ul>
- %endif
- %endfor
- </ul>
- %else:
- <p>This dataset is accessible by everyone (it is public).</p>
- %endif
- </div>
- </div>
- </div>
-%else:
- Permissions not available (not logged in)
-%endif
-</div>
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/embed.mako
--- a/templates/dataset/embed.mako
+++ /dev/null
@@ -1,19 +0,0 @@
-<%inherit file="/embed_base.mako"/>
-<%!
- from galaxy.web.framework.helpers import iff
-%>
-
-<%def name="render_item_links( dataset )">
- <a href="${h.url_for( controller='/dataset', action='display', dataset_id=trans.security.encode_id( dataset.id ), to_ext=dataset.ext )}" title="Save dataset" class="icon-button disk tooltip"></a>
- ## Links for importing and viewing an item.
- <a href="${h.url_for( controller='/dataset', action='imp', dataset_id=trans.security.encode_id( item.id ) )}" title="Import dataset" class="icon-button import tooltip"></a>
- <a class="icon-button go-to-full-screen tooltip" href="${h.url_for( controller='/dataset', action='display_by_username_and_slug', username=dataset.history.user.username, slug=trans.security.encode_id( dataset.id ) )}" title="Go to dataset"></a>
-
-</%def>
-
-<%def name="render_summary_content( dataset, data )">
-## <ul>
-## <li>Format : ${dataset.extension}
-## <pre>${dataset.peek}</pre>
-## </ul>
-</%def>
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/errors.mako
--- a/templates/dataset/errors.mako
+++ /dev/null
@@ -1,80 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
- <head>
- <title>Dataset generation errors</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <link href="/static/style/base.css" rel="stylesheet" type="text/css" />
- <style>
- pre
- {
- background: white;
- color: black;
- border: dotted black 1px;
- overflow: auto;
- padding: 10px;
- }
- </style>
- </head>
-
- <body>
- <h2>Dataset generation errors</h2>
- <p><b>Dataset ${hda.hid}: ${hda.display_name()}</b></p>
- <% job = hda.creating_job %>
- %if job:
-
- %if job.traceback:
- The Galaxy framework encountered the following error while attempting to run the tool:
- <pre>${ util.unicodify( job.traceback ) | h}</pre>
- %endif
- %if job.stderr or job.info:
- Tool execution generated the following error message:
- %if job.stderr:
- <pre>${ util.unicodify( job.stderr ) | h}</pre>
- %elif job.info:
- <pre>${ util.unicodify( job.info ) | h}</pre>
- %endif
- %else:
- Tool execution did not generate any error messages.
- %endif
- %if job.stdout:
- The tool produced the following additional output:
- <pre>${ util.unicodify( job.stdout ) | h}</pre>
- %endif
- %else:
- The tool did not create any additional job / error info.
- %endif
- <%
- if trans.user:
- user_email = trans.user.email
- else:
- user_email = ''
- %>
- <h2>Report this error to the Galaxy Team</h2>
- <p>
- The Galaxy team regularly reviews errors that occur in the application.
- However, if you would like to provide additional information (such as
- what you were trying to do when the error occurred) and a contact e-mail
- address, we will be better able to investigate your problem and get back
- to you.
- </p>
- <div class="toolForm">
- <div class="toolFormTitle">Error Report</div>
- <div class="toolFormBody">
- <form name="report_error" action="${h.url_for( action='report_error')}" method="post" >
- <input type="hidden" name="id" value="${hda.id}" />
- <div class="form-row">
- <label>Your email</label>
- <input type="text" name="email" size="40" value="${user_email}" />
- </div>
- <div class="form-row">
- <label>Message</label>
- <textarea name="message" rows="10" cols="40"></textarea>
- </div>
- <div class="form-row">
- <input type="submit" value="Report"/>
- </div>
- </form>
- </div>
- </div>
- </body>
-</html>
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/grid.mako
--- a/templates/dataset/grid.mako
+++ /dev/null
@@ -1,1 +0,0 @@
-<%inherit file="/grid_base.mako"/>
\ No newline at end of file
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/item_content.mako
--- a/templates/dataset/item_content.mako
+++ /dev/null
@@ -1,3 +0,0 @@
-<%namespace file="/dataset/display.mako" import="*" />
-
-${render_item( item, item_data )}
\ No newline at end of file
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/large_file.mako
--- a/templates/dataset/large_file.mako
+++ /dev/null
@@ -1,11 +0,0 @@
-<%inherit file="/base.mako"/>
-
-<div class="warningmessagelarge">
- This dataset is large and only the first megabyte is shown below.<br />
- <a href="${h.url_for( controller='dataset', action='display', dataset_id=trans.security.encode_id( data.id ), filename='' )}">Show all</a> |
- <a href="${h.url_for( controller='dataset', action='display', dataset_id=trans.security.encode_id( data.id ), to_ext=data.ext )}">Save</a>
-</div>
-
-<pre>
-${ unicode( truncated_data, 'utf-8' ) | h }
-</pre>
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/security_common.mako
--- a/templates/dataset/security_common.mako
+++ /dev/null
@@ -1,130 +0,0 @@
-<%def name="render_select( current_actions, action_key, action, roles )">
- <%
- import sets
- in_roles = sets.Set()
- for a in current_actions:
- if a.action == action.action:
- in_roles.add( a.role )
- out_roles = filter( lambda x: x not in in_roles, roles )
- %>
- <p>
- <b>${action.action}:</b> ${action.description}
- %if action == trans.app.security_agent.permitted_actions.DATASET_ACCESS:
- <br/>
- NOTE: Users must have every role associated with this dataset in order to access it
- %endif
- </p>
- <div style="width: 100%; white-space: nowrap;">
- <div style="float: left; width: 50%;">
- Roles associated:<br />
- <select name="${action_key}_in" id="${action_key}_in_select" class="in_select" style="max-width: 98%; width: 98%; height: 150px; font-size: 100%;" multiple>
- %for role in in_roles:
- <option value="${role.id}">${role.name}</option>
- %endfor
- </select><br />
- <div style="width: 98%; text-align: right"><input type="submit" id="${action_key}_remove_button" class="role_remove_button" value=">>"/></div>
- </div>
- <div style="width: 50%;">
- Roles not associated:<br />
- <select name="${action_key}_out" id="${action_key}_out_select" style="max-width: 98%; width: 98%; height: 150px; font-size: 100%;" multiple>
- %for role in out_roles:
- <option value="${role.id}">${role.name}</option>
- %endfor
- </select><br />
- <input type="submit" id="${action_key}_add_button" class="role_add_button" value="<<"/>
- </div>
- </div>
-</%def>
-
-## Any permission ( e.g., 'DATASET_ACCESS' ) included in the do_not_render param will not be rendered on the page.
-<%def name="render_permission_form( obj, obj_name, form_url, roles, do_not_render=[], all_roles=[] )">
- <%
- if isinstance( obj, trans.app.model.User ):
- current_actions = obj.default_permissions
- permitted_actions = trans.app.model.Dataset.permitted_actions.items()
- obj_str = 'user %s' % obj_name
- obj_type = 'dataset'
- elif isinstance( obj, trans.app.model.History ):
- current_actions = obj.default_permissions
- permitted_actions = trans.app.model.Dataset.permitted_actions.items()
- obj_str = 'history %s' % obj_name
- obj_type = 'dataset'
- elif isinstance( obj, trans.app.model.Dataset ):
- current_actions = obj.actions
- permitted_actions = trans.app.model.Dataset.permitted_actions.items()
- obj_str = obj_name
- obj_type = 'dataset'
- elif isinstance( obj, trans.app.model.LibraryDatasetDatasetAssociation ):
- current_actions = obj.actions + obj.dataset.actions
- permitted_actions = trans.app.model.Dataset.permitted_actions.items() + trans.app.model.Library.permitted_actions.items()
- obj_str = obj_name
- obj_type = 'dataset'
- elif isinstance( obj, trans.app.model.Library ):
- current_actions = obj.actions
- permitted_actions = trans.app.model.Library.permitted_actions.items()
- obj_str = 'library %s' % obj_name
- obj_type = 'library'
- elif isinstance( obj, trans.app.model.LibraryDataset ):
- current_actions = obj.actions
- permitted_actions = trans.app.model.Library.permitted_actions.items()
- obj_str = 'library dataset %s' % obj_name
- obj_type = 'library'
- elif isinstance( obj, trans.app.model.LibraryFolder ):
- current_actions = obj.actions
- permitted_actions = trans.app.model.Library.permitted_actions.items()
- obj_str = 'library folder %s' % obj_name
- obj_type = 'library'
- else:
- current_actions = []
- permitted_actions = {}.items()
- obj_str = 'unknown object %s' %obj_name
- obj_type = ''
- %>
- <script type="text/javascript">
- $( document ).ready( function () {
- $( '.role_add_button' ).click( function() {
- var action = this.id.substring( 0, this.id.lastIndexOf( '_add_button' ) )
- var in_select = '#' + action + '_in_select';
- var out_select = '#' + action + '_out_select';
- return !$( out_select + ' option:selected' ).remove().appendTo( in_select );
- });
- $( '.role_remove_button' ).click( function() {
- var action = this.id.substring( 0, this.id.lastIndexOf( '_remove_button' ) )
- var in_select = '#' + action + '_in_select';
- var out_select = '#' + action + '_out_select';
- return !$( in_select + ' option:selected' ).remove().appendTo( out_select );
- });
- $( 'form#edit_role_associations' ).submit( function() {
- $( '.in_select option' ).each(function( i ) {
- $( this ).attr( "selected", "selected" );
- });
- });
- });
- </script>
- <div class="toolForm">
- <div class="toolFormTitle">Manage ${obj_type} permissions on ${obj_str}</div>
- <div class="toolFormBody">
- <form name="edit_role_associations" id="edit_role_associations" action="${form_url}" method="post">
- <div class="form-row"></div>
- %for k, v in permitted_actions:
- %if k not in do_not_render:
- <div class="form-row">
- ## LIBRARY_ACCESS is a special case because we need to render all roles instead of
- ## roles derived from the roles associated with LIBRARY_ACCESS.
- <% render_all_roles = k == 'LIBRARY_ACCESS' %>
- %if render_all_roles:
- ${render_select( current_actions, k, v, all_roles )}
- %else:
- ${render_select( current_actions, k, v, roles )}
- %endif
- </div>
- %endif
- %endfor
- <div class="form-row">
- <input type="submit" name="update_roles_button" value="Save"/>
- </div>
- </form>
- </div>
- </div>
- <p/>
-</%def>
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/tabular_chunked.mako
--- a/templates/dataset/tabular_chunked.mako
+++ /dev/null
@@ -1,103 +0,0 @@
-<%inherit file="/base.mako"/>
-
-
-<%def name="title()">Dataset Display</%def>
-
-<%def name="javascripts()">
- ${parent.javascripts()}
- <script type="text/javascript">
- var DATASET_URL = "${h.url_for( controller='/dataset', action='display', dataset_id=trans.security.encode_id( dataset.id ))}";
- var COLUMN_NUMBER = ${column_number};
- var COLUMN_TYPES = ${column_types};
- var COLUMN_NAMES = ${column_names};
-
- var chunk = ${chunk};
- var current_chunk = 0;
-
- function renderCell(cell_contents, index, colspan){
- if (colspan !== undefined){
- return $('<td>').attr('colspan', colspan).addClass('stringalign').text(cell_contents);
- }
- else if (COLUMN_TYPES[index] == 'str' || COLUMN_TYPES[index] == 'list'){
- /* Left align all str columns, right align the rest */
- return $('<td>').addClass('stringalign').text(cell_contents);;
- }
- else{
- return $('<td>').text(cell_contents);
- }
- }
-
- function renderRow(line){
- /* Check length of cells to ensure this is a complete row. */
- var cells = line.split('\t');
- var row = $('<tr>');
- if (cells.length == COLUMN_NUMBER){
- $.each(cells, function(index, cell_contents){
- row.append(renderCell(cell_contents, index));
- });
- }
- else if(cells.length > COLUMN_NUMBER){
- /* SAM file or like format with optional metadata included */
- $.each(cells.slice(0, COLUMN_NUMBER -1), function(index, cell_contents){
- row.append(renderCell(cell_contents, index));
- });
- row.append(renderCell(cells.slice(COLUMN_NUMBER -1).join('\t'), COLUMN_NUMBER-1));
- }
- else if(COLUMN_NUMBER > 5 && cells.length == COLUMN_NUMBER - 1 ){
- /* SAM file or like format with optional metadata missing */
- $.each(cells, function(index, cell_contents){
- row.append(renderCell(cell_contents, index));
- });
- row.append($('<td>'));
- }
- else{
- /* Comment line, just return the one cell*/
- row.append(renderCell(line, 0, COLUMN_NUMBER));
- }
- return row;
- }
-
- function renderChunk(chunk){
- var table = $('#content_table');
- if (chunk.ck_data == ""){
- current_chunk = -1;
- }
- else if(chunk.ck_index === current_chunk + 1){
- if (current_chunk === 0 && COLUMN_NAMES){
- table.append('<tr><th>' + COLUMN_NAMES.join('</th><th>') + '</th></tr>');
- }
- var lines = chunk.ck_data.split('\n');
- $.each(lines, function(index, line){
- table.append(renderRow(line));
- });
- current_chunk = chunk.ck_index;
- }
- }
-
- $(document).ready(function(){
- renderChunk(chunk);
- $(window).scroll(function(){
- if ($(window).scrollTop() == $(document).height() - $(window).height()){
- if (current_chunk !== -1){
- $.getJSON(DATASET_URL,
- {chunk: current_chunk},
- function(result){renderChunk(result)});
- }
- }
- });
- $('#loading_indicator').ajaxStart(function(){
- $(this).show();
- }).ajaxStop(function(){
- $(this).hide();
- });
- });
- </script>
-</%def>
-
-<%def name="stylesheets()">
- ${parent.stylesheets()}
-</%def>
-
-<div id="loading_indicator" ></div>
-<table id="content_table" cellpadding="0">
-</table>
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/copy.mako
--- a/templates/history/copy.mako
+++ /dev/null
@@ -1,27 +0,0 @@
-<% _=n_ %>
-<%inherit file="/base.mako"/>
-<%def name="title()">Copy History</%def>
-
-<div class="toolForm">
- <div class="toolFormTitle">Copy History</div>
- <div class="toolFormBody">
- <form action="${h.url_for( controller='history', action='copy' )}" method="post" >
- <div class="form-row">
- %if id_argument is not None:
- <input type="hidden" name="id" value="${id_argument}">
- %endif
- You can make a copy of the history that includes all datasets in the original history or just the active
- (not deleted) datasets.
- </div>
- <div class="form-row">
- <input type="radio" name="copy_choice" value="activatable"> Copy all datasets, including deleted ones
- </div>
- <div class="form-row">
- <input type="radio" name="copy_choice" value="active"> Copy only active (not deleted) datasets
- </div>
- <div class="form-row">
- <input type="submit" name="copy_choice_button" value="Copy">
- </div>
- </form>
- </div>
-</div>
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/display.mako
--- a/templates/history/display.mako
+++ /dev/null
@@ -1,84 +0,0 @@
-<%inherit file="/display_base.mako"/>
-<%namespace file="/root/history_common.mako" import="render_dataset" />
-
-## Set vars so that there's no need to change the code below.
-<%
- history = published_item
- datasets = published_item_data
-%>
-
-<%def name="javascripts()">
- ${parent.javascripts()}
-</%def>
-
-<%def name="stylesheets()">
- ${parent.stylesheets()}
- ${h.css( "history" )}
- <style type="text/css">
- .historyItemBody {
- display: none;
- }
- .column {
- float: left;
- padding: 10px;
- margin: 20px;
- background: #666;
- border: 5px solid #ccc;
- width: 300px;
- }
- </style>
-
- <noscript>
- <style>
- .historyItemBody {
- display: block;
- }
- </style>
- </noscript>
-</%def>
-
-<%def name="render_item_links( history )">
- <a
- href="${h.url_for( controller='/history', action='imp', id=trans.security.encode_id(history.id) )}"
- class="icon-button import"
- ## Needed to overwide initial width so that link is floated left appropriately.
- style="width: 100%"
- title="Import history">Import history</a>
-</%def>
-
-<%def name="render_item( history, datasets )">
- %if history.deleted:
- <div class="warningmessagesmall">
- ${_('You are currently viewing a deleted history!')}
- </div>
- <p></p>
- %endif
-
- %if not datasets:
- <div class="infomessagesmall" id="emptyHistoryMessage">
- %else:
- ## Render requested datasets, ordered from newest to oldest, including annotations.
- <table class="annotated-item">
- <tr><th>Dataset</th><th class="annotation">Annotation</th></tr>
- %for data in datasets:
- <tr>
- %if data.visible:
- <td>
- <div class="historyItemContainer visible-right-border" id="historyItemContainer-${data.id}">
- ${render_dataset( data, data.hid, show_deleted_on_refresh = show_deleted, for_editing=False )}
- </div>
- </td>
- <td class="annotation">
- %if hasattr( data, "annotation") and data.annotation is not None:
- ${data.annotation}
- %endif
- </td>
- %endif
- </tr>
- %endfor
- </table>
- <div class="infomessagesmall" id="emptyHistoryMessage" style="display:none;">
- %endif
- ${_("This history is empty.")}
- </div>
-</%def>
\ No newline at end of file
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/display_structured.mako
--- a/templates/history/display_structured.mako
+++ /dev/null
@@ -1,132 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/root/history_common.mako" import="render_dataset" />
-
-<%def name="stylesheets()">
- ${parent.stylesheets()}
- ${h.css( "history" )}
- <style type="text/css">
- body {
- background: white;
- padding: 5px;
- }
-
- .clickable {
- cursor: pointer;
- }
-
- .workflow {
- border: solid gray 1px;
- margin: 5px 0;
- border-left-width: 5px;
- }
-
- .workflow > .header {
- background: lightgray;
- padding: 5px 10px;
-
- font-weight: bold;
- }
-
- .workflow > .body {
- border-top: solid gray 1px;
- padding: 5px;
- }
-
- div.toolForm {
- margin: 5px 0;
- border-left-width: 5px;
- }
- div.toolFormBody {
- padding: 5px 5px;
- }
- </style>
-</%def>
-
-<%def name="javascripts()">
- ${parent.javascripts()}
- <script type="text/javascript">
- $(function(){
-
- $(".workflow, .tool").each( function() {
- var body = $(this).children( ".body" );
- $(this).children( ".header" ).click( function() {
- body.toggle();
- }).addClass( "clickable" );
- // body.hide();
- });
-
- $(".historyItem").each( function() {
- var id = this.id;
- var body = $(this).children( "div.historyItemBody" );
- var peek = body.find( "pre.peek" )
- $(this).children( ".historyItemTitleBar" ).find( ".historyItemTitle" ).wrap( "<a href='#'></a>" ).click( function() {
- if ( body.is(":visible") ) {
- // Hiding stuff here
- if ( $.browser.mozilla ) { peek.css( "overflow", "hidden" ) }
- body.slideUp( "fast" );
- } else {
- // Showing stuff here
- body.slideDown( "fast", function() {
- if ( $.browser.mozilla ) { peek.css( "overflow", "auto" ); }
- });
- }
- return false;
- });
- body.hide();
- });
- });
- </script>
-</%def>
-
-<%def name="render_item( entity, children )">
-<%
-entity_name = entity.__class__.__name__
-if entity_name == "HistoryDatasetAssociation":
- render_item_hda( entity, children )
-elif entity_name == "Job":
- render_item_job( entity, children )
-elif entity_name == "WorkflowInvocation":
- render_item_wf( entity, children )
-%>
-</%def>
-
-<%def name="render_item_hda( hda, children )">
- ${render_dataset( hda, hda.hid, display_structured=True )}
-</%def>
-
-<%def name="render_item_job( job, children )">
-
- <div class="tool toolForm">
- <%
- tool = trans.app.toolbox.get_tool( job.tool_id )
- if tool:
- tool_name = tool.name
- else:
- tool_name = "Unknown tool with id '%s'" % job.tool_id
- %>
- <div class="header toolFormTitle">Tool: ${tool_name}</div>
- <div class="body toolFormBody">
- %for e, c in reversed( children ):
- ${render_item( e, c )}
- %endfor
- </div>
- </div>
-
-</%def>
-
-<%def name="render_item_wf( wf, children )">
-
- <div class="workflow">
- <div class="header">Workflow: ${wf.workflow.name}</div>
- <div class="body">
- %for e, c in reversed( children ):
- ${render_item( e, c )}
- %endfor
- </div>
- </div>
-
-</%def>
-
-%for entity, children in items:
- ${render_item( entity, children )}
-%endfor
\ No newline at end of file
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/embed.mako
--- a/templates/history/embed.mako
+++ /dev/null
@@ -1,13 +0,0 @@
-<%inherit file="/embed_base.mako"/>
-<%!
- from galaxy.web.framework.helpers import iff
-%>
-
-<%def name="render_summary_content( history, datasets )">
-
-## <ul>
-## <% num_datasets = len ( datasets ) %>
-## <li>${num_datasets} dataset${iff( num_datasets != 1, "s", "" )}
-## <li>Operations: ...
-## </ul>
-</%def>
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/grid.mako
--- a/templates/history/grid.mako
+++ /dev/null
@@ -1,25 +0,0 @@
-<%inherit file="../grid_base.mako"/>
-
-<%def name="grid_javascripts()">
- ${parent.grid_javascripts()}
- <script type="text/javascript">
- %if refresh_frames:
- %if 'history' in refresh_frames:
- if ( parent.frames && parent.frames.galaxy_history ) {
- parent.frames.galaxy_history.location.href="${h.url_for( controller='root', action='history')}";
- if ( parent.force_right_panel ) {
- parent.force_right_panel( 'show' );
- }
- }
- %endif
- %endif
- </script>
-</%def>
-
-<%def name="grid_body( grid )">
- ${self.make_grid( grid )}
- <br/>
- <div class="toolParamHelp" style="clear: both;">
- Histories that have been deleted for more than a time period specified by the Galaxy administrator(s) may be permanently deleted.
- </div>
-</%def>
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/item_content.mako
--- a/templates/history/item_content.mako
+++ /dev/null
@@ -1,3 +0,0 @@
-<%namespace file="/history/display.mako" import="*" />
-
-${render_item( item, item_data )}
\ No newline at end of file
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/list_as_xml.mako
--- a/templates/history/list_as_xml.mako
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-<history_ids>
- %for i, history in enumerate( t.user.histories ):
- <data id="${trans.security.encode_id( history.id )}" hid="${i+1}" num="${len(history.datasets)}" name="${history.name}" create="${history.create_time}" update="${history.update_time}" >
- </data>
- %endfor
-</history_ids>
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/list_published.mako
--- a/templates/history/list_published.mako
+++ /dev/null
@@ -1,34 +0,0 @@
-<%inherit file="/webapps/galaxy/base_panels.mako"/>
-
-<%def name="init()">
-<%
- self.has_left_panel=False
- self.has_right_panel=False
- self.active_view="shared"
- self.message_box_visible=False
-%>
-</%def>
-
-<%def name="title()">
- Galaxy | Published Histories
-</%def>
-
-<%def name="stylesheets()">
- ${parent.stylesheets()}
- <style>
- .grid td {
- min-width: 100px;
- }
- </style>
-</%def>
-
-<%def name="center_panel()">
-
- <div style="overflow: auto; height: 100%;">
- <div class="page-container" style="padding: 10px;">
- ${h.to_unicode( grid )}
- </div>
- </div>
-
-
-</%def>
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/options.mako
--- a/templates/history/options.mako
+++ /dev/null
@@ -1,32 +0,0 @@
-<% _=n_ %>
-<%inherit file="/base.mako"/>
-<%def name="title()">History options</%def>
-
-<h2>${_('History Options')}</h2>
-
-%if not user:
-<div class="infomessage">
- <div>${_('You must be ')}<a target="galaxy_main" href="${h.url_for( controller='user', action='login' )}">${_('logged in')}</a>${_(' to store or switch histories.')}</div>
-</div>
-%endif
-
-<ul>
- %if user:
- <li><a href="${h.url_for( controller='history', action='list')}" target="galaxy_main">Previously</a> stored histories</li>
- %if len( history.active_datasets ) > 0:
- <li><a href="${h.url_for( controller='root', action='history_new' )}">Create</a> a new empty history</li>
- <li><a href="${h.url_for( controller='workflow', action='build_from_current_history' )}">Construct workflow</a> from current history</li>
- <li><a href="${h.url_for( controller='history', action='copy', id=trans.security.encode_id( history.id ) )}">Copy</a> current history</li>
- %endif
- <li><a href="${h.url_for( controller='history', action='share' )}" target="galaxy_main">Share</a> current history</div>
- <li><a href="${h.url_for( controller='root', action='history_set_default_permissions' )}">Change default permissions</a> for current history</li>
- %endif
- %if len( history.activatable_datasets ) > 0:
- <li><a href="${h.url_for( controller='root', action='history', show_deleted=True)}" target="galaxy_history">Show deleted</a> datasets in current history</li>
- %endif
- <li><a href="${h.url_for( controller='history', action='rename', id=trans.security.encode_id( history.id ) )}" target="galaxy_main">Rename</a> current history (stored as "${history.name}")</li>
- <li><a href="${h.url_for( controller='history', action='delete_current' )}" confirm="Are you sure you want to delete the current history?">Delete</a> current history</div>
- %if user and user.histories_shared_by_others:
- <li><a href="${h.url_for( controller='history', action='list_shared')}" target="galaxy_main">Histories</a> shared with you by others</li>
- %endif
-</ul>
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/permissions.mako
--- a/templates/history/permissions.mako
+++ /dev/null
@@ -1,8 +0,0 @@
-<%inherit file="/base.mako"/>
-<%def name="title()">Change Default Permissions on New Datasets in This History</%def>
-<%namespace file="/dataset/security_common.mako" import="render_permission_form" />
-
-%if trans.user:
- <% history = trans.get_history() %>
- ${render_permission_form( history, history.name, h.url_for(), trans.user.all_roles() )}
-%endif
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/rename.mako
--- a/templates/history/rename.mako
+++ /dev/null
@@ -1,38 +0,0 @@
-<%inherit file="/base.mako"/>
-<%def name="title()">${_('Rename History')}</%def>
-
-<div class="toolForm">
- <div class="toolFormTitle">${_('Rename')}</div>
- <div class="toolFormBody">
- <form action="${h.url_for( controller='history', action='rename' )}" method="post" >
- <div class="form-row">
- <table>
- <thead>
- <tr>
- <th>${_('Current Name')}</th>
- <th>${_('New Name')}</th>
- </tr>
- </thead>
- <tbody>
- %for history in histories:
- <tr>
- <td>
- <input type="hidden" name="id" value="${trans.security.encode_id( history.id )}">
- ${history.get_display_name() | h}
- </td>
- <td>
- <input type="text" name="name" value="${history.get_display_name() | h}" size="40">
- </td>
- </tr>
- %endfor
- </tbody>
- <tr>
- <td colspan="2">
- <input type="submit" name="history_rename_btn" value="${_('Rename Histories')}">
- </td>
- </tr>
- </table>
- </div>
- </form>
- </div>
-</div>
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/share.mako
--- a/templates/history/share.mako
+++ /dev/null
@@ -1,192 +0,0 @@
-<% _=n_ %>
-<%inherit file="/base.mako"/>
-<%def name="title()">Share histories</%def>
-
-<div class="toolForm">
- <div class="toolFormTitle">Share ${len( histories)} histories</div>
- <div class="toolFormBody">
- %if not can_change and not cannot_change and not no_change_needed:
- ## We are sharing histories that contain only public datasets
- <form name='share' id='share' action="${h.url_for( action='share' )}" method="post" >
- <div class="form-title-row"><b>Histories to be shared:</b></div>
- <div class="form-row" style="padding-left: 2em;">
- <table width="100%">
- <thead>
- <th>${_('History Name')}</th>
- <th>${_('Number of Datasets')}</th>
- </thead>
- <tbody>
- %for history in histories:
- <tr>
- <td>
- <input type="hidden" name="id" value="${trans.security.encode_id( history.id )}">
- ${ util.unicodify( history.name )}
- </td>
- <td>
- %if len( history.datasets ) < 1:
- <div class="warningmark">${_('This history contains no data.')}</div>
- %else:
- ${len(history.datasets)}
- %endif
- </td>
- </tr>
- %endfor
- </tbody>
- </table>
- </div>
- <div style="clear: both"></div>
- <div class="form-row">
- <label>Galaxy user emails with which to share histories</label>
- <div style="float: left; width: 250px; margin-right: 10px;">
- <input type="text" name="email" value="${email}" size="40">
- </div>
- <div class="toolParamHelp" style="clear: both;">
- Enter a Galaxy user email address or a comma-separated list of addresses if sharing with multiple users
- </div>
- </div>
- %if send_to_err:
- <div style="clear: both"></div>
- <div class="form-row">
- <div class="errormessage">${send_to_err}</div>
- </div>
- %endif
- <div style="clear: both"></div>
- <div class="form-row">
- <input type="submit" name="share_button" value="Submit">
- </div>
- </form>
- %else:
- ## We are sharing restricted histories
- %if no_change_needed or can_change:
- <form name='share_restricted' id=share_restricted' action="${h.url_for( controller='history', action='share_restricted' )}" method="post">
- %if send_to_err:
- <div style="clear: both"></div>
- <div class="form-row">
- <div class="errormessage">${send_to_err}</div>
- </div>
- %endif
- ## Needed for rebuilding dicts
- <input type="hidden" name="email" value="${email}" size="40">
- %for history in histories:
- <input type="hidden" name="id" value="${trans.security.encode_id( history.id )}">
- %endfor
- %if no_change_needed:
- ## no_change_needed looks like: {historyX : [hda, hda], historyY : [hda] }
- <div style="clear: both"></div>
- <div class="form-row">
- <div class="donemessage">
- The following datasets can be shared with ${email} with no changes
- </div>
- </div>
- %for history, hdas in no_change_needed.items():
- <div class="form-row">
- <label>History</label>
- ${util.unicodify( history.name )}
- </div>
- <div style="clear: both"></div>
- <div class="form-row">
- <label>Datasets</label>
- </div>
- %for hda in hdas:
- <div class="form-row">
- ${util.unicodify( hda.name )}
- %if hda.deleted:
- (deleted)
- %endif
- </div>
- %endfor
- %endfor
- %endif
- %if can_change:
- ## can_change looks like: {historyX : [hda, hda], historyY : [hda] }
- <div style="clear: both"></div>
- <div class="form-row">
- <div class="warningmessage">
- The following datasets can be shared with ${email} by updating their permissions
- </div>
- </div>
- %for history, hdas in can_change.items():
- <div class="form-row">
- <label>History</label>
- ${util.unicodify( history.name )}
- </div>
- <div style="clear: both"></div>
- <div class="form-row">
- <label>Datasets</label>
- </div>
- %for hda in hdas:
- <div class="form-row">
- ${util.unicodify( hda.name )}
- %if hda.deleted:
- (deleted)
- %endif
- </div>
- %endfor
- %endfor
- %endif
- %if cannot_change:
- ## cannot_change looks like: {historyX : [hda, hda], historyY : [hda] }
- <div style="clear: both"></div>
- <div class="form-row">
- <div class="errormessage">
- The following datasets cannot be shared with ${email} because you are not authorized to
- change the permissions on them
- </div>
- </div>
- %for history, hdas in cannot_change.items():
- <div class="form-row">
- <label>History</label>
- ${util.unicodify( history.name )}
- </div>
- <div style="clear: both"></div>
- <div class="form-row">
- <label>Datasets</label>
- </div>
- %for hda in hdas:
- <div class="form-row">
- ${util.unicodify( hda.name )}
- %if hda.deleted:
- (deleted)
- %endif
- </div>
- %endfor
- %endfor
- %endif
- <div class="toolFormTitle"></div>
- <div class="form-row">
- <label>How would you like to proceed?</label>
- </div>
- %if can_change:
- <div class="form-row">
- <input type="radio" name="action" value="public"> Make datasets public so anyone can access them
- %if cannot_change:
- (where possible)
- %endif
- </div>
- <div class="form-row">
- %if no_change_needed:
- <input type="radio" name="action" value="private"> Make datasets private to me and the user(s) with whom I am sharing
- %else:
- <input type="radio" name="action" value="private" checked> Make datasets private to me and the user(s) with whom I am sharing
- %endif
- %if cannot_change:
- (where possible)
- %endif
- </div>
- %endif
- %if no_change_needed:
- <div class="form-row">
- <input type="radio" name="action" value="share_anyway" checked> Share anyway
- %if can_change:
- (don't change any permissions)
- %endif
- </div>
- %endif
- <div class="form-row">
- <input type="submit" name="share_restricted_button" value="Go"><br/>
- </div>
- </form>
- %endif
- %endif
- </div>
-</div>
diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/view.mako
--- a/templates/history/view.mako
+++ /dev/null
@@ -1,140 +0,0 @@
-<%namespace file="/display_common.mako" import="get_history_link, get_controller_name" />
-<%namespace file="/root/history_common.mako" import="render_dataset" />
-<%namespace file="/tagging_common.mako" import="render_individual_tagging_element, render_community_tagging_element" />
-
-<%!
- def inherit(context):
- if context.get('use_panels'):
- return '/webapps/galaxy/base_panels.mako'
- else:
- return '/base.mako'
-%>
-<%inherit file="${inherit(context)}"/>
-
-<%def name="javascripts()">
- ${parent.javascripts()}
- ${h.js( "libs/jquery/jstorage" )}
- <script type="text/javascript">
- $(function() {
- init_history_items( $("div.historyItemWrapper"), false, "nochanges" );
- });
- </script>
-</%def>
-
-<%def name="stylesheets()">
- ${parent.stylesheets()}
- ${h.css( "history", "autocomplete_tagging" )}
- <style type="text/css">
- .historyItemContainer {
- padding-right: 3px;
- border-right-style: solid;
- border-right-color: #66AA66;
- }
- .page-body
- {
- padding: 10px;
- float: left;
- width: 65%;
- }
- .page-meta
- {
- float: right;
- width: 27%;
- padding: 0.5em;
- margin: 0.25em;
- vertical-align: text-top;
- border: 2px solid #DDDDDD;
- border-top: 4px solid #DDDDDD;
- }
- </style>
-
- <style>
- .historyItemBody {
- display: none;
- }
- </style>
-
- <noscript>
- <style>
- .historyItemBody {
- display: block;
- }
- </style>
- </noscript>
-</%def>
-
-<%def name="init()">
-<%
- self.has_left_panel=False
- self.has_right_panel=False
- self.message_box_visible=False
-%>
-</%def>
-
-<%def name="body()">
- ${center_panel()}
-</%def>
-
-<%def name="center_panel()">
- ## Get URL to other histories owned by user that owns this history.
- <%
- ##TODO: is there a better way to create this URL? Can't use 'f-username' as a key b/c it's not a valid identifier.
- href_to_published_histories = h.url_for( controller='/history', action='list_published')
- if history.user is not None:
- href_to_user_histories = h.url_for( controller='/history', action='list_published', xxx=history.user.username).replace( 'xxx', 'f-username')
- else:
- href_to_user_histories = h.url_for( controller='/history', action='list_published' )##should this instead be be None or empty string?
- %>
-
- <div class="unified-panel-header" unselectable="on">
- </div>
-
- <div class="unified-panel-body">
- <div style="overflow: auto; height: 100%;">
- ## Render view of history.
- <div id="top-links" class="historyLinks" style="padding: 0px 0px 5px 0px">
- %if not history.purged:
- <a href="${h.url_for( action='imp', id=trans.security.encode_id(history.id) )}">import and start using history</a> |
- <a href="${get_history_link( history )}">${_('refresh')}</a> |
- %endif
- %if show_deleted:
- <a href="${h.url_for( id=trans.security.encode_id(history.id), show_deleted=False, use_panels=use_panels )}">${_('hide deleted')}</a> |
- %else:
- <a href="${h.url_for( id=trans.security.encode_id(history.id), show_deleted=True, use_panels=use_panels )}">${_('show deleted')}</a> |
- %endif
- <a href="#" class="toggle">collapse all</a>
- </div>
-
- <div id="history-name-area" class="historyLinks" style="color: gray; font-weight: bold; padding: 0px 0px 5px 0px">
- <div id="history-name">${history.get_display_name()}</div>
- </div>
-
- %if history.deleted:
- <div class="warningmessagesmall">
- ${_('You are currently viewing a deleted history!')}
- </div>
- <p></p>
- %endif
-
- %if not datasets:
-
- <div class="infomessagesmall" id="emptyHistoryMessage">
-
- %else:
-
- ## Render requested datasets, ordered from newest to oldest
- %for data in datasets:
- %if data.visible:
- <div class="historyItemContainer visible-right-border" id="historyItemContainer-${data.id}">
- ${render_dataset( data, data.hid, show_deleted_on_refresh = show_deleted, for_editing=False )}
- </div>
- %endif
- %endfor
-
- <div class="infomessagesmall" id="emptyHistoryMessage" style="display:none;">
- %endif
- ${_("Your history is empty. Click 'Get Data' on the left pane to start")}
- </div>
- </div>
- </div>
-</%def>
This diff is so big that we needed to truncate the remainder.
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: james_taylor: base_panels: no longer need to specify has_(left|right)_panel, determined depending on whether the blocks are set. Moved some CSS into base.css
by Bitbucket 03 Feb '13
by Bitbucket 03 Feb '13
03 Feb '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/c714feaad115/
changeset: c714feaad115
user: james_taylor
date: 2013-02-04 04:57:32
summary: base_panels: no longer need to specify has_(left|right)_panel, determined depending on whether the blocks are set. Moved some CSS into base.css
affected #: 6 files
diff -r d2b192832826f531e7702461826822dbb8179acb -r c714feaad11541377edd84af1179869c1a8e4f47 lib/galaxy/webapps/galaxy/controllers/library.py
--- a/lib/galaxy/webapps/galaxy/controllers/library.py
+++ b/lib/galaxy/webapps/galaxy/controllers/library.py
@@ -79,6 +79,7 @@
default_action=default_action,
message=message,
status=status )
+
@web.expose
def browse_libraries( self, trans, **kwd ):
if 'operation' in kwd:
diff -r d2b192832826f531e7702461826822dbb8179acb -r c714feaad11541377edd84af1179869c1a8e4f47 static/june_2007_style/base.less
--- a/static/june_2007_style/base.less
+++ b/static/june_2007_style/base.less
@@ -31,8 +31,19 @@
background-repeat: repeat-x;
background-position: top;
margin: 10px;
+
+ // For panel layout pages
+ &.full-content {
+ overflow: hidden;
+ margin: 0;
+ padding: 0;
+ width: 100%;
+ height: 100%;
+ }
+
}
+
img {
border: 0;
}
@@ -410,7 +421,7 @@
width:100%;
min-width:900px;
height:32px;
- // background: @masthead_bg;
+ background: @masthead_bg;
// color:#fff;
border-bottom: solid @layout_masthead_border 1px;
z-index: 15000;
diff -r d2b192832826f531e7702461826822dbb8179acb -r c714feaad11541377edd84af1179869c1a8e4f47 static/june_2007_style/blue/base.css
--- a/static/june_2007_style/blue/base.css
+++ b/static/june_2007_style/blue/base.css
@@ -892,7 +892,7 @@
.clear:after{clear:both;}
.clear:before,.clear:after{display:table;content:"";line-height:0;}
.clear:after{clear:both;}
-body{background:#ffffff;color:#303030;background-image:url(base_bg.png);background-repeat:repeat-x;background-position:top;margin:10px;}
+body{background:#ffffff;color:#303030;background-image:url(base_bg.png);background-repeat:repeat-x;background-position:top;margin:10px;}body.full-content{overflow:hidden;margin:0;padding:0;width:100%;height:100%;}
img{border:0;}
a,a:link,a:visited,a:active{text-decoration:underline;color:#303030;}
.nav-tabs a{text-decoration:none;}
@@ -936,7 +936,7 @@
.panel-warning-message{background-image:url(warn_small.png);background-color:#ffffcc;}
.panel-done-message{background-image:url(ok_small.png);background-color:#ccffcc;}
.panel-info-message{background-image:url(info_small.png);background-color:#d9edf7;}
-#masthead{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;overflow:visible;margin-bottom:16px;*position:relative;*z-index:2;position:absolute;top:0;left:0;width:100%;min-width:900px;height:32px;border-bottom:solid #444444 1px;z-index:15000;padding:0;}#masthead .nav{z-index:10000;background-color:#2c3143;}
+#masthead{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;overflow:visible;margin-bottom:16px;*position:relative;*z-index:2;position:absolute;top:0;left:0;width:100%;min-width:900px;height:32px;background:#2c3143;border-bottom:solid #444444 1px;z-index:15000;padding:0;}#masthead .nav{z-index:10000;background-color:#2c3143;}
#masthead .nav>li>a{padding:8px 10px 8px;cursor:pointer;}#masthead .nav>li>a:hover{color:gold;}
#masthead .dropdown-menu a,#masthead .dropdown-menu a:hover{text-decoration:none;}
#masthead .dropdown-toggle .caret{margin-top:7px;}
diff -r d2b192832826f531e7702461826822dbb8179acb -r c714feaad11541377edd84af1179869c1a8e4f47 static/june_2007_style/galaxy_bootstrap.less
--- a/static/june_2007_style/galaxy_bootstrap.less
+++ b/static/june_2007_style/galaxy_bootstrap.less
@@ -107,7 +107,6 @@
margin-left: -330px;
}
-
.modal:after {
content: "";
height: 0px;
@@ -115,8 +114,7 @@
top: 50px;
display: block;
border: solid transparent 1px;
-};
-
+}
.modal-body {
height: auto;
@@ -203,4 +201,4 @@
border-width: 0 @tooltipArrowWidth @tooltipArrowWidth;
border-bottom-color: @tooltipArrowColor;
}
-}
\ No newline at end of file
+}
diff -r d2b192832826f531e7702461826822dbb8179acb -r c714feaad11541377edd84af1179869c1a8e4f47 templates/base/base_panels.mako
--- a/templates/base/base_panels.mako
+++ b/templates/base/base_panels.mako
@@ -1,8 +1,8 @@
<!DOCTYPE HTML><%
- self.has_left_panel=True
- self.has_right_panel=True
+ self.has_left_panel = hasattr( self, 'left_panel' )
+ self.has_right_panel = hasattr( self, 'right_panel' )
self.message_box_visible=False
self.overlay_visible=False
self.message_box_class=""
@@ -17,15 +17,8 @@
## Default stylesheets
<%def name="stylesheets()">
- ${h.css('base','panel_layout','jquery.rating')}
+ ${h.css('base','jquery.rating')}
<style type="text/css">
- body, html {
- overflow: hidden;
- margin: 0;
- padding: 0;
- width: 100%;
- height: 100%;
- }
#center {
%if not self.has_left_panel:
left: 0 !important;
@@ -270,7 +263,7 @@
${self.javascripts()}
</head>
- <body scroll="no" class="${self.body_class}">
+ <body scroll="no" class="full-content ${self.body_class}">
%if self.require_javascript:
<noscript><div class="overlay overlay-background">
diff -r d2b192832826f531e7702461826822dbb8179acb -r c714feaad11541377edd84af1179869c1a8e4f47 templates/workflow/index.mako
--- a/templates/workflow/index.mako
+++ b/templates/workflow/index.mako
@@ -2,10 +2,7 @@
<%def name="init()"><%
- self.has_left_panel=False
- self.has_right_panel=False
self.active_view="workflow"
- self.message_box_visible=False
%></%def>
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
02 Feb '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/d2b192832826/
changeset: d2b192832826
user: james_taylor
date: 2013-02-03 01:39:42
summary: Customize errormiddleware with a better appearence for internal server errors, show sentry ID is enabled, modify sentry middleware to store id in environment and pass request_id with log messages
affected #: 3 files
diff -r fc99a36f9d2195bc742f6e557ae56b7b61ad6766 -r d2b192832826f531e7702461826822dbb8179acb lib/galaxy/web/framework/middleware/error.py
--- /dev/null
+++ b/lib/galaxy/web/framework/middleware/error.py
@@ -0,0 +1,484 @@
+# Like many things, this started life as part of Paste
+
+# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
+# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
+
+"""
+Error handler middleware
+
+When an exception is thrown from the wrapper application, this logs
+the exception and displays an error page.
+"""
+import sys
+import traceback
+import cgi
+try:
+ from cStringIO import StringIO
+except ImportError:
+ from StringIO import StringIO
+from paste.exceptions import formatter, collector, reporter
+from paste import wsgilib
+from paste import request
+
+__all__ = ['ErrorMiddleware', 'handle_exception']
+
+class _NoDefault(object):
+ def __repr__(self):
+ return '<NoDefault>'
+NoDefault = _NoDefault()
+
+class ErrorMiddleware(object):
+
+ """
+ Error handling middleware
+
+ Usage::
+
+ error_catching_wsgi_app = ErrorMiddleware(wsgi_app)
+
+ Settings:
+
+ ``debug``:
+ If true, then tracebacks will be shown in the browser.
+
+ ``error_email``:
+ an email address (or list of addresses) to send exception
+ reports to
+
+ ``error_log``:
+ a filename to append tracebacks to
+
+ ``show_exceptions_in_wsgi_errors``:
+ If true, then errors will be printed to ``wsgi.errors``
+ (frequently a server error log, or stderr).
+
+ ``from_address``, ``smtp_server``, ``error_subject_prefix``, ``smtp_username``, ``smtp_password``, ``smtp_use_tls``:
+ variables to control the emailed exception reports
+
+ ``error_message``:
+ When debug mode is off, the error message to show to users.
+
+ ``xmlhttp_key``:
+ When this key (default ``_``) is in the request GET variables
+ (not POST!), expect that this is an XMLHttpRequest, and the
+ response should be more minimal; it should not be a complete
+ HTML page.
+
+ Environment Configuration:
+
+ ``paste.throw_errors``:
+ If this setting in the request environment is true, then this
+ middleware is disabled. This can be useful in a testing situation
+ where you don't want errors to be caught and transformed.
+
+ ``paste.expected_exceptions``:
+ When this middleware encounters an exception listed in this
+ environment variable and when the ``start_response`` has not
+ yet occurred, the exception will be re-raised instead of being
+ caught. This should generally be set by middleware that may
+ (but probably shouldn't be) installed above this middleware,
+ and wants to get certain exceptions. Exceptions raised after
+ ``start_response`` have been called are always caught since
+ by definition they are no longer expected.
+
+ """
+
+ def __init__(self, application, global_conf=None,
+ debug=NoDefault,
+ error_email=None,
+ error_log=None,
+ show_exceptions_in_wsgi_errors=NoDefault,
+ from_address=None,
+ smtp_server=None,
+ smtp_username=None,
+ smtp_password=None,
+ smtp_use_tls=False,
+ error_subject_prefix=None,
+ error_message=None,
+ xmlhttp_key=None):
+ from paste.util import converters
+ self.application = application
+ # @@: global_conf should be handled elsewhere in a separate
+ # function for the entry point
+ if global_conf is None:
+ global_conf = {}
+ if debug is NoDefault:
+ debug = converters.asbool(global_conf.get('debug'))
+ if show_exceptions_in_wsgi_errors is NoDefault:
+ show_exceptions_in_wsgi_errors = converters.asbool(global_conf.get('show_exceptions_in_wsgi_errors'))
+ self.debug_mode = converters.asbool(debug)
+ if error_email is None:
+ error_email = (global_conf.get('error_email')
+ or global_conf.get('admin_email')
+ or global_conf.get('webmaster_email')
+ or global_conf.get('sysadmin_email'))
+ self.error_email = converters.aslist(error_email)
+ self.error_log = error_log
+ self.show_exceptions_in_wsgi_errors = show_exceptions_in_wsgi_errors
+ if from_address is None:
+ from_address = global_conf.get('error_from_address', 'errors@localhost')
+ self.from_address = from_address
+ if smtp_server is None:
+ smtp_server = global_conf.get('smtp_server', 'localhost')
+ self.smtp_server = smtp_server
+ self.smtp_username = smtp_username or global_conf.get('smtp_username')
+ self.smtp_password = smtp_password or global_conf.get('smtp_password')
+ self.smtp_use_tls = smtp_use_tls or converters.asbool(global_conf.get('smtp_use_tls'))
+ self.error_subject_prefix = error_subject_prefix or ''
+ if error_message is None:
+ error_message = global_conf.get('error_message')
+ self.error_message = error_message
+ if xmlhttp_key is None:
+ xmlhttp_key = global_conf.get('xmlhttp_key', '_')
+ self.xmlhttp_key = xmlhttp_key
+
+ def __call__(self, environ, start_response):
+ """
+ The WSGI application interface.
+ """
+ # We want to be careful about not sending headers twice,
+ # and the content type that the app has committed to (if there
+ # is an exception in the iterator body of the response)
+ if environ.get('paste.throw_errors'):
+ return self.application(environ, start_response)
+ environ['paste.throw_errors'] = True
+
+ try:
+ __traceback_supplement__ = Supplement, self, environ
+ sr_checker = ResponseStartChecker(start_response)
+ app_iter = self.application(environ, sr_checker)
+ return self.make_catching_iter(app_iter, environ, sr_checker)
+ except:
+ exc_info = sys.exc_info()
+ try:
+ for expect in environ.get('paste.expected_exceptions', []):
+ if isinstance(exc_info[1], expect):
+ raise
+ start_response('500 Internal Server Error',
+ [('content-type', 'text/html')],
+ exc_info)
+ # @@: it would be nice to deal with bad content types here
+ response = self.exception_handler(exc_info, environ)
+ return [response]
+ finally:
+ # clean up locals...
+ exc_info = None
+
+ def make_catching_iter(self, app_iter, environ, sr_checker):
+ if isinstance(app_iter, (list, tuple)):
+ # These don't raise
+ return app_iter
+ return CatchingIter(app_iter, environ, sr_checker, self)
+
+ def exception_handler(self, exc_info, environ):
+ simple_html_error = False
+ if self.xmlhttp_key:
+ get_vars = wsgilib.parse_querystring(environ)
+ if dict(get_vars).get(self.xmlhttp_key):
+ simple_html_error = True
+ return handle_exception(
+ exc_info, environ['wsgi.errors'],
+ html=True,
+ debug_mode=self.debug_mode,
+ error_email=self.error_email,
+ error_log=self.error_log,
+ show_exceptions_in_wsgi_errors=self.show_exceptions_in_wsgi_errors,
+ error_email_from=self.from_address,
+ smtp_server=self.smtp_server,
+ smtp_username=self.smtp_username,
+ smtp_password=self.smtp_password,
+ smtp_use_tls=self.smtp_use_tls,
+ error_subject_prefix=self.error_subject_prefix,
+ error_message=self.error_message,
+ simple_html_error=simple_html_error,
+ environ=environ)
+
+class ResponseStartChecker(object):
+ def __init__(self, start_response):
+ self.start_response = start_response
+ self.response_started = False
+
+ def __call__(self, *args):
+ self.response_started = True
+ self.start_response(*args)
+
+class CatchingIter(object):
+
+ """
+ A wrapper around the application iterator that will catch
+ exceptions raised by the a generator, or by the close method, and
+ display or report as necessary.
+ """
+
+ def __init__(self, app_iter, environ, start_checker, error_middleware):
+ self.app_iterable = app_iter
+ self.app_iterator = iter(app_iter)
+ self.environ = environ
+ self.start_checker = start_checker
+ self.error_middleware = error_middleware
+ self.closed = False
+
+ def __iter__(self):
+ return self
+
+ def next(self):
+ __traceback_supplement__ = (
+ Supplement, self.error_middleware, self.environ)
+ if self.closed:
+ raise StopIteration
+ try:
+ return self.app_iterator.next()
+ except StopIteration:
+ self.closed = True
+ close_response = self._close()
+ if close_response is not None:
+ return close_response
+ else:
+ raise StopIteration
+ except:
+ self.closed = True
+ close_response = self._close()
+ exc_info = sys.exc_info()
+ response = self.error_middleware.exception_handler(
+ exc_info, self.environ)
+ if close_response is not None:
+ response += (
+ '<hr noshade>Error in .close():<br>%s'
+ % close_response)
+
+ if not self.start_checker.response_started:
+ self.start_checker('500 Internal Server Error',
+ [('content-type', 'text/html')],
+ exc_info)
+
+ return response
+
+ def close(self):
+ # This should at least print something to stderr if the
+ # close method fails at this point
+ if not self.closed:
+ self._close()
+
+ def _close(self):
+ """Close and return any error message"""
+ if not hasattr(self.app_iterable, 'close'):
+ return None
+ try:
+ self.app_iterable.close()
+ return None
+ except:
+ close_response = self.error_middleware.exception_handler(
+ sys.exc_info(), self.environ)
+ return close_response
+
+
+class Supplement(object):
+
+ """
+ This is a supplement used to display standard WSGI information in
+ the traceback.
+ """
+
+ def __init__(self, middleware, environ):
+ self.middleware = middleware
+ self.environ = environ
+ self.source_url = request.construct_url(environ)
+
+ def extraData(self):
+ data = {}
+ cgi_vars = data[('extra', 'CGI Variables')] = {}
+ wsgi_vars = data[('extra', 'WSGI Variables')] = {}
+ hide_vars = ['paste.config', 'wsgi.errors', 'wsgi.input',
+ 'wsgi.multithread', 'wsgi.multiprocess',
+ 'wsgi.run_once', 'wsgi.version',
+ 'wsgi.url_scheme']
+ for name, value in self.environ.items():
+ if name.upper() == name:
+ if value:
+ cgi_vars[name] = value
+ elif name not in hide_vars:
+ wsgi_vars[name] = value
+ if self.environ['wsgi.version'] != (1, 0):
+ wsgi_vars['wsgi.version'] = self.environ['wsgi.version']
+ proc_desc = tuple([int(bool(self.environ[key]))
+ for key in ('wsgi.multiprocess',
+ 'wsgi.multithread',
+ 'wsgi.run_once')])
+ wsgi_vars['wsgi process'] = self.process_combos[proc_desc]
+ wsgi_vars['application'] = self.middleware.application
+ if 'paste.config' in self.environ:
+ data[('extra', 'Configuration')] = dict(self.environ['paste.config'])
+ return data
+
+ process_combos = {
+ # multiprocess, multithread, run_once
+ (0, 0, 0): 'Non-concurrent server',
+ (0, 1, 0): 'Multithreaded',
+ (1, 0, 0): 'Multiprocess',
+ (1, 1, 0): 'Multi process AND threads (?)',
+ (0, 0, 1): 'Non-concurrent CGI',
+ (0, 1, 1): 'Multithread CGI (?)',
+ (1, 0, 1): 'CGI',
+ (1, 1, 1): 'Multi thread/process CGI (?)',
+ }
+
+def handle_exception(exc_info, error_stream, html=True,
+ debug_mode=False,
+ error_email=None,
+ error_log=None,
+ show_exceptions_in_wsgi_errors=False,
+ error_email_from='errors@localhost',
+ smtp_server='localhost',
+ smtp_username=None,
+ smtp_password=None,
+ smtp_use_tls=False,
+ error_subject_prefix='',
+ error_message=None,
+ simple_html_error=False,
+ environ=None
+ ):
+ """
+ For exception handling outside of a web context
+
+ Use like::
+
+ import sys
+ from paste.exceptions.errormiddleware import handle_exception
+ try:
+ do stuff
+ except:
+ handle_exception(
+ sys.exc_info(), sys.stderr, html=False, ...other config...)
+
+ If you want to report, but not fully catch the exception, call
+ ``raise`` after ``handle_exception``, which (when given no argument)
+ will reraise the exception.
+ """
+ reported = False
+ exc_data = collector.collect_exception(*exc_info)
+ extra_data = ''
+ if error_email:
+ rep = reporter.EmailReporter(
+ to_addresses=error_email,
+ from_address=error_email_from,
+ smtp_server=smtp_server,
+ smtp_username=smtp_username,
+ smtp_password=smtp_password,
+ smtp_use_tls=smtp_use_tls,
+ subject_prefix=error_subject_prefix)
+ rep_err = send_report(rep, exc_data, html=html)
+ if rep_err:
+ extra_data += rep_err
+ else:
+ reported = True
+ if error_log:
+ rep = reporter.LogReporter(
+ filename=error_log)
+ rep_err = send_report(rep, exc_data, html=html)
+ if rep_err:
+ extra_data += rep_err
+ else:
+ reported = True
+ if show_exceptions_in_wsgi_errors:
+ rep = reporter.FileReporter(
+ file=error_stream)
+ rep_err = send_report(rep, exc_data, html=html)
+ if rep_err:
+ extra_data += rep_err
+ else:
+ reported = True
+ else:
+ error_stream.write('Error - %s: %s\n' % (
+ exc_data.exception_type, exc_data.exception_value))
+ if html:
+ if debug_mode and simple_html_error:
+ return_error = formatter.format_html(
+ exc_data, include_hidden_frames=False,
+ include_reusable=False, show_extra_data=False)
+ reported = True
+ elif debug_mode and not simple_html_error:
+ error_html = formatter.format_html(
+ exc_data,
+ include_hidden_frames=True,
+ include_reusable=False)
+ head_html = formatter.error_css + formatter.hide_display_js
+ return_error = error_template(
+ head_html, error_html, extra_data)
+ extra_data = ''
+ reported = True
+ else:
+ msg = error_message or '''
+ An error occurred.
+ '''
+ extra = "<p><b>The error has been logged to our team.</b>"
+ if 'sentry_event_id' in environ:
+ extra += " If you want to contact us about this error, please reference the following<br><br>"
+ extra += "<b><large>GURU MEDITATION: #" + environ['sentry_event_id'] + "</large></b>"
+ extra += "</p>"
+ return_error = error_template('', msg, extra)
+ else:
+ return_error = None
+ if not reported and error_stream:
+ err_report = formatter.format_text(exc_data, show_hidden_frames=True)
+ err_report += '\n' + '-'*60 + '\n'
+ error_stream.write(err_report)
+ if extra_data:
+ error_stream.write(extra_data)
+ return return_error
+
+def send_report(rep, exc_data, html=True):
+ try:
+ rep.report(exc_data)
+ except:
+ output = StringIO()
+ traceback.print_exc(file=output)
+ if html:
+ return """
+ <p>Additionally an error occurred while sending the %s report:
+
+ <pre>%s</pre>
+ </p>""" % (
+ cgi.escape(str(rep)), output.getvalue())
+ else:
+ return (
+ "Additionally an error occurred while sending the "
+ "%s report:\n%s" % (str(rep), output.getvalue()))
+ else:
+ return ''
+
+def error_template(head_html, exception, extra):
+ return '''
+ <!DOCTYPE HTML>
+ <html>
+ <head>
+ <style type="text/css">
+ body { color: #303030; background: #dfe5f9; font-family:"Lucida Grande",verdana,arial,helvetica,sans-serif; font-size:12px; line-height:16px; }
+ .content { max-width: 720px; margin: auto; margin-top: 50px; }
+ </style>
+ <title>Internal Server Error</title>
+ %s
+ </head>
+ <body>
+ <div class="content">
+ <h1>Internal Server Error</h1>
+
+ <h2>Galaxy was unable to sucessfully complete your request</h2>
+
+ <p>%s</p>
+
+ This may be an intermittent problem due to load or other unpredictable factors, reloading the page may address the problem.
+
+ %s
+ </div>
+ </body>
+ </html>''' % (head_html, exception, extra)
+
+def make_error_middleware(app, global_conf, **kw):
+ return ErrorMiddleware(app, global_conf=global_conf, **kw)
+
+doc_lines = ErrorMiddleware.__doc__.splitlines(True)
+for i in range(len(doc_lines)):
+ if doc_lines[i].strip().startswith('Settings'):
+ make_error_middleware.__doc__ = ''.join(doc_lines[i:])
+ break
+del i, doc_lines
\ No newline at end of file
diff -r fc99a36f9d2195bc742f6e557ae56b7b61ad6766 -r d2b192832826f531e7702461826822dbb8179acb lib/galaxy/web/framework/middleware/sentry.py
--- /dev/null
+++ b/lib/galaxy/web/framework/middleware/sentry.py
@@ -0,0 +1,70 @@
+"""
+raven.middleware
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
+:license: BSD, see LICENSE for more details.
+"""
+
+import galaxy.eggs; galaxy.eggs.require( "raven" )
+
+from raven import Client
+from raven.utils.wsgi import get_current_url, get_headers, \
+ get_environ
+
+class Sentry(object):
+ """
+ A WSGI middleware which will attempt to capture any
+ uncaught exceptions and send them to Sentry.
+
+ >>> from raven.base import Client
+ >>> application = Sentry(application, Client())
+ """
+ def __init__(self, application, dsn):
+ self.application = application
+ self.client = Client( dsn )
+
+ def __call__(self, environ, start_response):
+ try:
+ iterable = self.application(environ, start_response)
+ except Exception:
+ self.handle_exception(environ)
+ raise
+
+ try:
+ for event in iterable:
+ yield event
+ except Exception:
+ self.handle_exception(environ)
+ raise
+ finally:
+ # wsgi spec requires iterable to call close if it exists
+ # see http://blog.dscpl.com.au/2012/10/obligations-for-calling-close-on.html
+ if iterable and hasattr(iterable, 'close') and callable(iterable.close):
+ try:
+ iterable.close()
+ except Exception:
+ self.handle_exception(environ)
+
+ def handle_exception(self, environ):
+ event_id = self.client.captureException(
+ data={
+ 'sentry.interfaces.Http': {
+ 'method': environ.get('REQUEST_METHOD'),
+ 'url': get_current_url(environ, strip_querystring=True),
+ 'query_string': environ.get('QUERY_STRING'),
+ # TODO
+ # 'data': environ.get('wsgi.input'),
+ 'headers': dict(get_headers(environ)),
+ 'env': dict(get_environ(environ)),
+ }
+ },
+ # Galaxy: add request id from environment if available
+ extra={
+ 'request_id': environ.get( 'request_id', 'Unknown' )
+ }
+ )
+ # Galaxy: store event_id in environment so we can show it to the user
+ environ['sentry_event_id'] = event_id[0]
+
+ return event_id
\ No newline at end of file
diff -r fc99a36f9d2195bc742f6e557ae56b7b61ad6766 -r d2b192832826f531e7702461826822dbb8179acb lib/galaxy/webapps/galaxy/buildapp.py
--- a/lib/galaxy/webapps/galaxy/buildapp.py
+++ b/lib/galaxy/webapps/galaxy/buildapp.py
@@ -242,12 +242,10 @@
log.debug( "Enabling 'recursive' middleware" )
# If sentry logging is enabled, log here before propogating up to
# the error middleware
- sentry_url = conf.get( 'sentry_url', None )
- if sentry_url:
- pkg_resources.require( "raven")
- from raven import Client
- from raven.middleware import Sentry
- app = Sentry( app, Client( sentry_url ) )
+ sentry_dsn = conf.get( 'sentry_dsn', None )
+ if sentry_dsn:
+ from galaxy.web.framework.middleware.sentry import Sentry
+ app = Sentry( app, sentry_dsn )
# Various debug middleware that can only be turned on if the debug
# flag is set, either because they are insecure or greatly hurt
# performance
@@ -275,11 +273,11 @@
# Not in interactive debug mode, just use the regular error middleware
if sys.version_info[:2] >= ( 2, 6 ):
warnings.filterwarnings( 'ignore', '.*', DeprecationWarning, '.*serial_number_generator', 11, True )
- from paste.exceptions import errormiddleware
+ import galaxy.web.framework.middleware.error
warnings.filters.pop()
else:
- from paste.exceptions import errormiddleware
- app = errormiddleware.ErrorMiddleware( app, conf )
+ import galaxy.web.framework.middleware.error
+ app = galaxy.web.framework.middleware.error.ErrorMiddleware( app, conf )
log.debug( "Enabling 'error' middleware" )
# Transaction logging (apache access.log style)
if asbool( conf.get( 'use_translogger', True ) ):
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/fc99a36f9d21/
changeset: fc99a36f9d21
user: james_taylor
date: 2013-02-03 00:29:05
summary: Fix leftover debug code
affected #: 2 files
diff -r 708d0ccee63fc75eb88e5dc3a9e0d6d3e5ff72e7 -r fc99a36f9d2195bc742f6e557ae56b7b61ad6766 templates/base.mako
--- a/templates/base.mako
+++ b/templates/base.mako
@@ -54,7 +54,7 @@
${h.js(
"mvc/ui"
)}
-
+
<script type="text/javascript">
// console protection
window.console = window.console || {
diff -r 708d0ccee63fc75eb88e5dc3a9e0d6d3e5ff72e7 -r fc99a36f9d2195bc742f6e557ae56b7b61ad6766 templates/root/tool_menu.mako
--- a/templates/root/tool_menu.mako
+++ b/templates/root/tool_menu.mako
@@ -74,7 +74,7 @@
});
*/
- $( '.tooltip' ).tooltip().foasdasdasdoo();
+ $( '.tooltip' ).tooltip();
// TODO: is this necessary?
$( "a[minsizehint]" ).click( function() {
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