mirror of
https://github.com/ascribe/onion.git
synced 2025-01-18 08:46:10 +01:00
add logging and responsive user navigation
This commit is contained in:
parent
343ebcf741
commit
13e151e83b
@ -52,7 +52,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Logging for sentry -->
|
<!-- 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 -->
|
<!-- Intercom library -->
|
||||||
<script>
|
<script>
|
||||||
|
@ -19,6 +19,7 @@ class UserActions {
|
|||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
this.actions.updateCurrentUser({});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
logoutCurrentUser() {
|
logoutCurrentUser() {
|
||||||
|
@ -28,17 +28,16 @@ requests.defaults({
|
|||||||
},
|
},
|
||||||
fatalErrorHandler: (err) => {
|
fatalErrorHandler: (err) => {
|
||||||
console.log(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
|
// pass along the version of your application
|
||||||
release: '1.0.0'
|
release: '1.0.0'
|
||||||
}).install();
|
}).install();
|
||||||
|
|
||||||
window.onerror = Raven.process;
|
window.onerror = Raven.process;
|
||||||
*/
|
|
||||||
class AppGateway {
|
class AppGateway {
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
@ -103,8 +103,10 @@ let AclButton = React.createClass({
|
|||||||
|
|
||||||
showNotification(response){
|
showNotification(response){
|
||||||
this.props.handleSuccess();
|
this.props.handleSuccess();
|
||||||
let notification = new GlobalNotificationModel(response.notification, 'success');
|
if(response.notification) {
|
||||||
GlobalNotificationActions.appendGlobalNotification(notification);
|
let notification = new GlobalNotificationModel(response.notification, 'success');
|
||||||
|
GlobalNotificationActions.appendGlobalNotification(notification);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// plz move to share form
|
// plz move to share form
|
||||||
|
@ -312,6 +312,7 @@ var ReactS3FineUploader = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onError() {
|
onError() {
|
||||||
|
Raven.captureException('react-fineuploader-error');
|
||||||
let notification = new GlobalNotificationModel(this.props.defaultErrorMessage, 'danger', 5000);
|
let notification = new GlobalNotificationModel(this.props.defaultErrorMessage, 'danger', 5000);
|
||||||
GlobalNotificationActions.appendGlobalNotification(notification);
|
GlobalNotificationActions.appendGlobalNotification(notification);
|
||||||
},
|
},
|
||||||
|
@ -102,6 +102,10 @@ let Header = React.createClass({
|
|||||||
activator: '#IntercomDefaultWidget'
|
activator: '#IntercomDefaultWidget'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Raven.setUserContext({
|
||||||
|
email: this.state.currentUser.email
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -72,7 +72,6 @@ export function getCookie(name) {
|
|||||||
return parts[i].split('=').pop();
|
return parts[i].split('=').pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.warn('There wasn\'t a cookie with name: ' + name + ' found.');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -23,6 +23,8 @@ class Requests {
|
|||||||
unpackResponse(response) {
|
unpackResponse(response) {
|
||||||
if (response.status >= 500) {
|
if (response.status >= 500) {
|
||||||
throw new ServerError();
|
throw new ServerError();
|
||||||
|
} else if(response.status === 403) {
|
||||||
|
Raven.captureException('csrftoken error');
|
||||||
}
|
}
|
||||||
return response.text();
|
return response.text();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user