##// END OF EJS Templates
don't double-join the notebook path
Paul Ivanov -
Show More
@@ -1,48 +1,47
1 1 //----------------------------------------------------------------------------
2 2 // Copyright (C) 2014 The IPython Development Team
3 3 //
4 4 // Distributed under the terms of the BSD License. The full license is in
5 5 // the file COPYING, distributed as part of this software.
6 6 //----------------------------------------------------------------------------
7 7
8 8 //============================================================================
9 9 // Running Kernels List
10 10 //============================================================================
11 11
12 12 var IPython = (function (IPython) {
13 13 "use strict";
14 14
15 15 var utils = IPython.utils;
16 16
17 17 var KernelList = function (selector, options) {
18 18 IPython.NotebookList.call(this, selector, options, 'running');
19 19 };
20 20
21 21 KernelList.prototype = Object.create(IPython.NotebookList.prototype);
22 22
23 23 KernelList.prototype.sessions_loaded = function (d) {
24 24 // clear out the previous list
25 25 this.clear_list();
26 26 var len = d.length;
27 27 var item;
28 28 for (var i=0; i < d.length; i++) {
29 var path = utils.url_path_join(d[i].notebook.path, d[i].notebook.name);
30 var name = d[i].name;
29 var path= utils.url_path_join(d[i].notebook.path, d[i].notebook.name);
31 30 item = this.new_notebook_item(i);
32 this.add_link(path, path, item);
31 this.add_link('', path, item);
33 32 this.sessions[path] = d[i].id;
34 33 this.add_shutdown_button(item,this.sessions[path]);
35 34 }
36 35
37 36 if (len > 0) {
38 37 $('#' + this.element_name + '_list_header').hide();
39 38 } else {
40 39 $('#' + this.element_name + '_list_header').show();
41 40 }
42 41 }
43 42
44 43 IPython.KernelList = KernelList;
45 44
46 45 return IPython;
47 46
48 47 }(IPython));
General Comments 0
You need to be logged in to leave comments. Login now