Class: DashboardController

Inherits:
ApplicationController show all
Includes:
ApplicationHelper
Defined in:
app/controllers/dashboard_controller.rb

Overview

Controller for showing a dashboard consisting of BizProcess -> System -> Control tree.

Constant Summary

Constant Summary

Constants included from ApplicationHelper

ApplicationHelper::ADMIN_MODULES, ApplicationHelper::WORKFLOW_MODULES

Instance Method Summary (collapse)

Methods included from ApplicationHelper

#access_control_roles, #admin_project_modules, #display_compact, #display_time, #equal_ids, #filter_biz_processes, #filter_system_controls, #filter_systems, #mat, #mt, #pat, #program_display, #project_modules, #render_for, #typecast_params, #yield_content!

Instance Method Details

- (Object) closebp

AJAX for closing a BizProcess drilldown



37
38
39
40
# File 'app/controllers/dashboard_controller.rb', line 37

def closebp
  bp = BizProcess.find(params[:id])
  render :partial => "dashboard/closebp", :locals => {:bp => bp}
end

- (Object) closesys

AJAX for closing a System drilldown



50
51
52
53
54
# File 'app/controllers/dashboard_controller.rb', line 50

def closesys
  biz_process = BizProcess.find(params[:biz_process_id])
  system = System.find(params[:id])
  render :partial => "dashboard/closesys", :locals => {:biz_process => biz_process, :system => system}
end

- (Object) index

Show the collapsed dashboard view, consisting of a (possibly filtered) list of BizProcess objects.

We may get a POST here if a filter is changed.



22
23
24
25
26
27
28
# File 'app/controllers/dashboard_controller.rb', line 22

def index
  if request.post?
    redirect_to url_for
  else
    @biz_processes = filter_biz_processes(BizProcess)
  end
end

- (Object) openbp

AJAX for drilldown into a BizProcess



31
32
33
34
# File 'app/controllers/dashboard_controller.rb', line 31

def openbp
  bp = BizProcess.find(params[:id])
  render :partial => "dashboard/openbp", :locals => {:bp => bp}
end

- (Object) opensys

AJAX for drilldown into a System



43
44
45
46
47
# File 'app/controllers/dashboard_controller.rb', line 43

def opensys
  biz_process = BizProcess.find(params[:biz_process_id])
  system = System.find(params[:id])
  render :partial => "dashboard/opensys", :locals => {:biz_process => biz_process, :system => system}
end