diff options
author | Johan Lundberg <lundberg@nordu.net> | 2014-04-02 17:25:00 +0200 |
---|---|---|
committer | Johan Lundberg <lundberg@nordu.net> | 2014-04-02 17:25:00 +0200 |
commit | 6acc69b519422171eb661edbe192bf2074ce6d8f (patch) | |
tree | 7019e88b74a2d38a75d6d3db22f1bad90323ae1e /templates/apps/content/cluster.html | |
parent | 58eae4e6c78bc69c20795da5a96fe2e251e47bf5 (diff) |
Added more views for content.
Diffstat (limited to 'templates/apps/content/cluster.html')
-rw-r--r-- | templates/apps/content/cluster.html | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/templates/apps/content/cluster.html b/templates/apps/content/cluster.html new file mode 100644 index 0000000..6d30690 --- /dev/null +++ b/templates/apps/content/cluster.html @@ -0,0 +1,59 @@ +{% extends "base.html" %} +{% block js %} + <link href="{{STATIC_URL}}/css/jquery.dataTables.css" rel="stylesheet" type="text/css" /> + <script type="text/javascript" src="{{STATIC_URL}}/js/jquery.dataTables.min.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}/js/dataTables.fileSize.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}/js/dataTables.percent.js"></script> + <script> + $(document).ready(function() { + $('#content').dataTable({ + "aoColumns": [ + null, + null, + { "sType": "file-size" }, + { "sType": "percent" } + ] + }); + }); + </script> +{% endblock %} +{% block content %} +<ul class="nav nav-pills"> +{% for cluster in clusters %} + <li class="{% if cluster.name == cluster_name %}active{% else %}{% endif %}"> + <a href="{{ cluster.name }}">{{ cluster.name }}</a> + </li> +{% endfor %} +</ul> +{% if cluster_name %} + <h1>Storage for {{cluster_name}}</h1> + <div> + <strong>Total storage:</strong> {{ total_bytecount|filesizeformat }} + </div> + <br> + <br> + <div> + <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="content"> + <thead> + <tr> + <th>Domain</th><th>Number of files</th><th>Storage used</th><th>Percent</th> + </tr> + </thead> + <tbody> + {% for domain in domains %} + <tr> + <td><a href="../domain/{{ domain.domain }}">{{ domain.domain }}</a></td> + <td>{{ domain.number_of_files }}</td> + <td>{{ domain.domain_bytes|filesizeformat}}</td> + <td>{% widthratio domain.domain_bytes total_bytecount 100 %}%</td> + </tr> + {% endfor %} + </tbody> + </table> + </div> +{% endif %} +{% endblock %} + +{% block widgets %} + +{% endblock %}
\ No newline at end of file |