Merge pull request #3565 from weaveworks/include-node-control-id-on-dom

Include the node control's id as an attr on the node control button
This commit is contained in:
Simon
2019-01-23 14:27:00 +01:00
committed by GitHub

View File

@@ -12,14 +12,14 @@ class NodeDetailsControlButton extends React.Component {
}
render() {
const { icon, human } = this.props.control;
const { icon, id, human } = this.props.control;
const className = classNames('tour-step-anchor node-control-button', icon, {
// Old Agent / plugins don't include the 'fa ' prefix, so provide it if they don't.
fa: icon.startsWith('fa-'),
'node-control-button-pending': this.props.pending
});
return (
<i className={className} title={human} onClick={this.handleClick} />
<i className={className} data-id={id} title={human} onClick={this.handleClick} />
);
}