From 0a374dc4bd76d968afbfe468f8593fc28a3b4a4f Mon Sep 17 00:00:00 2001 From: Kirill Malgichev Date: Thu, 3 Nov 2022 15:08:57 -0400 Subject: [PATCH 1/6] Adding MJML CLI to the babylon-notifier image --- notifier/.s2i/bin/assemble | 12 ++++++++++++ notifier/Dockerfile | 5 +++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100755 notifier/.s2i/bin/assemble diff --git a/notifier/.s2i/bin/assemble b/notifier/.s2i/bin/assemble new file mode 100755 index 000000000..6ecac4a5f --- /dev/null +++ b/notifier/.s2i/bin/assemble @@ -0,0 +1,12 @@ +#!/bin/bash + +npm install -g npm@latest +npm install -g mjml + +#mkdir -p /opt/app-root/node +#mkdir -p /opt/app-root/npm-modules + +#curl -s https://nodejs.org/dist/v18.12.0/node-v18.12.0-linux-x64.tar.gz \ +# | tar zxvf - -C /opt/app-root/node --strip-components=1 + +exec /usr/libexec/s2i/assemble \ No newline at end of file diff --git a/notifier/Dockerfile b/notifier/Dockerfile index 024122ed2..c278f8e93 100644 --- a/notifier/Dockerfile +++ b/notifier/Dockerfile @@ -9,10 +9,11 @@ RUN dnf install -y @ruby && \ rm -rf /tmp/src/.git* && \ chown -R 1001 /tmp/src && \ chgrp -R 0 /tmp/src && \ - chmod -R g+w /tmp/src + chmod -R g+w /tmp/src \ + cp -rp /tmp/src/.s2i/bin /tmp/scripts USER 1001 -RUN /usr/libexec/s2i/assemble +RUN /tmp/scripts/assemble CMD ["/usr/libexec/s2i/run"] From 9518e3cf9d776d42f028dcaab36d6557d0825224 Mon Sep 17 00:00:00 2001 From: Kirill Malgichev Date: Thu, 3 Nov 2022 15:42:28 -0400 Subject: [PATCH 2/6] Adding MJML templates --- notifier/operator/operator.py | 11 +++- notifier/operator/templates/base.mjml.j2 | 58 +++++++++++++++++++ .../templates/provision-failed.html.j2 | 5 ++ .../templates/provision-started.html.j2 | 5 ++ .../templates/retirement-scheduled.html.j2 | 5 ++ .../templates/service-deleted.html.j2 | 5 ++ .../operator/templates/service-ready.html.j2 | 5 ++ .../operator/templates/start-complete.html.j2 | 5 ++ .../operator/templates/start-failed.html.j2 | 5 ++ .../operator/templates/stop-complete.html.j2 | 5 ++ .../operator/templates/stop-failed.html.j2 | 5 ++ .../operator/templates/stop-scheduled.html.j2 | 5 ++ 12 files changed, 117 insertions(+), 2 deletions(-) create mode 100644 notifier/operator/templates/base.mjml.j2 diff --git a/notifier/operator/operator.py b/notifier/operator/operator.py index 184f8406e..fbd9e558b 100755 --- a/notifier/operator/operator.py +++ b/notifier/operator/operator.py @@ -726,9 +726,16 @@ def send_notification_email( else: message_template = catalog_item.get_message_template(kebabToCamelCase(template)) if message_template: - email_body = j2env.from_string(message_template).render(**template_vars) + mjml_template = j2env.from_string(message_template).render(**template_vars) else: - email_body = j2env.get_template(template + '.html.j2').render(**template_vars) + mjml_template = j2env.get_template(template + '.html.j2').render(**template_vars) + + # Call for the MJML CLI to generate final HTML + email_body = subprocess.run( + ['mjml', '-i'], + stdout=subprocess.PIPE, + input=mjml_template, + encoding='ascii').stdout msg = MIMEMultipart('alternative') msg['Subject'] = email_subject diff --git a/notifier/operator/templates/base.mjml.j2 b/notifier/operator/templates/base.mjml.j2 new file mode 100644 index 000000000..639c67cb9 --- /dev/null +++ b/notifier/operator/templates/base.mjml.j2 @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + Status: Service Ready + + + {{ service_display_name }} + + + from Portfolio Product Marketing + + + + + + + + + + + + + + + {% block content %}{% endblock %} + + + + + + + + + RedHat + © Copyright 2022 - All rights reserved + + + + + + diff --git a/notifier/operator/templates/provision-failed.html.j2 b/notifier/operator/templates/provision-failed.html.j2 index 5d1afdb27..f38e51c01 100644 --- a/notifier/operator/templates/provision-failed.html.j2 +++ b/notifier/operator/templates/provision-failed.html.j2 @@ -1,3 +1,6 @@ +{% extends "base.mjml.j2" %} +{% block content %} +

