-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restrict teams features based on org status
- Loading branch information
1 parent
cd46b5c
commit ac96e4b
Showing
13 changed files
with
87 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,15 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do | |
{Provider.connection_status(@hub)} | ||
</LayoutComponents.topbar> | ||
<LayoutComponents.topbar :if={[email protected]} variant="warning"> | ||
<h2> | ||
Workspace disabled: your organization doesn't have an active subscription. Please contact your <.link | ||
href={org_url(@hub, "/users")} | ||
class="underline" | ||
>org's admin</.link>. | ||
</h2> | ||
</LayoutComponents.topbar> | ||
<div class="p-4 md:px-12 md:py-7 max-w-screen-md mx-auto"> | ||
<div id={"#{@id}-component"}> | ||
<div class="mb-8 flex flex-col space-y-2"> | ||
|
@@ -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} | ||
/> | ||
<div> | ||
<.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 | ||
</.button> | ||
</div> | ||
|
@@ -200,6 +214,7 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do | |
hub_id={@hub.id} | ||
file_systems={@file_systems} | ||
target={@myself} | ||
disabled={not @hub.active} | ||
/> | ||
</div> | ||
|
@@ -233,7 +248,11 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do | |
</div> | ||
<div> | ||
<.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 | ||
</.button> | ||
</div> | ||
|
@@ -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} | ||
/> | ||
</.modal> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters