Skip to content

Commit

Permalink
flowdisplay: fix established flows detection
Browse files Browse the repository at this point in the history
  • Loading branch information
aiooss-anssi committed Sep 9, 2024
1 parent 925f2f2 commit 1c88467
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions webapp/static/js/flowdisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ class FlowDisplay {

// Application protocol card
const appProto = flow.flow.app_proto
document.getElementById('display-down').classList.toggle('d-none', appProto)
const flowEstablished = flow.flow.state !== 'new'
document.getElementById('display-down').classList.toggle('d-none', flowEstablished)
if (appProto && appProto !== 'failed' && flow[appProto] !== undefined) {
document.getElementById('display-app').classList.remove('d-none')
document.querySelector('#display-app > header > a').classList.toggle('d-none', appProto !== 'http')
Expand Down Expand Up @@ -338,7 +339,7 @@ class FlowDisplay {
}

// Show raw data card if a TCP or UDP connection was established
if (['TCP', 'UDP'].includes(flow.flow.proto) && appProto) {
if (['TCP', 'UDP'].includes(flow.flow.proto) && flowEstablished) {
document.getElementById('display-raw').classList.remove('d-none')
document.getElementById('display-raw-replay').href = `api/replay-raw/${flowId}`

Expand Down

0 comments on commit 1c88467

Please sign in to comment.