diff --git a/client/galaxy/scripts/mvc/tool/tool-webhooks.js b/client/galaxy/scripts/mvc/tool/tool-webhooks.js
new file mode 100644
index 00000000000..c6cf2b538ea
--- /dev/null
+++ b/client/galaxy/scripts/mvc/tool/tool-webhooks.js
@@ -0,0 +1,40 @@
+/**
+ Webhooks
+**/
+define([], function() {
+ var galaxyRoot = typeof Galaxy != 'undefined' ? Galaxy.root : '/';
+
+ var WebhookModel = Backbone.Model.extend({
+ urlRoot: galaxyRoot + 'api/webhooks/toolview',
+ defaults: {
+ name: '',
+ path: ''
+ }
+ });
+
+ var WebhookView = Backbone.View.extend({
+ el: '#webhook-toolview',
+ webhookTemplate: _.template('
name: <%= name %>
path: <%= path %>
'),
+
+ initialize: function() {
+ var me = this;
+ this.model = new WebhookModel;
+ this.model.fetch({
+ success: function() {
+ me.render();
+ }
+ });
+ },
+
+ render: function() {
+ var webhookContent = this.model.toJSON();
+ if (webhookContent.css_styles) $('').text(webhookContent.css_styles).appendTo('head');
+ this.$el.html(this.webhookTemplate(webhookContent));
+ return this;
+ }
+ });
+
+ return {
+ WebhookView: WebhookView
+ };
+});
diff --git a/client/galaxy/scripts/mvc/webhooks.js b/client/galaxy/scripts/mvc/webhooks.js
new file mode 100644
index 00000000000..55b3c938b29
--- /dev/null
+++ b/client/galaxy/scripts/mvc/webhooks.js
@@ -0,0 +1,102 @@
+/**
+ Webhooks
+**/
+define([], function() {
+
+ var WebhookModel = Backbone.Model.extend({
+ defaults: {
+ activate: false
+ }
+ });
+
+ var Webhooks = Backbone.Collection.extend({
+ model: WebhookModel
+ });
+
+ var WebhookView = Backbone.View.extend({
+ el: '#webhook-view',
+
+ initialize: function(options) {
+ var me = this;
+
+ this.model = new WebhookModel();
+ this.model.urlRoot = options.urlRoot;
+ this.model.fetch({
+ success: function() {
+ me.render();
+ }
+ });
+ },
+
+ render: function() {
+ var webhook = this.model.toJSON();
+ if (webhook.activate) {
+ this.$el.html('');
+ if (webhook.styles) $('', {type: 'text/css'}).text(webhook.styles).appendTo('head');
+ if (webhook.script) $('', {type: 'text/javascript'}).text(webhook.script).appendTo('head');
+ }
+ return this;
+ }
+ });
+
+ var addToMastheadMenu = function() {
+ var webhooks = new Webhooks();
+ webhooks.url = Galaxy.root + 'api/webhooks/masthead/all';
+ webhooks.fetch({
+ success: function() {
+ $(document).ready(function() {
+ $.each(webhooks.models, function(index, model) {
+ var webhook = model.toJSON();
+ if (webhook.activate) {
+ Galaxy.page.masthead.collection.add({
+ id : webhook.name,
+ icon : (typeof webhook.config.icon != 'undefined') ? webhook.config.icon : '',
+ url : (typeof webhook.config.url != 'undefined') ? webhook.config.url : '',
+ tooltip : (typeof webhook.config.tooltip != 'undefined') ? webhook.config.tooltip : '',
+ // onclick : function() {},
+ // visible : webhook.activate
+ });
+ }
+ });
+ });
+ }
+ });
+ };
+
+ var addToHistoryMenu = function(_l, menu) {
+ var webhooks = new Webhooks();
+ webhooks.url = Galaxy.root + 'api/webhooks/history-menu/all';
+ webhooks.fetch({
+ async: false, // slows down History Panel loading
+ success: function() {
+ var webhooks_menu = [];
+
+ $.each(webhooks.models, function(index, model) {
+ var webhook = model.toJSON();
+ if (webhook.activate) {
+ webhooks_menu.push({
+ html : _l( webhook.config.title ),
+ // func: function() {},
+ anon : true
+ });
+ }
+ });
+
+ if (webhooks_menu.length > 0) {
+ webhooks_menu.unshift({
+ html : _l( 'Webhooks' ),
+ header : true
+ });
+ $.merge(menu, webhooks_menu);
+ }
+ }
+ });
+ };
+
+ return {
+ Webhooks: Webhooks,
+ WebhookView: WebhookView,
+ addToMastheadMenu: addToMastheadMenu,
+ addToHistoryMenu: addToHistoryMenu
+ };
+});
diff --git a/config/plugins/webhooks/plugin2/config/plugin2.yml b/config/plugins/webhooks/plugin2/config/plugin2.yml
index 744c63d1da8..17b8e6a4350 100644
--- a/config/plugins/webhooks/plugin2/config/plugin2.yml
+++ b/config/plugins/webhooks/plugin2/config/plugin2.yml
@@ -1,2 +1,2 @@
name: Plugin 2
-type: mainview
+type: toolview
diff --git a/config/plugins/webhooks/plugin2/static/style.css b/config/plugins/webhooks/plugin2/static/style.css
new file mode 100644
index 00000000000..cca4d2bde7f
--- /dev/null
+++ b/config/plugins/webhooks/plugin2/static/style.css
@@ -0,0 +1,2 @@
+#webhook-toolview {border:1px solid #ccc;border-radius:3px;padding:10px;}
+#webhook-toolview p {margin-bottom:0;}
diff --git a/lib/galaxy/webapps/galaxy/api/webhooks.py b/lib/galaxy/webapps/galaxy/api/webhooks.py
index 1892b497702..108f0fd5e0a 100644
--- a/lib/galaxy/webapps/galaxy/api/webhooks.py
+++ b/lib/galaxy/webapps/galaxy/api/webhooks.py
@@ -2,13 +2,33 @@
API Controller providing Galaxy Webhooks
"""
-import logging
-
+from galaxy.web import _future_expose_api_anonymous_and_sessionless as \
+ expose_api_anonymous_and_sessionless
from galaxy.web.base.controller import BaseAPIController
+import logging
+import random
+
log = logging.getLogger(__name__)
class WebhooksController(BaseAPIController):
def __init__(self, app):
super(WebhooksController, self).__init__(app)
+
+ @expose_api_anonymous_and_sessionless
+ def get_all(self, trans, **kwd):
+ """
+ *GET /api/webhooks/
+ Returns all webhooks
+ """
+ return self.app.webhooks_registry.webhooks
+
+ @expose_api_anonymous_and_sessionless
+ def get_random(self, trans, webhook_type, **kwd):
+ """
+ *GET /api/webhooks/{webhook_type}
+ Returns a random webhook for a given type
+ """
+ webhooks = self.app.webhooks_registry.webhooks[webhook_type]
+ return random.choice(webhooks)
diff --git a/lib/galaxy/webapps/galaxy/buildapp.py b/lib/galaxy/webapps/galaxy/buildapp.py
index 9dc5ba019ab..2b186937d2f 100644
--- a/lib/galaxy/webapps/galaxy/buildapp.py
+++ b/lib/galaxy/webapps/galaxy/buildapp.py
@@ -447,6 +447,22 @@ def populate_api_routes( webapp, app ):
action='update_tour',
conditions=dict( method=[ "POST" ] ) )
+ # ========================
+ # ===== WEBHOOKS API =====
+ # ========================
+
+ webapp.mapper.connect( 'get_all',
+ '/api/webhooks',
+ controller='webhooks',
+ action='get_all',
+ conditions=dict( method=[ "GET" ] ) )
+
+ webapp.mapper.connect( 'get_random',
+ '/api/webhooks/{webhook_type}',
+ controller='webhooks',
+ action='get_random',
+ conditions=dict( method=[ "GET" ] ) )
+
# =======================
# ===== LIBRARY API =====
# =======================
diff --git a/lib/galaxy/webhooks/__init__.py b/lib/galaxy/webhooks/__init__.py
index 0642498f0cd..be323be9ac9 100644
--- a/lib/galaxy/webhooks/__init__.py
+++ b/lib/galaxy/webhooks/__init__.py
@@ -12,9 +12,8 @@ log = logging.getLogger(__name__)
class WebhooksRegistry(object):
- webhooks = {}
-
def __init__(self, webhooks_directories):
+ self.webhooks = {}
path = os.path.join(galaxy_root_path, webhooks_directories)
self.webhooks_directories = \
[os.path.join(path, name)
@@ -34,17 +33,28 @@ class WebhooksRegistry(object):
conf.endswith('.yaml')][0]
if config_file:
- self.load_webhook_from_config(
- os.path.join(config_dir, config_file))
+ self.load_webhook_from_config(config_dir, config_file)
- def load_webhook_from_config(self, config_file):
+ def load_webhook_from_config(self, config_dir, config_file):
try:
- with open(config_file) as f:
+ with open(os.path.join(config_dir, config_file)) as f:
config = yaml.load(f)
+
if config['type'] not in self.webhooks.keys():
self.webhooks[config['type']] = []
- self.webhooks[config['type']].append({
- 'name': config['name']
+
+ path = os.path.normpath(os.path.join(config_dir, '..'))
+
+ try:
+ with open(os.path.join(path, 'static/style.css'), 'r') as f:
+ css_styles = f.read().replace('\n', '')
+ except IOError:
+ css_styles = ''
+
+ config.update({
+ 'path': path,
+ 'css_styles': css_styles
})
+ self.webhooks[config['type']].append(config)
except Exception as e:
log.exception(e)
diff --git a/static/maps/mvc/tool/tool-webhooks.js.map b/static/maps/mvc/tool/tool-webhooks.js.map
new file mode 100644
index 00000000000..9e69f89278d
--- /dev/null
+++ b/static/maps/mvc/tool/tool-webhooks.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"tool-webhooks.js","sources":["../../../src/mvc/tool/tool-webhooks.js"],"names":["define","galaxyRoot","Galaxy","root","WebhookModel","Backbone","Model","extend","urlRoot","defaults","name","path","WebhookView","View","el","webhookTemplate","_","template","initialize","me","this","model","fetch","success","render","webhookContent","toJSON","css_styles","$","text","appendTo","$el","html"],"mappings":"AAGAA,UAAW,WACP,GAAIC,GAA8B,mBAAVC,QAAwBA,OAAOC,KAAO,IAE1DC,EAAeC,SAASC,MAAMC,QAC9BC,QAAUP,EAAa,wBACvBQ,UACIC,KAAM,GACNC,KAAM,MAIVC,EAAcP,SAASQ,KAAKN,QAC5BO,GAAI,oBACJC,gBAAiBC,EAAEC,SAAS,iDAE5BC,WAAY,WACR,GAAIC,GAAKC,IACTA,MAAKC,MAAQ,GAAIjB,GACjBgB,KAAKC,MAAMC,OACPC,QAAS,WACLJ,EAAGK,aAKfA,OAAQ,WACJ,GAAIC,GAAiBL,KAAKC,MAAMK,QAGhC,OAFID,GAAeE,YAAYC,EAAE,YAAYC,KAAKJ,EAAeE,YAAYG,SAAS,QACtFV,KAAKW,IAAIC,KAAKZ,KAAKL,gBAAgBU,IAC5BL,OAIf,QACIR,YAAaA"}
\ No newline at end of file
diff --git a/static/scripts/bundled/login.bundled.js b/static/scripts/bundled/login.bundled.js
index e0dd6402042..77e6112be20 100644
--- a/static/scripts/bundled/login.bundled.js
+++ b/static/scripts/bundled/login.bundled.js
@@ -1,2 +1,2 @@
-webpackJsonp([4],[function(e,r,n){(function(e){var r=n(1),a=r,i=n(58).GalaxyApp,o=n(11),t=n(5),l=n(60);window.app=function(n,c){window.Galaxy=new i(n,c),Galaxy.debug("login app");var d=encodeURI(n.redirect);if(!n.show_welcome_with_login){var w=r.param({use_panels:"True",redirect:d});return void(window.location.href=Galaxy.root+"user/login?"+w)}var p=new l.PageLayoutView(e.extend(n,{el:"body",center:new o.CenterPanel({el:"#center"}),right:new o.RightPanel({title:t("Login required"),el:"#right"})}));a(function(){var e=r.param({redirect:d}),a=Galaxy.root+"user/login?"+e;p.render(),p.center.$("#galaxy_main").prop("src",n.welcome_url),p.right.$(".unified-panel-body").css("overflow","hidden").html('')})}}).call(r,n(2))}]);
+webpackJsonp([4],[function(e,r,n){(function(e){var r=n(1),a=r,i=n(59).GalaxyApp,o=n(11),t=n(5),l=n(61);window.app=function(n,c){window.Galaxy=new i(n,c),Galaxy.debug("login app");var d=encodeURI(n.redirect);if(!n.show_welcome_with_login){var w=r.param({use_panels:"True",redirect:d});return void(window.location.href=Galaxy.root+"user/login?"+w)}var p=new l.PageLayoutView(e.extend(n,{el:"body",center:new o.CenterPanel({el:"#center"}),right:new o.RightPanel({title:t("Login required"),el:"#right"})}));a(function(){var e=r.param({redirect:d}),a=Galaxy.root+"user/login?"+e;p.render(),p.center.$("#galaxy_main").prop("src",n.welcome_url),p.right.$(".unified-panel-body").css("overflow","hidden").html('')})}}).call(r,n(2))}]);
//# sourceMappingURL=login.bundled.js.map
\ No newline at end of file
diff --git a/static/scripts/bundled/login.bundled.js.map b/static/scripts/bundled/login.bundled.js.map
index 66852485e89..816ffb6cfd6 100644
--- a/static/scripts/bundled/login.bundled.js.map
+++ b/static/scripts/bundled/login.bundled.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///login.bundled.js","webpack:///./galaxy/scripts/apps/login.js"],"names":["webpackJsonp","module","exports","__webpack_require__","_","jQuery","$","GalaxyApp","PANEL","_l","PAGE","window","app","options","bootstrapped","Galaxy","debug","redirect","encodeURI","show_welcome_with_login","params","param","use_panels","location","href","root","loginPage","PageLayoutView","extend","el","center","CenterPanel","right","RightPanel","title","loginUrl","render","prop","welcome_url","css","html","call"],"mappings":"AAAAA,cAAc,IAER,SAASC,EAAQC,EAASC,IAEH,SAASC,GCHtC,GAAAC,GAAAF,EAAA,GACAG,EAAAD,EACAE,EAAAJ,EAAA,IAAAI,UACAC,EAAAL,EAAA,IACAM,EAAAN,EAAA,GACAO,EAAAP,EAAA,GAEAQ,QAAAC,IAAA,SAAAC,EAAAC,GACAH,OAAAI,OAAA,GAAAR,GAAAM,EAAAC,GACAC,OAAAC,MAAA,YACA,IAAAC,GAAAC,UAAAL,EAAAI,SAIA,KAAAJ,EAAAM,wBAAA,CACA,GAAAC,GAAAf,EAAAgB,OAAmCC,WAAA,OAAAL,YAEnC,aADAN,OAAAY,SAAAC,KAAAT,OAAAU,KAAA,cAAAL,GAIA,GAAAM,GAAA,GAAAhB,GAAAiB,eAAAvB,EAAAwB,OAAAf,GACAgB,GAAA,OACAC,OAAA,GAAAtB,GAAAuB,aAAyCF,GAAA,YACzCG,MAAA,GAAAxB,GAAAyB,YACAC,MAAAzB,EAAA,kBACAoB,GAAA,aAIAvB,GAAA,WAEA,GAAAc,GAAAf,EAAAgB,OAAmCJ,aACnCkB,EAAApB,OAAAU,KAAA,cAAAL,CACAM,GAAAU,SAGAV,EAAAI,OAAAxB,EAAA,gBAAA+B,KAAA,MAAAxB,EAAAyB,aAEAZ,EAAAM,MAAA1B,EAAA,uBACAiC,IAAA,qBACAC,KAAA,gBAAAL,EAAA,+DDQ8BM,KAAKvC,EAASC,EAAoB","file":"login.bundled.js","sourcesContent":["webpackJsonp([4],[\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(_) {\n\tvar jQuery = __webpack_require__( 1 ),\n\t $ = jQuery,\n\t GalaxyApp = __webpack_require__( 58 ).GalaxyApp,\n\t PANEL = __webpack_require__( 11 ),\n\t _l = __webpack_require__( 5 ),\n\t PAGE = __webpack_require__( 60 );\n\t\n\twindow.app = function app( options, bootstrapped ){\n\t window.Galaxy = new GalaxyApp( options, bootstrapped );\n\t Galaxy.debug( 'login app' );\n\t var redirect = encodeURI( options.redirect );\n\t\n\t // TODO: remove iframe for user login (at least) and render login page from here\n\t // then remove this redirect\n\t if( !options.show_welcome_with_login ){\n\t var params = jQuery.param({ use_panels : 'True', redirect : redirect });\n\t window.location.href = Galaxy.root + 'user/login?' + params;\n\t return;\n\t }\n\t\n\t var loginPage = new PAGE.PageLayoutView( _.extend( options, {\n\t el : 'body',\n\t center : new PANEL.CenterPanel({ el : '#center' }),\n\t right : new PANEL.RightPanel({\n\t title : _l( 'Login required' ),\n\t el : '#right'\n\t }),\n\t }));\n\t\n\t $(function(){\n\t // TODO: incorporate *actual* referrer/redirect info as the original page does\n\t var params = jQuery.param({ redirect : redirect }),\n\t loginUrl = Galaxy.root + 'user/login?' + params;\n\t loginPage.render();\n\t\n\t // welcome page (probably) needs to remain sandboxed\n\t loginPage.center.$( '#galaxy_main' ).prop( 'src', options.welcome_url );\n\t\n\t loginPage.right.$( '.unified-panel-body' )\n\t .css( 'overflow', 'hidden' )\n\t .html( '' );\n\t });\n\t};\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))\n\n/***/ }\n]);\n\n\n/** WEBPACK FOOTER **\n ** login.bundled.js\n **/","\nvar jQuery = require( 'jquery' ),\n $ = jQuery,\n GalaxyApp = require( 'galaxy' ).GalaxyApp,\n PANEL = require( 'layout/panel' ),\n _l = require( 'utils/localization' ),\n PAGE = require( 'layout/page' );\n\nwindow.app = function app( options, bootstrapped ){\n window.Galaxy = new GalaxyApp( options, bootstrapped );\n Galaxy.debug( 'login app' );\n var redirect = encodeURI( options.redirect );\n\n // TODO: remove iframe for user login (at least) and render login page from here\n // then remove this redirect\n if( !options.show_welcome_with_login ){\n var params = jQuery.param({ use_panels : 'True', redirect : redirect });\n window.location.href = Galaxy.root + 'user/login?' + params;\n return;\n }\n\n var loginPage = new PAGE.PageLayoutView( _.extend( options, {\n el : 'body',\n center : new PANEL.CenterPanel({ el : '#center' }),\n right : new PANEL.RightPanel({\n title : _l( 'Login required' ),\n el : '#right'\n }),\n }));\n\n $(function(){\n // TODO: incorporate *actual* referrer/redirect info as the original page does\n var params = jQuery.param({ redirect : redirect }),\n loginUrl = Galaxy.root + 'user/login?' + params;\n loginPage.render();\n\n // welcome page (probably) needs to remain sandboxed\n loginPage.center.$( '#galaxy_main' ).prop( 'src', options.welcome_url );\n\n loginPage.right.$( '.unified-panel-body' )\n .css( 'overflow', 'hidden' )\n .html( '' );\n });\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./galaxy/scripts/apps/login.js\n ** module id = 0\n ** module chunks = 4\n **/"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///login.bundled.js","webpack:///./galaxy/scripts/apps/login.js"],"names":["webpackJsonp","module","exports","__webpack_require__","_","jQuery","$","GalaxyApp","PANEL","_l","PAGE","window","app","options","bootstrapped","Galaxy","debug","redirect","encodeURI","show_welcome_with_login","params","param","use_panels","location","href","root","loginPage","PageLayoutView","extend","el","center","CenterPanel","right","RightPanel","title","loginUrl","render","prop","welcome_url","css","html","call"],"mappings":"AAAAA,cAAc,IAER,SAASC,EAAQC,EAASC,IAEH,SAASC,GCHtC,GAAAC,GAAAF,EAAA,GACAG,EAAAD,EACAE,EAAAJ,EAAA,IAAAI,UACAC,EAAAL,EAAA,IACAM,EAAAN,EAAA,GACAO,EAAAP,EAAA,GAEAQ,QAAAC,IAAA,SAAAC,EAAAC,GACAH,OAAAI,OAAA,GAAAR,GAAAM,EAAAC,GACAC,OAAAC,MAAA,YACA,IAAAC,GAAAC,UAAAL,EAAAI,SAIA,KAAAJ,EAAAM,wBAAA,CACA,GAAAC,GAAAf,EAAAgB,OAAmCC,WAAA,OAAAL,YAEnC,aADAN,OAAAY,SAAAC,KAAAT,OAAAU,KAAA,cAAAL,GAIA,GAAAM,GAAA,GAAAhB,GAAAiB,eAAAvB,EAAAwB,OAAAf,GACAgB,GAAA,OACAC,OAAA,GAAAtB,GAAAuB,aAAyCF,GAAA,YACzCG,MAAA,GAAAxB,GAAAyB,YACAC,MAAAzB,EAAA,kBACAoB,GAAA,aAIAvB,GAAA,WAEA,GAAAc,GAAAf,EAAAgB,OAAmCJ,aACnCkB,EAAApB,OAAAU,KAAA,cAAAL,CACAM,GAAAU,SAGAV,EAAAI,OAAAxB,EAAA,gBAAA+B,KAAA,MAAAxB,EAAAyB,aAEAZ,EAAAM,MAAA1B,EAAA,uBACAiC,IAAA,qBACAC,KAAA,gBAAAL,EAAA,+DDQ8BM,KAAKvC,EAASC,EAAoB","file":"login.bundled.js","sourcesContent":["webpackJsonp([4],[\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(_) {\n\tvar jQuery = __webpack_require__( 1 ),\n\t $ = jQuery,\n\t GalaxyApp = __webpack_require__( 59 ).GalaxyApp,\n\t PANEL = __webpack_require__( 11 ),\n\t _l = __webpack_require__( 5 ),\n\t PAGE = __webpack_require__( 61 );\n\t\n\twindow.app = function app( options, bootstrapped ){\n\t window.Galaxy = new GalaxyApp( options, bootstrapped );\n\t Galaxy.debug( 'login app' );\n\t var redirect = encodeURI( options.redirect );\n\t\n\t // TODO: remove iframe for user login (at least) and render login page from here\n\t // then remove this redirect\n\t if( !options.show_welcome_with_login ){\n\t var params = jQuery.param({ use_panels : 'True', redirect : redirect });\n\t window.location.href = Galaxy.root + 'user/login?' + params;\n\t return;\n\t }\n\t\n\t var loginPage = new PAGE.PageLayoutView( _.extend( options, {\n\t el : 'body',\n\t center : new PANEL.CenterPanel({ el : '#center' }),\n\t right : new PANEL.RightPanel({\n\t title : _l( 'Login required' ),\n\t el : '#right'\n\t }),\n\t }));\n\t\n\t $(function(){\n\t // TODO: incorporate *actual* referrer/redirect info as the original page does\n\t var params = jQuery.param({ redirect : redirect }),\n\t loginUrl = Galaxy.root + 'user/login?' + params;\n\t loginPage.render();\n\t\n\t // welcome page (probably) needs to remain sandboxed\n\t loginPage.center.$( '#galaxy_main' ).prop( 'src', options.welcome_url );\n\t\n\t loginPage.right.$( '.unified-panel-body' )\n\t .css( 'overflow', 'hidden' )\n\t .html( '' );\n\t });\n\t};\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))\n\n/***/ }\n]);\n\n\n/** WEBPACK FOOTER **\n ** login.bundled.js\n **/","\nvar jQuery = require( 'jquery' ),\n $ = jQuery,\n GalaxyApp = require( 'galaxy' ).GalaxyApp,\n PANEL = require( 'layout/panel' ),\n _l = require( 'utils/localization' ),\n PAGE = require( 'layout/page' );\n\nwindow.app = function app( options, bootstrapped ){\n window.Galaxy = new GalaxyApp( options, bootstrapped );\n Galaxy.debug( 'login app' );\n var redirect = encodeURI( options.redirect );\n\n // TODO: remove iframe for user login (at least) and render login page from here\n // then remove this redirect\n if( !options.show_welcome_with_login ){\n var params = jQuery.param({ use_panels : 'True', redirect : redirect });\n window.location.href = Galaxy.root + 'user/login?' + params;\n return;\n }\n\n var loginPage = new PAGE.PageLayoutView( _.extend( options, {\n el : 'body',\n center : new PANEL.CenterPanel({ el : '#center' }),\n right : new PANEL.RightPanel({\n title : _l( 'Login required' ),\n el : '#right'\n }),\n }));\n\n $(function(){\n // TODO: incorporate *actual* referrer/redirect info as the original page does\n var params = jQuery.param({ redirect : redirect }),\n loginUrl = Galaxy.root + 'user/login?' + params;\n loginPage.render();\n\n // welcome page (probably) needs to remain sandboxed\n loginPage.center.$( '#galaxy_main' ).prop( 'src', options.welcome_url );\n\n loginPage.right.$( '.unified-panel-body' )\n .css( 'overflow', 'hidden' )\n .html( '' );\n });\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./galaxy/scripts/apps/login.js\n ** module id = 0\n ** module chunks = 4\n **/"],"sourceRoot":""}
\ No newline at end of file
diff --git a/static/scripts/mvc/tool/tool-webhooks.js b/static/scripts/mvc/tool/tool-webhooks.js
new file mode 100644
index 00000000000..cebdb9aebcb
--- /dev/null
+++ b/static/scripts/mvc/tool/tool-webhooks.js
@@ -0,0 +1,2 @@
+define([],function(){var a="undefined"!=typeof Galaxy?Galaxy.root:"/",b=Backbone.Model.extend({urlRoot:a+"api/webhooks/toolview",defaults:{name:"",path:""}}),c=Backbone.View.extend({el:"#webhook-toolview",webhookTemplate:_.template("name: <%= name %>
path: <%= path %>
"),initialize:function(){var a=this;this.model=new b,this.model.fetch({success:function(){a.render()}})},render:function(){var a=this.model.toJSON();return a.css_styles&&$("").text(a.css_styles).appendTo("head"),this.$el.html(this.webhookTemplate(a)),this}});return{WebhookView:c}});
+//# sourceMappingURL=../../../maps/mvc/tool/tool-webhooks.js.map
\ No newline at end of file