From 114a6fb65e14f15487bc8db33cedae011fc42cac Mon Sep 17 00:00:00 2001 From: maxbr Date: Fri, 19 Aug 2016 17:15:28 +0200 Subject: Use Jira Oauth for user authentication JIRA: RELENG-12 Users can use their jira accounts for the dashboard. This also allows the dasboard to open jira tickets for bookings. Signed-off-by: maxbr --- .../templates/account/userprofile_update_form.html | 30 ++++ pharos-dashboard/templates/base.html | 16 ++- .../templates/booking/booking_calendar.html | 21 ++- .../templates/dashboard/lab_owner.html | 151 +++++++++++++++++++++ 4 files changed, 210 insertions(+), 8 deletions(-) create mode 100644 pharos-dashboard/templates/account/userprofile_update_form.html create mode 100644 pharos-dashboard/templates/dashboard/lab_owner.html (limited to 'pharos-dashboard/templates') diff --git a/pharos-dashboard/templates/account/userprofile_update_form.html b/pharos-dashboard/templates/account/userprofile_update_form.html new file mode 100644 index 0000000..0a921d5 --- /dev/null +++ b/pharos-dashboard/templates/account/userprofile_update_form.html @@ -0,0 +1,30 @@ +{% extends "layout.html" %} +{% load bootstrap3 %} + +{% block basecontent %} +
+
+
+ {% bootstrap_messages %} + +
+
+
+{% endblock basecontent %} diff --git a/pharos-dashboard/templates/base.html b/pharos-dashboard/templates/base.html index 1479b04..64174a1 100644 --- a/pharos-dashboard/templates/base.html +++ b/pharos-dashboard/templates/base.html @@ -39,11 +39,8 @@ {% else %}
  • - Login + Login with Jira
  • - - Register {% endif %} @@ -57,18 +54,23 @@ diff --git a/pharos-dashboard/templates/booking/booking_calendar.html b/pharos-dashboard/templates/booking/booking_calendar.html index 1fa5dc4..d144bb8 100644 --- a/pharos-dashboard/templates/booking/booking_calendar.html +++ b/pharos-dashboard/templates/booking/booking_calendar.html @@ -1,6 +1,8 @@ {% extends "dashboard/table.html" %} {% load staticfiles %} +{% load bootstrap3 %} + {% block extrahead %} @@ -33,7 +35,24 @@
    - {% include 'booking/booking_form.html' %} + {% bootstrap_form_errors form type='non_fields' %} +
    + {% csrf_token %} + +
    + {% bootstrap_field form.start addon_after='' %} +
    +
    + {% bootstrap_field form.end addon_after='' %} +
    + {% bootstrap_field form.purpose %} + + {% buttons %} + + {% endbuttons %} +
    diff --git a/pharos-dashboard/templates/dashboard/lab_owner.html b/pharos-dashboard/templates/dashboard/lab_owner.html new file mode 100644 index 0000000..a4f428c --- /dev/null +++ b/pharos-dashboard/templates/dashboard/lab_owner.html @@ -0,0 +1,151 @@ +{% extends "base.html" %} +{% load staticfiles %} + +{% block extrahead %} + + + + + + + + +{% endblock extrahead %} + + +{% block content %} + {% for resource, utilization, bookings in pods %} +
    +
    +
    +
    + {{ resource.name }} +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + {{ resource.name }} Bookings +
    +
    +
    + + + + + + + + + + + + {% for booking in bookings %} + + + + + + + + {% endfor %}` + +
    UserPurposeStartEndStatus
    + {{ booking.user.username }} + + {{ booking.purpose }} + + {{ booking.start }} + + {{ booking.end }} + + Jira Status +
    +
    +
    +
    +
    +
    + {% endfor %} + +{% endblock content %} + + +{% block extrajs %} + + + + + + + + + + + + + + + + + + + +{% endblock extrajs %} \ No newline at end of file -- cgit 1.2.3-korg