home.html 4.18 KB
Newer Older
Dudás Ádám committed
1 2
{% extends "base.html" %}
{% load i18n %}
Őry Máté committed
3 4
{% get_current_language as LANGUAGE_CODE %}

Dudás Ádám committed
5 6 7

{% block content %}
<div class="boxes">
Danyi Bence committed
8
    <div class="contentblock" id="state">
9
        <h2>{% trans "Virtual machines" %}</h2>
Danyi Bence committed
10 11
        <ul class="wm-list">
            {% include "box-vmlist.html" %}
Danyi Bence committed
12
            <li id="new-wm-button" class="wm new">
Danyi Bence committed
13
                <div class="summary">
Őry Máté committed
14
                    <div class="name">{% trans "Start new machine" %}</div>
Danyi Bence committed
15 16 17 18
                    <div class="clear"></div>
                </div>
            </li>
            <li id="new-wm" style="display: none">
Őry Máté committed
19
            <h2>{% trans "Available templates" %}</h2>
Dányi Bence committed
20
                <p>
Őry Máté committed
21
                {% trans "Choose one of the following templates to launch." %}
Dányi Bence committed
22
                </p>
Danyi Bence committed
23 24 25 26
                <div class="container">
                    <ul class="wm-list modal">
                        {% for m in templates %}
                        <li class="wm">
Dányi Bence committed
27 28 29
                            <div class="summary">
                                <div class="quota">
                                    <div class="used" style="width: 40%"></div>
Danyi Bence committed
30
                                </div>
Dányi Bence committed
31 32 33 34 35 36 37 38
                                <div class="name wm-on">{{m.name}}</div>
                                <div class="status">
                                    3/10
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="details">
                                <div class="details-container">
Danyi Bence committed
39
                                    <ul>
Őry Máté committed
40
                                        <li class="os-{{m.os_type}}">{% trans "System" %}: <span class="value">{{m.system}}</span><div class="clear"></div></li>
Őry Máté committed
41 42 43 44
                                        <li class="type">{% trans "Size" %}: <span class="value">{{m.instance_type.name}}</span></li>
                                        <li class="memory">{% trans "Memory" %}:
                                            <span class="value">{% blocktrans with m=m.instance_type.RAM %}{{m}} MiB{% endblocktrans %}</span></li>
                                        <li class="cpu">{% trans "CPU cores" %}: <span class="value">{{m.instance_type.CPU}}</span></li>
Őry Máté committed
45
                                        <li class="description">{% trans "Description" %}:<span class="value">{{m.description}}</span><div class="clear"></div></li>
Dányi Bence committed
46 47 48 49 50 51 52 53 54
                                        <li>
                                            &nbsp;
                                            <span class="value">
                                                <form method="POST" action="/vm/new/{{m.pk}}/">{% csrf_token %}
                                                    <input type="submit" value="{% trans "Launch" %}"/>
                                                </form>
                                            </span>
                                            <div class="clear"></div>
                                        </li>
Danyi Bence committed
55 56
                                    </ul>
                                </div>
Dányi Bence committed
57
                            </div>
Danyi Bence committed
58 59 60 61
                        </li>
                        {% endfor %}
                    </ul>
                </div>
Danyi Bence committed
62
            </li>
Dányi Bence committed
63 64 65
            <li class="wm small">
                <div class="summary">
                    <div class="quota">
66
                        <div class="used" style="background-color: rgba(0,255,0,0.2); width: {{userdetails.get_instance_pc}}%"></div>
Dányi Bence committed
67
                    </div>
68
                    <div class="name">{% blocktrans with used=userdetails.get_weighted_instance_count all=userdetails.instance_quota %}Personal quota: {{used}}/{{all}}{% endblocktrans %}</div>
Dányi Bence committed
69 70 71
                    <div class="clear"></div>
                </div>
            </li>
Danyi Bence committed
72 73
        </ul>
    </div>
Dudás Ádám committed
74 75 76 77 78 79 80 81 82 83
    {% for box in boxes %}
    {% if forloop.counter0|divisibleby:2 %}
        <div class="contentblock">
            <h2>{{ box.title }}</h2>
            <div class="content">
                {{ box.text|safe }}
            </div>
        </div>
    {% endif %}
    {% endfor %}
84
{% include "box-templatelist.html" %}
Dudás Ádám committed
85
</div>
86
{% include "box-filelist.html" %}
87
{% include "box-grouplist.html" %}
Dudás Ádám committed
88
{% endblock %}