From 4b269fba0ca273dfa3acf44c9f5490f01e0c3d87 Mon Sep 17 00:00:00 2001 From: Trevor Bramwell Date: Fri, 22 Sep 2017 12:23:36 -0700 Subject: Rename pharos-dashboard and pharos-validator As subdirectories of the pharos-tools repo, there is little need to keep the pharos prefix. Change-Id: Ica3d79411f409df638647300036c0664183c2725 Signed-off-by: Trevor Bramwell --- dashboard/src/templates/account/user_list.html | 55 ++++++ .../templates/account/userprofile_update_form.html | 38 ++++ dashboard/src/templates/base.html | 111 +++++++++++ .../src/templates/booking/booking_calendar.html | 103 +++++++++++ .../src/templates/booking/booking_detail.html | 26 +++ dashboard/src/templates/booking/booking_list.html | 48 +++++ dashboard/src/templates/booking/booking_table.html | 37 ++++ dashboard/src/templates/dashboard/ci_pods.html | 61 ++++++ dashboard/src/templates/dashboard/dev_pods.html | 70 +++++++ .../src/templates/dashboard/jenkins_slaves.html | 46 +++++ dashboard/src/templates/dashboard/resource.html | 58 ++++++ .../src/templates/dashboard/resource_all.html | 73 ++++++++ .../src/templates/dashboard/resource_detail.html | 205 +++++++++++++++++++++ .../src/templates/dashboard/server_table.html | 30 +++ dashboard/src/templates/dashboard/table.html | 43 +++++ dashboard/src/templates/layout.html | 73 ++++++++ dashboard/src/templates/rest_framework/api.html | 9 + 17 files changed, 1086 insertions(+) create mode 100644 dashboard/src/templates/account/user_list.html create mode 100644 dashboard/src/templates/account/userprofile_update_form.html create mode 100644 dashboard/src/templates/base.html create mode 100644 dashboard/src/templates/booking/booking_calendar.html create mode 100644 dashboard/src/templates/booking/booking_detail.html create mode 100644 dashboard/src/templates/booking/booking_list.html create mode 100644 dashboard/src/templates/booking/booking_table.html create mode 100644 dashboard/src/templates/dashboard/ci_pods.html create mode 100644 dashboard/src/templates/dashboard/dev_pods.html create mode 100644 dashboard/src/templates/dashboard/jenkins_slaves.html create mode 100644 dashboard/src/templates/dashboard/resource.html create mode 100644 dashboard/src/templates/dashboard/resource_all.html create mode 100644 dashboard/src/templates/dashboard/resource_detail.html create mode 100644 dashboard/src/templates/dashboard/server_table.html create mode 100644 dashboard/src/templates/dashboard/table.html create mode 100644 dashboard/src/templates/layout.html create mode 100644 dashboard/src/templates/rest_framework/api.html (limited to 'dashboard/src/templates') diff --git a/dashboard/src/templates/account/user_list.html b/dashboard/src/templates/account/user_list.html new file mode 100644 index 0000000..68178eb --- /dev/null +++ b/dashboard/src/templates/account/user_list.html @@ -0,0 +1,55 @@ +{% extends "dashboard/table.html" %} +{% load staticfiles %} + +{% block table %} + + + Username + Full Name + Email + Company + SSH Key + GPG Key + + + + {% for user in users %} + + + {{ user.username }} + + + {{ user.userprofile.full_name }} + + + {{ user.email }} + + + {{ user.userprofile.company }} + + + {% if user.userprofile.ssh_public_key %} + SSH + {% endif %} + + + {% if user.userprofile.pgp_public_key %} + GPG + {% endif %} + + + {% endfor %} + +{% endblock table %} + + +{% block tablejs %} + +{% endblock tablejs %} diff --git a/dashboard/src/templates/account/userprofile_update_form.html b/dashboard/src/templates/account/userprofile_update_form.html new file mode 100644 index 0000000..f4bb7b5 --- /dev/null +++ b/dashboard/src/templates/account/userprofile_update_form.html @@ -0,0 +1,38 @@ +{% extends "layout.html" %} +{% load bootstrap3 %} + +{% block basecontent %} +
+
+
+ {% bootstrap_messages %} + +
+
+
+{% endblock basecontent %} diff --git a/dashboard/src/templates/base.html b/dashboard/src/templates/base.html new file mode 100644 index 0000000..4d8530a --- /dev/null +++ b/dashboard/src/templates/base.html @@ -0,0 +1,111 @@ +{% extends "layout.html" %} +{% load bootstrap3 %} + +{% block basecontent %} +
+ + + + +
+
+
+

