Sha256: 2fdff7d98b23fd032357560af5bcf6d9670b4ab843ad19dd285197b5f10f9aab
Contents?: true
Size: 984 Bytes
Versions: 6
Compression:
Stored size: 984 Bytes
Contents
class AppError extends App.Views.PolledItem template: App.Templates.app_error events: 'click a.show_backtrace': 'toggleBacktrace' 'click a.remove': 'destroy' render: -> json = @model.toJSON() json.prettyData = [] json.backtrace = @model.get('backtrace').replace( /\n/g, "<br/>" ) for k, v of json.data json.prettyData.push "#{k}: <tt>#{v}</tt>" json.prettyData = json.prettyData.join("<br/>") json.timestamp = moment(json.created_at).format( "YYYY-MM-DD[<br/>at] h:mma" ) @$el.html( @template( json ) ) return @ toggleBacktrace: -> link = @$('a.show_backtrace') @$('.backtrace').reveal() destroy: -> @model.destroy() @remove() class AppErrorsList extends App.Views.PollingList class App.Views.AppErrors extends Backbone.View el: 'body' initialize: -> @errors = new AppErrorsList( el: @$('#app_errors table') reset: false viewClass: AppError collectionClass: App.AppErrors )
Version data entries
6 entries across 6 versions & 1 rubygems