From 1f3a770d2547848590f39e9d9b9bdffeb94eec14 Mon Sep 17 00:00:00 2001 From: Parker Berberian Date: Wed, 10 Oct 2018 16:06:47 -0400 Subject: Lab as a Service 2.0 See changes here: https://wiki.opnfv.org/display/INF/Pharos+Laas Change-Id: I59ada5f98e70a28d7f8c14eab3239597e236ca26 Signed-off-by: Sawyer Bergeron Signed-off-by: Parker Berberian --- src/templates/dashboard/ci_pods.html | 61 --- src/templates/dashboard/dev_pods.html | 70 ---- src/templates/dashboard/grid.html | 10 + src/templates/dashboard/host_profile_detail.html | 71 ++++ src/templates/dashboard/jenkins_slaves.html | 46 --- src/templates/dashboard/lab_detail.html | 157 ++++++++ src/templates/dashboard/lab_list.html | 87 +++++ src/templates/dashboard/landing.html | 88 +++++ src/templates/dashboard/login.html | 8 + .../dashboard/multiple_select_filter_widget.html | 402 ++++++++++++++++++++ src/templates/dashboard/pdf.yaml | 95 +++++ src/templates/dashboard/resource.html | 3 +- src/templates/dashboard/resource_all.html | 5 +- src/templates/dashboard/resource_detail.html | 52 --- .../dashboard/searchable_select_multiple.html | 408 +++++++++++++++++++++ src/templates/dashboard/table.html | 1 + 16 files changed, 1329 insertions(+), 235 deletions(-) delete mode 100644 src/templates/dashboard/ci_pods.html delete mode 100644 src/templates/dashboard/dev_pods.html create mode 100644 src/templates/dashboard/grid.html create mode 100644 src/templates/dashboard/host_profile_detail.html delete mode 100644 src/templates/dashboard/jenkins_slaves.html create mode 100644 src/templates/dashboard/lab_detail.html create mode 100644 src/templates/dashboard/lab_list.html create mode 100644 src/templates/dashboard/landing.html create mode 100644 src/templates/dashboard/login.html create mode 100644 src/templates/dashboard/multiple_select_filter_widget.html create mode 100644 src/templates/dashboard/pdf.yaml create mode 100644 src/templates/dashboard/searchable_select_multiple.html (limited to 'src/templates/dashboard') diff --git a/src/templates/dashboard/ci_pods.html b/src/templates/dashboard/ci_pods.html deleted file mode 100644 index a20be95..0000000 --- a/src/templates/dashboard/ci_pods.html +++ /dev/null @@ -1,61 +0,0 @@ -{% 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/src/templates/dashboard/dev_pods.html b/src/templates/dashboard/dev_pods.html deleted file mode 100644 index a6f3b2e..0000000 --- a/src/templates/dashboard/dev_pods.html +++ /dev/null @@ -1,70 +0,0 @@ -{% 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/src/templates/dashboard/grid.html b/src/templates/dashboard/grid.html new file mode 100644 index 0000000..ca47f44 --- /dev/null +++ b/src/templates/dashboard/grid.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} +{% load staticfiles %} +{% if script %} {% endif %} +{% block content %} + {% for item in grid_items %} +
+ {{ item }} +
+ {% endfor %} +{% endblock content %} diff --git a/src/templates/dashboard/host_profile_detail.html b/src/templates/dashboard/host_profile_detail.html new file mode 100644 index 0000000..abc7648 --- /dev/null +++ b/src/templates/dashboard/host_profile_detail.html @@ -0,0 +1,71 @@ +{% extends "base.html" %} +{% load staticfiles %} + +{% block extrahead %} + {{block.super}} + + + +{% endblock %} + +{% block content %} + + + + +
+ +
+ {% for host in hosts %} +
+

stub for current PR

