Bladeren bron

check parent domains of fqdn for hideStats flag. add some exceptions to block data

tags/v1.0.4
Jonathan Cobb 4 jaren geleden
bovenliggende
commit
2744f8cdbf
3 gewijzigde bestanden met toevoegingen van 28 en 3 verwijderingen
  1. +8
    -2
      bubble-server/src/main/java/bubble/service/cloud/StandardDeviceIdService.java
  2. +18
    -0
      bubble-server/src/main/resources/models/apps/bubble_block/bubbleApp_bubbleBlock_data.json
  3. +2
    -1
      bubble-server/src/main/resources/models/manifest-app-bubble-block.json

+ 8
- 2
bubble-server/src/main/java/bubble/service/cloud/StandardDeviceIdService.java Bestand weergeven

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


+ 18
- 0
bubble-server/src/main/resources/models/apps/bubble_block/bubbleApp_bubbleBlock_data.json Bestand weergeven

@@ -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"
}]
}
}]

+ 2
- 1
bubble-server/src/main/resources/models/manifest-app-bubble-block.json Bestand weergeven

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

Laden…
Annuleren
Opslaan