Update prettier
This commit is contained in:
@@ -157,9 +157,4 @@ const mapStateToProps = (state: AppState) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default withStyles(styles)(
|
||||
connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(App)
|
||||
)
|
||||
export default withStyles(styles)(connect(mapStateToProps, mapDispatchToProps)(App))
|
||||
|
||||
@@ -28,7 +28,7 @@ export default withTheme(
|
||||
memo((props: Props) => {
|
||||
const [width, setWidth] = React.useState(300)
|
||||
const [tooltip, setTooltip] = React.useState<Tooltip | undefined>()
|
||||
const detectResize = React.useCallback(newWidth => setWidth(newWidth), [])
|
||||
const detectResize = React.useCallback((newWidth) => setWidth(newWidth), [])
|
||||
|
||||
const hintFormatter = React.useCallback(
|
||||
(point: any) => [
|
||||
|
||||
@@ -27,7 +27,7 @@ function domainForData(data: Array<Point>): [number, number] {
|
||||
let max = data[0].y
|
||||
let min = data[0].y
|
||||
|
||||
data.forEach(d => {
|
||||
data.forEach((d) => {
|
||||
if (max < d.y) {
|
||||
max = d.y
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ function ColorSettings(props: {
|
||||
)
|
||||
|
||||
const menuItems = React.useMemo(() => {
|
||||
return colors.map(color => (
|
||||
return colors.map((color) => (
|
||||
<MenuItem
|
||||
style={{ minWidth: '8em', minHeight: '36px', backgroundColor: color, textAlign: 'center' }}
|
||||
key={color}
|
||||
@@ -65,7 +65,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(memo(ColorSettings))
|
||||
export default connect(undefined, mapDispatchToProps)(memo(ColorSettings))
|
||||
|
||||
@@ -38,7 +38,7 @@ function InterpolationSettings(props: {
|
||||
}, [curves])
|
||||
|
||||
const menuItems = React.useMemo(() => {
|
||||
return curves.map(curve => (
|
||||
return curves.map((curve) => (
|
||||
<MenuItem key={curve} onClick={callbacks[curve]} selected={props.chart.interpolation === curve}>
|
||||
<Typography variant="inherit">{curve.replace(/_/g, ' ')}</Typography>
|
||||
</MenuItem>
|
||||
@@ -60,7 +60,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(InterpolationSettings)
|
||||
export default connect(undefined, mapDispatchToProps)(InterpolationSettings)
|
||||
|
||||
@@ -33,7 +33,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(MoveUp)
|
||||
export default connect(undefined, mapDispatchToProps)(MoveUp)
|
||||
|
||||
@@ -95,10 +95,7 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(RangeSettings)
|
||||
export default connect(undefined, mapDispatchToProps)(RangeSettings)
|
||||
|
||||
function useRangeStateToFireUpdateAction(
|
||||
rangeFrom: string | number | undefined,
|
||||
|
||||
@@ -47,7 +47,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(memo(Size))
|
||||
export default connect(undefined, mapDispatchToProps)(memo(Size))
|
||||
|
||||
@@ -58,7 +58,7 @@ function TimeRangeSettings(props: Props) {
|
||||
>
|
||||
<Typography>Chart data within a time interval</Typography>
|
||||
<div style={{ padding: '0 16px', width: '275px', textAlign: 'center' }}>
|
||||
{ranges.map(r => {
|
||||
{ranges.map((r) => {
|
||||
return (
|
||||
<Button
|
||||
style={{ margin: '4px', textTransform: 'none' }}
|
||||
@@ -96,7 +96,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(TimeRangeSettings)
|
||||
export default connect(undefined, mapDispatchToProps)(TimeRangeSettings)
|
||||
|
||||
@@ -39,7 +39,7 @@ export function colors() {
|
||||
indigo,
|
||||
yellow,
|
||||
]
|
||||
.map(color => [color[200], color[500], color[700]])
|
||||
.map((color) => [color[200], color[500], color[700]])
|
||||
.reduce((a, b) => a.concat(b), [])
|
||||
.sort((a, b) => colorCompare(a, b))
|
||||
return colors
|
||||
|
||||
@@ -133,7 +133,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(memo(TopicChart))
|
||||
export default connect(undefined, mapDispatchToProps)(memo(TopicChart))
|
||||
|
||||
@@ -63,7 +63,7 @@ function ChartPanel(props: Props) {
|
||||
}
|
||||
}, [chartsInView])
|
||||
|
||||
const charts = props.charts.map(chartParameters => (
|
||||
const charts = props.charts.map((chartParameters) => (
|
||||
<CSSTransition
|
||||
key={`${chartParameters.topic}-${chartParameters.dotPath || ''}`}
|
||||
timeout={{ enter: 500, exit: 500 }}
|
||||
@@ -126,7 +126,4 @@ const styles = (theme: Theme) => ({
|
||||
},
|
||||
})
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(withStyles(styles)(ChartPanel))
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(withStyles(styles)(ChartPanel))
|
||||
|
||||
@@ -36,7 +36,7 @@ class ConnectionSettings extends React.Component<Props, State> {
|
||||
|
||||
private renderSubscriptions() {
|
||||
const connection = this.props.connection
|
||||
return connection.subscriptions.map(subscription => (
|
||||
return connection.subscriptions.map((subscription) => (
|
||||
<Subscription
|
||||
deleteAction={() => this.props.managerActions.deleteSubscription(subscription, connection.id)}
|
||||
subscription={subscription}
|
||||
@@ -154,7 +154,4 @@ const styles = (theme: Theme) => ({
|
||||
},
|
||||
})
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(withStyles(styles)(ConnectionSettings))
|
||||
export default connect(undefined, mapDispatchToProps)(withStyles(styles)(ConnectionSettings))
|
||||
|
||||
@@ -81,7 +81,4 @@ const styles = (theme: Theme) => ({
|
||||
},
|
||||
})
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(withStyles(styles)(CertificateFileSelection))
|
||||
export default connect(undefined, mapDispatchToProps)(withStyles(styles)(CertificateFileSelection))
|
||||
|
||||
@@ -104,7 +104,4 @@ const styles = (theme: Theme) => ({
|
||||
},
|
||||
})
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(withStyles(styles)(Certificates))
|
||||
export default connect(undefined, mapDispatchToProps)(withStyles(styles)(Certificates))
|
||||
|
||||
@@ -285,7 +285,4 @@ const styles = (theme: Theme) => ({
|
||||
},
|
||||
})
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(withStyles(styles)(ConnectionSettings))
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(withStyles(styles)(ConnectionSettings))
|
||||
|
||||
@@ -134,7 +134,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(withStyles(styles)(ConnectionSetup))
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(withStyles(styles)(ConnectionSetup))
|
||||
|
||||
@@ -51,7 +51,4 @@ export const connectionItemStyle = (theme: Theme) => ({
|
||||
},
|
||||
})
|
||||
|
||||
export default connect(
|
||||
null,
|
||||
mapDispatchToProps
|
||||
)(withStyles(connectionItemStyle)(ConnectionItem))
|
||||
export default connect(null, mapDispatchToProps)(withStyles(connectionItemStyle)(ConnectionItem))
|
||||
|
||||
@@ -27,7 +27,7 @@ function ProfileList(props: Props) {
|
||||
}
|
||||
const indexDirection = dir === 'next' ? 1 : -1
|
||||
const connectionArray = Object.values(connections)
|
||||
const selectedIndex = connectionArray.map(connection => connection.id).indexOf(selected)
|
||||
const selectedIndex = connectionArray.map((connection) => connection.id).indexOf(selected)
|
||||
const nextConnection = connectionArray[selectedIndex + indexDirection]
|
||||
if (nextConnection) {
|
||||
actions.selectConnection(nextConnection.id)
|
||||
@@ -48,7 +48,7 @@ function ProfileList(props: Props) {
|
||||
return (
|
||||
<List style={{ height: '100%' }} component="nav" subheader={createConnectionButton}>
|
||||
<div className={classes.list}>
|
||||
{Object.values(connections).map(connection => (
|
||||
{Object.values(connections).map((connection) => (
|
||||
<ConnectionItem connection={connection} key={connection.id} selected={selected === connection.id} />
|
||||
))}
|
||||
</div>
|
||||
@@ -77,7 +77,4 @@ const mapStateToProps = (state: AppState) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(withStyles(styles)(ProfileList))
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(withStyles(styles)(ProfileList))
|
||||
|
||||
@@ -65,7 +65,7 @@ class Demo extends React.Component<{ classes: any }, State> {
|
||||
let keys: Array<any> = []
|
||||
if (this.state.keys.length > 0) {
|
||||
keys = this.state.keys
|
||||
.map(key => [<Key key={key} keyboardKey={key} />])
|
||||
.map((key) => [<Key key={key} keyboardKey={key} />])
|
||||
.reduce((prev, current) => {
|
||||
return [prev, '+' as any, current]
|
||||
})
|
||||
|
||||
@@ -25,7 +25,7 @@ function ContentView(props: Props) {
|
||||
setDetectedHeight(newHeight)
|
||||
}, [])
|
||||
|
||||
const detectSidebarSize = React.useCallback(width => {
|
||||
const detectSidebarSize = React.useCallback((width) => {
|
||||
setDetectedSidebarWidth(width)
|
||||
}, [])
|
||||
|
||||
|
||||
@@ -102,7 +102,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(withStyles(styles)(PauseButton))
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(withStyles(styles)(PauseButton))
|
||||
|
||||
@@ -33,7 +33,7 @@ function SearchBar(props: {
|
||||
actions.settings.filterTopics(event.target.value)
|
||||
}, [])
|
||||
|
||||
useGlobalKeyEventHandler(undefined, event => {
|
||||
useGlobalKeyEventHandler(undefined, (event) => {
|
||||
const isCharacter = event.key.length === 1
|
||||
const isModifierKey = event.metaKey || event.ctrlKey
|
||||
const isAllowedControlCharacter = event.keyCode === KeyCodes.backspace || event.keyCode === KeyCodes.delete
|
||||
@@ -142,7 +142,4 @@ const styles = (theme: Theme) => ({
|
||||
},
|
||||
})
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(withStyles(styles)(SearchBar))
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(withStyles(styles)(SearchBar))
|
||||
|
||||
@@ -103,7 +103,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(withStyles(styles)(TitleBar))
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(withStyles(styles)(TitleBar))
|
||||
|
||||
@@ -143,7 +143,7 @@ class Settings extends React.PureComponent<Props, {}> {
|
||||
private renderAutoExpand() {
|
||||
const { classes, autoExpandLimit } = this.props
|
||||
|
||||
const limits = autoExpandLimitSet.map(limit => (
|
||||
const limits = autoExpandLimitSet.map((limit) => (
|
||||
<MenuItem key={limit.limit} value={limit.limit}>
|
||||
{limit.limit < 10000 && limit.limit > 0 ? `≤ ${limit.limit} topics` : limit.name}
|
||||
</MenuItem>
|
||||
@@ -255,9 +255,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default withStyles(styles)(
|
||||
connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(Settings)
|
||||
)
|
||||
export default withStyles(styles)(connect(mapStateToProps, mapDispatchToProps)(Settings))
|
||||
|
||||
@@ -47,7 +47,7 @@ function TimeLocaleSettings(props: Props) {
|
||||
input={<Input name="time-locale" id="time-locale-label-placeholder" />}
|
||||
name="time-locale"
|
||||
className={classes.input}
|
||||
renderValue={v => <span>{String(v)}</span>}
|
||||
renderValue={(v) => <span>{String(v)}</span>}
|
||||
style={{ flex: '1' }}
|
||||
>
|
||||
{localeMenuItems}
|
||||
@@ -82,9 +82,4 @@ const styles = (theme: Theme) => ({
|
||||
},
|
||||
})
|
||||
|
||||
export default withStyles(styles)(
|
||||
connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(TimeLocaleSettings)
|
||||
)
|
||||
export default withStyles(styles)(connect(mapStateToProps, mapDispatchToProps)(TimeLocaleSettings))
|
||||
|
||||
@@ -85,7 +85,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(ChartPreview)
|
||||
export default connect(undefined, mapDispatchToProps)(ChartPreview)
|
||||
|
||||
@@ -9,9 +9,11 @@ interface Props {
|
||||
}
|
||||
|
||||
function changeAmount(props: Props) {
|
||||
const additions = props.changes.map(change => (change.added === true ? change.count || 0 : 0)).reduce((a, b) => a + b)
|
||||
const additions = props.changes
|
||||
.map((change) => (change.added === true ? change.count || 0 : 0))
|
||||
.reduce((a, b) => a + b)
|
||||
const deletions = props.changes
|
||||
.map(change => (change.removed === true ? change.count || 0 : 0))
|
||||
.map((change) => (change.removed === true ? change.count || 0 : 0))
|
||||
.reduce((a, b) => a + b)
|
||||
if (additions === 0 && deletions === 0) {
|
||||
return null
|
||||
|
||||
@@ -30,7 +30,7 @@ function useHistory(): [Array<Message>, (topic: string, payload?: string) => voi
|
||||
const amendToHistory = useCallback(
|
||||
(topic: string, payload?: string) => {
|
||||
// Remove duplicates
|
||||
let filteredHistory = history.filter(e => e.payload !== payload || e.topic !== topic)
|
||||
let filteredHistory = history.filter((e) => e.payload !== payload || e.topic !== topic)
|
||||
filteredHistory = filteredHistory.slice(-7)
|
||||
setHistory([...filteredHistory, { topic, payload, sent: new Date() }])
|
||||
},
|
||||
@@ -183,7 +183,4 @@ const mapStateToProps = (state: AppState) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(withTheme(Publish))
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(withTheme(Publish))
|
||||
|
||||
@@ -18,7 +18,7 @@ function PublishHistory(props: { history: Array<Message>; actions: typeof publis
|
||||
)
|
||||
|
||||
return useMemo(() => {
|
||||
const items = [...props.history].reverse().map(message => ({
|
||||
const items = [...props.history].reverse().map((message) => ({
|
||||
key: sha1(message.topic + message.payload),
|
||||
title: message.topic,
|
||||
value: message.payload || '',
|
||||
@@ -34,7 +34,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(PublishHistory)
|
||||
export default connect(undefined, mapDispatchToProps)(PublishHistory)
|
||||
|
||||
@@ -69,7 +69,4 @@ const mapStateToProps = (state: AppState) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(QosSelect)
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(QosSelect)
|
||||
|
||||
@@ -41,7 +41,4 @@ const mapStateToProps = (state: AppState) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(RetainSwitch)
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(RetainSwitch)
|
||||
|
||||
@@ -62,7 +62,4 @@ const mapStateToProps = (state: AppState) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(TopicInput)
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(TopicInput)
|
||||
|
||||
@@ -99,9 +99,4 @@ const styles = (theme: Theme) => ({
|
||||
},
|
||||
})
|
||||
|
||||
export default withStyles(styles)(
|
||||
connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(Sidebar)
|
||||
)
|
||||
export default withStyles(styles)(connect(mapStateToProps, mapDispatchToProps)(Sidebar))
|
||||
|
||||
@@ -33,9 +33,9 @@ class Topic extends React.PureComponent<Props, {}> {
|
||||
let key = 0
|
||||
const breadCrumps = node
|
||||
.branch()
|
||||
.map(node => node.sourceEdge)
|
||||
.filter(edge => Boolean(edge))
|
||||
.map(edge => [
|
||||
.map((node) => node.sourceEdge)
|
||||
.filter((edge) => Boolean(edge))
|
||||
.map((edge) => [
|
||||
<Button
|
||||
onClick={() => this.props.actions.selectTopic(edge!.target)}
|
||||
size="small"
|
||||
@@ -66,7 +66,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
null,
|
||||
mapDispatchToProps
|
||||
)(withStyles(styles, { withTheme: true })(Topic))
|
||||
export default connect(null, mapDispatchToProps)(withStyles(styles, { withTheme: true })(Topic))
|
||||
|
||||
@@ -43,7 +43,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(TopicPanel)
|
||||
export default connect(undefined, mapDispatchToProps)(TopicPanel)
|
||||
|
||||
@@ -73,7 +73,4 @@ const mapStateToProps = (state: AppState) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(withStyles(styles)(ActionButtons))
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(withStyles(styles)(ActionButtons))
|
||||
|
||||
@@ -33,7 +33,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(DeleteSelectedTopicButton)
|
||||
export default connect(undefined, mapDispatchToProps)(DeleteSelectedTopicButton)
|
||||
|
||||
@@ -120,9 +120,7 @@ class MessageHistory extends React.PureComponent<Props, State> {
|
||||
>
|
||||
<ShowChart style={{ marginTop: '-5px' }} />
|
||||
</CustomIconButton>
|
||||
) : (
|
||||
undefined
|
||||
)
|
||||
) : undefined
|
||||
}
|
||||
onClick={this.displayMessage}
|
||||
>
|
||||
@@ -139,7 +137,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
null,
|
||||
mapDispatchToProps
|
||||
)(MessageHistory)
|
||||
export default connect(null, mapDispatchToProps)(MessageHistory)
|
||||
|
||||
@@ -124,7 +124,4 @@ const styles = (theme: Theme) => ({
|
||||
},
|
||||
})
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(withStyles(styles)(ValuePanel))
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(withStyles(styles)(ValuePanel))
|
||||
|
||||
@@ -19,7 +19,7 @@ interface Props {
|
||||
function filterUsingTimeRange(startTime: number | undefined, data: Array<q.Message>) {
|
||||
if (startTime) {
|
||||
const threshold = new Date(Date.now() - startTime)
|
||||
return data.filter(d => d.received >= threshold)
|
||||
return data.filter((d) => d.received >= threshold)
|
||||
}
|
||||
|
||||
return data
|
||||
@@ -31,7 +31,7 @@ function nodeToHistory(startTime: number | undefined, history: q.MessageHistory)
|
||||
const value = message.value ? toPlottableValue(Base64Message.toUnicodeString(message.value)) : NaN
|
||||
return { x: message.received.getTime(), y: toPlottableValue(value) }
|
||||
})
|
||||
.filter(data => !isNaN(data.y as any)) as any
|
||||
.filter((data) => !isNaN(data.y as any)) as any
|
||||
}
|
||||
|
||||
function nodeDotPathToHistory(startTime: number | undefined, history: q.MessageHistory, dotPath: string) {
|
||||
@@ -46,7 +46,7 @@ function nodeDotPathToHistory(startTime: number | undefined, history: q.MessageH
|
||||
|
||||
return { x: message.received.getTime(), y: toPlottableValue(value) }
|
||||
})
|
||||
.filter(data => !isNaN(data.y as any)) as any
|
||||
.filter((data) => !isNaN(data.y as any)) as any
|
||||
}
|
||||
|
||||
function TopicPlot(props: Props) {
|
||||
|
||||
@@ -48,7 +48,7 @@ function TreeNodeSubnodes(props: Props) {
|
||||
|
||||
return useMemo(() => {
|
||||
const nodes = sortedNodes(props.settings, props.treeNode).slice(0, alreadyAdded)
|
||||
const listItems = nodes.map(node => {
|
||||
const listItems = nodes.map((node) => {
|
||||
return (
|
||||
<TreeNode
|
||||
key={`${node.hash()}-${props.filter}`}
|
||||
|
||||
@@ -169,7 +169,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(TreeComponent)
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(TreeComponent)
|
||||
|
||||
@@ -51,10 +51,10 @@ class UpdateNotifier extends React.PureComponent<Props, State> {
|
||||
this.state = { newerVersions: [] }
|
||||
|
||||
const ownVersion = electron.remote.app.getVersion()
|
||||
this.fetchReleases().then(releases => {
|
||||
this.fetchReleases().then((releases) => {
|
||||
const newerVersions = releases
|
||||
.filter(release => this.allowPrereleaseIfOwnVersionIsBeta(release, ownVersion))
|
||||
.filter(release => compareVersions(release.tag_name, ownVersion) > 0)
|
||||
.filter((release) => this.allowPrereleaseIfOwnVersionIsBeta(release, ownVersion))
|
||||
.filter((release) => compareVersions(release.tag_name, ownVersion) > 0)
|
||||
.sort((a, b) => compareVersions(b.tag_name, a.tag_name))
|
||||
|
||||
if (newerVersions.length > 0) {
|
||||
@@ -145,7 +145,7 @@ class UpdateNotifier extends React.PureComponent<Props, State> {
|
||||
return null
|
||||
}
|
||||
const releaseNotes = this.state.newerVersions
|
||||
.map(release => `<p><h3>${release.tag_name}</h3><p/><p>${release.body_html}</p>`)
|
||||
.map((release) => `<p><h3>${release.tag_name}</h3><p/><p>${release.body_html}</p>`)
|
||||
.join('<hr />')
|
||||
|
||||
return (
|
||||
@@ -195,7 +195,7 @@ class UpdateNotifier extends React.PureComponent<Props, State> {
|
||||
return null
|
||||
}
|
||||
|
||||
return latestUpdate.assets.filter(this.assetForCurrentPlatform).map(asset => (
|
||||
return latestUpdate.assets.filter(this.assetForCurrentPlatform).map((asset) => (
|
||||
<div>
|
||||
<Button className={this.props.classes.download} onClick={() => this.openUrl(asset.browser_download_url)}>
|
||||
<CloudDownload />
|
||||
@@ -266,9 +266,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default withStyles(styles)(
|
||||
connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(UpdateNotifier)
|
||||
)
|
||||
export default withStyles(styles)(connect(mapStateToProps, mapDispatchToProps)(UpdateNotifier))
|
||||
|
||||
@@ -20,7 +20,7 @@ const styles = (theme: Theme) => ({
|
||||
icon: {
|
||||
boxShadow: theme.shadows[2]
|
||||
.split('),')
|
||||
.map(s => `inset ${s}`)
|
||||
.map((s) => `inset ${s}`)
|
||||
.join('),'),
|
||||
padding: '6px',
|
||||
borderRadius: '50%',
|
||||
|
||||
@@ -59,7 +59,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(Copy)
|
||||
export default connect(undefined, mapDispatchToProps)(Copy)
|
||||
|
||||
Reference in New Issue
Block a user