Class: SystemInfoController

Inherits:
ApplicationController show all
Defined in:
frontend/app/controllers/system_info_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#archivesspace, can_access?, permission_mappings, session_can?, session_repo, set_access_control, user_preferences

Instance Method Details

#showObject



6
7
8
9
10
11
12
13
# File 'frontend/app/controllers/system_info_controller.rb', line 6

def show
  @app_context = params[:app_context] ? params[:app_context] : "frontend_info"
  if @app_context == "backend_info"
    @info = JSONModel::HTTP.get_json("/system/info")
  else
    @info = ASUtils.get_diagnostics.reject { |k, v| k == :exception }
  end
end

#show_logObject



15
16
17
# File 'frontend/app/controllers/system_info_controller.rb', line 15

def show_log
  @app_context = params[:app_context] ? params[:app_context] : "frontend_log"
end

#stream_logObject



19
20
21
22
23
24
25
26
27
28
29
# File 'frontend/app/controllers/system_info_controller.rb', line 19

def stream_log
  @app_context = params[:app_context] ? params[:app_context] : "frontend_log"

  if @app_context == "backend_log"
    @log = JSONModel::HTTP.get_response(URI.parse(AppConfig[:backend_url] + "/system/log")).body
  else
    @log = Rails.logger.backlog_and_flush
  end

  render :plain => @log
end