aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/notifier
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates/notifier')
-rw-r--r--src/templates/notifier/email_ended.txt6
-rw-r--r--src/templates/notifier/email_expiring.txt25
-rw-r--r--src/templates/notifier/email_fulfilled.txt4
-rw-r--r--src/templates/notifier/expiring_booking.html35
-rw-r--r--src/templates/notifier/new_booking.html2
5 files changed, 70 insertions, 2 deletions
diff --git a/src/templates/notifier/email_ended.txt b/src/templates/notifier/email_ended.txt
index 7467a0e..1788e00 100644
--- a/src/templates/notifier/email_ended.txt
+++ b/src/templates/notifier/email_ended.txt
@@ -1,6 +1,10 @@
{{user_name|default:"Developer"}},
-The booking you requested of the OPNFV Lab as a Service has ended.
+{% if owner %}
+The booking you requested from the OPNFV Lab as a Service has ended.
+{% else %}
+The booking you collaborated on at the OPNFV Lab as a Service has ended.
+{% endif %}
booking information:
start: {{booking.start}}
diff --git a/src/templates/notifier/email_expiring.txt b/src/templates/notifier/email_expiring.txt
new file mode 100644
index 0000000..72c9a83
--- /dev/null
+++ b/src/templates/notifier/email_expiring.txt
@@ -0,0 +1,25 @@
+{{user_name|default:"Developer"}},
+
+{% if owner %}
+The booking you requested from the OPNFV Lab as a Service is about to expire.
+{% else %}
+The booking you collaborate on at the OPNFV Lab as a Service is about to expire.
+{% endif %}
+
+booking information:
+ start: {{booking.start}}
+ end: {{booking.end}}
+ machines:
+ {% for host in hosts %}
+ - {{host}}
+ {% endfor %}
+ purpose: {{booking.purpose}}
+
+You may visit the following link for more information:
+{{booking_url}}
+
+Please take the time to backup all data or extend the booking if needed.
+
+Thank you for contributing to the OPNFV platform!
+
+ - The Lab-as-a-Service team
diff --git a/src/templates/notifier/email_fulfilled.txt b/src/templates/notifier/email_fulfilled.txt
index 65593db..90d294a 100644
--- a/src/templates/notifier/email_fulfilled.txt
+++ b/src/templates/notifier/email_fulfilled.txt
@@ -1,6 +1,10 @@
{{user_name|default:"Developer"}},
+{% if owner %}
The booking you requested of the OPNFV Lab as a Service has finished deploying and is ready for you to use.
+{% else %}
+A booking you collaborate on is ready for you to use
+{% endif %}
The lab that fulfilled your booking request has sent you the following messages:
{% for email_message in messages %}
diff --git a/src/templates/notifier/expiring_booking.html b/src/templates/notifier/expiring_booking.html
new file mode 100644
index 0000000..8bfa689
--- /dev/null
+++ b/src/templates/notifier/expiring_booking.html
@@ -0,0 +1,35 @@
+<html>
+ <body>
+ <div id="message_content_wrapper">
+ {% if owner %}
+ <h3>Your booking is about to expire</h3>
+ <p>Your booking will expire within 48 hours ({{booking.end}}).</p>
+ {% else %}
+ <h3>A booking that you collaborate on is about to expire</h3>
+ <p>The booking owned by {{booking.owner.username}} that you work on is about to expire</p>
+ {% endif %}
+ <p>Please take the time to backup all data or extend the booking if needed.</p>
+ <p>Booking information:</p>
+ <ul>
+ <li>owner: {{booking.owner.username}}</li>
+ <li>id: {{booking.id}}</li>
+ <li>lab: {{booking.resource.template.lab.lab_user.username}}</li>
+ <li>resource: {{booking.resource.template.name}}</li>
+ <li>start: {{booking.start}}</li>
+ <li>end: {{booking.end}}</li>
+ <li>purpose: {{booking.purpose}}</li>
+ <li>collaborators:
+ <ul>
+ {% for user in booking.collaborators.all %}
+ <li>user.username</li>
+ {% empty %}
+ <li>No collaborators</li>
+ {% endfor %}
+ </ul>
+ </li>
+ </ul>
+
+ <p>You can find more detailed information <a href=/booking/detail/{{booking.id}}/>Here</a></p>
+ </div>
+ </body>
+</html>
diff --git a/src/templates/notifier/new_booking.html b/src/templates/notifier/new_booking.html
index d23b12e..64244e0 100644
--- a/src/templates/notifier/new_booking.html
+++ b/src/templates/notifier/new_booking.html
@@ -6,7 +6,7 @@
<p>We have recieved your booking request and will start working on it right away.</p>
{% else %}
<h3>You have been added as a collaborator to a booking</h3>
- <p>{{booking.owner.username}} has given you access to thier booking.</p>
+ <p>{{booking.owner.username}} has given you access to their booking.</p>
{% endif %}
<p>Booking information:</p>
<ul>