Show burn speed information during write

The speed is shown right below the Burn button.
This commit is contained in:
Juan Cruz Viotti 2016-01-01 17:29:08 -04:00
parent cf41b6279d
commit 7f724b6295
6 changed files with 27 additions and 11 deletions

View File

@ -388,7 +388,7 @@ imageWriter.service('ImageWriterService', function($q, $timeout) {
// Transform bytes to megabytes preserving only two decimal places
self.state.speed = Math.floor(state.speed / 1e+6 * 100) / 100 || 0;
console.debug('Progress: ' + self.state.progress + ' at ' + self.state.speed + ' MB/s');
console.debug('Progress: ' + self.state.progress + '% at ' + self.state.speed + ' MB/s');
});
};

View File

@ -5904,8 +5904,8 @@ body {
.space-horizontal-large {
margin: 0 30px; }
.space-bottom-large {
margin-bottom: 45px; }
.space-bottom-huge {
margin-bottom: 55px; }
.space-right-tiny {
margin-right: 5px; }
@ -5987,3 +5987,9 @@ body {
.step-border-right {
right: -120px; }
.step-footer {
margin-top: 10px;
margin-bottom: -40px;
color: #85898c;
font-size: 12px; }

View File

@ -80,7 +80,7 @@ imageWriter.service('ImageWriterService', function($q, $timeout) {
// Transform bytes to megabytes preserving only two decimal places
self.state.speed = Math.floor(state.speed / 1e+6 * 100) / 100 || 0;
console.debug('Progress: ' + self.state.progress + ' at ' + self.state.speed + ' MB/s');
console.debug('Progress: ' + self.state.progress + '% at ' + self.state.speed + ' MB/s');
});
};

View File

@ -19,7 +19,7 @@
<div class="content row middle-xs space-horizontal-large">
<div class="col-xs">
<div class="row around-xs space-bottom-large" ng-hide="app.writer.state.progress == 100 && !app.writer.isBurning()">
<div class="row around-xs space-bottom-huge" ng-hide="app.writer.state.progress == 100 && !app.writer.isBurning()">
<div class="col-xs">
<div class="box text-center">
<hero-icon path="images/image.svg" label="SELECT IMAGE"></hero-icon>
@ -81,16 +81,18 @@
ng-disabled="!app.selection.hasImage() || !app.selection.hasDrive()">
<span ng-show="app.writer.state.progress == 100 && app.writer.isBurning()">Finishing...</span>
<span ng-show="app.writer.state.progress == 0 && !app.writer.isBurning()">Burn!</span>
<span ng-show="app.writer.state.progress == 0 && app.writer.isBurning()">Starting...</span>
<span ng-show="app.writer.state.progress != 0 && app.writer.state.progress != 100"
<span ng-show="app.writer.state.progress == 0 && app.writer.isBurning() && !app.writer.state.speed">Starting...</span>
<span ng-show="app.writer.state.speed && app.writer.state.progress != 100"
ng-bind="app.writer.state.progress + '% '"></span>
</hero-progress-button>
<p class="step-footer" ng-bind="app.writer.state.speed.toFixed(2) + ' MB/s'" ng-show="app.writer.state.speed && app.writer.state.progress != 100"></p>
</div>
</div>
</div>
</div>
<div class="row around-xs space-bottom-large" ng-show="app.writer.state.progress == 100 && !app.writer.isBurning()">
<div class="row around-xs space-bottom-huge" ng-show="app.writer.state.progress == 100 && !app.writer.isBurning()">
<div class="col-xs">
<div class="box text-center">
<h3><hero-tick type="success" class="space-right-tiny"></hero-tick> Burn Complete!</h3>

View File

@ -144,3 +144,10 @@ body {
@extend .step-border;
right: -120px;
}
.step-footer {
margin-top: 10px;
margin-bottom: -40px;
color: lighten($color-disabled, 5%);
font-size: 12px;
}

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
$spacing-huge: 55px;
$spacing-large: 30px;
$spacing-medium: 15px;
$spacing-tiny: 5px;
@ -30,8 +31,8 @@ $spacing-tiny: 5px;
margin: 0 $spacing-large;
}
.space-bottom-large {
margin-bottom: $spacing-large * 1.5;
.space-bottom-huge {
margin-bottom: $spacing-huge;
}
.space-right-tiny {