aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/base/notifier
diff options
context:
space:
mode:
authorGergely Csatari <gergely.csatari@nokia.com>2023-10-26 10:33:28 +0300
committerGergely Csatari <gergely.csatari@nokia.com>2023-10-26 10:34:28 +0300
commit2ec0d7b9f5c1354977b821c6b06c24a3ffa13142 (patch)
tree6e449d92ddfc880ed007e9d8a8f25bda8fc7cb0f /src/templates/base/notifier
parent0d3dd290aa6e7f39e7b0b3cbe448b6622f924240 (diff)
Removing project content and adding a noteHEADmaster
that the development continues in GitHub Change-Id: I25c58a679dbf92b2367d826429b7cda936bf9f0e Signed-off-by: Gergely Csatari <gergely.csatari@nokia.com>
Diffstat (limited to 'src/templates/base/notifier')
-rw-r--r--src/templates/base/notifier/email_ended.txt25
-rw-r--r--src/templates/base/notifier/email_expiring.txt25
-rw-r--r--src/templates/base/notifier/email_fulfilled.txt21
-rw-r--r--src/templates/base/notifier/end_booking.html134
-rw-r--r--src/templates/base/notifier/expiring_booking.html134
-rw-r--r--src/templates/base/notifier/inbox.html87
-rw-r--r--src/templates/base/notifier/new_booking.html133
-rw-r--r--src/templates/base/notifier/notification.html50
8 files changed, 0 insertions, 609 deletions
diff --git a/src/templates/base/notifier/email_ended.txt b/src/templates/base/notifier/email_ended.txt
deleted file mode 100644
index 33a1ec5..0000000
--- a/src/templates/base/notifier/email_ended.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-{{user_name|default:"Developer"}},
-
-{% if owner %}
-The booking you requested from the {{booking.lab.project}} Lab has ended.
-{% else %}
-The booking you collaborated on at the {{booking.lab.project}} Lab has ended.
-{% 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}}
-
-Feel free to create another booking with us!
-
-Thank you for contributing to the {{booking.lab.project}} platform!
-
- - The Lab-as-a-Service team
diff --git a/src/templates/base/notifier/email_expiring.txt b/src/templates/base/notifier/email_expiring.txt
deleted file mode 100644
index d78e59f..0000000
--- a/src/templates/base/notifier/email_expiring.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-{{user_name|default:"Developer"}},
-
-{% if owner %}
-The booking you requested from the {{booking.lab.project}} lab is about to expire.
-{% else %}
-The booking you collaborate on at the {{booking.lab.project}} lab 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 {{booking.lab.project}} platform!
-
- - The Lab-as-a-Service team
diff --git a/src/templates/base/notifier/email_fulfilled.txt b/src/templates/base/notifier/email_fulfilled.txt
deleted file mode 100644
index e3e07f9..0000000
--- a/src/templates/base/notifier/email_fulfilled.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-{{user_name|default:"Developer"}},
-
-{% if owner %}
-The booking you requested of the {{booking.lab.project}} lab 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 %}
- {{ email_message.title }}
- {{ email_message.content }}
- --------------------
- {% endfor %}
-
-You may visit the following link for more information:
-{{booking_url}}
-
-Thank you for contributing to the {{booking.lab.project}} platform!
-
- - The Lab-as-a-Service team
diff --git a/src/templates/base/notifier/end_booking.html b/src/templates/base/notifier/end_booking.html
deleted file mode 100644
index 22fbd58..0000000
--- a/src/templates/base/notifier/end_booking.html
+++ /dev/null
@@ -1,134 +0,0 @@
-<html>
- <link rel="preconnect" href="https://fonts.googleapis.com">
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
- <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro&display=swap" rel="stylesheet">
-
- <style>
- h2{
- font-family: 'Source Sans Pro';
- }
- p{
- font-family: Montserrat;
- }
- li{
- font-family: Montserrat;
- }
- a{
- color: #f8f9fa;
- text-decoration: none;
- }
- button{
- background-color:#a3c1db;
- color: #343a40;
- border: 0px;
- border-radius: 4mm;
- height: 25px;
- width: 310px;
- text-align: center;
- margin: 15px;
- text-decoration: none;
- font-family: Montserrat;
- font-size: 16;
- }
- button:focus{
- border: 0px;
- }
- .textFormatting{
- text-align: center;
- color:#343a40;
- margin: auto;
-
- }
- .content{
- background-color: #f8f9fa;
- position: center;
- }
- table{
- margin-left: auto;
- margin-right: auto;
- border: 1px solid #343a40;
- border-collapse: collapse;
- }
- tr{
- border-bottom: 1px solid #343a40;
- }
- td{
- color:#343a40;
- padding: 3px;
- font-family: Montserrat
- }
- .row1{
- background-color: #7598b6;
- }
- .row2{
- background-color: #d7e2f0;
- }
- .row3{
- background-color: #d2e5f3;
- }
- </style>
-
- <body>
- <div id="message_content_wrapper" class="textFormatting content">
- {% if owner %}
- <h2>Your Booking Has Expired.</h2>
- <p>Your booking has ended and the machines have been cleaned up.</p>
- <p>Thank you for working on {{booking.lab.project}}, and feel free to book more machines if you need them.</p>
- {% else %}
- <h2>A Booking That You Collaborated on Has Expired.</h2>
- <p>The booking owned by {{booking.owner.username}} that you worked on has ended.</p>
- <p>Thank you for contributing to {{booking.lab.project}}.</p>
- {% endif %}
- <br>
- <table>
- <tr class="row1">
- <td style="text-align: center; font-size: larger;" colspan="2">Booking Information:</td>
- </tr>
- <tr class="row2">
- <td>Owner:</td>
- <td>{{booking.owner.username}}</td>
- </tr>
- <tr class="row3">
- <td>id:</td>
- <td>{{booking.id}}</td>
- </tr>
- <tr class="row2">
- <td>lab:</td>
- <td>{{booking.resource.template.lab.lab_user.username}}</td>
- </tr>
- <tr class="row3">
- <td>resource:</td>
- <td>{{booking.resource.template.name}}</td>
- </tr>
- <tr class="row2">
- <td>start:</td>
- <td>{{booking.start}}</td>
- </tr>
- <tr class="row3">
- <td>end:</td>
- <td>{{booking.end}}</td>
- </tr>
- <tr class="row2">
- <td>purpose:</td>
- <td>{{booking.purpose}}</td>
- </tr>
- <tr class="row3">
- <td>collaborator{% booking.collaborators.all.count|pluralize:"s" %}:</td>
- <td></td>
- </tr>
- {% for user in booking.collaborators.all %}
- <tr class="{% cycle 'row2' 'row3' %}">
- <td></td>
- <td>{{user.username}}</td>
- </tr>
- {% empty %}
- <tr class="row2">
- <td></td>
- <td>No collaborators</td>
- </tr>
- {% endfor %}
- </table>
- <button type="button" onclick="window.location.href='/booking/detail/{{booking.id}}'">You can find more detailed information here</button>
- </div>
- </body>
-</html>
diff --git a/src/templates/base/notifier/expiring_booking.html b/src/templates/base/notifier/expiring_booking.html
deleted file mode 100644
index 7247081..0000000
--- a/src/templates/base/notifier/expiring_booking.html
+++ /dev/null
@@ -1,134 +0,0 @@
-<html>
- <link rel="preconnect" href="https://fonts.googleapis.com">
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
- <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro&display=swap" rel="stylesheet">
-
- <style>
- h2{
- font-family: 'Source Sans Pro';
- }
- p{
- font-family: Montserrat;
- }
- li{
- font-family: Montserrat;
- }
- a{
- color: #f8f9fa;
- text-decoration: none;
- }
- button{
- background-color:#a3c1db;
- color: #343a40;
- border: 0px;
- border-radius: 4mm;
- height: 25px;
- width: 310px;
- text-align: center;
- margin: 15px;
- text-decoration: none;
- font-family: Montserrat;
- font-size: 16;
- }
- button:focus{
- border: 0px;
- }
- .textFormatting{
- text-align: center;
- color:#343a40;
- margin: auto;
-
- }
- .content{
- background-color: #f8f9fa;
- position: center;
- }
- table{
- margin-left: auto;
- margin-right: auto;
- border: 1px solid #343a40;
- border-collapse: collapse;
- }
- tr{
- border-bottom: 1px solid #343a40;
- }
- td{
- color:#343a40;
- padding: 3px;
- font-family: Montserrat
- }
- .row1{
- background-color: #7598b6;
- }
- .row2{
- background-color: #d7e2f0;
- }
- .row3{
- background-color: #d2e5f3;
- }
- </style>
-
-
- <body>
- <div id="message_content_wrapper" class="textFormatting content">
- {% if owner %}
- <h2>Your Booking Is About to Expire.</h2>
- <p>Your booking will expire within 48 hours ({{booking.end}}).</p>
- {% else %}
- <h2>A Booking That You Collaborate on Is About to Expire.</h2>
- <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>
- <br>
- <table>
- <tr class="row1">
- <td style="text-align: center; font-size: larger;" colspan="2">Booking Information:</td>
- </tr>
- <tr class="row2">
- <td>Owner:</td>
- <td>{{booking.owner.username}}</td>
- </tr>
- <tr class="row3">
- <td>id:</td>
- <td>{{booking.id}}</td>
- </tr>
- <tr class="row2">
- <td>lab:</td>
- <td>{{booking.resource.template.lab.lab_user.username}}</td>
- </tr>
- <tr class="row3">
- <td>resource:</td>
- <td>{{booking.resource.template.name}}</td>
- </tr>
- <tr class="row2">
- <td>start:</td>
- <td>{{booking.start}}</td>
- </tr>
- <tr class="row3">
- <td>end:</td>
- <td>{{booking.end}}</td>
- </tr>
- <tr class="row2">
- <td>purpose:</td>
- <td>{{booking.purpose}}</td>
- </tr>
- <tr class="row3">
- <td>collaborator{% booking.collaborators.all.count|pluralize:"s" %}:</td>
- <td></td>
- </tr>
- {% for user in booking.collaborators.all %}
- <tr class="{% cycle 'row2' 'row3' %}">
- <td></td>
- <td>{{user.username}}</td>
- </tr>
- {% empty %}
- <tr class="row2">
- <td></td>
- <td>No collaborators</td>
- </tr>
- {% endfor %}
- </table>
- <button type="button" onclick="window.location.href='/booking/detail/{{booking.id}}'">You can find more detailed information here</button>
- </div>
- </body>
-</html>
diff --git a/src/templates/base/notifier/inbox.html b/src/templates/base/notifier/inbox.html
deleted file mode 100644
index 26b6d32..0000000
--- a/src/templates/base/notifier/inbox.html
+++ /dev/null
@@ -1,87 +0,0 @@
-{% extends "base.html" %}
-
-
-{% load staticfiles %}
-
-{% block content %}
-
-<div class="container-fluid d-flex flex-grow-1 flex-column">
- <div class="row mt-3 mb-2">
- <div class="col-2 px-0">
- <div class="btn-group w-100" id="filterGroup">
- <button class="btn btn-secondary active" data-read="-1">All</button>
- <button class="btn btn-secondary" data-read="0">Unread</button>
- <button class="btn btn-secondary" data-read="1">Read</button>
- </div>
- </div>
- </div>
- <div class="row flex-grow-1" id="fixHeight">
- <!-- Notification list && Controls -->
- <div class="mb-2 mb-lg-0 col-lg-2 px-0 mh-100">
- <span class="text-muted d-none" id="noMessages">No messages available</span>
- <div class="list-group rounded-0 rounded-left overflow-auto mh-100 notifications" id="unreadNotifications" data-read="0">
- {% for notification in unread_notifications %}
- <a
- href="#"
- onclick="showmessage({{notification.id}}); setactive(this);"
- class="list-group-item list-group-item-action notification">
- {{ notification }}
- </a>
- {% endfor %}
- </div>
- <div class="list-group rounded-0 rounded-left overflow-auto mh-100 notifications" id="readNotifications" data-read="1">
- {% for notification in read_notifications %}
- <a
- href="#"
- onclick="showmessage({{notification.id}}); setactive(this);"
- class="list-group-item list-group-item-action list-group-item-secondary notification">
- {{ notification }}
- </a>
- {% endfor %}
- </div>
- </div>
- <!-- Content -->
- <div class="col ml-lg-2 border mh-100 p-4">
- <iframe name="messageView" class="w-100 h-100" id="inbox-iframe" frameBorder="0" scrolling="yes">Please select a notification</iframe>
- </div>
- </div>
-</div>
-
-<script type="text/javascript">
- function showmessage(msg_id) {
- window.frames["messageView"].location = "notification/" + msg_id;
- }
-
- function setactive(obj) {
- $(".notification").removeClass("active");
- $(obj).addClass("active");
- }
-
- // Shows messages in the given notification list.
- // Shows/hides the 'no messages' span after checking children amount
- // given the .notification classed element
- function showMessages(notificationList) {
- $(".notifications").addClass("d-none");
- if (notificationList.children().length < 1) {
- $("#noMessages").removeClass("d-none");
- } else {
- $("#noMessages").addClass("d-none");
- notificationList.removeClass("d-none");
- }
- }
-
- $(document).ready(function(){
- // For all / unread / read
- $("#filterGroup button").click(function(){
- let read = $(this).attr("data-read");
- $(this).siblings().removeClass("active");
- $(this).addClass("active");
- if (read === "-1") {
- return showMessages($(".notifications"));
- }
- return showMessages($(`.notifications[data-read="${read}"]`));
- });
- showMessages($(".notifications"));
- });
-</script>
-{% endblock %} \ No newline at end of file
diff --git a/src/templates/base/notifier/new_booking.html b/src/templates/base/notifier/new_booking.html
deleted file mode 100644
index d886f40..0000000
--- a/src/templates/base/notifier/new_booking.html
+++ /dev/null
@@ -1,133 +0,0 @@
-<html>
- <link rel="preconnect" href="https://fonts.googleapis.com">
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
- <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro&display=swap" rel="stylesheet">
-
- <style>
- h2{
- font-family: 'Source Sans Pro';
- }
- p{
- font-family: Montserrat;
- }
- li{
- font-family: Montserrat;
- }
- a{
- color: #f8f9fa;
- text-decoration: none;
- }
- button{
- background-color:#a3c1db;
- color: #343a40;
- border: 0px;
- border-radius: 4mm;
- height: 25px;
- width: 310px;
- text-align: center;
- margin: 15px;
- text-decoration: none;
- font-family: Montserrat;
- font-size: 16;
- }
- button:focus{
- border: 0px;
- }
- .textFormatting{
- text-align: center;
- color:#343a40;
- margin: auto;
-
- }
- .content{
- background-color: #f8f9fa;
- position: center;
- }
- table{
- margin-left: auto;
- margin-right: auto;
- border: 1px solid #343a40;
- border-collapse: collapse;
- }
- tr{
- border-bottom: 1px solid #343a40;
- }
- td{
- color:#343a40;
- padding: 3px;
- font-family: Montserrat
- }
- .row1{
- background-color: #7598b6;
- font-weight: bolder;
- }
- .row2{
- background-color: #d7e2f0;
- }
- .row3{
- background-color: #d2e5f3;
- }
- </style>
- <body>
- <div id="message_content_wrapper" class="textFormatting content">
- {% if owner %}
- <h2>You Have Created a New Booking.</h2>
- <p>We have recieved your booking request and will start working on it right away.</p>
- {% else %}
- <h2>You Have Been Added as a Collaborator to a Booking.</h2>
- <p>{{booking.owner.username}} has given you access to their booking.</p>
- {% endif %}
- <br>
-
- <table>
- <tr class="row1">
- <td style="text-align: center; font-size: larger;" colspan="2">Booking Information:</td>
- </tr>
- <tr class="row2">
- <td>Owner:</td>
- <td>{{booking.owner.username}}</td>
- </tr>
- <tr class="row3">
- <td>id:</td>
- <td>{{booking.id}}</td>
- </tr>
- <tr class="row2">
- <td>lab:</td>
- <td>{{booking.resource.template.lab.lab_user.username}}</td>
- </tr>
- <tr class="row3">
- <td>resource:</td>
- <td>{{booking.resource.template.name}}</td>
- </tr>
- <tr class="row2">
- <td>start:</td>
- <td>{{booking.start}}</td>
- </tr>
- <tr class="row3">
- <td>end:</td>
- <td>{{booking.end}}</td>
- </tr>
- <tr class="row2">
- <td>purpose:</td>
- <td>{{booking.purpose}}</td>
- </tr>
- <tr class="row3">
- <td>collaborators:</td>
- <td></td>
- </tr>
- {% for user in booking.collaborators.all %}
- <tr class="{% cycle 'row2' 'row3' %}">
- <td></td>
- <td>{{user.username}}</td>
- </tr>
- {% empty %}
- <tr class="row2">
- <td></td>
- <td>No collaborators</td>
- </tr>
- {% endfor %}
- </table>
- <button type="button" onclick="window.location.href='/booking/detail/{{booking.id}}'">You can find more detailed information here</button>
- </div>
- </body>
-</html>
diff --git a/src/templates/base/notifier/notification.html b/src/templates/base/notifier/notification.html
deleted file mode 100644
index 603edea..0000000
--- a/src/templates/base/notifier/notification.html
+++ /dev/null
@@ -1,50 +0,0 @@
-{% extends "layout.html" %}
-{% block extrahead %}
-<base target="_parent">
-{% endblock %}
-
-{% block basecontent %}
-<script>
- function send_request(post_data){
- var form = $("#notification_action_form");
- var formData = form.serialize() + '&' + post_data + '=true';
- var req = new XMLHttpRequest();
- req.open("POST", ".", false);
- req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- req.onerror = function() { alert("problem occurred while trying to cancel current workflow"); }
- req.onreadystatechange = function() { if(req.readyState === 4){
- window.top.location.href += '';
- }};
- req.send(formData);
- }
- function delete_notification()
- {
- send_request("delete");
- }
- function mark_unread()
- {
- send_request("unread");
- }
-</script>
-
-<div class="d-flex justify-content-between border-bottom">
- <span class="h3">{{notification.title}}</span>
- <div class="btn_group">
- <button class="btn btn-primary inbox-btn" onclick="mark_unread()">Mark Unread</button>
- <button class="btn btn-danger inbox-btn" onclick="delete_notification()">Delete</button>
- </div>
-</div>
-
-<p class="content-divider"></p>
-
-{% if not notification.is_html %}
-<pre>
-{% endif %}
- {{notification.content|safe}}
-{% if not notification.is_html %}
-</pre>
-{% endif %}
-<form id="notification_action_form" action="." method="post">
- {% csrf_token %}
-</form>
-{% endblock %}