Fix typos
This commit is contained in:
@@ -104,7 +104,7 @@ export const togglePause = (tree?: q.Tree<TopicViewModel>) => (dispatch: Dispatc
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
tree && tree.applyUnmergedChanges()
|
tree && tree.applyUnmergedChanges()
|
||||||
if (paused && changes > 0) {
|
if (paused && changes > 0) {
|
||||||
dispatch(globalActions.showNotification(`Sucessfully applied ${changes} changes.`))
|
dispatch(globalActions.showNotification(`Successfully applied ${changes} changes.`))
|
||||||
}
|
}
|
||||||
}, 50)
|
}, 50)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import * as React from 'react'
|
|||||||
import PersistentStorage from '../utils/PersistentStorage'
|
import PersistentStorage from '../utils/PersistentStorage'
|
||||||
import SentimentDissatisfied from '@material-ui/icons/SentimentDissatisfied'
|
import SentimentDissatisfied from '@material-ui/icons/SentimentDissatisfied'
|
||||||
import Warning from '@material-ui/icons/Warning'
|
import Warning from '@material-ui/icons/Warning'
|
||||||
import { electronRendererTelementry } from 'electron-telemetry'
|
import { electronRendererTelemetry } from 'electron-telemetry'
|
||||||
import { Theme, withStyles } from '@material-ui/core/styles'
|
import { Theme, withStyles } from '@material-ui/core/styles'
|
||||||
import { Button, Modal, Paper, Toolbar, Typography } from '@material-ui/core'
|
import { Button, Modal, Paper, Toolbar, Typography } from '@material-ui/core'
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ class ErrorBoundary extends React.Component<Props, State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public componentDidCatch(error: Error, errorInfo: any) {
|
public componentDidCatch(error: Error, errorInfo: any) {
|
||||||
electronRendererTelementry.trackError(error)
|
electronRendererTelemetry.trackError(error)
|
||||||
console.log('did catch', error)
|
console.log('did catch', error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { electronRendererTelementry } from 'electron-telemetry'
|
import { electronRendererTelemetry } from 'electron-telemetry'
|
||||||
|
|
||||||
const telemetry = electronRendererTelementry
|
const telemetry = electronRendererTelemetry
|
||||||
electronRendererTelementry.registerErrorHandler()
|
electronRendererTelemetry.registerErrorHandler()
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
import { electronRendererTelementry } from 'electron-telemetry'
|
import { electronRendererTelemetry } from 'electron-telemetry'
|
||||||
|
|
||||||
// Used to determine long-time-stability and memory leaks
|
// Used to determine long-time-stability and memory leaks
|
||||||
function trackProcessStatistics() {
|
function trackProcessStatistics() {
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
try {
|
try {
|
||||||
electronRendererTelementry.trackCustomEvent({
|
electronRendererTelemetry.trackCustomEvent({
|
||||||
name: 'heapStatistics',
|
name: 'heapStatistics',
|
||||||
payload: process.getHeapStatistics(),
|
payload: process.getHeapStatistics(),
|
||||||
})
|
})
|
||||||
electronRendererTelementry.trackCustomEvent({
|
electronRendererTelemetry.trackCustomEvent({
|
||||||
name: 'cpuUsage',
|
name: 'cpuUsage',
|
||||||
payload: process.getCPUUsage(),
|
payload: process.getCPUUsage(),
|
||||||
})
|
})
|
||||||
electronRendererTelementry.trackCustomEvent({
|
electronRendererTelemetry.trackCustomEvent({
|
||||||
name: 'runningSince',
|
name: 'runningSince',
|
||||||
payload: performance.now(),
|
payload: performance.now(),
|
||||||
})
|
})
|
||||||
@@ -30,6 +30,6 @@ export function trackEvent(name: string) {
|
|||||||
}
|
}
|
||||||
const blacklist = ['CONNECTION_SET_HEALTH']
|
const blacklist = ['CONNECTION_SET_HEALTH']
|
||||||
if (blacklist.indexOf(name) === -1) {
|
if (blacklist.indexOf(name) === -1) {
|
||||||
electronRendererTelementry.trackEvent(name)
|
electronRendererTelemetry.trackEvent(name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ describe('Edge', () => {
|
|||||||
expect(e.name).to.equal('foo')
|
expect(e.name).to.equal('foo')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('firstEdge should retireve the first edge', () => {
|
it('firstEdge should retrieve the first edge', () => {
|
||||||
const topics = 'foo/bar/baz'.split('/')
|
const topics = 'foo/bar/baz'.split('/')
|
||||||
const leaf = TreeNodeFactory.fromEdgesAndValue(topics, undefined)
|
const leaf = TreeNodeFactory.fromEdgesAndValue(topics, undefined)
|
||||||
const bazEdge = leaf.sourceEdge
|
const bazEdge = leaf.sourceEdge
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ describe('EventDispatcher', async () => {
|
|||||||
it('should unsubscribe', async function() {
|
it('should unsubscribe', async function() {
|
||||||
const dispatcher = new EventDispatcher<string, string>()
|
const dispatcher = new EventDispatcher<string, string>()
|
||||||
this.timeout(300)
|
this.timeout(300)
|
||||||
let incrementee = 0
|
let callbackCounter = 0
|
||||||
const callback = (msg: any) => {
|
const callback = (msg: any) => {
|
||||||
incrementee += 1
|
callbackCounter += 1
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatcher.subscribe(callback)
|
dispatcher.subscribe(callback)
|
||||||
@@ -36,6 +36,6 @@ describe('EventDispatcher', async () => {
|
|||||||
// should not cause any increment
|
// should not cause any increment
|
||||||
dispatcher.dispatch('hello')
|
dispatcher.dispatch('hello')
|
||||||
|
|
||||||
expect(incrementee).to.eq(1)
|
expect(callbackCounter).to.eq(1)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -62,17 +62,17 @@ export class ConnectionManager {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
public removeConnection(conenctionId: string) {
|
public removeConnection(connectionId: string) {
|
||||||
const connection = this.connections[conenctionId]
|
const connection = this.connections[connectionId]
|
||||||
if (connection) {
|
if (connection) {
|
||||||
backendEvents.unsubscribeAll(makePublishEvent(conenctionId))
|
backendEvents.unsubscribeAll(makePublishEvent(connectionId))
|
||||||
connection.disconnect()
|
connection.disconnect()
|
||||||
delete this.connections[conenctionId]
|
delete this.connections[connectionId]
|
||||||
connection.stateMachine.onUpdate.removeAllListeners()
|
connection.stateMachine.onUpdate.removeAllListeners()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public closeAllConnections() {
|
public closeAllConnections() {
|
||||||
Object.keys(this.connections).forEach(conenctionId => this.removeConnection(conenctionId))
|
Object.keys(this.connections).forEach(connectionId => this.removeConnection(connectionId))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user