From 50afcf2b600ef835d5e4211b90bc12d55506db3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 24 Jun 2024 22:34:09 +0200 Subject: [PATCH] Trim down descriptions (#2673) --- .../teams/deployment_group_agent_component.ex | 34 ++++++++----------- .../live/session_live/app_teams_live.ex | 20 ++++++----- 2 files changed, 25 insertions(+), 29 deletions(-) diff --git a/lib/livebook_web/live/hub/teams/deployment_group_agent_component.ex b/lib/livebook_web/live/hub/teams/deployment_group_agent_component.ex index 493a69e40..fce1a66df 100644 --- a/lib/livebook_web/live/hub/teams/deployment_group_agent_component.ex +++ b/lib/livebook_web/live/hub/teams/deployment_group_agent_component.ex @@ -45,16 +45,9 @@ defmodule LivebookWeb.Hub.Teams.DeploymentGroupAgentComponent do App server setup -

- App server is an instance of Livebook where you can deploy Livebook - apps via Livebook Teams. Each app server belongs to a specific - deployment group. -

- -

- Use the instructions below to set up an instance in your own infrastructure. - Once the instance is running, it will connect to Livebook Teams and become - available for app deployments. +

+ App servers are instances of Livebook running inside your infrastructure + that you deploy your apps to. Follow the instructions below to start new instances.

@@ -63,8 +56,17 @@ defmodule LivebookWeb.Hub.Teams.DeploymentGroupAgentComponent do
+ <.form :let={f} for={@changeset} as={:data} phx-change="validate" phx-target={@myself}> + <.radio_field + label="Base Docker image" + field={f[:docker_tag]} + options={LivebookWeb.AppComponents.docker_tag_options()} + /> + + <.form :let={f} + :if={match?([_, _ | _], @deployment_group.agent_keys)} for={%{"id" => @agent_key_id}} as={:agent_key} phx-change="select_agent_key" @@ -83,16 +85,8 @@ defmodule LivebookWeb.Hub.Teams.DeploymentGroupAgentComponent do - <.form :let={f} for={@changeset} as={:data} phx-change="validate" phx-target={@myself}> - <.radio_field - label="Base image" - field={f[:docker_tag]} - options={LivebookWeb.AppComponents.docker_tag_options()} - /> - - <%= if @agent_key_id do %> -
+
<.tabs id="deployment-instruction" default="docker"> <:tab id="docker" label="Docker">
@@ -117,7 +111,7 @@ defmodule LivebookWeb.Hub.Teams.DeploymentGroupAgentComponent do <:tab id="fly_io" label="Fly.io">

- Deploy an app server to Fly.io with a few simple commands. + Deploy an app server to Fly.io with a few commands.

diff --git a/lib/livebook_web/live/session_live/app_teams_live.ex b/lib/livebook_web/live/session_live/app_teams_live.ex index 5320b386c..b4f7a7b0b 100644 --- a/lib/livebook_web/live/session_live/app_teams_live.ex +++ b/lib/livebook_web/live/session_live/app_teams_live.ex @@ -152,8 +152,8 @@ defmodule LivebookWeb.SessionLive.AppTeamsLive do <% else %> <.message_box kind={:info}> - Awaiting an app server to be set up. If you deploy the app, - it will only start once there is an app server to run it. + Awaiting an app server to be set up. If you click "Deploy anyway", + the app will only start once there is an app server. <% end %>
@@ -180,15 +180,14 @@ defmodule LivebookWeb.SessionLive.AppTeamsLive do ~H"""

- Deploy this app to your cloud infrastructure. The app will be pushed to the Livebook - Teams app servers associated with the deployment group that you choose. + Deploy this app to your cloud infrastructure using the <.workspace hub={@hub} /> workspace.

<%= if @deployment_group do %>

- Using deployment group in <.workspace hub={@hub} /> workspace: + Deploying to:

-

Currently deployed version:

+

Current version:

<.app_deployment_card app_deployment={@app_deployment} />
<.message_box :if={@num_agents[@deployment_group.id] == nil} kind={:warning}> - The selected deployment group has no app servers. If you deploy the app, - it will only start once there is an app server to run it. + The selected deployment group has no app servers. If you click "Deploy anyway", + the app will only start once there is an app server. <%= if @num_agents[@deployment_group.id] do %> @@ -243,7 +242,7 @@ defmodule LivebookWeb.SessionLive.AppTeamsLive do

- Online deployment groups in <.workspace hub={@hub} /> workspace: + Choose a deployment group:

<.deployment_group_entry @@ -341,6 +340,9 @@ defmodule LivebookWeb.SessionLive.AppTeamsLive do defp app_deployment_card(assigns) do ~H"""
+ <.labeled_text label="Slug"> + /<%= @app_deployment.slug %> + <.labeled_text label="Title"> <%= @app_deployment.title %>