home.html 2.34 KB
Newer Older
Kálmán Viktor committed
1
{% load i18n %}
2 3 4
<div class="row">
  <div class="col-md-4">
    <dl>
5
      <dt>{% trans "System" %}:</dt>
6
      <dd><i class="icon-{{ os_type_icon }}"></i> {{ instance.system }}</dd>
7
      <dt style="margin-top: 5px;">{% trans "Description" %}:</dt>
8
      <dd><small>{{ instance.description }}</small></dd>
9
    </dl>
Kálmán Viktor committed
10

11 12 13 14 15 16 17 18 19 20
    <h4>{% trans "Expiration" %} {% if instance.is_expiring %}<i class="icon-warning-sign text-danger"></i>{% endif %}
      <a href="{% url "dashboard.views.vm-renew" instance.pk "" %}" class="btn btn-success btn-xs pull-right">{% trans "renew" %}</a>
    </h4>
    <dl>
      <dt>{% trans "Suspended at:" %}</dt>
      <dd><i class="icon-moon"></i> {{ instance.time_of_suspend|timeuntil }}</dd>
      <dt>{% trans "Destroyed at:" %}</dt>
      <dd><i class="icon-remove"></i> {{ instance.time_of_delete|timeuntil }}</dd>
    </dl>

Kálmán Viktor committed
21 22 23 24 25 26 27 28 29 30 31
    <div style="font-weight: bold;">{% trans "Tags" %}</div>
    <div id="vm-details-tags" style="margin-bottom: 20px;">
      <div id="vm-details-tags-list">
        {% if instance.tags.all %}
          {% for t in instance.tags.all %}
            <div class="label label-primary label-tag" style="display: inline-block">
              {{ t }}
              <a href="#" class="vm-details-remove-tag"><i class="icon-remove"></i></a>
            </div>
          {% endfor %}
        {% else %}
32
          <small>{% trans "No tag added!" %}</small>
Kálmán Viktor committed
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
        {% endif %}
      </div>
      <form action="" method="POST">
        {% csrf_token %}
        <div class="input-group" id="vm-details-tags-form">
          <input type="text" class="form-control input-sm input-tags" name="new_tag" id="vm-details-tags-input"/>
          <!--<div class="input-group-addon">
            <i class="icon-question"></i>
          </div>-->
          <div class="input-group-btn">
            <input type="submit" class="btn btn-default btn-sm input-tags" value="{% trans "Add tag" %}"/>
          </div>
        </div>
      </form>
    </div><!-- id:vm-details-tags -->
48 49
  </div>
  <div class="col-md-8">
50
    {% if graphite_enabled %}
51 52 53
    <img src="{% url "dashboard.views.vm-graph" instance.pk "cpu" "6h" %}" style="width:100%"/>
    <img src="{% url "dashboard.views.vm-graph" instance.pk "memory" "6h" %}" style="width:100%"/>
    <img src="{% url "dashboard.views.vm-graph" instance.pk "network" "6h" %}" style="width:100%"/>
54
    {% endif %}
55 56
  </div>
</div>