Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SJ - rmid server error to only appear if rmid is enabled in settings #1173

Merged
merged 1 commit into from
Nov 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ def create_calendar_event event
end

def rmid_server_status(protocol)
@rmid_server_down = protocol.rmid_server_status
@rmid_server_down ? flash[:alert] = t(:protocols)[:summary][:tooltips][:rmid_server_down] : nil
if Setting.find_by_key("research_master_enabled").value
@rmid_server_down = protocol.rmid_server_status
@rmid_server_down ? flash[:alert] = t(:protocols)[:summary][:tooltips][:rmid_server_down] : nil
end
end

def authorization_error msg, ref
Expand Down
6 changes: 4 additions & 2 deletions app/controllers/dashboard/base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ def clean_errors(errors)
private

def rmid_server_status(protocol)
@rmid_server_down = protocol.rmid_server_status
@rmid_server_down ? flash[:alert] = t(:protocols)[:summary][:tooltips][:rmid_server_down] : nil
if Setting.find_by_key("research_master_enabled").value
@rmid_server_down = protocol.rmid_server_status
@rmid_server_down ? flash[:alert] = t(:protocols)[:summary][:tooltips][:rmid_server_down] : nil
end
end

def protocol_authorizer_view
Expand Down