Skip to content

Instantly share code, notes, and snippets.

@javrasya
Created February 19, 2015 12:48
Show Gist options
  • Save javrasya/5829abfe2e5f497fd7f5 to your computer and use it in GitHub Desktop.
Save javrasya/5829abfe2e5f497fd7f5 to your computer and use it in GitHub Desktop.
{% load divide timestamp_to_time %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Lots of Logs, Alert Notification</title>
<style type="text/css">
@import url(http://fonts.googleapis.com/css?family=Lato:400);
/* Take care of image borders and formatting */
img {
max-width: 600px;
outline: none;
text-decoration: none;
-ms-interpolation-mode: bicubic;
}
a {
text-decoration: none;
border: 0;
outline: none;
color: #03A9F4;
}
a img {
border: none;
}
/* General styling */
td, h1, h2, h3 {
font-family: Helvetica, Arial, sans-serif;
font-weight: 400;
}
body {
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: none;
width: 100%;
height: 100%;
color: #37302d;
background: #ffffff;
}
table {
background:
}
h1, h2, h3 {
padding: 0;
margin: 0;
color: #ffffff;
font-weight: 400;
}
h3 {
color: #21c5ba;
font-size: 24px;
}
</style>
<style type="text/css" media="screen">
@media screen {
/* Thanks Outlook 2013! http://goo.gl/XLxpyl*/
td, h1, h2, h3 {
font-family: 'Lato', 'Helvetica Neue', 'Arial', 'sans-serif' !important;
}
}
</style>
<style type="text/css" media="only screen and (max-width: 480px)">
/* Mobile styles */
@media only screen and (max-width: 480px) {
table[class="w320"] {
width: 320px !important;
}
table[class="w300"] {
width: 300px !important;
}
table[class="w290"] {
width: 290px !important;
}
td[class="w320"] {
width: 320px !important;
}
td[class="mobile-center"] {
text-align: center !important;
}
td[class="mobile-padding"] {
padding-left: 20px !important;
padding-right: 20px !important;
padding-bottom: 20px !important;
}
}
</style>
</head>
<body class="body" style="padding:0; margin:0; display:block; background:#ffffff; -webkit-text-size-adjust:none" bgcolor="#ffffff">
<table align="center" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td align="center" valign="top" bgcolor="#ffffff" width="100%">
<table cellspacing="0" cellpadding="0" width="100%">
<tr style="background-color: #42A5F5">
<td style="border-bottom: 3px solid #1976D2;" width="100%">
<center>
<table cellspacing="0" cellpadding="0" width="500" class="w320">
<tr>
<td valign="top" style="text-align:left;" class="mobile-center">
<img src="http://195.175.250.89/static/lolwebapp/src/images/logo.png">
</td>
</tr>
</table>
</center>
</td>
</tr>
<tr>
<td background="http://195.175.250.89/static/lolwebapp/src/images/triangled.png" bgcolor="#e74c3c" valign="top"
style="background: url(http://195.175.250.89/static/lolwebapp/src/images/triangled.png) no-repeat top; background-color: #e74c3c; background-position: top;">
<!--[if gte mso 9]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000;height:303px;">
<v:fill type="tile" src="https://www.filepicker.io/api/file/ewEXNrLlTneFGtlB5ryy" color="#64594b" />
<v:textbox inset="0,0,0,0">
<![endif]-->
<div>
<center>
<table cellspacing="0" cellpadding="0" width="530" height="303" class="w320">
<tr>
<td valign="middle" style="vertical-align:middle; padding-right: 15px; padding-left: 15px; text-align:left;" class="mobile-center" height="303">
<h1>Notice!</h1>
<h2>An alert is triggered by {{ event_state_name }}</h2>
</td>
</tr>
</table>
</center>
</div>
<!--[if gte mso 9]>
</v:textbox>
</v:rect>
<![endif]-->
</td>
</tr>
<tr>
<td valign="top">
<center>
<table cellspacing="0" cellpadding="0" width="500" class="w320">
<tr>
<td>
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td class="mobile-padding" style="text-align:left;">
<br>
<br>
Hi,<br><br>
Following events are occured. Please visit <a
href="http://195.175.250.89/#/es/cep#%7B%22stateId%22:%7B%22value%22:%5B{{ event_state_id }}%5D%7D%7D">dashboard</a> for details of these
events.
<br>
{% for event in events %}
<b>{{ event.log }}</b> log from <b>{{ event.name }}</b> at <b>{{ event.timestamp|divide:1000|timestamp_to_time|date }}</b>
<br>
{% endfor %}
<br>
Have a nice day!<br>
Lots of Logs
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="mobile-padding">
<br>
<br>
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td style="width:200px; background-color: #3bcdc3;">
<div><!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="#" style="height:33px;v-text-anchor:middle;width:200px;" arcsize="8%" stroke="f" fillcolor="#3bcdc3">
<w:anchorlock/>
<center style="color:#ffffff;font-family:sans-serif;font-size:13px;">Review Account Settings</center>
</v:roundrect>
<![endif]-->
<!--[if !mso]><!-- --><a href="http://195.175.250.89/#/es/cep">
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td style="background-color:#03A9F4;border-radius:0px;color:#ffffff;display:inline-block;font-family:'Lato', Helvetica, Arial, sans-serif;font-weight:bold;font-size:13px;line-height:33px;text-align:center;text-decoration:none;width:200px;-webkit-text-size-adjust:none;mso-hide:all;">
<span style="color:#ffffff">Review All Events</span></td>
</tr>
</table>
</a>
<!--<![endif]-->
</div>
</td>
<td>
&nbsp;
</td>
</tr>
</table>
<br>&nbsp;
<br>
</td>
</tr>
</table>
</center>
</td>
</tr>
<tr>
<td style="background-color:#E0E0E0;">
<center>
<table cellspacing="0" cellpadding="0" width="500" class="w320">
<tr>
<td>
<center>
<table style="margin:0 auto;" cellspacing="0" cellpadding="5" width="100%">
<tr>
<td style="text-align:center; margin:0 auto;" height="160px" width="100%">
<a href="http://egemsoft.net" style="text-align:center;">
<img style="margin:0 auto; max-width: 130px;" src="http://egemsoft.net/images/logo.png" alt="logo link"/>
</a>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment