mirror of
https://github.com/ascribe/onion.git
synced 2025-01-03 18:35:09 +01:00
Merged in AD-708-fineuploader-process-logging (pull request #28)
Ad 708 fineuploader process logging
This commit is contained in:
commit
34a47d0290
5
.gitignore
vendored
5
.gitignore
vendored
@ -6,7 +6,10 @@ lib-cov
|
||||
*.out
|
||||
*.pid
|
||||
*.gz
|
||||
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
webapp-dependencies.txt
|
||||
|
||||
pids
|
||||
logs
|
||||
results
|
||||
|
@ -22,6 +22,7 @@ class UserActions {
|
||||
this.actions.updateCurrentUser({});
|
||||
});
|
||||
}
|
||||
|
||||
logoutCurrentUser() {
|
||||
return UserFetcher.logout()
|
||||
.then(() => {
|
||||
|
@ -4,11 +4,12 @@ import React from 'react';
|
||||
import ReactAddons from 'react/addons';
|
||||
|
||||
import Button from 'react-bootstrap/lib/Button';
|
||||
import AlertDismissable from './alert';
|
||||
|
||||
import requests from '../../utils/requests';
|
||||
|
||||
import { getLangText } from '../../utils/lang_utils';
|
||||
import { mergeOptionsWithDuplicates } from '../../utils/general_utils';
|
||||
import AlertDismissable from './alert';
|
||||
|
||||
|
||||
let Form = React.createClass({
|
||||
@ -91,7 +92,14 @@ let Form = React.createClass({
|
||||
}
|
||||
}
|
||||
else {
|
||||
console.logGlobal(err, false, this.getFormData());
|
||||
let formData = this.getFormData();
|
||||
|
||||
// sentry shouldn't post the user's password
|
||||
if(formData.password) {
|
||||
delete formData.password;
|
||||
}
|
||||
|
||||
console.logGlobal(err, false, formData);
|
||||
this.setState({errors: [getLangText('Something went wrong, please try again later')]});
|
||||
}
|
||||
this.setState({submitted: false});
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
import React from 'react/addons';
|
||||
import Router from 'react-router';
|
||||
import Raven from 'raven-js';
|
||||
import Q from 'q';
|
||||
|
||||
import { getCookie } from '../../utils/fetch_api_utils';
|
||||
@ -302,7 +301,12 @@ var ReactS3FineUploader = React.createClass({
|
||||
|
||||
/* FineUploader specific callback function handlers */
|
||||
|
||||
onComplete(id) {
|
||||
onComplete(id, name, res, xhr) {
|
||||
// there has been an issue with the server's connection
|
||||
if(xhr.status === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
let files = this.state.filesToUpload;
|
||||
|
||||
// Set the state of the completed file to 'upload successful' in order to
|
||||
@ -351,7 +355,9 @@ var ReactS3FineUploader = React.createClass({
|
||||
},
|
||||
|
||||
onError(id, name, errorReason) {
|
||||
Raven.captureException(errorReason);
|
||||
console.logGlobal(errorReason, false, this.state.filesToUpload);
|
||||
this.state.uploader.cancelAll();
|
||||
|
||||
let notification = new GlobalNotificationModel(this.props.defaultErrorMessage, 'danger', 5000);
|
||||
GlobalNotificationActions.appendGlobalNotification(notification);
|
||||
},
|
||||
|
@ -9489,6 +9489,13 @@ qq.s3.XhrUploadHandler = function(spec, proxy) {
|
||||
result.success,
|
||||
|
||||
function failure(reason, xhr) {
|
||||
|
||||
console.logGlobal(reason + 'in chunked.combine', false, {
|
||||
uploadId,
|
||||
etagMap,
|
||||
result
|
||||
});
|
||||
|
||||
result.failure(upload.done(id, xhr).response, xhr);
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user