1294 Commits

Author SHA1 Message Date
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
Jonas Hermsmeier
936142cf7e
fix(gui): Fix usbboot blob dir path
Change-Type: patch
2018-03-15 16:42:34 +01:00
Jonas Hermsmeier
2aa37571f0
fix(gui): Fix usbboot drive icon path
Change-Type: patch
2018-03-15 16:41:38 +01:00
Jonas Hermsmeier
9b42960b2f
fix(scanner): Enable usbboot on Linux if run as root
This re-enables the usbboot scanner dynamically if Etcher
is run as root on Linux.

Change-Type: patch
2018-03-15 14:45:04 +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
3fe5d7711f
minifix: use svg contents list in main template (#2113)
We use a list instead of element with `svg-icon` in `main.tpl.html`, as
required by the `svg-icon` component and will return an error
otherwise.

Fixes: https://github.com/resin-io/etcher/issues/2078
Change-Type: patch
Changelog-Entry: Use SVG contents list in main template.
2018-03-14 17:03:31 +00:00
Benedict Aas
faf9b113a9
feat(CSS): use roboto font instead of helvetica (#2114)
We replace Helvetica with Roboto as the main font.

Change-Type: patch
Changelog-Entry: Replace Helvetica as the main font with Roboto.
2018-03-12 16:38:01 +00:00
Jonas Hermsmeier
f72cc6bbbc
Merge pull request #2108 from resin-io/switch-chksm-algo
fix(perf): Remove support for CRC32 checksumming

Close #643
2018-03-09 15:11:32 +01:00
Benedict Aas
69e85a7ac6 fix: stop autoselecting empty value in store
We fix store autoselection, which selects an empty value when one
drive is selected and then ejected, leaving one drive that is
supposed to be autoselectable. Now it instead properly autoselects the
last drive.

Change-Type: patch
Changelog-Entry: Stop store autoselection from selecting empty values on
drive ejection.
2018-03-09 13:52:38 +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
35772b0370
fix(perf): Remove support for CRC32 checksumming
As crc32-stream was identified as a massive performance bottleneck,
we remove it, and default to Node's crypto API with md5 instead.

Change-Type: minor
2018-03-08 20:33:00 +01:00
Jonas Hermsmeier
d91d957777
fix(gui): Disable throttling timers when in background
This disables Electron throttling timers when not in the foreground.

Change-Type: patch
2018-03-01 20:04:34 +01:00
Jonas Hermsmeier
cb25db2556
fix(image-writer): Fix missing error argv
This fixes a missing error argument being passed in .emit()

Change-Type: patch
2018-03-01 18:12:38 +01:00
Benedict Aas
4e112dc98c
minifix: add missing parameter to verifyNoNilFields example (#2081)
We add the missing `name` parameter to the `verifyNoNilFields` JSDoc
example.

Change-Type: patch
Changelog-Entry: Add missing name param to verifyNoNilFields JSDoc example.
2018-02-26 11:34:46 +00:00
Jonas Hermsmeier
d233558b44
Merge pull request #2080 from resin-io/sdk-write-prepare
feat(sdk): Move CLI writer logic into SDK writer
2018-02-23 10:26:36 -08: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
Jonas Hermsmeier
d9ccc43d15
feat(sdk): Move CLI writer logic into SDK writer
This moves the preparation logic from the CLI into the SDK
in preparation for further SDK rearchitecturing, and to allow
standalone usage of SDK.

Change-Type: minor
Changelog-Entry: Move CLI write preparation logic into SDK
2018-02-23 16:06:07 +01: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
a56755e2c6
feat(GUI): add spacing to drive-selector labels (#2059)
We add a right margin to the drive-selector labels so they look nicer
when there are multiple.

Change-Type: patch
Changelog-Entry: Add spacing to the drive-selector warning/error labels.
2018-02-20 21:07:13 +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
Jonas Hermsmeier
1dcbcef705
Merge pull request #2054 from resin-io/fix-debug-namespaces
fix(lib): Fix debug namespaces
2018-02-20 04:37:37 -08:00
Jonas Hermsmeier
5be64e124b
Merge pull request #2023 from resin-io/drive-clean
feat(lib): Use win-drive-clean instead of diskpart
2018-02-20 03:40:10 -08:00
Jonas Hermsmeier
f70df03b1a
Merge pull request #2056 from resin-io/fix-debug-enable
fix(app): Fix enabling debug output
2018-02-20 03:35:08 -08: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
Benedict Aas
b1b82301d9
fix(GUI): make all class label text bold (#2060)
We make all tags with `.label` have bold text and remove the need for
`<b>` tags.

Change-Type: patch
Changelog-Entry: Make all `.label` tags' text bold and remove need for `<b>` tags.
2018-02-19 18:38:03 +00:00
Benedict Aas
fdf15f53d7
feat(GUI): warning makes drive-selector button orange (#2044)
We make the drive-selector button orange when there is a warning attached
to the image-drive pair.

Change-Type: patch
Changelog-Entry: Make the drive-selector button orange on warnings.
2018-02-19 11:27:30 +00:00
Jonas Hermsmeier
4802854cff
Merge pull request #2055 from resin-io/remove-direct-io
fix(cli): Remove O_DIRECT & O_EXCL
2018-02-16 10:53:28 -08:00
Jonas Hermsmeier
b0538099cf
fix(lib): Fix debug namespaces
This fixes some debug namespaces not being prefixed with `etcher:`
and their respective subsystems.

Change-Type: patch
2018-02-16 19:01:26 +01:00
Jonas Hermsmeier
2b66762dec
fix(app): Fix enabling debug output
This fixes enabling debug output via the DEBUG env var

Change-Type: patch
2018-02-16 18:21:17 +01:00
Jonas Hermsmeier
7063f254c6
fix(cli): Remove O_DIRECT & O_EXCL
This removes O_DIRECT and O_EXCL flags from the writer,
as O_DIRECT can lead to EINVAL under quite a few circumstances,
and O_EXCL has proven to be useless.

Change-Type: patch
2018-02-16 18:00:10 +01: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
47fc1b7357
feat(lib): Use win-drive-clean instead of diskpart
This replaces shelling out to `diskpart` on Windows to clear
the partition table with `win-drive-clean`, which does so via DeviceIoControl.

Change-Type: minor
Changelog-Entry: Use native code to clean drives on Windows
2018-02-16 15:57:34 +01:00
Juan Cruz Viotti
4fa0f990e5
feat(GUI): bundle the GUI code with Webpack (#1943)
This commit introduces a Webpack configuration file that bundles the GUI
code along with its dependencies (except the Etcher SDK and its own
dependencies), and uses Babel to add support for JSX (required by the
Rendition library).

The GUI code that goes into the bundle was moved to `lib/gui/app` so we
can easily ignore the whole subdirectory when creating production
distributable packages.

We now have a new make target called `webpack` that can be used to
create the GUI bundle. Such target will be called everytime a package is
generated.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-02-15 17:39:15 +00:00
Benedict Aas
e0f789bc14
refactor: remove stale invalid key check in store (#2050)
We remove a piece of code checking whether `_.keys` returns any non-string
values in its array, but per the Lodash documentation `_.keys` always returns an
array of strings.

Change-Type: patch
Changelog-Entry: Remove stale `invalidKey` check in store.
2018-02-15 17:23:11 +00: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
Benedict Aas
34b4f65c20
feat: log the event status of the banner (#2013)
We add log the banner HTTP load event object to the analytics.

Change-Type: patch
Changelog-Entry: Log the banner load event to analytics.
2018-02-14 12:03:40 +00:00
Jonas Hermsmeier
fbb175608d
feat(writer): Increase UV_THREADPOOL_SIZE
This increases the UV_THREADPOOL_SIZE to CPUs * 4 to
facilitate full write speeds when writing to multiple destinations,
in preparation for integrating multi-writes.

Change-Type: patch
Changelog-Entry: Increase UV_THREADPOOL_SIZE to allocate 4 threads per CPU
2018-02-13 17:31:59 +01: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
Benedict Aas
bb5efb3450
feat(GUI): add descriptive name to modals (#2036)
We add a descriptive name to modals for analytics and debugging.

Change-Type: patch
Changelog-Entry: Add descriptive name to modals for analytics and
debugging.
2018-02-13 11:13:48 +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
Benedict Aas
47338cf07b
upgrade(package): Update eslint 3.19.0 -> 4.17.0 (#2026)
We upgrade eslint for better support of the object-curly-newline
options, and change the quantity of elements required before the linter
enforces newlines on objects, in addition we apply `consistent` to avoid
errors when there are newlines in objects with less than 2 elements.

```
const { field } = object

const {
  field
} = object

const {
  field1,
  field2
} = object
````

Change-Type: patch
Changelog-Entry: Upgrade eslint to use object-curly-newline options.
2018-02-09 15:30:43 +00:00
Jonas Hermsmeier
4c1884fc95
Merge pull request #1998 from resin-io/update-udif
upgrade(package): Update udif 0.10 -> 0.13
2018-02-09 07:10:18 -08:00
Jonas Hermsmeier
c2ba053737
Merge pull request #2021 from resin-io/use-ng-if
feat(GUI): replace ng-show and ng-hide with ng-if
2018-02-09 03:41:53 -08:00
Jonas Hermsmeier
4cd16a40d0
Merge pull request #1743 from Lin-Buo-Ren/patch-1
docs: Add WoeUSB as an alternative tool to burn Windows USB images
2018-02-09 03:40:10 -08:00
Jonas Hermsmeier
0038c6c65a
Merge pull request #2010 from resin-io/menu-link-ref
feat(gui): Add ref params to homepage links in menu
2018-02-09 03:39:22 -08:00
Jonas Hermsmeier
974315868d
Merge branch 'master' into patch-1 2018-02-08 09:52:12 -08:00
Benedict Aas
dab1eece4c
feat: add icon next to drive on warnings (#2014)
We add an icon next to the drive size that is displayed when there is a
drive-image compatibility status message available. We display the first
one in the list and importance is then enforced by the order they are
added to the list in `drive-constraints`.

Change-Type: patch
Changelog-Entry: Add icon next to drive size when compatibility warnings exist.
2018-02-08 16:43:34 +00:00