Skip to content

Commit

Permalink
Fix instance row updates polling and actions name
Browse files Browse the repository at this point in the history
 * fix bug 962034, add suspended/paused as True column status
 * fix bug 955697, forgot to reset the current_present_action

Change-Id: I16cabd94d176f648bdc695922cd168531a8c4a2a
  • Loading branch information
andycjw committed Mar 22, 2012
1 parent 479ebdc commit 700fa88
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -91,6 +91,8 @@ def allowed(self, request, instance=None):
self.paused = instance.status == "PAUSED"
if self.paused:
self.current_present_action = UNPAUSE
else:
self.current_present_action = PAUSE
return instance.status in ACTIVE_STATES or self.paused

def action(self, request, obj_id):
Expand All @@ -117,6 +119,8 @@ def allowed(self, request, instance=None):
self.suspended = instance.status == "SUSPENDED"
if self.suspended:
self.current_present_action = RESUME
else:
self.current_present_action = SUSPEND
return instance.status in ACTIVE_STATES or self.suspended

def action(self, request, obj_id):
Expand Down Expand Up @@ -211,6 +215,8 @@ class InstancesTable(tables.DataTable):
)
STATUS_CHOICES = (
("active", True),
("suspended", True),
("paused", True),
("error", False),
)
name = tables.Column("name", link="horizon:nova:instances_and_volumes:" \
Expand Down

0 comments on commit 700fa88

Please sign in to comment.