diff --git a/conf/defaults.ini b/conf/defaults.ini index 6fc26743e1e..53a034bfeaa 100644 --- a/conf/defaults.ini +++ b/conf/defaults.ini @@ -385,7 +385,7 @@ global_session = -1 # \______(_______;;;)__;;;) [alerting] -enabled = false +enabled = true #################################### Internal Grafana Metrics ########################## # Metrics available at HTTP API Url /api/metrics diff --git a/emails/assets/css/ink.css b/emails/assets/css/ink.css index e65aed19194..f4c1a291cb3 100644 --- a/emails/assets/css/ink.css +++ b/emails/assets/css/ink.css @@ -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 { diff --git a/emails/assets/css/style.css b/emails/assets/css/style.css index f138a0c1296..83f8d2c67a6 100644 --- a/emails/assets/css/style.css +++ b/emails/assets/css/style.css @@ -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; diff --git a/emails/templates/alert_notification.html b/emails/templates/alert_notification.html index 5adcda1a620..2c9f78ce6fb 100644 --- a/emails/templates/alert_notification.html +++ b/emails/templates/alert_notification.html @@ -1,91 +1,106 @@ [[Subject .Subject "[[.Title]]"]] - - - + + +
- - - - -
-

[[.Title]]

-
-
+ + + + +
+

[[.Title]]

+
+
- - - + + +
- - - - -
-

[[.Message]]

-
-
+ + + + +
+

[[.Message]]

+
+
[[if ne .State "ok" ]] - - - + + +
-
- - - - - - [[range .EvalMatches]] - - - - - [[end]] -
- Metric name - - Value -
- [[.Metric]] - - [[.Value]] -
-
-
+
+ + + + + + [[range .EvalMatches]] + + + + + [[end]] +
+
Metric name
+
+
Value
+
+
[[.Metric]]
+
+
[[.Value]]
+
+
+
[[end]] - - + +
- - - - -
- -
-
+ + + + +
+ +
+
- - - + + +
- - - - -
- Alert rule - Alerts page -
-
+ + + + + +
+ + + + +
+ View your Alert rule +
+
+ + + + +
+ Go to the Alerts page +
+
+
diff --git a/emails/templates/invited_to_org.html b/emails/templates/invited_to_org.html index 59e76cd5a77..681830604b9 100644 --- a/emails/templates/invited_to_org.html +++ b/emails/templates/invited_to_org.html @@ -9,7 +9,7 @@ @@ -25,7 +25,7 @@
-

You have been added to [[.OrgName]]

+

You have been added to [[.OrgName]]

diff --git a/emails/templates/layouts/default.html b/emails/templates/layouts/default.html index 0fd5b35ea48..d19364dec75 100644 --- a/emails/templates/layouts/default.html +++ b/emails/templates/layouts/default.html @@ -3,77 +3,160 @@ - - - - + + + + - + +
-

[[.InvitedBy]] has added you to the [[.OrgName]] organization in Grafana. +

[[.InvitedBy]] has added you to the [[.OrgName]] organization in Grafana.

Once logged in, [[.OrgName]] will be available in the left side menu, in the dropdown below your username.

-
-
- - - - - -
-
- - - - - -
- - - - - - -
- -
- -
- -
-
- - +
+ +
- + +
- {{> body }} - - - - - - + +
+ + + + +
+ + + + + + +
+ +
+ +
+ +
+
+ + + + + + + - +
+ {{> body }}
+ + + + +
diff --git a/emails/templates/new_user_invite.html b/emails/templates/new_user_invite.html index 86948a665f6..6e75a203953 100644 --- a/emails/templates/new_user_invite.html +++ b/emails/templates/new_user_invite.html @@ -9,7 +9,7 @@ @@ -25,7 +25,7 @@
-

You're invited to join [[.OrgName]]

+

You're invited to join [[.OrgName]]

diff --git a/emails/templates/reset_password.html b/emails/templates/reset_password.html index f3aca5da95e..e9d1527116c 100644 --- a/emails/templates/reset_password.html +++ b/emails/templates/reset_password.html @@ -7,7 +7,7 @@
-

You've been invited to join the [[.OrgName]] organization by [[.InvitedBy]]. To accept your invitation and join the team, please click the link below:

+

You've been invited to join the [[.OrgName]] organization by [[.InvitedBy]]. To accept your invitation and join the team, please click the link below:

@@ -24,7 +24,7 @@ @@ -29,6 +34,13 @@ + + +
-

Hi [[.Name]]

+

Hi [[.Name]],

- Please click the following link to reset your password within [[.EmailCodeValidHours]] hours. + Please click the following link to reset your password within [[.EmailCodeValidHours]] hours.

[[.AppUrl]]user/password/reset?code=[[.Code]] diff --git a/emails/templates/signup_started.html b/emails/templates/signup_started.html index 39b369a1f7c..15689a0e62c 100644 --- a/emails/templates/signup_started.html +++ b/emails/templates/signup_started.html @@ -7,7 +7,7 @@ diff --git a/emails/templates/welcome_on_signup.html b/emails/templates/welcome_on_signup.html index b93c56b77b1..0e0e4dbe3bc 100644 --- a/emails/templates/welcome_on_signup.html +++ b/emails/templates/welcome_on_signup.html @@ -7,10 +7,15 @@
-

