From 68716bc6f3ed3a1daf3b78263d166424900859a1 Mon Sep 17 00:00:00 2001 From: Ahmad Farhat Date: Mon, 26 Oct 2020 14:38:19 -0400 Subject: [PATCH] Added a flash message if the getMeetings call times out (#2232) --- app/controllers/admins_controller.rb | 8 +++++++- config/locales/en.yml | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/controllers/admins_controller.rb b/app/controllers/admins_controller.rb index dbe8ef00..8bd5f576 100644 --- a/app/controllers/admins_controller.rb +++ b/app/controllers/admins_controller.rb @@ -71,7 +71,13 @@ class AdminsController < ApplicationController @order_column = params[:column] && params[:direction] != "none" ? params[:column] : "status" @order_direction = params[:direction] && params[:direction] != "none" ? params[:direction] : "DESC" - meetings = all_running_meetings[:meetings] + begin + meetings = all_running_meetings[:meetings] + rescue + flash[:alert] = I18n.t("administrator.rooms.timeout") + meetings = [] + end + @order_column = "created_at" if meetings.empty? @running_room_bbb_ids = meetings.pluck(:meetingID) diff --git a/config/locales/en.yml b/config/locales/en.yml index c14ce71a..0cbd6e4d 100755 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -173,6 +173,7 @@ en: enabled: Always Enabled optional: Optional rooms: + timeout: Due to the BigBlueButton Server request timing out, the information for status and participants may not be accurate title: Server Rooms table: ended: "Ended: %{session}"