{"action":"created","comment":{"url":"https://api.github.com/repos/greenelab/adage-server/pulls/comments/141669293","pull_request_review_id":65920719,"id":141669293,"diff_hunk":"@@ -0,0 +1,69 @@\n+angular.module('adage.experiment', [\n+  'adage.experiment.service',\n+  'adage.analyze.sample',   // TODO fix after Sample is also refactored\n+  'statusBar'\n+])\n+\n+.component('experimentDetail', {\n+  templateUrl: 'experiment/experiment.component.tpl.html',\n+  bindings: {\n+    id: '<'\n+  },\n+  controller: [\n+    'Experiment', 'Sample', '$log',\n+    function(Experiment, Sample, $log) {\n+      var ctrl = this;\n+\n+      ctrl.$onChanges = function(changesObj) {\n+        ctrl.show(changesObj.id.currentValue);\n+      };\n+      ctrl.makeHref = Experiment.makeHref;\n+      ctrl.experiment = {\n+        status: '',\n+        relatedSamples: []\n+      };\n+\n+      var queryError = function(responseObject, responseHeaders) {\n+        $log.warn('Query errored with: ' + responseObject);\n+        ctrl.experiment.status = 'Query failed.';\n+      };\n+\n+      ctrl.show = function(id) {\n+        if (!id) {\n+          $log.warn('experiment.show called with id', id);\n+          return;\n+        }\n+        ctrl.experiment = {\n+          status: 'retrieving...',\n+          relatedSamples: []\n+        };\n+        var getSampleDetails = function(uri) {\n+          Sample.getUri(uri).then(\n+            function(responseObject) {\n+              if (responseObject) {\n+                ctrl.experiment.status = '';\n+                ctrl.experiment.relatedSamples.push(responseObject.data);\n+              }\n+            },\n+            queryError\n+          );\n+        };\n+        Experiment.get(\n+          {accession: id},\n+          function(responseObject, responseHeaders) {\n+            if (responseObject) {\n+              ctrl.experiment.results = responseObject;\n+              ctrl.experiment.status = 'Retrieving sample details...';\n+              for (var i = 0; i < responseObject.sample_set.length; i++) {\n+                getSampleDetails(responseObject.sample_set[i]);\n+              }","path":"interface/src/app/experiment/experiment.component.js","position":59,"original_position":59,"commit_id":"6aaf44df508571d3c361549156ae95a37f14c615","original_commit_id":"4ec454d7a37109b7aafd8fae6afcbde052533e08","user":{"login":"mhuyck","id":1151166,"avatar_url":"https://avatars1.githubusercontent.com/u/1151166?v=4","gravatar_id":"","url":"https://api.github.com/users/mhuyck","html_url":"https://github.com/mhuyck","followers_url":"https://api.github.com/users/mhuyck/followers","following_url":"https://api.github.com/users/mhuyck/following{/other_user}","gists_url":"https://api.github.com/users/mhuyck/gists{/gist_id}","starred_url":"https://api.github.com/users/mhuyck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhuyck/subscriptions","organizations_url":"https://api.github.com/users/mhuyck/orgs","repos_url":"https://api.github.com/users/mhuyck/repos","events_url":"https://api.github.com/users/mhuyck/events{/privacy}","received_events_url":"https://api.github.com/users/mhuyck/received_events","type":"User","site_admin":false},"body":"I think I wrote this bit of code before I knew about `forEach()`. Progress!","created_at":"2017-09-28T16:29:09Z","updated_at":"2017-09-28T16:29:09Z","html_url":"https://github.com/greenelab/adage-server/pull/269#discussion_r141669293","pull_request_url":"https://api.github.com/repos/greenelab/adage-server/pulls/269","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/greenelab/adage-server/pulls/comments/141669293"},"html":{"href":"https://github.com/greenelab/adage-server/pull/269#discussion_r141669293"},"pull_request":{"href":"https://api.github.com/repos/greenelab/adage-server/pulls/269"}},"in_reply_to_id":141658978},"pull_request":{"url":"https://api.github.com/repos/greenelab/adage-server/pulls/269","id":143661881,"html_url":"https://github.com/greenelab/adage-server/pull/269","diff_url":"https://github.com/greenelab/adage-server/pull/269.diff","patch_url":"https://github.com/greenelab/adage-server/pull/269.patch","issue_url":"https://api.github.com/repos/greenelab/adage-server/issues/269","number":269,"state":"open","locked":false,"title":"WIP: Refactor experiment into a reusable component","user":{"login":"mhuyck","id":1151166,"avatar_url":"https://avatars1.githubusercontent.com/u/1151166?v=4","gravatar_id":"","url":"https://api.github.com/users/mhuyck","html_url":"https://github.com/mhuyck","followers_url":"https://api.github.com/users/mhuyck/followers","following_url":"https://api.github.com/users/mhuyck/following{/other_user}","gists_url":"https://api.github.com/users/mhuyck/gists{/gist_id}","starred_url":"https://api.github.com/users/mhuyck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhuyck/subscriptions","organizations_url":"https://api.github.com/users/mhuyck/orgs","repos_url":"https://api.github.com/users/mhuyck/repos","events_url":"https://api.github.com/users/mhuyck/events{/privacy}","received_events_url":"https://api.github.com/users/mhuyck/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-09-28T14:21:51Z","updated_at":"2017-09-28T16:29:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc2c18b6c106b3cc5da177d2369d1cf5416ae848","assignee":{"login":"mhuyck","id":1151166,"avatar_url":"https://avatars1.githubusercontent.com/u/1151166?v=4","gravatar_id":"","url":"https://api.github.com/users/mhuyck","html_url":"https://github.com/mhuyck","followers_url":"https://api.github.com/users/mhuyck/followers","following_url":"https://api.github.com/users/mhuyck/following{/other_user}","gists_url":"https://api.github.com/users/mhuyck/gists{/gist_id}","starred_url":"https://api.github.com/users/mhuyck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhuyck/subscriptions","organizations_url":"https://api.github.com/users/mhuyck/orgs","repos_url":"https://api.github.com/users/mhuyck/repos","events_url":"https://api.github.com/users/mhuyck/events{/privacy}","received_events_url":"https://api.github.com/users/mhuyck/received_events","type":"User","site_admin":false},"assignees":[{"login":"mhuyck","id":1151166,"avatar_url":"https://avatars1.githubusercontent.com/u/1151166?v=4","gravatar_id":"","url":"https://api.github.com/users/mhuyck","html_url":"https://github.com/mhuyck","followers_url":"https://api.github.com/users/mhuyck/followers","following_url":"https://api.github.com/users/mhuyck/following{/other_user}","gists_url":"https://api.github.com/users/mhuyck/gists{/gist_id}","starred_url":"https://api.github.com/users/mhuyck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhuyck/subscriptions","organizations_url":"https://api.github.com/users/mhuyck/orgs","repos_url":"https://api.github.com/users/mhuyck/repos","events_url":"https://api.github.com/users/mhuyck/events{/privacy}","received_events_url":"https://api.github.com/users/mhuyck/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"rzelayafavila","id":4641983,"avatar_url":"https://avatars2.githubusercontent.com/u/4641983?v=4","gravatar_id":"","url":"https://api.github.com/users/rzelayafavila","html_url":"https://github.com/rzelayafavila","followers_url":"https://api.github.com/users/rzelayafavila/followers","following_url":"https://api.github.com/users/rzelayafavila/following{/other_user}","gists_url":"https://api.github.com/users/rzelayafavila/gists{/gist_id}","starred_url":"https://api.github.com/users/rzelayafavila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rzelayafavila/subscriptions","organizations_url":"https://api.github.com/users/rzelayafavila/orgs","repos_url":"https://api.github.com/users/rzelayafavila/repos","events_url":"https://api.github.com/users/rzelayafavila/events{/privacy}","received_events_url":"https://api.github.com/users/rzelayafavila/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/greenelab/adage-server/pulls/269/commits","review_comments_url":"https://api.github.com/repos/greenelab/adage-server/pulls/269/comments","review_comment_url":"https://api.github.com/repos/greenelab/adage-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/greenelab/adage-server/issues/269/comments","statuses_url":"https://api.github.com/repos/greenelab/adage-server/statuses/6aaf44df508571d3c361549156ae95a37f14c615","head":{"label":"mhuyck:rfct-experiment","ref":"rfct-experiment","sha":"6aaf44df508571d3c361549156ae95a37f14c615","user":{"login":"mhuyck","id":1151166,"avatar_url":"https://avatars1.githubusercontent.com/u/1151166?v=4","gravatar_id":"","url":"https://api.github.com/users/mhuyck","html_url":"https://github.com/mhuyck","followers_url":"https://api.github.com/users/mhuyck/followers","following_url":"https://api.github.com/users/mhuyck/following{/other_user}","gists_url":"https://api.github.com/users/mhuyck/gists{/gist_id}","starred_url":"https://api.github.com/users/mhuyck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhuyck/subscriptions","organizations_url":"https://api.github.com/users/mhuyck/orgs","repos_url":"https://api.github.com/users/mhuyck/repos","events_url":"https://api.github.com/users/mhuyck/events{/privacy}","received_events_url":"https://api.github.com/users/mhuyck/received_events","type":"User","site_admin":false},"repo":{"id":67185890,"name":"adage-server","full_name":"mhuyck/adage-server","owner":{"login":"mhuyck","id":1151166,"avatar_url":"https://avatars1.githubusercontent.com/u/1151166?v=4","gravatar_id":"","url":"https://api.github.com/users/mhuyck","html_url":"https://github.com/mhuyck","followers_url":"https://api.github.com/users/mhuyck/followers","following_url":"https://api.github.com/users/mhuyck/following{/other_user}","gists_url":"https://api.github.com/users/mhuyck/gists{/gist_id}","starred_url":"https://api.github.com/users/mhuyck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhuyck/subscriptions","organizations_url":"https://api.github.com/users/mhuyck/orgs","repos_url":"https://api.github.com/users/mhuyck/repos","events_url":"https://api.github.com/users/mhuyck/events{/privacy}","received_events_url":"https://api.github.com/users/mhuyck/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mhuyck/adage-server","description":null,"fork":true,"url":"https://api.github.com/repos/mhuyck/adage-server","forks_url":"https://api.github.com/repos/mhuyck/adage-server/forks","keys_url":"https://api.github.com/repos/mhuyck/adage-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mhuyck/adage-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mhuyck/adage-server/teams","hooks_url":"https://api.github.com/repos/mhuyck/adage-server/hooks","issue_events_url":"https://api.github.com/repos/mhuyck/adage-server/issues/events{/number}","events_url":"https://api.github.com/repos/mhuyck/adage-server/events","assignees_url":"https://api.github.com/repos/mhuyck/adage-server/assignees{/user}","branches_url":"https://api.github.com/repos/mhuyck/adage-server/branches{/branch}","tags_url":"https://api.github.com/repos/mhuyck/adage-server/tags","blobs_url":"https://api.github.com/repos/mhuyck/adage-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mhuyck/adage-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mhuyck/adage-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/mhuyck/adage-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mhuyck/adage-server/statuses/{sha}","languages_url":"https://api.github.com/repos/mhuyck/adage-server/languages","stargazers_url":"https://api.github.com/repos/mhuyck/adage-server/stargazers","contributors_url":"https://api.github.com/repos/mhuyck/adage-server/contributors","subscribers_url":"https://api.github.com/repos/mhuyck/adage-server/subscribers","subscription_url":"https://api.github.com/repos/mhuyck/adage-server/subscription","commits_url":"https://api.github.com/repos/mhuyck/adage-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/mhuyck/adage-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/mhuyck/adage-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/mhuyck/adage-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/mhuyck/adage-server/contents/{+path}","compare_url":"https://api.github.com/repos/mhuyck/adage-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mhuyck/adage-server/merges","archive_url":"https://api.github.com/repos/mhuyck/adage-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mhuyck/adage-server/downloads","issues_url":"https://api.github.com/repos/mhuyck/adage-server/issues{/number}","pulls_url":"https://api.github.com/repos/mhuyck/adage-server/pulls{/number}","milestones_url":"https://api.github.com/repos/mhuyck/adage-server/milestones{/number}","notifications_url":"https://api.github.com/repos/mhuyck/adage-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mhuyck/adage-server/labels{/name}","releases_url":"https://api.github.com/repos/mhuyck/adage-server/releases{/id}","deployments_url":"https://api.github.com/repos/mhuyck/adage-server/deployments","created_at":"2016-09-02T03:14:35Z","updated_at":"2017-02-03T16:20:30Z","pushed_at":"2017-09-28T16:16:17Z","git_url":"git://github.com/mhuyck/adage-server.git","ssh_url":"git@github.com:mhuyck/adage-server.git","clone_url":"https://github.com/mhuyck/adage-server.git","svn_url":"https://github.com/mhuyck/adage-server","homepage":null,"size":76341,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"greenelab:master","ref":"master","sha":"e4a3c8785837a4f84641f21aba8c3fff0dde4c22","user":{"login":"greenelab","id":9607754,"avatar_url":"https://avatars1.githubusercontent.com/u/9607754?v=4","gravatar_id":"","url":"https://api.github.com/users/greenelab","html_url":"https://github.com/greenelab","followers_url":"https://api.github.com/users/greenelab/followers","following_url":"https://api.github.com/users/greenelab/following{/other_user}","gists_url":"https://api.github.com/users/greenelab/gists{/gist_id}","starred_url":"https://api.github.com/users/greenelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenelab/subscriptions","organizations_url":"https://api.github.com/users/greenelab/orgs","repos_url":"https://api.github.com/users/greenelab/repos","events_url":"https://api.github.com/users/greenelab/events{/privacy}","received_events_url":"https://api.github.com/users/greenelab/received_events","type":"Organization","site_admin":false},"repo":{"id":67157395,"name":"adage-server","full_name":"greenelab/adage-server","owner":{"login":"greenelab","id":9607754,"avatar_url":"https://avatars1.githubusercontent.com/u/9607754?v=4","gravatar_id":"","url":"https://api.github.com/users/greenelab","html_url":"https://github.com/greenelab","followers_url":"https://api.github.com/users/greenelab/followers","following_url":"https://api.github.com/users/greenelab/following{/other_user}","gists_url":"https://api.github.com/users/greenelab/gists{/gist_id}","starred_url":"https://api.github.com/users/greenelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenelab/subscriptions","organizations_url":"https://api.github.com/users/greenelab/orgs","repos_url":"https://api.github.com/users/greenelab/repos","events_url":"https://api.github.com/users/greenelab/events{/privacy}","received_events_url":"https://api.github.com/users/greenelab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/greenelab/adage-server","description":"Webserver for ADAGE models.","fork":false,"url":"https://api.github.com/repos/greenelab/adage-server","forks_url":"https://api.github.com/repos/greenelab/adage-server/forks","keys_url":"https://api.github.com/repos/greenelab/adage-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/greenelab/adage-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/greenelab/adage-server/teams","hooks_url":"https://api.github.com/repos/greenelab/adage-server/hooks","issue_events_url":"https://api.github.com/repos/greenelab/adage-server/issues/events{/number}","events_url":"https://api.github.com/repos/greenelab/adage-server/events","assignees_url":"https://api.github.com/repos/greenelab/adage-server/assignees{/user}","branches_url":"https://api.github.com/repos/greenelab/adage-server/branches{/branch}","tags_url":"https://api.github.com/repos/greenelab/adage-server/tags","blobs_url":"https://api.github.com/repos/greenelab/adage-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/greenelab/adage-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/greenelab/adage-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/greenelab/adage-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/greenelab/adage-server/statuses/{sha}","languages_url":"https://api.github.com/repos/greenelab/adage-server/languages","stargazers_url":"https://api.github.com/repos/greenelab/adage-server/stargazers","contributors_url":"https://api.github.com/repos/greenelab/adage-server/contributors","subscribers_url":"https://api.github.com/repos/greenelab/adage-server/subscribers","subscription_url":"https://api.github.com/repos/greenelab/adage-server/subscription","commits_url":"https://api.github.com/repos/greenelab/adage-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/greenelab/adage-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/greenelab/adage-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/greenelab/adage-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/greenelab/adage-server/contents/{+path}","compare_url":"https://api.github.com/repos/greenelab/adage-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/greenelab/adage-server/merges","archive_url":"https://api.github.com/repos/greenelab/adage-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/greenelab/adage-server/downloads","issues_url":"https://api.github.com/repos/greenelab/adage-server/issues{/number}","pulls_url":"https://api.github.com/repos/greenelab/adage-server/pulls{/number}","milestones_url":"https://api.github.com/repos/greenelab/adage-server/milestones{/number}","notifications_url":"https://api.github.com/repos/greenelab/adage-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/greenelab/adage-server/labels{/name}","releases_url":"https://api.github.com/repos/greenelab/adage-server/releases{/id}","deployments_url":"https://api.github.com/repos/greenelab/adage-server/deployments","created_at":"2016-09-01T18:46:19Z","updated_at":"2017-04-14T20:20:26Z","pushed_at":"2017-09-28T16:16:18Z","git_url":"git://github.com/greenelab/adage-server.git","ssh_url":"git@github.com:greenelab/adage-server.git","clone_url":"https://github.com/greenelab/adage-server.git","svn_url":"https://github.com/greenelab/adage-server","homepage":"http://adage.greenelab.com","size":76352,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":80,"forks":7,"open_issues":80,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/greenelab/adage-server/pulls/269"},"html":{"href":"https://github.com/greenelab/adage-server/pull/269"},"issue":{"href":"https://api.github.com/repos/greenelab/adage-server/issues/269"},"comments":{"href":"https://api.github.com/repos/greenelab/adage-server/issues/269/comments"},"review_comments":{"href":"https://api.github.com/repos/greenelab/adage-server/pulls/269/comments"},"review_comment":{"href":"https://api.github.com/repos/greenelab/adage-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/greenelab/adage-server/pulls/269/commits"},"statuses":{"href":"https://api.github.com/repos/greenelab/adage-server/statuses/6aaf44df508571d3c361549156ae95a37f14c615"}},"author_association":"OWNER"}}
{"actor":{"display_login":"mhuyck"}}