Skip to content

Commit

Permalink
webapp/flowlist: show loading indicator sooner
Browse files Browse the repository at this point in the history
  • Loading branch information
aiooss-anssi committed Jul 31, 2024
1 parent 1f5f563 commit ff1c720
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions webapp/static/js/flowlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,13 @@ class FlowList {
document.getElementById('filter-time-until').value = toTick
}
document.getElementById('filter-time-until').classList.toggle('is-active', toTs)

// Empty flow list
const flowList = document.getElementById('flow-list')
while (flowList.lastChild) {
flowList.removeChild(flowList.lastChild)
}
this.lastTick = -1
}

// Fetch API and update
Expand All @@ -470,14 +477,7 @@ class FlowList {
)
await this.updateProtocolFilter(appProto)
this.updateTagFilter(tags, filterTagsRequire, filterTagsDeny)
if (!fillTo) {
// Empty flow list
const flowList = document.getElementById('flow-list')
while (flowList.lastChild) {
flowList.removeChild(flowList.lastChild)
}
this.lastTick = -1
} else {
if (fillTo) {
// Pop the first element as it is already present
flows.shift()
}
Expand Down

0 comments on commit ff1c720

Please sign in to comment.