{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin-web-console/pulls/comments/67738518","id":67738518,"diff_hunk":"@@ -188,7 +188,48 @@ angular.module('openshiftConsole')\n       $scope.childServicesByParent[parentName].push(child);\n     };\n \n+    // Assign each service a score for sorting. Services with routes or app\n+    // labels are considered more important.\n+    var scoreService = function(service) {\n+      var score = 0;\n+      var name = _.get(service, 'metadata.name', '');\n+      var routes = _.get($scope, ['routesByService', name], []);\n+      var childServices = _.get($scope, ['childServicesByParent', name], []);\n+\n+      if (!_.isEmpty(routes)) {\n+        score += 5;\n+      }\n+\n+      if (_.has(service, 'metadata.labels.app')) {\n+        score += 3;\n+      }\n+\n+      if (!_.isEmpty(childServices)) {\n+        score += 1;\n+      }\n+\n+      if (ServicesService.isInfrastructure(service)) {\n+        score -= 5;","path":"app/scripts/controllers/overview.js","position":34,"original_position":34,"commit_id":"2726128c9faa0c3b093ecf85817b4871b2c0a8d7","original_commit_id":"2726128c9faa0c3b093ecf85817b4871b2c0a8d7","user":{"login":"jwforres","id":1467629,"avatar_url":"https://avatars.githubusercontent.com/u/1467629?v=3","gravatar_id":"","url":"https://api.github.com/users/jwforres","html_url":"https://github.com/jwforres","followers_url":"https://api.github.com/users/jwforres/followers","following_url":"https://api.github.com/users/jwforres/following{/other_user}","gists_url":"https://api.github.com/users/jwforres/gists{/gist_id}","starred_url":"https://api.github.com/users/jwforres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwforres/subscriptions","organizations_url":"https://api.github.com/users/jwforres/orgs","repos_url":"https://api.github.com/users/jwforres/repos","events_url":"https://api.github.com/users/jwforres/events{/privacy}","received_events_url":"https://api.github.com/users/jwforres/received_events","type":"User","site_admin":false},"body":"should this be -9 ?  would I want infrastructure stuff to appear above a service that didn't have a route?\r\n\r\n@smarterclayton opinion?","created_at":"2016-06-20T18:13:06Z","updated_at":"2016-06-20T18:13:06Z","html_url":"https://github.com/openshift/origin-web-console/pull/72#discussion_r67738518","pull_request_url":"https://api.github.com/repos/openshift/origin-web-console/pulls/72","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin-web-console/pulls/comments/67738518"},"html":{"href":"https://github.com/openshift/origin-web-console/pull/72#discussion_r67738518"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin-web-console/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin-web-console/pulls/72","id":74298285,"html_url":"https://github.com/openshift/origin-web-console/pull/72","diff_url":"https://github.com/openshift/origin-web-console/pull/72.diff","patch_url":"https://github.com/openshift/origin-web-console/pull/72.patch","issue_url":"https://api.github.com/repos/openshift/origin-web-console/issues/72","number":72,"state":"open","locked":false,"title":"Order services by importance, collapse some when more than two","user":{"login":"spadgett","id":1167259,"avatar_url":"https://avatars.githubusercontent.com/u/1167259?v=3","gravatar_id":"","url":"https://api.github.com/users/spadgett","html_url":"https://github.com/spadgett","followers_url":"https://api.github.com/users/spadgett/followers","following_url":"https://api.github.com/users/spadgett/following{/other_user}","gists_url":"https://api.github.com/users/spadgett/gists{/gist_id}","starred_url":"https://api.github.com/users/spadgett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spadgett/subscriptions","organizations_url":"https://api.github.com/users/spadgett/orgs","repos_url":"https://api.github.com/users/spadgett/repos","events_url":"https://api.github.com/users/spadgett/events{/privacy}","received_events_url":"https://api.github.com/users/spadgett/received_events","type":"User","site_admin":false},"body":"@jwforres PTAL","created_at":"2016-06-17T20:09:49Z","updated_at":"2016-06-20T18:13:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f11dd3050ba7fe7ab67d94947a7413375108b830","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin-web-console/pulls/72/commits","review_comments_url":"https://api.github.com/repos/openshift/origin-web-console/pulls/72/comments","review_comment_url":"https://api.github.com/repos/openshift/origin-web-console/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin-web-console/issues/72/comments","statuses_url":"https://api.github.com/repos/openshift/origin-web-console/statuses/2726128c9faa0c3b093ecf85817b4871b2c0a8d7","head":{"label":"spadgett:order-overview-services","ref":"order-overview-services","sha":"2726128c9faa0c3b093ecf85817b4871b2c0a8d7","user":{"login":"spadgett","id":1167259,"avatar_url":"https://avatars.githubusercontent.com/u/1167259?v=3","gravatar_id":"","url":"https://api.github.com/users/spadgett","html_url":"https://github.com/spadgett","followers_url":"https://api.github.com/users/spadgett/followers","following_url":"https://api.github.com/users/spadgett/following{/other_user}","gists_url":"https://api.github.com/users/spadgett/gists{/gist_id}","starred_url":"https://api.github.com/users/spadgett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spadgett/subscriptions","organizations_url":"https://api.github.com/users/spadgett/orgs","repos_url":"https://api.github.com/users/spadgett/repos","events_url":"https://api.github.com/users/spadgett/events{/privacy}","received_events_url":"https://api.github.com/users/spadgett/received_events","type":"User","site_admin":false},"repo":{"id":58545409,"name":"origin-web-console","full_name":"spadgett/origin-web-console","owner":{"login":"spadgett","id":1167259,"avatar_url":"https://avatars.githubusercontent.com/u/1167259?v=3","gravatar_id":"","url":"https://api.github.com/users/spadgett","html_url":"https://github.com/spadgett","followers_url":"https://api.github.com/users/spadgett/followers","following_url":"https://api.github.com/users/spadgett/following{/other_user}","gists_url":"https://api.github.com/users/spadgett/gists{/gist_id}","starred_url":"https://api.github.com/users/spadgett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spadgett/subscriptions","organizations_url":"https://api.github.com/users/spadgett/orgs","repos_url":"https://api.github.com/users/spadgett/repos","events_url":"https://api.github.com/users/spadgett/events{/privacy}","received_events_url":"https://api.github.com/users/spadgett/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/spadgett/origin-web-console","description":"","fork":true,"url":"https://api.github.com/repos/spadgett/origin-web-console","forks_url":"https://api.github.com/repos/spadgett/origin-web-console/forks","keys_url":"https://api.github.com/repos/spadgett/origin-web-console/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spadgett/origin-web-console/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spadgett/origin-web-console/teams","hooks_url":"https://api.github.com/repos/spadgett/origin-web-console/hooks","issue_events_url":"https://api.github.com/repos/spadgett/origin-web-console/issues/events{/number}","events_url":"https://api.github.com/repos/spadgett/origin-web-console/events","assignees_url":"https://api.github.com/repos/spadgett/origin-web-console/assignees{/user}","branches_url":"https://api.github.com/repos/spadgett/origin-web-console/branches{/branch}","tags_url":"https://api.github.com/repos/spadgett/origin-web-console/tags","blobs_url":"https://api.github.com/repos/spadgett/origin-web-console/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spadgett/origin-web-console/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spadgett/origin-web-console/git/refs{/sha}","trees_url":"https://api.github.com/repos/spadgett/origin-web-console/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spadgett/origin-web-console/statuses/{sha}","languages_url":"https://api.github.com/repos/spadgett/origin-web-console/languages","stargazers_url":"https://api.github.com/repos/spadgett/origin-web-console/stargazers","contributors_url":"https://api.github.com/repos/spadgett/origin-web-console/contributors","subscribers_url":"https://api.github.com/repos/spadgett/origin-web-console/subscribers","subscription_url":"https://api.github.com/repos/spadgett/origin-web-console/subscription","commits_url":"https://api.github.com/repos/spadgett/origin-web-console/commits{/sha}","git_commits_url":"https://api.github.com/repos/spadgett/origin-web-console/git/commits{/sha}","comments_url":"https://api.github.com/repos/spadgett/origin-web-console/comments{/number}","issue_comment_url":"https://api.github.com/repos/spadgett/origin-web-console/issues/comments{/number}","contents_url":"https://api.github.com/repos/spadgett/origin-web-console/contents/{+path}","compare_url":"https://api.github.com/repos/spadgett/origin-web-console/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spadgett/origin-web-console/merges","archive_url":"https://api.github.com/repos/spadgett/origin-web-console/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spadgett/origin-web-console/downloads","issues_url":"https://api.github.com/repos/spadgett/origin-web-console/issues{/number}","pulls_url":"https://api.github.com/repos/spadgett/origin-web-console/pulls{/number}","milestones_url":"https://api.github.com/repos/spadgett/origin-web-console/milestones{/number}","notifications_url":"https://api.github.com/repos/spadgett/origin-web-console/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spadgett/origin-web-console/labels{/name}","releases_url":"https://api.github.com/repos/spadgett/origin-web-console/releases{/id}","deployments_url":"https://api.github.com/repos/spadgett/origin-web-console/deployments","created_at":"2016-05-11T13:03:37Z","updated_at":"2016-05-11T13:03:40Z","pushed_at":"2016-06-20T15:36:07Z","git_url":"git://github.com/spadgett/origin-web-console.git","ssh_url":"git@github.com:spadgett/origin-web-console.git","clone_url":"https://github.com/spadgett/origin-web-console.git","svn_url":"https://github.com/spadgett/origin-web-console","homepage":null,"size":6791,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"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":"openshift:master","ref":"master","sha":"2605c38e6df20348b48e74416883d5654134b7f6","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":58488264,"name":"origin-web-console","full_name":"openshift/origin-web-console","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin-web-console","description":"","fork":false,"url":"https://api.github.com/repos/openshift/origin-web-console","forks_url":"https://api.github.com/repos/openshift/origin-web-console/forks","keys_url":"https://api.github.com/repos/openshift/origin-web-console/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin-web-console/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin-web-console/teams","hooks_url":"https://api.github.com/repos/openshift/origin-web-console/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin-web-console/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin-web-console/events","assignees_url":"https://api.github.com/repos/openshift/origin-web-console/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin-web-console/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin-web-console/tags","blobs_url":"https://api.github.com/repos/openshift/origin-web-console/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin-web-console/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin-web-console/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin-web-console/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin-web-console/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin-web-console/languages","stargazers_url":"https://api.github.com/repos/openshift/origin-web-console/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin-web-console/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin-web-console/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin-web-console/subscription","commits_url":"https://api.github.com/repos/openshift/origin-web-console/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin-web-console/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin-web-console/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin-web-console/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin-web-console/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin-web-console/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin-web-console/merges","archive_url":"https://api.github.com/repos/openshift/origin-web-console/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin-web-console/downloads","issues_url":"https://api.github.com/repos/openshift/origin-web-console/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin-web-console/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin-web-console/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin-web-console/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin-web-console/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin-web-console/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/origin-web-console/deployments","created_at":"2016-05-10T19:31:50Z","updated_at":"2016-06-20T16:37:07Z","pushed_at":"2016-06-20T17:40:02Z","git_url":"git://github.com/openshift/origin-web-console.git","ssh_url":"git@github.com:openshift/origin-web-console.git","clone_url":"https://github.com/openshift/origin-web-console.git","svn_url":"https://github.com/openshift/origin-web-console","homepage":null,"size":6526,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":27,"forks":21,"open_issues":27,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin-web-console/pulls/72"},"html":{"href":"https://github.com/openshift/origin-web-console/pull/72"},"issue":{"href":"https://api.github.com/repos/openshift/origin-web-console/issues/72"},"comments":{"href":"https://api.github.com/repos/openshift/origin-web-console/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin-web-console/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin-web-console/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin-web-console/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin-web-console/statuses/2726128c9faa0c3b093ecf85817b4871b2c0a8d7"}}}}
{"actor":{"display_login":"jwforres"}}