summaryrefslogtreecommitdiffstats
path: root/pharos-dashboard/src/templates
diff options
context:
space:
mode:
Diffstat (limited to 'pharos-dashboard/src/templates')
-rw-r--r--pharos-dashboard/src/templates/account/user_list.html20
-rw-r--r--pharos-dashboard/src/templates/account/userprofile_update_form.html10
-rw-r--r--pharos-dashboard/src/templates/base.html9
-rw-r--r--pharos-dashboard/src/templates/booking/booking_calendar.html51
-rw-r--r--pharos-dashboard/src/templates/booking/booking_detail.html8
-rw-r--r--pharos-dashboard/src/templates/booking/booking_list.html50
-rw-r--r--pharos-dashboard/src/templates/booking/booking_table.html10
-rw-r--r--pharos-dashboard/src/templates/dashboard/resource_detail.html1
8 files changed, 123 insertions, 36 deletions
diff --git a/pharos-dashboard/src/templates/account/user_list.html b/pharos-dashboard/src/templates/account/user_list.html
index c2b8193..f18e161 100644
--- a/pharos-dashboard/src/templates/account/user_list.html
+++ b/pharos-dashboard/src/templates/account/user_list.html
@@ -5,6 +5,8 @@
<thead>
<tr>
<th>Username</th>
+ <th>Full Name</th>
+ <th>Email</th>
<th>Company</th>
<th>SSH Key</th>
<th>GPG Key</th>
@@ -17,17 +19,23 @@
{{ user.username }}
</td>
<td>
+ {{ user.userprofile.full_name }}
+ </td>
+ <td>
+ {{ user.email }}
+ </td>
+ <td>
{{ user.userprofile.company }}
</td>
<td>
- {% if user.userprofile.ssh_public_key %}
- <a href={{ user.userprofile.ssh_public_key.url }}>SSH</a>
- {% endif %}
+ {% if user.userprofile.ssh_public_key %}
+ <a href={{ user.userprofile.ssh_public_key.url }}>SSH</a>
+ {% endif %}
</td>
<td>
- {% if user.userprofile.pgp_public_key %}
- <a href={{ user.userprofile.pgp_public_key.url }}>GPG</a>
- {% endif %}
+ {% if user.userprofile.pgp_public_key %}
+ <a href={{ user.userprofile.pgp_public_key.url }}>GPG</a>
+ {% endif %}
</td>
</tr>
{% endfor %}
diff --git a/pharos-dashboard/src/templates/account/userprofile_update_form.html b/pharos-dashboard/src/templates/account/userprofile_update_form.html
index 542ea81..f4bb7b5 100644
--- a/pharos-dashboard/src/templates/account/userprofile_update_form.html
+++ b/pharos-dashboard/src/templates/account/userprofile_update_form.html
@@ -16,9 +16,17 @@
<form enctype="multipart/form-data" method="post">
{% csrf_token %}
{% bootstrap_form form %}
+ <p><b>API Token</b>
+ <a href="{% url 'generate_token' %}" class="btn btn-default">
+ Generate
+ </a>
+ </p>
+ <p style="word-wrap: break-word;">{{ token.key }}</p>
+
+ <p></p>
{% buttons %}
<button type="submit" class="btn btn btn-success">
- Save
+ Save Profile
</button>
{% endbuttons %}
</form>
diff --git a/pharos-dashboard/src/templates/base.html b/pharos-dashboard/src/templates/base.html
index 5bb5547..2ce22a3 100644
--- a/pharos-dashboard/src/templates/base.html
+++ b/pharos-dashboard/src/templates/base.html
@@ -67,8 +67,15 @@
Slaves</a>
</li>
<li>
+ {% if user.is_authenticated %}
<a href="{% url 'account:users' %}"><i
- class="fa fa-fw"></i>Users
+ class="fa fa-fw"></i>User List
+ </a>
+ {% endif %}
+ </li>
+ <li>
+ <a href="{% url 'booking:list' %}"><i
+ class="fa fa-fw"></i>Booking List
</a>
</li>
<li>
diff --git a/pharos-dashboard/src/templates/booking/booking_calendar.html b/pharos-dashboard/src/templates/booking/booking_calendar.html
index de3e3b3..4644e85 100644
--- a/pharos-dashboard/src/templates/booking/booking_calendar.html
+++ b/pharos-dashboard/src/templates/booking/booking_calendar.html
@@ -1,4 +1,4 @@
-{% extends "dashboard/table.html" %}
+{% extends "base.html" %}
{% load staticfiles %}
{% load bootstrap3 %}
@@ -33,26 +33,34 @@
<i class="fa fa-edit fa-fw"></i>Booking
</div>
<div class="panel-body">
- <div id="booking_form_div">
- {% bootstrap_form_errors form type='non_fields' %}
- <form method="post" action="" class="form" id="bookingform">
- {% csrf_token %}
+ {% if user.is_authenticated %}
+ <div id="booking_form_div">
+ {% bootstrap_form_errors form type='non_fields' %}
+ <form method="post" action="" class="form" id="bookingform">
+ {% csrf_token %}
- <div class='input-group' id='starttimepicker'>
- {% bootstrap_field form.start addon_after='<span class="glyphicon glyphicon-calendar"></span>' %}
- </div>
- <div class='input-group' id='endtimepicker'>
- {% bootstrap_field form.end addon_after='<span class="glyphicon glyphicon-calendar"></span>' %}
- </div>
- {% bootstrap_field form.purpose %}
-
- {% buttons %}
- <button type="submit" class="btn btn btn-success">
- Book
- </button>
- {% endbuttons %}
- </form>
- </div>
+ <div class='input-group' id='starttimepicker'>
+ {% bootstrap_field form.start addon_after='<span class="glyphicon glyphicon-calendar"></span>' %}
+ </div>
+ <div class='input-group' id='endtimepicker'>
+ {% bootstrap_field form.end addon_after='<span class="glyphicon glyphicon-calendar"></span>' %}
+ </div>
+ {% bootstrap_field form.purpose %}
+ {% bootstrap_field form.installer %}
+ {% bootstrap_field form.scenario %}
+ {% buttons %}
+ <button type="submit" class="btn btn btn-success">
+ Book
+ </button>
+ {% endbuttons %}
+ </form>
+ </div>
+ {% else %}
+ <p>Please
+ <a href="{% url 'account:login' %}">
+ login with Jira</a>
+ to book this Pod</p>
+ {% endif %}
</div>
</div>
</div>
@@ -69,7 +77,8 @@
<div class="modal-body" id="booking_detail_content">
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close
+ </button>
</div>
</div>
diff --git a/pharos-dashboard/src/templates/booking/booking_detail.html b/pharos-dashboard/src/templates/booking/booking_detail.html
index d3f4753..4b016b2 100644
--- a/pharos-dashboard/src/templates/booking/booking_detail.html
+++ b/pharos-dashboard/src/templates/booking/booking_detail.html
@@ -19,8 +19,8 @@
<b>Purpose: </b> {{ booking.purpose }}
</p>
<p>
- <b>Jira: </b>
- <a href="{{ jira_issue | jira_issue_url }}">
- {{ jira_issue }}
- </a>
+ <b>Installer: </b> {{ booking.installer }}
+</p>
+<p>
+ <b>Scenario: </b> {{ booking.scenario }}
</p> \ No newline at end of file
diff --git a/pharos-dashboard/src/templates/booking/booking_list.html b/pharos-dashboard/src/templates/booking/booking_list.html
new file mode 100644
index 0000000..f2991e4
--- /dev/null
+++ b/pharos-dashboard/src/templates/booking/booking_list.html
@@ -0,0 +1,50 @@
+{% extends "base.html" %}
+{% load staticfiles %}
+
+{% block extrahead %}
+ <!-- DataTables CSS -->
+ <link href="{% static "bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" %}"
+ rel="stylesheet">
+
+ <!-- DataTables Responsive CSS -->
+ <link href="{% static "bower_components/datatables-responsive/css/dataTables.responsive.css" %}"
+ rel="stylesheet">
+{% endblock extrahead %}
+
+{% block content %}
+ <div class="row">
+ <div class="col-lg-12">
+ <div class="panel panel-default">
+ <div class="panel-body">
+ <div class="dataTables_wrapper">
+ <table class="table table-striped table-bordered table-hover" id="table"
+ cellspacing="0"
+ width="100%">
+ {% include "booking/booking_table.html" %}
+ </table>
+ </div>
+ <!-- /.table-responsive -->
+ </div>
+ <!-- /.panel-body -->
+ </div>
+ <!-- /.panel -->
+ </div>
+ <!-- /.col-lg-12 -->
+ </div>
+{% endblock content %}
+
+{% block extrajs %}
+ <!-- DataTables JavaScript -->
+ <link href="{% static "bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" %}"
+ rel="stylesheet">
+
+
+ <script src={% static "bower_components/datatables/media/js/jquery.dataTables.min.js" %}></script>
+ <script src={% static "bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js" %}></script>
+
+ <script type="text/javascript">
+ $(document).ready(function () {
+ $('#table').DataTable({});
+ });
+ </script>
+{% endblock extrajs %} \ No newline at end of file
diff --git a/pharos-dashboard/src/templates/booking/booking_table.html b/pharos-dashboard/src/templates/booking/booking_table.html
index 216eaf5..655b013 100644
--- a/pharos-dashboard/src/templates/booking/booking_table.html
+++ b/pharos-dashboard/src/templates/booking/booking_table.html
@@ -7,7 +7,8 @@
<th>Purpose</th>
<th>Start</th>
<th>End</th>
- <th>Jira</th>
+ <th>Installer</th>
+ <th>Scenario</th>
</tr>
</thead>
<tbody>
@@ -25,8 +26,11 @@
<td>
{{ booking.end }}
</td>
- <td><a target='_blank'
- href={{ booking.get_jira_issue | jira_issue_url }}>{{ booking.get_jira_issue }}</a>
+ <td>
+ {{ booking.installer }}
+ </td>
+ <td>
+ {{ booking.scenario }}
</td>
</tr>
{% endfor %}
diff --git a/pharos-dashboard/src/templates/dashboard/resource_detail.html b/pharos-dashboard/src/templates/dashboard/resource_detail.html
index 657d565..e0b29bd 100644
--- a/pharos-dashboard/src/templates/dashboard/resource_detail.html
+++ b/pharos-dashboard/src/templates/dashboard/resource_detail.html
@@ -106,6 +106,7 @@
</p>
<p>
<b>Email: </b>
+ {{ resource.owner.email }}
</p>
<p>
<a href="{% url 'booking:create' resource_id=resource.id %}" class="btn