diff options
Diffstat (limited to 'web/src/js/components/flowtable.jsx.js')
-rw-r--r-- | web/src/js/components/flowtable.jsx.js | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/web/src/js/components/flowtable.jsx.js b/web/src/js/components/flowtable.jsx.js index 00c2d4c1..50caaab3 100644 --- a/web/src/js/components/flowtable.jsx.js +++ b/web/src/js/components/flowtable.jsx.js @@ -6,27 +6,14 @@ var FlowRow = React.createClass({ }.bind(this)); var className = ""; if (this.props.selected) { - className += "selected"; + className += " selected"; } - - var highlight_count = flow._highlight.length; - if (highlight_count > 0) { - var background = "linear-gradient(90deg"; - for(var i =0; i < highlight_count; i++){ - var tag = flow._highlight[i]; - var ps = (100 * i / highlight_count) + "%"; - var pe = (100 * (i + 1) / highlight_count) + "%"; - background += ("," + tag + " " + ps + "," + tag + " " + pe); - } - background += ")"; + if (this.props.highlighted) { + className += " highlighted"; } - style = { - background: background - }; - return ( - <tr className={className} onClick={this.props.selectFlow.bind(null, flow)} style={style}> + <tr className={className} onClick={this.props.selectFlow.bind(null, flow)}> {columns} </tr>); }, @@ -95,11 +82,13 @@ var FlowTable = React.createClass({ }, renderRow: function (flow) { var selected = (flow === this.props.selected); + var highlighted = (this.props.view._highlight && this.props.view._highlight[flow.id].length > 0); return <FlowRow key={flow.id} ref={flow.id} flow={flow} columns={this.state.columns} selected={selected} + highlighted={highlighted} selectFlow={this.props.selectFlow} />; }, |