From 078273eb7db5a481a4131d44a943f3c9e34b6b88 Mon Sep 17 00:00:00 2001 From: Parker Berberian Date: Thu, 30 Jan 2020 13:33:35 -0500 Subject: Adds Template Overrides Changes the structure of the template directories to allow a new project to define their own set of override templates that inherit from a common base. I have slightly modified landing.html here as an example. In comming changes we will try to move all the "laas" specific content into the laas directory Change-Id: I46151be182de901f870debb247b305ea34ae77ba Signed-off-by: Parker Berberian --- src/templates/booking/booking_calendar.html | 207 ------------------ src/templates/booking/booking_delete.html | 11 - src/templates/booking/booking_detail.html | 303 -------------------------- src/templates/booking/booking_grid_item.html | 11 - src/templates/booking/booking_list.html | 44 ---- src/templates/booking/booking_table.html | 37 ---- src/templates/booking/quick_deploy.html | 140 ------------ src/templates/booking/stats.html | 71 ------ src/templates/booking/steps/booking_meta.html | 38 ---- 9 files changed, 862 deletions(-) delete mode 100644 src/templates/booking/booking_calendar.html delete mode 100644 src/templates/booking/booking_delete.html delete mode 100644 src/templates/booking/booking_detail.html delete mode 100644 src/templates/booking/booking_grid_item.html delete mode 100644 src/templates/booking/booking_list.html delete mode 100644 src/templates/booking/booking_table.html delete mode 100644 src/templates/booking/quick_deploy.html delete mode 100644 src/templates/booking/stats.html delete mode 100644 src/templates/booking/steps/booking_meta.html (limited to 'src/templates/booking') diff --git a/src/templates/booking/booking_calendar.html b/src/templates/booking/booking_calendar.html deleted file mode 100644 index 450c97f..0000000 --- a/src/templates/booking/booking_calendar.html +++ /dev/null @@ -1,207 +0,0 @@ -{% extends "base.html" %} -{% load staticfiles %} - -{% load bootstrap4 %} - -{% block extrahead %} - {{ block.super }} - - - -{% 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.opsys %} - {% bootstrap_field form.purpose %} - {% bootstrap_field form.installer %} - {% bootstrap_field form.scenario %} - {% buttons %} - -

-
By continuing, you agree to our - Acceptable Usage Policy -

- {% endbuttons %} -
-
-
- {% bootstrap_form_errors form type='non_fields' %} -
- {% csrf_token %} -
-
- {% bootstrap_field form.start addon_after='' %} -
-
- {% bootstrap_field form.end addon_after='' %} -
-
- - {% bootstrap_field form.opsys %} - {% bootstrap_field form.purpose %} - {% bootstrap_field form.installer %} - {% bootstrap_field form.scenario %} - {% bootstrap_field form.reset %} - {% buttons %} - - {% endbuttons %} -
-
- - {% else %} -

Please - - login with Jira - to book this Pod

- {% endif %} -
-
-
- - -{% endblock content %} - -{% block extrajs %} - - - - - - - - -{% endblock extrajs %} diff --git a/src/templates/booking/booking_delete.html b/src/templates/booking/booking_delete.html deleted file mode 100644 index b89eb15..0000000 --- a/src/templates/booking/booking_delete.html +++ /dev/null @@ -1,11 +0,0 @@ -{% load jira_filters %} -{% load bootstrap4 %} - -

- Really delete Booking from {{ booking.start}} to {{ booking.end }}? -

-

-

-

\ No newline at end of file diff --git a/src/templates/booking/booking_detail.html b/src/templates/booking/booking_detail.html deleted file mode 100644 index fea2bb6..0000000 --- a/src/templates/booking/booking_detail.html +++ /dev/null @@ -1,303 +0,0 @@ -{% extends "base.html" %} -{% load staticfiles %} -{% load bootstrap4 %} - -{% block extrahead %} - {{block.super}} - -{% endblock %} - -{% block content %} -
-
-
-
-

Overview

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Purpose{{ booking.purpose }}
Project{{ booking.project }}
Start Time{{ booking.start }}
End Time{{ booking.end }}
Pod Definition{{ booking.resource.template }}
Pod Configuration{{ booking.config_bundle }}
Lab Deployed At{{ booking.lab }}
-
-
-
-
-

Pod

- -
-
-
- {% for host in booking.resource.hosts.all %} -

{{host.template.resource.name}}

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Hostname:{{host.template.resource.name}}
Machine:{{host.name}}
Role:{{host.config.opnfvRole}}
Image: - {{host.config.image}} -
RAM:{{host.profile.ramprofile.first.amount}}G, - {{host.profile.ramprofile.first.channels}} channels
CPU: - - - - - - - - - - - - - -
Arch:{{host.profile.cpuprofile.first.architecture}}
Cores:{{host.profile.cpuprofile.first.cores}}
Sockets:{{host.profile.cpuprofile.first.cpus}}
-
DISK: - - - - - - - - - - - - - -
Size:{{host.profile.storageprofile.first.size}} GiB
Type:{{host.profile.storageprofile.first.media_type}}
Mount Point:{{host.profile.storageprofile.first.name}}
-
Interfaces: - - {% for intprof in host.profile.interfaceprofile.all %} - - - - {% endfor %} -
- - - - - - - - - -
Name:{{intprof.name}}
Speed:{{intprof.speed}}
-
-
-
- {% endfor %} -
-
-
-
-
-
-
-

