Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mcartmel authored and scroix committed Apr 1, 2024
1 parent fa7b473 commit dc14166
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions nodel-webui-js/src/nodel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2055,9 +2055,16 @@ var updateLogs = function(){
if (typeof $('body').data('seq') === "undefined") {
var noanimate = true;
$('body').data('seq', -1);
var len = data.filter(function (x) {
return x.seq != 0;
}).length;
// get length minus duplicates
var len = data.filter(
(data, index, self) => index === self.findIndex(
(t) =>
data.seq !== 0 &&
t.source === data.source &&
t.type === data.type &&
t.alias === data.alias
)
).length;
var eles = $(".nodel-log");
$.each(eles, function (i, ele) {
var src = $.view($(ele).find('.base')).data;
Expand Down Expand Up @@ -2096,9 +2103,16 @@ var updateLogs = function(){
data['activityHistory'].sort(function (a, b) {
return a.seq < b.seq ? -1 : a.seq > b.seq ? 1 : 0;
});
var datafil = data['activityHistory'].filter(function (x) {
return x.seq != 0;
});
// get data minus duplicates
var datafil = data['activityHistory'].filter(
(data, index, self) => index === self.findIndex(
(t) =>
data.seq !== 0 &&
t.source === data.source &&
t.type === data.type &&
t.alias === data.alias
)
);
var len = datafil.length;
var eles = $(".nodel-log");
$.each(eles, function (i, ele) {
Expand Down

0 comments on commit dc14166

Please sign in to comment.