Class: Impac::Dashboard
- Inherits:
-
BaseResource
- Object
- BaseResource
- Impac::Dashboard
- Defined in:
- app/models/mno_enterprise/impac/dashboard.rb
Instance Method Summary collapse
-
#filtered_widgets_templates ⇒ Object
Filter widgets list based on config.
-
#full_name ⇒ Object
Instance methods ============================================ Return the full name of this dashboard Currently a simple accessor to the dashboard name (used to include the company name).
-
#organizations(org_list = nil) ⇒ Object
Return all the organizations linked to this dashboard and to which the user has access.
- #to_audit_event ⇒ Object
Instance Method Details
#filtered_widgets_templates ⇒ Object
Filter widgets list based on config
30 31 32 33 34 35 36 37 38 |
# File 'app/models/mno_enterprise/impac/dashboard.rb', line 30 def if MnoEnterprise. return self..select do |t| MnoEnterprise..include?(t[:path]) end else return self. end end |
#full_name ⇒ Object
Instance methods
Return the full name of this dashboard Currently a simple accessor to the dashboard name (used to include the company name)
15 16 17 |
# File 'app/models/mno_enterprise/impac/dashboard.rb', line 15 def full_name self.name end |
#organizations(org_list = nil) ⇒ Object
Return all the organizations linked to this dashboard and to which the user has access
21 22 23 24 25 26 27 |
# File 'app/models/mno_enterprise/impac/dashboard.rb', line 21 def organizations(org_list = nil) if org_list org_list.to_a.select { |e| self.organization_ids.include?(e.uid) } else MnoEnterprise::Organization.where('uid.in' => self.organization_ids).to_a end end |
#to_audit_event ⇒ Object
40 41 42 |
# File 'app/models/mno_enterprise/impac/dashboard.rb', line 40 def to_audit_event {name: name} end |