Migrate from channel to phoenix live view.

Move phoenix config to ui project.
Sync progress on page load.
This commit is contained in:
Pim Kunis 2019-10-23 14:38:11 +02:00
parent e888f1330b
commit ad24ec96ac
26 changed files with 120 additions and 164 deletions

View file

@ -9,33 +9,8 @@ defmodule Firmware.Application do
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: Firmware.Supervisor]
children =
[
# Children for all targets
# Starts a worker by calling: Firmware.Worker.start_link(arg)
# {Firmware.Worker, arg},
] ++ children(target())
children = []
Supervisor.start_link(children, opts)
end
# List all child processes to be supervised
def children(:host) do
{:ok, _} = Node.start(:"host@0.0.0.0")
Node.set_cookie(:tastycookie)
true = Node.connect(:"esrom@esrom.lan")
[]
end
def children(_target) do
[
# Children for all targets except host
# Starts a worker by calling: Firmware.Worker.start_link(arg)
# {Firmware.Worker, arg},
]
end
def target() do
Application.get_env(:firmware, :target)
end
end