{"action":"created","comment":{"url":"https://api.github.com/repos/gocd/gocd/pulls/comments/78779915","id":78779915,"diff_hunk":"@@ -0,0 +1,70 @@\n+/*\n+ * Copyright 2016 ThoughtWorks, Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+define(['mithril', 'lodash'], function (m, _) {\n+\n+  var vm = {};\n+\n+  vm.dropdown = {\n+    states: {},\n+\n+    reset: m.prop(true),\n+\n+    add: function (name) {\n+      if (!this.states[name]) {\n+        this.states[name] = m.prop(false);\n+      }\n+    },\n+\n+    hide: function (name) {\n+      this.states[name](false);\n+    },\n+\n+    hideAllDropDowns: function () {\n+      if (this.reset()) {\n+        for (var item in this.states) {\n+          this.states[item](false);\n+        }\n+      }\n+      this.reset(true);\n+    },\n+\n+    hideOtherDropdowns: function (name) {\n+      for (var item in this.states) {\n+        if (!_.isEqual(item, name)) {\n+          this.states[item](false);\n+        }\n+      }\n+    }\n+  };\n+\n+  vm.agents = {\n+    all: {\n+      selected: m.prop(false)\n+    }\n+  };\n+\n+  vm.filterText = m.prop('');\n+\n+  vm.agentsCheckedState = {};\n+\n+  vm.message = m.prop();\n+\n+  vm.type = m.prop();\n+","path":"server/webapp/WEB-INF/rails.new/app/assets/new_javascripts/views/agents/models/agents_widget_view_model.js","position":67,"original_position":67,"commit_id":"de0badae87bb7b4867819987490be1db3ab0c7d6","original_commit_id":"de0badae87bb7b4867819987490be1db3ab0c7d6","user":{"login":"iamsumanth","id":17640031,"avatar_url":"https://avatars.githubusercontent.com/u/17640031?v=3","gravatar_id":"","url":"https://api.github.com/users/iamsumanth","html_url":"https://github.com/iamsumanth","followers_url":"https://api.github.com/users/iamsumanth/followers","following_url":"https://api.github.com/users/iamsumanth/following{/other_user}","gists_url":"https://api.github.com/users/iamsumanth/gists{/gist_id}","starred_url":"https://api.github.com/users/iamsumanth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamsumanth/subscriptions","organizations_url":"https://api.github.com/users/iamsumanth/orgs","repos_url":"https://api.github.com/users/iamsumanth/repos","events_url":"https://api.github.com/users/iamsumanth/events{/privacy}","received_events_url":"https://api.github.com/users/iamsumanth/received_events","type":"User","site_admin":false},"body":"Wrap `vm.message` and `vm.type` in single object like \r\n```\r\nvm.updateMessage {\r\n  message:m.prop(),\r\n  type:m.prop()\r\n}\r\n```","created_at":"2016-09-14T16:04:41Z","updated_at":"2016-09-14T16:04:41Z","html_url":"https://github.com/gocd/gocd/pull/2686#discussion_r78779915","pull_request_url":"https://api.github.com/repos/gocd/gocd/pulls/2686","_links":{"self":{"href":"https://api.github.com/repos/gocd/gocd/pulls/comments/78779915"},"html":{"href":"https://github.com/gocd/gocd/pull/2686#discussion_r78779915"},"pull_request":{"href":"https://api.github.com/repos/gocd/gocd/pulls/2686"}}},"pull_request":{"url":"https://api.github.com/repos/gocd/gocd/pulls/2686","id":85235696,"html_url":"https://github.com/gocd/gocd/pull/2686","diff_url":"https://github.com/gocd/gocd/pull/2686.diff","patch_url":"https://github.com/gocd/gocd/pull/2686.patch","issue_url":"https://api.github.com/repos/gocd/gocd/issues/2686","number":2686,"state":"open","locked":false,"title":"Agents SPA","user":{"login":"iamsumanth","id":17640031,"avatar_url":"https://avatars.githubusercontent.com/u/17640031?v=3","gravatar_id":"","url":"https://api.github.com/users/iamsumanth","html_url":"https://github.com/iamsumanth","followers_url":"https://api.github.com/users/iamsumanth/followers","following_url":"https://api.github.com/users/iamsumanth/following{/other_user}","gists_url":"https://api.github.com/users/iamsumanth/gists{/gist_id}","starred_url":"https://api.github.com/users/iamsumanth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamsumanth/subscriptions","organizations_url":"https://api.github.com/users/iamsumanth/orgs","repos_url":"https://api.github.com/users/iamsumanth/repos","events_url":"https://api.github.com/users/iamsumanth/events{/privacy}","received_events_url":"https://api.github.com/users/iamsumanth/received_events","type":"User","site_admin":false},"body":"Sort agents based on attribute\r\n\r\nSort agents by ascending or descending order\r\n\r\nAdd links to agent job history and building job\r\n\r\nUpdate page every 10 seconds","created_at":"2016-09-14T14:15:00Z","updated_at":"2016-09-14T16:04:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a8051e3057f4cafc6d1aab708622f659ccaa51ce","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/gocd/gocd/pulls/2686/commits","review_comments_url":"https://api.github.com/repos/gocd/gocd/pulls/2686/comments","review_comment_url":"https://api.github.com/repos/gocd/gocd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gocd/gocd/issues/2686/comments","statuses_url":"https://api.github.com/repos/gocd/gocd/statuses/de0badae87bb7b4867819987490be1db3ab0c7d6","head":{"label":"iamsumanth:agents-page-complete","ref":"agents-page-complete","sha":"de0badae87bb7b4867819987490be1db3ab0c7d6","user":{"login":"iamsumanth","id":17640031,"avatar_url":"https://avatars.githubusercontent.com/u/17640031?v=3","gravatar_id":"","url":"https://api.github.com/users/iamsumanth","html_url":"https://github.com/iamsumanth","followers_url":"https://api.github.com/users/iamsumanth/followers","following_url":"https://api.github.com/users/iamsumanth/following{/other_user}","gists_url":"https://api.github.com/users/iamsumanth/gists{/gist_id}","starred_url":"https://api.github.com/users/iamsumanth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamsumanth/subscriptions","organizations_url":"https://api.github.com/users/iamsumanth/orgs","repos_url":"https://api.github.com/users/iamsumanth/repos","events_url":"https://api.github.com/users/iamsumanth/events{/privacy}","received_events_url":"https://api.github.com/users/iamsumanth/received_events","type":"User","site_admin":false},"repo":{"id":60340915,"name":"gocd","full_name":"iamsumanth/gocd","owner":{"login":"iamsumanth","id":17640031,"avatar_url":"https://avatars.githubusercontent.com/u/17640031?v=3","gravatar_id":"","url":"https://api.github.com/users/iamsumanth","html_url":"https://github.com/iamsumanth","followers_url":"https://api.github.com/users/iamsumanth/followers","following_url":"https://api.github.com/users/iamsumanth/following{/other_user}","gists_url":"https://api.github.com/users/iamsumanth/gists{/gist_id}","starred_url":"https://api.github.com/users/iamsumanth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamsumanth/subscriptions","organizations_url":"https://api.github.com/users/iamsumanth/orgs","repos_url":"https://api.github.com/users/iamsumanth/repos","events_url":"https://api.github.com/users/iamsumanth/events{/privacy}","received_events_url":"https://api.github.com/users/iamsumanth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iamsumanth/gocd","description":"Main repository for GoCD - Continuous Delivery server","fork":true,"url":"https://api.github.com/repos/iamsumanth/gocd","forks_url":"https://api.github.com/repos/iamsumanth/gocd/forks","keys_url":"https://api.github.com/repos/iamsumanth/gocd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iamsumanth/gocd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iamsumanth/gocd/teams","hooks_url":"https://api.github.com/repos/iamsumanth/gocd/hooks","issue_events_url":"https://api.github.com/repos/iamsumanth/gocd/issues/events{/number}","events_url":"https://api.github.com/repos/iamsumanth/gocd/events","assignees_url":"https://api.github.com/repos/iamsumanth/gocd/assignees{/user}","branches_url":"https://api.github.com/repos/iamsumanth/gocd/branches{/branch}","tags_url":"https://api.github.com/repos/iamsumanth/gocd/tags","blobs_url":"https://api.github.com/repos/iamsumanth/gocd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iamsumanth/gocd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iamsumanth/gocd/git/refs{/sha}","trees_url":"https://api.github.com/repos/iamsumanth/gocd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iamsumanth/gocd/statuses/{sha}","languages_url":"https://api.github.com/repos/iamsumanth/gocd/languages","stargazers_url":"https://api.github.com/repos/iamsumanth/gocd/stargazers","contributors_url":"https://api.github.com/repos/iamsumanth/gocd/contributors","subscribers_url":"https://api.github.com/repos/iamsumanth/gocd/subscribers","subscription_url":"https://api.github.com/repos/iamsumanth/gocd/subscription","commits_url":"https://api.github.com/repos/iamsumanth/gocd/commits{/sha}","git_commits_url":"https://api.github.com/repos/iamsumanth/gocd/git/commits{/sha}","comments_url":"https://api.github.com/repos/iamsumanth/gocd/comments{/number}","issue_comment_url":"https://api.github.com/repos/iamsumanth/gocd/issues/comments{/number}","contents_url":"https://api.github.com/repos/iamsumanth/gocd/contents/{+path}","compare_url":"https://api.github.com/repos/iamsumanth/gocd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iamsumanth/gocd/merges","archive_url":"https://api.github.com/repos/iamsumanth/gocd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iamsumanth/gocd/downloads","issues_url":"https://api.github.com/repos/iamsumanth/gocd/issues{/number}","pulls_url":"https://api.github.com/repos/iamsumanth/gocd/pulls{/number}","milestones_url":"https://api.github.com/repos/iamsumanth/gocd/milestones{/number}","notifications_url":"https://api.github.com/repos/iamsumanth/gocd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iamsumanth/gocd/labels{/name}","releases_url":"https://api.github.com/repos/iamsumanth/gocd/releases{/id}","deployments_url":"https://api.github.com/repos/iamsumanth/gocd/deployments","created_at":"2016-06-03T10:48:20Z","updated_at":"2016-06-03T10:48:38Z","pushed_at":"2016-09-14T14:12:17Z","git_url":"git://github.com/iamsumanth/gocd.git","ssh_url":"git@github.com:iamsumanth/gocd.git","clone_url":"https://github.com/iamsumanth/gocd.git","svn_url":"https://github.com/iamsumanth/gocd","homepage":"https://go.cd","size":241045,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"gocd:master","ref":"master","sha":"9392872ff5d76f65f8b111da5ef7bdec289ad6de","user":{"login":"gocd","id":6099846,"avatar_url":"https://avatars.githubusercontent.com/u/6099846?v=3","gravatar_id":"","url":"https://api.github.com/users/gocd","html_url":"https://github.com/gocd","followers_url":"https://api.github.com/users/gocd/followers","following_url":"https://api.github.com/users/gocd/following{/other_user}","gists_url":"https://api.github.com/users/gocd/gists{/gist_id}","starred_url":"https://api.github.com/users/gocd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gocd/subscriptions","organizations_url":"https://api.github.com/users/gocd/orgs","repos_url":"https://api.github.com/users/gocd/repos","events_url":"https://api.github.com/users/gocd/events{/privacy}","received_events_url":"https://api.github.com/users/gocd/received_events","type":"Organization","site_admin":false},"repo":{"id":15155534,"name":"gocd","full_name":"gocd/gocd","owner":{"login":"gocd","id":6099846,"avatar_url":"https://avatars.githubusercontent.com/u/6099846?v=3","gravatar_id":"","url":"https://api.github.com/users/gocd","html_url":"https://github.com/gocd","followers_url":"https://api.github.com/users/gocd/followers","following_url":"https://api.github.com/users/gocd/following{/other_user}","gists_url":"https://api.github.com/users/gocd/gists{/gist_id}","starred_url":"https://api.github.com/users/gocd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gocd/subscriptions","organizations_url":"https://api.github.com/users/gocd/orgs","repos_url":"https://api.github.com/users/gocd/repos","events_url":"https://api.github.com/users/gocd/events{/privacy}","received_events_url":"https://api.github.com/users/gocd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gocd/gocd","description":"Main repository for GoCD - Continuous Delivery server","fork":false,"url":"https://api.github.com/repos/gocd/gocd","forks_url":"https://api.github.com/repos/gocd/gocd/forks","keys_url":"https://api.github.com/repos/gocd/gocd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gocd/gocd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gocd/gocd/teams","hooks_url":"https://api.github.com/repos/gocd/gocd/hooks","issue_events_url":"https://api.github.com/repos/gocd/gocd/issues/events{/number}","events_url":"https://api.github.com/repos/gocd/gocd/events","assignees_url":"https://api.github.com/repos/gocd/gocd/assignees{/user}","branches_url":"https://api.github.com/repos/gocd/gocd/branches{/branch}","tags_url":"https://api.github.com/repos/gocd/gocd/tags","blobs_url":"https://api.github.com/repos/gocd/gocd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gocd/gocd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gocd/gocd/git/refs{/sha}","trees_url":"https://api.github.com/repos/gocd/gocd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gocd/gocd/statuses/{sha}","languages_url":"https://api.github.com/repos/gocd/gocd/languages","stargazers_url":"https://api.github.com/repos/gocd/gocd/stargazers","contributors_url":"https://api.github.com/repos/gocd/gocd/contributors","subscribers_url":"https://api.github.com/repos/gocd/gocd/subscribers","subscription_url":"https://api.github.com/repos/gocd/gocd/subscription","commits_url":"https://api.github.com/repos/gocd/gocd/commits{/sha}","git_commits_url":"https://api.github.com/repos/gocd/gocd/git/commits{/sha}","comments_url":"https://api.github.com/repos/gocd/gocd/comments{/number}","issue_comment_url":"https://api.github.com/repos/gocd/gocd/issues/comments{/number}","contents_url":"https://api.github.com/repos/gocd/gocd/contents/{+path}","compare_url":"https://api.github.com/repos/gocd/gocd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gocd/gocd/merges","archive_url":"https://api.github.com/repos/gocd/gocd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gocd/gocd/downloads","issues_url":"https://api.github.com/repos/gocd/gocd/issues{/number}","pulls_url":"https://api.github.com/repos/gocd/gocd/pulls{/number}","milestones_url":"https://api.github.com/repos/gocd/gocd/milestones{/number}","notifications_url":"https://api.github.com/repos/gocd/gocd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gocd/gocd/labels{/name}","releases_url":"https://api.github.com/repos/gocd/gocd/releases{/id}","deployments_url":"https://api.github.com/repos/gocd/gocd/deployments","created_at":"2013-12-13T05:26:16Z","updated_at":"2016-09-14T04:18:04Z","pushed_at":"2016-09-14T14:15:01Z","git_url":"git://github.com/gocd/gocd.git","ssh_url":"git@github.com:gocd/gocd.git","clone_url":"https://github.com/gocd/gocd.git","svn_url":"https://github.com/gocd/gocd","homepage":"https://go.cd","size":311968,"stargazers_count":2574,"watchers_count":2574,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":476,"mirror_url":null,"open_issues_count":635,"forks":476,"open_issues":635,"watchers":2574,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gocd/gocd/pulls/2686"},"html":{"href":"https://github.com/gocd/gocd/pull/2686"},"issue":{"href":"https://api.github.com/repos/gocd/gocd/issues/2686"},"comments":{"href":"https://api.github.com/repos/gocd/gocd/issues/2686/comments"},"review_comments":{"href":"https://api.github.com/repos/gocd/gocd/pulls/2686/comments"},"review_comment":{"href":"https://api.github.com/repos/gocd/gocd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gocd/gocd/pulls/2686/commits"},"statuses":{"href":"https://api.github.com/repos/gocd/gocd/statuses/de0badae87bb7b4867819987490be1db3ab0c7d6"}}}}
{"actor":{"display_login":"iamsumanth"}}