Fixes Booking List 88/67288/1
authorParker Berberian <pberberian@iol.unh.edu>
Mon, 18 Mar 2019 17:20:12 +0000 (13:20 -0400)
committerParker Berberian <pberberian@iol.unh.edu>
Mon, 18 Mar 2019 17:20:12 +0000 (13:20 -0400)
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>
dashboard/src/resource_inventory/models.py
dashboard/src/templates/booking/booking_table.html

index 4e3974e..bdc1f5d 100644 (file)
@@ -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
 
index 5e82645..e0c5f49 100644 (file)
@@ -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>
             {{ 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 %}