]>
Commit | Line | Data |
---|---|---|
31f18b77 FG |
1 | {% extends "base.html" %} |
2 | ||
3 | {% block content %} | |
4 | ||
5 | <script> | |
6 | $(document).ready(function(){ | |
7 | // Pre-populated initial data at page load | |
8 | var content_data = {{ content_data }}; | |
9 | ||
10 | var refresh = function() { | |
11 | $.get("/servers_data", function(data) { | |
12 | _.extend(content_data, data); | |
13 | setTimeout(refresh, 5000); | |
14 | }); | |
15 | }; | |
16 | setTimeout(refresh, 5000); | |
17 | ||
18 | rivets.formatters.service_list = function(services) { | |
19 | var strings = []; | |
20 | $.each(services, function(i, svc) { | |
21 | strings.push(svc.type + "." + svc.id); | |
22 | }); | |
23 | return strings.join(", "); | |
24 | }; | |
25 | ||
31f18b77 FG |
26 | rivets.bind($("#content"), content_data); |
27 | }); | |
28 | ||
29 | </script> | |
30 | ||
31 | ||
32 | <!-- Content Header (Page header) --> | |
33 | <section class="content-header"> | |
34 | <h1> | |
35 | Servers | |
36 | </h1> | |
37 | </section> | |
38 | ||
39 | <!-- Main content --> | |
40 | <section class="content"> | |
41 | <div class="box"> | |
42 | <div class="box-body"> | |
43 | <table class="table table-bordered"> | |
44 | <th> | |
45 | Hostname | |
46 | </th> | |
47 | <th> | |
48 | Services | |
49 | </th> | |
50 | <th> | |
51 | Version | |
52 | </th> | |
53 | </thead> | |
54 | <tr rv-each-server="servers"> | |
55 | <td> | |
56 | {server.hostname} | |
57 | </td> | |
58 | <td> | |
59 | {server.services | service_list} | |
60 | </td> | |
61 | <td> | |
62 | {server.ceph_version | short_version} | |
63 | </td> | |
64 | ||
65 | </tr> | |
66 | </table> | |
67 | </div> | |
68 | </div> | |
69 | </section> | |
70 | ||
71 | {% endblock %} |