GitHub PullRequestReviewCommentEvent at 2014-07-07 18:53:09
Repository: activator
Actor: havocp
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/typesafehub/activator/pulls/comments/14614848","id":14614848,"diff_hunk":"@@ -0,0 +1,123 @@\n+/*\n+ Copyright (C) 2014 Typesafe, Inc <http://typesafe.com>\n+ */\n+define(['commons/utils', 'commons/streams', 'commons/settings', 'services/build'], function(utils, streams, settings, build) {\n+\n+  var nodeName = settings.observable(\"appDynamics.nodeName\", \"activator-\"+new Date().getTime());\n+  var tierName = settings.observable(\"appDynamics.tierName\", \"development\");\n+  var hostName = settings.observable(\"appDynamics.hostName\", \"\");\n+  var port = settings.observable(\"appDynamics.port\", 443);\n+  var sslEnabled = settings.observable(\"appDynamics.sslEnabled\", true);\n+  var accountName = settings.observable(\"appDynamics.accountName\", \"\");\n+  var accessKey = settings.observable(\"appDynamics.accessKey\", \"\");\n+\n+  function adMessage(type) {\n+    return { request: 'AppDynamicsRequest', type: type };\n+  }\n+\n+  function adMessageWith(type,attributes) {\n+    return jQuery.extend(adMessage(type), attributes);\n+  }\n+\n+  var validNodeName = /^[0-9a-z@\\._-]{1,40}$/i;\n+  var validTierName = /^[0-9a-z@\\._-]{1,40}$/i;\n+  var validUsername = /^.{1,40}$/i;\n+  var validPassword = /^[0-9a-z@\\.,-\\/#!$%\\^&\\*;:{}=\\-_`~()]{1,40}$/i;\n+  var validPort = {\n+    test: function(v) {\n+      var n = Number(v);\n+      return (n > 0) && (n < 65536);\n+    }\n+  };\n+  var validAccountName = validNodeName;\n+  var validAccessKey = /^[0-9a-z]{12}$/i;\n+  var validHostName = /^[0-9a-z][0-9a-z\\.\\-$*_]{1,128}/i;\n+\n+  var appDynamics = utils.Singleton({\n+    init: function() {\n+      var self = this;\n+      self.validNodeName = validNodeName;\n+      self.validTierName = validTierName;\n+      self.validUsername = validUsername;\n+      self.validPassword = validPassword;\n+      self.validPort = validPort;\n+      self.validAccountName = validAccountName;\n+      self.validAccessKey = validAccessKey;\n+      self.validHostName = validHostName;\n+\n+      self.hostName = hostName;\n+      self.port = port;\n+      self.sslEnabled = sslEnabled;\n+      self.accountName = accountName;\n+      self.accessKey = accessKey;\n+      self.nodeName = nodeName;\n+      self.tierName = tierName;","path":"ui/app/assets/services/appdynamics.js","position":54,"original_position":54,"commit_id":"056a73ce352835baea2e4f434c2bf26b79c28254","original_commit_id":"056a73ce352835baea2e4f434c2bf26b79c28254","user":{"login":"havocp","id":218689,"avatar_url":"https://avatars.githubusercontent.com/u/218689?","gravatar_id":"874f23791a8b1efcd1dcaee1851daa1b","url":"https://api.github.com/users/havocp","html_url":"https://github.com/havocp","followers_url":"https://api.github.com/users/havocp/followers","following_url":"https://api.github.com/users/havocp/following{/other_user}","gists_url":"https://api.github.com/users/havocp/gists{/gist_id}","starred_url":"https://api.github.com/users/havocp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/havocp/subscriptions","organizations_url":"https://api.github.com/users/havocp/orgs","repos_url":"https://api.github.com/users/havocp/repos","events_url":"https://api.github.com/users/havocp/events{/privacy}","received_events_url":"https://api.github.com/users/havocp/received_events","type":"User","site_admin":false},"body":"I guess this is to get all these module-level vars into scope for the html template? I think I'd just either use the module itself as the model for the html (thus avoiding this singleton instance), OR define the vars here in the singleton as fields rather than outside in module scope.","created_at":"2014-07-07T18:53:09Z","updated_at":"2014-07-07T18:53:09Z","html_url":"https://github.com/typesafehub/activator/pull/586#discussion_r14614848","pull_request_url":"https://api.github.com/repos/typesafehub/activator/pulls/586","_links":{"self":{"href":"https://api.github.com/repos/typesafehub/activator/pulls/comments/14614848"},"html":{"href":"https://github.com/typesafehub/activator/pull/586#discussion_r14614848"},"pull_request":{"href":"https://api.github.com/repos/typesafehub/activator/pulls/586"}}},"pull_request":{"url":"https://api.github.com/repos/typesafehub/activator/pulls/586","id":17959811,"html_url":"https://github.com/typesafehub/activator/pull/586","diff_url":"https://github.com/typesafehub/activator/pull/586.diff","patch_url":"https://github.com/typesafehub/activator/pull/586.patch","issue_url":"https://api.github.com/repos/typesafehub/activator/issues/586","number":586,"state":"open","title":"Partner Monitoring","user":{"login":"corruptmemory","id":45328,"avatar_url":"https://avatars.githubusercontent.com/u/45328?","gravatar_id":"6acf22b01b8194c14064fd80c772eaca","url":"https://api.github.com/users/corruptmemory","html_url":"https://github.com/corruptmemory","followers_url":"https://api.github.com/users/corruptmemory/followers","following_url":"https://api.github.com/users/corruptmemory/following{/other_user}","gists_url":"https://api.github.com/users/corruptmemory/gists{/gist_id}","starred_url":"https://api.github.com/users/corruptmemory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corruptmemory/subscriptions","organizations_url":"https://api.github.com/users/corruptmemory/orgs","repos_url":"https://api.github.com/users/corruptmemory/repos","events_url":"https://api.github.com/users/corruptmemory/events{/privacy}","received_events_url":"https://api.github.com/users/corruptmemory/received_events","type":"User","site_admin":false},"body":"Pretty big PR.  Didn't squash because there are several upstream merges.\r\n\r\n* Adds a \"Monitoring\" tab and enables pulling-in New Relic and/or AppDynamics monitoring support","created_at":"2014-07-03T18:12:51Z","updated_at":"2014-07-07T18:53:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1346ff90bcc76662bddf052cb894601010b8ec60","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/typesafehub/activator/pulls/586/commits","review_comments_url":"https://api.github.com/repos/typesafehub/activator/pulls/586/comments","review_comment_url":"https://api.github.com/repos/typesafehub/activator/pulls/comments/{number}","comments_url":"https://api.github.com/repos/typesafehub/activator/issues/586/comments","statuses_url":"https://api.github.com/repos/typesafehub/activator/statuses/056a73ce352835baea2e4f434c2bf26b79c28254","head":{"label":"typesafehub:monitoring","ref":"monitoring","sha":"056a73ce352835baea2e4f434c2bf26b79c28254","user":{"login":"typesafehub","id":784923,"avatar_url":"https://avatars.githubusercontent.com/u/784923?","gravatar_id":"c2651ca793557fc38d7b90b064ec791b","url":"https://api.github.com/users/typesafehub","html_url":"https://github.com/typesafehub","followers_url":"https://api.github.com/users/typesafehub/followers","following_url":"https://api.github.com/users/typesafehub/following{/other_user}","gists_url":"https://api.github.com/users/typesafehub/gists{/gist_id}","starred_url":"https://api.github.com/users/typesafehub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typesafehub/subscriptions","organizations_url":"https://api.github.com/users/typesafehub/orgs","repos_url":"https://api.github.com/users/typesafehub/repos","events_url":"https://api.github.com/users/typesafehub/events{/privacy}","received_events_url":"https://api.github.com/users/typesafehub/received_events","type":"Organization","site_admin":false},"repo":{"id":11534519,"name":"activator","full_name":"typesafehub/activator","owner":{"login":"typesafehub","id":784923,"avatar_url":"https://avatars.githubusercontent.com/u/784923?","gravatar_id":"c2651ca793557fc38d7b90b064ec791b","url":"https://api.github.com/users/typesafehub","html_url":"https://github.com/typesafehub","followers_url":"https://api.github.com/users/typesafehub/followers","following_url":"https://api.github.com/users/typesafehub/following{/other_user}","gists_url":"https://api.github.com/users/typesafehub/gists{/gist_id}","starred_url":"https://api.github.com/users/typesafehub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typesafehub/subscriptions","organizations_url":"https://api.github.com/users/typesafehub/orgs","repos_url":"https://api.github.com/users/typesafehub/repos","events_url":"https://api.github.com/users/typesafehub/events{/privacy}","received_events_url":"https://api.github.com/users/typesafehub/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/typesafehub/activator","description":"Typesafe Activator","fork":false,"url":"https://api.github.com/repos/typesafehub/activator","forks_url":"https://api.github.com/repos/typesafehub/activator/forks","keys_url":"https://api.github.com/repos/typesafehub/activator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/typesafehub/activator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/typesafehub/activator/teams","hooks_url":"https://api.github.com/repos/typesafehub/activator/hooks","issue_events_url":"https://api.github.com/repos/typesafehub/activator/issues/events{/number}","events_url":"https://api.github.com/repos/typesafehub/activator/events","assignees_url":"https://api.github.com/repos/typesafehub/activator/assignees{/user}","branches_url":"https://api.github.com/repos/typesafehub/activator/branches{/branch}","tags_url":"https://api.github.com/repos/typesafehub/activator/tags","blobs_url":"https://api.github.com/repos/typesafehub/activator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/typesafehub/activator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/typesafehub/activator/git/refs{/sha}","trees_url":"https://api.github.com/repos/typesafehub/activator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/typesafehub/activator/statuses/{sha}","languages_url":"https://api.github.com/repos/typesafehub/activator/languages","stargazers_url":"https://api.github.com/repos/typesafehub/activator/stargazers","contributors_url":"https://api.github.com/repos/typesafehub/activator/contributors","subscribers_url":"https://api.github.com/repos/typesafehub/activator/subscribers","subscription_url":"https://api.github.com/repos/typesafehub/activator/subscription","commits_url":"https://api.github.com/repos/typesafehub/activator/commits{/sha}","git_commits_url":"https://api.github.com/repos/typesafehub/activator/git/commits{/sha}","comments_url":"https://api.github.com/repos/typesafehub/activator/comments{/number}","issue_comment_url":"https://api.github.com/repos/typesafehub/activator/issues/comments/{number}","contents_url":"https://api.github.com/repos/typesafehub/activator/contents/{+path}","compare_url":"https://api.github.com/repos/typesafehub/activator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/typesafehub/activator/merges","archive_url":"https://api.github.com/repos/typesafehub/activator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/typesafehub/activator/downloads","issues_url":"https://api.github.com/repos/typesafehub/activator/issues{/number}","pulls_url":"https://api.github.com/repos/typesafehub/activator/pulls{/number}","milestones_url":"https://api.github.com/repos/typesafehub/activator/milestones{/number}","notifications_url":"https://api.github.com/repos/typesafehub/activator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/typesafehub/activator/labels{/name}","releases_url":"https://api.github.com/repos/typesafehub/activator/releases{/id}","created_at":"2013-07-19T18:35:50Z","updated_at":"2014-07-06T11:46:23Z","pushed_at":"2014-07-03T18:11:06Z","git_url":"git://github.com/typesafehub/activator.git","ssh_url":"git@github.com:typesafehub/activator.git","clone_url":"https://github.com/typesafehub/activator.git","svn_url":"https://github.com/typesafehub/activator","homepage":"http://typesafe.com/activator","size":25305,"stargazers_count":168,"watchers_count":168,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":49,"mirror_url":null,"open_issues_count":86,"forks":49,"open_issues":86,"watchers":168,"default_branch":"master"}},"base":{"label":"typesafehub:master","ref":"master","sha":"17411b24fbb52e6e31bed334a5ab1c0cfd6ac81e","user":{"login":"typesafehub","id":784923,"avatar_url":"https://avatars.githubusercontent.com/u/784923?","gravatar_id":"c2651ca793557fc38d7b90b064ec791b","url":"https://api.github.com/users/typesafehub","html_url":"https://github.com/typesafehub","followers_url":"https://api.github.com/users/typesafehub/followers","following_url":"https://api.github.com/users/typesafehub/following{/other_user}","gists_url":"https://api.github.com/users/typesafehub/gists{/gist_id}","starred_url":"https://api.github.com/users/typesafehub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typesafehub/subscriptions","organizations_url":"https://api.github.com/users/typesafehub/orgs","repos_url":"https://api.github.com/users/typesafehub/repos","events_url":"https://api.github.com/users/typesafehub/events{/privacy}","received_events_url":"https://api.github.com/users/typesafehub/received_events","type":"Organization","site_admin":false},"repo":{"id":11534519,"name":"activator","full_name":"typesafehub/activator","owner":{"login":"typesafehub","id":784923,"avatar_url":"https://avatars.githubusercontent.com/u/784923?","gravatar_id":"c2651ca793557fc38d7b90b064ec791b","url":"https://api.github.com/users/typesafehub","html_url":"https://github.com/typesafehub","followers_url":"https://api.github.com/users/typesafehub/followers","following_url":"https://api.github.com/users/typesafehub/following{/other_user}","gists_url":"https://api.github.com/users/typesafehub/gists{/gist_id}","starred_url":"https://api.github.com/users/typesafehub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typesafehub/subscriptions","organizations_url":"https://api.github.com/users/typesafehub/orgs","repos_url":"https://api.github.com/users/typesafehub/repos","events_url":"https://api.github.com/users/typesafehub/events{/privacy}","received_events_url":"https://api.github.com/users/typesafehub/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/typesafehub/activator","description":"Typesafe Activator","fork":false,"url":"https://api.github.com/repos/typesafehub/activator","forks_url":"https://api.github.com/repos/typesafehub/activator/forks","keys_url":"https://api.github.com/repos/typesafehub/activator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/typesafehub/activator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/typesafehub/activator/teams","hooks_url":"https://api.github.com/repos/typesafehub/activator/hooks","issue_events_url":"https://api.github.com/repos/typesafehub/activator/issues/events{/number}","events_url":"https://api.github.com/repos/typesafehub/activator/events","assignees_url":"https://api.github.com/repos/typesafehub/activator/assignees{/user}","branches_url":"https://api.github.com/repos/typesafehub/activator/branches{/branch}","tags_url":"https://api.github.com/repos/typesafehub/activator/tags","blobs_url":"https://api.github.com/repos/typesafehub/activator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/typesafehub/activator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/typesafehub/activator/git/refs{/sha}","trees_url":"https://api.github.com/repos/typesafehub/activator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/typesafehub/activator/statuses/{sha}","languages_url":"https://api.github.com/repos/typesafehub/activator/languages","stargazers_url":"https://api.github.com/repos/typesafehub/activator/stargazers","contributors_url":"https://api.github.com/repos/typesafehub/activator/contributors","subscribers_url":"https://api.github.com/repos/typesafehub/activator/subscribers","subscription_url":"https://api.github.com/repos/typesafehub/activator/subscription","commits_url":"https://api.github.com/repos/typesafehub/activator/commits{/sha}","git_commits_url":"https://api.github.com/repos/typesafehub/activator/git/commits{/sha}","comments_url":"https://api.github.com/repos/typesafehub/activator/comments{/number}","issue_comment_url":"https://api.github.com/repos/typesafehub/activator/issues/comments/{number}","contents_url":"https://api.github.com/repos/typesafehub/activator/contents/{+path}","compare_url":"https://api.github.com/repos/typesafehub/activator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/typesafehub/activator/merges","archive_url":"https://api.github.com/repos/typesafehub/activator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/typesafehub/activator/downloads","issues_url":"https://api.github.com/repos/typesafehub/activator/issues{/number}","pulls_url":"https://api.github.com/repos/typesafehub/activator/pulls{/number}","milestones_url":"https://api.github.com/repos/typesafehub/activator/milestones{/number}","notifications_url":"https://api.github.com/repos/typesafehub/activator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/typesafehub/activator/labels{/name}","releases_url":"https://api.github.com/repos/typesafehub/activator/releases{/id}","created_at":"2013-07-19T18:35:50Z","updated_at":"2014-07-06T11:46:23Z","pushed_at":"2014-07-03T18:11:06Z","git_url":"git://github.com/typesafehub/activator.git","ssh_url":"git@github.com:typesafehub/activator.git","clone_url":"https://github.com/typesafehub/activator.git","svn_url":"https://github.com/typesafehub/activator","homepage":"http://typesafe.com/activator","size":25305,"stargazers_count":168,"watchers_count":168,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":49,"mirror_url":null,"open_issues_count":86,"forks":49,"open_issues":86,"watchers":168,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/typesafehub/activator/pulls/586"},"html":{"href":"https://github.com/typesafehub/activator/pull/586"},"issue":{"href":"https://api.github.com/repos/typesafehub/activator/issues/586"},"comments":{"href":"https://api.github.com/repos/typesafehub/activator/issues/586/comments"},"review_comments":{"href":"https://api.github.com/repos/typesafehub/activator/pulls/586/comments"},"review_comment":{"href":"https://api.github.com/repos/typesafehub/activator/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/typesafehub/activator/pulls/586/commits"},"statuses":{"href":"https://api.github.com/repos/typesafehub/activator/statuses/056a73ce352835baea2e4f434c2bf26b79c28254"}}}}