Skip to content

Commit

Permalink
Remove Jitsi video-bridge furniture and infrastructure code (#1051)
Browse files Browse the repository at this point in the history
* Delete all existing `video_bridge` furniture placements.

* Delete Jitsi (and Plaid!) Utilities.

* Remove spaces.jitsi_meet_domain column.

* Delete Jitsi-related Convene code.

* Remove infastructure to run Jitsi locally

* Remove the infrastructure directory.
  • Loading branch information
anaulin authored Jan 19, 2023
1 parent e6bf54c commit 1c1e7c8
Show file tree
Hide file tree
Showing 59 changed files with 54 additions and 1,303 deletions.
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,6 @@ The Convene UI is based on Rails standard templating system, with heavy use of:
which loads all `app/javascript/*_controllers.js` files
- [Tailwind CSS](https://tailwindcss.com/) to help speed up making good-looking UIs

Jitsi is Convene's video call infrastructure. The
[video_room_controller.js](./app/javascript/controllers/video_room_controller.js) is the entry point
where we load a Jitsi video call iframe into Convene's UI.

If you want to run Jitsi locally, see the configuration provided in
[`infrastructure/jitsi-meet-local`](./infrastructure/jitsi-meet-local/README.md).

See [Architecture](./CONTRIBUTING.md#11-architecture) for how Convene is architected.

## Configuring Your Development Machine
Expand Down
1 change: 0 additions & 1 deletion app/assets/stylesheets/application.postcss.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@

@import "./utilities.scss";
@import "./components.scss";
@import "./furniture.scss";
2 changes: 0 additions & 2 deletions app/assets/stylesheets/furniture.scss

This file was deleted.

1 change: 0 additions & 1 deletion app/furniture/furniture.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module Furniture
journal: Journal,
markdown_text_block: MarkdownTextBlock,
marketplace: Marketplace,
video_bridge: VideoBridge,
livestream: Livestream,
embedded_form: EmbeddedForm,
}.freeze
Expand Down
8 changes: 0 additions & 8 deletions app/furniture/video_bridge.rb

This file was deleted.

Empty file.
3 changes: 0 additions & 3 deletions app/furniture/video_bridge/index.css

This file was deleted.

26 changes: 0 additions & 26 deletions app/furniture/video_bridge/index.js

This file was deleted.

55 changes: 0 additions & 55 deletions app/furniture/video_bridge/video_bridge.js

This file was deleted.

10 changes: 0 additions & 10 deletions app/furniture/video_bridges/_video_bridge.html.erb

This file was deleted.

58 changes: 4 additions & 54 deletions app/models/blueprint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,8 @@ def space_attributes

BLUEPRINTS = {
system_test: {

entrance: "entrance-hall",
utility_hookups: [
{utility_slug: :jitsi, name: "Jitsi", configuration:
{meet_domain: "convene-videobridge-zinc.zinc.coop"}}
],
utility_hookups: [ ],
members: [{email: "[email protected]"},
{email: "[email protected]"}],
rooms: [
Expand All @@ -120,7 +116,6 @@ def space_attributes
access_code: nil,
furniture_placements: {
markdown_text_block: {content: "# Welcome!"},
video_bridge: {},
}
},
{
Expand All @@ -129,87 +124,42 @@ def space_attributes
access_level: :unlocked,
access_code: nil,
furniture_placements: {
video_bridge: {}
}
},
{
name: "Listed Locked Room 1",
publicity_level: :listed,
access_level: :locked,
access_code: :secret,
furniture_placements: {
video_bridge: {}
}
furniture_placements: { }
},
{
name: "Unlisted Room 1",
publicity_level: :unlisted,
access_level: :unlocked,
access_code: nil,
furniture_placements: {
video_bridge: {}
}
furniture_placements: { }
},
{
name: "Unlisted Room 2",
publicity_level: :unlisted,
access_level: :unlocked,
access_code: nil,
furniture_placements: {
video_bridge: {}
}
furniture_placements: { }
},
{
name: "Entrance Hall",
publicity_level: :unlisted,
furniture_placements: {
markdown_text_block: {content: "# Wooo!"},
}

}
]
}
}.with_indifferent_access

# @todo migrate this to a private configuration file!
CLIENTS = [{
client: {
name: "Zinc",
space: {
members: [{email: "[email protected]"}, {email: "[email protected]"}],
name: "Zinc", branded_domain: "meet.zinc.coop",
entrance: "lobby",
utility_hookups: [
{
utility_slug: :jitsi, name: "Jitsi", configuration:
{meet_domain: "convene-videobridge-zinc.zinc.coop"}
}
],
rooms: [{
name: "Lobby",
access_level: :unlocked,
publicity_level: :unlisted,
furniture_placements: {
markdown_text_block: {}
}
}, {
name: "Ada",
access_level: :unlocked,
publicity_level: :listed,
furniture_placements: {
video_bridge: {}
}
}, {
name: "Talk to Zee",
access_level: :unlocked,
publicity_level: :unlisted,
furniture_placements: {
video_bridge: {}
}
}]
}
}
}, {
client: {
name: "Zinc",
space: {
Expand Down
9 changes: 1 addition & 8 deletions app/models/demo_space.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,12 @@ def self.prepare
name: "Zinc",
space: {
name: "Convene Demo",
utility_hookups: utility_hookups,
utility_hookups: [],
branded_domain: "convene-demo.zinc.coop",
members: [{email: "[email protected]"},
{email: "[email protected]"}],
rooms: DEMO_ROOMS
}
}).find_or_create!
end

def self.utility_hookups
[
{utility_slug: :jitsi, name: "Jitsi", configuration:
{meet_domain: "convene-videobridge-zinc.zinc.coop"}}
]
end
end
4 changes: 0 additions & 4 deletions app/models/room.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ def full_slug
"#{space.slug}--#{slug}"
end

def video_host
space.jitsi_meet_domain
end

def enterable?(access_code)
return true if access_level == "unlocked"

Expand Down
7 changes: 0 additions & 7 deletions app/models/space.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,6 @@ class Space < ApplicationRecord
# @returns {ActiveRecord::Relation<UtilityHookups>}
has_many :utility_hookups, dependent: :destroy_async

def jitsi_meet_domain
jitsi_hookup = utility_hookups.find_by(utility_slug: :jitsi)
return if jitsi_hookup.blank?

Utilities.from_utility_hookup(jitsi_hookup).meet_domain
end

def parent_location
[]
end
Expand Down
19 changes: 0 additions & 19 deletions app/utilities/jitsi/jitsi_utility.rb

This file was deleted.

7 changes: 0 additions & 7 deletions app/utilities/jitsi/jitsi_utility_policy.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/utilities/utilities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# @see features/utilities/
module Utilities
REGISTRY = {
jitsi: Jitsi::JitsiUtility,
stripe: Stripe::StripeUtility
}.freeze

Expand Down
39 changes: 0 additions & 39 deletions bin/jitsi-local-run

This file was deleted.

19 changes: 19 additions & 0 deletions db/migrate/20230119005121_remove_video_bridge_furniture.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class RemoveVideoBridgeFurniture < ActiveRecord::Migration[7.0]
# As of 2023/1/28, these are the video-bridge placements in production
# > FurniturePlacement.where(furniture_kind: "video_bridge").map {|fp| [fp.id, fp.room.slug, fp.room.space.slug]}
# [["c868b70f-00a8-4889-92fb-8a39106a507d", "zee-s-desk", "convene-demo"],
# ["be167a5b-628c-4366-b191-d8804813b77c", "vivek-s-desk", "convene-demo"],
# ["d9196ae8-9fe6-4bfd-875b-3e593411fed4", "water-cooler", "convene-demo"],
# ["4e2116fc-eb4c-4466-b269-b5cd0da8f1f2", "the-ada-lovelace-room",
# "convene-demo"], ["ca5ea9f3-1680-4528-ae4b-b13ce499cdf3", "locked-room",
# "convene-demo"], ["eaa117fc-2326-4903-9cfd-92e68d0ed38d", "viveks-desk",
# "avigno"], ["402a54c6-513f-4d35-a416-b0e9089f72bb", "music-room", "avigno"],
# ["fd1a0b4c-973b-4078-a2eb-5b45f7b89731", "common-room", "avigno"]]
def up
FurniturePlacement.where(furniture_kind: "video_bridge").destroy_all
end

def down
ActiveRecord::IrreversibleMigration
end
end
Loading

0 comments on commit 1c1e7c8

Please sign in to comment.