##// END OF EJS Templates
Merge pull request #6949 from minrk/kernel_created...
Thomas Kluyver -
r18920:0afda776 merge
parent child Browse files
Show More
@@ -76,12 +76,12 b' define(['
76 that.element.find("#current_kernel_spec").find('.kernel_name').text(data.display_name);
76 that.element.find("#current_kernel_spec").find('.kernel_name').text(data.display_name);
77 });
77 });
78
78
79 this.events.on('started.Session', function(events, session) {
79 this.events.on('kernel_created.Session', function(event, data) {
80 if (session.kernel_name !== that.current_selection) {
80 if (data.kernel.name !== that.current_selection) {
81 // If we created a 'python' session, we only know if it's Python
81 // If we created a 'python' session, we only know if it's Python
82 // 3 or 2 on the server's reply, so we fire the event again to
82 // 3 or 2 on the server's reply, so we fire the event again to
83 // set things up.
83 // set things up.
84 var ks = that.kernelspecs[session.kernel_name];
84 var ks = that.kernelspecs[data.kernel.name];
85 that.events.trigger('spec_changed.Kernel', ks);
85 that.events.trigger('spec_changed.Kernel', ks);
86 }
86 }
87 });
87 });
@@ -97,7 +97,9 b' define(['
97 Session.prototype.start = function (success, error) {
97 Session.prototype.start = function (success, error) {
98 var that = this;
98 var that = this;
99 var on_success = function (data, status, xhr) {
99 var on_success = function (data, status, xhr) {
100 if (!that.kernel) {
100 if (that.kernel) {
101 that.kernel.name = that.kernel_model.name;
102 } else {
101 var kernel_service_url = utils.url_path_join(that.base_url, "api/kernels");
103 var kernel_service_url = utils.url_path_join(that.base_url, "api/kernels");
102 that.kernel = new kernel.Kernel(kernel_service_url, that.ws_url, that.notebook, that.kernel_model.name);
104 that.kernel = new kernel.Kernel(kernel_service_url, that.ws_url, that.notebook, that.kernel_model.name);
103 }
105 }
General Comments 0
You need to be logged in to leave comments. Login now