diff --git a/bubble-server/src/main/java/bubble/dao/cloud/BubbleDomainDAO.java b/bubble-server/src/main/java/bubble/dao/cloud/BubbleDomainDAO.java index 00eb1bcb..faa8a1bd 100644 --- a/bubble-server/src/main/java/bubble/dao/cloud/BubbleDomainDAO.java +++ b/bubble-server/src/main/java/bubble/dao/cloud/BubbleDomainDAO.java @@ -11,6 +11,7 @@ import bubble.model.cloud.BubbleDomain; import bubble.model.cloud.CloudService; import bubble.server.BubbleConfiguration; import lombok.extern.slf4j.Slf4j; +import org.hibernate.criterion.Order; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; @@ -27,6 +28,8 @@ public class BubbleDomainDAO extends AccountOwnedTemplateDAO { @Autowired private AccountDAO accountDAO; @Autowired private BubbleConfiguration configuration; + @Override public Order getDefaultSortOrder() { return PRIORITY_ASC; } + @Override public Object preCreate(BubbleDomain domain) { final String[] roles = domain.getRoles(); diff --git a/bubble-server/src/main/java/bubble/model/cloud/BubbleDomain.java b/bubble-server/src/main/java/bubble/model/cloud/BubbleDomain.java index 516ce0e5..b38500e5 100644 --- a/bubble-server/src/main/java/bubble/model/cloud/BubbleDomain.java +++ b/bubble-server/src/main/java/bubble/model/cloud/BubbleDomain.java @@ -12,6 +12,7 @@ import lombok.NoArgsConstructor; import lombok.Setter; import lombok.experimental.Accessors; import org.cobbzilla.util.collection.ArrayUtil; +import org.cobbzilla.util.collection.HasPriority; import org.cobbzilla.util.dns.DnsRecordMatch; import org.cobbzilla.wizard.model.Identifiable; import org.cobbzilla.wizard.model.IdentifiableBase; @@ -53,9 +54,9 @@ import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENC_PAD; @ECIndex(of={"account", "template", "enabled"}), @ECIndex(of={"template", "enabled"}) }) -public class BubbleDomain extends IdentifiableBase implements AccountTemplate { +public class BubbleDomain extends IdentifiableBase implements AccountTemplate, HasPriority { - public static final String[] UPDATE_FIELDS = {"description", "template", "enabled", "publicDns"}; + public static final String[] UPDATE_FIELDS = {"description", "template", "enabled", "priority", "publicDns"}; public static final String[] CREATE_FIELDS = ArrayUtil.append(UPDATE_FIELDS, "name", "rolesJson"); @@ -95,12 +96,15 @@ public class BubbleDomain extends IdentifiableBase implements AccountTemplate { @ECIndex @Column(nullable=false) @Getter @Setter private Boolean enabled = true; - @ECSearchable @ECField(index=60, type=EntityFieldType.reference) + @ECSearchable @ECField(index=60) @Column(nullable=false) + @ECIndex @Getter @Setter private Integer priority = 1; + + @ECSearchable @ECField(index=70, type=EntityFieldType.reference) @ECIndex @Column(updatable=false, length=UUID_MAXLEN) @Getter @Setter private String delegated; public boolean delegated() { return delegated != null; } - @ECSearchable @ECForeignKey(entity=CloudService.class) @ECField(index=70) + @ECSearchable @ECForeignKey(entity=CloudService.class) @ECField(index=80) @Column(nullable=false, length=UUID_MAXLEN) @Getter @Setter private String publicDns; diff --git a/bubble-server/src/main/resources/message_templates/en_US/server/post_auth/ResourceMessages.properties b/bubble-server/src/main/resources/message_templates/en_US/server/post_auth/ResourceMessages.properties index f03cd72a..b0c489c3 100644 --- a/bubble-server/src/main/resources/message_templates/en_US/server/post_auth/ResourceMessages.properties +++ b/bubble-server/src/main/resources/message_templates/en_US/server/post_auth/ResourceMessages.properties @@ -203,7 +203,7 @@ msg_km_distance_away=km away message_auto_detecting=Auto-Detecting... (refresh page if this gets stuck) button_label_customize=Customize button_label_use_default=Use Default -button_label_create_new_network=Launch Bubble +button_label_create_new_network=Launch Your Bubble! message_plan_fork_apps=All app templates will be copied to fork message_plan_node_apps=Your Bubble will include these apps: @@ -271,10 +271,15 @@ payment_type_credit_applied=credit applied payment_type_refund=refund label_promotion_FirstMonthFree=First Month Free +label_promotion_FirstMonthFree_description=No charge for the first month of your plan! label_promotion_ReferralMonthFree=Referral Bonus +label_promotion_ReferralMonthFree_description=An additional month of free service! label_promotion_AccountCredit1=$1 Bonus +label_promotion_AccountCredit1_description=A $1 credit towards any plan label_promotion_AccountCredit5=$5 Bonus +label_promotion_AccountCredit5_description=A $5 credit towards any plan label_promotion_AccountCreditBill=Full Bill Bonus ($100 max value) +label_promotion_AccountCreditBill_description=An additional month of free service! ($100 max value) title_account_payment_methods=Payment Methods label_account_payment_method_type=Type diff --git a/bubble-web b/bubble-web index 5f933706..cb7bdfea 160000 --- a/bubble-web +++ b/bubble-web @@ -1 +1 @@ -Subproject commit 5f93370651f9ef2d41361f9f28d47af28b8564c0 +Subproject commit cb7bdfea115ee47b1597adb61483dc904173b7af