From ebaa05ab2b53634a7a3e738618a031fd1518d796 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 ++++ tools/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 tools/pharos-dashboard/templates/account/userprofile_update_form.html create mode 100644 tools/pharos-dashboard/templates/dashboard/lab_owner.html (limited to 'tools/pharos-dashboard/templates') diff --git a/tools/pharos-dashboard/templates/account/userprofile_update_form.html b/tools/pharos-dashboard/templates/account/userprofile_update_form.html new file mode 100644 index 00000000..0a921d51 --- /dev/null +++ b/tools/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/tools/pharos-dashboard/templates/base.html b/tools/pharos-dashboard/templates/base.html index 1479b043..64174a1f 100644 --- a/tools/pharos-dashboard/templates/base.html +++ b/tools/pharos-dashboard/templates/base.html @@ -39,11 +39,8 @@ {% else %}
  • - Login + Login with Jira
  • - - Register {% endif %} @@ -57,18 +54,23 @@ diff --git a/tools/pharos-dashboard/templates/booking/booking_calendar.html b/tools/pharos-dashboard/templates/booking/booking_calendar.html index 1fa5dc4d..d144bb83 100644 --- a/tools/pharos-dashboard/templates/booking/booking_calendar.html +++ b/tools/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/tools/pharos-dashboard/templates/dashboard/lab_owner.html b/tools/pharos-dashboard/templates/dashboard/lab_owner.html new file mode 100644 index 00000000..a4f428c7 --- /dev/null +++ b/tools/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