{{ title }}

+
+ +
+ + {% bootstrap_messages %} + + {% block content %} + + {% endblock content %} +
+ +
+ +{% endblock basecontent %} diff --git a/dashboard/src/templates/booking/booking_calendar.html b/dashboard/src/templates/booking/booking_calendar.html new file mode 100644 index 0000000..4644e85 --- /dev/null +++ b/dashboard/src/templates/booking/booking_calendar.html @@ -0,0 +1,103 @@ +{% extends "base.html" %} +{% load staticfiles %} + +{% load bootstrap3 %} + +{% block extrahead %} + + +{% endblock extrahead %} + +{% block content %} +
+
+
+
+ Calendar +
+
+
+
+
+ +
+ +
+
+ +
+
+
+ Booking +
+
+ {% if user.is_authenticated %} +
+ {% 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 %} + {% bootstrap_field form.installer %} + {% bootstrap_field form.scenario %} + {% buttons %} + + {% endbuttons %} +
+
+ {% else %} +

Please + + login with Jira + to book this Pod

+ {% endif %} +
+
+
+ + +{% endblock content %} + +{% block extrajs %} + + + + + + + + +{% endblock extrajs %} \ No newline at end of file diff --git a/dashboard/src/templates/booking/booking_detail.html b/dashboard/src/templates/booking/booking_detail.html new file mode 100644 index 0000000..4b016b2 --- /dev/null +++ b/dashboard/src/templates/booking/booking_detail.html @@ -0,0 +1,26 @@ +{% load jira_filters %} + +

+ Resource: + + {{ booking.resource.name }} + +

+

+ User: {{ booking.user.username }} +

+

+ Start: {{ booking.start }} +

+

+ End: {{ booking.end }} +

+

+ Purpose: {{ booking.purpose }} +

+

+ Installer: {{ booking.installer }} +

+

+ Scenario: {{ booking.scenario }} +

