Class: LesliAudit::Dashboard

Inherits:
Lesli::Shared::Dashboard
  • Object
show all
Defined in:
app/models/lesli_audit/dashboard.rb

Overview

class Dashboard < Lesli::ApplicationLesliRecord

Defined Under Namespace

Modules: ComponentsHelper Classes: Component

Class Method Summary collapse

Class Method Details

.initialize_account(account) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'app/models/lesli_audit/dashboard.rb', line 10

def self.()
    self.create!(
        account: ,
        name: "Audit Default Dashboard",
        default: true,
        main: false,
        components_attributes: [{
            name: "Total users",
            component_id: "audit-users",
            layout: 3,
            query_configuration: {},
            custom_configuration: {}
        }, {
            name: "Roles",
            component_id: "audit-roles",
            layout: 3,
            query_configuration: {},
            custom_configuration: {}
        }]
    )
end