985 Commits

Author SHA1 Message Date
Jonas Hermsmeier
b8897e0193
minifix(gui): Don't check for updates when in resin
This disabled Etcher checking for updates & showing update notifications
if running under resinOS with update locks enabled

Change-Type: patch
2018-05-11 16:36:14 +02:00
Jonas Hermsmeier
150e8112ea
feat(gui): Add ability to set analytics tokens via env
This adds the ability to set the Sentry & Mixpanel API tokens
via environment variables.

Change-Type: patch
2018-05-11 16:25:11 +02:00
Jonas Hermsmeier
196f16b941
Merge pull request #2326 from resin-io/resin-update-lock
feat(gui): Add resin update lock based on inactivity
2018-05-10 21:07:01 +02:00
Benedict Aas
21cb7a4847
feat(GUI): env var toggle autoselecting all valid drives (#2306)
We introduce an environment variable
`ETCHER_DISABLE_EXPLICIT_DRIVE_SELECTION` that both enables
autoselection of drives and disables explicit drive selection by hiding
the buttons allowing this. All valid drives are autoselected, i.e. any
drive-image pair that does not result in an error, however warnings are
accepted.

Closes: https://github.com/resin-io/etcher/issues/2262
Change-Type: patch
Changelog-Entry: Introduce env var to toggle autoselection of all
drives.
2018-05-10 18:53:53 +01:00
Jonas Hermsmeier
bb2dac7504
feat(gui): Add resin update lock based on inactivity
This adds functionality to acquire & release the update lock
when running under resinOS, re-using the `ELECTRON_RESIN_UPDATE_LOCK`
environment variable from `resin-electronjs`.

Further this adds the `ETCHER_INTERACTION_TIMEOUT_MS` env var, to
facilitate adjusting the inactivity period required to release the lock.

Change-Type: minor
2018-05-10 19:15:31 +02:00
Jonas Hermsmeier
40df4a94a7
minifix(gui): Only enable Kiosk Mode when FULLSCREEN is set
This fixes the `kiosk` setting always being true, and causing
the operating system's desktop to disappear.

Change-Type: patch
2018-05-09 17:04:38 +02:00
Jonas Hermsmeier
262d06f035
Merge pull request #2311 from resin-io/config-file
feat(gui): Add ability to read settings from a config file
Close #1356
2018-05-09 17:00:36 +02:00
Jonas Hermsmeier
408ab99774
Merge pull request #1921 from resin-io/link-to-windows-usbboot-drivers
feat(GUI): link to drivers when clicking a driverless usbboot device
2018-05-09 16:48:00 +02:00
Jonas Hermsmeier
28cb21db13
Merge pull request #2292 from resin-io/bench-verify
feat(writer): Use xxHash instead of SHA512 for verification
2018-05-09 16:46:02 +02:00
Jonas Hermsmeier
5f85258e84
feat(gui): Add ability to read settings from a config file
This adds the capability to configure settings via a `.etcher.json` file,
either in the user's home directory, or the current working directory.
In the case of the home directory, the config file is `$HOME/.config/etcher/config.json`,
while on Windows `$HOME/.etcher.json` is used.
The defined settings are merged with localStorage settings, and preceding
configuration files.
If both are present, the current working directory takes precedence.

Change-Type: minor
Changelog-Entry: Add support for configuration files
2018-05-09 16:22:07 +02:00
Benedict Aas
cde1776a2d
feat(GUI): use gtk3 dark theme mode (#2314)
We enable the `darkTheme` mode for GTK-3 applications (mainly Linux)
that suits Etcher's dark theme better, making the window title bar dark.

Change-Type: patch
Changelog-Entry: Use GTK-3 darkTheme mode.
2018-05-09 11:13:14 +01:00
Benedict Aas
7f6303391a
feat(GUI): add env var to toggle fullscreen (#2313)
We add an environment variable to toggle Etcher in fullscreen.

Closes: https://github.com/resin-io/etcher/issues/2307
Change-Type: patch
Changelog-Entry: Add environment variable to toggle fullscreen.
2018-05-09 11:08:15 +01:00
Benedict Aas
66c7806cfa
feat(GUI): blacklist drives with an env var (#2315)
We add an environment variable `ETCHER_BLACKLISTED_DRIVES` that allows
us to filter certain drives from ever showing up in Etcher with comma
separated device paths, e.g. `/dev/sda,/dev/sdb,/dev/mmcblk0`.

Closes: https://github.com/resin-io/etcher/issues/2264
Change-Type: patch
Changelog-Entry: Allow blacklisting of drives through and environment
variable ETCHER_BLACKLISTED_DRIVES.
2018-05-09 11:06:18 +01:00
Benedict Aas
2cdb6945ba
feat(GUI): show selected drives below drive step (#2309)
We add a list of selected drives below the drive selection step, able to
accommodate four lines of drives before scrolling occurs.

Closes: https://github.com/resin-io/etcher/issues/2263
Change-Type: patch
Changelog-Entry: Show selected drives below drive selection step.
2018-05-08 17:45:27 +01:00
Benedict Aas
ca45855ed7
feat(GUI): add drive quantity to flash analytics (#2298)
We add a field `driveCount` to the flash analytics events in the image
writer.

Change-Type: patch
2018-05-08 10:56:15 +01:00
Benedict Aas
07ed90ed11
minifix: add jsx files to gitattributes and attribute jviotti (#2302)
Change-Type: patch
2018-05-04 14:46:27 +01:00
Benedict Aas
c1b97b1b44
minifix(GUI): negate predicate to show help icon (#2300)
Change-Type: patch
2018-05-03 11:00:37 +01:00
Benedict Aas
674019ea75
feat(GUI): add button to cancel flash process (#2301)
We add a cancel button next to the flash progress bar that gracefully
aborts the flash process.

Closes: https://github.com/resin-io/etcher/issues/1791
Closes: https://github.com/resin-io/etcher/issues/2234
Closes: https://github.com/resin-io/etcher/issues/2245
Change-Type: patch
Changelog-Entry: Add a button to cancel the flash process.
2018-05-03 10:58:15 +01:00
Jonas Hermsmeier
8f762484f2
feat(gui): Add CTA in drivelist, update drive download modal 2018-05-02 23:37:15 +02:00
Jonas Hermsmeier
4174991345
feat(gui): Add simple confirmation modal 2018-05-02 23:21:02 +02:00
Benedict Aas
71064cc760
fix(GUI): fix multi-writes analytics (#2295)
We make the analytics block into a function `handleErrorLogging` and
use it in the fail event that happens during multi-writes. Previously
error events would be handled when single drives were flashed on Promise
rejection, instead we now only handle the Promise rejection when all
devices fail as a special event.

Change-Type: patch
Changelog-Entry: Fix multi-writes analytics by reusing existing logic in
multi-write events.
2018-05-02 22:02:31 +01:00
Juan Cruz Viotti
4c40c8ff30
feat(GUI): link to drivers when clicking a driverless usbboot device
Step 2 until we support installing the drivers from within Etcher. This
also introduces an "Open drive link" Mixpanel event.

See: https://www.raspberrypi.org/documentation/hardware/computemodule/cm-emmc-flashing.md
See: https://github.com/resin-io/etcher/pull/1892
Change-Type: patch
Changelog-Entry: Download usbboot drivers installer when clicking a driverless usbboot device on Windows.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-05-02 22:10:49 +02:00
Benedict Aas
d7211b130b
feat(GUI): allow disabling links and hiding help link (#2290)
We allow users to pass an env var `ETCHER_DISABLE_EXTERNAL_LINKS` to
disable external links and hide links rendered useless by the change
such as the help icon.

Closes: https://github.com/resin-io/etcher/issues/2246
Closes: https://github.com/resin-io/etcher/issues/2247
Change-Type: patch
Changelog-Entry: Allow disabling links and hiding help link with an env var.
2018-05-02 17:29:08 +01:00
Jonas Hermsmeier
553fbf1a77
minifix(writer): Increase HWM for verification readstream
Change-Type: patch
2018-04-27 22:29:03 +02:00
Jonas Hermsmeier
d3a4753b79
feat(writer): Use xxHash instead of SHA512 for verification
This switches from SHA512 to xxHash for verification hashing,
as xxHash provides more throughput.

Change-Type: patch
2018-04-27 21:51:05 +02:00
Benedict Aas
ee831da52d
minifix: replace succeeded with successful in messages (#2273)
Change-Type: patch
2018-04-25 15:08:46 +01:00
Jonas Hermsmeier
8f969374c7
Merge pull request #2272 from resin-io/fix-store-warning-deselect
fix(store): keep single warning-drives selected
2018-04-25 14:39:58 +02:00
Benedict Aas
5a788b04b5 fix(store): keep single warning-drives selected
We ensure that drive-image pairs with warnings don't get deselected when
there is only one drive available. This happenened because there was no
check for any previous selected devices. Comes with a test case.

Fixes: https://github.com/resin-io/etcher/issues/2267
Change-Type: patch
Changelog-Entry: Keep single warning-drive-image pairs selected.
2018-04-25 00:49:42 +01:00
Benedict Aas
b88a45aa79
refactor(GUI): make the finish notification message concise (#2268)
We make the finish notification message print the device name as usual
when there's one target, and instead list quantity of successful and
failed devices when there are multiple. Previously it would list all
device names, and wouldn't specify how many were successful or failures.

Change-Type: patch
2018-04-24 22:04:36 +01:00
Jonas Hermsmeier
3c20a056e6
Merge pull request #2228 from resin-io/change-succeeded-successful
refactor: use word successful instead of succeeded
2018-04-24 18:24:05 +02:00
Benedict Aas
82a57d34b8
fix(GUI): remove success screen dots with a quantity of zero (#2227)
We remove success screen dots that are zero, which mainly means that the
error dot disappears as it shouldn't currently be possible to end up
with zero successful devices on that screen.

Change-Type: patch
2018-04-23 18:33:31 +01:00
Benedict Aas
c4d7076fe8 refactor: use word successful instead of succeeded
We replace 'succeeded' with 'successful' throughout the codebase.

Change-Type: patch
2018-04-23 18:31:44 +01:00
Jonas Hermsmeier
963f1a11eb
fix(gui): Fix zero-zero devices when verify is disabled
This fixes a state where the success screen would display
zero succeeded and zero failed devices if verification was
turned off. This could occur due to the "done" event being
emitted before the next progress event could set the relevant data.

Change-Type: patch
2018-04-20 01:04:30 +02:00
Jonas Hermsmeier
1d4ea2164f
fix(gui): De-serialize errors from flashResults
Change-Type: patch
2018-04-19 21:46:03 +02:00
Jonas Hermsmeier
4c8b97afb3
fix(usbboot): Move blob handling to SDK
This moves the usbboot blob handling into the SDK to avoid
root dirname conflicts through shimmed __dirname in bundled UI
and different contexts of execution.

Change-Type: patch
2018-04-19 16:54:23 +02:00
Jonas Hermsmeier
3bac0225e5
refactor(usbboot): Move lib/blobs/usbboot/ -> lib/sdk/adapters/usbboot/blobs 2018-04-19 15:48:59 +02:00
Jonas Hermsmeier
69e719c4c7
Merge pull request #2215 from resin-io/revert-diskclean
Revert "feat(lib): Use win-drive-clean instead of diskpart"
2018-04-18 23:07:49 +02:00
Jonas Hermsmeier
5867edcc70
Revert "feat(lib): Use win-drive-clean instead of diskpart"
This reverts commit 47fc1b7357bdb9e9aa8e2d7476690435087d984e
in order to prevent a possible regression, until properly investigated
and fixed.

Change-Type: patch
Changelog-Entry: Revert using native binding to clean disks on Windows
2018-04-18 21:55:08 +02:00
Jonas Hermsmeier
b3a7255eed
fix(drive-scanner): Fix usbboot blob path when bundled
This fixes the usbboot blobs path when the application is bundled & packaged.

Change-Type: fix
Changelog-Entry: Fix usbboot blob loading
2018-04-18 21:42:53 +02:00
Jonas Hermsmeier
4179def119
Merge pull request #2211 from resin-io/remove-iserror
fix(image-writer): Remove use of _.isError
2018-04-18 19:12:47 +02:00
Jonas Hermsmeier
c225dd89c6
fix(image-writer): Remove use of _.isError
`_.isError()` returns `true` for anything that has a `name` and `message`
property, causing the check here to always keep the plain object as error.

Change-Type: patch
2018-04-18 17:44:14 +02:00
Benedict Aas
d59ebad167 fix(GUI): display untitled device when device lacks description
We fallback to `'Untitled Device'` when the device lacks a
`.description` field.

Change-Type: patch
Changelog-Entry: Display Untitled Device when the device lacks a
description field.
2018-04-18 16:33:39 +01:00
Jonas Hermsmeier
347932b213
Merge pull request #2209 from resin-io/filter-raid-devices
fix(adapters): Always ignore RAID attached devices
2018-04-17 20:09:31 +02:00
Benedict Aas
32bc615e78
feat(GUI): display succeeded and failed devices on finish screen (#2206)
We display the quantity of succeeded and failed devices using status
dots on the finish screen.

Change-Type: patch
Changelog-Entry: Display succeeded and failed device quantities on the
finish screen.
2018-04-17 15:52:02 +01:00
Jonas Hermsmeier
355373f24d
fix(adapters): Always ignore RAID attached devices
Change-Type: patch
Changelog-Entry: Exclude RAID devices from drive selection list
2018-04-17 16:14:05 +02:00
Jonas Hermsmeier
3381ad042b
Merge pull request #2199 from resin-io/fix-ipc-user-error
fix(child-writer): Fix handling of user errors over IPC
2018-04-16 22:34:57 +02:00
Benedict Aas
a1b5766a71
minifeat(GUI): prefix multiple devices label with quantity (#2204)
Change the `Multiple Devices (n)` label on selected devices to a
quantity-prefixed form `n Devices`.

Change-Type: patch
2018-04-16 20:11:44 +01:00
Benedict Aas
aeeb1d4294
feat(GUI): remove unnecessary status dots (#2202)
We remove usage of the status dots except when failed devices occur, in
which case we still display the red failed dot and quantity. We also use
singular and plural depending on the quantity of failed devices.

Change-Type: patch
2018-04-16 20:11:19 +01:00
Benedict Aas
7ceec47246
feat(GUI): make the progress button blue on verification (#2203)
We make the progress button blue on verification.

Change-Type: patch
Changelog-Entry: Make the progress button blue on verification.
2018-04-16 20:06:40 +01:00
Jonas Hermsmeier
cc848ef9f2
fix(child-writer): Fix handling of user errors over IPC
This fixes transmission of user errors over IPC, as the `report`
property was previously missing. Further it also adds more properties
to `errors.toJSON`, like `syscall`, `errno`, etc. and re-uses the method
for failure signalling.

Change-Type: patch
2018-04-13 18:36:29 +02:00