405 Commits

Author SHA1 Message Date
Alexis Svinartchouk
ec015da795 Avoid "Invalid state percentage: null" errors
Change-type: patch
2019-03-29 17:24:34 +01:00
Alexis Svinartchouk
ef45696015 Double app:start test timeout
Change-type: patch
2019-02-11 14:46:05 +01:00
Alexis Svinartchouk
a8f8c2cd85 Increase svg icon test timeout
Change-type: patch
2019-02-11 14:08:13 +01:00
Alexis Svinartchouk
65d86460cb fix(shared): Fix getDriveImageCompatibilityStatuses() and tests
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
871db09447 fix(tests): Fix gui tests
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2019-01-24 13:21:26 +01:00
Alexis Svinartchouk
63967d1558 fix(tests): Remove throw if no percentage or eta test
Since 25916200f2864a9b137325f919c0f8ef5d62fa60 we can handle a progress
state with no percentage or eta.
2019-01-24 13:21:26 +01:00
Jonas Hermsmeier
a541c863be fix(test): Sort compressed extensions before comparing 2019-01-24 13:21:26 +01:00
Jonas Hermsmeier
d3c2cd4215 fix(test): Sort supported extensions to fix order mismatch
Change-type: patch
2019-01-24 13:21:26 +01:00
Alexis Svinartchouk
e68dbcf4ee Remove lib/sdk and its tests 2019-01-24 13:21:26 +01:00
Alexis Svinartchouk
f2ca997195 Change "Drive Contains Image" label.
Use "Drive Mountpoint Contains Image" instead as the image may not be on
this drive but on a drive mounted in one of the mountpoins of this
drive.
We still don't want to allow flashing this drive in that situation.

Changelog-entry: Changed “Drive Contains Image” to “Drive Mountpoint Contains Image”
Change-type: patch
2019-01-07 15:35:21 +01:00
Otavio Salvador
7565e809b0 Add .wic image extension as supported format
The `.wic` is a widely used image format in the OpenEmbedded / Yocto
Project ecosystem and is straightforward to be supported.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2018-11-27 10:01:05 -02:00
Lorenzo Alberto Maria Ambrosi
20996b153d fix(GUI): Reject drives with null size
Change-type: patch
Changelog-entry: Reject drives with null size (fixes pretty-bytes error)
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-11-22 19:57:45 +01:00
Lorenzo Alberto Maria Ambrosi
c2c59f4a9e Enable React lint rules
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2018-10-23 21:56:02 +02:00
Lorenzo Alberto Maria Ambrosi
cb701a7bbc Change spectron port
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2018-10-17 15:50:51 +02:00
Lorenzo Alberto Maria Ambrosi
7e01eca7f5 Use fork of node-usb to disable libudev
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@resin.io>
2018-10-05 18:43:29 +02:00
Lorenzo Alberto Maria Ambrosi
2fb8ad146f Change spectron port to run tests
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@resin.io>
2018-09-27 19:21:54 +02:00
Lorenzo Alberto Maria Ambrosi
37b25d8422
Change port so not to overlap with other builds
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@resin.io>
Signed-off-by: Juan Cruz Viotti <juan@resin.io>
2018-09-25 15:22:42 +01:00
Alexis Svinartchouk
92d969b075 fix(test): Move tests to correct scope
Move available-drives, flash-state and selection-state tests to gui
tests. These files only test gui code and make `make test-cli` fail.

Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2018-08-07 09:22:29 +02:00
Benedict Aas
5863319c0b
fix(GUI): file-picker performance and design improvements
- Replace onClick arrow functions in all components that use them for
  efficiency reasons: 300-500% speed-up
- Sort by folders and ignore case for better UX
- Remove use of `rendition.Button` in files, leading to a 10-20%
  performance increase when browsing files
- Proper sidebar width and spacing
- Recents and favorites are now filtered by existence async for a tiny
  performance improvement
- Make Breadcrumbs and Icon pure components to stop frequent re-rendering
- Initial support for array constraints
- Use first constraint as initial path instead of homedir if a
  constraint is set
- Use correct design height on modal, `calc(100vh - 20px)`
- Reset scroll position when browsing a new folder
- Fuse Bluebird `.map()` and `.reduce()` in
  `files.getAllFilesMetadataAsync`.
- Use `localeCompare`'s own case-insensitive option instead of calling
  `.toLowerCase()` twice on `n-2` files compared.
- Use 16px font sizes in sidebar and files to match design.
- Disable `$locationProvider.html5Mode.rewriteLinks`, which seemed to
  take 50ms of the directory changing time.
- Leave file extension as-is in `files.getFileMetadataSync` and the
  async counterpart for a very minor performance improvement.

Change-Type: patch
2018-05-30 12:39:59 +02:00
Jonas Hermsmeier
e0ebdc9045
fix(test): Fix lint errors & tests 2018-05-25 20:35:59 +02:00
Jonas Hermsmeier
687e0b563b
refactor(gui): Move shared models to app/models 2018-05-25 20:35:59 +02:00
Jonas Hermsmeier
6232cc7d49
test(settings): Update test specs accordingly
Change-Type: patch
2018-05-25 20:35:59 +02:00
Jonas Hermsmeier
447efc7096
refactor: Move shared/store.js -> gui/app/models/store.js 2018-05-23 21:20:50 +02:00
Benedict Aas
c00b7b62d6 fix: add missing files module
We add a convenience module for file and path operations.
Tests included.

Change-Type: patch
2018-05-17 15:34:34 +01:00
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