forked from External/greenlight
Display notification that max concurrent sessions has been reached (GRN-41) (#317)
* <Added max concurrent sessions check> * <Refactored some exception logic> * <Fixed code style> * <Generalized BBBException error message>
This commit is contained in:
parent
655516535c
commit
de98fd0a3c
|
@ -94,7 +94,11 @@ class RoomsController < ApplicationController
|
||||||
opts = default_meeting_options
|
opts = default_meeting_options
|
||||||
opts[:user_is_moderator] = true
|
opts[:user_is_moderator] = true
|
||||||
|
|
||||||
redirect_to @room.join_path(current_user.name, opts, current_user.uid)
|
begin
|
||||||
|
redirect_to @room.join_path(current_user.name, opts, current_user.uid)
|
||||||
|
rescue BigBlueButton::BigBlueButtonException => exc
|
||||||
|
redirect_to room_path, notice: I18n.t(exc.key.to_s.underscore, default: I18n.t("bigbluebutton_exception"))
|
||||||
|
end
|
||||||
|
|
||||||
# Notify users that the room has started.
|
# Notify users that the room has started.
|
||||||
# Delay 5 seconds to allow for server start, although the request will retry until it succeeds.
|
# Delay 5 seconds to allow for server start, although the request will retry until it succeeds.
|
||||||
|
|
|
@ -63,6 +63,7 @@ class Room < ApplicationRecord
|
||||||
bbb.create_meeting(name, bbb_id, create_options)
|
bbb.create_meeting(name, bbb_id, create_options)
|
||||||
rescue BigBlueButton::BigBlueButtonException => exc
|
rescue BigBlueButton::BigBlueButtonException => exc
|
||||||
puts "BigBlueButton failed on create: #{exc.key}: #{exc.message}"
|
puts "BigBlueButton failed on create: #{exc.key}: #{exc.message}"
|
||||||
|
raise exc
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,14 @@
|
||||||
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||||
%>
|
%>
|
||||||
|
|
||||||
|
<% unless flash.empty? %>
|
||||||
|
<%= render "shared/error_banner" do %>
|
||||||
|
<% flash.each do |key, value| %>
|
||||||
|
<%= content_tag :div, value, class: "flash #{key} d-inline" %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="background pb-1">
|
<div class="background pb-1">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row pt-9">
|
<div class="row pt-9">
|
||||||
|
|
|
@ -22,6 +22,7 @@ en:
|
||||||
user:
|
user:
|
||||||
accepted_terms: "Terms and Conditions"
|
accepted_terms: "Terms and Conditions"
|
||||||
bigbluebutton: BigBlueButton
|
bigbluebutton: BigBlueButton
|
||||||
|
bigbluebutton_exception: Oops, there was an error when starting the meeting!
|
||||||
cancel: Cancel
|
cancel: Cancel
|
||||||
copy: Copy
|
copy: Copy
|
||||||
delete: Delete
|
delete: Delete
|
||||||
|
@ -78,6 +79,7 @@ en:
|
||||||
version: We've released a new version of Greenlight, but your database isn't compatible.
|
version: We've released a new version of Greenlight, but your database isn't compatible.
|
||||||
ldap_error: Unable to connect to the LDAP server. Please check your LDAP configuration in the env file and ensure your server is running.
|
ldap_error: Unable to connect to the LDAP server. Please check your LDAP configuration in the env file and ensure your server is running.
|
||||||
login: Sign in
|
login: Sign in
|
||||||
|
max_concurrent: The maximum number of concurrent sessions allowed has been reached!
|
||||||
modal:
|
modal:
|
||||||
create_room:
|
create_room:
|
||||||
auto_join: Automatically join me into the room.
|
auto_join: Automatically join me into the room.
|
||||||
|
|
Loading…
Reference in New Issue