diff --git a/lib/nerves_hub/devices.ex b/lib/nerves_hub/devices.ex index bef55a894..d3e38a4e0 100644 --- a/lib/nerves_hub/devices.ex +++ b/lib/nerves_hub/devices.ex @@ -28,6 +28,7 @@ defmodule NervesHub.Devices do alias NervesHub.Products.Product alias NervesHub.Repo alias NervesHub.TaskSupervisor, as: Tasks + alias NervesHubWeb.Endpoint @min_fwup_delta_updatable_version ">=1.10.0" @@ -1086,7 +1087,7 @@ defmodule NervesHub.Devices do |> Repo.transaction() |> case do {:ok, %{move: updated}} -> - _ = broadcast(updated, "moved") + _ = Endpoint.broadcast("device_socket:#{updated.id}", "disconnect", %{}) {:ok, updated} err -> diff --git a/lib/nerves_hub_web/channels/device_channel.ex b/lib/nerves_hub_web/channels/device_channel.ex index b0efab8da..45c23b52a 100644 --- a/lib/nerves_hub_web/channels/device_channel.ex +++ b/lib/nerves_hub_web/channels/device_channel.ex @@ -48,11 +48,6 @@ defmodule NervesHubWeb.DeviceChannel do subscribe("device:#{device.id}") subscribe(deployment_channel) - if device_health_check_enabled?() do - send(self(), :health_check) - schedule_health_check() - end - send(self(), :device_registration) socket = @@ -480,14 +475,5 @@ defmodule NervesHubWeb.DeviceChannel do socket end - defp schedule_health_check() do - if device_health_check_enabled?() do - Process.send_after(self(), :health_check, device_health_check_interval()) - :ok - else - :ok - end - end - defp is_safe_to_request_extensions?(version), do: Version.match?(version, ">= 2.2.0") end diff --git a/lib/nerves_hub_web/live/devices/show.html.heex b/lib/nerves_hub_web/live/devices/show.html.heex index 62a431d25..4ecaa64b1 100644 --- a/lib/nerves_hub_web/live/devices/show.html.heex +++ b/lib/nerves_hub_web/live/devices/show.html.heex @@ -67,6 +67,17 @@ Device has disabled extensions: <%= Enum.join(@extension_overrides, ", ") %> + <%= if reason = @device.deployment_conflict do %> +
No Tags