From 82d602b1c6009a036b0999d0c0ef9a9fcc92f7c1 Mon Sep 17 00:00:00 2001 From: Jonathan Cobb Date: Sat, 1 Feb 2020 12:14:42 -0500 Subject: [PATCH] fix bubble block model bugs --- bubble-server/src/main/java/bubble/dao/app/AppMatcherDAO.java | 3 +++ bubble-server/src/main/java/bubble/model/app/AppMatcher.java | 4 ++-- .../src/main/java/bubble/model/app/config/AppConfigView.java | 2 +- .../en_US/server/post_auth/ResourceMessages.properties | 2 ++ .../models/apps/bubble_block/bubbleApp_bubbleBlock.json | 2 +- .../apps/bubble_block/bubbleApp_bubbleBlock_matchers.json | 2 +- bubble-web | 2 +- 7 files changed, 11 insertions(+), 6 deletions(-) diff --git a/bubble-server/src/main/java/bubble/dao/app/AppMatcherDAO.java b/bubble-server/src/main/java/bubble/dao/app/AppMatcherDAO.java index ffcbb46d..52e01d55 100644 --- a/bubble-server/src/main/java/bubble/dao/app/AppMatcherDAO.java +++ b/bubble-server/src/main/java/bubble/dao/app/AppMatcherDAO.java @@ -34,6 +34,9 @@ public class AppMatcherDAO extends AppTemplateEntityDAO { if (rule == null) return die("postUpdate("+ matcher.getUuid()+"): rule not found: "+ matcher.getRule()); for (Account account : accountDAO.findAll()) { + if (account.getUuid().equals(matcher.getAccount())) { + continue; + } final BubbleApp accountApp = appDAO.findByAccountAndId(account.getUuid(), app.getName()); if (accountApp == null) { // todo: log this? diff --git a/bubble-server/src/main/java/bubble/model/app/AppMatcher.java b/bubble-server/src/main/java/bubble/model/app/AppMatcher.java index 570b37a4..b1d3bdec 100644 --- a/bubble-server/src/main/java/bubble/model/app/AppMatcher.java +++ b/bubble-server/src/main/java/bubble/model/app/AppMatcher.java @@ -38,8 +38,8 @@ import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENC_PAD; }) public class AppMatcher extends IdentifiableBase implements AppTemplateEntity, HasPriority { - public static final String[] VALUE_FIELDS = {"fqdn", "urlRegex", "rule", "template", "enabled", "priority"}; - public static final String[] CREATE_FIELDS = ArrayUtil.append(VALUE_FIELDS, "name", "site"); + public static final String[] VALUE_FIELDS = {"fqdn", "urlRegex", "template", "enabled", "priority"}; + public static final String[] CREATE_FIELDS = ArrayUtil.append(VALUE_FIELDS, "name", "site", "rule"); public AppMatcher(AppMatcher other) { copy(this, other, CREATE_FIELDS); diff --git a/bubble-server/src/main/java/bubble/model/app/config/AppConfigView.java b/bubble-server/src/main/java/bubble/model/app/config/AppConfigView.java index 0cb4b668..98a38315 100644 --- a/bubble-server/src/main/java/bubble/model/app/config/AppConfigView.java +++ b/bubble-server/src/main/java/bubble/model/app/config/AppConfigView.java @@ -10,7 +10,7 @@ public class AppConfigView { @Getter @Setter private String name; @Getter @Setter private AppConfigScope scope; - @Getter @Setter private Boolean root = true; + @Getter @Setter private Boolean root = false; public boolean root() { return root != null && root; } @Getter @Setter private String[] columns; 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 33a7a765..3776fd7d 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 @@ -382,6 +382,8 @@ message_no_data=No Data option_all_devices=All Devices button_label_app_data_refresh=Search +table_title_app_config_views=App Configuration + # AppSite loading_app_site=Loading site... table_title_app_site_view=App Site Views diff --git a/bubble-server/src/main/resources/models/apps/bubble_block/bubbleApp_bubbleBlock.json b/bubble-server/src/main/resources/models/apps/bubble_block/bubbleApp_bubbleBlock.json index 9694558c..f2e7ecc3 100644 --- a/bubble-server/src/main/resources/models/apps/bubble_block/bubbleApp_bubbleBlock.json +++ b/bubble-server/src/main/resources/models/apps/bubble_block/bubbleApp_bubbleBlock.json @@ -117,7 +117,7 @@ "AppMessage": [{ "locale": "en_US", "messages": [ - {"name": "name", "value": "BubbleBlock"}, + {"name": "name", "value": "Bubble Filter"}, {"name": "description", "value": "Network Filter: Blocks adware, malware, phishing/scam sites, and much more"}, {"name": "field.ctime", "value": "When"}, {"name": "field.fqdn", "value": "URL"}, diff --git a/bubble-server/src/main/resources/models/apps/bubble_block/bubbleApp_bubbleBlock_matchers.json b/bubble-server/src/main/resources/models/apps/bubble_block/bubbleApp_bubbleBlock_matchers.json index f4ab29e4..ca1ff704 100644 --- a/bubble-server/src/main/resources/models/apps/bubble_block/bubbleApp_bubbleBlock_matchers.json +++ b/bubble-server/src/main/resources/models/apps/bubble_block/bubbleApp_bubbleBlock_matchers.json @@ -1,5 +1,5 @@ [{ - "name": "BBlock", + "name": "BubbleBlock", "children": { "AppMatcher": [{ "name": "BubbleBlockMatcher", diff --git a/bubble-web b/bubble-web index 2b810b27..10df086e 160000 --- a/bubble-web +++ b/bubble-web @@ -1 +1 @@ -Subproject commit 2b810b27d33e9acb50d6f8954725ab1fa00973c1 +Subproject commit 10df086e32a8e22e8a4b5472161ccdf6936d6b17