Remove URL field from shared deployment group settings

This commit is contained in:
José Valim 2024-09-05 09:02:55 +02:00
parent 6f4c9bb3b6
commit fd628f2fb3
4 changed files with 17 additions and 17 deletions

View file

@ -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

View file

@ -93,20 +93,6 @@ defmodule LivebookWeb.AppComponents do
~H"""
<div>
<div class="flex flex-col gap-4">
<.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]}
/>
<div>
<.select_field
label="Clustering"

View file

@ -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} />
<LivebookWeb.AppComponents.deployment_group_form_content hub={@hub} form={@form} />

View file

@ -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}