account.html 2.73 KB
Newer Older
1
2
3
4
5
{% extends "helpdesk/base.html" %}

{% block extraheader %}
<small>/ {{ account }}</small>
{% endblock %}
Olga Brani's avatar
Olga Brani committed
6

7
{% block content %}
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
8
9

{% if account_exists %}
10
11
<div class="subnav">
  <ul class="nav nav-pills">
Olga Brani's avatar
Olga Brani committed
12
      
13
14
15
16
17
18
19
20
      <li><a href="#account">Account</a></li>
      <li class="dropdown">
          <a class="dropdown-toggle" data-toggle="dropdown" href="#">Virtual machines <b class="caret"></b></a>
          <ul class="dropdown-menu">
            <li><a href="#vms">All</a></li>
            <li class="divider"></li>
              <li>
                {% for vm in vms %}
21
                <a href="#vm-{{ vm.pk }}" class="{% if vm.deleted %}deleted{% endif %}">{{ vm.name }}</a>
22
23
24
25
26
27
28
29
30
31
32
                {% endfor %}
            </li>
          </ul>
      </li>
      <li class="dropdown">
          <a class="dropdown-toggle" data-toggle="dropdown" href="#">Networks <b class="caret"></b></a>
          <ul class="dropdown-menu">
            <li><a href="#networks">All</a></li>
            <li class="divider"></li>
              <li>
                {% for net in networks %}
33
                <a href="#network-{{ net.pk }}" class="{% if net.state == "DELETED" %}deleted{% endif %}">{{ net.name }}</a>
34
35
36
37
                {% endfor %}
            </li>
          </ul>
      </li>
Olga Brani's avatar
Olga Brani committed
38
      <li><h2>{{ account }}</h2></li>
39
40
41
42
  </ul>
</div>
<div class="row-fluid">
    <div class="object-anchor" id="account"></div>
Olga Brani's avatar
Olga Brani committed
43
    <h3 class="info">{{ account }} | {{ vms|length }} VMs |  {{ networks|length }} Networks</h3>
44
45
46
    </div>
    <div class="object-anchor" id="vms"></div>
    <div class="vms info-block well">
Olga Brani's avatar
Olga Brani committed
47
48
49
    	<div class="show-hide-all toggle">
	    	<span class="badge">+ Show Info</span>
	    </div>
50
        <h3>Virtual machines <span class="badge badge-info">Total: {{ vms|length }}</span></h3>
Olga Brani's avatar
Olga Brani committed
51
52
        <div class="info-block-content">
	        {% for vm in vms %}
Olga Brani's avatar
Olga Brani committed
53
	        <!-- {% cycle 'row1' 'row2' as rowcls %}  -->
Olga Brani's avatar
Olga Brani committed
54
55
56
57
58
	        {% include "helpdesk/vms_list.html" %}
	        {% empty %}
	        <p>No virtual machines available for this account</p>
	        {% endfor %}
       	</div>
59
60
61
    </div>
    <div class="object-anchor" id="networks"></div>
    <div class="networks info-block well">
Olga Brani's avatar
Olga Brani committed
62
63
64
65
66
67
    	<div class="show-hide-all toggle">
	    	<span class="badge">+ Show Info</span>
	    </div>
        <h3>Networks <span class="badge badge-info">Total: {{ networks|length }}</span></h3>
        <div class="info-block-content">
	        {% for network in networks %}
Olga Brani's avatar
Olga Brani committed
68
	        <!--{% cycle 'row1' 'row2' as rowcls %}-->
Olga Brani's avatar
Olga Brani committed
69
70
71
72
73
	        {% include "helpdesk/networks_list.html" %}
	        {% empty %}
	        <p>No networks available for this account</p>
	        {% endfor %}
        </div>
74
75
    </div>
</div>
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
76
77
78
{% else %}
<p>Account <em>{{ account }}</em> does not exist in cyclades database</p>
{% endif %}
79
{% endblock %}