From 35c34c690ae9616d791c39fa218fe1621fa8d8d2 Mon Sep 17 00:00:00 2001 From: maxbr Date: Fri, 29 Jul 2016 12:43:43 +0200 Subject: import pharos dashboard code JIRA: RELENG-12 The last commit was missing some JS/CSS dependencies of the site. This happened because they are in folders that are named 'build' or 'dist'. This commit adds a bower.json file, that specifies dependencies. Dependencies can now be installed by running 'bower install' in the dashboard/static folder. Change-Id: I054f319c66771f767e97711cb678d79d3bd6bee4 Signed-off-by: maxbr --- .../pharos-dashboard/templates/dashboard/base.html | 93 ++++++++++++++++++++++ .../templates/dashboard/booking_calendar.html | 79 ++++++++++++++++++ .../templates/dashboard/table.html | 50 ++++++++++++ tools/pharos-dashboard/templates/layout/base.html | 70 ++++++++++++++++ .../templates/registration/login.html | 61 ++++++++++++++ .../pharos-dashboard/templates/tables/ci_pods.html | 59 ++++++++++++++ .../templates/tables/dev_pods.html | 58 ++++++++++++++ .../templates/tables/jenkins_slaves.html | 42 ++++++++++ 8 files changed, 512 insertions(+) create mode 100644 tools/pharos-dashboard/templates/dashboard/base.html create mode 100644 tools/pharos-dashboard/templates/dashboard/booking_calendar.html create mode 100644 tools/pharos-dashboard/templates/dashboard/table.html create mode 100644 tools/pharos-dashboard/templates/layout/base.html create mode 100644 tools/pharos-dashboard/templates/registration/login.html create mode 100644 tools/pharos-dashboard/templates/tables/ci_pods.html create mode 100644 tools/pharos-dashboard/templates/tables/dev_pods.html create mode 100644 tools/pharos-dashboard/templates/tables/jenkins_slaves.html (limited to 'tools/pharos-dashboard/templates') diff --git a/tools/pharos-dashboard/templates/dashboard/base.html b/tools/pharos-dashboard/templates/dashboard/base.html new file mode 100644 index 00000000..544bf0b3 --- /dev/null +++ b/tools/pharos-dashboard/templates/dashboard/base.html @@ -0,0 +1,93 @@ +{% extends "layout/base.html" %} +{% load bootstrap3 %} + +{% block basecontent %} +
+ + + + +
+
+
+

{{ title }}

