mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-06 13:04:53 +08:00
Improve ZTA experience
This commit is contained in:
parent
8d15d5e93c
commit
096ac829e8
2 changed files with 15 additions and 7 deletions
|
@ -21,8 +21,15 @@ defmodule Livebook.Teams.DeploymentGroup do
|
|||
end
|
||||
|
||||
def changeset(deployment_group, attrs \\ %{}) do
|
||||
deployment_group
|
||||
|> cast(attrs, [:id, :name, :mode, :hub_id, :clustering, :zta_provider, :zta_key])
|
||||
|> validate_required([:name, :mode])
|
||||
changeset =
|
||||
deployment_group
|
||||
|> cast(attrs, [:id, :name, :mode, :hub_id, :clustering, :zta_provider, :zta_key])
|
||||
|> validate_required([:name, :mode])
|
||||
|
||||
if get_field(changeset, :zta_provider) do
|
||||
validate_required(changeset, [:zta_key])
|
||||
else
|
||||
changeset
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -91,7 +91,7 @@ defmodule LivebookWeb.AppComponents do
|
|||
|
||||
def deployment_group_form_content(assigns) do
|
||||
~H"""
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-3">
|
||||
<div>
|
||||
<div class="flex flex-col">
|
||||
<.select_field
|
||||
label="Clustering"
|
||||
|
@ -137,9 +137,10 @@ defmodule LivebookWeb.AppComponents do
|
|||
field={@form[:zta_provider]}
|
||||
help={
|
||||
~S'''
|
||||
Enable this option if you want
|
||||
to deploy your notebooks behind
|
||||
an authentication proxy
|
||||
Enable this option to generate
|
||||
Livebook Dockerfiles with proxy
|
||||
authentication for deployed
|
||||
notebooks
|
||||
'''
|
||||
}
|
||||
prompt="None"
|
||||
|
|
Loading…
Add table
Reference in a new issue