Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #252 from eucalyptus/GUI-444-patch

GUI-444: Ensure snapshots that have a 100% progress show "Completed" status
  • Loading branch information...
commit f50e4f039d2604f20f6e9972263d6cdcf04dcfe7 2 parents 0fa5b87 + bcb3111
@kamalgill kamalgill authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 koala/views/snapshots.py
View
8 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):
Please sign in to comment.
Something went wrong with that request. Please try again.