mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 05:53:39 -04:00
Add auto-refresh to sub counts admin page
This commit is contained in:
parent
53de6c6134
commit
1dbb382318
1 changed files with 4 additions and 1 deletions
|
@ -10,7 +10,9 @@ module.exports = class AnalyticsSubscriptionsView extends RootView
|
|||
|
||||
constructor: (options) ->
|
||||
super options
|
||||
@refreshData()
|
||||
if me.isAdmin()
|
||||
@refreshData()
|
||||
_.delay (=> @refreshData()), 30 * 60 * 1000
|
||||
|
||||
getRenderData: ->
|
||||
context = super()
|
||||
|
@ -20,6 +22,7 @@ module.exports = class AnalyticsSubscriptionsView extends RootView
|
|||
context
|
||||
|
||||
refreshData: ->
|
||||
return unless me.isAdmin()
|
||||
@subs = []
|
||||
@total = 0
|
||||
@cancelled = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue