summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-03-18 13:20:12 -0400
committerParker Berberian <pberberian@iol.unh.edu>2019-03-18 13:20:12 -0400
commit3e07f1c67f6e5ff82ff11c63f9aac618a33a2749 (patch)
tree54a8f301d66a42889c967f87f59603d942c431e2
parentf2130761e1b0eb83965cb5f502aa0ef5ff6b7b1e (diff)
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 <pberberian@iol.unh.edu>
-rw-r--r--dashboard/src/resource_inventory/models.py3
-rw-r--r--dashboard/src/templates/booking/booking_table.html14
2 files changed, 8 insertions, 9 deletions
diff --git a/dashboard/src/resource_inventory/models.py b/dashboard/src/resource_inventory/models.py
index 4e3974e..bdc1f5d 100644
--- a/dashboard/src/resource_inventory/models.py
+++ b/dashboard/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/dashboard/src/templates/booking/booking_table.html b/dashboard/src/templates/booking/booking_table.html
index 5e82645..e0c5f49 100644
--- a/dashboard/src/templates/booking/booking_table.html
+++ b/dashboard/src/templates/booking/booking_table.html
@@ -5,11 +5,10 @@
<tr>
<th>Owner</th>
<th>Purpose</th>
+ <th>Project</th>
<th>Start</th>
<th>End</th>
<th>Operating System</th>
- <th>Installer</th>
- <th>Scenario</th>
</tr>
</thead>
<tbody>
@@ -22,19 +21,16 @@
{{ booking.purpose }}
</td>
<td>
- {{ booking.start }}
- </td>
- <td>
- {{ booking.end }}
+ {{ booking.project }}
</td>
<td>
- {{ booking.opsys }}
+ {{ booking.start }}
</td>
<td>
- {{ booking.installer }}
+ {{ booking.end }}
</td>
<td>
- {{ booking.scenario }}
+ {{ booking.resource.get_host.config.image.os.name }}
</td>
</tr>
{% endfor %}