-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve how the events from Threatr are displayed
- Loading branch information
Showing
5 changed files
with
87 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
colander/templates/pages/investigate/generic_event_row.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{% load i18n %} | ||
{% load static %} | ||
{% load humanize %} | ||
{% load colander_tags %} | ||
|
||
<tr class=" align-middle"> | ||
<td class="col-2"> | ||
{% if event.type.nf_icon %}<i class="text-primary nf {{ event.type.nf_icon }}"></i> | ||
{% else %}<i class="fas fa-rocket text-primary fa-sm fa-fw"></i>{% endif %} | ||
<b>{{ event.type.name }}</b> | ||
</td> | ||
<td class="col"> | ||
<span class="font-monospace text-code">{{ event.name|truncatechars:128 }}</span> | ||
{% if event.attributes %} | ||
<a class="text-primary" data-bs-container="body" data-bs-toggle="popover" | ||
data-bs-placement="right" title="Properties" data-bs-trigger="hover focus" | ||
data-bs-content-id="popover-content-{{ event.id }}"> | ||
<i class="nf nf-fa-list" aria-hidden="true"></i> | ||
</a> | ||
<div id="popover-content-{{ event.id }}" class="d-none"> | ||
<ul class='text-start list-unstyled m-0'> | ||
{% for k_, v_ in event.attributes.items %} | ||
{% if "tag" not in k_ %} | ||
<li><b>{{ k_|to_title }}</b>: <span class="font-monospace">{{ v_ }}</span></li> | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{% endif %} | ||
</td> | ||
<td class="col-2 text-start"> | ||
<span class="text-muted"> | ||
{{ event.last_seen|to_datetime|naturaltime }} | ||
</span> | ||
</td> | ||
<td class="col-4 text-center p-2"> | ||
<div class="position-relative m-2"> | ||
<div class="progress" style="height: 2px;"> | ||
<div class="progress-bar" role="progressbar" style="width: 100%;" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div> | ||
</div> | ||
<div class="p-2 position-absolute top-0 start-0 translate-middle badge bg-secondary-light border border-primary text-primary rounded-pill"> | ||
<i class="nf nf-fa-calendar"></i> | ||
{{ event.first_seen|to_datetime }} | ||
</div> | ||
<div class="p-1 position-absolute top-0 start-50 translate-middle badge bg-secondary-light border border-dark text-dark rounded-pill"> | ||
<span class="m-1"><i class="nf nf-fa-bolt"></i> {{ event.count }}</span> | ||
<span class="m-1"><i class="nf nf-md-clock_start"></i> {{ event|humanize_event_duration }}</span> | ||
</div> | ||
<div class="p-2 position-absolute top-0 start-100 translate-middle badge bg-secondary-light border border-primary text-primary rounded-pill"> | ||
<i class="nf nf-fa-calendar"></i> | ||
{{ event.last_seen|to_datetime }} | ||
</div> | ||
</div> | ||
</td> | ||
<td class="col-1 text-end"> | ||
<button class="btn btn-sm bg-primary text-white investigate-add-entity-btn" | ||
data-bs-toggle="tooltip" data-bs-title="Import to the current case" | ||
type="button" data-obj-id="{{ event.id }}"> | ||
<i class="nf nf-fa-plus"></i> | ||
</button> | ||
</td> | ||
</tr> |