##// END OF EJS Templates
fight with bootstrap a little less in tree view
MinRK -
Show More
@@ -383,16 +383,16 b' ul.icons-ul{list-style-type:none;text-indent:-0.7142857142857143em;margin-left:2'
383 .list_toolbar{padding:5px;height:25px;line-height:25px;}
383 .list_toolbar{padding:5px;height:25px;line-height:25px;}
384 .toolbar_info{float:left;}
384 .toolbar_info{float:left;}
385 .toolbar_buttons{float:right;}
385 .toolbar_buttons{float:right;}
386 .list_header{height:25px;line-height:25px;padding:3px 5px;border:1px solid #ccc;border-radius:4px 4px 0px 0px;}
386 .list_header>a{font-size:100%;}
387 .list_item{height:25px;line-height:25px;padding:3px 5px;border:1px solid #ccc;border-top:0px;}
387 .cluster_list_item>a{color:#000000 !important;}
388 .notebook_item a{text-decoration:none;}
388 .notebook_item a{text-decoration:none;}
389 .status_col{float:right;width:325px;}
389 .status_col{float:right;width:325px;}
390 .engines_col{float:right;width:325px;}
390 .engines_col{float:right;width:325px;}
391 .action_col{float:right;width:64px;text-align:right;}
391 .action_col{float:right;width:64px;text-align:right;}
392 .item_buttons{float:right;margin-top:1px;}
392 .item_buttons{float:right;}
393 input.nbname_input{height:15px;}
393 input.nbname_input{height:15px;}
394 .highlight_text{color:blue;}
394 .highlight_text{color:blue;}
395 #project_name>.breadcrumb{padding:0;background-color:transparent;}
395 #project_name>.breadcrumb{padding:0px;margin:0px;background-color:transparent;font-size:120%;}
396 input.engine_num_input{height:20px;margin-bottom:2px;padding-top:0;padding-bottom:0;width:90px;}
396 input.engine_num_input{height:20px;margin-bottom:2px;padding-top:0;padding-bottom:0;width:90px;}
397 .ansiblack{color:black;}
397 .ansiblack{color:black;}
398 .ansired{color:darkred;}
398 .ansired{color:darkred;}
@@ -28,17 +28,6 b' var IPython = (function (IPython) {'
28 $('#cluster_toolbar').addClass('list_toolbar');
28 $('#cluster_toolbar').addClass('list_toolbar');
29 $('#cluster_list_info').addClass('toolbar_info');
29 $('#cluster_list_info').addClass('toolbar_info');
30 $('#cluster_buttons').addClass('toolbar_buttons');
30 $('#cluster_buttons').addClass('toolbar_buttons');
31 var children = $('li#cluster_header').addClass('list_header').children();
32 children.eq(0).addClass('profile_col');
33 children.eq(1).addClass('action_col');
34 children.eq(2).addClass('engines_col');
35 children.eq(3).addClass('status_col');
36 // $('div#cluster_header').children().eq(2).addClass('engines_col');
37 // $('div#cluster_header').children().eq(3).addClass('status_col');
38 // $('#refresh_cluster_list').button({
39 // icons : {primary: 'ui-icon-arrowrefresh-1-s'},
40 // text : false
41 // });
42 };
31 };
43
32
44
33
@@ -64,18 +53,18 b' var IPython = (function (IPython) {'
64
53
65
54
66 ClusterList.prototype.clear_list = function () {
55 ClusterList.prototype.clear_list = function () {
67 this.element.children('.list_item').remove();
56 this.element.children('.cluster_list_item').remove();
68 }
57 }
69
58
70 ClusterList.prototype.load_list_success = function (data, status, xhr) {
59 ClusterList.prototype.load_list_success = function (data, status, xhr) {
71 this.clear_list();
60 this.clear_list();
72 var len = data.length;
61 var len = data.length;
73 for (var i=0; i<len; i++) {
62 for (var i=0; i<len; i++) {
74 var item_div = $('<div/>');
63 var element = $('<li/>');
75 var item = new ClusterItem(item_div);
64 var item = new ClusterItem(element);
76 item.update_state(data[i]);
65 item.update_state(data[i]);
77 item_div.data('item', item);
66 element.data('item', item);
78 this.element.append(item_div);
67 this.element.append(element);
79 };
68 };
80 };
69 };
81
70
@@ -93,7 +82,8 b' var IPython = (function (IPython) {'
93
82
94
83
95 ClusterItem.prototype.style = function () {
84 ClusterItem.prototype.style = function () {
96 this.element.addClass('list_item');
85 this.element.addClass('cluster_list_item').addClass("disabled");
86 this.element.append($("<a/>"));
97 }
87 }
98
88
99 ClusterItem.prototype.update_state = function (data) {
89 ClusterItem.prototype.update_state = function (data) {
@@ -109,7 +99,7 b' var IPython = (function (IPython) {'
109
99
110 ClusterItem.prototype.state_stopped = function () {
100 ClusterItem.prototype.state_stopped = function () {
111 var that = this;
101 var that = this;
112 this.element.empty();
102 var a = this.element.find("a");
113 var profile_col = $('<span/>').addClass('profile_col').text(this.data.profile);
103 var profile_col = $('<span/>').addClass('profile_col').text(this.data.profile);
114 var status_col = $('<span/>').addClass('status_col').html('stopped');
104 var status_col = $('<span/>').addClass('status_col').html('stopped');
115 var engines_col = $('<span/>').addClass('engines_col');
105 var engines_col = $('<span/>').addClass('engines_col');
@@ -124,10 +114,11 b' var IPython = (function (IPython) {'
124 start_button
114 start_button
125 )
115 )
126 );
116 );
127 this.element.append(profile_col).
117 a.empty()
128 append(action_col).
118 .append(profile_col)
129 append(engines_col).
119 .append(action_col)
130 append(status_col);
120 .append(engines_col)
121 .append(status_col);
131 start_button.click(function (e) {
122 start_button.click(function (e) {
132 var n = that.element.find('.engine_num_input').val();
123 var n = that.element.find('.engine_num_input').val();
133 if (!/^\d+$/.test(n) && n.length>0) {
124 if (!/^\d+$/.test(n) && n.length>0) {
@@ -154,8 +145,8 b' var IPython = (function (IPython) {'
154
145
155
146
156 ClusterItem.prototype.state_running = function () {
147 ClusterItem.prototype.state_running = function () {
157 this.element.empty();
158 var that = this;
148 var that = this;
149 var a = this.element.find("a");
159 var profile_col = $('<span/>').addClass('profile_col').text(this.data.profile);
150 var profile_col = $('<span/>').addClass('profile_col').text(this.data.profile);
160 var status_col = $('<span/>').addClass('status_col').html('running');
151 var status_col = $('<span/>').addClass('status_col').html('running');
161 var engines_col = $('<span/>').addClass('engines_col').html(this.data.n);
152 var engines_col = $('<span/>').addClass('engines_col').html(this.data.n);
@@ -165,10 +156,11 b' var IPython = (function (IPython) {'
165 stop_button
156 stop_button
166 )
157 )
167 );
158 );
168 this.element.append(profile_col).
159 a.empty()
169 append(action_col).
160 .append(profile_col)
170 append(engines_col).
161 .append(action_col)
171 append(status_col);
162 .append(engines_col)
163 .append(status_col);
172 stop_button.click(function (e) {
164 stop_button.click(function (e) {
173 var settings = {
165 var settings = {
174 cache : false,
166 cache : false,
@@ -26,22 +26,14 b''
26 float: right;
26 float: right;
27 }
27 }
28
28
29 .list_header {
29 .list_header > a{
30 height: 25px;
30 font-size: 100%;
31 line-height: 25px;
32 padding: 3px 5px;
33 border: 1px solid #ccc;
34 border-radius: 4px 4px 0px 0px;
35 }
31 }
36
32
37
33
38
34
39 .list_item {
35 .cluster_list_item > a {
40 height: 25px;
36 color: @textColor !important;
41 line-height: 25px;
42 padding: 3px 5px;
43 border: 1px solid #ccc;
44 border-top: 0px;
45 }
37 }
46
38
47 .notebook_item a {
39 .notebook_item a {
@@ -69,7 +61,6 b''
69
61
70 .item_buttons {
62 .item_buttons {
71 float: right;
63 float: right;
72 margin-top: 1px;
73 }
64 }
74
65
75 input.nbname_input {
66 input.nbname_input {
@@ -82,8 +73,10 b' input.nbname_input {'
82
73
83
74
84 #project_name > .breadcrumb {
75 #project_name > .breadcrumb {
85 padding : 0;
76 padding: 0px;
77 margin: 0px;
86 background-color: transparent;
78 background-color: transparent;
79 font-size: 120%;
87 }
80 }
88
81
89 input.engine_num_input {
82 input.engine_num_input {
@@ -45,15 +45,17 b' data-read-only={{read_only}}'
45 </div>
45 </div>
46 {% endif %}
46 {% endif %}
47
47
48 <ul id="notebook_list" class="nav nav-stacked">
48 <ul id="notebook_list" class="nav nav-tabs nav-stacked">
49 <li id="notebook_list_header" class="nav-header">
49 <li id="notebook_list_header" class="disabled list_header">
50 <div id="project_name">
50 <a>
51 <div id="project_name" class="nav-header">
51 <ul class="breadcrumb">
52 <ul class="breadcrumb">
52 {% for component in project_component %}
53 {% for component in project_component %}
53 <li>{{component}} <span>/</span></li>
54 <li>{{component}} <span>/</span></li>
54 {% endfor %}
55 {% endfor %}
55 </ul>
56 </ul>
56 </div>
57 </div>
58 </a>
57 </li>
59 </li>
58 </ul>
60 </ul>
59 </div>
61 </div>
@@ -68,12 +70,15 b' data-read-only={{read_only}}'
68 </span>
70 </span>
69 </div>
71 </div>
70
72
71 <ul id="cluster_list" class="nav nav-stacked">
73 <ul id="cluster_list" class="nav nav-tabs nav-stacked">
72 <li id="cluster_header" class="nav-header">
74 <li id="cluster_header" class="disabled list_header">
73 <span>profile</span>
75 <a class="nav-header">
74 <span>action</span>
76 <!-- <div class="nav-header"> -->
75 <span title="Enter the number of engines to start or empty for default"># of engines</span>
77 <span class="profile_col">profile</span>
76 <span>status</span>
78 <span class="action_col">action</span>
79 <span class="engines_col" title="Enter the number of engines to start or empty for default"># of engines</span>
80 <span class="status_col">status</span>
81 </a>
77 </li>
82 </li>
78 </ul>
83 </ul>
79 </div>
84 </div>
General Comments 0
You need to be logged in to leave comments. Login now