Complete the signup

+

Complete the signup

+ + +
-

Hi [[.Name]]

+

Hi [[.Name]],

+ Welcome! Ready to start building some beautiful metric and analytic dashboards? +

+ Thank you for joining our community. +
+

The Grafana Team

+
diff --git a/pkg/services/notifications/send_email_integration_test.go b/pkg/services/notifications/send_email_integration_test.go index b91cc178240..1a4406dc13a 100644 --- a/pkg/services/notifications/send_email_integration_test.go +++ b/pkg/services/notifications/send_email_integration_test.go @@ -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", diff --git a/public/emails/alert_notification.html b/public/emails/alert_notification.html index f80a8330eaf..8106592fb8d 100644 --- a/public/emails/alert_notification.html +++ b/public/emails/alert_notification.html @@ -3,14 +3,14 @@ - + - - - -
-
+ + + +
+
+ + + + - -
+
- - - + +
-
+ + + - -
- - - + +
+ + + + + +
+ +
- - - - - -
- -
+
-
+
+
-
-
- - - -
+ + + + + +
{{Subject .Subject "{{.Title}}"}} - - -
- - -
-

{{.Title}}

+ + +
+ + +
+

{{.Title}}

@@ -129,13 +228,13 @@ color: #FFFFFF !important;
- - -
- - -
-

{{.Message}}

+ + +
+ + +
+

{{.Message}}

@@ -144,26 +243,26 @@ color: #FFFFFF !important;
{{if ne .State "ok" }} - - -
-
- - -
- Metric name + + +
+
+ + + - {{range .EvalMatches}} - - + - {{end}} @@ -174,13 +273,13 @@ color: #FFFFFF !important;
+
Metric name
- Value + +
Value
- {{.Metric}} +
+
{{.Metric}}
- {{.Value}} + +
{{.Value}}
{{end}} - - -
- - -
- + + +
+ + +
+
@@ -189,13 +288,28 @@ color: #FFFFFF !important;
- - -
- - - -
- Alert rule - Alerts page + + + - +
+ + + +
+ + + + +
+ View your Alert rule +
+
+ + + + +
+ Go to the Alerts page +
@@ -206,34 +320,32 @@ color: #FFFFFF !important; - - - - - - -
+ + + + +
diff --git a/public/emails/alert_notification_example.html b/public/emails/alert_notification_example.html new file mode 100644 index 00000000000..f0aa5f8b3b6 --- /dev/null +++ b/public/emails/alert_notification_example.html @@ -0,0 +1,359 @@ + + + + + + + + + + + + + +
+
+ + + + + +
+
+ + + + + +
+ + + + + + +
+ +
+ +
+ +
+
+ + + + + + + + +
+ + + + +
+ + + + +
+

[CRITICAL] Imaginary timeserie alert

+
+
+ + + + + +
+ + + + +
+

Alert message that will support markdown in some distant future.

+
+
+ + + + + + +
+
+ + + + + + + + + + + + + + + + + +
+ Metric name + + Value +
+ desktop + + 40 +
+ mobile + + 20 +
+
+
+ + + + + + +
+ + + + +
+ +
+
+ + + + + + +
+ + + + + +
+ + + + +
+ View your Alert rule +
+
+ + + + +
+ Go to the Alerts page +
+
+
+ + + + +
+ + + + + + +
+
+ + diff --git a/public/emails/invited_to_org.html b/public/emails/invited_to_org.html index 8263fb65a15..edb69e13428 100644 --- a/public/emails/invited_to_org.html +++ b/public/emails/invited_to_org.html @@ -3,14 +3,14 @@ - + - - - -
-
+ + + +
+
+ + + + - -
+
- - - + +
-
+ + + - -
- - - + +
+ + + + + +
+ +
- - - - - -
- -
+
-
+
+
-
-
- - - -
+ + + + + +
{{Subject .Subject "{{.InvitedBy}} has added you to the {{.OrgName}} organization"}} - - -
+ + +
- - -
-

You have been added to {{.OrgName}}

+ + + - +
+

You have been added to {{.OrgName}}

@@ -134,22 +233,22 @@ color: #FFFFFF !important;
- - -
- - -
-

{{.InvitedBy}} has added you to the {{.OrgName}} organization in Grafana. -

Once logged in, {{.OrgName}} will be available in the left side menu, in the dropdown below your username.

+ + + -
+ + + - + - - - +
+

{{.InvitedBy}} has added you to the {{.OrgName}} organization in Grafana. +

Once logged in, {{.OrgName}} will be available in the left side menu, in the dropdown below your username.

