diff options
author | Sawyer Bergeron <sbergeron@iol.unh.edu> | 2020-12-08 15:49:31 -0500 |
---|---|---|
committer | Sawyer Bergeron <sbergeron@iol.unh.edu> | 2020-12-09 15:17:24 -0500 |
commit | 14ad65c2e83f680246c1bf06573e3fcb19cdaa06 (patch) | |
tree | 29a1c4e85556a19d14dfcc064f0e791a2fa0bf24 | |
parent | 38152cc83eba4f8aa457dd35c824d042124cddd6 (diff) |
Update booking detail page and API after model refactor
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Change-Id: I2d1d5d7031c82a2088aa68b772c7bbdf225f3c9a
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
-rw-r--r-- | src/notifier/migrations/0007_email.py | 23 | ||||
-rw-r--r-- | src/resource_inventory/models.py | 2 | ||||
-rw-r--r-- | src/templates/base/booking/booking_detail.html | 14 |
3 files changed, 31 insertions, 8 deletions
diff --git a/src/notifier/migrations/0007_email.py b/src/notifier/migrations/0007_email.py new file mode 100644 index 0000000..aaac048 --- /dev/null +++ b/src/notifier/migrations/0007_email.py @@ -0,0 +1,23 @@ +# Generated by Django 2.2 on 2020-12-09 20:02 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('notifier', '0006_emailed'), + ] + + operations = [ + migrations.CreateModel( + name='Email', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('sent', models.BooleanField(default=False)), + ('title', models.CharField(max_length=150)), + ('message', models.TextField()), + ('recipient', models.CharField(max_length=150)), + ], + ), + ] diff --git a/src/resource_inventory/models.py b/src/resource_inventory/models.py index 01da8bb..e2f2fea 100644 --- a/src/resource_inventory/models.py +++ b/src/resource_inventory/models.py @@ -345,7 +345,7 @@ class Server(Resource): return { "id": self.labid, "image": image, - "hostname": self.name, + "hostname": self.config.name, "power": power, "ipmi_create": str(ipmi) } diff --git a/src/templates/base/booking/booking_detail.html b/src/templates/base/booking/booking_detail.html index 24a654c..a014fea 100644 --- a/src/templates/base/booking/booking_detail.html +++ b/src/templates/base/booking/booking_detail.html @@ -38,10 +38,6 @@ <td>{{ booking.resource.template }}</td> </tr> <tr> - <td>Pod Configuration</td> - <td>{{ booking.config_bundle }}</td> - </tr> - <tr> <td>Lab Deployed At</td> <td>{{ booking.lab }}</td> </tr> @@ -55,13 +51,14 @@ </div> <div class="collapse show" id="pod_panel"> <div class="card-body"> + <h4>{{host.bundle.template.copy_of.name}}</h4> {% for host in booking.resource.get_resources %} - <h4>{{host.bundle.template.copy_of.name}}</h4> + <h4>{{host.config.name}}</h4> <div class="overflow-auto"> <table class="table m-0"> <tr> <td>Hostname:</td> - <td>{{host.name}}</td> + <td>{{host.config.name}}</td> </tr> <tr> <td>Machine:</td> @@ -72,9 +69,12 @@ <td>{{host.template.opnfvRole}}</td> </tr> <tr> + <td>Is Headnode:</td> + <td>{{host.config.is_head_node}}</td> + <tr> <td>Image:</td> <td id="host_image_{{host.id}}"> - {{host.config.Image}} + {{host.config.image}} <button class="btn btn-primary ml-4" data-toggle="modal" |