{"action":"created","comment":{"url":"https://api.github.com/repos/ripple/validator-registry-webapp/pulls/comments/34503400","id":34503400,"diff_hunk":"@@ -1,20 +1,70 @@\n \n angular.module('validatorsApp').factory('ValidatorsLoader',['$http', function($http) {\n \n-  var VALIDATOR_REGISTRY_API = '<%= VALIDATOR_REGISTRY_API %>'\n+  var VALIDATOR_REGISTRY_API = '<%= VALIDATOR_REGISTRY_API %>';\n+\n+  function getValidations(callback) {\n+      $http({\n+        url: VALIDATOR_REGISTRY_API+\"/validations\",\n+        method: \"GET\"\n+      }).success(function(data, status, headers, config) {\n+        callback(null, data.validations)\n+      }).error(function(data, status, headers, config) {\n+        callback(new Error(data))\n+      })\n+  }\n+\n+  function getValidators(callback) {\n+      $http({\n+        url: VALIDATOR_REGISTRY_API+\"/validators\",\n+        method: \"GET\"\n+      }).success(function(data, status, headers, config) {\n+        callback(null, data.validators)\n+      })\n+      .error(function(data, status, headers, config) {\n+        callback(new Error(data))\n+      })\n+  }\n+\n+  function reduceValidators(validators, validations) {\n+    var reduced = []\n+    validations.forEach(function(validation) {\n+      var validator = _.find(validators, function(validator) {\n+        return validator.validation_public_key === validation.validation_public_key\n+      })\n+      if (validator) {\n+        validation.domain = validator.domain\n+      }\n+      reduced.push(validation)\n+    })\n+    return reduced\n+  }\n+\n+  function sortByValidationsToday(validations) {","path":"ejs/scripts/services/validators_loader.ejs","position":44,"original_position":44,"commit_id":"c171d40f52ccf67edcab05b47acb576326dbbe1b","original_commit_id":"c171d40f52ccf67edcab05b47acb576326dbbe1b","user":{"login":"wilsonianb","id":5885521,"avatar_url":"https://avatars.githubusercontent.com/u/5885521?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonianb","html_url":"https://github.com/wilsonianb","followers_url":"https://api.github.com/users/wilsonianb/followers","following_url":"https://api.github.com/users/wilsonianb/following{/other_user}","gists_url":"https://api.github.com/users/wilsonianb/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonianb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonianb/subscriptions","organizations_url":"https://api.github.com/users/wilsonianb/orgs","repos_url":"https://api.github.com/users/wilsonianb/repos","events_url":"https://api.github.com/users/wilsonianb/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonianb/received_events","type":"User","site_admin":false},"body":"Maybe rename to `sortByValidations` since we will allow date/time parameters for GET /validations","created_at":"2015-07-13T19:48:35Z","updated_at":"2015-07-13T19:48:35Z","html_url":"https://github.com/ripple/validator-registry-webapp/pull/9#discussion_r34503400","pull_request_url":"https://api.github.com/repos/ripple/validator-registry-webapp/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/ripple/validator-registry-webapp/pulls/comments/34503400"},"html":{"href":"https://github.com/ripple/validator-registry-webapp/pull/9#discussion_r34503400"},"pull_request":{"href":"https://api.github.com/repos/ripple/validator-registry-webapp/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/ripple/validator-registry-webapp/pulls/9","id":39840200,"html_url":"https://github.com/ripple/validator-registry-webapp/pull/9","diff_url":"https://github.com/ripple/validator-registry-webapp/pull/9.diff","patch_url":"https://github.com/ripple/validator-registry-webapp/pull/9.patch","issue_url":"https://api.github.com/repos/ripple/validator-registry-webapp/issues/9","number":9,"state":"open","locked":false,"title":"[TASK] Load data from /validations and /validators","user":{"login":"stevenzeiler","id":508282,"avatar_url":"https://avatars.githubusercontent.com/u/508282?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenzeiler","html_url":"https://github.com/stevenzeiler","followers_url":"https://api.github.com/users/stevenzeiler/followers","following_url":"https://api.github.com/users/stevenzeiler/following{/other_user}","gists_url":"https://api.github.com/users/stevenzeiler/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenzeiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenzeiler/subscriptions","organizations_url":"https://api.github.com/users/stevenzeiler/orgs","repos_url":"https://api.github.com/users/stevenzeiler/repos","events_url":"https://api.github.com/users/stevenzeiler/events{/privacy}","received_events_url":"https://api.github.com/users/stevenzeiler/received_events","type":"User","site_admin":false},"body":"DEC-451\r\nDEC-436","created_at":"2015-07-13T18:17:49Z","updated_at":"2015-07-13T19:48:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f5d073af988ffc76920c8113bf151e5ae0986e9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ripple/validator-registry-webapp/pulls/9/commits","review_comments_url":"https://api.github.com/repos/ripple/validator-registry-webapp/pulls/9/comments","review_comment_url":"https://api.github.com/repos/ripple/validator-registry-webapp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ripple/validator-registry-webapp/issues/9/comments","statuses_url":"https://api.github.com/repos/ripple/validator-registry-webapp/statuses/c171d40f52ccf67edcab05b47acb576326dbbe1b","head":{"label":"ripple:fix/remove-deprecated-metadata","ref":"fix/remove-deprecated-metadata","sha":"c171d40f52ccf67edcab05b47acb576326dbbe1b","user":{"login":"ripple","id":3165523,"avatar_url":"https://avatars.githubusercontent.com/u/3165523?v=3","gravatar_id":"","url":"https://api.github.com/users/ripple","html_url":"https://github.com/ripple","followers_url":"https://api.github.com/users/ripple/followers","following_url":"https://api.github.com/users/ripple/following{/other_user}","gists_url":"https://api.github.com/users/ripple/gists{/gist_id}","starred_url":"https://api.github.com/users/ripple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ripple/subscriptions","organizations_url":"https://api.github.com/users/ripple/orgs","repos_url":"https://api.github.com/users/ripple/repos","events_url":"https://api.github.com/users/ripple/events{/privacy}","received_events_url":"https://api.github.com/users/ripple/received_events","type":"Organization","site_admin":false},"repo":{"id":37743275,"name":"validator-registry-webapp","full_name":"ripple/validator-registry-webapp","owner":{"login":"ripple","id":3165523,"avatar_url":"https://avatars.githubusercontent.com/u/3165523?v=3","gravatar_id":"","url":"https://api.github.com/users/ripple","html_url":"https://github.com/ripple","followers_url":"https://api.github.com/users/ripple/followers","following_url":"https://api.github.com/users/ripple/following{/other_user}","gists_url":"https://api.github.com/users/ripple/gists{/gist_id}","starred_url":"https://api.github.com/users/ripple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ripple/subscriptions","organizations_url":"https://api.github.com/users/ripple/orgs","repos_url":"https://api.github.com/users/ripple/repos","events_url":"https://api.github.com/users/ripple/events{/privacy}","received_events_url":"https://api.github.com/users/ripple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ripple/validator-registry-webapp","description":"Angular JS web application","fork":false,"url":"https://api.github.com/repos/ripple/validator-registry-webapp","forks_url":"https://api.github.com/repos/ripple/validator-registry-webapp/forks","keys_url":"https://api.github.com/repos/ripple/validator-registry-webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ripple/validator-registry-webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ripple/validator-registry-webapp/teams","hooks_url":"https://api.github.com/repos/ripple/validator-registry-webapp/hooks","issue_events_url":"https://api.github.com/repos/ripple/validator-registry-webapp/issues/events{/number}","events_url":"https://api.github.com/repos/ripple/validator-registry-webapp/events","assignees_url":"https://api.github.com/repos/ripple/validator-registry-webapp/assignees{/user}","branches_url":"https://api.github.com/repos/ripple/validator-registry-webapp/branches{/branch}","tags_url":"https://api.github.com/repos/ripple/validator-registry-webapp/tags","blobs_url":"https://api.github.com/repos/ripple/validator-registry-webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ripple/validator-registry-webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ripple/validator-registry-webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ripple/validator-registry-webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ripple/validator-registry-webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/ripple/validator-registry-webapp/languages","stargazers_url":"https://api.github.com/repos/ripple/validator-registry-webapp/stargazers","contributors_url":"https://api.github.com/repos/ripple/validator-registry-webapp/contributors","subscribers_url":"https://api.github.com/repos/ripple/validator-registry-webapp/subscribers","subscription_url":"https://api.github.com/repos/ripple/validator-registry-webapp/subscription","commits_url":"https://api.github.com/repos/ripple/validator-registry-webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ripple/validator-registry-webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ripple/validator-registry-webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ripple/validator-registry-webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/ripple/validator-registry-webapp/contents/{+path}","compare_url":"https://api.github.com/repos/ripple/validator-registry-webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ripple/validator-registry-webapp/merges","archive_url":"https://api.github.com/repos/ripple/validator-registry-webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ripple/validator-registry-webapp/downloads","issues_url":"https://api.github.com/repos/ripple/validator-registry-webapp/issues{/number}","pulls_url":"https://api.github.com/repos/ripple/validator-registry-webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/ripple/validator-registry-webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/ripple/validator-registry-webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ripple/validator-registry-webapp/labels{/name}","releases_url":"https://api.github.com/repos/ripple/validator-registry-webapp/releases{/id}","created_at":"2015-06-19T20:04:14Z","updated_at":"2015-07-03T05:01:34Z","pushed_at":"2015-07-13T19:42:18Z","git_url":"git://github.com/ripple/validator-registry-webapp.git","ssh_url":"git@github.com:ripple/validator-registry-webapp.git","clone_url":"https://github.com/ripple/validator-registry-webapp.git","svn_url":"https://github.com/ripple/validator-registry-webapp","homepage":"https://validators-ripple-ui.herokuapp.com","size":1716,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ripple:staging","ref":"staging","sha":"7ed4365a1f52f0e61b8cce852811c8edcdb26605","user":{"login":"ripple","id":3165523,"avatar_url":"https://avatars.githubusercontent.com/u/3165523?v=3","gravatar_id":"","url":"https://api.github.com/users/ripple","html_url":"https://github.com/ripple","followers_url":"https://api.github.com/users/ripple/followers","following_url":"https://api.github.com/users/ripple/following{/other_user}","gists_url":"https://api.github.com/users/ripple/gists{/gist_id}","starred_url":"https://api.github.com/users/ripple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ripple/subscriptions","organizations_url":"https://api.github.com/users/ripple/orgs","repos_url":"https://api.github.com/users/ripple/repos","events_url":"https://api.github.com/users/ripple/events{/privacy}","received_events_url":"https://api.github.com/users/ripple/received_events","type":"Organization","site_admin":false},"repo":{"id":37743275,"name":"validator-registry-webapp","full_name":"ripple/validator-registry-webapp","owner":{"login":"ripple","id":3165523,"avatar_url":"https://avatars.githubusercontent.com/u/3165523?v=3","gravatar_id":"","url":"https://api.github.com/users/ripple","html_url":"https://github.com/ripple","followers_url":"https://api.github.com/users/ripple/followers","following_url":"https://api.github.com/users/ripple/following{/other_user}","gists_url":"https://api.github.com/users/ripple/gists{/gist_id}","starred_url":"https://api.github.com/users/ripple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ripple/subscriptions","organizations_url":"https://api.github.com/users/ripple/orgs","repos_url":"https://api.github.com/users/ripple/repos","events_url":"https://api.github.com/users/ripple/events{/privacy}","received_events_url":"https://api.github.com/users/ripple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ripple/validator-registry-webapp","description":"Angular JS web application","fork":false,"url":"https://api.github.com/repos/ripple/validator-registry-webapp","forks_url":"https://api.github.com/repos/ripple/validator-registry-webapp/forks","keys_url":"https://api.github.com/repos/ripple/validator-registry-webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ripple/validator-registry-webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ripple/validator-registry-webapp/teams","hooks_url":"https://api.github.com/repos/ripple/validator-registry-webapp/hooks","issue_events_url":"https://api.github.com/repos/ripple/validator-registry-webapp/issues/events{/number}","events_url":"https://api.github.com/repos/ripple/validator-registry-webapp/events","assignees_url":"https://api.github.com/repos/ripple/validator-registry-webapp/assignees{/user}","branches_url":"https://api.github.com/repos/ripple/validator-registry-webapp/branches{/branch}","tags_url":"https://api.github.com/repos/ripple/validator-registry-webapp/tags","blobs_url":"https://api.github.com/repos/ripple/validator-registry-webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ripple/validator-registry-webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ripple/validator-registry-webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ripple/validator-registry-webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ripple/validator-registry-webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/ripple/validator-registry-webapp/languages","stargazers_url":"https://api.github.com/repos/ripple/validator-registry-webapp/stargazers","contributors_url":"https://api.github.com/repos/ripple/validator-registry-webapp/contributors","subscribers_url":"https://api.github.com/repos/ripple/validator-registry-webapp/subscribers","subscription_url":"https://api.github.com/repos/ripple/validator-registry-webapp/subscription","commits_url":"https://api.github.com/repos/ripple/validator-registry-webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ripple/validator-registry-webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ripple/validator-registry-webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ripple/validator-registry-webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/ripple/validator-registry-webapp/contents/{+path}","compare_url":"https://api.github.com/repos/ripple/validator-registry-webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ripple/validator-registry-webapp/merges","archive_url":"https://api.github.com/repos/ripple/validator-registry-webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ripple/validator-registry-webapp/downloads","issues_url":"https://api.github.com/repos/ripple/validator-registry-webapp/issues{/number}","pulls_url":"https://api.github.com/repos/ripple/validator-registry-webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/ripple/validator-registry-webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/ripple/validator-registry-webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ripple/validator-registry-webapp/labels{/name}","releases_url":"https://api.github.com/repos/ripple/validator-registry-webapp/releases{/id}","created_at":"2015-06-19T20:04:14Z","updated_at":"2015-07-03T05:01:34Z","pushed_at":"2015-07-13T19:42:18Z","git_url":"git://github.com/ripple/validator-registry-webapp.git","ssh_url":"git@github.com:ripple/validator-registry-webapp.git","clone_url":"https://github.com/ripple/validator-registry-webapp.git","svn_url":"https://github.com/ripple/validator-registry-webapp","homepage":"https://validators-ripple-ui.herokuapp.com","size":1716,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ripple/validator-registry-webapp/pulls/9"},"html":{"href":"https://github.com/ripple/validator-registry-webapp/pull/9"},"issue":{"href":"https://api.github.com/repos/ripple/validator-registry-webapp/issues/9"},"comments":{"href":"https://api.github.com/repos/ripple/validator-registry-webapp/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/ripple/validator-registry-webapp/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/ripple/validator-registry-webapp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ripple/validator-registry-webapp/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/ripple/validator-registry-webapp/statuses/c171d40f52ccf67edcab05b47acb576326dbbe1b"}}}}