381 Commits

Author SHA1 Message Date
Benedict Aas
7782f94daa
feat(GUI): add electron-native file-picker component (#2333)
We add a file-picker written with Rendition/React. It is activated with
the `ETCHER_EXPERIMENTAL_FILE_PICKER` environment variable. Further
customisation can be done with the `ETCHER_FILE_BROWSER_CONSTRAIN_FOLDER`
variable that takes a path and allows one to constrain the file-picker to
a folder.

Related: https://github.com/resin-io/etcher/issues/2238
Related: https://github.com/resin-io/etcher/issues/2285
Change-Type: patch
Changelog-Entry: Add electron-native file-picker component.
2018-05-16 20:34:04 +01:00
Benedict Aas
f6ce603e45
feat(GUI): add convenience localstorage class (#2276)
* feat(GUI): add convenience localstorage class

We add a class `Storage` and accompanying helper methods that makes
localStorage usage easier.

Change-Type: patch
Changelog-Entry: Add a convenience Storage class on top of localStorage.
2018-05-15 11:59:36 +01:00
Jonas Hermsmeier
df8bacd82e
fix(tests): Revert unintended change to raspberrypi-raw.dmg
This file was accidentally changed due to a globally executed search & replace

Change-Type: patch
2018-04-25 16:34:12 +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
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
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
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
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
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
Jonas Hermsmeier
64604dbcc6
Merge pull request #2156 from resin-io/fix-store-quantity-guards
fix: ensure flash quantity fields are finite
2018-04-05 18:54:05 +02:00
Jonas Hermsmeier
dd961ad30b
test(lint): Update codespell 1.11.0 -> 1.12.0
This updates codespell, and fixes new spelling error detections

```
lib/shared/models/selection-state.js:377: Unselect  ==> Deselect
lib/gui/app/components/modal/styles/_modal.scss:72: programatically  ==> programmatically
tests/shared/errors.spec.js:88: prioritise  ==> prioritize
tests/shared/errors.spec.js:94: prioritise  ==> prioritize
tests/shared/errors.spec.js💯 prioritise  ==> prioritize
tests/gui/components/svg-icon.spec.js💯 prioritise  ==> prioritize
docs/MAINTAINERS.md:19: artefacts  ==> artifacts
docs/MAINTAINERS.md:21: artefacts  ==> artifacts
docs/MAINTAINERS.md:25: artefacts  ==> artifacts
docs/MAINTAINERS.md:36: artefacts  ==> artifacts
docs/MAINTAINERS.md:96: artefacts  ==> artifacts
docs/MAINTAINERS.md:147: artefacts  ==> artifacts
CHANGELOG.md:492: interferring  ==> interfering
```

Change-Type: patch
2018-04-04 21:00:34 +02:00
Benedict Aas
dc484d79ed fix: ensure flash quantity fields are finite
We replace the `_.identity` predicate with `_.isFinite` to ensure
the flash quantity fields are numbers.

Change-Type: patch
Changelog-Entry: Ensure flash quantity fields are finite.
2018-04-03 21:25:49 +01:00
Benedict Aas
65a4a959bb
feat: expose all flash state fields to the store (#2153)
We expose all the flash state fields to the store, and mirror
`speed`'s format with `totalSpeed` with MB as the size unit.
We also format the progress state messages to use information
available with multiwrites.

Change-Type: patch
Changelog-Entry: Expose all flash state fields to the store.
2018-04-03 20:32:38 +01:00
Jonas Hermsmeier
8bb20de912
Merge pull request #2161 from resin-io/local-test-blobs
test(image-stream): Use local dir instead of tmpdir
2018-03-30 00:02:52 +02:00
Jonas Hermsmeier
c9a2a47ee1
test(spectron): Refactor tests, dereference app after use
Change-Type: patch
2018-03-29 19:45:54 +02:00
Jonas Hermsmeier
bc2ad581ba
test(image-stream): Use local dir instead of tmpdir
This changes the image-stream tests to use a local directory,
instead of the OS's tmpdir to avoid issues with sandboxing on Concourse CI.

Change-Type: patch
2018-03-29 17:22:52 +02:00
Benedict Aas
57c4a285d8 refactor: inline middle-ellipsis package as util
We remove our dependency on the `middle-ellipses` package and include
and expose the function in `lib/shared/utils`, alongside the regular
Angular filter it exposes. This allows use of the middle ellipsis
method in React.

Change-Type: patch
Changelog-Entry: Inline middle-ellipsis package as util.
2018-03-29 15:25:55 +01:00
Benedict Aas
4140d49db3
refactor: multi-writes preparatory changes (#2124)
We add some preparatory changes including new utility functions, as well
as changes throughout the codebase that reflect the change from single
drives to a list of drives, given multi-writes is coming.

Change-Type: patch
Changelog-Entry: Various preparatory changes to account for
multi-writes.
2018-03-23 14:36:39 +00:00
Jonas Hermsmeier
43d79ebd05
Merge pull request #2084 from resin-io/sdk-multiwrite
feat(writer): Impl multi-writes in writer modules
2018-03-22 00:12:02 +01:00
Jonas Hermsmeier
4108979b65
feat(gui): Display image size when drive too small
This adds a display of the determined image size to the
drive label when the drive has been determined to be too small.

Change-Type: patch
Changelog-Entry: Display image size for comparison if drive is too small
2018-03-21 20:35:47 +01:00
Jonas Hermsmeier
c5b311359a
Merge pull request #2111 from resin-io/store-efficient-plainify
minifix: remove stale json object plainifying in store
2018-03-21 20:32:45 +01:00
Jonas Hermsmeier
c724e4cb20
feat(writer): Impl multi-writes in writer modules
Implement writing to multiple destinations simultaneously

Change-Type: minor
Changelog-Entry: Implement writing to multiple destinations simultaneously
2018-03-20 22:21:01 +01:00
Benedict Aas
835f2cf769
feat(GUI): add colorised multi-writes progress status dots (#2115)
We add colorised progress status dots with quantities of `flashing`,
`validating`, `succeeded`, and `failed` devices.

Change-Type: patch
Changelog-Entry: Add colorised multi-writes progress status dots.
2018-03-14 17:05:01 +00:00
Benedict Aas
82b65399af minifix: remove stale json object plainifying in store
Change-Type: patch
Changelog-Entry: Remove stale JSON object plainifying in store
2018-03-09 13:20:38 +00:00
Benedict Aas
a83e397643
refactor: move memoize function to shared utils (#2090)
We move the memoize function to `lib/shared/utils.js` and expose it to
modules across the project.

Change-Type: patch
Changelog-Entry: Move memoize function to shared utils.
2018-03-09 12:12:34 +00:00
Jonas Hermsmeier
11a0aa322f
test(available-drives): Fix set expected set property
Change-Type: patch
2018-03-05 16:38:53 +01:00
Benedict Aas
207c2ef5b6
feat: add drive multi-selection in store (#1736)
We lay the foundation for multi-selecting drives by implementing it into
the `store` and relevant modules interacting with the `store`.

Change-Type: patch
Changelog-Entry: Add drive multi-selection to the store.
2018-02-23 17:45:49 +00:00
Benedict Aas
2c0cdcf947
refactor(GUI): remove selection-state clear options to simplify (#2043)
We refactor and simplify the selection-state `.clear()` by removing the
options argument.

Change-Type: patch
Changelog-Entry: Remove `selectionState.clear()` options argument to
simplify.
2018-02-21 15:56:42 +00:00
Benedict Aas
765de94ca3
refactor: consolidate store-state nil-checking (#2062)
We make the nil-checking of store state fields generic through a
`verifyNoNilFields` function that throws an error if any fields are
nil.

Change-Type: patch
Changelog-Entry: Consolidate store state nil-checking with helper
function.
2018-02-20 13:13:29 +00:00
Benedict Aas
8b577ca12f
feat(GUI): separate svg path and content attributes (#1677)
We separate the SVG component path and content into attributes
`paths` and `contents` which take lists of strings that are
tried until one succeeds. `contents` takes precedence over `paths`,
i.e. it is tried first.

Change-Type: patch
Changelog-Entry: Separate SVG component's path and content attributes.
2018-02-20 09:51:13 +00:00
Benedict Aas
91719435d9
feat(GUI): warn the user on large drive selection (#2045)
We warn the user when they select a large drive to confirm they want to
flash in case the device is important.

Fixes: https://github.com/resin-io/etcher/issues/1916
Change-Type: patch
Changelog-Entry: Warn the user on selection of large drives.
2018-02-19 19:12:48 +00:00
Jonas Hermsmeier
7c9f15d8a9
feat(sdk): Consolidate low-level components into SDK
Changes:

- Split out scanner into own file
- Move `lib/shared/sdk` -> `lib/sdk`
- Move `lib/image-stream` -> `lib/sdk/image-stream`
- Move `lib/writer` -> `lib/sdk/writer`
- Rename `sdk/standard` -> `sdk/blockdevice`
- Move adapters into `sdk/adapters` subdirectory

Change-Type: minor
Changelog-Entry: Consolidate low-level components into Etcher SDK
2018-02-16 17:15:28 +01:00
Jonas Hermsmeier
1e65a09e8e
Merge pull request #2012 from resin-io/use-template-contents
feat: replace template paths with contents
2018-02-14 06:54:54 -08:00
Jonas Hermsmeier
ab026b1635
test(image-stream): Fix lint error in tester 2018-02-13 17:15:39 +01:00
Jonas Hermsmeier
0bc09defa7
chore(package): Remove unused dependency trackjs 2018-02-13 16:13:49 +01:00
Jonas Hermsmeier
04352494a0
test: Remove unnecessary file-exists dependency
Change-Type: patch
2018-02-13 16:13:49 +01:00
Benedict Aas
d5a14031c6 pass linter 2018-02-13 11:19:59 +00:00
Benedict Aas
ad0b5e7583 test modal 2018-02-13 11:19:59 +00:00
Benedict Aas
f2424095e0 test other pages 2018-02-13 11:19:59 +00:00
Benedict Aas
db2bed896a feat: replace template paths with contents
We replace the `templateUrl` fields with `template` fields and thus
switch from template paths to template contents in preparation for the
Webpack PR.

Changelog-Entry: Replace template paths with template contents.
Change-Type: patch
2018-02-13 11:19:59 +00:00
Benedict Aas
c3600ee8fc
refactor: rename selection state and store functions (#2037)
We rename functions in `selection-state` and the `store`.

Change-Type: patch
Changelog-Entry: Rename selection-state and store functions.
2018-02-13 11:15:22 +00:00
Jonas Hermsmeier
fdd0d781ca
refactor(lib): Remove unused robot protocol
This removes the remnants of the unused "robot protocol",
which was previously used by the CLI, but has been superseded by IPC.

Change-Type: minor
Changelog-Entry: Remove unused robot protocol
2018-02-09 19:25:36 +01:00
Jonas Hermsmeier
5634954b7e
refactor(test): Remove dependency on tmp
This removes the dependence on `tmp`, as this module has been known
to cause problems, while also being unnecessary for what it's being used for.

Change-Type: minor
2018-02-08 18:43:48 +01:00
Benedict Aas
4dc64ee15b
feat(GUI): add app to gui folder structure (#2002)
* feat(GUI): add app to gui folder structure

We add a `lib/gui/app/` folder to help transition to Webpack usage.

Change-Type: patch
Changelog-Entry: Add `lib/gui/app` folder to ease into Webpack usage.
2018-01-29 18:34:21 +00:00
Jonas Hermsmeier
38ff0e39d6
fix(lib): Fix readonly property typo (#1986)
This fixes the camelcasing of the `.isReadOnly` property
of detected storage devices.

Change-Type: patch
2018-01-23 06:30:06 -08:00
Benedict Aas
1ae40c7b15 feat: test that ipc verbosity is off (#1963)
feat: test that ipc verbosity is off

We test that `ipc.config.silent` is set to `true` so that it doesn't
spam `stdout` for users.

Changelog-Entry: Test that IPC verbosity is off
Change-Type: patch
2018-01-18 09:14:09 -08:00