From b55d584309ed6fde064c3f251e4d21e2ab754acd Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Tue, 23 Dec 2014 01:13:34 +0100 Subject: web: simpler filter ui --- web/src/js/components/flowtable.jsx.js | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) (limited to 'web/src/js/components/flowtable.jsx.js') 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 ( - + {columns} ); }, @@ -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 ; }, -- cgit v1.2.3