{"action":"created","comment":{"url":"https://api.github.com/repos/OpenROV/openrov-software/pulls/comments/26785211","id":26785211,"diff_hunk":"@@ -11,21 +11,47 @@\n \n   //Cockpit is inheriting from EventEmitter2.\n   var Cockpit = function Cockpit(csocket) {\n-    this.socket = csocket;\n+    var self = this;\n+    this.uiLoader = new window.UiLoader();\n+    this.rov = new window.MessageManager(csocket);\n     this.sendUpdateEnabled = true;\n     this.capabilities = 0;\n     this.loadedPlugins = [];\n-    this.loadPlugins();\n-    console.log('loaded plugins');\n-    // Register the various event handlers\n-    this.listen();\n+\n+    this.loadUi(function() {\n+      self.extensionPoints = {\n+        rovSettings: $('html /deep/ rov-settings'),\n+        rovDiagnostics: $('html /deep/ rov-diagnostics /deep/ #dropIn'),\n+        videoContainer: $('html /deep/ rov-video'),\n+        keyboardInstructions: $('html /deep/ #keyboardInstructions'),\n+        buttonPanel: $('html /deep/ #buttonPanel'),\n+        menu: $('html /deep/ rov-menu'),\n+        inputController: undefined //will be set by the plugin","path":"src/static/js/cockpit.js","position":24,"original_position":24,"commit_id":"f98165afb16a4221e3d9fd8b81c382af25620d81","original_commit_id":"f98165afb16a4221e3d9fd8b81c382af25620d81","user":{"login":"BrianAdams","id":1471826,"avatar_url":"https://avatars.githubusercontent.com/u/1471826?v=3","gravatar_id":"","url":"https://api.github.com/users/BrianAdams","html_url":"https://github.com/BrianAdams","followers_url":"https://api.github.com/users/BrianAdams/followers","following_url":"https://api.github.com/users/BrianAdams/following{/other_user}","gists_url":"https://api.github.com/users/BrianAdams/gists{/gist_id}","starred_url":"https://api.github.com/users/BrianAdams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrianAdams/subscriptions","organizations_url":"https://api.github.com/users/BrianAdams/orgs","repos_url":"https://api.github.com/users/BrianAdams/repos","events_url":"https://api.github.com/users/BrianAdams/events{/privacy}","received_events_url":"https://api.github.com/users/BrianAdams/received_events","type":"User","site_admin":false},"body":"The input controller as an extensionpoint seems at fist glance to break the mental model of how extensionpoints should work.  Where as the rest of the extension points expose a inner DOM for adding elements, the input control features an API for registering controls.  While I get the concept of your \"extending\" the control model, it seems like a very different type of extension and one what should live outside of the extensionpoints.","created_at":"2015-03-19T18:43:56Z","updated_at":"2015-03-19T18:43:56Z","html_url":"https://github.com/OpenROV/openrov-software/pull/341#discussion_r26785211","pull_request_url":"https://api.github.com/repos/OpenROV/openrov-software/pulls/341","_links":{"self":{"href":"https://api.github.com/repos/OpenROV/openrov-software/pulls/comments/26785211"},"html":{"href":"https://github.com/OpenROV/openrov-software/pull/341#discussion_r26785211"},"pull_request":{"href":"https://api.github.com/repos/OpenROV/openrov-software/pulls/341"}}},"pull_request":{"url":"https://api.github.com/repos/OpenROV/openrov-software/pulls/341","id":30458220,"html_url":"https://github.com/OpenROV/openrov-software/pull/341","diff_url":"https://github.com/OpenROV/openrov-software/pull/341.diff","patch_url":"https://github.com/OpenROV/openrov-software/pull/341.patch","issue_url":"https://api.github.com/repos/OpenROV/openrov-software/issues/341","number":341,"state":"open","locked":false,"title":"Eric's new UI and massive cleanup ","user":{"login":"codewithpassion","id":1607486,"avatar_url":"https://avatars.githubusercontent.com/u/1607486?v=3","gravatar_id":"","url":"https://api.github.com/users/codewithpassion","html_url":"https://github.com/codewithpassion","followers_url":"https://api.github.com/users/codewithpassion/followers","following_url":"https://api.github.com/users/codewithpassion/following{/other_user}","gists_url":"https://api.github.com/users/codewithpassion/gists{/gist_id}","starred_url":"https://api.github.com/users/codewithpassion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codewithpassion/subscriptions","organizations_url":"https://api.github.com/users/codewithpassion/orgs","repos_url":"https://api.github.com/users/codewithpassion/repos","events_url":"https://api.github.com/users/codewithpassion/events{/privacy}","received_events_url":"https://api.github.com/users/codewithpassion/received_events","type":"User","site_admin":false},"body":"This PR contains:\r\n\r\n- Cleanup of a lot of standard plugins (especially capestatus and rovpilot)\r\n- Move of logic (especially capestatus and rovpilot) to NodeJS and restructuring of messaging (for external language bindings via socket.io)\r\n- Move to webcomponents of a lot of UI\r\n- Adding of Eric's new UI\r\n- Adding UI selector plugin\r\n","created_at":"2015-03-04T11:42:42Z","updated_at":"2015-03-19T18:43:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8c6658d3c87863a012827f50779e8f7760feb17e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OpenROV/openrov-software/pulls/341/commits","review_comments_url":"https://api.github.com/repos/OpenROV/openrov-software/pulls/341/comments","review_comment_url":"https://api.github.com/repos/OpenROV/openrov-software/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenROV/openrov-software/issues/341/comments","statuses_url":"https://api.github.com/repos/OpenROV/openrov-software/statuses/f98165afb16a4221e3d9fd8b81c382af25620d81","head":{"label":"codewithpassion:feature/new-ui","ref":"feature/new-ui","sha":"f98165afb16a4221e3d9fd8b81c382af25620d81","user":{"login":"codewithpassion","id":1607486,"avatar_url":"https://avatars.githubusercontent.com/u/1607486?v=3","gravatar_id":"","url":"https://api.github.com/users/codewithpassion","html_url":"https://github.com/codewithpassion","followers_url":"https://api.github.com/users/codewithpassion/followers","following_url":"https://api.github.com/users/codewithpassion/following{/other_user}","gists_url":"https://api.github.com/users/codewithpassion/gists{/gist_id}","starred_url":"https://api.github.com/users/codewithpassion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codewithpassion/subscriptions","organizations_url":"https://api.github.com/users/codewithpassion/orgs","repos_url":"https://api.github.com/users/codewithpassion/repos","events_url":"https://api.github.com/users/codewithpassion/events{/privacy}","received_events_url":"https://api.github.com/users/codewithpassion/received_events","type":"User","site_admin":false},"repo":{"id":5093012,"name":"openrov-software","full_name":"codewithpassion/openrov-software","owner":{"login":"codewithpassion","id":1607486,"avatar_url":"https://avatars.githubusercontent.com/u/1607486?v=3","gravatar_id":"","url":"https://api.github.com/users/codewithpassion","html_url":"https://github.com/codewithpassion","followers_url":"https://api.github.com/users/codewithpassion/followers","following_url":"https://api.github.com/users/codewithpassion/following{/other_user}","gists_url":"https://api.github.com/users/codewithpassion/gists{/gist_id}","starred_url":"https://api.github.com/users/codewithpassion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codewithpassion/subscriptions","organizations_url":"https://api.github.com/users/codewithpassion/orgs","repos_url":"https://api.github.com/users/codewithpassion/repos","events_url":"https://api.github.com/users/codewithpassion/events{/privacy}","received_events_url":"https://api.github.com/users/codewithpassion/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/codewithpassion/openrov-software","description":"","fork":true,"url":"https://api.github.com/repos/codewithpassion/openrov-software","forks_url":"https://api.github.com/repos/codewithpassion/openrov-software/forks","keys_url":"https://api.github.com/repos/codewithpassion/openrov-software/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codewithpassion/openrov-software/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codewithpassion/openrov-software/teams","hooks_url":"https://api.github.com/repos/codewithpassion/openrov-software/hooks","issue_events_url":"https://api.github.com/repos/codewithpassion/openrov-software/issues/events{/number}","events_url":"https://api.github.com/repos/codewithpassion/openrov-software/events","assignees_url":"https://api.github.com/repos/codewithpassion/openrov-software/assignees{/user}","branches_url":"https://api.github.com/repos/codewithpassion/openrov-software/branches{/branch}","tags_url":"https://api.github.com/repos/codewithpassion/openrov-software/tags","blobs_url":"https://api.github.com/repos/codewithpassion/openrov-software/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codewithpassion/openrov-software/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codewithpassion/openrov-software/git/refs{/sha}","trees_url":"https://api.github.com/repos/codewithpassion/openrov-software/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codewithpassion/openrov-software/statuses/{sha}","languages_url":"https://api.github.com/repos/codewithpassion/openrov-software/languages","stargazers_url":"https://api.github.com/repos/codewithpassion/openrov-software/stargazers","contributors_url":"https://api.github.com/repos/codewithpassion/openrov-software/contributors","subscribers_url":"https://api.github.com/repos/codewithpassion/openrov-software/subscribers","subscription_url":"https://api.github.com/repos/codewithpassion/openrov-software/subscription","commits_url":"https://api.github.com/repos/codewithpassion/openrov-software/commits{/sha}","git_commits_url":"https://api.github.com/repos/codewithpassion/openrov-software/git/commits{/sha}","comments_url":"https://api.github.com/repos/codewithpassion/openrov-software/comments{/number}","issue_comment_url":"https://api.github.com/repos/codewithpassion/openrov-software/issues/comments{/number}","contents_url":"https://api.github.com/repos/codewithpassion/openrov-software/contents/{+path}","compare_url":"https://api.github.com/repos/codewithpassion/openrov-software/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codewithpassion/openrov-software/merges","archive_url":"https://api.github.com/repos/codewithpassion/openrov-software/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codewithpassion/openrov-software/downloads","issues_url":"https://api.github.com/repos/codewithpassion/openrov-software/issues{/number}","pulls_url":"https://api.github.com/repos/codewithpassion/openrov-software/pulls{/number}","milestones_url":"https://api.github.com/repos/codewithpassion/openrov-software/milestones{/number}","notifications_url":"https://api.github.com/repos/codewithpassion/openrov-software/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codewithpassion/openrov-software/labels{/name}","releases_url":"https://api.github.com/repos/codewithpassion/openrov-software/releases{/id}","created_at":"2012-07-18T07:27:39Z","updated_at":"2015-03-03T00:48:04Z","pushed_at":"2015-03-06T00:25:07Z","git_url":"git://github.com/codewithpassion/openrov-software.git","ssh_url":"git@github.com:codewithpassion/openrov-software.git","clone_url":"https://github.com/codewithpassion/openrov-software.git","svn_url":"https://github.com/codewithpassion/openrov-software","homepage":"openrov.com","size":30245,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"OpenROV:master","ref":"master","sha":"0928143db451784c496bd5c5d603a967ce5e236b","user":{"login":"OpenROV","id":1270394,"avatar_url":"https://avatars.githubusercontent.com/u/1270394?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenROV","html_url":"https://github.com/OpenROV","followers_url":"https://api.github.com/users/OpenROV/followers","following_url":"https://api.github.com/users/OpenROV/following{/other_user}","gists_url":"https://api.github.com/users/OpenROV/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenROV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenROV/subscriptions","organizations_url":"https://api.github.com/users/OpenROV/orgs","repos_url":"https://api.github.com/users/OpenROV/repos","events_url":"https://api.github.com/users/OpenROV/events{/privacy}","received_events_url":"https://api.github.com/users/OpenROV/received_events","type":"Organization","site_admin":false},"repo":{"id":3070288,"name":"openrov-software","full_name":"OpenROV/openrov-software","owner":{"login":"OpenROV","id":1270394,"avatar_url":"https://avatars.githubusercontent.com/u/1270394?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenROV","html_url":"https://github.com/OpenROV","followers_url":"https://api.github.com/users/OpenROV/followers","following_url":"https://api.github.com/users/OpenROV/following{/other_user}","gists_url":"https://api.github.com/users/OpenROV/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenROV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenROV/subscriptions","organizations_url":"https://api.github.com/users/OpenROV/orgs","repos_url":"https://api.github.com/users/OpenROV/repos","events_url":"https://api.github.com/users/OpenROV/events{/privacy}","received_events_url":"https://api.github.com/users/OpenROV/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenROV/openrov-software","description":"OpenROV Cockpit UI and node.js middleware for driving OpenROV","fork":false,"url":"https://api.github.com/repos/OpenROV/openrov-software","forks_url":"https://api.github.com/repos/OpenROV/openrov-software/forks","keys_url":"https://api.github.com/repos/OpenROV/openrov-software/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenROV/openrov-software/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenROV/openrov-software/teams","hooks_url":"https://api.github.com/repos/OpenROV/openrov-software/hooks","issue_events_url":"https://api.github.com/repos/OpenROV/openrov-software/issues/events{/number}","events_url":"https://api.github.com/repos/OpenROV/openrov-software/events","assignees_url":"https://api.github.com/repos/OpenROV/openrov-software/assignees{/user}","branches_url":"https://api.github.com/repos/OpenROV/openrov-software/branches{/branch}","tags_url":"https://api.github.com/repos/OpenROV/openrov-software/tags","blobs_url":"https://api.github.com/repos/OpenROV/openrov-software/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenROV/openrov-software/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenROV/openrov-software/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenROV/openrov-software/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenROV/openrov-software/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenROV/openrov-software/languages","stargazers_url":"https://api.github.com/repos/OpenROV/openrov-software/stargazers","contributors_url":"https://api.github.com/repos/OpenROV/openrov-software/contributors","subscribers_url":"https://api.github.com/repos/OpenROV/openrov-software/subscribers","subscription_url":"https://api.github.com/repos/OpenROV/openrov-software/subscription","commits_url":"https://api.github.com/repos/OpenROV/openrov-software/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenROV/openrov-software/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenROV/openrov-software/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenROV/openrov-software/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenROV/openrov-software/contents/{+path}","compare_url":"https://api.github.com/repos/OpenROV/openrov-software/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenROV/openrov-software/merges","archive_url":"https://api.github.com/repos/OpenROV/openrov-software/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenROV/openrov-software/downloads","issues_url":"https://api.github.com/repos/OpenROV/openrov-software/issues{/number}","pulls_url":"https://api.github.com/repos/OpenROV/openrov-software/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenROV/openrov-software/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenROV/openrov-software/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenROV/openrov-software/labels{/name}","releases_url":"https://api.github.com/repos/OpenROV/openrov-software/releases{/id}","created_at":"2011-12-29T18:38:37Z","updated_at":"2015-03-18T19:54:08Z","pushed_at":"2015-03-17T07:03:31Z","git_url":"git://github.com/OpenROV/openrov-software.git","ssh_url":"git@github.com:OpenROV/openrov-software.git","clone_url":"https://github.com/OpenROV/openrov-software.git","svn_url":"https://github.com/OpenROV/openrov-software","homepage":"openrov.com","size":31050,"stargazers_count":166,"watchers_count":166,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":92,"mirror_url":null,"open_issues_count":66,"forks":92,"open_issues":66,"watchers":166,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenROV/openrov-software/pulls/341"},"html":{"href":"https://github.com/OpenROV/openrov-software/pull/341"},"issue":{"href":"https://api.github.com/repos/OpenROV/openrov-software/issues/341"},"comments":{"href":"https://api.github.com/repos/OpenROV/openrov-software/issues/341/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenROV/openrov-software/pulls/341/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenROV/openrov-software/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenROV/openrov-software/pulls/341/commits"},"statuses":{"href":"https://api.github.com/repos/OpenROV/openrov-software/statuses/f98165afb16a4221e3d9fd8b81c382af25620d81"}}}}