Raven only on prod; Notifications with descriptions (p.description)

This commit is contained in:
James Barnsley
2017-09-28 11:56:33 +13:00
parent 4dea2bb29b
commit bdda823cba
3 changed files with 17 additions and 10 deletions

View File

@ -64,16 +64,16 @@
} else {
js.src = '/iris/app.min.js?v='+build;
css.href = '/iris/app.min.css?v='+build;
}
// Initiate error tracking. This helps catch errors early so
// patches can accurately and quickly fix issues.
Raven.config(
'https://023e3bf7721b48f29948545fc36a4621@sentry.io/219026',
{
release: version+(test_mode ? "_testmode" : "")
}
).install();
// Initiate error tracking. This helps catch errors early so
// patches can accurately and quickly fix issues.
Raven.config(
'https://023e3bf7721b48f29948545fc36a4621@sentry.io/219026',
{
release: version
}
).install();
}
// And finally inject our CSS/JS tags
document.body.appendChild(js);

View File

@ -61,7 +61,7 @@ const CoreMiddleware = (function(){
var xhr_response = JSON.parse(action.data.xhr.responseText);
if (xhr_response.error && xhr_response.error.message){
message = message +": "+ xhr_response.error.message;
message = message+'<p class="description">'+xhr_response.error.message+'</p>';
}
store.dispatch(uiActions.createNotification(message,'bad'));

View File

@ -29,6 +29,13 @@
border-bottom: 1px dotted $black;
}
p.description {
font-size: 14px;
opacity: 0.5;
padding-top: 5px;
line-height: 1.1em;
}
.close-button {
position: absolute;
top: 4px;