From ac96e4b8a100d7d4b3d7884bba43a5dd4d9f96bc Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Fri, 29 Nov 2024 14:12:54 +0100 Subject: [PATCH 1/4] Restrict teams features based on org status --- lib/livebook/hubs/team.ex | 1 + lib/livebook/hubs/team_client.ex | 27 ++++++++++++++++++- .../live/hub/edit/personal_component.ex | 2 ++ .../live/hub/edit/team_component.ex | 24 +++++++++++++++-- lib/livebook_web/live/hub/edit_live.ex | 5 ++++ .../live/hub/file_system_form_component.ex | 8 +++++- .../live/hub/file_system_list_component.ex | 6 ++++- .../live/hub/secret_form_component.ex | 2 +- .../lib/livebook_proto/agent_connected.pb.ex | 1 + proto/lib/livebook_proto/event.pb.ex | 2 ++ proto/lib/livebook_proto/org_updated.pb.ex | 6 +++++ proto/lib/livebook_proto/user_connected.pb.ex | 1 + proto/messages.proto | 8 ++++++ 13 files changed, 87 insertions(+), 6 deletions(-) create mode 100644 proto/lib/livebook_proto/org_updated.pb.ex diff --git a/lib/livebook/hubs/team.ex b/lib/livebook/hubs/team.ex index 83e5be63ec7a..47948c19f9f2 100644 --- a/lib/livebook/hubs/team.ex +++ b/lib/livebook/hubs/team.ex @@ -41,6 +41,7 @@ defmodule Livebook.Hubs.Team do field :session_token, :string, redact: true field :hub_name, :string field :hub_emoji, :string + field :active, :boolean, default: true embeds_one :offline, Offline end diff --git a/lib/livebook/hubs/team_client.ex b/lib/livebook/hubs/team_client.ex index c58373bdf04f..eb28bdf8ca17 100644 --- a/lib/livebook/hubs/team_client.ex +++ b/lib/livebook/hubs/team_client.ex @@ -641,6 +641,7 @@ defmodule Livebook.Hubs.TeamClient do defp handle_event(:user_connected, user_connected, state) do state + |> update_hub(user_connected) |> dispatch_secrets(user_connected) |> dispatch_file_systems(user_connected) |> dispatch_deployment_groups(user_connected) @@ -728,6 +729,10 @@ defmodule Livebook.Hubs.TeamClient do state end + defp handle_event(:org_updated, org_updated, state) do + update_hub(state, org_updated) + end + defp dispatch_secrets(state, %{secrets: secrets}) do decrypted_secrets = Enum.map(secrets, &build_secret(state, &1)) @@ -796,7 +801,27 @@ defmodule Livebook.Hubs.TeamClient do state end - defp update_hub(state, %{public_key: org_public_key}) do + defp update_hub(state, %LivebookProto.UserConnected{org_active: active}) do + hub = %{state.hub | active: active} + + if Livebook.Hubs.hub_exists?(hub.id) do + Hubs.save_hub(hub) + end + + %{state | hub: hub} + end + + defp update_hub(state, %LivebookProto.OrgUpdated{active: active}) do + hub = %{state.hub | active: active} + + if Livebook.Hubs.hub_exists?(hub.id) do + Hubs.save_hub(hub) + end + + %{state | hub: hub} + end + + defp update_hub(state, %LivebookProto.AgentConnected{public_key: org_public_key}) do hub = %{state.hub | org_public_key: org_public_key} if Livebook.Hubs.hub_exists?(hub.id) do diff --git a/lib/livebook_web/live/hub/edit/personal_component.ex b/lib/livebook_web/live/hub/edit/personal_component.ex index dde1164e96b0..1e309e728ce9 100644 --- a/lib/livebook_web/live/hub/edit/personal_component.ex +++ b/lib/livebook_web/live/hub/edit/personal_component.ex @@ -123,6 +123,7 @@ defmodule LivebookWeb.Hub.Edit.PersonalComponent do id="hub-file-systems-list" hub_id={@hub.id} file_systems={@file_systems} + disabled={false} /> @@ -195,6 +196,7 @@ defmodule LivebookWeb.Hub.Edit.PersonalComponent do hub={@hub} secret_name={@secret_name} secret_value={@secret_value} + disabled={false} return_to={~p"/hub/#{@hub.id}"} /> diff --git a/lib/livebook_web/live/hub/edit/team_component.ex b/lib/livebook_web/live/hub/edit/team_component.ex index 2e4fc38635f2..ce5f18ae528d 100644 --- a/lib/livebook_web/live/hub/edit/team_component.ex +++ b/lib/livebook_web/live/hub/edit/team_component.ex @@ -63,6 +63,15 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do {Provider.connection_status(@hub)} + +

