{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/treeherder/pulls/comments/43501008","id":43501008,"diff_hunk":"@@ -0,0 +1,230 @@\n+\"use strict\";\n+\n+treeherder.factory('PhSeries', ['$http', 'thServiceDomain', function($http, thServiceDomain) {\n+\n+    var _getSeriesSummary = function(projectName, signature, signatureProps,\n+                                     optionCollectionMap) {\n+        var platform = signatureProps.machine_platform;\n+        var testName = signatureProps.test;\n+        var subtestSignatures;\n+        if (testName === undefined) {\n+            testName = \"summary\";\n+            subtestSignatures = signatureProps.subtest_signatures;\n+        }\n+        var name = signatureProps.suite + \" \" + testName;\n+        var options = [ optionCollectionMap[signatureProps.option_collection_hash] ];\n+        if (signatureProps.test_options) {\n+            options = options.concat(signatureProps.test_options);\n+        }\n+        name = name + \" \" + options.join(\" \");\n+\n+        return { name: name, projectName: projectName, signature: signature,\n+                 platform: platform, options: options,\n+                 subtestSignatures: subtestSignatures };\n+    };\n+\n+    var _getAllSeries = function(projectName, timeRange, optionMap) {\n+        var signatureURL = thServiceDomain + '/api/project/' + projectName +\n+            '/performance/signatures/?interval=' +\n+            timeRange;\n+\n+        return $http.get(signatureURL).then(function(response) {\n+            var seriesList = [];\n+            var platformList = [];\n+            var testList = [];\n+\n+            Object.keys(response.data).forEach(function(signature) {\n+                var seriesSummary = _getSeriesSummary(projectName, signature,\n+                                                      response.data[signature],\n+                                                      optionMap);\n+\n+                seriesList.push(seriesSummary);\n+\n+                // add test/platform to lists if not yet present\n+                if (!_.contains(platformList, seriesSummary.platform)) {\n+                    platformList.push(seriesSummary.platform);\n+                }\n+                if (!_.contains(testList, seriesSummary.name)) {\n+                    testList.push(seriesSummary.name);\n+                }\n+            });\n+            return {\n+                seriesList: seriesList,\n+                platformList: platformList,\n+                testList: testList\n+            };\n+        });\n+    };\n+\n+    var _getPlatformList = function(projectName, timeRange) {\n+        var platformURL = thServiceDomain + '/api/project/' + projectName +\n+            '/performance/platforms/?interval=' +\n+            timeRange;\n+        return $http.get(platformURL).then(function(response) {\n+            return {\n+                platformList: response.data\n+            };\n+        });\n+\n+    };\n+\n+    var _getSeriesByPlatform = function(projectName, timeRange, platform, optionMap) {\n+        var specifyPlatformURL = thServiceDomain + '/api/project/' + projectName +\n+            '/performance/signatures/?interval=' +\n+            timeRange + '&platform=' + platform;\n+\n+        return $http.get(specifyPlatformURL).then(function(response) {\n+            var seriesList = [];\n+            var testList = [];\n+\n+            _.keys(response.data).forEach(function(signature){\n+                var seriesSummary = _getSeriesSummary(projectName, signature,\n+                    response.data[signature], optionMap);\n+                seriesList.push(seriesSummary);\n+\n+                // add test/platform to lists if not yet present\n+                if (!_.contains(testList, seriesSummary.name)) {\n+                    testList.push(seriesSummary.name);\n+                }\n+            });\n+\n+            return {\n+                platform: platform,\n+                seriesList: seriesList,\n+                testList: testList\n+            };\n+        });\n+    };\n+\n+    var _getSeriesByJobId = function(projectName, jobId) {","path":"ui/js/models/ph_series.js","position":99,"original_position":99,"commit_id":"86885fdbdebe0410ff9b651ef84600121c51a90e","original_commit_id":"86885fdbdebe0410ff9b651ef84600121c51a90e","user":{"login":"MikeLing","id":2166227,"avatar_url":"https://avatars.githubusercontent.com/u/2166227?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeLing","html_url":"https://github.com/MikeLing","followers_url":"https://api.github.com/users/MikeLing/followers","following_url":"https://api.github.com/users/MikeLing/following{/other_user}","gists_url":"https://api.github.com/users/MikeLing/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeLing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeLing/subscriptions","organizations_url":"https://api.github.com/users/MikeLing/orgs","repos_url":"https://api.github.com/users/MikeLing/repos","events_url":"https://api.github.com/users/MikeLing/events{/privacy}","received_events_url":"https://api.github.com/users/MikeLing/received_events","type":"User","site_admin":false},"body":"we retrieve signature list which has same job id in here @jmaher ","created_at":"2015-10-30T13:25:34Z","updated_at":"2015-10-30T13:25:34Z","html_url":"https://github.com/mozilla/treeherder/pull/1009#discussion_r43501008","pull_request_url":"https://api.github.com/repos/mozilla/treeherder/pulls/1009","_links":{"self":{"href":"https://api.github.com/repos/mozilla/treeherder/pulls/comments/43501008"},"html":{"href":"https://github.com/mozilla/treeherder/pull/1009#discussion_r43501008"},"pull_request":{"href":"https://api.github.com/repos/mozilla/treeherder/pulls/1009"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/treeherder/pulls/1009","id":46114132,"html_url":"https://github.com/mozilla/treeherder/pull/1009","diff_url":"https://github.com/mozilla/treeherder/pull/1009.diff","patch_url":"https://github.com/mozilla/treeherder/pull/1009.patch","issue_url":"https://api.github.com/repos/mozilla/treeherder/issues/1009","number":1009,"state":"open","locked":false,"title":"Bug 1161249 - Add a link in treeherder  to perfherder graphs","user":{"login":"MikeLing","id":2166227,"avatar_url":"https://avatars.githubusercontent.com/u/2166227?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeLing","html_url":"https://github.com/MikeLing","followers_url":"https://api.github.com/users/MikeLing/followers","following_url":"https://api.github.com/users/MikeLing/following{/other_user}","gists_url":"https://api.github.com/users/MikeLing/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeLing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeLing/subscriptions","organizations_url":"https://api.github.com/users/MikeLing/orgs","repos_url":"https://api.github.com/users/MikeLing/repos","events_url":"https://api.github.com/users/MikeLing/events{/privacy}","received_events_url":"https://api.github.com/users/MikeLing/received_events","type":"User","site_admin":false},"body":"\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/mozilla/treeherder/1009)\n<!-- Reviewable:end -->\n","created_at":"2015-09-28T01:30:52Z","updated_at":"2015-10-30T13:25:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb369af296843611869faa5faf72622b1b092515","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/treeherder/pulls/1009/commits","review_comments_url":"https://api.github.com/repos/mozilla/treeherder/pulls/1009/comments","review_comment_url":"https://api.github.com/repos/mozilla/treeherder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/treeherder/issues/1009/comments","statuses_url":"https://api.github.com/repos/mozilla/treeherder/statuses/86885fdbdebe0410ff9b651ef84600121c51a90e","head":{"label":"MikeLing:bugfix-1161249","ref":"bugfix-1161249","sha":"86885fdbdebe0410ff9b651ef84600121c51a90e","user":{"login":"MikeLing","id":2166227,"avatar_url":"https://avatars.githubusercontent.com/u/2166227?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeLing","html_url":"https://github.com/MikeLing","followers_url":"https://api.github.com/users/MikeLing/followers","following_url":"https://api.github.com/users/MikeLing/following{/other_user}","gists_url":"https://api.github.com/users/MikeLing/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeLing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeLing/subscriptions","organizations_url":"https://api.github.com/users/MikeLing/orgs","repos_url":"https://api.github.com/users/MikeLing/repos","events_url":"https://api.github.com/users/MikeLing/events{/privacy}","received_events_url":"https://api.github.com/users/MikeLing/received_events","type":"User","site_admin":false},"repo":{"id":34638862,"name":"treeherder","full_name":"MikeLing/treeherder","owner":{"login":"MikeLing","id":2166227,"avatar_url":"https://avatars.githubusercontent.com/u/2166227?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeLing","html_url":"https://github.com/MikeLing","followers_url":"https://api.github.com/users/MikeLing/followers","following_url":"https://api.github.com/users/MikeLing/following{/other_user}","gists_url":"https://api.github.com/users/MikeLing/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeLing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeLing/subscriptions","organizations_url":"https://api.github.com/users/MikeLing/orgs","repos_url":"https://api.github.com/users/MikeLing/repos","events_url":"https://api.github.com/users/MikeLing/events{/privacy}","received_events_url":"https://api.github.com/users/MikeLing/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MikeLing/treeherder","description":"The backend of treeherder, a replacement for TBPL. See wiki page for where to file bugs.","fork":true,"url":"https://api.github.com/repos/MikeLing/treeherder","forks_url":"https://api.github.com/repos/MikeLing/treeherder/forks","keys_url":"https://api.github.com/repos/MikeLing/treeherder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MikeLing/treeherder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MikeLing/treeherder/teams","hooks_url":"https://api.github.com/repos/MikeLing/treeherder/hooks","issue_events_url":"https://api.github.com/repos/MikeLing/treeherder/issues/events{/number}","events_url":"https://api.github.com/repos/MikeLing/treeherder/events","assignees_url":"https://api.github.com/repos/MikeLing/treeherder/assignees{/user}","branches_url":"https://api.github.com/repos/MikeLing/treeherder/branches{/branch}","tags_url":"https://api.github.com/repos/MikeLing/treeherder/tags","blobs_url":"https://api.github.com/repos/MikeLing/treeherder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MikeLing/treeherder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MikeLing/treeherder/git/refs{/sha}","trees_url":"https://api.github.com/repos/MikeLing/treeherder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MikeLing/treeherder/statuses/{sha}","languages_url":"https://api.github.com/repos/MikeLing/treeherder/languages","stargazers_url":"https://api.github.com/repos/MikeLing/treeherder/stargazers","contributors_url":"https://api.github.com/repos/MikeLing/treeherder/contributors","subscribers_url":"https://api.github.com/repos/MikeLing/treeherder/subscribers","subscription_url":"https://api.github.com/repos/MikeLing/treeherder/subscription","commits_url":"https://api.github.com/repos/MikeLing/treeherder/commits{/sha}","git_commits_url":"https://api.github.com/repos/MikeLing/treeherder/git/commits{/sha}","comments_url":"https://api.github.com/repos/MikeLing/treeherder/comments{/number}","issue_comment_url":"https://api.github.com/repos/MikeLing/treeherder/issues/comments{/number}","contents_url":"https://api.github.com/repos/MikeLing/treeherder/contents/{+path}","compare_url":"https://api.github.com/repos/MikeLing/treeherder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MikeLing/treeherder/merges","archive_url":"https://api.github.com/repos/MikeLing/treeherder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MikeLing/treeherder/downloads","issues_url":"https://api.github.com/repos/MikeLing/treeherder/issues{/number}","pulls_url":"https://api.github.com/repos/MikeLing/treeherder/pulls{/number}","milestones_url":"https://api.github.com/repos/MikeLing/treeherder/milestones{/number}","notifications_url":"https://api.github.com/repos/MikeLing/treeherder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MikeLing/treeherder/labels{/name}","releases_url":"https://api.github.com/repos/MikeLing/treeherder/releases{/id}","created_at":"2015-04-27T01:05:12Z","updated_at":"2015-04-27T01:05:13Z","pushed_at":"2015-10-28T02:28:04Z","git_url":"git://github.com/MikeLing/treeherder.git","ssh_url":"git@github.com:MikeLing/treeherder.git","clone_url":"https://github.com/MikeLing/treeherder.git","svn_url":"https://github.com/MikeLing/treeherder","homepage":"https://wiki.mozilla.org/Auto-tools/Projects/Treeherder","size":38346,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"mozilla:master","ref":"master","sha":"078f5902d86e5719d9a79c318ce07462631aea26","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":8463294,"name":"treeherder","full_name":"mozilla/treeherder","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/treeherder","description":"A reporting dashboard & service for managing CI data for commits to Mozilla projects","fork":false,"url":"https://api.github.com/repos/mozilla/treeherder","forks_url":"https://api.github.com/repos/mozilla/treeherder/forks","keys_url":"https://api.github.com/repos/mozilla/treeherder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/treeherder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/treeherder/teams","hooks_url":"https://api.github.com/repos/mozilla/treeherder/hooks","issue_events_url":"https://api.github.com/repos/mozilla/treeherder/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/treeherder/events","assignees_url":"https://api.github.com/repos/mozilla/treeherder/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/treeherder/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/treeherder/tags","blobs_url":"https://api.github.com/repos/mozilla/treeherder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/treeherder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/treeherder/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/treeherder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/treeherder/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/treeherder/languages","stargazers_url":"https://api.github.com/repos/mozilla/treeherder/stargazers","contributors_url":"https://api.github.com/repos/mozilla/treeherder/contributors","subscribers_url":"https://api.github.com/repos/mozilla/treeherder/subscribers","subscription_url":"https://api.github.com/repos/mozilla/treeherder/subscription","commits_url":"https://api.github.com/repos/mozilla/treeherder/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/treeherder/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/treeherder/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/treeherder/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/treeherder/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/treeherder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/treeherder/merges","archive_url":"https://api.github.com/repos/mozilla/treeherder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/treeherder/downloads","issues_url":"https://api.github.com/repos/mozilla/treeherder/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/treeherder/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/treeherder/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/treeherder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/treeherder/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/treeherder/releases{/id}","created_at":"2013-02-27T19:17:37Z","updated_at":"2015-10-27T19:44:22Z","pushed_at":"2015-10-30T12:00:22Z","git_url":"git://github.com/mozilla/treeherder.git","ssh_url":"git@github.com:mozilla/treeherder.git","clone_url":"https://github.com/mozilla/treeherder.git","svn_url":"https://github.com/mozilla/treeherder","homepage":"https://wiki.mozilla.org/Auto-tools/Projects/Treeherder","size":408711,"stargazers_count":29,"watchers_count":29,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":68,"mirror_url":null,"open_issues_count":25,"forks":68,"open_issues":25,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/treeherder/pulls/1009"},"html":{"href":"https://github.com/mozilla/treeherder/pull/1009"},"issue":{"href":"https://api.github.com/repos/mozilla/treeherder/issues/1009"},"comments":{"href":"https://api.github.com/repos/mozilla/treeherder/issues/1009/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/treeherder/pulls/1009/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/treeherder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/treeherder/pulls/1009/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/treeherder/statuses/86885fdbdebe0410ff9b651ef84600121c51a90e"}}}}