Show More
@@ -1405,22 +1405,19 b' ul.icons-ul{list-style-type:none;text-indent:-0.7142857142857143em;margin-left:2' | |||||
1405 | .list_toolbar{padding:5px;height:25px;line-height:25px;} |
|
1405 | .list_toolbar{padding:5px;height:25px;line-height:25px;} | |
1406 | .toolbar_info{float:left;} |
|
1406 | .toolbar_info{float:left;} | |
1407 | .toolbar_buttons{float:right;} |
|
1407 | .toolbar_buttons{float:right;} | |
1408 |
.list_header |
|
1408 | .list_header{font-weight:bold;} | |
1409 |
. |
|
1409 | .list_container{margin-top:16px;margin-bottom:16px;border:1px solid #eeeeee;border-radius:4px;} | |
1410 |
. |
|
1410 | .list_container>div{border-bottom:1px solid #eeeeee;}.list_container>div:hover .list-item{background-color:red;} | |
1411 |
. |
|
1411 | .list_container>div:last-child{border:none;} | |
1412 | .list_item:hover .list_item{background-color:#ddd;} |
|
1412 | .list_item:hover .list_item{background-color:#ddd;} | |
1413 |
. |
|
1413 | .list_container>div>span,.list_container>div>div{padding:8px;} | |
1414 |
.cluster_list_item>a{ |
|
1414 | .cluster_list_item>a{} | |
1415 | .notebook_item a{text-decoration:none;} |
|
1415 | .notebook_item a{text-decoration:none;} | |
1416 | .status_col{float:right;width:325px;} |
|
1416 | .action_col{} | |
1417 | .engines_col{float:right;width:325px;} |
|
|||
1418 | .action_col{float:right;width:64px;text-align:right;} |
|
|||
1419 | .item_buttons{} |
|
|||
1420 | input.nbname_input{height:15px;} |
|
1417 | input.nbname_input{height:15px;} | |
1421 | .highlight_text{color:blue;} |
|
1418 | .highlight_text{color:blue;} | |
1422 | #project_name>.breadcrumb{padding:0px;margin-bottom:0px;background-color:transparent;font-weight:bold;} |
|
1419 | #project_name>.breadcrumb{padding:0px;margin-bottom:0px;background-color:transparent;font-weight:bold;} | |
1423 |
input.engine_num_input{height:20px;margin-bottom:2px;padding-top:0;padding-bottom:0;width: |
|
1420 | input.engine_num_input{height:20px;margin-bottom:2px;padding-top:0;padding-bottom:0;width:60px;} | |
1424 | .ansiblack{color:black;} |
|
1421 | .ansiblack{color:black;} | |
1425 | .ansired{color:darkred;} |
|
1422 | .ansired{color:darkred;} | |
1426 | .ansigreen{color:darkgreen;} |
|
1423 | .ansigreen{color:darkgreen;} |
@@ -25,6 +25,7 b' var IPython = (function (IPython) {' | |||||
25 | }; |
|
25 | }; | |
26 |
|
26 | |||
27 | ClusterList.prototype.style = function () { |
|
27 | ClusterList.prototype.style = function () { | |
|
28 | $('#cluster_list').addClass('list_container'); | |||
28 | $('#cluster_toolbar').addClass('list_toolbar'); |
|
29 | $('#cluster_toolbar').addClass('list_toolbar'); | |
29 | $('#cluster_list_info').addClass('toolbar_info'); |
|
30 | $('#cluster_list_info').addClass('toolbar_info'); | |
30 | $('#cluster_buttons').addClass('toolbar_buttons'); |
|
31 | $('#cluster_buttons').addClass('toolbar_buttons'); | |
@@ -53,14 +54,14 b' var IPython = (function (IPython) {' | |||||
53 |
|
54 | |||
54 |
|
55 | |||
55 | ClusterList.prototype.clear_list = function () { |
|
56 | ClusterList.prototype.clear_list = function () { | |
56 |
this.element.children('. |
|
57 | this.element.children('.list_item').remove(); | |
57 | } |
|
58 | } | |
58 |
|
59 | |||
59 | ClusterList.prototype.load_list_success = function (data, status, xhr) { |
|
60 | ClusterList.prototype.load_list_success = function (data, status, xhr) { | |
60 | this.clear_list(); |
|
61 | this.clear_list(); | |
61 | var len = data.length; |
|
62 | var len = data.length; | |
62 | for (var i=0; i<len; i++) { |
|
63 | for (var i=0; i<len; i++) { | |
63 |
var element = $('< |
|
64 | var element = $('<div/>'); | |
64 | var item = new ClusterItem(element); |
|
65 | var item = new ClusterItem(element); | |
65 | item.update_state(data[i]); |
|
66 | item.update_state(data[i]); | |
66 | element.data('item', item); |
|
67 | element.data('item', item); | |
@@ -82,8 +83,7 b' var IPython = (function (IPython) {' | |||||
82 |
|
83 | |||
83 |
|
84 | |||
84 | ClusterItem.prototype.style = function () { |
|
85 | ClusterItem.prototype.style = function () { | |
85 |
this.element.addClass(' |
|
86 | this.element.addClass('list_item').addClass("row-fluid"); | |
86 | this.element.append($("<a/>")); |
|
|||
87 | } |
|
87 | } | |
88 |
|
88 | |||
89 | ClusterItem.prototype.update_state = function (data) { |
|
89 | ClusterItem.prototype.update_state = function (data) { | |
@@ -99,26 +99,25 b' var IPython = (function (IPython) {' | |||||
99 |
|
99 | |||
100 | ClusterItem.prototype.state_stopped = function () { |
|
100 | ClusterItem.prototype.state_stopped = function () { | |
101 | var that = this; |
|
101 | var that = this; | |
102 | var a = this.element.find("a"); |
|
102 | var profile_col = $('<span/>').addClass('profile_col span4').text(this.data.profile); | |
103 |
var |
|
103 | var status_col = $('<span/>').addClass('status_col span3').html('stopped'); | |
104 |
var |
|
104 | var engines_col = $('<span/>').addClass('engine_col span3'); | |
105 | var engines_col = $('<span/>').addClass('engines_col'); |
|
|||
106 | var input = $('<input/>').attr('type','number') |
|
105 | var input = $('<input/>').attr('type','number') | |
107 | .attr('min',1) |
|
106 | .attr('min',1) | |
108 | .attr('size',3) |
|
107 | .attr('size',3) | |
109 | .addClass('engine_num_input'); |
|
108 | .addClass('engine_num_input'); | |
110 | engines_col.append(input); |
|
109 | engines_col.append(input); | |
111 | var start_button = $('<button/>').addClass("btn btn-mini").text("Start"); |
|
110 | var start_button = $('<button/>').addClass("btn btn-mini").text("Start"); | |
112 | var action_col = $('<span/>').addClass('action_col').append( |
|
111 | var action_col = $('<span/>').addClass('action_col span2').append( | |
113 |
$("<span/>").addClass("item_buttons btn-group |
|
112 | $("<span/>").addClass("item_buttons btn-group").append( | |
114 | start_button |
|
113 | start_button | |
115 | ) |
|
114 | ) | |
116 | ); |
|
115 | ); | |
117 |
|
|
116 | this.element.empty() | |
118 | .append(profile_col) |
|
117 | .append(profile_col) | |
119 |
.append( |
|
118 | .append(status_col) | |
120 | .append(engines_col) |
|
119 | .append(engines_col) | |
121 |
.append( |
|
120 | .append(action_col); | |
122 | start_button.click(function (e) { |
|
121 | start_button.click(function (e) { | |
123 | var n = that.element.find('.engine_num_input').val(); |
|
122 | var n = that.element.find('.engine_num_input').val(); | |
124 | if (!/^\d+$/.test(n) && n.length>0) { |
|
123 | if (!/^\d+$/.test(n) && n.length>0) { | |
@@ -146,21 +145,20 b' var IPython = (function (IPython) {' | |||||
146 |
|
145 | |||
147 | ClusterItem.prototype.state_running = function () { |
|
146 | ClusterItem.prototype.state_running = function () { | |
148 | var that = this; |
|
147 | var that = this; | |
149 | var a = this.element.find("a"); |
|
148 | var profile_col = $('<span/>').addClass('profile_col span4').text(this.data.profile); | |
150 |
var |
|
149 | var status_col = $('<span/>').addClass('status_col span3').html('running'); | |
151 |
var |
|
150 | var engines_col = $('<span/>').addClass('engines_col span3').html(this.data.n); | |
152 | var engines_col = $('<span/>').addClass('engines_col').html(this.data.n); |
|
|||
153 | var stop_button = $('<button/>').addClass("btn btn-mini").text("Stop"); |
|
151 | var stop_button = $('<button/>').addClass("btn btn-mini").text("Stop"); | |
154 | var action_col = $('<span/>').addClass('action_col').append( |
|
152 | var action_col = $('<span/>').addClass('action_col span2').append( | |
155 |
$("<span/>").addClass("item_buttons btn-group |
|
153 | $("<span/>").addClass("item_buttons btn-group").append( | |
156 | stop_button |
|
154 | stop_button | |
157 | ) |
|
155 | ) | |
158 | ); |
|
156 | ); | |
159 |
|
|
157 | this.element.empty() | |
160 | .append(profile_col) |
|
158 | .append(profile_col) | |
161 |
.append( |
|
159 | .append(status_col) | |
162 | .append(engines_col) |
|
160 | .append(engines_col) | |
163 |
.append( |
|
161 | .append(action_col); | |
164 | stop_button.click(function (e) { |
|
162 | stop_button.click(function (e) { | |
165 | var settings = { |
|
163 | var settings = { | |
166 | cache : false, |
|
164 | cache : false, |
@@ -29,7 +29,7 b' var IPython = (function (IPython) {' | |||||
29 | $('#drag_info').addClass('toolbar_info'); |
|
29 | $('#drag_info').addClass('toolbar_info'); | |
30 | $('#notebook_buttons').addClass('toolbar_buttons'); |
|
30 | $('#notebook_buttons').addClass('toolbar_buttons'); | |
31 | $('#notebook_list_header').addClass('list_header'); |
|
31 | $('#notebook_list_header').addClass('list_header'); | |
32 |
this.element.addClass(" |
|
32 | this.element.addClass("list_container"); | |
33 | }; |
|
33 | }; | |
34 |
|
34 | |||
35 |
|
35 |
@@ -26,25 +26,25 b'' | |||||
26 | float: right; |
|
26 | float: right; | |
27 | } |
|
27 | } | |
28 |
|
28 | |||
29 |
.list_header |
|
29 | .list_header { | |
30 | font-size: 100%; |
|
30 | font-weight: bold; | |
31 | } |
|
31 | } | |
32 |
|
32 | |||
33 | .tree_list { |
|
33 | .list_container { | |
34 | margin-top: 16px; |
|
34 | margin-top: 16px; | |
35 | margin-bottom: 16px; |
|
35 | margin-bottom: 16px; | |
36 | border: 1px solid @borderColor; |
|
36 | border: 1px solid @borderColor; | |
37 | border-radius: 4px; |
|
37 | border-radius: 4px; | |
38 | } |
|
38 | } | |
39 |
|
39 | |||
40 |
. |
|
40 | .list_container > div { | |
41 | border-bottom: 1px solid @borderColor; |
|
41 | border-bottom: 1px solid @borderColor; | |
42 | &:hover .list-item{ |
|
42 | &:hover .list-item{ | |
43 | background-color: red; |
|
43 | background-color: red; | |
44 | }; |
|
44 | }; | |
45 | } |
|
45 | } | |
46 |
|
46 | |||
47 |
. |
|
47 | .list_container > div:last-child { | |
48 | border: none; |
|
48 | border: none; | |
49 | } |
|
49 | } | |
50 |
|
50 | |||
@@ -55,13 +55,13 b'' | |||||
55 | }; |
|
55 | }; | |
56 | } |
|
56 | } | |
57 |
|
57 | |||
58 |
. |
|
58 | .list_container > div > span, .list_container > div > div { | |
59 | padding: 8px; |
|
59 | padding: 8px; | |
60 | } |
|
60 | } | |
61 |
|
61 | |||
62 |
|
62 | |||
63 | .cluster_list_item > a { |
|
63 | .cluster_list_item > a { | |
64 |
|
|
64 | /* color: @textColor !important;*/ | |
65 | } |
|
65 | } | |
66 |
|
66 | |||
67 | .notebook_item a { |
|
67 | .notebook_item a { | |
@@ -72,23 +72,13 b'' | |||||
72 | } |
|
72 | } | |
73 |
|
73 | |||
74 | .status_col { |
|
74 | .status_col { | |
75 | float: right; |
|
|||
76 | width: 325px; |
|
|||
77 | } |
|
75 | } | |
78 |
|
76 | |||
79 | .engines_col { |
|
77 | .engines_col { | |
80 | float: right; |
|
|||
81 | width: 325px; |
|
|||
82 | } |
|
78 | } | |
83 |
|
79 | |||
84 | .action_col { |
|
80 | .action_col { | |
85 |
|
|
81 | /* text-align: right;*/ | |
86 | width: 64px; |
|
|||
87 | text-align: right; |
|
|||
88 | } |
|
|||
89 |
|
||||
90 | .item_buttons { |
|
|||
91 | /* float: right;*/ |
|
|||
92 | } |
|
82 | } | |
93 |
|
83 | |||
94 | input.nbname_input { |
|
84 | input.nbname_input { | |
@@ -113,5 +103,5 b' input.engine_num_input {' | |||||
113 | margin-bottom:2px; |
|
103 | margin-bottom:2px; | |
114 | padding-top:0; |
|
104 | padding-top:0; | |
115 | padding-bottom:0; |
|
105 | padding-bottom:0; | |
116 |
width: |
|
106 | width: 60px; | |
117 | } |
|
107 | } |
@@ -46,7 +46,7 b' data-read-only={{read_only}}' | |||||
46 | {% endif %} |
|
46 | {% endif %} | |
47 |
|
47 | |||
48 | <div id="notebook_list"> |
|
48 | <div id="notebook_list"> | |
49 | <div id="notebook_list_header" class="row-fluid"> |
|
49 | <div id="notebook_list_header" class="row-fluid list_header"> | |
50 | <div id="project_name"> |
|
50 | <div id="project_name"> | |
51 | <ul class="breadcrumb"> |
|
51 | <ul class="breadcrumb"> | |
52 | {% for component in project_component %} |
|
52 | {% for component in project_component %} | |
@@ -68,17 +68,14 b' data-read-only={{read_only}}' | |||||
68 | </span> |
|
68 | </span> | |
69 | </div> |
|
69 | </div> | |
70 |
|
70 | |||
71 | <ul id="cluster_list" class="nav nav-tabs nav-stacked"> |
|
71 | <div id="cluster_list"> | |
72 |
< |
|
72 | <div id="cluster_list_header" class="row-fluid list_header"> | |
73 | <a class="nav-header"> |
|
73 | <span class="profile_col span4">profile</span> | |
74 | <!-- <div class="nav-header"> --> |
|
74 | <span class="status_col span3">status</span> | |
75 | <span class="profile_col">profile</span> |
|
75 | <span class="engines_col span3" title="Enter the number of engines to start or empty for default"># of engines</span> | |
76 | <span class="action_col">action</span> |
|
76 | <span class="action_col span2">action</span> | |
77 | <span class="engines_col" title="Enter the number of engines to start or empty for default"># of engines</span> |
|
77 | </div> | |
78 | <span class="status_col">status</span> |
|
78 | </div> | |
79 | </a> |
|
|||
80 | </li> |
|
|||
81 | </ul> |
|
|||
82 | </div> |
|
79 | </div> | |
83 | </div> |
|
80 | </div> | |
84 |
|
81 |
General Comments 0
You need to be logged in to leave comments.
Login now