+ Workspace disabled: your organization doesn't have an active subscription. Please contact your <.link + href={org_url(@hub, "/users")} + class="underline" + >org's admin. +

+
+
@@ -176,10 +185,15 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do secrets={@secrets} edit_path={"hub/#{@hub.id}/secrets/edit"} return_to={~p"/hub/#{@hub.id}"} + disabled={not @hub.active} />
- <.button patch={~p"/hub/#{@hub.id}/secrets/new"} id="add-secret"> + <.button + patch={~p"/hub/#{@hub.id}/secrets/new"} + id="add-secret" + disabled={not @hub.active} + > Add secret
@@ -200,6 +214,7 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do hub_id={@hub.id} file_systems={@file_systems} target={@myself} + disabled={not @hub.active} />
@@ -233,7 +248,11 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do
- <.button patch={~p"/hub/#{@hub.id}/groups/new"} id="add-deployment-group"> + <.button + patch={~p"/hub/#{@hub.id}/groups/new"} + id="add-deployment-group" + disabled={not @hub.active} + > Add deployment group
@@ -289,6 +308,7 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do secret_name={@secret_name} secret_value={@secret_value} return_to={~p"/hub/#{@hub.id}"} + disabled={not @hub.active} /> diff --git a/lib/livebook_web/live/hub/edit_live.ex b/lib/livebook_web/live/hub/edit_live.ex index fc99e48ce4e4..6768f216115e 100644 --- a/lib/livebook_web/live/hub/edit_live.ex +++ b/lib/livebook_web/live/hub/edit_live.ex @@ -11,6 +11,7 @@ defmodule LivebookWeb.Hub.EditLive do def mount(_params, _session, socket) do if connected?(socket) do Hubs.Broadcasts.subscribe([:connection]) + Livebook.Teams.Broadcasts.subscribe([:deployment_groups, :app_deployments, :agents]) end @@ -111,6 +112,10 @@ defmodule LivebookWeb.Hub.EditLive do {:noreply, load_hub(socket, id)} end + def handle_info({:hub_changed, id}, %{assigns: %{hub: %{id: id}}} = socket) do + {:noreply, load_hub(socket, id)} + end + def handle_info(_message, socket) do {:noreply, socket} end diff --git a/lib/livebook_web/live/hub/file_system_form_component.ex b/lib/livebook_web/live/hub/file_system_form_component.ex index 47693f5e1759..d1866cffd922 100644 --- a/lib/livebook_web/live/hub/file_system_form_component.ex +++ b/lib/livebook_web/live/hub/file_system_form_component.ex @@ -88,7 +88,13 @@ defmodule LivebookWeb.Hub.FileSystemFormComponent do

