Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions client/src/js/modules/dc/views/apstatussummary.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ define(['marionette',
initialize: function(options) {
APItemCell.__super__.initialize.call(this,options)
this.listenTo(this.model, 'change reset', this.render, this)
this.template = '<i class="fa fa-spin fa-spinner"></i>'
},

render: function() {
Expand All @@ -65,15 +64,16 @@ define(['marionette',
'<i class="fa icon red fa-times alt="Failed"></i>']

var label = this.column.get('program')
this.$el.html(_.template(this.template))
if (this.model.get('APLOADED') == true) {
var ap = res[this.column.get('group')][label]
var ress = {}
_.each(ap, function(a) {
if (!(a in ress)) ress[a] = 0
ress[a]++
})
this.$el.html(_.map(ress, function(c, st) { return c > 1 ? '<span class="count">'+c+'x</span> '+val[st] : val[st]}))
if (this.column.get('group') in res) {
var ap = res[this.column.get('group')][label]
var ress = {}
_.each(ap, function(a) {
if (!(a in ress)) ress[a] = 0
ress[a]++
})
this.$el.html(_.map(ress, function(c, st) { return c > 1 ? '<span class="count">'+c+'x</span> '+val[st] : val[st]}))
}
}
this.delegateEvents();
return this;
Expand Down Expand Up @@ -119,7 +119,7 @@ define(['marionette',

updateColumns: function() {
var states = this.statuses.pluck('STATES')
var group_names = _.keys(states[0])
var group_names = _.chain(states).map(_.keys).flatten().uniq().value();
var groups = {}
_.each(group_names, function(group) {
groups[group] = _.unique(_.map(states, function(state) { return _.keys(state[group]) }).flat())
Expand Down Expand Up @@ -159,4 +159,4 @@ define(['marionette',
this.wrap.show(this.table)
}
})
})
})
2 changes: 1 addition & 1 deletion client/src/js/modules/dc/views/dc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ define(['marionette',
'modules/dc/views/apstatusitem',
'modules/dc/views/apmessagestatusitem',
'modules/dc/views/apmessages',
'modules/dc/views/reprocess2',
'modules/dc/views/reprocess',
'modules/dc/views/dcbase',
'templates/dc/dc.html', 'backbone-validation'], function(Marionette,
DialogView, TabView, DCDISTLView,
Expand Down
Loading
Loading