1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

add logging and responsive user navigation

This commit is contained in:
Tim Daubenschütz 2015-07-16 19:12:18 +02:00
parent 343ebcf741
commit 13e151e83b
8 changed files with 15 additions and 7 deletions

View File

@ -52,7 +52,7 @@
</script>
<!-- Logging for sentry -->
<!-- <script src="//cdn.ravenjs.com/1.1.19/raven.min.js"></script> -->
<script src="//cdn.ravenjs.com/1.1.19/raven.min.js"></script>
<!-- Intercom library -->
<script>

View File

@ -19,6 +19,7 @@ class UserActions {
})
.catch((err) => {
console.log(err);
this.actions.updateCurrentUser({});
});
}
logoutCurrentUser() {

View File

@ -28,17 +28,16 @@ requests.defaults({
},
fatalErrorHandler: (err) => {
console.log(err);
//alert('Something went wrong, please reload the page');
}
});
/* Raven.config('https://0955da3388c64ab29bd32c2a429f9ef4@app.getsentry.com/48351', {
Raven.config('https://0955da3388c64ab29bd32c2a429f9ef4@app.getsentry.com/48351', {
// pass along the version of your application
release: '1.0.0'
}).install();
window.onerror = Raven.process;
*/
class AppGateway {
start() {

View File

@ -103,8 +103,10 @@ let AclButton = React.createClass({
showNotification(response){
this.props.handleSuccess();
if(response.notification) {
let notification = new GlobalNotificationModel(response.notification, 'success');
GlobalNotificationActions.appendGlobalNotification(notification);
}
},
// plz move to share form

View File

@ -312,6 +312,7 @@ var ReactS3FineUploader = React.createClass({
},
onError() {
Raven.captureException('react-fineuploader-error');
let notification = new GlobalNotificationModel(this.props.defaultErrorMessage, 'danger', 5000);
GlobalNotificationActions.appendGlobalNotification(notification);
},

View File

@ -102,6 +102,10 @@ let Header = React.createClass({
activator: '#IntercomDefaultWidget'
}
});
Raven.setUserContext({
email: this.state.currentUser.email
});
}
},

View File

@ -72,7 +72,6 @@ export function getCookie(name) {
return parts[i].split('=').pop();
}
}
console.warn('There wasn\'t a cookie with name: ' + name + ' found.');
}
/*

View File

@ -23,6 +23,8 @@ class Requests {
unpackResponse(response) {
if (response.status >= 500) {
throw new ServerError();
} else if(response.status === 403) {
Raven.captureException('csrftoken error');
}
return response.text();
}