From 6cd7c021a40a50e35ad5788d10a6357465c276ad Mon Sep 17 00:00:00 2001 From: maxbr Date: Mon, 26 Sep 2016 16:36:11 +0200 Subject: Restructure dashboard project for docker deploying Change-Id: I13cad51270504ee4bed8558598a8891af58a26ab Signed-off-by: maxbr --- .../src/templates/account/user_list.html | 46 ++++++ .../templates/account/userprofile_update_form.html | 30 ++++ pharos-dashboard/src/templates/base.html | 104 ++++++++++++ .../src/templates/booking/booking_calendar.html | 94 +++++++++++ .../src/templates/booking/booking_detail.html | 26 +++ .../src/templates/booking/booking_table.html | 33 ++++ .../src/templates/dashboard/ci_pods.html | 60 +++++++ .../src/templates/dashboard/dev_pods.html | 69 ++++++++ .../src/templates/dashboard/jenkins_slaves.html | 45 +++++ .../src/templates/dashboard/resource.html | 58 +++++++ .../src/templates/dashboard/resource_all.html | 73 ++++++++ .../src/templates/dashboard/resource_detail.html | 184 +++++++++++++++++++++ .../src/templates/dashboard/server_table.html | 30 ++++ .../src/templates/dashboard/table.html | 50 ++++++ pharos-dashboard/src/templates/layout.html | 73 ++++++++ .../src/templates/rest_framework/api.html | 9 + 16 files changed, 984 insertions(+) create mode 100644 pharos-dashboard/src/templates/account/user_list.html create mode 100644 pharos-dashboard/src/templates/account/userprofile_update_form.html create mode 100644 pharos-dashboard/src/templates/base.html create mode 100644 pharos-dashboard/src/templates/booking/booking_calendar.html create mode 100644 pharos-dashboard/src/templates/booking/booking_detail.html create mode 100644 pharos-dashboard/src/templates/booking/booking_table.html create mode 100644 pharos-dashboard/src/templates/dashboard/ci_pods.html create mode 100644 pharos-dashboard/src/templates/dashboard/dev_pods.html create mode 100644 pharos-dashboard/src/templates/dashboard/jenkins_slaves.html create mode 100644 pharos-dashboard/src/templates/dashboard/resource.html create mode 100644 pharos-dashboard/src/templates/dashboard/resource_all.html create mode 100644 pharos-dashboard/src/templates/dashboard/resource_detail.html create mode 100644 pharos-dashboard/src/templates/dashboard/server_table.html create mode 100644 pharos-dashboard/src/templates/dashboard/table.html create mode 100644 pharos-dashboard/src/templates/layout.html create mode 100644 pharos-dashboard/src/templates/rest_framework/api.html (limited to 'pharos-dashboard/src/templates') diff --git a/pharos-dashboard/src/templates/account/user_list.html b/pharos-dashboard/src/templates/account/user_list.html new file mode 100644 index 0000000..c2b8193 --- /dev/null +++ b/pharos-dashboard/src/templates/account/user_list.html @@ -0,0 +1,46 @@ +{% extends "dashboard/table.html" %} +{% load staticfiles %} + +{% block table %} + + + Username + Company + SSH Key + GPG Key + + + + {% for user in users %} + + + {{ user.username }} + + + {{ 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/pharos-dashboard/src/templates/account/userprofile_update_form.html b/pharos-dashboard/src/templates/account/userprofile_update_form.html new file mode 100644 index 0000000..542ea81 --- /dev/null +++ b/pharos-dashboard/src/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/src/templates/base.html b/pharos-dashboard/src/templates/base.html new file mode 100644 index 0000000..5bb5547 --- /dev/null +++ b/pharos-dashboard/src/templates/base.html @@ -0,0 +1,104 @@ +{% extends "layout.html" %} +{% load bootstrap3 %} + +{% block basecontent %} +
+ + + + +
+
+
+

{{ title }}

+
+ +
+ + {% bootstrap_messages %} + + {% block content %} + + {% endblock content %} +
+ +
+ +{% endblock basecontent %} \ No newline at end of file diff --git a/pharos-dashboard/src/templates/booking/booking_calendar.html b/pharos-dashboard/src/templates/booking/booking_calendar.html new file mode 100644 index 0000000..de3e3b3 --- /dev/null +++ b/pharos-dashboard/src/templates/booking/booking_calendar.html @@ -0,0 +1,94 @@ +{% extends "dashboard/table.html" %} +{% load staticfiles %} + +{% load bootstrap3 %} + +{% block extrahead %} + + +{% endblock extrahead %} + +{% block content %} +
+
+
+
+ Calendar +
+
+
+
+
+ +
+ +
+
+ +
+
+
+ Booking +
+
+
+ {% 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 %} +
+
+
+
+
+ + +{% endblock content %} + +{% block extrajs %} + + + + + + + + +{% endblock extrajs %} \ No newline at end of file diff --git a/pharos-dashboard/src/templates/booking/booking_detail.html b/pharos-dashboard/src/templates/booking/booking_detail.html new file mode 100644 index 0000000..d3f4753 --- /dev/null +++ b/pharos-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 }} +