\ No newline at end of file diff --git a/dashboard/src/templates/booking/booking_list.html b/dashboard/src/templates/booking/booking_list.html new file mode 100644 index 0000000..ccdc46d --- /dev/null +++ b/dashboard/src/templates/booking/booking_list.html @@ -0,0 +1,48 @@ +{% extends "base.html" %} +{% load staticfiles %} + +{% block extrahead %} + + + + + +{% endblock extrahead %} + +{% block content %} +
+
+
+ + {% include "booking/booking_table.html" %} +
+
+ + + +
+ +
+{% endblock content %} + +{% block extrajs %} + + + + + + + + +{% endblock extrajs %} diff --git a/dashboard/src/templates/booking/booking_table.html b/dashboard/src/templates/booking/booking_table.html new file mode 100644 index 0000000..655b013 --- /dev/null +++ b/dashboard/src/templates/booking/booking_table.html @@ -0,0 +1,37 @@ +{% load jira_filters %} + + + + + User + Purpose + Start + End + Installer + Scenario + + + +{% for booking in bookings %} + + + {{ booking.user.username }} + + + {{ booking.purpose }} + + + {{ booking.start }} + + + {{ booking.end }} + + + {{ booking.installer }} + + + {{ booking.scenario }} + + +{% endfor %} + \ No newline at end of file diff --git a/dashboard/src/templates/dashboard/ci_pods.html b/dashboard/src/templates/dashboard/ci_pods.html new file mode 100644 index 0000000..a20be95 --- /dev/null +++ b/dashboard/src/templates/dashboard/ci_pods.html @@ -0,0 +1,61 @@ +{% extends "dashboard/table.html" %} +{% load staticfiles %} +{% load jenkins_filters %} + +{% block table %} + + + Name + Slave Name + Status + Installer + Scenario + Branch + Job + + + + {% for pod in ci_pods %} + + + {{ pod.name }} + + + {{ pod.slave.name }} + + + {{ pod.slave.status }} + + + {{ pod.slave.last_job_installer }} + + + {{ pod.slave.last_job_scenario }} + + + {{ pod.slave.last_job_branch }} + + {{ pod.slave.last_job_name }} + + + {% endfor %} + +{% endblock table %} + + +{% block tablejs %} + +{% endblock tablejs %} diff --git a/dashboard/src/templates/dashboard/dev_pods.html b/dashboard/src/templates/dashboard/dev_pods.html new file mode 100644 index 0000000..a6f3b2e --- /dev/null +++ b/dashboard/src/templates/dashboard/dev_pods.html @@ -0,0 +1,70 @@ +{% extends "dashboard/table.html" %} +{% load staticfiles %} +{% load jenkins_filters %} + +{% block table %} + + + Name + Slave Name + Booked by + Booked until + Purpose + Utilization + Status + + + + + + {% for pod, booking, utilization in dev_pods %} + + + {{ pod.name }} + + + {{ pod.slave.name }} + + + {{ booking.user.username }} + + + {{ booking.end }} + + + {{ booking.purpose }} + + + {{ utilization }} + + + {{ pod.slave.status }} + + + + Book + + + + + Info + + + + {% endfor %} + +{% endblock table %} + +{% block tablejs %} + +{% endblock tablejs %} diff --git a/dashboard/src/templates/dashboard/jenkins_slaves.html b/dashboard/src/templates/dashboard/jenkins_slaves.html new file mode 100644 index 0000000..fa361b1 --- /dev/null +++ b/dashboard/src/templates/dashboard/jenkins_slaves.html @@ -0,0 +1,46 @@ +{% extends "dashboard/table.html" %} +{% load staticfiles %} + +{% load jenkins_filters %} + +{% block table %} + + + Slave name + Status + Job + + + + {% for slave in slaves %} + + {{ slave.name }} + + + {{ slave.status }} + + + {{ slave.last_job_name }} + + + {% endfor %} + +{% endblock table %} + + +{% block tablejs %} + +{% endblock tablejs %} diff --git a/dashboard/src/templates/dashboard/resource.html b/dashboard/src/templates/dashboard/resource.html new file mode 100644 index 0000000..c9e5735 --- /dev/null +++ b/dashboard/src/templates/dashboard/resource.html @@ -0,0 +1,58 @@ +{% extends "base.html" %} +{% load staticfiles %} + +{% block extrahead %} + + + + + + + + +{% endblock extrahead %} + + +{% block content %} + {% include "dashboard/resource_detail.html" %} +{% endblock content %} + + +{% block extrajs %} + + + + + + + + + + + + + + + + + + + +{% endblock extrajs %} \ No newline at end of file diff --git a/dashboard/src/templates/dashboard/resource_all.html b/dashboard/src/templates/dashboard/resource_all.html new file mode 100644 index 0000000..a770d4e --- /dev/null +++ b/dashboard/src/templates/dashboard/resource_all.html @@ -0,0 +1,73 @@ +{% extends "base.html" %} +{% load staticfiles %} + +{% block extrahead %} + + + + + + + + +{% endblock extrahead %} + + +{% block content %} + {% for resource, utilization, bookings in pods %} +
+
+
+
+ {{ resource.name }} +
+
+ {% include "dashboard/resource_detail.html" %} +
+
+
+
+ {% endfor %} +{% endblock content %} + + +{% block extrajs %} + + + + + + + + + + + + + + + + < + + +{% endblock extrajs %} \ No newline at end of file diff --git a/dashboard/src/templates/dashboard/resource_detail.html b/dashboard/src/templates/dashboard/resource_detail.html new file mode 100644 index 0000000..740dd25 --- /dev/null +++ b/dashboard/src/templates/dashboard/resource_detail.html @@ -0,0 +1,205 @@ +{% load jenkins_filters %} + +
+
+
+
+ Jenkins Utilization +
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+
+ Status +
+
+
+ {% for status in resource.resourcestatus_set.all %} + + {{ status.title }} + + {{ status.timestamp }} + + + {% endfor %} +
+
+
+
+
+
+
+ Servers +
+
+
+ + {% include "dashboard/server_table.html" %} +
+
+
+
+
+
+
+
+
+
+ Booking Utilization +
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+ Bookings +
+
+
+ + {% include "booking/booking_table.html" %} +
+
+
+
+
+
+
+
+
+
+ Contact +
+
+

