{"action":"created","comment":{"url":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/comments/186453438","pull_request_review_id":117654528,"id":186453438,"diff_hunk":"@@ -546,51 +668,63 @@ func (uis *UIServer) waterfallPage(w http.ResponseWriter, r *http.Request) {\n \t\tskip = 0\n \t}\n \n-\tfinalData := waterfallData{}\n+\tvariantQuery := strings.TrimSpace(r.URL.Query().Get(BVFilterParam))\n \n \t// first, get all of the versions and variants we will need\n-\tvvData, err := getVersionsAndVariants(skip,\n-\t\tVersionItemsToCreate, project)\n+\tvvData, err := getVersionsAndVariants(\n+\t\tskip, VersionItemsToCreate, project, variantQuery,\n+\t)\n+\n+\tif err != nil {\n+\t\tuis.LoggedError(w, r, http.StatusNotFound, err)\n+\t\treturn\n+\t}\n \n+\tfinalData, err := waterfallDataAdaptor(vvData, project, skip, variantQuery)\n \tif err != nil {\n \t\tuis.LoggedError(w, r, http.StatusInternalServerError, err)\n \t\treturn\n \t}\n-\tvar wfv waterfallVersions = vvData.Versions\n \n-\tsort.Sort(wfv)\n-\tfinalData.Versions = wfv\n+\tuis.WriteHTML(w, http.StatusOK, struct {\n+\t\tData     waterfallData\n+\t\tJiraHost string\n+\t\tViewData\n+\t}{finalData, uis.Settings.Jira.Host, uis.GetCommonViewData(w, r, false, true)}, \"base\", \"waterfall.html\", \"base_angular.html\", \"menu.html\")\n+}\n \n-\tsort.Sort(vvData.BuildVariants)\n-\trows := []waterfallRow{}\n-\tfor _, bv := range vvData.BuildVariants {\n-\t\trows = append(rows, vvData.Rows[bv.Id])\n+func (restapi restAPI) getWaterfallData(w http.ResponseWriter, r *http.Request) {\n+\tprojCtx := MustHaveRESTContext(r)\n+\tproject, err := projCtx.GetProject()\n+\tif err != nil || project == nil {\n+\t\trestapi.WriteJSON(w, http.StatusNotFound, responseError{Message: \"error finding project\"})\n+\t\treturn\n \t}\n-\tfinalData.Rows = rows\n \n-\t// compute the total number of versions that exist\n-\tfinalData.TotalVersions, err = version.Count(version.ByProjectId(project.Identifier))\n+\tquery := r.URL.Query()\n+\t// 0 is fail safe defailt value\n+\tskip, _ := strconv.Atoi(query.Get(SkipQueryParam))","path":"service/waterfall.go","position":255,"original_position":255,"commit_id":"896f1c9e403809f154c2daca2383df467971f2d4","original_commit_id":"896f1c9e403809f154c2daca2383df467971f2d4","user":{"login":"john-m-liu","id":29384396,"avatar_url":"https://avatars2.githubusercontent.com/u/29384396?v=4","gravatar_id":"","url":"https://api.github.com/users/john-m-liu","html_url":"https://github.com/john-m-liu","followers_url":"https://api.github.com/users/john-m-liu/followers","following_url":"https://api.github.com/users/john-m-liu/following{/other_user}","gists_url":"https://api.github.com/users/john-m-liu/gists{/gist_id}","starred_url":"https://api.github.com/users/john-m-liu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john-m-liu/subscriptions","organizations_url":"https://api.github.com/users/john-m-liu/orgs","repos_url":"https://api.github.com/users/john-m-liu/repos","events_url":"https://api.github.com/users/john-m-liu/events{/privacy}","received_events_url":"https://api.github.com/users/john-m-liu/received_events","type":"User","site_admin":false},"body":"You should check the second value here to see if the query string is a valid int","created_at":"2018-05-07T15:10:38Z","updated_at":"2018-05-07T15:13:52Z","html_url":"https://github.com/evergreen-ci/evergreen/pull/1136#discussion_r186453438","pull_request_url":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/1136","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/comments/186453438"},"html":{"href":"https://github.com/evergreen-ci/evergreen/pull/1136#discussion_r186453438"},"pull_request":{"href":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/1136"}}},"pull_request":{"url":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/1136","id":185974408,"html_url":"https://github.com/evergreen-ci/evergreen/pull/1136","diff_url":"https://github.com/evergreen-ci/evergreen/pull/1136.diff","patch_url":"https://github.com/evergreen-ci/evergreen/pull/1136.patch","issue_url":"https://api.github.com/repos/evergreen-ci/evergreen/issues/1136","number":1136,"state":"open","locked":false,"title":"EVG-3171 (feat) Waterfall - collapsed variant search","user":{"login":"unrealsolver","id":1101771,"avatar_url":"https://avatars1.githubusercontent.com/u/1101771?v=4","gravatar_id":"","url":"https://api.github.com/users/unrealsolver","html_url":"https://github.com/unrealsolver","followers_url":"https://api.github.com/users/unrealsolver/followers","following_url":"https://api.github.com/users/unrealsolver/following{/other_user}","gists_url":"https://api.github.com/users/unrealsolver/gists{/gist_id}","starred_url":"https://api.github.com/users/unrealsolver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unrealsolver/subscriptions","organizations_url":"https://api.github.com/users/unrealsolver/orgs","repos_url":"https://api.github.com/users/unrealsolver/repos","events_url":"https://api.github.com/users/unrealsolver/events{/privacy}","received_events_url":"https://api.github.com/users/unrealsolver/received_events","type":"User","site_admin":false},"body":"![waterfall_all_variants](https://user-images.githubusercontent.com/1101771/39628786-cc89cb6a-4fb2-11e8-925c-671ec1e5348c.png)\r\n![waterfall_variant_search](https://user-images.githubusercontent.com/1101771/39628788-ce427150-4fb2-11e8-91f0-58e2f51e753f.png)\r\n","created_at":"2018-05-04T12:50:03Z","updated_at":"2018-05-07T15:13:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"338be09b10c4f869c415f1bb9d77b29a589704f4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/1136/commits","review_comments_url":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/1136/comments","review_comment_url":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/evergreen-ci/evergreen/issues/1136/comments","statuses_url":"https://api.github.com/repos/evergreen-ci/evergreen/statuses/896f1c9e403809f154c2daca2383df467971f2d4","head":{"label":"unrealsolver:EVG-3171","ref":"EVG-3171","sha":"896f1c9e403809f154c2daca2383df467971f2d4","user":{"login":"unrealsolver","id":1101771,"avatar_url":"https://avatars1.githubusercontent.com/u/1101771?v=4","gravatar_id":"","url":"https://api.github.com/users/unrealsolver","html_url":"https://github.com/unrealsolver","followers_url":"https://api.github.com/users/unrealsolver/followers","following_url":"https://api.github.com/users/unrealsolver/following{/other_user}","gists_url":"https://api.github.com/users/unrealsolver/gists{/gist_id}","starred_url":"https://api.github.com/users/unrealsolver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unrealsolver/subscriptions","organizations_url":"https://api.github.com/users/unrealsolver/orgs","repos_url":"https://api.github.com/users/unrealsolver/repos","events_url":"https://api.github.com/users/unrealsolver/events{/privacy}","received_events_url":"https://api.github.com/users/unrealsolver/received_events","type":"User","site_admin":false},"repo":{"id":114141991,"name":"evergreen","full_name":"unrealsolver/evergreen","owner":{"login":"unrealsolver","id":1101771,"avatar_url":"https://avatars1.githubusercontent.com/u/1101771?v=4","gravatar_id":"","url":"https://api.github.com/users/unrealsolver","html_url":"https://github.com/unrealsolver","followers_url":"https://api.github.com/users/unrealsolver/followers","following_url":"https://api.github.com/users/unrealsolver/following{/other_user}","gists_url":"https://api.github.com/users/unrealsolver/gists{/gist_id}","starred_url":"https://api.github.com/users/unrealsolver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unrealsolver/subscriptions","organizations_url":"https://api.github.com/users/unrealsolver/orgs","repos_url":"https://api.github.com/users/unrealsolver/repos","events_url":"https://api.github.com/users/unrealsolver/events{/privacy}","received_events_url":"https://api.github.com/users/unrealsolver/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/unrealsolver/evergreen","description":"A Distributed Continuous Integration System from MongoDB","fork":true,"url":"https://api.github.com/repos/unrealsolver/evergreen","forks_url":"https://api.github.com/repos/unrealsolver/evergreen/forks","keys_url":"https://api.github.com/repos/unrealsolver/evergreen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unrealsolver/evergreen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unrealsolver/evergreen/teams","hooks_url":"https://api.github.com/repos/unrealsolver/evergreen/hooks","issue_events_url":"https://api.github.com/repos/unrealsolver/evergreen/issues/events{/number}","events_url":"https://api.github.com/repos/unrealsolver/evergreen/events","assignees_url":"https://api.github.com/repos/unrealsolver/evergreen/assignees{/user}","branches_url":"https://api.github.com/repos/unrealsolver/evergreen/branches{/branch}","tags_url":"https://api.github.com/repos/unrealsolver/evergreen/tags","blobs_url":"https://api.github.com/repos/unrealsolver/evergreen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unrealsolver/evergreen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unrealsolver/evergreen/git/refs{/sha}","trees_url":"https://api.github.com/repos/unrealsolver/evergreen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unrealsolver/evergreen/statuses/{sha}","languages_url":"https://api.github.com/repos/unrealsolver/evergreen/languages","stargazers_url":"https://api.github.com/repos/unrealsolver/evergreen/stargazers","contributors_url":"https://api.github.com/repos/unrealsolver/evergreen/contributors","subscribers_url":"https://api.github.com/repos/unrealsolver/evergreen/subscribers","subscription_url":"https://api.github.com/repos/unrealsolver/evergreen/subscription","commits_url":"https://api.github.com/repos/unrealsolver/evergreen/commits{/sha}","git_commits_url":"https://api.github.com/repos/unrealsolver/evergreen/git/commits{/sha}","comments_url":"https://api.github.com/repos/unrealsolver/evergreen/comments{/number}","issue_comment_url":"https://api.github.com/repos/unrealsolver/evergreen/issues/comments{/number}","contents_url":"https://api.github.com/repos/unrealsolver/evergreen/contents/{+path}","compare_url":"https://api.github.com/repos/unrealsolver/evergreen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unrealsolver/evergreen/merges","archive_url":"https://api.github.com/repos/unrealsolver/evergreen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unrealsolver/evergreen/downloads","issues_url":"https://api.github.com/repos/unrealsolver/evergreen/issues{/number}","pulls_url":"https://api.github.com/repos/unrealsolver/evergreen/pulls{/number}","milestones_url":"https://api.github.com/repos/unrealsolver/evergreen/milestones{/number}","notifications_url":"https://api.github.com/repos/unrealsolver/evergreen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unrealsolver/evergreen/labels{/name}","releases_url":"https://api.github.com/repos/unrealsolver/evergreen/releases{/id}","deployments_url":"https://api.github.com/repos/unrealsolver/evergreen/deployments","created_at":"2017-12-13T16:11:53Z","updated_at":"2017-12-13T16:11:57Z","pushed_at":"2018-05-07T10:38:10Z","git_url":"git://github.com/unrealsolver/evergreen.git","ssh_url":"git@github.com:unrealsolver/evergreen.git","clone_url":"https://github.com/unrealsolver/evergreen.git","svn_url":"https://github.com/unrealsolver/evergreen","homepage":"http://evergreen.mongodb.com","size":50364,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"evergreen-ci:master","ref":"master","sha":"f60366f848bb32f394e9cbb56be15a7560de8e98","user":{"login":"evergreen-ci","id":10089490,"avatar_url":"https://avatars3.githubusercontent.com/u/10089490?v=4","gravatar_id":"","url":"https://api.github.com/users/evergreen-ci","html_url":"https://github.com/evergreen-ci","followers_url":"https://api.github.com/users/evergreen-ci/followers","following_url":"https://api.github.com/users/evergreen-ci/following{/other_user}","gists_url":"https://api.github.com/users/evergreen-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/evergreen-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evergreen-ci/subscriptions","organizations_url":"https://api.github.com/users/evergreen-ci/orgs","repos_url":"https://api.github.com/users/evergreen-ci/repos","events_url":"https://api.github.com/users/evergreen-ci/events{/privacy}","received_events_url":"https://api.github.com/users/evergreen-ci/received_events","type":"Organization","site_admin":false},"repo":{"id":36385798,"name":"evergreen","full_name":"evergreen-ci/evergreen","owner":{"login":"evergreen-ci","id":10089490,"avatar_url":"https://avatars3.githubusercontent.com/u/10089490?v=4","gravatar_id":"","url":"https://api.github.com/users/evergreen-ci","html_url":"https://github.com/evergreen-ci","followers_url":"https://api.github.com/users/evergreen-ci/followers","following_url":"https://api.github.com/users/evergreen-ci/following{/other_user}","gists_url":"https://api.github.com/users/evergreen-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/evergreen-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evergreen-ci/subscriptions","organizations_url":"https://api.github.com/users/evergreen-ci/orgs","repos_url":"https://api.github.com/users/evergreen-ci/repos","events_url":"https://api.github.com/users/evergreen-ci/events{/privacy}","received_events_url":"https://api.github.com/users/evergreen-ci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/evergreen-ci/evergreen","description":"A Distributed Continuous Integration System from MongoDB","fork":false,"url":"https://api.github.com/repos/evergreen-ci/evergreen","forks_url":"https://api.github.com/repos/evergreen-ci/evergreen/forks","keys_url":"https://api.github.com/repos/evergreen-ci/evergreen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evergreen-ci/evergreen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evergreen-ci/evergreen/teams","hooks_url":"https://api.github.com/repos/evergreen-ci/evergreen/hooks","issue_events_url":"https://api.github.com/repos/evergreen-ci/evergreen/issues/events{/number}","events_url":"https://api.github.com/repos/evergreen-ci/evergreen/events","assignees_url":"https://api.github.com/repos/evergreen-ci/evergreen/assignees{/user}","branches_url":"https://api.github.com/repos/evergreen-ci/evergreen/branches{/branch}","tags_url":"https://api.github.com/repos/evergreen-ci/evergreen/tags","blobs_url":"https://api.github.com/repos/evergreen-ci/evergreen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evergreen-ci/evergreen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evergreen-ci/evergreen/git/refs{/sha}","trees_url":"https://api.github.com/repos/evergreen-ci/evergreen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evergreen-ci/evergreen/statuses/{sha}","languages_url":"https://api.github.com/repos/evergreen-ci/evergreen/languages","stargazers_url":"https://api.github.com/repos/evergreen-ci/evergreen/stargazers","contributors_url":"https://api.github.com/repos/evergreen-ci/evergreen/contributors","subscribers_url":"https://api.github.com/repos/evergreen-ci/evergreen/subscribers","subscription_url":"https://api.github.com/repos/evergreen-ci/evergreen/subscription","commits_url":"https://api.github.com/repos/evergreen-ci/evergreen/commits{/sha}","git_commits_url":"https://api.github.com/repos/evergreen-ci/evergreen/git/commits{/sha}","comments_url":"https://api.github.com/repos/evergreen-ci/evergreen/comments{/number}","issue_comment_url":"https://api.github.com/repos/evergreen-ci/evergreen/issues/comments{/number}","contents_url":"https://api.github.com/repos/evergreen-ci/evergreen/contents/{+path}","compare_url":"https://api.github.com/repos/evergreen-ci/evergreen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evergreen-ci/evergreen/merges","archive_url":"https://api.github.com/repos/evergreen-ci/evergreen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evergreen-ci/evergreen/downloads","issues_url":"https://api.github.com/repos/evergreen-ci/evergreen/issues{/number}","pulls_url":"https://api.github.com/repos/evergreen-ci/evergreen/pulls{/number}","milestones_url":"https://api.github.com/repos/evergreen-ci/evergreen/milestones{/number}","notifications_url":"https://api.github.com/repos/evergreen-ci/evergreen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evergreen-ci/evergreen/labels{/name}","releases_url":"https://api.github.com/repos/evergreen-ci/evergreen/releases{/id}","deployments_url":"https://api.github.com/repos/evergreen-ci/evergreen/deployments","created_at":"2015-05-27T18:03:09Z","updated_at":"2018-05-07T13:48:31Z","pushed_at":"2018-05-07T13:48:28Z","git_url":"git://github.com/evergreen-ci/evergreen.git","ssh_url":"git@github.com:evergreen-ci/evergreen.git","clone_url":"https://github.com/evergreen-ci/evergreen.git","svn_url":"https://github.com/evergreen-ci/evergreen","homepage":"http://evergreen.mongodb.com","size":50252,"stargazers_count":167,"watchers_count":167,"language":"Go","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":46,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":46,"open_issues":6,"watchers":167,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/1136"},"html":{"href":"https://github.com/evergreen-ci/evergreen/pull/1136"},"issue":{"href":"https://api.github.com/repos/evergreen-ci/evergreen/issues/1136"},"comments":{"href":"https://api.github.com/repos/evergreen-ci/evergreen/issues/1136/comments"},"review_comments":{"href":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/1136/comments"},"review_comment":{"href":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/evergreen-ci/evergreen/pulls/1136/commits"},"statuses":{"href":"https://api.github.com/repos/evergreen-ci/evergreen/statuses/896f1c9e403809f154c2daca2383df467971f2d4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"john-m-liu"}}