-
-
-
+
+
@@ -189,7 +192,7 @@
-
+
|
@@ -227,13 +230,13 @@
-
+
-
+
- {% if BasicDetails['src_ip'] %}
-
+ {% if BasicDetails['src_ip'] %}
-
+
- {% endif %}
-
-
+ {% endif %}
+
-
+
- {% if BasicDetails['useragent'] %}
-
+ {% if BasicDetails['useragent'] %}
-
+
- {% endif %}
- {% if BasicDetails['location'] %}
-
+ {% endif %}{% if BasicDetails['pwa_location'] %}
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+ Location
+ {{BasicDetails.get('pwa_location', None)}}
+ |
+
+
+ |
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+ {% endif %}{% if BasicDetails['location'] %}
+
+
+
+
+
+
- {% endif %}
- {% if BasicDetails['log4_shell_computer_name'] %}
-
+ {% endif %}{% if BasicDetails['log4_shell_computer_name'] %}
-
+
- {% endif %}
- {% if BasicDetails['sql_username'] %}
-
+ {% endif %}{% if BasicDetails['sql_username'] %}
-
+
- {% endif %}
- {% if BasicDetails['aws_key_log_data'] and BasicDetails['aws_key_log_data']['service_used'] %}
-
+ {% endif %}{% if BasicDetails['aws_key_log_data'] and BasicDetails['aws_key_log_data']['service_used'] %}
-
+
- {% endif %}
- {% if BasicDetails['cmd_process'] or BasicDetails['cmd_computer_name'] or BasicDetails['cmd_user_name']%}
-
+ {% endif %}{% if BasicDetails['cmd_process'] or BasicDetails['cmd_computer_name'] or BasicDetails['cmd_user_name']%}
-
+
- {% endif %}
- {% if BasicDetails['merchant'] or BasicDetails['amount']%}
-
+ {% endif %}{% if BasicDetails['merchant'] or BasicDetails['amount']%}
-
+
- {% endif %}
- {% if BasicDetails['token_type'] == 'credit_card_v2' %}
-
+ {% endif %}{% if BasicDetails['token_type'] == 'credit_card_v2' %}
-
+
- {% endif %}
- {% if BasicDetails['generic_data'] %}
-
+ {% endif %}{% if BasicDetails['generic_data'] %}
-
+
- {% endif %}
- {% if BasicDetails['referer'] %}
-
+ {% endif %}{% if BasicDetails['referer'] %}
-
+
- {% endif %}
- {% if BasicDetails['referrer'] %}
-
+ {% endif %}{% if BasicDetails['referrer'] %}
-
+
- {% endif %}
- {% if BasicDetails['request_args'] %}
-
+ {% endif %}{% if BasicDetails['request_args'] %}
-
+
- {% endif %}
- {% if BasicDetails['token'] %}
-
+ {% endif %}{% if BasicDetails['token'] %}
-
+
- {% endif %}
-
-
+ {% endif %}
+
-
+
@@ -1150,13 +1179,15 @@
-
+ |
|
@@ -1168,13 +1199,15 @@
-
+ |
|
@@ -1195,13 +1228,13 @@
-
+
-
+
@@ -1233,7 +1266,7 @@
-
+
-
+
-
+
-
+
-
+
@@ -1314,4 +1347,4 @@
-
\ No newline at end of file
+
diff --git a/templates/emails/notification.mjml b/templates/emails/notification.mjml
index d6cd64a9b..099e93e8e 100644
--- a/templates/emails/notification.mjml
+++ b/templates/emails/notification.mjml
@@ -173,6 +173,30 @@
{% endif %}
+
+ {% if BasicDetails['pwa_location'] %}
+
+
+
+
+
+
+
+
+ |
+
+ Location
+ {{BasicDetails.get('pwa_location', None)}}
+ |
+
+
+
+
+
+
+
+ {% endif %}
+
{% if BasicDetails['location'] %}
diff --git a/tests/units/test_channel_output_email.py b/tests/units/test_channel_output_email.py
index ec94c5a07..21c3b3073 100644
--- a/tests/units/test_channel_output_email.py
+++ b/tests/units/test_channel_output_email.py
@@ -40,7 +40,10 @@ def test_dns_rendered_html(settings: SwitchboardSettings):
additional_data={},
)
email_template = EmailOutputChannel.format_report_html(
- details, Path(f"{settings.TEMPLATES_PATH}/emails/notification.html")
+ details,
+ Path(
+ f"{settings.TEMPLATES_PATH}/emails/_generated_dont_edit_notification.html"
+ ),
)
assert "https://some.link/manage/here" in email_template
assert "https://some.link/history/here" in email_template
@@ -61,7 +64,10 @@ def test_slow_redirect_rendered_html(settings: SwitchboardSettings):
},
)
email_template = EmailOutputChannel.format_report_html(
- details, Path(f"{settings.TEMPLATES_PATH}/emails/notification.html")
+ details,
+ Path(
+ f"{settings.TEMPLATES_PATH}/emails/_generated_dont_edit_notification.html"
+ ),
)
assert "https://some.link/manage/here" in email_template
assert "https://some.link/history/here" in email_template
@@ -82,7 +88,10 @@ def test_cloned_site_rendered_html(settings: SwitchboardSettings):
},
)
email_template = EmailOutputChannel.format_report_html(
- details, Path(f"{settings.TEMPLATES_PATH}/emails/notification.html")
+ details,
+ Path(
+ f"{settings.TEMPLATES_PATH}/emails/_generated_dont_edit_notification.html"
+ ),
)
assert "https://some.link/manage/here" in email_template
assert "https://some.link/history/here" in email_template
@@ -102,7 +111,10 @@ def test_log4shell_rendered_html(settings: SwitchboardSettings):
},
)
email_template = EmailOutputChannel.format_report_html(
- details, Path(f"{settings.TEMPLATES_PATH}/emails/notification.html")
+ details,
+ Path(
+ f"{settings.TEMPLATES_PATH}/emails/_generated_dont_edit_notification.html"
+ ),
)
assert "https://some.link/manage/here" in email_template
assert "https://some.link/history/here" in email_template
@@ -122,7 +134,10 @@ def test_aws_keys_safetynet_rendered_html(settings: SwitchboardSettings):
},
)
email_template = EmailOutputChannel.format_report_html(
- details, Path(f"{settings.TEMPLATES_PATH}/emails/notification.html")
+ details,
+ Path(
+ f"{settings.TEMPLATES_PATH}/emails/_generated_dont_edit_notification.html"
+ ),
)
assert "https://some.link/manage/here" in email_template
assert "https://some.link/history/here" in email_template
@@ -164,7 +179,10 @@ def test_sendgrid_send(
result, message_id = sendgrid_send(
api_key=settings.SENDGRID_API_KEY,
email_content_html=EmailOutputChannel.format_report_html(
- details, Path(f"{settings.TEMPLATES_PATH}/emails/notification.html")
+ details,
+ Path(
+ f"{settings.TEMPLATES_PATH}/emails/_generated_dont_edit_notification.html"
+ ),
),
email_address=EmailStr(email),
from_email=settings.ALERT_EMAIL_FROM_ADDRESS,
@@ -199,7 +217,10 @@ def test_mailgun_send(
details = _get_send_token_details()
result, message_id = mailgun_send(
email_content_html=EmailOutputChannel.format_report_html(
- details, Path(f"{settings.TEMPLATES_PATH}/emails/notification.html")
+ details,
+ Path(
+ f"{settings.TEMPLATES_PATH}/emails/_generated_dont_edit_notification.html"
+ ),
),
email_content_text=EmailOutputChannel.format_report_text(details),
email_address=EmailStr(email),
@@ -226,7 +247,10 @@ def test_smtp_send(
details = _get_send_token_details()
result, message_id = smtp_send(
email_content_html=EmailOutputChannel.format_report_html(
- details, Path(f"{settings.TEMPLATES_PATH}/emails/notification.html")
+ details,
+ Path(
+ f"{settings.TEMPLATES_PATH}/emails/_generated_dont_edit_notification.html"
+ ),
),
email_content_text=EmailOutputChannel.format_report_text(details),
email_address=EmailStr("tokens-testing@thinkst.com"),
| | | | | | | | | | | | | | | | | | | |