{"action":"created","comment":{"url":"https://api.github.com/repos/mesosphere/marathon/pulls/comments/22928327","id":22928327,"diff_hunk":"@@ -37,17 +37,49 @@ define([\n       rollBackApp: React.PropTypes.func.isRequired,\n       scaleApp: React.PropTypes.func.isRequired,\n       suspendApp: React.PropTypes.func.isRequired,\n-      tasksFetchState: React.PropTypes.number.isRequired\n+      tasksFetchState: React.PropTypes.number.isRequired,\n+      router: React.PropTypes.object.isRequired\n     },\n \n     getInitialState: function() {\n+      var appid = this.props.model.get('id');\n+\n+      this.tabs = [];\n+\n+      _.each(tabsTemplate, function(tab) {\n+        this.tabs.push({\n+          id: tab.id.replace(\":appid\", appid),\n+          text: tab.text\n+        });\n+      }.bind(this));\n+\n       return {\n         activeViewIndex: 0,\n-        activeTabId: tabs[0].id,\n+        activeTabId: this.tabs[0].id,\n         selectedTasks: {}\n       };\n     },\n \n+    componentWillMount: function() {\n+      this.props.router.on(\"route:app\", function (appid, tab) {\n+        if(appid) {\n+          this.setState({\n+            activeTabId: \"app/\" + appid + (tab ? \"/\" + tab : \"\")\n+          });\n+        }\n+      }.bind(this));\n+    },\n+\n+    componentDidMount: function() {\n+      this.setState({\n+        activeTabId: this.props.router.current()\n+      });\n+    },\n+\n+    componentWillUnmount: function() {\n+      this.props.router.off(\"route:app\");","path":"src/main/resources/assets/js/components/AppModalComponent.jsx","position":59,"original_position":59,"commit_id":"dc35f9528d2791a7281ac6d8a9371fbb4d7f64be","original_commit_id":"dc35f9528d2791a7281ac6d8a9371fbb4d7f64be","user":{"login":"aldipower","id":859154,"avatar_url":"https://avatars.githubusercontent.com/u/859154?v=3","gravatar_id":"","url":"https://api.github.com/users/aldipower","html_url":"https://github.com/aldipower","followers_url":"https://api.github.com/users/aldipower/followers","following_url":"https://api.github.com/users/aldipower/following{/other_user}","gists_url":"https://api.github.com/users/aldipower/gists{/gist_id}","starred_url":"https://api.github.com/users/aldipower/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldipower/subscriptions","organizations_url":"https://api.github.com/users/aldipower/orgs","repos_url":"https://api.github.com/users/aldipower/repos","events_url":"https://api.github.com/users/aldipower/events{/privacy}","received_events_url":"https://api.github.com/users/aldipower/received_events","type":"User","site_admin":false},"body":"That's defined by me. It returns the current hash fragement. Renamed it to currentHash.","created_at":"2015-01-14T10:32:40Z","updated_at":"2015-01-14T10:32:40Z","html_url":"https://github.com/mesosphere/marathon/pull/990#discussion_r22928327","pull_request_url":"https://api.github.com/repos/mesosphere/marathon/pulls/990","_links":{"self":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/comments/22928327"},"html":{"href":"https://github.com/mesosphere/marathon/pull/990#discussion_r22928327"},"pull_request":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/990"}}},"pull_request":{"url":"https://api.github.com/repos/mesosphere/marathon/pulls/990","id":27284030,"html_url":"https://github.com/mesosphere/marathon/pull/990","diff_url":"https://github.com/mesosphere/marathon/pull/990.diff","patch_url":"https://github.com/mesosphere/marathon/pull/990.patch","issue_url":"https://api.github.com/repos/mesosphere/marathon/issues/990","number":990,"state":"open","locked":false,"title":"325 make resources linkable","user":{"login":"aldipower","id":859154,"avatar_url":"https://avatars.githubusercontent.com/u/859154?v=3","gravatar_id":"","url":"https://api.github.com/users/aldipower","html_url":"https://github.com/aldipower","followers_url":"https://api.github.com/users/aldipower/followers","following_url":"https://api.github.com/users/aldipower/following{/other_user}","gists_url":"https://api.github.com/users/aldipower/gists{/gist_id}","starred_url":"https://api.github.com/users/aldipower/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldipower/subscriptions","organizations_url":"https://api.github.com/users/aldipower/orgs","repos_url":"https://api.github.com/users/aldipower/repos","events_url":"https://api.github.com/users/aldipower/events{/privacy}","received_events_url":"https://api.github.com/users/aldipower/received_events","type":"User","site_admin":false},"body":"Integrated the Backbone.Router and did some refactoring of the app to make resources linkable.\r\nThis resources are linkable for now:\r\n#apps, #deployments, #newapp, #app/:appid(/configure), #about\r\n\r\nRelated to #325 ","created_at":"2015-01-13T16:31:37Z","updated_at":"2015-01-14T10:32:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d243a2af4526fe638b63d7fc6e53fd4c972d9907","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mesosphere/marathon/pulls/990/commits","review_comments_url":"https://api.github.com/repos/mesosphere/marathon/pulls/990/comments","review_comment_url":"https://api.github.com/repos/mesosphere/marathon/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mesosphere/marathon/issues/990/comments","statuses_url":"https://api.github.com/repos/mesosphere/marathon/statuses/dc35f9528d2791a7281ac6d8a9371fbb4d7f64be","head":{"label":"mesosphere:325-make-resources-linkable","ref":"325-make-resources-linkable","sha":"dc35f9528d2791a7281ac6d8a9371fbb4d7f64be","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":10941409,"name":"marathon","full_name":"mesosphere/marathon","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/marathon","description":"Deploy and manage containers (including Docker) on top of Apache Mesos at scale.","fork":false,"url":"https://api.github.com/repos/mesosphere/marathon","forks_url":"https://api.github.com/repos/mesosphere/marathon/forks","keys_url":"https://api.github.com/repos/mesosphere/marathon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/marathon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/marathon/teams","hooks_url":"https://api.github.com/repos/mesosphere/marathon/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/marathon/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/marathon/events","assignees_url":"https://api.github.com/repos/mesosphere/marathon/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/marathon/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/marathon/tags","blobs_url":"https://api.github.com/repos/mesosphere/marathon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/marathon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/marathon/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/marathon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/marathon/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/marathon/languages","stargazers_url":"https://api.github.com/repos/mesosphere/marathon/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/marathon/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/marathon/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/marathon/subscription","commits_url":"https://api.github.com/repos/mesosphere/marathon/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/marathon/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/marathon/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/marathon/issues/comments/{number}","contents_url":"https://api.github.com/repos/mesosphere/marathon/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/marathon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/marathon/merges","archive_url":"https://api.github.com/repos/mesosphere/marathon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/marathon/downloads","issues_url":"https://api.github.com/repos/mesosphere/marathon/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/marathon/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/marathon/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/marathon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/marathon/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/marathon/releases{/id}","created_at":"2013-06-25T14:56:34Z","updated_at":"2015-01-14T07:08:20Z","pushed_at":"2015-01-14T06:23:08Z","git_url":"git://github.com/mesosphere/marathon.git","ssh_url":"git@github.com:mesosphere/marathon.git","clone_url":"https://github.com/mesosphere/marathon.git","svn_url":"https://github.com/mesosphere/marathon","homepage":"https://mesosphere.github.io/marathon/","size":17926,"stargazers_count":1030,"watchers_count":1030,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":205,"mirror_url":null,"open_issues_count":141,"forks":205,"open_issues":141,"watchers":1030,"default_branch":"master"}},"base":{"label":"mesosphere:master","ref":"master","sha":"df67025a0ba81a3205d4954de8ec4df03bdbfbc6","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":10941409,"name":"marathon","full_name":"mesosphere/marathon","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/marathon","description":"Deploy and manage containers (including Docker) on top of Apache Mesos at scale.","fork":false,"url":"https://api.github.com/repos/mesosphere/marathon","forks_url":"https://api.github.com/repos/mesosphere/marathon/forks","keys_url":"https://api.github.com/repos/mesosphere/marathon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/marathon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/marathon/teams","hooks_url":"https://api.github.com/repos/mesosphere/marathon/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/marathon/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/marathon/events","assignees_url":"https://api.github.com/repos/mesosphere/marathon/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/marathon/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/marathon/tags","blobs_url":"https://api.github.com/repos/mesosphere/marathon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/marathon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/marathon/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/marathon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/marathon/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/marathon/languages","stargazers_url":"https://api.github.com/repos/mesosphere/marathon/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/marathon/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/marathon/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/marathon/subscription","commits_url":"https://api.github.com/repos/mesosphere/marathon/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/marathon/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/marathon/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/marathon/issues/comments/{number}","contents_url":"https://api.github.com/repos/mesosphere/marathon/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/marathon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/marathon/merges","archive_url":"https://api.github.com/repos/mesosphere/marathon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/marathon/downloads","issues_url":"https://api.github.com/repos/mesosphere/marathon/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/marathon/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/marathon/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/marathon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/marathon/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/marathon/releases{/id}","created_at":"2013-06-25T14:56:34Z","updated_at":"2015-01-14T07:08:20Z","pushed_at":"2015-01-14T06:23:08Z","git_url":"git://github.com/mesosphere/marathon.git","ssh_url":"git@github.com:mesosphere/marathon.git","clone_url":"https://github.com/mesosphere/marathon.git","svn_url":"https://github.com/mesosphere/marathon","homepage":"https://mesosphere.github.io/marathon/","size":17926,"stargazers_count":1030,"watchers_count":1030,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":205,"mirror_url":null,"open_issues_count":141,"forks":205,"open_issues":141,"watchers":1030,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/990"},"html":{"href":"https://github.com/mesosphere/marathon/pull/990"},"issue":{"href":"https://api.github.com/repos/mesosphere/marathon/issues/990"},"comments":{"href":"https://api.github.com/repos/mesosphere/marathon/issues/990/comments"},"review_comments":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/990/comments"},"review_comment":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/990/commits"},"statuses":{"href":"https://api.github.com/repos/mesosphere/marathon/statuses/dc35f9528d2791a7281ac6d8a9371fbb4d7f64be"}}}}