Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
logHorzLayout: window.localStorage ? window.localStorage.getItem('App.logHorzLayout') === 'true' : false,
runningInstances: {},
confirm: '',
importFile: false,
message: '',
searchText: '',
themeType: window.localStorage ? window.localStorage.getItem('App.theme') || 'light' : 'light',
};
// this.logIndex = 0;
this.logSize = window.localStorage ? parseFloat(window.localStorage.getItem('App.logSize')) || 150 : 150;
this.menuSize = window.localStorage ? parseFloat(window.localStorage.getItem('App.menuSize')) || 500 : 500;
this.scripts = {};
this.hosts = [];
this.importFile = null;
this.socket = new Connection({
autoSubscribes: ['script.*', 'system.adapter.javascript.*'],
autoSubscribeLog: true,
onProgress: progress => {
if (progress === PROGRESS.CONNECTING) {
this.setState({connected: false});
} else if (progress === PROGRESS.READY) {
this.setState({connected: true, progress: 100});
} else {
this.setState({connected: true, progress: Math.round(PROGRESS.READY / progress * 100)});
}
},
onReady: (objects, scripts) => {
I18n.setLanguage(this.socket.systemLang);
window.systemLang = this.socket.systemLang;
this.onObjectChange(objects, scripts, true);
},