Your {{ catalog_namespace.display_name }} service, {{ service_display_name }}, has failed to provision. {% if have_attachments %} Please see attached Ansible log. @@ -8,3 +11,5 @@ Please see attached Ansible log.

You may manage your {{ catalog_namespace.display_name }} service at:
{{ service_url }}.

{% endif %} + +{% endblock content %} \ No newline at end of file diff --git a/notifier/operator/templates/provision-started.html.j2 b/notifier/operator/templates/provision-started.html.j2 index 9ab01245c..c0d0509e8 100644 --- a/notifier/operator/templates/provision-started.html.j2 +++ b/notifier/operator/templates/provision-started.html.j2 @@ -1,3 +1,6 @@ +{% extends "base.mjml.j2" %} +{% block content %} +

Thank you for ordering {{ catalog_item.display_name }}.

Provisioning has started on your {{ catalog_namespace.display_name }} service, {{ service_display_name }}.

@@ -8,3 +11,5 @@

You may manage your {{ catalog_namespace.display_name }} service at:
{{ service_url }}.

{% endif %} + +{% endblock content %} \ No newline at end of file diff --git a/notifier/operator/templates/retirement-scheduled.html.j2 b/notifier/operator/templates/retirement-scheduled.html.j2 index c527f4d8a..8f10f9a8c 100644 --- a/notifier/operator/templates/retirement-scheduled.html.j2 +++ b/notifier/operator/templates/retirement-scheduled.html.j2 @@ -1,3 +1,6 @@ +{% extends "base.mjml.j2" %} +{% block content %} +

Reminder:
Your environment will expire and be deleted in {{ retirement_timedelta_humanized }} at {{ retirement_timestamp }}.