Deployment Progress

-

These are the different tasks that have to be completed before your deployment is ready

- -
-
- - - - - - - - {% for task in booking.job.get_tasklist %} - - - - - - - {% endfor %} -
StatusLab ResponseType
- {% if task.status < 100 %} -
- {% elif task.status < 200 %} -
- {% else %} -
- {% endif %} -
- {% if task.status < 100 %} - PENDING - {% elif task.status < 200 %} - IN PROGRESS - {% else %} - DONE - {% endif %} - - {% if task.message %} - {% if task.type_str == "Access Task" and user_id != task.config.user.id %} - Message from Lab:
--secret--
- {% else %} - Message from Lab:
{{ task.message }}
- {% endif %} - {% else %} - No response provided (yet) - {% endif %} -
- {{ task.type_str }} -
-
-
-
-
-

PDF

- -
-
-
-
-{{pdf}}
-                    
-
-
-
-
-
- - - - - -{% endblock content %} diff --git a/src/templates/booking/booking_grid_item.html b/src/templates/booking/booking_grid_item.html deleted file mode 100644 index 3c72fd2..0000000 --- a/src/templates/booking/booking_grid_item.html +++ /dev/null @@ -1,11 +0,0 @@ -

{{ id|default:"id" }}

-

{{ lab|default:"lab" }}

-

{{ resource_name|default:"resource name" }}

-

{{ start|default:"start" }}

-

{{ end|default:"end" }}

-

Collaborators:

- diff --git a/src/templates/booking/booking_list.html b/src/templates/booking/booking_list.html deleted file mode 100644 index 591ecc9..0000000 --- a/src/templates/booking/booking_list.html +++ /dev/null @@ -1,44 +0,0 @@ -{% extends "base.html" %} -{% load staticfiles %} -{% load bootstrap4 %} - -{% block extrahead %} - {{ block.super }} - - - - - -{% endblock extrahead %} - -{% block content %} -
-
-
-
- - {% include "booking/booking_table.html" %} -
-
-
-
-
-{% endblock content %} - -{% block extrajs %} - - - - - -{% endblock extrajs %} diff --git a/src/templates/booking/booking_table.html b/src/templates/booking/booking_table.html deleted file mode 100644 index 32a0146..0000000 --- a/src/templates/booking/booking_table.html +++ /dev/null @@ -1,37 +0,0 @@ -{% load jira_filters %} - - - - - Owner - Purpose - Project - Start - End - Operating System - - - -{% for booking in bookings %} - - - {{ booking.owner.username }} - - - {{ booking.purpose }} - - - {{ booking.project }} - - - {{ booking.start }} - - - {{ booking.end }} - - - {{ booking.resource.get_head_node.config.image.os.name }} - - -{% endfor %} - diff --git a/src/templates/booking/quick_deploy.html b/src/templates/booking/quick_deploy.html deleted file mode 100644 index 8570f25..0000000 --- a/src/templates/booking/quick_deploy.html +++ /dev/null @@ -1,140 +0,0 @@ -{% extends "base.html" %} -{% load staticfiles %} -{% load bootstrap4 %} -{% block content %} - -{% bootstrap_form_errors form type='non_fields' %} -
- {% csrf_token %} -
-
-

Please select a host type you wish to book. Only available types are shown.

- {% bootstrap_field form.filter_field show_label=False %} -
-
-
-
-
- {% bootstrap_field form.purpose %} - {% bootstrap_field form.project %} - {% bootstrap_field form.length %} - Days: 0 - -
-
-
-
- - {{ form.users }} -
-
-
-
- {% bootstrap_field form.hostname %} - {% bootstrap_field form.image %} -
-
-
-
- OPNFV: (Optional) - {% bootstrap_field form.installer %} - {% bootstrap_field form.scenario %} -
-
-
- -
-
-
- - -{% endblock %} diff --git a/src/templates/booking/stats.html b/src/templates/booking/stats.html deleted file mode 100644 index 94239f9..0000000 --- a/src/templates/booking/stats.html +++ /dev/null @@ -1,71 +0,0 @@ -{% extends "base.html" %} -{% load staticfiles %} - -{% block extrahead %} -{{ block.super }} - - -{% endblock %} - -{% block content %} -
-
-

Number of days to plot:

-
- - -
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
- -{% endblock content %} diff --git a/src/templates/booking/steps/booking_meta.html b/src/templates/booking/steps/booking_meta.html deleted file mode 100644 index f12496e..0000000 --- a/src/templates/booking/steps/booking_meta.html +++ /dev/null @@ -1,38 +0,0 @@ -{% extends "workflow/viewport-element.html" %} -{% load staticfiles %} - -{% load bootstrap4 %} - -{% block content %} - -{% bootstrap_form_errors form type='non_fields' %} -
-{% csrf_token %} -
-
-
- {% bootstrap_field form.purpose %} - {% bootstrap_field form.project %} - {% bootstrap_field form.length %} - Days: 0 - - {% bootstrap_field form.info_file %} -

You must provide a url to your project's INFO.yaml file if you are a PTL and you are trying to book a POD with multiple servers in it.

- {% bootstrap_field form.deploy_opnfv %} -
-
-

You may add collaborators on your booking to share resources with coworkers.

- {% bootstrap_field form.users label="Collaborators" %} -
-
-
- {% buttons %} - - {% endbuttons %} -
-
-
-{% endblock content %} -- cgit 1.2.3-korg