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) ->
|
constructor: (options) ->
|
||||||
super options
|
super options
|
||||||
@refreshData()
|
if me.isAdmin()
|
||||||
|
@refreshData()
|
||||||
|
_.delay (=> @refreshData()), 30 * 60 * 1000
|
||||||
|
|
||||||
getRenderData: ->
|
getRenderData: ->
|
||||||
context = super()
|
context = super()
|
||||||
|
@ -20,6 +22,7 @@ module.exports = class AnalyticsSubscriptionsView extends RootView
|
||||||
context
|
context
|
||||||
|
|
||||||
refreshData: ->
|
refreshData: ->
|
||||||
|
return unless me.isAdmin()
|
||||||
@subs = []
|
@subs = []
|
||||||
@total = 0
|
@total = 0
|
||||||
@cancelled = 0
|
@cancelled = 0
|
||||||
|
|
Reference in a new issue