account.html 3.46 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
43
44
  </ul>
</div>
<div class="row-fluid">
    <div class="object-anchor" id="account"></div>
    <div class="account info-block well">
        <h3>Account</h3>
Olga Brani's avatar
Olga Brani committed
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
        <div class="info-block-content">	
	        <div class="object-details">
	            <div class="vm-details-content object-details-content">
	            	 <ul class="nav nav-tabs">
					    <li class="active"><a href="#details{{ account }}" data-toggle="tab">Details</a></li>
				    </ul>	
	                 <div class="tab-content">
						<div class="tab-pane active" id="details{{ account }}">
			                <dl class="dl-horizontal well">
			                    <dt>Username</dt><dd>{{ account }}</dd>
			                    <dt>Virtual machines</dt><dd>{{ vms|length }}</dd>
			                    <dt>Networks</dt><dd>{{ networks|length }}</dd>
			                </dl>
			           </div>
			        </div>
	            </div>
	        </div>
	    </div>
63
64
65
    </div>
    <div class="object-anchor" id="vms"></div>
    <div class="vms info-block well">
Olga Brani's avatar
Olga Brani committed
66
67
68
    	<div class="show-hide-all toggle">
	    	<span class="badge">+ Show Info</span>
	    </div>
69
        <h3>Virtual machines <span class="badge badge-info">Total: {{ vms|length }}</span></h3>
Olga Brani's avatar
Olga Brani committed
70
71
        <div class="info-block-content">
	        {% for vm in vms %}
Olga Brani's avatar
Olga Brani committed
72
	        <!-- {% cycle 'row1' 'row2' as rowcls %}  -->
Olga Brani's avatar
Olga Brani committed
73
74
75
76
77
	        {% include "helpdesk/vms_list.html" %}
	        {% empty %}
	        <p>No virtual machines available for this account</p>
	        {% endfor %}
       	</div>
78
79
80
    </div>
    <div class="object-anchor" id="networks"></div>
    <div class="networks info-block well">
Olga Brani's avatar
Olga Brani committed
81
82
83
84
85
86
    	<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
87
	        <!--{% cycle 'row1' 'row2' as rowcls %}-->
Olga Brani's avatar
Olga Brani committed
88
89
90
91
92
	        {% include "helpdesk/networks_list.html" %}
	        {% empty %}
	        <p>No networks available for this account</p>
	        {% endfor %}
        </div>
93
94
    </div>
</div>
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
95
96
97
{% else %}
<p>Account <em>{{ account }}</em> does not exist in cyclades database</p>
{% endif %}
98
{% endblock %}