Revision 1c86af5b
b/ui/static/main.css | ||
---|---|---|
523 | 523 |
} |
524 | 524 |
|
525 | 525 |
div.ip, div.state { |
526 |
font-size:9pt; |
|
526 |
font-size: 9pt;
|
|
527 | 527 |
color: #3d3d3d; |
528 | 528 |
} |
529 | 529 |
|
... | ... | |
683 | 683 |
} |
684 | 684 |
|
685 | 685 |
div.list#machinesview { |
686 |
min-height: 270px;
|
|
686 |
min-height: 270px;
|
|
687 | 687 |
} |
688 | 688 |
|
689 | 689 |
div.list label img { |
... | ... | |
700 | 700 |
margin-right: 10px; |
701 | 701 |
} |
702 | 702 |
|
703 |
div.list div.running {
|
|
703 |
div.list .running { |
|
704 | 704 |
margin-top: 8px; |
705 |
max-height: 310px;
|
|
705 |
max-height: 310px; |
|
706 | 706 |
overflow: auto; |
707 | 707 |
} |
708 | 708 |
|
... | ... | |
711 | 711 |
overflow: auto; |
712 | 712 |
} |
713 | 713 |
|
714 |
div.list div.stopped {
|
|
714 |
div.list .stopped { |
|
715 | 715 |
margin-top: 8px; |
716 | 716 |
} |
717 | 717 |
|
... | ... | |
760 | 760 |
} |
761 | 761 |
|
762 | 762 |
div.list div.actions { |
763 |
display: none; |
|
763 | 764 |
clear: left; |
764 | 765 |
float: right; |
765 | 766 |
margin-right: -20px; |
... | ... | |
873 | 874 |
height: 31px; |
874 | 875 |
width: 31px; |
875 | 876 |
margin-left: 298px; |
877 |
} |
|
878 |
|
|
879 |
/* tables in list view */ |
|
880 |
div.list table { |
|
881 |
width: 498px; |
|
882 |
font-size: 9pt; |
|
876 | 883 |
display: none; |
877 | 884 |
} |
878 | 885 |
|
886 |
div.list table thead tr th, div.list table tfoot tr th { |
|
887 |
background-color: #e6EEEE; |
|
888 |
border: 1px solid #FFF; |
|
889 |
padding: 4px; |
|
890 |
} |
|
891 |
|
|
892 |
div.list table thead tr .header { |
|
893 |
background-image: url(bg.gif); |
|
894 |
background-repeat: no-repeat; |
|
895 |
background-position: center right; |
|
896 |
cursor: pointer; |
|
897 |
} |
|
898 |
|
|
899 |
div.list table tbody td { |
|
900 |
color: #3D3D3D; |
|
901 |
padding: 4px; |
|
902 |
background-color: #FFF; |
|
903 |
vertical-align: bottom; |
|
904 |
} |
|
905 |
|
|
906 |
div.list table tbody tr.odd td { |
|
907 |
background-color:#F0F0F6; |
|
908 |
} |
|
909 |
|
|
910 |
div.list table thead tr .headerSortUp { |
|
911 |
background-image: url(asc.gif); |
|
912 |
} |
|
913 |
|
|
914 |
div.list table thead tr .headerSortDown { |
|
915 |
background-image: url(desc.gif); |
|
916 |
} |
|
917 |
|
|
918 |
div.list table thead tr .headerSortDown, div.list table thead tr .headerSortUp { |
|
919 |
background-color: #87AADE; |
|
920 |
} |
|
921 |
|
b/ui/templates/list.html | ||
---|---|---|
1 |
<div id="machinesview" class="list">
|
|
1 |
<script src="http://tablesorter.com/jquery.tablesorter.min.js"></script>
|
|
2 | 2 |
|
3 |
<div id="machinesview" class="list"> |
|
4 |
<div id="spinner"></div> |
|
3 | 5 |
<div class="actions"> |
4 | 6 |
<a>Start</a> |
5 | 7 |
<a>Reboot</a> |
... | ... | |
18 | 20 |
<a>Connect to network</a> |
19 | 21 |
<a>Disconnect from net</a> |
20 | 22 |
</div> |
21 |
<div class="running"> |
|
22 |
<div id="instance-template" style="display: none"> |
|
23 |
<label> |
|
24 |
<input type="checkbox" class="instance" id="node-id" /> |
|
25 |
<img class="list-logo" src="static/os_logos/node.thumb" width="16" height="16" /> |
|
26 |
<a class="name"><span class="name">node.name</span></a> | |
|
27 |
<a class="ip"><span class="public">node.public_ip</span></a> | |
|
28 |
group |
|
29 |
</label> |
|
30 |
<div class="status state">Running</div> |
|
31 |
</div> |
|
32 |
</div> |
|
23 |
<table> |
|
24 |
<thead> |
|
25 |
<tr> |
|
26 |
<th></th> |
|
27 |
<th>OS</th> |
|
28 |
<th>Name</th> |
|
29 |
<th>IP</th> |
|
30 |
<th>Group</th> |
|
31 |
<th>Status</th> |
|
32 |
</tr> |
|
33 |
</thead> |
|
34 |
<tbody class="running"> |
|
35 |
<tr id="instance-template" style="display: none"> |
|
36 |
<td><input type="checkbox" class="instance" id="node-id" /></td> |
|
37 |
<td><img class="list-logo" src="static/os_logos/node.thumb" width="16" height="16" /></td> |
|
38 |
<td><a class="name"><span class="name">node.name</span></a></td> |
|
39 |
<td><a class="ip"><span class="public">node.public_ip</span></a></td> |
|
40 |
<td>group</td> |
|
41 |
<td class="status state">Running</td> |
|
42 |
</tr> |
|
43 |
</tbody> |
|
44 |
</table> |
|
33 | 45 |
<div id="mini" class="seperator"></div> |
34 |
<div class="terminated"></div> |
|
46 |
<table> |
|
47 |
<thead> |
|
48 |
<tr> |
|
49 |
<th></th> |
|
50 |
<th>OS</th> |
|
51 |
<th>Name</th> |
|
52 |
<th>IP</th> |
|
53 |
<th>Group</th> |
|
54 |
<th>Status</th> |
|
55 |
</tr> |
|
56 |
</thead> |
|
57 |
<tbody class="terminated"></tbody> |
|
58 |
</table> |
|
35 | 59 |
</div> |
b/ui/templates/machines.html | ||
---|---|---|
199 | 199 |
|
200 | 200 |
function update() { |
201 | 201 |
|
202 |
$("div.running").text('');
|
|
203 |
$("div.terminated").text('');
|
|
202 |
$(".running").text(''); |
|
203 |
$(".terminated").text(''); |
|
204 | 204 |
$("ul#standard-images").text(''); |
205 | 205 |
$("ul#custom-images").text(''); |
206 |
$("#spinner").show(); |
|
207 | 206 |
|
208 | 207 |
$.ajax({ |
209 | 208 |
url: '/api/v1.0/servers/detail', |
... | ... | |
220 | 219 |
instance.find("a.ip span.public").text(String(server.addresses.public)); |
221 | 220 |
|
222 | 221 |
if (server.status == 'BUILD'){ |
223 |
instance.find("div.status").text('Building');
|
|
224 |
instance.appendTo("div.running");
|
|
222 |
instance.find(".status").text('Building'); |
|
223 |
instance.appendTo(".running"); |
|
225 | 224 |
} else if (server.status == 'ACTIVE') { |
226 |
instance.find("div.status").text('Running');
|
|
227 |
instance.appendTo("div.running");
|
|
225 |
instance.find(".status").text('Running'); |
|
226 |
instance.appendTo(".running"); |
|
228 | 227 |
} else if (server.status == 'SUSPENDED') { |
229 |
instance.find("div.status").text('Terminated');
|
|
228 |
instance.find(".status").text('Terminated'); |
|
230 | 229 |
instance.find("img.logo").attr("src","static/machines/"+image_tags[server.imageId]+'-off.png'); |
231 |
instance.appendTo("div.terminated");
|
|
230 |
instance.appendTo(".terminated"); |
|
232 | 231 |
$("#mini.seperator").fadeIn("slow"); |
233 | 232 |
} else { |
234 |
instance.find("div.status").text('Unknown');
|
|
233 |
instance.find(".status").text('Unknown'); |
|
235 | 234 |
instance.find("img.logo").attr("src","static/machines/"+image_tags[server.imageId]+'-off.png'); |
236 |
instance.appendTo("div.terminated");
|
|
235 |
instance.appendTo(".terminated"); |
|
237 | 236 |
} |
238 |
|
|
239 | 237 |
}); |
240 | 238 |
$("#spinner").hide(); |
239 |
$(".list table").show().tablesorter(); |
|
240 |
$(".list .actions").show(); |
|
241 | 241 |
} |
242 |
|
|
243 | 242 |
}); |
244 | 243 |
|
245 | 244 |
$.ajax({ |
b/vocabs.py | ||
---|---|---|
377 | 377 |
"hostId" : "9e107d9d372bb6826bd81d3542a419d6", |
378 | 378 |
"status" : "SUSPENDED", |
379 | 379 |
"addresses" : { |
380 |
"public" : [ |
|
381 |
"67.23.11.177" |
|
382 |
], |
|
380 | 383 |
}, |
381 | 384 |
"metadata" : { |
382 | 385 |
"Server Label" : "DB 3" |
Also available in: Unified diff