From bc8687deb5f0f9273fc771e79b070f3b49e39fed Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 30 Dec 2014 21:51:07 +1300 Subject: Basic conversion: browserified web app now works. --- web/src/js/components/flowtable-columns.jsx.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'web/src/js/components/flowtable-columns.jsx.js') diff --git a/web/src/js/components/flowtable-columns.jsx.js b/web/src/js/components/flowtable-columns.jsx.js index 9162e077..39c4bd8d 100644 --- a/web/src/js/components/flowtable-columns.jsx.js +++ b/web/src/js/components/flowtable-columns.jsx.js @@ -1,3 +1,7 @@ +var React = require("react"); +var flowutils = require("../flow/utils.js"); +var utils = require("../utils.js"); + var TLSColumn = React.createClass({ statics: { renderTitle: function () { @@ -29,7 +33,7 @@ var IconColumn = React.createClass({ var icon; if (flow.response) { - var contentType = ResponseUtils.getContentType(flow.response); + var contentType = flowutils.ResponseUtils.getContentType(flow.response); //TODO: We should assign a type to the flow somewhere else. if (flow.response.code == 304) { @@ -120,7 +124,7 @@ var SizeColumn = React.createClass({ if (flow.response) { total += flow.response.contentLength || 0; } - var size = formatSize(total); + var size = utils.formatSize(total); return {size}; } }); @@ -136,7 +140,7 @@ var TimeColumn = React.createClass({ var flow = this.props.flow; var time; if (flow.response) { - time = formatTimeDelta(1000 * (flow.response.timestamp_end - flow.request.timestamp_start)); + time = utils.formatTimeDelta(1000 * (flow.response.timestamp_end - flow.request.timestamp_start)); } else { time = "..."; } @@ -154,3 +158,7 @@ var all_columns = [ SizeColumn, TimeColumn]; + +module.exports = all_columns; + + -- cgit v1.2.3