aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/notifier/migrations/0007_email.py23
-rw-r--r--src/resource_inventory/models.py2
-rw-r--r--src/templates/base/booking/booking_detail.html14
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"