mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-07 11:23:36 +00:00
3ce666b165
Prior to this commit, `Console` would only be rendered when Embark's API returns
at least one registered process from `/embark-api/processes`.
`Console` itself would then add another processes "embark" resulting in two tabs
with console output. This used to work fine because Embark always registered
at least a blockchain process.
In cd934f8157
however, this has changed.
With Ganache being the default blockchain, there's no longer a processes registered for this
service, resulting in an empty list for `processes` inside Cockpit, causing `Console` not to render
at all. Which also means the `embark` process logs aren't rendered either.
This commit removes the requirement of `processes` being non-empty so that embark process
logs are always shown.
It also fixes `Console` to updates its own `processes` state when its properties change.
This is needed because it's no longer guarded by `DataWrapper`, which previously ensured
`Console` is only rendered when there are processes.
Kudos to @jrainville for helping me cracking this nut.