Skip to content

Commit

Permalink
Merge pull request #2559 from ellisonbg/session-fix
Browse files Browse the repository at this point in the history
Allow session of type other than notebook.
  • Loading branch information
minrk authored Jun 8, 2017
2 parents 4b8cc28 + 4d9809d commit 65f7226
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions notebook/static/tree/js/sessionlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,18 @@ define([
var len = data.length;
var nb_path;
for (var i=0; i<len; i++) {
nb_path = data[i].notebook.path;
this.sessions[nb_path] = {
id: data[i].id,
kernel: {
name: data[i].kernel.name
}
};
// The classic notebook only knows about sessions for notebooks,
// but the server now knows about more general sessions for
// things like consoles.
if (data[i].type === 'notebook') {
nb_path = data[i].notebook.path;
this.sessions[nb_path] = {
id: data[i].id,
kernel: {
name: data[i].kernel.name
}
};
}
}
this.events.trigger('sessions_loaded.Dashboard', this.sessions);
};
Expand Down

0 comments on commit 65f7226

Please sign in to comment.