summaryrefslogtreecommitdiff
path: root/horizon/horizon/dashboards/syspanel/templates/syspanel/instances/_list.html
blob: 71a1304187fc4ecbede8e921dff1b2251b875e59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{% load parse_date %}
{% load i18n %}
<table id="instances" class="wide">
  <tr>
    <th>{% trans "Name"%}</th>
    <th>{% trans "Tenant"%}</th>
    <th>{% trans "User"%}</th>
    <th>{% trans "Host"%}</th>
    <th>{% trans "Created"%}</th>
    <th>{% trans "Image"%}</th>
    <th>{% trans "IPs"%}</th>
    <th>{% trans "State"%}</th>
    <th>{% trans "Actions"%}</th>
  </tr>
  {% for instance in instances %}
    <tr id="{{instance.id}}" class="{% cycle "odd" "even" %}">
      <td><a href="{% url horizon:syspanel:instances:detail instance.id %}">{{instance.name}} <small>(id: {{instance.id}})</small></a></td>
      <td>{{instance.attrs.tenant_id}}</td>
      <td>{{instance.attrs.user_id}}</td>
      <td class="name">{{instance.attrs.host}}</td>
      <td>{{instance.attrs.launched_at|parse_date}}</td>
      <td>{{instance.image_name}}</td>

      <td class="ip_list">
        {% for ip_group, addresses in instance.addresses.items %}
          {% if instance.addresses.items|length > 1 %}
          <h4>{{ip_group}}</h4>
          <ul>
            {% for address in addresses %}
              <li>{{address.addr}}</li>
            {% endfor %}
          </ul>
          {% else %}
          <ul>
            {% for address in addresses %}
              <li>{{address.addr}}</li>
            {% endfor %}
          </ul>
          {% endif %}
        {% endfor %}
      </td>

      <td>{{instance.status|lower|capfirst}}</td>
      <td id="actions">
        <ul>
          <li class="form">{% include "horizon/common/instances/_terminate.html" with form=terminate_form %}</li>
          <li class="form">{% include "horizon/common/instances/_reboot.html" with form=reboot_form %}</li>
          <li><a target="_blank" href="{% url horizon:nova:instances:console instance.id %}">{% trans "Console Log"%}</a></li>
          <li><a target="_blank" href="{% url horizon:nova:instances:vnc instance.id %}">{% trans "VNC Console"%}</a></li>
        </ul>
      </td>
    </tr>
  {% endfor %}
</table>