Lab as a Service 2.0
[laas.git] / src / templates / dashboard / resource_detail.html
1 <div class="row">
2     <div class="col-lg-9">
3         <div class="panel panel-default">
4             <div class="panel-heading">
5                 Status
6             </div>
7             <div class="panel-body">
8                 <div class="list-group pre-scrollable">
9                     {% for status in resource.resourcestatus_set.all %}
10                         <a href="#" class="list-group-item">
11                             <i class="fa fa-info fa-fw"></i> {{ status.title }}
12                             <span class="pull-right text-muted small">
13                                 <em>{{ status.timestamp }}</em>
14                             </span>
15                         </a>
16                     {% endfor %}
17                 </div>
18             </div>
19         </div>
20     </div>
21     <div class="col-lg-9">
22         <div class="panel panel-default">
23             <div class="panel-heading">
24                 Servers
25             </div>
26             <div class="panel-body">
27                 <div class="dataTables_wrapper">
28                     <table class="table table-striped table-bordered table-hover"
29                            id="{{ resource.id }}_server_table" cellspacing="0"
30                            width="100%">
31                         {% include "dashboard/server_table.html" %}
32                     </table>
33                 </div>
34             </div>
35         </div>
36     </div>
37 </div>
38 <div class="row">
39     <div class="col-lg-3">
40         <div class="panel panel-default">
41             <div class="panel-heading">
42                 Booking Utilization
43                 <div class="pull-right">
44                     <div class="form-group">
45                         <select onchange="loadChartData('{{ resource.id }}_booking_utilization', this.value);">
46                             <option value="{% url 'dashboard:booking_utilization' resource_id=resource.id weeks=-4 %}">
47                                 Last Month
48                             </option>
49                             <option value="{% url 'dashboard:booking_utilization' resource_id=resource.id weeks=-1 %}">
50                                 Last Week
51                             </option>
52                             <option value="{% url 'dashboard:booking_utilization' resource_id=resource.id weeks=1 %}">
53                                 Next Week
54                             </option>
55                             <option selected="selected"
56                                     value="{% url 'dashboard:booking_utilization' resource_id=resource.id weeks=4 %}">
57                                 Next Month
58                             </option>
59                         </select>
60                     </div>
61                 </div>
62             </div>
63             <div class="panel-body">
64                 <div class="flot-chart">
65                     <div class="flot-chart-content"
66                          id="{{ resource.id }}_booking_utilization"></div>
67                 </div>
68             </div>
69         </div>
70     </div>
71     <div class="col-lg-9">
72         <div class="panel panel-default">
73             <div class="panel-heading">
74                 Bookings
75             </div>
76             <div class="panel-body">
77                 <div class="dataTables_wrapper">
78                     <table class="table table-striped table-bordered table-hover"
79                            id="{{ resource.id }}_bookings_table" cellspacing="0"
80                            width="100%">
81                         {% include "booking/booking_table.html" %}
82                     </table>
83                 </div>
84             </div>
85         </div>
86     </div>
87 </div>
88 <div class="row">
89     <div class="col-lg-3">
90         <div class="panel panel-default">
91             <div class="panel-heading">
92                 Contact
93             </div>
94             <div class="panel-body">
95                 <p>
96                     <b>Lab Owner: </b>
97                     {{ resource.owner.username }}
98                 </p>
99                 <p>
100                     <b>Email: </b>
101                     {{ resource.owner.email }}
102                 </p>
103                 <p>
104                     <a href="{% url 'booking:create' resource_id=resource.id %}" class="btn
105                     btn-primary">
106                         Booking
107                     </a>
108                     <a href="{{ resource.url }}" class="btn
109                     btn-primary">
110                         OPNFV Wiki
111                     </a>
112                 </p>
113             </div>
114         </div>
115     </div>
116     <div class="col-lg-6">
117         <div class="panel panel-default">
118             <div class="panel-heading">
119                 VPN Users
120             </div>
121             <div class="panel-body">
122                 <div class="dataTables_wrapper">
123                     <table class="table table-striped table-bordered table-hover"
124                            id="{{ resource.id }}_vpn_user_table" cellspacing="0"
125                            width="100%">
126                         <thead>
127                         <tr>
128                             <th>User</th>
129                             <th>Email</th>
130                             <th>Company</th>
131                         </tr>
132                         </thead>
133                         <tbody>
134                         {% for user in resource.vpn_users.all %}
135                             <tr>
136                                 <td>
137                                     {{ user.username }}
138                                 </td>
139                                 <td>
140                                     {{ user.email }}
141                                 </td>
142                                 <td>
143                                     {{ user.userprofile.company }}
144                                 </td>
145                             </tr>
146                         {% endfor %}
147                     </table>
148                     </tbody>
149                 </div>
150             </div>
151         </div>
152     </div>
153 </div>