aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/components/Header
diff options
context:
space:
mode:
authorClemens <cle1000.cb@gmail.com>2016-06-14 11:20:48 +0200
committerClemens <cle1000.cb@gmail.com>2016-06-14 11:20:48 +0200
commitbf75e1457363739f9ea4329da71c03e48a0bb8af (patch)
tree1d5c25d27a9be6466bc5ab351863f884e00e27fb /web/src/js/components/Header
parentccf4723505935f759c1bff5c5cc7d6d986726422 (diff)
downloadmitmproxy-bf75e1457363739f9ea4329da71c03e48a0bb8af.tar.gz
mitmproxy-bf75e1457363739f9ea4329da71c03e48a0bb8af.tar.bz2
mitmproxy-bf75e1457363739f9ea4329da71c03e48a0bb8af.zip
added flowMenu
Diffstat (limited to 'web/src/js/components/Header')
-rw-r--r--web/src/js/components/Header/FlowMenu.jsx32
1 files changed, 32 insertions, 0 deletions
diff --git a/web/src/js/components/Header/FlowMenu.jsx b/web/src/js/components/Header/FlowMenu.jsx
new file mode 100644
index 00000000..4a43f40f
--- /dev/null
+++ b/web/src/js/components/Header/FlowMenu.jsx
@@ -0,0 +1,32 @@
+import React, { PropTypes } from 'react'
+import { Button } from '../common.js'
+import {FlowActions} from "../../actions.js";
+import {MessageUtils} from "../../flow/utils.js";
+import { connect } from 'react-redux'
+
+FlowMenu.title = "Flow"
+
+FlowMenu.propTypes = {
+ flow: PropTypes.object.isRequired,
+}
+
+function FlowMenu({ flow }) {
+
+ return (
+ <div>
+ <div className="menu-row">
+ <Button disabled title="[r]eplay flow" text="Replay" icon="fa-repeat" onClick={FlowActions.replay.bind(null, flow)} />
+ <Button title="[D]uplicate flow" text="Duplicate" icon="fa-copy" onClick={FlowActions.duplicate.bind(null, flow)} />
+ <Button title="[d]elete flow" text="Delete" icon="fa-trash" onClick={FlowActions.delete.bind(null, flow)}/>
+ <Button title="download" text="Download" icon="fa-download" onClick={() => window.location = MessageUtils.getContentURL(flow, flow.response)}/>
+ </div>
+ <div className="clearfix"/>
+ </div>
+ )
+}
+
+export default connect(
+ state => ({
+ flow: state.flows.all.byId[state.flows.selected[0]]
+ })
+)(FlowMenu)