From 174a18ff0b85f1531e189e39d8a087f115ea0362 Mon Sep 17 00:00:00 2001 From: Edward Lee Date: Fri, 7 Jul 2017 14:23:35 -0400 Subject: [PATCH 1/4] [frontend/stable] Associate email with Sentry context. --- src/frontend/build/js.frontend | 2 ++ src/frontend/frontend/frontend.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/frontend/build/js.frontend b/src/frontend/build/js.frontend index c03e09cf..e783272c 100644 --- a/src/frontend/build/js.frontend +++ b/src/frontend/build/js.frontend @@ -27,6 +27,7 @@ //cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.1/ui-bootstrap-tpls.min.js //cdnjs.cloudflare.com/ajax/libs/angular-css/1.0.7/angular-css.min.js //cdnjs.cloudflare.com/ajax/libs/dexie/1.4.1/dexie.js +//cdn.ravenjs.com/3.16.1/raven.min.js # Overrides js/lib/ui-codemirror.js @@ -36,6 +37,7 @@ js/lib/md5.js js/lib/bowser.min.js # Seashell libraries +js/raven.js js/socket/crypto.js js/socket/websocket_client.js js/storage-service.js diff --git a/src/frontend/frontend/frontend.js b/src/frontend/frontend/frontend.js index 7d5950be..c13e8b1d 100644 --- a/src/frontend/frontend/frontend.js +++ b/src/frontend/frontend/frontend.js @@ -164,6 +164,10 @@ angular.module('frontend-app', ['seashell-websocket', 'seashell-projects', 'ngCo '$window', '$document', '$rootScope', 'localfiles', function($cookies, ws, settings, errors, projects, $window, $document, $rootScope, localfiles) { + var ck = $cookies.getObject(SEASHELL_CREDS_COOKIE); + if (ck) { + Raven.setUserContext({email: ck.user + "@uwaterloo.ca"}); + } ws.connect(); // Reload settings on (re)connect. ws.register_callback('connected', function () { From 31f514287de6d0b858f5320ee25fd9b01c178425 Mon Sep 17 00:00:00 2001 From: Edward Lee Date: Fri, 7 Jul 2017 14:30:12 -0400 Subject: [PATCH 2/4] [frontend] Report errors (hackish). --- src/frontend/frontend/errors.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frontend/frontend/errors.js b/src/frontend/frontend/errors.js index d46d3603..9ab01f01 100644 --- a/src/frontend/frontend/errors.js +++ b/src/frontend/frontend/errors.js @@ -40,6 +40,7 @@ angular.module('frontend-app') // makes the UI display an error message self.report = function (error, shorthand, type) { if (error) { + Raven.captureException(error); console.error(error); self.errors.push({shorthand: shorthand, error: error, type: type}); } From 1af6b66575f87416a2cc807d1d8085ae1036a7a6 Mon Sep 17 00:00:00 2001 From: Edward Lee Date: Fri, 7 Jul 2017 14:31:33 -0400 Subject: [PATCH 3/4] [frontend] Add Raven configuration. --- src/frontend/js/raven.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/frontend/js/raven.js diff --git a/src/frontend/js/raven.js b/src/frontend/js/raven.js new file mode 100644 index 00000000..ce413290 --- /dev/null +++ b/src/frontend/js/raven.js @@ -0,0 +1 @@ +Raven.config('https://bc3d28105aad455f9d5508df49d36b6f@sentry.io/189114').install(); From 8acc332b87da5e1f0118ce147c80d101a3ef6647 Mon Sep 17 00:00:00 2001 From: Edward Lee Date: Fri, 7 Jul 2017 14:46:09 -0400 Subject: [PATCH 4/4] [frontend/stable] Disable useless tests. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a7eb3c98..45aa12d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,7 @@ script: -fcolor-diagnostics' -DCMAKE_CXX_FLAGS='-Qunused-arguments -fcolor-diagnostics' -DPROCESSOR_COUNT=1 -DTRAVIS_BUILD=1" -l "" - ./build_tools/install -a "-j2" -l "" -t "true" -- ./src/tests/frontend-tests/node_modules/karma/bin/karma start ./src/tests/frontend-tests/seashell.conf.js +# - ./src/tests/frontend-tests/node_modules/karma/bin/karma start ./src/tests/frontend-tests/seashell.conf.js notifications: slack: secure: QTnHM1Cr1DDHY4laUKnpiQzcj3/NZ+qutlpzF6AcXBWhuGoTLLjmqIAPS6RvIpg0vHb2rxCEQ9g117iH5VFPv4FSoE5IfUeDM4CqheBvSmcbw5HmkCEgwaEcDyTd8iA0ChLmNzXsY8YEjQ5bS1xOsjLvKxwHj7Tg69ZWQhdnlDs=