@@ -5,3 +8,5 @@ Your environment will expire and be deleted in {{ retirement_timedelta_humanized

You may manage your {{ catalog_namespace.display_name }} service at:
{{ service_url }}.

{% endif %} + +{% endblock content %} \ No newline at end of file diff --git a/notifier/operator/templates/service-deleted.html.j2 b/notifier/operator/templates/service-deleted.html.j2 index 70878bcaa..e7c99d0ff 100644 --- a/notifier/operator/templates/service-deleted.html.j2 +++ b/notifier/operator/templates/service-deleted.html.j2 @@ -1,3 +1,6 @@ +{% extends "base.mjml.j2" %} +{% block content %} +

Your {{ catalog_namespace.display_name }} service {{ service_display_name }} has been deleted.

To conserve resources data on these systems is not archived and cannot be retrieved. @@ -7,3 +10,5 @@ Thank you for using {{ catalog_namespace.display_name }}.

{% if survey_link %}

We would love your feedback on your demo/lab, please fill out our short Survey (click here) to help us improve your experience.

{% endif %} + +{% endblock content %} \ No newline at end of file diff --git a/notifier/operator/templates/service-ready.html.j2 b/notifier/operator/templates/service-ready.html.j2 index 8701be7bc..4f256505a 100644 --- a/notifier/operator/templates/service-ready.html.j2 +++ b/notifier/operator/templates/service-ready.html.j2 @@ -1,3 +1,6 @@ +{% extends "base.mjml.j2" %} +{% block content %} +

Thank you for ordering {{ catalog_item.display_name }}.

Your {{ catalog_namespace.display_name }} service {{ service_display_name }} is ready.

@@ -42,3 +45,5 @@ All data will be lost upon expiration.

You may manage your {{ catalog_namespace.display_name }} service at:
{{ service_url }}.

{% endif %} + +{% endblock content %} \ No newline at end of file diff --git a/notifier/operator/templates/start-complete.html.j2 b/notifier/operator/templates/start-complete.html.j2 index c08b6e191..efb7cdf89 100644 --- a/notifier/operator/templates/start-complete.html.j2 +++ b/notifier/operator/templates/start-complete.html.j2 @@ -1,3 +1,6 @@ +{% extends "base.mjml.j2" %} +{% block content %} +

Your {{ catalog_namespace.display_name }} service {{ service_display_name }} has started.

NOTICE:
@@ -8,3 +11,5 @@ Your environment will expire and be deleted in {{ retirement_timedelta_humanized

You may manage your {{ catalog_namespace.display_name }} service at:
{{ service_url }}.

{% endif %} + +{% endblock content %} \ No newline at end of file diff --git a/notifier/operator/templates/start-failed.html.j2 b/notifier/operator/templates/start-failed.html.j2 index 5371acfe9..9b5c18704 100644 --- a/notifier/operator/templates/start-failed.html.j2 +++ b/notifier/operator/templates/start-failed.html.j2 @@ -1,3 +1,6 @@ +{% extends "base.mjml.j2" %} +{% block content %} +

Your {{ catalog_namespace.display_name }} service {{ service_display_name }} failed to start. {% if have_attachments %} Please see attached Ansible log. @@ -8,3 +11,5 @@ Please see attached Ansible log.

You may manage your {{ catalog_namespace.display_name }} service at:
{{ service_url }}.

{% endif %} + +{% endblock content %} \ No newline at end of file diff --git a/notifier/operator/templates/stop-complete.html.j2 b/notifier/operator/templates/stop-complete.html.j2 index cd57cdfc0..593ffea90 100644 --- a/notifier/operator/templates/stop-complete.html.j2 +++ b/notifier/operator/templates/stop-complete.html.j2 @@ -1,6 +1,11 @@ +{% extends "base.mjml.j2" %} +{% block content %} +

Your {{ catalog_namespace.display_name }} service {{ service_display_name }} has stopped.

{% if service_url %}

You may manage your {{ catalog_namespace.display_name }} service at:
{{ service_url }}.

{% endif %} + +{% endblock content %} \ No newline at end of file diff --git a/notifier/operator/templates/stop-failed.html.j2 b/notifier/operator/templates/stop-failed.html.j2 index 7782d0492..ed50e9a64 100644 --- a/notifier/operator/templates/stop-failed.html.j2 +++ b/notifier/operator/templates/stop-failed.html.j2 @@ -1,3 +1,6 @@ +{% extends "base.mjml.j2" %} +{% block content %} +

Your {{ catalog_namespace.display_name }} service {{ service_display_name }} failed to stop. {% if have_attachments %} Please see attached Ansible log. @@ -8,3 +11,5 @@ Please see attached Ansible log.

You may manage your {{ catalog_namespace.display_name }} service at:
{{ service_url }}.

{% endif %} + +{% endblock content %} \ No newline at end of file diff --git a/notifier/operator/templates/stop-scheduled.html.j2 b/notifier/operator/templates/stop-scheduled.html.j2 index 41fc6d0cc..5d61128b1 100644 --- a/notifier/operator/templates/stop-scheduled.html.j2 +++ b/notifier/operator/templates/stop-scheduled.html.j2 @@ -1,3 +1,6 @@ +{% extends "base.mjml.j2" %} +{% block content %} +

Reminder:
Your environment will be stopped in {{ stop_timedelta_humanized }} at {{ stop_timestamp }}.

@@ -5,3 +8,5 @@ Your environment will be stopped in {{ stop_timedelta_humanized }} at {{ stop_ti

You may manage your {{ catalog_namespace.display_name }} service at:
{{ service_url }}.

{% endif %} + +{% endblock content %} \ No newline at end of file From 2cae08a19f1afa5149ea53fe59c49eca65f582ca Mon Sep 17 00:00:00 2001 From: Kirill Malgichev Date: Mon, 7 Nov 2022 09:56:39 -0500 Subject: [PATCH 3/6] Freeze versions for npm and mjml --- notifier/.s2i/bin/assemble | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/notifier/.s2i/bin/assemble b/notifier/.s2i/bin/assemble index 6ecac4a5f..4e989c84b 100755 --- a/notifier/.s2i/bin/assemble +++ b/notifier/.s2i/bin/assemble @@ -1,12 +1,6 @@ #!/bin/bash -npm install -g npm@latest -npm install -g mjml - -#mkdir -p /opt/app-root/node -#mkdir -p /opt/app-root/npm-modules - -#curl -s https://nodejs.org/dist/v18.12.0/node-v18.12.0-linux-x64.tar.gz \ -# | tar zxvf - -C /opt/app-root/node --strip-components=1 +npm install -g npm@8.19.3 +npm install -g mjml@4.13.0 exec /usr/libexec/s2i/assemble \ No newline at end of file From 75d1a3bb7e54a6de9db003c978327d6543755d58 Mon Sep 17 00:00:00 2001 From: Kirill Malgichev Date: Mon, 7 Nov 2022 15:25:33 -0500 Subject: [PATCH 4/6] Updating templates --- notifier/operator/operator.py | 3 ++- notifier/operator/templates/base.mjml.j2 | 4 ++-- .../{provision-failed.html.j2 => provision-failed.mjml.j2} | 0 .../{provision-started.html.j2 => provision-started.mjml.j2} | 0 ...irement-scheduled.html.j2 => retirement-scheduled.mjml.j2} | 0 .../{service-deleted.html.j2 => service-deleted.mjml.j2} | 0 .../{service-ready.html.j2 => service-ready.mjml.j2} | 2 +- .../{start-complete.html.j2 => start-complete.mjml.j2} | 0 .../templates/{start-failed.html.j2 => start-failed.mjml.j2} | 0 .../{stop-complete.html.j2 => stop-complete.mjml.j2} | 0 .../templates/{stop-failed.html.j2 => stop-failed.mjml.j2} | 0 .../{stop-scheduled.html.j2 => stop-scheduled.mjml.j2} | 0 12 files changed, 5 insertions(+), 4 deletions(-) rename notifier/operator/templates/{provision-failed.html.j2 => provision-failed.mjml.j2} (100%) rename notifier/operator/templates/{provision-started.html.j2 => provision-started.mjml.j2} (100%) rename notifier/operator/templates/{retirement-scheduled.html.j2 => retirement-scheduled.mjml.j2} (100%) rename notifier/operator/templates/{service-deleted.html.j2 => service-deleted.mjml.j2} (100%) rename notifier/operator/templates/{service-ready.html.j2 => service-ready.mjml.j2} (98%) rename notifier/operator/templates/{start-complete.html.j2 => start-complete.mjml.j2} (100%) rename notifier/operator/templates/{start-failed.html.j2 => start-failed.mjml.j2} (100%) rename notifier/operator/templates/{stop-complete.html.j2 => stop-complete.mjml.j2} (100%) rename notifier/operator/templates/{stop-failed.html.j2 => stop-failed.mjml.j2} (100%) rename notifier/operator/templates/{stop-scheduled.html.j2 => stop-scheduled.mjml.j2} (100%) diff --git a/notifier/operator/operator.py b/notifier/operator/operator.py index fbd9e558b..ac311b69f 100755 --- a/notifier/operator/operator.py +++ b/notifier/operator/operator.py @@ -718,6 +718,7 @@ def send_notification_email( ) ) template_vars['have_attachments'] = len(attachments) > 0 + template_vars['service_status'] = ' '.join(elem.capitalize() for elem in template.replace('-', ' ').split()) email_subject = j2env.from_string(subject).render(**template_vars) @@ -728,7 +729,7 @@ def send_notification_email( if message_template: mjml_template = j2env.from_string(message_template).render(**template_vars) else: - mjml_template = j2env.get_template(template + '.html.j2').render(**template_vars) + mjml_template = j2env.get_template(template + '.mjml.j2').render(**template_vars) # Call for the MJML CLI to generate final HTML email_body = subprocess.run( diff --git a/notifier/operator/templates/base.mjml.j2 b/notifier/operator/templates/base.mjml.j2 index 639c67cb9..b7b6bbae9 100644 --- a/notifier/operator/templates/base.mjml.j2 +++ b/notifier/operator/templates/base.mjml.j2 @@ -18,13 +18,13 @@ - Status: Service Ready + Status: {{ service_status }} {{ service_display_name }} - from Portfolio Product Marketing + from {{ catalog_namespace.display_name }} diff --git a/notifier/operator/templates/provision-failed.html.j2 b/notifier/operator/templates/provision-failed.mjml.j2 similarity index 100% rename from notifier/operator/templates/provision-failed.html.j2 rename to notifier/operator/templates/provision-failed.mjml.j2 diff --git a/notifier/operator/templates/provision-started.html.j2 b/notifier/operator/templates/provision-started.mjml.j2 similarity index 100% rename from notifier/operator/templates/provision-started.html.j2 rename to notifier/operator/templates/provision-started.mjml.j2 diff --git a/notifier/operator/templates/retirement-scheduled.html.j2 b/notifier/operator/templates/retirement-scheduled.mjml.j2 similarity index 100% rename from notifier/operator/templates/retirement-scheduled.html.j2 rename to notifier/operator/templates/retirement-scheduled.mjml.j2 diff --git a/notifier/operator/templates/service-deleted.html.j2 b/notifier/operator/templates/service-deleted.mjml.j2 similarity index 100% rename from notifier/operator/templates/service-deleted.html.j2 rename to notifier/operator/templates/service-deleted.mjml.j2 diff --git a/notifier/operator/templates/service-ready.html.j2 b/notifier/operator/templates/service-ready.mjml.j2 similarity index 98% rename from notifier/operator/templates/service-ready.html.j2 rename to notifier/operator/templates/service-ready.mjml.j2 index 4f256505a..736e2d9e6 100644 --- a/notifier/operator/templates/service-ready.html.j2 +++ b/notifier/operator/templates/service-ready.mjml.j2 @@ -11,7 +11,7 @@

Always refer to the instructions to understand how to properly access and navigate your environment.

-

NOTICE:
+

NOTICE:
Your environment will be stopped in {{ stop_timedelta_humanized }} at {{ stop_timestamp }}.
Your environment will expire and be deleted in {{ retirement_timedelta_humanized }} at {{ retirement_timestamp }}.

diff --git a/notifier/operator/templates/start-complete.html.j2 b/notifier/operator/templates/start-complete.mjml.j2 similarity index 100% rename from notifier/operator/templates/start-complete.html.j2 rename to notifier/operator/templates/start-complete.mjml.j2 diff --git a/notifier/operator/templates/start-failed.html.j2 b/notifier/operator/templates/start-failed.mjml.j2 similarity index 100% rename from notifier/operator/templates/start-failed.html.j2 rename to notifier/operator/templates/start-failed.mjml.j2 diff --git a/notifier/operator/templates/stop-complete.html.j2 b/notifier/operator/templates/stop-complete.mjml.j2 similarity index 100% rename from notifier/operator/templates/stop-complete.html.j2 rename to notifier/operator/templates/stop-complete.mjml.j2 diff --git a/notifier/operator/templates/stop-failed.html.j2 b/notifier/operator/templates/stop-failed.mjml.j2 similarity index 100% rename from notifier/operator/templates/stop-failed.html.j2 rename to notifier/operator/templates/stop-failed.mjml.j2 diff --git a/notifier/operator/templates/stop-scheduled.html.j2 b/notifier/operator/templates/stop-scheduled.mjml.j2 similarity index 100% rename from notifier/operator/templates/stop-scheduled.html.j2 rename to notifier/operator/templates/stop-scheduled.mjml.j2 From 72c362b2cda9e9aef7a13278a41f58f1c740c42f Mon Sep 17 00:00:00 2001 From: Kirill Malgichev Date: Tue, 8 Nov 2022 07:52:20 -0500 Subject: [PATCH 5/6] Updating odo devfile to use assemble script --- notifier/devfile.yaml | 3 ++- notifier/operator/templates/service-ready.mjml.j2 | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/notifier/devfile.yaml b/notifier/devfile.yaml index bb4d6eabf..87892f25c 100644 --- a/notifier/devfile.yaml +++ b/notifier/devfile.yaml @@ -1,6 +1,7 @@ commands: - exec: - commandLine: /usr/libexec/s2i/assemble + commandLine: >- + rm -rf /tmp/src && cp /tmp/projects -r /tmp/src && /tmp/src/.s2i/bin/assemble component: s2i-builder group: isDefault: true diff --git a/notifier/operator/templates/service-ready.mjml.j2 b/notifier/operator/templates/service-ready.mjml.j2 index 736e2d9e6..4f256505a 100644 --- a/notifier/operator/templates/service-ready.mjml.j2 +++ b/notifier/operator/templates/service-ready.mjml.j2 @@ -11,7 +11,7 @@

Always refer to the instructions to understand how to properly access and navigate your environment.

-

NOTICE:
+

NOTICE:
Your environment will be stopped in {{ stop_timedelta_humanized }} at {{ stop_timestamp }}.
Your environment will expire and be deleted in {{ retirement_timedelta_humanized }} at {{ retirement_timestamp }}.

From 164ccd9d6571e7ce4eea603084fd785f60f9eb7b Mon Sep 17 00:00:00 2001 From: Kirill Malgichev Date: Wed, 9 Nov 2022 19:47:26 -0500 Subject: [PATCH 6/6] Moving mj-column and mj-text from parent template to child --- notifier/operator/templates/base.mjml.j2 | 6 +- .../templates/provision-failed.mjml.j2 | 26 +++-- .../templates/provision-started.mjml.j2 | 19 ++-- .../templates/retirement-scheduled.mjml.j2 | 18 ++-- .../templates/service-deleted.mjml.j2 | 21 ++-- .../operator/templates/service-ready.mjml.j2 | 101 ++++++++++-------- .../operator/templates/start-complete.mjml.j2 | 26 +++-- .../operator/templates/start-failed.mjml.j2 | 26 +++-- .../operator/templates/stop-complete.mjml.j2 | 16 ++- .../operator/templates/stop-failed.mjml.j2 | 26 +++-- .../operator/templates/stop-scheduled.mjml.j2 | 18 ++-- 11 files changed, 185 insertions(+), 118 deletions(-) diff --git a/notifier/operator/templates/base.mjml.j2 b/notifier/operator/templates/base.mjml.j2 index b7b6bbae9..f4c84ddec 100644 --- a/notifier/operator/templates/base.mjml.j2 +++ b/notifier/operator/templates/base.mjml.j2 @@ -37,11 +37,7 @@ - - - {% block content %}{% endblock %} - - + {% block content %}{% endblock %} diff --git a/notifier/operator/templates/provision-failed.mjml.j2 b/notifier/operator/templates/provision-failed.mjml.j2 index f38e51c01..bfabc02bb 100644 --- a/notifier/operator/templates/provision-failed.mjml.j2 +++ b/notifier/operator/templates/provision-failed.mjml.j2 @@ -1,15 +1,21 @@ {% extends "base.mjml.j2" %} {% block content %} -

Your {{ catalog_namespace.display_name }} service, {{ service_display_name }}, has failed to provision. -{% if have_attachments %} -Please see attached Ansible log. -{% endif %} -

- -{% if service_url %} -

You may manage your {{ catalog_namespace.display_name }} service at:
-{{ service_url }}.

-{% endif %} + + + +

Your {{ catalog_namespace.display_name }} service, {{ service_display_name }}, has failed to provision. + {% if have_attachments %} + Please see attached Ansible log. + {% endif %} +

+ + {% if service_url %} +

You may manage your {{ catalog_namespace.display_name }} service at:
+ {{ service_url }}.

+ {% endif %} + +
+
{% endblock content %} \ No newline at end of file diff --git a/notifier/operator/templates/provision-started.mjml.j2 b/notifier/operator/templates/provision-started.mjml.j2 index c0d0509e8..027b28379 100644 --- a/notifier/operator/templates/provision-started.mjml.j2 +++ b/notifier/operator/templates/provision-started.mjml.j2 @@ -1,15 +1,20 @@ {% extends "base.mjml.j2" %} {% block content %} -

Thank you for ordering {{ catalog_item.display_name }}.

+ + -

Provisioning has started on your {{ catalog_namespace.display_name }} service, {{ service_display_name }}.

+

Thank you for ordering {{ catalog_item.display_name }}. Provisioning has started on + your {{ catalog_namespace.display_name }} service, {{ service_display_name }}.

-

You will receive more information via email when the provisioning completes in about {{ provision_time_estimate }}. +

You will receive more information via email when the provisioning completes in about {{ provision_time_estimate }}.

-{% if service_url %} -

You may manage your {{ catalog_namespace.display_name }} service at:
-{{ service_url }}.

-{% endif %} + {% if service_url %} +

You may manage your {{ catalog_namespace.display_name }} service at:
+ {{ service_url }}.

+ {% endif %} + +
+
{% endblock content %} \ No newline at end of file diff --git a/notifier/operator/templates/retirement-scheduled.mjml.j2 b/notifier/operator/templates/retirement-scheduled.mjml.j2 index 8f10f9a8c..f7eda84bf 100644 --- a/notifier/operator/templates/retirement-scheduled.mjml.j2 +++ b/notifier/operator/templates/retirement-scheduled.mjml.j2 @@ -1,12 +1,18 @@ {% extends "base.mjml.j2" %} {% block content %} -

Reminder:
-Your environment will expire and be deleted in {{ retirement_timedelta_humanized }} at {{ retirement_timestamp }}.

+ + -{% if service_url %} -

You may manage your {{ catalog_namespace.display_name }} service at:
-{{ service_url }}.

-{% endif %} +

Reminder:
+ Your environment will expire and be deleted in {{ retirement_timedelta_humanized }} at {{ retirement_timestamp }}.

+ + {% if service_url %} +

You may manage your {{ catalog_namespace.display_name }} service at:
+ {{ service_url }}.

+ {% endif %} + +
+
{% endblock content %} \ No newline at end of file diff --git a/notifier/operator/templates/service-deleted.mjml.j2 b/notifier/operator/templates/service-deleted.mjml.j2 index e7c99d0ff..fe4ed5e4c 100644 --- a/notifier/operator/templates/service-deleted.mjml.j2 +++ b/notifier/operator/templates/service-deleted.mjml.j2 @@ -1,14 +1,21 @@ {% extends "base.mjml.j2" %} {% block content %} -

Your {{ catalog_namespace.display_name }} service {{ service_display_name }} has been deleted.

+ + -

To conserve resources data on these systems is not archived and cannot be retrieved. -We apologize for any inconvenience this may cause. -Thank you for using {{ catalog_namespace.display_name }}.

+

Your {{ catalog_namespace.display_name }} service {{ service_display_name }} has been deleted.

-{% if survey_link %} -

We would love your feedback on your demo/lab, please fill out our short Survey (click here) to help us improve your experience.

-{% endif %} +

To conserve resources data on these systems is not archived and cannot be retrieved. + We apologize for any inconvenience this may cause.

+ +

Thank you for using {{ catalog_namespace.display_name }}.

+ + {% if survey_link %} +

We would love your feedback on your demo/lab, please fill out our short Survey (click here) to help us improve your experience.

+ {% endif %} + +
+
{% endblock content %} \ No newline at end of file diff --git a/notifier/operator/templates/service-ready.mjml.j2 b/notifier/operator/templates/service-ready.mjml.j2 index 4f256505a..3150fc72b 100644 --- a/notifier/operator/templates/service-ready.mjml.j2 +++ b/notifier/operator/templates/service-ready.mjml.j2 @@ -1,49 +1,62 @@ {% extends "base.mjml.j2" %} {% block content %} -

Thank you for ordering {{ catalog_item.display_name }}.

- -

Your {{ catalog_namespace.display_name }} service {{ service_display_name }} is ready.

- -

Please refer to the instructions for next steps and how to access your environment.

- -

Troubleshooting and Access issues:

- -

Always refer to the instructions to understand how to properly access and navigate your environment.

- -

NOTICE:
-Your environment will be stopped in {{ stop_timedelta_humanized }} at {{ stop_timestamp }}.
-Your environment will expire and be deleted in {{ retirement_timedelta_humanized }} at {{ retirement_timestamp }}.

- -

In order to conserve resources, we cannot archive or restore any data in this environment. -All data will be lost upon expiration.

- -{% if provision_messages is defined or provision_data is defined %} -

Here is some important information about your environment:

- -{% if provision_messages_html is defined %} -{{ provision_messages_html }} -{% endif %} - -{% if provision_data is defined %} -
-{% for k, v in provision_data.items() | sort %} -{% if k != 'users' %} -
{{ k | escape }}
-{% if v is string or v is not iterable %} -
{{ v | escape }}
-{% else %} -
{{ v | to_yaml | escape }}
-{% endif %} -{% endif %} -{% endfor %} -
-{% endif %} -{% endif %} - -{% if service_url %} -

You may manage your {{ catalog_namespace.display_name }} service at:
-{{ service_url }}.

-{% endif %} + + +

Thank you for ordering {{ catalog_item.display_name }}.

+ +

Your {{ catalog_namespace.display_name }} service {{ service_display_name }} is ready.

+ +

Always refer to the instructions to understand how to properly access and navigate your environment.

+ +

+ NOTICE:
+

    +
  • Your environment will be stopped in {{ stop_timedelta_humanized }} at {{ stop_timestamp }}.
  • +
  • Your environment will expire and be deleted in {{ retirement_timedelta_humanized }} at {{ retirement_timestamp }}.
  • +
+ In order to conserve resources, we cannot archive or restore any data in this environment. + All data will be lost upon expiration. +

+ + {% if service_url %} +

You may manage your {{ catalog_namespace.display_name }} service at:
+ {{ service_url }}.

+ {% endif %} + +
+ + {% if provision_messages is defined or provision_data is defined %} + + + Some important information about your environment + + + {% if provision_messages_html is defined %} + + {{ provision_messages_html }} + + {% endif %} + + {% if provision_data is defined %} + +
+ {% for k, v in provision_data.items() | sort %} + {% if k != 'users' %} +
{{ k | escape }}:
+ {% if v is string or v is not iterable %} +
{{ v | escape }}
+ {% else %} +
{{ v | to_yaml | escape }}
+ {% endif %} + {% endif %} + {% endfor %} +
+
+ {% endif %} + + + {% endif %} +
{% endblock content %} \ No newline at end of file diff --git a/notifier/operator/templates/start-complete.mjml.j2 b/notifier/operator/templates/start-complete.mjml.j2 index efb7cdf89..7166929b8 100644 --- a/notifier/operator/templates/start-complete.mjml.j2 +++ b/notifier/operator/templates/start-complete.mjml.j2 @@ -1,15 +1,25 @@ {% extends "base.mjml.j2" %} {% block content %} -

Your {{ catalog_namespace.display_name }} service {{ service_display_name }} has started.

+ + -

NOTICE:
-Your environment will be stopped in {{ stop_timedelta_humanized }} at {{ stop_timestamp }}.
-Your environment will expire and be deleted in {{ retirement_timedelta_humanized }} at {{ retirement_timestamp }}.

+

Your {{ catalog_namespace.display_name }} service {{ service_display_name }} has started.

-{% if service_url %} -

You may manage your {{ catalog_namespace.display_name }} service at:
-{{ service_url }}.

-{% endif %} +

+ NOTICE:
+

    +
  • Your environment will be stopped in {{ stop_timedelta_humanized }} at {{ stop_timestamp }}.
  • +
  • Your environment will expire and be deleted in {{ retirement_timedelta_humanized }} at {{ retirement_timestamp }}.
  • +
+

+ + {% if service_url %} +

You may manage your {{ catalog_namespace.display_name }} service at:
+ {{ service_url }}.

+ {% endif %} + +
+
{% endblock content %} \ No newline at end of file diff --git a/notifier/operator/templates/start-failed.mjml.j2 b/notifier/operator/templates/start-failed.mjml.j2 index 9b5c18704..204de93c0 100644 --- a/notifier/operator/templates/start-failed.mjml.j2 +++ b/notifier/operator/templates/start-failed.mjml.j2 @@ -1,15 +1,21 @@ {% extends "base.mjml.j2" %} {% block content %} -

Your {{ catalog_namespace.display_name }} service {{ service_display_name }} failed to start. -{% if have_attachments %} -Please see attached Ansible log. -{% endif %} -

- -{% if service_url %} -

You may manage your {{ catalog_namespace.display_name }} service at:
-{{ service_url }}.

-{% endif %} + + + +

Your {{ catalog_namespace.display_name }} service {{ service_display_name }} failed to start. + {% if have_attachments %} + Please see attached Ansible log. + {% endif %} +

+ + {% if service_url %} +

You may manage your {{ catalog_namespace.display_name }} service at:
+ {{ service_url }}.

+ {% endif %} + +
+
{% endblock content %} \ No newline at end of file diff --git a/notifier/operator/templates/stop-complete.mjml.j2 b/notifier/operator/templates/stop-complete.mjml.j2 index 593ffea90..1ee35a8d3 100644 --- a/notifier/operator/templates/stop-complete.mjml.j2 +++ b/notifier/operator/templates/stop-complete.mjml.j2 @@ -1,11 +1,17 @@ {% extends "base.mjml.j2" %} {% block content %} -

Your {{ catalog_namespace.display_name }} service {{ service_display_name }} has stopped.

+ + -{% if service_url %} -

You may manage your {{ catalog_namespace.display_name }} service at:
-{{ service_url }}.

-{% endif %} +

Your {{ catalog_namespace.display_name }} service {{ service_display_name }} has stopped.

+ + {% if service_url %} +

You may manage your {{ catalog_namespace.display_name }} service at:
+ {{ service_url }}.

+ {% endif %} + +
+
{% endblock content %} \ No newline at end of file diff --git a/notifier/operator/templates/stop-failed.mjml.j2 b/notifier/operator/templates/stop-failed.mjml.j2 index ed50e9a64..d335b7119 100644 --- a/notifier/operator/templates/stop-failed.mjml.j2 +++ b/notifier/operator/templates/stop-failed.mjml.j2 @@ -1,15 +1,21 @@ {% extends "base.mjml.j2" %} {% block content %} -

Your {{ catalog_namespace.display_name }} service {{ service_display_name }} failed to stop. -{% if have_attachments %} -Please see attached Ansible log. -{% endif %} -

- -{% if service_url %} -

You may manage your {{ catalog_namespace.display_name }} service at:
-{{ service_url }}.

-{% endif %} + + + +

Your {{ catalog_namespace.display_name }} service {{ service_display_name }} failed to stop. + {% if have_attachments %} + Please see attached Ansible log. + {% endif %} +

+ + {% if service_url %} +

You may manage your {{ catalog_namespace.display_name }} service at:
+ {{ service_url }}.

+ {% endif %} + +
+
{% endblock content %} \ No newline at end of file diff --git a/notifier/operator/templates/stop-scheduled.mjml.j2 b/notifier/operator/templates/stop-scheduled.mjml.j2 index 5d61128b1..15a8ec410 100644 --- a/notifier/operator/templates/stop-scheduled.mjml.j2 +++ b/notifier/operator/templates/stop-scheduled.mjml.j2 @@ -1,12 +1,18 @@ {% extends "base.mjml.j2" %} {% block content %} -

Reminder:
-Your environment will be stopped in {{ stop_timedelta_humanized }} at {{ stop_timestamp }}.

+ + -{% if service_url %} -

You may manage your {{ catalog_namespace.display_name }} service at:
-{{ service_url }}.

-{% endif %} +

Reminder:
+ Your environment will be stopped in {{ stop_timedelta_humanized }} at {{ stop_timestamp }}.

+ + {% if service_url %} +

You may manage your {{ catalog_namespace.display_name }} service at:
+ {{ service_url }}.

+ {% endif %} + +
+
{% endblock content %} \ No newline at end of file