box-vmlist.html 3.41 KB
Newer Older
Őry Máté committed
1 2
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
Dudás Ádám committed
3 4
{% if instances %}
{% for i in instances %}
Bence Dnyi committed
5 6 7 8
<li class="wm">
    <div class="summary">
        <!--<div class="id">161</div>-->
        <div class="name {% if i.state == 'ACTIVE' %}wm-on{% else %}wm-off{% endif %}">
Danyi Bence committed
9
            {{i.name|truncatechars:20}}
Bence Dnyi committed
10
        </div>
Danyi Bence committed
11 12 13
        <div class="status">
            {{i.state}}
        </div>
Bence Dnyi committed
14
        <div class="actions">
Őry Máté committed
15
            {% if i.state == 'ACTIVE' %}
Őry Máté committed
16
            <a href="{{i.get_connect_uri}}" title="{% trans "Connect" %}">
Dányi Bence committed
17
                <img src="/static/icons/plug.png" alt="{% trans "Connect" %}" />
Dányi Bence committed
18
            </a>
Őry Máté committed
19 20
            <a href="/vm/suspend/{{i.id}}/" onclick="alert('Hamarosan a mozikban.'); return false" title="{% trans "Suspend" %}">
                <img src="/static/icons/control-pause.png" alt="{% trans "Suspend" %}" />
Dányi Bence committed
21
            </a>
Őry Máté committed
22 23
            <a href="/vm/delete/{{i.id}}/" onclick="return confirm('Biztosan törli a gépet?')" title="{% trans "Delete" %}">
                <img src="/static/icons/minus-circle.png" alt="{% trans "Delete" %}" />
Dányi Bence committed
24
            </a>
Őry Máté committed
25
            <a href="/vm/reset/{{i.id}}/" onclick="alert('Hamarosan a mozikban.'); return false" title="{% trans "Reboot" %}">
Dányi Bence committed
26 27
                <img src="/static/icons/arrow-circle-double.png" alt="↺" />
            </a>
Őry Máté committed
28 29
            {% endif %}
            {% if i.state == 'PENDING' %}
Őry Máté committed
30
            <img src="/static/load-2.gif" /> {% trans "starting…" %}
Őry Máté committed
31 32
            {% endif %}
            {% if i.state == 'SUSPENDED' %}
Őry Máté committed
33 34
            <a href="/vm/continue/{{i.id}}/" title="{% trans "Resume" %}">
                <img src="/static/icons/control.png" alt="{% trans "Resume" %}" />
Dányi Bence committed
35
            </a>
Őry Máté committed
36 37
            <a href="/vm/delete/{{i.id}}/" onclick="return confirm('Biztosan törli a gépet?')" title="{% trans "Delete" %}">
                <img src="/static/icons/minus-circle.png" alt="{% trans "Delete" %}" />
Dányi Bence committed
38
            </a>
Őry Máté committed
39 40
            {% endif %}
            {% if i.state == 'FAILED' %}
Őry Máté committed
41 42
            <a href="/vm/delete/{{i.id}}/" title="{% trans "Delete" %}">
                <img src="/static/icons/minus-circle.png" alt="{% trans "Delete" %}" />
Dányi Bence committed
43
            </a>
Őry Máté committed
44
            {% endif %}
Bence Dnyi committed
45 46 47
        </div>
        <div class="clear"></div>
    </div>
48
    <div class="details">
49
        <div class="details-container">
Dányi Bence committed
50
            <ul>
Őry Máté committed
51 52 53 54 55 56
                <li class="name">{% trans "Hostname" %}: <span class="value">{{i.name}}</span></li>
                <li class="os-linux">{% trans "System" %}: <span class="value">{{i.template.disk.name}}</span></li>
                <li class="type">{% trans "Size" %}: <span class="value">{{i.template.instance_type.name}}</span></li>
                <li class="date">{% trans "Created at" %}: <span class="value">{{i.created_at}}</span></li>
                <li class="date">{% trans "Expiration" %}: <span class="value"><abbr title="1 nap, 5 óra, 34 perc">1 nap</abbr></span></li>
                <li>&nbsp;<span class="value"><a href="/vm/show/{{i.id}}/" title="{{i.name}}">{% trans "More details" %}</a></span></li>
Dányi Bence committed
57 58
            </ul>
        </div>
Bence Dnyi committed
59 60
    </div>
</li>
Dudás Ádám committed
61 62
{% endfor %}
{% else %}
Danyi Bence committed
63
<div id="new-wm-tooltip">
Bence Dnyi committed
64 65
    <div id="new-wm-tooltip-container">
        <p>
Őry Máté committed
66
            {% trans "You have not started any machines yet." %}
Bence Dnyi committed
67 68
        </p>
        <p>
Őry Máté committed
69
            {% trans "Choose a template, and you can use the system in a minute." %}
Bence Dnyi committed
70
        </p>
Dányi Bence committed
71
        <div id="new-wm-tooltip-tail"></div>
Bence Dnyi committed
72 73
    </div>
</div>
74
{% endif %}