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

View file

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