mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-08 11:56:34 +00:00
Merge pull request #2228 from resin-io/change-succeeded-successful
refactor: use word successful instead of succeeded
This commit is contained in:
commit
3c20a056e6
@ -30,7 +30,7 @@ const utils = require('../../../shared/utils')
|
|||||||
* const status = progressStatus.fromFlashState({
|
* const status = progressStatus.fromFlashState({
|
||||||
* flashing: 1,
|
* flashing: 1,
|
||||||
* verifying: 0,
|
* verifying: 0,
|
||||||
* succeeded: 0,
|
* successful: 0,
|
||||||
* failed: 0,
|
* failed: 0,
|
||||||
* percentage: 55,
|
* percentage: 55,
|
||||||
* speed: 2049
|
* speed: 2049
|
||||||
|
@ -40,7 +40,7 @@ const INITIAL_TITLE = document.title
|
|||||||
* const title = getWindowTitle({
|
* const title = getWindowTitle({
|
||||||
* flashing: 1,
|
* flashing: 1,
|
||||||
* validating: 0,
|
* validating: 0,
|
||||||
* succeeded: 0,
|
* successful: 0,
|
||||||
* failed: 0,
|
* failed: 0,
|
||||||
* percentage: 55,
|
* percentage: 55,
|
||||||
* speed: 2049
|
* speed: 2049
|
||||||
@ -83,7 +83,7 @@ exports.currentWindow = electron.remote.getCurrentWindow()
|
|||||||
* windowProgress.set({
|
* windowProgress.set({
|
||||||
* flashing: 1,
|
* flashing: 1,
|
||||||
* validating: 0,
|
* validating: 0,
|
||||||
* succeeded: 0,
|
* successful: 0,
|
||||||
* failed: 0,
|
* failed: 0,
|
||||||
* percentage: 55,
|
* percentage: 55,
|
||||||
* speed: 2049
|
* speed: 2049
|
||||||
|
@ -141,7 +141,7 @@ svg-icon > img[disabled] {
|
|||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.target-status-succeeded > .target-status-dot {
|
&.target-status-successful > .target-status-dot {
|
||||||
background-color: $palette-theme-success-background;
|
background-color: $palette-theme-success-background;
|
||||||
}
|
}
|
||||||
&.target-status-failed > .target-status-dot {
|
&.target-status-failed > .target-status-dot {
|
||||||
|
@ -6603,7 +6603,7 @@ svg-icon > img[disabled] {
|
|||||||
height: 8px;
|
height: 8px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
margin-right: 6px; }
|
margin-right: 6px; }
|
||||||
.target-status-line.target-status-succeeded > .target-status-dot {
|
.target-status-line.target-status-successful > .target-status-dot {
|
||||||
background-color: #5fb835; }
|
background-color: #5fb835; }
|
||||||
.target-status-line.target-status-failed > .target-status-dot {
|
.target-status-line.target-status-failed > .target-status-dot {
|
||||||
background-color: #d9534f; }
|
background-color: #d9534f; }
|
||||||
|
@ -399,13 +399,13 @@ class ImageWriter extends EventEmitter {
|
|||||||
state.flashing = 0
|
state.flashing = 0
|
||||||
state.verifying = 0
|
state.verifying = 0
|
||||||
state.failed = 0
|
state.failed = 0
|
||||||
state.succeeded = 0
|
state.successful = 0
|
||||||
|
|
||||||
this.destinations.forEach((dest) => {
|
this.destinations.forEach((dest) => {
|
||||||
state.flashing += !dest.error && !dest.finished ? 1 : 0
|
state.flashing += !dest.error && !dest.finished ? 1 : 0
|
||||||
state.verifying += !dest.error && dest.finished && !dest.verified ? 1 : 0
|
state.verifying += !dest.error && dest.finished && !dest.verified ? 1 : 0
|
||||||
state.failed += dest.error ? 1 : 0
|
state.failed += dest.error ? 1 : 0
|
||||||
state.succeeded += !dest.error && dest.finished && (dest.verified || !this.verifyChecksums) ? 1 : 0
|
state.successful += !dest.error && dest.finished && (dest.verified || !this.verifyChecksums) ? 1 : 0
|
||||||
if (!(dest.finished && dest.verified) && !dest.error) {
|
if (!(dest.finished && dest.verified) && !dest.error) {
|
||||||
state.totalSpeed += state.type === 'write'
|
state.totalSpeed += state.type === 'write'
|
||||||
? (dest.stream.speed || 0)
|
? (dest.stream.speed || 0)
|
||||||
@ -634,13 +634,13 @@ class ImageWriter extends EventEmitter {
|
|||||||
_finish () {
|
_finish () {
|
||||||
this._cleanup(() => {
|
this._cleanup(() => {
|
||||||
const failures = []
|
const failures = []
|
||||||
let succeeded = 0
|
let successful = 0
|
||||||
let failed = 0
|
let failed = 0
|
||||||
|
|
||||||
this.finished = true
|
this.finished = true
|
||||||
|
|
||||||
this.destinations.forEach((dest) => {
|
this.destinations.forEach((dest) => {
|
||||||
succeeded += dest.finished && dest.verified && !dest.error ? 1 : 0
|
successful += dest.finished && dest.verified && !dest.error ? 1 : 0
|
||||||
failed += dest.error ? 1 : 0
|
failed += dest.error ? 1 : 0
|
||||||
if (dest.error) {
|
if (dest.error) {
|
||||||
dest.error.device = dest.device.device
|
dest.error.device = dest.device.device
|
||||||
@ -649,7 +649,7 @@ class ImageWriter extends EventEmitter {
|
|||||||
})
|
})
|
||||||
|
|
||||||
this.emit('finish', {
|
this.emit('finish', {
|
||||||
devices: { succeeded, failed },
|
devices: { successful, failed },
|
||||||
bytesRead: this.bytesRead,
|
bytesRead: this.bytesRead,
|
||||||
bytesWritten: this.bytesWritten,
|
bytesWritten: this.bytesWritten,
|
||||||
checksum: this.checksum,
|
checksum: this.checksum,
|
||||||
|
@ -32,10 +32,10 @@ module.exports = {
|
|||||||
*/
|
*/
|
||||||
progress: {
|
progress: {
|
||||||
|
|
||||||
succeeded: (quantity) => {
|
successful: (quantity) => {
|
||||||
// eslint-disable-next-line no-magic-numbers
|
// eslint-disable-next-line no-magic-numbers
|
||||||
const plural = quantity === 1 ? '' : 's'
|
const plural = quantity === 1 ? '' : 's'
|
||||||
return `Succeeded device${plural}`
|
return `Successful device${plural}`
|
||||||
},
|
},
|
||||||
|
|
||||||
failed: (quantity) => {
|
failed: (quantity) => {
|
||||||
|
@ -90,7 +90,7 @@ const DEFAULT_STATE = Immutable.fromJS({
|
|||||||
flashState: {
|
flashState: {
|
||||||
flashing: 0,
|
flashing: 0,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
percentage: 0,
|
percentage: 0,
|
||||||
speed: 0,
|
speed: 0,
|
||||||
@ -249,7 +249,7 @@ const storeReducer = (state = DEFAULT_STATE, action) => {
|
|||||||
if (!_.every(_.pick(action.data, [
|
if (!_.every(_.pick(action.data, [
|
||||||
'flashing',
|
'flashing',
|
||||||
'verifying',
|
'verifying',
|
||||||
'succeeded',
|
'successful',
|
||||||
'failed'
|
'failed'
|
||||||
]), _.isFinite)) {
|
]), _.isFinite)) {
|
||||||
throw errors.createError({
|
throw errors.createError({
|
||||||
|
@ -31,7 +31,7 @@ describe('Model: flashState', function () {
|
|||||||
flashState.setProgressState({
|
flashState.setProgressState({
|
||||||
flashing: 2,
|
flashing: 2,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
type: 'write',
|
type: 'write',
|
||||||
percentage: 50,
|
percentage: 50,
|
||||||
@ -45,7 +45,7 @@ describe('Model: flashState', function () {
|
|||||||
m.chai.expect(flashState.getFlashState()).to.deep.equal({
|
m.chai.expect(flashState.getFlashState()).to.deep.equal({
|
||||||
flashing: 0,
|
flashing: 0,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
percentage: 0,
|
percentage: 0,
|
||||||
speed: 0,
|
speed: 0,
|
||||||
@ -98,7 +98,7 @@ describe('Model: flashState', function () {
|
|||||||
flashState.setProgressState({
|
flashState.setProgressState({
|
||||||
flashing: 2,
|
flashing: 2,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
type: 'write',
|
type: 'write',
|
||||||
percentage: 50,
|
percentage: 50,
|
||||||
@ -115,7 +115,7 @@ describe('Model: flashState', function () {
|
|||||||
flashState.setProgressState({
|
flashState.setProgressState({
|
||||||
flashing: 2,
|
flashing: 2,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
type: 'write',
|
type: 'write',
|
||||||
percentage: 0,
|
percentage: 0,
|
||||||
@ -132,7 +132,7 @@ describe('Model: flashState', function () {
|
|||||||
flashState.setProgressState({
|
flashState.setProgressState({
|
||||||
flashing: 2,
|
flashing: 2,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
type: 'write',
|
type: 'write',
|
||||||
eta: 15,
|
eta: 15,
|
||||||
@ -148,7 +148,7 @@ describe('Model: flashState', function () {
|
|||||||
flashState.setProgressState({
|
flashState.setProgressState({
|
||||||
flashing: 2,
|
flashing: 2,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
type: 'write',
|
type: 'write',
|
||||||
percentage: '50',
|
percentage: '50',
|
||||||
@ -165,7 +165,7 @@ describe('Model: flashState', function () {
|
|||||||
flashState.setProgressState({
|
flashState.setProgressState({
|
||||||
flashing: 2,
|
flashing: 2,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
type: 'write',
|
type: 'write',
|
||||||
percentage: 101,
|
percentage: 101,
|
||||||
@ -182,7 +182,7 @@ describe('Model: flashState', function () {
|
|||||||
flashState.setProgressState({
|
flashState.setProgressState({
|
||||||
flashing: 2,
|
flashing: 2,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
type: 'write',
|
type: 'write',
|
||||||
percentage: -1,
|
percentage: -1,
|
||||||
@ -199,7 +199,7 @@ describe('Model: flashState', function () {
|
|||||||
flashState.setProgressState({
|
flashState.setProgressState({
|
||||||
flashing: 2,
|
flashing: 2,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
type: 'write',
|
type: 'write',
|
||||||
percentage: 50,
|
percentage: 50,
|
||||||
@ -215,7 +215,7 @@ describe('Model: flashState', function () {
|
|||||||
flashState.setProgressState({
|
flashState.setProgressState({
|
||||||
flashing: 2,
|
flashing: 2,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
type: 'write',
|
type: 'write',
|
||||||
percentage: 50,
|
percentage: 50,
|
||||||
@ -232,7 +232,7 @@ describe('Model: flashState', function () {
|
|||||||
flashState.setProgressState({
|
flashState.setProgressState({
|
||||||
flashing: 2,
|
flashing: 2,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
type: 'write',
|
type: 'write',
|
||||||
percentage: 50,
|
percentage: 50,
|
||||||
@ -249,7 +249,7 @@ describe('Model: flashState', function () {
|
|||||||
flashState.setProgressState({
|
flashState.setProgressState({
|
||||||
flashing: 2,
|
flashing: 2,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
type: 'write',
|
type: 'write',
|
||||||
percentage: 50,
|
percentage: 50,
|
||||||
@ -265,7 +265,7 @@ describe('Model: flashState', function () {
|
|||||||
flashState.setProgressState({
|
flashState.setProgressState({
|
||||||
flashing: 2,
|
flashing: 2,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
type: 'write',
|
type: 'write',
|
||||||
percentage: 50,
|
percentage: 50,
|
||||||
@ -282,7 +282,7 @@ describe('Model: flashState', function () {
|
|||||||
flashState.setProgressState({
|
flashState.setProgressState({
|
||||||
flashing: 2,
|
flashing: 2,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
type: 'write',
|
type: 'write',
|
||||||
percentage: 50,
|
percentage: 50,
|
||||||
@ -298,7 +298,7 @@ describe('Model: flashState', function () {
|
|||||||
flashState.setProgressState({
|
flashState.setProgressState({
|
||||||
flashing: 2,
|
flashing: 2,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
type: 'write',
|
type: 'write',
|
||||||
percentage: 50,
|
percentage: 50,
|
||||||
@ -314,7 +314,7 @@ describe('Model: flashState', function () {
|
|||||||
flashState.setProgressState({
|
flashState.setProgressState({
|
||||||
flashing: 2,
|
flashing: 2,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
type: 'write',
|
type: 'write',
|
||||||
percentage: 50.253559459485,
|
percentage: 50.253559459485,
|
||||||
@ -332,7 +332,7 @@ describe('Model: flashState', function () {
|
|||||||
flashState.setProgressState({
|
flashState.setProgressState({
|
||||||
flashing: {},
|
flashing: {},
|
||||||
verifying: [],
|
verifying: [],
|
||||||
succeeded: true,
|
successful: true,
|
||||||
failed: 'string',
|
failed: 'string',
|
||||||
percentage: 0,
|
percentage: 0,
|
||||||
eta: 0,
|
eta: 0,
|
||||||
@ -348,7 +348,7 @@ describe('Model: flashState', function () {
|
|||||||
flashState.setProgressState({
|
flashState.setProgressState({
|
||||||
flashing: 0,
|
flashing: 0,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
percentage: 0,
|
percentage: 0,
|
||||||
eta: 0,
|
eta: 0,
|
||||||
@ -381,7 +381,7 @@ describe('Model: flashState', function () {
|
|||||||
m.chai.expect(currentFlashState).to.deep.equal({
|
m.chai.expect(currentFlashState).to.deep.equal({
|
||||||
flashing: 0,
|
flashing: 0,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
percentage: 0,
|
percentage: 0,
|
||||||
speed: 0,
|
speed: 0,
|
||||||
@ -393,7 +393,7 @@ describe('Model: flashState', function () {
|
|||||||
const state = {
|
const state = {
|
||||||
flashing: 1,
|
flashing: 1,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
percentage: 50,
|
percentage: 50,
|
||||||
eta: 15,
|
eta: 15,
|
||||||
@ -407,7 +407,7 @@ describe('Model: flashState', function () {
|
|||||||
m.chai.expect(currentFlashState).to.deep.equal({
|
m.chai.expect(currentFlashState).to.deep.equal({
|
||||||
flashing: 1,
|
flashing: 1,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
percentage: 50,
|
percentage: 50,
|
||||||
eta: 15,
|
eta: 15,
|
||||||
@ -502,7 +502,7 @@ describe('Model: flashState', function () {
|
|||||||
flashState.setProgressState({
|
flashState.setProgressState({
|
||||||
flashing: 2,
|
flashing: 2,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
type: 'write',
|
type: 'write',
|
||||||
percentage: 50,
|
percentage: 50,
|
||||||
@ -514,7 +514,7 @@ describe('Model: flashState', function () {
|
|||||||
m.chai.expect(flashState.getFlashState()).to.not.deep.equal({
|
m.chai.expect(flashState.getFlashState()).to.not.deep.equal({
|
||||||
flashing: 2,
|
flashing: 2,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
percentage: 0,
|
percentage: 0,
|
||||||
speed: 0,
|
speed: 0,
|
||||||
@ -529,7 +529,7 @@ describe('Model: flashState', function () {
|
|||||||
m.chai.expect(flashState.getFlashState()).to.deep.equal({
|
m.chai.expect(flashState.getFlashState()).to.deep.equal({
|
||||||
flashing: 0,
|
flashing: 0,
|
||||||
verifying: 0,
|
verifying: 0,
|
||||||
succeeded: 0,
|
successful: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
percentage: 0,
|
percentage: 0,
|
||||||
speed: 0,
|
speed: 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user