Fixes Deployment History tab incorrectly formatting status.

Currently, the Deployment History tab in the environment details
page always adds a red underline underneath every status table
cell, even for those in a non-error/non-warning status.
The red underline should only appear for error/warning status.

This patch ensures that only error/warning status has the
red underline.

Change-Id: I641cb7fbeb4bf2987c0a582a8da138e676aea7eb
Closes-Bug: #1654896
This commit is contained in:
Felipe Monteiro 2017-01-08 22:32:25 +00:00
parent c0623b6974
commit 8a10c6a62f
2 changed files with 12 additions and 1 deletions

View File

@ -63,7 +63,17 @@ STATUS_CHOICES = (
(STATUS_ID_DELETING, None),
(STATUS_ID_NEW, True),
(STATUS_ID_DELETE_FAILURE, False),
(STATUS_ID_DEPLOY_FAILURE, False)
(STATUS_ID_DEPLOY_FAILURE, False),
)
DEPLOYMENT_STATUS_CHOICES = (
(None, True),
(DEP_STATUS_ID_RUNNING, True),
(DEP_STATUS_ID_SUCCESS, True),
(DEP_STATUS_ID_RUNNING_W_ERRORS, False),
(DEP_STATUS_ID_RUNNING_W_WARNINGS, False),
(DEP_STATUS_ID_COMPLETED_W_WARNINGS, False),
(DEP_STATUS_ID_COMPLETED_W_ERRORS, False),
)
STATUS_DISPLAY_CHOICES = (

View File

@ -671,6 +671,7 @@ class DeploymentsTable(tables.DataTable):
'state',
verbose_name=_('Status'),
status=True,
status_choices=consts.DEPLOYMENT_STATUS_CHOICES,
display_choices=consts.DEPLOYMENT_STATUS_DISPLAY_CHOICES)
class Meta(object):