Merge "Prefetches Collaborators"
[pharos-tools.git] / dashboard / 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 btn-primary">
105                         Booking
106                     </a>
107                     <a href="{{ resource.url }}" class="btn btn-primary">
108                         OPNFV Wiki
109                     </a>
110                 </p>
111             </div>
112         </div>
113     </div>
114     <div class="col-lg-6">
115         <div class="panel panel-default">
116             <div class="panel-heading">
117                 VPN Users
118             </div>
119             <div class="panel-body">
120                 <div class="dataTables_wrapper">
121                     <table class="table table-striped table-bordered table-hover"
122                            id="{{ resource.id }}_vpn_user_table" cellspacing="0"
123                            width="100%">
124                         <thead>
125                         <tr>
126                             <th>User</th>
127                             <th>Email</th>
128                             <th>Company</th>
129                         </tr>
130                         </thead>
131                         <tbody>
132                         {% for user in resource.vpn_users.all %}
133                             <tr>
134                                 <td>
135                                     {{ user.username }}
136                                 </td>
137                                 <td>
138                                     {{ user.email }}
139                                 </td>
140                                 <td>
141                                     {{ user.userprofile.company }}
142                                 </td>
143                             </tr>
144                         {% endfor %}
145                     </table>
146                     </tbody>
147                 </div>
148             </div>
149         </div>
150     </div>
151 </div>