From b67557fdf3ddab95d2834c8aa01dcc0d120685dd Mon Sep 17 00:00:00 2001 From: maxbr Date: Thu, 25 Aug 2016 12:10:55 +0200 Subject: Add a Resource detail view JIRA: RELENG-12 The resource page contains an utilization diagram, future bookings with their jira tickets and a list of servers. Change-Id: I2123ccbe96cde29a56af32b933ebbf6ba2668ed1 Signed-off-by: maxbr --- .../templates/booking/booking_table.html | 33 +++++ .../templates/dashboard/dev_pods.html | 2 +- .../templates/dashboard/lab_owner.html | 151 --------------------- .../templates/dashboard/resource.html | 58 ++++++++ .../templates/dashboard/resource_all.html | 74 ++++++++++ .../templates/dashboard/resource_detail.html | 64 +++++++++ .../templates/dashboard/resource_utilization.html | 86 ------------ .../templates/dashboard/server_table.html | 30 ++++ 8 files changed, 260 insertions(+), 238 deletions(-) create mode 100644 tools/pharos-dashboard/templates/booking/booking_table.html delete mode 100644 tools/pharos-dashboard/templates/dashboard/lab_owner.html create mode 100644 tools/pharos-dashboard/templates/dashboard/resource.html create mode 100644 tools/pharos-dashboard/templates/dashboard/resource_all.html create mode 100644 tools/pharos-dashboard/templates/dashboard/resource_detail.html delete mode 100644 tools/pharos-dashboard/templates/dashboard/resource_utilization.html create mode 100644 tools/pharos-dashboard/templates/dashboard/server_table.html (limited to 'tools/pharos-dashboard/templates') diff --git a/tools/pharos-dashboard/templates/booking/booking_table.html b/tools/pharos-dashboard/templates/booking/booking_table.html new file mode 100644 index 00000000..3d0b7575 --- /dev/null +++ b/tools/pharos-dashboard/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/tools/pharos-dashboard/templates/dashboard/dev_pods.html b/tools/pharos-dashboard/templates/dashboard/dev_pods.html index 532a3a11..9c84bb91 100644 --- a/tools/pharos-dashboard/templates/dashboard/dev_pods.html +++ b/tools/pharos-dashboard/templates/dashboard/dev_pods.html @@ -18,7 +18,7 @@ {% for pod, booking in dev_pods %} - {{ pod.name }} + {{ pod.name }} {{ pod.slave.name }} diff --git a/tools/pharos-dashboard/templates/dashboard/lab_owner.html b/tools/pharos-dashboard/templates/dashboard/lab_owner.html deleted file mode 100644 index a4f428c7..00000000 --- a/tools/pharos-dashboard/templates/dashboard/lab_owner.html +++ /dev/null @@ -1,151 +0,0 @@ -{% 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 diff --git a/tools/pharos-dashboard/templates/dashboard/resource.html b/tools/pharos-dashboard/templates/dashboard/resource.html new file mode 100644 index 00000000..92d02f66 --- /dev/null +++ b/tools/pharos-dashboard/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/tools/pharos-dashboard/templates/dashboard/resource_all.html b/tools/pharos-dashboard/templates/dashboard/resource_all.html new file mode 100644 index 00000000..2078475f --- /dev/null +++ b/tools/pharos-dashboard/templates/dashboard/resource_all.html @@ -0,0 +1,74 @@ +{% 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/tools/pharos-dashboard/templates/dashboard/resource_detail.html b/tools/pharos-dashboard/templates/dashboard/resource_detail.html new file mode 100644 index 00000000..4fba4766 --- /dev/null +++ b/tools/pharos-dashboard/templates/dashboard/resource_detail.html @@ -0,0 +1,64 @@ +
+
+
+
+ Utilization +
+
+
+
+
+
+
+
+
+
+
+ Servers +
+
+
+ + {% include "dashboard/server_table.html" %} +
+
+
+
+
+
+
+
+
+
+ Bookings +
+
+
+ + {% include "booking/booking_table.html" %} +
+
+
+
+
+
+ + \ No newline at end of file diff --git a/tools/pharos-dashboard/templates/dashboard/resource_utilization.html b/tools/pharos-dashboard/templates/dashboard/resource_utilization.html deleted file mode 100644 index fb483d60..00000000 --- a/tools/pharos-dashboard/templates/dashboard/resource_utilization.html +++ /dev/null @@ -1,86 +0,0 @@ -{% extends "base.html" %} -{% load staticfiles %} - -{% block extrahead %} - - - -{% endblock extrahead %} - - -{% block content %} -
- {% for resource, utilization in pods %} -
-
-
- {{ resource.name }} -
-
-
-
-
-
-
-
- {% endfor %} -
- -{% endblock content %} - - -{% block extrajs %} - - - - - - - - - - - -{% endblock extrajs %} \ No newline at end of file diff --git a/tools/pharos-dashboard/templates/dashboard/server_table.html b/tools/pharos-dashboard/templates/dashboard/server_table.html new file mode 100644 index 00000000..d47e5204 --- /dev/null +++ b/tools/pharos-dashboard/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 -- cgit 1.2.3-korg