Skip to content

Commit e6e77d1

Browse files
committed
merging tooltips into subtechniques-2.1
2 parents b85b25d + 805a4b6 commit e6e77d1

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
### Fixes
3737
- added internet explorer for sub-techniques matrix. Improved behavior of sub-techniques matrix in Edge browser. See issue [#114](https://github.com/mitre-attack/attack-website/issues/114).
3838
- added horizontal scroll indicators to matrices so that it's easier to tell when there's more to the left or right. See issue [#93](https://github.com/mitre-attack/attack-website/issues/93).
39+
- Added tooltips to all matrices to show tactic IDs, technique IDs, and subtechnique IDs when hovering over tactic names, technique names, and subtechnique names. See issue [#120](https://github.com/mitre-attack/attack-website/issues/120).
40+
- The site is now easier to rebrand; color themes and logos can now be changed with simple modifications to the site code. See issue[#80](https://github.com/mitre-attack/attack-website/issues/80)
3941

4042
## ATT&CK Website version 2.0
4143
### New Features
@@ -65,7 +67,6 @@
6567
- Lists within data cards, e.g the platforms of a technique, are now in alphabetical order. See issue [#84](https://github.com/mitre-attack/attack-website/issues/84).
6668
- Matrix timestamps are now calculated from the modified date on the x-mitre-matrix STIX object. Additionally, said timestamps are now formatted the same as modified dates on other pages of the website. See issue [#27](https://github.com/mitre-attack/attack-website/issues/27).
6769
- Revisions to the layout of the matrix pages to improve readability when multiple matrices occur within a domain.
68-
- The site is now easier to rebrand; color themes and logos can now be changed with simple modifications to the site code. See issue[#80](https://github.com/mitre-attack/attack-website/issues/80)
6970

7071
## [ATT&CK Content version 7.0-beta](https://github.com/mitre/cti/tree/4d3f22d81af2424f3885b4390793ee8eb256d10d)
7172
See release notes [here](https://attack.mitre.org/beta/resources/updates/updates-march-2020/index.html).

attack-theme/templates/macros/matrix.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ <h3 class="text-center matrix-title">{{matrix.name}}</h3>
9999
<thead>
100100
<tr>
101101
{% for tactic in tactics %}
102-
<td class="tactic name"><a href="{{tactic.url}}">{{tactic.name}}</a></td>
102+
<td class="tactic name"><a href="{{tactic.url}}" data-toggle="tooltip" data-placement="top" title="{{tactic.external_id}}">{{tactic.name}}</a></td>
103103
{% endfor %}
104104
</tr>
105105
<tr>
@@ -158,7 +158,7 @@ <h3 class="text-center matrix-title">{{matrix.name}}</h3>
158158
<thead>
159159
<tr>
160160
{% for tactic in tactics %}
161-
<td class="tactic name"><a href="{{tactic.url}}">{{tactic.name}}</a></td>
161+
<td class="tactic name"><a href="{{tactic.url}}" data-toggle="tooltip" data-placement="top" title="{{tactic.external_id}}">{{tactic.name}}</a></td>
162162
{% endfor %}
163163
</tr>
164164
<tr>
@@ -228,7 +228,8 @@ <h3 class="text-center matrix-title">{{matrix.name}}</h3>
228228

229229
<!-- Helper macro for creating a [sub]technique cell. Param is a Technique (defined above) and boolean noting whether or not it is a subtechnique-->
230230
{% macro technique_cell(technique, is_supertechnique) %}
231+
231232
<div class="technique-cell {% if is_supertechnique %} supertechniquecell{% endif %}{% if technique.color %} colored{% endif %}" {% if technique.color %} style="background: {{technique.color}}"{% endif %}>
232-
<a href="{{technique.url}}">{{technique.name}}{% if technique.subtechniques | length > 0 %}&nbsp;<sub>({{technique.subtechniques | length}})</sub>{% endif %}</a>
233+
<a href="{{technique.url}}" data-toggle="tooltip" data-placement="top" title="{{technique.external_id}}">{{technique.name}}{% if technique.subtechniques | length > 0 %}&nbsp;<sub>({{technique.subtechniques | length}})</sub>{% endif %}</a>
233234
</div>
234235
{% endmacro %}

modules/matrix.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ def transform_technique(technique, tactic_id):
9090
"id": technique["id"],
9191
"name": technique["name"],
9292
"url": technique["external_references"][0]["url"].split("attack.mitre.org")[1],
93-
"x_mitre_platforms": technique.get("x_mitre_platforms")
93+
"x_mitre_platforms": technique.get("x_mitre_platforms"),
94+
"external_id": technique["external_references"][0]["external_id"]
9495
}
9596

9697
if technique["id"] in config.subtechniques_of:
@@ -129,6 +130,7 @@ def transform_tactic(tactic_id):
129130
"id": tactic_id,
130131
"name": tactic_obj["name"],
131132
"url": tactic_obj["external_references"][0]["url"].split("attack.mitre.org")[1],
133+
"external_id": tactic_obj["external_references"][0]["external_id"],
132134
"techniques": techniques_in_tactic(tactic_id),
133135
}
134136

0 commit comments

Comments
 (0)