Skip to content

Commit

Permalink
Merge "Fix instance row updates polling and actions name"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Mar 23, 2012
2 parents 2adab84 + 700fa88 commit 14e2dfc
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
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 14e2dfc

Please sign in to comment.