Skip to content

Commit 473c632

Browse files
ranakan19kyetterMatousJobanekmfranciscrajivnathan
authored
Notification improvements (codeready-toolchain#1138)
* proposed text updates * removing link * fix tests for sandbox notification changes * capital H, add comma, remove be * Update deploy/templates/notificationtemplates/sandbox/idlertriggered/notification.html Co-authored-by: Kathryn Yetter <46502874+kyetter@users.noreply.github.com> * Update deploy/templates/notificationtemplates/sandbox/idlertriggered/notification.html Co-authored-by: Kathryn Yetter <46502874+kyetter@users.noreply.github.com> * add feedback line with email in idler and provisioned, fix identation in idler * fix notification body test after idler changes * Update deploy/templates/notificationtemplates/sandbox/userdeactivating/notification.html Co-authored-by: Matous Jobanek <mjobanek@redhat.com> * Update deploy/templates/notificationtemplates/sandbox/idlertriggered/notification.html Co-authored-by: Rajiv Senthilnathan <rajivnathan@gmail.com> * Update deploy/templates/notificationtemplates/sandbox/idlertriggered/notification.html Co-authored-by: Rajiv Senthilnathan <rajivnathan@gmail.com> * fix test to include new changes in idler template --------- Co-authored-by: kyetter <kyetter@redhat.com> Co-authored-by: Matous Jobanek <mjobanek@redhat.com> Co-authored-by: Kathryn Yetter <46502874+kyetter@users.noreply.github.com> Co-authored-by: Francisc Munteanu <fmuntean@redhat.com> Co-authored-by: Rajiv Senthilnathan <rajivnathan@gmail.com> Co-authored-by: Alexey Kazakov <alkazako@redhat.com>
1 parent 262efc3 commit 473c632

File tree

8 files changed

+40
-42
lines changed

8 files changed

+40
-42
lines changed

deploy/templates/notificationtemplates/sandbox/idlertriggered/notification.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,21 @@
4141
>
4242

4343
<p>
44-
You are receiving this email because one or more of your workloads in the Developer Sandbox for
45-
Red Hat OpenShift has been running for 12 hours.
44+
You are receiving this email because one or more of your workloads in the Developer Sandbox has been running for 12 hours and has been automatically idled.
4645
</p>
4746

4847
<p>
49-
In accordance with the usage terms of Developer Sandbox, your workload {{.AppType}} {{.AppName}} has been scaled down. You can restart your workload(s) or scale up the number of instances from the
50-
Developer Sandbox User Interface.
48+
After 12 hours, our system idles running workloads. No further action is required by you. You can <a href="https://developers.redhat.com/learn/openshift/revive-inactive-openshift-pods-scaled-zero">restart your workload,</a> {{.AppType}} {{.AppName}}
49+
when you're ready to continue exploring on the Developer Sandbox.
5150
</p>
5251

5352
<p>
54-
Please reach us at {{.ReplyTo}} with any questions.
53+
To share feedback or ask questions, reach out to us at {{.ReplyTo}}.
5554
</p>
5655

5756
<p>
5857
Thanks,<br />
59-
The Developer Sandbox for Red Hat OpenShift team
58+
The Developer Sandbox team
6059
</p>
6160
</div>
6261
</body>

deploy/templates/notificationtemplates/sandbox/userdeactivated/notification.html

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<title>
8-
Notice: Your Developer Sandbox for Red Hat OpenShift account is deactivated.
8+
Notice: Your Developer Sandbox account is deactivated.
99
</title>
1010
<style>
1111
a:hover {
@@ -41,23 +41,21 @@
4141
>
4242

4343
<p>
44-
You are receiving this email because you have a Developer Sandbox for Red Hat OpenShift
45-
account associated with {{.UserEmail}}.
44+
You are receiving this email because the Developer Sandbox account associated with {{.UserEmail}} is now deactivated.
45+
All your data on Developer Sandbox has been deleted. You can start a new trial at {{.RegistrationURL}}, whenever you would like.
4646
</p>
4747

4848
<p>
49-
Your account is now deactivated and all your data on Developer Sandbox for Red Hat OpenShift has been deleted.
50-
You can request new access by signing up again at {{.RegistrationURL}}
49+
To learn more about how Red Hat products, support and training could benefit your organization, <a href="https://www.redhat.com/en/contact">request a callback.</a>
5150
</p>
5251

5352
<p>
54-
Join the Dev Sandbox community to share your feedback, request extension for your Sandbox environment from the #dev-sandbox channel on DevNation slack workspace.
55-
You can join using this <a href="https://join.slack.com/t/rhdevnation/shared_invite/zt-27vfuywt3-TC7QuckHfxHatLj6Abk2_A">invite</a>. You can also reach us via email at {{.ReplyTo}} with any questions.
53+
To share feedback about your experience with the Developer Sandbox, email us at {{.ReplyTo}}.
5654
</p>
5755

5856
<p>
5957
Thanks,<br />
60-
The Developer Sandbox for Red Hat OpenShift team
58+
The Developer Sandbox team
6159
</p>
6260
</div>
6361
</body>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Notice: Your Developer Sandbox for Red Hat OpenShift account is deactivated
1+
Notice: Your Developer Sandbox account is deactivated

deploy/templates/notificationtemplates/sandbox/userdeactivating/notification.html

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<title>
8-
Notice: Your Developer Sandbox for Red Hat OpenShift account will be deactivated soon.
8+
Notice: Your Developer Sandbox account will be deactivated soon.
99
</title>
1010
<style>
1111
a:hover {
@@ -41,23 +41,21 @@
4141
>
4242

4343
<p>
44-
You are receiving this email because your email account {{.UserEmail}} was provisioned to Developer Sandbox for
45-
Red Hat OpenShift.
44+
The Developer Sandbox account associated with {{.UserEmail}} will expire in 3 days.
4645
</p>
4746

4847
<p>
49-
Your sandbox will expire in 3 days. We recommend you save your work as all data in your sandbox will be
50-
deleted upon expiry. After deactivation, you can sign up again at any time for new access at {{.RegistrationURL}}.
48+
We recommend you <a href="https://developers.redhat.com/learn/openshift/export-your-application-sandbox-red-hat-openshift-service-aws">export your work</a>
49+
as all data in your sandbox will be deleted. After deactivation, you can sign up again at any time for new access at {{.RegistrationURL}}.
5150
</p>
5251

5352
<p>
54-
Join the Dev Sandbox community to share your feedback, request extension for your Sandbox environment from the #dev-sandbox channel on DevNation slack workspace.
55-
You can join using this <a href="https://join.slack.com/t/rhdevnation/shared_invite/zt-27vfuywt3-TC7QuckHfxHatLj6Abk2_A">invite</a>. You can also reach us via email at {{.ReplyTo}} with any questions.
53+
To share feedback about your experience with the Developer Sandbox, email us at {{.ReplyTo}}.
5654
</p>
5755

5856
<p>
5957
Thanks,<br />
60-
The Developer Sandbox for Red Hat OpenShift team
58+
The Developer Sandbox team
6159
</p>
6260
</div>
6361
</body>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Notice: Your Developer Sandbox for Red Hat OpenShift account will be deactivated soon
1+
Notice: Your Developer Sandbox account will be deactivated soon

deploy/templates/notificationtemplates/sandbox/userprovisioned/notification.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<title>
8-
Notice: Your Developer Sandbox for Red Hat OpenShift account is provisioned.
8+
Notice: Your Developer Sandbox account is provisioned.
99
</title>
1010
<style>
1111
a:hover {
@@ -41,27 +41,30 @@
4141
>
4242

4343
<p>
44-
You are receiving this email because you have a Developer Sandbox for Red Hat OpenShift
45-
account associated with {{.UserEmail}}.
44+
You are receiving this email because the Developer Sandbox account associated with {{.UserEmail}}
45+
is now provisioned and ready to use. Your account will be active for {{.DeactivationTimeoutDays}} days at no cost to you.
4646
</p>
4747

4848
<p>
49-
Your account has been provisioned and is ready to use. Your account will be active for {{.DeactivationTimeoutDays}} days.
50-
At the end of the active period, your access will be deactivated and all your data on the Developer Sandbox will be deleted.
49+
At the end of the active period, your access will be terminated and all your data on the Developer Sandbox will be deleted.
50+
We will send you an email 3 days before deactivation with instructions to export your work, so you will not lose your progress.
5151
</p>
5252

5353
<p>
5454
Please log in to {{.RegistrationURL}} to begin using your account.
5555
</p>
5656

5757
<p>
58-
Join the Dev Sandbox community and engage with the Red Hat team from the #dev-sandbox channel on DevNation slack workspace.
59-
You can join using this <a href="https://join.slack.com/t/rhdevnation/shared_invite/zt-27vfuywt3-TC7QuckHfxHatLj6Abk2_A">invite</a>. You can also reach us via email at {{.ReplyTo}} with any questions.
58+
Unsure of where to start? Check out our <a href="https://developers.redhat.com/developer-sandbox/activities">Developer Sandbox activities</a> for some ideas!
59+
</p>
60+
61+
<p>
62+
To share feedback or ask questions, reach out to us at {{.ReplyTo}}.
6063
</p>
6164

6265
<p>
6366
Thanks,<br />
64-
The Developer Sandbox for Red Hat OpenShift team
67+
The Developer Sandbox team
6568
</p>
6669
</div>
6770
</body>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Notice: Your Developer Sandbox for Red Hat OpenShift account is provisioned
1+
Notice: Your Developer Sandbox account is provisioned

pkg/templates/notificationtemplates/notification_generator_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ func TestGetNotificationTemplate(t *testing.T) {
1919
// then
2020
require.NoError(t, err)
2121
require.NotNil(t, template)
22-
assert.Equal(t, "Notice: Your Developer Sandbox for Red Hat OpenShift account is deactivated", template.Subject)
23-
assert.Contains(t, template.Content, "Your account is now deactivated and all your data on Developer Sandbox for Red Hat OpenShift has been deleted.")
22+
assert.Equal(t, "Notice: Your Developer Sandbox account is deactivated", template.Subject)
23+
assert.Contains(t, template.Content, "All your data on Developer Sandbox has been deleted. You can start a new trial")
2424
})
2525
t.Run("get userprovisioned notification template", func(t *testing.T) {
2626
// when
@@ -29,8 +29,8 @@ func TestGetNotificationTemplate(t *testing.T) {
2929
// then
3030
require.NoError(t, err)
3131
require.NotNil(t, template)
32-
assert.Equal(t, "Notice: Your Developer Sandbox for Red Hat OpenShift account is provisioned", template.Subject)
33-
assert.Contains(t, template.Content, "Your account has been provisioned and is ready to use. Your account will be active for")
32+
assert.Equal(t, "Notice: Your Developer Sandbox account is provisioned", template.Subject)
33+
assert.Contains(t, template.Content, "is now provisioned and ready to use. Your account will be active for")
3434
})
3535
t.Run("ensure cache is used", func(t *testing.T) {
3636
// when
@@ -42,8 +42,8 @@ func TestGetNotificationTemplate(t *testing.T) {
4242
require.NoError(t, err)
4343
require.NotNil(t, template)
4444
require.NotEmpty(t, template["userprovisioned"])
45-
assert.Equal(t, "Notice: Your Developer Sandbox for Red Hat OpenShift account is provisioned", template["userprovisioned"].Subject)
46-
assert.Contains(t, template["userprovisioned"].Content, "Your account has been provisioned and is ready to use. Your account will be active for")
45+
assert.Equal(t, "Notice: Your Developer Sandbox account is provisioned", template["userprovisioned"].Subject)
46+
assert.Contains(t, template["userprovisioned"].Content, "is now provisioned and ready to use. Your account will be active for")
4747
assert.Equal(t, UserProvisionedTemplateName, template["userprovisioned"].Name)
4848
})
4949
t.Run("get userdeactivating notification template", func(t *testing.T) {
@@ -53,8 +53,8 @@ func TestGetNotificationTemplate(t *testing.T) {
5353
// then
5454
require.NoError(t, err)
5555
require.NotNil(t, template)
56-
assert.Equal(t, "Notice: Your Developer Sandbox for Red Hat OpenShift account will be deactivated soon", template.Subject)
57-
assert.Contains(t, template.Content, "Your sandbox will expire in 3 days. We recommend you save your work as all data in your sandbox will be\n deleted upon expiry.")
56+
assert.Equal(t, "Notice: Your Developer Sandbox account will be deactivated soon", template.Subject)
57+
assert.Contains(t, template.Content, "The Developer Sandbox account associated with {{.UserEmail}} will expire in 3 days.")
5858

5959
})
6060

@@ -66,7 +66,7 @@ func TestGetNotificationTemplate(t *testing.T) {
6666
require.NoError(t, err)
6767
require.NotNil(t, template)
6868
assert.Equal(t, "Notice: Your running workload in namespace {{.Namespace}} has been idled", template.Subject)
69-
assert.Contains(t, template.Content, "In accordance with the usage terms of Developer Sandbox, your workload {{.AppType}} {{.AppName}} has been scaled down.")
69+
assert.Contains(t, template.Content, "You are receiving this email because one or more of your workloads in the Developer Sandbox has been running for 12 hours and has been automatically idled.")
7070

7171
})
7272
})

0 commit comments

Comments
 (0)