Commit c7691487 by bergquist

Merge branch 'emails'

parents 712061ab 62372978
......@@ -385,7 +385,7 @@ global_session = -1
# \______(_______;;;)__;;;)
[alerting]
enabled = false
enabled = true
#################################### Internal Grafana Metrics ##########################
# Metrics available at HTTP API Url /api/metrics
......
......@@ -17,6 +17,8 @@ body{
padding:0;
}
.ExternalClass {
width:100%;
}
......@@ -42,7 +44,6 @@ img {
text-decoration:none;
-ms-interpolation-mode: bicubic;
width: auto;
max-width: 100%;
float: left;
clear: both;
display: block;
......@@ -581,8 +582,7 @@ body.outlook p {
@media only screen and (max-width: 600px) {
table[class="body"] img {
width: auto !important;
height: auto !important;
}
table[class="body"] center {
......
......@@ -9,7 +9,8 @@ h1 {font-size: 40px;}
h2 {font-size: 36px;}
h3 {
font-size: 22px;
margin-top: 20px;
margin-top: 10px;
margin-bottom: 10px;
}
h4 {font-size: 20px;}
h5 {font-size: 18px;}
......@@ -79,10 +80,17 @@ table.google-plus:hover td {
}
.header {
background: #333;
margin-top:25px;
margin-bottom: 25px;
}
.data {
font-size: 16px;
}
.footer {
background-color: #2e2e2e;
color: #999999;
margin-top: 20px;
}
......@@ -94,6 +102,10 @@ table.google-plus:hover td {
table[class="body"] .left-text-pad {
padding-right: 10px !important;
}
.logo {
margin-left: 10px;
}
}
table.better-button {
......@@ -134,6 +146,45 @@ table.columns td.better-button {
color: #FFFFFF !important;
}
table.better-button-alt {
margin-top: 10px;
margin-bottom: 20px;
}
table.columns td.better-button-alt {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
padding-bottom: 0px;
}
.better-button-alt a {
text-decoration: none;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
padding: 12px 25px;
border: 1px solid #ff8f2b;
background-color: #EFEFEF;
display: inline-block;
color: #ff8f2b;
}
.better-button-alt:hover a {
color: #ff8f2b !important;
background-color: #DDDDDD;
border: 1px solid #F2821E;
}
.better-button-alt:visited a {
color: #ff8f2b !important;
}
.better-button-alt:active a {
color: #ff8f2b !important;
}
.verification-code {
background-color: #EEEEEE;
padding: 3px;
......
[[Subject .Subject "[[.Title]]"]]
<table class="row">
<tr>
<td class="wrapper last">
<table class="twelve columns">
<tr>
<td class="center">
<h3 style="/*text-align:center*/;color: [[.SeverityColor]]; font-weight: bold;">[[.Title]]</h3>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="wrapper last">
<table class="twelve columns">
<tr>
<td class="center">
<h3 style="/*text-align:center*/;color: [[.SeverityColor]]; font-weight: bold; font-style: italic;">[[.Title]]</h3>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table class="row" >
<tr>
<td class="wrapper last">
<table class="twelve columns">
<tr>
<td class="center">
<p style="/*text-align:center*/">[[.Message]]</p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="last">
<table class="twelve columns">
<tr>
<td class="center">
<p style="/*text-align:center*/">[[.Message]]</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
[[if ne .State "ok" ]]
<table class="row" >
<tr>
<td class="wrapper last">
<center>
<table class="twelve columns" >
<tr>
<td class="wrapper last" style="font-weight: bold;">
Metric name
</td>
<td style="font-weight: bold;">
Value
</td>
</tr>
[[range .EvalMatches]]
<tr>
<td class="wrapper last">
[[.Metric]]
</td>
<td>
[[.Value]]
</td>
</tr>
[[end]]
</table>
</center>
</td>
</tr>
<tr>
<td class="last">
<center>
<table class="twelve columns" >
<tr>
<td class="six">
<h5 style="font-weight: bold;">Metric name</h5>
</td>
<td class="six last" style="text-align: right; width:100px;">
<h5 style="font-weight: bold;text-align: right;">Value</h5>
</td>
</tr>
[[range .EvalMatches]]
<tr>
<td class="six">
<h5 class="data">[[.Metric]]</h5>
</td>
<td class="six last" style="text-align: right; width:100px;">
<h5 class="data" style="text-align: right;">[[.Value]]</h5>
</td>
</tr>
[[end]]
</table>
</center>
</td>
</tr>
</table>
[[end]]
<table class="row" >
<tr>
<td class="wrapper last">
<table class="twelve columns">
<tr>
<td class="center">
<img src="[[.ImageLink]]" />
</td>
</tr>
</table>
</td>
</tr>
<td class="wrapper last">
<table class="twelve columns">
<tr>
<td class="center">
<img src="[[.ImageLink]]" />
</td>
</tr>
</table>
</td>
</tr>
</table>
<table class="row">
<tr>
<td class="wrapper last">
<table class="twelve columns">
<tr>
<td class="center">
<a href="[[.RuleUrl]]" target="_blank">Alert rule</a> - <a href="[[.AlertPageUrl]]" target="_blank">Alerts page</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="wrapper last">
<table class="twelve columns">
<tr>
<td class="center six">
<table class="better-button" align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="better-button" bgcolor="#ff8f2b">
<a href="[[.RuleUrl]]" target="_blank">View your Alert rule</a>
</td>
</tr>
</table>
</td>
<td class="center six">
<table class="better-button" align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="better-button-alt" bgcolor="#efefef">
<a href="[[.AlertPageUrl]]" target="_blank"> Go to the Alerts page</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
......@@ -9,7 +9,7 @@
<table class="twelve columns">
<tr>
<td>
<h3>You have been added to [[.OrgName]]</h3>
<h4 class="center">You have been added to [[.OrgName]]</h4>
</td>
<td class="expander"></td>
</tr>
......@@ -25,7 +25,7 @@
<table class="twelve columns">
<tr>
<td class="center">
<p><span class="emphasis">[[.InvitedBy]]</span> has added you to the <span class="emphasis">[[.OrgName]]</span> organization in Grafana.
<p><b>[[.InvitedBy]]</b> has added you to the <b>[[.OrgName]]</b> organization in Grafana.
<p>Once logged in, [[.OrgName]] will be available in the left side menu, in the dropdown below your username.</p>
</td>
<td class="expander"></td>
......
......@@ -3,77 +3,160 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width"/>
<!-- build:css css/tidy.css -->
<link inline rel="stylesheet" href="../assets/css/ink.css">
<link inline rel="stylesheet" href="../assets/css/style.css">
<!-- /build -->
<!-- build:css css/tidy.css -->
<link inline rel="stylesheet" href="../assets/css/ink.css">
<link inline rel="stylesheet" href="../assets/css/style.css">
<!-- /build -->
</head>
<body>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" class="main" style="background: #2e2e2e; height: 100% !important; margin: 0 auto; padding: 0; width: 100% !important" bgcolor="#2e2e2e"><style type="text/css">
body {
height: 100% !important; width: 100% !important;
}
body .copy {
-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
}
.ExternalClass {
width: 100%;
}
.ExternalClass {
line-height: 100%;
}
img {
-ms-interpolation-mode: bicubic;
}
img {
border: 0 !important; outline: none !important; text-decoration: none !important;
}
a:hover {
text-decoration: underline;
}
td[class="stack-column-center"] {
text-align: center !important;
}
@media (max-width: 600px) {
table[class="email-container"] {
width: 95% !important;
}
img[class="fluid"] {
width: 100% !important; max-width: 100% !important; height: auto !important; margin: auto !important;
}
img[class="fluid-centered"] {
width: 100% !important; max-width: 100% !important; height: auto !important; margin: auto !important;
}
img[class="fluid-centered"] {
margin: auto !important;
}
td[class="comms-content"] {
padding: 20px !important;
}
td[class="stack-column"] {
display: block !important; width: 100% !important; direction: ltr !important;
}
td[class="stack-column-center"] {
display: block !important; width: 100% !important; direction: ltr !important;
}
td[class="stack-column-center"] {
text-align: center !important;
}
td[class="copy"] {
font-size: 14px !important; line-height: 24px !important; padding: 0 30px !important;
}
td[class="copy -center"] {
font-size: 14px !important; line-height: 24px !important; padding: 0 30px !important;
}
td[class="copy -bold"] {
font-size: 14px !important; line-height: 24px !important; padding: 0 30px !important;
}
td[class="small-text"] {
font-size: 14px !important; line-height: 24px !important; padding: 0 30px !important;
}
td[class="mini-centered-text"] {
font-size: 14px !important; line-height: 24px !important; padding: 15px 30px !important;
}
td[class="copy -padd"] {
padding: 0 40px !important;
}
span[class="sep"] {
display: none !important;
}
td[class="mb-hide"] {
display: none !important; height: 0 !important;
}
td[class="spacer mb-shorten"] {
height: 25px !important;
}
.two-up td {
width:270px;
}
}
</style>
<table class="body">
<tr>
<td class="center" align="center" valign="top">
<center>
<table class="row header">
<tr>
<td class="center" align="center">
<center>
<center>
<table class="row header">
<tr>
<td class="center" align="center">
<center>
<table class="container">
<tr>
<td class="wrapper last">
<table class="container">
<tr>
<td class="wrapper last">
<table class="twelve columns">
<tr>
<td class="six sub-columns center">
<img src="http://docs.grafana.org/img/logo_transparent_200x75.png" style="width: 150px; float: none; display: inline">
</td>
<td class="expander"></td>
</tr>
</table>
<table class="twelve columns">
<tr>
<td class="six sub-columns center">
<img class="logo" src="http://grafana.org/assets/img/logo_new_transparent_200x48.png" style="width: 200px; float: none; display: inline">
</td>
<td class="expander"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
<table class="container">
<table class="container" style="background-color: #efefef;" width="600">
<tr>
<td>
<td height="2" class="spacer mb-shorten" style="font-size: 0; line-height: 0; mso-table-lspace: 0pt; mso-table-rspace: 0pt; vertical-align: top; border: 0; background: linear-gradient(to right, #ffed00 0%, #f26529 75%); height: 2px !important" valign="top"> </td>
</tr>
<tr>
<td class="mini-centered-text" style="color: #343b41; font: 400 16px/27px 'Helvetica Neue', Helvetica, Arial, sans-serif; mso-table-lspace: 0pt; mso-table-rspace: 0pt; padding: 25px 35px; text-align: center; vertical-align: top" align="center" valign="top">
{{> body }}
<!-- footer -->
<table class="row footer">
<!-- container end below -->
</td>
</tr>
</table>
<!-- footer -->
<table class="footer center">
<tr>
<td class="wrapper last">
<table class="twelve columns center">
<tr>
<td class="wrapper last">
<table class="twelve columns">
<tr>
<td align="center">
<center>
<p style="text-align:center;">
Sent by <a href="[[.AppUrl]]">Grafana v[[.BuildVersion]]</a>
</p>
</center>
</td>
<td class="expander"></td>
</tr>
</table>
<td class="twelve" align="center">
<center>
<p style="text-align: center; font-size: 12px; color: #999999;">
Sent by <a href="[[.AppUrl]]">Grafana v[[.BuildVersion]]</a>
<br />&copy; 2016 Grafana and raintank
</p>
</center>
</td>
<td class="expander"></td>
</tr>
</table>
<!-- container end below -->
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
</body>
</html>
......@@ -9,7 +9,7 @@
<table class="twelve columns">
<tr>
<td>
<h3>You're invited to join [[.OrgName]]</h3>
<h4 class="center">You're invited to join [[.OrgName]]</h4>
</td>
<td class="expander"></td>
</tr>
......@@ -25,7 +25,7 @@
<table class="twelve columns">
<tr>
<td class="center">
<p>You've been invited to join the <span class="emphasis">[[.OrgName]]</span> organization by <span class="emphasis">[[.InvitedBy]]</span>. To accept your invitation and join the team, please click the link below:</p>
<p>You've been invited to join the <b>[[.OrgName]]</b> organization by <b>[[.InvitedBy]]</b>. To accept your invitation and join the team, please click the link below:</p>
</td>
</tr>
<tr>
......
......@@ -7,7 +7,7 @@
<table class="twelve columns">
<tr>
<td>
<h3>Hi [[.Name]]</h3>
<h4>Hi [[.Name]],</h4>
</td>
<td class="expander"></td>
</tr>
......@@ -24,7 +24,7 @@
<tr>
<td class="center">
<p>
Please click the following link to reset your password within <strong>[[.EmailCodeValidHours]] hours</strong>.
Please click the following link to reset your password within <b>[[.EmailCodeValidHours]] hours</b>.
</p>
<p>
<a href="[[.AppUrl]]user/password/reset?code=[[.Code]]">[[.AppUrl]]user/password/reset?code=[[.Code]]</a>
......
......@@ -7,7 +7,7 @@
<table class="twelve columns">
<tr>
<td>
<h3 class="center">Complete the signup</h3>
<h4 class="center">Complete the signup</h4>
</td>
<td class="expander"></td>
</tr>
......
......@@ -7,10 +7,15 @@
<table class="twelve columns">
<tr>
<td>
<h3>Hi [[.Name]]</h3>
<h4>Hi [[.Name]],</h4>
</td>
<td class="expander"></td>
</tr>
<tr>
<td>
Welcome! Ready to start building some beautiful metric and analytic dashboards?
</td>
</tr>
</table>
</td>
......@@ -29,6 +34,13 @@
</td>
<td class="expander"></td>
</tr>
<tr>
<td>
Thank you for joining our community.
<br />
<p>The Grafana Team</p>
</td>
</tr>
</table>
</td>
</tr>
......
......@@ -40,7 +40,7 @@ func TestEmailIntegrationTest(t *testing.T) {
"RuleUrl": "http://localhost:3000/dashboard/db/graphite-dashboard",
"ImageLink": "http://localhost:3000/render/dashboard-solo/db/graphite-dashboard?panelId=1&from=1471008499616&to=1471012099617&width=1000&height=500",
"AlertPageUrl": "http://localhost:3000/alerting",
"Events": []map[string]string{
"EvalMatches": []map[string]string{
{
"Metric": "desktop",
"Value": "40",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment