From fe2dda96f87b501f518882b9bfced567a3b6db61 Mon Sep 17 00:00:00 2001 From: Alexandre de Souza Date: Wed, 10 Sep 2025 17:34:06 -0300 Subject: [PATCH] Revert some changes --- lib/livebook/file_system/s3.ex | 2 +- lib/livebook/teams.ex | 2 +- lib/livebook/zta/livebook_teams.ex | 2 -- lib/livebook_web/live/hub/edit/team_component.ex | 8 +++----- lib/livebook_web/plugs/user_plug.ex | 1 - 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/livebook/file_system/s3.ex b/lib/livebook/file_system/s3.ex index 19de36d3a..8934fe1d3 100644 --- a/lib/livebook/file_system/s3.ex +++ b/lib/livebook/file_system/s3.ex @@ -93,7 +93,7 @@ defmodule Livebook.FileSystem.S3 do If the credentials are not specified by the file system, they are 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 case {file_system.access_key_id, file_system.secret_access_key} do {nil, nil} -> diff --git a/lib/livebook/teams.ex b/lib/livebook/teams.ex index 570f72d70..717903dd3 100644 --- a/lib/livebook/teams.ex +++ b/lib/livebook/teams.ex @@ -230,7 +230,7 @@ defmodule Livebook.Teams do @doc """ 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 TeamClient.get_environment_variables(team.id) end diff --git a/lib/livebook/zta/livebook_teams.ex b/lib/livebook/zta/livebook_teams.ex index 968f471ec..6dd2117ef 100644 --- a/lib/livebook/zta/livebook_teams.ex +++ b/lib/livebook/zta/livebook_teams.ex @@ -87,7 +87,6 @@ defmodule Livebook.ZTA.LivebookTeams do |> put_status(:bad_request) |> delete_session(:teams_error) |> put_view(LivebookWeb.ErrorHTML) - |> put_root_layout(false) |> render("400.html", %{status: 400}) |> halt(), nil} @@ -96,7 +95,6 @@ defmodule Livebook.ZTA.LivebookTeams do |> put_status(:forbidden) |> delete_session(:teams_failed_reason) |> put_view(LivebookWeb.ErrorHTML) - |> put_root_layout(false) |> render("error.html", %{ status: 403, details: "Failed to authenticate with Livebook Teams: #{reason}" diff --git a/lib/livebook_web/live/hub/edit/team_component.ex b/lib/livebook_web/live/hub/edit/team_component.ex index 74b466ee4..42c4f535e 100644 --- a/lib/livebook_web/live/hub/edit/team_component.ex +++ b/lib/livebook_web/live/hub/edit/team_component.ex @@ -21,7 +21,6 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do secret_name = assigns.params["secret_name"] file_system_id = assigns.params["file_system_id"] default? = default_hub?(assigns.hub) - connection_status = Provider.connection_status(assigns.hub) secret_value = if assigns.live_action == :edit_secret do @@ -51,8 +50,7 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do secret_name: secret_name, secret_value: secret_value, hub_metadata: Provider.to_metadata(assigns.hub), - default?: default?, - connection_status: connection_status + default?: default? ) |> assign_form(changeset)} end @@ -61,8 +59,8 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do def render(assigns) do ~H"""
- - {@connection_status} + + {Provider.connection_status(@hub)} diff --git a/lib/livebook_web/plugs/user_plug.ex b/lib/livebook_web/plugs/user_plug.ex index f46dd1adf..38c3e7d27 100644 --- a/lib/livebook_web/plugs/user_plug.ex +++ b/lib/livebook_web/plugs/user_plug.ex @@ -53,7 +53,6 @@ defmodule LivebookWeb.UserPlug do conn |> put_status(:forbidden) |> put_view(LivebookWeb.ErrorHTML) - |> put_root_layout(false) |> render("403.html", %{status: 403}) |> halt() end