diff --git a/muranodashboard/environments/api.py b/muranodashboard/environments/api.py index 4151e995b..e265a3e9c 100644 --- a/muranodashboard/environments/api.py +++ b/muranodashboard/environments/api.py @@ -261,12 +261,12 @@ def services_list(request, environment_id): if service_id in reports and reports[service_id]: last_operation = strip(reports[service_id].text) - time = reports[service_id].updated.replace('T', ' ') + time = reports[service_id].updated else: last_operation = 'Component draft created' \ if environment.version == 0 else '' try: - time = service_data['updated'].replace('T', ' ')[:-7] + time = service_data['updated'][:-7] except KeyError: time = None @@ -336,11 +336,6 @@ def run_action(request, environment_id, action_id): def deployments_list(request, environment_id): LOG.debug('Deployments::List') deployments = api.muranoclient(request).deployments.list(environment_id) - for deployment in deployments: - if deployment.started: - deployment.started = deployment.started.replace('T', ' ') - if deployment.finished: - deployment.finished = deployment.finished.replace('T', ' ') LOG.debug('Environment::List {0}'.format(deployments)) return deployments diff --git a/muranodashboard/environments/tables.py b/muranodashboard/environments/tables.py index 59906cf02..35107026a 100644 --- a/muranodashboard/environments/tables.py +++ b/muranodashboard/environments/tables.py @@ -24,6 +24,7 @@ from horizon import exceptions from horizon import forms from horizon import messages from horizon import tables +from horizon.utils import filters from muranoclient.common import exceptions as exc from oslo_log import log as logging @@ -355,7 +356,8 @@ class ServicesTable(tables.DataTable): verbose_name=_('Last operation'), filters=(defaultfilters.urlize, )) operation_updated = tables.Column('operation_updated', - verbose_name=_('Time updated')) + verbose_name=_('Time updated'), + filters=(filters.parse_isotime,)) def get_object_id(self, datum): return datum['?']['id'] @@ -445,9 +447,11 @@ class ShowDeploymentDetails(tables.LinkAction): class DeploymentsTable(tables.DataTable): started = tables.Column('started', - verbose_name=_('Time Started')) + verbose_name=_('Time Started'), + filters=(filters.parse_isotime,)) finished = tables.Column('finished', - verbose_name=_('Time Finished')) + verbose_name=_('Time Finished'), + filters=(filters.parse_isotime,)) status = tables.Column( 'state',