Fix typos

This commit is contained in:
Thomas Nordquist
2019-06-19 11:56:09 +02:00
parent 7e99c18410
commit 0d585eef8f
7 changed files with 20 additions and 20 deletions

View File

@@ -104,7 +104,7 @@ export const togglePause = (tree?: q.Tree<TopicViewModel>) => (dispatch: Dispatc
setTimeout(() => {
tree && tree.applyUnmergedChanges()
if (paused && changes > 0) {
dispatch(globalActions.showNotification(`Sucessfully applied ${changes} changes.`))
dispatch(globalActions.showNotification(`Successfully applied ${changes} changes.`))
}
}, 50)

View File

@@ -2,7 +2,7 @@ import * as React from 'react'
import PersistentStorage from '../utils/PersistentStorage'
import SentimentDissatisfied from '@material-ui/icons/SentimentDissatisfied'
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 { 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) {
electronRendererTelementry.trackError(error)
electronRendererTelemetry.trackError(error)
console.log('did catch', error)
}

View File

@@ -1,4 +1,4 @@
import { electronRendererTelementry } from 'electron-telemetry'
import { electronRendererTelemetry } from 'electron-telemetry'
const telemetry = electronRendererTelementry
electronRendererTelementry.registerErrorHandler()
const telemetry = electronRendererTelemetry
electronRendererTelemetry.registerErrorHandler()

View File

@@ -1,18 +1,18 @@
import { electronRendererTelementry } from 'electron-telemetry'
import { electronRendererTelemetry } from 'electron-telemetry'
// Used to determine long-time-stability and memory leaks
function trackProcessStatistics() {
setInterval(() => {
try {
electronRendererTelementry.trackCustomEvent({
electronRendererTelemetry.trackCustomEvent({
name: 'heapStatistics',
payload: process.getHeapStatistics(),
})
electronRendererTelementry.trackCustomEvent({
electronRendererTelemetry.trackCustomEvent({
name: 'cpuUsage',
payload: process.getCPUUsage(),
})
electronRendererTelementry.trackCustomEvent({
electronRendererTelemetry.trackCustomEvent({
name: 'runningSince',
payload: performance.now(),
})
@@ -30,6 +30,6 @@ export function trackEvent(name: string) {
}
const blacklist = ['CONNECTION_SET_HEALTH']
if (blacklist.indexOf(name) === -1) {
electronRendererTelementry.trackEvent(name)
electronRendererTelemetry.trackEvent(name)
}
}

View File

@@ -10,7 +10,7 @@ describe('Edge', () => {
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 leaf = TreeNodeFactory.fromEdgesAndValue(topics, undefined)
const bazEdge = leaf.sourceEdge

View File

@@ -20,9 +20,9 @@ describe('EventDispatcher', async () => {
it('should unsubscribe', async function() {
const dispatcher = new EventDispatcher<string, string>()
this.timeout(300)
let incrementee = 0
let callbackCounter = 0
const callback = (msg: any) => {
incrementee += 1
callbackCounter += 1
}
dispatcher.subscribe(callback)
@@ -36,6 +36,6 @@ describe('EventDispatcher', async () => {
// should not cause any increment
dispatcher.dispatch('hello')
expect(incrementee).to.eq(1)
expect(callbackCounter).to.eq(1)
})
})

View File

@@ -62,17 +62,17 @@ export class ConnectionManager {
})
}
public removeConnection(conenctionId: string) {
const connection = this.connections[conenctionId]
public removeConnection(connectionId: string) {
const connection = this.connections[connectionId]
if (connection) {
backendEvents.unsubscribeAll(makePublishEvent(conenctionId))
backendEvents.unsubscribeAll(makePublishEvent(connectionId))
connection.disconnect()
delete this.connections[conenctionId]
delete this.connections[connectionId]
connection.stateMachine.onUpdate.removeAllListeners()
}
}
public closeAllConnections() {
Object.keys(this.connections).forEach(conenctionId => this.removeConnection(conenctionId))
Object.keys(this.connections).forEach(connectionId => this.removeConnection(connectionId))
}
}