]>
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("/rbd_data/" + content_data.pool_name + "/", function(data) { | |
12 | content_data.images = data; | |
13 | setTimeout(refresh, 5000); | |
14 | }); | |
15 | }; | |
16 | ||
17 | console.log(content_data); | |
18 | ||
19 | rivets.bind($("div#content"), content_data); | |
20 | setTimeout(refresh, 5000); | |
21 | }); | |
22 | </script> | |
23 | ||
24 | ||
25 | <section class="content-header"> | |
26 | <h1> | |
27 | RBD | |
28 | </h1> | |
29 | </section> | |
30 | ||
31 | <section class="content"> | |
32 | <div class="box"> | |
33 | <div class="box-header"> | |
34 | <h3 class="box-title">Images</h3> | |
35 | </div> | |
36 | <div class="box-body"> | |
37 | <table class="table table-bordered"> | |
38 | <thead> | |
39 | <tr> | |
40 | <th>Name</th> | |
41 | <th>Size</th> | |
42 | <th>Objects</th> | |
43 | <th>Object size</th> | |
44 | <th>Parent</th> | |
45 | </tr> | |
46 | </thead> | |
47 | <tbody> | |
48 | <tr rv-each-image="images"> | |
49 | <td>{image.name}</td> | |
50 | <td>{image.size | dimless}</td> | |
51 | <td>{image.num_objs | dimless}</td> | |
52 | <td>{image.obj_size | dimless}</td> | |
53 | <td>{image.parent}</td> | |
54 | </tr> | |
55 | </tbody> | |
56 | </table> | |
57 | </div> | |
58 | </div> | |
59 | ||
60 | ||
61 | </section> | |
62 | <!-- /.content --> | |
63 | ||
64 | {% endblock %} |