+
+ {% endfor %} +
+
+ +{% endblock content %} diff --git a/src/templates/dashboard/jenkins_slaves.html b/src/templates/dashboard/jenkins_slaves.html deleted file mode 100644 index fa361b1..0000000 --- a/src/templates/dashboard/jenkins_slaves.html +++ /dev/null @@ -1,46 +0,0 @@ -{% 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/src/templates/dashboard/lab_detail.html b/src/templates/dashboard/lab_detail.html new file mode 100644 index 0000000..4c06245 --- /dev/null +++ b/src/templates/dashboard/lab_detail.html @@ -0,0 +1,157 @@ +{% extends "base.html" %} +{% load staticfiles %} + +{% block extrahead %} + {{block.super}} + +{% endblock %} + +{% block content %} +
+
+
+
+

Lab Profile

+ Expand +
+
+ + + + + + + + + + + + {% if lab.contact_phone %} + + + + + {% endif %} + + + {% if lab.status < 100 %} + + {% elif lab.status < 200 %} + + {% else %} + + {% endif %} + +
Lab Name: {{lab.name}}
Lab Location: {{lab.location}}
Lab Email: {{lab.contact_email}}
Lab Phone: {{lab.contact_phone}}
Lab Status:
+ Up
+
+ Temporarily Offline
+
+ Offline Indefinitely
+
+
+
+
+

Host Profiles

+ + Expand +
+
+ + {% for profile in hostprofiles %} + + + + + + {% endfor %} +
{{profile.name}}{{profile.description}}{{profile.labs}}
+
+
+ + +
+
+

Networking Capabilities

+ Expand +
+ +
+ + + + + + + + + +
Block Size: (number of VLANs allowed per deployment){{lab.vlan_manager.block_size}}
Overlapping Vlans Allowed (user can pick which VLANs they wish to use): {{lab.vlan_manager.allow_overlapping}}
+
+
+
+
+

Images

+ Expand +
+
+ + + + + + + + {% for image in images %} + + + + + + + {% endfor %} +
NameOwnerFor Host TypeDescription
{{image.name}}{{image.owner}}{{image.host_type}}{{image.description}}
+
+
+ +
+
+
+
+

Lab Hosts

+

+ Expand +
+ +
+ + + + + + + + + {% for host in lab.host_set.all %} + + + + + {% if host.working %} + + {% else %} + + {% endif %} + + + {% endfor %} +
NameProfileBookedWorkingVendor
{{host.labid}}{{host.profile}}{{host.booked}}{{host.working}}{{host.working}}{{host.vendor}}
+
+
+
+ +
+ + +{% endblock content %} + diff --git a/src/templates/dashboard/lab_list.html b/src/templates/dashboard/lab_list.html new file mode 100644 index 0000000..a86f7f4 --- /dev/null +++ b/src/templates/dashboard/lab_list.html @@ -0,0 +1,87 @@ +{% extends "base.html" %} +{% load staticfiles %} + +{% block extrahead %} + {{block.super}} + +{% endblock %} + +{% block content %} + +
+
+ +
+ {% for lab in labs %} + + {% endfor %} +
+
+
+ +{% endblock content %} diff --git a/src/templates/dashboard/landing.html b/src/templates/dashboard/landing.html new file mode 100644 index 0000000..3e0aacd --- /dev/null +++ b/src/templates/dashboard/landing.html @@ -0,0 +1,88 @@ +{% extends "base.html" %} +{% load staticfiles %} + +{% block content %} +
+

Welcome to the Pharos Dashboard! To get started, select one of the options below:

+
+{% csrf_token %} + + + +
+ + + + +{% if manager == True %} + +{% endif %} +
+ + + +
+
+ {% csrf_token %} + + + + +
+
+ +{% block vport_comm %} +{% endblock %} +{% endblock content %} diff --git a/src/templates/dashboard/login.html b/src/templates/dashboard/login.html new file mode 100644 index 0000000..d3aa4ad --- /dev/null +++ b/src/templates/dashboard/login.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block content %} +

You Must Login To Do That

+ +Login Here + +{% endblock %} diff --git a/src/templates/dashboard/multiple_select_filter_widget.html b/src/templates/dashboard/multiple_select_filter_widget.html new file mode 100644 index 0000000..ed29ed6 --- /dev/null +++ b/src/templates/dashboard/multiple_select_filter_widget.html @@ -0,0 +1,402 @@ + + +
+{% for object_class, object_list in filter_objects %} +
+
+

{{object_class}}

+
+
+ {% for obj in object_list %} +
+
+

{{obj.name}}

+

{{obj.description}}

