Skip to content

Commit 16a73b4

Browse files
author
Taras Tyshko
committed
resolve missing comments
1 parent 911fd2d commit 16a73b4

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

lib/nerves_hub/devices.ex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ defmodule NervesHub.Devices do
3434
alias NervesHub.Products.Product
3535
alias NervesHub.Repo
3636
alias NervesHub.TaskSupervisor, as: Tasks
37-
alias Phoenix.Channel.Server
37+
alias Phoenix.Channel.Server, as: ChannelServer
3838

3939
def get_device(device_id) when is_integer(device_id) do
4040
Repo.get(Device, device_id)
@@ -997,7 +997,7 @@ defmodule NervesHub.Devices do
997997
}
998998

999999
topic = "orchestrator:deployment:#{device.deployment_id}"
1000-
_ = Server.broadcast(NervesHub.PubSub, topic, "device-online", payload)
1000+
_ = ChannelServer.broadcast(NervesHub.PubSub, topic, "device-online", payload)
10011001

10021002
:ok
10031003
end
@@ -1008,7 +1008,7 @@ defmodule NervesHub.Devices do
10081008

10091009
def deployment_device_updated(device) do
10101010
topic = "orchestrator:deployment:#{device.deployment_id}"
1011-
_ = Server.broadcast(NervesHub.PubSub, topic, "device-updated", %{})
1011+
_ = ChannelServer.broadcast(NervesHub.PubSub, topic, "device-updated", %{})
10121012

10131013
:ok
10141014
end
@@ -1151,7 +1151,7 @@ defmodule NervesHub.Devices do
11511151
_ =
11521152
if device.deployment_id do
11531153
topic = "orchestrator:deployment:#{device.deployment_id}"
1154-
Server.broadcast(NervesHub.PubSub, topic, "device-updated", %{})
1154+
ChannelServer.broadcast(NervesHub.PubSub, topic, "device-updated", %{})
11551155
end
11561156

11571157
result
@@ -1628,7 +1628,7 @@ defmodule NervesHub.Devices do
16281628
payload = %{inflight_update: inflight_update, update_payload: update_payload}
16291629

16301630
topic = "device:#{device_id}"
1631-
_ = Server.broadcast(NervesHub.PubSub, topic, "update-scheduled", payload)
1631+
_ = ChannelServer.broadcast(NervesHub.PubSub, topic, "update-scheduled", payload)
16321632

16331633
:ok
16341634
end

lib/nerves_hub_web/components/core_components.ex

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ defmodule NervesHubWeb.CoreComponents do
1818

1919
import NervesHubWeb.Components.Icons
2020

21-
alias Phoenix.HTML.Form, as: HTMLForm
21+
alias Phoenix.HTML
2222

2323
alias Phoenix.LiveView.JS
2424

@@ -331,7 +331,7 @@ defmodule NervesHubWeb.CoreComponents do
331331
range radio search select tel text textarea time url week)
332332
)
333333

334-
attr(:field, Phoenix.HTML.FormField,
334+
attr(:field, HTML.FormField,
335335
doc: "a form field struct retrieved from the form, for example: @form[:email]"
336336
)
337337

@@ -351,7 +351,7 @@ defmodule NervesHubWeb.CoreComponents do
351351
slot(:inner_block)
352352
slot(:rich_hint)
353353

354-
def input(%{field: %Phoenix.HTML.FormField{} = field} = assigns) do
354+
def input(%{field: %HTML.FormField{} = field} = assigns) do
355355
assigns
356356
|> assign(field: nil, id: assigns.id || field.id)
357357
|> assign(:errors, Enum.map(field.errors, &translate_error(&1)))
@@ -363,7 +363,7 @@ defmodule NervesHubWeb.CoreComponents do
363363
def input(%{type: "checkbox"} = assigns) do
364364
assigns =
365365
assign_new(assigns, :checked, fn ->
366-
HTMLForm.normalize_value("checkbox", assigns[:value])
366+
HTML.Form.normalize_value("checkbox", assigns[:value])
367367
end)
368368

369369
~H"""
@@ -393,7 +393,7 @@ defmodule NervesHubWeb.CoreComponents do
393393
{@rest}
394394
>
395395
<option :if={@prompt} value="">{@prompt}</option>
396-
{HTMLForm.options_for_select(@options, @value)}
396+
{HTML.Form.options_for_select(@options, @value)}
397397
</select>
398398
<div :if={assigns[:hint] || assigns[:rich_hint]} class="text-xs text-zinc-400">
399399
{assigns[:hint] || render_slot(assigns[:rich_hint])}
@@ -417,7 +417,7 @@ defmodule NervesHubWeb.CoreComponents do
417417
@errors != [] && "border-red-500 focus:border-red-500"
418418
]}
419419
{@rest}
420-
><%= HTMLForm.normalize_value("textarea", @value) %></textarea>
420+
><%= HTML.Form.normalize_value("textarea", @value) %></textarea>
421421
<div :if={assigns[:hint] || assigns[:rich_hint]} class="flex flex-col gap-1 text-xs text-zinc-400 pt-1">
422422
{assigns[:hint] || render_slot(assigns[:rich_hint])}
423423
</div>
@@ -436,7 +436,7 @@ defmodule NervesHubWeb.CoreComponents do
436436
type={@type}
437437
name={@name}
438438
id={@id}
439-
value={HTMLForm.normalize_value(@type, @value)}
439+
value={HTML.Form.normalize_value(@type, @value)}
440440
class={[
441441
"mt-2 py-1.5 px-2 block w-full rounded text-zinc-400 bg-zinc-900 focus:ring-0 sm:text-sm",
442442
"phx-no-feedback:border-zinc-600 phx-no-feedback:focus:border-zinc-700",
@@ -465,7 +465,7 @@ defmodule NervesHubWeb.CoreComponents do
465465
type={@type}
466466
name={@name}
467467
id={@id}
468-
value={HTMLForm.normalize_value(@type, @value)}
468+
value={HTML.Form.normalize_value(@type, @value)}
469469
class={[
470470
"mt-2 py-1.5 px-2 block w-full rounded text-zinc-400 bg-zinc-900 focus:ring-0 sm:text-sm",
471471
"phx-no-feedback:border-zinc-600 phx-no-feedback:focus:border-zinc-700",

0 commit comments

Comments
 (0)