cabana: fix webworker window referenceerror; persist dbc on load

main
Andy Haden 2017-06-30 16:00:21 -07:00
parent 624d5876bb
commit 5ec7e578ef
5 changed files with 10 additions and 11 deletions

View File

@ -107,12 +107,14 @@ export default class CanExplorer extends Component {
};
}
onDbcSelected(filename, dbcInstance) {
onDbcSelected(dbcFilename, dbc) {
const {route} = this.state;
this.hideLoadDbc();
this.setState({dbc: dbcInstance,
dbcFilename: filename,
currentParts: [0, Math.min(route.proclog - 1, 2)],
persistDbc(route.fullname,
{dbcFilename, dbc});
this.setState({dbc,
dbcFilename,
partsLoaded: 0,
selectedMessage: null,
messages: {}}, () => {
const {route} = this.state;

View File

@ -12,7 +12,7 @@ export const GITHUB_REDIRECT_URL = ENV_GITHUB_REDIRECT_URL[ENV];
export const GITHUB_AUTH_TOKEN_KEY = 'gh_access_token';
export const OPENDBC_SOURCE_REPO = 'commaai/opendbc';
export const USE_UNLOGGER = (getUrlParameter('unlogger') !== null);
export const USE_UNLOGGER = (typeof window !== 'undefined' && getUrlParameter('unlogger') !== null);
export const UNLOGGER_HOST = 'http://localhost:8080/unlogger';
export const LOGENTRIES_TOKEN = '4bc98019-8277-4fe0-867c-ed21ea843cc5';

View File

@ -1,5 +1,4 @@
window = self;
var window = self;
require('core-js/fn/object/values');
import NumpyLoader from '../utils/loadnpy';
import DBC from '../models/can/dbc';

View File

@ -1,5 +1,4 @@
window = self;
var window = self;
require('core-js/fn/object/values');
import * as CanApi from '../api/can';

View File

@ -1,5 +1,4 @@
window = self;
var window = self;
require('core-js/fn/object/values');
import DBC from '../models/can/dbc';
import DbcUtils from '../utils/dbc';