Parcourir la source

send message when bubble launches

tags/v0.9.14
Jonathan Cobb il y a 4 ans
Parent
révision
0935d6b0a6
6 fichiers modifiés avec 35 ajouts et 0 suppressions
  1. +15
    -0
      bubble-server/src/main/java/bubble/service/cloud/StandardNetworkService.java
  2. +1
    -0
      bubble-server/src/main/resources/message_templates/en_US/email/notice/start/network/fromEmail.hbs
  3. +1
    -0
      bubble-server/src/main/resources/message_templates/en_US/email/notice/start/network/fromName.hbs
  4. +16
    -0
      bubble-server/src/main/resources/message_templates/en_US/email/notice/start/network/message.hbs
  5. +1
    -0
      bubble-server/src/main/resources/message_templates/en_US/email/notice/start/network/subject.hbs
  6. +1
    -0
      bubble-server/src/main/resources/message_templates/en_US/sms/notice/start/network/message.hbs

+ 15
- 0
bubble-server/src/main/java/bubble/service/cloud/StandardNetworkService.java Voir le fichier

@@ -10,12 +10,17 @@ import bubble.cloud.dns.DnsServiceDriver;
import bubble.dao.account.AccountDAO;
import bubble.dao.account.AccountPolicyDAO;
import bubble.dao.account.AccountSshKeyDAO;
import bubble.dao.account.message.AccountMessageDAO;
import bubble.dao.bill.AccountPlanDAO;
import bubble.dao.bill.BubblePlanDAO;
import bubble.dao.cloud.*;
import bubble.model.account.Account;
import bubble.model.account.AccountPolicy;
import bubble.model.account.AccountSshKey;
import bubble.model.account.message.AccountAction;
import bubble.model.account.message.AccountMessage;
import bubble.model.account.message.AccountMessageType;
import bubble.model.account.message.ActionTarget;
import bubble.model.bill.AccountPlan;
import bubble.model.bill.BubblePlan;
import bubble.model.cloud.*;
@@ -109,6 +114,7 @@ public class StandardNetworkService implements NetworkService {
@Autowired private AnsibleRoleDAO roleDAO;
@Autowired private AccountPlanDAO accountPlanDAO;
@Autowired private AccountPolicyDAO policyDAO;
@Autowired private AccountMessageDAO accountMessageDAO;
@Autowired private BubblePlanDAO planDAO;

@Autowired private NotificationService notificationService;
@@ -566,6 +572,15 @@ public class StandardNetworkService implements NetworkService {
.setRegion(cloudAndRegion.getRegion().getInternalName())
.setLock(lock);

// notify user that new bubble is launching
accountMessageDAO.create(new AccountMessage()
.setAccount(accountUuid)
.setNetwork(network.getUuid())
.setName(network.getUuid())
.setMessageType(AccountMessageType.notice)
.setTarget(ActionTarget.network)
.setAction(AccountAction.start));

// start background process to create node
backgroundNewNode(newNodeRequest, lock);



+ 1
- 0
bubble-server/src/main/resources/message_templates/en_US/email/notice/start/network/fromEmail.hbs Voir le fichier

@@ -0,0 +1 @@
no-reply@{{network.networkDomain}}

+ 1
- 0
bubble-server/src/main/resources/message_templates/en_US/email/notice/start/network/fromName.hbs Voir le fichier

@@ -0,0 +1 @@
{{network.networkDomain}} System Account

+ 16
- 0
bubble-server/src/main/resources/message_templates/en_US/email/notice/start/network/message.hbs Voir le fichier

@@ -0,0 +1,16 @@
Hello {{account.name}},

Congratulations, your new Bubble is launching. It typically takes about 20 minutes to set itself up.

When your Bubble has finished its self-setup process, it will send you a message with a link to unlock it.

You'll need to install the Wireguard application on each device that will connect to your Bubble.

While you're waiting for your Bubble to be ready, go ahead and install the Wireguard application on each
device you will connect to your Bubble.

Instruction for installing Wireguard can be found here: https://bubblev.com/get-ready

If you have any difficulties installing Wireguard or using your new Bubble, please contact support@bubblev.com

Thank you for using Bubble!

+ 1
- 0
bubble-server/src/main/resources/message_templates/en_US/email/notice/start/network/subject.hbs Voir le fichier

@@ -0,0 +1 @@
{{network.networkDomain}}: Your new Bubble is launching

+ 1
- 0
bubble-server/src/main/resources/message_templates/en_US/sms/notice/start/network/message.hbs Voir le fichier

@@ -0,0 +1 @@
Your new Bubble is launching! This usually takes about 20 minutes. While you wait, get your devices ready: https://bubblev.com/get-ready

Chargement…
Annuler
Enregistrer