From d0574529714d07503a659773ff29b973d25cfd55 Mon Sep 17 00:00:00 2001 From: Hunter Trujillo Date: Thu, 26 Jan 2017 17:31:51 -0700 Subject: [PATCH] Fix Telegram parse-mode support for HTML and Markdown. --- ui/src/kapacitor/components/TelegramConfig.js | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/ui/src/kapacitor/components/TelegramConfig.js b/ui/src/kapacitor/components/TelegramConfig.js index ce3dcddaf0..bac11f2298 100644 --- a/ui/src/kapacitor/components/TelegramConfig.js +++ b/ui/src/kapacitor/components/TelegramConfig.js @@ -18,11 +18,15 @@ const TelegramConfig = React.createClass({ handleSaveAlert(e) { e.preventDefault(); + let parseMode + if (this.parseModeHTML.checked) parseMode = 'HTML' + if (this.parseModeMarkdown.checked) parseMode = 'Markdown' + const properties = { 'chat-id': this.chatID.value, 'disable-notification': this.disableNotification.checked, 'disable-web-page-preview': this.disableWebPagePreview.checked, - 'parse-mode': this.parseMode.checked.toString(), + 'parse-mode': parseMode, token: this.token.value, url: this.url.value, }; @@ -62,8 +66,19 @@ const TelegramConfig = React.createClass({
- this.parseMode = r} /> - +
+ +
+
+ +
+