-
Nothing to show. This can have any of these reasons:
-
- - We haven't received any reports from probes recently.
- Are the probes properly configured?
- - There are nodes, but they're currently hidden. Check the view options
- in the bottom-left if they allow for showing hidden nodes.
- - Containers view only: you're not running Docker,
- or you don't have any containers.
-
-
- );
-}
+const EmptyTopologyError = show => (
+
+ Nothing to show. This can have any of these reasons:
+
+ - We haven't received any reports from probes recently.
+ Are the probes properly configured?
+ - There are nodes, but they're currently hidden. Check the view options
+ in the bottom-left if they allow for showing hidden nodes.
+ - Containers view only: you're not running Docker,
+ or you don't have any containers.
+
+
+);
class Nodes extends React.Component {
constructor(props, context) {
@@ -60,7 +58,7 @@ class Nodes extends React.Component {
itemType={getNodeType(currentTopology, topologies)}
show={topologiesLoaded && !nodesLoaded} />
- {renderEmptyTopologyError(topologiesLoaded && nodesLoaded && topologyEmpty)}
+ {EmptyTopologyError(topologiesLoaded && nodesLoaded && topologyEmpty)}
{gridMode ?
:
diff --git a/client/app/scripts/components/plugins.js b/client/app/scripts/components/plugins.js
index 93f52567f..61cdea746 100644
--- a/client/app/scripts/components/plugins.js
+++ b/client/app/scripts/components/plugins.js
@@ -4,7 +4,7 @@ import classNames from 'classnames';
import ReactTooltip from 'react-tooltip';
-function renderPlugin({id, label, description, status}) {
+const Plugin = ({id, label, description, status}) => {
const error = status !== 'ok';
const className = classNames({ error });
const title = `Plugin description: ${description}
Status: ${status}`;
@@ -19,7 +19,7 @@ function renderPlugin({id, label, description, status}) {
);
-}
+};
class Plugins extends React.Component {
render() {
@@ -29,8 +29,7 @@ class Plugins extends React.Component {
Plugins:
- {hasPlugins && this.props.plugins.toIndexedSeq()
- .map(plugin => renderPlugin(plugin.toJS()))}
+ {hasPlugins && this.props.plugins.toIndexedSeq().map(plugin => Plugin(plugin.toJS()))}
{!hasPlugins &&
n/a}
);
diff --git a/client/package.json b/client/package.json
index c943e9c24..dbe360ea4 100644
--- a/client/package.json
+++ b/client/package.json
@@ -57,7 +57,6 @@
"eslint-config-airbnb": "13.0.0",
"eslint-loader": "1.6.1",
"eslint-plugin-import": "2.2.0",
- "eslint-plugin-jasmine": "2.2.0",
"eslint-plugin-jsx-a11y": "2.2.3",
"eslint-plugin-react": "6.8.0",
"extract-text-webpack-plugin": "1.0.1",