{"action":"created","comment":{"url":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/comments/67057917","id":67057917,"diff_hunk":"@@ -1,56 +1,66 @@\n import React, { Component, PropTypes } from 'react'\n+import { connect } from 'react-redux'\n+import { bindActionCreators } from 'redux'\n import classnames from 'classnames'\n import { toggleEventLogVisibility } from '../ducks/eventLog'\n import MainMenu from './Header/MainMenu'\n import ViewMenu from './Header/ViewMenu'\n import OptionMenu from './Header/OptionMenu'\n import FileMenu from './Header/FileMenu'\n+import FlowMenu from './Header/FlowMenu'\n+import {setActiveMenu} from '../ducks/view'\n \n-export default class Header extends Component {\n+class Header extends Component {\n \n-    static entries = [MainMenu, ViewMenu, OptionMenu]\n+    static entries = [MainMenu, ViewMenu, OptionMenu, FlowMenu]\n \n     static propTypes = {\n         settings: PropTypes.object.isRequired,\n     }\n \n-    constructor(props, context) {\n-        super(props, context)\n-        this.state = { active: Header.entries[0] }\n-    }\n-\n     handleClick(active, e) {\n         e.preventDefault()\n-        this.props.updateLocation(active.route)\n-        this.setState({ active })\n+        this.props.setActiveMenu(active.title)\n+       // this.props.updateLocation(active.route)\n+       // this.setState({ active })\n     }\n \n     render() {\n-        const { active: Active } = this.state\n-        const { settings, updateLocation, query } = this.props\n-\n+        const { settings, updateLocation, query, selectedFlow, active_menu} = this.props\n         return (\n             <header>\n                 <nav className=\"nav-tabs nav-tabs-lg\">\n                     <FileMenu/>\n                     {Header.entries.map(Entry => (\n                         <a key={Entry.title}\n                            href=\"#\"\n-                           className={classnames({ active: Entry === Active })}\n+                           className={classnames({ active: Entry.title === active_menu, hidden: !selectedFlow && Entry === FlowMenu })}\n                            onClick={e => this.handleClick(Entry, e)}>\n                             {Entry.title}\n                         </a>\n                     ))}\n                 </nav>\n                 <div className=\"menu\">\n-                    <Active\n-                        ref=\"active\"\n-                        settings={settings}\n-                        updateLocation={updateLocation}\n-                        query={query}\n-                    />\n+                    {Header.entries.map(Entry => (","path":"web/src/js/components/Header.js","position":63,"original_position":63,"commit_id":"003096b4cc4e268642eb842dbe94cd4439db1908","original_commit_id":"003096b4cc4e268642eb842dbe94cd4439db1908","user":{"login":"cle1000","id":5902525,"avatar_url":"https://avatars.githubusercontent.com/u/5902525?v=3","gravatar_id":"","url":"https://api.github.com/users/cle1000","html_url":"https://github.com/cle1000","followers_url":"https://api.github.com/users/cle1000/followers","following_url":"https://api.github.com/users/cle1000/following{/other_user}","gists_url":"https://api.github.com/users/cle1000/gists{/gist_id}","starred_url":"https://api.github.com/users/cle1000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cle1000/subscriptions","organizations_url":"https://api.github.com/users/cle1000/orgs","repos_url":"https://api.github.com/users/cle1000/repos","events_url":"https://api.github.com/users/cle1000/events{/privacy}","received_events_url":"https://api.github.com/users/cle1000/received_events","type":"User","site_admin":false},"body":"it shows the content for each menu item,` settings, updateLocation, query` is used by `MainMenu`, `settings` is used by `OptionsMenu`","created_at":"2016-06-14T21:11:26Z","updated_at":"2016-06-14T21:11:26Z","html_url":"https://github.com/mitmproxy/mitmproxy/pull/1256#discussion_r67057917","pull_request_url":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/1256","_links":{"self":{"href":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/comments/67057917"},"html":{"href":"https://github.com/mitmproxy/mitmproxy/pull/1256#discussion_r67057917"},"pull_request":{"href":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/1256"}}},"pull_request":{"url":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/1256","id":73707783,"html_url":"https://github.com/mitmproxy/mitmproxy/pull/1256","diff_url":"https://github.com/mitmproxy/mitmproxy/pull/1256.diff","patch_url":"https://github.com/mitmproxy/mitmproxy/pull/1256.patch","issue_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1256","number":1256,"state":"open","locked":false,"title":"added flowMenu","user":{"login":"cle1000","id":5902525,"avatar_url":"https://avatars.githubusercontent.com/u/5902525?v=3","gravatar_id":"","url":"https://api.github.com/users/cle1000","html_url":"https://github.com/cle1000","followers_url":"https://api.github.com/users/cle1000/followers","following_url":"https://api.github.com/users/cle1000/following{/other_user}","gists_url":"https://api.github.com/users/cle1000/gists{/gist_id}","starred_url":"https://api.github.com/users/cle1000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cle1000/subscriptions","organizations_url":"https://api.github.com/users/cle1000/orgs","repos_url":"https://api.github.com/users/cle1000/repos","events_url":"https://api.github.com/users/cle1000/events{/privacy}","received_events_url":"https://api.github.com/users/cle1000/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-14T09:33:25Z","updated_at":"2016-06-14T21:11:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"673b331c177e5a1ea6eb9f9e278167d4fcaec0c7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/1256/commits","review_comments_url":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/1256/comments","review_comment_url":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1256/comments","statuses_url":"https://api.github.com/repos/mitmproxy/mitmproxy/statuses/003096b4cc4e268642eb842dbe94cd4439db1908","head":{"label":"mitmproxy:add_flow_to_options","ref":"add_flow_to_options","sha":"003096b4cc4e268642eb842dbe94cd4439db1908","user":{"login":"mitmproxy","id":4652787,"avatar_url":"https://avatars.githubusercontent.com/u/4652787?v=3","gravatar_id":"","url":"https://api.github.com/users/mitmproxy","html_url":"https://github.com/mitmproxy","followers_url":"https://api.github.com/users/mitmproxy/followers","following_url":"https://api.github.com/users/mitmproxy/following{/other_user}","gists_url":"https://api.github.com/users/mitmproxy/gists{/gist_id}","starred_url":"https://api.github.com/users/mitmproxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitmproxy/subscriptions","organizations_url":"https://api.github.com/users/mitmproxy/orgs","repos_url":"https://api.github.com/users/mitmproxy/repos","events_url":"https://api.github.com/users/mitmproxy/events{/privacy}","received_events_url":"https://api.github.com/users/mitmproxy/received_events","type":"Organization","site_admin":false},"repo":{"id":519832,"name":"mitmproxy","full_name":"mitmproxy/mitmproxy","owner":{"login":"mitmproxy","id":4652787,"avatar_url":"https://avatars.githubusercontent.com/u/4652787?v=3","gravatar_id":"","url":"https://api.github.com/users/mitmproxy","html_url":"https://github.com/mitmproxy","followers_url":"https://api.github.com/users/mitmproxy/followers","following_url":"https://api.github.com/users/mitmproxy/following{/other_user}","gists_url":"https://api.github.com/users/mitmproxy/gists{/gist_id}","starred_url":"https://api.github.com/users/mitmproxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitmproxy/subscriptions","organizations_url":"https://api.github.com/users/mitmproxy/orgs","repos_url":"https://api.github.com/users/mitmproxy/repos","events_url":"https://api.github.com/users/mitmproxy/events{/privacy}","received_events_url":"https://api.github.com/users/mitmproxy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mitmproxy/mitmproxy","description":"An interactive SSL-capable intercepting HTTP proxy for penetration testers and software developers","fork":false,"url":"https://api.github.com/repos/mitmproxy/mitmproxy","forks_url":"https://api.github.com/repos/mitmproxy/mitmproxy/forks","keys_url":"https://api.github.com/repos/mitmproxy/mitmproxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitmproxy/mitmproxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitmproxy/mitmproxy/teams","hooks_url":"https://api.github.com/repos/mitmproxy/mitmproxy/hooks","issue_events_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/events{/number}","events_url":"https://api.github.com/repos/mitmproxy/mitmproxy/events","assignees_url":"https://api.github.com/repos/mitmproxy/mitmproxy/assignees{/user}","branches_url":"https://api.github.com/repos/mitmproxy/mitmproxy/branches{/branch}","tags_url":"https://api.github.com/repos/mitmproxy/mitmproxy/tags","blobs_url":"https://api.github.com/repos/mitmproxy/mitmproxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitmproxy/mitmproxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitmproxy/mitmproxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitmproxy/mitmproxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitmproxy/mitmproxy/statuses/{sha}","languages_url":"https://api.github.com/repos/mitmproxy/mitmproxy/languages","stargazers_url":"https://api.github.com/repos/mitmproxy/mitmproxy/stargazers","contributors_url":"https://api.github.com/repos/mitmproxy/mitmproxy/contributors","subscribers_url":"https://api.github.com/repos/mitmproxy/mitmproxy/subscribers","subscription_url":"https://api.github.com/repos/mitmproxy/mitmproxy/subscription","commits_url":"https://api.github.com/repos/mitmproxy/mitmproxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitmproxy/mitmproxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitmproxy/mitmproxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitmproxy/mitmproxy/contents/{+path}","compare_url":"https://api.github.com/repos/mitmproxy/mitmproxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitmproxy/mitmproxy/merges","archive_url":"https://api.github.com/repos/mitmproxy/mitmproxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitmproxy/mitmproxy/downloads","issues_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues{/number}","pulls_url":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls{/number}","milestones_url":"https://api.github.com/repos/mitmproxy/mitmproxy/milestones{/number}","notifications_url":"https://api.github.com/repos/mitmproxy/mitmproxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitmproxy/mitmproxy/labels{/name}","releases_url":"https://api.github.com/repos/mitmproxy/mitmproxy/releases{/id}","deployments_url":"https://api.github.com/repos/mitmproxy/mitmproxy/deployments","created_at":"2010-02-16T04:10:13Z","updated_at":"2016-06-14T19:35:07Z","pushed_at":"2016-06-14T20:27:46Z","git_url":"git://github.com/mitmproxy/mitmproxy.git","ssh_url":"git@github.com:mitmproxy/mitmproxy.git","clone_url":"https://github.com/mitmproxy/mitmproxy.git","svn_url":"https://github.com/mitmproxy/mitmproxy","homepage":"http://mitmproxy.org","size":34634,"stargazers_count":5071,"watchers_count":5071,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":727,"mirror_url":null,"open_issues_count":69,"forks":727,"open_issues":69,"watchers":5071,"default_branch":"master"}},"base":{"label":"mitmproxy:master","ref":"master","sha":"a63817f2b8539cab0b645e0eda772daeaf898ed3","user":{"login":"mitmproxy","id":4652787,"avatar_url":"https://avatars.githubusercontent.com/u/4652787?v=3","gravatar_id":"","url":"https://api.github.com/users/mitmproxy","html_url":"https://github.com/mitmproxy","followers_url":"https://api.github.com/users/mitmproxy/followers","following_url":"https://api.github.com/users/mitmproxy/following{/other_user}","gists_url":"https://api.github.com/users/mitmproxy/gists{/gist_id}","starred_url":"https://api.github.com/users/mitmproxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitmproxy/subscriptions","organizations_url":"https://api.github.com/users/mitmproxy/orgs","repos_url":"https://api.github.com/users/mitmproxy/repos","events_url":"https://api.github.com/users/mitmproxy/events{/privacy}","received_events_url":"https://api.github.com/users/mitmproxy/received_events","type":"Organization","site_admin":false},"repo":{"id":519832,"name":"mitmproxy","full_name":"mitmproxy/mitmproxy","owner":{"login":"mitmproxy","id":4652787,"avatar_url":"https://avatars.githubusercontent.com/u/4652787?v=3","gravatar_id":"","url":"https://api.github.com/users/mitmproxy","html_url":"https://github.com/mitmproxy","followers_url":"https://api.github.com/users/mitmproxy/followers","following_url":"https://api.github.com/users/mitmproxy/following{/other_user}","gists_url":"https://api.github.com/users/mitmproxy/gists{/gist_id}","starred_url":"https://api.github.com/users/mitmproxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitmproxy/subscriptions","organizations_url":"https://api.github.com/users/mitmproxy/orgs","repos_url":"https://api.github.com/users/mitmproxy/repos","events_url":"https://api.github.com/users/mitmproxy/events{/privacy}","received_events_url":"https://api.github.com/users/mitmproxy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mitmproxy/mitmproxy","description":"An interactive SSL-capable intercepting HTTP proxy for penetration testers and software developers","fork":false,"url":"https://api.github.com/repos/mitmproxy/mitmproxy","forks_url":"https://api.github.com/repos/mitmproxy/mitmproxy/forks","keys_url":"https://api.github.com/repos/mitmproxy/mitmproxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitmproxy/mitmproxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitmproxy/mitmproxy/teams","hooks_url":"https://api.github.com/repos/mitmproxy/mitmproxy/hooks","issue_events_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/events{/number}","events_url":"https://api.github.com/repos/mitmproxy/mitmproxy/events","assignees_url":"https://api.github.com/repos/mitmproxy/mitmproxy/assignees{/user}","branches_url":"https://api.github.com/repos/mitmproxy/mitmproxy/branches{/branch}","tags_url":"https://api.github.com/repos/mitmproxy/mitmproxy/tags","blobs_url":"https://api.github.com/repos/mitmproxy/mitmproxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitmproxy/mitmproxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitmproxy/mitmproxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitmproxy/mitmproxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitmproxy/mitmproxy/statuses/{sha}","languages_url":"https://api.github.com/repos/mitmproxy/mitmproxy/languages","stargazers_url":"https://api.github.com/repos/mitmproxy/mitmproxy/stargazers","contributors_url":"https://api.github.com/repos/mitmproxy/mitmproxy/contributors","subscribers_url":"https://api.github.com/repos/mitmproxy/mitmproxy/subscribers","subscription_url":"https://api.github.com/repos/mitmproxy/mitmproxy/subscription","commits_url":"https://api.github.com/repos/mitmproxy/mitmproxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitmproxy/mitmproxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitmproxy/mitmproxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitmproxy/mitmproxy/contents/{+path}","compare_url":"https://api.github.com/repos/mitmproxy/mitmproxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitmproxy/mitmproxy/merges","archive_url":"https://api.github.com/repos/mitmproxy/mitmproxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitmproxy/mitmproxy/downloads","issues_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues{/number}","pulls_url":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls{/number}","milestones_url":"https://api.github.com/repos/mitmproxy/mitmproxy/milestones{/number}","notifications_url":"https://api.github.com/repos/mitmproxy/mitmproxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitmproxy/mitmproxy/labels{/name}","releases_url":"https://api.github.com/repos/mitmproxy/mitmproxy/releases{/id}","deployments_url":"https://api.github.com/repos/mitmproxy/mitmproxy/deployments","created_at":"2010-02-16T04:10:13Z","updated_at":"2016-06-14T19:35:07Z","pushed_at":"2016-06-14T20:27:46Z","git_url":"git://github.com/mitmproxy/mitmproxy.git","ssh_url":"git@github.com:mitmproxy/mitmproxy.git","clone_url":"https://github.com/mitmproxy/mitmproxy.git","svn_url":"https://github.com/mitmproxy/mitmproxy","homepage":"http://mitmproxy.org","size":34634,"stargazers_count":5071,"watchers_count":5071,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":727,"mirror_url":null,"open_issues_count":69,"forks":727,"open_issues":69,"watchers":5071,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/1256"},"html":{"href":"https://github.com/mitmproxy/mitmproxy/pull/1256"},"issue":{"href":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1256"},"comments":{"href":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1256/comments"},"review_comments":{"href":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/1256/comments"},"review_comment":{"href":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/1256/commits"},"statuses":{"href":"https://api.github.com/repos/mitmproxy/mitmproxy/statuses/003096b4cc4e268642eb842dbe94cd4439db1908"}}}}
{"actor":{"display_login":"cle1000"}}