-
-
-
- Host
-
-
- Status
-
-
- CPU
-
-
- Load
-
-
Apps
+ {hostCount > 0 && !hostsError.length ? (
+
+
+
+
+ Host
+
+ Status
+
+
+ CPU
+
+
+ Load
+
+
Apps
-
-
- )}
- itemHeight={26}
- className="hosts-table--tbody"
- />
- :
-
No Hosts found
- }
+
(
+
+ ))}
+ itemHeight={26}
+ className="hosts-table--tbody"
+ />
+
+ ) : (
+
+
No Hosts found
+
+ )}
)
diff --git a/ui/src/hosts/containers/HostPage.js b/ui/src/hosts/containers/HostPage.js
index 9af0f055ab..a52276c9d1 100644
--- a/ui/src/hosts/containers/HostPage.js
+++ b/ui/src/hosts/containers/HostPage.js
@@ -96,7 +96,7 @@ class HostPage extends Component {
const autoflowCells = autoflowLayouts.reduce((allCells, layout) => {
return allCells.concat(
layout.cells.map(cell => {
- const x = cellCount * cellWidth % pageWidth
+ const x = (cellCount * cellWidth) % pageWidth
const y = Math.floor(cellCount * cellWidth / pageWidth) * cellHeight
cellCount += 1
return Object.assign(cell, {
diff --git a/ui/src/index.js b/ui/src/index.js
index bd5160a30d..4ea8b15e47 100644
--- a/ui/src/index.js
+++ b/ui/src/index.js
@@ -122,66 +122,50 @@ const Root = React.createClass({
},
render() {
- return !this.state.ready // eslint-disable-line no-negated-condition
- ?
- :
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ return !this.state.ready ? ( // eslint-disable-line no-negated-condition
+
+ ) : (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+ )
},
})
diff --git a/ui/src/kapacitor/components/AlertTabs.js b/ui/src/kapacitor/components/AlertTabs.js
index 75e6c16fcf..a791a6187a 100644
--- a/ui/src/kapacitor/components/AlertTabs.js
+++ b/ui/src/kapacitor/components/AlertTabs.js
@@ -142,123 +142,134 @@ class AlertTabs extends Component {
alerta: {
type: 'Alerta',
enabled: this.getEnabled(configSections, 'alerta'),
- renderComponent: () =>
+ renderComponent: () => (
,
+ />
+ ),
},
hipchat: {
type: 'HipChat',
enabled: this.getEnabled(configSections, 'hipchat'),
- renderComponent: () =>
+ renderComponent: () => (
,
+ />
+ ),
},
opsgenie: {
type: 'OpsGenie',
enabled: this.getEnabled(configSections, 'opsgenie'),
- renderComponent: () =>
+ renderComponent: () => (
,
+ />
+ ),
},
pagerduty: {
type: 'PagerDuty',
enabled: this.getEnabled(configSections, 'pagerduty'),
- renderComponent: () =>
+ renderComponent: () => (
,
+ />
+ ),
},
pushover: {
type: 'Pushover',
enabled: this.getEnabled(configSections, 'pushover'),
- renderComponent: () =>
+ renderComponent: () => (
,
+ />
+ ),
},
sensu: {
type: 'Sensu',
enabled: this.getEnabled(configSections, 'sensu'),
- renderComponent: () =>
+ renderComponent: () => (
,
+ />
+ ),
},
slack: {
type: 'Slack',
enabled: this.getEnabled(configSections, 'slack'),
- renderComponent: () =>
+ renderComponent: () => (
,
+ />
+ ),
},
smtp: {
type: 'SMTP',
enabled: this.getEnabled(configSections, 'smtp'),
- renderComponent: () =>
+ renderComponent: () => (
,
+ />
+ ),
},
talk: {
type: 'Talk',
enabled: this.getEnabled(configSections, 'talk'),
- renderComponent: () =>
+ renderComponent: () => (
,
+ />
+ ),
},
telegram: {
type: 'Telegram',
enabled: this.getEnabled(configSections, 'telegram'),
- renderComponent: () =>
+ renderComponent: () => (
,
+ />
+ ),
},
victorops: {
type: 'VictorOps',
enabled: this.getEnabled(configSections, 'victorops'),
- renderComponent: () =>
+ renderComponent: () => (
,
+ />
+ ),
},
}
return (
diff --git a/ui/src/kapacitor/components/CodeData.js b/ui/src/kapacitor/components/CodeData.js
index 779bc87a71..081c75aff7 100644
--- a/ui/src/kapacitor/components/CodeData.js
+++ b/ui/src/kapacitor/components/CodeData.js
@@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
-const CodeData = ({onClickTemplate, template}) =>
+const CodeData = ({onClickTemplate, template}) => (
>
{template.label}
+)
const {func, shape, string} = PropTypes
diff --git a/ui/src/kapacitor/components/DataSection.js b/ui/src/kapacitor/components/DataSection.js
index d0d4a53bc1..4261522e6e 100644
--- a/ui/src/kapacitor/components/DataSection.js
+++ b/ui/src/kapacitor/components/DataSection.js
@@ -76,16 +76,16 @@ const DataSection = ({
onGroupByTag={handleGroupByTag}
onToggleTagAcceptance={handleToggleTagAcceptance}
/>
- {isDeadman
- ? null
- :
}
+ {isDeadman ? null : (
+
+ )}