+
+ +
+ + {% bootstrap_messages %} + + {% block content %} + + {% endblock content %} +
+ +
+ +{% endblock basecontent %} \ No newline at end of file diff --git a/tools/pharos-dashboard/templates/dashboard/booking_calendar.html b/tools/pharos-dashboard/templates/dashboard/booking_calendar.html new file mode 100644 index 00000000..0f6bece0 --- /dev/null +++ b/tools/pharos-dashboard/templates/dashboard/booking_calendar.html @@ -0,0 +1,79 @@ +{% extends "dashboard/base.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_date_time addon_after='' %} +
+
+ {% bootstrap_field form.end_date_time addon_after='' %} +
+ {% bootstrap_field form.purpose %} + {{ form.booking_id }} + {% buttons %} + + + {% endbuttons %} +
+ +
+
+
+
+{% endblock content %} + +{% block extrajs %} + + + + + + + + + +{% endblock extrajs %} \ No newline at end of file diff --git a/tools/pharos-dashboard/templates/dashboard/table.html b/tools/pharos-dashboard/templates/dashboard/table.html new file mode 100644 index 00000000..2d0b82ee --- /dev/null +++ b/tools/pharos-dashboard/templates/dashboard/table.html @@ -0,0 +1,50 @@ +{% extends "dashboard/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/tools/pharos-dashboard/templates/layout/base.html b/tools/pharos-dashboard/templates/layout/base.html new file mode 100644 index 00000000..e9e1cd1f --- /dev/null +++ b/tools/pharos-dashboard/templates/layout/base.html @@ -0,0 +1,70 @@ +{% load staticfiles %} + + + + + + + + + + + + OPNFV Pharos {{ title }} + + + + + + + + + + + + + + + + + + {% block extrahead %} + {% endblock extrahead %} + + + + + + + +{% block extrastyle %} +{% endblock extrastyle %} + + +{% block basecontent %} +{% endblock basecontent %} + + + + + +{##} + + + + + + + + + +{% block extrajs %} +{% endblock extrajs %} + + diff --git a/tools/pharos-dashboard/templates/registration/login.html b/tools/pharos-dashboard/templates/registration/login.html new file mode 100644 index 00000000..efdcd1fb --- /dev/null +++ b/tools/pharos-dashboard/templates/registration/login.html @@ -0,0 +1,61 @@ +{% extends "layout/base.html" %} + +{% block basecontent %} +
+
+
+ {% if next %} +
+ + {% if user.is_authenticated %} + Your account doesn't have access to this page. To proceed, + please login with an account that has access. + {% else %} + Please login to see this page. + {% endif %} +
+ {% endif %} + {% if form.errors %} +
+ + Your username and password didn't match. Please try again. +
+ {% endif %} +
+
+
+
+ +
+
+
+ {# Assumes you setup the password_reset view in your URLconf #} + {#

Lost password?

#} +{% endblock basecontent %} diff --git a/tools/pharos-dashboard/templates/tables/ci_pods.html b/tools/pharos-dashboard/templates/tables/ci_pods.html new file mode 100644 index 00000000..3889664b --- /dev/null +++ b/tools/pharos-dashboard/templates/tables/ci_pods.html @@ -0,0 +1,59 @@ +{% extends "dashboard/table.html" %} +{% load staticfiles %} + +{% block table %} + + + Name + Slave Name + Status + Installer + Scenario + Branch + Job + + + + {% for pod in ci_pods %} + + + {{ pod.name }} + + + {{ pod.slavename }} + + + {{ pod.status }} + + + {{ pod.last_job.installer }} + + + {{ pod.last_job.scenario }} + + + {{ pod.last_job.branch }} + + {{ pod.last_job.name }} + + + {% endfor %}` + + +{% endblock table %} + + +{% block tablejs %} + +{% endblock tablejs %} \ No newline at end of file diff --git a/tools/pharos-dashboard/templates/tables/dev_pods.html b/tools/pharos-dashboard/templates/tables/dev_pods.html new file mode 100644 index 00000000..730aa953 --- /dev/null +++ b/tools/pharos-dashboard/templates/tables/dev_pods.html @@ -0,0 +1,58 @@ +{% extends "dashboard/table.html" %} +{% load staticfiles %} + +{% block table %} + + + Name + Slave Name + Booked by + Booked until + Purpose + Status + + + + + {% for pod in dev_pods %} + + + {{ pod.name }} + + + {{ pod.slavename }} + + + {{ pod.current_booking.user }} + + + {{ pod.current_booking.end_date_time }} + + + {{ pod.current_booking.purpose }} + + + {{ pod.status }} + + + + Book + + + + {% endfor %} + +{% endblock table %} + +{% block tablejs %} + +{% endblock tablejs %} \ No newline at end of file diff --git a/tools/pharos-dashboard/templates/tables/jenkins_slaves.html b/tools/pharos-dashboard/templates/tables/jenkins_slaves.html new file mode 100644 index 00000000..2d011b46 --- /dev/null +++ b/tools/pharos-dashboard/templates/tables/jenkins_slaves.html @@ -0,0 +1,42 @@ +{% extends "dashboard/table.html" %} +{% load staticfiles %} + +{% block table %} + + + Slave name + Status + Job + + + + {% for slave in slaves %} + + {{ slave.displayName }} + + + {{ slave.status }} + + + {{ slave.last_job.name }} + + + {% endfor %} + +{% endblock table %} + + +{% block tablejs %} + +{% endblock tablejs %} \ No newline at end of file -- cgit 1.2.3-korg