payload: {"action":"created","comment":{"url":"https://api.github.com/repos/chanzuckerberg/idseq-web/pulls/comments/256993108","pull_request_review_id":203946786,"id":256993108,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI1Njk5MzEwOA==","diff_hunk":"@@ -52,12 +52,23 @@ def check_access\n     raise \"action doesn't check against access control\" unless @access_checked\n   end\n \n+  # TODO: (gdingle): how is this related to request_context in ApplicationHelper?\n   def request_context\n     {\n       enabledFeatures: current_user.allowed_featured_list\n     }\n   end\n \n+  def get_background_id(sample)\n+    if params[:background_id]","path":"app/controllers/application_controller.rb","position":12,"original_position":12,"commit_id":"0463a79a4de02b244f49b8c9f3f395adda8f90a0","original_commit_id":"0463a79a4de02b244f49b8c9f3f395adda8f90a0","user":{"login":"jshoe","id":5652739,"node_id":"MDQ6VXNlcjU2NTI3Mzk=","avatar_url":"https://avatars1.githubusercontent.com/u/5652739?v=4","gravatar_id":"","url":"https://api.github.com/users/jshoe","html_url":"https://github.com/jshoe","followers_url":"https://api.github.com/users/jshoe/followers","following_url":"https://api.github.com/users/jshoe/following{/other_user}","gists_url":"https://api.github.com/users/jshoe/gists{/gist_id}","starred_url":"https://api.github.com/users/jshoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshoe/subscriptions","organizations_url":"https://api.github.com/users/jshoe/orgs","repos_url":"https://api.github.com/users/jshoe/repos","events_url":"https://api.github.com/users/jshoe/events{/privacy}","received_events_url":"https://api.github.com/users/jshoe/received_events","type":"User","site_admin":false},"body":"may want to just do params[:background_id].to_i at the top","created_at":"2019-02-14T20:08:24Z","updated_at":"2019-02-14T20:08:24Z","html_url":"https://github.com/chanzuckerberg/idseq-web/pull/1935#discussion_r256993108","pull_request_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/pulls/1935","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/chanzuckerberg/idseq-web/pulls/comments/256993108"},"html":{"href":"https://github.com/chanzuckerberg/idseq-web/pull/1935#discussion_r256993108"},"pull_request":{"href":"https://api.github.com/repos/chanzuckerberg/idseq-web/pulls/1935"}}},"pull_request":{"url":"https://api.github.com/repos/chanzuckerberg/idseq-web/pulls/1935","id":252898253,"node_id":"MDExOlB1bGxSZXF1ZXN0MjUyODk4MjUz","html_url":"https://github.com/chanzuckerberg/idseq-web/pull/1935","diff_url":"https://github.com/chanzuckerberg/idseq-web/pull/1935.diff","patch_url":"https://github.com/chanzuckerberg/idseq-web/pull/1935.patch","issue_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/issues/1935","number":1935,"state":"open","locked":false,"title":"Switch to using /visualizations route for everything heatmap","user":{"login":"gregdingle","id":28797,"node_id":"MDQ6VXNlcjI4Nzk3","avatar_url":"https://avatars3.githubusercontent.com/u/28797?v=4","gravatar_id":"","url":"https://api.github.com/users/gregdingle","html_url":"https://github.com/gregdingle","followers_url":"https://api.github.com/users/gregdingle/followers","following_url":"https://api.github.com/users/gregdingle/following{/other_user}","gists_url":"https://api.github.com/users/gregdingle/gists{/gist_id}","starred_url":"https://api.github.com/users/gregdingle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregdingle/subscriptions","organizations_url":"https://api.github.com/users/gregdingle/orgs","repos_url":"https://api.github.com/users/gregdingle/repos","events_url":"https://api.github.com/users/gregdingle/events{/privacy}","received_events_url":"https://api.github.com/users/gregdingle/received_events","type":"User","site_admin":false},"body":"# Description\r\n\r\nThis is on top of #1931 .\r\n\r\nEssentially, it moves code from `SamplesController` to `HeatmapHelper` and it changes URL paths in routes and JS. And it adds 301 redirects to routes. \r\n\r\nI moved one method `get_background_id` to the global controller because it seems relevant across many controllers.\r\n\r\n## Type of change\r\n\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [X] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix a feature that knowingly causes existing functionality to not work as expected)\r\n\r\n# Test and Reproduce\r\nOutline the steps to test or reproduce the PR here.\r\n\r\n1. Open a saved URL such as http://localhost:3000/samples/heatmap/3?background=26&dataScaleIdx=0&metric=NT.aggregatescore&readSpecificity=1&sampleIds[]=10399&sampleIds[]=4540&species=1&subcategories=%7B%7D&taxonsPerSample=30&thresholdFilters=%5B%5D\r\n\r\n2. See redirect to http://localhost:3000/visualizations/heatmap/3?background=26&dataScaleIdx=0&metric=NT.aggregatescore&readSpecificity=1&sampleIds[]=10399&sampleIds[]=4540&species=1&subcategories=%7B%7D&taxonsPerSample=30&thresholdFilters=%5B%5D\r\n\r\n3. Try save heatmap\r\n\r\n4. Try download heatmap\r\n\r\n# Checklist:\r\n\r\n- [ ] I have run through the testing script to make sure current functionality is unchanged\r\n- [X] I have done relevant tests that prove my fix is effective or that my feature works\r\n- [X] I have spent time testing out edge cases for my feature\r\n- [ ] I have updated the test script or pull request template if necessary\r\n- [X] New and existing unit tests pass locally with my changes\r\n","created_at":"2019-02-14T00:32:45Z","updated_at":"2019-02-14T20:08:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7abb6b486780d7f1f603ad772e92218260c54ecb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/pulls/1935/commits","review_comments_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/pulls/1935/comments","review_comment_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/issues/1935/comments","statuses_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/statuses/0463a79a4de02b244f49b8c9f3f395adda8f90a0","head":{"label":"chanzuckerberg:save-vis-2","ref":"save-vis-2","sha":"0463a79a4de02b244f49b8c9f3f395adda8f90a0","user":{"login":"chanzuckerberg","id":19917299,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5OTE3Mjk5","avatar_url":"https://avatars2.githubusercontent.com/u/19917299?v=4","gravatar_id":"","url":"https://api.github.com/users/chanzuckerberg","html_url":"https://github.com/chanzuckerberg","followers_url":"https://api.github.com/users/chanzuckerberg/followers","following_url":"https://api.github.com/users/chanzuckerberg/following{/other_user}","gists_url":"https://api.github.com/users/chanzuckerberg/gists{/gist_id}","starred_url":"https://api.github.com/users/chanzuckerberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chanzuckerberg/subscriptions","organizations_url":"https://api.github.com/users/chanzuckerberg/orgs","repos_url":"https://api.github.com/users/chanzuckerberg/repos","events_url":"https://api.github.com/users/chanzuckerberg/events{/privacy}","received_events_url":"https://api.github.com/users/chanzuckerberg/received_events","type":"Organization","site_admin":false},"repo":{"id":99148438,"node_id":"MDEwOlJlcG9zaXRvcnk5OTE0ODQzOA==","name":"idseq-web","full_name":"chanzuckerberg/idseq-web","private":false,"owner":{"login":"chanzuckerberg","id":19917299,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5OTE3Mjk5","avatar_url":"https://avatars2.githubusercontent.com/u/19917299?v=4","gravatar_id":"","url":"https://api.github.com/users/chanzuckerberg","html_url":"https://github.com/chanzuckerberg","followers_url":"https://api.github.com/users/chanzuckerberg/followers","following_url":"https://api.github.com/users/chanzuckerberg/following{/other_user}","gists_url":"https://api.github.com/users/chanzuckerberg/gists{/gist_id}","starred_url":"https://api.github.com/users/chanzuckerberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chanzuckerberg/subscriptions","organizations_url":"https://api.github.com/users/chanzuckerberg/orgs","repos_url":"https://api.github.com/users/chanzuckerberg/repos","events_url":"https://api.github.com/users/chanzuckerberg/events{/privacy}","received_events_url":"https://api.github.com/users/chanzuckerberg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/chanzuckerberg/idseq-web","description":"Infectious Disease Sequencing Platform","fork":false,"url":"https://api.github.com/repos/chanzuckerberg/idseq-web","forks_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/forks","keys_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/teams","hooks_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/hooks","issue_events_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/issues/events{/number}","events_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/events","assignees_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/assignees{/user}","branches_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/branches{/branch}","tags_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/tags","blobs_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/statuses/{sha}","languages_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/languages","stargazers_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/stargazers","contributors_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/contributors","subscribers_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/subscribers","subscription_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/subscription","commits_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/contents/{+path}","compare_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/merges","archive_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/downloads","issues_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/issues{/number}","pulls_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/pulls{/number}","milestones_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/milestones{/number}","notifications_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/labels{/name}","releases_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/releases{/id}","deployments_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/deployments","created_at":"2017-08-02T18:24:03Z","updated_at":"2019-02-14T19:27:36Z","pushed_at":"2019-02-14T19:27:33Z","git_url":"git://github.com/chanzuckerberg/idseq-web.git","ssh_url":"git@github.com:chanzuckerberg/idseq-web.git","clone_url":"https://github.com/chanzuckerberg/idseq-web.git","svn_url":"https://github.com/chanzuckerberg/idseq-web","homepage":"https://idseq.net/","size":9797,"stargazers_count":17,"watchers_count":17,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":2,"watchers":17,"default_branch":"master"}},"base":{"label":"chanzuckerberg:gdingle/save-vis","ref":"gdingle/save-vis","sha":"7b45629443ffea6c0116e8225e4dee7ec0d6fcc0","user":{"login":"chanzuckerberg","id":19917299,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5OTE3Mjk5","avatar_url":"https://avatars2.githubusercontent.com/u/19917299?v=4","gravatar_id":"","url":"https://api.github.com/users/chanzuckerberg","html_url":"https://github.com/chanzuckerberg","followers_url":"https://api.github.com/users/chanzuckerberg/followers","following_url":"https://api.github.com/users/chanzuckerberg/following{/other_user}","gists_url":"https://api.github.com/users/chanzuckerberg/gists{/gist_id}","starred_url":"https://api.github.com/users/chanzuckerberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chanzuckerberg/subscriptions","organizations_url":"https://api.github.com/users/chanzuckerberg/orgs","repos_url":"https://api.github.com/users/chanzuckerberg/repos","events_url":"https://api.github.com/users/chanzuckerberg/events{/privacy}","received_events_url":"https://api.github.com/users/chanzuckerberg/received_events","type":"Organization","site_admin":false},"repo":{"id":99148438,"node_id":"MDEwOlJlcG9zaXRvcnk5OTE0ODQzOA==","name":"idseq-web","full_name":"chanzuckerberg/idseq-web","private":false,"owner":{"login":"chanzuckerberg","id":19917299,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5OTE3Mjk5","avatar_url":"https://avatars2.githubusercontent.com/u/19917299?v=4","gravatar_id":"","url":"https://api.github.com/users/chanzuckerberg","html_url":"https://github.com/chanzuckerberg","followers_url":"https://api.github.com/users/chanzuckerberg/followers","following_url":"https://api.github.com/users/chanzuckerberg/following{/other_user}","gists_url":"https://api.github.com/users/chanzuckerberg/gists{/gist_id}","starred_url":"https://api.github.com/users/chanzuckerberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chanzuckerberg/subscriptions","organizations_url":"https://api.github.com/users/chanzuckerberg/orgs","repos_url":"https://api.github.com/users/chanzuckerberg/repos","events_url":"https://api.github.com/users/chanzuckerberg/events{/privacy}","received_events_url":"https://api.github.com/users/chanzuckerberg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/chanzuckerberg/idseq-web","description":"Infectious Disease Sequencing Platform","fork":false,"url":"https://api.github.com/repos/chanzuckerberg/idseq-web","forks_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/forks","keys_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/teams","hooks_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/hooks","issue_events_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/issues/events{/number}","events_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/events","assignees_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/assignees{/user}","branches_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/branches{/branch}","tags_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/tags","blobs_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/statuses/{sha}","languages_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/languages","stargazers_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/stargazers","contributors_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/contributors","subscribers_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/subscribers","subscription_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/subscription","commits_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/contents/{+path}","compare_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/merges","archive_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/downloads","issues_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/issues{/number}","pulls_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/pulls{/number}","milestones_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/milestones{/number}","notifications_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/labels{/name}","releases_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/releases{/id}","deployments_url":"https://api.github.com/repos/chanzuckerberg/idseq-web/deployments","created_at":"2017-08-02T18:24:03Z","updated_at":"2019-02-14T19:27:36Z","pushed_at":"2019-02-14T19:27:33Z","git_url":"git://github.com/chanzuckerberg/idseq-web.git","ssh_url":"git@github.com:chanzuckerberg/idseq-web.git","clone_url":"https://github.com/chanzuckerberg/idseq-web.git","svn_url":"https://github.com/chanzuckerberg/idseq-web","homepage":"https://idseq.net/","size":9797,"stargazers_count":17,"watchers_count":17,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":2,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chanzuckerberg/idseq-web/pulls/1935"},"html":{"href":"https://github.com/chanzuckerberg/idseq-web/pull/1935"},"issue":{"href":"https://api.github.com/repos/chanzuckerberg/idseq-web/issues/1935"},"comments":{"href":"https://api.github.com/repos/chanzuckerberg/idseq-web/issues/1935/comments"},"review_comments":{"href":"https://api.github.com/repos/chanzuckerberg/idseq-web/pulls/1935/comments"},"review_comment":{"href":"https://api.github.com/repos/chanzuckerberg/idseq-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chanzuckerberg/idseq-web/pulls/1935/commits"},"statuses":{"href":"https://api.github.com/repos/chanzuckerberg/idseq-web/statuses/0463a79a4de02b244f49b8c9f3f395adda8f90a0"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"jshoe"}}