mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 17:51:21 +00:00
Revert "Upgraded eslint & eslint-config-airbnb"
This commit is contained in:
@@ -3,25 +3,24 @@ import { connect } from 'react-redux';
|
||||
import classNames from 'classnames';
|
||||
import ReactTooltip from 'react-tooltip';
|
||||
|
||||
|
||||
const Plugin = ({id, label, description, status}) => {
|
||||
const error = status !== 'ok';
|
||||
const className = classNames({ error });
|
||||
const title = `Plugin description: ${description}<br />Status: ${status}`;
|
||||
|
||||
// Inner span to hold styling so we don't effect the "before:content"
|
||||
return (
|
||||
<span className="plugins-plugin" key={id}>
|
||||
<span className={className} data-tip={title} data-multiline>
|
||||
{error && <span className="plugins-plugin-icon fa fa-exclamation-circle" />}
|
||||
{label || id}
|
||||
</span>
|
||||
<ReactTooltip class="tooltip" effect="solid" offset={{right: 7}} />
|
||||
</span>
|
||||
);
|
||||
};
|
||||
|
||||
class Plugins extends React.Component {
|
||||
renderPlugin({id, label, description, status}) {
|
||||
const error = status !== 'ok';
|
||||
const className = classNames({ error });
|
||||
const title = `Plugin description: ${description}<br />Status: ${status}`;
|
||||
|
||||
// Inner span to hold styling so we don't effect the "before:content"
|
||||
return (
|
||||
<span className="plugins-plugin" key={id}>
|
||||
<span className={className} data-tip={title} data-multiline>
|
||||
{error && <span className="plugins-plugin-icon fa fa-exclamation-circle" />}
|
||||
{label || id}
|
||||
</span>
|
||||
<ReactTooltip class="tooltip" effect="solid" offset={{right: 7}} />
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
const hasPlugins = this.props.plugins && this.props.plugins.size > 0;
|
||||
return (
|
||||
@@ -29,7 +28,8 @@ class Plugins extends React.Component {
|
||||
<span className="plugins-label">
|
||||
Plugins:
|
||||
</span>
|
||||
{hasPlugins && this.props.plugins.toIndexedSeq().map(plugin => Plugin(plugin.toJS()))}
|
||||
{hasPlugins && this.props.plugins.toIndexedSeq()
|
||||
.map(plugin => this.renderPlugin(plugin.toJS()))}
|
||||
{!hasPlugins && <span className="plugins-empty">n/a</span>}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user