##// END OF EJS Templates
Address review comments
Thomas Kluyver -
Show More
@@ -19,18 +19,19 b' define(['
19 this.request_kernelspecs();
19 this.request_kernelspecs();
20 }
20 }
21 this.bind_events();
21 this.bind_events();
22 // Make the object globally available for user convenience & inspection
23 IPython.kernelselector = this;
22 };
24 };
23
25
24 KernelSelector.prototype.request_kernelspecs = function() {
26 KernelSelector.prototype.request_kernelspecs = function() {
25 var url = utils.url_join_encode(this.notebook.base_url, 'api/kernelspecs');
27 var url = utils.url_join_encode(this.notebook.base_url, 'api/kernelspecs');
26 $.ajax(url, {success: $.proxy(this.got_kernelspecs, this)});
28 $.ajax(url, {success: $.proxy(this._got_kernelspecs, this)});
27 };
29 };
28
30
29 KernelSelector.prototype.got_kernelspecs = function(data, status, xhr) {
31 KernelSelector.prototype._got_kernelspecs = function(data, status, xhr) {
30 this.kernelspecs = {};
32 this.kernelspecs = {};
31 var menu = this.element.find("#kernel_selector");
33 var menu = this.element.find("#kernel_selector");
32 var change_kernel_submenu = $("#menu-change-kernel-submenu");
34 var change_kernel_submenu = $("#menu-change-kernel-submenu");
33 console.log(change_kernel_submenu);
34 for (var i = 0; i < data.length; i++) {
35 for (var i = 0; i < data.length; i++) {
35 var ks = data[i];
36 var ks = data[i];
36 this.kernelspecs[ks.name] = ks;
37 this.kernelspecs[ks.name] = ks;
@@ -1546,7 +1546,6 b' define(['
1546 if (kernel_name === undefined) {
1546 if (kernel_name === undefined) {
1547 kernel_name = this.default_kernel_name;
1547 kernel_name = this.default_kernel_name;
1548 }
1548 }
1549 console.log("start_session", kernel_name);
1550 this.session = new session.Session({
1549 this.session = new session.Session({
1551 base_url: this.base_url,
1550 base_url: this.base_url,
1552 ws_url: this.ws_url,
1551 ws_url: this.ws_url,
General Comments 0
You need to be logged in to leave comments. Login now