Docs: Fix broken watcher example using multi line strings

Original commit: elastic/x-pack-elasticsearch@7398be67c4
This commit is contained in:
Alexander Reelsen 2017-11-10 10:06:47 +01:00
parent 039cf42fdf
commit a90cd81f99
1 changed files with 4 additions and 6 deletions

View File

@ -48,15 +48,13 @@ For example, the following `webhook` action creates a new issue in GitHub:
--------------------------------------------------
"actions" : {
"create_github_issue" : {
"transform": {
"script": "return ['title':'Found errors in \\'contact.html\\'', 'body' : 'Found ' + ctx.payload.hits.total + ' errors in the last 5 minutes', 'assignee' : 'web-admin', 'labels' : ['bug','sev2']]"
},
"webhook" : {
"method" : "POST",
"url" : "https://api.github.com/repos/<owner>/<repo>/issues",
"body" : "{
\"title\": \"Found errors in 'contact.html'\",
\"body\": \"Found {{ctx.payload.hits.total}} errors in the last 5 minutes\",
\"assignee\": \"web-admin\",
\"labels\": [ \"bug\", \"sev2\" ]
}",
"body": "{{#toJson}}ctx.payload{{/toJson}}",
"auth" : {
"basic" : {
"username" : "<username>", <1>