Revert some changes

This commit is contained in:
Alexandre de Souza 2025-09-10 17:34:06 -03:00
parent f3f86e904f
commit fe2dda96f8
No known key found for this signature in database
GPG key ID: E39228FFBA346545
5 changed files with 5 additions and 10 deletions

View file

@ -93,7 +93,7 @@ defmodule Livebook.FileSystem.S3 do
If the credentials are not specified by the file system, they are If the credentials are not specified by the file system, they are
fetched from environment variables or AWS instance if applicable. fetched from environment variables or AWS instance if applicable.
""" """
@spec credentials(t()) :: credentials() @spec credentials(S3.t()) :: S3.credentials()
def credentials(%__MODULE__{} = file_system) do def credentials(%__MODULE__{} = file_system) do
case {file_system.access_key_id, file_system.secret_access_key} do case {file_system.access_key_id, file_system.secret_access_key} do
{nil, nil} -> {nil, nil} ->

View file

@ -230,7 +230,7 @@ defmodule Livebook.Teams do
@doc """ @doc """
Gets a list of environment variables for a given Hub. Gets a list of environment variables for a given Hub.
""" """
@spec get_environment_variables(Team.t()) :: list(Teams.EnvironmentVariable.t()) @spec get_environment_variables(Team.t()) :: list(Teams.Agent.t())
def get_environment_variables(team) do def get_environment_variables(team) do
TeamClient.get_environment_variables(team.id) TeamClient.get_environment_variables(team.id)
end end

View file

@ -87,7 +87,6 @@ defmodule Livebook.ZTA.LivebookTeams do
|> put_status(:bad_request) |> put_status(:bad_request)
|> delete_session(:teams_error) |> delete_session(:teams_error)
|> put_view(LivebookWeb.ErrorHTML) |> put_view(LivebookWeb.ErrorHTML)
|> put_root_layout(false)
|> render("400.html", %{status: 400}) |> render("400.html", %{status: 400})
|> halt(), nil} |> halt(), nil}
@ -96,7 +95,6 @@ defmodule Livebook.ZTA.LivebookTeams do
|> put_status(:forbidden) |> put_status(:forbidden)
|> delete_session(:teams_failed_reason) |> delete_session(:teams_failed_reason)
|> put_view(LivebookWeb.ErrorHTML) |> put_view(LivebookWeb.ErrorHTML)
|> put_root_layout(false)
|> render("error.html", %{ |> render("error.html", %{
status: 403, status: 403,
details: "Failed to authenticate with Livebook Teams: #{reason}" details: "Failed to authenticate with Livebook Teams: #{reason}"

View file

@ -21,7 +21,6 @@ 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
@ -51,8 +50,7 @@ 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
@ -61,8 +59,8 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do
def render(assigns) do def render(assigns) do
~H""" ~H"""
<div> <div>
<LayoutComponents.topbar :if={@connection_status} variant="warning"> <LayoutComponents.topbar :if={Provider.connection_status(@hub)} variant="warning">
{@connection_status} {Provider.connection_status(@hub)}
</LayoutComponents.topbar> </LayoutComponents.topbar>
<LayoutComponents.topbar :if={@hub.billing_status.type == :trialing} variant="warning"> <LayoutComponents.topbar :if={@hub.billing_status.type == :trialing} variant="warning">

View file

@ -53,7 +53,6 @@ defmodule LivebookWeb.UserPlug do
conn conn
|> put_status(:forbidden) |> put_status(:forbidden)
|> put_view(LivebookWeb.ErrorHTML) |> put_view(LivebookWeb.ErrorHTML)
|> put_root_layout(false)
|> render("403.html", %{status: 403}) |> render("403.html", %{status: 403})
|> halt() |> halt()
end end