Fix for showing deleted datasets in a history, also yet another fix for the new users report, users are now sorted descending by last login, as the report states.

This commit is contained in:
Greg Von Kuster
2008-12-12 14:33:51 -05:00
parent 9a0953f1f1
commit 89fa876175
4 changed files with 15 additions and 9 deletions
@@ -1,6 +1,6 @@
from datetime import datetime, timedelta
from time import strftime
import calendar
import calendar, operator
from galaxy.webapps.reports.base.controller import *
import galaxy.model
from galaxy.model.orm import *
@@ -112,6 +112,7 @@ class Users( BaseController ):
else:
# The user has never logged in
users.append( ( user.email, "never logged in" ) )
users = sorted( users, key=operator.itemgetter( 1 ), reverse=True )
return trans.fill_template( 'users_last_access_date.mako',
users=users,
not_logged_in_for_days=not_logged_in_for_days,
@@ -13,7 +13,12 @@
<td>
<form method="post" controller="users" action="last_access_date">
<p>
Users that have not logged in to Galaxy for
%if users:
${len( users ) }
%else:
0
%endif
&nbsp;users have not logged in to Galaxy for
<input type="textfield" value="${not_logged_in_for_days}" size="3" name="not_logged_in_for_days"> days.
&nbsp;<button name="action" value="not_logged_in_for_days">Go</button>
</p>
+6 -6
View File
@@ -11,15 +11,15 @@
<ul>
%if user:
<li><a href="${h.url_for( action='history_rename', id=history.id )}" target="galaxy_main">Rename</a> current history (stored as "${history.name}")</li>
<li><a href="${h.url_for( action='history_available')}" target="galaxy_main">List</a> previously stored histories</li>
<li><a href="${h.url_for( controller='root', action='history_rename', id=history.id )}" target="galaxy_main">Rename</a> current history (stored as "${history.name}")</li>
<li><a href="${h.url_for( controller='root', action='history_available')}" target="galaxy_main">List</a> previously stored histories</li>
%if len( history.active_datasets ) > 0:
<li><a href="${h.url_for('/history_new')}">Create</a> a new empty history</li>
<li><a href="${h.url_for( controller='root', action='history_new' )}">Create</a> a new empty history</li>
%endif
<li><a href="${h.url_for( controller='workflow', action='build_from_current_history' )}">Construct workflow</a> from the current history</li>
<li><a href="${h.url_for( action='history_share' )}" target="galaxy_main">Share</a> current history</div>
<li><a href="${h.url_for( controller='root', action='history_share' )}" target="galaxy_main">Share</a> current history</div>
%endif
<li><a href="${h.url_for( action='history', show_deleted=True)}" target="galaxy_history">Show deleted</a> datasets in history</li>
<li><a href="${h.url_for( action='history_delete', id=history.id )}" confirm="Are you sure you want to delete the current history?">Delete</a> current history</div>
<li><a href="${h.url_for( controller='root', action='history', show_deleted=True)}" target="galaxy_history">Show deleted</a> datasets in history</li>
<li><a href="${h.url_for( controller='root', action='history_delete', id=history.id )}" confirm="Are you sure you want to delete the current history?">Delete</a> current history</div>
</ul>
+1 -1
View File
@@ -248,7 +248,7 @@ div#footer {
<%namespace file="history_common.mako" import="render_dataset" />
%if ( show_deleted and len( history.datasets ) < 1 ) or len( history.active_datasets ) < 1:
%if ( show_deleted and not history.activatable_datasets ) or ( not show_deleted and not history.active_datasets ):
<div class="infomessagesmall" id="emptyHistoryMessage">
%else:
<%