Skip to content

Commit

Permalink
#1633 Fix the imported flag in report observables list
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani authored and To-om committed Nov 13, 2020
1 parent 8aed6e1 commit 6bde2f8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions frontend/app/scripts/directives/report-observables.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
filter: '',
data: scope.observables
};

_.each(scope.observables, function(item) {
item.imported = !!item.stats.observableId;
});
});
},
controller: function($scope) {
Expand Down Expand Up @@ -50,7 +54,7 @@
var type = $scope.pagination.filter;
_.each(type === '' ? $scope.observables : $scope.groups[type], function(item) {
//if(!item.id && !item.selected) {
if(!item.stats.observableId && !item.selected) {
if(!item.imported && !item.selected) {
item.selected = true;
$scope.selected++;
}
Expand Down Expand Up @@ -109,7 +113,8 @@
modal.result
.then(function(/*response*/) {
_.each(list, function(item) {
item.id = true;
//item.id = true;
item.imported = true;
item.selected = false;
});
});
Expand Down

0 comments on commit 6bde2f8

Please sign in to comment.