add nick
[laas.git] / src / templates / base / 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="card mb-3">
13             <div class="card-header d-flex">
14                 <h4>Lab Profile</h4>
15                 <button class="btn btn-outline-secondary ml-auto" data-toggle="collapse" data-target="#panel_overview">Expand</button>
16             </div>
17             <div class="collapse show" id="panel_overview">
18                 <div class="overflow-auto">
19                     <table class="table m-0">
20                         <tr>
21                             <td>Lab Name: </td>
22                             <td>{{lab.name}}</td>
23                         </tr>
24                         <tr>
25                             <td>Lab Location: </td>
26                             <td>{{lab.location}}</td>
27                         </tr>
28                         <tr>
29                             <td>Lab Email: </td>
30                             <td>{{lab.contact_email}}</td>
31                         </tr>
32                         {% if lab.contact_phone %}
33                             <tr>
34                                 <td>Lab Phone: </td>
35                                 <td>{{lab.contact_phone}}</td>
36                             </tr>
37                         {% endif %}
38                         <tr>
39                             <td>Lab Status: </td>
40                             {% if lab.status < 100 %}
41                                 <td>
42                                     <div class="rounded-circle bg-success square-20 d-inline-block"></div>
43                                     Up
44                                 </td>
45                             {% elif lab.status < 200 %}
46                                 <td>
47                                     <div class="rounded-circle bg-warning square-20 d-inline-block"></div>
48                                     Temporarily Offline
49                                 </td>
50                             {% else %}
51                                 <td>
52                                     <div class="rounded-circle bg-danger square-20 d-inline-block"></div>
53                                     Offline Indefinitely
54                                 </td>
55                             {% endif %}
56                         </tr>
57                     </table>
58                 </div>
59             </div>
60         </div>
61         <div class="card my-3">
62             <div class="card-header d-flex">
63                 <h4 class="d-inline-block">Host Profiles</h4>
64                 <button data-toggle="collapse" data-target="#profile_panel" class="btn btn-outline-secondary ml-auto">Expand</button>
65             </div>
66             <div class="collapse show" id="profile_panel">
67                 <div class="overflow-auto">
68                     <table class="table m-0">
69                         {% for profile in hostprofiles %}
70                             <tr>
71                                 <td>{{profile.name}}</td>
72                                 <td>{{profile.description}}</td>
73                                 <td><a href="/resource/profiles/{{ profile.id }}" class="btn btn-info">Profile</a></td>
74                             </tr>
75                         {% endfor %}
76                     </table>
77                 </div>
78             </div>
79         </div>
80
81         <div class="card my-3">
82             <div class="card-header d-flex">
83                 <h4 class="d-inline">Networking Capabilities</h4>
84                 <button data-toggle="collapse" data-target="#network_panel" class="btn btn-outline-secondary ml-auto">Expand</button>
85             </div>
86
87             <div class="collapse show" id="network_panel">
88                 <table class="table m-0">
89                     <tr>
90                         <td>Block Size: (number of VLANs allowed per deployment)</td><td>{{lab.vlan_manager.block_size}}</td>
91                     </tr>
92                     <tr>
93                         <td>Overlapping Vlans Allowed (user can pick which VLANs they wish to use): </td>
94                         <td>{{lab.vlan_manager.allow_overlapping|yesno:"Yes,No"}}</td>
95                     </tr>
96                 </table>
97             </div>
98         </div>
99         <div class="card my-3">
100             <div class="card-header d-flex">
101                 <h4>Images</h4>
102                 <button data-toggle="collapse" data-target="#image_panel" class="btn btn-outline-secondary ml-auto">Expand</button>
103             </div>
104             <div class="collapse show" id="image_panel">
105                 <div class="overflow-auto">
106                     <table class="table m-0">
107                         <tr>
108                             <th>Name</th>
109                             <th>Owner</th>
110                             <th>For Host Type</th>
111                             <th>Description</th>
112                         </tr>
113                         {% for image in images %}
114                             <tr>
115                                 <td>{{image.name}}</td>
116                                 <td>{{image.owner}}</td>
117                                 <td>{{image.host_type}}</td>
118                                 <td>{{image.description}}</td>
119                             </tr>
120                         {% endfor %}
121                     </table>
122                 </div>
123             </div>
124         </div>
125
126     </div>
127     <div class="col-lg-8">
128         <div class="card mb-3">
129             <div class="card-header d-flex">
130                 <h4>Lab Hosts</h4>
131                 <button data-toggle="collapse" data-target="#lab_hosts_panel" class="btn btn-outline-secondary ml-auto">Expand</button>
132             </div>
133
134             <div class="collapse show" id="lab_hosts_panel">
135                 <table class="table m-0">
136                     <tr>
137                         <th>Name</th>
138                         <th>Profile</th>
139                         <th>Booked</th>
140                         <th>Working</th>
141                         <th>Vendor</th>
142                     </tr>
143                     {% for host in hosts %}
144                         <tr>
145                             <td>{{host.name}}</td>
146                             <td>{{host.profile}}</td>
147                             <td>{{host.booked|yesno:"Yes,No"}}</td>
148                             {% if host.working %}
149                                 <td class="bg-success text-white">Yes</td>
150                             {% else %}
151                                 <td class="bg-danger text-white">No</td>
152                             {% endif %}
153                             <td>{{host.vendor}}</td>
154                         </tr>
155                     {% endfor %}
156                 </table>
157             </div>
158         </div>
159     </div>
160
161 </div>
162
163
164 {% endblock content %}
165