From c226cabc048a4e33e956346523e4605e85979d08 Mon Sep 17 00:00:00 2001 From: Thomas Balthazar Date: Tue, 31 May 2016 16:51:28 +0200 Subject: PLT-2170 Send payload in application/json for outgoing webhooks (#3160) * Send payload in application/json for outgoing webhooks The Add outgoing webhook UI now has a 'Content-Type' field that allows to choose between application/x-www-form-urlencoded and application/json. All outgoing webhooks created before this change will be considered as x-www-form-urlencoded. There's also a minor change in the way the outgoing webhook summary is displayed: the 'Callback URLs' label was missing. * Fix JS formatting errors * Increase ContentType field length to 128 --- .../backstage/installed_outgoing_webhook.jsx | 46 ++++++++++++---------- 1 file changed, 25 insertions(+), 21 deletions(-) (limited to 'webapp/components/backstage/installed_outgoing_webhook.jsx') diff --git a/webapp/components/backstage/installed_outgoing_webhook.jsx b/webapp/components/backstage/installed_outgoing_webhook.jsx index 16782b4df..99f2439ec 100644 --- a/webapp/components/backstage/installed_outgoing_webhook.jsx +++ b/webapp/components/backstage/installed_outgoing_webhook.jsx @@ -112,22 +112,19 @@ export default class InstalledOutgoingWebhook extends React.Component { ); } - const urls = []; - for (const url of outgoingWebhook.callback_urls) { - urls.push( -
- {url} -
- ); - urls.push( -
- ); - } + let urls = ( +
+ + + +
+ ); return (
@@ -138,6 +135,17 @@ export default class InstalledOutgoingWebhook extends React.Component {
{description} +
+ + + +
{triggerWords}
@@ -162,11 +170,7 @@ export default class InstalledOutgoingWebhook extends React.Component { />
-
- - {urls} - -
+ {urls}