- - - + + @@ -162,34 +261,32 @@ color: #FFFFFF !important; -
Log in now
+ + +
Log in now
- - - - - -
+ + + + +
diff --git a/public/emails/new_user_invite.html b/public/emails/new_user_invite.html index 15de19a7bf6..43d57748f68 100644 --- a/public/emails/new_user_invite.html +++ b/public/emails/new_user_invite.html @@ -3,14 +3,14 @@ - + - - - -
-
+ + + +
+
+ + + + - -
+
- - - + +
-
+ + + - -
- - - + +
+ + + + + +
+ +
- - - - - -
- -
+
-
+
+
-
-
- - - -
+ + + + + +
{{Subject .Subject "{{.InvitedBy}} has invited you to join Grafana"}} - - -
+ + +
- - -
-

You're invited to join {{.OrgName}}

+ + + - +
+

You're invited to join {{.OrgName}}

@@ -134,63 +233,61 @@ color: #FFFFFF !important;
- - -
- - - -
-

You've been invited to join the {{.OrgName}} organization by {{.InvitedBy}}. To accept your invitation and join the team, please click the link below:

+ + + - +
+ + + - -
+

You've been invited to join the {{.OrgName}} organization by {{.InvitedBy}}. To accept your invitation and join the team, please click the link below:

- - - + + - - + - +
Accept Invitation
+ + +
Accept Invitation
-

You can also copy/paste this link into your browser directly: {{.LinkUrl}}

+
+

You can also copy/paste this link into your browser directly: {{.LinkUrl}}

- - - - - - -
+ + + + +
diff --git a/public/emails/reset_password.html b/public/emails/reset_password.html index 46947a74c30..cdc62902c30 100644 --- a/public/emails/reset_password.html +++ b/public/emails/reset_password.html @@ -3,14 +3,14 @@ - + - - - -
-
+ + + +
+
+ + + + - -
+
- - - + +
-
+ + + - -
- - - + +
+ + + + + +
+ +
- - - - - -
- -
+
-
+
+
-
-
- - - -
+ + + + + +
{{Subject .Subject "Reset your Grafana password - {{.Name}}"}} - - -
+ + +
- - -
-

Hi {{.Name}}

+ + + - +
+

Hi {{.Name}},

@@ -132,21 +231,21 @@ color: #FFFFFF !important;
- - -
- - - -
-

- Please click the following link to reset your password within {{.EmailCodeValidHours}} hours. + + + - +
+ + + - +
+

+ Please click the following link to reset your password within {{.EmailCodeValidHours}} hours.

-

- {{.AppUrl}}user/password/reset?code={{.Code}} +

+ {{.AppUrl}}user/password/reset?code={{.Code}}

-

Not working? Try copying and pasting it to your browser.

+

Not working? Try copying and pasting it to your browser.

@@ -157,34 +256,32 @@ color: #FFFFFF !important; - - - - - - -
+ + + + +

diff --git a/public/emails/signup_started.html b/public/emails/signup_started.html index a8ee02174a8..a22d439072f 100644 --- a/public/emails/signup_started.html +++ b/public/emails/signup_started.html @@ -3,14 +3,14 @@ - + - - - -
-
+ + + +
+
+ + + + - -
+
- - - + +
-
+ + + - -
- - - + +
+ + + + + +
+ +
- - - - - -
- -
+
-
+
+
-
-
- - - -
+ + + + + +
{{Subject .Subject "Welcome to Grafana, please complete your sign up!"}} - - -
+ + +
- - -
-

Complete the signup

+ + + - +
+

Complete the signup

@@ -132,23 +231,23 @@ color: #FFFFFF !important;
- - -
- - -
+ + + -
+ + + - + - - - +
Copy and past the email verification code:
- {{.Code}}
in + {{.Code}}
in the sign up form or use the link below.
- - - + + @@ -161,34 +260,32 @@ color: #FFFFFF !important; -
Complete Sign Up
+ + +
Complete Sign Up
- - - - - -
+ + + + +
diff --git a/public/emails/welcome_on_signup.html b/public/emails/welcome_on_signup.html index f2f931689c1..606c804df0d 100644 --- a/public/emails/welcome_on_signup.html +++ b/public/emails/welcome_on_signup.html @@ -3,14 +3,14 @@ - + - - - -
-
+ + + +
+
+ + + + - -
+
- - - + +
-
+ + + - -
- - - + +
+ + + + + +
+ +
- - - - - -
- -
+
-
+
+
-
-
- - - -
+ + + + + +
{{Subject .Subject "Welcome to Grafana"}} - - -
+ + +
- - -
-

Hi {{.Name}}

+ + + + + + + -
+

Hi {{.Name}},

+
+ Welcome! Ready to start building some beautiful metric and analytic dashboards?
@@ -132,17 +236,24 @@ color: #FFFFFF !important;
- - - -
- - - - +
-

- If you are new to Grafana please read the Getting Started guide. + + + @@ -152,34 +263,32 @@ color: #FFFFFF !important; -
+ + + - + + + +
+

+ If you are new to Grafana please read the Getting Started guide.

+ Thank you for joining our community. +
+

The Grafana Team

+
- - - - - -

+ + + + +