Skip to content

Commit

Permalink
#108 Get tables with no data hidden, history tables ordered to see mo…
Browse files Browse the repository at this point in the history
…st recent items first (useful for analysts), and other minor cosmetics changes
  • Loading branch information
jeromeleonard committed Nov 3, 2017
1 parent 7aff6ca commit bd74a61
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 51 deletions.
46 changes: 23 additions & 23 deletions thehive-templates/EmergingThreats_DomainInfo_1_0/long.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<div class="report-EmergingThreats" ng-if="success">

<div class="panel panel-info" ng-if="content.reputation != '-' && content.reputation != 'Error'">
<div class="panel panel-info" ng-if="content.reputation && content.reputation != '-' && content.reputation != 'Error'">
<div class="panel-heading">
<strong>Reputation</strong>
</div>
Expand All @@ -19,7 +19,7 @@
</div>
</div>

<div class="panel panel-info" ng-if="content.events != '-' && content.events != 'Error'">
<div class="panel panel-info" ng-if="content.events && content.events != '-' && content.events != 'Error'">
<div class="panel-heading">
<strong>Events</strong>
</div>
Expand All @@ -34,9 +34,9 @@
<th>Source</th>
</tr>
<tr ng-repeat="events in content.events track by $index">
<td>{{ events.count }}</td>
<td align="right">{{ events.count }}</td>
<td>{{ events.date }}</td>
<td>{{ events.domain }}</td>
<td align="center">{{ events.domain || '-' }} </td>
<td>{{ events.sid }}</td>
<td>{{ events.signature }}</td>
<td>{{ events.source }}</td>
Expand All @@ -45,7 +45,7 @@
</div>
</div>

<div class="panel panel-info" ng-if="content.geoloc != '-' && content.geoloc != 'Error'">
<div class="panel panel-info" ng-if="content.geoloc && content.geoloc != '-' && content.geoloc != 'Error'">
<div class="panel-heading">
<strong>Geoloc</strong>
</div>
Expand Down Expand Up @@ -105,87 +105,87 @@
</div>
</div>

<div class="panel panel-info" ng-if="content.ips != '-' && content.ips != 'Error'">
<div class="panel panel-info" ng-if="content.ips && content.ips != '-' && content.ips != 'Error'">
<div class="panel-heading">
<strong>IPs</strong>
</div>
<div class="panel-body">
<table class="table table-hover">
<tr>
<th>First seen</th>
<th>IP</th>
<th>First seen</th>
<th>Last seen</th>
</tr>
<tr ng-repeat="ip in content.ips track by $index">
<td>{{ ip.first_seen }}</td>
<tr ng-repeat="ip in content.ips | orderBy:'-last_seen'">
<td>{{ ip.ip }}</td>
<td>{{ ip.first_seen }}</td>
<td>{{ ip.last_seen }}</td>
</tr>
</table>
</div>
</div>

<div class="panel panel-info" ng-if="content.domains != '-' && content.domains != 'Error'">
<div class="panel panel-info" ng-if="content.domains && content.domains != '-' && content.domains != 'Error'">
<div class="panel-heading">
<strong>Domains</strong>
</div>
<div class="panel-body">
<table class="table table-hover">
<tr>
<th>First seen</th>
<th>Name</th>
<th>First seen</th>
<th>Last seen</th>
</tr>
<tr ng-repeat="domain in content.domains track by $index">
<td>{{ domain.first_seen }}</td>
<tr ng-repeat="domain in content.domains | orderBy:'-last_seen'">
<td>{{ domain.domain }}</td>
<td>{{ domain.first_seen }}</td>
<td>{{ domain.last_seen }}</td>
</tr>
</table>
</div>
</div>

<div class="panel panel-info" ng-if="content.samples != '-' && content.samples != 'Error'">
<div class="panel panel-info" ng-if="content.samples && content.samples != '-' && content.samples != 'Error'">
<div class="panel-heading">
<strong>Samples</strong>
</div>
<div class="panel-body">
<table class="table table-hover">
<tr>
<th>Source</th>
<th>First seen</th>
<th>Last seen</th>
<th>Source</th>
</tr>
<tr ng-repeat="sample in content.samples track by $index">
<tr ng-repeat="sample in content.samples | orderBy:'-last_seen'">
<td>{{ sample.source }}</td>
<td>{{ sample.first_seen }}</td>
<td>{{ sample.last_seen }}</td>
<td>{{ sample.source }}</td>
</tr>
</table>
</div>
</div>

