blob: 21f2a9220ba1241122d33bf331ea240e75065b7a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
import React, {Component} from 'react';
import './ConnectionMatchedRules.scss';
import ButtonField from "./fields/ButtonField";
class ConnectionMatchedRules extends Component {
constructor(props) {
super(props);
this.state = {
};
}
render() {
const matchedRules = this.props.matchedRules.map(mr => {
const rule = this.props.rules.find(r => r.id === mr);
return <ButtonField key={mr} onClick={() => this.props.addMatchedRulesFilter(rule.id)} name={rule.name}
color={rule.color} small />;
});
return (
<tr className="connection-matches">
<td className="row-label">matched_rules:</td>
<td className="rule-buttons" colSpan={9}>{matchedRules}</td>
</tr>
);
}
}
export default ConnectionMatchedRules;
|