diff --git a/app/admin/routes.py b/app/admin/routes.py index c62465f..4c4117d 100644 --- a/app/admin/routes.py +++ b/app/admin/routes.py @@ -56,14 +56,14 @@ def list_domains(): alldomains = Domain.query.filter_by(cancelled=False).order_by(Domain.daysleft.asc()).all() return render_template('admin/list_domains.html', domains=alldomains) -@admin.route("/listcancelled", methods=['GET']) +@admin.route("/listrecyclebin", methods=['GET']) @login_required @admin_required -def list_cancelled(): - expdeployments = Deployment.query.filter_by(cancelled=True).all() - expservices = Service.query.filter_by(cancelled=True).all() - expdomains = Domain.query.filter_by(cancelled=True).all() - return render_template('admin/list_cancelled.html', deployments=expdeployments, services=expservices, domains=expdomains) +def list_recyclebin(): + deployments = Deployment.query.filter_by(protected=False).order_by(Deployment.daysleft.asc()).all() + services = Service.query.filter_by(cancelled=True).all() + domains = Domain.query.filter_by(cancelled=True).all() + return render_template('admin/list_recyclebin.html', deployments=deployments, services=services, domains=domains) @admin.route("/listaddresses", methods=['GET']) @login_required diff --git a/app/templates/admin/admin_tasks.html b/app/templates/admin/admin_tasks.html index 871ff59..3d5c9a0 100644 --- a/app/templates/admin/admin_tasks.html +++ b/app/templates/admin/admin_tasks.html @@ -6,7 +6,7 @@ - + diff --git a/app/templates/admin/list_cancelled.html b/app/templates/admin/list_recyclebin.html similarity index 83% rename from app/templates/admin/list_cancelled.html rename to app/templates/admin/list_recyclebin.html index df12531..44c39ba 100644 --- a/app/templates/admin/list_cancelled.html +++ b/app/templates/admin/list_recyclebin.html @@ -74,14 +74,18 @@ addEventListener("DOMContentLoaded", function() {
{% for deploy in deployments %} - {% if deploy.enabled == False %} + {% if deploy.cancelled == True %} +