<div class="panel panel-info" ng-if="content.nameservers != '-' && content.nameservers != 'Error'">
<div class="panel panel-info" ng-if="content.nameservers && content.nameservers != '-' && content.nameservers != 'Error'">
<div class="panel-heading">
<strong>Nameservers</strong>
</div>
<div class="panel-body">
<table class="table table-hover">
<tr>
<th>Server</th>
<th>First seen</th>
<th>Last seen</th>
<th>Server</th>
</tr>
<tr ng-repeat="nameserver in content.nameservers track by $index">
<tr ng-repeat="nameserver in content.nameservers | orderBy:'-last_seen' ">
<td>{{ nameserver.server }}</td>
<td>{{ nameserver.first_seen }}</td>
<td>{{ nameserver.last_seen }}</td>
<td>{{ nameserver.server }}</td>
</tr>
</table>
</div>
</div>

<div class="panel panel-info" ng-if="content.reputation != '-' && content.reputation != 'Error'">
<div class="panel panel-info" ng-if="content.reputation && content.reputation != '-' && content.reputation != 'Error'">
<div class="panel-heading">
<strong>Urls</strong>
</div>
Expand All @@ -196,7 +196,7 @@
</div>
</div>

<div class="panel panel-info" ng-if="content.whois != '-' && content.whois != 'Error'">
<div class="panel panel-info" ng-if="content.whois && content.whois != '-' && content.whois != 'Error'">
<div class="panel-heading">
<strong>Whois</strong>
</div>
Expand Down
48 changes: 24 additions & 24 deletions thehive-templates/EmergingThreats_IPInfo_1_0/long.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<div class="report-EmergingThreats" ng-if="success">

<div class="panel panel-info" ng-if="content.reputation != '-' && content.reputation != 'Error'">
<div class="panel panel-info" ng-if="content.reputation && content.reputation != '-' && content.reputation != 'Error'">
<div class="panel-heading">
<strong>Reputation</strong>
</div>
Expand All @@ -19,7 +19,7 @@
</div>
</div>

<div class="panel panel-info" ng-if="content.events != '-' && content.events != 'Error'">
<div class="panel panel-info" ng-if="content.events && content.events != '-' && content.events != 'Error'">
<div class="panel-heading">
<strong>Events</strong>
</div>
Expand All @@ -34,9 +34,9 @@
<th>Source</th>
</tr>
<tr ng-repeat="events in content.events track by $index">
<td>{{ events.count }}</td>
<td align="right">{{ events.count }}</td>
<td>{{ events.date }}</td>
<td>{{ events.domain }}</td>
<td align="center">{{ events.domain || '-' }}</td>
<td>{{ events.sid }}</td>
<td>{{ events.signature }}</td>
<td>{{ events.source }}</td>
Expand All @@ -45,7 +45,7 @@
</div>
</div>

<div class="panel panel-info" ng-if="content.geoloc != '-' && content.geoloc != 'Error'">
<div class="panel panel-info" ng-if="content.geoloc && content.geoloc != '-' && content.geoloc != 'Error'">
<div class="panel-heading">
<strong>Geoloc</strong>
</div>
Expand Down Expand Up @@ -105,87 +105,87 @@
</div>
</div>

<div class="panel panel-info" ng-if="content.ips != '-' && content.ips != 'Error'">
<div class="panel panel-info" ng-if="content.ips && content.ips != '-' && content.ips != 'Error'">
<div class="panel-heading">
<strong>IPs</strong>
</div>
<div class="panel-body">
<table class="table table-hover">
<tr>
<th>First seen</th>
<th>IP</th>
<th>First seen</th>\
<th>Last seen</th>
</tr>
<tr ng-repeat="ip in content.ips track by $index">
<td>{{ ip.first_seen }}</td>
<tr ng-repeat="ip in content.ips | orderBy:'-last_seen'">
<td>{{ ip.ip }}</td>
<td>{{ ip.first_seen }}</td>
<td>{{ ip.last_seen }}</td>
</tr>
</table>
</div>
</div>

