Add version checking that shows on the admin dashboard

This commit is contained in:
Neil Lalonde
2013-02-19 15:16:50 -05:00
parent bb1156cee1
commit c0371ff427
16 changed files with 195 additions and 48 deletions

View File

@@ -0,0 +1,26 @@
window.Discourse.AdminDashboardController = Ember.Controller.extend
loading: true
versionCheck: null
upToDate: (->
if @versionCheck
@versionCheck.latest_version == @versionCheck.installed_version
else
true
).property('versionCheck')
updateIconClasses: (->
classes = "icon icon-warning-sign "
if @get('versionCheck.critical_updates')
classes += "critical-updates-available"
else
classes += "updates-available"
classes
).property('versionCheck')
priorityClass: (->
if @get('versionCheck.critical_updates')
'critical'
else
'normal'
).property('versionCheck')