From fd628f2fb3c5a3270b7da4bddb5cfc39192742ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 5 Sep 2024 09:02:55 +0200 Subject: [PATCH] Remove URL field from shared deployment group settings --- lib/livebook/hubs/dockerfile.ex | 4 ++-- lib/livebook_web/components/app_components.ex | 14 -------------- .../hub/teams/deployment_group_form_component.ex | 14 ++++++++++++++ test/livebook/hubs/dockerfile_test.exs | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/livebook/hubs/dockerfile.ex b/lib/livebook/hubs/dockerfile.ex index 3bea1fbef..614ac22a8 100644 --- a/lib/livebook/hubs/dockerfile.ex +++ b/lib/livebook/hubs/dockerfile.ex @@ -442,8 +442,8 @@ defmodule Livebook.Hubs.Dockerfile do defp config_warnings(config) do [ if config.clustering == nil do - "The deployment is not configured for clustering. Make sure to run only one instance" <> - " of Livebook, or configure clustering." + "Clustering has not been configured for this deployment. " <> + "You must either configure it below or make sure to run only one instance of this server." end ] end diff --git a/lib/livebook_web/components/app_components.ex b/lib/livebook_web/components/app_components.ex index 866319d69..54c1202c8 100644 --- a/lib/livebook_web/components/app_components.ex +++ b/lib/livebook_web/components/app_components.ex @@ -93,20 +93,6 @@ defmodule LivebookWeb.AppComponents do ~H"""
- <.text_field - label="URL" - help={ - ~S''' - If you provide the URL you - will host your instances at, - Livebook will use it to - generate direct links - throughout its interface - ''' - } - field={@form[:url]} - /> -
<.select_field label="Clustering" diff --git a/lib/livebook_web/live/hub/teams/deployment_group_form_component.ex b/lib/livebook_web/live/hub/teams/deployment_group_form_component.ex index fd8cc23d4..0d0866600 100644 --- a/lib/livebook_web/live/hub/teams/deployment_group_form_component.ex +++ b/lib/livebook_web/live/hub/teams/deployment_group_form_component.ex @@ -92,6 +92,20 @@ defmodule LivebookWeb.Hub.Teams.DeploymentGroupFormComponent do phx-debounce /> + <.text_field + label="URL" + help={ + ~S''' + If you provide the URL you + will host your instances at, + Livebook will use it to + generate direct links + throughout its interface + ''' + } + field={@form[:url]} + /> + <.hidden_field field={@form[:hub_id]} value={@hub.id} /> diff --git a/test/livebook/hubs/dockerfile_test.exs b/test/livebook/hubs/dockerfile_test.exs index 2ae1c0d10..c2a749df2 100644 --- a/test/livebook/hubs/dockerfile_test.exs +++ b/test/livebook/hubs/dockerfile_test.exs @@ -385,7 +385,7 @@ defmodule Livebook.Hubs.DockerfileTest do app_settings = Livebook.Notebook.AppSettings.new() assert [warning] = Dockerfile.airgapped_warnings(config, hub, [], [], app_settings, [], %{}) - assert warning =~ "The deployment is not configured for clustering" + assert warning =~ "Clustering has not been configured for this deployment" config = %{config | clustering: :auto}