Fix duplicated tasks in the table after filtering or duplicating [SCI-7794] (#4865)

This commit is contained in:
ajugo 2023-01-19 17:59:12 +01:00 committed by GitHub
parent d3ce565c1d
commit 0973659f52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View file

@ -11,6 +11,7 @@ var ExperimnetTable = {
filters: [], // Filter {name: '', init(), closeFilter(), apply(), active(), clearFilter()}
myModulesCurrentSort: '',
pageSize: GLOBAL_CONSTANTS.DEFAULT_ELEMENTS_PER_PAGE,
provisioningStatusTimeout: '',
getUrls: function(id) {
return $(`.table-row[data-id="${id}"]`).data('urls');
},
@ -589,7 +590,8 @@ var ExperimnetTable = {
});
if (remainingUrls.length > 0) {
setTimeout(() => {
clearTimeout(this.provisioningStatusTimeout);
this.provisioningStatusTimeout = setTimeout(() => {
this.pollProvisioningStatuses(remainingUrls);
}, 10000);
} else {

View file

@ -44,18 +44,20 @@ var filterDropdown = (function() {
} catch (error) {
console.error(error);
}
}).on('hide.bs.dropdown', function() {
$('#textSearchFilterHistory').hide();
$('.apply-filters', $filterContainer).click();
}).on('hide.bs.dropdown', function(e) {
if (e.target === e.currentTarget) {
$('#textSearchFilterHistory').hide();
$('.apply-filters', $filterContainer).click();
}
});
$textFilter.click(function(e) {
e.stopPropagation();
$('#textSearchFilterHistory').toggle();
$(e.target).closest('.dropdown').toggleClass('open');
$(e.currentTarget).closest('.dropdown').toggleClass('open');
}).on('input', (e) => {
$('#textSearchFilterHistory').hide();
$(e.target).closest('.dropdown').removeClass('open');
$(e.currentTarget).closest('.dropdown').removeClass('open');
});
$filterContainer.on('click', '.projects-search-keyword', function(e) {