+ +
+ +
+ {% endfor %} +
+
+{% endfor %} +
+ + + + diff --git a/src/templates/dashboard/pdf.yaml b/src/templates/dashboard/pdf.yaml new file mode 100644 index 0000000..297e04b --- /dev/null +++ b/src/templates/dashboard/pdf.yaml @@ -0,0 +1,95 @@ +--- +version: {{version|default:"1.0"}} +details: + pod_owner: {{details.owner}} + contact: {{details.contact}} + lab: {{details.lab}} + location: {{details.location}} + type: {{details.type}} + link: {{details.link}} + +jumphost: + name: {{jumphost.name}} + node: + type: {{jumphost.node.type}} + vendor: {{jumphost.node.vendor}} + model: {{jumphost.node.model}} + arch: {{jumphost.node.arch}} + cpus: {{jumphost.node.cpus}} + cpu_cflags: {{jumphost.node.cpu_cflags}} + cores: {{jumphost.node.cores}} + memory: {{jumphost.node.memory}} + disks: + {% for disk in jumphost.disks %} + - name: {{disk.name}} + disk_capacity: {{disk.capacity}} + disk_type: {{disk.type}} + disk_interface: {{disk.interface}} + disk_rotation: {{disk.rotation}} + + {% endfor %} + os: {{jumphost.os}} + remote_params: + type: {{jumphost.remote.type}} + versions: + {% for version in jumphost.remote.versions %} + - {{version}} + {% endfor %} + user: {{jumphost.remote.user}} + pass: {{jumphost.remote.pass}} + remote_management: + type: {{jumphost.remote.type}} + versions: + {% for version in jumphost.remote.versions %} + - {{version}} + {% endfor %} + user: {{jumphost.remote.user}} + pass: {{jumphost.remote.pass}} + address: {{jumphost.remote.address}} + mac_address: {{jumphost.remote.mac_address}} + interfaces: + {% for interface in jumphost.interfaces %} + - name: {{interface.name}} + address: {{interface.address}} + mac_address: {{interface.mac_address}} + vlan: {{interface.vlan}} + {% endfor %} +nodes: + {% for node in nodes %} + - name: {{node.name}} + node: + type: {{node.node.type}} + vendor: {{node.node.vendor}} + model: {{node.node.model}} + arch: {{node.node.arch}} + cpus: {{node.node.cpus}} + cpu_cflags: {{node.node.cpu_cflags}} + cores: {{node.node.cores}} + memory: {{node.node.memory}} + disks: + {% for disk in node.disks %} + - name: {{disk.name}} + disk_capacity: {{disk.capacity}} + disk_type: {{disk.type}} + disk_interface: {{disk.interface}} + disk_rotation: {{disk.rotation}} + + {% endfor %} + remote_management: + type: {{node.remote.type}} + versions: + {% for version in node.remote.versions %} + - {{version}} + {% endfor %} + user: {{node.remote.user}} + pass: {{node.remote.pass}} + address: {{node.remote.address}} + mac_address: {{node.remote.mac_address}} + interfaces: + {% for interface in node.interfaces %} + - name: {{interface.name}} + address: {{interface.address}} + mac_address: {{interface.mac_address}} + vlan: {{interface.vlan}} + {% endfor %} + {% endfor %} diff --git a/src/templates/dashboard/resource.html b/src/templates/dashboard/resource.html index c9e5735..28e7998 100644 --- a/src/templates/dashboard/resource.html +++ b/src/templates/dashboard/resource.html @@ -2,6 +2,7 @@ {% load staticfiles %} {% block extrahead %} + {{ block.super }} @@ -50,8 +51,6 @@ var utilization_url = "{% url 'dashboard:booking_utilization' resource_id=resource.id weeks=4 %}"; loadChartData(chart_id, utilization_url); - var chart_id = "{{ resource.id }}_jenkins_utilization"; - var utilization_url = "{% url 'dashboard:jenkins_utilization' resource_id=resource.id weeks=1 %}"; loadChartData(chart_id, utilization_url); }); diff --git a/src/templates/dashboard/resource_all.html b/src/templates/dashboard/resource_all.html index a770d4e..0b0d0d4 100644 --- a/src/templates/dashboard/resource_all.html +++ b/src/templates/dashboard/resource_all.html @@ -2,6 +2,7 @@ {% load staticfiles %} {% block extrahead %} + {{ block.super }} @@ -63,10 +64,6 @@ var chart_id = "{{ resource.id }}_booking_utilization"; var utilization_url = "{% url 'dashboard:booking_utilization' resource_id=resource.id weeks=4 %}"; loadChartData(chart_id, utilization_url); - - var chart_id = "{{ resource.id }}_jenkins_utilization"; - var utilization_url = "{% url 'dashboard:jenkins_utilization' resource_id=resource.id weeks=1 %}"; - loadChartData(chart_id, utilization_url); {% endfor %} }); diff --git a/src/templates/dashboard/resource_detail.html b/src/templates/dashboard/resource_detail.html index 740dd25..79389f0 100644 --- a/src/templates/dashboard/resource_detail.html +++ b/src/templates/dashboard/resource_detail.html @@ -1,32 +1,4 @@ -{% load jenkins_filters %} -
-
-
-
- Jenkins Utilization -
-
- -
-
-
-
-
-
-
-
-
-
-
@@ -141,30 +113,6 @@
-
-
-
- Jenkins Status -
-
-

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

-

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

-

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

-
-
-
diff --git a/src/templates/dashboard/searchable_select_multiple.html b/src/templates/dashboard/searchable_select_multiple.html new file mode 100644 index 0000000..e7128b0 --- /dev/null +++ b/src/templates/dashboard/searchable_select_multiple.html @@ -0,0 +1,408 @@ + + +
+ + + + + +
    + + + + +
    + +
    +

    0

    / + {% if selectable_limit > -1 %} {{ selectable_limit }} {% else %} ∞ {% endif %}added

    + +
    + + + diff --git a/src/templates/dashboard/table.html b/src/templates/dashboard/table.html index d59f0e3..b3f4b5f 100644 --- a/src/templates/dashboard/table.html +++ b/src/templates/dashboard/table.html @@ -2,6 +2,7 @@ {% load staticfiles %} {% block extrahead %} + {{ block.super }} -- cgit 1.2.3-korg