summaryrefslogtreecommitdiff
path: root/templates/apps/content/cluster.html
blob: 6d306904c78804a42a6dc7fb145256c26aea7584 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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 %}