Skip to content

Commit

Permalink
Merge pull request #5521 from martenson/webhooks-galaxy-only
Browse files Browse the repository at this point in the history
[18.01] disable loading of webhooks in TS and reports apps
  • Loading branch information
dannon committed Feb 14, 2018
2 parents ed23cc6 + b9ddec7 commit adaacbc
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions client/galaxy/scripts/onload.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit adaacbc

Please sign in to comment.