Permalink
Browse files

GUI-444: Ensure snapshots that have a 100% progress show a "Completed…

…" status rather than displaying the progress bar
  • Loading branch information...
1 parent 0fa5b87 commit bcb3111bad9124202b46b0be3deb0adad4b9b913 @kamalgill kamalgill committed Mar 1, 2014
Showing with 5 additions and 3 deletions.
  1. +5 −3 koala/views/snapshots.py
@@ -146,7 +146,7 @@ def snapshots_json(self):
description=snapshot.description,
name=snapshot.tags.get('Name', snapshot.id),
progress=snapshot.progress,
- transitional=self.is_transitional(snapshot.progress),
+ transitional=self.is_transitional(snapshot),
start_time=snapshot.start_time,
status=snapshot.status,
tags=TaggedItemView.get_tags_display(snapshot.tags, wrap_width=36),
@@ -169,8 +169,10 @@ def get_volume(self, volume_id):
return None
@staticmethod
- def is_transitional(progress):
- return int(progress.replace('%', '')) < 100
+ def is_transitional(snapshot):
+ if snapshot.status.lower() == 'completed':
+ return False
+ return int(snapshot.progress.replace('%', '')) < 100
class SnapshotView(TaggedItemView):

0 comments on commit bcb3111

Please sign in to comment.