This is an automated email from the ASF dual-hosted git repository.

akshayrai09 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 5618e3f  [TE] Clean up the email template (#4019)
5618e3f is described below

commit 5618e3f315bfac864e358702f2b5af1f76b58794
Author: Akshay Rai <[email protected]>
AuthorDate: Wed Mar 27 08:15:35 2019 -0700

    [TE] Clean up the email template (#4019)
---
 .../MultipleAnomaliesEmailContentFormatter.java    |   4 +-
 .../anomaly/alert/util/AnomalyReportGenerator.java |   4 +-
 .../thirdeye/detector/holiday-anomaly-report.ftl   | 239 ++++++++++-----------
 .../detector/multiple-anomalies-email-template.ftl | 168 ---------------
 .../onboard-notification-email-template.ftl        |   5 +-
 .../detector/single-anomaly-email-template.ftl     |  90 --------
 ...multiple-anomalies-email-content-formatter.html |  25 ++-
 ...board-notification-email-content-formatter.html |   5 +-
 8 files changed, 133 insertions(+), 407 deletions(-)

diff --git 
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/alert/content/MultipleAnomaliesEmailContentFormatter.java
 
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/alert/content/MultipleAnomaliesEmailContentFormatter.java
index e0e6e43..80c8bc2 100644
--- 
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/alert/content/MultipleAnomaliesEmailContentFormatter.java
+++ 
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/alert/content/MultipleAnomaliesEmailContentFormatter.java
@@ -190,8 +190,8 @@ public class MultipleAnomaliesEmailContentFormatter extends 
BaseEmailContentForm
     templateData.put("anomalyDetails", anomalyDetails);
     templateData.put("anomalyIds", Joiner.on(",").join(anomalyIds));
     templateData.put("holidays", holidays);
-    templateData.put("functionAnomalyDetails", functionAnomalyReports.asMap());
-    templateData.put("metricAnomalyDetails", metricAnomalyReports.asMap());
+    templateData.put("detectionToAnomalyDetailsMap", 
functionAnomalyReports.asMap());
+    templateData.put("metricToAnomalyDetailsMap", 
metricAnomalyReports.asMap());
     templateData.put("functionToId", functionToId);
   }
 }
