diff --git a/dev/postman.json b/dev/postman.json
index fea6e87fa..6bd364fb7 100644
--- a/dev/postman.json
+++ b/dev/postman.json
@@ -3917,7 +3917,7 @@
"",
"pm.test(\"View All Notifiers\", function () {",
" var jsonData = pm.response.json();",
- " pm.expect(jsonData.length).to.eql(10);",
+ " pm.expect(jsonData.length).to.eql(11);",
"});"
],
"type": "text/javascript"
@@ -4267,7 +4267,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\n \"method\": \"slack\",\n \"host\": \"https://hooks.slack.com/services/EXAMPLEIDHERE/BV33WKP0C/MtKw3Kc8BFylTv4pohKqHtXX\",\n \"enabled\": true,\n \"limits\": 55\n}",
+ "raw": "{\n \"method\": \"success\",\n \"notifier\": {\n \"enabled\": false,\n \"limits\": 60,\n \"method\": \"slack\",\n \"host\": \"https://webhooksurl.slack.com/***\",\n \"success_data\": \"{\\n \\\"blocks\\\": [{\\n \\\"type\\\": \\\"section\\\",\\n \\\"text\\\": {\\n \\\"type\\\": \\\"mrkdwn\\\",\\n \\\"text\\\": \\\"The service {{.Service.Name}} is back online.\\\"\\n }\\n }, {\\n \\\"type\\\": \\\"actions\\\",\\n \\\"elements\\\": [{\\n \\\"type\\\": \\\"button\\\",\\n \\\"text\\\": {\\n \\\"type\\\": \\\"plain_text\\\",\\n \\\"text\\\": \\\"View Service\\\",\\n \\\"emoji\\\": true\\n },\\n \\\"style\\\": \\\"primary\\\",\\n \\\"url\\\": \\\"{{.Core.Domain}}/service/{{.Service.Id}}\\\"\\n }, {\\n \\\"type\\\": \\\"button\\\",\\n \\\"text\\\": {\\n \\\"type\\\": \\\"plain_text\\\",\\n \\\"text\\\": \\\"Go to Statping\\\",\\n \\\"emoji\\\": true\\n },\\n \\\"url\\\": \\\"{{.Core.Domain}}\\\"\\n }]\\n }]\\n}\",\n \"failure_data\": \"{\\n \\\"blocks\\\": [{\\n \\\"type\\\": \\\"section\\\",\\n \\\"text\\\": {\\n \\\"type\\\": \\\"mrkdwn\\\",\\n \\\"text\\\": \\\":warning: The service {{.Service.Name}} is currently offline! :warning:\\\"\\n }\\n }, {\\n \\\"type\\\": \\\"divider\\\"\\n }, {\\n \\\"type\\\": \\\"section\\\",\\n \\\"fields\\\": [{\\n \\\"type\\\": \\\"mrkdwn\\\",\\n \\\"text\\\": \\\"*Service:*\\\\n{{.Service.Name}}\\\"\\n }, {\\n \\\"type\\\": \\\"mrkdwn\\\",\\n \\\"text\\\": \\\"*URL:*\\\\n{{.Service.Domain}}\\\"\\n }, {\\n \\\"type\\\": \\\"mrkdwn\\\",\\n \\\"text\\\": \\\"*Status Code:*\\\\n{{.Service.LastStatusCode}}\\\"\\n }, {\\n \\\"type\\\": \\\"mrkdwn\\\",\\n \\\"text\\\": \\\"*When:*\\\\n{{.Failure.CreatedAt}}\\\"\\n }, {\\n \\\"type\\\": \\\"mrkdwn\\\",\\n \\\"text\\\": \\\"*Downtime:*\\\\n{{.Service.DowntimeAgo}}\\\"\\n }, {\\n \\\"type\\\": \\\"plain_text\\\",\\n \\\"text\\\": \\\"*Error:*\\\\n{{.Failure.Issue}}\\\"\\n }]\\n }, {\\n \\\"type\\\": \\\"divider\\\"\\n }, {\\n \\\"type\\\": \\\"actions\\\",\\n \\\"elements\\\": [{\\n \\\"type\\\": \\\"button\\\",\\n \\\"text\\\": {\\n \\\"type\\\": \\\"plain_text\\\",\\n \\\"text\\\": \\\"View Offline Service\\\",\\n \\\"emoji\\\": true\\n },\\n \\\"style\\\": \\\"danger\\\",\\n \\\"url\\\": \\\"{{.Core.Domain}}/service/{{.Service.Id}}\\\"\\n }, {\\n \\\"type\\\": \\\"button\\\",\\n \\\"text\\\": {\\n \\\"type\\\": \\\"plain_text\\\",\\n \\\"text\\\": \\\"Go to Statping\\\",\\n \\\"emoji\\\": true\\n },\\n \\\"url\\\": \\\"{{.Core.Domain}}\\\"\\n }]\\n }]\\n}\"\n }\n}",
"options": {
"raw": {}
}
@@ -4295,7 +4295,7 @@
},
{
"key": "Date",
- "value": "Mon, 04 May 2020 03:25:07 GMT"
+ "value": "Mon, 15 Jun 2020 10:15:46 GMT"
},
{
"key": "Connection",
@@ -4307,9 +4307,59 @@
}
],
"cookie": [],
- "body": "{\n \"success\": false,\n \"response\": \"
There's been a glitch… | SlackThere’s been a glitch…
We’re not quite sure what went wrong. You can go back, or try looking on our Help Center if you need a hand.
\\n\\n\\n\\n\",\n \"error\": {}\n}"
+ "body": "{\n \"success\": true,\n \"response\": \"There's been a glitch… | SlackThere’s been a glitch…
We’re not quite sure what went wrong. You can go back, or try looking on our Help Center if you need a hand.
\\n\\n\\n\\n\"\n}"
}
]
+ },
+ {
+ "name": "Statping Emailer",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "00f5c79e-e927-4305-b276-265b4d51b1e1",
+ "exec": [
+ ""
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "auth": {
+ "type": "noauth"
+ },
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "name": "Content-Type",
+ "type": "text",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"email\": \"info@socialeck.com\",\n \"core\": {\n \"allow_reports\": true,\n \"created_at\": \"2020-06-21T05:00:12.735144154Z\",\n \"description\": \"This status page has sample data included\",\n \"domain\": \"http://localhost:8080\",\n \"footer\": null,\n \"language\": \"en\",\n \"migration_id\": 1592715612,\n \"name\": \"Statping Sample Data\",\n \"setup\": true,\n \"started_on\": \"2020-06-21T05:01:01.406134998Z\",\n \"updated_at\": \"2020-06-21T05:00:59.652965634Z\",\n \"using_cdn\": false,\n \"version\": \"0.90.54\"\n },\n \"service\": {\n \"name\": \"Statping Website\",\n \"domain\": \"https://statping.com\",\n \"last_error\": \"2020-06-21T01:01:01.406134998Z\",\n \"last_success\": \"2020-06-21T05:01:01.406134998Z\",\n \"expected\": \"\",\n \"online\": true,\n \"expected_status\": 200,\n \"check_interval\": 30,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 30,\n \"order_id\": 0\n },\n \"failure\": {\n \"created_at\": \"2020-06-21T05:01:00.67942464Z\",\n \"error_code\": 406,\n \"id\": 1613,\n \"issue\": \"HTTP Status Code 406 did not match 200\",\n \"method_id\": 0,\n \"ping\": 10889\n }\n}",
+ "options": {
+ "raw": {}
+ }
+ },
+ "url": {
+ "raw": "https://news.statping.com/notifier",
+ "protocol": "https",
+ "host": [
+ "news",
+ "statping",
+ "com"
+ ],
+ "path": [
+ "notifier"
+ ]
+ },
+ "description": "This endpoint will send emails from our servers rather than you using your own SMTP email settings. Once you save the Statping Emailer Notifier, we will send you a verification email. Once you've confirmed your email address you will recieve emails whenever your service status changes."
+ },
+ "response": []
}
],
"description": "Statping contains multiple notifiers that will send you a notification whenever a service become offline, or online. You can create your own 3rd party notifier by reading more on the [Notifiers Wiki](https://github.com/statping/statping/wiki/Notifiers) on the Github repo.",
diff --git a/frontend/src/mixin.js b/frontend/src/mixin.js
index e1c3cdccd..55e0cfc81 100644
--- a/frontend/src/mixin.js
+++ b/frontend/src/mixin.js
@@ -123,6 +123,8 @@ export default Vue.mixin({
return "bell"
case "fas fa-mobile-alt":
return "mobile"
+ case "fas envelope-square":
+ return ["fas", "envelope-square"]
case "fab fa-slack":
return ["fab", "slack-hash"]
case "fab fa-telegram-plane":
diff --git a/notifiers/email.go b/notifiers/email.go
index 640a796ba..1f7b5d033 100644
--- a/notifiers/email.go
+++ b/notifiers/email.go
@@ -30,7 +30,7 @@ func (e *emailer) Select() *notifications.Notification {
var email = &emailer{¬ifications.Notification{
Method: "email",
- Title: "email",
+ Title: "SMTP Mail",
Description: "Send emails via SMTP when services are online or offline.",
Author: "Hunter Long",
AuthorUrl: "https://github.com/hunterlong",
diff --git a/notifiers/statping_emailer.go b/notifiers/statping_emailer.go
index 2344a7f07..444ee92c1 100644
--- a/notifiers/statping_emailer.go
+++ b/notifiers/statping_emailer.go
@@ -29,7 +29,7 @@ func (s *statpingEmailer) Select() *notifications.Notification {
var statpingMailer = &statpingEmailer{¬ifications.Notification{
Method: statpingEmailerName,
- Title: "Statping Emailer",
+ Title: "Email",
Description: "Send an email when a service becomes offline or back online using Statping's email service. You will need to verify your email address.",
Author: "Hunter Long",
AuthorUrl: "https://github.com/hunterlong",