132 elif status.state==backup.State.ACTIVE: |
132 elif status.state==backup.State.ACTIVE: |
133 # Operation running |
133 # Operation running |
134 progress='' |
134 progress='' |
135 d=status.detail |
135 d=status.detail |
136 if 'progress_current' in d and 'progress_total' in d: |
136 if 'progress_current' in d and 'progress_total' in d: |
137 progress=' %d%%' % (d['progress_current']/d['progress_total']) |
137 percentage = 100*float(d['progress_current'])/float(d['progress_total']) |
|
138 progress=': %d%%' % int(round(percentage)) |
|
139 if 'operation_no' in d: |
|
140 progress='/#%d%s' % (d['operation_no'], progress) |
138 elif 'original_size' in d and 'deduplicated_size' in d: |
141 elif 'original_size' in d and 'deduplicated_size' in d: |
139 progress=' %s→%s' % (humanbytes(d['original_size']), |
142 progress=' %s→%s' % (humanbytes(d['original_size']), |
140 humanbytes(d['deduplicated_size'])) |
143 humanbytes(d['deduplicated_size'])) |
141 |
144 |
142 howrunning = "running %s%s" % (status.operation, progress) |
145 howrunning = "running %s%s" % (status.operation, progress) |