galaxy-commits
Threads by month
- ----- 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
November 2012
- 1 participants
- 133 discussions
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/c2e7520982ef/
changeset: c2e7520982ef
user: carlfeberhard
date: 2012-11-08 20:42:26
summary: (alt)history: move show_deleted, show_hidden to the client. galaxy.util: added string_as_bool_or_none which parses True/False/None values from controller args.
affected #: 11 files
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 lib/galaxy/util/__init__.py
--- a/lib/galaxy/util/__init__.py
+++ b/lib/galaxy/util/__init__.py
@@ -339,6 +339,24 @@
else:
return False
+def string_as_bool_or_none( string ):
+ """
+ Returns True, None or False based on the argument:
+ True if passed True, 'True', 'Yes', or 'On'
+ None if passed None or 'None'
+ False otherwise
+
+ Note: string comparison is case-insensitive so lowecase versions of those
+ function equivalently.
+ """
+ string = str( string ).lower()
+ if string in ( 'true', 'yes', 'on' ):
+ return True
+ elif string == 'none':
+ return None
+ else:
+ return False
+
def listify( item ):
"""
Make a single item a single item list, or return a list if passed a
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 lib/galaxy/webapps/galaxy/controllers/root.py
--- a/lib/galaxy/webapps/galaxy/controllers/root.py
+++ b/lib/galaxy/webapps/galaxy/controllers/root.py
@@ -98,7 +98,8 @@
return trans.fill_template_mako( "/my_data.mako" )
@web.expose
- def history( self, trans, as_xml=False, show_deleted=False, show_hidden=False, hda_id=None, **kwd ):
+ #def history( self, trans, as_xml=False, show_deleted=False, show_hidden=False, hda_id=None, **kwd ):
+ def history( self, trans, as_xml=False, show_deleted=None, show_hidden=None, hda_id=None, **kwd ):
"""
Display the current history, creating a new history if necessary.
NOTE: No longer accepts "id" or "template" options for security reasons.
@@ -116,9 +117,9 @@
show_deleted=util.string_as_bool( show_deleted ),
show_hidden=util.string_as_bool( show_hidden ) )
else:
- show_deleted = util.string_as_bool( show_deleted )
- show_hidden = util.string_as_bool( show_hidden )
- show_purged = util.string_as_bool( show_deleted )
+ show_deleted = util.string_as_bool_or_none( show_deleted )
+ show_purged = show_deleted
+ show_hidden = util.string_as_bool_or_none( show_hidden )
datasets = []
history_panel_template = "root/history.mako"
@@ -128,6 +129,7 @@
if 'USE_ALTERNATE' in locals():
datasets = self.get_history_datasets( trans, history,
show_deleted=True, show_hidden=True, show_purged=True )
+ #datasets = self.get_history_datasets( trans, history, show_deleted, show_hidden, show_purged )
history_panel_template = "root/alternate_history.mako"
else:
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 static/scripts/mvc/history/history-model.js
--- a/static/scripts/mvc/history/history-model.js
+++ b/static/scripts/mvc/history/history-model.js
@@ -17,10 +17,10 @@
name : '',
state : '',
- //TODO: wire these to items (or this)
- show_deleted : false,
- show_hidden : false,
-
+ ////TODO: wire these to items (or this)
+ //show_deleted : false,
+ //show_hidden : false,
+ //
diskSize : 0,
deleted : false,
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 static/scripts/mvc/history/history-panel.js
--- a/static/scripts/mvc/history/history-panel.js
+++ b/static/scripts/mvc/history/history-panel.js
@@ -8,6 +8,8 @@
anon user, mako template init:
bug: rename url seems to be wrong url
+ BUG: shouldn't have tag/anno buttons (on hdas)
+
logged in, mako template:
BUG: meter is not updating RELIABLY on change:nice_size
BUG: am able to start upload even if over quota - 'runs' forever
@@ -54,6 +56,8 @@
show_deleted/hidden:
use storage
on/off ui
+ need urls
+ change template
move histview fadein/out in render to app?
don't draw body until it's first expand event
localize all
@@ -124,10 +128,30 @@
// data that needs to be persistant over page refreshes
// (note the key function which uses the history id as well)
- this.storage = new PersistantStorage(
- 'HistoryView.' + this.model.get( 'id' ),
- { expandedHdas : {} }
- );
+ this.storage = new PersistantStorage( 'HistoryView.' + this.model.get( 'id' ), {
+ expandedHdas : {},
+ show_deleted : false,
+ show_hidden : false
+ });
+ this.log( 'this.storage:', this.storage.get() );
+
+ // get the show_deleted/hidden settings giving priority to values passed into initialize, but
+ // using web storage otherwise
+ this.log( 'show_deleted:', attributes.show_deleted, 'show_hidden', attributes.show_hidden );
+ // if the page has specifically requested show_deleted/hidden, these will be either true or false
+ // (as opposed to undefined, null) - and we give priority to that setting
+ if( ( attributes.show_deleted === true ) || ( attributes.show_deleted === false ) ){
+ // save them to web storage
+ this.storage.set( 'show_deleted', attributes.show_deleted );
+ }
+ if( ( attributes.show_hidden === true ) || ( attributes.show_hidden === false ) ){
+ this.storage.set( 'show_hidden', attributes.show_hidden );
+ }
+ // pull show_deleted/hidden from the web storage if the page hasn't specified whether to show_deleted/hidden,
+ this.show_deleted = this.storage.get( 'show_deleted' );
+ this.show_hidden = this.storage.get( 'show_hidden' );
+ this.log( 'this.show_deleted:', this.show_deleted, 'show_hidden', this.show_hidden );
+ this.log( '(now) this.storage:', this.storage.get() );
// bind events from the model's hda collection
//this.model.bind( 'change', this.render, this );
@@ -189,7 +213,8 @@
// render the main template, tooltips
//NOTE: this is done before the items, since item views should handle theirs themselves
newRender.append( HistoryPanel.templates.historyPanel( modelJson ) );
- newRender.find( '.tooltip' ).tooltip();
+ newRender.find( '.tooltip' ).tooltip({ placement: 'bottom' });
+ this.setUpActionButton( newRender.find( '#history-action-popup' ) );
// render hda views (if any and any shown (show_deleted/hidden)
if( !this.model.hdas.length
@@ -227,13 +252,26 @@
return this;
},
+ setUpActionButton : function( $button ){
+ var historyPanel = this,
+ show_deletedText = ( this.storage.get( 'show_deleted' ) )?( 'Hide deleted' ):( 'Show deleted' ),
+ show_hiddenText = ( this.storage.get( 'show_hidden' ) )?( 'Hide hidden' ):( 'Show hidden' ),
+ menuActions = {};
+ menuActions[ _l( 'refresh' ) ] = function(){ window.location.reload(); };
+ menuActions[ _l( 'collapse all' ) ] = function(){ historyPanel.hideAllHdaBodies(); };
+ menuActions[ _l( show_deletedText ) ] = function(){ historyPanel.toggleShowDeleted(); };
+ menuActions[ _l( show_hiddenText ) ] = function(){ historyPanel.toggleShowHidden(); };
+ make_popupmenu( $button, menuActions );
+ },
+
// set up a view for each item to be shown, init with model and listeners, cache to map ( model.id : view )
renderItems : function( $whereTo ){
this.hdaViews = {};
var historyView = this,
- show_deleted = this.model.get( 'show_deleted' ),
- show_hidden = this.model.get( 'show_hidden' ),
- visibleHdas = this.model.hdas.getVisible( show_deleted, show_hidden );
+ visibleHdas = this.model.hdas.getVisible(
+ this.storage.get( 'show_deleted' ),
+ this.storage.get( 'show_hidden' )
+ );
// only render the shown hdas
_.each( visibleHdas, function( hda ){
@@ -293,6 +331,8 @@
async_save_text( "history-annotation-container", "history-annotation",
this.urls.annotate, "new_annotation", 18, true, 4 );
+
+ //this.$( 'button' ).button();
},
// update the history size display (curr. upper right of panel)
@@ -300,6 +340,10 @@
this.$el.find( '#history-size' ).text( this.model.get( 'nice_size' ) );
},
+ events : {
+ 'click #history-tag' : 'loadAndDisplayTags'
+ },
+
//TODO: this seems more like a per user message than a history message; IOW, this doesn't belong here
showQuotaMessage : function( userData ){
var msg = this.$el.find( '#quota-message-container' );
@@ -314,9 +358,14 @@
if( !msg.is( ':hidden' ) ){ msg.slideUp( 'fast' ); }
},
- events : {
- 'click #history-collapse-all' : 'hideAllHdaBodies',
- 'click #history-tag' : 'loadAndDisplayTags'
+ toggleShowDeleted : function( x, y, z ){
+ this.storage.set( 'show_deleted', !this.storage.get( 'show_deleted' ) );
+ this.render();
+ },
+
+ toggleShowHidden : function(){
+ this.storage.set( 'show_hidden', !this.storage.get( 'show_hidden' ) );
+ this.render();
},
// collapse all hda bodies
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 static/scripts/packed/mvc/dataset/hda-edit.js
--- /dev/null
+++ b/static/scripts/packed/mvc/dataset/hda-edit.js
@@ -0,0 +1,1 @@
+var HDAView=BaseView.extend(LoggableMixin).extend({tagName:"div",className:"historyItemContainer",initialize:function(a){this.log(this+".initialize:",a);if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}this.urls=this.renderUrls(a.urlTemplates,this.model.toJSON());this.expanded=a.expanded||false;this.model.bind("change",this.render,this)},renderUrls:function(d,a){var b=this,c={};_.each(d,function(e,f){if(_.isObject(e)){c[f]=b.renderUrls(e,a)}else{if(f==="meta_download"){c[f]=b.renderMetaDownloadUrls(e,a)}else{c[f]=_.template(e,a)}}});return c},renderMetaDownloadUrls:function(b,a){return _.map(a.meta_files,function(c){return{url:_.template(b,{id:a.id,file_type:c.file_type}),file_type:c.file_type}})},render:function(){var b=this,e=this.model.get("id"),c=this.model.get("state"),a=$("<div/>").attr("id","historyItem-"+e),d=(this.$el.children().size()===0);this._clearReferences();this.$el.attr("id","historyItemContainer-"+e);a.addClass("historyItemWrapper").addClass("historyItem").addClass("historyItem-"+c);a.append(this._render_warnings());a.append(this._render_titleBar());this.body=$(this._render_body());a.append(this.body);make_popup_menus(a);a.find(".tooltip").tooltip({placement:"bottom"});this.$el.fadeOut("fast",function(){b.$el.children().remove();b.$el.append(a).fadeIn("fast",function(){b.log(b+" rendered:",b.$el);var f="rendered";if(d){f+=":initial"}else{if(b.model.inReadyState()){f+=":ready"}}b.trigger(f)})});return this},_clearReferences:function(){this.displayButton=null;this.editButton=null;this.deleteButton=null;this.errButton=null;this.showParamsButton=null;this.rerunButton=null;this.visualizationsButton=null;this.tagButton=null;this.annotateButton=null},_render_warnings:function(){return $(jQuery.trim(HDAView.templates.messages(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_titleBar:function(){var a=$('<div class="historyItemTitleBar" style="overflow: hidden"></div>');a.append(this._render_titleButtons());a.append('<span class="state-icon"></span>');a.append(this._render_titleLink());return a},_render_titleButtons:function(){var a=$('<div class="historyItemButtons"></div>');a.append(this._render_displayButton());a.append(this._render_editButton());a.append(this._render_deleteButton());return a},_render_displayButton:function(){if((!this.model.inReadyState())||(this.model.get("state")===HistoryDatasetAssociation.STATES.ERROR)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var a={icon_class:"display"};if(this.model.get("purged")){a.enabled=false;a.title="Cannot display datasets removed from disk"}else{a.title="Display data in browser";a.href=this.urls.display}if(this.model.get("for_editing")){a.target="galaxy_main"}this.displayButton=new IconButtonView({model:new IconButton(a)});return this.displayButton.render().$el},_render_editButton:function(){if((this.model.get("state")===HistoryDatasetAssociation.STATES.UPLOAD)||(this.model.get("state")===HistoryDatasetAssociation.STATES.ERROR)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))||(!this.model.get("for_editing"))){return null}var c=this.model.get("purged"),a=this.model.get("deleted"),b={title:"Edit attributes",href:this.urls.edit,target:"galaxy_main",icon_class:"edit"};if(a||c){b.enabled=false;if(c){b.title="Cannot edit attributes of datasets removed from disk"}else{if(a){b.title="Undelete dataset to edit attributes"}}}this.editButton=new IconButtonView({model:new IconButton(b)});return this.editButton.render().$el},_render_deleteButton:function(){if((!this.model.get("for_editing"))||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var a={title:"Delete",href:this.urls["delete"],id:"historyItemDeleter-"+this.model.get("id"),icon_class:"delete"};if(this.model.get("deleted")||this.model.get("purged")){a={title:"Dataset is already deleted",icon_class:"delete",enabled:false}}this.deleteButton=new IconButtonView({model:new IconButton(a)});return this.deleteButton.render().$el},_render_titleLink:function(){return $(jQuery.trim(HDAView.templates.titleLink(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_hdaSummary:function(){var a=_.extend(this.model.toJSON(),{urls:this.urls});if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){_.extend(a,{dbkey_unknown_and_editable:true})}return HDAView.templates.hdaSummary(a)},_render_primaryActionButtons:function(c){var b=$("<div/>").attr("id","primary-actions-"+this.model.get("id")),a=this;_.each(c,function(d){b.append(d.call(a))});return b},_render_downloadButton:function(){if(this.model.get("purged")){return null}var a=HDAView.templates.downloadLinks(_.extend(this.model.toJSON(),{urls:this.urls}));return $(a)},_render_errButton:function(){if((this.model.get("state")!==HistoryDatasetAssociation.STATES.ERROR)||(!this.model.get("for_editing"))){return null}this.errButton=new IconButtonView({model:new IconButton({title:"View or report this error",href:this.urls.report_error,target:"galaxy_main",icon_class:"bug"})});return this.errButton.render().$el},_render_showParamsButton:function(){this.showParamsButton=new IconButtonView({model:new IconButton({title:"View details",href:this.urls.show_params,target:"galaxy_main",icon_class:"information"})});return this.showParamsButton.render().$el},_render_rerunButton:function(){if(!this.model.get("for_editing")){return null}this.rerunButton=new IconButtonView({model:new IconButton({title:"Run this job again",href:this.urls.rerun,target:"galaxy_main",icon_class:"arrow-circle"})});return this.rerunButton.render().$el},_render_visualizationsButton:function(){var c=this.model.get("dbkey"),a=this.model.get("visualizations"),f=this.urls.visualization,d={},g={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(!(this.model.hasData())||!(this.model.get("for_editing"))||!(a&&a.length)||!(f)){return null}this.visualizationsButton=new IconButtonView({model:new IconButton({title:"Visualize",href:f,icon_class:"chart_curve"})});var b=this.visualizationsButton.render().$el;b.addClass("visualize-icon");if(c){g.dbkey=c}function e(h){switch(h){case"trackster":return create_trackster_action_fn(f,g,c);case"scatterplot":return create_scatterplot_action_fn(f,g);default:return function(){window.parent.location=f+"/"+h+"?"+$.param(g)}}}if(a.length===1){b.attr("title",a[0]);b.click(e(a[0]))}else{_.each(a,function(i){var h=i.charAt(0).toUpperCase()+i.slice(1);d[h]=e(i)});make_popupmenu(b,d)}return b},_render_secondaryActionButtons:function(b){var c=$("<div/>"),a=this;c.attr("style","float: right;").attr("id","secondary-actions-"+this.model.get("id"));_.each(b,function(d){c.append(d.call(a))});return c},_render_tagButton:function(){if(!(this.model.hasData())||!(this.model.get("for_editing"))||(!this.urls.tags.get)){return null}this.tagButton=new IconButtonView({model:new IconButton({title:"Edit dataset tags",target:"galaxy_main",href:this.urls.tags.get,icon_class:"tags"})});return this.tagButton.render().$el},_render_annotateButton:function(){if(!(this.model.hasData())||!(this.model.get("for_editing"))||(!this.urls.annotation.get)){return null}this.annotateButton=new IconButtonView({model:new IconButton({title:"Edit dataset annotation",target:"galaxy_main",icon_class:"annotate"})});return this.annotateButton.render().$el},_render_displayApps:function(){if(!this.model.hasData()){return null}var a=$("<div/>").addClass("display-apps");if(!_.isEmpty(this.model.get("display_types"))){a.append(HDAView.templates.displayApps({displayApps:this.model.get("display_types")}))}if(!_.isEmpty(this.model.get("display_apps"))){a.append(HDAView.templates.displayApps({displayApps:this.model.get("display_apps")}))}return a},_render_tagArea:function(){if(!this.urls.tags.set){return null}return $(HDAView.templates.tagArea(_.extend(this.model.toJSON(),{urls:this.urls})))},_render_annotationArea:function(){if(!this.urls.annotation.get){return null}return $(HDAView.templates.annotationArea(_.extend(this.model.toJSON(),{urls:this.urls})))},_render_peek:function(){if(!this.model.get("peek")){return null}return $("<div/>").append($("<pre/>").attr("id","peek"+this.model.get("id")).addClass("peek").append(this.model.get("peek")))},_render_body_not_viewable:function(a){a.append($("<div>You do not have permission to view dataset.</div>"))},_render_body_uploading:function(a){a.append($("<div>Dataset is uploading</div>"))},_render_body_queued:function(a){a.append($("<div>Job is waiting to run.</div>"));a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_running:function(a){a.append("<div>Job is currently running.</div>");a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_error:function(a){if(!this.model.get("purged")){a.append($("<div>"+this.model.get("misc_blurb")+"</div>"))}a.append(("An error occurred running this job: <i>"+$.trim(this.model.get("misc_info"))+"</i>"));a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_errButton,this._render_showParamsButton,this._render_rerunButton]))},_render_body_discarded:function(a){a.append("<div>The job creating this dataset was cancelled before completion.</div>");a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_setting_metadata:function(a){a.append($("<div>Metadata is being auto-detected.</div>"))},_render_body_empty:function(a){a.append($("<div>No data: <i>"+this.model.get("misc_blurb")+"</i></div>"));a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_failed_metadata:function(a){a.append($(HDAView.templates.failedMetadata(this.model.toJSON())));this._render_body_ok(a)},_render_body_ok:function(a){a.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton,this._render_rerunButton]));return}a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_errButton,this._render_showParamsButton,this._render_rerunButton,this._render_visualizationsButton]));a.append(this._render_secondaryActionButtons([this._render_tagButton,this._render_annotateButton]));a.append('<div class="clear"/>');a.append(this._render_tagArea());a.append(this._render_annotationArea());a.append(this._render_displayApps());a.append(this._render_peek())},_render_body:function(){var a=$("<div/>").attr("id","info-"+this.model.get("id")).addClass("historyItemBody").attr("style","display: block");switch(this.model.get("state")){case HistoryDatasetAssociation.STATES.NOT_VIEWABLE:this._render_body_not_viewable(a);break;case HistoryDatasetAssociation.STATES.UPLOAD:this._render_body_uploading(a);break;case HistoryDatasetAssociation.STATES.QUEUED:this._render_body_queued(a);break;case HistoryDatasetAssociation.STATES.RUNNING:this._render_body_running(a);break;case HistoryDatasetAssociation.STATES.ERROR:this._render_body_error(a);break;case HistoryDatasetAssociation.STATES.DISCARDED:this._render_body_discarded(a);break;case HistoryDatasetAssociation.STATES.SETTING_METADATA:this._render_body_setting_metadata(a);break;case HistoryDatasetAssociation.STATES.EMPTY:this._render_body_empty(a);break;case HistoryDatasetAssociation.STATES.FAILED_METADATA:this._render_body_failed_metadata(a);break;case HistoryDatasetAssociation.STATES.OK:this._render_body_ok(a);break;default:a.append($('<div>Error: unknown dataset state "'+state+'".</div>'))}a.append('<div style="clear: both"></div>');if(this.expanded){a.show()}else{a.hide()}return a},events:{"click .historyItemTitle":"toggleBodyVisibility","click a.icon-button.tags":"loadAndDisplayTags","click a.icon-button.annotate":"loadAndDisplayAnnotation"},loadAndDisplayTags:function(b){this.log(this+".loadAndDisplayTags",b);var c=this.$el.find(".tag-area"),a=c.find(".tag-elt");if(c.is(":hidden")){if(!jQuery.trim(a.html())){$.ajax({url:this.urls.tags.get,error:function(){alert("Tagging failed")},success:function(d){a.html(d);a.find(".tooltip").tooltip();c.slideDown("fast")}})}else{c.slideDown("fast")}}else{c.slideUp("fast")}return false},loadAndDisplayAnnotation:function(b){this.log(this+".loadAndDisplayAnnotation",b);var d=this.$el.find(".annotation-area"),c=d.find(".annotation-elt"),a=this.urls.annotation.set;if(d.is(":hidden")){if(!jQuery.trim(c.html())){$.ajax({url:this.urls.annotation.get,error:function(){alert("Annotations failed")},success:function(e){if(e===""){e="<em>Describe or add notes to dataset</em>"}c.html(e);d.find(".tooltip").tooltip();async_save_text(c.attr("id"),c.attr("id"),a,"new_annotation",18,true,4);d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toggleBodyVisibility:function(b,a){var c=this.$el.find(".historyItemBody");a=(a===undefined)?(!c.is(":visible")):(a);if(a){c.slideDown("fast")}else{c.slideUp("fast")}this.trigger("toggleBodyVisibility",this.model.get("id"),a)},toString:function(){var a=(this.model)?(this.model+""):("(no model)");return"HDAView("+a+")"}});HDAView.templates={warningMsg:Handlebars.templates["template-warningmessagesmall"],messages:Handlebars.templates["template-history-warning-messages"],titleLink:Handlebars.templates["template-history-titleLink"],hdaSummary:Handlebars.templates["template-history-hdaSummary"],downloadLinks:Handlebars.templates["template-history-downloadLinks"],failedMetadata:Handlebars.templates["template-history-failedMetaData"],tagArea:Handlebars.templates["template-history-tagArea"],annotationArea:Handlebars.templates["template-history-annotationArea"],displayApps:Handlebars.templates["template-history-displayApps"]};function create_scatterplot_action_fn(a,b){action=function(){var d=$(window.parent.document).find("iframe#galaxy_main"),c=a+"/scatterplot?"+$.param(b);d.attr("src",c);$("div.popmenu-wrapper").remove();return false};return action}function create_trackster_action_fn(a,c,b){return function(){var d={};if(b){d.dbkey=b}$.ajax({url:a+"/list_tracks?f-"+$.param(d),dataType:"html",error:function(){alert("Could not add this dataset to browser.")},success:function(e){var f=window.parent;f.show_modal("View Data in a New or Saved Visualization","",{Cancel:function(){f.hide_modal()},"View in saved visualization":function(){f.show_modal("Add Data to Saved Visualization",e,{Cancel:function(){f.hide_modal()},"Add to visualization":function(){$(f.document).find("input[name=id]:checked").each(function(){var g=$(this).val();c.id=g;f.location=a+"/trackster?"+$.param(c)})}})},"View in new visualization":function(){f.location=a+"/trackster?"+$.param(c)}})}});return false}};
\ No newline at end of file
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 static/scripts/packed/mvc/dataset/hda-model.js
--- /dev/null
+++ b/static/scripts/packed/mvc/dataset/hda-model.js
@@ -0,0 +1,1 @@
+var HistoryDatasetAssociation=BaseModel.extend(LoggableMixin).extend({defaults:{history_id:null,model_class:"HistoryDatasetAssociation",hid:0,id:null,name:"",state:"",data_type:null,file_size:0,meta_files:[],misc_blurb:"",misc_info:"",deleted:false,purged:false,visible:false,accessible:false,for_editing:true},url:function(){return"api/histories/"+this.get("history_id")+"/contents/"+this.get("id")},initialize:function(){this.log(this+".initialize",this.attributes);this.log("\tparent history_id: "+this.get("history_id"));if(!this.get("accessible")){this.set("state",HistoryDatasetAssociation.STATES.NOT_VIEWABLE)}this.on("change:state",function(b,a){this.log(this+" has changed state:",b,a);if(this.inReadyState()){this.trigger("state:ready",this.get("id"),a,this.previous("state"),b)}})},isDeletedOrPurged:function(){return(this.get("deleted")||this.get("purged"))},isVisible:function(b,c){var a=true;if((!b)&&(this.get("deleted")||this.get("purged"))){a=false}if((!c)&&(!this.get("visible"))){a=false}return a},inReadyState:function(){var a=this.get("state");return((a===HistoryDatasetAssociation.STATES.NEW)||(a===HistoryDatasetAssociation.STATES.OK)||(a===HistoryDatasetAssociation.STATES.EMPTY)||(a===HistoryDatasetAssociation.STATES.FAILED_METADATA)||(a===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(a===HistoryDatasetAssociation.STATES.DISCARDED)||(a===HistoryDatasetAssociation.STATES.ERROR))},hasData:function(){return(this.get("file_size")>0)},toString:function(){var a=this.get("id")||"";if(this.get("name")){a+=':"'+this.get("name")+'"'}return"HistoryDatasetAssociation("+a+")"}});HistoryDatasetAssociation.STATES={UPLOAD:"upload",QUEUED:"queued",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",OK:"ok",EMPTY:"empty",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};var HDACollection=Backbone.Collection.extend(LoggableMixin).extend({model:HistoryDatasetAssociation,initialize:function(){},ids:function(){return this.map(function(a){return a.id})},getVisible:function(a,b){return this.filter(function(c){return c.isVisible(a,b)})},getStateLists:function(){var a={};_.each(_.values(HistoryDatasetAssociation.STATES),function(b){a[b]=[]});this.each(function(b){a[b.get("state")].push(b.get("id"))});return a},running:function(){var a=[];this.each(function(b){if(!b.inReadyState()){a.push(b.get("id"))}});return a},update:function(a){this.log(this+"update:",a);if(!(a&&a.length)){return}var b=this;_.each(a,function(e,c){var d=b.get(e);d.fetch()})},toString:function(){return("HDACollection("+this.ids().join(",")+")")}});
\ No newline at end of file
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 static/scripts/packed/mvc/history/history-model.js
--- /dev/null
+++ b/static/scripts/packed/mvc/history/history-model.js
@@ -0,0 +1,1 @@
+var History=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",show_deleted:false,show_hidden:false,diskSize:0,deleted:false,tags:[],annotation:null,message:null,quotaMsg:false},url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b&&b.length){this.hdas.reset(b);this.checkForUpdates()}},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.log(b)}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.itemIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();c()})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.hdas.update(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},4000)}}).error(function(f,d,e){if(console&&console.warn){console.warn("Error getting history updates from the server:",f,d,e)}alert("Error getting history updates from the server.\n"+e)})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories",logger:console});
\ No newline at end of file
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 static/scripts/packed/mvc/history/history-panel.js
--- /dev/null
+++ b/static/scripts/packed/mvc/history/history-panel.js
@@ -0,0 +1,1 @@
+var HistoryPanel=BaseView.extend(LoggableMixin).extend({el:"body.historyPage",initialize:function(a){this.log(this+".initialize:",a);if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}if(!a.urlTemplates.history){throw ("HDAView needs urlTemplates.history on initialize")}if(!a.urlTemplates.hda){throw ("HDAView needs urlTemplates.hda on initialize")}this.urlTemplates=a.urlTemplates.history;this.hdaUrlTemplates=a.urlTemplates.hda;this.storage=new PersistantStorage("HistoryView."+this.model.get("id"),{expandedHdas:{}});this.model.bind("change:nice_size",this.updateHistoryDiskSize,this);this.model.hdas.bind("add",this.add,this);this.model.hdas.bind("reset",this.addAll,this);this.model.hdas.bind("all",this.all,this);this.hdaViews={};this.urls={}},add:function(a){},addAll:function(){this.render()},all:function(a){},renderUrls:function(a){var b=this;b.urls={};_.each(this.urlTemplates,function(d,c){b.urls[c]=_.template(d,a)});return b.urls},render:function(){var b=this,d=b.toString()+".set-up",c=$("<div/>"),a=this.model.toJSON(),e=(this.$el.children().size()===0);a.urls=this.renderUrls(a);c.append(HistoryPanel.templates.historyPanel(a));c.find(".tooltip").tooltip();if(!this.model.hdas.length||!this.renderItems(c.find("#"+this.model.get("id")+"-datasets"))){c.find("#emptyHistoryMessage").show()}$(b).queue(d,function(f){b.$el.fadeOut("fast",function(){f()})});$(b).queue(d,function(f){b.$el.html("");b.$el.append(c.children());b.$el.fadeIn("fast",function(){f()})});$(b).queue(d,function(f){this.log(b+" rendered:",b.$el);b.setUpBehaviours();if(e){b.trigger("rendered:initial")}else{b.trigger("rendered")}f()});$(b).dequeue(d);return this},renderItems:function(c){this.hdaViews={};var b=this,a=this.model.get("show_deleted"),e=this.model.get("show_hidden"),d=this.model.hdas.getVisible(a,e);_.each(d,function(h){var g=h.get("id"),f=b.storage.get("expandedHdas").get(g);b.hdaViews[g]=new HDAView({model:h,expanded:f,urlTemplates:b.hdaUrlTemplates});b.setUpHdaListeners(b.hdaViews[g]);c.prepend(b.hdaViews[g].render().$el)});return d.length},setUpHdaListeners:function(b){var a=this;b.bind("toggleBodyVisibility",function(d,c){if(c){a.storage.get("expandedHdas").set(d,true)}else{a.storage.get("expandedHdas").deleteKey(d)}});b.bind("rendered:ready",function(){a.trigger("hda:rendered:ready")})},setUpBehaviours:function(){if(!(this.model.get("user")&&this.model.get("user").email)){return}var a=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(a.is(":hidden")){a.slideDown("fast")}else{a.slideUp("fast")}return false});async_save_text("history-name-container","history-name",this.urls.rename,"new_name",18);async_save_text("history-annotation-container","history-annotation",this.urls.annotate,"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},showQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(b.is(":hidden")){b.slideDown("fast")}},hideQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(!b.is(":hidden")){b.slideUp("fast")}},events:{"click #history-collapse-all":"hideAllHdaBodies","click #history-tag":"loadAndDisplayTags"},hideAllHdaBodies:function(){_.each(this.hdaViews,function(a){a.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},loadAndDisplayTags:function(c){this.log(this+".loadAndDisplayTags",c);var d=this.$el.find("#history-tag-area"),b=d.find(".tag-elt");this.log("\t tagArea",d," tagElt",b);if(d.is(":hidden")){if(!jQuery.trim(b.html())){var a=this;$.ajax({url:a.urls.tag,error:function(){alert("Tagging failed")},success:function(e){b.html(e);b.find(".tooltip").tooltip();d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toString:function(){var a=this.model.get("name")||"";return"HistoryView("+a+")"}});HistoryPanel.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};
\ No newline at end of file
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 static/scripts/templates/compiled/template-history-historyPanel.js
--- a/static/scripts/templates/compiled/template-history-historyPanel.js
+++ b/static/scripts/templates/compiled/template-history-historyPanel.js
@@ -7,232 +7,157 @@
function program1(depth0,data) {
var buffer = "", stack1, foundHelper;
- buffer += "\n <div id=\"history-name\" style=\"margin-right: 50px;\" class=\"tooltip editable-text\"\n title=\"Click to rename history\">";
+ buffer += "\n <div id=\"history-name\" class=\"tooltip editable-text\"\n title=\"Click to rename history\">";
foundHelper = helpers.name;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "</div>\n ";
+ buffer += escapeExpression(stack1) + "</div>\n ";
return buffer;}
function program3(depth0,data) {
var buffer = "", stack1, foundHelper;
- buffer += "\n <div id=\"history-name\" style=\"margin-right: 50px;\" class=\"tooltip\"\n title=\"You must be logged in to edit your history name\">";
+ buffer += "\n <div id=\"history-name\" class=\"tooltip\"\n title=\"You must be logged in to edit your history name\">";
foundHelper = helpers.name;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "</div>\n ";
+ buffer += escapeExpression(stack1) + "</div>\n ";
return buffer;}
function program5(depth0,data) {
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n <div id=\"history-secondary-links\" style=\"float: right;\">\n <a id=\"history-tag\" title=\"";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(6, program6, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(6, program6, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\"\n class=\"icon-button tags tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n <a id=\"history-annotate\" title=\"";
+ foundHelper = helpers.local;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(8, program8, data)}); }
+ else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(8, program8, data)}); }
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\"\n class=\"icon-button annotate tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n </div>\n ";
+ return buffer;}
+function program6(depth0,data) {
- return "refresh";}
+
+ return "Edit history tags";}
-function program7(depth0,data) {
+function program8(depth0,data) {
- return "collapse all";}
+ return "Edit history annotation";}
-function program9(depth0,data) {
+function program10(depth0,data) {
var buffer = "", stack1, foundHelper;
- buffer += "\n <a id=\"history-tag\" title=\"";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); }
+ buffer += "\n ";
+ foundHelper = helpers.warningmessagesmall;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); }
+ else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); }
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\"\n class=\"icon-button tags tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n <a id=\"history-annotate\" title=\"";
+ buffer += "\n ";
+ return buffer;}
+function program11(depth0,data) {
+
+ var stack1, foundHelper;
foundHelper = helpers.local;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); }
else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\"\n class=\"icon-button annotate tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n ";
- return buffer;}
-function program10(depth0,data) {
-
-
- return "Edit history tags";}
-
+ if(stack1 || stack1 === 0) { return stack1; }
+ else { return ''; }}
function program12(depth0,data) {
- return "Edit history annotation";}
+ return "You are currently viewing a deleted history!";}
function program14(depth0,data) {
- var buffer = "", stack1, foundHelper;
- buffer += "\n <a href=\"";
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.hide_deleted;
- stack1 = typeof stack1 === functionType ? stack1() : stack1;
- buffer += escapeExpression(stack1) + "\">";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(15, program15, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(15, program15, data)}); }
+ var buffer = "", stack1;
+ buffer += "\n <div id=\"history-tag-annotation\">\n\n <div id=\"history-tag-area\" style=\"display: none\">\n <strong>Tags:</strong>\n <div class=\"tag-elt\"></div>\n </div>\n\n <div id=\"history-annotation-area\" style=\"display: none\">\n <strong>Annotation / Notes:</strong>\n <div id=\"history-annotation-container\">\n <div id=\"history-annotation\" class=\"tooltip editable-text\" title=\"Click to edit annotation\">\n ";
+ stack1 = depth0.annotation;
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(17, program17, data),fn:self.program(15, program15, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "</a>\n ";
+ buffer += "\n </div>\n </div>\n </div>\n </div>\n ";
return buffer;}
function program15(depth0,data) {
-
- return "hide deleted";}
+ var buffer = "", stack1, foundHelper;
+ buffer += "\n ";
+ foundHelper = helpers.annotation;
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
+ else { stack1 = depth0.annotation; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
+ buffer += escapeExpression(stack1) + "\n ";
+ return buffer;}
function program17(depth0,data) {
- var buffer = "", stack1, foundHelper;
- buffer += "\n <a href=\"";
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.hide_hidden;
- stack1 = typeof stack1 === functionType ? stack1() : stack1;
- buffer += escapeExpression(stack1) + "\">";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(18, program18, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(18, program18, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "</a>\n ";
- return buffer;}
-function program18(depth0,data) {
-
- return "hide hidden";}
+ return "\n <em>Describe or add notes to history</em>\n ";}
-function program20(depth0,data) {
+function program19(depth0,data) {
var buffer = "", stack1, foundHelper;
- buffer += "\n";
- foundHelper = helpers.warningmessagesmall;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(21, program21, data)}); }
- else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(21, program21, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n";
- return buffer;}
-function program21(depth0,data) {
-
- var stack1, foundHelper;
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(22, program22, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(22, program22, data)}); }
- if(stack1 || stack1 === 0) { return stack1; }
- else { return ''; }}
-function program22(depth0,data) {
-
-
- return "You are currently viewing a deleted history!";}
-
-function program24(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "\n <div id=\"history-tag-area\" style=\"display: none\">\n <strong>Tags:</strong>\n <div class=\"tag-elt\"></div>\n </div>\n\n <div id=\"history-annotation-area\" style=\"display: none\">\n <strong>Annotation / Notes:</strong>\n <div id=\"history-annotation-container\">\n <div id=\"history-annotation\" class=\"tooltip editable-text\" title=\"Click to edit annotation\">\n ";
- stack1 = depth0.annotation;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(27, program27, data),fn:self.program(25, program25, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n </div>\n </div>\n </div>\n ";
- return buffer;}
-function program25(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n ";
- foundHelper = helpers.annotation;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
- else { stack1 = depth0.annotation; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "\n ";
- return buffer;}
-
-function program27(depth0,data) {
-
-
- return "\n <em>Describe or add notes to history</em>\n ";}
-
-function program29(depth0,data) {
-
- var buffer = "", stack1, foundHelper;
- buffer += "\n<div id=\"message-container\">\n <div class=\"";
+ buffer += "\n <div id=\"message-container\">\n <div class=\"";
foundHelper = helpers.status;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.status; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "message\">\n ";
+ buffer += escapeExpression(stack1) + "message\">\n ";
foundHelper = helpers.message;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.message; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- buffer += escapeExpression(stack1) + "\n </div><br />\n</div>\n";
+ buffer += escapeExpression(stack1) + "\n </div><br />\n </div>\n ";
return buffer;}
-function program31(depth0,data) {
+function program21(depth0,data) {
return "Your history is empty. Click 'Get Data' on the left pane to start";}
- buffer += "\n<div id=\"history-name-area\" class=\"historyLinks\">\n <div id=\"history-name-container\" style=\"position: relative;\">\n ";
- buffer += "\n <div id=\"history-size\" style=\"position: absolute; top: 3px; right: 0px;\">";
+ buffer += "\n<div id=\"history-controls\">\n <div id=\"history-title-area\" class=\"historyLinks\">\n\n <div id=\"history-name-container\" style=\"float: left;\">\n ";
+ buffer += "\n ";
+ stack1 = depth0.user;
+ stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email;
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data)});
+ if(stack1 || stack1 === 0) { buffer += stack1; }
+ buffer += "\n </div>\n\n <a id=\"history-action-popup\" href=\"javascript:void(0);\" style=\"float: right;\">\n <span class=\"ficon cog large\"></span>\n </a>\n <div style=\"clear: both;\"></div>\n </div>\n\n <div id=\"history-subtitle-area\">\n <div id=\"history-size\" style=\"float:left;\">";
foundHelper = helpers.nice_size;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.nice_size; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
buffer += escapeExpression(stack1) + "</div>\n ";
stack1 = depth0.user;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data)});
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n </div> \n</div>\n<div style=\"clear: both;\"></div>\n\n<div id=\"top-links\" class=\"historyLinks\">\n <a title=\"";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)}); }
+ buffer += "\n <div style=\"clear: both;\"></div>\n </div>\n\n ";
+ stack1 = depth0.deleted;
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\" class=\"icon-button arrow-circle tooltip\" href=\"";
- stack1 = depth0.urls;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.base;
- stack1 = typeof stack1 === functionType ? stack1() : stack1;
- buffer += escapeExpression(stack1) + "\"></a>\n <a title='";
- foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); }
- else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); }
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "' id=\"history-collapse-all\"\n class='icon-button toggle tooltip' href='javascript:void(0);'></a>\n <div style=\"width: 40px; float: right; white-space: nowrap;\">\n ";
+ buffer += "\n\n ";
+ buffer += "\n ";
+ buffer += "\n ";
stack1 = depth0.user;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n </div>\n</div>\n<div style=\"clear: both;\"></div>\n\n";
- buffer += "\n<div class=\"historyLinks\">\n ";
- stack1 = depth0.show_deleted;
stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n ";
- stack1 = depth0.show_hidden;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(17, program17, data)});
+ buffer += "\n\n ";
+ stack1 = depth0.message;
+ stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(19, program19, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n</div>\n\n";
- stack1 = depth0.deleted;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(20, program20, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n\n";
- buffer += "\n";
- buffer += "\n<div style=\"margin: 0px 5px 10px 5px\">\n\n ";
- stack1 = depth0.user;
- stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(24, program24, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n</div>\n\n";
- stack1 = depth0.message;
- stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(29, program29, data)});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n\n<div id=\"quota-message-container\" style=\"display: none\">\n <div id=\"quota-message\" class=\"errormessage\">\n You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.\n </div>\n</div>\n\n<div id=\"";
+ buffer += "\n\n <div id=\"quota-message-container\" style=\"display: none\">\n <div id=\"quota-message\" class=\"errormessage\">\n You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.\n </div>\n </div>\n</div>\n\n<div id=\"";
foundHelper = helpers.id;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
buffer += escapeExpression(stack1) + "-datasets\" class=\"history-datasets-list\"></div>\n\n<div class=\"infomessagesmall\" id=\"emptyHistoryMessage\" style=\"display: none;\">\n ";
foundHelper = helpers.local;
- if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(31, program31, data)}); }
+ if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(21, program21, data)}); }
else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
- if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(31, program31, data)}); }
+ if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(21, program21, data)}); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n</div>";
return buffer;});
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 static/scripts/templates/history-templates.html
--- a/static/scripts/templates/history-templates.html
+++ b/static/scripts/templates/history-templates.html
@@ -106,86 +106,80 @@
--><script type="text/template" class="template-history" id="template-history-historyPanel">
{{! history name (if any) }}
-<div id="history-name-area" class="historyLinks">
- <div id="history-name-container" style="position: relative;">
- {{! TODO: factor out conditional css }}
- <div id="history-size" style="position: absolute; top: 3px; right: 0px;">{{nice_size}}</div>
- {{#if user.email}}
- <div id="history-name" style="margin-right: 50px;" class="tooltip editable-text"
+<div id="history-controls">
+ <div id="history-title-area" class="historyLinks">
+
+ <div id="history-name-container" style="float: left;">
+ {{! TODO: factor out conditional css }}
+ {{#if user.email}}
+ <div id="history-name" class="tooltip editable-text"
title="Click to rename history">{{name}}</div>
- {{else}}
- <div id="history-name" style="margin-right: 50px;" class="tooltip"
+ {{else}}
+ <div id="history-name" class="tooltip"
title="You must be logged in to edit your history name">{{name}}</div>
- {{/if}}
- </div>
-</div>
-<div style="clear: both;"></div>
+ {{/if}}
+ </div>
-<div id="top-links" class="historyLinks">
- <a title="{{#local}}refresh{{/local}}" class="icon-button arrow-circle tooltip" href="{{urls.base}}"></a>
- <a title='{{#local}}collapse all{{/local}}' id="history-collapse-all"
- class='icon-button toggle tooltip' href='javascript:void(0);'></a>
- <div style="width: 40px; float: right; white-space: nowrap;">
- {{#if user.email}}
- <a id="history-tag" title="{{#local}}Edit history tags{{/local}}"
- class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>
- <a id="history-annotate" title="{{#local}}Edit history annotation{{/local}}"
- class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>
- {{/if}}
- </div>
-</div>
-<div style="clear: both;"></div>
-
-{{! TODO: move to js with no reload - use each with historyLinks }}
-<div class="historyLinks">
- {{#if show_deleted}}
- <a href="{{urls.hide_deleted}}">{{#local}}hide deleted{{/local}}</a>
- {{/if}}
- {{#if show_hidden}}
- <a href="{{urls.hide_hidden}}">{{#local}}hide hidden{{/local}}</a>
- {{/if}}
-</div>
-
-{{#if deleted}}
-{{#warningmessagesmall}}{{#local}}You are currently viewing a deleted history!{{/local}}{{/warningmessagesmall}}
-{{/if}}
-
-{{! tags and annotations }}
-{{! TODO: move inline styles out }}
-<div style="margin: 0px 5px 10px 5px">
-
- {{#if user.email}}
- <div id="history-tag-area" style="display: none">
- <strong>Tags:</strong>
- <div class="tag-elt"></div>
+ <a id="history-action-popup" href="javascript:void(0);" style="float: right;">
+ <span class="ficon cog large"></span>
+ </a>
+ <div style="clear: both;"></div></div>
- <div id="history-annotation-area" style="display: none">
- <strong>Annotation / Notes:</strong>
- <div id="history-annotation-container">
- <div id="history-annotation" class="tooltip editable-text" title="Click to edit annotation">
- {{#if annotation}}
- {{annotation}}
- {{else}}
- <em>Describe or add notes to history</em>
- {{/if}}
+ <div id="history-subtitle-area">
+ <div id="history-size" style="float:left;">{{nice_size}}</div>
+ {{#if user.email}}
+ <div id="history-secondary-links" style="float: right;">
+ <a id="history-tag" title="{{#local}}Edit history tags{{/local}}"
+ class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>
+ <a id="history-annotate" title="{{#local}}Edit history annotation{{/local}}"
+ class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a></div>
+ {{/if}}
+ <div style="clear: both;"></div>
+ </div>
+
+ {{#if deleted}}
+ {{#warningmessagesmall}}{{#local}}You are currently viewing a deleted history!{{/local}}{{/warningmessagesmall}}
+ {{/if}}
+
+ {{! tags and annotations }}
+ {{! TODO: move inline styles out }}
+ {{#if user.email}}
+ <div id="history-tag-annotation">
+
+ <div id="history-tag-area" style="display: none">
+ <strong>Tags:</strong>
+ <div class="tag-elt"></div>
+ </div>
+
+ <div id="history-annotation-area" style="display: none">
+ <strong>Annotation / Notes:</strong>
+ <div id="history-annotation-container">
+ <div id="history-annotation" class="tooltip editable-text" title="Click to edit annotation">
+ {{#if annotation}}
+ {{annotation}}
+ {{else}}
+ <em>Describe or add notes to history</em>
+ {{/if}}
+ </div>
+ </div></div></div>
{{/if}}
-</div>
-{{#if message}}
-<div id="message-container">
- <div class="{{status}}message">
- {{message}}
- </div><br />
-</div>
-{{/if}}
+ {{#if message}}
+ <div id="message-container">
+ <div class="{{status}}message">
+ {{message}}
+ </div><br />
+ </div>
+ {{/if}}
-<div id="quota-message-container" style="display: none">
- <div id="quota-message" class="errormessage">
- You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.
+ <div id="quota-message-container" style="display: none">
+ <div id="quota-message" class="errormessage">
+ You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.
+ </div></div></div>
diff -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 templates/root/alternate_history.mako
--- a/templates/root/alternate_history.mako
+++ b/templates/root/alternate_history.mako
@@ -42,9 +42,9 @@
'No data: ',
'format: ',
'database: ',
- # localized data.dbkey?? - localize in the datasetup above
+ #TODO localized data.dbkey??
'Info: ',
- # localized display_app.display_name?? - localize above
+ #TODO localized display_app.display_name??
# _( link_app.name )
# localized peek...ugh
'Error: unknown dataset state',
@@ -63,12 +63,6 @@
encoded_id_template = '<%= id %>'
url_dict = {
- # TODO:?? next 3 needed?
- 'base' : h.url_for( controller="/history" ),
- ##TODO: move these into the historyMV
- 'hide_deleted' : h.url_for( controller="/history", show_deleted=False ),
- 'hide_hidden' : h.url_for( controller="/history", show_hidden=False ),
-
##TODO: into their own MVs
'rename' : h.url_for( controller="/history", action="rename_async",
id=encoded_id_template ),
@@ -294,15 +288,14 @@
// add user data to history
// i don't like this history+user relationship, but user authentication changes views/behaviour
history.user = user;
- // is page sending in show settings? if so override history's
- //TODO: move into historyPanel
- history.show_deleted = ${ 'true' if show_deleted else 'false' };
- history.show_hidden = ${ 'true' if show_hidden else 'false' };
var historyPanel = new HistoryPanel({
- model : new History( history, hdas ),
- urlTemplates: galaxy_paths.attributes,
- logger : console
+ model : new History( history, hdas ),
+ urlTemplates : galaxy_paths.attributes,
+ logger : console,
+ // is page sending in show settings? if so override history's
+ show_deleted : ${ 'true' if show_deleted == True else ( 'null' if show_deleted == None else 'false' ) },
+ show_hidden : ${ 'true' if show_hidden == True else ( 'null' if show_hidden == None else 'false' ) }
});
historyPanel.render();
if( !Galaxy.currHistoryPanel ){ Galaxy.currHistoryPanel = historyPanel; }
@@ -317,6 +310,7 @@
// QUOTA METER is a cross-frame ui element (meter in masthead, over quota message in history)
// create it and join them here for now (via events)
//TODO: this really belongs in the masthead
+ //TODO: and the quota message (curr. in the history panel) belongs somewhere else
//window.currUser.logger = console;
var quotaMeter = new UserQuotaMeter({
@@ -351,30 +345,50 @@
<%def name="stylesheets()">
${parent.stylesheets()}
- ${h.css("base", "history", "autocomplete_tagging" )}
+ ${h.css(
+ "base",
+ "history",
+ "autocomplete_tagging"
+ )}
<style>
## TODO: move to base.less
.historyItemBody {
display: none;
}
- div.form-row {
- padding: 5px 5px 5px 0px;
+
+ #history-controls {
+ /*border: 1px solid white;*/
+ margin-bottom: 5px;
+ padding: 5px;
}
- #top-links {
- margin-bottom: 15px;
- }
- #history-name-container {
- color: gray;
- font-weight: bold;
+
+ #history-title-area {
+ margin: 0px 0px 5px 0px;
+ /*border: 1px solid red;*/
}
#history-name {
word-wrap: break-word;
+ font-weight: bold;
+ color: black;
}
.editable-text {
border: solid transparent 1px;
- padding: 3px;
- margin: -4px;
}
+ #history-name-container input {
+ width: 90%;
+ margin: -2px 0px -3px -4px;
+ font-weight: bold;
+ color: black;
+ }
+
+ #history-subtitle-area {
+ /*border: 1px solid green;*/
+ }
+ #history-size {
+ }
+ #history-secondary-links {
+ }
+
</style><noscript>
https://bitbucket.org/galaxy/galaxy-central/changeset/6344832c535a/
changeset: 6344832c535a
user: carlfeberhard
date: 2012-11-08 20:43:26
summary: pack scripts
affected #: 4 files
diff -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 -r 6344832c535aab0a8cc4a57be1414fc179e8540b static/scripts/packed/mvc/history/history-model.js
--- a/static/scripts/packed/mvc/history/history-model.js
+++ b/static/scripts/packed/mvc/history/history-model.js
@@ -1,1 +1,1 @@
-var History=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",show_deleted:false,show_hidden:false,diskSize:0,deleted:false,tags:[],annotation:null,message:null,quotaMsg:false},url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b&&b.length){this.hdas.reset(b);this.checkForUpdates()}},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.log(b)}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.itemIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();c()})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.hdas.update(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},4000)}}).error(function(f,d,e){if(console&&console.warn){console.warn("Error getting history updates from the server:",f,d,e)}alert("Error getting history updates from the server.\n"+e)})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories",logger:console});
\ No newline at end of file
+var History=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,tags:[],annotation:null,message:null,quotaMsg:false},url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b&&b.length){this.hdas.reset(b);this.checkForUpdates()}},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.log(b)}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.itemIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();c()})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.hdas.update(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},4000)}}).error(function(f,d,e){if(console&&console.warn){console.warn("Error getting history updates from the server:",f,d,e)}alert("Error getting history updates from the server.\n"+e)})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories",logger:console});
\ No newline at end of file
diff -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 -r 6344832c535aab0a8cc4a57be1414fc179e8540b static/scripts/packed/mvc/history/history-panel.js
--- a/static/scripts/packed/mvc/history/history-panel.js
+++ b/static/scripts/packed/mvc/history/history-panel.js
@@ -1,1 +1,1 @@
-var HistoryPanel=BaseView.extend(LoggableMixin).extend({el:"body.historyPage",initialize:function(a){this.log(this+".initialize:",a);if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}if(!a.urlTemplates.history){throw ("HDAView needs urlTemplates.history on initialize")}if(!a.urlTemplates.hda){throw ("HDAView needs urlTemplates.hda on initialize")}this.urlTemplates=a.urlTemplates.history;this.hdaUrlTemplates=a.urlTemplates.hda;this.storage=new PersistantStorage("HistoryView."+this.model.get("id"),{expandedHdas:{}});this.model.bind("change:nice_size",this.updateHistoryDiskSize,this);this.model.hdas.bind("add",this.add,this);this.model.hdas.bind("reset",this.addAll,this);this.model.hdas.bind("all",this.all,this);this.hdaViews={};this.urls={}},add:function(a){},addAll:function(){this.render()},all:function(a){},renderUrls:function(a){var b=this;b.urls={};_.each(this.urlTemplates,function(d,c){b.urls[c]=_.template(d,a)});return b.urls},render:function(){var b=this,d=b.toString()+".set-up",c=$("<div/>"),a=this.model.toJSON(),e=(this.$el.children().size()===0);a.urls=this.renderUrls(a);c.append(HistoryPanel.templates.historyPanel(a));c.find(".tooltip").tooltip();if(!this.model.hdas.length||!this.renderItems(c.find("#"+this.model.get("id")+"-datasets"))){c.find("#emptyHistoryMessage").show()}$(b).queue(d,function(f){b.$el.fadeOut("fast",function(){f()})});$(b).queue(d,function(f){b.$el.html("");b.$el.append(c.children());b.$el.fadeIn("fast",function(){f()})});$(b).queue(d,function(f){this.log(b+" rendered:",b.$el);b.setUpBehaviours();if(e){b.trigger("rendered:initial")}else{b.trigger("rendered")}f()});$(b).dequeue(d);return this},renderItems:function(c){this.hdaViews={};var b=this,a=this.model.get("show_deleted"),e=this.model.get("show_hidden"),d=this.model.hdas.getVisible(a,e);_.each(d,function(h){var g=h.get("id"),f=b.storage.get("expandedHdas").get(g);b.hdaViews[g]=new HDAView({model:h,expanded:f,urlTemplates:b.hdaUrlTemplates});b.setUpHdaListeners(b.hdaViews[g]);c.prepend(b.hdaViews[g].render().$el)});return d.length},setUpHdaListeners:function(b){var a=this;b.bind("toggleBodyVisibility",function(d,c){if(c){a.storage.get("expandedHdas").set(d,true)}else{a.storage.get("expandedHdas").deleteKey(d)}});b.bind("rendered:ready",function(){a.trigger("hda:rendered:ready")})},setUpBehaviours:function(){if(!(this.model.get("user")&&this.model.get("user").email)){return}var a=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(a.is(":hidden")){a.slideDown("fast")}else{a.slideUp("fast")}return false});async_save_text("history-name-container","history-name",this.urls.rename,"new_name",18);async_save_text("history-annotation-container","history-annotation",this.urls.annotate,"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},showQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(b.is(":hidden")){b.slideDown("fast")}},hideQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(!b.is(":hidden")){b.slideUp("fast")}},events:{"click #history-collapse-all":"hideAllHdaBodies","click #history-tag":"loadAndDisplayTags"},hideAllHdaBodies:function(){_.each(this.hdaViews,function(a){a.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},loadAndDisplayTags:function(c){this.log(this+".loadAndDisplayTags",c);var d=this.$el.find("#history-tag-area"),b=d.find(".tag-elt");this.log("\t tagArea",d," tagElt",b);if(d.is(":hidden")){if(!jQuery.trim(b.html())){var a=this;$.ajax({url:a.urls.tag,error:function(){alert("Tagging failed")},success:function(e){b.html(e);b.find(".tooltip").tooltip();d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toString:function(){var a=this.model.get("name")||"";return"HistoryView("+a+")"}});HistoryPanel.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};
\ No newline at end of file
+var HistoryPanel=BaseView.extend(LoggableMixin).extend({el:"body.historyPage",initialize:function(a){this.log(this+".initialize:",a);if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}if(!a.urlTemplates.history){throw ("HDAView needs urlTemplates.history on initialize")}if(!a.urlTemplates.hda){throw ("HDAView needs urlTemplates.hda on initialize")}this.urlTemplates=a.urlTemplates.history;this.hdaUrlTemplates=a.urlTemplates.hda;this.storage=new PersistantStorage("HistoryView."+this.model.get("id"),{expandedHdas:{},show_deleted:false,show_hidden:false});this.log("this.storage:",this.storage.get());this.log("show_deleted:",a.show_deleted,"show_hidden",a.show_hidden);if((a.show_deleted===true)||(a.show_deleted===false)){this.storage.set("show_deleted",a.show_deleted)}if((a.show_hidden===true)||(a.show_hidden===false)){this.storage.set("show_hidden",a.show_hidden)}this.show_deleted=this.storage.get("show_deleted");this.show_hidden=this.storage.get("show_hidden");this.log("this.show_deleted:",this.show_deleted,"show_hidden",this.show_hidden);this.log("(now) this.storage:",this.storage.get());this.model.bind("change:nice_size",this.updateHistoryDiskSize,this);this.model.hdas.bind("add",this.add,this);this.model.hdas.bind("reset",this.addAll,this);this.model.hdas.bind("all",this.all,this);this.hdaViews={};this.urls={}},add:function(a){},addAll:function(){this.render()},all:function(a){},renderUrls:function(a){var b=this;b.urls={};_.each(this.urlTemplates,function(d,c){b.urls[c]=_.template(d,a)});return b.urls},render:function(){var b=this,d=b.toString()+".set-up",c=$("<div/>"),a=this.model.toJSON(),e=(this.$el.children().size()===0);a.urls=this.renderUrls(a);c.append(HistoryPanel.templates.historyPanel(a));c.find(".tooltip").tooltip({placement:"bottom"});this.setUpActionButton(c.find("#history-action-popup"));if(!this.model.hdas.length||!this.renderItems(c.find("#"+this.model.get("id")+"-datasets"))){c.find("#emptyHistoryMessage").show()}$(b).queue(d,function(f){b.$el.fadeOut("fast",function(){f()})});$(b).queue(d,function(f){b.$el.html("");b.$el.append(c.children());b.$el.fadeIn("fast",function(){f()})});$(b).queue(d,function(f){this.log(b+" rendered:",b.$el);b.setUpBehaviours();if(e){b.trigger("rendered:initial")}else{b.trigger("rendered")}f()});$(b).dequeue(d);return this},setUpActionButton:function(e){var c=this,d=(this.storage.get("show_deleted"))?("Hide deleted"):("Show deleted"),a=(this.storage.get("show_hidden"))?("Hide hidden"):("Show hidden"),b={};b[_l("refresh")]=function(){window.location.reload()};b[_l("collapse all")]=function(){c.hideAllHdaBodies()};b[_l(d)]=function(){c.toggleShowDeleted()};b[_l(a)]=function(){c.toggleShowHidden()};make_popupmenu(e,b)},renderItems:function(b){this.hdaViews={};var a=this,c=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"));_.each(c,function(f){var e=f.get("id"),d=a.storage.get("expandedHdas").get(e);a.hdaViews[e]=new HDAView({model:f,expanded:d,urlTemplates:a.hdaUrlTemplates});a.setUpHdaListeners(a.hdaViews[e]);b.prepend(a.hdaViews[e].render().$el)});return c.length},setUpHdaListeners:function(b){var a=this;b.bind("toggleBodyVisibility",function(d,c){if(c){a.storage.get("expandedHdas").set(d,true)}else{a.storage.get("expandedHdas").deleteKey(d)}});b.bind("rendered:ready",function(){a.trigger("hda:rendered:ready")})},setUpBehaviours:function(){if(!(this.model.get("user")&&this.model.get("user").email)){return}var a=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(a.is(":hidden")){a.slideDown("fast")}else{a.slideUp("fast")}return false});async_save_text("history-name-container","history-name",this.urls.rename,"new_name",18);async_save_text("history-annotation-container","history-annotation",this.urls.annotate,"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},events:{"click #history-tag":"loadAndDisplayTags"},showQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(b.is(":hidden")){b.slideDown("fast")}},hideQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(!b.is(":hidden")){b.slideUp("fast")}},toggleShowDeleted:function(a,c,b){this.storage.set("show_deleted",!this.storage.get("show_deleted"));this.render()},toggleShowHidden:function(){this.storage.set("show_hidden",!this.storage.get("show_hidden"));this.render()},hideAllHdaBodies:function(){_.each(this.hdaViews,function(a){a.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},loadAndDisplayTags:function(c){this.log(this+".loadAndDisplayTags",c);var d=this.$el.find("#history-tag-area"),b=d.find(".tag-elt");this.log("\t tagArea",d," tagElt",b);if(d.is(":hidden")){if(!jQuery.trim(b.html())){var a=this;$.ajax({url:a.urls.tag,error:function(){alert("Tagging failed")},success:function(e){b.html(e);b.find(".tooltip").tooltip();d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toString:function(){var a=this.model.get("name")||"";return"HistoryView("+a+")"}});HistoryPanel.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};
\ No newline at end of file
diff -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 -r 6344832c535aab0a8cc4a57be1414fc179e8540b static/scripts/packed/templates/compiled/template-history-historyPanel.js
--- a/static/scripts/packed/templates/compiled/template-history-historyPanel.js
+++ b/static/scripts/packed/templates/compiled/template-history-historyPanel.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(l,z,x,s,G){x=x||l.helpers;var y="",o,n,f="function",e=this.escapeExpression,v=this,c=x.blockHelperMissing;function u(L,K){var I="",J,H;I+='\n <div id="history-name" style="margin-right: 50px;" class="tooltip editable-text"\n title="Click to rename history">';H=x.name;if(H){J=H.call(L,{hash:{}})}else{J=L.name;J=typeof J===f?J():J}I+=e(J)+"</div>\n ";return I}function t(L,K){var I="",J,H;I+='\n <div id="history-name" style="margin-right: 50px;" class="tooltip"\n title="You must be logged in to edit your history name">';H=x.name;if(H){J=H.call(L,{hash:{}})}else{J=L.name;J=typeof J===f?J():J}I+=e(J)+"</div>\n ";return I}function r(I,H){return"refresh"}function q(I,H){return"collapse all"}function k(L,K){var I="",J,H;I+='\n <a id="history-tag" title="';H=x.local;if(H){J=H.call(L,{hash:{},inverse:v.noop,fn:v.program(10,F,K)})}else{J=L.local;J=typeof J===f?J():J}if(!x.local){J=c.call(L,J,{hash:{},inverse:v.noop,fn:v.program(10,F,K)})}if(J||J===0){I+=J}I+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';H=x.local;if(H){J=H.call(L,{hash:{},inverse:v.noop,fn:v.program(12,E,K)})}else{J=L.local;J=typeof J===f?J():J}if(!x.local){J=c.call(L,J,{hash:{},inverse:v.noop,fn:v.program(12,E,K)})}if(J||J===0){I+=J}I+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n ';return I}function F(I,H){return"Edit history tags"}function E(I,H){return"Edit history annotation"}function D(L,K){var I="",J,H;I+='\n <a href="';J=L.urls;J=J==null||J===false?J:J.hide_deleted;J=typeof J===f?J():J;I+=e(J)+'">';H=x.local;if(H){J=H.call(L,{hash:{},inverse:v.noop,fn:v.program(15,C,K)})}else{J=L.local;J=typeof J===f?J():J}if(!x.local){J=c.call(L,J,{hash:{},inverse:v.noop,fn:v.program(15,C,K)})}if(J||J===0){I+=J}I+="</a>\n ";return I}function C(I,H){return"hide deleted"}function B(L,K){var I="",J,H;I+='\n <a href="';J=L.urls;J=J==null||J===false?J:J.hide_hidden;J=typeof J===f?J():J;I+=e(J)+'">';H=x.local;if(H){J=H.call(L,{hash:{},inverse:v.noop,fn:v.program(18,A,K)})}else{J=L.local;J=typeof J===f?J():J}if(!x.local){J=c.call(L,J,{hash:{},inverse:v.noop,fn:v.program(18,A,K)})}if(J||J===0){I+=J}I+="</a>\n ";return I}function A(I,H){return"hide hidden"}function p(L,K){var I="",J,H;I+="\n";H=x.warningmessagesmall;if(H){J=H.call(L,{hash:{},inverse:v.noop,fn:v.program(21,m,K)})}else{J=L.warningmessagesmall;J=typeof J===f?J():J}if(!x.warningmessagesmall){J=c.call(L,J,{hash:{},inverse:v.noop,fn:v.program(21,m,K)})}if(J||J===0){I+=J}I+="\n";return I}function m(K,J){var I,H;H=x.local;if(H){I=H.call(K,{hash:{},inverse:v.noop,fn:v.program(22,j,J)})}else{I=K.local;I=typeof I===f?I():I}if(!x.local){I=c.call(K,I,{hash:{},inverse:v.noop,fn:v.program(22,j,J)})}if(I||I===0){return I}else{return""}}function j(I,H){return"You are currently viewing a deleted history!"}function i(K,J){var H="",I;H+='\n <div id="history-tag-area" style="display: none">\n <strong>Tags:</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>Annotation / Notes:</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text" title="Click to edit annotation">\n ';I=K.annotation;I=x["if"].call(K,I,{hash:{},inverse:v.program(27,g,J),fn:v.program(25,h,J)});if(I||I===0){H+=I}H+="\n </div>\n </div>\n </div>\n ";return H}function h(L,K){var I="",J,H;I+="\n ";H=x.annotation;if(H){J=H.call(L,{hash:{}})}else{J=L.annotation;J=typeof J===f?J():J}I+=e(J)+"\n ";return I}function g(I,H){return"\n <em>Describe or add notes to history</em>\n "}function d(L,K){var I="",J,H;I+='\n<div id="message-container">\n <div class="';H=x.status;if(H){J=H.call(L,{hash:{}})}else{J=L.status;J=typeof J===f?J():J}I+=e(J)+'message">\n ';H=x.message;if(H){J=H.call(L,{hash:{}})}else{J=L.message;J=typeof J===f?J():J}I+=e(J)+"\n </div><br />\n</div>\n";return I}function w(I,H){return"Your history is empty. Click 'Get Data' on the left pane to start"}y+='\n<div id="history-name-area" class="historyLinks">\n <div id="history-name-container" style="position: relative;">\n ';y+='\n <div id="history-size" style="position: absolute; top: 3px; right: 0px;">';n=x.nice_size;if(n){o=n.call(z,{hash:{}})}else{o=z.nice_size;o=typeof o===f?o():o}y+=e(o)+"</div>\n ";o=z.user;o=o==null||o===false?o:o.email;o=x["if"].call(z,o,{hash:{},inverse:v.program(3,t,G),fn:v.program(1,u,G)});if(o||o===0){y+=o}y+='\n </div> \n</div>\n<div style="clear: both;"></div>\n\n<div id="top-links" class="historyLinks">\n <a title="';n=x.local;if(n){o=n.call(z,{hash:{},inverse:v.noop,fn:v.program(5,r,G)})}else{o=z.local;o=typeof o===f?o():o}if(!x.local){o=c.call(z,o,{hash:{},inverse:v.noop,fn:v.program(5,r,G)})}if(o||o===0){y+=o}y+='" class="icon-button arrow-circle tooltip" href="';o=z.urls;o=o==null||o===false?o:o.base;o=typeof o===f?o():o;y+=e(o)+"\"></a>\n <a title='";n=x.local;if(n){o=n.call(z,{hash:{},inverse:v.noop,fn:v.program(7,q,G)})}else{o=z.local;o=typeof o===f?o():o}if(!x.local){o=c.call(z,o,{hash:{},inverse:v.noop,fn:v.program(7,q,G)})}if(o||o===0){y+=o}y+="' id=\"history-collapse-all\"\n class='icon-button toggle tooltip' href='javascript:void(0);'></a>\n <div style=\"width: 40px; float: right; white-space: nowrap;\">\n ";o=z.user;o=o==null||o===false?o:o.email;o=x["if"].call(z,o,{hash:{},inverse:v.noop,fn:v.program(9,k,G)});if(o||o===0){y+=o}y+='\n </div>\n</div>\n<div style="clear: both;"></div>\n\n';y+='\n<div class="historyLinks">\n ';o=z.show_deleted;o=x["if"].call(z,o,{hash:{},inverse:v.noop,fn:v.program(14,D,G)});if(o||o===0){y+=o}y+="\n ";o=z.show_hidden;o=x["if"].call(z,o,{hash:{},inverse:v.noop,fn:v.program(17,B,G)});if(o||o===0){y+=o}y+="\n</div>\n\n";o=z.deleted;o=x["if"].call(z,o,{hash:{},inverse:v.noop,fn:v.program(20,p,G)});if(o||o===0){y+=o}y+="\n\n";y+="\n";y+='\n<div style="margin: 0px 5px 10px 5px">\n\n ';o=z.user;o=o==null||o===false?o:o.email;o=x["if"].call(z,o,{hash:{},inverse:v.noop,fn:v.program(24,i,G)});if(o||o===0){y+=o}y+="\n</div>\n\n";o=z.message;o=x["if"].call(z,o,{hash:{},inverse:v.noop,fn:v.program(29,d,G)});if(o||o===0){y+=o}y+='\n\n<div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.\n </div>\n</div>\n\n<div id="';n=x.id;if(n){o=n.call(z,{hash:{}})}else{o=z.id;o=typeof o===f?o():o}y+=e(o)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';n=x.local;if(n){o=n.call(z,{hash:{},inverse:v.noop,fn:v.program(31,w,G)})}else{o=z.local;o=typeof o===f?o():o}if(!x.local){o=c.call(z,o,{hash:{},inverse:v.noop,fn:v.program(31,w,G)})}if(o||o===0){y+=o}y+="\n</div>";return y})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(f,s,q,m,A){q=q||f.helpers;var r="",j,i,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(F,E){var C="",D,B;C+='\n <div id="history-name" class="tooltip editable-text"\n title="Click to rename history">';B=q.name;if(B){D=B.call(F,{hash:{}})}else{D=F.name;D=typeof D===e?D():D}C+=d(D)+"</div>\n ";return C}function n(F,E){var C="",D,B;C+='\n <div id="history-name" class="tooltip"\n title="You must be logged in to edit your history name">';B=q.name;if(B){D=B.call(F,{hash:{}})}else{D=F.name;D=typeof D===e?D():D}C+=d(D)+"</div>\n ";return C}function l(F,E){var C="",D,B;C+='\n <div id="history-secondary-links" style="float: right;">\n <a id="history-tag" title="';B=q.local;if(B){D=B.call(F,{hash:{},inverse:p.noop,fn:p.program(6,k,E)})}else{D=F.local;D=typeof D===e?D():D}if(!q.local){D=c.call(F,D,{hash:{},inverse:p.noop,fn:p.program(6,k,E)})}if(D||D===0){C+=D}C+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';B=q.local;if(B){D=B.call(F,{hash:{},inverse:p.noop,fn:p.program(8,h,E)})}else{D=F.local;D=typeof D===e?D():D}if(!q.local){D=c.call(F,D,{hash:{},inverse:p.noop,fn:p.program(8,h,E)})}if(D||D===0){C+=D}C+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n </div>\n ';return C}function k(C,B){return"Edit history tags"}function h(C,B){return"Edit history annotation"}function z(F,E){var C="",D,B;C+="\n ";B=q.warningmessagesmall;if(B){D=B.call(F,{hash:{},inverse:p.noop,fn:p.program(11,y,E)})}else{D=F.warningmessagesmall;D=typeof D===e?D():D}if(!q.warningmessagesmall){D=c.call(F,D,{hash:{},inverse:p.noop,fn:p.program(11,y,E)})}if(D||D===0){C+=D}C+="\n ";return C}function y(E,D){var C,B;B=q.local;if(B){C=B.call(E,{hash:{},inverse:p.noop,fn:p.program(12,x,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(12,x,D)})}if(C||C===0){return C}else{return""}}function x(C,B){return"You are currently viewing a deleted history!"}function w(E,D){var B="",C;B+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>Tags:</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>Annotation / Notes:</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text" title="Click to edit annotation">\n ';C=E.annotation;C=q["if"].call(E,C,{hash:{},inverse:p.program(17,u,D),fn:p.program(15,v,D)});if(C||C===0){B+=C}B+="\n </div>\n </div>\n </div>\n </div>\n ";return B}function v(F,E){var C="",D,B;C+="\n ";B=q.annotation;if(B){D=B.call(F,{hash:{}})}else{D=F.annotation;D=typeof D===e?D():D}C+=d(D)+"\n ";return C}function u(C,B){return"\n <em>Describe or add notes to history</em>\n "}function t(F,E){var C="",D,B;C+='\n <div id="message-container">\n <div class="';B=q.status;if(B){D=B.call(F,{hash:{}})}else{D=F.status;D=typeof D===e?D():D}C+=d(D)+'message">\n ';B=q.message;if(B){D=B.call(F,{hash:{}})}else{D=F.message;D=typeof D===e?D():D}C+=d(D)+"\n </div><br />\n </div>\n ";return C}function g(C,B){return"Your history is empty. Click 'Get Data' on the left pane to start"}r+='\n<div id="history-controls">\n <div id="history-title-area" class="historyLinks">\n\n <div id="history-name-container" style="float: left;">\n ';r+="\n ";j=s.user;j=j==null||j===false?j:j.email;j=q["if"].call(s,j,{hash:{},inverse:p.program(3,n,A),fn:p.program(1,o,A)});if(j||j===0){r+=j}r+='\n </div>\n\n <a id="history-action-popup" href="javascript:void(0);" style="float: right;">\n <span class="ficon cog large"></span>\n </a>\n <div style="clear: both;"></div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';i=q.nice_size;if(i){j=i.call(s,{hash:{}})}else{j=s.nice_size;j=typeof j===e?j():j}r+=d(j)+"</div>\n ";j=s.user;j=j==null||j===false?j:j.email;j=q["if"].call(s,j,{hash:{},inverse:p.noop,fn:p.program(5,l,A)});if(j||j===0){r+=j}r+='\n <div style="clear: both;"></div>\n </div>\n\n ';j=s.deleted;j=q["if"].call(s,j,{hash:{},inverse:p.noop,fn:p.program(10,z,A)});if(j||j===0){r+=j}r+="\n\n ";r+="\n ";r+="\n ";j=s.user;j=j==null||j===false?j:j.email;j=q["if"].call(s,j,{hash:{},inverse:p.noop,fn:p.program(14,w,A)});if(j||j===0){r+=j}r+="\n\n ";j=s.message;j=q["if"].call(s,j,{hash:{},inverse:p.noop,fn:p.program(19,t,A)});if(j||j===0){r+=j}r+='\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.\n </div>\n </div>\n</div>\n\n<div id="';i=q.id;if(i){j=i.call(s,{hash:{}})}else{j=s.id;j=typeof j===e?j():j}r+=d(j)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';i=q.local;if(i){j=i.call(s,{hash:{},inverse:p.noop,fn:p.program(21,g,A)})}else{j=s.local;j=typeof j===e?j():j}if(!q.local){j=c.call(s,j,{hash:{},inverse:p.noop,fn:p.program(21,g,A)})}if(j||j===0){r+=j}r+="\n</div>";return r})})();
\ No newline at end of file
diff -r c2e7520982ef42400a93f97654ad55ce7d6d1a30 -r 6344832c535aab0a8cc4a57be1414fc179e8540b static/scripts/packed/viz/circster.js
--- a/static/scripts/packed/viz/circster.js
+++ b/static/scripts/packed/viz/circster.js
@@ -1,1 +1,1 @@
-define(["libs/underscore","libs/d3","viz/visualization"],function(g,l,i){var m=Backbone.Model.extend({is_visible:function(q,n){var o=q.getBoundingClientRect(),p=$("svg")[0].getBoundingClientRect();if(o.right<0||o.left>p.right||o.bottom<0||o.top>p.bottom){return false}return true}});var h={drawTicks:function(r,q,v,p,n){var u=r.append("g").selectAll("g").data(q).enter().append("g").selectAll("g").data(v).enter().append("g").attr("class","tick").attr("transform",function(w){return"rotate("+(w.angle*180/Math.PI-90)+")translate("+w.radius+",0)"});var t=[],s=[],o=function(w){return w.angle>Math.PI?"end":null};if(n){t=[0,0,0,-4];s=[4,0,"",".35em"];o=null}else{t=[1,0,4,0];s=[0,4,".35em",""]}u.append("line").attr("x1",t[0]).attr("y1",t[1]).attr("x2",t[2]).attr("y1",t[3]).style("stroke","#000");u.append("text").attr("x",s[0]).attr("y",s[1]).attr("dx",s[2]).attr("dy",s[3]).attr("text-anchor",o).attr("transform",p).text(function(w){return w.label})},formatNum:function(o,n){var q=null;if(o<1){q=o.toPrecision(n)}else{var p=Math.round(o.toPrecision(n));if(o<1000){q=p}else{if(o<1000000){q=Math.round((p/1000).toPrecision(3)).toFixed(0)+"K"}else{if(o<1000000000){q=Math.round((p/1000000).toPrecision(3)).toFixed(0)+"M"}}}}return q}};var c=Backbone.Model.extend({});var a=Backbone.View.extend({className:"circster",initialize:function(n){this.total_gap=n.total_gap;this.genome=n.genome;this.dataset_arc_height=n.dataset_arc_height;this.track_gap=10;this.label_arc_height=50;this.scale=1;this.circular_views=null;this.chords_views=null;this.model.get("tracks").on("add",this.add_track,this);this.model.get("tracks").on("remove",this.remove_track,this);this.get_circular_tracks()},get_circular_tracks:function(){return this.model.get("tracks").filter(function(n){return n.get("track_type")!=="DiagonalHeatmapTrack"})},get_chord_tracks:function(){return this.model.get("tracks").filter(function(n){return n.get("track_type")==="DiagonalHeatmapTrack"})},get_tracks_bounds:function(){var o=this.get_circular_tracks();dataset_arc_height=this.dataset_arc_height,min_dimension=Math.min(this.$el.width(),this.$el.height()),radius_start=min_dimension/2-o.length*(this.dataset_arc_height+this.track_gap)-(this.label_arc_height+this.track_gap),tracks_start_radii=l.range(radius_start,min_dimension/2,this.dataset_arc_height+this.track_gap);var n=this;return g.map(tracks_start_radii,function(p){return[p,p+n.dataset_arc_height]})},render:function(){var w=this,q=this.dataset_arc_height,n=w.$el.width(),v=w.$el.height(),s=this.get_circular_tracks(),p=this.get_chord_tracks(),r=this.get_tracks_bounds(),o=l.select(w.$el[0]).append("svg").attr("width",n).attr("height",v).attr("pointer-events","all").append("svg:g").call(l.behavior.zoom().on("zoom",function(){var x=l.event.scale;o.attr("transform","translate("+l.event.translate+") scale("+x+")");if(w.scale!==x){if(w.zoom_drag_timeout){clearTimeout(w.zoom_drag_timeout)}w.zoom_drag_timeout=setTimeout(function(){},400)}})).attr("transform","translate("+n/2+","+v/2+")").append("svg:g").attr("class","tracks");this.circular_views=s.map(function(y,z){var A=(y.get("track_type")==="LineTrack"?d:e),x=new A({el:o.append("g")[0],track:y,radius_bounds:r[z],genome:w.genome,total_gap:w.total_gap});x.render();return x});this.chords_views=p.map(function(y){var x=new j({el:o.append("g")[0],track:y,radius_bounds:r[0],genome:w.genome,total_gap:w.total_gap});x.render();return x});var u=this.circular_views[this.circular_views.length-1].radius_bounds[1],t=[u,u+this.label_arc_height];this.label_track_view=new b({el:o.append("g")[0],track:new c(),radius_bounds:t,genome:w.genome,total_gap:w.total_gap});this.label_track_view.render()},add_track:function(t){if(t.get("track_type")==="DiagonalHeatmapTrack"){var p=this.circular_views[0].radius_bounds,s=new j({el:l.select("g.tracks").append("g")[0],track:t,radius_bounds:p,genome:this.genome,total_gap:this.total_gap});s.render();this.chords_views.push(s)}else{var r=this.get_tracks_bounds();g.each(this.circular_views,function(v,w){v.update_radius_bounds(r[w])});g.each(this.chords_views,function(v){v.update_radius_bounds(r[0])});var q=this.circular_views.length,u=(t.get("track_type")==="LineTrack"?d:e),n=new u({el:l.select("g.tracks").append("g")[0],track:t,radius_bounds:r[q],genome:this.genome,total_gap:this.total_gap});n.render();this.circular_views.push(n);var o=r[r.length-1];o[1]=o[0];this.label_track_view.update_radius_bounds(o)}},remove_track:function(o,q,p){var n=this.circular_views[p.index];this.circular_views.splice(p.index,1);n.$el.remove();var r=this.get_tracks_bounds();g.each(this.circular_views,function(s,t){s.update_radius_bounds(r[t])})}});var k=Backbone.View.extend({tagName:"g",initialize:function(n){this.bg_stroke="ccc";this.loading_bg_fill="000";this.bg_fill="ccc";this.total_gap=n.total_gap;this.track=n.track;this.radius_bounds=n.radius_bounds;this.genome=n.genome;this.chroms_layout=this._chroms_layout();this.data_bounds=[];this.scale=1;this.parent_elt=l.select(this.$el[0])},get_fill_color:function(){var n=this.track.get("config").get_value("block_color");if(!n){n=this.track.get("config").get_value("color")}return n},render:function(){var r=this.parent_elt;if(!r){console.log("no parent elt")}var q=this.chroms_layout,t=l.svg.arc().innerRadius(this.radius_bounds[0]).outerRadius(this.radius_bounds[1]),n=r.selectAll("g").data(q).enter().append("svg:g"),p=n.append("path").attr("d",t).attr("class","chrom-background").style("stroke",this.bg_stroke).style("fill",this.loading_bg_fill);p.append("title").text(function(v){return v.data.chrom});var o=this,s=o.track.get("data_manager"),u=(s?s.data_is_ready():true);$.when(u).then(function(){$.when(o._render_data(r)).then(function(){p.style("fill",o.bg_fill);o.render_labels()})})},render_labels:function(){},update_radius_bounds:function(o){this.radius_bounds=o;var n=l.svg.arc().innerRadius(this.radius_bounds[0]).outerRadius(this.radius_bounds[1]);this.parent_elt.selectAll("g>path.chrom-background").transition().duration(1000).attr("d",n);this._transition_chrom_data();this._transition_labels()},update_scale:function(q){var p=this.scale;this.scale=q;if(q<=p){return}var o=this,n=new m();this.parent_elt.selectAll("path.chrom-data").filter(function(s,r){return n.is_visible(this)}).each(function(x,t){var w=l.select(this),s=w.attr("chrom"),v=o.genome.get_chrom_region(s),u=o.track.get("data_manager"),r;if(!u.can_get_more_detailed_data(v)){return}r=o.track.get("data_manager").get_more_detailed_data(v,"Coverage",0,q);$.when(r).then(function(A){w.remove();o._update_data_bounds();var z=g.find(o.chroms_layout,function(B){return B.data.chrom===s});var y=o.get_fill_color();o._render_chrom_data(o.parent_elt,z,A).style("stroke",y).style("fill",y)})});return o},_transition_chrom_data:function(){var o=this.track,q=this.chroms_layout,n=this.parent_elt.selectAll("g>path.chrom-data"),r=n[0].length;if(r>0){var p=this;$.when(o.get("data_manager").get_genome_wide_data(this.genome)).then(function(t){var s=g.reject(g.map(t,function(u,v){var w=null,x=p._get_path_function(q[v],u);if(x){w=x(u.data)}return w}),function(u){return u===null});n.each(function(v,u){l.select(this).transition().duration(1000).attr("d",s[u])})})}},_transition_labels:function(){},_update_data_bounds:function(){var n=this.data_bounds;this.data_bounds=this.get_data_bounds(this.track.get("data_manager").get_genome_wide_data(this.genome));if(this.data_bounds[0]<n[0]||this.data_bounds[1]>n[1]){this._transition_chrom_data()}},_render_data:function(q){var p=this,o=this.chroms_layout,n=this.track,r=$.Deferred();$.when(n.get("data_manager").get_genome_wide_data(this.genome)).then(function(t){p.data_bounds=p.get_data_bounds(t);layout_and_data=g.zip(o,t),chroms_data_layout=g.map(layout_and_data,function(u){var v=u[0],w=u[1];return p._render_chrom_data(q,v,w)});var s=p.get_fill_color();p.parent_elt.selectAll("path.chrom-data").style("stroke",s).style("fill",s);r.resolve(q)});return r},_render_chrom_data:function(n,o,p){},_get_path_function:function(o,n){},_chroms_layout:function(){var o=this.genome.get_chroms_info(),q=l.layout.pie().value(function(s){return s.len}).sort(null),r=q(o),n=this.total_gap/o.length,p=g.map(r,function(u,t){var s=u.endAngle-n;u.endAngle=(s>u.startAngle?s:u.startAngle);return u});return p}});var b=k.extend({initialize:function(n){k.prototype.initialize.call(this,n);this.innerRadius=this.radius_bounds[0];this.radius_bounds[0]=this.radius_bounds[1];this.bg_stroke="fff";this.bg_fill="fff";this.min_arc_len=0.08},_render_data:function(p){var o=this,n=p.selectAll("g");n.selectAll("path").attr("id",function(t){return"label-"+t.data.chrom});n.append("svg:text").filter(function(t){return t.endAngle-t.startAngle>o.min_arc_len}).attr("text-anchor","middle").append("svg:textPath").attr("xlink:href",function(t){return"#label-"+t.data.chrom}).attr("startOffset","25%").attr("font-weight","bold").text(function(t){return t.data.chrom});var q=function(v){var t=(v.endAngle-v.startAngle)/v.value,u=l.range(0,v.value,25000000).map(function(w,x){return{radius:o.innerRadius,angle:w*t+v.startAngle,label:x===0?0:(x%3?null:o.formatNum(w))}});if(u.length<4){u[u.length-1].label=o.formatNum(Math.round((u[u.length-1].angle-v.startAngle)/t))}return u};var s=function(t){return t.angle>Math.PI?"rotate(180)translate(-16)":null};var r=g.filter(this.chroms_layout,function(t){return t.endAngle-t.startAngle>o.min_arc_len});this.drawTicks(this.parent_elt,r,q,s)}});g.extend(b.prototype,h);var f=k.extend({_quantile:function(o,n){o.sort(l.ascending);return l.quantile(o,n)},_render_chrom_data:function(n,q,o){var r=this._get_path_function(q,o);if(!r){return null}var p=n.datum(o.data),s=p.append("path").attr("class","chrom-data").attr("chrom",q.data.chrom).attr("d",r);return s},_get_path_function:function(q,p){if(typeof p==="string"||!p.data||p.data.length===0){return null}var n=l.scale.linear().domain(this.data_bounds).range(this.radius_bounds).clamp(true);var r=l.scale.linear().domain([0,p.data.length]).range([q.startAngle,q.endAngle]);var o=l.svg.line.radial().interpolate("linear").radius(function(s){return n(s[1])}).angle(function(t,s){return r(s)});return l.svg.area.radial().interpolate(o.interpolate()).innerRadius(n(0)).outerRadius(o.radius()).angle(o.angle())},render_labels:function(){var n=this,q=function(){return"rotate(90)"};var p=g.filter(this.chroms_layout,function(r){return r.endAngle-r.startAngle>0.08}),o=g.filter(p,function(s,r){return r%3===0});this.drawTicks(this.parent_elt,o,this._data_bounds_ticks_fn(),q,true)},_transition_labels:function(){var o=this,q=g.filter(this.chroms_layout,function(r){return r.endAngle-r.startAngle>0.08}),p=g.filter(q,function(s,r){return r%3===0}),n=g.flatten(g.map(p,function(r){return o._data_bounds_ticks_fn()(r)}));this.parent_elt.selectAll("g.tick").data(n).transition().attr("transform",function(r){return"rotate("+(r.angle*180/Math.PI-90)+")translate("+r.radius+",0)"})},_data_bounds_ticks_fn:function(){var n=this;visibleChroms=0;return function(o){return[{radius:n.radius_bounds[0],angle:o.startAngle,label:n.formatNum(n.data_bounds[0])},{radius:n.radius_bounds[1],angle:o.startAngle,label:n.formatNum(n.data_bounds[1])}]}},get_data_bounds:function(n){}});g.extend(f.prototype,h);var e=f.extend({get_data_bounds:function(o){var n=g.map(o,function(p){if(typeof p==="string"||!p.max){return 0}return p.max});return[0,(n&&typeof n!=="string"?this._quantile(values,0.98):0)]}});var d=f.extend({get_data_bounds:function(o){var n=g.flatten(g.map(o,function(p){if(p){return g.map(p.data,function(q){return q[1]})}else{return 0}}));return[g.min(n),this._quantile(n,0.98)]}});var j=k.extend({render:function(){var n=this;$.when(n.track.get("data_manager").data_is_ready()).then(function(){$.when(n.track.get("data_manager").get_genome_wide_data(n.genome)).then(function(q){var p=[],o=n.genome.get_chroms_info();g.each(q,function(u,t){var r=o[t].chrom;var s=g.map(u.data,function(w){var v=n._get_region_angle(r,w[1]),x=n._get_region_angle(w[3],w[4]);return{source:{startAngle:v,endAngle:v+0.01},target:{startAngle:x,endAngle:x+0.01}}});p=p.concat(s)});n.parent_elt.append("g").attr("class","chord").selectAll("path").data(p).enter().append("path").style("fill",n.get_fill_color()).attr("d",l.svg.chord().radius(n.radius_bounds[0])).style("opacity",1)})})},update_radius_bounds:function(n){this.radius_bounds=n;this.parent_elt.selectAll("path").transition().attr("d",l.svg.chord().radius(this.radius_bounds[0]))},_get_region_angle:function(p,n){var o=g.find(this.chroms_layout,function(q){return q.data.chrom===p});return o.endAngle-((o.endAngle-o.startAngle)*(o.data.len-n)/o.data.len)}});return{CircsterView:a}});
\ No newline at end of file
+define(["libs/underscore","libs/d3","viz/visualization"],function(g,l,i){var m=Backbone.Model.extend({is_visible:function(q,n){var o=q.getBoundingClientRect(),p=$("svg")[0].getBoundingClientRect();if(o.right<0||o.left>p.right||o.bottom<0||o.top>p.bottom){return false}return true}});var h={drawTicks:function(r,q,v,p,n){var u=r.append("g").selectAll("g").data(q).enter().append("g").selectAll("g").data(v).enter().append("g").attr("class","tick").attr("transform",function(w){return"rotate("+(w.angle*180/Math.PI-90)+")translate("+w.radius+",0)"});var t=[],s=[],o=function(w){return w.angle>Math.PI?"end":null};if(n){t=[0,0,0,-4];s=[4,0,"",".35em"];o=null}else{t=[1,0,4,0];s=[0,4,".35em",""]}u.append("line").attr("x1",t[0]).attr("y1",t[1]).attr("x2",t[2]).attr("y1",t[3]).style("stroke","#000");u.append("text").attr("x",s[0]).attr("y",s[1]).attr("dx",s[2]).attr("dy",s[3]).attr("text-anchor",o).attr("transform",p).text(function(w){return w.label})},formatNum:function(o,n){var q=null;if(o<1){q=o.toPrecision(n)}else{var p=Math.round(o.toPrecision(n));if(o<1000){q=p}else{if(o<1000000){q=Math.round((p/1000).toPrecision(3)).toFixed(0)+"K"}else{if(o<1000000000){q=Math.round((p/1000000).toPrecision(3)).toFixed(0)+"M"}}}}return q}};var c=Backbone.Model.extend({});var a=Backbone.View.extend({className:"circster",initialize:function(n){this.total_gap=n.total_gap;this.genome=n.genome;this.dataset_arc_height=n.dataset_arc_height;this.track_gap=10;this.label_arc_height=50;this.scale=1;this.circular_views=null;this.chords_views=null;this.model.get("tracks").on("add",this.add_track,this);this.model.get("tracks").on("remove",this.remove_track,this);this.get_circular_tracks()},get_circular_tracks:function(){return this.model.get("tracks").filter(function(n){return n.get("track_type")!=="DiagonalHeatmapTrack"})},get_chord_tracks:function(){return this.model.get("tracks").filter(function(n){return n.get("track_type")==="DiagonalHeatmapTrack"})},get_tracks_bounds:function(){var o=this.get_circular_tracks();dataset_arc_height=this.dataset_arc_height,min_dimension=Math.min(this.$el.width(),this.$el.height()),radius_start=min_dimension/2-o.length*(this.dataset_arc_height+this.track_gap)-(this.label_arc_height+this.track_gap),tracks_start_radii=l.range(radius_start,min_dimension/2,this.dataset_arc_height+this.track_gap);var n=this;return g.map(tracks_start_radii,function(p){return[p,p+n.dataset_arc_height]})},render:function(){var w=this,q=this.dataset_arc_height,n=w.$el.width(),v=w.$el.height(),s=this.get_circular_tracks(),p=this.get_chord_tracks(),r=this.get_tracks_bounds(),o=l.select(w.$el[0]).append("svg").attr("width",n).attr("height",v).attr("pointer-events","all").append("svg:g").call(l.behavior.zoom().on("zoom",function(){var x=l.event.scale;o.attr("transform","translate("+l.event.translate+") scale("+x+")");if(w.scale!==x){if(w.zoom_drag_timeout){clearTimeout(w.zoom_drag_timeout)}w.zoom_drag_timeout=setTimeout(function(){},400)}})).attr("transform","translate("+n/2+","+v/2+")").append("svg:g").attr("class","tracks");this.circular_views=s.map(function(y,z){var A=(y.get("track_type")==="LineTrack"?d:e),x=new A({el:o.append("g")[0],track:y,radius_bounds:r[z],genome:w.genome,total_gap:w.total_gap});x.render();return x});this.chords_views=p.map(function(y){var x=new j({el:o.append("g")[0],track:y,radius_bounds:r[0],genome:w.genome,total_gap:w.total_gap});x.render();return x});var u=this.circular_views[this.circular_views.length-1].radius_bounds[1],t=[u,u+this.label_arc_height];this.label_track_view=new b({el:o.append("g")[0],track:new c(),radius_bounds:t,genome:w.genome,total_gap:w.total_gap});this.label_track_view.render()},add_track:function(t){if(t.get("track_type")==="DiagonalHeatmapTrack"){var p=this.circular_views[0].radius_bounds,s=new j({el:l.select("g.tracks").append("g")[0],track:t,radius_bounds:p,genome:this.genome,total_gap:this.total_gap});s.render();this.chords_views.push(s)}else{var r=this.get_tracks_bounds();g.each(this.circular_views,function(v,w){v.update_radius_bounds(r[w])});g.each(this.chords_views,function(v){v.update_radius_bounds(r[0])});var q=this.circular_views.length,u=(t.get("track_type")==="LineTrack"?d:e),n=new u({el:l.select("g.tracks").append("g")[0],track:t,radius_bounds:r[q],genome:this.genome,total_gap:this.total_gap});n.render();this.circular_views.push(n);var o=r[r.length-1];o[1]=o[0];this.label_track_view.update_radius_bounds(o)}},remove_track:function(o,q,p){var n=this.circular_views[p.index];this.circular_views.splice(p.index,1);n.$el.remove();var r=this.get_tracks_bounds();g.each(this.circular_views,function(s,t){s.update_radius_bounds(r[t])})}});var k=Backbone.View.extend({tagName:"g",initialize:function(n){this.bg_stroke="ccc";this.loading_bg_fill="000";this.bg_fill="ccc";this.total_gap=n.total_gap;this.track=n.track;this.radius_bounds=n.radius_bounds;this.genome=n.genome;this.chroms_layout=this._chroms_layout();this.data_bounds=[];this.scale=1;this.parent_elt=l.select(this.$el[0])},get_fill_color:function(){var n=this.track.get("config").get_value("block_color");if(!n){n=this.track.get("config").get_value("color")}return n},render:function(){var r=this.parent_elt;if(!r){console.log("no parent elt")}var q=this.chroms_layout,t=l.svg.arc().innerRadius(this.radius_bounds[0]).outerRadius(this.radius_bounds[1]),n=r.selectAll("g").data(q).enter().append("svg:g"),p=n.append("path").attr("d",t).attr("class","chrom-background").style("stroke",this.bg_stroke).style("fill",this.loading_bg_fill);p.append("title").text(function(v){return v.data.chrom});var o=this,s=o.track.get("data_manager"),u=(s?s.data_is_ready():true);$.when(u).then(function(){$.when(o._render_data(r)).then(function(){p.style("fill",o.bg_fill);o.render_labels()})})},render_labels:function(){},update_radius_bounds:function(o){this.radius_bounds=o;var n=l.svg.arc().innerRadius(this.radius_bounds[0]).outerRadius(this.radius_bounds[1]);this.parent_elt.selectAll("g>path.chrom-background").transition().duration(1000).attr("d",n);this._transition_chrom_data();this._transition_labels()},update_scale:function(q){var p=this.scale;this.scale=q;if(q<=p){return}var o=this,n=new m();this.parent_elt.selectAll("path.chrom-data").filter(function(s,r){return n.is_visible(this)}).each(function(x,t){var w=l.select(this),s=w.attr("chrom"),v=o.genome.get_chrom_region(s),u=o.track.get("data_manager"),r;if(!u.can_get_more_detailed_data(v)){return}r=o.track.get("data_manager").get_more_detailed_data(v,"Coverage",0,q);$.when(r).then(function(A){w.remove();o._update_data_bounds();var z=g.find(o.chroms_layout,function(B){return B.data.chrom===s});var y=o.get_fill_color();o._render_chrom_data(o.parent_elt,z,A).style("stroke",y).style("fill",y)})});return o},_transition_chrom_data:function(){var o=this.track,q=this.chroms_layout,n=this.parent_elt.selectAll("g>path.chrom-data"),r=n[0].length;if(r>0){var p=this;$.when(o.get("data_manager").get_genome_wide_data(this.genome)).then(function(t){var s=g.reject(g.map(t,function(u,v){var w=null,x=p._get_path_function(q[v],u);if(x){w=x(u.data)}return w}),function(u){return u===null});n.each(function(v,u){l.select(this).transition().duration(1000).attr("d",s[u])})})}},_transition_labels:function(){},_update_data_bounds:function(){var n=this.data_bounds;this.data_bounds=this.get_data_bounds(this.track.get("data_manager").get_genome_wide_data(this.genome));if(this.data_bounds[0]<n[0]||this.data_bounds[1]>n[1]){this._transition_chrom_data()}},_render_data:function(q){var p=this,o=this.chroms_layout,n=this.track,r=$.Deferred();$.when(n.get("data_manager").get_genome_wide_data(this.genome)).then(function(t){p.data_bounds=p.get_data_bounds(t);layout_and_data=g.zip(o,t),chroms_data_layout=g.map(layout_and_data,function(u){var v=u[0],w=u[1];return p._render_chrom_data(q,v,w)});var s=p.get_fill_color();p.parent_elt.selectAll("path.chrom-data").style("stroke",s).style("fill",s);r.resolve(q)});return r},_render_chrom_data:function(n,o,p){},_get_path_function:function(o,n){},_chroms_layout:function(){var o=this.genome.get_chroms_info(),q=l.layout.pie().value(function(s){return s.len}).sort(null),r=q(o),n=this.total_gap/o.length,p=g.map(r,function(u,t){var s=u.endAngle-n;u.endAngle=(s>u.startAngle?s:u.startAngle);return u});return p}});var b=k.extend({initialize:function(n){k.prototype.initialize.call(this,n);this.innerRadius=this.radius_bounds[0];this.radius_bounds[0]=this.radius_bounds[1];this.bg_stroke="fff";this.bg_fill="fff";this.min_arc_len=0.08},_render_data:function(p){var o=this,n=p.selectAll("g");n.selectAll("path").attr("id",function(t){return"label-"+t.data.chrom});n.append("svg:text").filter(function(t){return t.endAngle-t.startAngle>o.min_arc_len}).attr("text-anchor","middle").append("svg:textPath").attr("xlink:href",function(t){return"#label-"+t.data.chrom}).attr("startOffset","25%").attr("font-weight","bold").text(function(t){return t.data.chrom});var q=function(v){var t=(v.endAngle-v.startAngle)/v.value,u=l.range(0,v.value,25000000).map(function(w,x){return{radius:o.innerRadius,angle:w*t+v.startAngle,label:x===0?0:(x%3?null:o.formatNum(w))}});if(u.length<4){u[u.length-1].label=o.formatNum(Math.round((u[u.length-1].angle-v.startAngle)/t))}return u};var s=function(t){return t.angle>Math.PI?"rotate(180)translate(-16)":null};var r=g.filter(this.chroms_layout,function(t){return t.endAngle-t.startAngle>o.min_arc_len});this.drawTicks(this.parent_elt,r,q,s)}});g.extend(b.prototype,h);var f=k.extend({_quantile:function(o,n){o.sort(l.ascending);return l.quantile(o,n)},_render_chrom_data:function(n,q,o){var r=this._get_path_function(q,o);if(!r){return null}var p=n.datum(o.data),s=p.append("path").attr("class","chrom-data").attr("chrom",q.data.chrom).attr("d",r);return s},_get_path_function:function(q,p){if(typeof p==="string"||!p.data||p.data.length===0){return null}var n=l.scale.linear().domain(this.data_bounds).range(this.radius_bounds).clamp(true);var r=l.scale.linear().domain([0,p.data.length]).range([q.startAngle,q.endAngle]);var o=l.svg.line.radial().interpolate("linear").radius(function(s){return n(s[1])}).angle(function(t,s){return r(s)});return l.svg.area.radial().interpolate(o.interpolate()).innerRadius(n(0)).outerRadius(o.radius()).angle(o.angle())},render_labels:function(){var n=this,q=function(){return"rotate(90)"};var p=g.filter(this.chroms_layout,function(r){return r.endAngle-r.startAngle>0.08}),o=g.filter(p,function(s,r){return r%3===0});this.drawTicks(this.parent_elt,o,this._data_bounds_ticks_fn(),q,true)},_transition_labels:function(){if(this.data_bounds.length===0){return}var o=this,q=g.filter(this.chroms_layout,function(r){return r.endAngle-r.startAngle>0.08}),p=g.filter(q,function(s,r){return r%3===0}),n=g.flatten(g.map(p,function(r){return o._data_bounds_ticks_fn()(r)}));this.parent_elt.selectAll("g.tick").data(n).transition().attr("transform",function(r){return"rotate("+(r.angle*180/Math.PI-90)+")translate("+r.radius+",0)"})},_data_bounds_ticks_fn:function(){var n=this;visibleChroms=0;return function(o){return[{radius:n.radius_bounds[0],angle:o.startAngle,label:n.formatNum(n.data_bounds[0])},{radius:n.radius_bounds[1],angle:o.startAngle,label:n.formatNum(n.data_bounds[1])}]}},get_data_bounds:function(n){}});g.extend(f.prototype,h);var e=f.extend({get_data_bounds:function(o){var n=g.map(o,function(p){if(typeof p==="string"||!p.max){return 0}return p.max});return[0,(n&&typeof n!=="string"?this._quantile(values,0.98):0)]}});var d=f.extend({get_data_bounds:function(o){var n=g.flatten(g.map(o,function(p){if(p){return g.map(p.data,function(q){return q[1]})}else{return 0}}));return[g.min(n),this._quantile(n,0.98)]}});var j=k.extend({render:function(){var n=this;$.when(n.track.get("data_manager").data_is_ready()).then(function(){$.when(n.track.get("data_manager").get_genome_wide_data(n.genome)).then(function(q){var p=[],o=n.genome.get_chroms_info();g.each(q,function(u,t){var r=o[t].chrom;var s=g.map(u.data,function(w){var v=n._get_region_angle(r,w[1]),x=n._get_region_angle(w[3],w[4]);return{source:{startAngle:v,endAngle:v+0.01},target:{startAngle:x,endAngle:x+0.01}}});p=p.concat(s)});n.parent_elt.append("g").attr("class","chord").selectAll("path").data(p).enter().append("path").style("fill",n.get_fill_color()).attr("d",l.svg.chord().radius(n.radius_bounds[0])).style("opacity",1)})})},update_radius_bounds:function(n){this.radius_bounds=n;this.parent_elt.selectAll("path").transition().attr("d",l.svg.chord().radius(this.radius_bounds[0]))},_get_region_angle:function(p,n){var o=g.find(this.chroms_layout,function(q){return q.data.chrom===p});return o.endAngle-((o.endAngle-o.startAngle)*(o.data.len-n)/o.data.len)}});return{CircsterView:a}});
\ No newline at end of file
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Add the shed_tool_data_table_config to the functional test's app.
by Bitbucket 08 Nov '12
by Bitbucket 08 Nov '12
08 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/86fbf6e15f79/
changeset: 86fbf6e15f79
user: greg
date: 2012-11-08 17:41:21
summary: Add the shed_tool_data_table_config to the functional test's app.
affected #: 1 file
diff -r 762d4010a9a534ce5237d7a0bb6d317a9d9501ac -r 86fbf6e15f791d62f7a2472d9987577011aa9a8c scripts/functional_tests.py
--- a/scripts/functional_tests.py
+++ b/scripts/functional_tests.py
@@ -169,6 +169,7 @@
tool_data_table_config_path = 'tool_data_table_conf.test.xml'
else:
tool_data_table_config_path = 'tool_data_table_conf.xml'
+ shed_tool_data_table_config = 'shed_tool_data_table_conf.xml'
tool_dependency_dir = os.environ.get( 'GALAXY_TOOL_DEPENDENCY_DIR', None )
use_distributed_object_store = os.environ.get( 'GALAXY_USE_DISTRIBUTED_OBJECT_STORE', False )
@@ -266,6 +267,7 @@
tool_parse_help = False,
test_conf = "test.conf",
tool_data_table_config_path = tool_data_table_config_path,
+ shed_tool_data_table_config = shed_tool_data_table_config,
log_destination = "stdout",
use_heartbeat = False,
allow_user_creation = 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: dan: Provide a warning message when uploading files to a toolshed repository and a tool_dependencies.xml has been provided, but tool_dependencies metadata has not been generated.
by Bitbucket 08 Nov '12
by Bitbucket 08 Nov '12
08 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/762d4010a9a5/
changeset: 762d4010a9a5
user: dan
date: 2012-11-08 16:52:45
summary: Provide a warning message when uploading files to a toolshed repository and a tool_dependencies.xml has been provided, but tool_dependencies metadata has not been generated.
affected #: 1 file
diff -r d3054b066218eacd366e618cc97535d059d8bf6a -r 762d4010a9a534ce5237d7a0bb6d317a9d9501ac lib/galaxy/webapps/community/controllers/upload.py
--- a/lib/galaxy/webapps/community/controllers/upload.py
+++ b/lib/galaxy/webapps/community/controllers/upload.py
@@ -160,6 +160,7 @@
# Get the new repository tip.
if tip == repository.tip:
message = 'No changes to repository. '
+ status = 'warning'
else:
if ( isgzip or isbz2 ) and uncompress_file:
uncompress_str = ' uncompressed and '
@@ -182,6 +183,16 @@
message += " %d files were removed from the repository root. " % len( files_to_remove )
kwd[ 'message' ] = message
set_repository_metadata_due_to_new_tip( trans, repository, content_alert_str=content_alert_str, **kwd )
+ #provide a warning message if a tool_dependencies.xml file is provided, but tool dependencies weren't loaded due to e.g. a requirement tag mismatch
+ if get_config_from_disk( 'tool_dependencies.xml', repo_dir ):
+ if repository.metadata_revisions:
+ metadata_dict = repository.metadata_revisions[0].metadata
+ else:
+ metadata_dict = {}
+ if 'tool_dependencies' not in metadata_dict:
+ message += 'Name, version and type from a tool requirement tag does not match the information in the "tool_dependencies.xml". '
+ status = 'warning'
+ log.debug( 'Error in tool dependencies for repository %s: %s.' % ( repository.id, repository.name ) )
# Reset the tool_data_tables by loading the empty tool_data_table_conf.xml file.
reset_tool_data_tables( trans.app )
trans.response.send_redirect( web.url_for( controller='repository',
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Add the new ched_tool_data_table_config setting to the tool shed's config object.
by Bitbucket 08 Nov '12
by Bitbucket 08 Nov '12
08 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/d3054b066218/
changeset: d3054b066218
user: greg
date: 2012-11-08 16:32:30
summary: Add the new ched_tool_data_table_config setting to the tool shed's config object.
affected #: 1 file
diff -r b5ce9451c5d190f0507f3b2c484afe937f12a045 -r d3054b066218eacd366e618cc97535d059d8bf6a lib/galaxy/webapps/community/config.py
--- a/lib/galaxy/webapps/community/config.py
+++ b/lib/galaxy/webapps/community/config.py
@@ -48,6 +48,7 @@
self.tool_secret = kwargs.get( "tool_secret", "" )
self.tool_data_path = resolve_path( kwargs.get( "tool_data_path", "shed-tool-data" ), os.getcwd() )
self.tool_data_table_config_path = resolve_path( kwargs.get( 'tool_data_table_config_path', 'tool_data_table_conf.xml' ), self.root )
+ self.shed_tool_data_table_config = resolve_path( kwargs.get( 'shed_tool_data_table_config', 'shed_tool_data_table_conf.xml' ), self.root )
self.ftp_upload_dir = kwargs.get( 'ftp_upload_dir', None )
# Location for dependencies
if 'tool_dependency_dir' in kwargs:
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Attempt to make sure .sample files included in an installed tool shed repository are only copied to ~/tool-data if they are sample data index files.
by Bitbucket 08 Nov '12
by Bitbucket 08 Nov '12
08 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/b5ce9451c5d1/
changeset: b5ce9451c5d1
user: greg
date: 2012-11-08 16:01:08
summary: Attempt to make sure .sample files included in an installed tool shed repository are only copied to ~/tool-data if they are sample data index files.
affected #: 1 file
diff -r 5ff899b77dffce59580991a4b1d4dfbcdc091090 -r b5ce9451c5d190f0507f3b2c484afe937f12a045 lib/galaxy/util/shed_util.py
--- a/lib/galaxy/util/shed_util.py
+++ b/lib/galaxy/util/shed_util.py
@@ -7,6 +7,7 @@
from galaxy.web.form_builder import SelectField
from galaxy.tools import parameters
from galaxy.datatypes.checkers import *
+from galaxy.datatypes.sniff import is_column_based
from galaxy.util.json import *
from galaxy.util import inflector
from galaxy.tools.search import ToolBoxSearch
@@ -546,15 +547,20 @@
shutil.copy( full_source_path, os.path.join( dest_path, copied_file ) )
def copy_sample_files( app, sample_files, tool_path=None, sample_files_copied=None, dest_path=None ):
"""
- Copy all files to dest_path in the local Galaxy environment that have not already been copied. Those that have been copied
- are contained in sample_files_copied. The default value for dest_path is ~/tool-data.
+ Copy all appropriate files to dest_path in the local Galaxy environment that have not already been copied. Those that have been copied
+ are contained in sample_files_copied. The default value for dest_path is ~/tool-data. We need to be careful to copy only appropriate
+ files here because tool shed repositories can contain files ending in .sample that should not be copied to the ~/tool-data directory.
"""
+ filenames_not_to_copy = [ 'tool_data_table_conf.xml.sample' ]
sample_files_copied = util.listify( sample_files_copied )
for filename in sample_files:
- if filename not in sample_files_copied:
+ filename_sans_path = os.path.split( filename )[ 1 ]
+ if filename_sans_path not in filenames_not_to_copy and filename not in sample_files_copied:
if tool_path:
filename=os.path.join( tool_path, filename )
- copy_sample_file( app, filename, dest_path=dest_path )
+ # Attempt to ensure we're copying an appropriate file.
+ if is_data_index_sample_file( filename ):
+ copy_sample_file( app, filename, dest_path=dest_path )
def create_repo_info_dict( repository, owner, repository_clone_url, changeset_revision, ctx_rev, metadata ):
repo_info_dict = {}
repo_info_dict[ repository.name ] = ( repository.description,
@@ -1539,9 +1545,11 @@
if shed_tool_conf == file_name:
return index, shed_tool_conf_dict
def get_tool_index_sample_files( sample_files ):
+ """Try to return the list of all appropriate tool data sample files included in the repository."""
tool_index_sample_files = []
for s in sample_files:
- if s.endswith( '.loc.sample' ):
+ # The problem with this is that Galaxy does not follow a standard naming convention for file names.
+ if s.endswith( '.loc.sample' ) or s.endswith( '.xml.sample' ) or s.endswith( '.txt.sample' ):
tool_index_sample_files.append( s )
return tool_index_sample_files
def get_tool_dependency( trans, id ):
@@ -1846,6 +1854,29 @@
parent_id=tool_version_using_parent_id.id )
sa_session.add( tool_version_association )
sa_session.flush()
+def is_data_index_sample_file( file_path ):
+ """
+ Attempt to determine if a .sample file is appropriate for copying to ~/tool-data when a tool shed repository is being installed
+ into a Galaxy instance.
+ """
+ # Currently most data index files are tabular, so check that first. We'll assume that if the file is tabular, it's ok to copy.
+ if is_column_based( file_path ):
+ return True
+ # If the file is any of the following, don't copy it.
+ if check_html( file_path ):
+ return False
+ if check_image( file_path ):
+ return False
+ if check_binary( name=file_path ):
+ return False
+ if is_bz2( file_path ):
+ return False
+ if is_gzip( file_path ):
+ return False
+ if check_zip( file_path ):
+ return False
+ # Default to copying the file if none of the above are true.
+ return True
def is_downloadable( metadata_dict ):
return 'datatypes' in metadata_dict or 'tools' in metadata_dict or 'workflows' in metadata_dict
def load_installed_datatype_converters( app, installed_repository_dict, deactivate=False ):
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: dan: Add shed_tool_data_table_conf.xml.sample to buildbot_setup.sh.
by Bitbucket 07 Nov '12
by Bitbucket 07 Nov '12
07 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/5ff899b77dff/
changeset: 5ff899b77dff
user: dan
date: 2012-11-08 03:16:17
summary: Add shed_tool_data_table_conf.xml.sample to buildbot_setup.sh.
affected #: 1 file
diff -r 982b9522efca2abf46637870e06c7abf1204be6d -r 5ff899b77dffce59580991a4b1d4dfbcdc091090 buildbot_setup.sh
--- a/buildbot_setup.sh
+++ b/buildbot_setup.sh
@@ -68,6 +68,7 @@
datatypes_conf.xml.sample
universe_wsgi.ini.sample
tool_data_table_conf.xml.sample
+shed_tool_data_table_conf.xml.sample
migrated_tools_conf.xml.sample
tool-data/shared/ensembl/builds.txt.sample
tool-data/shared/igv/igv_build_sites.txt.sample
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/changeset/982b9522efca/
changeset: 982b9522efca
user: dan
date: 2012-11-08 03:06:54
summary: Fix for params_to_incoming.
affected #: 2 files
diff -r ec51a727a497d5912fdd4269571d7c26d7523436 -r 982b9522efca2abf46637870e06c7abf1204be6d lib/galaxy/tools/parameters/__init__.py
--- a/lib/galaxy/tools/parameters/__init__.py
+++ b/lib/galaxy/tools/parameters/__init__.py
@@ -115,5 +115,5 @@
incoming[ new_name_prefix + input.test_param.name ] = values[ input.test_param.name ]
params_to_incoming( incoming, input.cases[current].inputs, values, app, new_name_prefix )
else:
- incoming[ name_prefix + input.name ] = input.to_string( input_values.get( input.name ), app )
+ incoming[ name_prefix + input.name ] = input.to_html_value( input_values.get( input.name ), app )
diff -r ec51a727a497d5912fdd4269571d7c26d7523436 -r 982b9522efca2abf46637870e06c7abf1204be6d lib/galaxy/tools/parameters/basic.py
--- a/lib/galaxy/tools/parameters/basic.py
+++ b/lib/galaxy/tools/parameters/basic.py
@@ -106,6 +106,10 @@
"""
return value
+ def to_html_value( self, value, app ):
+ """Convert an object value to the value expected from an html post"""
+ return self.to_string( value, app )
+
def to_string( self, value, app ):
"""Convert a value to a string representation suitable for persisting"""
return str( value )
@@ -370,6 +374,11 @@
return form_builder.CheckboxField( self.name, checked, refresh_on_change = self.refresh_on_change )
def from_html( self, value, trans=None, other_values={} ):
return form_builder.CheckboxField.is_checked( value )
+ def to_html_value( self, value, app ):
+ if value:
+ return [ 'true', 'true' ]
+ else:
+ return [ 'true' ]
def to_python( self, value, app ):
return ( value == 'True' )
def get_initial_value( self, trans, context ):
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
07 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/ec51a727a497/
changeset: ec51a727a497
user: clements
date: 2012-11-02 07:25:39
summary: Modified docstrings so that Sphinx would not complain about them. However, I couldn't get Sphinx to be happy with all docstrings, so we are still getting 10 warnings (down from over 70 though).
affected #: 25 files
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/datatypes/converters/fastq_to_fqtoc.py
--- a/lib/galaxy/datatypes/converters/fastq_to_fqtoc.py
+++ b/lib/galaxy/datatypes/converters/fastq_to_fqtoc.py
@@ -6,11 +6,13 @@
def main():
"""
- The format of the file is JSON:
- { "sections" : [
- { "start" : "x", "end" : "y", "sequences" : "z" },
- ...
- ]}
+ The format of the file is JSON::
+
+ { "sections" : [
+ { "start" : "x", "end" : "y", "sequences" : "z" },
+ ...
+ ]}
+
This works only for UNCOMPRESSED fastq files. The Python GzipFile does not provide seekable
offsets via tell(), so clients just have to split the slow way
"""
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/datatypes/converters/interval_to_fli.py
--- a/lib/galaxy/datatypes/converters/interval_to_fli.py
+++ b/lib/galaxy/datatypes/converters/interval_to_fli.py
@@ -1,12 +1,16 @@
'''
Creates a feature location index (FLI) for a given BED/GFF file.
-FLI index has the form:
+FLI index has the form::
+
[line_length]
<symbol1_in_lowercase><tab><symbol1><tab><location><symbol2_in_lowercase><tab><symbol2><tab><location>
...
+
where location is formatted as:
+
contig:start-end
+
and symbols are sorted in lexigraphical order.
'''
@@ -94,4 +98,4 @@
out.close()
if __name__ == '__main__':
- main()
\ No newline at end of file
+ main()
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/datatypes/converters/pbed_ldreduced_converter.py
--- a/lib/galaxy/datatypes/converters/pbed_ldreduced_converter.py
+++ b/lib/galaxy/datatypes/converters/pbed_ldreduced_converter.py
@@ -78,10 +78,14 @@
"""
need to work with rgenetics composite datatypes
so in and out are html files with data in extrafiles path
- <command interpreter="python">
- pbed_ldreduced_converter.py '$input1.extra_files_path/$input1.metadata.base_name' '$winsize' '$winmove' '$r2thresh'
- '$output1' '$output1.files_path' 'plink'
- </command>
+
+ .. raw:: xml
+
+ <command interpreter="python">
+ pbed_ldreduced_converter.py '$input1.extra_files_path/$input1.metadata.base_name' '$winsize' '$winmove' '$r2thresh'
+ '$output1' '$output1.files_path' 'plink'
+ </command>
+
"""
nparm = 7
if len(sys.argv) < nparm:
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/datatypes/data.py
--- a/lib/galaxy/datatypes/data.py
+++ b/lib/galaxy/datatypes/data.py
@@ -800,11 +800,12 @@
def get_file_peek( file_name, is_multi_byte=False, WIDTH=256, LINE_COUNT=5, skipchars=[] ):
"""
- Returns the first LINE_COUNT lines wrapped to WIDTH::
+ Returns the first LINE_COUNT lines wrapped to WIDTH
- ## >>> fname = get_test_fname('4.bed')
- ## >>> get_file_peek(fname)
- ## 'chr22 30128507 31828507 uc003bnx.1_cds_2_0_chr22_29227_f 0 +\n'
+ ## >>> fname = get_test_fname('4.bed')
+ ## >>> get_file_peek(fname)
+ ## 'chr22 30128507 31828507 uc003bnx.1_cds_2_0_chr22_29227_f 0 +\n'
+
"""
# Set size for file.readline() to a negative number to force it to
# read until either a newline or EOF. Needed for datasets with very
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/datatypes/tabular.py
--- a/lib/galaxy/datatypes/tabular.py
+++ b/lib/galaxy/datatypes/tabular.py
@@ -46,6 +46,7 @@
process all data lines.
Items of interest:
+
1. We treat 'overwrite' as always True (we always want to set tabular metadata when called).
2. If a tabular file has no data, it will have one column of type 'str'.
3. We used to check only the first 100 lines when setting metadata and this class's
@@ -356,15 +357,18 @@
Determines whether the file is in SAM format
A file in SAM format consists of lines of tab-separated data.
- The following header line may be the first line:
- @QNAME FLAG RNAME POS MAPQ CIGAR MRNM MPOS ISIZE SEQ QUAL
- or
- @QNAME FLAG RNAME POS MAPQ CIGAR MRNM MPOS ISIZE SEQ QUAL OPT
+ The following header line may be the first line::
+
+ @QNAME FLAG RNAME POS MAPQ CIGAR MRNM MPOS ISIZE SEQ QUAL
+ or
+ @QNAME FLAG RNAME POS MAPQ CIGAR MRNM MPOS ISIZE SEQ QUAL OPT
+
Data in the OPT column is optional and can consist of tab-separated data
For complete details see http://samtools.sourceforge.net/SAM1.pdf
- Rules for sniffing as True:
+ Rules for sniffing as True::
+
There must be 11 or more columns of data on each line
Columns 2 (FLAG), 4(POS), 5 (MAPQ), 8 (MPOS), and 9 (ISIZE) must be numbers (9 can be negative)
We will only check that up to the first 5 alignments are correctly formatted.
@@ -579,10 +583,11 @@
A file in ELAND export format consists of lines of tab-separated data.
There is no header.
- Rules for sniffing as True:
- There must be 22 columns on each line
- LANE, TILEm X, Y, INDEX, READ_NO, SEQ, QUAL, POSITION, *STRAND, FILT must be correct
- We will only check that up to the first 5 alignments are correctly formatted.
+ Rules for sniffing as True::
+
+ - There must be 22 columns on each line
+ - LANE, TILEm X, Y, INDEX, READ_NO, SEQ, QUAL, POSITION, *STRAND, FILT must be correct
+ - We will only check that up to the first 5 alignments are correctly formatted.
"""
import gzip
try:
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/objectstore/__init__.py
--- a/lib/galaxy/objectstore/__init__.py
+++ b/lib/galaxy/objectstore/__init__.py
@@ -51,6 +51,7 @@
store, False otherwise.
FIELD DESCRIPTIONS (these apply to all the methods in this class):
+
:type obj: object
:param obj: A Galaxy object with an assigned database ID accessible via
the .id attribute.
@@ -118,6 +119,7 @@
"""
Deletes the object identified by `obj`.
See `exists` method for the description of other fields.
+
:type entire_dir: bool
:param entire_dir: If True, delete the entire directory pointed to by
extra_dir. For safety reasons, this option applies
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/quota/__init__.py
--- a/lib/galaxy/quota/__init__.py
+++ b/lib/galaxy/quota/__init__.py
@@ -41,6 +41,7 @@
def get_quota( self, user, nice_size=False ):
"""
Calculated like so:
+
1. Anonymous users get the default quota.
2. Logged in users start with the highest of their associated '='
quotas or the default quota, if there are no associated '='
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/security/__init__.py
--- a/lib/galaxy/security/__init__.py
+++ b/lib/galaxy/security/__init__.py
@@ -173,17 +173,21 @@
which the request is sent. We cannot use trans.user_is_admin() because the controller is
what is important since admin users do not necessarily have permission to do things
on items outside of the admin view.
+
If cntrller is from the admin side ( e.g., library_admin ):
- -if item is public, all roles, including private roles, are legitimate.
- -if item is restricted, legitimate roles are derived from the users and groups associated
- with each role that is associated with the access permission ( i.e., DATASET_MANAGE_PERMISSIONS or
- LIBRARY_MANAGE ) on item. Legitimate roles will include private roles.
+
+ - if item is public, all roles, including private roles, are legitimate.
+ - if item is restricted, legitimate roles are derived from the users and groups associated
+ with each role that is associated with the access permission ( i.e., DATASET_MANAGE_PERMISSIONS or
+ LIBRARY_MANAGE ) on item. Legitimate roles will include private roles.
+
If cntrller is not from the admin side ( e.g., root, library ):
- -if item is public, all non-private roles, except for the current user's private role,
- are legitimate.
- -if item is restricted, legitimate roles are derived from the users and groups associated
- with each role that is associated with the access permission on item. Private roles, except
- for the current user's private role, will be excluded.
+
+ - if item is public, all non-private roles, except for the current user's private role,
+ are legitimate.
+ - if item is restricted, legitimate roles are derived from the users and groups associated
+ with each role that is associated with the access permission on item. Private roles, except
+ for the current user's private role, will be excluded.
"""
admin_controller = cntrller in [ 'library_admin' ]
roles = set()
@@ -1063,9 +1067,10 @@
comma-separated string of folder ids. This method works with the show_library_item()
method below, and it returns libraries for which the received user has permission to
perform the received actions. Here is an example call to this method to return all
- libraries for which the received user has LIBRARY_ADD permission:
- libraries = trans.app.security_agent.get_permitted_libraries( trans, user,
- [ trans.app.security_agent.permitted_actions.LIBRARY_ADD ] )
+ libraries for which the received user has LIBRARY_ADD permission::
+
+ libraries = trans.app.security_agent.get_permitted_libraries( trans, user,
+ [ trans.app.security_agent.permitted_actions.LIBRARY_ADD ] )
"""
all_libraries = trans.sa_session.query( trans.app.model.Library ) \
.filter( trans.app.model.Library.table.c.deleted == False ) \
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/tool_shed/tool_dependencies/install_util.py
--- a/lib/galaxy/tool_shed/tool_dependencies/install_util.py
+++ b/lib/galaxy/tool_shed/tool_dependencies/install_util.py
@@ -250,10 +250,11 @@
def set_environment( app, elem, tool_shed_repository ):
"""
Create a ToolDependency to set an environment variable. This is different from the process used to set an environment variable that is associated
- with a package. An example entry in a tool_dependencies.xml file is:
- <set_environment version="1.0">
- <environment_variable name="R_SCRIPT_PATH" action="set_to">$REPOSITORY_INSTALL_DIR</environment_variable>
- </set_environment>
+ with a package. An example entry in a tool_dependencies.xml file is::
+
+ <set_environment version="1.0">
+ <environment_variable name="R_SCRIPT_PATH" action="set_to">$REPOSITORY_INSTALL_DIR</environment_variable>
+ </set_environment>
"""
sa_session = app.model.context.current
tool_dependency = None
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -112,16 +112,20 @@
def init_tools( self, config_filename ):
"""
Read the configuration file and load each tool. The following tags are currently supported:
- <toolbox>
- <tool file="data_source/upload.xml"/> # tools outside sections
- <label text="Basic Tools" id="basic_tools" /> # labels outside sections
- <workflow id="529fd61ab1c6cc36" /> # workflows outside sections
- <section name="Get Data" id="getext"> # sections
- <tool file="data_source/biomart.xml" /> # tools inside sections
- <label text="In Section" id="in_section" /> # labels inside sections
- <workflow id="adb5f5c93f827949" /> # workflows inside sections
- </section>
- </toolbox>
+
+ .. raw:: xml
+
+ <toolbox>
+ <tool file="data_source/upload.xml"/> # tools outside sections
+ <label text="Basic Tools" id="basic_tools" /> # labels outside sections
+ <workflow id="529fd61ab1c6cc36" /> # workflows outside sections
+ <section name="Get Data" id="getext"> # sections
+ <tool file="data_source/biomart.xml" /> # tools inside sections
+ <label text="In Section" id="in_section" /> # labels inside sections
+ <workflow id="adb5f5c93f827949" /> # workflows inside sections
+ </section>
+ </toolbox>
+
"""
if self.app.config.get_bool( 'enable_tool_tags', False ):
log.info("removing all tool tag associations (" + str( self.sa_session.query( self.app.model.ToolTagAssociation ).count() ) + ")" )
@@ -740,7 +744,8 @@
class ToolOutput( object ):
"""
Represents an output datasets produced by a tool. For backward
- compatibility this behaves as if it were the tuple:
+ compatibility this behaves as if it were the tuple::
+
(format, metadata_source, parent)
"""
@@ -1079,7 +1084,7 @@
else:
self.trackster_conf = None
def parse_inputs( self, root ):
- """
+ r"""
Parse the "<inputs>" element and create appropriate `ToolParameter`s.
This implementation supports multiple pages and grouping constructs.
"""
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/tools/data/__init__.py
--- a/lib/galaxy/tools/data/__init__.py
+++ b/lib/galaxy/tools/data/__init__.py
@@ -31,10 +31,11 @@
def load_from_config_file( self, config_filename, tool_data_path, from_shed_config=False ):
"""
This method is called under 3 conditions:
- 1) When the ToolDataTableManager is initialized (see __init__ above).
- 2) Just after the ToolDataTableManager is initialized and the additional entries defined by shed_tool_data_table_conf.xml
+
+ 1. When the ToolDataTableManager is initialized (see __init__ above).
+ 2. Just after the ToolDataTableManager is initialized and the additional entries defined by shed_tool_data_table_conf.xml
are being loaded into the ToolDataTableManager.data_tables.
- 3) When a tool shed repository that includes a tool_data_table_conf.xml.sample file is being installed into a local
+ 3. When a tool shed repository that includes a tool_data_table_conf.xml.sample file is being installed into a local
Galaxy instance. In this case, we have 2 entry types to handle, files whose root tag is <tables>, for example:
"""
tree = util.parse_xml( config_filename )
@@ -57,20 +58,24 @@
def add_new_entries_from_config_file( self, config_filename, tool_data_path, shed_tool_data_table_config, persist=False ):
"""
This method is called when a tool shed repository that includes a tool_data_table_conf.xml.sample file is being
- installed into a local galaxy instance. We have 2 cases to handle, files whose root tag is <tables>, for example:
- <tables>
+ installed into a local galaxy instance. We have 2 cases to handle, files whose root tag is <tables>, for example::
+
+ <tables>
+ <!-- Location of Tmap files -->
+ <table name="tmap_indexes" comment_char="#">
+ <columns>value, dbkey, name, path</columns>
+ <file path="tool-data/tmap_index.loc" />
+ </table>
+ </tables>
+
+ and files whose root tag is <table>, for example::
+
<!-- Location of Tmap files --><table name="tmap_indexes" comment_char="#"><columns>value, dbkey, name, path</columns><file path="tool-data/tmap_index.loc" /></table>
- </tables>
- and files whose root tag is <table>, for example:
- <!-- Location of Tmap files -->
- <table name="tmap_indexes" comment_char="#">
- <columns>value, dbkey, name, path</columns>
- <file path="tool-data/tmap_index.loc" />
- </table>
+
"""
tree = util.parse_xml( config_filename )
root = tree.getroot()
@@ -119,13 +124,14 @@
class TabularToolDataTable( ToolDataTable ):
"""
Data stored in a tabular / separated value format on disk, allows multiple
- files to be merged but all must have the same column definitions.
+ files to be merged but all must have the same column definitions::
- <table type="tabular" name="test">
- <column name='...' index = '...' />
- <file path="..." />
- <file path="..." />
- </table>
+ <table type="tabular" name="test">
+ <column name='...' index = '...' />
+ <file path="..." />
+ <file path="..." />
+ </table>
+
"""
type_key = 'tabular'
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/tools/parameters/dynamic_options.py
--- a/lib/galaxy/tools/parameters/dynamic_options.py
+++ b/lib/galaxy/tools/parameters/dynamic_options.py
@@ -64,16 +64,20 @@
Type: data_meta
- When no 'from_' source has been specified in the <options> tag, this will populate the options list with (meta_value, meta_value, False).
+ When no 'from' source has been specified in the <options> tag, this will populate the options list with (meta_value, meta_value, False).
Otherwise, options which do not match the metadata value in the column are discarded.
Required Attributes:
- ref: Name of input dataset
- key: Metadata key to use for comparison
- column: column in options to compare with (not required when not associated with input options)
+
+ - ref: Name of input dataset
+ - key: Metadata key to use for comparison
+ - column: column in options to compare with (not required when not associated with input options)
+
Optional Attributes:
- multiple: Option values are multiple, split column by separator (True)
- separator: When multiple split by this (,)
+
+ - multiple: Option values are multiple, split column by separator (True)
+ - separator: When multiple split by this (,)
+
"""
def __init__( self, d_option, elem ):
Filter.__init__( self, d_option, elem )
@@ -132,12 +136,16 @@
Type: param_value
Required Attributes:
- ref: Name of input value
- column: column in options to compare with
+
+ - ref: Name of input value
+ - column: column in options to compare with
+
Optional Attributes:
- keep: Keep columns matching value (True)
- Discard columns matching value (False)
- ref_attribute: Period (.) separated attribute chain of input (ref) to use as value for filter
+
+ - keep: Keep columns matching value (True)
+ Discard columns matching value (False)
+ - ref_attribute: Period (.) separated attribute chain of input (ref) to use as value for filter
+
"""
def __init__( self, d_option, elem ):
Filter.__init__( self, d_option, elem )
@@ -294,13 +302,15 @@
Type: remove_value
- Required Attributes:
+ Required Attributes::
+
value: value to remove from select list
or
ref: param to refer to
or
meta_ref: dataset to refer to
key: metadata key to compare to
+
"""
def __init__( self, d_option, elem ):
Filter.__init__( self, d_option, elem )
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/util/heartbeat.py
--- a/lib/galaxy/util/heartbeat.py
+++ b/lib/galaxy/util/heartbeat.py
@@ -134,7 +134,9 @@
Scans a given backtrace stack frames, returns a single
quadraple of [filename, line, function-name, text] of
the single, deepest, most interesting frame.
- Interesting being:
+
+ Interesting being::
+
inside the galaxy source code ("/lib/galaxy"),
prefreably not an egg.
"""
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/util/shed_util.py
--- a/lib/galaxy/util/shed_util.py
+++ b/lib/galaxy/util/shed_util.py
@@ -2397,11 +2397,13 @@
def update_existing_tool_dependency( app, repository, original_dependency_dict, new_dependencies_dict ):
"""
Update an exsiting tool dependency whose definition was updated in a change set pulled by a Galaxy administrator when getting updates
- to an installed tool shed repository. The original_dependency_dict is a single tool dependency definition, an example of which is:
- {"name": "bwa",
- "readme": "\\nCompiling BWA requires zlib and libpthread to be present on your system.\\n ",
- "type": "package",
- "version": "0.6.2"}
+ to an installed tool shed repository. The original_dependency_dict is a single tool dependency definition, an example of which is::
+
+ {"name": "bwa",
+ "readme": "\\nCompiling BWA requires zlib and libpthread to be present on your system.\\n ",
+ "type": "package",
+ "version": "0.6.2"}
+
The new_dependencies_dict is the dictionary generated by the generate_tool_dependency_metadata method.
"""
new_tool_dependency = None
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/util/topsort.py
--- a/lib/galaxy/util/topsort.py
+++ b/lib/galaxy/util/topsort.py
@@ -9,18 +9,24 @@
value is a list, representing a total ordering that respects all
the input constraints.
E.g.,
+
topsort( [(1,2), (3,3)] )
+
may return any of (but nothing other than)
+
[3, 1, 2]
[1, 3, 2]
[1, 2, 3]
+
because those are the permutations of the input elements that
respect the "1 precedes 2" and "3 precedes 3" input constraints.
Note that a constraint of the form (x, x) is really just a trick
to make sure x appears *somewhere* in the output list.
If there's a cycle in the constraints, say
+
topsort( [(1,2), (2,1)] )
+
then CycleError is raised, and the exception object supports
many methods to help analyze and break the cycles. This requires
a good deal more code than topsort itself!
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/visualization/data_providers/genome.py
--- a/lib/galaxy/visualization/data_providers/genome.py
+++ b/lib/galaxy/visualization/data_providers/genome.py
@@ -610,11 +610,16 @@
def process_data( self, iterator, start_val=0, max_vals=None, **kwargs ):
"""
- Returns a dict with the following attributes:
+ Returns a dict with the following attributes::
+
data - a list of variants with the format
+
+ .. raw:: text
+
[<guid>, <start>, <end>, <name>, cigar, seq]
message - error/informative message
+
"""
rval = []
message = None
@@ -893,13 +898,17 @@
def process_data( self, iterator, start_val=0, max_vals=None, **kwargs ):
"""
- Returns a dict with the following attributes:
+ Returns a dict with the following attributes::
+
data - a list of reads with the format
- [<guid>, <start>, <end>, <name>, <read_1>, <read_2>, [empty], <mapq_scores>]
+ [<guid>, <start>, <end>, <name>, <read_1>, <read_2>, [empty], <mapq_scores>]
+
where <read_1> has the format
[<start>, <end>, <cigar>, <strand>, <read_seq>]
+
and <read_2> has the format
[<start>, <end>, <cigar>, <strand>, <read_seq>]
+
Field 7 is empty so that mapq scores' location matches that in single-end reads.
For single-end reads, read has format:
[<guid>, <start>, <end>, <name>, <cigar>, <strand>, <seq>, <mapq_score>]
@@ -910,6 +919,7 @@
max_low - lowest coordinate for the returned reads
max_high - highest coordinate for the returned reads
message - error/informative message
+
"""
# No iterator indicates no reads.
if iterator is None:
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/visualization/data_providers/phyloviz/newickparser.py
--- a/lib/galaxy/visualization/data_providers/phyloviz/newickparser.py
+++ b/lib/galaxy/visualization/data_providers/phyloviz/newickparser.py
@@ -112,9 +112,12 @@
def parseNode(self, string, depth):
""" Recursive method for parsing newick string, works by stripping down the string into substring
of newick contained with brackers, which is used to call itself.
- Eg ... ( A, B, (D, E)C, F, G ) ...
+
+ Eg ... ( A, B, (D, E)C, F, G ) ...
+
We will make the preceeding nodes first A, B, then the internal node C, its children D, E,
- and finally the succeeding nodes F, G"""
+ and finally the succeeding nodes F, G
+ """
# Base case where there is only an empty string
if string == "":
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/web/form_builder.py
--- a/lib/galaxy/web/form_builder.py
+++ b/lib/galaxy/web/form_builder.py
@@ -708,9 +708,12 @@
selected_value='none', refresh_on_change=False, multiple=False, display=None, size=None ):
"""
Build a SelectField given a set of objects. The received params are:
+
- objs: the set of objects used to populate the option list
- label_attr: the attribute of each obj (e.g., name, email, etc ) whose value is used to populate each option label.
+
- If the string 'self' is passed as label_attr, each obj in objs is assumed to be a string, so the obj itself is used
+
- select_field_name: the name of the SelectField
- initial_value: the value of the first option in the SelectField - allows for an option telling the user to select something
- selected_value: the value of the currently selected option
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/web/framework/__init__.py
--- a/lib/galaxy/web/framework/__init__.py
+++ b/lib/galaxy/web/framework/__init__.py
@@ -624,6 +624,7 @@
def handle_user_login( self, user ):
"""
Login a new user (possibly newly created)
+
- create a new session
- associate new session with user
- if old session had a history and it was not associated with a user, associate it with the new session,
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/webapps/community/config.py
--- a/lib/galaxy/webapps/community/config.py
+++ b/lib/galaxy/webapps/community/config.py
@@ -140,7 +140,7 @@
def get_database_engine_options( kwargs ):
"""
Allow options for the SQLAlchemy database engine to be passed by using
- the prefix "database_engine_option_".
+ the prefix "database_engine_option".
"""
conversions = {
'convert_unicode': string_as_bool,
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/webapps/galaxy/api/genomes.py
--- a/lib/galaxy/webapps/galaxy/api/genomes.py
+++ b/lib/galaxy/webapps/galaxy/api/genomes.py
@@ -48,25 +48,25 @@
POST /api/genomes
Download and/or index a genome.
- Parameters:
+ Parameters::
- dbkey DB key of the build to download, ignored unless 'UCSC' is specified as the source
- ncbi_name NCBI's genome identifier, ignored unless NCBI is specified as the source
- ensembl_dbkey Ensembl's genome identifier, ignored unless Ensembl is specified as the source
- url_dbkey DB key to use for this build, ignored unless URL is specified as the source
- source Data source for this build. Can be: UCSC, Ensembl, NCBI, URL
- indexers POST array of indexers to run after downloading (indexers[] = first, indexers[] = second, ...)
- func Allowed values:
- 'download' Download and index
- 'index' Index only
-
- Returns:
+ dbkey DB key of the build to download, ignored unless 'UCSC' is specified as the source
+ ncbi_name NCBI's genome identifier, ignored unless NCBI is specified as the source
+ ensembl_dbkey Ensembl's genome identifier, ignored unless Ensembl is specified as the source
+ url_dbkey DB key to use for this build, ignored unless URL is specified as the source
+ source Data source for this build. Can be: UCSC, Ensembl, NCBI, URL
+ indexers POST array of indexers to run after downloading (indexers[] = first, indexers[] = second, ...)
+ func Allowed values:
+ 'download' Download and index
+ 'index' Index only
+
+ Returns::
- If no error:
- dict( status: 'ok', job: <job ID> )
+ If no error:
+ dict( status: 'ok', job: <job ID> )
- If error:
- dict( status: 'error', error: <error message> )
+ If error:
+ dict( status: 'error', error: <error message> )
"""
params = util.Params( payload )
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/webapps/galaxy/api/tools.py
--- a/lib/galaxy/webapps/galaxy/api/tools.py
+++ b/lib/galaxy/webapps/galaxy/api/tools.py
@@ -13,12 +13,15 @@
@web.expose_api
def index( self, trans, **kwds ):
"""
- GET /api/tools: returns a list of tools defined by parameters
+ GET /api/tools: returns a list of tools defined by parameters::
+
parameters:
+
in_panel - if true, tools are returned in panel structure,
including sections and labels
trackster - if true, only tools that are compatible with
Trackster are returned
+
"""
# Read params.
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/webapps/galaxy/controllers/workflow.py
--- a/lib/galaxy/webapps/galaxy/controllers/workflow.py
+++ b/lib/galaxy/webapps/galaxy/controllers/workflow.py
@@ -1980,8 +1980,8 @@
def edgelist_for_workflow_steps( steps ):
"""
- Create a list of tuples representing edges between `WorkflowSteps` based
- on associated `WorkflowStepConnection`s
+ Create a list of tuples representing edges between ``WorkflowSteps`` based
+ on associated ``WorkflowStepConnection``s
"""
edges = []
steps_to_index = dict( ( step, i ) for i, step in enumerate( steps ) )
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/galaxy/webapps/reports/config.py
--- a/lib/galaxy/webapps/reports/config.py
+++ b/lib/galaxy/webapps/reports/config.py
@@ -56,7 +56,7 @@
def get_database_engine_options( kwargs ):
"""
Allow options for the SQLAlchemy database engine to be passed by using
- the prefix "database_engine_option_".
+ the prefix "database_engine_option".
"""
conversions = {
'convert_unicode': string_as_bool,
diff -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 -r ec51a727a497d5912fdd4269571d7c26d7523436 lib/mimeparse.py
--- a/lib/mimeparse.py
+++ b/lib/mimeparse.py
@@ -39,18 +39,21 @@
return (type.strip(), subtype.strip(), params)
def parse_media_range(range):
- """Carves up a media range and returns a tuple of the
- (type, subtype, params) where 'params' is a dictionary
- of all the parameters for the media range.
- For example, the media range 'application/*;q=0.5' would
- get parsed into:
+ r"""
+ Carves up a media range and returns a tuple of the
+ (type, subtype, params) where 'params' is a dictionary
+ of all the parameters for the media range.
+ For example, the media range 'application/*;q=0.5' would
+ get parsed into:
- ('application', '*', {'q', '0.5'})
+ .. raw:: text
- In addition this function also guarantees that there
- is a value for 'q' in the params dictionary, filling it
- in with a proper default if necessary.
- """
+ ('application', '*', {'q', '0.5'})
+
+ In addition this function also guarantees that there
+ is a value for 'q' in the params dictionary, filling it
+ in with a proper default if necessary.
+ """
(type, subtype, params) = parse_mime_type(range)
if not params.has_key('q') or not params['q'] or \
not float(params['q']) or float(params['q']) > 1\
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/changeset/bc5fa254bafc/
changeset: bc5fa254bafc
user: greg
date: 2012-11-07 22:36:28
summary: Maintain entries for Galaxy's ToolDataTableManager acquired from installed tool shed repositrories that contain a valid file named tool_data_table_conf.xmnl.sample in a separate config file name shed_tool_data_table_conf.xml. This will ensure that manual edits to the original tool_data_table_conf.xml will not be munged when Galaxy's tool shed installation process automatically adds entries into the file. This enhancement alos includes a bug fix where ToolDataTableEntries that should have been persisted to the XML file were not being handled correctly.
affected #: 11 files
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 lib/galaxy/app.py
--- a/lib/galaxy/app.py
+++ b/lib/galaxy/app.py
@@ -76,8 +76,13 @@
self.genomes = Genomes( self )
# Data providers registry.
self.data_provider_registry = DataProviderRegistry()
- # Tool data tables
- self.tool_data_tables = galaxy.tools.data.ToolDataTableManager( self.config.tool_data_path, self.config.tool_data_table_config_path )
+ # Initialize tool data tables using the config defined by self.config.tool_data_table_config_path.
+ self.tool_data_tables = galaxy.tools.data.ToolDataTableManager( tool_data_path=self.config.tool_data_path,
+ config_filename=self.config.tool_data_table_config_path )
+ # Load additional entries defined by self.config.shed_tool_data_table_config into tool data tables.
+ self.tool_data_tables.load_from_config_file( config_filename=self.config.shed_tool_data_table_config,
+ tool_data_path=self.tool_data_tables.tool_data_path,
+ from_shed_config=True )
# Initialize the tools, making sure the list of tool configs includes the reserved migrated_tools_conf.xml file.
tool_configs = self.config.tool_configs
if self.config.migrated_tools_config not in tool_configs:
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 lib/galaxy/config.py
--- a/lib/galaxy/config.py
+++ b/lib/galaxy/config.py
@@ -66,6 +66,7 @@
tcf = 'tool_conf.xml'
self.tool_configs = [ resolve_path( p, self.root ) for p in listify( tcf ) ]
self.tool_data_table_config_path = resolve_path( kwargs.get( 'tool_data_table_config_path', 'tool_data_table_conf.xml' ), self.root )
+ self.shed_tool_data_table_config = resolve_path( kwargs.get( 'shed_tool_data_table_config', 'shed_tool_data_table_conf.xml' ), self.root )
self.enable_tool_shed_check = string_as_bool( kwargs.get( 'enable_tool_shed_check', False ) )
try:
self.hours_between_check = int( kwargs.get( 'hours_between_check', 12 ) )
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 lib/galaxy/tool_shed/install_manager.py
--- a/lib/galaxy/tool_shed/install_manager.py
+++ b/lib/galaxy/tool_shed/install_manager.py
@@ -184,7 +184,8 @@
relative_install_dir=relative_install_dir,
repository_files_dir=None,
resetting_all_metadata_on_repository=False,
- updating_installed_repository=False )
+ updating_installed_repository=False,
+ persist=True )
tool_shed_repository.metadata = metadata_dict
self.app.sa_session.add( tool_shed_repository )
self.app.sa_session.flush()
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 lib/galaxy/tool_shed/migrate/common.py
--- a/lib/galaxy/tool_shed/migrate/common.py
+++ b/lib/galaxy/tool_shed/migrate/common.py
@@ -41,8 +41,13 @@
self.datatypes_registry = galaxy.datatypes.registry.Registry()
# Load the data types in the Galaxy distribution, which are defined in self.config.datatypes_config.
self.datatypes_registry.load_datatypes( self.config.root, self.config.datatypes_config )
- # Tool data tables
- self.tool_data_tables = galaxy.tools.data.ToolDataTableManager( self.config.tool_data_path, self.config.tool_data_table_config_path )
+ # Initialize tool data tables using the config defined by self.config.tool_data_table_config_path.
+ self.tool_data_tables = galaxy.tools.data.ToolDataTableManager( tool_data_path=self.config.tool_data_path,
+ config_filename=self.config.tool_data_table_config_path )
+ # Load additional entries defined by self.config.shed_tool_data_table_config into tool data tables.
+ self.tool_data_tables.load_from_config_file( config_filename=self.config.shed_tool_data_table_config,
+ tool_data_path=self.tool_data_tables.tool_data_path,
+ from_shed_config=True )
# Initialize the tools, making sure the list of tool configs includes the reserved migrated_tools_conf.xml file.
tool_configs = self.config.tool_configs
if self.config.migrated_tools_config not in tool_configs:
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 lib/galaxy/tools/data/__init__.py
--- a/lib/galaxy/tools/data/__init__.py
+++ b/lib/galaxy/tools/data/__init__.py
@@ -15,17 +15,28 @@
"""Manages a collection of tool data tables"""
def __init__( self, tool_data_path, config_filename=None ):
self.tool_data_path = tool_data_path
- self.data_tables = {}
- # Store config elements for on-the-fly persistence.
- self.data_table_elems = []
+ # This stores all defined data table entries from both the tool_data_table_conf.xml file and the shed_tool_data_table_conf.xml file
+ # at server startup. If tool shed repositories are installed that contain a valid file named tool_data_table_conf.xml.sample, entries
+ # from that file are inserted into this dict at the time of installation.
+ self.data_tables = {}
+ # Store config elements for on-the-fly persistence to the defined shed_tool_data_table_config file name.
+ self.shed_data_table_elems = []
self.data_table_elem_names = []
if config_filename:
- self.load_from_config_file( config_filename, self.tool_data_path )
+ self.load_from_config_file( config_filename, self.tool_data_path, from_shed_config=False )
def __getitem__( self, key ):
return self.data_tables.__getitem__( key )
def __contains__( self, key ):
return self.data_tables.__contains__( key )
- def load_from_config_file( self, config_filename, tool_data_path ):
+ def load_from_config_file( self, config_filename, tool_data_path, from_shed_config=False ):
+ """
+ This method is called under 3 conditions:
+ 1) When the ToolDataTableManager is initialized (see __init__ above).
+ 2) Just after the ToolDataTableManager is initialized and the additional entries defined by shed_tool_data_table_conf.xml
+ are being loaded into the ToolDataTableManager.data_tables.
+ 3) When a tool shed repository that includes a tool_data_table_conf.xml.sample file is being installed into a local
+ Galaxy instance. In this case, we have 2 entry types to handle, files whose root tag is <tables>, for example:
+ """
tree = util.parse_xml( config_filename )
root = tree.getroot()
table_elems = []
@@ -36,13 +47,14 @@
table_elem_name = table_elem.get( 'name', None )
if table_elem_name and table_elem_name not in self.data_table_elem_names:
self.data_table_elem_names.append( table_elem_name )
- self.data_table_elems.append( table_elem )
+ if from_shed_config:
+ self.shed_data_table_elems.append( table_elem )
table = tool_data_table_types[ type ]( table_elem, tool_data_path )
if table.name not in self.data_tables:
self.data_tables[ table.name ] = table
log.debug( "Loaded tool data table '%s'", table.name )
return table_elems
- def add_new_entries_from_config_file( self, config_filename, tool_data_path, tool_data_table_config_path, persist=False ):
+ def add_new_entries_from_config_file( self, config_filename, tool_data_path, shed_tool_data_table_config, persist=False ):
"""
This method is called when a tool shed repository that includes a tool_data_table_conf.xml.sample file is being
installed into a local galaxy instance. We have 2 cases to handle, files whose root tag is <tables>, for example:
@@ -65,7 +77,9 @@
# Make a copy of the current list of data_table_elem_names so we can persist later if changes to the config file are necessary.
original_data_table_elem_names = [ name for name in self.data_table_elem_names ]
if root.tag == 'tables':
- table_elems = self.load_from_config_file( config_filename, tool_data_path )
+ table_elems = self.load_from_config_file( config_filename=config_filename,
+ tool_data_path=tool_data_path,
+ from_shed_config=True )
else:
table_elems = []
type = root.get( 'type', 'tabular' )
@@ -74,23 +88,22 @@
table_elem_name = root.get( 'name', None )
if table_elem_name and table_elem_name not in self.data_table_elem_names:
self.data_table_elem_names.append( table_elem_name )
- self.data_table_elems.append( root )
+ self.shed_data_table_elems.append( root )
table = tool_data_table_types[ type ]( root, tool_data_path )
if table.name not in self.data_tables:
self.data_tables[ table.name ] = table
log.debug( "Added new tool data table '%s'", table.name )
if persist and self.data_table_elem_names != original_data_table_elem_names:
# Persist Galaxy's version of the changed tool_data_table_conf.xml file.
- self.to_xml_file( tool_data_table_config_path )
+ self.to_xml_file( shed_tool_data_table_config )
return table_elems
- def to_xml_file( self, tool_data_table_config_path ):
- """Write the current in-memory version of the tool_data-table_conf.xml file to disk."""
- full_path = os.path.abspath( tool_data_table_config_path )
+ def to_xml_file( self, shed_tool_data_table_config ):
+ """Write the current in-memory version of the shed_tool_data_table_conf.xml file to disk."""
+ full_path = os.path.abspath( shed_tool_data_table_config )
fd, filename = tempfile.mkstemp()
os.write( fd, '<?xml version="1.0"?>\n' )
- os.write( fd, "<!-- Use the file tool_data_table_conf.xml.oldlocstyle if you don't want to update your loc files as changed in revision 4550:535d276c92bc-->\n" )
os.write( fd, '<tables>\n' )
- for elem in self.data_table_elems:
+ for elem in self.shed_data_table_elems:
os.write( fd, '%s' % util.xml_to_string( elem ) )
os.write( fd, '</tables>\n' )
os.close( fd )
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 lib/galaxy/util/shed_util.py
--- a/lib/galaxy/util/shed_util.py
+++ b/lib/galaxy/util/shed_util.py
@@ -753,12 +753,15 @@
tool_dependencies_dict[ 'set_environment' ] = [ requirements_dict ]
return tool_dependencies_dict
def generate_metadata_for_changeset_revision( app, repository, repository_clone_url, shed_config_dict={}, relative_install_dir=None, repository_files_dir=None,
- resetting_all_metadata_on_repository=False, updating_installed_repository=False ):
+ resetting_all_metadata_on_repository=False, updating_installed_repository=False, persist=False ):
"""
Generate metadata for a repository using it's files on disk. To generate metadata for changeset revisions older than the repository tip,
the repository will have been cloned to a temporary location and updated to a specified changeset revision to access that changeset revision's
disk files, so the value of repository_files_dir will not always be repository.repo_path (it could be an absolute path to a temporary directory
containing a clone). If it is an absolute path, the value of relative_install_dir must contain repository.repo_path.
+
+ The value of persist will be True when the installed repository contains a valid tool_data_table_conf.xml.sample file, in which case the entries
+ should ultimately be persisted to the file referred to by app.config.shed_tool_data_table_config.
"""
if updating_installed_repository:
# Keep the original tool shed repository metadata if setting metadata on a repository installed into a local Galaxy instance for which
@@ -810,9 +813,9 @@
relative_path, filename = os.path.split( sample_file )
if filename == 'tool_data_table_conf.xml.sample':
new_table_elems = app.tool_data_tables.add_new_entries_from_config_file( config_filename=sample_file,
- tool_data_path=app.config.tool_data_path,
- tool_data_table_config_path=app.config.tool_data_table_config_path,
- persist=False )
+ tool_data_path=original_tool_data_path,
+ shed_tool_data_table_config=app.config.shed_tool_data_table_config,
+ persist=persist )
for root, dirs, files in os.walk( files_dir ):
if root.find( '.hg' ) < 0 and root.find( 'hgrc' ) < 0:
if '.hg' in dirs:
@@ -1768,15 +1771,15 @@
return tool, message, sample_files
def handle_sample_tool_data_table_conf_file( app, filename, persist=False ):
"""
- Parse the incoming filename and add new entries to the in-memory app.tool_data_tables dictionary. If persist is True (should only occur)
- if call is from the Galaxy side (not the tool shed), the new entries will be appended to Galaxy's tool_data_table_conf.xml file on disk.
+ Parse the incoming filename and add new entries to the in-memory app.tool_data_tables dictionary. If persist is True (should only occur
+ if call is from the Galaxy side, not the tool shed), the new entries will be appended to Galaxy's shed_tool_data_table_conf.xml file on disk.
"""
error = False
message = ''
try:
new_table_elems = app.tool_data_tables.add_new_entries_from_config_file( config_filename=filename,
tool_data_path=app.config.tool_data_path,
- tool_data_table_config_path=app.config.tool_data_table_config_path,
+ shed_tool_data_table_config=app.config.shed_tool_data_table_config,
persist=persist )
except Exception, e:
message = str( e )
@@ -2143,7 +2146,8 @@
relative_install_dir=relative_install_dir,
repository_files_dir=None,
resetting_all_metadata_on_repository=False,
- updating_installed_repository=False )
+ updating_installed_repository=False,
+ persist=False )
repository.metadata = metadata_dict
if metadata_dict != original_metadata_dict:
update_in_shed_tool_config( trans.app, repository )
@@ -2221,7 +2225,8 @@
relative_install_dir=repo_dir,
repository_files_dir=work_dir,
resetting_all_metadata_on_repository=True,
- updating_installed_repository=False )
+ updating_installed_repository=False,
+ persist=False )
if current_metadata_dict:
if not metadata_changeset_revision and not metadata_dict:
# We're at the first change set in the change log.
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 lib/galaxy/webapps/community/controllers/common.py
--- a/lib/galaxy/webapps/community/controllers/common.py
+++ b/lib/galaxy/webapps/community/controllers/common.py
@@ -10,9 +10,8 @@
from galaxy.util.shed_util import generate_clone_url_for_repository_in_tool_shed, generate_message_for_invalid_tools, generate_metadata_for_changeset_revision
from galaxy.util.shed_util import get_changectx_for_changeset, get_config_from_disk, get_configured_ui, get_file_context_from_ctx, get_named_tmpfile_from_ctx
from galaxy.util.shed_util import get_parent_id, get_repository_in_tool_shed, get_repository_metadata_by_changeset_revision
-from galaxy.util.shed_util import handle_sample_files_and_load_tool_from_disk, handle_sample_files_and_load_tool_from_tmp_config
-from galaxy.util.shed_util import handle_sample_tool_data_table_conf_file, INITIAL_CHANGELOG_HASH, is_downloadable, load_tool_from_config, remove_dir
-from galaxy.util.shed_util import reset_tool_data_tables, reversed_upper_bounded_changelog, strip_path
+from galaxy.util.shed_util import handle_sample_files_and_load_tool_from_disk, handle_sample_files_and_load_tool_from_tmp_config, INITIAL_CHANGELOG_HASH
+from galaxy.util.shed_util import is_downloadable, load_tool_from_config, remove_dir, reset_tool_data_tables, reversed_upper_bounded_changelog, strip_path
from galaxy.web.base.controller import *
from galaxy.web.base.controllers.admin import *
from galaxy.webapps.community import model
@@ -640,7 +639,8 @@
relative_install_dir=repo_dir,
repository_files_dir=None,
resetting_all_metadata_on_repository=False,
- updating_installed_repository=False )
+ updating_installed_repository=False,
+ persist=False )
if metadata_dict:
downloadable = is_downloadable( metadata_dict )
repository_metadata = None
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
--- a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
+++ b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
@@ -447,6 +447,12 @@
@web.expose
@web.require_admin
def deactivate_or_uninstall_repository( self, trans, **kwd ):
+ """
+ Handle all changes when a tool shed repository is being deactivated or uninstalled. Notice that if the repository contents include
+ a file named tool_data_table_conf.xml.sample, it's entries are not removed from the defined config.shed_tool_data_table_config. This
+ is because it becomes a bit complex to determine if other installed repositories include tools that require the same entry. For now
+ we'll never delete entries from config.shed_tool_data_table_config, but we may choose to do so in the future if it becomes necessary.
+ """
params = util.Params( kwd )
message = util.restore_text( params.get( 'message', '' ) )
status = params.get( 'status', 'done' )
@@ -753,7 +759,8 @@
relative_install_dir=relative_install_dir,
repository_files_dir=None,
resetting_all_metadata_on_repository=False,
- updating_installed_repository=False )
+ updating_installed_repository=False,
+ persist=True )
tool_shed_repository.metadata = metadata_dict
trans.sa_session.add( tool_shed_repository )
trans.sa_session.flush()
@@ -1491,7 +1498,8 @@
relative_install_dir=relative_install_dir,
repository_files_dir=None,
resetting_all_metadata_on_repository=False,
- updating_installed_repository=False )
+ updating_installed_repository=False,
+ persist=False )
repository.metadata = metadata_dict
if metadata_dict != original_metadata_dict:
update_in_shed_tool_config( trans.app, repository )
@@ -1675,7 +1683,8 @@
relative_install_dir=relative_install_dir,
repository_files_dir=None,
resetting_all_metadata_on_repository=False,
- updating_installed_repository=True )
+ updating_installed_repository=True,
+ persist=True )
repository.metadata = metadata_dict
# Update the repository changeset_revision in the database.
repository.changeset_revision = latest_changeset_revision
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 run.sh
--- a/run.sh
+++ b/run.sh
@@ -13,6 +13,7 @@
reports_wsgi.ini.sample
shed_tool_conf.xml.sample
tool_conf.xml.sample
+ shed_tool_data_table_conf.xml.sample
tool_data_table_conf.xml.sample
tool_sheds_conf.xml.sample
openid_conf.xml.sample
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 shed_tool_data_table_conf.xml.sample
--- /dev/null
+++ b/shed_tool_data_table_conf.xml.sample
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<tables>
+</tables>
diff -r dbff28bde968a05b787dd53cfca182c53a81eeb7 -r bc5fa254bafc981c70bdffd394e9c44c8dda4ab8 universe_wsgi.ini.sample
--- a/universe_wsgi.ini.sample
+++ b/universe_wsgi.ini.sample
@@ -149,6 +149,16 @@
#enable_tool_shed_check = False
#hours_between_check = 12
+# XML config file that contains data table entries for the ToolDataTableManager. This file is manually
+# maintained by the Galaxy administrator.
+#tool_data_table_config_path = tool_data_table_conf.xml
+
+# XML config file that contains additional data table entries for the ToolDataTableManager. This file
+# is automatically generated based on the current installed tool shed repositories that contain valid
+# tool_data_table_conf.xml.sample files. At the time of installation, these entries are automatically
+# added to the following file, which is parsed and applied to the ToolDataTableManager at server start up.
+#shed_tool_data_table_config = shed_tool_data_table_conf.xml
+
# Directory where data used by tools is located, see the samples in that
# directory and the wiki for help:
# http://wiki.g2.bx.psu.edu/Admin/Data%20Integration
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: dan: Allow unhiding all datasets in the current history.
by Bitbucket 07 Nov '12
by Bitbucket 07 Nov '12
07 Nov '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/dbff28bde968/
changeset: dbff28bde968
user: dan
date: 2012-11-07 19:50:06
summary: Allow unhiding all datasets in the current history.
affected #: 3 files
diff -r 932585f1dd8d67c28d2c22003af0d9ae318ef947 -r dbff28bde968a05b787dd53cfca182c53a81eeb7 lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py
+++ b/lib/galaxy/model/__init__.py
@@ -694,6 +694,9 @@
@property
def get_disk_size_bytes( self ):
return self.get_disk_size( nice_size=False )
+ def unhide_datasets( self ):
+ for dataset in self.datasets:
+ dataset.mark_unhidden()
def get_disk_size( self, nice_size=False ):
# unique datasets only
db_session = object_session( self )
diff -r 932585f1dd8d67c28d2c22003af0d9ae318ef947 -r dbff28bde968a05b787dd53cfca182c53a81eeb7 lib/galaxy/webapps/galaxy/controllers/history.py
--- a/lib/galaxy/webapps/galaxy/controllers/history.py
+++ b/lib/galaxy/webapps/galaxy/controllers/history.py
@@ -550,6 +550,20 @@
return trans.show_ok_message( "History deleted, a new history is active", refresh_frames=['history'] )
@web.expose
+ def unhide_datasets( self, trans, current=False, ids=None ):
+ """Unhide the datasets in the active history -- this does not require a logged in user."""
+ if not ids and util.string_as_bool( current ):
+ histories = [ trans.get_history() ]
+ refresh_frames = ['history']
+ else:
+ raise NotImplementedError( "You can currently only unhide all the datasets of the current history." )
+ for history in histories:
+ history.unhide_datasets()
+ trans.sa_session.add( history )
+ trans.sa_session.flush()
+ return trans.show_ok_message( "Your datasets have been unhidden.", refresh_frames=refresh_frames )
+
+ @web.expose
@web.require_login( "rate items" )
@web.json
def rate_async( self, trans, id, rating ):
diff -r 932585f1dd8d67c28d2c22003af0d9ae318ef947 -r dbff28bde968a05b787dd53cfca182c53a81eeb7 templates/root/index.mako
--- a/templates/root/index.mako
+++ b/templates/root/index.mako
@@ -43,6 +43,11 @@
"${_("Show Hidden Datasets")}": function() {
galaxy_history.location = "${h.url_for( controller='root', action='history', show_hidden=True)}";
},
+ "${_("Unhide Hidden Datasets")}": function() {
+ if ( confirm( "Really unhide all hidden datasets?" ) ) {
+ galaxy_main.location = "${h.url_for( controller='history', action='unhide_datasets', current=True )}";
+ }
+ },
"${_("Purge Deleted Datasets")}": function() {
if ( confirm( "Really delete all deleted datasets permanently? This cannot be undone." ) ) {
galaxy_main.location = "${h.url_for( controller='history', action='purge_deleted_datasets' )}";
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