<% end %>
- <.button type="submit" disabled={not @changeset.valid?}> + <.button + type="submit" + disabled={ + not @changeset.valid? or + match?(%Livebook.Hubs.Team{active: false}, @hub) + } + > <.remix_icon icon={@button.icon} /> {@button.label} diff --git a/lib/livebook_web/live/hub/file_system_list_component.ex b/lib/livebook_web/live/hub/file_system_list_component.ex index e732e81be89e..5f278878fd25 100644 --- a/lib/livebook_web/live/hub/file_system_list_component.ex +++ b/lib/livebook_web/live/hub/file_system_list_component.ex @@ -60,7 +60,11 @@ defmodule LivebookWeb.Hub.FileSystemListComponent do
- <.button patch={~p"/hub/#{@hub_id}/file-systems/new"} id="add-file-system"> + <.button + patch={~p"/hub/#{@hub_id}/file-systems/new"} + id="add-file-system" + disabled={@disabled} + > Add file storage
diff --git a/lib/livebook_web/live/hub/secret_form_component.ex b/lib/livebook_web/live/hub/secret_form_component.ex index dd99f34f69c2..50f0bfbc79f2 100644 --- a/lib/livebook_web/live/hub/secret_form_component.ex +++ b/lib/livebook_web/live/hub/secret_form_component.ex @@ -75,7 +75,7 @@ defmodule LivebookWeb.Hub.SecretFormComponent do <.hidden_field field={f[:hub_id]} value={@hub.id} /> <.hidden_field field={f[:deployment_group_id]} value={@deployment_group_id} />
- <.button type="submit" disabled={not @changeset.valid?}> + <.button type="submit" disabled={not @changeset.valid? or @disabled}> <.remix_icon icon={@button.icon} /> {@button.label} diff --git a/proto/lib/livebook_proto/agent_connected.pb.ex b/proto/lib/livebook_proto/agent_connected.pb.ex index 75234eb036a7..e6966633aeb5 100644 --- a/proto/lib/livebook_proto/agent_connected.pb.ex +++ b/proto/lib/livebook_proto/agent_connected.pb.ex @@ -18,4 +18,5 @@ defmodule LivebookProto.AgentConnected do json_name: "appDeployments" field :agents, 9, repeated: true, type: LivebookProto.Agent + field :org_active, 10, type: :bool, json_name: "orgActive" end diff --git a/proto/lib/livebook_proto/event.pb.ex b/proto/lib/livebook_proto/event.pb.ex index fe26e32e98de..5eb37e100f8e 100644 --- a/proto/lib/livebook_proto/event.pb.ex +++ b/proto/lib/livebook_proto/event.pb.ex @@ -71,4 +71,6 @@ defmodule LivebookProto.Event do type: LivebookProto.AppDeploymentStopped, json_name: "appDeploymentStopped", oneof: 0 + + field :org_updated, 17, type: LivebookProto.OrgUpdated, json_name: "orgUpdated", oneof: 0 end diff --git a/proto/lib/livebook_proto/org_updated.pb.ex b/proto/lib/livebook_proto/org_updated.pb.ex new file mode 100644 index 000000000000..3f767adbc883 --- /dev/null +++ b/proto/lib/livebook_proto/org_updated.pb.ex @@ -0,0 +1,6 @@ +defmodule LivebookProto.OrgUpdated do + use Protobuf, protoc_gen_elixir_version: "0.13.0", syntax: :proto3 + + field :id, 1, type: :string + field :active, 2, type: :bool +end diff --git a/proto/lib/livebook_proto/user_connected.pb.ex b/proto/lib/livebook_proto/user_connected.pb.ex index a91b7566905b..2734821bdc78 100644 --- a/proto/lib/livebook_proto/user_connected.pb.ex +++ b/proto/lib/livebook_proto/user_connected.pb.ex @@ -16,4 +16,5 @@ defmodule LivebookProto.UserConnected do json_name: "appDeployments" field :agents, 6, repeated: true, type: LivebookProto.Agent + field :org_active, 7, type: :bool, json_name: "orgActive" end diff --git a/proto/messages.proto b/proto/messages.proto index 081a73973219..39dbd9021c13 100644 --- a/proto/messages.proto +++ b/proto/messages.proto @@ -107,6 +107,7 @@ message UserConnected { repeated DeploymentGroup deployment_groups = 4; repeated AppDeployment app_deployments = 5; repeated Agent agents = 6; + bool org_active = 7; } message AgentConnected { @@ -118,6 +119,7 @@ message AgentConnected { repeated DeploymentGroup deployment_groups = 7; repeated AppDeployment app_deployments = 8; repeated Agent agents = 9; + bool org_active = 10; } message AppDeployment { @@ -154,6 +156,11 @@ message AgentLeft { string id = 1; } +message OrgUpdated { + string id = 1; + bool active = 2; +} + message Agent { string id = 1; string name = 2; @@ -207,5 +214,6 @@ message Event { AgentJoined agent_joined = 14; AgentLeft agent_left = 15; AppDeploymentStopped app_deployment_stopped = 16; + OrgUpdated org_updated = 17; } } From a6aad6ad08946449a56c461205de0cfe785bdfeb Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Tue, 17 Dec 2024 22:08:14 +0100 Subject: [PATCH 2/4] Add `@disabled` to `LivebookWeb.Hub.FileSystemFormComponent` --- lib/livebook_web/live/hub/edit/personal_component.ex | 1 + lib/livebook_web/live/hub/edit/team_component.ex | 1 + lib/livebook_web/live/hub/file_system_form_component.ex | 8 +------- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/livebook_web/live/hub/edit/personal_component.ex b/lib/livebook_web/live/hub/edit/personal_component.ex index 1e309e728ce9..5c1fabceecd5 100644 --- a/lib/livebook_web/live/hub/edit/personal_component.ex +++ b/lib/livebook_web/live/hub/edit/personal_component.ex @@ -212,6 +212,7 @@ defmodule LivebookWeb.Hub.Edit.PersonalComponent do module={LivebookWeb.Hub.FileSystemFormComponent} id="file-systems" hub={@hub} + disabled={false} file_system={@file_system} file_system_id={@file_system_id} return_to={~p"/hub/#{@hub.id}"} diff --git a/lib/livebook_web/live/hub/edit/team_component.ex b/lib/livebook_web/live/hub/edit/team_component.ex index ce5f18ae528d..6247396cf399 100644 --- a/lib/livebook_web/live/hub/edit/team_component.ex +++ b/lib/livebook_web/live/hub/edit/team_component.ex @@ -323,6 +323,7 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do module={LivebookWeb.Hub.FileSystemFormComponent} id="file-systems" hub={@hub} + disabled={not @hub.active} file_system={@file_system} file_system_id={@file_system_id} return_to={~p"/hub/#{@hub.id}"} diff --git a/lib/livebook_web/live/hub/file_system_form_component.ex b/lib/livebook_web/live/hub/file_system_form_component.ex index d1866cffd922..f5c6105e4a20 100644 --- a/lib/livebook_web/live/hub/file_system_form_component.ex +++ b/lib/livebook_web/live/hub/file_system_form_component.ex @@ -88,13 +88,7 @@ defmodule LivebookWeb.Hub.FileSystemFormComponent do

<% end %>
- <.button - type="submit" - disabled={ - not @changeset.valid? or - match?(%Livebook.Hubs.Team{active: false}, @hub) - } - > + <.button type="submit" disabled={@disabled or not @changeset.valid?}> <.remix_icon icon={@button.icon} /> {@button.label} From c324d38f714dc7fe8f871eae565b212ea2408f1e Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Wed, 18 Dec 2024 11:39:26 +0100 Subject: [PATCH 3/4] Remove some duplication --- lib/livebook/hubs/team_client.ex | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/lib/livebook/hubs/team_client.ex b/lib/livebook/hubs/team_client.ex index eb28bdf8ca17..df38a80ecccb 100644 --- a/lib/livebook/hubs/team_client.ex +++ b/lib/livebook/hubs/team_client.ex @@ -802,33 +802,25 @@ defmodule Livebook.Hubs.TeamClient do end defp update_hub(state, %LivebookProto.UserConnected{org_active: active}) do - hub = %{state.hub | active: active} - - if Livebook.Hubs.hub_exists?(hub.id) do - Hubs.save_hub(hub) - end - - %{state | hub: hub} + update_hub(state, &put_in(&1.active, active)) end defp update_hub(state, %LivebookProto.OrgUpdated{active: active}) do - hub = %{state.hub | active: active} - - if Livebook.Hubs.hub_exists?(hub.id) do - Hubs.save_hub(hub) - end - - %{state | hub: hub} + update_hub(state, &put_in(&1.active, active)) end defp update_hub(state, %LivebookProto.AgentConnected{public_key: org_public_key}) do - hub = %{state.hub | org_public_key: org_public_key} + update_hub(state, &put_in(&1.org_public_key, org_public_key)) + end + + defp update_hub(state, fun) when is_function(fun, 1) do + hub = fun.(state.hub) - if Livebook.Hubs.hub_exists?(hub.id) do + if Hubs.hub_exists?(hub.id) do Hubs.save_hub(hub) end - %{state | hub: hub} + put_in(state.hub, hub) end defp diff(old_list, new_list, fun, deleted_fun \\ nil, updated_fun \\ nil) do From 05045c7dc1f338f3256102f3e1638b99eb12198e Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Mon, 23 Dec 2024 13:12:01 +0100 Subject: [PATCH 4/4] Rename active to disabled --- lib/livebook/hubs/team.ex | 2 +- lib/livebook/hubs/team_client.ex | 8 ++++---- lib/livebook_web/live/hub/edit/team_component.ex | 14 +++++++------- lib/livebook_web/live/hub/secret_form_component.ex | 2 +- proto/lib/livebook_proto/agent_connected.pb.ex | 2 +- proto/lib/livebook_proto/org_updated.pb.ex | 2 +- proto/lib/livebook_proto/user_connected.pb.ex | 2 +- proto/messages.proto | 6 +++--- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lib/livebook/hubs/team.ex b/lib/livebook/hubs/team.ex index 47948c19f9f2..60df74655005 100644 --- a/lib/livebook/hubs/team.ex +++ b/lib/livebook/hubs/team.ex @@ -41,7 +41,7 @@ defmodule Livebook.Hubs.Team do field :session_token, :string, redact: true field :hub_name, :string field :hub_emoji, :string - field :active, :boolean, default: true + field :disabled, :boolean, default: false embeds_one :offline, Offline end diff --git a/lib/livebook/hubs/team_client.ex b/lib/livebook/hubs/team_client.ex index df38a80ecccb..f055a624d617 100644 --- a/lib/livebook/hubs/team_client.ex +++ b/lib/livebook/hubs/team_client.ex @@ -801,12 +801,12 @@ defmodule Livebook.Hubs.TeamClient do state end - defp update_hub(state, %LivebookProto.UserConnected{org_active: active}) do - update_hub(state, &put_in(&1.active, active)) + defp update_hub(state, %LivebookProto.UserConnected{org_disabled: disabled}) do + update_hub(state, &put_in(&1.disabled, disabled)) end - defp update_hub(state, %LivebookProto.OrgUpdated{active: active}) do - update_hub(state, &put_in(&1.active, active)) + defp update_hub(state, %LivebookProto.OrgUpdated{disabled: disabled}) do + update_hub(state, &put_in(&1.disabled, disabled)) end defp update_hub(state, %LivebookProto.AgentConnected{public_key: org_public_key}) do diff --git a/lib/livebook_web/live/hub/edit/team_component.ex b/lib/livebook_web/live/hub/edit/team_component.ex index 6247396cf399..fac6260dc1a5 100644 --- a/lib/livebook_web/live/hub/edit/team_component.ex +++ b/lib/livebook_web/live/hub/edit/team_component.ex @@ -63,7 +63,7 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do {Provider.connection_status(@hub)} - +

Workspace disabled: your organization doesn't have an active subscription. Please contact your <.link href={org_url(@hub, "/users")} @@ -185,14 +185,14 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do secrets={@secrets} edit_path={"hub/#{@hub.id}/secrets/edit"} return_to={~p"/hub/#{@hub.id}"} - disabled={not @hub.active} + disabled={@hub.disabled} />
<.button patch={~p"/hub/#{@hub.id}/secrets/new"} id="add-secret" - disabled={not @hub.active} + disabled={@hub.disabled} > Add secret @@ -214,7 +214,7 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do hub_id={@hub.id} file_systems={@file_systems} target={@myself} - disabled={not @hub.active} + disabled={@hub.disabled} />
@@ -251,7 +251,7 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do <.button patch={~p"/hub/#{@hub.id}/groups/new"} id="add-deployment-group" - disabled={not @hub.active} + disabled={@hub.disabled} > Add deployment group @@ -308,7 +308,7 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do secret_name={@secret_name} secret_value={@secret_value} return_to={~p"/hub/#{@hub.id}"} - disabled={not @hub.active} + disabled={@hub.disabled} /> @@ -323,7 +323,7 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do module={LivebookWeb.Hub.FileSystemFormComponent} id="file-systems" hub={@hub} - disabled={not @hub.active} + disabled={@hub.disabled} file_system={@file_system} file_system_id={@file_system_id} return_to={~p"/hub/#{@hub.id}"} diff --git a/lib/livebook_web/live/hub/secret_form_component.ex b/lib/livebook_web/live/hub/secret_form_component.ex index 50f0bfbc79f2..ff1280017ebb 100644 --- a/lib/livebook_web/live/hub/secret_form_component.ex +++ b/lib/livebook_web/live/hub/secret_form_component.ex @@ -75,7 +75,7 @@ defmodule LivebookWeb.Hub.SecretFormComponent do <.hidden_field field={f[:hub_id]} value={@hub.id} /> <.hidden_field field={f[:deployment_group_id]} value={@deployment_group_id} />
- <.button type="submit" disabled={not @changeset.valid? or @disabled}> + <.button type="submit" disabled={@disabled or not @changeset.valid?}> <.remix_icon icon={@button.icon} /> {@button.label} diff --git a/proto/lib/livebook_proto/agent_connected.pb.ex b/proto/lib/livebook_proto/agent_connected.pb.ex index e6966633aeb5..60b249bfdef2 100644 --- a/proto/lib/livebook_proto/agent_connected.pb.ex +++ b/proto/lib/livebook_proto/agent_connected.pb.ex @@ -18,5 +18,5 @@ defmodule LivebookProto.AgentConnected do json_name: "appDeployments" field :agents, 9, repeated: true, type: LivebookProto.Agent - field :org_active, 10, type: :bool, json_name: "orgActive" + field :org_disabled, 10, type: :bool, json_name: "orgDisabled" end diff --git a/proto/lib/livebook_proto/org_updated.pb.ex b/proto/lib/livebook_proto/org_updated.pb.ex index 3f767adbc883..ecf173425138 100644 --- a/proto/lib/livebook_proto/org_updated.pb.ex +++ b/proto/lib/livebook_proto/org_updated.pb.ex @@ -2,5 +2,5 @@ defmodule LivebookProto.OrgUpdated do use Protobuf, protoc_gen_elixir_version: "0.13.0", syntax: :proto3 field :id, 1, type: :string - field :active, 2, type: :bool + field :disabled, 2, type: :bool end diff --git a/proto/lib/livebook_proto/user_connected.pb.ex b/proto/lib/livebook_proto/user_connected.pb.ex index 2734821bdc78..81b8eec26a1b 100644 --- a/proto/lib/livebook_proto/user_connected.pb.ex +++ b/proto/lib/livebook_proto/user_connected.pb.ex @@ -16,5 +16,5 @@ defmodule LivebookProto.UserConnected do json_name: "appDeployments" field :agents, 6, repeated: true, type: LivebookProto.Agent - field :org_active, 7, type: :bool, json_name: "orgActive" + field :org_disabled, 7, type: :bool, json_name: "orgDisabled" end diff --git a/proto/messages.proto b/proto/messages.proto index 39dbd9021c13..9f8fe1367b16 100644 --- a/proto/messages.proto +++ b/proto/messages.proto @@ -107,7 +107,7 @@ message UserConnected { repeated DeploymentGroup deployment_groups = 4; repeated AppDeployment app_deployments = 5; repeated Agent agents = 6; - bool org_active = 7; + bool org_disabled = 7; } message AgentConnected { @@ -119,7 +119,7 @@ message AgentConnected { repeated DeploymentGroup deployment_groups = 7; repeated AppDeployment app_deployments = 8; repeated Agent agents = 9; - bool org_active = 10; + bool org_disabled = 10; } message AppDeployment { @@ -158,7 +158,7 @@ message AgentLeft { message OrgUpdated { string id = 1; - bool active = 2; + bool disabled = 2; } message Agent {