Ver código fonte

send message when bubble launches

tags/v0.9.14
Jonathan Cobb 4 anos atrás
pai
commit
0935d6b0a6
6 arquivos alterados com 35 adições e 0 exclusões
  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 Ver arquivo

@@ -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 Ver arquivo

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

+ 1
- 0
bubble-server/src/main/resources/message_templates/en_US/email/notice/start/network/fromName.hbs Ver arquivo

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

+ 16
- 0
bubble-server/src/main/resources/message_templates/en_US/email/notice/start/network/message.hbs Ver arquivo

@@ -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 Ver arquivo

@@ -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 Ver arquivo

@@ -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

Carregando…
Cancelar
Salvar