From bd7dc68d12f1d134106fd21afe9cbf2d0512c831 Mon Sep 17 00:00:00 2001 From: radhika Date: Mon, 3 Oct 2016 17:07:43 -0400 Subject: [PATCH] 10078: add configuration parameter to suppress display of user notifications to improve dashboard performance --- apps/workbench/app/controllers/application_controller.rb | 2 +- apps/workbench/config/application.default.yml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb index 3886d1c763..c6148ca544 100644 --- a/apps/workbench/app/controllers/application_controller.rb +++ b/apps/workbench/app/controllers/application_controller.rb @@ -769,7 +769,7 @@ class ApplicationController < ActionController::Base helper_method :user_notifications def user_notifications - return [] if @errors or not current_user.andand.is_active + return [] if @errors or not current_user.andand.is_active or not Rails.configuration.show_user_notifications_in_dashboard @notifications ||= @@notification_tests.map do |t| t.call(self, current_user) end.compact diff --git a/apps/workbench/config/application.default.yml b/apps/workbench/config/application.default.yml index 63262857cc..95b178448b 100644 --- a/apps/workbench/config/application.default.yml +++ b/apps/workbench/config/application.default.yml @@ -282,6 +282,7 @@ common: running_job_log_records_to_fetch: 2000 # In systems with many shared projects, dashboard loading can be - # slow due to collections indexing; the recent collections panel - # can be hidden by setting this configuration parameter to false + # slow due to collections indexing; use the following parameters + # to suppress certain properties from dashboard show_recent_collections_in_dashboard: true + show_user_notifications_in_dashboard: true -- 2.30.2