-
Notifications
You must be signed in to change notification settings - Fork 3
/
threatq_view_summarize.html
130 lines (119 loc) · 6 KB
/
threatq_view_summarize.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
{% extends 'widgets/widget_template.html' %}
{% load custom_template %}
{% block title_color %}{{ title_color|default:'white' }}{% endblock %}
{% block title_text_color %}{{ title_text_color|default:'rgb(101, 71, 150)' }}{% endblock %}
{% block body_color %}{{ body_color|default:'white' }}{% endblock %}
{% block body_text_color %}{{ body_text_color|default:'black' }}{% endblock %}
{% block custom_title_prop %}{% if title_logo %}style="background-size: auto 60%; background-position: 50%; background-repeat: no-repeat; background-image: url('/app_resource/{{ title_logo }}');"{% endif %}{% endblock %}
{% block title1 %}{{ title1 }}{% endblock %}
{% block title2 %}{{ title2 }}{% endblock %}
{% block custom_tools %}
{% endblock %}
{% block widget_content %}
<!-- Main Start Block -->
<!-- File: threatq_view_summarize.html
ThreatQuotient Proprietary and Confidential
Copyright (c) 2016-2024 ThreatQuotient, Inc.
NOTICE: All information contained herein, is, and remains the property of ThreatQuotient, Inc.
The intellectual and technical concepts contained herein are proprietary to ThreatQuotient, Inc.
and its suppliers and may be covered by U.S. and Foreign Patents, patents in process, and are
protected by trade secret or copyright law.
Dissemination of this information or reproduction of this material is strictly forbidden unless prior
written permission is obtained from ThreatQuotient, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions
and limitations under the License.
-->
<div style="overflow: auto; width: 100%; height: 100%; padding-left:10px; padding-right:10px">
<!-- Main Div -->
{% if results %}
{% for response in results %}
<br>
{% if response.data %}
{% for data in response.data %}
<div class="row">
<div class="col-md-8">
<h2 style="overflow-wrap: break-word;">
{{ data.display_value }}
<small>{{ data.status.name }}</small>
</h2>
</div>
<div class="col-md-4">
{% if data.score == 10 %}
<h2><span class="label label-danger">{{ data.score }}</span></h2>
{% elif data.score >= 7 %}
<h2><span class="label label-warning">{{ data.score }}</span></h2>
{% else %}
<h2><span class="label label-default">{{ data.score }}</span></h2>
{% endif %}
</div>
</div>
<a style="color: #fff;" href="{{ data.host }}/{{ data.api_name }}/{{ data.id }}/details" target="_blank">View in ThreatQ</a>
{% if data.attributes %}
<h3>Attributes</h3>
<table id="tq_table_{{ data.id }}" class="table dataTable no-footer">
<thead>
<th>Name</th>
<th>Value</th>
</thead>
<tbody>
{% for attribute in data.attributes %}
<tr>
<td>{{ attribute.name }}</td>
<td>{{ attribute.value }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% for obj_key, obj_values in data.items %}
{% if obj_key in response.object_types and obj_values|length > 0 %}
<h3>Related {{ obj_key }}</h3>
<table id="tq_table_{{ obj_key }}_{{ data.id }}" class="table dataTable no-footer">
<thead>
<th>Value</th>
<th>Link</th>
</thead>
<tbody>
{% for rel in obj_values %}
<tr>
<td>
{% if rel.value %}
{{ rel.value }}
{% elif rel.name %}
{{ rel.name }}
{% elif rel.title %}
{{ rel.title }}
{% else %}
N/A
{% endif %}
</td>
<td><a target="_blank" href="{{ data.host }}/{{ obj_key }}/{{ rel.id }}/details">View in ThreatQ</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% else %}
<h4>No data found</h4>
{% endif %}
{% endfor %}
{% else %}
<h4>No data found</h4>
{% endif %}
</div>
<!-- Main Div -->
<script type="text/javascript">
$(window).load(function () {
$('[id^=tq_table]').DataTable();
});
</script>
{% endblock %}
<!-- Main Start Block -->