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