docstring_tokens
stringlengths 0
76.5k
| code_tokens
stringlengths 75
1.81M
| label_window
sequencelengths 4
2.12k
| html_url
stringlengths 74
116
| file_name
stringlengths 3
311
|
---|---|---|---|---|
safeSearchConf = filtering.SafeSearchConfig{
Enabled: cj.SafeSearchEnabled,
} | <mask> safeSearchConf = *cj.SafeSearchConf
<mask> } else {
<mask> // TODO(d.kolyshev): Remove after cleaning the deprecated
<mask> // [clientJSON.SafeSearchEnabled] field.
<mask> safeSearchConf = filtering.SafeSearchConfig{Enabled: cj.SafeSearchEnabled}
<mask>
<mask> // Set default service flags for enabled safesearch.
<mask> if safeSearchConf.Enabled {
<mask> safeSearchConf.Bing = true
<mask> safeSearchConf.DuckDuckGo = true
</s> Pull request 1803: 5685-fix-safe-search
Updates #5685.
Squashed commit of the following:
commit 5312147abfa0914c896acbf1e88f8c8f1af90f2b
Author: Ainar Garipov <[email protected]>
Date: Thu Apr 6 14:09:44 2023 +0300
safesearch: imp tests, logs
commit 298b5d24ce292c5f83ebe33d1e92329e4b3c1acc
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:36:16 2023 +0300
safesearch: fix filters, logging
commit 63d6ca5d694d45705473f2f0410e9e0b49cf7346
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:24:47 2023 +0300
all: dry; fix logs
commit fdbf2f364fd0484b47b3161bf6f4581856fdf47b
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:01:08 2023 +0300
all: fix safe search update </s> remove func jsonToClient(cj clientJSON) (c *Client) {
</s> add func (clients *clientsContainer) jsonToClient(cj clientJSON) (c *Client, err error) { </s> remove clients.Init(nil, nil, nil, nil, nil)
</s> add return c
}
func TestClients(t *testing.T) {
clients := newClientsContainer() </s> remove func TestSafeSearchCacheYandex(t *testing.T) {
const domain = "yandex.ru"
ss := newForTest(t, filtering.SafeSearchConfig{Enabled: false})
// Check host with disabled safesearch.
res, err := ss.CheckHost(domain, dns.TypeA)
</s> add func TestDefault_Update(t *testing.T) {
conf := testConf
ss, err := safesearch.NewDefault(conf, "", testCacheSize, testCacheTTL) </s> remove log.Debug("safesearch: cache decoding: %s", err)
</s> add ss.log(log.ERROR, "cache decoding: %s", err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61b4043775ecc3e06aebcdabc070b732c6dd0ff0 | internal/home/clientshttp.go |
c = &Client{
safeSearchConf: safeSearchConf,
Name: cj.Name,
IDs: cj.IDs,
Tags: cj.Tags,
BlockedServices: cj.BlockedServices,
Upstreams: cj.Upstreams,
| <mask> safeSearchConf.YouTube = true
<mask> }
<mask> }
<mask>
<mask> return &Client{
<mask> Name: cj.Name,
<mask> IDs: cj.IDs,
<mask> Tags: cj.Tags,
<mask> UseOwnSettings: !cj.UseGlobalSettings,
<mask> FilteringEnabled: cj.FilteringEnabled,
<mask> ParentalEnabled: cj.ParentalEnabled,
<mask> SafeBrowsingEnabled: cj.SafeBrowsingEnabled,
<mask> safeSearchConf: safeSearchConf,
</s> Pull request 1803: 5685-fix-safe-search
Updates #5685.
Squashed commit of the following:
commit 5312147abfa0914c896acbf1e88f8c8f1af90f2b
Author: Ainar Garipov <[email protected]>
Date: Thu Apr 6 14:09:44 2023 +0300
safesearch: imp tests, logs
commit 298b5d24ce292c5f83ebe33d1e92329e4b3c1acc
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:36:16 2023 +0300
safesearch: fix filters, logging
commit 63d6ca5d694d45705473f2f0410e9e0b49cf7346
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:24:47 2023 +0300
all: dry; fix logs
commit fdbf2f364fd0484b47b3161bf6f4581856fdf47b
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:01:08 2023 +0300
all: fix safe search update </s> remove safeSearchConf: safeSearchConf,
</s> add </s> remove BlockedServices: cj.BlockedServices,
</s> add } </s> remove clients := clientsContainer{
testing: true,
}
clients.Init(nil, nil, nil, nil, nil)
</s> add clients := newClientsContainer() </s> remove Upstreams: cj.Upstreams,
</s> add if safeSearchConf.Enabled {
err = c.setSafeSearch(
safeSearchConf,
clients.safeSearchCacheSize,
clients.safeSearchCacheTTL,
)
if err != nil {
return nil, fmt.Errorf("creating safesearch for client %q: %w", c.Name, err)
} </s> remove safeSearch, err := safesearch.NewDefaultSafeSearch(
</s> add safeSearch, err := safesearch.NewDefault( | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61b4043775ecc3e06aebcdabc070b732c6dd0ff0 | internal/home/clientshttp.go |
<mask> UseOwnSettings: !cj.UseGlobalSettings,
<mask> FilteringEnabled: cj.FilteringEnabled,
<mask> ParentalEnabled: cj.ParentalEnabled,
<mask> SafeBrowsingEnabled: cj.SafeBrowsingEnabled,
<mask> safeSearchConf: safeSearchConf,
<mask> UseOwnBlockedServices: !cj.UseGlobalBlockedServices,
<mask> BlockedServices: cj.BlockedServices,
<mask>
<mask> Upstreams: cj.Upstreams,
<mask> }
</s> Pull request 1803: 5685-fix-safe-search
Updates #5685.
Squashed commit of the following:
commit 5312147abfa0914c896acbf1e88f8c8f1af90f2b
Author: Ainar Garipov <[email protected]>
Date: Thu Apr 6 14:09:44 2023 +0300
safesearch: imp tests, logs
commit 298b5d24ce292c5f83ebe33d1e92329e4b3c1acc
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:36:16 2023 +0300
safesearch: fix filters, logging
commit 63d6ca5d694d45705473f2f0410e9e0b49cf7346
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:24:47 2023 +0300
all: dry; fix logs
commit fdbf2f364fd0484b47b3161bf6f4581856fdf47b
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:01:08 2023 +0300
all: fix safe search update </s> remove BlockedServices: cj.BlockedServices,
</s> add } </s> remove return &Client{
Name: cj.Name,
IDs: cj.IDs,
Tags: cj.Tags,
</s> add c = &Client{
safeSearchConf: safeSearchConf,
Name: cj.Name,
IDs: cj.IDs,
Tags: cj.Tags,
BlockedServices: cj.BlockedServices,
Upstreams: cj.Upstreams,
</s> remove Upstreams: cj.Upstreams,
</s> add if safeSearchConf.Enabled {
err = c.setSafeSearch(
safeSearchConf,
clients.safeSearchCacheSize,
clients.safeSearchCacheTTL,
)
if err != nil {
return nil, fmt.Errorf("creating safesearch for client %q: %w", c.Name, err)
} </s> remove safeSearch, err := safesearch.NewDefaultSafeSearch(
</s> add safeSearch, err := safesearch.NewDefault( | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61b4043775ecc3e06aebcdabc070b732c6dd0ff0 | internal/home/clientshttp.go |
|
} | <mask> ParentalEnabled: cj.ParentalEnabled,
<mask> SafeBrowsingEnabled: cj.SafeBrowsingEnabled,
<mask> safeSearchConf: safeSearchConf,
<mask> UseOwnBlockedServices: !cj.UseGlobalBlockedServices,
<mask> BlockedServices: cj.BlockedServices,
<mask>
<mask> Upstreams: cj.Upstreams,
<mask> }
<mask> }
<mask>
</s> Pull request 1803: 5685-fix-safe-search
Updates #5685.
Squashed commit of the following:
commit 5312147abfa0914c896acbf1e88f8c8f1af90f2b
Author: Ainar Garipov <[email protected]>
Date: Thu Apr 6 14:09:44 2023 +0300
safesearch: imp tests, logs
commit 298b5d24ce292c5f83ebe33d1e92329e4b3c1acc
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:36:16 2023 +0300
safesearch: fix filters, logging
commit 63d6ca5d694d45705473f2f0410e9e0b49cf7346
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:24:47 2023 +0300
all: dry; fix logs
commit fdbf2f364fd0484b47b3161bf6f4581856fdf47b
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:01:08 2023 +0300
all: fix safe search update </s> remove safeSearchConf: safeSearchConf,
</s> add </s> remove return &Client{
Name: cj.Name,
IDs: cj.IDs,
Tags: cj.Tags,
</s> add c = &Client{
safeSearchConf: safeSearchConf,
Name: cj.Name,
IDs: cj.IDs,
Tags: cj.Tags,
BlockedServices: cj.BlockedServices,
Upstreams: cj.Upstreams,
</s> remove Upstreams: cj.Upstreams,
</s> add if safeSearchConf.Enabled {
err = c.setSafeSearch(
safeSearchConf,
clients.safeSearchCacheSize,
clients.safeSearchCacheTTL,
)
if err != nil {
return nil, fmt.Errorf("creating safesearch for client %q: %w", c.Name, err)
} </s> remove safeSearch, err := safesearch.NewDefaultSafeSearch(
</s> add safeSearch, err := safesearch.NewDefault( | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61b4043775ecc3e06aebcdabc070b732c6dd0ff0 | internal/home/clientshttp.go |
if safeSearchConf.Enabled {
err = c.setSafeSearch(
safeSearchConf,
clients.safeSearchCacheSize,
clients.safeSearchCacheTTL,
)
if err != nil {
return nil, fmt.Errorf("creating safesearch for client %q: %w", c.Name, err)
} | <mask> safeSearchConf: safeSearchConf,
<mask> UseOwnBlockedServices: !cj.UseGlobalBlockedServices,
<mask> BlockedServices: cj.BlockedServices,
<mask>
<mask> Upstreams: cj.Upstreams,
<mask> }
<mask> }
<mask>
<mask> // clientToJSON converts Client object to JSON.
<mask> func clientToJSON(c *Client) (cj *clientJSON) {
</s> Pull request 1803: 5685-fix-safe-search
Updates #5685.
Squashed commit of the following:
commit 5312147abfa0914c896acbf1e88f8c8f1af90f2b
Author: Ainar Garipov <[email protected]>
Date: Thu Apr 6 14:09:44 2023 +0300
safesearch: imp tests, logs
commit 298b5d24ce292c5f83ebe33d1e92329e4b3c1acc
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:36:16 2023 +0300
safesearch: fix filters, logging
commit 63d6ca5d694d45705473f2f0410e9e0b49cf7346
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:24:47 2023 +0300
all: dry; fix logs
commit fdbf2f364fd0484b47b3161bf6f4581856fdf47b
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:01:08 2023 +0300
all: fix safe search update </s> remove BlockedServices: cj.BlockedServices,
</s> add } </s> remove safeSearchConf: safeSearchConf,
</s> add </s> remove return &Client{
Name: cj.Name,
IDs: cj.IDs,
Tags: cj.Tags,
</s> add c = &Client{
safeSearchConf: safeSearchConf,
Name: cj.Name,
IDs: cj.IDs,
Tags: cj.Tags,
BlockedServices: cj.BlockedServices,
Upstreams: cj.Upstreams,
</s> remove func jsonToClient(cj clientJSON) (c *Client) {
</s> add func (clients *clientsContainer) jsonToClient(cj clientJSON) (c *Client, err error) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61b4043775ecc3e06aebcdabc070b732c6dd0ff0 | internal/home/clientshttp.go |
return c, nil | <mask> if err != nil {
<mask> return nil, fmt.Errorf("creating safesearch for client %q: %w", c.Name, err)
<mask> }
<mask> }
<mask> }
<mask>
<mask> // clientToJSON converts Client object to JSON.
<mask> func clientToJSON(c *Client) (cj *clientJSON) {
<mask> // TODO(d.kolyshev): Remove after cleaning the deprecated
<mask> // [clientJSON.SafeSearchEnabled] field.
</s> Pull request 1803: 5685-fix-safe-search
Updates #5685.
Squashed commit of the following:
commit 5312147abfa0914c896acbf1e88f8c8f1af90f2b
Author: Ainar Garipov <[email protected]>
Date: Thu Apr 6 14:09:44 2023 +0300
safesearch: imp tests, logs
commit 298b5d24ce292c5f83ebe33d1e92329e4b3c1acc
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:36:16 2023 +0300
safesearch: fix filters, logging
commit 63d6ca5d694d45705473f2f0410e9e0b49cf7346
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:24:47 2023 +0300
all: dry; fix logs
commit fdbf2f364fd0484b47b3161bf6f4581856fdf47b
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:01:08 2023 +0300
all: fix safe search update </s> remove Upstreams: cj.Upstreams,
</s> add if safeSearchConf.Enabled {
err = c.setSafeSearch(
safeSearchConf,
clients.safeSearchCacheSize,
clients.safeSearchCacheTTL,
)
if err != nil {
return nil, fmt.Errorf("creating safesearch for client %q: %w", c.Name, err)
} </s> remove func jsonToClient(cj clientJSON) (c *Client) {
</s> add func (clients *clientsContainer) jsonToClient(cj clientJSON) (c *Client, err error) { </s> remove safeSearchConf = filtering.SafeSearchConfig{Enabled: cj.SafeSearchEnabled}
</s> add safeSearchConf = filtering.SafeSearchConfig{
Enabled: cj.SafeSearchEnabled,
} </s> remove return nil, fmt.Errorf("creating rule storage: %w", err)
</s> add return fmt.Errorf("creating rule storage: %w", err) </s> remove log.Error("clients: init client safesearch %s: %s", cli.Name, err)
</s> add log.Error("clients: init client safesearch %q: %s", cli.Name, err) | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61b4043775ecc3e06aebcdabc070b732c6dd0ff0 | internal/home/clientshttp.go |
c, err := clients.jsonToClient(cj)
if err != nil {
aghhttp.Error(r, w, http.StatusBadRequest, "%s", err)
return
}
| <mask>
<mask> return
<mask> }
<mask>
<mask> c := jsonToClient(cj)
<mask> ok, err := clients.Add(c)
<mask> if err != nil {
<mask> aghhttp.Error(r, w, http.StatusBadRequest, "%s", err)
<mask>
<mask> return
</s> Pull request 1803: 5685-fix-safe-search
Updates #5685.
Squashed commit of the following:
commit 5312147abfa0914c896acbf1e88f8c8f1af90f2b
Author: Ainar Garipov <[email protected]>
Date: Thu Apr 6 14:09:44 2023 +0300
safesearch: imp tests, logs
commit 298b5d24ce292c5f83ebe33d1e92329e4b3c1acc
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:36:16 2023 +0300
safesearch: fix filters, logging
commit 63d6ca5d694d45705473f2f0410e9e0b49cf7346
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:24:47 2023 +0300
all: dry; fix logs
commit fdbf2f364fd0484b47b3161bf6f4581856fdf47b
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:01:08 2023 +0300
all: fix safe search update </s> remove c := jsonToClient(dj.Data)
</s> add c, err := clients.jsonToClient(dj.Data)
if err != nil {
aghhttp.Error(r, w, http.StatusBadRequest, "%s", err)
return
}
</s> remove log.Error("safesearch: cache encoding: %s", err)
</s> add ss.log(log.ERROR, "cache encoding: %s", err) </s> remove dRes, err := ss.newResult(rewrite, qtype)
</s> add fltRes, err := ss.newResult(rewrite, qtype) </s> remove log.Debug("safesearch: cache decoding: %s", err)
</s> add ss.log(log.ERROR, "cache decoding: %s", err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61b4043775ecc3e06aebcdabc070b732c6dd0ff0 | internal/home/clientshttp.go |
c, err := clients.jsonToClient(dj.Data)
if err != nil {
aghhttp.Error(r, w, http.StatusBadRequest, "%s", err)
return
}
| <mask>
<mask> return
<mask> }
<mask>
<mask> c := jsonToClient(dj.Data)
<mask> err = clients.Update(dj.Name, c)
<mask> if err != nil {
<mask> aghhttp.Error(r, w, http.StatusBadRequest, "%s", err)
<mask>
<mask> return
</s> Pull request 1803: 5685-fix-safe-search
Updates #5685.
Squashed commit of the following:
commit 5312147abfa0914c896acbf1e88f8c8f1af90f2b
Author: Ainar Garipov <[email protected]>
Date: Thu Apr 6 14:09:44 2023 +0300
safesearch: imp tests, logs
commit 298b5d24ce292c5f83ebe33d1e92329e4b3c1acc
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:36:16 2023 +0300
safesearch: fix filters, logging
commit 63d6ca5d694d45705473f2f0410e9e0b49cf7346
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:24:47 2023 +0300
all: dry; fix logs
commit fdbf2f364fd0484b47b3161bf6f4581856fdf47b
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:01:08 2023 +0300
all: fix safe search update </s> remove c := jsonToClient(cj)
</s> add c, err := clients.jsonToClient(cj)
if err != nil {
aghhttp.Error(r, w, http.StatusBadRequest, "%s", err)
return
}
</s> remove dRes, err := ss.newResult(rewrite, qtype)
</s> add fltRes, err := ss.newResult(rewrite, qtype) </s> remove log.Error("safesearch: cache encoding: %s", err)
</s> add ss.log(log.ERROR, "cache encoding: %s", err) </s> remove log.Debug("safesearch: failed to lookup addresses for %s: %s", host, err)
</s> add ss.log(log.DEBUG, "looking up addresses for %q: %s", host, err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61b4043775ecc3e06aebcdabc070b732c6dd0ff0 | internal/home/clientshttp.go |
//
// TODO(a.garipov): Support network. | <mask>
<mask> // LookupIP implements [filtering.Resolver] interface for safeSearchResolver.
<mask> // It returns the slice of net.IP with IPv4 and IPv6 instances.
<mask> func (r safeSearchResolver) LookupIP(_ context.Context, _, host string) (ips []net.IP, err error) {
<mask> addrs, err := Context.dnsServer.Resolve(host)
<mask> if err != nil {
<mask> return nil, err
<mask> }
<mask>
</s> Pull request 1803: 5685-fix-safe-search
Updates #5685.
Squashed commit of the following:
commit 5312147abfa0914c896acbf1e88f8c8f1af90f2b
Author: Ainar Garipov <[email protected]>
Date: Thu Apr 6 14:09:44 2023 +0300
safesearch: imp tests, logs
commit 298b5d24ce292c5f83ebe33d1e92329e4b3c1acc
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:36:16 2023 +0300
safesearch: fix filters, logging
commit 63d6ca5d694d45705473f2f0410e9e0b49cf7346
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:24:47 2023 +0300
all: dry; fix logs
commit fdbf2f364fd0484b47b3161bf6f4581856fdf47b
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:01:08 2023 +0300
all: fix safe search update </s> remove log.Tracef("network:%v addr:%v", network, addr)
</s> add log.Debug("home: customdial: dialing addr %q for network %s", addr, network) </s> remove func (ss *DefaultSafeSearch) CheckHost(
</s> add func (ss *Default) CheckHost( </s> remove qtype uint16,
</s> add qtype rules.RRType, </s> remove ips, err := ss.resolver.LookupIP(context.Background(), "ip", rewrite.NewCNAME)
</s> add ss.log(log.DEBUG, "resolving %q", host)
ips, err := ss.resolver.LookupIP(context.Background(), qtypeToProto(qtype), host) </s> remove if rewrite.NewCNAME == "" {
</s> add host := rewrite.NewCNAME
if host == "" { | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61b4043775ecc3e06aebcdabc070b732c6dd0ff0 | internal/home/dns.go |
config.DNS.DnsfilterConf.SafeSearch, err = safesearch.NewDefault( | <mask> config.DNS.DnsfilterConf.UserRules = slices.Clone(config.UserRules)
<mask> config.DNS.DnsfilterConf.HTTPClient = Context.client
<mask>
<mask> config.DNS.DnsfilterConf.SafeSearchConf.CustomResolver = safeSearchResolver{}
<mask> config.DNS.DnsfilterConf.SafeSearch, err = safesearch.NewDefaultSafeSearch(
<mask> config.DNS.DnsfilterConf.SafeSearchConf,
<mask> config.DNS.DnsfilterConf.SafeSearchCacheSize,
<mask> time.Minute*time.Duration(config.DNS.DnsfilterConf.CacheTime),
<mask> )
<mask> if err != nil {
</s> Pull request 1803: 5685-fix-safe-search
Updates #5685.
Squashed commit of the following:
commit 5312147abfa0914c896acbf1e88f8c8f1af90f2b
Author: Ainar Garipov <[email protected]>
Date: Thu Apr 6 14:09:44 2023 +0300
safesearch: imp tests, logs
commit 298b5d24ce292c5f83ebe33d1e92329e4b3c1acc
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:36:16 2023 +0300
safesearch: fix filters, logging
commit 63d6ca5d694d45705473f2f0410e9e0b49cf7346
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:24:47 2023 +0300
all: dry; fix logs
commit fdbf2f364fd0484b47b3161bf6f4581856fdf47b
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:01:08 2023 +0300
all: fix safe search update </s> remove ss, err := safesearch.NewDefaultSafeSearch(
</s> add err := cli.setSafeSearch( </s> remove safeSearch, err := safesearch.NewDefaultSafeSearch(
</s> add safeSearch, err := safesearch.NewDefault( </s> remove cacheTime time.Duration,
) (ss *DefaultSafeSearch, err error) {
engine, err := newEngine(filtering.SafeSearchListID, conf)
if err != nil {
return nil, err
}
</s> add cacheTTL time.Duration,
) (ss *Default, err error) { </s> remove c := jsonToClient(dj.Data)
</s> add c, err := clients.jsonToClient(dj.Data)
if err != nil {
aghhttp.Error(r, w, http.StatusBadRequest, "%s", err)
return
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61b4043775ecc3e06aebcdabc070b732c6dd0ff0 | internal/home/home.go |
"default", | <mask> config.DNS.DnsfilterConf.SafeSearchConf.CustomResolver = safeSearchResolver{}
<mask> config.DNS.DnsfilterConf.SafeSearch, err = safesearch.NewDefault(
<mask> config.DNS.DnsfilterConf.SafeSearchConf,
<mask> config.DNS.DnsfilterConf.SafeSearchCacheSize,
<mask> time.Minute*time.Duration(config.DNS.DnsfilterConf.CacheTime),
<mask> )
<mask> if err != nil {
<mask> return fmt.Errorf("initializing safesearch: %w", err)
<mask> }
</s> Pull request 1803: 5685-fix-safe-search
Updates #5685.
Squashed commit of the following:
commit 5312147abfa0914c896acbf1e88f8c8f1af90f2b
Author: Ainar Garipov <[email protected]>
Date: Thu Apr 6 14:09:44 2023 +0300
safesearch: imp tests, logs
commit 298b5d24ce292c5f83ebe33d1e92329e4b3c1acc
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:36:16 2023 +0300
safesearch: fix filters, logging
commit 63d6ca5d694d45705473f2f0410e9e0b49cf7346
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:24:47 2023 +0300
all: dry; fix logs
commit fdbf2f364fd0484b47b3161bf6f4581856fdf47b
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:01:08 2023 +0300
all: fix safe search update </s> remove config.DNS.DnsfilterConf.SafeSearch, err = safesearch.NewDefaultSafeSearch(
</s> add config.DNS.DnsfilterConf.SafeSearch, err = safesearch.NewDefault( </s> remove return nil, fmt.Errorf("creating rule storage: %w", err)
</s> add return fmt.Errorf("creating rule storage: %w", err) </s> remove ss, err := safesearch.NewDefaultSafeSearch(
</s> add err := cli.setSafeSearch( </s> remove Upstreams: cj.Upstreams,
</s> add if safeSearchConf.Enabled {
err = c.setSafeSearch(
safeSearchConf,
clients.safeSearchCacheSize,
clients.safeSearchCacheTTL,
)
if err != nil {
return nil, fmt.Errorf("creating safesearch for client %q: %w", c.Name, err)
} </s> remove safeSearch, err := safesearch.NewDefaultSafeSearch(
</s> add safeSearch, err := safesearch.NewDefault( | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61b4043775ecc3e06aebcdabc070b732c6dd0ff0 | internal/home/home.go |
//
// TODO(a.garipov): Support network. | <mask>
<mask> // Connect to a remote server resolving hostname using our own DNS server.
<mask> //
<mask> // TODO(e.burkov): This messy logic should be decomposed and clarified.
<mask> func customDialContext(ctx context.Context, network, addr string) (conn net.Conn, err error) {
<mask> log.Debug("home: customdial: dialing addr %q for network %s", addr, network)
<mask>
<mask> host, port, err := net.SplitHostPort(addr)
</s> Pull request 1803: 5685-fix-safe-search
Updates #5685.
Squashed commit of the following:
commit 5312147abfa0914c896acbf1e88f8c8f1af90f2b
Author: Ainar Garipov <[email protected]>
Date: Thu Apr 6 14:09:44 2023 +0300
safesearch: imp tests, logs
commit 298b5d24ce292c5f83ebe33d1e92329e4b3c1acc
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:36:16 2023 +0300
safesearch: fix filters, logging
commit 63d6ca5d694d45705473f2f0410e9e0b49cf7346
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:24:47 2023 +0300
all: dry; fix logs
commit fdbf2f364fd0484b47b3161bf6f4581856fdf47b
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:01:08 2023 +0300
all: fix safe search update </s> remove log.Tracef("network:%v addr:%v", network, addr)
</s> add log.Debug("home: customdial: dialing addr %q for network %s", addr, network) </s> remove log.Debug("safesearch: failed to lookup addresses for %s: %s", host, err)
</s> add ss.log(log.DEBUG, "looking up addresses for %q: %s", host, err) </s> remove dRes, err := ss.newResult(rewrite, qtype)
</s> add fltRes, err := ss.newResult(rewrite, qtype) </s> remove if log.GetLevel() >= log.DEBUG {
timer := log.StartTimer()
defer timer.LogElapsed("safesearch: lookup for %s", host)
</s> add start := time.Now()
defer func() {
ss.log(log.DEBUG, "lookup for %q finished in %s", host, time.Since(start))
}()
if qtype != dns.TypeA && qtype != dns.TypeAAAA {
return filtering.Result{}, fmt.Errorf("unsupported question type %s", dns.Type(qtype)) | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61b4043775ecc3e06aebcdabc070b732c6dd0ff0 | internal/home/home.go |
log.Debug("home: customdial: dialing addr %q for network %s", addr, network) | <mask> // Connect to a remote server resolving hostname using our own DNS server.
<mask> //
<mask> // TODO(e.burkov): This messy logic should be decomposed and clarified.
<mask> func customDialContext(ctx context.Context, network, addr string) (conn net.Conn, err error) {
<mask> log.Tracef("network:%v addr:%v", network, addr)
<mask>
<mask> host, port, err := net.SplitHostPort(addr)
<mask> if err != nil {
<mask> return nil, err
<mask> }
</s> Pull request 1803: 5685-fix-safe-search
Updates #5685.
Squashed commit of the following:
commit 5312147abfa0914c896acbf1e88f8c8f1af90f2b
Author: Ainar Garipov <[email protected]>
Date: Thu Apr 6 14:09:44 2023 +0300
safesearch: imp tests, logs
commit 298b5d24ce292c5f83ebe33d1e92329e4b3c1acc
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:36:16 2023 +0300
safesearch: fix filters, logging
commit 63d6ca5d694d45705473f2f0410e9e0b49cf7346
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:24:47 2023 +0300
all: dry; fix logs
commit fdbf2f364fd0484b47b3161bf6f4581856fdf47b
Author: Ainar Garipov <[email protected]>
Date: Wed Apr 5 20:01:08 2023 +0300
all: fix safe search update </s> remove log.Debug("safesearch: failed to lookup addresses for %s: %s", host, err)
</s> add ss.log(log.DEBUG, "looking up addresses for %q: %s", host, err) </s> remove dRes, err := ss.newResult(rewrite, qtype)
</s> add fltRes, err := ss.newResult(rewrite, qtype) </s> remove cacheTime time.Duration,
) (ss *DefaultSafeSearch, err error) {
engine, err := newEngine(filtering.SafeSearchListID, conf)
if err != nil {
return nil, err
}
</s> add cacheTTL time.Duration,
) (ss *Default, err error) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61b4043775ecc3e06aebcdabc070b732c6dd0ff0 | internal/home/home.go |
import {
checkFiltered,
checkRewrite,
checkBlackList,
checkNotFilteredNotFound,
checkWhiteList,
checkSafeSearch,
checkSafeBrowsing,
checkParental,
} from '../../../helpers/helpers';
import { FILTERED } from '../../../helpers/constants'; | <mask> import React, { Fragment } from 'react';
<mask> import PropTypes from 'prop-types';
<mask> import { withNamespaces } from 'react-i18next';
<mask>
<mask> import { checkFiltered, checkRewrite, checkBlackList, checkNotFilteredNotFound, checkWhiteList } from '../../../helpers/helpers';
<mask>
<mask> const getFilterName = (id, filters, t) => {
<mask> if (id === 0) {
<mask> return t('filtered_custom_rules');
<mask> }
</s> - client: fix wrong statuses for Safebrowsing, Parental control, Safe search </s> remove import { SERVICES, FILTERED_STATUS, TABLE_DEFAULT_PAGE_SIZE, CUSTOM_FILTERING_RULES_ID } from '../../helpers/constants';
</s> add import { SERVICES, TABLE_DEFAULT_PAGE_SIZE, CUSTOM_FILTERING_RULES_ID, FILTERED } from '../../helpers/constants'; </s> remove const getTitle = (reason, filterName, t) => {
</s> add const getTitle = (reason, filterName, t, onlyFiltered) => { </s> remove if (this.checkFiltered(reason)) {
</s> add if (checkFiltered(reason)) { </s> remove } else if (this.checkRewrite(reason)) {
</s> add } else if (checkRewrite(reason)) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61d8ec8dae8b05b7f123478fb21763c0fc3ba307 | client/src/components/Filters/Check/Info.js |
const getTitle = (reason, filterName, t, onlyFiltered) => { | <mask>
<mask> return '';
<mask> };
<mask>
<mask> const getTitle = (reason, filterName, t) => {
<mask> if (checkNotFilteredNotFound(reason)) {
<mask> return t('check_not_found');
<mask> }
<mask>
<mask> if (checkRewrite(reason)) {
</s> - client: fix wrong statuses for Safebrowsing, Parental control, Safe search </s> remove } else if (this.checkRewrite(reason)) {
</s> add } else if (checkRewrite(reason)) { </s> remove if (this.checkFiltered(reason)) {
</s> add if (checkFiltered(reason)) { </s> remove } else if (this.checkWhiteList(reason)) {
</s> add } else if (checkWhiteList(reason)) { </s> remove import { checkFiltered, checkRewrite, checkBlackList, checkNotFilteredNotFound, checkWhiteList } from '../../../helpers/helpers';
</s> add import {
checkFiltered,
checkRewrite,
checkBlackList,
checkNotFilteredNotFound,
checkWhiteList,
checkSafeSearch,
checkSafeBrowsing,
checkParental,
} from '../../../helpers/helpers';
import { FILTERED } from '../../../helpers/constants'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61d8ec8dae8b05b7f123478fb21763c0fc3ba307 | client/src/components/Filters/Check/Info.js |
if (onlyFiltered) {
const filterKey = reason.replace(FILTERED, '');
return (
<div>
{t('query_log_filtered', { filter: filterKey })}
</div>
);
}
| <mask> );
<mask> }
<mask>
<mask> return (
<mask> <Fragment>
<mask> <div>
<mask> {t('check_reason', { reason })}
</s> - client: fix wrong statuses for Safebrowsing, Parental control, Safe search </s> remove checkFiltered = reason => reason.indexOf(FILTERED_REASON) === 0;
checkRewrite = reason => reason === FILTERED_STATUS.REWRITE;
checkWhiteList = reason => reason === FILTERED_STATUS.NOT_FILTERED_WHITE_LIST;
checkBlackList = reason => reason === FILTERED_STATUS.FILTERED_BLACK_LIST;
checkBlockedService = reason => reason === FILTERED_STATUS.FILTERED_BLOCKED_SERVICE;
</s> add </s> remove const isFiltered = this.checkFiltered(reason);
const isRewrite = this.checkRewrite(reason);
</s> add const isFiltered = checkFiltered(reason);
const isRewrite = checkRewrite(reason); </s> remove if (this.checkFiltered(reason)) {
</s> add if (checkFiltered(reason)) { </s> remove const title = getTitle(reason, filterName, t);
</s> add const onlyFiltered = checkSafeSearch(reason)
|| checkSafeBrowsing(reason)
|| checkParental(reason);
const title = getTitle(reason, filterName, t, onlyFiltered); | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61d8ec8dae8b05b7f123478fb21763c0fc3ba307 | client/src/components/Filters/Check/Info.js |
const onlyFiltered = checkSafeSearch(reason)
|| checkSafeBrowsing(reason)
|| checkParental(reason);
const title = getTitle(reason, filterName, t, onlyFiltered); | <mask> ip_addrs,
<mask> t,
<mask> }) => {
<mask> const filterName = getFilterName(filter_id, filters, t);
<mask> const title = getTitle(reason, filterName, t);
<mask> const color = getColor(reason);
<mask>
<mask> return (
<mask> <div className={`card mb-0 p-3 ${color}`}>
<mask> <div>
</s> - client: fix wrong statuses for Safebrowsing, Parental control, Safe search </s> remove const filterKey = reason.replace(FILTERED_REASON, '');
</s> add const filterKey = reason.replace(FILTERED, ''); </s> remove const getTitle = (reason, filterName, t) => {
</s> add const getTitle = (reason, filterName, t, onlyFiltered) => { </s> remove const isFiltered = this.checkFiltered(reason);
const isRewrite = this.checkRewrite(reason);
</s> add const isFiltered = checkFiltered(reason);
const isRewrite = checkRewrite(reason); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61d8ec8dae8b05b7f123478fb21763c0fc3ba307 | client/src/components/Filters/Check/Info.js |
if (onlyFiltered) {
return (
<div className={`card mb-0 p-3 ${color}`}>
<div>
<strong>{hostname}</strong>
</div>
<div>{title}</div>
</div>
);
}
| <mask> || checkParental(reason);
<mask> const title = getTitle(reason, filterName, t, onlyFiltered);
<mask> const color = getColor(reason);
<mask>
<mask> return (
<mask> <div className={`card mb-0 p-3 ${color}`}>
<mask> <div>
<mask> <strong>{hostname}</strong>
</s> - client: fix wrong statuses for Safebrowsing, Parental control, Safe search </s> remove const title = getTitle(reason, filterName, t);
</s> add const onlyFiltered = checkSafeSearch(reason)
|| checkSafeBrowsing(reason)
|| checkParental(reason);
const title = getTitle(reason, filterName, t, onlyFiltered); </s> remove const getTitle = (reason, filterName, t) => {
</s> add const getTitle = (reason, filterName, t, onlyFiltered) => { </s> remove const isFiltered = this.checkFiltered(reason);
const isRewrite = this.checkRewrite(reason);
</s> add const isFiltered = checkFiltered(reason);
const isRewrite = checkRewrite(reason); </s> remove const isFiltered = this.checkFiltered(reason);
const isBlackList = this.checkBlackList(reason);
const isRewrite = this.checkRewrite(reason);
const isWhiteList = this.checkWhiteList(reason);
const isBlockedService = this.checkBlockedService(reason);
</s> add const isFiltered = checkFiltered(reason);
const isBlackList = checkBlackList(reason);
const isRewrite = checkRewrite(reason);
const isWhiteList = checkWhiteList(reason);
const isBlockedService = checkBlockedService(reason); | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61d8ec8dae8b05b7f123478fb21763c0fc3ba307 | client/src/components/Filters/Check/Info.js |
checkFiltered,
checkRewrite,
checkWhiteList,
checkBlackList,
checkBlockedService, | <mask> import {
<mask> formatTime,
<mask> formatDateTime,
<mask> isToday,
<mask> } from '../../helpers/helpers';
<mask> import { SERVICES, TABLE_DEFAULT_PAGE_SIZE, CUSTOM_FILTERING_RULES_ID, FILTERED } from '../../helpers/constants';
<mask> import { getTrackerData } from '../../helpers/trackers/trackers';
<mask> import { formatClientCell } from '../../helpers/formatClientCell';
<mask>
</s> - client: fix wrong statuses for Safebrowsing, Parental control, Safe search </s> remove import { SERVICES, FILTERED_STATUS, TABLE_DEFAULT_PAGE_SIZE, CUSTOM_FILTERING_RULES_ID } from '../../helpers/constants';
</s> add import { SERVICES, TABLE_DEFAULT_PAGE_SIZE, CUSTOM_FILTERING_RULES_ID, FILTERED } from '../../helpers/constants'; </s> remove import { checkFiltered, checkRewrite, checkBlackList, checkNotFilteredNotFound, checkWhiteList } from '../../../helpers/helpers';
</s> add import {
checkFiltered,
checkRewrite,
checkBlackList,
checkNotFilteredNotFound,
checkWhiteList,
checkSafeSearch,
checkSafeBrowsing,
checkParental,
} from '../../../helpers/helpers';
import { FILTERED } from '../../../helpers/constants'; </s> remove } else if (this.checkRewrite(reason)) {
</s> add } else if (checkRewrite(reason)) { </s> remove if (this.checkFiltered(reason)) {
</s> add if (checkFiltered(reason)) { </s> remove } else if (this.checkWhiteList(reason)) {
</s> add } else if (checkWhiteList(reason)) { | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61d8ec8dae8b05b7f123478fb21763c0fc3ba307 | client/src/components/Logs/index.js |
import { SERVICES, TABLE_DEFAULT_PAGE_SIZE, CUSTOM_FILTERING_RULES_ID, FILTERED } from '../../helpers/constants'; | <mask> formatTime,
<mask> formatDateTime,
<mask> isToday,
<mask> } from '../../helpers/helpers';
<mask> import { SERVICES, FILTERED_STATUS, TABLE_DEFAULT_PAGE_SIZE, CUSTOM_FILTERING_RULES_ID } from '../../helpers/constants';
<mask> import { getTrackerData } from '../../helpers/trackers/trackers';
<mask> import { formatClientCell } from '../../helpers/formatClientCell';
<mask>
<mask> import Filters from './Filters';
<mask> import PageTitle from '../ui/PageTitle';
</s> - client: fix wrong statuses for Safebrowsing, Parental control, Safe search </s> remove import { checkFiltered, checkRewrite, checkBlackList, checkNotFilteredNotFound, checkWhiteList } from '../../../helpers/helpers';
</s> add import {
checkFiltered,
checkRewrite,
checkBlackList,
checkNotFilteredNotFound,
checkWhiteList,
checkSafeSearch,
checkSafeBrowsing,
checkParental,
} from '../../../helpers/helpers';
import { FILTERED } from '../../../helpers/constants'; </s> remove } else if (this.checkRewrite(reason)) {
</s> add } else if (checkRewrite(reason)) { </s> remove if (this.checkFiltered(reason)) {
</s> add if (checkFiltered(reason)) { </s> remove } else if (this.checkWhiteList(reason)) {
</s> add } else if (checkWhiteList(reason)) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61d8ec8dae8b05b7f123478fb21763c0fc3ba307 | client/src/components/Logs/index.js |
<mask>
<mask> const TABLE_FIRST_PAGE = 0;
<mask> const INITIAL_REQUEST = true;
<mask> const INITIAL_REQUEST_DATA = ['', TABLE_FIRST_PAGE, INITIAL_REQUEST];
<mask> const FILTERED_REASON = 'Filtered';
<mask>
<mask> class Logs extends Component {
<mask> componentDidMount() {
<mask> this.props.setLogsPage(TABLE_FIRST_PAGE);
<mask> this.getLogs(...INITIAL_REQUEST_DATA);
</s> - client: fix wrong statuses for Safebrowsing, Parental control, Safe search </s> remove const isFiltered = this.checkFiltered(reason);
const isBlackList = this.checkBlackList(reason);
const isRewrite = this.checkRewrite(reason);
const isWhiteList = this.checkWhiteList(reason);
const isBlockedService = this.checkBlockedService(reason);
</s> add const isFiltered = checkFiltered(reason);
const isBlackList = checkBlackList(reason);
const isRewrite = checkRewrite(reason);
const isWhiteList = checkWhiteList(reason);
const isBlockedService = checkBlockedService(reason); </s> remove const isFiltered = this.checkFiltered(reason);
const isRewrite = this.checkRewrite(reason);
</s> add const isFiltered = checkFiltered(reason);
const isRewrite = checkRewrite(reason); </s> remove const filterKey = reason.replace(FILTERED_REASON, '');
</s> add const filterKey = reason.replace(FILTERED, ''); </s> remove const title = getTitle(reason, filterName, t);
</s> add const onlyFiltered = checkSafeSearch(reason)
|| checkSafeBrowsing(reason)
|| checkParental(reason);
const title = getTitle(reason, filterName, t, onlyFiltered); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61d8ec8dae8b05b7f123478fb21763c0fc3ba307 | client/src/components/Logs/index.js |
|
<mask> </div>
<mask> );
<mask> }
<mask>
<mask> checkFiltered = reason => reason.indexOf(FILTERED_REASON) === 0;
<mask>
<mask> checkRewrite = reason => reason === FILTERED_STATUS.REWRITE;
<mask>
<mask> checkWhiteList = reason => reason === FILTERED_STATUS.NOT_FILTERED_WHITE_LIST;
<mask>
<mask> checkBlackList = reason => reason === FILTERED_STATUS.FILTERED_BLACK_LIST;
<mask>
<mask> checkBlockedService = reason => reason === FILTERED_STATUS.FILTERED_BLOCKED_SERVICE;
<mask>
<mask> getDateCell = row => CellWrap(
<mask> row,
<mask> (isToday(row.value) ? formatTime : formatDateTime),
<mask> formatDateTime,
<mask> );
</s> - client: fix wrong statuses for Safebrowsing, Parental control, Safe search </s> remove if (this.checkFiltered(reason)) {
</s> add if (checkFiltered(reason)) { </s> remove const filterKey = reason.replace(FILTERED_REASON, '');
</s> add const filterKey = reason.replace(FILTERED, ''); </s> remove const isFiltered = this.checkFiltered(reason);
const isBlackList = this.checkBlackList(reason);
const isRewrite = this.checkRewrite(reason);
const isWhiteList = this.checkWhiteList(reason);
const isBlockedService = this.checkBlockedService(reason);
</s> add const isFiltered = checkFiltered(reason);
const isBlackList = checkBlackList(reason);
const isRewrite = checkRewrite(reason);
const isWhiteList = checkWhiteList(reason);
const isBlockedService = checkBlockedService(reason); </s> remove import { checkFiltered, checkRewrite, checkBlackList, checkNotFilteredNotFound, checkWhiteList } from '../../../helpers/helpers';
</s> add import {
checkFiltered,
checkRewrite,
checkBlackList,
checkNotFilteredNotFound,
checkWhiteList,
checkSafeSearch,
checkSafeBrowsing,
checkParental,
} from '../../../helpers/helpers';
import { FILTERED } from '../../../helpers/constants'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61d8ec8dae8b05b7f123478fb21763c0fc3ba307 | client/src/components/Logs/index.js |
|
const isFiltered = checkFiltered(reason);
const isBlackList = checkBlackList(reason);
const isRewrite = checkRewrite(reason);
const isWhiteList = checkWhiteList(reason);
const isBlockedService = checkBlockedService(reason); | <mask> } = original;
<mask> const { t, filtering } = this.props;
<mask> const { filters } = filtering;
<mask>
<mask> const isFiltered = this.checkFiltered(reason);
<mask> const isBlackList = this.checkBlackList(reason);
<mask> const isRewrite = this.checkRewrite(reason);
<mask> const isWhiteList = this.checkWhiteList(reason);
<mask> const isBlockedService = this.checkBlockedService(reason);
<mask> const isBlockedCnameIp = originalAnswer;
<mask>
<mask> const filterKey = reason.replace(FILTERED_REASON, '');
<mask> const parsedFilteredReason = t('query_log_filtered', { filter: filterKey });
<mask> const currentService = SERVICES.find(service => service.id === original.serviceName);
</s> - client: fix wrong statuses for Safebrowsing, Parental control, Safe search </s> remove const filterKey = reason.replace(FILTERED_REASON, '');
</s> add const filterKey = reason.replace(FILTERED, ''); </s> remove const isFiltered = this.checkFiltered(reason);
const isRewrite = this.checkRewrite(reason);
</s> add const isFiltered = checkFiltered(reason);
const isRewrite = checkRewrite(reason); </s> remove const title = getTitle(reason, filterName, t);
</s> add const onlyFiltered = checkSafeSearch(reason)
|| checkSafeBrowsing(reason)
|| checkParental(reason);
const title = getTitle(reason, filterName, t, onlyFiltered); </s> remove const FILTERED_REASON = 'Filtered';
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61d8ec8dae8b05b7f123478fb21763c0fc3ba307 | client/src/components/Logs/index.js |
const filterKey = reason.replace(FILTERED, ''); | <mask> const isWhiteList = this.checkWhiteList(reason);
<mask> const isBlockedService = this.checkBlockedService(reason);
<mask> const isBlockedCnameIp = originalAnswer;
<mask>
<mask> const filterKey = reason.replace(FILTERED_REASON, '');
<mask> const parsedFilteredReason = t('query_log_filtered', { filter: filterKey });
<mask> const currentService = SERVICES.find(service => service.id === original.serviceName);
<mask> const serviceName = currentService && currentService.name;
<mask> const filterName = this.getFilterName(filters, filterId, t);
<mask>
</s> - client: fix wrong statuses for Safebrowsing, Parental control, Safe search </s> remove const isFiltered = this.checkFiltered(reason);
const isBlackList = this.checkBlackList(reason);
const isRewrite = this.checkRewrite(reason);
const isWhiteList = this.checkWhiteList(reason);
const isBlockedService = this.checkBlockedService(reason);
</s> add const isFiltered = checkFiltered(reason);
const isBlackList = checkBlackList(reason);
const isRewrite = checkRewrite(reason);
const isWhiteList = checkWhiteList(reason);
const isBlockedService = checkBlockedService(reason); </s> remove const title = getTitle(reason, filterName, t);
</s> add const onlyFiltered = checkSafeSearch(reason)
|| checkSafeBrowsing(reason)
|| checkParental(reason);
const title = getTitle(reason, filterName, t, onlyFiltered); </s> remove const isFiltered = this.checkFiltered(reason);
const isRewrite = this.checkRewrite(reason);
</s> add const isFiltered = checkFiltered(reason);
const isRewrite = checkRewrite(reason); </s> remove const FILTERED_REASON = 'Filtered';
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61d8ec8dae8b05b7f123478fb21763c0fc3ba307 | client/src/components/Logs/index.js |
const isFiltered = checkFiltered(reason);
const isRewrite = checkRewrite(reason); | <mask> getClientCell = (row) => {
<mask> const { original } = row;
<mask> const { t } = this.props;
<mask> const { reason, domain } = original;
<mask> const isFiltered = this.checkFiltered(reason);
<mask> const isRewrite = this.checkRewrite(reason);
<mask>
<mask> return (
<mask> <Fragment>
<mask> <div className="logs__row logs__row--overflow logs__row--column">
<mask> {formatClientCell(row, t)}
</s> - client: fix wrong statuses for Safebrowsing, Parental control, Safe search </s> remove const isFiltered = this.checkFiltered(reason);
const isBlackList = this.checkBlackList(reason);
const isRewrite = this.checkRewrite(reason);
const isWhiteList = this.checkWhiteList(reason);
const isBlockedService = this.checkBlockedService(reason);
</s> add const isFiltered = checkFiltered(reason);
const isBlackList = checkBlackList(reason);
const isRewrite = checkRewrite(reason);
const isWhiteList = checkWhiteList(reason);
const isBlockedService = checkBlockedService(reason); </s> remove const getTitle = (reason, filterName, t) => {
</s> add const getTitle = (reason, filterName, t, onlyFiltered) => { </s> remove const title = getTitle(reason, filterName, t);
</s> add const onlyFiltered = checkSafeSearch(reason)
|| checkSafeBrowsing(reason)
|| checkParental(reason);
const title = getTitle(reason, filterName, t, onlyFiltered); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61d8ec8dae8b05b7f123478fb21763c0fc3ba307 | client/src/components/Logs/index.js |
if (checkFiltered(reason)) { | <mask> }
<mask>
<mask> const { reason } = rowInfo.original;
<mask>
<mask> if (this.checkFiltered(reason)) {
<mask> return {
<mask> className: 'red',
<mask> };
<mask> } else if (this.checkWhiteList(reason)) {
<mask> return {
</s> - client: fix wrong statuses for Safebrowsing, Parental control, Safe search </s> remove } else if (this.checkWhiteList(reason)) {
</s> add } else if (checkWhiteList(reason)) { </s> remove } else if (this.checkRewrite(reason)) {
</s> add } else if (checkRewrite(reason)) { </s> remove const getTitle = (reason, filterName, t) => {
</s> add const getTitle = (reason, filterName, t, onlyFiltered) => { </s> remove const isFiltered = this.checkFiltered(reason);
const isRewrite = this.checkRewrite(reason);
</s> add const isFiltered = checkFiltered(reason);
const isRewrite = checkRewrite(reason); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61d8ec8dae8b05b7f123478fb21763c0fc3ba307 | client/src/components/Logs/index.js |
} else if (checkWhiteList(reason)) { | <mask> if (this.checkFiltered(reason)) {
<mask> return {
<mask> className: 'red',
<mask> };
<mask> } else if (this.checkWhiteList(reason)) {
<mask> return {
<mask> className: 'green',
<mask> };
<mask> } else if (this.checkRewrite(reason)) {
<mask> return {
</s> - client: fix wrong statuses for Safebrowsing, Parental control, Safe search </s> remove } else if (this.checkRewrite(reason)) {
</s> add } else if (checkRewrite(reason)) { </s> remove if (this.checkFiltered(reason)) {
</s> add if (checkFiltered(reason)) { </s> remove const getTitle = (reason, filterName, t) => {
</s> add const getTitle = (reason, filterName, t, onlyFiltered) => { </s> remove import { checkFiltered, checkRewrite, checkBlackList, checkNotFilteredNotFound, checkWhiteList } from '../../../helpers/helpers';
</s> add import {
checkFiltered,
checkRewrite,
checkBlackList,
checkNotFilteredNotFound,
checkWhiteList,
checkSafeSearch,
checkSafeBrowsing,
checkParental,
} from '../../../helpers/helpers';
import { FILTERED } from '../../../helpers/constants'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61d8ec8dae8b05b7f123478fb21763c0fc3ba307 | client/src/components/Logs/index.js |
} else if (checkRewrite(reason)) { | <mask> } else if (this.checkWhiteList(reason)) {
<mask> return {
<mask> className: 'green',
<mask> };
<mask> } else if (this.checkRewrite(reason)) {
<mask> return {
<mask> className: 'blue',
<mask> };
<mask> }
<mask>
</s> - client: fix wrong statuses for Safebrowsing, Parental control, Safe search </s> remove } else if (this.checkWhiteList(reason)) {
</s> add } else if (checkWhiteList(reason)) { </s> remove if (this.checkFiltered(reason)) {
</s> add if (checkFiltered(reason)) { </s> remove const getTitle = (reason, filterName, t) => {
</s> add const getTitle = (reason, filterName, t, onlyFiltered) => { </s> remove import { checkFiltered, checkRewrite, checkBlackList, checkNotFilteredNotFound, checkWhiteList } from '../../../helpers/helpers';
</s> add import {
checkFiltered,
checkRewrite,
checkBlackList,
checkNotFilteredNotFound,
checkWhiteList,
checkSafeSearch,
checkSafeBrowsing,
checkParental,
} from '../../../helpers/helpers';
import { FILTERED } from '../../../helpers/constants'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61d8ec8dae8b05b7f123478fb21763c0fc3ba307 | client/src/components/Logs/index.js |
FILTERED_SAFE_SEARCH: 'FilteredSafeSearch',
FILTERED_SAFE_BROWSING: 'FilteredSafeBrowsing',
FILTERED_PARENTAL: 'FilteredParental', | <mask> FILTERED_BLOCKED_SERVICE: 'FilteredBlockedService',
<mask> REWRITE: 'Rewrite',
<mask> };
<mask>
<mask> export const FILTERED = 'Filtered';
<mask> export const NOT_FILTERED = 'NotFiltered';
<mask>
<mask> export const STATS_INTERVALS_DAYS = [1, 7, 30, 90];
</s> - client: fix wrong statuses for Safebrowsing, Parental control, Safe search </s> remove const FILTERED_REASON = 'Filtered';
</s> add </s> remove const isFiltered = this.checkFiltered(reason);
const isBlackList = this.checkBlackList(reason);
const isRewrite = this.checkRewrite(reason);
const isWhiteList = this.checkWhiteList(reason);
const isBlockedService = this.checkBlockedService(reason);
</s> add const isFiltered = checkFiltered(reason);
const isBlackList = checkBlackList(reason);
const isRewrite = checkRewrite(reason);
const isWhiteList = checkWhiteList(reason);
const isBlockedService = checkBlockedService(reason); </s> remove const filterKey = reason.replace(FILTERED_REASON, '');
</s> add const filterKey = reason.replace(FILTERED, ''); </s> remove const isFiltered = this.checkFiltered(reason);
const isRewrite = this.checkRewrite(reason);
</s> add const isFiltered = checkFiltered(reason);
const isRewrite = checkRewrite(reason); </s> remove const title = getTitle(reason, filterName, t);
</s> add const onlyFiltered = checkSafeSearch(reason)
|| checkSafeBrowsing(reason)
|| checkParental(reason);
const title = getTitle(reason, filterName, t, onlyFiltered); | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61d8ec8dae8b05b7f123478fb21763c0fc3ba307 | client/src/helpers/constants.js |
"blocked_by": "\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u043c\u0438", | <mask> "disable_protection": "\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0430\u0449\u0438\u0442\u0443",
<mask> "disabled_protection": "\u0417\u0430\u0449\u0438\u0442\u0430 \u0432\u044b\u043a\u043b.",
<mask> "refresh_statics": "\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443",
<mask> "dns_query": "DNS-\u0437\u0430\u043f\u0440\u043e\u0441\u044b",
<mask> "blocked_by": "\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0424\u0438\u043b\u044c\u0442\u0440\u044b",
<mask> "stats_malware_phishing": "\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0435 \u0438 \u0444\u0438\u0448\u0438\u043d\u0433\u043e\u0432\u044b\u0435 \u0441\u0430\u0439\u0442\u044b",
<mask> "stats_adult": "\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \"\u0432\u0437\u0440\u043e\u0441\u043b\u044b\u0435\" \u0441\u0430\u0439\u0442\u044b",
<mask> "stats_query_domain": "\u0427\u0430\u0441\u0442\u043e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0434\u043e\u043c\u0435\u043d\u044b",
<mask> "for_last_24_hours": "\u0437\u0430 24 \u0447\u0430\u0441\u0430",
<mask> "no_domains_found": "\u0414\u043e\u043c\u0435\u043d\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b",
</s> Update ru translation
Closes #536 </s> remove "filter_label": "\u0424\u0438\u043b\u044c\u0442\u0440"
</s> add "filter_label": "\u0424\u0438\u043b\u044c\u0442\u0440",
"unknown_filter": "\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 {{filterId}}" | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61f4b6f1aee8581e3c659569e0629f1e7280e73e | client/src/__locales/ru.json |
"example_upstream_sdns": "\u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href='https:\/\/dnscrypt.info\/stamps\/' target='_blank'>DNS Stamps<\/a> \u0434\u043b\u044f <a href='https:\/\/dnscrypt.info\/' target='_blank'>DNSCrypt<\/a> \u0438\u043b\u0438 <a href='https:\/\/en.wikipedia.org\/wiki\/DNS_over_HTTPS' target='_blank'>DNS-over-HTTPS<\/a> \u0440\u0435\u0437\u043e\u043b\u0432\u0435\u0440\u043e\u0432", | <mask> "example_upstream_regular": "\u043e\u0431\u044b\u0447\u043d\u044b\u0439 DNS (\u043f\u043e\u0432\u0435\u0440\u0445 UDP)",
<mask> "example_upstream_dot": "\u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 <a href='https:\/\/en.wikipedia.org\/wiki\/DNS_over_TLS' target='_blank'>DNS-\u043f\u043e\u0432\u0435\u0440\u0445-TLS<\/a>",
<mask> "example_upstream_doh": "\u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 <a href='https:\/\/en.wikipedia.org\/wiki\/DNS_over_HTTPS' target='_blank'>DNS-\u043f\u043e\u0432\u0435\u0440\u0445-HTTPS<\/a>",
<mask> "example_upstream_tcp": "\u043e\u0431\u044b\u0447\u043d\u044b\u0439 DNS (\u043f\u043e\u0432\u0435\u0440\u0445 TCP)",
<mask> "all_filters_up_to_date_toast": "\u0412\u0441\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b",
<mask> "updated_upstream_dns_toast": "Upstream DNS-\u0441\u0435\u0440\u0432\u0435\u0440\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b",
<mask> "dns_test_ok_toast": "\u0423\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b DNS \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e",
<mask> "dns_test_not_ok_toast": "\u0421\u0435\u0440\u0432\u0435\u0440 \"{{key}}\": \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f",
<mask> "unblock_btn": "\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c",
</s> Update ru translation
Closes #536 </s> remove "filter_label": "\u0424\u0438\u043b\u044c\u0442\u0440"
</s> add "filter_label": "\u0424\u0438\u043b\u044c\u0442\u0440",
"unknown_filter": "\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 {{filterId}}" </s> remove "blocked_by": "\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0424\u0438\u043b\u044c\u0442\u0440\u044b",
</s> add "blocked_by": "\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u043c\u0438", | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61f4b6f1aee8581e3c659569e0629f1e7280e73e | client/src/__locales/ru.json |
"filter_label": "\u0424\u0438\u043b\u044c\u0442\u0440",
"unknown_filter": "\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 {{filterId}}" | <mask> "source_label": "\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a",
<mask> "found_in_known_domain_db": "\u041d\u0430\u0439\u0434\u0435\u043d \u0432 \u0431\u0430\u0437\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432.",
<mask> "category_label": "\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f",
<mask> "rule_label": "\u041f\u0440\u0430\u0432\u0438\u043b\u043e",
<mask> "filter_label": "\u0424\u0438\u043b\u044c\u0442\u0440"
<mask> } </s> Update ru translation
Closes #536 </s> remove "blocked_by": "\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0424\u0438\u043b\u044c\u0442\u0440\u044b",
</s> add "blocked_by": "\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u043c\u0438", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/61f4b6f1aee8581e3c659569e0629f1e7280e73e | client/src/__locales/ru.json |
if ($2 == "0.0.0.0" || $2 == "'::'") { | <mask> if (FNR - prev_line == 1) {
<mask> addrs[$2] = true
<mask> prev_line = FNR
<mask>
<mask> if ($2 == "0.0.0.0" || $2 == "\"\"" || $2 == "'::'") {
<mask> # Drop all the other addresses.
<mask> delete addrs
<mask> addrs[""] = true
<mask> prev_line = -1
<mask> }
</s> Pull request 1840: 5752-unspec-ipv6
Merge in DNS/adguard-home from 5752-unspec-ipv6 to master
Closes #5752.
Squashed commit of the following:
commit 654b808d17c6d2374b6be919515113b361fc5ff7
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 21 18:11:34 2023 +0300
home: imp docs
commit 28b4c36df790f1eaa05b11a1f0a7b986894d37dc
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 21 16:50:16 2023 +0300
all: fix empty bind host </s> remove log.Printf("Couldn't parse config file: %s", err)
</s> add log.Printf("parsing config file for upgrade: %s", err)
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/620b51e3ea1bfdd712f24873acf5cde57837b720 | docker/dns-bind.awk |
// validateBindHosts returns error if any of binding hosts from configuration is
// not a valid IP address.
func validateBindHosts(conf *configuration) (err error) {
if !conf.BindHost.IsValid() {
return errors.Error("bind_host is not a valid ip address")
}
for i, addr := range conf.DNS.BindHosts {
if !addr.IsValid() {
return fmt.Errorf("dns.bind_hosts at index %d is not a valid ip address", i)
}
}
return nil
}
| <mask> }
<mask>
<mask> // parseConfig loads configuration from the YAML file
<mask> func parseConfig() (err error) {
<mask> var fileData []byte
<mask> fileData, err = readConfigFile()
</s> Pull request 1840: 5752-unspec-ipv6
Merge in DNS/adguard-home from 5752-unspec-ipv6 to master
Closes #5752.
Squashed commit of the following:
commit 654b808d17c6d2374b6be919515113b361fc5ff7
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 21 18:11:34 2023 +0300
home: imp docs
commit 28b4c36df790f1eaa05b11a1f0a7b986894d37dc
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 21 16:50:16 2023 +0300
all: fix empty bind host </s> remove log.Printf("Couldn't parse config file: %s", err)
</s> add log.Printf("parsing config file for upgrade: %s", err)
</s> remove if ($2 == "0.0.0.0" || $2 == "\"\"" || $2 == "'::'") {
</s> add if ($2 == "0.0.0.0" || $2 == "'::'") { | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/620b51e3ea1bfdd712f24873acf5cde57837b720 | internal/home/config.go |
// Don't wrap the error since it's informative enough as is.
return err
}
err = validateBindHosts(config)
if err != nil {
// Don't wrap the error since it's informative enough as is. | <mask>
<mask> config.fileData = nil
<mask> err = yaml.Unmarshal(fileData, &config)
<mask> if err != nil {
<mask> return err
<mask> }
<mask>
<mask> tcpPorts := aghalg.UniqChecker[tcpPort]{}
<mask> addPorts(tcpPorts, tcpPort(config.BindPort))
<mask>
</s> Pull request 1840: 5752-unspec-ipv6
Merge in DNS/adguard-home from 5752-unspec-ipv6 to master
Closes #5752.
Squashed commit of the following:
commit 654b808d17c6d2374b6be919515113b361fc5ff7
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 21 18:11:34 2023 +0300
home: imp docs
commit 28b4c36df790f1eaa05b11a1f0a7b986894d37dc
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 21 16:50:16 2023 +0300
all: fix empty bind host </s> remove log.Printf("Couldn't parse config file: %s", err)
</s> add log.Printf("parsing config file for upgrade: %s", err)
</s> remove if ($2 == "0.0.0.0" || $2 == "\"\"" || $2 == "'::'") {
</s> add if ($2 == "0.0.0.0" || $2 == "'::'") { | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/620b51e3ea1bfdd712f24873acf5cde57837b720 | internal/home/config.go |
log.Printf("parsing config file for upgrade: %s", err)
| <mask> }
<mask>
<mask> err = yaml.Unmarshal(body, &diskConf)
<mask> if err != nil {
<mask> log.Printf("Couldn't parse config file: %s", err)
<mask> return err
<mask> }
<mask>
<mask> schemaVersionInterface, ok := diskConf["schema_version"]
<mask> log.Tracef("got schema version %v", schemaVersionInterface)
</s> Pull request 1840: 5752-unspec-ipv6
Merge in DNS/adguard-home from 5752-unspec-ipv6 to master
Closes #5752.
Squashed commit of the following:
commit 654b808d17c6d2374b6be919515113b361fc5ff7
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 21 18:11:34 2023 +0300
home: imp docs
commit 28b4c36df790f1eaa05b11a1f0a7b986894d37dc
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 21 16:50:16 2023 +0300
all: fix empty bind host </s> remove if ($2 == "0.0.0.0" || $2 == "\"\"" || $2 == "'::'") {
</s> add if ($2 == "0.0.0.0" || $2 == "'::'") { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/620b51e3ea1bfdd712f24873acf5cde57837b720 | internal/home/upgrade.go |
// Stats store LookupStats for safebrowsing, parental and safesearch | <mask> Pending int64 // number of currently pending HTTP requests
<mask> PendingMax int64 // maximum number of pending HTTP requests
<mask> }
<mask>
<mask> // Stats store LookupStats for both safebrowsing and parental
<mask> type Stats struct {
<mask> Safebrowsing LookupStats
<mask> Parental LookupStats
<mask> }
<mask>
</s> Fix #576 - Fix safesearch | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/623c3bba09a8600178eee1ae291ff6e0c287aa4e | dnsfilter/dnsfilter.go |
Safesearch LookupStats | <mask> Safebrowsing LookupStats
<mask> Parental LookupStats
<mask> }
<mask>
<mask> // Dnsfilter holds added rules and performs hostname matches against the rules
<mask> type Dnsfilter struct {
<mask> storage map[string]bool // rule storage, not used for matching, just for filtering out duplicates
<mask> storageMutex sync.RWMutex
</s> Fix #576 - Fix safesearch </s> remove // Stats store LookupStats for both safebrowsing and parental
</s> add // Stats store LookupStats for safebrowsing, parental and safesearch | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/623c3bba09a8600178eee1ae291ff6e0c287aa4e | dnsfilter/dnsfilter.go |
safeSearchCache gcache.Cache | <mask> var (
<mask> stats Stats
<mask> safebrowsingCache gcache.Cache
<mask> parentalCache gcache.Cache
<mask> )
<mask>
<mask> // Result holds state of hostname check
<mask> type Result struct {
</s> Fix #576 - Fix safesearch </s> remove // Stats store LookupStats for both safebrowsing and parental
</s> add // Stats store LookupStats for safebrowsing, parental and safesearch | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/623c3bba09a8600178eee1ae291ff6e0c287aa4e | dnsfilter/dnsfilter.go |
// check safeSearch if no match
if d.SafeSearchEnabled {
result, err = d.checkSafeSearch(host)
if err != nil {
log.Printf("Failed to safesearch HTTP lookup, ignoring check: %v", err)
return Result{}, nil
}
if result.Reason.Matched() {
return result, nil
}
}
| <mask> }
<mask>
<mask> // check safebrowsing if no match
<mask> if d.SafeBrowsingEnabled {
<mask> result, err = d.checkSafeBrowsing(host)
<mask> if err != nil {
</s> Fix #576 - Fix safesearch </s> remove // Stats store LookupStats for both safebrowsing and parental
</s> add // Stats store LookupStats for safebrowsing, parental and safesearch | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/623c3bba09a8600178eee1ae291ff6e0c287aa4e | dnsfilter/dnsfilter.go |
"net" | <mask> import (
<mask> "archive/zip"
<mask> "bytes"
<mask> "io/ioutil"
<mask> "net/http"
<mask> "net/http/httptest"
<mask> "path"
<mask> "runtime/pprof"
</s> Fix #576 - Fix safesearch </s> remove // Stats store LookupStats for both safebrowsing and parental
</s> add // Stats store LookupStats for safebrowsing, parental and safesearch | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/623c3bba09a8600178eee1ae291ff6e0c287aa4e | dnsfilter/dnsfilter_test.go |
"www.yandex.com": "213.180.193.56",
"www.yandex.ru": "213.180.193.56",
"www.yandex.ua": "213.180.193.56",
"www.yandex.by": "213.180.193.56",
"www.yandex.kz": "213.180.193.56", | <mask> "yandex.by": "213.180.193.56",
<mask> "yandex.kz": "213.180.193.56",
<mask>
<mask> "www.bing.com": "strict.bing.com",
<mask>
<mask> "www.google.com": "forcesafesearch.google.com",
<mask> "www.google.ad": "forcesafesearch.google.com",
<mask> "www.google.ae": "forcesafesearch.google.com",
</s> Fix #576 - Fix safesearch </s> remove // Stats store LookupStats for both safebrowsing and parental
</s> add // Stats store LookupStats for safebrowsing, parental and safesearch | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/623c3bba09a8600178eee1ae291ff6e0c287aa4e | dnsfilter/safesearch.go |
"strings" | <mask> "net/http"
<mask> "strconv"
<mask> "sync"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/util"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/NYTimes/gziphandler"
</s> Pull request: home: add a patch against the global pprof handlers
Merge in DNS/adguard-home from 2336-pprof to master
Closes #2336.
Squashed commit of the following:
commit 855e133b17da4274bef7dec5c3b7db73486d97db
Author: Ainar Garipov <[email protected]>
Date: Thu Nov 19 14:49:22 2020 +0300
home: add a patch against the global pprof handlers | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62a8fe0b73d16b9f71234f6b4efbba560ba470e2 | internal/home/web.go |
Handler: filterPPROF(http.DefaultServeMux), | <mask> web.httpServer = &http.Server{
<mask> ErrorLog: web.errLogger,
<mask> Addr: address,
<mask> }
<mask> err := web.httpServer.ListenAndServe()
<mask> if err != http.ErrServerClosed {
<mask> cleanupAlways()
<mask> log.Fatal(err)
<mask> }
</s> Pull request: home: add a patch against the global pprof handlers
Merge in DNS/adguard-home from 2336-pprof to master
Closes #2336.
Squashed commit of the following:
commit 855e133b17da4274bef7dec5c3b7db73486d97db
Author: Ainar Garipov <[email protected]>
Date: Thu Nov 19 14:49:22 2020 +0300
home: add a patch against the global pprof handlers | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62a8fe0b73d16b9f71234f6b4efbba560ba470e2 | internal/home/web.go |
// TODO(a.garipov): We currently have to use this, because everything registers
// its HTTP handlers in http.DefaultServeMux. In the future, refactor our HTTP
// API initialization process and stop using the gosh darn http.DefaultServeMux
// for anything at all. Gosh darn global variables.
func filterPPROF(h http.Handler) (filtered http.Handler) {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if strings.HasPrefix(r.URL.Path, "/debug/pprof") {
http.NotFound(w, r)
return
}
h.ServeHTTP(w, r)
})
}
| <mask> // We use ErrServerClosed as a sign that we need to rebind on new address, so go back to the start of the loop
<mask> }
<mask> }
<mask>
<mask> // Close - stop HTTP server, possibly waiting for all active connections to be closed
<mask> func (web *Web) Close() {
<mask> log.Info("Stopping HTTP server...")
<mask> web.httpsServer.cond.L.Lock()
</s> Pull request: home: add a patch against the global pprof handlers
Merge in DNS/adguard-home from 2336-pprof to master
Closes #2336.
Squashed commit of the following:
commit 855e133b17da4274bef7dec5c3b7db73486d97db
Author: Ainar Garipov <[email protected]>
Date: Thu Nov 19 14:49:22 2020 +0300
home: add a patch against the global pprof handlers | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62a8fe0b73d16b9f71234f6b4efbba560ba470e2 | internal/home/web.go |
<mask> "netname": "Network name",
<mask> "descr": "Description",
<mask> "whois": "Whois",
<mask> "filtering_rules_learn_more": "<0>Learn more</0> about creating your own hosts blocklists."
<mask> } </s> + client: load additional search results </s> remove import { SERVICES, FILTERED_STATUS, DEFAULT_LOGS_FILTER, RESPONSE_FILTER, TABLE_DEFAULT_PAGE_SIZE } from '../../helpers/constants';
</s> add import { SERVICES, FILTERED_STATUS, TABLE_DEFAULT_PAGE_SIZE } from '../../helpers/constants'; </s> remove const { enabled, processingGetConfig } = queryLogs;
</s> add const {
enabled, processingGetConfig, processingAdditionalLogs, processingGetLogs,
} = queryLogs; </s> remove <Form
initialValues={filter}
onChange={this.handleFormChange}
/>
</s> add <Card bodyType={cardBodyClass}>
<Form
initialValues={filter}
onChange={this.handleFormChange}
/>
</Card> </s> remove this.getLogs(oldest, filter, page);
} else {
this.props.setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE });
</s> add this.getLogs(oldest, page); | [
"keep",
"keep",
"keep",
"keep",
"replace"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/__locales/en.json |
|
import { TABLE_DEFAULT_PAGE_SIZE } from '../helpers/constants'; | <mask>
<mask> import apiClient from '../api/Api';
<mask> import { addErrorToast, addSuccessToast } from './index';
<mask> import { normalizeLogs } from '../helpers/helpers';
<mask>
<mask> const getLogsWithParams = async (config) => {
<mask> const { older_than, filter, ...values } = config;
<mask> const rawLogs = await apiClient.getQueryLog({ ...filter, older_than });
</s> + client: load additional search results </s> remove import { SERVICES, FILTERED_STATUS, DEFAULT_LOGS_FILTER, RESPONSE_FILTER, TABLE_DEFAULT_PAGE_SIZE } from '../../helpers/constants';
</s> add import { SERVICES, FILTERED_STATUS, TABLE_DEFAULT_PAGE_SIZE } from '../../helpers/constants'; </s> remove const INITIAL_REQUEST_DATA = ['', DEFAULT_LOGS_FILTER, TABLE_FIRST_PAGE, TABLE_DEFAULT_PAGE_SIZE];
</s> add const INITIAL_REQUEST_DATA = ['', TABLE_FIRST_PAGE, TABLE_DEFAULT_PAGE_SIZE]; </s> remove const logs = await getLogsWithParams(config);
dispatch(getLogsSuccess(logs));
</s> add const { isFiltered, filter, page } = getState().queryLogs;
const data = await getLogsWithParams({ ...config, filter });
if (isFiltered) {
const additionalData = await checkFilteredLogs(data, filter, dispatch);
const updatedData = additionalData.logs ? { ...data, ...additionalData } : data;
dispatch(getLogsSuccess(updatedData));
dispatch(setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE }));
} else {
dispatch(getLogsSuccess(data));
} | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/actions/queryLogs.js |
export const getLogs = config => async (dispatch, getState) => { | <mask> export const getLogsRequest = createAction('GET_LOGS_REQUEST');
<mask> export const getLogsFailure = createAction('GET_LOGS_FAILURE');
<mask> export const getLogsSuccess = createAction('GET_LOGS_SUCCESS');
<mask>
<mask> export const getLogs = config => async (dispatch) => {
<mask> dispatch(getLogsRequest());
<mask> try {
<mask> const logs = await getLogsWithParams(config);
<mask> dispatch(getLogsSuccess(logs));
<mask> } catch (error) {
</s> + client: load additional search results </s> remove const logs = await getLogsWithParams(config);
dispatch(getLogsSuccess(logs));
</s> add const { isFiltered, filter, page } = getState().queryLogs;
const data = await getLogsWithParams({ ...config, filter });
if (isFiltered) {
const additionalData = await checkFilteredLogs(data, filter, dispatch);
const updatedData = additionalData.logs ? { ...data, ...additionalData } : data;
dispatch(getLogsSuccess(updatedData));
dispatch(setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE }));
} else {
dispatch(getLogsSuccess(data));
} </s> remove const logs = await getLogsWithParams({ older_than: '', filter });
dispatch(setLogsFilterSuccess(logs));
</s> add const data = await getLogsWithParams({ older_than: '', filter });
const additionalData = await checkFilteredLogs(data, filter, dispatch);
const updatedData = additionalData.logs ? { ...data, ...additionalData } : data;
dispatch(setLogsFilterSuccess({ ...updatedData, filter })); </s> remove const {
filter, oldest, page,
} = this.props.queryLogs;
</s> add const { oldest, page } = this.props.queryLogs; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/actions/queryLogs.js |
const { isFiltered, filter, page } = getState().queryLogs;
const data = await getLogsWithParams({ ...config, filter });
if (isFiltered) {
const additionalData = await checkFilteredLogs(data, filter, dispatch);
const updatedData = additionalData.logs ? { ...data, ...additionalData } : data;
dispatch(getLogsSuccess(updatedData));
dispatch(setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE }));
} else {
dispatch(getLogsSuccess(data));
} | <mask>
<mask> export const getLogs = config => async (dispatch) => {
<mask> dispatch(getLogsRequest());
<mask> try {
<mask> const logs = await getLogsWithParams(config);
<mask> dispatch(getLogsSuccess(logs));
<mask> } catch (error) {
<mask> dispatch(addErrorToast({ error }));
<mask> dispatch(getLogsFailure(error));
<mask> }
<mask> };
</s> + client: load additional search results </s> remove export const getLogs = config => async (dispatch) => {
</s> add export const getLogs = config => async (dispatch, getState) => { </s> remove const logs = await getLogsWithParams({ older_than: '', filter });
dispatch(setLogsFilterSuccess(logs));
</s> add const data = await getLogsWithParams({ older_than: '', filter });
const additionalData = await checkFilteredLogs(data, filter, dispatch);
const updatedData = additionalData.logs ? { ...data, ...additionalData } : data;
dispatch(setLogsFilterSuccess({ ...updatedData, filter })); </s> remove getLogs = (older_than, filter, page) => {
</s> add getLogs = (older_than, page) => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/actions/queryLogs.js |
const data = await getLogsWithParams({ older_than: '', filter });
const additionalData = await checkFilteredLogs(data, filter, dispatch);
const updatedData = additionalData.logs ? { ...data, ...additionalData } : data;
dispatch(setLogsFilterSuccess({ ...updatedData, filter })); | <mask>
<mask> export const setLogsFilter = filter => async (dispatch) => {
<mask> dispatch(setLogsFilterRequest());
<mask> try {
<mask> const logs = await getLogsWithParams({ older_than: '', filter });
<mask> dispatch(setLogsFilterSuccess(logs));
<mask> dispatch(setLogsPage(0));
<mask> } catch (error) {
<mask> dispatch(addErrorToast({ error }));
<mask> dispatch(setLogsFilterFailure(error));
<mask> }
</s> + client: load additional search results </s> remove const logs = await getLogsWithParams(config);
dispatch(getLogsSuccess(logs));
</s> add const { isFiltered, filter, page } = getState().queryLogs;
const data = await getLogsWithParams({ ...config, filter });
if (isFiltered) {
const additionalData = await checkFilteredLogs(data, filter, dispatch);
const updatedData = additionalData.logs ? { ...data, ...additionalData } : data;
dispatch(getLogsSuccess(updatedData));
dispatch(setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE }));
} else {
dispatch(getLogsSuccess(data));
} </s> remove export const getLogs = config => async (dispatch) => {
</s> add export const getLogs = config => async (dispatch, getState) => { </s> remove getFilters = (filtered) => {
const {
domain, client, type, response,
} = filtered;
return {
filter_domain: domain || '',
filter_client: client || '',
filter_question_type: isValidQuestionType(type) ? type.toUpperCase() : '',
filter_response_status: response === RESPONSE_FILTER.FILTERED ? response : '',
};
};
</s> add getFilters = ({
filter_domain, filter_question_type, filter_response_status, filter_client,
}) => ({
filter_domain: filter_domain || '',
filter_question_type: isValidQuestionType(filter_question_type) ? filter_question_type.toUpperCase() : '',
filter_response_status: filter_response_status === RESPONSE_FILTER.FILTERED ? filter_response_status : '',
filter_client: filter_client || '',
}); </s> remove const { filter } = this.props;
</s> add const { filter, processingAdditionalLogs } = this.props;
const cardBodyClass = classnames({
'card-body': true,
'card-body--loading': processingAdditionalLogs,
}); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/actions/queryLogs.js |
<div className="col-6 col-sm-3 my-2"> | <mask>
<mask> return (
<mask> <form onSubmit={handleChange}>
<mask> <div className="row">
<mask> <div className="col-3">
<mask> <Field
<mask> id="domain"
<mask> name="domain"
<mask> component={renderFilterField}
<mask> type="text"
</s> + client: load additional search results </s> remove id="domain"
name="domain"
</s> add id="filter_domain"
name="filter_domain" </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> </s> remove id="client"
name="client"
</s> add id="filter_client"
name="filter_client" </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> </s> remove id="type"
name="type"
</s> add id="filter_question_type"
name="filter_question_type" | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/Filters/Form.js |
id="filter_domain"
name="filter_domain" | <mask> <form onSubmit={handleChange}>
<mask> <div className="row">
<mask> <div className="col-3">
<mask> <Field
<mask> id="domain"
<mask> name="domain"
<mask> component={renderFilterField}
<mask> type="text"
<mask> className="form-control"
<mask> placeholder={t('domain_name_table_header')}
<mask> tooltip={t('query_log_strict_search')}
</s> + client: load additional search results </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> </s> remove id="client"
name="client"
</s> add id="filter_client"
name="filter_client" </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> </s> remove id="type"
name="type"
</s> add id="filter_question_type"
name="filter_question_type" | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/Filters/Form.js |
<div className="col-6 col-sm-3 my-2"> | <mask> tooltip={t('query_log_strict_search')}
<mask> onChange={handleChange}
<mask> />
<mask> </div>
<mask> <div className="col-3">
<mask> <Field
<mask> id="type"
<mask> name="type"
<mask> component={renderField}
<mask> type="text"
</s> + client: load additional search results </s> remove id="type"
name="type"
</s> add id="filter_question_type"
name="filter_question_type" </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> </s> remove id="client"
name="client"
</s> add id="filter_client"
name="filter_client" </s> remove id="domain"
name="domain"
</s> add id="filter_domain"
name="filter_domain" </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/Filters/Form.js |
id="filter_question_type"
name="filter_question_type" | <mask> />
<mask> </div>
<mask> <div className="col-3">
<mask> <Field
<mask> id="type"
<mask> name="type"
<mask> component={renderField}
<mask> type="text"
<mask> className="form-control"
<mask> placeholder={t('type_table_header')}
<mask> onChange={handleChange}
</s> + client: load additional search results </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> </s> remove id="client"
name="client"
</s> add id="filter_client"
name="filter_client" </s> remove id="domain"
name="domain"
</s> add id="filter_domain"
name="filter_domain" </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/Filters/Form.js |
<div className="col-6 col-sm-3 my-2"> | <mask> placeholder={t('type_table_header')}
<mask> onChange={handleChange}
<mask> />
<mask> </div>
<mask> <div className="col-3">
<mask> <Field
<mask> name="response"
<mask> component="select"
<mask> className="form-control custom-select"
<mask> >
</s> + client: load additional search results </s> remove name="response"
</s> add name="filter_response_status" </s> remove id="type"
name="type"
</s> add id="filter_question_type"
name="filter_question_type" </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> </s> remove id="client"
name="client"
</s> add id="filter_client"
name="filter_client" | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/Filters/Form.js |
name="filter_response_status" | <mask> />
<mask> </div>
<mask> <div className="col-3">
<mask> <Field
<mask> name="response"
<mask> component="select"
<mask> className="form-control custom-select"
<mask> >
<mask> <option value={RESPONSE_FILTER.ALL}>
<mask> <Trans>show_all_filter_type</Trans>
</s> + client: load additional search results </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> </s> remove filterMethod: (filter, row) => {
if (filter.value === RESPONSE_FILTER.FILTERED) {
// eslint-disable-next-line no-underscore-dangle
const { reason } = row._original;
return this.checkFiltered(reason) || this.checkWhiteList(reason);
}
return true;
},
Filter: ({ filter, onChange }) => (
<select
className="form-control custom-select"
onChange={event => onChange(event.target.value)}
value={filter ? filter.value : RESPONSE_FILTER.ALL}
>
<option value={RESPONSE_FILTER.ALL}>
<Trans>show_all_filter_type</Trans>
</option>
<option value={RESPONSE_FILTER.FILTERED}>
<Trans>show_filtered_type</Trans>
</option>
</select>
),
</s> add </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> </s> remove id="type"
name="type"
</s> add id="filter_question_type"
name="filter_question_type" </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/Filters/Form.js |
<div className="col-6 col-sm-3 my-2"> | <mask> <Trans>show_filtered_type</Trans>
<mask> </option>
<mask> </Field>
<mask> </div>
<mask> <div className="col-3">
<mask> <Field
<mask> id="client"
<mask> name="client"
<mask> component={renderFilterField}
<mask> type="text"
</s> + client: load additional search results </s> remove id="client"
name="client"
</s> add id="filter_client"
name="filter_client" </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> </s> remove id="domain"
name="domain"
</s> add id="filter_domain"
name="filter_domain" </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> </s> remove id="type"
name="type"
</s> add id="filter_question_type"
name="filter_question_type" | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/Filters/Form.js |
id="filter_client"
name="filter_client" | <mask> </Field>
<mask> </div>
<mask> <div className="col-3">
<mask> <Field
<mask> id="client"
<mask> name="client"
<mask> component={renderFilterField}
<mask> type="text"
<mask> className="form-control"
<mask> placeholder={t('client_table_header')}
<mask> tooltip={t('query_log_strict_search')}
</s> + client: load additional search results </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> </s> remove id="domain"
name="domain"
</s> add id="filter_domain"
name="filter_domain" </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> </s> remove id="type"
name="type"
</s> add id="filter_question_type"
name="filter_question_type" </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/Filters/Form.js |
import classnames from 'classnames'; | <mask> import React, { Component } from 'react';
<mask> import PropTypes from 'prop-types';
<mask> import debounce from 'lodash/debounce';
<mask>
<mask> import { DEBOUNCE_FILTER_TIMEOUT, RESPONSE_FILTER } from '../../../helpers/constants';
<mask> import { isValidQuestionType } from '../../../helpers/helpers';
<mask> import Form from './Form';
<mask> import Card from '../../ui/Card';
</s> + client: load additional search results </s> remove import { SERVICES, FILTERED_STATUS, DEFAULT_LOGS_FILTER, RESPONSE_FILTER, TABLE_DEFAULT_PAGE_SIZE } from '../../helpers/constants';
</s> add import { SERVICES, FILTERED_STATUS, TABLE_DEFAULT_PAGE_SIZE } from '../../helpers/constants'; </s> remove const INITIAL_REQUEST_DATA = ['', DEFAULT_LOGS_FILTER, TABLE_FIRST_PAGE, TABLE_DEFAULT_PAGE_SIZE];
</s> add const INITIAL_REQUEST_DATA = ['', TABLE_FIRST_PAGE, TABLE_DEFAULT_PAGE_SIZE]; </s> remove getFilters = (filtered) => {
const {
domain, client, type, response,
} = filtered;
return {
filter_domain: domain || '',
filter_client: client || '',
filter_question_type: isValidQuestionType(type) ? type.toUpperCase() : '',
filter_response_status: response === RESPONSE_FILTER.FILTERED ? response : '',
};
};
</s> add getFilters = ({
filter_domain, filter_question_type, filter_response_status, filter_client,
}) => ({
filter_domain: filter_domain || '',
filter_question_type: isValidQuestionType(filter_question_type) ? filter_question_type.toUpperCase() : '',
filter_response_status: filter_response_status === RESPONSE_FILTER.FILTERED ? filter_response_status : '',
filter_client: filter_client || '',
}); | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/Filters/index.js |
import Card from '../../ui/Card'; | <mask> import { isValidQuestionType } from '../../../helpers/helpers';
<mask> import Form from './Form';
<mask>
<mask> class Filters extends Component {
<mask> getFilters = ({
<mask> filter_domain, filter_question_type, filter_response_status, filter_client,
<mask> }) => ({
<mask> filter_domain: filter_domain || '',
</s> + client: load additional search results </s> remove getFilters = (filtered) => {
const {
domain, client, type, response,
} = filtered;
return {
filter_domain: domain || '',
filter_client: client || '',
filter_question_type: isValidQuestionType(type) ? type.toUpperCase() : '',
filter_response_status: response === RESPONSE_FILTER.FILTERED ? response : '',
};
};
</s> add getFilters = ({
filter_domain, filter_question_type, filter_response_status, filter_client,
}) => ({
filter_domain: filter_domain || '',
filter_question_type: isValidQuestionType(filter_question_type) ? filter_question_type.toUpperCase() : '',
filter_response_status: filter_response_status === RESPONSE_FILTER.FILTERED ? filter_response_status : '',
filter_client: filter_client || '',
}); </s> remove import { SERVICES, FILTERED_STATUS, DEFAULT_LOGS_FILTER, RESPONSE_FILTER, TABLE_DEFAULT_PAGE_SIZE } from '../../helpers/constants';
</s> add import { SERVICES, FILTERED_STATUS, TABLE_DEFAULT_PAGE_SIZE } from '../../helpers/constants'; </s> remove const INITIAL_REQUEST_DATA = ['', DEFAULT_LOGS_FILTER, TABLE_FIRST_PAGE, TABLE_DEFAULT_PAGE_SIZE];
</s> add const INITIAL_REQUEST_DATA = ['', TABLE_FIRST_PAGE, TABLE_DEFAULT_PAGE_SIZE]; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/Filters/index.js |
getFilters = ({
filter_domain, filter_question_type, filter_response_status, filter_client,
}) => ({
filter_domain: filter_domain || '',
filter_question_type: isValidQuestionType(filter_question_type) ? filter_question_type.toUpperCase() : '',
filter_response_status: filter_response_status === RESPONSE_FILTER.FILTERED ? filter_response_status : '',
filter_client: filter_client || '',
}); | <mask> import { isValidQuestionType } from '../../../helpers/helpers';
<mask> import Form from './Form';
<mask>
<mask> class Filters extends Component {
<mask> getFilters = (filtered) => {
<mask> const {
<mask> domain, client, type, response,
<mask> } = filtered;
<mask>
<mask> return {
<mask> filter_domain: domain || '',
<mask> filter_client: client || '',
<mask> filter_question_type: isValidQuestionType(type) ? type.toUpperCase() : '',
<mask> filter_response_status: response === RESPONSE_FILTER.FILTERED ? response : '',
<mask> };
<mask> };
<mask>
<mask> handleFormChange = debounce((values) => {
<mask> const filter = this.getFilters(values);
<mask> this.props.setLogsFilter(filter);
<mask> }, DEBOUNCE_FILTER_TIMEOUT);
</s> + client: load additional search results </s> remove const logs = await getLogsWithParams({ older_than: '', filter });
dispatch(setLogsFilterSuccess(logs));
</s> add const data = await getLogsWithParams({ older_than: '', filter });
const additionalData = await checkFilteredLogs(data, filter, dispatch);
const updatedData = additionalData.logs ? { ...data, ...additionalData } : data;
dispatch(setLogsFilterSuccess({ ...updatedData, filter })); </s> remove import { SERVICES, FILTERED_STATUS, DEFAULT_LOGS_FILTER, RESPONSE_FILTER, TABLE_DEFAULT_PAGE_SIZE } from '../../helpers/constants';
</s> add import { SERVICES, FILTERED_STATUS, TABLE_DEFAULT_PAGE_SIZE } from '../../helpers/constants'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/Filters/index.js |
const { filter, processingAdditionalLogs } = this.props;
const cardBodyClass = classnames({
'card-body': true,
'card-body--loading': processingAdditionalLogs,
}); | <mask> this.props.setLogsFilter(filter);
<mask> }, DEBOUNCE_FILTER_TIMEOUT);
<mask>
<mask> render() {
<mask> const { filter } = this.props;
<mask>
<mask> return (
<mask> <Form
<mask> initialValues={filter}
<mask> onChange={this.handleFormChange}
</s> + client: load additional search results </s> remove <Form
initialValues={filter}
onChange={this.handleFormChange}
/>
</s> add <Card bodyType={cardBodyClass}>
<Form
initialValues={filter}
onChange={this.handleFormChange}
/>
</Card> </s> remove const { enabled, processingGetConfig } = queryLogs;
</s> add const {
enabled, processingGetConfig, processingAdditionalLogs, processingGetLogs,
} = queryLogs; </s> remove getFilters = (filtered) => {
const {
domain, client, type, response,
} = filtered;
return {
filter_domain: domain || '',
filter_client: client || '',
filter_question_type: isValidQuestionType(type) ? type.toUpperCase() : '',
filter_response_status: response === RESPONSE_FILTER.FILTERED ? response : '',
};
};
</s> add getFilters = ({
filter_domain, filter_question_type, filter_response_status, filter_client,
}) => ({
filter_domain: filter_domain || '',
filter_question_type: isValidQuestionType(filter_question_type) ? filter_question_type.toUpperCase() : '',
filter_response_status: filter_response_status === RESPONSE_FILTER.FILTERED ? filter_response_status : '',
filter_client: filter_client || '',
}); </s> remove filterMethod: (filter, row) => {
if (filter.value === RESPONSE_FILTER.FILTERED) {
// eslint-disable-next-line no-underscore-dangle
const { reason } = row._original;
return this.checkFiltered(reason) || this.checkWhiteList(reason);
}
return true;
},
Filter: ({ filter, onChange }) => (
<select
className="form-control custom-select"
onChange={event => onChange(event.target.value)}
value={filter ? filter.value : RESPONSE_FILTER.ALL}
>
<option value={RESPONSE_FILTER.ALL}>
<Trans>show_all_filter_type</Trans>
</option>
<option value={RESPONSE_FILTER.FILTERED}>
<Trans>show_filtered_type</Trans>
</option>
</select>
),
</s> add </s> remove const logs = await getLogsWithParams({ older_than: '', filter });
dispatch(setLogsFilterSuccess(logs));
</s> add const data = await getLogsWithParams({ older_than: '', filter });
const additionalData = await checkFilteredLogs(data, filter, dispatch);
const updatedData = additionalData.logs ? { ...data, ...additionalData } : data;
dispatch(setLogsFilterSuccess({ ...updatedData, filter })); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/Filters/index.js |
<Card bodyType={cardBodyClass}>
<Form
initialValues={filter}
onChange={this.handleFormChange}
/>
</Card> | <mask> render() {
<mask> const { filter } = this.props;
<mask>
<mask> return (
<mask> <Form
<mask> initialValues={filter}
<mask> onChange={this.handleFormChange}
<mask> />
<mask> );
<mask> }
<mask> }
<mask>
<mask> Filters.propTypes = {
</s> + client: load additional search results </s> remove const { filter } = this.props;
</s> add const { filter, processingAdditionalLogs } = this.props;
const cardBodyClass = classnames({
'card-body': true,
'card-body--loading': processingAdditionalLogs,
}); </s> remove const { enabled, processingGetConfig } = queryLogs;
</s> add const {
enabled, processingGetConfig, processingAdditionalLogs, processingGetLogs,
} = queryLogs; </s> remove const logs = await getLogsWithParams({ older_than: '', filter });
dispatch(setLogsFilterSuccess(logs));
</s> add const data = await getLogsWithParams({ older_than: '', filter });
const additionalData = await checkFilteredLogs(data, filter, dispatch);
const updatedData = additionalData.logs ? { ...data, ...additionalData } : data;
dispatch(setLogsFilterSuccess({ ...updatedData, filter })); </s> remove this.getLogs(oldest, filter, page);
} else {
this.props.setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE });
</s> add this.getLogs(oldest, page); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/Filters/index.js |
processingGetLogs: PropTypes.bool.isRequired,
processingAdditionalLogs: PropTypes.bool.isRequired, | <mask> filter: PropTypes.object.isRequired,
<mask> setLogsFilter: PropTypes.func.isRequired,
<mask> };
<mask>
<mask> export default Filters;
</s> + client: load additional search results </s> remove export const getLogs = config => async (dispatch) => {
</s> add export const getLogs = config => async (dispatch, getState) => { </s> remove const logs = await getLogsWithParams(config);
dispatch(getLogsSuccess(logs));
</s> add const { isFiltered, filter, page } = getState().queryLogs;
const data = await getLogsWithParams({ ...config, filter });
if (isFiltered) {
const additionalData = await checkFilteredLogs(data, filter, dispatch);
const updatedData = additionalData.logs ? { ...data, ...additionalData } : data;
dispatch(getLogsSuccess(updatedData));
dispatch(setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE }));
} else {
dispatch(getLogsSuccess(data));
} </s> remove older_than, filter, page, pageSize: TABLE_DEFAULT_PAGE_SIZE,
</s> add older_than, page, pageSize: TABLE_DEFAULT_PAGE_SIZE, </s> remove const logs = await getLogsWithParams({ older_than: '', filter });
dispatch(setLogsFilterSuccess(logs));
</s> add const data = await getLogsWithParams({ older_than: '', filter });
const additionalData = await checkFilteredLogs(data, filter, dispatch);
const updatedData = additionalData.logs ? { ...data, ...additionalData } : data;
dispatch(setLogsFilterSuccess({ ...updatedData, filter })); | [
"keep",
"add",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/Filters/index.js |
import { SERVICES, FILTERED_STATUS, TABLE_DEFAULT_PAGE_SIZE } from '../../helpers/constants'; | <mask> import {
<mask> formatTime,
<mask> formatDateTime,
<mask> } from '../../helpers/helpers';
<mask> import { SERVICES, FILTERED_STATUS, DEFAULT_LOGS_FILTER, RESPONSE_FILTER, TABLE_DEFAULT_PAGE_SIZE } from '../../helpers/constants';
<mask> import { getTrackerData } from '../../helpers/trackers/trackers';
<mask> import { formatClientCell } from '../../helpers/formatClientCell';
<mask>
<mask> import Filters from './Filters';
<mask> import PageTitle from '../ui/PageTitle';
</s> + client: load additional search results </s> remove const INITIAL_REQUEST_DATA = ['', DEFAULT_LOGS_FILTER, TABLE_FIRST_PAGE, TABLE_DEFAULT_PAGE_SIZE];
</s> add const INITIAL_REQUEST_DATA = ['', TABLE_FIRST_PAGE, TABLE_DEFAULT_PAGE_SIZE]; </s> remove getFilters = (filtered) => {
const {
domain, client, type, response,
} = filtered;
return {
filter_domain: domain || '',
filter_client: client || '',
filter_question_type: isValidQuestionType(type) ? type.toUpperCase() : '',
filter_response_status: response === RESPONSE_FILTER.FILTERED ? response : '',
};
};
</s> add getFilters = ({
filter_domain, filter_question_type, filter_response_status, filter_client,
}) => ({
filter_domain: filter_domain || '',
filter_question_type: isValidQuestionType(filter_question_type) ? filter_question_type.toUpperCase() : '',
filter_response_status: filter_response_status === RESPONSE_FILTER.FILTERED ? filter_response_status : '',
filter_client: filter_client || '',
}); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/index.js |
const INITIAL_REQUEST_DATA = ['', TABLE_FIRST_PAGE, TABLE_DEFAULT_PAGE_SIZE]; | <mask> import Popover from '../ui/Popover';
<mask> import './Logs.css';
<mask>
<mask> const TABLE_FIRST_PAGE = 0;
<mask> const INITIAL_REQUEST_DATA = ['', DEFAULT_LOGS_FILTER, TABLE_FIRST_PAGE, TABLE_DEFAULT_PAGE_SIZE];
<mask> const FILTERED_REASON = 'Filtered';
<mask>
<mask> class Logs extends Component {
<mask> componentDidMount() {
<mask> this.props.setLogsPage(TABLE_FIRST_PAGE);
</s> + client: load additional search results </s> remove import { SERVICES, FILTERED_STATUS, DEFAULT_LOGS_FILTER, RESPONSE_FILTER, TABLE_DEFAULT_PAGE_SIZE } from '../../helpers/constants';
</s> add import { SERVICES, FILTERED_STATUS, TABLE_DEFAULT_PAGE_SIZE } from '../../helpers/constants'; </s> remove getFilters = (filtered) => {
const {
domain, client, type, response,
} = filtered;
return {
filter_domain: domain || '',
filter_client: client || '',
filter_question_type: isValidQuestionType(type) ? type.toUpperCase() : '',
filter_response_status: response === RESPONSE_FILTER.FILTERED ? response : '',
};
};
</s> add getFilters = ({
filter_domain, filter_question_type, filter_response_status, filter_client,
}) => ({
filter_domain: filter_domain || '',
filter_question_type: isValidQuestionType(filter_question_type) ? filter_question_type.toUpperCase() : '',
filter_response_status: filter_response_status === RESPONSE_FILTER.FILTERED ? filter_response_status : '',
filter_client: filter_client || '',
}); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/index.js |
getLogs = (older_than, page) => { | <mask> this.props.getClients();
<mask> this.props.getLogsConfig();
<mask> }
<mask>
<mask> getLogs = (older_than, filter, page) => {
<mask> if (this.props.queryLogs.enabled) {
<mask> this.props.getLogs({
<mask> older_than, filter, page, pageSize: TABLE_DEFAULT_PAGE_SIZE,
<mask> });
<mask> }
</s> + client: load additional search results </s> remove older_than, filter, page, pageSize: TABLE_DEFAULT_PAGE_SIZE,
</s> add older_than, page, pageSize: TABLE_DEFAULT_PAGE_SIZE, </s> remove const logs = await getLogsWithParams(config);
dispatch(getLogsSuccess(logs));
</s> add const { isFiltered, filter, page } = getState().queryLogs;
const data = await getLogsWithParams({ ...config, filter });
if (isFiltered) {
const additionalData = await checkFilteredLogs(data, filter, dispatch);
const updatedData = additionalData.logs ? { ...data, ...additionalData } : data;
dispatch(getLogsSuccess(updatedData));
dispatch(setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE }));
} else {
dispatch(getLogsSuccess(data));
} </s> remove this.getLogs(oldest, filter, page);
} else {
this.props.setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE });
</s> add this.getLogs(oldest, page); </s> remove const {
filter, oldest, page,
} = this.props.queryLogs;
</s> add const { oldest, page } = this.props.queryLogs; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/index.js |
older_than, page, pageSize: TABLE_DEFAULT_PAGE_SIZE, | <mask>
<mask> getLogs = (older_than, filter, page) => {
<mask> if (this.props.queryLogs.enabled) {
<mask> this.props.getLogs({
<mask> older_than, filter, page, pageSize: TABLE_DEFAULT_PAGE_SIZE,
<mask> });
<mask> }
<mask> };
<mask>
<mask> refreshLogs = () => {
</s> + client: load additional search results </s> remove getLogs = (older_than, filter, page) => {
</s> add getLogs = (older_than, page) => { </s> remove const logs = await getLogsWithParams(config);
dispatch(getLogsSuccess(logs));
</s> add const { isFiltered, filter, page } = getState().queryLogs;
const data = await getLogsWithParams({ ...config, filter });
if (isFiltered) {
const additionalData = await checkFilteredLogs(data, filter, dispatch);
const updatedData = additionalData.logs ? { ...data, ...additionalData } : data;
dispatch(getLogsSuccess(updatedData));
dispatch(setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE }));
} else {
dispatch(getLogsSuccess(data));
} </s> remove this.getLogs(oldest, filter, page);
} else {
this.props.setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE });
</s> add this.getLogs(oldest, page); </s> remove const {
filter, oldest, page,
} = this.props.queryLogs;
</s> add const { oldest, page } = this.props.queryLogs; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/index.js |
const { oldest, page } = this.props.queryLogs; | <mask> };
<mask>
<mask> fetchData = (state) => {
<mask> const { pages } = state;
<mask> const {
<mask> filter, oldest, page,
<mask> } = this.props.queryLogs;
<mask> const isLastPage = pages && (page + 1 === pages);
<mask>
<mask> if (isLastPage) {
<mask> this.getLogs(oldest, filter, page);
<mask> } else {
</s> + client: load additional search results </s> remove this.getLogs(oldest, filter, page);
} else {
this.props.setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE });
</s> add this.getLogs(oldest, page); </s> remove const logs = await getLogsWithParams(config);
dispatch(getLogsSuccess(logs));
</s> add const { isFiltered, filter, page } = getState().queryLogs;
const data = await getLogsWithParams({ ...config, filter });
if (isFiltered) {
const additionalData = await checkFilteredLogs(data, filter, dispatch);
const updatedData = additionalData.logs ? { ...data, ...additionalData } : data;
dispatch(getLogsSuccess(updatedData));
dispatch(setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE }));
} else {
dispatch(getLogsSuccess(data));
} </s> remove older_than, filter, page, pageSize: TABLE_DEFAULT_PAGE_SIZE,
</s> add older_than, page, pageSize: TABLE_DEFAULT_PAGE_SIZE, </s> remove getLogs = (older_than, filter, page) => {
</s> add getLogs = (older_than, page) => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/index.js |
this.getLogs(oldest, page); | <mask> } = this.props.queryLogs;
<mask> const isLastPage = pages && (page + 1 === pages);
<mask>
<mask> if (isLastPage) {
<mask> this.getLogs(oldest, filter, page);
<mask> } else {
<mask> this.props.setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE });
<mask> }
<mask> };
<mask>
<mask> renderLogs() {
<mask> const { queryLogs, dashboard, t } = this.props;
</s> + client: load additional search results </s> remove const {
filter, oldest, page,
} = this.props.queryLogs;
</s> add const { oldest, page } = this.props.queryLogs; </s> remove const logs = await getLogsWithParams(config);
dispatch(getLogsSuccess(logs));
</s> add const { isFiltered, filter, page } = getState().queryLogs;
const data = await getLogsWithParams({ ...config, filter });
if (isFiltered) {
const additionalData = await checkFilteredLogs(data, filter, dispatch);
const updatedData = additionalData.logs ? { ...data, ...additionalData } : data;
dispatch(getLogsSuccess(updatedData));
dispatch(setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE }));
} else {
dispatch(getLogsSuccess(data));
} </s> remove older_than, filter, page, pageSize: TABLE_DEFAULT_PAGE_SIZE,
</s> add older_than, page, pageSize: TABLE_DEFAULT_PAGE_SIZE, </s> remove const { enabled, processingGetConfig } = queryLogs;
</s> add const {
enabled, processingGetConfig, processingAdditionalLogs, processingGetLogs,
} = queryLogs; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/index.js |
changePage = (page) => {
this.props.setLogsPage(page);
this.props.setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE });
};
| <mask> this.getLogs(oldest, page);
<mask> }
<mask> };
<mask>
<mask> renderLogs() {
<mask> const { queryLogs, dashboard, t } = this.props;
<mask> const { processingClients } = dashboard;
<mask> const {
<mask> processingGetLogs, processingGetConfig, logs, pages, page,
<mask> } = queryLogs;
</s> + client: load additional search results </s> remove this.getLogs(oldest, filter, page);
} else {
this.props.setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE });
</s> add this.getLogs(oldest, page); </s> remove const { enabled, processingGetConfig } = queryLogs;
</s> add const {
enabled, processingGetConfig, processingAdditionalLogs, processingGetLogs,
} = queryLogs; </s> remove const {
filter, oldest, page,
} = this.props.queryLogs;
</s> add const { oldest, page } = this.props.queryLogs; </s> remove const logs = await getLogsWithParams(config);
dispatch(getLogsSuccess(logs));
</s> add const { isFiltered, filter, page } = getState().queryLogs;
const data = await getLogsWithParams({ ...config, filter });
if (isFiltered) {
const additionalData = await checkFilteredLogs(data, filter, dispatch);
const updatedData = additionalData.logs ? { ...data, ...additionalData } : data;
dispatch(getLogsSuccess(updatedData));
dispatch(setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE }));
} else {
dispatch(getLogsSuccess(data));
} </s> remove const { filter } = this.props;
</s> add const { filter, processingAdditionalLogs } = this.props;
const cardBodyClass = classnames({
'card-body': true,
'card-body--loading': processingAdditionalLogs,
}); | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/index.js |
<mask> Header: t('domain_name_table_header'),
<mask> accessor: 'domain',
<mask> minWidth: 180,
<mask> Cell: this.getDomainCell,
<mask> Filter: this.getFilterInput,
<mask> },
<mask> {
<mask> Header: t('type_table_header'),
<mask> accessor: 'type',
<mask> maxWidth: 60,
</s> + client: load additional search results </s> remove Filter: this.getFilterInput,
</s> add </s> remove filterMethod: (filter, row) => {
if (filter.value === RESPONSE_FILTER.FILTERED) {
// eslint-disable-next-line no-underscore-dangle
const { reason } = row._original;
return this.checkFiltered(reason) || this.checkWhiteList(reason);
}
return true;
},
Filter: ({ filter, onChange }) => (
<select
className="form-control custom-select"
onChange={event => onChange(event.target.value)}
value={filter ? filter.value : RESPONSE_FILTER.ALL}
>
<option value={RESPONSE_FILTER.ALL}>
<Trans>show_all_filter_type</Trans>
</option>
<option value={RESPONSE_FILTER.FILTERED}>
<Trans>show_filtered_type</Trans>
</option>
</select>
),
</s> add </s> remove const { filter } = this.props;
</s> add const { filter, processingAdditionalLogs } = this.props;
const cardBodyClass = classnames({
'card-body': true,
'card-body--loading': processingAdditionalLogs,
}); </s> remove getFilters = (filtered) => {
const {
domain, client, type, response,
} = filtered;
return {
filter_domain: domain || '',
filter_client: client || '',
filter_question_type: isValidQuestionType(type) ? type.toUpperCase() : '',
filter_response_status: response === RESPONSE_FILTER.FILTERED ? response : '',
};
};
</s> add getFilters = ({
filter_domain, filter_question_type, filter_response_status, filter_client,
}) => ({
filter_domain: filter_domain || '',
filter_question_type: isValidQuestionType(filter_question_type) ? filter_question_type.toUpperCase() : '',
filter_response_status: filter_response_status === RESPONSE_FILTER.FILTERED ? filter_response_status : '',
filter_client: filter_client || '',
}); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/index.js |
|
<mask> Header: t('response_table_header'),
<mask> accessor: 'response',
<mask> minWidth: 250,
<mask> Cell: this.getResponseCell,
<mask> filterMethod: (filter, row) => {
<mask> if (filter.value === RESPONSE_FILTER.FILTERED) {
<mask> // eslint-disable-next-line no-underscore-dangle
<mask> const { reason } = row._original;
<mask> return this.checkFiltered(reason) || this.checkWhiteList(reason);
<mask> }
<mask> return true;
<mask> },
<mask> Filter: ({ filter, onChange }) => (
<mask> <select
<mask> className="form-control custom-select"
<mask> onChange={event => onChange(event.target.value)}
<mask> value={filter ? filter.value : RESPONSE_FILTER.ALL}
<mask> >
<mask> <option value={RESPONSE_FILTER.ALL}>
<mask> <Trans>show_all_filter_type</Trans>
<mask> </option>
<mask> <option value={RESPONSE_FILTER.FILTERED}>
<mask> <Trans>show_filtered_type</Trans>
<mask> </option>
<mask> </select>
<mask> ),
<mask> },
<mask> {
<mask> Header: t('client_table_header'),
<mask> accessor: 'client',
<mask> maxWidth: 240,
</s> + client: load additional search results </s> remove Filter: this.getFilterInput,
</s> add </s> remove Filter: this.getFilterInput,
</s> add </s> remove name="response"
</s> add name="filter_response_status" </s> remove getFilters = (filtered) => {
const {
domain, client, type, response,
} = filtered;
return {
filter_domain: domain || '',
filter_client: client || '',
filter_question_type: isValidQuestionType(type) ? type.toUpperCase() : '',
filter_response_status: response === RESPONSE_FILTER.FILTERED ? response : '',
};
};
</s> add getFilters = ({
filter_domain, filter_question_type, filter_response_status, filter_client,
}) => ({
filter_domain: filter_domain || '',
filter_question_type: isValidQuestionType(filter_question_type) ? filter_question_type.toUpperCase() : '',
filter_response_status: filter_response_status === RESPONSE_FILTER.FILTERED ? filter_response_status : '',
filter_client: filter_client || '',
}); </s> remove const { filter } = this.props;
</s> add const { filter, processingAdditionalLogs } = this.props;
const cardBodyClass = classnames({
'card-body': true,
'card-body--loading': processingAdditionalLogs,
}); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/index.js |
|
<mask> accessor: 'client',
<mask> maxWidth: 240,
<mask> minWidth: 240,
<mask> Cell: this.getClientCell,
<mask> Filter: this.getFilterInput,
<mask> },
<mask> ];
<mask>
<mask> return (
<mask> <ReactTable
</s> + client: load additional search results </s> remove Filter: this.getFilterInput,
</s> add </s> remove filterMethod: (filter, row) => {
if (filter.value === RESPONSE_FILTER.FILTERED) {
// eslint-disable-next-line no-underscore-dangle
const { reason } = row._original;
return this.checkFiltered(reason) || this.checkWhiteList(reason);
}
return true;
},
Filter: ({ filter, onChange }) => (
<select
className="form-control custom-select"
onChange={event => onChange(event.target.value)}
value={filter ? filter.value : RESPONSE_FILTER.ALL}
>
<option value={RESPONSE_FILTER.ALL}>
<Trans>show_all_filter_type</Trans>
</option>
<option value={RESPONSE_FILTER.FILTERED}>
<Trans>show_filtered_type</Trans>
</option>
</select>
),
</s> add </s> remove const { filter } = this.props;
</s> add const { filter, processingAdditionalLogs } = this.props;
const cardBodyClass = classnames({
'card-body': true,
'card-body--loading': processingAdditionalLogs,
}); </s> remove <div className="col-3">
</s> add <div className="col-6 col-sm-3 my-2"> </s> remove <Form
initialValues={filter}
onChange={this.handleFormChange}
/>
</s> add <Card bodyType={cardBodyClass}>
<Form
initialValues={filter}
onChange={this.handleFormChange}
/>
</Card> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/index.js |
|
onPageChange={this.changePage} | <mask> showPaginationTop={true}
<mask> showPageJump={false}
<mask> showPageSizeOptions={false}
<mask> onFetchData={this.fetchData}
<mask> onPageChange={newPage => this.props.setLogsPage(newPage)}
<mask> className="logs__table"
<mask> defaultPageSize={TABLE_DEFAULT_PAGE_SIZE}
<mask> previousText={t('previous_btn')}
<mask> nextText={t('next_btn')}
<mask> loadingText={t('loading_table_status')}
</s> + client: load additional search results </s> remove export const getLogs = config => async (dispatch) => {
</s> add export const getLogs = config => async (dispatch, getState) => { </s> remove getLogs = (older_than, filter, page) => {
</s> add getLogs = (older_than, page) => { </s> remove older_than, filter, page, pageSize: TABLE_DEFAULT_PAGE_SIZE,
</s> add older_than, page, pageSize: TABLE_DEFAULT_PAGE_SIZE, </s> remove filterMethod: (filter, row) => {
if (filter.value === RESPONSE_FILTER.FILTERED) {
// eslint-disable-next-line no-underscore-dangle
const { reason } = row._original;
return this.checkFiltered(reason) || this.checkWhiteList(reason);
}
return true;
},
Filter: ({ filter, onChange }) => (
<select
className="form-control custom-select"
onChange={event => onChange(event.target.value)}
value={filter ? filter.value : RESPONSE_FILTER.ALL}
>
<option value={RESPONSE_FILTER.ALL}>
<Trans>show_all_filter_type</Trans>
</option>
<option value={RESPONSE_FILTER.FILTERED}>
<Trans>show_filtered_type</Trans>
</option>
</select>
),
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/index.js |
const {
enabled, processingGetConfig, processingAdditionalLogs, processingGetLogs,
} = queryLogs; | <mask> }
<mask>
<mask> render() {
<mask> const { queryLogs, t } = this.props;
<mask> const { enabled, processingGetConfig } = queryLogs;
<mask>
<mask> const refreshButton = enabled ? (
<mask> <button
<mask> type="button"
<mask> className="btn btn-icon btn-outline-primary btn-sm ml-3"
</s> + client: load additional search results </s> remove const { filter } = this.props;
</s> add const { filter, processingAdditionalLogs } = this.props;
const cardBodyClass = classnames({
'card-body': true,
'card-body--loading': processingAdditionalLogs,
}); </s> remove this.getLogs(oldest, filter, page);
} else {
this.props.setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE });
</s> add this.getLogs(oldest, page); </s> remove <Form
initialValues={filter}
onChange={this.handleFormChange}
/>
</s> add <Card bodyType={cardBodyClass}>
<Form
initialValues={filter}
onChange={this.handleFormChange}
/>
</Card> </s> remove const logs = await getLogsWithParams(config);
dispatch(getLogsSuccess(logs));
</s> add const { isFiltered, filter, page } = getState().queryLogs;
const data = await getLogsWithParams({ ...config, filter });
if (isFiltered) {
const additionalData = await checkFilteredLogs(data, filter, dispatch);
const updatedData = additionalData.logs ? { ...data, ...additionalData } : data;
dispatch(getLogsSuccess(updatedData));
dispatch(setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE }));
} else {
dispatch(getLogsSuccess(data));
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/index.js |
<Filters
filter={queryLogs.filter}
processingGetLogs={processingGetLogs}
processingAdditionalLogs={processingAdditionalLogs}
setLogsFilter={this.props.setLogsFilter}
/> | <mask> <PageTitle title={t('query_log')}>{refreshButton}</PageTitle>
<mask> {enabled && processingGetConfig && <Loading />}
<mask> {enabled && !processingGetConfig && (
<mask> <Fragment>
<mask> <Card>
<mask> <Filters
<mask> filter={queryLogs.filter}
<mask> setLogsFilter={this.props.setLogsFilter}
<mask> />
<mask> </Card>
<mask> <Card>{this.renderLogs()}</Card>
<mask> </Fragment>
<mask> )}
<mask> {!enabled && !processingGetConfig && (
<mask> <Card>
</s> + client: load additional search results </s> remove this.getLogs(oldest, filter, page);
} else {
this.props.setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE });
</s> add this.getLogs(oldest, page); </s> remove const {
filter, oldest, page,
} = this.props.queryLogs;
</s> add const { oldest, page } = this.props.queryLogs; </s> remove <Form
initialValues={filter}
onChange={this.handleFormChange}
/>
</s> add <Card bodyType={cardBodyClass}>
<Form
initialValues={filter}
onChange={this.handleFormChange}
/>
</Card> </s> remove const { enabled, processingGetConfig } = queryLogs;
</s> add const {
enabled, processingGetConfig, processingAdditionalLogs, processingGetLogs,
} = queryLogs; </s> remove Filter: this.getFilterInput,
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/components/Logs/index.js |
[actions.getAdditionalLogsRequest]: state => ({
...state, processingAdditionalLogs: true, processingGetLogs: true,
}),
[actions.getAdditionalLogsFailure]: state => ({
...state, processingAdditionalLogs: false, processingGetLogs: false,
}),
[actions.getAdditionalLogsSuccess]: state => ({
...state, processingAdditionalLogs: false, processingGetLogs: false,
}), | <mask> ...payload,
<mask> processingSetConfig: false,
<mask> }),
<mask> },
<mask> {
<mask> processingGetLogs: true,
<mask> processingClear: false,
</s> + client: load additional search results </s> remove const { filter } = this.props;
</s> add const { filter, processingAdditionalLogs } = this.props;
const cardBodyClass = classnames({
'card-body': true,
'card-body--loading': processingAdditionalLogs,
}); </s> remove Filter: this.getFilterInput,
</s> add </s> remove filterMethod: (filter, row) => {
if (filter.value === RESPONSE_FILTER.FILTERED) {
// eslint-disable-next-line no-underscore-dangle
const { reason } = row._original;
return this.checkFiltered(reason) || this.checkWhiteList(reason);
}
return true;
},
Filter: ({ filter, onChange }) => (
<select
className="form-control custom-select"
onChange={event => onChange(event.target.value)}
value={filter ? filter.value : RESPONSE_FILTER.ALL}
>
<option value={RESPONSE_FILTER.ALL}>
<Trans>show_all_filter_type</Trans>
</option>
<option value={RESPONSE_FILTER.FILTERED}>
<Trans>show_filtered_type</Trans>
</option>
</select>
),
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/reducers/queryLogs.js |
processingAdditionalLogs: false, | <mask> processingGetConfig: false,
<mask> processingSetConfig: false,
<mask> logs: [],
<mask> interval: 1,
<mask> allLogs: [],
<mask> page: 0,
<mask> pages: 0,
</s> + client: load additional search results </s> remove id="type"
name="type"
</s> add id="filter_question_type"
name="filter_question_type" </s> remove id="client"
name="client"
</s> add id="filter_client"
name="filter_client" | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/62c8664fd75439b7597d935992c380f9c0675660 | client/src/reducers/queryLogs.js |
go.etcd.io/bbolt v1.3.3
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5 | <mask> github.com/krolaw/dhcp4 v0.0.0-20180925202202-7cead472c414
<mask> github.com/miekg/dns v1.1.8
<mask> github.com/sparrc/go-ping v0.0.0-20181106165434-ef3ab45e41b0
<mask> github.com/stretchr/testify v1.4.0
<mask> go.etcd.io/bbolt v1.3.3 // indirect
<mask> golang.org/x/net v0.0.0-20190620200207-3b0461eec859
<mask> golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0
<mask> gopkg.in/yaml.v2 v2.2.2
<mask> )
</s> + Login page and web sessions
+ /control/login
+ /control/logout </s> remove func optionalAuth(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
if config.AuthName == "" || config.AuthPass == "" {
handler(w, r)
return
}
user, pass, ok := r.BasicAuth()
if !ok || user != config.AuthName || pass != config.AuthPass {
w.Header().Set("WWW-Authenticate", `Basic realm="dnsfilter"`)
w.WriteHeader(http.StatusUnauthorized)
w.Write([]byte("Unauthorised.\n"))
return
}
handler(w, r)
}
}
type authHandler struct {
handler http.Handler
}
func (a *authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
optionalAuth(a.handler.ServeHTTP)(w, r)
}
func optionalAuthHandler(handler http.Handler) http.Handler {
return &authHandler{handler}
}
</s> add </s> remove
</s> add config.auth.Close() </s> remove config.AuthName = newSettings.Username
config.AuthPass = newSettings.Password
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6304a7b91bfbfeeaffae1d8fcec3584ada0cc0be | go.mod |
clients clientsContainer // per-client-settings module | <mask> // runningAsService flag is set to true when options are passed from the service runner
<mask> runningAsService bool
<mask> disableUpdate bool // If set, don't check for updates
<mask> appSignalChannel chan os.Signal
<mask> clients clientsContainer
<mask> controlLock sync.Mutex
<mask> transport *http.Transport
<mask> client *http.Client
<mask> stats stats.Stats
<mask> queryLog querylog.QueryLog
</s> + Login page and web sessions
+ /control/login
+ /control/logout </s> remove stats stats.Stats
queryLog querylog.QueryLog
filteringStarted bool
</s> add stats stats.Stats // statistics module
queryLog querylog.QueryLog // query log module
filteringStarted bool // TRUE if filtering module is started
auth *Auth // HTTP authentication module </s> remove AuthName string `yaml:"auth_name"` // AuthName is the basic auth username
AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password
</s> add Users []User `yaml:"users"` // Users that can access HTTP server </s> remove func optionalAuth(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
if config.AuthName == "" || config.AuthPass == "" {
handler(w, r)
return
}
user, pass, ok := r.BasicAuth()
if !ok || user != config.AuthName || pass != config.AuthPass {
w.Header().Set("WWW-Authenticate", `Basic realm="dnsfilter"`)
w.WriteHeader(http.StatusUnauthorized)
w.Write([]byte("Unauthorised.\n"))
return
}
handler(w, r)
}
}
type authHandler struct {
handler http.Handler
}
func (a *authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
optionalAuth(a.handler.ServeHTTP)(w, r)
}
func optionalAuthHandler(handler http.Handler) http.Handler {
return &authHandler{handler}
}
</s> add </s> remove
</s> add config.auth.Close() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6304a7b91bfbfeeaffae1d8fcec3584ada0cc0be | home/config.go |
stats stats.Stats // statistics module
queryLog querylog.QueryLog // query log module
filteringStarted bool // TRUE if filtering module is started
auth *Auth // HTTP authentication module | <mask> clients clientsContainer
<mask> controlLock sync.Mutex
<mask> transport *http.Transport
<mask> client *http.Client
<mask> stats stats.Stats
<mask> queryLog querylog.QueryLog
<mask> filteringStarted bool
<mask>
<mask> // cached version.json to avoid hammering github.io for each page reload
<mask> versionCheckJSON []byte
<mask> versionCheckLastTime time.Time
<mask>
</s> + Login page and web sessions
+ /control/login
+ /control/logout </s> remove clients clientsContainer
</s> add clients clientsContainer // per-client-settings module </s> remove AuthName string `yaml:"auth_name"` // AuthName is the basic auth username
AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password
</s> add Users []User `yaml:"users"` // Users that can access HTTP server </s> remove func optionalAuth(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
if config.AuthName == "" || config.AuthPass == "" {
handler(w, r)
return
}
user, pass, ok := r.BasicAuth()
if !ok || user != config.AuthName || pass != config.AuthPass {
w.Header().Set("WWW-Authenticate", `Basic realm="dnsfilter"`)
w.WriteHeader(http.StatusUnauthorized)
w.Write([]byte("Unauthorised.\n"))
return
}
handler(w, r)
}
}
type authHandler struct {
handler http.Handler
}
func (a *authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
optionalAuth(a.handler.ServeHTTP)(w, r)
}
func optionalAuthHandler(handler http.Handler) http.Handler {
return &authHandler{handler}
}
</s> add </s> remove
</s> add config.auth.Close() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6304a7b91bfbfeeaffae1d8fcec3584ada0cc0be | home/config.go |
Users []User `yaml:"users"` // Users that can access HTTP server | <mask> httpsServer HTTPSServer
<mask>
<mask> BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
<mask> BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
<mask> AuthName string `yaml:"auth_name"` // AuthName is the basic auth username
<mask> AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password
<mask> Language string `yaml:"language"` // two-letter ISO 639-1 language code
<mask> RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
<mask>
<mask> DNS dnsConfig `yaml:"dns"`
<mask> TLS tlsConfig `yaml:"tls"`
</s> + Login page and web sessions
+ /control/login
+ /control/logout </s> remove clients clientsContainer
</s> add clients clientsContainer // per-client-settings module </s> remove stats stats.Stats
queryLog querylog.QueryLog
filteringStarted bool
</s> add stats stats.Stats // statistics module
queryLog querylog.QueryLog // query log module
filteringStarted bool // TRUE if filtering module is started
auth *Auth // HTTP authentication module </s> remove dst.AuthName = src.AuthName
dst.AuthPass = src.AuthPass
</s> add </s> remove func optionalAuth(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
if config.AuthName == "" || config.AuthPass == "" {
handler(w, r)
return
}
user, pass, ok := r.BasicAuth()
if !ok || user != config.AuthName || pass != config.AuthPass {
w.Header().Set("WWW-Authenticate", `Basic realm="dnsfilter"`)
w.WriteHeader(http.StatusUnauthorized)
w.Write([]byte("Unauthorised.\n"))
return
}
handler(w, r)
}
}
type authHandler struct {
handler http.Handler
}
func (a *authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
optionalAuth(a.handler.ServeHTTP)(w, r)
}
func optionalAuthHandler(handler http.Handler) http.Handler {
return &authHandler{handler}
}
</s> add </s> remove
</s> add config.auth.Close() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6304a7b91bfbfeeaffae1d8fcec3584ada0cc0be | home/config.go |
if config.auth != nil {
config.Users = config.auth.GetUsers()
}
| <mask> }
<mask> config.Clients = append(config.Clients, cy)
<mask> }
<mask>
<mask> configFile := config.getConfigFilename()
<mask> log.Debug("Writing YAML file: %s", configFile)
<mask> yamlText, err := yaml.Marshal(&config)
<mask> config.Clients = nil
<mask> if err != nil {
</s> + Login page and web sessions
+ /control/login
+ /control/logout </s> remove func optionalAuth(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
if config.AuthName == "" || config.AuthPass == "" {
handler(w, r)
return
}
user, pass, ok := r.BasicAuth()
if !ok || user != config.AuthName || pass != config.AuthPass {
w.Header().Set("WWW-Authenticate", `Basic realm="dnsfilter"`)
w.WriteHeader(http.StatusUnauthorized)
w.Write([]byte("Unauthorised.\n"))
return
}
handler(w, r)
}
}
type authHandler struct {
handler http.Handler
}
func (a *authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
optionalAuth(a.handler.ServeHTTP)(w, r)
}
func optionalAuthHandler(handler http.Handler) http.Handler {
return &authHandler{handler}
}
</s> add </s> remove
</s> add config.auth.Close() </s> remove config.AuthName = newSettings.Username
config.AuthPass = newSettings.Password
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6304a7b91bfbfeeaffae1d8fcec3584ada0cc0be | home/config.go |
RegisterAuthHandlers() | <mask> RegisterBlockedServicesHandlers()
<mask> RegisterQueryLogHandlers()
<mask> RegisterStatsHandlers()
<mask>
<mask> http.HandleFunc("/dns-query", postInstall(handleDOH))
<mask> }
<mask>
<mask> type httpHandlerType func(http.ResponseWriter, *http.Request)
<mask>
</s> + Login page and web sessions
+ /control/login
+ /control/logout </s> remove func optionalAuth(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
if config.AuthName == "" || config.AuthPass == "" {
handler(w, r)
return
}
user, pass, ok := r.BasicAuth()
if !ok || user != config.AuthName || pass != config.AuthPass {
w.Header().Set("WWW-Authenticate", `Basic realm="dnsfilter"`)
w.WriteHeader(http.StatusUnauthorized)
w.Write([]byte("Unauthorised.\n"))
return
}
handler(w, r)
}
}
type authHandler struct {
handler http.Handler
}
func (a *authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
optionalAuth(a.handler.ServeHTTP)(w, r)
}
func optionalAuthHandler(handler http.Handler) http.Handler {
return &authHandler{handler}
}
</s> add </s> remove dst.AuthName = src.AuthName
dst.AuthPass = src.AuthPass
</s> add </s> remove
</s> add config.auth.Close() | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6304a7b91bfbfeeaffae1d8fcec3584ada0cc0be | home/control.go |
<mask> dst.BindHost = src.BindHost
<mask> dst.BindPort = src.BindPort
<mask> dst.DNS.BindHost = src.DNS.BindHost
<mask> dst.DNS.Port = src.DNS.Port
<mask> dst.AuthName = src.AuthName
<mask> dst.AuthPass = src.AuthPass
<mask> }
<mask>
<mask> // Apply new configuration, start DNS server, restart Web server
<mask> func handleInstallConfigure(w http.ResponseWriter, r *http.Request) {
<mask> newSettings := applyConfigReq{}
</s> + Login page and web sessions
+ /control/login
+ /control/logout </s> remove func optionalAuth(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
if config.AuthName == "" || config.AuthPass == "" {
handler(w, r)
return
}
user, pass, ok := r.BasicAuth()
if !ok || user != config.AuthName || pass != config.AuthPass {
w.Header().Set("WWW-Authenticate", `Basic realm="dnsfilter"`)
w.WriteHeader(http.StatusUnauthorized)
w.Write([]byte("Unauthorised.\n"))
return
}
handler(w, r)
}
}
type authHandler struct {
handler http.Handler
}
func (a *authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
optionalAuth(a.handler.ServeHTTP)(w, r)
}
func optionalAuthHandler(handler http.Handler) http.Handler {
return &authHandler{handler}
}
</s> add </s> remove AuthName string `yaml:"auth_name"` // AuthName is the basic auth username
AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password
</s> add Users []User `yaml:"users"` // Users that can access HTTP server | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6304a7b91bfbfeeaffae1d8fcec3584ada0cc0be | home/control_install.go |
|
<mask> config.BindHost = newSettings.Web.IP
<mask> config.BindPort = newSettings.Web.Port
<mask> config.DNS.BindHost = newSettings.DNS.IP
<mask> config.DNS.Port = newSettings.DNS.Port
<mask> config.AuthName = newSettings.Username
<mask> config.AuthPass = newSettings.Password
<mask>
<mask> dnsBaseDir := filepath.Join(config.ourWorkingDir, dataDir)
<mask> initDNSServer(dnsBaseDir)
<mask>
<mask> err = startDNSServer()
</s> + Login page and web sessions
+ /control/login
+ /control/logout </s> remove func optionalAuth(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
if config.AuthName == "" || config.AuthPass == "" {
handler(w, r)
return
}
user, pass, ok := r.BasicAuth()
if !ok || user != config.AuthName || pass != config.AuthPass {
w.Header().Set("WWW-Authenticate", `Basic realm="dnsfilter"`)
w.WriteHeader(http.StatusUnauthorized)
w.Write([]byte("Unauthorised.\n"))
return
}
handler(w, r)
}
}
type authHandler struct {
handler http.Handler
}
func (a *authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
optionalAuth(a.handler.ServeHTTP)(w, r)
}
func optionalAuthHandler(handler http.Handler) http.Handler {
return &authHandler{handler}
}
</s> add </s> remove
</s> add config.auth.Close() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6304a7b91bfbfeeaffae1d8fcec3584ada0cc0be | home/control_install.go |
|
u := User{}
u.Name = newSettings.Username
config.auth.UserAdd(&u, newSettings.Password)
| <mask> return
<mask> }
<mask>
<mask> err = config.write()
<mask> if err != nil {
<mask> config.firstRun = true
<mask> copyInstallSettings(&config, &curConfig)
<mask> httpError(w, http.StatusInternalServerError, "Couldn't write config: %s", err)
<mask> return
</s> + Login page and web sessions
+ /control/login
+ /control/logout </s> remove func optionalAuth(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
if config.AuthName == "" || config.AuthPass == "" {
handler(w, r)
return
}
user, pass, ok := r.BasicAuth()
if !ok || user != config.AuthName || pass != config.AuthPass {
w.Header().Set("WWW-Authenticate", `Basic realm="dnsfilter"`)
w.WriteHeader(http.StatusUnauthorized)
w.Write([]byte("Unauthorised.\n"))
return
}
handler(w, r)
}
}
type authHandler struct {
handler http.Handler
}
func (a *authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
optionalAuth(a.handler.ServeHTTP)(w, r)
}
func optionalAuthHandler(handler http.Handler) http.Handler {
return &authHandler{handler}
}
</s> add </s> remove
</s> add config.auth.Close() </s> remove config.AuthName = newSettings.Username
config.AuthPass = newSettings.Password
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6304a7b91bfbfeeaffae1d8fcec3584ada0cc0be | home/control_install.go |
sessFilename := filepath.Join(config.ourWorkingDir, "data/sessions.db")
config.auth = InitAuth(sessFilename, config.Users)
config.Users = nil
| <mask> config.dnsServer = dnsforward.NewServer(config.stats, config.queryLog)
<mask>
<mask> initRDNS()
<mask> initFiltering()
<mask> }
<mask>
</s> + Login page and web sessions
+ /control/login
+ /control/logout </s> remove
</s> add config.auth.Close() </s> remove func optionalAuth(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
if config.AuthName == "" || config.AuthPass == "" {
handler(w, r)
return
}
user, pass, ok := r.BasicAuth()
if !ok || user != config.AuthName || pass != config.AuthPass {
w.Header().Set("WWW-Authenticate", `Basic realm="dnsfilter"`)
w.WriteHeader(http.StatusUnauthorized)
w.Write([]byte("Unauthorised.\n"))
return
}
handler(w, r)
}
}
type authHandler struct {
handler http.Handler
}
func (a *authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
optionalAuth(a.handler.ServeHTTP)(w, r)
}
func optionalAuthHandler(handler http.Handler) http.Handler {
return &authHandler{handler}
}
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6304a7b91bfbfeeaffae1d8fcec3584ada0cc0be | home/dns.go |
config.auth.Close() | <mask> }
<mask>
<mask> config.stats.Close()
<mask> config.queryLog.Close()
<mask>
<mask> return nil
<mask> }
</s> + Login page and web sessions
+ /control/login
+ /control/logout </s> remove func optionalAuth(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
if config.AuthName == "" || config.AuthPass == "" {
handler(w, r)
return
}
user, pass, ok := r.BasicAuth()
if !ok || user != config.AuthName || pass != config.AuthPass {
w.Header().Set("WWW-Authenticate", `Basic realm="dnsfilter"`)
w.WriteHeader(http.StatusUnauthorized)
w.Write([]byte("Unauthorised.\n"))
return
}
handler(w, r)
}
}
type authHandler struct {
handler http.Handler
}
func (a *authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
optionalAuth(a.handler.ServeHTTP)(w, r)
}
func optionalAuthHandler(handler http.Handler) http.Handler {
return &authHandler{handler}
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6304a7b91bfbfeeaffae1d8fcec3584ada0cc0be | home/dns.go |
<mask> h.handler = ensure(method, handler)
<mask> return &h
<mask> }
<mask>
<mask> func optionalAuth(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request) {
<mask> return func(w http.ResponseWriter, r *http.Request) {
<mask> if config.AuthName == "" || config.AuthPass == "" {
<mask> handler(w, r)
<mask> return
<mask> }
<mask> user, pass, ok := r.BasicAuth()
<mask> if !ok || user != config.AuthName || pass != config.AuthPass {
<mask> w.Header().Set("WWW-Authenticate", `Basic realm="dnsfilter"`)
<mask> w.WriteHeader(http.StatusUnauthorized)
<mask> w.Write([]byte("Unauthorised.\n"))
<mask> return
<mask> }
<mask> handler(w, r)
<mask> }
<mask> }
<mask>
<mask> type authHandler struct {
<mask> handler http.Handler
<mask> }
<mask>
<mask> func (a *authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
<mask> optionalAuth(a.handler.ServeHTTP)(w, r)
<mask> }
<mask>
<mask> func optionalAuthHandler(handler http.Handler) http.Handler {
<mask> return &authHandler{handler}
<mask> }
<mask>
<mask> // -------------------
<mask> // first run / install
<mask> // -------------------
<mask> func detectFirstRun() bool {
<mask> configfile := config.ourConfigFilename
</s> + Login page and web sessions
+ /control/login
+ /control/logout </s> remove dst.AuthName = src.AuthName
dst.AuthPass = src.AuthPass
</s> add </s> remove
</s> add config.auth.Close() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6304a7b91bfbfeeaffae1d8fcec3584ada0cc0be | home/helpers.go |
|
"github.com/AdguardTeam/AdGuardHome/internal/testutil" | <mask> "fmt"
<mask> "testing"
<mask>
<mask> "github.com/stretchr/testify/assert"
<mask> )
<mask>
<mask> func TestMain(m *testing.M) {
<mask> testutil.DiscardLogOutput(m)
</s> Pull request: 2273 clean tests output
Merge in DNS/adguard-home from 2273-clean-tests-output to master
Closes #2273.
Squashed commit of the following:
commit 7571a33fc1f76300bd256578b3afa95338e399c4
Merge: f17df0f9c a19523b25
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:45:30 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:35:42 2020 +0300
home: move build constraint on top line
commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:24:50 2020 +0300
all: add improvements to changelog
commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56
Merge: 43d4f7acf 394fc5a9d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:04:38 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit 43d4f7acf188e810aa7277cb6479110c9842e8be
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 13:38:13 2020 +0300
dnsfilter: remove redundant test logging
commit 7194c1413006b8f52fc454e89ab052bf52e4e517
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 12:19:14 2020 +0300
testutil: improve comments
commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:22:08 2020 +0300
nclient4: fix wrong function name
commit f355749149b2a4485792ba2bdcbc0bb4b629d726
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:07:22 2020 +0300
testutil: fix comments and naming
commit f8c50a260bfae08d594a7f37d603941d3680a45e
Author: Eugene Burkov <[email protected]>
Date: Fri Nov 13 14:09:50 2020 +0300
testutil: create a package and include it
commit f169cdc4084b719de65aa0cdc65200b48785322e
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:15:58 2020 +0300
agherr: discard loggers output
commit 360e736b5a2a30f2c5350448234f14b841e3ea27
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:09:55 2020 +0300
all: replace default log writer with ioutil.Discard
Closes #2273. | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e | internal/agherr/agherr_test.go |
func TestMain(m *testing.M) {
testutil.DiscardLogOutput(m)
}
| <mask> )
<mask>
<mask> func TestError_Error(t *testing.T) {
<mask> testCases := []struct {
<mask> name string
<mask> want string
<mask> err error
</s> Pull request: 2273 clean tests output
Merge in DNS/adguard-home from 2273-clean-tests-output to master
Closes #2273.
Squashed commit of the following:
commit 7571a33fc1f76300bd256578b3afa95338e399c4
Merge: f17df0f9c a19523b25
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:45:30 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:35:42 2020 +0300
home: move build constraint on top line
commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:24:50 2020 +0300
all: add improvements to changelog
commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56
Merge: 43d4f7acf 394fc5a9d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:04:38 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit 43d4f7acf188e810aa7277cb6479110c9842e8be
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 13:38:13 2020 +0300
dnsfilter: remove redundant test logging
commit 7194c1413006b8f52fc454e89ab052bf52e4e517
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 12:19:14 2020 +0300
testutil: improve comments
commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:22:08 2020 +0300
nclient4: fix wrong function name
commit f355749149b2a4485792ba2bdcbc0bb4b629d726
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:07:22 2020 +0300
testutil: fix comments and naming
commit f8c50a260bfae08d594a7f37d603941d3680a45e
Author: Eugene Burkov <[email protected]>
Date: Fri Nov 13 14:09:50 2020 +0300
testutil: create a package and include it
commit f169cdc4084b719de65aa0cdc65200b48785322e
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:15:58 2020 +0300
agherr: discard loggers output
commit 360e736b5a2a30f2c5350448234f14b841e3ea27
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:09:55 2020 +0300
all: replace default log writer with ioutil.Discard
Closes #2273. </s> remove t.Logf("IP addresses: %v", ips)
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e | internal/agherr/agherr_test.go |
"github.com/AdguardTeam/AdGuardHome/internal/testutil" | <mask> "testing"
<mask> "time"
<mask>
<mask> "github.com/stretchr/testify/assert"
<mask> )
<mask>
<mask> func TestMain(m *testing.M) {
</s> Pull request: 2273 clean tests output
Merge in DNS/adguard-home from 2273-clean-tests-output to master
Closes #2273.
Squashed commit of the following:
commit 7571a33fc1f76300bd256578b3afa95338e399c4
Merge: f17df0f9c a19523b25
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:45:30 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:35:42 2020 +0300
home: move build constraint on top line
commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:24:50 2020 +0300
all: add improvements to changelog
commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56
Merge: 43d4f7acf 394fc5a9d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:04:38 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit 43d4f7acf188e810aa7277cb6479110c9842e8be
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 13:38:13 2020 +0300
dnsfilter: remove redundant test logging
commit 7194c1413006b8f52fc454e89ab052bf52e4e517
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 12:19:14 2020 +0300
testutil: improve comments
commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:22:08 2020 +0300
nclient4: fix wrong function name
commit f355749149b2a4485792ba2bdcbc0bb4b629d726
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:07:22 2020 +0300
testutil: fix comments and naming
commit f8c50a260bfae08d594a7f37d603941d3680a45e
Author: Eugene Burkov <[email protected]>
Date: Fri Nov 13 14:09:50 2020 +0300
testutil: create a package and include it
commit f169cdc4084b719de65aa0cdc65200b48785322e
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:15:58 2020 +0300
agherr: discard loggers output
commit 360e736b5a2a30f2c5350448234f14b841e3ea27
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:09:55 2020 +0300
all: replace default log writer with ioutil.Discard
Closes #2273. | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e | internal/dhcpd/dhcpd_test.go |
func TestMain(m *testing.M) {
testutil.DiscardLogOutput(m)
}
| <mask> "github.com/stretchr/testify/assert"
<mask> )
<mask>
<mask> func testNotify(flags uint32) {
<mask> }
<mask>
<mask> // Leases database store/load
<mask> func TestDB(t *testing.T) {
<mask> var err error
</s> Pull request: 2273 clean tests output
Merge in DNS/adguard-home from 2273-clean-tests-output to master
Closes #2273.
Squashed commit of the following:
commit 7571a33fc1f76300bd256578b3afa95338e399c4
Merge: f17df0f9c a19523b25
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:45:30 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:35:42 2020 +0300
home: move build constraint on top line
commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:24:50 2020 +0300
all: add improvements to changelog
commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56
Merge: 43d4f7acf 394fc5a9d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:04:38 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit 43d4f7acf188e810aa7277cb6479110c9842e8be
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 13:38:13 2020 +0300
dnsfilter: remove redundant test logging
commit 7194c1413006b8f52fc454e89ab052bf52e4e517
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 12:19:14 2020 +0300
testutil: improve comments
commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:22:08 2020 +0300
nclient4: fix wrong function name
commit f355749149b2a4485792ba2bdcbc0bb4b629d726
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:07:22 2020 +0300
testutil: fix comments and naming
commit f8c50a260bfae08d594a7f37d603941d3680a45e
Author: Eugene Burkov <[email protected]>
Date: Fri Nov 13 14:09:50 2020 +0300
testutil: create a package and include it
commit f169cdc4084b719de65aa0cdc65200b48785322e
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:15:58 2020 +0300
agherr: discard loggers output
commit 360e736b5a2a30f2c5350448234f14b841e3ea27
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:09:55 2020 +0300
all: replace default log writer with ioutil.Discard
Closes #2273. | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e | internal/dhcpd/dhcpd_test.go |
"github.com/AdguardTeam/AdGuardHome/internal/testutil" | <mask> "time"
<mask>
<mask> "github.com/hugelgupf/socketpair"
<mask> "github.com/insomniacslk/dhcp/dhcpv4"
<mask> "github.com/insomniacslk/dhcp/dhcpv4/server4"
<mask> )
</s> Pull request: 2273 clean tests output
Merge in DNS/adguard-home from 2273-clean-tests-output to master
Closes #2273.
Squashed commit of the following:
commit 7571a33fc1f76300bd256578b3afa95338e399c4
Merge: f17df0f9c a19523b25
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:45:30 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:35:42 2020 +0300
home: move build constraint on top line
commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:24:50 2020 +0300
all: add improvements to changelog
commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56
Merge: 43d4f7acf 394fc5a9d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:04:38 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit 43d4f7acf188e810aa7277cb6479110c9842e8be
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 13:38:13 2020 +0300
dnsfilter: remove redundant test logging
commit 7194c1413006b8f52fc454e89ab052bf52e4e517
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 12:19:14 2020 +0300
testutil: improve comments
commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:22:08 2020 +0300
nclient4: fix wrong function name
commit f355749149b2a4485792ba2bdcbc0bb4b629d726
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:07:22 2020 +0300
testutil: fix comments and naming
commit f8c50a260bfae08d594a7f37d603941d3680a45e
Author: Eugene Burkov <[email protected]>
Date: Fri Nov 13 14:09:50 2020 +0300
testutil: create a package and include it
commit f169cdc4084b719de65aa0cdc65200b48785322e
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:15:58 2020 +0300
agherr: discard loggers output
commit 360e736b5a2a30f2c5350448234f14b841e3ea27
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:09:55 2020 +0300
all: replace default log writer with ioutil.Discard
Closes #2273. | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e | internal/dhcpd/nclient4/client_test.go |
func TestMain(m *testing.M) {
testutil.DiscardLogOutput(m)
}
| <mask> "github.com/insomniacslk/dhcp/dhcpv4/server4"
<mask> )
<mask>
<mask> type handler struct {
<mask> mu sync.Mutex
<mask> received []*dhcpv4.DHCPv4
<mask>
<mask> // Each received packet can have more than one response (in theory,
</s> Pull request: 2273 clean tests output
Merge in DNS/adguard-home from 2273-clean-tests-output to master
Closes #2273.
Squashed commit of the following:
commit 7571a33fc1f76300bd256578b3afa95338e399c4
Merge: f17df0f9c a19523b25
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:45:30 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:35:42 2020 +0300
home: move build constraint on top line
commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:24:50 2020 +0300
all: add improvements to changelog
commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56
Merge: 43d4f7acf 394fc5a9d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:04:38 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit 43d4f7acf188e810aa7277cb6479110c9842e8be
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 13:38:13 2020 +0300
dnsfilter: remove redundant test logging
commit 7194c1413006b8f52fc454e89ab052bf52e4e517
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 12:19:14 2020 +0300
testutil: improve comments
commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:22:08 2020 +0300
nclient4: fix wrong function name
commit f355749149b2a4485792ba2bdcbc0bb4b629d726
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:07:22 2020 +0300
testutil: fix comments and naming
commit f8c50a260bfae08d594a7f37d603941d3680a45e
Author: Eugene Burkov <[email protected]>
Date: Fri Nov 13 14:09:50 2020 +0300
testutil: create a package and include it
commit f169cdc4084b719de65aa0cdc65200b48785322e
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:15:58 2020 +0300
agherr: discard loggers output
commit 360e736b5a2a30f2c5350448234f14b841e3ea27
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:09:55 2020 +0300
all: replace default log writer with ioutil.Discard
Closes #2273. | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e | internal/dhcpd/nclient4/client_test.go |
"github.com/AdguardTeam/AdGuardHome/internal/testutil" | <mask> "testing"
<mask>
<mask> "github.com/AdguardTeam/urlfilter/rules"
<mask> "github.com/miekg/dns"
<mask> "github.com/stretchr/testify/assert"
<mask> )
<mask>
</s> Pull request: 2273 clean tests output
Merge in DNS/adguard-home from 2273-clean-tests-output to master
Closes #2273.
Squashed commit of the following:
commit 7571a33fc1f76300bd256578b3afa95338e399c4
Merge: f17df0f9c a19523b25
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:45:30 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:35:42 2020 +0300
home: move build constraint on top line
commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:24:50 2020 +0300
all: add improvements to changelog
commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56
Merge: 43d4f7acf 394fc5a9d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:04:38 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit 43d4f7acf188e810aa7277cb6479110c9842e8be
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 13:38:13 2020 +0300
dnsfilter: remove redundant test logging
commit 7194c1413006b8f52fc454e89ab052bf52e4e517
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 12:19:14 2020 +0300
testutil: improve comments
commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:22:08 2020 +0300
nclient4: fix wrong function name
commit f355749149b2a4485792ba2bdcbc0bb4b629d726
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:07:22 2020 +0300
testutil: fix comments and naming
commit f8c50a260bfae08d594a7f37d603941d3680a45e
Author: Eugene Burkov <[email protected]>
Date: Fri Nov 13 14:09:50 2020 +0300
testutil: create a package and include it
commit f169cdc4084b719de65aa0cdc65200b48785322e
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:15:58 2020 +0300
agherr: discard loggers output
commit 360e736b5a2a30f2c5350448234f14b841e3ea27
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:09:55 2020 +0300
all: replace default log writer with ioutil.Discard
Closes #2273. | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e | internal/dnsfilter/dnsfilter_test.go |
func TestMain(m *testing.M) {
testutil.DiscardLogOutput(m)
}
| <mask> "github.com/stretchr/testify/assert"
<mask> )
<mask>
<mask> var setts RequestFilteringSettings
<mask>
<mask> // HELPERS
<mask> // SAFE BROWSING
<mask> // SAFE SEARCH
<mask> // PARENTAL
</s> Pull request: 2273 clean tests output
Merge in DNS/adguard-home from 2273-clean-tests-output to master
Closes #2273.
Squashed commit of the following:
commit 7571a33fc1f76300bd256578b3afa95338e399c4
Merge: f17df0f9c a19523b25
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:45:30 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:35:42 2020 +0300
home: move build constraint on top line
commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:24:50 2020 +0300
all: add improvements to changelog
commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56
Merge: 43d4f7acf 394fc5a9d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:04:38 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit 43d4f7acf188e810aa7277cb6479110c9842e8be
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 13:38:13 2020 +0300
dnsfilter: remove redundant test logging
commit 7194c1413006b8f52fc454e89ab052bf52e4e517
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 12:19:14 2020 +0300
testutil: improve comments
commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:22:08 2020 +0300
nclient4: fix wrong function name
commit f355749149b2a4485792ba2bdcbc0bb4b629d726
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:07:22 2020 +0300
testutil: fix comments and naming
commit f8c50a260bfae08d594a7f37d603941d3680a45e
Author: Eugene Burkov <[email protected]>
Date: Fri Nov 13 14:09:50 2020 +0300
testutil: create a package and include it
commit f169cdc4084b719de65aa0cdc65200b48785322e
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:15:58 2020 +0300
agherr: discard loggers output
commit 360e736b5a2a30f2c5350448234f14b841e3ea27
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:09:55 2020 +0300
all: replace default log writer with ioutil.Discard
Closes #2273. | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e | internal/dnsfilter/dnsfilter_test.go |
<mask> if err != nil {
<mask> t.Fatalf("Failed to lookup for %s", safeDomain)
<mask> }
<mask>
<mask> t.Logf("IP addresses: %v", ips)
<mask> ip := ips[0]
<mask> for _, i := range ips {
<mask> if i.To4() != nil {
<mask> ip = i
<mask> break
</s> Pull request: 2273 clean tests output
Merge in DNS/adguard-home from 2273-clean-tests-output to master
Closes #2273.
Squashed commit of the following:
commit 7571a33fc1f76300bd256578b3afa95338e399c4
Merge: f17df0f9c a19523b25
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:45:30 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:35:42 2020 +0300
home: move build constraint on top line
commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:24:50 2020 +0300
all: add improvements to changelog
commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56
Merge: 43d4f7acf 394fc5a9d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:04:38 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit 43d4f7acf188e810aa7277cb6479110c9842e8be
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 13:38:13 2020 +0300
dnsfilter: remove redundant test logging
commit 7194c1413006b8f52fc454e89ab052bf52e4e517
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 12:19:14 2020 +0300
testutil: improve comments
commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:22:08 2020 +0300
nclient4: fix wrong function name
commit f355749149b2a4485792ba2bdcbc0bb4b629d726
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:07:22 2020 +0300
testutil: fix comments and naming
commit f8c50a260bfae08d594a7f37d603941d3680a45e
Author: Eugene Burkov <[email protected]>
Date: Fri Nov 13 14:09:50 2020 +0300
testutil: create a package and include it
commit f169cdc4084b719de65aa0cdc65200b48785322e
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:15:58 2020 +0300
agherr: discard loggers output
commit 360e736b5a2a30f2c5350448234f14b841e3ea27
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:09:55 2020 +0300
all: replace default log writer with ioutil.Discard
Closes #2273. | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e | internal/dnsfilter/dnsfilter_test.go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.