From bfd66305ce7f8240a04eacf4f6349f2c7186ab90 Mon Sep 17 00:00:00 2001 From: Pavlo Shchelokovskyy Date: Tue, 29 Aug 2017 15:08:34 +0000 Subject: [PATCH] Properly sort Heat stacks on Created field replace the 'timesince_or_never' filter with 'timesince_sorted' one as the creation_time attribute of a Heat stack can not actually be None. Also add a 'timesince' data-type to this field. Change-Id: I9727254b4c255331562083f957133ed6e3cd7e90 Closes-Bug: #1713748 --- openstack_dashboard/dashboards/project/stacks/tables.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openstack_dashboard/dashboards/project/stacks/tables.py b/openstack_dashboard/dashboards/project/stacks/tables.py index 4de0766892..8041970723 100644 --- a/openstack_dashboard/dashboards/project/stacks/tables.py +++ b/openstack_dashboard/dashboards/project/stacks/tables.py @@ -278,7 +278,8 @@ class StacksTable(tables.DataTable): created = tables.Column("creation_time", verbose_name=_("Created"), filters=(filters.parse_isotime, - filters.timesince_or_never)) + filters.timesince_sortable), + attrs={'data-type': 'timesince'}) updated = tables.Column("updated_time", verbose_name=_("Updated"), filters=(filters.parse_isotime,