Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / admin-interface / templates / admin-interface / vms_list.html @ c204fcff

History | View | Annotate | Download (4.2 kB)

1
{% load admin-interface_tags %}
2
<div class="object-anchor" id="vm-{{vm.pk}}"></div>
3
<div class="vm-details object-details {{ rowcls }}">
4
  <h4><em><img src="{{ UI_MEDIA_URL }}images/icons/os/{{ vm|get_os }}.png" />{{ vm|get_os }}</em><i class="icon-tasks"></i>{{ vm.name }}<span class="badge">&nbsp;</span></h4>
5
  {% if vm.suspended %}
6
  <span class="badge badge-important">SUSPENDED</span>
7
  {% endif %}
8
  {{ vm|object_status_badge|safe }}
9
  <span class="badge badge-inverse">ID: {{ vm.pk }}</span>
10
  <span class="badge badge-inverse">{{ vm|vm_public_ip }}</span>
11
  <span class="badge badge-inverse flavor">
12
    <span class="cpu">{{ vm.flavor.cpu }}x</span>
13
    <span class="ram">{{ vm.flavor.ram}}MB</span>
14
    <span class="disk">{{ vm.flavor.disk }}GB</span>
15
  </span>
16
  <div class="vm-details-content object-details-content">
17

    
18
    <ul class="nav nav-tabs">
19
      <li class="active"><a href="#details{{ vm.pk }}" data-toggle="tab">Details</a></li>
20
      <li><a href="#metadata{{ vm.pk }}" data-toggle="tab">Metadata</a></li>
21
      <li><a href="#backend{{ vm.pk }}" data-toggle="tab">Backend info</a></li>
22
      <li><a href="#network{{ vm.pk }}" data-toggle="tab">Network interfaces</a></li>
23
    </ul>
24
    <div class="tab-content">
25
      <div class="tab-pane active" id="details{{ vm.pk }}">
26
        <dl class="dl-horizontal well">
27
          <dt>ID</dt><dd>{{ vm.pk }}</dd>
28
          <dt>Name</dt><dd>{{ vm.name }}</dd>
29
          <dt>User id</dt><dd>{{ vm.userid }}</dd>
30
          <dt>Created</dt><dd>{{ vm.created }} ({{ vm.created|timesince }} <strong>ago</strong>)</dd>
31
          <dt>Updated</dt><dd>{{ vm.updated }} ({{ vm.updated|timesince }} <strong>ago</strong>)</dd>
32
          <dt>Suspended</dt><dd>{{ vm.suspended }}</dd>
33
          <dt>Deleted</dt><dd>{{ vm.deleted }}</dd>
34
          <dt>Image id</dt><dd>{{ vm.imageid }}</dd>
35
          <dt>Flavor</dt><dd>{{ vm.flavor.cpu }},
36
          {{ vm.flavor.disk }},
37
          {{ vm.flavor.ram }},
38
          {{ vm.flavor.disk_template }}</dd>
39
        </dl>
40
      </div>
41
      <div class="tab-pane" id="metadata{{ vm.pk }}">
42
        <dl class="dl-horizontal well">
43
          {% for meta in vm.metadata.all %}  
44
          <dt>{{ meta.meta_key }}</dt><dd>{{ meta.meta_value }}</dd>
45
          {% empty %}
46
          <dt>No metadata</dt>
47
          {% endfor %}
48
        </dl>
49
      </div>
50
      <div class="tab-pane" id="backend{{ vm.pk }}">
51
        <dl class="dl-horizontal well">
52
          <dt>Action</dt><dd>{{ vm.get_action_display }} ({{ vm.action }})</dd>
53
          <dt>Operstate</dt><dd>{{ vm.get_operstate_display }} ({{ vm.operstate }})</dd>
54
          <dt>Backend job id</dt><dd>{{ vm.backendjobid }}</dd>
55
          <dt>Backend op code</dt><dd>{{ vm.get_backendopcode_display }} ({{ vm.backendopcode }})</dd>
56
          <dt>Backend log msg</dt><dd>{{ vm.backendlogmsg }}</dd>
57
          <dt>Build backendjobstatus</dt><dd>{{ vm.backendjobstatus }}</dd>
58
          <dt>Build percentage</dt><dd>{{ vm.buildpercentage }}</dd>
59
        </dl>
60
        <dl class="dl-horizontal well">
61
          {{ vm|backend_info|safe }}
62
        </dl>
63
      </div>
64
      <div class="tab-pane" id="network{{ vm.pk }}">
65
        <table class="table well">
66
          <thead>
67
            <td>ID</td>
68
            <td>Network (ID)</td>
69
            <td>Created</td>
70
            <td>Updated</td>
71
            <td>Index</td>
72
            <td>MAC</td>
73
            <td>IPv4</td>
74
            <td>IPv6</td>
75
            <td>Firewall</td>
76
          </thead>
77
          <tbody>
78
            {% for nic in vm.nics.all %}
79
            <tr>
80
              <td>{{ nic.pk }}</td>
81
              <td>{{ nic.network }} ({{ nic.network.pk }})</td>
82
              <td>{{ nic.created }}</td>
83
              <td>{{ nic.updated }}</td>
84
              <td>{{ nic.index }}</td>
85
              <td>{{ nic.mac }}</td>
86
              <td>{{ nic.ipv4_address }}</td>
87
              <td>{{ nic.ipv6_address }}</td>
88
              <td>{{ nic.get_firewall_profile_display }} ({{nic.firewall_profile}})</td>
89
            </tr>
90
            {% empty %}
91
            <tr>
92
              <td colspan=9>No network interface available</td>
93
            </tr>
94
            {% endfor %}
95
          </tbody>
96
        </table>
97
      </div>
98
    </div>        
99
  </div>
100
  <div class="vm-actions clearfix">
101
    {% include "admin-interface/_vm_actions.html" %}
102
  </div>
103
</div>