Reenable sentry

This commit is contained in:
ziajka 2018-07-23 16:37:09 +02:00
parent da49ac51e6
commit 88f6134092
4 changed files with 21 additions and 23 deletions

View File

@ -28,7 +28,7 @@ build_script:
test: off
artifacts:
- path: 'GNS3*.exe'
- path: 'gns3-web-ui*.exe'
name: gns3-web-ui
environment:

View File

@ -9,6 +9,6 @@ describe('gns3-web-ui App', () => {
it('should display title', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('GNS3 Web UI Demo');
expect(page.getTitleText()).toEqual('GNS3 Web UI');
});
});

View File

@ -6,8 +6,6 @@ const path = require('path');
const url = require('url');
const yargs = require('yargs');
// require('./sentry');
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow;

View File

@ -1,26 +1,26 @@
// const { init } = require('@sentry/electron');
// const fs = require('fs');
// const { ipcMain } = require('electron');
const { init } = require('@sentry/electron');
const fs = require('fs');
const { ipcMain } = require('electron');
// let crashReportsEnabled = true;
// const DSN =
// 'https://cb7b474b2e874afb8e400c47d1452ecc:7876224cbff543d992cb0ac4021962f8@sentry.io/1040940';
let crashReportsEnabled = true;
const DSN =
'https://cb7b474b2e874afb8e400c47d1452ecc:7876224cbff543d992cb0ac4021962f8@sentry.io/1040940';
// const isDev = () => {
// return fs.existsSync('.git');
// };
const isDev = () => {
return fs.existsSync('.git');
};
// const shouldSendCallback = () => {
// return !isDev() && crashReportsEnabled;
// };
const shouldSendCallback = () => {
return !isDev() && crashReportsEnabled;
};
// ipcMain.on('settings.changed', function (event, settings) {
// crashReportsEnabled = settings.crash_reports;
// });
ipcMain.on('settings.changed', function (event, settings) {
crashReportsEnabled = settings.crash_reports;
});
// init({
// dsn: DSN,
// shouldSendCallback: shouldSendCallback
// });
init({
dsn: DSN,
shouldSendCallback: shouldSendCallback
});