Show More
@@ -1,45 +1,41 b'' | |||
|
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 | this.sessions = d; |
|
25 | 25 | // clear out the previous list |
|
26 | 26 | this.clear_list(); |
|
27 | 27 | var item; |
|
28 | 28 | for (var path in d) { |
|
29 | 29 | item = this.new_notebook_item(-1); |
|
30 | 30 | this.add_link('', path, item); |
|
31 | 31 | this.add_shutdown_button(item,this.sessions[path]); |
|
32 | 32 | } |
|
33 | 33 | |
|
34 |
|
|
|
35 | $('#' + this.element_name + '_list_header').show(); | |
|
36 | } else { | |
|
37 | $('#' + this.element_name + '_list_header').hide(); | |
|
38 | } | |
|
34 | $('#running_list_header').toggle($.isEmptyObject(d)); | |
|
39 | 35 | } |
|
40 | 36 | |
|
41 | 37 | IPython.KernelList = KernelList; |
|
42 | 38 | |
|
43 | 39 | return IPython; |
|
44 | 40 | |
|
45 | 41 | }(IPython)); |
General Comments 0
You need to be logged in to leave comments.
Login now