diff --git 
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/anomaly/alert/util/AnomalyReportGenerator.java
 
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/anomaly/alert/util/AnomalyReportGenerator.java
index 38c29b5..ac8eb01 100644
--- 
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/anomaly/alert/util/AnomalyReportGenerator.java
+++ 
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/anomaly/alert/util/AnomalyReportGenerator.java
@@ -269,8 +269,8 @@ public class AnomalyReportGenerator {
       templateData.put("falseAlertCount", 
precisionRecallEvaluator.getFalseAlarm());
       templateData.put("newTrendCount", 
precisionRecallEvaluator.getTrueAnomalyNewTrend());
       templateData.put("anomalyDetails", anomalyReports);
-      templateData.put("functionAnomalyDetails", 
functionAnomalyReports.asMap());
-      templateData.put("metricAnomalyDetails", metricAnomalyReports.asMap());
+      templateData.put("detectionToAnomalyDetailsMap", 
functionAnomalyReports.asMap());
+      templateData.put("metricToAnomalyDetailsMap", 
metricAnomalyReports.asMap());
       templateData.put("emailSubjectName", emailSubjectName);
       templateData.put("alertConfigName", alertConfig.getName()); // NOTE: 
breaks backwards compatibility
       templateData.put("includeSummary", includeSummary);
diff --git 
a/thirdeye/thirdeye-pinot/src/main/resources/org/apache/pinot/thirdeye/detector/holiday-anomaly-report.ftl
 
b/thirdeye/thirdeye-pinot/src/main/resources/org/apache/pinot/thirdeye/detector/holiday-anomaly-report.ftl
index 2028296..1db6510 100644
--- 
a/thirdeye/thirdeye-pinot/src/main/resources/org/apache/pinot/thirdeye/detector/holiday-anomaly-report.ftl
+++ 
b/thirdeye/thirdeye-pinot/src/main/resources/org/apache/pinot/thirdeye/detector/holiday-anomaly-report.ftl
@@ -5,12 +5,12 @@
 </head>
 
 <body style="background-color: #EDF0F3;">
-<table border="0" cellpadding="0" cellspacing="0" style="width:100%; 
font-family: 'Proxima Nova','Arial','Helvetica Neue',Helvetica,sans-serif; 
font-size:14px; margin:0 auto; max-width: 50%; background-color: #F3F6F8;">
+<table border="0" cellpadding="0" cellspacing="0" style="width:100%; 
font-family: 'Proxima Nova','Arial','Helvetica Neue',Helvetica,sans-serif; 
font-size:14px; margin:0 auto; max-width: 50%; min-width: 700px; 
background-color: #F3F6F8;">
   <tr>
     <td align="left" style="padding: 12px 24px;">
       <img width="35" height="35" alt="logo" 
src="https://static.licdn-ei.com/scds/common/u/images/email/logos/logo_shift_inbug_82x82_v1.png";
            style="vertical-align: middle; display: inline-block; background: 
white;">
-      <span style="color: rgba(0,0,0,0.75);font-size: 18px; font-weight: bold; 
letter-spacing: 2px; display: inline-block;vertical-align: 
middle;">THIRDEYE</span>
+      <span style="color: rgba(0,0,0,0.75);font-size: 18px; font-weight: bold; 
letter-spacing: 2px; display: inline-block;vertical-align: middle;">THIRDEYE 
ALERT</span>
     </td>
   </tr>
 
@@ -18,144 +18,138 @@
     <td>
       <table border="0" cellpadding="0" cellspacing="0" style="border:1px 
solid #E9E9E9; border-radius: 2px; width: 100%;">
         <tr>
-          <td style="padding: 12px; background-color: #0073B1; color: #FFF; 
text-align: center;">
-            <h2>ACTION REQUIRED</h2>
+          <td style="font-size: 16px; padding: 12px; background-color: 
#0073B1; color: #FFF; text-align: center;">
+            <#if anomalyCount == 1>
+              <p>
+                <strong>An anomaly</strong> was detected between 
<strong>${startTime}</strong> and <strong>${endTime}</strong> (${timeZone}) on 
the metric listed below
+              </p>
+            <#else>
+              <p>
+                <strong>${anomalyCount} anomalies</strong> were detected 
between <strong>${startTime}</strong> and <strong>${endTime}</strong> 
(${timeZone}) on the metrics listed below
+              </p>
+            </#if>
             <p>
-              <#if anomalyCount == 1>
-                <strong>An anomaly</strong> was detected between 
<strong>${startTime} and ${endTime} (${timeZone})</strong>
-              <#else>
-                <strong>${anomalyCount} anomalies</strong> were detected 
between <strong>${startTime} and ${endTime} (${timeZone})</strong>
-              </#if>
-              <#if metricsMap?size == 1>
-                <#list metricsMap?keys as id>
-                  on metric <div style="padding: 10px;"><strong><a 
style="color: white;" 
href="${dashboardHost}/app/#/rootcause?metricId=${id}">${metricsMap[id].name}</a></strong></div>
-                </#list>
-              <#else>
-                on metrics
-                <#list metricsMap?keys as id>
-                  <div style="padding: 10px;">
-                    <strong><a style="padding: 10px; color: white;" 
href="${dashboardHost}/app/#/rootcause?metricId=${id}">${metricsMap[id].name}</a></strong>
-                  </div>
-                </#list>
-              </#if>
-            </p>
-            <p>
-              <#if isGroupedAnomaly>
-                <a style="padding: 6px 12px; border-radius: 2px; border: 1px 
solid #FFF; font-size: 16px; font-weight: bold; color: white; text-decoration: 
none; line-height: 32px;" 
href="${dashboardHost}/thirdeye#anomalies?anomaliesSearchMode=groupId&anomalyGroupIds=${groupId}">Investigate
 all in ThirdEye</a>
-              <#else>
-                <a style="padding: 6px 12px; border-radius: 2px; border: 1px 
solid #FFF; font-size: 16px; font-weight: bold; color: white; text-decoration: 
none; line-height: 32px;" 
href="${dashboardHost}/thirdeye#anomalies?anomaliesSearchMode=id&anomalyIds=${anomalyIds}">Investigate
 all in ThirdEye</a>
-              </#if>
+              <a style="padding: 6px 12px; border-radius: 2px; border: 1px 
solid #FFF; font-size: 16px; font-weight: bold; color: white; text-decoration: 
none; line-height: 32px;" 
href="${dashboardHost}/thirdeye#anomalies?anomaliesSearchMode=id&anomalyIds=${anomalyIds}">View
 on ThirdEye</a>
             </p>
           </td>
         </tr>
 
-          <#if cid?has_content>
-            <tr>
-              <td style="padding: 12px;" align="center">
-                <a 
href="${anomalyDetails[0].anomalyURL}${anomalyDetails[0].anomalyId}" 
target="_blank">
-                  <img style="width: 70%;" src="cid:${cid}" \>
-                </a>
-              </td>
-            </tr>
-          </#if>
-
-          <#list metricAnomalyDetails?keys as metric>
-            <@utils.addBlock title="" align="left">
+        <#if cid?has_content>
+          <tr>
+            <td style="padding: 12px;" align="center">
+              <a 
href="${anomalyDetails[0].anomalyURL}${anomalyDetails[0].anomalyId}" 
target="_blank">
+                <img style="width: 70%;" src="cid:${cid}" \>
+              </a>
+            </td>
+          </tr>
+        </#if>
+
+        <!-- List all the alerts -->
+        <#list metricToAnomalyDetailsMap?keys as metric>
+          <@utils.addBlock title="" align="left">
+            <p>
+              <span style="color: #606060; font-size: 20px;">Metric</span>
+              <span style="color: #1D1D1D; font-size: 20px; font-weight: 
bold;">${metric}</span>
+            </p>
+
+            <!-- List down all the alerts for the given metric -->
+            <#list detectionToAnomalyDetailsMap?keys as detectionName>
+              <#assign newTable = false>
+              <#list detectionToAnomalyDetailsMap[detectionName] as anomaly>
+                <#if anomaly.metric==metric>
+                  <#assign newTable=true>
+                  <#assign description=anomaly.funcDescription>
+                </#if>
+              </#list>
+
+              <#if newTable>
                 <p>
-                  <span style="color: #606060; font-size: 20px;">Metric</span>
-                  <span style="color: #1D1D1D; font-size: 20px; font-weight: 
bold;">${metric}</span>
+                  <span style="color: #606060;">Alert</span>
+                  <span style="color: #1D1D1D; text-decoration: none; 
font-weight: bold;">${detectionName}</span>
+                  <a 
href="${dashboardHost}/app/#/manage/explore/${functionToId[detectionName]?string.computer}"
 target="blank" style="text-decoration: none; color: #0B5EA1; font-weight: 
bold;">(Edit Settings)</a>
                 </p>
-                <#list functionAnomalyDetails?keys as function>
-                  <#assign newTable = false>
-                  <#list functionAnomalyDetails[function] as anomaly>
-                    <#if anomaly.metric==metric>
-                      <#assign newTable=true>
-                      <#assign description=anomaly.funcDescription>
+              </#if>
+
+              <!-- List all the anomalies under this detection -->
+              <table border="0" width="100%" align="center" style="width:100%; 
padding:0; margin:0; border-collapse: collapse;text-align:left;">
+                <#list detectionToAnomalyDetailsMap[detectionName] as anomaly>
+                  <#if anomaly.metric==metric>
+                    <#if newTable>
+                      <tr style="text-align:center; background-color: #F6F8FA; 
border-top: 2px solid #C7D1D8; border-bottom: 2px solid #C7D1D8;">
+                        <th style="text-align:left; padding: 6px 12px; 
font-size: 12px; font-weight: bold; line-height: 20px;">Start / Duration</th>
+                        <th style="padding: 6px 12px; font-size: 12px; 
font-weight: bold; line-height: 20px;">Dimensions</th>
+                        <th style="padding: 6px 12px; font-size: 12px; 
font-weight: bold; line-height: 20px;">Current</th>
+                        <th style="padding: 6px 12px; font-size: 12px; 
font-weight: bold; line-height: 20px;">Predicted</th>
+                      </tr>
                     </#if>
-                  </#list>
-                  <#if newTable>
-                  <p>
-                    <span style="color: #606060;">Alert</span>
-                    <span style="color: #1D1D1D; text-decoration: none;  
font-weight: bold;">${function}</span>
-                    <a 
href="${dashboardHost}/app/#/manage/explore/${functionToId[function]?string.computer}"
 target="blank" style="text-decoration: none; color: #0B5EA1; font-weight: 
bold;">(View/Edit Alert)</a>
-                    <#-- TODO: Enable after migration -->
-                    <#--<span style="color: #1D1D1D; text-decoration: 
none;">${description}</span>-->
-                  </p>
+                    <#assign newTable = false>
+                    <tr style="border-bottom: 1px solid #C7D1D8;">
+                      <td style="padding: 6px 12px;white-space: nowrap;">
+                        <a style="font-weight: bold; text-decoration: none; 
font-size:14px; line-height:20px; color: #0073B1;" 
href="${anomaly.anomalyURL}${anomaly.anomalyId}"
+                           target="_blank">${anomaly.startDateTime} 
${anomaly.timezone}</a>
+                        <div style="color: rgba(0,0,0,0.6); font-size:12px; 
line-height:16px;">${anomaly.duration}</div>
+                      </td>
+                      <td style="word-break: break-all; width: 200px; 
padding-right:4px 20px 4px 0">
+                        <#list anomaly.dimensions as dimension>
+                          <span style="color: rgba(0,0,0,0.6); font-size: 
12px; line-height: 16px;">${dimension}</span>
+                          </br>
+                        </#list>
+                      </td>
+                      <td style="color: rgba(0,0,0,0.9); font-size:14px; 
line-height:20px; text-align:center;">${anomaly.currentVal}</td>
+                      <td style="color: rgba(0,0,0,0.9); font-size:14px; 
line-height:20px; text-align:center;">
+                        ${anomaly.baselineVal}
+                        <div style="font-size: 12px; 
color:${anomaly.positiveLift?string('#3A8C18','#ee1620')};">(${anomaly.positiveLift?string('+','')}${anomaly.lift})</div>
+                      </td>
+                    </tr>
                   </#if>
-                  <table border="0" width="100%" align="center" 
style="width:100%; padding:0; margin:0; border-collapse: 
collapse;text-align:left;">
-                    <#list functionAnomalyDetails[function] as anomaly>
-                      <#if anomaly.metric==metric>
-                        <#if newTable>
-                          <tr style="text-align:center; background-color: 
#F6F8FA; border-top: 2px solid #C7D1D8; border-bottom: 2px solid #C7D1D8;">
-                            <th style="text-align:left; padding: 6px 12px; 
font-size: 12px; font-weight: bold; line-height: 20px;">Start / Duration</th>
-                            <th style="padding: 6px 12px; font-size: 12px; 
font-weight: bold; line-height: 20px;">Dimensions</th>
-                            <th style="padding: 6px 12px; font-size: 12px; 
font-weight: bold; line-height: 20px;">Current</th>
-                            <th style="padding: 6px 12px; font-size: 12px; 
font-weight: bold; line-height: 20px;">Predicted</th>
-                            <th style="padding: 6px 12px; font-size: 12px; 
font-weight: bold; line-height: 20px; display: none;">Wow</th>
-                            <th style="padding: 6px 12px; font-size: 12px; 
font-weight: bold; line-height: 20px; display: none;">Wo2W</th>
-                          </tr>
-                        </#if>
-                        <#assign newTable = false>
-                        <tr style="border-bottom: 1px solid #C7D1D8;">
-                          <td style="padding: 6px 12px;white-space: nowrap;">
-                            <a style="font-weight: bold; text-decoration: 
none; font-size:14px; line-height:20px; color: #0073B1;" 
href="${anomaly.anomalyURL}${anomaly.anomalyId}"
-                               target="_blank">${anomaly.startDateTime} 
${anomaly.timezone}</a>
-                            <div style="color: rgba(0,0,0,0.6); 
font-size:12px; line-height:16px;">${anomaly.duration}</div>
-                          </td>
-                          <td style="word-break: break-all; width: 200px; 
padding-right:4px 20px 4px 0">
-                            <#list anomaly.dimensions as dimension>
-                              <span style="color: rgba(0,0,0,0.6); font-size: 
12px; line-height: 16px;">${dimension}</span>
-                              </br>
-                            </#list>
-                          </td>
-                          <td style="color: rgba(0,0,0,0.9); font-size:14px; 
line-height:20px; text-align:center;">${anomaly.currentVal}</td>
-                          <td style="color: rgba(0,0,0,0.9); font-size:14px; 
line-height:20px; text-align:center;">
-                            ${anomaly.baselineVal}
-                            <div style="font-size: 12px; 
color:${anomaly.positiveLift?string('#3A8C18','#ee1620')};">(${anomaly.positiveLift?string('+','')}${anomaly.lift})</div>
-                          </td>
-                        </tr>
-                      </#if>
-                    </#list>
-                  </table>
                 </#list>
-            </@utils.addBlock>
-          </#list>
+              </table>
+            </#list>
+
+          </@utils.addBlock>
+        </#list>
 
-          <#if referenceLinks?has_content>
-            <@utils.addBlock title="Useful Links" align="left">
+        <!-- Reference Links -->
+        <#if referenceLinks?has_content>
+          <@utils.addBlock title="Useful Links" align="left">
+            <table border="0" align="center" style="table-layout: fixed; 
width:100%; padding:0; margin:0; border-collapse: collapse; text-align:left;">
               <#list referenceLinks?keys as referenceLinkKey>
-                <div style="padding: 10px;">
-                  <a href="${referenceLinks[referenceLinkKey]}" 
style="font-weight: bold; text-decoration: none; 
color:#0073B1;">${referenceLinkKey}</a>
-                </div>
+                <tr style="border-bottom: 1px solid #C7D1D8; padding: 16px;">
+                  <td style="padding: 6px 12px;">
+                    <a href="${referenceLinks[referenceLinkKey]}" 
style="text-decoration: none; color:#0073B1; font-size:12px; 
font-weight:bold;">${referenceLinkKey}</a>
+                  </td>
+                </tr>
               </#list>
-            </@utils.addBlock>
-          </#if>
+            </table>
+          </@utils.addBlock>
+        </#if>
 
-          <#if holidays?has_content>
-            <@utils.addBlock title="Holidays" align="left">
-              <table border="0" align="center" style="table-layout: fixed; 
width:100%; padding:0; margin:0; border-collapse: collapse; text-align:left;">
-                <#list holidays as holiday>
-                  <tr style="border-bottom: 1px solid #C7D1D8; padding: 16px;">
+        <!-- Holidays -->
+        <#if holidays?has_content>
+          <@utils.addBlock title="Holidays" align="left">
+            <table border="0" align="center" style="table-layout: fixed; 
width:100%; padding:0; margin:0; border-collapse: collapse; text-align:left;">
+              <#list holidays as holiday>
+                <tr style="border-bottom: 1px solid #C7D1D8; padding: 16px;">
 
-                    <td style="padding: 6px 12px;">
-                      <a 
href="https://www.google.com/search?q=${holiday.name}"; style="text-decoration: 
none; color:#0073B1; font-size:12px; font-weight:bold;">${holiday.name}</a>
-                    </td>
+                  <td style="padding: 6px 12px;">
+                    <a href="https://www.google.com/search?q=${holiday.name}"; 
style="text-decoration: none; color:#0073B1; font-size:12px; 
font-weight:bold;">${holiday.name}</a>
+                  </td>
 
+                  <td style="padding: 6px 12px;">
+                    <span style="font-size: 12px; 
color:#606060;">(${holiday.startTime?number_to_date})</span>
+                  </td>
+
+                  <#if holiday.targetDimensionMap["countryCode"]??>
                     <td style="padding: 6px 12px;">
-                      <span style="font-size: 12px; 
color:#606060;">(${holiday.startTime?number_to_date})</span>
+                      <span style="color: rgba(0,0,0,0.6); font-size: 
12px;">${holiday.targetDimensionMap["countryCode"]?join(", ")}</span>
                     </td>
+                  </#if>
 
-                    <#if holiday.targetDimensionMap["countryCode"]??>
-                      <td style="padding: 6px 12px;">
-                        <span style="color: rgba(0,0,0,0.6); font-size: 
12px;">${holiday.targetDimensionMap["countryCode"]?join(", ")}</span>
-                      </td>
-                    </#if>
-
-                  </tr>
-                </#list>
-              </table>
-            </@utils.addBlock>
-          </#if>
+                </tr>
+              </#list>
+            </table>
+          </@utils.addBlock>
+        </#if>
 
         <tr>
           <td style="text-align: center; background-color: #EDF0F3; font-size: 
12px; font-family:'Proxima Nova','Arial', 'Helvetica Neue',Helvetica, 
sans-serif; color: #737373; padding: 12px;">
@@ -165,9 +159,6 @@
               If you have any questions regarding this report, please email
               <a style="color: #33aada;" 
href="mailto:[email protected]"; 
target="_top">[email protected]</a>
             </p>
-            <p style="margin-bottom:0; margin-top: 24px;">
-              &#169; 2017, LinkedIn Corporation, 1000 W Maude Ave, CA 94085, 
USA
-            </p>
           </td>
         </tr>
       </table>
diff --git 
a/thirdeye/thirdeye-pinot/src/main/resources/org/apache/pinot/thirdeye/detector/multiple-anomalies-email-template.ftl
 
b/thirdeye/thirdeye-pinot/src/main/resources/org/apache/pinot/thirdeye/detector/multiple-anomalies-email-template.ftl
deleted file mode 100644
index 962f4a4..0000000
--- 
a/thirdeye/thirdeye-pinot/src/main/resources/org/apache/pinot/thirdeye/detector/multiple-anomalies-email-template.ftl
+++ /dev/null
@@ -1,168 +0,0 @@
-<head>
-  <link href="https://fonts.googleapis.com/css?family=Open+Sans"; 
rel="stylesheet">
-</head>
-<body>
-<table border="0" cellpadding="0" cellspacing="0" width="100%"
-           style="width:100%; font-family: 'Proxima Nova','Arial', 'Helvetica 
Neue',Helvetica, sans-serif;font-size:16px;line-height:normal;margin:0 auto; 
padding: 24px; background-color: #F3F6F8; margin: 0 auto;">
-  <tr style="background-color: #F3F6F8;">
-    <td align="left" style="padding: 12px; padding-top:0; height:50px;" 
colspan="2">
-      <img width="35" height="35" alt="logo" 
src="https://static.licdn-ei.com/scds/common/u/images/email/logos/logo_shift_inbug_82x82_v1.png";
 style="vertical-align: middle; display: inline-block; padding-right: 8px">
-      <span style="color: rgba(0,0,0,0.55);font-size: 16px;display: 
inline-block;vertical-align: middle;">THIRDEYE - Anomaly Detection</span>
-    </td>
-  </tr>
-
-  <tr>
-    <td>
-      <table border="0" cellpadding="0" cellspacing="0" width="100%"
-           style="background-color:white; border:1px solid #E9E9E9; 
border-radius: 2px; width: 100%;">
-        <tr>
-          <td style="padding: 0 24px;" colspan="2">
-              <p style="font-size: 20px; margin-bottom: 8px;">Hi,</p> <br>
-                <p style="color: rgba(0,0,0,0.55); margin-top: 0px;"> ThirdEye 
has detected <strong style="color: black;">${anomalyCount} ${(anomalyCount == 
1)?string("anomaly", "anomalies")}</strong>. Below is a summary, please go 
<strong>
-                  <#if isGroupedAnomaly>
-                    <a style="color:#33aada;" 
href="${dashboardHost}/thirdeye#anomalies?anomaliesSearchMode=groupId&anomalyGroupIds=${groupId}">here</a>
-                  <#else>
-                    <a style="color:#33aada;" 
href="${dashboardHost}/thirdeye#anomalies?anomaliesSearchMode=id&anomalyIds=${anomalyIds}">here</a>
-                  </#if>
-                  </strong> for a detailed view.
-                </p>
-            </p>
-          </td>
-        </tr>
-        <tr>
-          <td colspan="2" style="border-bottom: 1px solid #E9E9E9;">
-          </td>
-        </tr>
-
-        <tr>
-          <td style="padding: 0 24px;" colspan="2">
-            <p style="color: rgba(0,0,0,0.55); font-size:16px; 
margin-bottom:0;">DATASET</p>
-            <p style="margin-top:8px; margin-bottom:24px; 
font-size:20px">${datasets}</p>
-          </td>
-        </tr>
-
-        <#if groupName?has_content>
-          <tr>
-            <td style="padding: 0 24px;" colspan="2">
-              <p style="color: rgba(0,0,0,0.55); font-size:16px; 
margin-bottom:0;">GROUP</p>
-              <p style="margin-top:8px; margin-bottom:24px; 
font-size:20px">${groupName}</p>
-            </td>
-          </tr>
-        </#if>
-
-        <tr>
-          <td style="padding: 0 24px;" colspan="2">
-            <table align="left" border="0" width="100%" style="width:100%; 
border-collapse:collapse; border-spacing:0;">
-            <tr>
-              <th align="left">
-                <span style="text-transform: uppercase; color:#B6B6B6; 
font-weight:normal; font-size:14px;">Analysis Start</span>
-              </th>
-              <th align="left">
-                <span style="text-transform: uppercase; 
color:#B6B6B6;font-weight:normal; font-size:14px;">Analysis End</span>
-              </th>
-            </tr>
-            <tr>
-              <td style="font-size: 20px;">${startTime} ${timeZone}</td>
-              <td style="font-size: 20px;">${endTime} ${timeZone}</td>
-            </tr>
-            </table>
-          </td>
-        </tr>
-
-        <#if precision?has_content>
-          <tr>
-            <td style="padding: 0 24px;" colspan="2">
-              <table align="left" border="0" width="100%" style="width:100%; 
border-collapse:collapse; border-spacing:0;">
-                <tr>
-                  <th align="left">
-                  <span style="text-transform: uppercase; color:#B6B6B6; 
font-weight:normal; font-size:14px;">Precision</span>
-                  </th>
-                  <th align="left">
-                  <span style="text-transform: uppercase; 
color:#B6B6B6;font-weight:normal; font-size:14px;">Recall</span>
-                  </th>
-                </tr>
-                <tr>
-                  <td style="font-size: 20px;">${precision}</td>
-                  <td style="font-size: 20px;">${recall}</td>
-                </tr>
-              </table>
-            </td>
-          </tr>
-        </#if>
-
-        <#if cid?has_content>
-          <tr>
-              <td style="padding: 24px;" colspan="2" align="center">
-                <a 
href="${anomalyDetails[0].anomalyURL}${anomalyDetails[0].anomalyId}" 
target="_blank"><img style="width: 70%;" src="cid:${cid}"\></a>
-              </td>
-          </tr>
-        </#if>
-
-        <#if anomalyDetails?has_content>
-          <tr>
-            <td style="padding: 24px;" colspan="2">
-              <table align="left" border="0" width="100%" style="width:100%; 
border-collapse:collapse; border-spacing:0; font-size: 14px;">
-                <tr>
-                  <th align="left" style="padding:12px; color:white; 
background-color: #0091CA; font-weight:600;">Metric / Dimensions</th>
-                  <th align="left" style="padding:12px; color:white; 
background-color: #0091CA; font-weight:600;">Delta</th>
-                  <th align="left" style="padding:12px; color:white; 
background-color: #0091CA; font-weight:600;">Start / End</th>
-                  <#if includeSummary>
-                    <th align="left" style="padding:12px; color:white; 
background-color: #0091CA; font-weight:600;">Status</th>
-                  </#if>
-                </tr>
-                <#list anomalyDetails as r>
-                  <tr style="border-top:1px solid #CFCFCF; border-bottom:1px 
solid #CFCFCF; background-color:#F5F5F5;">
-                    <td style="padding:12px;"><a 
href="${r.anomalyURL}${r.anomalyId}" target="_blank" style="font-size: 16px; 
color: #33aada; font-weight: 600;">${r.metric}</a><br>
-
-                      <#list r.dimensions as dimension>
-                        ${dimension} <br>
-                      </#list>
-                      <#if r.issueType??>
-                        issue type : ${r.issueType} <br>
-                      </#if>
-
-
-                    </td>
-                    <td style="padding:12px;">
-                      <span style="font-size: 16px; color:
-                      
${r.positiveLift?string('#398b18','#ee1620')};">${r.positiveLift?string('&#9650;','&#9660;')}
 ${r.lift}</span><br>
-                      <span style="font-size:10px; text-transform:uppercase; 
color:#B6B6B6; white-space: nowrap;">Current / Baseline:</span> <br>
-                      <span style="white-space: nowrap;">${r.currentVal} / 
${r.baselineVal}</span>
-                    </td>
-                    <td style="padding:12px;">
-                      <span style="white-space: 
nowrap;">${r.duration}</span><br>
-                      <span style="white-space: nowrap;">${r.startDateTime} 
${r.timezone}</span><br>
-                      <span style="white-space: nowrap;">${r.endTime} 
${r.timezone}</span>
-                    </td>
-                    <#if includeSummary>
-                      <td style="padding:12px;">${r.feedback}</td>
-                    </#if>
-                  </tr>
-                </#list>
-
-              </table>
-            </td>
-          </tr>
-        </#if>
-
-        <tr>
-          <td colspan="2" style="border-bottom: 1px solid #E9E9E9;">
-          </td>
-        </tr>
-
-        <tr>
-          <td style="font-family:'Proxima Nova','Arial', 'Helvetica 
Neue',Helvetica, sans-serif; color: rgba(0,0,0,0.55); padding: 24px; 
font-size:14px;" colspan="2">
-            <p style="margin-top:0;"> You are receiving this email because you 
have subscribed to ThirdEye Alert Service for 
<strong>'${alertConfigName}'</strong>. If you have any questions regarding this 
report, please email
-              <a style="color: #33aada;" 
href="mailto:[email protected]"; 
target="_top">[email protected]</a>
-            </p>
-            <p style="margin-bottom:0; margin-top: 24px;">
-              Thanks,<br>
-              ThirdEye Team
-            </p>
-          </td>
-        </tr>
-      </table>
-    </td>
-  </tr>
-</table>
-</body>
diff --git 
a/thirdeye/thirdeye-pinot/src/main/resources/org/apache/pinot/thirdeye/detector/onboard-notification-email-template.ftl
 
b/thirdeye/thirdeye-pinot/src/main/resources/org/apache/pinot/thirdeye/detector/onboard-notification-email-template.ftl
index b5a9fbc..e324af6 100644
--- 
a/thirdeye/thirdeye-pinot/src/main/resources/org/apache/pinot/thirdeye/detector/onboard-notification-email-template.ftl
+++ 
b/thirdeye/thirdeye-pinot/src/main/resources/org/apache/pinot/thirdeye/detector/onboard-notification-email-template.ftl
@@ -8,7 +8,7 @@
       <td align="left" style="padding: 12px 24px; height: 60px; 
background-color: #F6F8FA;" colspan="2">
         <img width="35" height="35" alt="logo" 
src="https://static.licdn-ei.com/scds/common/u/images/email/logos/logo_shift_inbug_82x82_v1.png";
           style="vertical-align: middle; display: inline-block; margin-right: 
8px; background: white;">
-        <span style="color: rgba(0,0,0,0.75);font-size: 18px; font-weight: 
bold; letter-spacing: 2px; display: inline-block;vertical-align: 
middle;">THIRDEYE</span>
+        <span style="color: rgba(0,0,0,0.75);font-size: 18px; font-weight: 
bold; letter-spacing: 2px; display: inline-block;vertical-align: 
middle;">THIRDEYE ALERT</span>
       </td>
     </tr>
 
@@ -100,9 +100,6 @@
                 If you have any questions regarding this report, please email
                 <a style="color: #33aada;" 
href="mailto:[email protected]"; 
target="_top">[email protected]</a>
               </p>
-              <p style="margin-bottom:0; margin-top: 24px;">
-                &#169; 2017, LinkedIn Corporation, 1000 W Maude Ave, CA 94085, 
USA
-              </p>
             </td>
           </tr>
         </table>
diff --git 
a/thirdeye/thirdeye-pinot/src/main/resources/org/apache/pinot/thirdeye/detector/single-anomaly-email-template.ftl
 
b/thirdeye/thirdeye-pinot/src/main/resources/org/apache/pinot/thirdeye/detector/single-anomaly-email-template.ftl
deleted file mode 100644
index 5ee4d69..0000000
--- 
a/thirdeye/thirdeye-pinot/src/main/resources/org/apache/pinot/thirdeye/detector/single-anomaly-email-template.ftl
+++ /dev/null
@@ -1,90 +0,0 @@
-<html>
-  <head>
-  </head>
-  <body>
-  <table align="center" border="0" cellspacing ="0" width="100%" 
bgcolor="#edf0f3" style="background-color: #edf0f3; table-layout:fixed">
-    <tbody>
-    <tr>
-    <td align="center">
-    <center style="width:100%">
-
-    <table border="0" cellpadding="0" cellspacing="0"
-           style="padding:0px; width:100%; font-family: 'Proxima 
Nova','Arial', 'Helvetica Neue',Helvetica, 
sans-serif;font-size:15px;line-height:normal;margin:0 auto; padding:0px 0px 
10px 0px; background-color: #fff; margin: 0 auto; max-width: 512px;">
-      <tr style="height:50px; background-color: #F3F6F8;">
-        <td align="left" style="padding: 10px 24px;height:50px;" colspan="2">
-          <img width="35" height="35" alt="logo" 
src="https://static.licdn-ei.com/scds/common/u/images/email/logos/logo_shift_inbug_82x82_v1.png";
 style="vertical-align: middle; display: inline-block; padding-right: 8px">
-          <span style="color: #737373;font-size: 15px;display: 
inline-block;vertical-align: middle;">THIRDEYE</span>
-        </td>
-      </tr>
-
-      <tr>
-        <td style="padding: 0 24px;" colspan="2">
-          <p style="font-size: 20px; font-weight: 600;">Hi,</p>
-          <p style="color: #737373; font-size: 14px;">You are receiving this 
email because you have subscribed to ThirdEye Alert Service for 
<strong>'${alertConfigName}'</strong>.</p>
-          <p style="color: #737373; font-size: 14px;"> ThirdEye has analyzed 
your dataset and has detected the anomaly below.</p>
-        </td>
-      </tr>
-
-      <tr>
-        <td colspan="2" style="border-bottom: 1px solid #CCC"></td>
-      </tr>
-      <#if anomalyDetails?has_content>
-        <#list anomalyDetails as r>
-          <tr>
-            <td style="font-size: 19px; font-weight:600; padding: 
24px;">${r.metric} (#${r.anomalyId})</td>
-            <td style="text-align: right; padding: 24px"><a 
href="${r.anomalyURL}${r.anomalyId}" target="_blank" style="color: 
white;font-weight: 600;background-color: #0084bf;font-size: 17px;padding: 0 
16px;line-height: 32px;border-radius: 2px;cursor: pointer;display: 
inline-block;border: 1px solid transparent;text-decoration: 
none;">Investigate</a></td>
-          </tr>
-
-          <tr>
-            <td style="padding: 24px;" colspan="2">
-              <img style="width: 100%;" src="cid:${cid}"\>
-            </td>
-          </tr>
-          <tr>
-            <td style="padding: 24px;" colspan="2">
-              <table border="0"  width="100%" align="center" 
style="width:100%; text-align: center; padding:0; margin:0; border-collapse: 
collapse; border: 1px solid #CCC">
-                <tr>
-                  <td colspan="33%" style="border: 1px solid #CCC; padding: 
14px;font-family: 'Proxima Nova','Arial', 'Helvetica Neue',Helvetica, 
sans-serif;"><div style="color: #737373;"><span style="color:
-                
${r.positiveLift?string('#398b18','#ee1620')};">${r.lift}</span></div><div 
style="font-weight:600;">Change</div></td>
-                  <td colspan="33%" style="border: 1px solid #CCC; width:33%; 
padding: 14px;"><div style="color: #737373;">${r.currentVal}</div><div 
style="font-weight:600;">Current Avg</div></td>
-                  <td colspan="33%" style="border: 1px solid #CCC; width:33%; 
padding: 14px;"><div style="color: #737373;">${r.baselineVal}</div><div 
style="font-weight:600;">Baseline Avg</div></td>
-                </tr>
-                <tr>
-                  <td colspan="50%" style="border: 1px solid #CCC; width:50%; 
padding: 14px;"><div style="color: #737373;">${r.dimensions}</div><div 
style="font-weight:600;">Dimension</div></td>
-                  <td colspan="50%" style="border: 1px solid #CCC; width:50%; 
padding: 14px;"><div style="color: #737373;">${r.function}</div><div 
style="font-weight:600;">Function</div></td>
-                </tr>
-                <tr>
-                  <td colspan="50%" style="border: 1px solid #CCC; width:50%; 
padding: 14px;"><div style="color: #737373;">${r.duration}</div><div 
style="font-weight:600;">Duration</div></td>
-                  <td colspan="50%" style="border: 1px solid #CCC; width:50%; 
padding: 14px;"><div style="color: #737373;">${r.feedback}</div><div 
style="font-weight:600;">Status</div></td>
-                </tr>
-              </table>
-            </td>
-          </tr>
-
-          <tr>
-            <td colspan="2" style="border-bottom: 1px solid #CCC"></td>
-          </tr>
-        </#list>
-      </#if>
-      <tr>
-        <td style="font-family:'Proxima Nova','Arial', 'Helvetica 
Neue',Helvetica, sans-serif;font-size:14px; color: #737373;font-weight:300; 
text-align: center;" colspan="2">
-          <p>If you have any questions regarding this report, please email 
<br/>
-            <a href="mailto:[email protected]"; 
target="_top">[email protected]</a>
-          </p>
-          <p>
-            Thanks,<br>
-            ThirdEye Team
-          </p>
-        </td>
-      </tr>
-    </table>
-</center>
-</td>
-</tr>
-</tbody>
-</table>
-  </body>
-</html>
-
-
-
diff --git 
a/thirdeye/thirdeye-pinot/src/test/resources/test-multiple-anomalies-email-content-formatter.html
 
b/thirdeye/thirdeye-pinot/src/test/resources/test-multiple-anomalies-email-content-formatter.html
index 8c20183..dccc120 100644
--- 
a/thirdeye/thirdeye-pinot/src/test/resources/test-multiple-anomalies-email-content-formatter.html
+++ 
b/thirdeye/thirdeye-pinot/src/test/resources/test-multiple-anomalies-email-content-formatter.html
@@ -3,12 +3,12 @@
 </head>
 
 <body style="background-color: #EDF0F3;">
-<table border="0" cellpadding="0" cellspacing="0" style="width:100%; 
font-family: 'Proxima Nova','Arial','Helvetica Neue',Helvetica,sans-serif; 
font-size:14px; margin:0 auto; max-width: 50%; background-color: #F3F6F8;">
+<table border="0" cellpadding="0" cellspacing="0" style="width:100%; 
font-family: 'Proxima Nova','Arial','Helvetica Neue',Helvetica,sans-serif; 
font-size:14px; margin:0 auto; max-width: 50%; min-width:700px; 
background-color: #F3F6F8;">
   <tr>
     <td align="left" style="padding: 12px 24px;">
       <img width="35" height="35" alt="logo" 
src="https://static.licdn-ei.com/scds/common/u/images/email/logos/logo_shift_inbug_82x82_v1.png";
            style="vertical-align: middle; display: inline-block; background: 
white;">
-      <span style="color: rgba(0,0,0,0.75);font-size: 18px; font-weight: bold; 
letter-spacing: 2px; display: inline-block;vertical-align: 
middle;">THIRDEYE</span>
+      <span style="color: rgba(0,0,0,0.75);font-size: 18px; font-weight: bold; 
letter-spacing: 2px; display: inline-block;vertical-align: middle;">THIRDEYE 
ALERT</span>
     </td>
   </tr>
 
@@ -16,37 +16,36 @@
     <td>
       <table border="0" cellpadding="0" cellspacing="0" style="border:1px 
solid #E9E9E9; border-radius: 2px; width: 100%;">
         <tr>
-          <td style="padding: 12px; background-color: #0073B1; color: #FFF; 
text-align: center;">
-            <h2>ACTION REQUIRED</h2>
+          <td style="font-size: 16px; padding: 12px; background-color: 
#0073B1; color: #FFF; text-align: center;">
             <p>
-              <strong>2 anomalies</strong> were detected between <strong>Nov 
06, 10:00 and Nov 07, 17:00 (PDT)</strong> on metric
-            <div style="padding: 10px;"><strong><a style="color: white;" 
href="http://localhost:8080/dashboard/app/#/rootcause?metricId=4";>test</a></strong></div>
+              <strong>2 anomalies</strong> were detected between <strong>Nov 
06, 10:00</strong> and <strong>Nov 07, 17:00</strong> (PDT) on the metrics 
listed below
             </p>
             <p>
-              <a style="padding: 6px 12px; border-radius: 2px; border: 1px 
solid #FFF; font-size: 16px; font-weight: bold; color: white; text-decoration: 
none; line-height: 32px;" 
href="http://localhost:8080/dashboard/thirdeye#anomalies?anomaliesSearchMode=id&anomalyIds=2,3";>Investigate
 all in ThirdEye</a>
+              <a style="padding: 6px 12px; border-radius: 2px; border: 1px 
solid #FFF; font-size: 16px; font-weight: bold; color: white; text-decoration: 
none; line-height: 32px;" 
href="http://localhost:8080/dashboard/thirdeye#anomalies?anomaliesSearchMode=id&anomalyIds=2,3";>View
 on ThirdEye</a>
             </p>
           </td>
         </tr>
 
+        <!-- List all the alerts -->
         <tr>
           <td style="border-bottom: 1px solid rgba(0,0,0,0.15); padding: 12px 
24px; align: left">
             <p>
               <span style="color: #606060; font-size: 20px; ">Metric</span>
               <span style="color: #1D1D1D; font-size: 20px; font-weight: 
bold;">test</span>
             </p>
+            <!-- List down all the alerts for the given metric -->
             <p>
               <span style="color: #606060;">Alert</span>
               <span style="color: #1D1D1D; text-decoration: none;  
font-weight: bold;">integration test function 1</span>
-              <a href="http://localhost:8080/dashboard/app/#/manage/explore/1"; 
target="blank" style="text-decoration: none; color: #0B5EA1; font-weight: 
bold;">(View/Edit Alert)</a>
+              <a href="http://localhost:8080/dashboard/app/#/manage/explore/1"; 
target="blank" style="text-decoration: none; color: #0B5EA1; font-weight: 
bold;">(Edit Settings)</a>
             </p>
+            <!-- List all the anomalies under this detection -->
             <table border="0" width="100%" align="center" style="width:100%; 
padding:0; margin:0; border-collapse: collapse;text-align:left;">
               <tr style="text-align:center; background-color: #F6F8FA; 
border-top: 2px solid #C7D1D8; border-bottom: 2px solid #C7D1D8;">
                 <th style="text-align:left; padding: 6px 12px; font-size: 
12px; font-weight: bold; line-height: 20px;">Start / Duration</th>
                 <th style="padding: 6px 12px; font-size: 12px; font-weight: 
bold; line-height: 20px;">Dimensions</th>
                 <th style="padding: 6px 12px; font-size: 12px; font-weight: 
bold; line-height: 20px;">Current</th>
                 <th style="padding: 6px 12px; font-size: 12px; font-weight: 
bold; line-height: 20px;">Predicted</th>
-                <th style="padding: 6px 12px; font-size: 12px; font-weight: 
bold; line-height: 20px; display: none;">Wow</th>
-                <th style="padding: 6px 12px; font-size: 12px; font-weight: 
bold; line-height: 20px; display: none;">Wo2W</th>
               </tr>
               <tr style="border-bottom: 1px solid #C7D1D8;">
                 <td style="padding: 6px 12px;white-space: nowrap;">
@@ -80,6 +79,9 @@
           </td>
         </tr>
 
+        <!-- Reference Links -->
+        <!-- Holidays -->
+
         <tr>
           <td style="text-align: center; background-color: #EDF0F3; font-size: 
12px; font-family:'Proxima Nova','Arial', 'Helvetica Neue',Helvetica, 
sans-serif; color: #737373; padding: 12px;">
             <p style="margin-top:0;"> You are receiving this email because you 
have subscribed to ThirdEye Alert Service for
@@ -88,9 +90,6 @@
               If you have any questions regarding this report, please email
               <a style="color: #33aada;" 
href="mailto:[email protected]"; 
target="_top">[email protected]</a>
             </p>
-            <p style="margin-bottom:0; margin-top: 24px;">
-              &#169; 2017, LinkedIn Corporation, 1000 W Maude Ave, CA 94085, 
USA
-            </p>
           </td>
         </tr>
       </table>
diff --git 
a/thirdeye/thirdeye-pinot/src/test/resources/test-onboard-notification-email-content-formatter.html
 
b/thirdeye/thirdeye-pinot/src/test/resources/test-onboard-notification-email-content-formatter.html
index 4e634d5..e88e749 100644
--- 
a/thirdeye/thirdeye-pinot/src/test/resources/test-onboard-notification-email-content-formatter.html
+++ 
b/thirdeye/thirdeye-pinot/src/test/resources/test-onboard-notification-email-content-formatter.html
@@ -8,7 +8,7 @@
     <td align="left" style="padding: 12px 24px; height: 60px; 
background-color: #F6F8FA;" colspan="2">
       <img width="35" height="35" alt="logo" 
src="https://static.licdn-ei.com/scds/common/u/images/email/logos/logo_shift_inbug_82x82_v1.png";
            style="vertical-align: middle; display: inline-block; margin-right: 
8px; background: white;">
-      <span style="color: rgba(0,0,0,0.75);font-size: 18px; font-weight: bold; 
letter-spacing: 2px; display: inline-block;vertical-align: 
middle;">THIRDEYE</span>
+      <span style="color: rgba(0,0,0,0.75);font-size: 18px; font-weight: bold; 
letter-spacing: 2px; display: inline-block;vertical-align: middle;">THIRDEYE 
ALERT</span>
     </td>
   </tr>
 
@@ -100,9 +100,6 @@
               If you have any questions regarding this report, please email
               <a style="color: #33aada;" 
href="mailto:[email protected]"; 
target="_top">[email protected]</a>
             </p>
-            <p style="margin-bottom:0; margin-top: 24px;">
-              &#169; 2017, LinkedIn Corporation, 1000 W Maude Ave, CA 94085, 
USA
-            </p>
           </td>
         </tr>
       </table>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to