Add auto-refresh to sub counts admin page

This commit is contained in:
Matt Lott 2015-03-27 11:39:45 -07:00
parent 53de6c6134
commit 1dbb382318

View file

@ -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