From b0374710e4ef934c2ae9b416e5c981e04ed776ed Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Fri, 19 Sep 2014 01:35:36 +0200 Subject: start to fill detailpane --- web/src/js/components/flowdetail.jsx.js | 48 +++++++++++++++++++++++--- web/src/js/components/flowtable-columns.jsx.js | 25 +++++++++++++- 2 files changed, 67 insertions(+), 6 deletions(-) (limited to 'web/src/js/components') diff --git a/web/src/js/components/flowdetail.jsx.js b/web/src/js/components/flowdetail.jsx.js index acf5e6f4..744901be 100644 --- a/web/src/js/components/flowdetail.jsx.js +++ b/web/src/js/components/flowdetail.jsx.js @@ -23,21 +23,59 @@ var FlowDetailNav = React.createClass({ } }); +var Headers = React.createClass({ + render: function(){ + var rows = this.props.message.headers.map(function(header){ + return ( + + {header[0]} + {header[1]} + + ); + }) + return ( + + + {rows} + +
+ ); + } +}) + var FlowDetailRequest = React.createClass({ render: function(){ - return
request
; + var flow = this.props.flow; + var url = { RequestUtils.pretty_url(flow.request) }; + var content = null; + if(flow.request.contentLength > 0){ + content = "Request Content Size: "+ formatSize(flow.request.contentLength); + } else { + content =
No Content
; + } + + //TODO: Styling + + return ( +
+ {url} + +
+ {content} +
+ ); } }); var FlowDetailResponse = React.createClass({ render: function(){ - return
response
; + return
response
; } }); var FlowDetailConnectionInfo = React.createClass({ render: function(){ - return
details
; + return
details
; } }); @@ -54,8 +92,8 @@ var FlowDetail = React.createClass({ var Tab = tabs[this.props.active]; return (
- - + +
); } diff --git a/web/src/js/components/flowtable-columns.jsx.js b/web/src/js/components/flowtable-columns.jsx.js index 0eb9966c..01130bc1 100644 --- a/web/src/js/components/flowtable-columns.jsx.js +++ b/web/src/js/components/flowtable-columns.jsx.js @@ -77,6 +77,22 @@ var StatusColumn = React.createClass({ }); +var SizeColumn = React.createClass({ + statics: { + renderTitle: function(){ + return Size; + } + }, + render: function(){ + var flow = this.props.flow; + var size = formatSize( + flow.request.contentLength + + (flow.response.contentLength || 0)); + return {size}; + } +}); + + var TimeColumn = React.createClass({ statics: { renderTitle: function(){ @@ -96,5 +112,12 @@ var TimeColumn = React.createClass({ }); -var all_columns = [TLSColumn, IconColumn, PathColumn, MethodColumn, StatusColumn, TimeColumn]; +var all_columns = [ + TLSColumn, + IconColumn, + PathColumn, + MethodColumn, + StatusColumn, + SizeColumn, + TimeColumn]; -- cgit v1.2.3