diff --git a/client/src/components/Logs/Cells/getResponseCell.js b/client/src/components/Logs/Cells/getResponseCell.js index c300a00d..f0b390c3 100644 --- a/client/src/components/Logs/Cells/getResponseCell.js +++ b/client/src/components/Logs/Cells/getResponseCell.js @@ -82,6 +82,13 @@ const getResponseCell = (row, filtering, t, isDetailed) => { rule_label: rule, response_code: status, }, + [FILTERED_STATUS.NOT_FILTERED_WHITE_LIST]: { + domain, + encryption_status: boldStatusLabel, + filter, + rule_label: rule, + response_code: status, + }, [FILTERED_STATUS.FILTERED_SAFE_SEARCH]: { domain, encryption_status: boldStatusLabel, diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index b30ccc2e..15e2963b 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -1213,15 +1213,15 @@ components: top_queried_domains: type: array items: - type: object + $ref: "#/components/schemas/TopArrayEntry" top_clients: type: array items: - type: object + $ref: "#/components/schemas/TopArrayEntry" top_blocked_domains: type: array items: - type: object + $ref: "#/components/schemas/TopArrayEntry" dns_queries: type: array items: @@ -1238,6 +1238,12 @@ components: type: array items: type: integer + TopArrayEntry: + type: object + description: Represent the number of hits per key (domain or client IP) + properties: + domain_or_ip: + type: integer StatsConfig: type: object description: Statistics configuration diff --git a/util/auto_hosts.go b/util/auto_hosts.go index f36ee1e7..34a979da 100644 --- a/util/auto_hosts.go +++ b/util/auto_hosts.go @@ -76,17 +76,19 @@ func (a *AutoHosts) Start() { go a.updateLoop() a.updateChan <- true - go a.watcherLoop() + if a.watcher != nil { + go a.watcherLoop() - err := a.watcher.Add(a.hostsFn) - if err != nil { - log.Error("Error while initializing watcher for a file %s: %s", a.hostsFn, err) - } - - for _, dir := range a.hostsDirs { - err = a.watcher.Add(dir) + err := a.watcher.Add(a.hostsFn) if err != nil { - log.Error("Error while initializing watcher for a directory %s: %s", dir, err) + log.Error("Error while initializing watcher for a file %s: %s", a.hostsFn, err) + } + + for _, dir := range a.hostsDirs { + err = a.watcher.Add(dir) + if err != nil { + log.Error("Error while initializing watcher for a directory %s: %s", dir, err) + } } } } @@ -95,7 +97,9 @@ func (a *AutoHosts) Start() { func (a *AutoHosts) Close() { a.updateChan <- false close(a.updateChan) - _ = a.watcher.Close() + if a.watcher != nil { + _ = a.watcher.Close() + } } // update table