mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-11-12 07:01:40 +08:00
Update Team connection status in real-time
This commit is contained in:
parent
a252a492dd
commit
1c582d69be
1 changed files with 5 additions and 3 deletions
|
|
@ -21,6 +21,7 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do
|
||||||
secret_name = assigns.params["secret_name"]
|
secret_name = assigns.params["secret_name"]
|
||||||
file_system_id = assigns.params["file_system_id"]
|
file_system_id = assigns.params["file_system_id"]
|
||||||
default? = default_hub?(assigns.hub)
|
default? = default_hub?(assigns.hub)
|
||||||
|
connection_status = Provider.connection_status(assigns.hub)
|
||||||
|
|
||||||
secret_value =
|
secret_value =
|
||||||
if assigns.live_action == :edit_secret do
|
if assigns.live_action == :edit_secret do
|
||||||
|
|
@ -50,7 +51,8 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do
|
||||||
secret_name: secret_name,
|
secret_name: secret_name,
|
||||||
secret_value: secret_value,
|
secret_value: secret_value,
|
||||||
hub_metadata: Provider.to_metadata(assigns.hub),
|
hub_metadata: Provider.to_metadata(assigns.hub),
|
||||||
default?: default?
|
default?: default?,
|
||||||
|
connection_status: connection_status
|
||||||
)
|
)
|
||||||
|> assign_form(changeset)}
|
|> assign_form(changeset)}
|
||||||
end
|
end
|
||||||
|
|
@ -59,8 +61,8 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do
|
||||||
def render(assigns) do
|
def render(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<div>
|
<div>
|
||||||
<LayoutComponents.topbar :if={Provider.connection_status(@hub)} variant="warning">
|
<LayoutComponents.topbar :if={@connection_status} variant="warning">
|
||||||
{Provider.connection_status(@hub)}
|
{@connection_status}
|
||||||
</LayoutComponents.topbar>
|
</LayoutComponents.topbar>
|
||||||
|
|
||||||
<LayoutComponents.topbar :if={@hub.billing_status.type == :trialing} variant="warning">
|
<LayoutComponents.topbar :if={@hub.billing_status.type == :trialing} variant="warning">
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue