diff --git a/bubble-server/src/main/java/bubble/service/cloud/StandardDeviceIdService.java b/bubble-server/src/main/java/bubble/service/cloud/StandardDeviceIdService.java index c3270df8..09950246 100644 --- a/bubble-server/src/main/java/bubble/service/cloud/StandardDeviceIdService.java +++ b/bubble-server/src/main/java/bubble/service/cloud/StandardDeviceIdService.java @@ -181,8 +181,14 @@ public class StandardDeviceIdService implements DeviceIdService { @Override public Boolean doShowBlockStatsForIpAndFqdn(String ip, String fqdn) { if (!configuration.showBlockStatsSupported()) return false; - final String val = redis.get_plaintext(REDIS_KEY_DEVICE_SHOW_BLOCK_STATS + ip + ":" + fqdn); - return val == null ? null : Boolean.parseBoolean(val); + while (true) { + final String val = redis.get_plaintext(REDIS_KEY_DEVICE_SHOW_BLOCK_STATS + ip + ":" + fqdn); + if (val != null) return Boolean.parseBoolean(val); + final int dotPos = fqdn.indexOf('.'); + if (dotPos == -1) return null; + fqdn = fqdn.substring(dotPos + 1); + if (fqdn.indexOf('.') == -1) return null; + } } public void showBlockStats (Device device) { diff --git a/bubble-server/src/main/resources/models/apps/bubble_block/bubbleApp_bubbleBlock_data.json b/bubble-server/src/main/resources/models/apps/bubble_block/bubbleApp_bubbleBlock_data.json new file mode 100644 index 00000000..4c9aaa1d --- /dev/null +++ b/bubble-server/src/main/resources/models/apps/bubble_block/bubbleApp_bubbleBlock_data.json @@ -0,0 +1,18 @@ +[{ + "name": "BubbleBlock", + "children": { + "AppData": [{ + "site": "All_Sites", + "template": true, + "matcher": "BubbleBlockMatcher", + "key": "hideStats_amazon.com", + "data": "true" + }, { + "site": "All_Sites", + "template": true, + "matcher": "BubbleBlockMatcher", + "key": "hideStats_walmart.com", + "data": "true" + }] + } +}] diff --git a/bubble-server/src/main/resources/models/manifest-app-bubble-block.json b/bubble-server/src/main/resources/models/manifest-app-bubble-block.json index c3f51280..7300f47a 100644 --- a/bubble-server/src/main/resources/models/manifest-app-bubble-block.json +++ b/bubble-server/src/main/resources/models/manifest-app-bubble-block.json @@ -1,4 +1,5 @@ [ "apps/bubble_block/bubbleApp_bubbleBlock", - "apps/bubble_block/bubbleApp_bubbleBlock_matchers" + "apps/bubble_block/bubbleApp_bubbleBlock_matchers", + "apps/bubble_block/bubbleApp_bubbleBlock_data" ] \ No newline at end of file