+

+ Jira: + + {{ jira_issue }} + +

\ 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 new file mode 100644 index 0000000..216eaf5 --- /dev/null +++ b/pharos-dashboard/src/templates/booking/booking_table.html @@ -0,0 +1,33 @@ +{% load jira_filters %} + + + + + User + Purpose + Start + End + Jira + + + +{% for booking in bookings %} + + + {{ booking.user.username }} + + + {{ booking.purpose }} + + + {{ booking.start }} + + + {{ booking.end }} + + {{ booking.get_jira_issue }} + + +{% endfor %} + \ No newline at end of file diff --git a/pharos-dashboard/src/templates/dashboard/ci_pods.html b/pharos-dashboard/src/templates/dashboard/ci_pods.html new file mode 100644 index 0000000..7ef62a4 --- /dev/null +++ b/pharos-dashboard/src/templates/dashboard/ci_pods.html @@ -0,0 +1,60 @@ +{% 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 %} \ No newline at end of file diff --git a/pharos-dashboard/src/templates/dashboard/dev_pods.html b/pharos-dashboard/src/templates/dashboard/dev_pods.html new file mode 100644 index 0000000..2b4b017 --- /dev/null +++ b/pharos-dashboard/src/templates/dashboard/dev_pods.html @@ -0,0 +1,69 @@ +{% 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 %} \ No newline at end of file diff --git a/pharos-dashboard/src/templates/dashboard/jenkins_slaves.html b/pharos-dashboard/src/templates/dashboard/jenkins_slaves.html new file mode 100644 index 0000000..aa74507 --- /dev/null +++ b/pharos-dashboard/src/templates/dashboard/jenkins_slaves.html @@ -0,0 +1,45 @@ +{% 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 %} \ No newline at end of file diff --git a/pharos-dashboard/src/templates/dashboard/resource.html b/pharos-dashboard/src/templates/dashboard/resource.html new file mode 100644 index 0000000..c9e5735 --- /dev/null +++ b/pharos-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/pharos-dashboard/src/templates/dashboard/resource_all.html b/pharos-dashboard/src/templates/dashboard/resource_all.html new file mode 100644 index 0000000..a770d4e --- /dev/null +++ b/pharos-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/pharos-dashboard/src/templates/dashboard/resource_detail.html b/pharos-dashboard/src/templates/dashboard/resource_detail.html new file mode 100644 index 0000000..657d565 --- /dev/null +++ b/pharos-dashboard/src/templates/dashboard/resource_detail.html @@ -0,0 +1,184 @@ +{% load jenkins_filters %} + +
+
+
+
+ Jenkins Utilization +
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+ Servers +
+
+
+ + {% include "dashboard/server_table.html" %} +
+
+
+
+
+
+
+
+
+
+ Booking Utilization +
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+ Bookings +
+
+
+ + {% include "booking/booking_table.html" %} +
+
+
+
+
+
+
+
+
+
+ Contact +
+
+

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

+

+ 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 }} +
+ +
+
+
+
+
\ No newline at end of file diff --git a/pharos-dashboard/src/templates/dashboard/server_table.html b/pharos-dashboard/src/templates/dashboard/server_table.html new file mode 100644 index 0000000..f01bd60 --- /dev/null +++ b/pharos-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/pharos-dashboard/src/templates/dashboard/table.html b/pharos-dashboard/src/templates/dashboard/table.html new file mode 100644 index 0000000..addd5c1 --- /dev/null +++ b/pharos-dashboard/src/templates/dashboard/table.html @@ -0,0 +1,50 @@ +{% 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 %} \ No newline at end of file diff --git a/pharos-dashboard/src/templates/layout.html b/pharos-dashboard/src/templates/layout.html new file mode 100644 index 0000000..64fed4a --- /dev/null +++ b/pharos-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/pharos-dashboard/src/templates/rest_framework/api.html b/pharos-dashboard/src/templates/rest_framework/api.html new file mode 100644 index 0000000..9c6c4f7 --- /dev/null +++ b/pharos-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