1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/cc7df5ca1d47/ changeset: cc7df5ca1d47 user: dannon date: 2012-11-14 22:18:26 summary: Introduction of the dataset "Paused" state and basic resume-all functionality for a history. This will need to be reimplemented in backbone, when that's committed and enabled. affected #: 7 files diff -r 73e05bc14cf1478b5ff9d8e8fffdf28d701dd2cb -r cc7df5ca1d47dbbd98614c21589435f84c67f9f5 lib/galaxy/model/__init__.py --- a/lib/galaxy/model/__init__.py +++ b/lib/galaxy/model/__init__.py @@ -698,6 +698,11 @@ def unhide_datasets( self ): for dataset in self.datasets: dataset.mark_unhidden() + def resume_paused_jobs( self ): + for dataset in self.datasets: + job = dataset.creating_job + if job.state == Job.states.PAUSED: + job.set_state(Job.states.QUEUED) def get_disk_size( self, nice_size=False ): # unique datasets only db_session = object_session( self ) diff -r 73e05bc14cf1478b5ff9d8e8fffdf28d701dd2cb -r cc7df5ca1d47dbbd98614c21589435f84c67f9f5 lib/galaxy/webapps/galaxy/controllers/history.py --- a/lib/galaxy/webapps/galaxy/controllers/history.py +++ b/lib/galaxy/webapps/galaxy/controllers/history.py @@ -564,6 +564,20 @@ return trans.show_ok_message( "Your datasets have been unhidden.", refresh_frames=refresh_frames ) @web.expose + def resume_paused_jobs( self, trans, current=False, ids=None ): + """Resume paused jobs 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 resume all the datasets of the current history." ) + for history in histories: + history.resume_paused_jobs() + trans.sa_session.add( history ) + trans.sa_session.flush() + return trans.show_ok_message( "Your jobs have been resumed.", refresh_frames=refresh_frames ) + + @web.expose @web.require_login( "rate items" ) @web.json def rate_async( self, trans, id, rating ): diff -r 73e05bc14cf1478b5ff9d8e8fffdf28d701dd2cb -r cc7df5ca1d47dbbd98614c21589435f84c67f9f5 static/june_2007_style/base.less --- a/static/june_2007_style/base.less +++ b/static/june_2007_style/base.less @@ -1637,6 +1637,11 @@ opacity: .60; } +div.historyItem-paused { + // border-color: @history_paused_border; + background: @history_paused_bg; +} + // Special case for showing the spinner but not changing the background div.historyItemTitleBar.spinner .state-icon { background: url(data_running.gif) 0 1px no-repeat !important; diff -r 73e05bc14cf1478b5ff9d8e8fffdf28d701dd2cb -r cc7df5ca1d47dbbd98614c21589435f84c67f9f5 static/june_2007_style/blue/base.css --- a/static/june_2007_style/blue/base.css +++ b/static/june_2007_style/blue/base.css @@ -851,6 +851,7 @@ div.historyItem-upload{background:#ccccff;}div.historyItem-upload .state-icon{background-image:url(data_upload.gif);} div.historyItem-queued{background:#eeeeee;} div.historyItem-noPermission{filter:alpha(opacity=60);-moz-opacity:.60;opacity:.60;} +div.historyItem-paused{background:#d9edf7;} div.historyItemTitleBar.spinner .state-icon{background:url(data_running.gif) 0 1px no-repeat !important;} div.historyItemButtons{float:right;} div.historyItemBody div{padding-top:2px;} diff -r 73e05bc14cf1478b5ff9d8e8fffdf28d701dd2cb -r cc7df5ca1d47dbbd98614c21589435f84c67f9f5 static/june_2007_style/blue_colors.ini --- a/static/june_2007_style/blue_colors.ini +++ b/static/june_2007_style/blue_colors.ini @@ -44,6 +44,8 @@ history_deleted_bg=#3399FF history_error_border=#AA6666 history_error_bg=#FFCCCC +history_paused_border=#6666AA +history_paused_bg=#d9edf7 history_running_border=#AAAA66 history_running_bg=#FFFFCC history_ok_border=#66AA66 diff -r 73e05bc14cf1478b5ff9d8e8fffdf28d701dd2cb -r cc7df5ca1d47dbbd98614c21589435f84c67f9f5 templates/root/history_common.mako --- a/templates/root/history_common.mako +++ b/templates/root/history_common.mako @@ -127,7 +127,12 @@ %endif %endif </div> - <span class="state-icon"></span> + ## Hack, do it in css + %if data_state == "paused": + <span class="ficon pause"></span> + %else: + <span class="state-icon"></span> + %endif <span class="historyItemTitle">${hid}: ${data.display_name()}</span></div> @@ -146,6 +151,15 @@ <a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title='${_("Run this job again")}' class="icon-button arrow-circle tooltip"></a> %endif </div> + %elif data_state == "paused": + <div> + ${_('Job is currently paused. Check your quota and parent jobs for failure, use the history menu to resume.')}</div> + <div> + <a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title='${_("View Details")}' class="icon-button information tooltip"></a> + %if for_editing: + <a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title='${_("Run this job again")}' class="icon-button arrow-circle tooltip"></a> + %endif + </div> %elif data_state == "running": <div>${_('Job is currently running')}</div><div> diff -r 73e05bc14cf1478b5ff9d8e8fffdf28d701dd2cb -r cc7df5ca1d47dbbd98614c21589435f84c67f9f5 templates/root/index.mako --- a/templates/root/index.mako +++ b/templates/root/index.mako @@ -37,6 +37,9 @@ "${_("Dataset Security")}": function() { galaxy_main.location = "${h.url_for( controller='root', action='history_set_default_permissions' )}"; }, + "${_("Resume Paused Jobs")}": function() { + galaxy_history.location = "${h.url_for( controller='history', action='resume_paused_jobs', current=True)}"; + }, "${_("Show Deleted Datasets")}": function() { galaxy_history.location = "${h.url_for( controller='root', action='history', show_deleted=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.