浏览代码

add domain priority. add promo descriptions.

tags/v0.9.14
Jonathan Cobb 4 年前
父节点
当前提交
973f4dcb76
共有 4 个文件被更改,包括 18 次插入6 次删除
  1. +3
    -0
      bubble-server/src/main/java/bubble/dao/cloud/BubbleDomainDAO.java
  2. +8
    -4
      bubble-server/src/main/java/bubble/model/cloud/BubbleDomain.java
  3. +6
    -1
      bubble-server/src/main/resources/message_templates/en_US/server/post_auth/ResourceMessages.properties
  4. +1
    -1
      bubble-web

+ 3
- 0
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<BubbleDomain> {
@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();


+ 8
- 4
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;



+ 6
- 1
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... <small>(refresh page if this gets stuck)</small>
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


+ 1
- 1
bubble-web

@@ -1 +1 @@
Subproject commit 5f93370651f9ef2d41361f9f28d47af28b8564c0
Subproject commit cb7bdfea115ee47b1597adb61483dc904173b7af

正在加载...
取消
保存