From b9ddec71a4632942534048069f7d0d474b2c8982 Mon Sep 17 00:00:00 2001 From: Martin Cech Date: Tue, 13 Feb 2018 14:16:45 -0500 Subject: [PATCH] disable loading of webhooks in TS and reports apps --- client/galaxy/scripts/onload.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/client/galaxy/scripts/onload.js b/client/galaxy/scripts/onload.js index 232fc87c0ab..e58f49db2e7 100644 --- a/client/galaxy/scripts/onload.js +++ b/client/galaxy/scripts/onload.js @@ -179,18 +179,20 @@ $(document).ready(() => { function onloadWebhooks() { if (Galaxy.root !== undefined) { - // Load all webhooks with the type 'onload' - Webhooks.load({ - type: "onload", - callback: function(webhooks) { - webhooks.each(model => { - var webhook = model.toJSON(); - if (webhook.activate && webhook.script) { - Utils.appendScriptStyle(webhook); - } - }); - } - }); + if (Galaxy.config.enable_webhooks) { + // Load all webhooks with the type 'onload' + Webhooks.load({ + type: "onload", + callback: function(webhooks) { + webhooks.each(model => { + var webhook = model.toJSON(); + if (webhook.activate && webhook.script) { + Utils.appendScriptStyle(webhook); + } + }); + } + }); + } } else { setTimeout(onloadWebhooks, 100); }