Skip to content

Commit

Permalink
foxed styling for multiple flags
Browse files Browse the repository at this point in the history
  • Loading branch information
gfelber committed Nov 17, 2023
1 parent b5938b9 commit 15915c6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/FlowList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ function FlowListEntry({ flow, isActive, onHeartClick }: FlowListEntryProps) {
</div>
<div className="text-gray-500 ml-auto">{duration}</div>
</div>
<div className="flex h-5 gap-2">
<div className="flex gap-2 flex-wrap">
{filtered_tag_list.map((tag) => (
<Tag key={tag} tag={tag}></Tag>
))}
Expand Down
10 changes: 7 additions & 3 deletions services/go-importer/cmd/assembler/tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,14 @@ func ApplyFlagids(flow *db.FlowEntry, flagids []string) {
flowItem := &flow.Flow[idx]
data := flowItem.Data
for _, flagid := range flagids {
log.Print("DEBUG: " + flagid)
if strings.Contains(data, flagid) {
log.Print("DEBUG: Found Match")
tag := "flagid"
var tag string
if flowItem.From == "c" {
tag = "flagid-in"
} else {

tag = "flagid-out"
}

if !contains(flow.Flagids, flagid) {
flow.Flagids = append(flow.Flagids, flagid)
Expand Down
2 changes: 2 additions & 0 deletions services/go-importer/internal/pkg/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ func (db Database) ConfigureDatabase() {
db.InsertTag("blocked")
db.InsertTag("suricata")
db.InsertTag("starred")
db.InsertTag("flagid-in")
db.InsertTag("flagid-out")
db.InsertTag("tcp")
db.InsertTag("udp")
db.InsertTag("flagid")
Expand Down

0 comments on commit 15915c6

Please sign in to comment.