1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/df67fd5a8cfc/
Changeset: df67fd5a8cfc
User: dan
Date: 2014-01-21 18:06:15
Summary: Add a space between keywords.
Affected #: 1 file
diff -r f81f3667dfd843da3dcbe20f0e25188721e14168 -r df67fd5a8cfc10d269da1ef4b28a184be914badd lib/galaxy/web/framework/__init__.py
--- a/lib/galaxy/web/framework/__init__.py
+++ b/lib/galaxy/web/framework/__init__.py
@@ -812,7 +812,7 @@
host = None
if host in UCSC_SERVERS:
return
- external_display_path = url_for( controller='',action='display_application' )
+ external_display_path = url_for( controller='', action='display_application' )
if self.request.path.startswith( external_display_path ):
request_path_split = self.request.path.split( '/' )
try:
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.
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/329f9ac7c327/
Changeset: 329f9ac7c327
Branch: admin_toolshed_static
User: BjoernGruening
Date: 2014-01-21 15:42:35
Summary: In case of proxy-prefix configuration the $PATH_TO_IMAGES is not correctly converted. Removing the beginning Slash solves it for proxy-prefix configurations and other are not affected.
Affected #: 1 file
diff -r f04a1c3c060ed6bd4febfdd9e86ed3cc74cb810e -r 329f9ac7c327341ed6552d981a686499349e5067 lib/tool_shed/util/shed_util_common.py
--- a/lib/tool_shed/util/shed_util_common.py
+++ b/lib/tool_shed/util/shed_util_common.py
@@ -1712,7 +1712,7 @@
"""
if text:
if app.name == 'galaxy':
- route_to_images = '/admin_toolshed/static/images/%s' % encoded_repository_id
+ route_to_images = 'admin_toolshed/static/images/%s' % encoded_repository_id
else:
# We're in the tool shed.
route_to_images = '/repository/static/images/%s' % encoded_repository_id
https://bitbucket.org/galaxy/galaxy-central/commits/3133b1ad1afc/
Changeset: 3133b1ad1afc
User: greg
Date: 2014-01-21 15:59:14
Summary: Merged in BjoernGruening/galaxy-central-bgruening/admin_toolshed_static (pull request #302)
In case of proxy-prefix configuration the $PATH_TO_IMAGES is not correctly converted. Removing the beginning Slash solves it for proxy-prefix configurations and other are not affected.
Affected #: 1 file
diff -r f04a1c3c060ed6bd4febfdd9e86ed3cc74cb810e -r 3133b1ad1afc97875f0764f87a60552a2ac6df72 lib/tool_shed/util/shed_util_common.py
--- a/lib/tool_shed/util/shed_util_common.py
+++ b/lib/tool_shed/util/shed_util_common.py
@@ -1712,7 +1712,7 @@
"""
if text:
if app.name == 'galaxy':
- route_to_images = '/admin_toolshed/static/images/%s' % encoded_repository_id
+ route_to_images = 'admin_toolshed/static/images/%s' % encoded_repository_id
else:
# We're in the tool shed.
route_to_images = '/repository/static/images/%s' % encoded_repository_id
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 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/f04a1c3c060e/
Changeset: f04a1c3c060e
User: guerler
Date: 2014-01-21 04:02:56
Summary: Upload: Make sure that history is available
Affected #: 2 files
diff -r e88d6af9389682335e8d51e105e5b4a79eccb1f9 -r f04a1c3c060ed6bd4febfdd9e86ed3cc74cb810e static/scripts/mvc/upload/upload-view.js
--- a/static/scripts/mvc/upload/upload-view.js
+++ b/static/scripts/mvc/upload/upload-view.js
@@ -152,7 +152,7 @@
var self = this;
// wait for galaxy history panel (workaround due to the use of iframes)
- if (!Galaxy.currHistoryPanel)
+ if (!Galaxy.currHistoryPanel || !Galaxy.currHistoryPanel.model)
{
window.setTimeout(function() { self.initialize() }, 500)
return;
diff -r e88d6af9389682335e8d51e105e5b4a79eccb1f9 -r f04a1c3c060ed6bd4febfdd9e86ed3cc74cb810e static/scripts/packed/mvc/upload/upload-view.js
--- a/static/scripts/packed/mvc/upload/upload-view.js
+++ b/static/scripts/packed/mvc/upload/upload-view.js
@@ -1,1 +1,1 @@
-define(["galaxy.modal","utils/utils","mvc/upload/upload-model","mvc/upload/upload-row","mvc/ui","utils/uploadbox"],function(c,f,e,d){var b=Backbone.Model.extend({defaults:{percentage:0,icon:"fa-circle",label:"",status:""}});var a=Backbone.View.extend({model:null,initialize:function(h){var g=this;this.model=h;this.options=this.model.attributes;this.setElement(this._template(this.options));$(this.el).on("click",this.options.onclick);if(this.options.tooltip){$(this.el).tooltip({title:this.options.tooltip,placement:"bottom"})}this.model.on("change:percentage",function(){g._percentage(g.model.get("percentage"))});this.model.on("change:status",function(){g._status(g.model.get("status"))});var g=this;$(window).on("beforeunload",function(){var i="";if(g.options.onunload){i=g.options.onunload()}if(i!=""){return i}})},_status:function(h){var g=this.$el.find(".progress-bar");g.removeClass();g.addClass("progress-bar");g.addClass("progress-bar-notransition");if(h!=""){g.addClass("progress-bar-"+h)}},_percentage:function(h){var g=this.$el.find(".progress-bar");g.css({width:h+"%"})},_template:function(g){return'<div class="progress-button"><div class="progress"><div class="progress-bar"></div></div><div id="label" class="label" style="position: absolute; top: 0px; width: inherit; text-align: center;"><div class="fa '+g.icon+'"></div> '+g.label+"</div></div>"}});return Backbone.View.extend({modal:null,button_show:null,uploadbox:null,current_history:null,upload_size:0,select_extension:[["Auto-detect","auto"]],select_genome:[["Unspecified (?)","?"]],collection:new e.Collection(),counter:{announce:0,success:0,error:0,running:0,reset:function(){this.announce=this.success=this.error=this.running=0}},options:{nginx_upload_path:""},initialize:function(h){var g=this;if(!Galaxy.currHistoryPanel){window.setTimeout(function(){g.initialize()},500);return}if(!Galaxy.currUser.get("id")){return}this.button_show=new b({icon:"fa-upload",tooltip:"Download from URL or upload files from disk",label:"Load Data",onclick:function(i){if(i){g._eventShow(i)}},onunload:function(){if(g.counter.running>0){return"Several uploads are still processing."}}});$("#left .unified-panel-header-inner").append((new a(this.button_show)).$el);var g=this;f.jsonFromUrl(galaxy_config.root+"api/datatypes",function(i){for(key in i){g.select_extension.push([i[key],i[key]])}});f.jsonFromUrl(galaxy_config.root+"api/genomes",function(i){var j=g.select_genome[0];g.select_genome=[];for(key in i){if(i[key].length>1){if(i[key][1]!==j[1]){g.select_genome.push(i[key])}}}g.select_genome.sort(function(l,k){return l[0]>k[0]?1:l[0]<k[0]?-1:0});g.select_genome.unshift(j)});if(h){this.options=_.defaults(h,this.options)}this.collection.on("remove",function(i){g._eventRemove(i)});this.collection.on("change:genome",function(j){var i=j.get("genome");g.collection.each(function(k){if(k.get("status")=="init"&&k.get("genome")=="?"){k.set("genome",i)}})})},_eventShow:function(h){h.preventDefault();h.stopPropagation();if(!this.modal){var g=this;this.modal=new c.GalaxyModal({title:"Download data directly from web or upload files from your disk",body:this._template("upload-box","upload-info"),buttons:{"Choose files":function(){g.uploadbox.select()},"Create file":function(){g._eventCreate()},Start:function(){g._eventStart()},Pause:function(){g._eventStop()},Reset:function(){g._eventReset()},Close:function(){g.modal.hide()},},height:"400",width:"900",bindClosingEvents:true,bindEscKey:false});this.setElement("#upload-box");var g=this;this.uploadbox=this.$el.uploadbox({announce:function(i,j,k){g._eventAnnounce(i,j,k)},initialize:function(i,j,k){return g._eventInitialize(i,j,k)},progress:function(i,j,k){g._eventProgress(i,j,k)},success:function(i,j,k){g._eventSuccess(i,j,k)},error:function(i,j,k){g._eventError(i,j,k)},complete:function(){g._eventComplete()}});this._updateScreen()}this.modal.show()},_eventRemove:function(h){var g=h.get("status");if(g=="success"){this.counter.success--}else{if(g=="error"){this.counter.error--}else{this.counter.announce--}}this._updateScreen();this.uploadbox.remove(h.id)},_eventAnnounce:function(g,h,j){this.counter.announce++;this._updateScreen();var i=new d(this,{id:g,file_name:h.name,file_size:h.size});this.collection.add(i.model);$(this.el).find("tbody:last").append(i.$el);i.render()},_eventInitialize:function(k,g,o){var i=this.collection.get(k);i.set("status","running");var h=i.get("extension");var l=i.get("file_name");var n=i.get("genome");var m=i.get("url_paste");var j=i.get("space_to_tabs");if(!m&&!(g.size>0)){return null}this.uploadbox.configure({url:this.options.nginx_upload_path,paramname:"files_0|file_data"});tool_input={};tool_input.dbkey=n;tool_input.file_type=h;tool_input["files_0|NAME"]=l;tool_input["files_0|type"]="upload_dataset";tool_input["files_0|url_paste"]=m;tool_input.space_to_tabs=j;data={};data.history_id=this.current_history;data.tool_id="upload1";data.inputs=JSON.stringify(tool_input);return data},_eventProgress:function(h,i,g){var j=this.collection.get(h);j.set("percentage",g);this.button_show.set("percentage",this._upload_percentage(g,i.size))},_eventSuccess:function(h,i,k){var j=this.collection.get(h);j.set("status","success");var g=j.get("file_size");this.button_show.set("percentage",this._upload_percentage(100,g));this.upload_completed+=g*100;this.counter.announce--;this.counter.success++;this._updateScreen();Galaxy.currHistoryPanel.refreshHdas()},_eventError:function(g,h,j){var i=this.collection.get(g);i.set("status","error");i.set("info",j);this.button_show.set("percentage",this._upload_percentage(100,h.size));this.button_show.set("status","danger");this.upload_completed+=h.size*100;this.counter.announce--;this.counter.error++;this._updateScreen()},_eventComplete:function(){this.collection.each(function(g){if(g.get("status")=="queued"){g.set("status","init")}});this.counter.running=0;this._updateScreen()},_eventCreate:function(){this.uploadbox.add([{name:"New File",size:-1}])},_eventStart:function(){if(this.counter.announce==0||this.counter.running>0){return}var g=this;this.upload_size=0;this.upload_completed=0;this.collection.each(function(h){if(h.get("status")=="init"){h.set("status","queued");g.upload_size+=h.get("file_size")}});this.button_show.set("percentage",0);this.button_show.set("status","success");this.current_history=Galaxy.currHistoryPanel.model.get("id");this.counter.running=this.counter.announce;this._updateScreen();this.uploadbox.start()},_eventStop:function(){if(this.counter.running==0){return}this.button_show.set("status","info");this.uploadbox.stop();$("#upload-info").html("Queue will pause after completing the current file...")},_eventReset:function(){if(this.counter.running==0){this.collection.reset();this.counter.reset();this._updateScreen();this.uploadbox.reset();this.button_show.set("percentage",0)}},_updateScreen:function(){if(this.counter.announce==0){if(this.uploadbox.compatible()){message="You can Drag & Drop files into this box."}else{message="Unfortunately, your browser does not support multiple file uploads or drag&drop.<br>Some supported browsers are: Firefox 4+, Chrome 7+, IE 10+, Opera 12+ or Safari 6+."}}else{if(this.counter.running==0){message="You added "+this.counter.announce+" file(s) to the queue. Add more files or click 'Start' to proceed."}else{message="Please wait..."+this.counter.announce+" out of "+this.counter.running+" remaining."}}$("#upload-info").html(message);if(this.counter.running==0&&this.counter.announce+this.counter.success+this.counter.error>0){this.modal.enableButton("Reset")}else{this.modal.disableButton("Reset")}if(this.counter.running==0&&this.counter.announce>0){this.modal.enableButton("Start")}else{this.modal.disableButton("Start")}if(this.counter.running>0){this.modal.enableButton("Pause")}else{this.modal.disableButton("Pause")}if(this.counter.running==0){this.modal.enableButton("Choose files");this.modal.enableButton("Create file")}else{this.modal.disableButton("Choose files");this.modal.disableButton("Create file")}if(this.counter.announce+this.counter.success+this.counter.error>0){$(this.el).find("table").show()}else{$(this.el).find("table").hide()}},_upload_percentage:function(g,h){return(this.upload_completed+(g*h))/this.upload_size},_template:function(h,g){return'<div id="'+h+'" class="upload-box"><table class="table table-striped" style="display: none;"><thead><tr><th>Name</th><th>Size</th><th>Type</th><th>Genome</th><th>Space→Tab</th><th>Status</th><th></th></tr></thead><tbody></tbody></table></div><h6 id="'+g+'" class="upload-info"></h6>'}})});
\ No newline at end of file
+define(["galaxy.modal","utils/utils","mvc/upload/upload-model","mvc/upload/upload-row","mvc/ui","utils/uploadbox"],function(c,f,e,d){var b=Backbone.Model.extend({defaults:{percentage:0,icon:"fa-circle",label:"",status:""}});var a=Backbone.View.extend({model:null,initialize:function(h){var g=this;this.model=h;this.options=this.model.attributes;this.setElement(this._template(this.options));$(this.el).on("click",this.options.onclick);if(this.options.tooltip){$(this.el).tooltip({title:this.options.tooltip,placement:"bottom"})}this.model.on("change:percentage",function(){g._percentage(g.model.get("percentage"))});this.model.on("change:status",function(){g._status(g.model.get("status"))});var g=this;$(window).on("beforeunload",function(){var i="";if(g.options.onunload){i=g.options.onunload()}if(i!=""){return i}})},_status:function(h){var g=this.$el.find(".progress-bar");g.removeClass();g.addClass("progress-bar");g.addClass("progress-bar-notransition");if(h!=""){g.addClass("progress-bar-"+h)}},_percentage:function(h){var g=this.$el.find(".progress-bar");g.css({width:h+"%"})},_template:function(g){return'<div class="progress-button"><div class="progress"><div class="progress-bar"></div></div><div id="label" class="label" style="position: absolute; top: 0px; width: inherit; text-align: center;"><div class="fa '+g.icon+'"></div> '+g.label+"</div></div>"}});return Backbone.View.extend({modal:null,button_show:null,uploadbox:null,current_history:null,upload_size:0,select_extension:[["Auto-detect","auto"]],select_genome:[["Unspecified (?)","?"]],collection:new e.Collection(),counter:{announce:0,success:0,error:0,running:0,reset:function(){this.announce=this.success=this.error=this.running=0}},options:{nginx_upload_path:""},initialize:function(h){var g=this;if(!Galaxy.currHistoryPanel||!Galaxy.currHistoryPanel.model){window.setTimeout(function(){g.initialize()},500);return}if(!Galaxy.currUser.get("id")){return}this.button_show=new b({icon:"fa-upload",tooltip:"Download from URL or upload files from disk",label:"Load Data",onclick:function(i){if(i){g._eventShow(i)}},onunload:function(){if(g.counter.running>0){return"Several uploads are still processing."}}});$("#left .unified-panel-header-inner").append((new a(this.button_show)).$el);var g=this;f.jsonFromUrl(galaxy_config.root+"api/datatypes",function(i){for(key in i){g.select_extension.push([i[key],i[key]])}});f.jsonFromUrl(galaxy_config.root+"api/genomes",function(i){var j=g.select_genome[0];g.select_genome=[];for(key in i){if(i[key].length>1){if(i[key][1]!==j[1]){g.select_genome.push(i[key])}}}g.select_genome.sort(function(l,k){return l[0]>k[0]?1:l[0]<k[0]?-1:0});g.select_genome.unshift(j)});if(h){this.options=_.defaults(h,this.options)}this.collection.on("remove",function(i){g._eventRemove(i)});this.collection.on("change:genome",function(j){var i=j.get("genome");g.collection.each(function(k){if(k.get("status")=="init"&&k.get("genome")=="?"){k.set("genome",i)}})})},_eventShow:function(h){h.preventDefault();h.stopPropagation();if(!this.modal){var g=this;this.modal=new c.GalaxyModal({title:"Download data directly from web or upload files from your disk",body:this._template("upload-box","upload-info"),buttons:{"Choose files":function(){g.uploadbox.select()},"Create file":function(){g._eventCreate()},Start:function(){g._eventStart()},Pause:function(){g._eventStop()},Reset:function(){g._eventReset()},Close:function(){g.modal.hide()},},height:"400",width:"900",bindClosingEvents:true,bindEscKey:false});this.setElement("#upload-box");var g=this;this.uploadbox=this.$el.uploadbox({announce:function(i,j,k){g._eventAnnounce(i,j,k)},initialize:function(i,j,k){return g._eventInitialize(i,j,k)},progress:function(i,j,k){g._eventProgress(i,j,k)},success:function(i,j,k){g._eventSuccess(i,j,k)},error:function(i,j,k){g._eventError(i,j,k)},complete:function(){g._eventComplete()}});this._updateScreen()}this.modal.show()},_eventRemove:function(h){var g=h.get("status");if(g=="success"){this.counter.success--}else{if(g=="error"){this.counter.error--}else{this.counter.announce--}}this._updateScreen();this.uploadbox.remove(h.id)},_eventAnnounce:function(g,h,j){this.counter.announce++;this._updateScreen();var i=new d(this,{id:g,file_name:h.name,file_size:h.size});this.collection.add(i.model);$(this.el).find("tbody:last").append(i.$el);i.render()},_eventInitialize:function(k,g,o){var i=this.collection.get(k);i.set("status","running");var h=i.get("extension");var l=i.get("file_name");var n=i.get("genome");var m=i.get("url_paste");var j=i.get("space_to_tabs");if(!m&&!(g.size>0)){return null}this.uploadbox.configure({url:this.options.nginx_upload_path,paramname:"files_0|file_data"});tool_input={};tool_input.dbkey=n;tool_input.file_type=h;tool_input["files_0|NAME"]=l;tool_input["files_0|type"]="upload_dataset";tool_input["files_0|url_paste"]=m;tool_input.space_to_tabs=j;data={};data.history_id=this.current_history;data.tool_id="upload1";data.inputs=JSON.stringify(tool_input);return data},_eventProgress:function(h,i,g){var j=this.collection.get(h);j.set("percentage",g);this.button_show.set("percentage",this._upload_percentage(g,i.size))},_eventSuccess:function(h,i,k){var j=this.collection.get(h);j.set("status","success");var g=j.get("file_size");this.button_show.set("percentage",this._upload_percentage(100,g));this.upload_completed+=g*100;this.counter.announce--;this.counter.success++;this._updateScreen();Galaxy.currHistoryPanel.refreshHdas()},_eventError:function(g,h,j){var i=this.collection.get(g);i.set("status","error");i.set("info",j);this.button_show.set("percentage",this._upload_percentage(100,h.size));this.button_show.set("status","danger");this.upload_completed+=h.size*100;this.counter.announce--;this.counter.error++;this._updateScreen()},_eventComplete:function(){this.collection.each(function(g){if(g.get("status")=="queued"){g.set("status","init")}});this.counter.running=0;this._updateScreen()},_eventCreate:function(){this.uploadbox.add([{name:"New File",size:-1}])},_eventStart:function(){if(this.counter.announce==0||this.counter.running>0){return}var g=this;this.upload_size=0;this.upload_completed=0;this.collection.each(function(h){if(h.get("status")=="init"){h.set("status","queued");g.upload_size+=h.get("file_size")}});this.button_show.set("percentage",0);this.button_show.set("status","success");this.current_history=Galaxy.currHistoryPanel.model.get("id");this.counter.running=this.counter.announce;this._updateScreen();this.uploadbox.start()},_eventStop:function(){if(this.counter.running==0){return}this.button_show.set("status","info");this.uploadbox.stop();$("#upload-info").html("Queue will pause after completing the current file...")},_eventReset:function(){if(this.counter.running==0){this.collection.reset();this.counter.reset();this._updateScreen();this.uploadbox.reset();this.button_show.set("percentage",0)}},_updateScreen:function(){if(this.counter.announce==0){if(this.uploadbox.compatible()){message="You can Drag & Drop files into this box."}else{message="Unfortunately, your browser does not support multiple file uploads or drag&drop.<br>Some supported browsers are: Firefox 4+, Chrome 7+, IE 10+, Opera 12+ or Safari 6+."}}else{if(this.counter.running==0){message="You added "+this.counter.announce+" file(s) to the queue. Add more files or click 'Start' to proceed."}else{message="Please wait..."+this.counter.announce+" out of "+this.counter.running+" remaining."}}$("#upload-info").html(message);if(this.counter.running==0&&this.counter.announce+this.counter.success+this.counter.error>0){this.modal.enableButton("Reset")}else{this.modal.disableButton("Reset")}if(this.counter.running==0&&this.counter.announce>0){this.modal.enableButton("Start")}else{this.modal.disableButton("Start")}if(this.counter.running>0){this.modal.enableButton("Pause")}else{this.modal.disableButton("Pause")}if(this.counter.running==0){this.modal.enableButton("Choose files");this.modal.enableButton("Create file")}else{this.modal.disableButton("Choose files");this.modal.disableButton("Create file")}if(this.counter.announce+this.counter.success+this.counter.error>0){$(this.el).find("table").show()}else{$(this.el).find("table").hide()}},_upload_percentage:function(g,h){return(this.upload_completed+(g*h))/this.upload_size},_template:function(h,g){return'<div id="'+h+'" class="upload-box"><table class="table table-striped" style="display: none;"><thead><tr><th>Name</th><th>Size</th><th>Type</th><th>Genome</th><th>Space→Tab</th><th>Status</th><th></th></tr></thead><tbody></tbody></table></div><h6 id="'+g+'" class="upload-info"></h6>'}})});
\ 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 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/ecdf7d468014/
Changeset: ecdf7d468014
User: greg
Date: 2014-01-20 22:07:08
Summary: Eliminate the recently introduced restriction on uninstalling repositories that are dependencies of other installed items, but keep the beneficial feature that displays dependent items that will be affected if a repository is uninstalled.
Affected #: 4 files
diff -r cef51275f59d72529d17769cfac6af572aeea679 -r ecdf7d468014e38739a054ef4d01b194a6ea681e lib/galaxy/model/tool_shed_install/__init__.py
--- a/lib/galaxy/model/tool_shed_install/__init__.py
+++ b/lib/galaxy/model/tool_shed_install/__init__.py
@@ -61,53 +61,9 @@
def can_reset_metadata( self ):
return self.status == self.installation_status.INSTALLED
- def can_uninstall( self, app ):
- # An installed repository cannot be uninstalled if other installed repositories or installed repository
- # contents (i.e., tool dependencies) require it.
- if self.status == self.installation_status.UNINSTALLED:
- return False
- this_repository_tup = ( str( self.tool_shed ),
- str( self.name ),
- str( self.owner ),
- str( self.installed_changeset_revision ) )
- irm = app.installed_repository_manager
- # See if this repository's current dependencies are restricted to a single circular relationship. This
- # means that this repository has a single repository dependency which itself depends upon this repository.
- # The repository dependency may have other repository dependencies, but that is not relevant here.
- single_repository_dependency_tup = None
- installed_repository_dependency_tups = \
- irm.installed_repository_dependencies_of_installed_repositories.get( this_repository_tup, [] )
- # If this repository defines a circular relationship to another repository, then the list of tuples
- # defining installed repository dependencies will include itself.
- if len( installed_repository_dependency_tups ) == 2:
- if this_repository_tup in installed_repository_dependency_tups:
- # We have a single circular dependency definition, so get the other repository.
- for installed_repository_dependency_tup in installed_repository_dependency_tups:
- if installed_repository_dependency_tup != this_repository_tup:
- single_repository_dependency_tup = installed_repository_dependency_tup
- break
- if single_repository_dependency_tup is not None:
- installed_repository_dependency_tups = \
- irm.installed_repository_dependencies_of_installed_repositories.get( this_repository_tup, [] )
- if this_repository_tup in installed_repository_dependency_tups:
- # This repository is a dependency of the single repository upon which it depends, so we have
- # a single circular relationship and this repository can be uninstalled.
- return True
- # Find other installed repositories that require this repository.
- installed_dependent_repositories = \
- irm.installed_dependent_repositories_of_installed_repositories.get( this_repository_tup, [] )
- if installed_dependent_repositories:
- # This repository cannot be uninstalled because other installed repositories require it.
- return False
- # Find installed tool dependencies that require this repository's installed tool dependencies.
- installed_tool_dependencies = irm.installed_tool_dependencies_of_installed_repositories.get( this_repository_tup, [] )
- for td_tup in installed_tool_dependencies:
- installed_dependent_td_tups = irm.installed_runtime_dependent_tool_dependencies_of_installed_tool_dependencies.get( td_tup, [] )
- if installed_dependent_td_tups:
- # This repository cannot be uninstalled because it contains installed tool dependencies that
- # are required at run time by other installed tool dependencies.
- return False
- return True
+ @property
+ def can_uninstall( self ):
+ return self.status != self.installation_status.UNINSTALLED
@property
def can_deactivate( self ):
@@ -564,9 +520,7 @@
@property
def can_uninstall( self ):
- # A tool dependency can be uninstalled only if it is currently in an error state. Only the containing
- # repository can be uninstalled if a tool dependency is properly installed.
- return self.status in [ self.installation_status.ERROR ]
+ return self.status in [ self.installation_status.ERROR, self.installation_status.INSTALLED ]
@property
def can_update( self ):
diff -r cef51275f59d72529d17769cfac6af572aeea679 -r ecdf7d468014e38739a054ef4d01b194a6ea681e lib/tool_shed/galaxy_install/grids/admin_toolshed_grids.py
--- a/lib/tool_shed/galaxy_install/grids/admin_toolshed_grids.py
+++ b/lib/tool_shed/galaxy_install/grids/admin_toolshed_grids.py
@@ -31,13 +31,6 @@
latest_revision_tip_str = ''
return '<img src="%s/june_2007_style/blue/ok_small.png" %s/>' % ( url_for( '/static' ), latest_revision_tip_str )
-def generate_repository_can_be_uninstalled_img_str( include_mouse_over=False ):
- if include_mouse_over:
- can_be_uninstalled_tip_str = 'class="icon-button" title="This repository can be uninstalled"'
- else:
- can_be_uninstalled_tip_str = ''
- return '<img src="%s/images/fugue/toggle-bw.png" %s/>' % ( url_for( '/static' ), can_be_uninstalled_tip_str )
-
def generate_revision_updates_img_str( include_mouse_over=False ):
if include_mouse_over:
revision_updates_tip_str = 'class="icon-button" title="Updates are available in the Tool Shed for this revision"'
@@ -80,8 +73,6 @@
tool_shed_status_str += generate_includes_workflows_img_str( include_mouse_over=True )
else:
tool_shed_status_str = generate_unknown_img_str( include_mouse_over=True )
- if tool_shed_repository.can_uninstall( trans.app ):
- tool_shed_status_str += generate_repository_can_be_uninstalled_img_str( include_mouse_over=True )
return tool_shed_status_str
@@ -245,7 +236,6 @@
legend_str += '%s This repository is deprecated in the Tool Shed<br/>' % generate_deprecated_repository_img_str()
legend_str += '%s This repository contains exported workflows<br/>' % generate_includes_workflows_img_str()
legend_str += '%s Unable to get information from the Tool Shed<br/>' % generate_unknown_img_str()
- legend_str += '%s This repository can be uninstalled<br/>' % generate_repository_can_be_uninstalled_img_str()
return legend_str
diff -r cef51275f59d72529d17769cfac6af572aeea679 -r ecdf7d468014e38739a054ef4d01b194a6ea681e templates/admin/tool_shed_repository/deactivate_or_uninstall_repository.mako
--- a/templates/admin/tool_shed_repository/deactivate_or_uninstall_repository.mako
+++ b/templates/admin/tool_shed_repository/deactivate_or_uninstall_repository.mako
@@ -38,21 +38,76 @@
<div class="form-row"><%
can_deactivate_repository = repository.can_deactivate
- can_uninstall_repository = repository.can_uninstall( trans.app )
+ can_uninstall_repository = repository.can_uninstall
%>
- %if can_deactivate_repository and can_uninstall_repository:
- <% deactivate_uninstall_button_text = "Deactivate or Uninstall" %>
- ${remove_from_disk_check_box.get_html()}
- <label for="repository" style="display: inline;font-weight:normal;">Check to uninstall or leave blank to deactivate</label>
- <br/><br/>
- %elif can_deactivate_repository:
- <% deactivate_uninstall_button_text = "Deactivate" %>
- %else:
- <% deactivate_uninstall_button_text = "Uninstall" %>
- ##hack to mimic check box
- <input type="hidden" name="remove_from_disk" value="true"/><input type="hidden" name="remove_from_disk" value="true"/>
+ %if can_deactivate_repository:
+ <table width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td bgcolor="#D8D8D8">
+ <label>Deactivating this repository will result in the following:</label>
+ </td>
+ </tr>
+ </table>
+ <div class="toolParamHelp" style="clear: both;">
+ * The repository and all of it's contents will remain on disk and can still be used by dependent items.
+ </div>
+ %if repository.includes_tools_for_display_in_tool_panel:
+ <div class="toolParamHelp" style="clear: both;">
+ * The repository's tools will not be loaded into the tool panel.
+ </div>
+ %endif
+ %if repository.includes_tool_dependencies:
+ <div class="toolParamHelp" style="clear: both;">
+ * The repository's installed tool dependencies will remain on disk.
+ </div>
+ %endif
+ %if repository.includes_datatypes:
+ <div class="toolParamHelp" style="clear: both;">
+ * The repository's datatypes, datatype converters and display applications will be eliminated from the datatypes registry.
+ </div>
+ %endif
+ <div class="toolParamHelp" style="clear: both;">
+ * The repository record's deleted column in the tool_shed_repository database table will be set to True.
+ </div>
+ <br/>
%endif
- %if not can_uninstall_repository:
+ %if can_uninstall_repository:
+ <table width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td bgcolor="#D8D8D8">
+ <label>Uninstalling this repository will result in the following:</label>
+ </td>
+ </tr>
+ </table>
+ <div class="toolParamHelp" style="clear: both;">
+ * The repository and all of it's contents will be removed from disk and can no longer be used by dependent items.
+ </div>
+ %if repository.includes_tools_for_display_in_tool_panel:
+ <div class="toolParamHelp" style="clear: both;">
+ * The repository's tool tag sets will be removed from the tool config file in which they are defined.
+ </div>
+ %endif
+ %if repository.includes_tool_dependencies:
+ <div class="toolParamHelp" style="clear: both;">
+ * The repository's installed tool dependencies will be removed from disk and can no longer be used by dependent items.
+ </div>
+ <div class="toolParamHelp" style="clear: both;">
+ * Each associated tool dependency record's status column in the tool_dependency database table will be set to 'Uninstalled'.
+ </div>
+ %endif
+ %if repository.includes_datatypes:
+ <div class="toolParamHelp" style="clear: both;">
+ * The repository's datatypes, datatype converters and display applications will be eliminated from the datatypes registry.
+ </div>
+ %endif
+ <div class="toolParamHelp" style="clear: both;">
+ * The repository record's deleted column in the tool_shed_repository database table will be set to True.
+ </div>
+ <div class="toolParamHelp" style="clear: both;">
+ * The repository record's uninstalled column in the tool_shed_repository database table will be set to True.
+ </div>
+ <div style="clear: both"></div>
+ <br/><%
from tool_shed.util.repository_dependency_util import get_repository_tuple_for_installed_repository_manager
from tool_shed.util.tool_dependency_util import get_tool_dependency_tuple_for_installed_repository_manager
@@ -80,7 +135,7 @@
<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td bgcolor="#D8D8D8">
- <label>This repository cannot be uninstalled because it is required by the following installed items:</label>
+ <label>Uninstalling this repository will affect the following dependent items:</label></td></tr></table>
@@ -116,77 +171,24 @@
<br/>
%endif
%endif
- %if can_deactivate_repository:
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td bgcolor="#D8D8D8">
- <label>Deactivating this repository will result in the following:</label>
- </td>
- </tr>
- </table>
- <div class="toolParamHelp" style="clear: both;">
- * The repository and all of it's contents will remain on disk.
- </div>
- %if repository.includes_tools_for_display_in_tool_panel:
- <div class="toolParamHelp" style="clear: both;">
- * The repository's tools will not be loaded into the tool panel.
- </div>
- %endif
- %if repository.includes_tool_dependencies:
- <div class="toolParamHelp" style="clear: both;">
- * The repository's installed tool dependencies will remain on disk.
- </div>
- %endif
- %if repository.includes_datatypes:
- <div class="toolParamHelp" style="clear: both;">
- * The repository's datatypes, datatype converters and display applications will be eliminated from the datatypes registry.
- </div>
- %endif
- <div class="toolParamHelp" style="clear: both;">
- * The repository record's deleted column in the tool_shed_repository database table will be set to True.
- </div>
- <br/>
- %endif
- %if can_uninstall_repository:
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td bgcolor="#D8D8D8">
- <label>Uninstalling this repository will result in the following:</label>
- </td>
- </tr>
- </table>
- <div class="toolParamHelp" style="clear: both;">
- * The repository and all of it's contents will be removed from disk.
- </div>
- %if repository.includes_tools_for_display_in_tool_panel:
- <div class="toolParamHelp" style="clear: both;">
- * The repository's tool tag sets will be removed from the tool config file in which they are defined.
- </div>
- %endif
- %if repository.includes_tool_dependencies:
- <div class="toolParamHelp" style="clear: both;">
- * The repository's installed tool dependencies will be removed from disk.
- </div>
- <div class="toolParamHelp" style="clear: both;">
- * Each associated tool dependency record's status column in the tool_dependency database table will be set to 'Uninstalled'.
- </div>
- %endif
- %if repository.includes_datatypes:
- <div class="toolParamHelp" style="clear: both;">
- * The repository's datatypes, datatype converters and display applications will be eliminated from the datatypes registry.
- </div>
- %endif
- <div class="toolParamHelp" style="clear: both;">
- * The repository record's deleted column in the tool_shed_repository database table will be set to True.
- </div>
- <div class="toolParamHelp" style="clear: both;">
- * The repository record's uninstalled column in the tool_shed_repository database table will be set to True.
- </div>
- <div style="clear: both"></div>
- <br/>
- %endif
</div><div class="form-row">
+ <%
+ can_deactivate_repository = repository.can_deactivate
+ can_uninstall_repository = repository.can_uninstall
+ %>
+ %if can_deactivate_repository and can_uninstall_repository:
+ <% deactivate_uninstall_button_text = "Deactivate or Uninstall" %>
+ ${remove_from_disk_check_box.get_html()}
+ <label for="repository" style="display: inline;font-weight:normal;">Check to uninstall or leave blank to deactivate</label>
+ <br/><br/>
+ %elif can_deactivate_repository:
+ <% deactivate_uninstall_button_text = "Deactivate" %>
+ %else:
+ <% deactivate_uninstall_button_text = "Uninstall" %>
+ ##hack to mimic check box
+ <input type="hidden" name="remove_from_disk" value="true"/><input type="hidden" name="remove_from_disk" value="true"/>
+ %endif
<input type="submit" name="deactivate_or_uninstall_repository_button" value="${deactivate_uninstall_button_text}"/></div></form>
diff -r cef51275f59d72529d17769cfac6af572aeea679 -r ecdf7d468014e38739a054ef4d01b194a6ea681e test/tool_shed/functional/test_1430_repair_installed_repository.py
--- a/test/tool_shed/functional/test_1430_repair_installed_repository.py
+++ b/test/tool_shed/functional/test_1430_repair_installed_repository.py
@@ -144,11 +144,11 @@
This is step 2 - Uninstall the filter_1430 repository.
'''
installed_repository = self.test_db_util.get_installed_repository_by_name_owner( 'filter_1430', common.test_user_1_name )
- strings_displayed = [ 'This repository cannot be uninstalled' ]
- strings_not_displayed = [ 'Check to uninstall' ]
- self.deactivate_repository( installed_repository,
- strings_displayed=strings_displayed,
- strings_not_displayed=strings_not_displayed )
+ strings_displayed = [ 'Uninstalling this repository will affect the following dependent items' ]
+ strings_not_displayed = []
+ self.uninstall_repository( installed_repository,
+ strings_displayed=strings_displayed,
+ strings_not_displayed=strings_not_displayed )
strings_not_displayed = [ 'filter_1430',
"Galaxy's filter tool for test 1430",
installed_repository.installed_changeset_revision ]
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 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/99f5d55b02a2/
Changeset: 99f5d55b02a2
User: jmchilton
Date: 2014-01-20 19:39:50
Summary: Small refactor to ToolDataParameter.
Break out logic for computing and asserting existence of history - simplifies get_html_field, get_initial_value_from_history_prevent_repeat, reduces code duplication, and eases some downstream merges changes I making.
Affected #: 1 file
diff -r b3171af94dccffaa6e8a5b9b8bda1fd39479643c -r 99f5d55b02a26e2e3af2936888820fcd91f7c945 lib/galaxy/tools/parameters/basic.py
--- a/lib/galaxy/tools/parameters/basic.py
+++ b/lib/galaxy/tools/parameters/basic.py
@@ -1611,9 +1611,7 @@
filter_value = self.options.get_options( trans, other_values )[0][0]
except IndexError:
pass # no valid options
- assert trans is not None, "DataToolParameter requires a trans"
- history = trans.get_history()
- assert history is not None, "DataToolParameter requires a history"
+ history = self._get_history( trans )
if value is not None:
if type( value ) != list:
value = [ value ]
@@ -1683,10 +1681,7 @@
# Can't look at history in workflow mode. Tool shed has no histories.
if trans is None or trans.workflow_building_mode or trans.webapp.name == 'tool_shed':
return DummyDataset()
- assert trans is not None, "DataToolParameter requires a trans"
- if history is None:
- history = trans.get_history()
- assert history is not None, "DataToolParameter requires a history"
+ history = self._get_history( trans, history )
if self.optional:
return None
most_recent_dataset = []
@@ -1860,6 +1855,14 @@
ref = ref()
return ref
+ def _get_history( self, trans, history=None ):
+ class_name = self.__class__.__name__
+ assert trans is not None, "%s requires a trans" % class_name
+ if history is None:
+ history = trans.get_history()
+ assert history is not None, "%s requires a history" % class_name
+ return history
+
class HiddenDataToolParameter( HiddenToolParameter, DataToolParameter ):
"""
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.