summaryrefslogtreecommitdiffstats
path: root/pharos-dashboard/templates
diff options
context:
space:
mode:
authormaxbr <maxbr@mi.fu-berlin.de>2016-09-12 11:18:10 +0200
committermaxbr <maxbr@mi.fu-berlin.de>2016-09-12 11:18:10 +0200
commitc19db1ed0fcbf232a7a9045e8d5680b93929dddd (patch)
tree2e100b7736ccd430a2328f42dbbbbf75aa78dd77 /pharos-dashboard/templates
parent7c5fb4bcc0f291bc0d9563545a2a7112084d5b26 (diff)
Add info to the resource view
JIRA: PHAROS-266 This adds a panel containing lab owner contact information, jenkins utilization timerange options and a table containing vpn users of a pod to the resource view. Change-Id: If991c74d3c93cd08f622771acc048ab998e16c48 Signed-off-by: maxbr <maxbr@mi.fu-berlin.de>
Diffstat (limited to 'pharos-dashboard/templates')
-rw-r--r--pharos-dashboard/templates/dashboard/resource_detail.html124
1 files changed, 106 insertions, 18 deletions
diff --git a/pharos-dashboard/templates/dashboard/resource_detail.html b/pharos-dashboard/templates/dashboard/resource_detail.html
index 904fecd..6067e1e 100644
--- a/pharos-dashboard/templates/dashboard/resource_detail.html
+++ b/pharos-dashboard/templates/dashboard/resource_detail.html
@@ -1,12 +1,27 @@
+{% load jenkins_filters %}
+
<div class="row">
<div class="col-lg-3">
<div class="panel panel-default">
<div class="panel-heading">
- Utilization
+ Jenkins Utilization
+ <div class="pull-right">
+ <div class="form-group">
+ <select onchange="loadChartData('{{ resource.id }}_jenkins_utilization', this.value);">
+ <option value="{% url 'dashboard:jenkins_utilization' resource_id=resource.id weeks=1 %}">
+ Last Week
+ </option>
+ <option value="{% url 'dashboard:jenkins_utilization' resource_id=resource.id weeks=4 %}">
+ Last Month
+ </option>
+ </select>
+ </div>
+ </div>
</div>
<div class="panel-body">
<div class="flot-chart">
- <div class="flot-chart-content" id="{{ resource.id }}_slave_utilization"></div>
+ <div class="flot-chart-content"
+ id="{{ resource.id }}_jenkins_utilization"></div>
</div>
</div>
</div>
@@ -78,19 +93,92 @@
</div>
</div>
</div>
-
-<script type="text/javascript">
- var data_{{ resource.id }} = [{
- label: "Offline",
- data: {{ utilization.offline }},
- color: '#d9534f'
- }, {
- label: "Online",
- data: {{ utilization.online }},
- color: '#5cb85c'
- }, {
- label: "Idle",
- data: {{ utilization.idle }},
- color: '#5bc0de'
- }];
-</script> \ No newline at end of file
+<div class="row">
+ <div class="col-lg-3">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ Contact
+ </div>
+ <div class="panel-body">
+ <p>
+ <b>Lab Owner: </b>
+ {{ resource.owner.username }}
+ </p>
+ <p>
+ <b>Email: </b>
+ </p>
+ <p>
+ <a href="{% url 'booking:create' resource_id=resource.id %}" class="btn
+ btn-primary">
+ Booking
+ </a>
+ <a href="{{ resource.url }}" class="btn
+ btn-primary">
+ OPNFV Wiki
+ </a>
+ </p>
+ </div>
+ </div>
+ </div>
+ <div class="col-lg-3">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ Jenkins Status
+ </div>
+ <div class="panel-body">
+ <p>
+ <b>Slave Name: </b>
+ <a target='_blank'
+ href={{ resource.slave.url }}>{{ resource.slave.name }}</a>
+ </p>
+ <p>
+ <b>Status: </b>
+ {{ resource.slave.status }}
+ </p>
+ <p>
+ <b>Last Job: </b>
+ <a href="{{ resource.slave.last_job_url }}">
+ {{ resource.slave.last_job_name }}
+ </a>
+ </p>
+ </div>
+ </div>
+ </div>
+ <div class="col-lg-6">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ VPN Users
+ </div>
+ <div class="panel-body">
+ <div class="dataTables_wrapper">
+ <table class="table table-striped table-bordered table-hover"
+ id="{{ resource.id }}_vpn_user_table" cellspacing="0"
+ width="100%">
+ <thead>
+ <tr>
+ <th>User</th>
+ <th>Email</th>
+ <th>Company</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for user in resource.vpn_users.all %}
+ <tr>
+ <th>
+ {{ user.username }}
+ </th>
+ <th>
+ {{ user.email }}
+ </th>
+ <th>
+ {{ user.userprofile.company }}
+ </th>
+ </tr>
+ {% endfor %}
+ </table>
+ </tbody>
+ </div>
+ </div>
+ </div>
+ </div>
+</div> \ No newline at end of file