From eaecaacd9332e1344dea479ae65e8c005990e0ea Mon Sep 17 00:00:00 2001 From: Parker Berberian Date: Mon, 18 Mar 2019 13:20:12 -0400 Subject: Fixes Booking List Adds project collumn, removed Installer and Scenario, and correctly populates the operating system collumn. Change-Id: I8af778c66fa248832ad98188d0c93bbc84027c55 Signed-off-by: Parker Berberian --- src/resource_inventory/models.py | 3 +++ src/templates/booking/booking_table.html | 14 +++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/resource_inventory/models.py b/src/resource_inventory/models.py index 4e3974e..bdc1f5d 100644 --- a/src/resource_inventory/models.py +++ b/src/resource_inventory/models.py @@ -184,6 +184,9 @@ class ResourceBundle(models.Model): return "Resource bundle " + str(self.id) + " with no template" return "instance of " + str(self.template) + def get_host(self, role="Jumphost"): + return Host.objects.filter(bundle=self, config__opnfvRole__name=role).first() + # Networking diff --git a/src/templates/booking/booking_table.html b/src/templates/booking/booking_table.html index 5e82645..e0c5f49 100644 --- a/src/templates/booking/booking_table.html +++ b/src/templates/booking/booking_table.html @@ -5,11 +5,10 @@ Owner Purpose + Project Start End Operating System - Installer - Scenario @@ -22,19 +21,16 @@ {{ booking.purpose }} - {{ booking.start }} - - - {{ booking.end }} + {{ booking.project }} - {{ booking.opsys }} + {{ booking.start }} - {{ booking.installer }} + {{ booking.end }} - {{ booking.scenario }} + {{ booking.resource.get_host.config.image.os.name }} {% endfor %} -- cgit 1.2.3-korg