Init version of dashboard stats.
This commit is contained in:
parent
c4a2996da0
commit
3e6b8beb00
1 changed files with 18 additions and 0 deletions
18
app/controllers/sessions/collection_dashboard.rb
Normal file
18
app/controllers/sessions/collection_dashboard.rb
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
|
module ExtraCollection
|
||||||
|
def session( collections, assets, user )
|
||||||
|
return [collections, assets] if !user
|
||||||
|
|
||||||
|
item = StatsStore.search(
|
||||||
|
object: 'User',
|
||||||
|
o_id: user.id,
|
||||||
|
key: 'dashboard',
|
||||||
|
)
|
||||||
|
return [collections, assets] if !item
|
||||||
|
collections['StatsStore'] = [item]
|
||||||
|
|
||||||
|
[collections, assets]
|
||||||
|
end
|
||||||
|
module_function :session
|
||||||
|
end
|
Loading…
Reference in a new issue