+ Lab Owner: + {{ resource.owner.username }} +

+

+ Email: + {{ resource.owner.email }} +

+

+ + Booking + + + OPNFV Wiki + +

+
+
+
+
+
+
+ Jenkins Status +
+
+

+ Slave Name: + {{ resource.slave.name }} +

+

+ Status: + {{ resource.slave.status }} +

+

+ Last Job: + + {{ resource.slave.last_job_name }} + +

+
+
+
+
+
+
+ VPN Users +
+
+
+ + + + + + + + + + {% for user in resource.vpn_users.all %} + + + + + + {% endfor %} +
UserEmailCompany
+ {{ user.username }} + + {{ user.email }} + + {{ user.userprofile.company }} +
+ +
+
+
+
+
diff --git a/dashboard/src/templates/dashboard/server_table.html b/dashboard/src/templates/dashboard/server_table.html new file mode 100644 index 0000000..f01bd60 --- /dev/null +++ b/dashboard/src/templates/dashboard/server_table.html @@ -0,0 +1,30 @@ + + + Server + Model + CPU + RAM + Storage + + + +{% for server in resource.server_set.all %} + + + {{ server.name }} + + + {{ server.model }} + + + {{ server.cpu }} + + + {{ server.ram }} + + + {{ server.storage }} + + +{% endfor %} + \ No newline at end of file diff --git a/dashboard/src/templates/dashboard/table.html b/dashboard/src/templates/dashboard/table.html new file mode 100644 index 0000000..d59f0e3 --- /dev/null +++ b/dashboard/src/templates/dashboard/table.html @@ -0,0 +1,43 @@ +{% extends "base.html" %} +{% load staticfiles %} + +{% block extrahead %} + + + + + +{% endblock extrahead %} + +{% block content %} +
+
+
+ + + {% block table %} + {% endblock table %} + +
+
+ + + +
+ +
+{% endblock content %} + +{% block extrajs %} + + + + + + + + {% block tablejs %} + {% endblock tablejs %} +{% endblock extrajs %} diff --git a/dashboard/src/templates/layout.html b/dashboard/src/templates/layout.html new file mode 100644 index 0000000..9578e15 --- /dev/null +++ b/dashboard/src/templates/layout.html @@ -0,0 +1,73 @@ +{% load staticfiles %} + + + + + + + + + + + + OPNFV Pharos {{ title }} + + + + + + + + + + + + + + + + + + {% block extrahead %} + {% endblock extrahead %} + + + + + + + +{% block extrastyle %} +{% endblock extrastyle %} + + +{% block basecontent %} +{% endblock basecontent %} + + + +{##} +{##} +{##} + +{##} + + + + + + + + + +{% block extrajs %} +{% endblock extrajs %} + + diff --git a/dashboard/src/templates/rest_framework/api.html b/dashboard/src/templates/rest_framework/api.html new file mode 100644 index 0000000..9c6c4f7 --- /dev/null +++ b/dashboard/src/templates/rest_framework/api.html @@ -0,0 +1,9 @@ +{% extends "rest_framework/base.html" %} + +{% block title %}Pharos Dashboard API{% endblock %} + +{% block branding %} + + Pharos Dashboard API + +{% endblock %} \ No newline at end of file -- cgit 1.2.3-korg