aboutsummaryrefslogtreecommitdiffstats
path: root/python/report_ops/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/report_ops/utils.py')
-rw-r--r--python/report_ops/utils.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/python/report_ops/utils.py b/python/report_ops/utils.py
index a108c0cd..5ca1a155 100644
--- a/python/report_ops/utils.py
+++ b/python/report_ops/utils.py
@@ -160,6 +160,44 @@ class GFSMonitor(
)
+class StratMonitor(
+ Monitor,
+ headers=(
+ "periodenddate",
+ "gfstranid1",
+ "invdesc",
+ "knowledgedate",
+ "periodenddate",
+ "port",
+ "strat",
+ ),
+ num_format=[],
+):
+ @classmethod
+ def email(cls, fund):
+ if not cls._staging_queue:
+ return
+ cls._em.send_email(
+ f"Invalid Strategy Issue: {fund}",
+ HTMLBody(
+ f"""
+<html>
+ <head>
+ <style>
+ table, th, td {{ border: 1px solid black; border-collapse: collapse;}}
+ th, td {{ padding: 5px; }}
+ </style>
+ </head>
+ <body>
+ Good morning,<br><br>The below strategies should not exist. Could you please fix this?<br><br>{cls.to_tabulate()}
+ </body>
+</html>"""
+ ),
+ to_recipients=_recipients[fund],
+ cc_recipients=_cc_recipients[fund],
+ )
+
+
class BondMarkMonitor(
Monitor,
headers=(