Repository: incubator-eagle Updated Branches: refs/heads/master 3082b5e62 -> bb71d37df
[EAGLE-834] Improve jpm report template by fixing font-size and notes * Improve jpm report template by fixing font-size and notes http://issues.apache.org/jira/browse/EAGLE-834 Author: Hao Chen <h...@apache.org> Closes #746 from haoch/ImproveJPMReport. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/bb71d37d Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/bb71d37d Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/bb71d37d Branch: refs/heads/master Commit: bb71d37df856fa7738af9d654afc3a772a0ef8f8 Parents: 3082b5e Author: Hao Chen <h...@apache.org> Authored: Thu Dec 15 19:36:55 2016 +0800 Committer: Hao Chen <h...@apache.org> Committed: Thu Dec 15 19:36:55 2016 +0800 ---------------------------------------------------------------------- .../src/main/resources/JobReportTemplate.vm | 263 ++++++------------- .../history/MRHistoryJobDailyReporterTest.java | 6 +- 2 files changed, 88 insertions(+), 181 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/bb71d37d/eagle-jpm/eagle-jpm-mr-history/src/main/resources/JobReportTemplate.vm ---------------------------------------------------------------------- diff --git a/eagle-jpm/eagle-jpm-mr-history/src/main/resources/JobReportTemplate.vm b/eagle-jpm/eagle-jpm-mr-history/src/main/resources/JobReportTemplate.vm index 424306f..c3afa58 100644 --- a/eagle-jpm/eagle-jpm-mr-history/src/main/resources/JobReportTemplate.vm +++ b/eagle-jpm/eagle-jpm-mr-history/src/main/resources/JobReportTemplate.vm @@ -76,7 +76,7 @@ } h3 { - font-size: 16px !important; + font-size: 14px !important; } .container { @@ -119,7 +119,7 @@ bgcolor="#fff"> <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> <td class="alert alert-warning" - style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 16px; vertical-align: top; color: #fff; font-weight: 500; text-align: center; border-radius: 3px 3px 0 0; background-color: $alertColor; margin: 0; padding: 20px;" + style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; color: #fff; font-weight: 500; text-align: center; border-radius: 3px 3px 0 0; background-color: $alertColor; margin: 0; padding: 20px;" align="center" bgcolor="" valign="top"> <strong>$alert["alertTitle"]</strong> </td> @@ -131,17 +131,19 @@ <table width="100%" cellpadding="0" cellspacing="0" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> - <th class="content-block" - style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" + <td class="content-block" + style="text-align:left; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top"> - Job Summary - </th> + <i><strong>Time:</strong> $alert["reportRange"]</i> + </td> </tr> <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> <td class="content-block" - style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" + style="text-align:left; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top"> - <i><strong>Time:</strong> $alert["reportRange"]</i> + <h2 class="aligncenter" style="font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; box-sizing: border-box; font-size: 20px; color: #000; line-height: 1.2em; font-weight: 400; text-align: left; margin: 0 0 0;" align="center"> + Summary + </h2> </td> </tr> <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> @@ -164,7 +166,7 @@ valign="top"> Number of Jobs </th> - <th style="text-align: center;font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 5px 0;" + <th style="text-align: right;font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 5px 0;" valign="top"> Ratio </th> @@ -173,13 +175,19 @@ <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> <td style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; border-top-width: 1px; border-top-color: #eee; border-top-style: solid; margin: 0; padding: 5px 0;" valign="top"> - $item.status + #set($statusColor = "#337ab7") + #if($item.status == "SUCCEEDED") + #set($statusColor = "green") + #elseif($item.status == "FAILED" || $item.status == "KILLED") + #set($statusColor = "red") + #end + <span style="color: $statusColor">$item.status</span> </td> <td style="text-align: center;font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; border-top-width: 1px; border-top-color: #eee; border-top-style: solid; margin: 0; padding: 5px 0;" valign="top"> $item.numOfJobs </td> - <td style="text-align: center;font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; border-top-width: 1px; border-top-color: #eee; border-top-style: solid; margin: 0; padding: 5px 0;" + <td style="text-align: right;font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; border-top-width: 1px; border-top-color: #eee; border-top-style: solid; margin: 0; padding: 5px 0;" valign="top"> #set ($ratio_percentage = $item.ratio * 100) $ratio_percentage % @@ -194,12 +202,14 @@ </tr> <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> - <th class="content-block" - style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" + <td class="content-block" + style="text-align:left; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top"> ## Top $alert["numTopUsers"] Users (Order by Number of Failed Jobs) - Top $alert["numTopUsers"] Failed Job Users - </th> + <h2 class="aligncenter" style="font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; box-sizing: border-box; font-size: 18px; color: #000; line-height: 1.2em; font-weight: 400; text-align: left; margin: 0 0 0;" align="center"> + Top $alert["numTopUsers"] Failed Job Users + </h2> + </td> </tr> <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> <td class="content-block aligncenter" @@ -213,7 +223,7 @@ <table class="invoice-items" cellpadding="0" cellspacing="0" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; margin: 0;"> <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> - <th style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 5px 0;" + <th style="text-align:left;font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 5px 0;" valign="top"> User Name </th> @@ -221,6 +231,10 @@ valign="top"> Number of Failed Jobs </th> + <th style="text-align: right;font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 5px 0;" + valign="top"> + Ratio + </th> </tr> #foreach($userItem in $alert["failedJobUsers"].entrySet()) <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> @@ -231,6 +245,9 @@ <td style="text-align: center;font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; border-top-width: 1px; border-top-color: #eee; border-top-style: solid; margin: 0; padding: 5px 0;" valign="top">$userItem.value </td> + <td style="text-align: right;font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; border-top-width: 1px; border-top-color: #eee; border-top-style: solid; margin: 0; padding: 5px 0;" + valign="top">$TODO_RATIO + </td> </tr> #end </table> @@ -240,14 +257,21 @@ </td> </tr> - <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> - <th class="content-block" - style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" + <td class="content-block" + style="text-align:left; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top"> -## Top $alert["numTopUsers"] Users (Order by Number of Succeeded Jobs Running over $alert["jobOvertimeLimit"] Hours) - Top $alert["numTopUsers"] Succeeded Job Users (Over $alert["jobOvertimeLimit"] Hours ) - </th> + <a href="$alert["eagleJobLink"]" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; color: #999; text-decoration: underline; margin: 0;"> + View Jobs on Eagle + </a> + </td> + </tr> + <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> + <td class="content-block" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top"> + <h2 class="aligncenter" style="font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; box-sizing: border-box; font-size: 18px; color: #000; line-height: 1.2em; font-weight: 400; text-align: left; margin: 0 0 0;" align="center"> + Top $alert["numTopUsers"] Finished* Job Users + </h2> + </td> </tr> <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> <td class="content-block aligncenter" @@ -261,24 +285,31 @@ <table class="invoice-items" cellpadding="0" cellspacing="0" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; margin: 0;"> <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> - <th style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 5px 0;" + <th style="text-align:left;font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 5px 0;" valign="top"> User Name </th> - <th style="text-align: center;font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 5px 0;" + <th style="text-align:center; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 5px 0;" valign="top"> - Number of Succeeded Jobs -## Over $alert["jobOvertimeLimit"] Hours + Number of Finished Jobs + </th> + <th style="text-align:right; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 5px 0;" + valign="top"> + Ratio </th> </tr> - #foreach($userItem in $alert["succeededJobUsers"].entrySet()) + #foreach($userItem in $alert["finishedJobUsers"].entrySet()) <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> <td style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; border-top-width: 1px; border-top-color: #eee; border-top-style: solid; margin: 0; padding: 5px 0;" valign="top"> $userItem.key </td> - <td style="text-align: center;font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; border-top-width: 1px; border-top-color: #eee; border-top-style: solid; margin: 0; padding: 5px 0;" - valign="top">$userItem.value + <td style="text-align:center; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; border-top-width: 1px; border-top-color: #eee; border-top-style: solid; margin: 0; padding: 5px 0;" + valign="top"> + $userItem.value + </td> + <td style="text-align: right;font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; border-top-width: 1px; border-top-color: #eee; border-top-style: solid; margin: 0; padding: 5px 0;" + valign="top">$TODO_RATIO </td> </tr> #end @@ -289,14 +320,14 @@ </td> </tr> - - <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> - <th class="content-block" - style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" + <td class="content-block" + style="text-align:left; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top"> - Top $alert["numTopUsers"] Finished Job Users - </th> + <h2 class="aligncenter" style="font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; box-sizing: border-box; font-size: 18px; color: #000; line-height: 1.2em; font-weight: 400; text-align: left; margin: 0 0 0;" align="center"> + Top $alert["numTopUsers"] Succeeded Long Running* Job Users + </h2> + </td> </tr> <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> <td class="content-block aligncenter" @@ -310,24 +341,31 @@ <table class="invoice-items" cellpadding="0" cellspacing="0" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; margin: 0;"> <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> - <th style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 5px 0;" + <th style="text-align:left;font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 5px 0;" valign="top"> User Name </th> - <th style="text-align:center; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 5px 0;" + <th style="text-align: center;font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 5px 0;" valign="top"> - Number of Finished Jobs + Number of Succeeded Jobs + ## Over $alert["jobOvertimeLimit"] Hours + </th> + <th style="text-align: right;font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 5px 0;" + valign="top"> + Ratio </th> </tr> - #foreach($userItem in $alert["finishedJobUsers"].entrySet()) + #foreach($userItem in $alert["succeededJobUsers"].entrySet()) <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> <td style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; border-top-width: 1px; border-top-color: #eee; border-top-style: solid; margin: 0; padding: 5px 0;" valign="top"> $userItem.key </td> - <td style="text-align:center; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; border-top-width: 1px; border-top-color: #eee; border-top-style: solid; margin: 0; padding: 5px 0;" - valign="top"> - $userItem.value + <td style="text-align: center;font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; border-top-width: 1px; border-top-color: #eee; border-top-style: solid; margin: 0; padding: 5px 0;" + valign="top">$userItem.value + </td> + <td style="text-align: right;font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; border-top-width: 1px; border-top-color: #eee; border-top-style: solid; margin: 0; padding: 5px 0;" + valign="top">$TODO_RATIO </td> </tr> #end @@ -337,15 +375,13 @@ </table> </td> </tr> - <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> <td class="content-block" - style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" + style="text-align:left; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top"> - <a href="$alert["eagleJobLink"]" class="btn-primary" - style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; color: #FFF; text-decoration: none; line-height: 2em; font-weight: bold; text-align: center; cursor: pointer; display: inline-block; border-radius: 5px; text-transform: capitalize; background-color: $alertColor; margin: 0; border-color: $alertColor; border-style: solid; border-width: 10px 20px;"> - View job details on Eagle - </a> + * Notes:<br/> + 1) Finished jobs include those <i>SUCCEEDED</i>, <i>FAILED</i> and <i>KILLED</i>.<br/> + 2) Long running jobs mean those duration over $alert["jobOvertimeLimit"] hours. </td> </tr> </table> @@ -374,133 +410,4 @@ </tr> </table> </body> -</html> - -##<body itemscope itemtype="http://schema.org/EmailMessage" -## style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; line-height: 1.6em; background-color: #f6f6f6; margin: 0;" -## bgcolor="#f6f6f6"> -##<table class="body-wrap" -## style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; background-color: #f6f6f6; margin: 0;" -## bgcolor="#f6f6f6"> -## <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"> -## <td class="container" width="600" -## style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; display: block !important; max-width: 600px !important; clear: both !important; margin: 0 auto;" -## valign="top"> -## <div class="content" -## style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; max-width: 600px; display: block; margin: 0 auto; padding: 20px;"> -## <!-- Eagle Body --> -## <table class="invoice-items" cellpadding="0" cellspacing="0" -## style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; margin: 0;"> -## <tr> -## <!-- Title --> -## <td align="center"> -## <h2>$alert["alertTitle"]</h2> -## </td> -## </tr> -## <!-- Basic Information --> -## <tr> -## <td style="padding: 20px 0 10px 0;"> -## <p><b>Summery ($alert["reportRange"])</b></p> -## </td> -## </tr> -## <tr> -## <td> -## <table class="tableBordered" width="580"> -## <tr> -## <th>Metrics</th> -## <th>Number of Jobs</th> -## <th>Ratio</th> -## </tr> -## #foreach($item in $alert["summaryInfo"]) -## <tr> -## <td>$item.status</td> -## <td>$item.numOfJobs</td> -## <td>$item.ratio</td> -## </tr> -## #end -## </table> -## </td> -## </tr> -## -## <!-- Top Users for Failed Jobs --> -## <tr> -## <td style="padding: 20px 0 10px 0;"> -## <p><b>Top $alert["numTopUsers"] Users (Order by Number of Failed Jobs)</b></p> -## </td> -## </tr> -## <tr> -## <td> -## <table class="tableBordered" width="580"> -## <tr> -## <th>Name</th> -## <th>Number of Failed Jobs</th> -## </tr> -## #foreach($userItem in $alert["failedJobUsers"].entrySet()) -## <tr> -## <td>$userItem.key</td> -## <td>$userItem.value</td> -## </tr> -## #end -## </table> -## </td> -## </tr> -## <tr> -## <td style="padding: 20px 0 10px 0;"> -## <p>View more job information on <a href="$alert["eagleJobLink"]">Eagle</a></p> -## </td> -## </tr> -## -## <!-- Top Users for Failed Jobs --> -## <tr> -## <td style="padding: 20px 0 10px 0;"> -## <p><b>Top $alert["numTopUsers"] Users (Order by Number of Succeeded Jobs Running -## over $alert[ -## "jobOvertimeLimit"] Hours)</b></p> -## </td> -## </tr> -## <tr> -## <td> -## <table class="tableBordered" width="580"> -## <tr> -## <th>Name</th> -## <th>Number of Jobs Runing over $alert["jobOvertimeLimit"] hrs</th> -## </tr> -## #foreach($userItem in $alert["succeededJobUsers"].entrySet()) -## <tr> -## <td>$userItem.key</td> -## <td>$userItem.value</td> -## </tr> -## #end -## </table> -## </td> -## </tr> -## -## <!-- Top Users for All Jobs --> -## <tr> -## <td style="padding: 20px 0 10px 0;"> -## <p><b>Top $alert["numTopUsers"] Users (Order by Number of Finished Jobs)</b></p> -## </td> -## </tr> -## <tr> -## <td> -## <table class="tableBordered" width="580"> -## <tr> -## <th>Name</th> -## <th>Number of Finished Jobs</th> -## </tr> -## #foreach($userItem in $alert["finishedJobUsers"].entrySet()) -## <tr> -## <td>$userItem.key</td> -## <td>$userItem.value</td> -## </tr> -## #end -## </table> -## </td> -## </tr> -## </table> -## </div> -## </td> -## </tr> -##</table> -##</body> -##</html> \ No newline at end of file +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/bb71d37d/eagle-jpm/eagle-jpm-mr-history/src/test/java/org/apache/eagle/jpm/mr/history/MRHistoryJobDailyReporterTest.java ---------------------------------------------------------------------- diff --git a/eagle-jpm/eagle-jpm-mr-history/src/test/java/org/apache/eagle/jpm/mr/history/MRHistoryJobDailyReporterTest.java b/eagle-jpm/eagle-jpm-mr-history/src/test/java/org/apache/eagle/jpm/mr/history/MRHistoryJobDailyReporterTest.java index 472d602..d80ae37 100644 --- a/eagle-jpm/eagle-jpm-mr-history/src/test/java/org/apache/eagle/jpm/mr/history/MRHistoryJobDailyReporterTest.java +++ b/eagle-jpm/eagle-jpm-mr-history/src/test/java/org/apache/eagle/jpm/mr/history/MRHistoryJobDailyReporterTest.java @@ -41,7 +41,7 @@ public class MRHistoryJobDailyReporterTest { private SimpleSmtpServer server; @Before - public void setUp(){ + public void setUp() { config = ConfigFactory.load("application-test.conf"); server = SimpleSmtpServer.start(SMTP_PORT); } @@ -67,11 +67,11 @@ public class MRHistoryJobDailyReporterTest { Map<String, Object> alertData = new HashMap<>(); List<MRHistoryJobDailyReporter.JobSummeryInfo> summeryInfos = new ArrayList<>(); MRHistoryJobDailyReporter.JobSummeryInfo summeryInfo1 = new MRHistoryJobDailyReporter.JobSummeryInfo(); - summeryInfo1.status = "failed"; + summeryInfo1.status = "FAILED"; summeryInfo1.numOfJobs = 10; summeryInfo1.ratio = 0.1; MRHistoryJobDailyReporter.JobSummeryInfo summeryInfo2 = new MRHistoryJobDailyReporter.JobSummeryInfo(); - summeryInfo2.status = "succeeded"; + summeryInfo2.status = "SUCCEEDED"; summeryInfo2.numOfJobs = 90; summeryInfo2.ratio = 0.9; summeryInfos.add(summeryInfo1);