Fixing heat stack status column

Status column on stack table was using stack_status instead of status
Status is a little more vague, but keeps Horizon from having to know
about all of the various Heat statuses (it was incorrectly displaying
progress meters for several of them before this fix)

Updated topology view with the same fix.

Implements: blueprint heat-fix-status-column
Change-Id: I3ad24d837dd5e9046aa8a91cce33b954b7a8e5d9
This commit is contained in:
Jordan OMara 2014-02-13 17:15:35 -05:00
parent eabc890792
commit 97c245146d
2 changed files with 4 additions and 9 deletions

View File

@ -50,9 +50,7 @@ def d3_data(request, stack_id=''):
'image_y': -30,
'text_x': 40,
'text_y': ".35em",
'in_progress': True if (mappings.get_resource_status(
stack.stack_status) ==
'IN_PROGRESS') else False,
'in_progress': (stack.status == 'IN_PROGRESS'),
'info_box': sro.stack_info(stack, stack_image)
}
d3_data['stack'] = stack_node

View File

@ -82,11 +82,8 @@ class StacksUpdateRow(tables.Row):
class StacksTable(tables.DataTable):
STATUS_CHOICES = (
("Create Complete", True),
("Update Complete", True),
("Create Failed", False),
("Update Failed", False),
('Delete Complete', True)
("Complete", True),
("Failed", False),
)
name = tables.Column("stack_name",
verbose_name=_("Stack Name"),
@ -97,7 +94,7 @@ class StacksTable(tables.DataTable):
updated = tables.Column("updated_time",
verbose_name=_("Updated"),
filters=(filters.parse_isotime, timesince))
status = tables.Column("stack_status",
status = tables.Column("status",
filters=(title, filters.replace_underscores),
verbose_name=_("Status"),
status=True,