Skip to content

Commit

Permalink
pause data-refresh if in background (fix #37)
Browse files Browse the repository at this point in the history
  • Loading branch information
ansibleguy committed Oct 6, 2024
1 parent 323b5ca commit 095ba24
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ansibleguy-webui/aw/static/js/aw.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,10 @@ function fetchApiTableDataPlaceholder(dataTable, placeholderId) {
// for example with two tables - see: 'job-credentials'
function fetchApiTableData(apiEndpoint, updateFunction, secondRow = false, placeholderFunction = null, targetTable = null, dataSubKey = null, reverseData = false) {
// NOTE: data needs to be list of dict and include an 'id' attribute
if (typeof(document.hidden) !== undefined && document['hidden']) {
return;
}

if (targetTable == null) {
targetTable = ELEM_ID_TABLE;
}
Expand Down

0 comments on commit 095ba24

Please sign in to comment.