From c04a917e34915a5ed6213d183e303604d1fa779f Mon Sep 17 00:00:00 2001 From: James Gowdy Date: Wed, 15 Aug 2018 15:31:22 +0100 Subject: [PATCH] [ML] Fix painless script in ML watch --- .../ml/public/jobs/new_job/simple/components/watcher/watch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/ml/public/jobs/new_job/simple/components/watcher/watch.js b/x-pack/plugins/ml/public/jobs/new_job/simple/components/watcher/watch.js index 16ced43876fa2..33de20299cba5 100644 --- a/x-pack/plugins/ml/public/jobs/new_job/simple/components/watcher/watch.js +++ b/x-pack/plugins/ml/public/jobs/new_job/simple/components/watcher/watch.js @@ -83,7 +83,7 @@ export const watch = { script: { lang: 'painless', inline: `LocalDateTime.ofEpochSecond((doc["timestamp"].date.getMillis()-((doc["bucket_span"].value * 1000) - * params.padding)) / 1000, 0, ZoneOffset.UTC)`, + * params.padding)) / 1000, 0, ZoneOffset.UTC).toString()`, params: { 'padding': 10 } @@ -93,7 +93,7 @@ export const watch = { script: { lang: 'painless', inline: `LocalDateTime.ofEpochSecond((doc["timestamp"].date.getMillis()+((doc["bucket_span"].value * 1000) - * params.padding)) / 1000, 0, ZoneOffset.UTC)`, + * params.padding)) / 1000, 0, ZoneOffset.UTC).toString()`, params: { 'padding': 10 }