{"action":"created","comment":{"url":"https://api.github.com/repos/jupyter-incubator/dashboards/pulls/comments/44586349","id":44586349,"diff_hunk":"@@ -17,53 +25,46 @@ define(['jquery', 'Thebe', 'urth-common/error-log'], function($, Thebe, ErrorLog\n         return null;\n     }\n \n-    function initThebe(args) {\n-        thebe = new Thebe.Thebe({\n-            url: args.url,\n-            debug: false,\n-            append_kernel_controls_to: 'body',\n-            next_cell_shortcut: false,\n-            inject_css: false, // don't pull in mathjax, jqueryui, etc. for now\n-            tmpnb_mode: Urth.tmpnb_mode || false,\n-            kernel_name: Urth.kernel_name,\n-            load_css: false\n-        });\n-\n-        window.IPython.notebook = thebe.notebook;\n-        //  A Hack for exposing the base_url to the urth widgets\n-        thebe.notebook.base_url = '/';\n-\n-        // show a busy indicator when communicating with kernel\n-        var debounced;\n-        thebe.events.on('kernel_busy.Kernel kernel_idle.Kernel', function(event) {\n-            clearTimeout(debounced);\n-            debounced = setTimeout(function() {\n-                var isBusy = event.type === 'kernel_busy';\n-                $('.busy-indicator')\n-                    .toggleClass('show', isBusy)\n-                    // Prevent progress animation when hidden by removing 'active' class.\n-                    .find('.progress-bar')\n-                        .toggleClass('active', isBusy);\n-            }, 500);\n-        });\n+    function initKernel(args) {\n+        var kernelReady = $.Deferred();\n+\n+        // TODO\n+        // 1. Figure out how to load `display_data` comm messages (includes source for matplotlib, styling, etc)\n+        // 2. Create this global, so extensions like matplotlib can register a comm callback:\n+        //      IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm)\n+\n+        var options = {\n+            baseUrl: 'http://192.168.99.100:9500',\n+            wsUrl: 'ws://192.168.99.100:9500',\n+            name: 'python3'\n+        };\n+        Services.startNewKernel(options).then(function(_kernel) {\n+            kernel = _kernel;\n+\n+            // show a busy indicator when communicating with kernel\n+            var debounced;\n+            kernel.statusChanged.connect(function(_kernel, status) {\n+                clearTimeout(debounced);\n+                debounced = setTimeout(function() {\n+                    var isBusy = status === Services.KernelStatus.Busy;\n+                    $('.busy-indicator')\n+                        .toggleClass('show', isBusy)\n+                        // Prevent progress animation when hidden by removing 'active' class.\n+                        .find('.progress-bar')\n+                            .toggleClass('active', isBusy);\n+                }, 500);\n+            });\n+            kernel.commOpened.connect(function(_kernel, commMsg) {\n+                var comm = kernel.connectToComm(commMsg.target_name, commMsg.comm_id);\n+            });\n \n-        // override this function since it messes with images (invoking jquery.resizable on them)\n-        IPython.OutputArea.prototype._dblclick_to_reset_size = function() {};\n+            // TODO IPython.notebook.events.emit('kernel_connected.Kernel', {data: kernel});\n+            //          ==> IPyWidgets expects `kernel` to have `.comm_manager.new_comm`\n \n-        // hook the error handler to kernel / session events\n-        thebe.events.on('kernel_created.Kernel kernel_created.Session', function(e) {\n-            ErrorLog.enable(window.IPython);\n+            kernelReady.resolve();\n         });\n \n-        // finally, let's start the kernel (rather than waiting for it to be lazily loaded)\n-        var kernel_ready = new $.Deferred();\n-        if(Urth.tmpnb_mode) {\n-            thebe.call_spawn(kernel_ready.resolve);","path":"urth/dashboard/converter/static/urth/dashboard.js","position":100,"original_position":100,"commit_id":"7cdd0fdcc2466b3eb2bbe196250fe1c8733e5d36","original_commit_id":"7cdd0fdcc2466b3eb2bbe196250fe1c8733e5d36","user":{"login":"parente","id":153745,"avatar_url":"https://avatars.githubusercontent.com/u/153745?v=3","gravatar_id":"","url":"https://api.github.com/users/parente","html_url":"https://github.com/parente","followers_url":"https://api.github.com/users/parente/followers","following_url":"https://api.github.com/users/parente/following{/other_user}","gists_url":"https://api.github.com/users/parente/gists{/gist_id}","starred_url":"https://api.github.com/users/parente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parente/subscriptions","organizations_url":"https://api.github.com/users/parente/orgs","repos_url":"https://api.github.com/users/parente/repos","events_url":"https://api.github.com/users/parente/events{/privacy}","received_events_url":"https://api.github.com/users/parente/received_events","type":"User","site_admin":false},"body":"Reminder: Need to implement spawn ahead of kernel request if we're sticking with tmpnb, or binder, or some other container provisioner.","created_at":"2015-11-11T21:08:11Z","updated_at":"2015-11-11T21:08:11Z","html_url":"https://github.com/jupyter-incubator/dashboards/pull/127#discussion_r44586349","pull_request_url":"https://api.github.com/repos/jupyter-incubator/dashboards/pulls/127","_links":{"self":{"href":"https://api.github.com/repos/jupyter-incubator/dashboards/pulls/comments/44586349"},"html":{"href":"https://github.com/jupyter-incubator/dashboards/pull/127#discussion_r44586349"},"pull_request":{"href":"https://api.github.com/repos/jupyter-incubator/dashboards/pulls/127"}}},"pull_request":{"url":"https://api.github.com/repos/jupyter-incubator/dashboards/pulls/127","id":50434164,"html_url":"https://github.com/jupyter-incubator/dashboards/pull/127","diff_url":"https://github.com/jupyter-incubator/dashboards/pull/127.diff","patch_url":"https://github.com/jupyter-incubator/dashboards/pull/127.patch","issue_url":"https://api.github.com/repos/jupyter-incubator/dashboards/issues/127","number":127,"state":"open","locked":false,"title":"WIP: Migrate to jupyter-js-services","user":{"login":"jhpedemonte","id":711365,"avatar_url":"https://avatars.githubusercontent.com/u/711365?v=3","gravatar_id":"","url":"https://api.github.com/users/jhpedemonte","html_url":"https://github.com/jhpedemonte","followers_url":"https://api.github.com/users/jhpedemonte/followers","following_url":"https://api.github.com/users/jhpedemonte/following{/other_user}","gists_url":"https://api.github.com/users/jhpedemonte/gists{/gist_id}","starred_url":"https://api.github.com/users/jhpedemonte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhpedemonte/subscriptions","organizations_url":"https://api.github.com/users/jhpedemonte/orgs","repos_url":"https://api.github.com/users/jhpedemonte/repos","events_url":"https://api.github.com/users/jhpedemonte/events{/privacy}","received_events_url":"https://api.github.com/users/jhpedemonte/received_events","type":"User","site_admin":false},"body":"Based on 4.x branch.\r\n\r\nThis works for simple notebooks which don't contain widgets.\r\n\r\nRef #105 ","created_at":"2015-11-11T20:48:02Z","updated_at":"2015-11-11T21:08:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jupyter-incubator/dashboards/pulls/127/commits","review_comments_url":"https://api.github.com/repos/jupyter-incubator/dashboards/pulls/127/comments","review_comment_url":"https://api.github.com/repos/jupyter-incubator/dashboards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jupyter-incubator/dashboards/issues/127/comments","statuses_url":"https://api.github.com/repos/jupyter-incubator/dashboards/statuses/7cdd0fdcc2466b3eb2bbe196250fe1c8733e5d36","head":{"label":"jhpedemonte:migrate-to-jupyter-js-services-105","ref":"migrate-to-jupyter-js-services-105","sha":"7cdd0fdcc2466b3eb2bbe196250fe1c8733e5d36","user":{"login":"jhpedemonte","id":711365,"avatar_url":"https://avatars.githubusercontent.com/u/711365?v=3","gravatar_id":"","url":"https://api.github.com/users/jhpedemonte","html_url":"https://github.com/jhpedemonte","followers_url":"https://api.github.com/users/jhpedemonte/followers","following_url":"https://api.github.com/users/jhpedemonte/following{/other_user}","gists_url":"https://api.github.com/users/jhpedemonte/gists{/gist_id}","starred_url":"https://api.github.com/users/jhpedemonte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhpedemonte/subscriptions","organizations_url":"https://api.github.com/users/jhpedemonte/orgs","repos_url":"https://api.github.com/users/jhpedemonte/repos","events_url":"https://api.github.com/users/jhpedemonte/events{/privacy}","received_events_url":"https://api.github.com/users/jhpedemonte/received_events","type":"User","site_admin":false},"repo":{"id":43394279,"name":"dashboards","full_name":"jhpedemonte/dashboards","owner":{"login":"jhpedemonte","id":711365,"avatar_url":"https://avatars.githubusercontent.com/u/711365?v=3","gravatar_id":"","url":"https://api.github.com/users/jhpedemonte","html_url":"https://github.com/jhpedemonte","followers_url":"https://api.github.com/users/jhpedemonte/followers","following_url":"https://api.github.com/users/jhpedemonte/following{/other_user}","gists_url":"https://api.github.com/users/jhpedemonte/gists{/gist_id}","starred_url":"https://api.github.com/users/jhpedemonte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhpedemonte/subscriptions","organizations_url":"https://api.github.com/users/jhpedemonte/orgs","repos_url":"https://api.github.com/users/jhpedemonte/repos","events_url":"https://api.github.com/users/jhpedemonte/events{/privacy}","received_events_url":"https://api.github.com/users/jhpedemonte/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jhpedemonte/dashboards","description":"Jupyter Dynamic Dashboards from Notebooks","fork":true,"url":"https://api.github.com/repos/jhpedemonte/dashboards","forks_url":"https://api.github.com/repos/jhpedemonte/dashboards/forks","keys_url":"https://api.github.com/repos/jhpedemonte/dashboards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jhpedemonte/dashboards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jhpedemonte/dashboards/teams","hooks_url":"https://api.github.com/repos/jhpedemonte/dashboards/hooks","issue_events_url":"https://api.github.com/repos/jhpedemonte/dashboards/issues/events{/number}","events_url":"https://api.github.com/repos/jhpedemonte/dashboards/events","assignees_url":"https://api.github.com/repos/jhpedemonte/dashboards/assignees{/user}","branches_url":"https://api.github.com/repos/jhpedemonte/dashboards/branches{/branch}","tags_url":"https://api.github.com/repos/jhpedemonte/dashboards/tags","blobs_url":"https://api.github.com/repos/jhpedemonte/dashboards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jhpedemonte/dashboards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jhpedemonte/dashboards/git/refs{/sha}","trees_url":"https://api.github.com/repos/jhpedemonte/dashboards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jhpedemonte/dashboards/statuses/{sha}","languages_url":"https://api.github.com/repos/jhpedemonte/dashboards/languages","stargazers_url":"https://api.github.com/repos/jhpedemonte/dashboards/stargazers","contributors_url":"https://api.github.com/repos/jhpedemonte/dashboards/contributors","subscribers_url":"https://api.github.com/repos/jhpedemonte/dashboards/subscribers","subscription_url":"https://api.github.com/repos/jhpedemonte/dashboards/subscription","commits_url":"https://api.github.com/repos/jhpedemonte/dashboards/commits{/sha}","git_commits_url":"https://api.github.com/repos/jhpedemonte/dashboards/git/commits{/sha}","comments_url":"https://api.github.com/repos/jhpedemonte/dashboards/comments{/number}","issue_comment_url":"https://api.github.com/repos/jhpedemonte/dashboards/issues/comments{/number}","contents_url":"https://api.github.com/repos/jhpedemonte/dashboards/contents/{+path}","compare_url":"https://api.github.com/repos/jhpedemonte/dashboards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jhpedemonte/dashboards/merges","archive_url":"https://api.github.com/repos/jhpedemonte/dashboards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jhpedemonte/dashboards/downloads","issues_url":"https://api.github.com/repos/jhpedemonte/dashboards/issues{/number}","pulls_url":"https://api.github.com/repos/jhpedemonte/dashboards/pulls{/number}","milestones_url":"https://api.github.com/repos/jhpedemonte/dashboards/milestones{/number}","notifications_url":"https://api.github.com/repos/jhpedemonte/dashboards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jhpedemonte/dashboards/labels{/name}","releases_url":"https://api.github.com/repos/jhpedemonte/dashboards/releases{/id}","created_at":"2015-09-29T21:01:52Z","updated_at":"2015-09-29T21:01:54Z","pushed_at":"2015-11-11T20:46:45Z","git_url":"git://github.com/jhpedemonte/dashboards.git","ssh_url":"git@github.com:jhpedemonte/dashboards.git","clone_url":"https://github.com/jhpedemonte/dashboards.git","svn_url":"https://github.com/jhpedemonte/dashboards","homepage":null,"size":7863,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"jupyter-incubator:master","ref":"master","sha":"b628c0059f2da06b7bbf4af4ecd1a36ac95d0af8","user":{"login":"jupyter-incubator","id":14002361,"avatar_url":"https://avatars.githubusercontent.com/u/14002361?v=3","gravatar_id":"","url":"https://api.github.com/users/jupyter-incubator","html_url":"https://github.com/jupyter-incubator","followers_url":"https://api.github.com/users/jupyter-incubator/followers","following_url":"https://api.github.com/users/jupyter-incubator/following{/other_user}","gists_url":"https://api.github.com/users/jupyter-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/jupyter-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jupyter-incubator/subscriptions","organizations_url":"https://api.github.com/users/jupyter-incubator/orgs","repos_url":"https://api.github.com/users/jupyter-incubator/repos","events_url":"https://api.github.com/users/jupyter-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/jupyter-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":42875798,"name":"dashboards","full_name":"jupyter-incubator/dashboards","owner":{"login":"jupyter-incubator","id":14002361,"avatar_url":"https://avatars.githubusercontent.com/u/14002361?v=3","gravatar_id":"","url":"https://api.github.com/users/jupyter-incubator","html_url":"https://github.com/jupyter-incubator","followers_url":"https://api.github.com/users/jupyter-incubator/followers","following_url":"https://api.github.com/users/jupyter-incubator/following{/other_user}","gists_url":"https://api.github.com/users/jupyter-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/jupyter-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jupyter-incubator/subscriptions","organizations_url":"https://api.github.com/users/jupyter-incubator/orgs","repos_url":"https://api.github.com/users/jupyter-incubator/repos","events_url":"https://api.github.com/users/jupyter-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/jupyter-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jupyter-incubator/dashboards","description":"Jupyter Dynamic Dashboards from Notebooks","fork":false,"url":"https://api.github.com/repos/jupyter-incubator/dashboards","forks_url":"https://api.github.com/repos/jupyter-incubator/dashboards/forks","keys_url":"https://api.github.com/repos/jupyter-incubator/dashboards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jupyter-incubator/dashboards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jupyter-incubator/dashboards/teams","hooks_url":"https://api.github.com/repos/jupyter-incubator/dashboards/hooks","issue_events_url":"https://api.github.com/repos/jupyter-incubator/dashboards/issues/events{/number}","events_url":"https://api.github.com/repos/jupyter-incubator/dashboards/events","assignees_url":"https://api.github.com/repos/jupyter-incubator/dashboards/assignees{/user}","branches_url":"https://api.github.com/repos/jupyter-incubator/dashboards/branches{/branch}","tags_url":"https://api.github.com/repos/jupyter-incubator/dashboards/tags","blobs_url":"https://api.github.com/repos/jupyter-incubator/dashboards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jupyter-incubator/dashboards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jupyter-incubator/dashboards/git/refs{/sha}","trees_url":"https://api.github.com/repos/jupyter-incubator/dashboards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jupyter-incubator/dashboards/statuses/{sha}","languages_url":"https://api.github.com/repos/jupyter-incubator/dashboards/languages","stargazers_url":"https://api.github.com/repos/jupyter-incubator/dashboards/stargazers","contributors_url":"https://api.github.com/repos/jupyter-incubator/dashboards/contributors","subscribers_url":"https://api.github.com/repos/jupyter-incubator/dashboards/subscribers","subscription_url":"https://api.github.com/repos/jupyter-incubator/dashboards/subscription","commits_url":"https://api.github.com/repos/jupyter-incubator/dashboards/commits{/sha}","git_commits_url":"https://api.github.com/repos/jupyter-incubator/dashboards/git/commits{/sha}","comments_url":"https://api.github.com/repos/jupyter-incubator/dashboards/comments{/number}","issue_comment_url":"https://api.github.com/repos/jupyter-incubator/dashboards/issues/comments{/number}","contents_url":"https://api.github.com/repos/jupyter-incubator/dashboards/contents/{+path}","compare_url":"https://api.github.com/repos/jupyter-incubator/dashboards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jupyter-incubator/dashboards/merges","archive_url":"https://api.github.com/repos/jupyter-incubator/dashboards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jupyter-incubator/dashboards/downloads","issues_url":"https://api.github.com/repos/jupyter-incubator/dashboards/issues{/number}","pulls_url":"https://api.github.com/repos/jupyter-incubator/dashboards/pulls{/number}","milestones_url":"https://api.github.com/repos/jupyter-incubator/dashboards/milestones{/number}","notifications_url":"https://api.github.com/repos/jupyter-incubator/dashboards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jupyter-incubator/dashboards/labels{/name}","releases_url":"https://api.github.com/repos/jupyter-incubator/dashboards/releases{/id}","created_at":"2015-09-21T15:39:29Z","updated_at":"2015-11-11T00:23:02Z","pushed_at":"2015-11-11T20:51:33Z","git_url":"git://github.com/jupyter-incubator/dashboards.git","ssh_url":"git@github.com:jupyter-incubator/dashboards.git","clone_url":"https://github.com/jupyter-incubator/dashboards.git","svn_url":"https://github.com/jupyter-incubator/dashboards","homepage":null,"size":8541,"stargazers_count":23,"watchers_count":23,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":17,"forks":8,"open_issues":17,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jupyter-incubator/dashboards/pulls/127"},"html":{"href":"https://github.com/jupyter-incubator/dashboards/pull/127"},"issue":{"href":"https://api.github.com/repos/jupyter-incubator/dashboards/issues/127"},"comments":{"href":"https://api.github.com/repos/jupyter-incubator/dashboards/issues/127/comments"},"review_comments":{"href":"https://api.github.com/repos/jupyter-incubator/dashboards/pulls/127/comments"},"review_comment":{"href":"https://api.github.com/repos/jupyter-incubator/dashboards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jupyter-incubator/dashboards/pulls/127/commits"},"statuses":{"href":"https://api.github.com/repos/jupyter-incubator/dashboards/statuses/7cdd0fdcc2466b3eb2bbe196250fe1c8733e5d36"}}}}