entry.html 3.09 KB
Newer Older
1 2
{% extends "box/base/entry.html" %}
{% load i18n %}
3
{% load staticfiles %}
4 5 6
{% get_current_language as LANGUAGE_CODE %}

{% block content %}
7
<li class="entry" id="vm-{{vm.id}}">
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
    {{block.super }}
</li>
{% endblock content %}

{% block summary %}
    {% include "box/vm/summary.html" %}
{% endblock summary %}

{% block details %}
<ul>
    <li class="name">
        {% trans "Hostname" %}:
        <span class="value">{{vm.name}}</span>
        <div class="clear"></div>
    </li>
    <li class="os-{{vm.template.os_type}}">
        {% trans "System" %}:
25
        <span class="value">{{vm.template.system|default:"n/a"}}</span>
26 27 28 29
        <div class="clear"></div>
    </li>
    <li class="template">
        {% trans "Type" %}:
30 31
        <span class="value">
            {% if vm.share %}
32
                {{vm.share.get_type.verbose_name}}
33 34 35 36 37 38 39 40
            {% else %}
                {% if vm.template.state != "READY" %}
                    {% trans "Master instance" %}
                {% else %}
                    {% trans "Try" %}
                {% endif %}
            {% endif %}
        </span>
41 42 43 44
        <div class="clear"></div>
    </li>
    <li class="template">
        {% trans "Share" %}:
45
        <span class="value">{{vm.share.name|default:"n/a"}}</span>
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
        <div class="clear"></div>
    </li>
    <li class="template">
        {% trans "Template" %}:
        <span class="value">{{vm.template.name}}</span>
        <div class="clear"></div>
    </li>
    <li class="type">
        {% trans "Size" %}:
        <span class="value">
            {{vm.template.instance_type.name}}:
            <span class="cpu">{{vm.template.instance_type.CPU}}</span>
            <span class="memory">{{vm.template.instance_type.RAM}}</span>
            <span class="credit">{{vm.template.instance_type.credit}}</span>
        </span>
    </li>
    <li class="date">
        {% trans "Created at" %}:
        <span class="value">{{vm.created_at}}</span>
    </li>
    {% if vm.time_of_suspend %}
    <li class="date">
        {% trans "time of suspend"|capfirst %}:
        <span class="value"> <abbr title="{{vm.time_of_suspend}}">{{vm.time_of_suspend|timeuntil}}</abbr>
70
            <a href="#"  class="renew-vm renew-suspend-vm" data-id="{{ vm.id }}" title="{% trans "Renew suspend time" %}">
71
                <img src="{% static "icons/control-double.png" %}" alt="{% trans "Renew suspend time" %}" />
72
            </a>
73 74 75 76 77 78 79
        </span>
    </li>
    {% endif %}
        {% if vm.time_of_delete %}
    <li class="date">
        {% trans "time of delete"|capfirst %}:
        <span class="value"> <abbr title="{{vm.time_of_delete}}">{{vm.time_of_delete|timeuntil}}</abbr>
80
            <a href="#"  class="renew-vm renew-delete-vm" data-id="{{ vm.id }}" title="{% trans "Renew deletion time" %}">
81
                <img src="{% static "icons/control-double.png" %}" alt="{% trans "Renew deletion time" %}" />
82
            </a>
83 84 85 86 87 88
        </span>
    </li>
    {% endif %}
    <li>
        &nbsp;
        <span class="value">
89
            <a href="{{ vm.get_absolute_url }}" title="{{vm.name}}">{% trans "More details" %}</a>
90 91 92 93
        </span>
    </li>
</ul>
{% endblock details %}