summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-03-20 16:18:59 +0000
committerGerrit Code Review <gerrit@opnfv.org>2019-03-20 16:18:59 +0000
commit9363751f1c13c3f53eea2902da81177e1cb22808 (patch)
treeda91530c404b50a584f7f1848745ef6ede17848d /src
parent447a371f5c2501719f0c932bacc0616a9764b433 (diff)
parenteaecaacd9332e1344dea479ae65e8c005990e0ea (diff)
Merge "Fixes Booking List"
Diffstat (limited to 'src')
-rw-r--r--src/resource_inventory/models.py3
-rw-r--r--src/templates/booking/booking_table.html14
2 files changed, 8 insertions, 9 deletions
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 @@
<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 %}