{"action":"created","comment":{"url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/pulls/comments/121842507","pull_request_review_id":43903141,"id":121842507,"diff_hunk":"@@ -51,6 +51,35 @@ export class SiteLogService implements OnDestroy {\n         this.unsubscribe.next();\n         this.unsubscribe.complete();\n     }\n+\n+    /**\n+     * Returns one site log defined by the fourCharacterId in ViewModel JSON format.\n+     *\n+     * @param {string} fourCharacterId - The Four Character Id of the site.\n+     * @return {object} - The Promise for the HTTP request in JSON ViewModel format\n+     */\n+    getSiteLogByFourCharacterId(fourCharacterId: string): Promise<SiteLogViewModel> {\n+        return new Promise((resolve: Function, reject: Function) => {\n+            try {\n+                this.doGetSiteLogByFourCharacterIdUsingGeodesyML(fourCharacterId)\n+                    .takeUntil(this.unsubscribe)\n+                    .subscribe(\n+                        (responseJson: any) => {\n+                            let siteLogViewModel: SiteLogViewModel = this.jsonViewModelService.dataModelToViewModel(responseJson);\n+                            resolve(siteLogViewModel);\n+                        },\n+                        (error: Error) => {\n+                            console.error('SiteLogService - Failed in fetching siteLog by FourCharacterId: ', error);\n+                            reject(null);\n+                        }\n+                    );\n+            } catch (error) {\n+                console.error('SiteLogService - Error in fetching siteLog by FourCharacterId: ', error);\n+                reject(null);\n+            }\n+        });\n+    }","path":"src/client/app/shared/site-log/site-log.service.ts","position":31,"original_position":31,"commit_id":"cec201ecafda3c26862f7ec19ee90d3a59fefe23","original_commit_id":"cec201ecafda3c26862f7ec19ee90d3a59fefe23","user":{"login":"lbodor","id":5760996,"avatar_url":"https://avatars2.githubusercontent.com/u/5760996?v=3","gravatar_id":"","url":"https://api.github.com/users/lbodor","html_url":"https://github.com/lbodor","followers_url":"https://api.github.com/users/lbodor/followers","following_url":"https://api.github.com/users/lbodor/following{/other_user}","gists_url":"https://api.github.com/users/lbodor/gists{/gist_id}","starred_url":"https://api.github.com/users/lbodor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbodor/subscriptions","organizations_url":"https://api.github.com/users/lbodor/orgs","repos_url":"https://api.github.com/users/lbodor/repos","events_url":"https://api.github.com/users/lbodor/events{/privacy}","received_events_url":"https://api.github.com/users/lbodor/received_events","type":"User","site_admin":false},"body":"Have you considered calling `toPromise()` on the observable instead of creating the promise manually?","created_at":"2017-06-14T02:39:51Z","updated_at":"2017-06-14T02:39:51Z","html_url":"https://github.com/GeoscienceAustralia/GNSS-Site-Manager/pull/473#discussion_r121842507","pull_request_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/pulls/473","_links":{"self":{"href":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/pulls/comments/121842507"},"html":{"href":"https://github.com/GeoscienceAustralia/GNSS-Site-Manager/pull/473#discussion_r121842507"},"pull_request":{"href":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/pulls/473"}}},"pull_request":{"url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/pulls/473","id":125288970,"html_url":"https://github.com/GeoscienceAustralia/GNSS-Site-Manager/pull/473","diff_url":"https://github.com/GeoscienceAustralia/GNSS-Site-Manager/pull/473.diff","patch_url":"https://github.com/GeoscienceAustralia/GNSS-Site-Manager/pull/473.patch","issue_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/issues/473","number":473,"state":"open","locked":false,"title":"Prefetch data before rendering siteLog form","user":{"login":"frankfu03","id":13516986,"avatar_url":"https://avatars3.githubusercontent.com/u/13516986?v=3","gravatar_id":"","url":"https://api.github.com/users/frankfu03","html_url":"https://github.com/frankfu03","followers_url":"https://api.github.com/users/frankfu03/followers","following_url":"https://api.github.com/users/frankfu03/following{/other_user}","gists_url":"https://api.github.com/users/frankfu03/gists{/gist_id}","starred_url":"https://api.github.com/users/frankfu03/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frankfu03/subscriptions","organizations_url":"https://api.github.com/users/frankfu03/orgs","repos_url":"https://api.github.com/users/frankfu03/repos","events_url":"https://api.github.com/users/frankfu03/events{/privacy}","received_events_url":"https://api.github.com/users/frankfu03/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-06-13T06:45:01Z","updated_at":"2017-06-14T02:39:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf858926167b78dad78a8993350d3a37bda24caa","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/pulls/473/commits","review_comments_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/pulls/473/comments","review_comment_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/issues/473/comments","statuses_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/statuses/cec201ecafda3c26862f7ec19ee90d3a59fefe23","head":{"label":"GeoscienceAustralia:prefetch-data","ref":"prefetch-data","sha":"cec201ecafda3c26862f7ec19ee90d3a59fefe23","user":{"login":"GeoscienceAustralia","id":4704285,"avatar_url":"https://avatars1.githubusercontent.com/u/4704285?v=3","gravatar_id":"","url":"https://api.github.com/users/GeoscienceAustralia","html_url":"https://github.com/GeoscienceAustralia","followers_url":"https://api.github.com/users/GeoscienceAustralia/followers","following_url":"https://api.github.com/users/GeoscienceAustralia/following{/other_user}","gists_url":"https://api.github.com/users/GeoscienceAustralia/gists{/gist_id}","starred_url":"https://api.github.com/users/GeoscienceAustralia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeoscienceAustralia/subscriptions","organizations_url":"https://api.github.com/users/GeoscienceAustralia/orgs","repos_url":"https://api.github.com/users/GeoscienceAustralia/repos","events_url":"https://api.github.com/users/GeoscienceAustralia/events{/privacy}","received_events_url":"https://api.github.com/users/GeoscienceAustralia/received_events","type":"Organization","site_admin":false},"repo":{"id":63824497,"name":"GNSS-Site-Manager","full_name":"GeoscienceAustralia/GNSS-Site-Manager","owner":{"login":"GeoscienceAustralia","id":4704285,"avatar_url":"https://avatars1.githubusercontent.com/u/4704285?v=3","gravatar_id":"","url":"https://api.github.com/users/GeoscienceAustralia","html_url":"https://github.com/GeoscienceAustralia","followers_url":"https://api.github.com/users/GeoscienceAustralia/followers","following_url":"https://api.github.com/users/GeoscienceAustralia/following{/other_user}","gists_url":"https://api.github.com/users/GeoscienceAustralia/gists{/gist_id}","starred_url":"https://api.github.com/users/GeoscienceAustralia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeoscienceAustralia/subscriptions","organizations_url":"https://api.github.com/users/GeoscienceAustralia/orgs","repos_url":"https://api.github.com/users/GeoscienceAustralia/repos","events_url":"https://api.github.com/users/GeoscienceAustralia/events{/privacy}","received_events_url":"https://api.github.com/users/GeoscienceAustralia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GeoscienceAustralia/GNSS-Site-Manager","description":"Web application for managing GNSS sites using GeodesyML","fork":false,"url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager","forks_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/forks","keys_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/teams","hooks_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/hooks","issue_events_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/issues/events{/number}","events_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/events","assignees_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/assignees{/user}","branches_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/branches{/branch}","tags_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/tags","blobs_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/statuses/{sha}","languages_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/languages","stargazers_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/stargazers","contributors_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/contributors","subscribers_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/subscribers","subscription_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/subscription","commits_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/contents/{+path}","compare_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/merges","archive_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/downloads","issues_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/issues{/number}","pulls_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/pulls{/number}","milestones_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/milestones{/number}","notifications_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/labels{/name}","releases_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/releases{/id}","deployments_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/deployments","created_at":"2016-07-21T00:46:25Z","updated_at":"2017-01-16T06:01:53Z","pushed_at":"2017-06-14T02:23:09Z","git_url":"git://github.com/GeoscienceAustralia/GNSS-Site-Manager.git","ssh_url":"git@github.com:GeoscienceAustralia/GNSS-Site-Manager.git","clone_url":"https://github.com/GeoscienceAustralia/GNSS-Site-Manager.git","svn_url":"https://github.com/GeoscienceAustralia/GNSS-Site-Manager","homepage":null,"size":11742,"stargazers_count":3,"watchers_count":3,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":3,"default_branch":"next"}},"base":{"label":"GeoscienceAustralia:next","ref":"next","sha":"9028ed76990fec1f83e5ed1068cbd86b00472831","user":{"login":"GeoscienceAustralia","id":4704285,"avatar_url":"https://avatars1.githubusercontent.com/u/4704285?v=3","gravatar_id":"","url":"https://api.github.com/users/GeoscienceAustralia","html_url":"https://github.com/GeoscienceAustralia","followers_url":"https://api.github.com/users/GeoscienceAustralia/followers","following_url":"https://api.github.com/users/GeoscienceAustralia/following{/other_user}","gists_url":"https://api.github.com/users/GeoscienceAustralia/gists{/gist_id}","starred_url":"https://api.github.com/users/GeoscienceAustralia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeoscienceAustralia/subscriptions","organizations_url":"https://api.github.com/users/GeoscienceAustralia/orgs","repos_url":"https://api.github.com/users/GeoscienceAustralia/repos","events_url":"https://api.github.com/users/GeoscienceAustralia/events{/privacy}","received_events_url":"https://api.github.com/users/GeoscienceAustralia/received_events","type":"Organization","site_admin":false},"repo":{"id":63824497,"name":"GNSS-Site-Manager","full_name":"GeoscienceAustralia/GNSS-Site-Manager","owner":{"login":"GeoscienceAustralia","id":4704285,"avatar_url":"https://avatars1.githubusercontent.com/u/4704285?v=3","gravatar_id":"","url":"https://api.github.com/users/GeoscienceAustralia","html_url":"https://github.com/GeoscienceAustralia","followers_url":"https://api.github.com/users/GeoscienceAustralia/followers","following_url":"https://api.github.com/users/GeoscienceAustralia/following{/other_user}","gists_url":"https://api.github.com/users/GeoscienceAustralia/gists{/gist_id}","starred_url":"https://api.github.com/users/GeoscienceAustralia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeoscienceAustralia/subscriptions","organizations_url":"https://api.github.com/users/GeoscienceAustralia/orgs","repos_url":"https://api.github.com/users/GeoscienceAustralia/repos","events_url":"https://api.github.com/users/GeoscienceAustralia/events{/privacy}","received_events_url":"https://api.github.com/users/GeoscienceAustralia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GeoscienceAustralia/GNSS-Site-Manager","description":"Web application for managing GNSS sites using GeodesyML","fork":false,"url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager","forks_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/forks","keys_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/teams","hooks_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/hooks","issue_events_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/issues/events{/number}","events_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/events","assignees_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/assignees{/user}","branches_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/branches{/branch}","tags_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/tags","blobs_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/statuses/{sha}","languages_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/languages","stargazers_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/stargazers","contributors_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/contributors","subscribers_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/subscribers","subscription_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/subscription","commits_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/contents/{+path}","compare_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/merges","archive_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/downloads","issues_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/issues{/number}","pulls_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/pulls{/number}","milestones_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/milestones{/number}","notifications_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/labels{/name}","releases_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/releases{/id}","deployments_url":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/deployments","created_at":"2016-07-21T00:46:25Z","updated_at":"2017-01-16T06:01:53Z","pushed_at":"2017-06-14T02:23:09Z","git_url":"git://github.com/GeoscienceAustralia/GNSS-Site-Manager.git","ssh_url":"git@github.com:GeoscienceAustralia/GNSS-Site-Manager.git","clone_url":"https://github.com/GeoscienceAustralia/GNSS-Site-Manager.git","svn_url":"https://github.com/GeoscienceAustralia/GNSS-Site-Manager","homepage":null,"size":11742,"stargazers_count":3,"watchers_count":3,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":3,"default_branch":"next"}},"_links":{"self":{"href":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/pulls/473"},"html":{"href":"https://github.com/GeoscienceAustralia/GNSS-Site-Manager/pull/473"},"issue":{"href":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/issues/473"},"comments":{"href":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/issues/473/comments"},"review_comments":{"href":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/pulls/473/comments"},"review_comment":{"href":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/pulls/473/commits"},"statuses":{"href":"https://api.github.com/repos/GeoscienceAustralia/GNSS-Site-Manager/statuses/cec201ecafda3c26862f7ec19ee90d3a59fefe23"}}}}
{"actor":{"display_login":"lbodor"}}