Skip to content

Commit

Permalink
Raven: revert previous commit and move raven first
Browse files Browse the repository at this point in the history
Moves galaxy.panels.mako's import of Raven back to vanilla script
tag and before the requirejs library import, allowing Raven's UMD
to define Raven as a global.

This starts Raven/sentry *before* the library package is loaded so that
library errors can be captured as well.
  • Loading branch information
carlfeberhard committed Jun 2, 2016
1 parent d458906 commit 8ef5279
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions templates/webapps/galaxy/galaxy.panels.mako
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@
</%def>
<%def name="javascripts()">
## Send errors to Sentry server if configured
%if app.config.sentry_dsn:
${h.js( "libs/raven" )}
<script>
Raven.config('${app.config.sentry_dsn_public}').install();
%if trans.user:
Raven.setUser( { email: "${trans.user.email | h}" } );
%endif
</script>
%endif
## load jscript libraries
${h.js(
Expand Down Expand Up @@ -80,16 +90,6 @@
},
});
// send errors to Sentry server if configured
%if app.config.sentry_dsn:
require([ 'libs/raven' ], function( Raven ){
Raven.config( '${app.config.sentry_dsn_public}' ).install();
%if trans.user:
Raven.setUser({ email: "${trans.user.email|h}" });
%endif
});
%endif
// console protection
// TODO: Only needed for IE <9 which I believe we dropped
window.console = window.console || {
Expand Down

0 comments on commit 8ef5279

Please sign in to comment.