Skip to content

Commit

Permalink
bonus fix of apstatus not handling multiple results for sm
Browse files Browse the repository at this point in the history
  • Loading branch information
keeble committed Aug 23, 2024
1 parent 5fd4643 commit be5fff3
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions client/src/js/modules/types/sm/dc/views/apstatusitem.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,25 @@ define(['modules/dc/views/apstatusitem'], function(APStatusItem) {
'<i class="fa icon green fa-check alt="Completed"></i>',
'<i class="fa icon red fa-times alt="Failed"></i>']

_.each(['autoproc','downstream'], function(ty, id) {
this.ui.holder.eq(id).empty()
_.each(res[ty], function(ap, n) {
if(ap != 0)
this.ui.holder.eq(id).append(n+' '+val[ap]+' ')
}, this)
_.each({ap: 'autoproc',dp: 'downstream'}, function(ty, id) {
this.ui[id].empty()
var allResults = []
if (res[ty]) {
_.each(res[ty], function(ap, n) {
var ress = {}
_.each(ap, function(a) {
if (!(a in ress)) ress[a] = 0
ress[a]++
})
allResults.push(n+': '+_.map(ress, function(c, st) { return c > 1 ? '<span class="count">'+c+'x</span> '+val[st] : val[st]}).join(' '))
}, this)

this.ui[id].append(allResults.join('<span class="separator">|</span>'))
} else {
this.ui[id].append('No processing results')
}
}, this)
},
})

})
})

0 comments on commit be5fff3

Please sign in to comment.