fix(portal): Reload client on updates (#6614)

This commit is contained in:
Andrew Dryga
2024-09-05 18:45:39 -07:00
committed by GitHub
parent cff525f68d
commit f4f2b45d2b

View File

@@ -76,6 +76,7 @@ defmodule API.Client.Channel do
:ok = Resources.subscribe_to_events_for_resource(resource)
end)
# Subscribe for known gateway group names so that if they are updated - we can render change in the UI
:ok =
resources
|> Enum.flat_map(& &1.gateway_groups)
@@ -152,6 +153,7 @@ defmodule API.Client.Channel do
OpenTelemetry.Tracer.set_current_span(socket.assigns.opentelemetry_span_ctx)
OpenTelemetry.Tracer.with_span "client.updated" do
socket = assign(socket, client: Clients.fetch_client_by_id!(socket.assigns.client.id))
:ok = init(socket)
{:noreply, socket}
end