<div class="panel panel-info" ng-if="content.domains != '-' && content.domains != 'Error'">
<div class="panel panel-info" ng-if="content.domains && content.domains != '-' && content.domains != 'Error'">
<div class="panel-heading">
<strong>Domains</strong>
</div>
<div class="panel-body">
<table class="table table-hover">
<tr>
<th>First seen</th>
<th>Name</th>
<th>First seen</th>
<th>Last seen</th>
</tr>
<tr ng-repeat="domain in content.domains track by $index">
<td>{{ domain.first_seen }}</td>
<tr ng-repeat="domain in content.domains | orderBy:'-last_seen'">
<td>{{ domain.domain }}</td>
<td>{{ domain.first_seen }}</td>
<td>{{ domain.last_seen }}</td>
</tr>
</table>
</div>
</div>

<div class="panel panel-info" ng-if="content.samples != '-' && content.samples != 'Error'">
<div class="panel panel-info" ng-if="content.samples && content.samples != '-' && content.samples != 'Error'">
<div class="panel-heading">
<strong>Samples</strong>
</div>
<div class="panel-body">
<table class="table table-hover">
<tr>
<th>Source</th>
<th>First seen</th>
<th>Last seen</th>
<th>Source</th>
</tr>
<tr ng-repeat="sample in content.samples track by $index">
<tr ng-repeat="sample in content.samples | orderBy:'-last_seen'">
<td>{{ sample.source }}</td>
<td>{{ sample.first_seen }}</td>
<td>{{ sample.last_seen }}</td>
<td>{{ sample.source }}</td>
</tr>
</table>
</div>
</div>

<div class="panel panel-info" ng-if="content.nameservers != '-' && content.nameservers != 'Error'">
<div class="panel panel-info" ng-if="content.nameservers && content.nameservers != '-' && content.nameservers != 'Error'">
<div class="panel-heading">
<strong>Nameservers</strong>
</div>
<div class="panel-body">
<table class="table table-hover">
<tr>
<th>First seen</th>
<th>Last seen</th>
<th>Server</th>
<th>First seen</th>
<th>Last seen</th>\
</tr>
<tr ng-repeat="nameserver in content.nameservers track by $index">
<tr ng-repeat="nameserver in content.nameservers | orderBy:'-last_seen'">
<td>{{ nameserver.server }}</td>
<td>{{ nameserver.first_seen }}</td>
<td>{{ nameserver.last_seen }}</td>
<td>{{ nameserver.server }}</td>
</tr>
</table>
</div>
</div>

<div class="panel panel-info" ng-if="content.reputation != '-' && content.reputation != 'Error'">
<div class="panel panel-info" ng-if="content.reputation && content.reputation != '-' && content.reputation != 'Error'">
<div class="panel-heading">
<strong>Urls</strong>
</div>
Expand All @@ -196,7 +196,7 @@
</div>
</div>

<div class="panel panel-info" ng-if="content.whois != '-' && content.whois != 'Error'">
<div class="panel panel-info" ng-if="content.whois && content.whois != '-' && content.whois != 'Error'">
<div class="panel-heading">
<strong>Whois</strong>
</div>
Expand Down
12 changes: 8 additions & 4 deletions thehive-templates/EmergingThreats_MalwareInfo_1_0/long.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="panel-heading">
<strong>General Information</strong>
</div>
<div class="panel-body">
<div class="panel-body" ng-if="content.main">
<dl class="dl-horizontal">
<dt>Submit date</dt>
<dd class="wrap">{{ content.main.submit_date }}</dd>
Expand All @@ -26,9 +26,13 @@
<dd class="wrap">{{ content.main.file_size }}</dd>
</dl>
</div>

<div class="panel-body" ng-if="!content.main">
<strong>No data found</strong>
</div>
</div>

<div class="panel panel-info" ng-if="content.events != '-' && content.events != 'Error'">
<div class="panel panel-info" ng-if="content.events && content.events != '-' && content.events != 'Error'">
<div class="panel-heading">
<strong>Events</strong>
</div>
Expand Down Expand Up @@ -60,7 +64,7 @@
</div>
</div>

<div class="panel panel-info" ng-if="content.dns != '-' && content.dns != 'Error'">
<div class="panel panel-info" ng-if="content.dns && content.dns != '-' && content.dns != 'Error'">
<div class="panel-heading">
<strong>Dns</strong>
</div>
Expand All @@ -84,7 +88,7 @@
</div>
</div>

<div class="panel panel-info" ng-if="content.connections != '-' && content.connections != 'Error'">
<div class="panel panel-info" ng-if="content.connections && content.connections != '-' && content.connections != 'Error'">
<div class="panel-heading">
<strong>Connections</strong>
</div>
Expand Down

0 comments on commit bd74a61

Please sign in to comment.