Cleans up some HTML
[pharos-tools.git] / dashboard / src / templates / dashboard / lab_detail.html
1 {% extends "base.html" %}
2 {% load staticfiles %}
3
4 {% block extrahead %}
5     {{block.super}}
6     <script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?lang=yaml"></script>
7 {% endblock %}
8
9 {% block content %}
10 <div class="row">
11     <div class="col-lg-4">
12         <div class="panel panel-default">
13             <div class="panel-heading clearfix">
14                 <h4 style="display: inline;">Lab Profile</h4>
15                <a data-toggle="collapse" data-target="#panel_overview" class="btn pull-right" style="line-height: 1;" >Expand</a>
16             </div>
17             <div class="panel-body" id="panel_overview">
18                 <table class="table">
19                     <tr>
20                         <td>Lab Name: </td><td>{{lab.name}}</td>
21                     </tr>
22                     <tr>
23                         <td>Lab Location: </td><td>{{lab.location}}</td>
24                     </tr>
25                     <tr>
26                         <td>Lab Email: </td>
27                         <td>{{lab.contact_email}}</td>
28                     </tr>
29                     {% if lab.contact_phone %}
30                     <tr>
31                         <td>Lab Phone: </td>
32                         <td>{{lab.contact_phone}}</td>
33                     </tr>
34                     {% endif %}
35                     <tr>
36                         <td>Lab Status: </td>
37                         {% if lab.status < 100 %}
38                         <td><div style="border-radius: 50%; background:#40B976; height: 20px; width: 20px; display: inline-block;"></div>
39                         Up</td>
40                         {% elif lab.status < 200 %}
41                         <td>
42                         <div style="border-radius: 50%; background:#eeee00; height: 20px; width: 20px; display: inline-block;"></div>
43                         Temporarily Offline</td>
44                         {% else %}
45                         <td>
46                         <div style="border-radius: 50%; background:#e50000; height: 20px; width: 20px; display: inline-block;"></div>
47                         Offline Indefinitely</td>
48                         {% endif %}
49                     </tr>
50                 </table>
51             </div>
52         </div>
53         <div class="panel panel-default">
54             <div class="panel-heading clearfix">
55                 <h4 style="display: inline;">Host Profiles</h4>
56
57                <a data-toggle="collapse" data-target="#profile_panel" class="btn pull-right" style="line-height: 1;" >Expand</a>
58             </div>
59             <div class="panel-body pod_panel" id="profile_panel">
60                 <table class="table">
61                     {% for profile in hostprofiles %}
62                     <tr>
63                         <td>{{profile.name}}</td>
64                         <td>{{profile.description}}</td>
65                         <td><a href="/resource/profiles/{{ profile.id }}" class="btn btn-primary">Profile</a></td>
66                     </tr>
67                     {% endfor %}
68                 </table>
69             </div>
70         </div>
71
72
73         <div class="panel panel-default">
74             <div class="panel-heading clearfix">
75                 <h4 style="display: inline;">Networking Capabilities</h4>
76             <a data-toggle="collapse" data-target="#network_panel" class="btn pull-right" style="line-height: 1;" >Expand</a>
77             </div>
78
79             <div class="panel-body" id="network_panel">
80
81                     <table class="table">
82                         <tr>
83                             <td>Block Size: (number of VLANs allowed per deployment)</td><td>{{lab.vlan_manager.block_size}}</td>
84                         </tr>
85                         <tr>
86                             <td>Overlapping Vlans Allowed (user can pick which VLANs they wish to use): </td>
87                             <td>{{lab.vlan_manager.allow_overlapping}}</td>
88                         </tr>
89                     </table>
90             </div>
91         </div>
92         <div class="panel panel-default">
93             <div class="panel-heading clearfix">
94                 <h4 style="display: inline;">Images</h4>
95             <a data-toggle="collapse" data-target="#image_panel" class="btn pull-right" style="line-height: 1;" >Expand</a>
96             </div>
97             <div class="panel-body" id="image_panel">
98                 <table class="table">
99                     <tr>
100                         <th>Name</th>
101                         <th>Owner</th>
102                         <th>For Host Type</th>
103                         <th>Description</th>
104                     </tr>
105                     {% for image in images %}
106                     <tr>
107                         <td>{{image.name}}</td>
108                         <td>{{image.owner}}</td>
109                         <td>{{image.host_type}}</td>
110                         <td>{{image.description}}</td>
111                     </tr>
112                     {% endfor %}
113                 </table>
114             </div>
115         </div>
116
117     </div>
118     <div class="col-lg-8">
119         <div class="panel panel-default">
120             <div class="panel-heading clearfix">
121                 <h4 style="display: inline;">Lab Hosts</h4>
122                 <p style="display: inline; margin-left: 10px;"></p>
123                <a data-toggle="collapse" data-target="#lab_hosts_panel" class="btn pull-right" style="line-height: 1;" >Expand</a>
124             </div>
125
126             <div class="panel-body" id="lab_hosts_panel">
127                 <table class="table">
128                     <tr>
129                         <th>Name</th>
130                         <th>Profile</th>
131                         <th>Booked</th>
132                         <th>Working</th>
133                         <th>Vendor</th>
134                     </tr>
135                     {% for host in lab.host_set.all %}
136                     <tr>
137                         <td>{{host.labid}}</td>
138                         <td>{{host.profile}}</td>
139                         <td>{{host.booked}}</td>
140                         {% if host.working %}
141                         <td style="background-color: #40B976;">{{host.working}}</td>
142                         {% else %}
143                         <td>{{host.working}}</td>
144                         {% endif %}
145                         <td>{{host.vendor}}</td>
146                     </tr>
147                     {% endfor %}
148                 </table>
149             </div>
150         </div>
151     </div>
152
153 </div>
154
155
156 {% endblock content %}
157