docstring_tokens
stringlengths
18
16.9k
code_tokens
stringlengths
75
1.81M
html_url
stringlengths
74
116
file_name
stringlengths
3
311
keep keep keep keep replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> con, err := dialer.DialContext(ctx, network, addr) <mask> return con, err <mask> } <mask> <mask> bindhost := config.DNS.BindHost <mask> if config.DNS.BindHost == "0.0.0.0" { <mask> bindhost = "127.0.0.1" <mask> } <mask> resolverAddr := fmt.Sprintf("%s:%d", bindhost, config.DNS.Port) <mask> r := upstream.NewResolver(resolverAddr, 30*time.Second) <mask> addrs, e := r.LookupIPAddr(ctx, host) <mask> log.Tracef("LookupIPAddr: %s: %v", host, addrs) <mask> if e != nil { <mask> return nil, e <mask> } <mask> <mask> if len(addrs) == 0 { </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove var err error bindhost := config.DNS.BindHost if config.DNS.BindHost == "0.0.0.0" { bindhost = "127.0.0.1" } resolverAddress := fmt.Sprintf("%s:%d", bindhost, config.DNS.Port) opts := upstream.Options{ Timeout: rdnsTimeout, } r.upstream, err = upstream.AddressToUpstream(resolverAddress, opts) if err != nil { log.Error("upstream.AddressToUpstream: %s", err) return nil } </s> add </s> remove config.queryLog = querylog.New(conf) </s> add Context.queryLog = querylog.New(conf) </s> remove func InitRDNS(clients *clientsContainer) *RDNS { </s> add func InitRDNS(dnsServer *dnsforward.Server, clients *clientsContainer) *RDNS { </s> remove resp, err := r.upstream.Exchange(&req) </s> add resp, err := r.dnsServer.Exchange(&req) </s> remove units := Hours if s.limit/24 > 7 { units = Days } </s> add </s> remove func (s *statsCtx) loadUnits() ([]*unitDB, uint32) { </s> add func (s *statsCtx) loadUnits(limit uint32) ([]*unitDB, uint32) {
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/helpers.go
keep keep add keep keep keep keep keep
<mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/dhcpd" <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/NYTimes/gziphandler" <mask> "github.com/gobuffalo/packr" <mask> ) <mask> </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove "github.com/AdguardTeam/dnsproxy/upstream" </s> add </s> remove "github.com/AdguardTeam/dnsproxy/upstream" </s> add "github.com/AdguardTeam/AdGuardHome/dnsforward" </s> remove type dnsContext struct { rdns *RDNS whois *Whois } </s> add </s> remove const ( rdnsTimeout = 3 * time.Second // max time to wait for rDNS response ) </s> add </s> remove "fmt" </s> add </s> remove err := s.Start(nil) </s> add err := s.Start()
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/home.go
keep keep keep keep replace replace keep keep keep keep keep
<mask> <mask> config.DHCP.WorkDir = config.ourWorkingDir <mask> config.DHCP.HTTPRegister = httpRegister <mask> config.DHCP.ConfigModified = onConfigModified <mask> config.dhcpServer = dhcpd.Create(config.DHCP) <mask> config.clients.Init(config.Clients, config.dhcpServer) <mask> config.Clients = nil <mask> <mask> if (runtime.GOOS == "linux" || runtime.GOOS == "darwin") && <mask> config.RlimitNoFile != 0 { <mask> setRlimit(config.RlimitNoFile) </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove config.dnsServer = dnsforward.NewServer(config.dnsFilter, config.stats, config.queryLog) </s> add Context.dnsServer = dnsforward.NewServer(Context.dnsFilter, Context.stats, Context.queryLog) dnsConfig := generateServerConfig() err = Context.dnsServer.Prepare(&dnsConfig) if err != nil { return fmt.Errorf("dnsServer.Prepare: %s", err) } </s> remove log.SetLevel(level) </s> add </s> remove initDNSServer() err = startDNSServer() if err != nil { </s> add err = initDNSServer() var err2 error if err == nil { err2 = startDNSServer() } if err != nil || err2 != nil { </s> remove if config.TLS.ForceHTTPS && r.TLS == nil && config.TLS.Enabled && config.TLS.PortHTTPS != 0 && config.httpsServer.server != nil { </s> add if config.TLS.ForceHTTPS && r.TLS == nil && config.TLS.Enabled && config.TLS.PortHTTPS != 0 && Context.httpsServer.server != nil { </s> remove level = log.DEBUG </s> add log.SetLevel(log.DEBUG) </s> remove err = s.startInternal(config) </s> add err = s.Prepare(config) if err != nil { return errorx.Decorate(err, "could not reconfigure the server") } err = s.startInternal()
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/home.go
keep keep keep keep replace keep keep keep keep keep
<mask> if err != nil { <mask> log.Fatal(err) <mask> } <mask> <mask> initDNSServer() <mask> go func() { <mask> err = startDNSServer() <mask> if err != nil { <mask> log.Fatal(err) <mask> } </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove initDNSServer() err = startDNSServer() if err != nil { </s> add err = initDNSServer() var err2 error if err == nil { err2 = startDNSServer() } if err != nil || err2 != nil { </s> remove err = config.httpsServer.server.ListenAndServeTLS("", "") </s> add err = Context.httpsServer.server.ListenAndServeTLS("", "") </s> remove config.httpsServer.cond.L.Unlock() </s> add Context.httpsServer.cond.L.Unlock() </s> remove httpError(w, http.StatusInternalServerError, "Couldn't start DNS server: %s", err) </s> add if err != nil { httpError(w, http.StatusInternalServerError, "Couldn't initialize DNS server: %s", err) } else { httpError(w, http.StatusInternalServerError, "Couldn't start DNS server: %s", err2) } </s> remove err = config.dhcpServer.Start() </s> add err = Context.dhcpServer.Start() </s> remove err = s.startInternal(config) </s> add err = s.Prepare(config) if err != nil { return errorx.Decorate(err, "could not reconfigure the server") } err = s.startInternal()
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/home.go
keep keep keep keep replace keep keep keep keep keep
<mask> http.Handle("/install.html", preInstallHandler(http.FileServer(box))) <mask> registerInstallHandlers() <mask> } <mask> <mask> config.httpsServer.cond = sync.NewCond(&config.httpsServer.Mutex) <mask> <mask> // for https, we have a separate goroutine loop <mask> go httpServerLoop() <mask> <mask> // this loop is used as an ability to change listening host and/or port </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove for !config.httpsServer.shutdown { </s> add for !Context.httpsServer.shutdown { </s> remove err := config.httpServer.ListenAndServe() </s> add err := Context.httpServer.ListenAndServe() </s> remove _ = config.httpServer.Shutdown(context.TODO()) </s> add _ = Context.httpServer.Shutdown(context.TODO()) </s> remove config.httpServer = &http.Server{ </s> add Context.httpServer = &http.Server{ </s> remove if config.httpsServer.server != nil { </s> add if Context.httpsServer.server != nil { </s> remove if config.httpsServer.server != nil { </s> add if Context.httpsServer.server != nil {
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/home.go
keep replace keep keep keep keep replace keep keep keep keep
<mask> // this loop is used as an ability to change listening host and/or port <mask> for !config.httpsServer.shutdown { <mask> printHTTPAddresses("http") <mask> <mask> // we need to have new instance, because after Shutdown() the Server is not usable <mask> address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort)) <mask> config.httpServer = &http.Server{ <mask> Addr: address, <mask> } <mask> err := config.httpServer.ListenAndServe() <mask> if err != http.ErrServerClosed { </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove err := config.httpServer.ListenAndServe() </s> add err := Context.httpServer.ListenAndServe() </s> remove config.httpsServer.cond = sync.NewCond(&config.httpsServer.Mutex) </s> add Context.httpsServer.cond = sync.NewCond(&Context.httpsServer.Mutex) </s> remove if config.httpsServer.server != nil { </s> add if Context.httpsServer.server != nil { </s> remove if config.httpsServer.server != nil { </s> add if Context.httpsServer.server != nil { </s> remove config.httpsServer.cond.L.Unlock() </s> add Context.httpsServer.cond.L.Unlock()
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/home.go
keep keep keep keep replace keep keep keep keep keep
<mask> address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort)) <mask> config.httpServer = &http.Server{ <mask> Addr: address, <mask> } <mask> err := config.httpServer.ListenAndServe() <mask> if err != http.ErrServerClosed { <mask> cleanupAlways() <mask> log.Fatal(err) <mask> } <mask> // We use ErrServerClosed as a sign that we need to rebind on new address, so go back to the start of the loop </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove config.httpServer = &http.Server{ </s> add Context.httpServer = &http.Server{ </s> remove for !config.httpsServer.shutdown { </s> add for !Context.httpsServer.shutdown { </s> remove config.httpsServer.cond.L.Unlock() </s> add Context.httpsServer.cond.L.Unlock() </s> remove func initDNSServer() { </s> add func initDNSServer() error { </s> remove err = config.httpsServer.server.ListenAndServeTLS("", "") </s> add err = Context.httpsServer.server.ListenAndServeTLS("", "") </s> remove config.httpsServer.cond.L.Lock() config.httpsServer.cond.Broadcast() if config.httpsServer.server != nil { config.httpsServer.server.Shutdown(context.TODO()) </s> add Context.httpsServer.cond.L.Lock() Context.httpsServer.cond.Broadcast() if Context.httpsServer.server != nil { Context.httpsServer.server.Shutdown(context.TODO())
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/home.go
keep keep keep keep replace replace keep keep keep keep keep
<mask> select {} <mask> } <mask> <mask> func httpServerLoop() { <mask> for !config.httpsServer.shutdown { <mask> config.httpsServer.cond.L.Lock() <mask> // this mechanism doesn't let us through until all conditions are met <mask> for config.TLS.Enabled == false || <mask> config.TLS.PortHTTPS == 0 || <mask> len(config.TLS.PrivateKeyData) == 0 || <mask> len(config.TLS.CertificateChainData) == 0 { // sleep until necessary data is supplied </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove config.httpsServer.cond.Wait() </s> add Context.httpsServer.cond.Wait() </s> remove config.dhcpServer = dhcpd.Create(config.DHCP) config.clients.Init(config.Clients, config.dhcpServer) </s> add Context.dhcpServer = dhcpd.Create(config.DHCP) Context.clients.Init(config.Clients, Context.dhcpServer) </s> remove if config.TLS.ForceHTTPS && r.TLS == nil && config.TLS.Enabled && config.TLS.PortHTTPS != 0 && config.httpsServer.server != nil { </s> add if config.TLS.ForceHTTPS && r.TLS == nil && config.TLS.Enabled && config.TLS.PortHTTPS != 0 && Context.httpsServer.server != nil { </s> remove config.httpsServer.cond.L.Lock() config.httpsServer.cond.Broadcast() if config.httpsServer.server != nil { config.httpsServer.server.Shutdown(context.TODO()) </s> add Context.httpsServer.cond.L.Lock() Context.httpsServer.cond.Broadcast() if Context.httpsServer.server != nil { Context.httpsServer.server.Shutdown(context.TODO()) </s> remove c, ok := config.clients.Find(clientAddr) </s> add c, ok := Context.clients.Find(clientAddr) </s> remove ok2 := s.deleteUnit(tx, id-s.limit) </s> add ok2 := s.deleteUnit(tx, id-s.conf.limit)
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/home.go
keep keep keep keep replace keep keep keep keep keep
<mask> for config.TLS.Enabled == false || <mask> config.TLS.PortHTTPS == 0 || <mask> len(config.TLS.PrivateKeyData) == 0 || <mask> len(config.TLS.CertificateChainData) == 0 { // sleep until necessary data is supplied <mask> config.httpsServer.cond.Wait() <mask> } <mask> address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.TLS.PortHTTPS)) <mask> // validate current TLS config and update warnings (it could have been loaded from file) <mask> data := validateCertificates(string(config.TLS.CertificateChainData), string(config.TLS.PrivateKeyData), config.TLS.ServerName) <mask> if !data.ValidPair { </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove for !config.httpsServer.shutdown { config.httpsServer.cond.L.Lock() </s> add for !Context.httpsServer.shutdown { Context.httpsServer.cond.L.Lock() </s> remove if config.TLS.ForceHTTPS && r.TLS == nil && config.TLS.Enabled && config.TLS.PortHTTPS != 0 && config.httpsServer.server != nil { </s> add if config.TLS.ForceHTTPS && r.TLS == nil && config.TLS.Enabled && config.TLS.PortHTTPS != 0 && Context.httpsServer.server != nil { </s> remove config.dhcpServer = dhcpd.Create(config.DHCP) config.clients.Init(config.Clients, config.dhcpServer) </s> add Context.dhcpServer = dhcpd.Create(config.DHCP) Context.clients.Init(config.Clients, Context.dhcpServer) </s> remove ok2 := s.deleteUnit(tx, id-s.limit) </s> add ok2 := s.deleteUnit(tx, id-s.conf.limit) </s> remove c, ok := config.clients.Find(clientAddr) </s> add c, ok := Context.clients.Find(clientAddr) </s> remove func (s *Server) prepare(config *ServerConfig) error { if s.dnsProxy != nil { return errors.New("DNS server is already started") } </s> add func (s *Server) Prepare(config *ServerConfig) error {
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/home.go
keep replace keep keep replace keep
<mask> } <mask> config.httpsServer.cond.L.Unlock() <mask> <mask> // prepare HTTPS server <mask> config.httpsServer.server = &http.Server{ <mask> Addr: address, </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove config.httpServer = &http.Server{ </s> add Context.httpServer = &http.Server{ </s> remove err := config.httpServer.ListenAndServe() </s> add err := Context.httpServer.ListenAndServe() </s> remove config.httpsServer.cond.L.Unlock() </s> add Context.httpsServer.cond.L.Unlock() </s> add // HTTPSServer - HTTPS Server </s> remove config.httpsServer.cond.L.Lock() config.httpsServer.cond.Broadcast() if config.httpsServer.server != nil { config.httpsServer.server.Shutdown(context.TODO()) </s> add Context.httpsServer.cond.L.Lock() Context.httpsServer.cond.Broadcast() if Context.httpsServer.server != nil { Context.httpsServer.server.Shutdown(context.TODO())
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/home.go
keep keep keep keep replace keep keep keep keep keep
<mask> }, <mask> } <mask> <mask> printHTTPAddresses("https") <mask> err = config.httpsServer.server.ListenAndServeTLS("", "") <mask> if err != http.ErrServerClosed { <mask> cleanupAlways() <mask> log.Fatal(err) <mask> } <mask> } </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove initDNSServer() </s> add err = initDNSServer() if err != nil { log.Fatalf("%s", err) } </s> remove err := config.httpServer.ListenAndServe() </s> add err := Context.httpServer.ListenAndServe() </s> remove config.httpsServer.cond.L.Unlock() </s> add Context.httpsServer.cond.L.Unlock() </s> remove config.httpServer = &http.Server{ </s> add Context.httpServer = &http.Server{ </s> remove err = config.dhcpServer.Start() </s> add err = Context.dhcpServer.Start() </s> remove config.httpServer.Shutdown(context.TODO()) </s> add Context.httpServer.Shutdown(context.TODO())
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/home.go
keep keep keep keep replace keep keep keep keep keep
<mask> if args.logFile != "" { <mask> ls.LogFile = args.logFile <mask> } <mask> <mask> level := log.INFO <mask> if ls.Verbose { <mask> level = log.DEBUG <mask> } <mask> log.SetLevel(level) <mask> </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove level = log.DEBUG </s> add log.SetLevel(log.DEBUG) </s> remove log.SetLevel(level) </s> add </s> remove if config.stats != nil { </s> add if Context.stats != nil { </s> remove if config.dnsFilter != nil { </s> add if Context.dnsFilter != nil { </s> remove if config.dnsServer != nil { </s> add if Context.dnsServer != nil { </s> remove if config.dhcpServer != nil { </s> add if Context.dhcpServer != nil {
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/home.go
keep keep keep replace keep replace keep keep keep keep
<mask> <mask> level := log.INFO <mask> if ls.Verbose { <mask> level = log.DEBUG <mask> } <mask> log.SetLevel(level) <mask> <mask> if args.runningAsService && ls.LogFile == "" && runtime.GOOS == "windows" { <mask> // When running as a Windows service, use eventlog by default if nothing else is configured <mask> // Otherwise, we'll simply loose the log output </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove level := log.INFO </s> add // log.SetLevel(log.INFO) - default </s> remove if config.TLS.ForceHTTPS && r.TLS == nil && config.TLS.Enabled && config.TLS.PortHTTPS != 0 && config.httpsServer.server != nil { </s> add if config.TLS.ForceHTTPS && r.TLS == nil && config.TLS.Enabled && config.TLS.PortHTTPS != 0 && Context.httpsServer.server != nil { </s> remove err = s.startInternal(config) </s> add err = s.Prepare(config) if err != nil { return errorx.Decorate(err, "could not reconfigure the server") } err = s.startInternal() </s> remove config.dhcpServer = dhcpd.Create(config.DHCP) config.clients.Init(config.Clients, config.dhcpServer) </s> add Context.dhcpServer = dhcpd.Create(config.DHCP) Context.clients.Init(config.Clients, Context.dhcpServer) </s> remove ok2 := s.deleteUnit(tx, id-s.limit) </s> add ok2 := s.deleteUnit(tx, id-s.conf.limit)
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/home.go
keep keep replace replace replace keep replace
<mask> func stopHTTPServer() { <mask> log.Info("Stopping HTTP server...") <mask> config.httpsServer.shutdown = true <mask> if config.httpsServer.server != nil { <mask> config.httpsServer.server.Shutdown(context.TODO()) <mask> } <mask> config.httpServer.Shutdown(context.TODO()) </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove config.httpsServer.cond.L.Unlock() </s> add Context.httpsServer.cond.L.Unlock() </s> remove if config.httpsServer.server != nil { </s> add if Context.httpsServer.server != nil { </s> remove if config.httpsServer.server != nil { </s> add if Context.httpsServer.server != nil { </s> remove initDNSServer() err = startDNSServer() if err != nil { </s> add err = initDNSServer() var err2 error if err == nil { err2 = startDNSServer() } if err != nil || err2 != nil { </s> add s.isRunning = false
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/home.go
keep replace keep keep keep replace
<mask> "encoding/binary" <mask> "fmt" <mask> "strings" <mask> "time" <mask> <mask> "github.com/AdguardTeam/dnsproxy/upstream" </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove "github.com/AdguardTeam/dnsproxy/upstream" </s> add </s> remove "errors" </s> add </s> add "github.com/AdguardTeam/AdGuardHome/dnsfilter" "github.com/AdguardTeam/AdGuardHome/dnsforward" "github.com/AdguardTeam/AdGuardHome/querylog" "github.com/AdguardTeam/AdGuardHome/stats" </s> remove if config.queryLog != nil { </s> add if Context.queryLog != nil { </s> remove if config.dnsServer != nil { </s> add if Context.dnsServer != nil {
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/rdns.go
keep keep keep keep replace replace replace replace keep keep keep keep keep
<mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/miekg/dns" <mask> ) <mask> <mask> const ( <mask> rdnsTimeout = 3 * time.Second // max time to wait for rDNS response <mask> ) <mask> <mask> // RDNS - module context <mask> type RDNS struct { <mask> clients *clientsContainer <mask> ipChannel chan string // pass data from DNS request handling thread to rDNS thread <mask> upstream upstream.Upstream // Upstream object for our own DNS server </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove ipChannel chan string // pass data from DNS request handling thread to rDNS thread upstream upstream.Upstream // Upstream object for our own DNS server </s> add ipChannel chan string // pass data from DNS request handling thread to rDNS thread </s> add dnsServer *dnsforward.Server </s> remove limit uint32 // maximum time we need to keep data for (in hours) db *bolt.DB conf Config </s> add db *bolt.DB conf *Config </s> remove type dnsContext struct { rdns *RDNS whois *Whois } </s> add </s> remove "github.com/AdguardTeam/dnsproxy/upstream" </s> add "github.com/AdguardTeam/AdGuardHome/dnsforward" </s> add limit uint32 // maximum time we need to keep data for (in hours)
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/rdns.go
keep keep add keep keep keep keep keep keep
<mask> <mask> // RDNS - module context <mask> type RDNS struct { <mask> clients *clientsContainer <mask> ipChannel chan string // pass data from DNS request handling thread to rDNS thread <mask> <mask> // Contains IP addresses of clients to be resolved by rDNS <mask> // If IP address is resolved, it stays here while it's inside Clients. <mask> // If it's removed from Clients, this IP address will be resolved once again. </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove ipChannel chan string // pass data from DNS request handling thread to rDNS thread upstream upstream.Upstream // Upstream object for our own DNS server </s> add ipChannel chan string // pass data from DNS request handling thread to rDNS thread </s> remove const ( rdnsTimeout = 3 * time.Second // max time to wait for rDNS response ) </s> add </s> remove clients clientsContainer // per-client-settings module </s> add </s> remove _ = config.httpServer.Shutdown(context.TODO()) </s> add _ = Context.httpServer.Shutdown(context.TODO()) </s> remove dnsctx dnsContext dnsFilter *dnsfilter.Dnsfilter dnsServer *dnsforward.Server dhcpServer *dhcpd.Server httpServer *http.Server httpsServer HTTPSServer </s> add </s> remove // GetList returns the pointer to clients list func (clients *clientsContainer) GetList() map[string]*Client { return clients.list } </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/rdns.go
keep keep keep keep replace replace keep keep keep keep keep
<mask> <mask> // RDNS - module context <mask> type RDNS struct { <mask> clients *clientsContainer <mask> ipChannel chan string // pass data from DNS request handling thread to rDNS thread <mask> upstream upstream.Upstream // Upstream object for our own DNS server <mask> <mask> // Contains IP addresses of clients to be resolved by rDNS <mask> // If IP address is resolved, it stays here while it's inside Clients. <mask> // If it's removed from Clients, this IP address will be resolved once again. <mask> // If IP address couldn't be resolved, it stays here for some time to prevent further attempts to resolve the same IP. </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> add dnsServer *dnsforward.Server </s> remove const ( rdnsTimeout = 3 * time.Second // max time to wait for rDNS response ) </s> add </s> remove clients clientsContainer // per-client-settings module </s> add </s> remove dnsctx dnsContext dnsFilter *dnsfilter.Dnsfilter dnsServer *dnsforward.Server dhcpServer *dhcpd.Server httpServer *http.Server httpsServer HTTPSServer </s> add </s> remove _ = config.httpServer.Shutdown(context.TODO()) </s> add _ = Context.httpServer.Shutdown(context.TODO()) </s> add // HTTPSServer - HTTPS Server
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/rdns.go
keep keep keep keep replace keep keep keep keep keep
<mask> ipAddrs cache.Cache <mask> } <mask> <mask> // InitRDNS - create module context <mask> func InitRDNS(clients *clientsContainer) *RDNS { <mask> r := RDNS{} <mask> r.clients = clients <mask> var err error <mask> <mask> bindhost := config.DNS.BindHost </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove var err error bindhost := config.DNS.BindHost if config.DNS.BindHost == "0.0.0.0" { bindhost = "127.0.0.1" } resolverAddress := fmt.Sprintf("%s:%d", bindhost, config.DNS.Port) opts := upstream.Options{ Timeout: rdnsTimeout, } r.upstream, err = upstream.AddressToUpstream(resolverAddress, opts) if err != nil { log.Error("upstream.AddressToUpstream: %s", err) return nil } </s> add </s> add r.dnsServer = dnsServer </s> remove bindhost := config.DNS.BindHost if config.DNS.BindHost == "0.0.0.0" { bindhost = "127.0.0.1" } resolverAddr := fmt.Sprintf("%s:%d", bindhost, config.DNS.Port) r := upstream.NewResolver(resolverAddr, 30*time.Second) addrs, e := r.LookupIPAddr(ctx, host) log.Tracef("LookupIPAddr: %s: %v", host, addrs) </s> add addrs, e := Context.dnsServer.Resolve(host) log.Debug("dnsServer.Resolve: %s: %v", host, addrs) </s> remove config.queryLog = querylog.New(conf) </s> add Context.queryLog = querylog.New(conf) </s> remove firstID := id - s.limit - 1 </s> add firstID := id - s.conf.limit - 1 </s> remove initDNSServer() err = startDNSServer() if err != nil { </s> add err = initDNSServer() var err2 error if err == nil { err2 = startDNSServer() } if err != nil || err2 != nil {
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/rdns.go
keep keep keep add keep keep keep keep keep
<mask> <mask> // InitRDNS - create module context <mask> func InitRDNS(dnsServer *dnsforward.Server, clients *clientsContainer) *RDNS { <mask> r := RDNS{} <mask> r.clients = clients <mask> <mask> cconf := cache.Config{} <mask> cconf.EnableLRU = true <mask> cconf.MaxCount = 10000 </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove func InitRDNS(clients *clientsContainer) *RDNS { </s> add func InitRDNS(dnsServer *dnsforward.Server, clients *clientsContainer) *RDNS { </s> remove var err error bindhost := config.DNS.BindHost if config.DNS.BindHost == "0.0.0.0" { bindhost = "127.0.0.1" } resolverAddress := fmt.Sprintf("%s:%d", bindhost, config.DNS.Port) opts := upstream.Options{ Timeout: rdnsTimeout, } r.upstream, err = upstream.AddressToUpstream(resolverAddress, opts) if err != nil { log.Error("upstream.AddressToUpstream: %s", err) return nil } </s> add </s> remove topClients := config.stats.GetTopClientsIP(topClientsNumber) </s> add topClients := Context.stats.GetTopClientsIP(topClientsNumber) </s> remove const ( rdnsTimeout = 3 * time.Second // max time to wait for rDNS response ) </s> add </s> add err := s.Prepare(nil) assert.True(t, err == nil) </s> add dnsServer *dnsforward.Server
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/rdns.go
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> // InitRDNS - create module context <mask> func InitRDNS(clients *clientsContainer) *RDNS { <mask> r := RDNS{} <mask> r.clients = clients <mask> var err error <mask> <mask> bindhost := config.DNS.BindHost <mask> if config.DNS.BindHost == "0.0.0.0" { <mask> bindhost = "127.0.0.1" <mask> } <mask> resolverAddress := fmt.Sprintf("%s:%d", bindhost, config.DNS.Port) <mask> <mask> opts := upstream.Options{ <mask> Timeout: rdnsTimeout, <mask> } <mask> r.upstream, err = upstream.AddressToUpstream(resolverAddress, opts) <mask> if err != nil { <mask> log.Error("upstream.AddressToUpstream: %s", err) <mask> return nil <mask> } <mask> <mask> cconf := cache.Config{} <mask> cconf.EnableLRU = true <mask> cconf.MaxCount = 10000 <mask> r.ipAddrs = cache.New(cconf) </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove func InitRDNS(clients *clientsContainer) *RDNS { </s> add func InitRDNS(dnsServer *dnsforward.Server, clients *clientsContainer) *RDNS { </s> add r.dnsServer = dnsServer </s> remove bindhost := config.DNS.BindHost if config.DNS.BindHost == "0.0.0.0" { bindhost = "127.0.0.1" } resolverAddr := fmt.Sprintf("%s:%d", bindhost, config.DNS.Port) r := upstream.NewResolver(resolverAddr, 30*time.Second) addrs, e := r.LookupIPAddr(ctx, host) log.Tracef("LookupIPAddr: %s: %v", host, addrs) </s> add addrs, e := Context.dnsServer.Resolve(host) log.Debug("dnsServer.Resolve: %s: %v", host, addrs) </s> remove config.queryLog = querylog.New(conf) </s> add Context.queryLog = querylog.New(conf) </s> remove initDNSServer() err = startDNSServer() if err != nil { </s> add err = initDNSServer() var err2 error if err == nil { err2 = startDNSServer() } if err != nil || err2 != nil { </s> remove func (s *Server) startInternal(config *ServerConfig) error { err := s.prepare(config) if err != nil { return err </s> add func (s *Server) startInternal() error { err := s.dnsProxy.Start() if err == nil { s.isRunning = true
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/rdns.go
keep keep keep keep replace keep keep keep keep keep
<mask> log.Debug("Error while calling dns.ReverseAddr(%s): %s", ip, err) <mask> return "" <mask> } <mask> <mask> resp, err := r.upstream.Exchange(&req) <mask> if err != nil { <mask> log.Debug("Error while making an rDNS lookup for %s: %s", ip, err) <mask> return "" <mask> } <mask> if len(resp.Answer) == 0 { </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove log.Fatalf("Cannot create DNS data dir at %s: %s", baseDir, err) </s> add return fmt.Errorf("Cannot create DNS data dir at %s: %s", baseDir, err) </s> remove httpError(w, http.StatusInternalServerError, "Couldn't start DNS server: %s", err) </s> add if err != nil { httpError(w, http.StatusInternalServerError, "Couldn't initialize DNS server: %s", err) } else { httpError(w, http.StatusInternalServerError, "Couldn't start DNS server: %s", err2) } </s> remove c, ok := config.clients.Find(clientAddr) </s> add c, ok := Context.clients.Find(clientAddr) </s> remove err := s.Start(nil) </s> add err := s.Start() </s> remove err := s.Start(nil) </s> add err := s.Start() </s> remove err := s.Start(nil) </s> add err := s.Start()
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/rdns.go
keep keep keep keep replace keep keep
<mask> if len(host) == 0 { <mask> continue <mask> } <mask> <mask> _, _ = config.clients.AddHost(ip, host, ClientSourceRDNS) <mask> } <mask> } </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove ok2 := s.deleteUnit(tx, id-s.limit) </s> add ok2 := s.deleteUnit(tx, id-s.conf.limit) </s> remove bindhost := config.DNS.BindHost if config.DNS.BindHost == "0.0.0.0" { bindhost = "127.0.0.1" } resolverAddr := fmt.Sprintf("%s:%d", bindhost, config.DNS.Port) r := upstream.NewResolver(resolverAddr, 30*time.Second) addrs, e := r.LookupIPAddr(ctx, host) log.Tracef("LookupIPAddr: %s: %v", host, addrs) </s> add addrs, e := Context.dnsServer.Resolve(host) log.Debug("dnsServer.Resolve: %s: %v", host, addrs) </s> remove if config.TLS.ForceHTTPS && r.TLS == nil && config.TLS.Enabled && config.TLS.PortHTTPS != 0 && config.httpsServer.server != nil { </s> add if config.TLS.ForceHTTPS && r.TLS == nil && config.TLS.Enabled && config.TLS.PortHTTPS != 0 && Context.httpsServer.server != nil { </s> remove _ = config.dnsFilter.SetFilters(filters, async) </s> add _ = Context.dnsFilter.SetFilters(filters, async) </s> remove func (s *Server) prepare(config *ServerConfig) error { if s.dnsProxy != nil { return errors.New("DNS server is already started") } </s> add func (s *Server) Prepare(config *ServerConfig) error { </s> remove func (s *statsCtx) GetTopClientsIP(limit uint) []string { units, _ := s.loadUnits() </s> add func (s *statsCtx) GetTopClientsIP(maxCount uint) []string { units, _ := s.loadUnits(s.conf.limit)
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
home/rdns.go
keep keep keep add keep keep keep keep keep keep
<mask> ConfigModified func() <mask> <mask> // Register an HTTP handler <mask> HTTPRegister func(string, string, func(http.ResponseWriter, *http.Request)) <mask> } <mask> <mask> // New - create object <mask> func New(conf Config) (Stats, error) { <mask> return createObject(conf) <mask> } </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove config.dnsctx.whois.Begin(ip) </s> add Context.whois.Begin(ip) </s> remove config.httpsServer.cond.L.Unlock() </s> add Context.httpsServer.cond.L.Unlock() </s> remove config.httpsServer.shutdown = true if config.httpsServer.server != nil { config.httpsServer.server.Shutdown(context.TODO()) </s> add Context.httpsServer.shutdown = true if Context.httpsServer.server != nil { Context.httpsServer.server.Shutdown(context.TODO()) </s> remove func InitRDNS(clients *clientsContainer) *RDNS { </s> add func InitRDNS(dnsServer *dnsforward.Server, clients *clientsContainer) *RDNS { </s> remove return s.dnsProxy.Start() </s> add return err </s> remove // GetList returns the pointer to clients list func (clients *clientsContainer) GetList() map[string]*Client { return clients.list } </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats.go
keep keep keep replace replace replace replace replace keep replace keep keep
<mask> <mask> // Return data <mask> func (s *statsCtx) handleStats(w http.ResponseWriter, r *http.Request) { <mask> units := Hours <mask> if s.limit/24 > 7 { <mask> units = Days <mask> } <mask> <mask> start := time.Now() <mask> d := s.getData(units) <mask> log.Debug("Stats: prepared data in %v", time.Since(start)) <mask> </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> add timeUnit := Hours if limit/24 > 7 { timeUnit = Days } </s> remove if config.dnsServer != nil { config.dnsServer.WriteDiskConfig(&c) </s> add if Context.dnsServer != nil { Context.dnsServer.WriteDiskConfig(&c) </s> remove func (s *statsCtx) getData(timeUnit TimeUnit) map[string]interface{} { </s> add func (s *statsCtx) getData() map[string]interface{} { limit := s.conf.limit </s> remove func (s *statsCtx) GetTopClientsIP(limit uint) []string { units, _ := s.loadUnits() </s> add func (s *statsCtx) GetTopClientsIP(maxCount uint) []string { units, _ := s.loadUnits(s.conf.limit) </s> remove units, firstID := s.loadUnits() </s> add units, firstID := s.loadUnits(limit)
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats_http.go
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> // Get configuration <mask> func (s *statsCtx) handleStatsInfo(w http.ResponseWriter, r *http.Request) { <mask> resp := config{} <mask> resp.IntervalDays = s.limit / 24 <mask> <mask> data, err := json.Marshal(resp) <mask> if err != nil { <mask> httpError(r, w, http.StatusInternalServerError, "json encode: %s", err) <mask> return </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove dc.Interval = s.limit / 24 </s> add dc.Interval = s.conf.limit / 24 </s> remove s.limit = uint32(limitDays) * 24 </s> add conf := *s.conf conf.limit = uint32(limitDays) * 24 s.conf = &conf </s> remove units := Hours if s.limit/24 > 7 { units = Days } </s> add </s> remove d := s.getData(units) </s> add d := s.getData() </s> remove if config.dnsServer != nil { config.dnsServer.WriteDiskConfig(&c) </s> add if Context.dnsServer != nil { Context.dnsServer.WriteDiskConfig(&c) </s> remove httpError(w, http.StatusInternalServerError, "Couldn't start DNS server: %s", err) </s> add if err != nil { httpError(w, http.StatusInternalServerError, "Couldn't initialize DNS server: %s", err) } else { httpError(w, http.StatusInternalServerError, "Couldn't start DNS server: %s", err2) }
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats_http.go
keep keep keep keep replace keep keep keep keep keep
<mask> e.Result = RNotFiltered <mask> e.Time = 123456 <mask> s.Update(e) <mask> <mask> d := s.getData(Hours) <mask> a := []uint64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2} <mask> assert.True(t, UIntArrayEquals(d["dns_queries"].([]uint64), a)) <mask> <mask> a = []uint64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1} <mask> assert.True(t, UIntArrayEquals(d["blocked_filtering"].([]uint64), a)) </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove d := s.getData(Hours) </s> add d := s.getData() </s> remove a := convertMapToArray(m, int(limit)) </s> add a := convertMapToArray(m, int(maxCount)) </s> add err := s.Prepare(nil) assert.True(t, err == nil) </s> remove if len(a) != int(s.limit/24) { log.Fatalf("len(a) != s.limit: %d %d", len(a), s.limit) </s> add if len(a) != int(limit/24) { log.Fatalf("len(a) != limit: %d %d", len(a), limit) </s> remove d := s.getData(units) </s> add d := s.getData() </s> remove _ = config.httpServer.Shutdown(context.TODO()) </s> add _ = Context.httpServer.Shutdown(context.TODO())
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats_test.go
keep keep keep keep replace keep keep keep keep keep
<mask> s.Update(e) <mask> } <mask> } <mask> <mask> d := s.getData(Hours) <mask> assert.True(t, d["num_dns_queries"].(uint64) == uint64(int(hour)*n)) <mask> <mask> s.Close() <mask> os.Remove(conf.Filename) <mask> } </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove d := s.getData(Hours) </s> add d := s.getData() </s> remove a := convertMapToArray(m, int(limit)) </s> add a := convertMapToArray(m, int(maxCount)) </s> remove d := s.getData(units) </s> add d := s.getData() </s> add timeUnit := Hours if limit/24 > 7 { timeUnit = Days } </s> remove units := Hours if s.limit/24 > 7 { units = Days } </s> add </s> add err := s.Prepare(nil) assert.True(t, err == nil)
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats_test.go
keep keep keep keep replace replace replace replace keep keep keep keep keep
<mask> ) <mask> <mask> // statsCtx - global context <mask> type statsCtx struct { <mask> limit uint32 // maximum time we need to keep data for (in hours) <mask> db *bolt.DB <mask> <mask> conf Config <mask> <mask> unit *unit // the current unit <mask> unitLock sync.Mutex // protect 'unit' <mask> } <mask> </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> add limit uint32 // maximum time we need to keep data for (in hours) </s> remove const ( rdnsTimeout = 3 * time.Second // max time to wait for rDNS response ) </s> add </s> add // HTTPSServer - HTTPS Server </s> remove units, firstID := s.loadUnits() </s> add units, firstID := s.loadUnits(limit) </s> remove ipChannel chan string // pass data from DNS request handling thread to rDNS thread upstream upstream.Upstream // Upstream object for our own DNS server </s> add ipChannel chan string // pass data from DNS request handling thread to rDNS thread </s> remove type dnsContext struct { rdns *RDNS whois *Whois } </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats_unit.go
keep keep keep keep replace replace keep keep keep keep keep
<mask> s := statsCtx{} <mask> if !checkInterval(conf.LimitDays) { <mask> conf.LimitDays = 1 <mask> } <mask> s.limit = conf.LimitDays * 24 <mask> s.conf = conf <mask> if conf.UnitID == nil { <mask> s.conf.UnitID = newUnitID <mask> } <mask> <mask> if !s.dbOpen() { </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove s.limit = uint32(limitDays) * 24 </s> add conf := *s.conf conf.limit = uint32(limitDays) * 24 s.conf = &conf </s> remove err = s.startInternal(config) </s> add err = s.Prepare(config) if err != nil { return errorx.Decorate(err, "could not reconfigure the server") } err = s.startInternal() </s> remove if config.stats != nil { </s> add if Context.stats != nil { </s> remove firstID := curID - s.limit + 1 </s> add firstID := curID - limit + 1 </s> remove if config.dnsFilter != nil { </s> add if Context.dnsFilter != nil { </s> remove dc.Interval = s.limit / 24 </s> add dc.Interval = s.conf.limit / 24
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats_unit.go
keep keep keep keep replace keep keep keep keep keep
<mask> tx := s.beginTxn(true) <mask> var udb *unitDB <mask> if tx != nil { <mask> log.Tracef("Deleting old units...") <mask> firstID := id - s.limit - 1 <mask> unitDel := 0 <mask> forEachBkt := func(name []byte, b *bolt.Bucket) error { <mask> id := uint32(btoi(name)) <mask> if id < firstID { <mask> err := tx.DeleteBucket(name) </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove firstID := curID - s.limit + 1 </s> add firstID := curID - limit + 1 </s> remove func (s *statsCtx) loadUnits() ([]*unitDB, uint32) { </s> add func (s *statsCtx) loadUnits(limit uint32) ([]*unitDB, uint32) { </s> add timeUnit := Hours if limit/24 > 7 { timeUnit = Days } </s> remove ok2 := s.deleteUnit(tx, id-s.limit) </s> add ok2 := s.deleteUnit(tx, id-s.conf.limit) </s> remove units, firstID := s.loadUnits() </s> add units, firstID := s.loadUnits(limit) </s> remove var err error bindhost := config.DNS.BindHost if config.DNS.BindHost == "0.0.0.0" { bindhost = "127.0.0.1" } resolverAddress := fmt.Sprintf("%s:%d", bindhost, config.DNS.Port) opts := upstream.Options{ Timeout: rdnsTimeout, } r.upstream, err = upstream.AddressToUpstream(resolverAddress, opts) if err != nil { log.Error("upstream.AddressToUpstream: %s", err) return nil } </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats_unit.go
keep keep keep keep replace keep keep keep keep keep
<mask> if tx == nil { <mask> continue <mask> } <mask> ok1 := s.flushUnitToDB(tx, u.id, udb) <mask> ok2 := s.deleteUnit(tx, id-s.limit) <mask> if ok1 || ok2 { <mask> s.commitTxn(tx) <mask> } else { <mask> _ = tx.Rollback() <mask> } </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove _, _ = config.clients.AddHost(ip, host, ClientSourceRDNS) </s> add _, _ = r.clients.AddHost(ip, host, ClientSourceRDNS) </s> remove func (s *statsCtx) loadUnits() ([]*unitDB, uint32) { </s> add func (s *statsCtx) loadUnits(limit uint32) ([]*unitDB, uint32) { </s> remove func (s *statsCtx) GetTopClientsIP(limit uint) []string { units, _ := s.loadUnits() </s> add func (s *statsCtx) GetTopClientsIP(maxCount uint) []string { units, _ := s.loadUnits(s.conf.limit) </s> add timeUnit := Hours if limit/24 > 7 { timeUnit = Days } </s> remove if len(units) != int(s.limit) { log.Fatalf("len(units) != s.limit: %d %d", len(units), s.limit) </s> add if len(units) != int(limit) { log.Fatalf("len(units) != limit: %d %d", len(units), limit) </s> remove level = log.DEBUG </s> add log.SetLevel(log.DEBUG)
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats_unit.go
keep replace keep keep keep keep replace keep keep
<mask> func (s *statsCtx) setLimit(limitDays int) { <mask> s.limit = uint32(limitDays) * 24 <mask> log.Debug("Stats: set limit: %d", limitDays) <mask> } <mask> <mask> func (s *statsCtx) WriteDiskConfig(dc *DiskConfig) { <mask> dc.Interval = s.limit / 24 <mask> } <mask> </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove resp.IntervalDays = s.limit / 24 </s> add resp.IntervalDays = s.conf.limit / 24 </s> remove s.limit = conf.LimitDays * 24 s.conf = conf </s> add s.conf = &Config{} *s.conf = conf s.conf.limit = conf.LimitDays * 24 </s> remove func (s *statsCtx) loadUnits() ([]*unitDB, uint32) { </s> add func (s *statsCtx) loadUnits(limit uint32) ([]*unitDB, uint32) { </s> remove func (s *statsCtx) GetTopClientsIP(limit uint) []string { units, _ := s.loadUnits() </s> add func (s *statsCtx) GetTopClientsIP(maxCount uint) []string { units, _ := s.loadUnits(s.conf.limit) </s> remove units := Hours if s.limit/24 > 7 { units = Days } </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats_unit.go
keep keep keep keep replace keep keep keep keep keep
<mask> u.nTotal++ <mask> s.unitLock.Unlock() <mask> } <mask> <mask> func (s *statsCtx) loadUnits() ([]*unitDB, uint32) { <mask> tx := s.beginTxn(false) <mask> if tx == nil { <mask> return nil, 0 <mask> } <mask> </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove ok2 := s.deleteUnit(tx, id-s.limit) </s> add ok2 := s.deleteUnit(tx, id-s.conf.limit) </s> remove func (s *statsCtx) GetTopClientsIP(limit uint) []string { units, _ := s.loadUnits() </s> add func (s *statsCtx) GetTopClientsIP(maxCount uint) []string { units, _ := s.loadUnits(s.conf.limit) </s> remove firstID := id - s.limit - 1 </s> add firstID := id - s.conf.limit - 1 </s> remove func (s *Server) prepare(config *ServerConfig) error { if s.dnsProxy != nil { return errors.New("DNS server is already started") } </s> add func (s *Server) Prepare(config *ServerConfig) error { </s> remove bindhost := config.DNS.BindHost if config.DNS.BindHost == "0.0.0.0" { bindhost = "127.0.0.1" } resolverAddr := fmt.Sprintf("%s:%d", bindhost, config.DNS.Port) r := upstream.NewResolver(resolverAddr, 30*time.Second) addrs, e := r.LookupIPAddr(ctx, host) log.Tracef("LookupIPAddr: %s: %v", host, addrs) </s> add addrs, e := Context.dnsServer.Resolve(host) log.Debug("dnsServer.Resolve: %s: %v", host, addrs) </s> remove units, firstID := s.loadUnits() </s> add units, firstID := s.loadUnits(limit)
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats_unit.go
keep keep keep keep replace keep keep keep keep keep
<mask> curID := s.unit.id <mask> s.unitLock.Unlock() <mask> <mask> units := []*unitDB{} //per-hour units <mask> firstID := curID - s.limit + 1 <mask> for i := firstID; i != curID; i++ { <mask> u := s.loadUnitFromDB(tx, i) <mask> if u == nil { <mask> u = &unitDB{} <mask> u.NResult = make([]uint64, rLast) </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove firstID := id - s.limit - 1 </s> add firstID := id - s.conf.limit - 1 </s> add timeUnit := Hours if limit/24 > 7 { timeUnit = Days } </s> remove dc.Interval = s.limit / 24 </s> add dc.Interval = s.conf.limit / 24 </s> remove units, firstID := s.loadUnits() </s> add units, firstID := s.loadUnits(limit) </s> remove units := Hours if s.limit/24 > 7 { units = Days } </s> add </s> remove func (s *statsCtx) getData(timeUnit TimeUnit) map[string]interface{} { </s> add func (s *statsCtx) getData() map[string]interface{} { limit := s.conf.limit
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats_unit.go
keep keep keep keep replace replace keep keep keep keep keep
<mask> _ = tx.Rollback() <mask> <mask> units = append(units, curUnit) <mask> <mask> if len(units) != int(s.limit) { <mask> log.Fatalf("len(units) != s.limit: %d %d", len(units), s.limit) <mask> } <mask> <mask> return units, firstID <mask> } <mask> </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove if len(a) != int(s.limit/24) { log.Fatalf("len(a) != s.limit: %d %d", len(a), s.limit) </s> add if len(a) != int(limit/24) { log.Fatalf("len(a) != limit: %d %d", len(a), limit) </s> add timeUnit := Hours if limit/24 > 7 { timeUnit = Days } </s> remove func (s *statsCtx) GetTopClientsIP(limit uint) []string { units, _ := s.loadUnits() </s> add func (s *statsCtx) GetTopClientsIP(maxCount uint) []string { units, _ := s.loadUnits(s.conf.limit) </s> remove units, firstID := s.loadUnits() </s> add units, firstID := s.loadUnits(limit) </s> remove ok2 := s.deleteUnit(tx, id-s.limit) </s> add ok2 := s.deleteUnit(tx, id-s.conf.limit) </s> remove _, _ = config.clients.AddHost(ip, host, ClientSourceRDNS) </s> add _, _ = r.clients.AddHost(ip, host, ClientSourceRDNS)
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats_unit.go
keep keep keep keep replace keep keep keep keep keep
<mask> * parental-blocked <mask> These values are just the sum of data for all units. <mask> */ <mask> // nolint (gocyclo) <mask> func (s *statsCtx) getData(timeUnit TimeUnit) map[string]interface{} { <mask> d := map[string]interface{}{} <mask> <mask> units, firstID := s.loadUnits() <mask> if units == nil { <mask> return nil </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove units, firstID := s.loadUnits() </s> add units, firstID := s.loadUnits(limit) </s> remove func (s *statsCtx) GetTopClientsIP(limit uint) []string { units, _ := s.loadUnits() </s> add func (s *statsCtx) GetTopClientsIP(maxCount uint) []string { units, _ := s.loadUnits(s.conf.limit) </s> add timeUnit := Hours if limit/24 > 7 { timeUnit = Days } </s> remove units := Hours if s.limit/24 > 7 { units = Days } </s> add </s> remove d := s.getData(units) </s> add d := s.getData() </s> remove firstID := curID - s.limit + 1 </s> add firstID := curID - limit + 1
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats_unit.go
keep keep add keep keep keep keep keep keep
<mask> limit := s.conf.limit <mask> <mask> d := map[string]interface{}{} <mask> <mask> units, firstID := s.loadUnits(limit) <mask> if units == nil { <mask> return nil <mask> } <mask> </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove units, firstID := s.loadUnits() </s> add units, firstID := s.loadUnits(limit) </s> remove func (s *statsCtx) getData(timeUnit TimeUnit) map[string]interface{} { </s> add func (s *statsCtx) getData() map[string]interface{} { limit := s.conf.limit </s> remove func (s *statsCtx) GetTopClientsIP(limit uint) []string { units, _ := s.loadUnits() </s> add func (s *statsCtx) GetTopClientsIP(maxCount uint) []string { units, _ := s.loadUnits(s.conf.limit) </s> remove firstID := curID - s.limit + 1 </s> add firstID := curID - limit + 1 </s> remove d := s.getData(units) </s> add d := s.getData() </s> remove units := Hours if s.limit/24 > 7 { units = Days } </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats_unit.go
keep keep keep keep replace keep keep keep keep keep
<mask> // nolint (gocyclo) <mask> func (s *statsCtx) getData(timeUnit TimeUnit) map[string]interface{} { <mask> d := map[string]interface{}{} <mask> <mask> units, firstID := s.loadUnits() <mask> if units == nil { <mask> return nil <mask> } <mask> <mask> // per time unit counters: </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove func (s *statsCtx) getData(timeUnit TimeUnit) map[string]interface{} { </s> add func (s *statsCtx) getData() map[string]interface{} { limit := s.conf.limit </s> remove func (s *statsCtx) GetTopClientsIP(limit uint) []string { units, _ := s.loadUnits() </s> add func (s *statsCtx) GetTopClientsIP(maxCount uint) []string { units, _ := s.loadUnits(s.conf.limit) </s> add timeUnit := Hours if limit/24 > 7 { timeUnit = Days } </s> remove units := Hours if s.limit/24 > 7 { units = Days } </s> add </s> remove func (s *statsCtx) loadUnits() ([]*unitDB, uint32) { </s> add func (s *statsCtx) loadUnits(limit uint32) ([]*unitDB, uint32) { </s> remove d := s.getData(units) </s> add d := s.getData()
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats_unit.go
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> if id <= nextDayID { <mask> a = append(a, sum) <mask> } <mask> if len(a) != int(s.limit/24) { <mask> log.Fatalf("len(a) != s.limit: %d %d", len(a), s.limit) <mask> } <mask> } <mask> d["dns_queries"] = a <mask> <mask> a = []uint64{} </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove if len(units) != int(s.limit) { log.Fatalf("len(units) != s.limit: %d %d", len(units), s.limit) </s> add if len(units) != int(limit) { log.Fatalf("len(units) != limit: %d %d", len(units), limit) </s> remove a := convertMapToArray(m, int(limit)) </s> add a := convertMapToArray(m, int(maxCount)) </s> remove _ = config.httpServer.Shutdown(context.TODO()) </s> add _ = Context.httpServer.Shutdown(context.TODO()) </s> remove level = log.DEBUG </s> add log.SetLevel(log.DEBUG) </s> remove config.httpsServer.cond.L.Lock() config.httpsServer.cond.Broadcast() if config.httpsServer.server != nil { config.httpsServer.server.Shutdown(context.TODO()) </s> add Context.httpsServer.cond.L.Lock() Context.httpsServer.cond.Broadcast() if Context.httpsServer.server != nil { Context.httpsServer.server.Shutdown(context.TODO()) </s> remove log.SetLevel(level) </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats_unit.go
keep keep keep keep replace replace keep keep keep keep keep
<mask> <mask> return d <mask> } <mask> <mask> func (s *statsCtx) GetTopClientsIP(limit uint) []string { <mask> units, _ := s.loadUnits() <mask> if units == nil { <mask> return nil <mask> } <mask> <mask> // top clients </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove units, firstID := s.loadUnits() </s> add units, firstID := s.loadUnits(limit) </s> remove func (s *statsCtx) getData(timeUnit TimeUnit) map[string]interface{} { </s> add func (s *statsCtx) getData() map[string]interface{} { limit := s.conf.limit </s> add timeUnit := Hours if limit/24 > 7 { timeUnit = Days } </s> remove units := Hours if s.limit/24 > 7 { units = Days } </s> add </s> remove func (s *statsCtx) loadUnits() ([]*unitDB, uint32) { </s> add func (s *statsCtx) loadUnits(limit uint32) ([]*unitDB, uint32) { </s> remove d := s.getData(units) </s> add d := s.getData()
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats_unit.go
keep keep keep keep replace keep keep keep keep keep
<mask> for _, it := range u.Clients { <mask> m[it.Name] += it.Count <mask> } <mask> } <mask> a := convertMapToArray(m, int(limit)) <mask> d := []string{} <mask> for _, it := range a { <mask> d = append(d, it.Name) <mask> } <mask> return d </s> Merge: * use upstream servers directly for the internal DNS resolver Close #1212 * Server.Start(config *ServerConfig) -> Start() + Server.Prepare(config *ServerConfig) + Server.Resolve(host string) + Server.Exchange() * rDNS: use internal DNS resolver - clients: fix race in WriteDiskConfig() - fix race: move 'clients' object from 'configuration' to 'HomeContext' Go race detector didn't like our 'clients' object in 'configuration'. + add AGH startup test . Create a configuration file . Start AGH instance . Check Web server . Check DNS server . Wait until the filters are downloaded . Stop and cleanup * move module objects from config.* to Context.* * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning * ci.sh: 'make' and then run tests Squashed commit of the following: commit 86500c7f749307f37af4cc8c2a1066f679d0cfad Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:53 2019 +0300 minor commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 18:08:31 2019 +0300 * ci.sh: 'make' and then run tests commit 114192eefea6800e565ba9ab238202c006516c27 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:50:04 2019 +0300 fix commit d426deea7f02cdfd4c7217a38c59e51251956a0f Author: Simon Zolin <[email protected]> Date: Tue Dec 10 17:46:33 2019 +0300 tests commit 7b350edf03027895b4e43dee908d0155a9b0ac9b Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:56:12 2019 +0300 fix test commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:48:56 2019 +0300 fix tests commit 3fbdc77f9c34726e2295185279444983652d559e Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:45:00 2019 +0300 linter commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:33:23 2019 +0300 * config.dnsctx.whois -> Context.whois commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:31:08 2019 +0300 * don't call log.SetLevel() if not necessary This helps to avoid Go race detector's warning commit 0f250220133cefdcb0843a50000cb932802b8324 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 15:28:19 2019 +0300 * rdns: refactor commit c460d8c9414940dac852e390b6c1b4d4fb38dff9 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 14:08:08 2019 +0300 Revert: * stats: serialize access to 'limit' Use 'conf *Config' and update it atomically, as in querylog module. (Note: Race detector still doesn't like it) commit 488bcb884971276de0d5629384b29e22c59ee7e6 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:50:23 2019 +0300 * config.dnsFilter -> Context.dnsFilter commit 86c0a6827a450414b50acec7ebfc5220d13b81e4 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:45:05 2019 +0300 * config.dnsServer -> Context.dnsServer commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:42:10 2019 +0300 * config.dhcpServer -> Context.dhcpServer commit 1537001cd211099d5fad01696c0b806ae5d257b1 Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:39:45 2019 +0300 * config.queryLog -> Context.queryLog commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c Author: Simon Zolin <[email protected]> Date: Tue Dec 10 13:03:18 2019 +0300 * config.httpsServer -> Context.httpsServer commit 6153c10a9ac173e159d1f05e0db1512579b9203c Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:12:24 2019 +0300 * config.httpServer -> Context.httpServer commit abd021fb94039015cd45c97614e8b78d4694f956 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 20:08:05 2019 +0300 * stats: serialize access to 'limit' commit 38c2decfd87c712100edcabe62a6d4518719cb53 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:57:04 2019 +0300 * config.stats -> Context.stats commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06 Author: Simon Zolin <[email protected]> Date: Mon Dec 9 19:45:23 2019 +0300 fix Restart() ... and 6 more commits </s> remove config.dnsctx.rdns.Begin(ip) </s> add Context.rdns.Begin(ip) </s> remove clientsList := clients.GetList() for _, cli := range clientsList { </s> add clients.lock.Lock() for _, cli := range clients.list { </s> remove topClients := config.stats.GetTopClientsIP(topClientsNumber) </s> add topClients := Context.stats.GetTopClientsIP(topClientsNumber) </s> remove d := s.getData(units) </s> add d := s.getData() </s> remove d := s.getData(Hours) </s> add d := s.getData() </s> remove units := Hours if s.limit/24 > 7 { units = Days } </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/0a66913b4d8b5f34310a263c6399875b900d465e
stats/stats_unit.go
keep keep keep keep replace keep keep keep keep keep
<mask> import { withTranslation } from 'react-i18next'; <mask> import flow from 'lodash/flow'; <mask> import classNames from 'classnames'; <mask> import { validatePath, validateRequiredValue } from '../../helpers/validators'; <mask> import { renderCheckboxField, renderInputField } from '../../helpers/form'; <mask> import { MODAL_OPEN_TIMEOUT, MODAL_TYPE, FORM_NAME } from '../../helpers/constants'; <mask> <mask> const filtersCatalog = require('../../helpers/filters/filters.json'); <mask> <mask> const getIconsData = (homepage, source) => ([ </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove import { renderCheckboxField, toNumber } from '../../../helpers/form'; </s> add import { CheckboxField, toNumber } from '../../../helpers/form'; </s> remove import { renderCheckboxField, renderRadioField, toNumber } from '../../../helpers/form'; </s> add import { CheckboxField, renderRadioField, toNumber } from '../../../helpers/form'; </s> remove renderCheckboxField, </s> add CheckboxField, </s> remove renderCheckboxField, </s> add CheckboxField, </s> remove renderCheckboxField, </s> add CheckboxField, </s> add const renderCheckboxField = ( props, ) => <CheckboxField {...props} input={{ ...props.input, checked: props.disabled || props.input.checked, }} />; renderCheckboxField.propTypes = { // https://redux-form.com/8.3.0/docs/api/field.md/#props input: PropTypes.object.isRequired, disabled: PropTypes.bool.isRequired, };
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Filters/Form.js
keep keep keep add keep keep keep keep keep
<mask> <use xlinkHref={`#${iconName}`} /> <mask> </svg> <mask> </a>); <mask> <mask> const renderFilters = ({ categories, filters }, selectedSources, t) => Object.keys(categories) <mask> .map((categoryId) => { <mask> const category = categories[categoryId]; <mask> const categoryFilters = []; <mask> Object.keys(filters) </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove export const renderCheckboxField = ({ </s> add export const CheckboxField = ({ </s> remove import { renderCheckboxField, renderRadioField, toNumber } from '../../../helpers/form'; </s> add import { CheckboxField, renderRadioField, toNumber } from '../../../helpers/form'; </s> remove import { renderCheckboxField, renderInputField } from '../../helpers/form'; </s> add import { CheckboxField, renderInputField } from '../../helpers/form'; </s> remove import { renderCheckboxField, toNumber } from '../../../helpers/form'; </s> add import { CheckboxField, toNumber } from '../../../helpers/form'; </s> remove checked, </s> add </s> remove name={`${filter.id}`} </s> add name={filter.id}
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Filters/Form.js
keep replace keep keep keep keep replace
<mask> <Field <mask> name={`${filter.id}`} <mask> type="checkbox" <mask> component={renderCheckboxField} <mask> placeholder={t(name)} <mask> disabled={isSelected} <mask> checked={isSelected} </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField}
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Filters/Form.js
keep keep keep keep replace keep keep keep keep keep
<mask> import { toggleAllServices } from '../../../helpers/helpers'; <mask> import { <mask> renderInputField, <mask> renderGroupField, <mask> renderCheckboxField, <mask> renderServiceField, <mask> } from '../../../helpers/form'; <mask> import { validateClientId, validateRequiredValue } from '../../../helpers/validators'; <mask> import { FORM_NAME, SERVICES } from '../../../helpers/constants'; <mask> import './Service.css'; </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove import { renderCheckboxField, toNumber } from '../../../helpers/form'; </s> add import { CheckboxField, toNumber } from '../../../helpers/form'; </s> remove import { renderCheckboxField, renderRadioField, toNumber } from '../../../helpers/form'; </s> add import { CheckboxField, renderRadioField, toNumber } from '../../../helpers/form'; </s> remove import { renderCheckboxField, renderInputField } from '../../helpers/form'; </s> add import { CheckboxField, renderInputField } from '../../helpers/form'; </s> remove renderCheckboxField, </s> add CheckboxField, </s> remove renderCheckboxField, </s> add CheckboxField, </s> remove renderCheckboxField.propTypes = { </s> add CheckboxField.propTypes = {
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/Clients/Form.js
keep keep keep keep replace keep keep keep keep keep
<mask> <div className="form__group" key={setting.name}> <mask> <Field <mask> name={setting.name} <mask> type="checkbox" <mask> component={renderCheckboxField} <mask> placeholder={t(setting.placeholder)} <mask> disabled={ <mask> setting.name !== 'use_global_settings' <mask> ? useGlobalSettings <mask> : false </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove import { renderCheckboxField, renderRadioField, toNumber } from '../../../helpers/form'; </s> add import { CheckboxField, renderRadioField, toNumber } from '../../../helpers/form';
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/Clients/Form.js
keep keep keep keep replace keep keep keep keep keep
<mask> import { Trans, useTranslation } from 'react-i18next'; <mask> import { <mask> renderInputField, <mask> renderRadioField, <mask> renderCheckboxField, <mask> toNumber, <mask> } from '../../../../helpers/form'; <mask> import { <mask> validateIpv4, <mask> validateIpv6, </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove renderCheckboxField, </s> add CheckboxField, </s> remove import { renderCheckboxField, renderRadioField, toNumber } from '../../../helpers/form'; </s> add import { CheckboxField, renderRadioField, toNumber } from '../../../helpers/form'; </s> remove renderCheckboxField, </s> add CheckboxField, </s> remove import { renderCheckboxField, toNumber } from '../../../helpers/form'; </s> add import { CheckboxField, toNumber } from '../../../helpers/form'; </s> remove import { renderCheckboxField, renderInputField } from '../../helpers/form'; </s> add import { CheckboxField, renderInputField } from '../../helpers/form'; </s> remove renderCheckboxField.propTypes = { </s> add CheckboxField.propTypes = {
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/Dns/Config/Form.js
keep keep keep keep replace keep keep keep keep keep
<mask> <div className="form__group form__group--settings"> <mask> <Field <mask> name={name} <mask> type="checkbox" <mask> component={renderCheckboxField} <mask> placeholder={t(placeholder)} <mask> disabled={processing} <mask> subtitle={t(subtitle)} <mask> /> <mask> </div> </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField}
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/Dns/Config/Form.js
keep keep keep keep replace keep keep keep keep keep
<mask> import flow from 'lodash/flow'; <mask> <mask> import { <mask> renderInputField, <mask> renderCheckboxField, <mask> renderRadioField, <mask> toNumber, <mask> } from '../../../helpers/form'; <mask> import { <mask> validateIsSafePort, validatePort, validatePortQuic, validatePortTLS, </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove renderCheckboxField, </s> add CheckboxField, </s> remove import { renderCheckboxField, renderRadioField, toNumber } from '../../../helpers/form'; </s> add import { CheckboxField, renderRadioField, toNumber } from '../../../helpers/form'; </s> remove import { renderCheckboxField, toNumber } from '../../../helpers/form'; </s> add import { CheckboxField, toNumber } from '../../../helpers/form'; </s> remove renderCheckboxField, </s> add CheckboxField, </s> remove import { renderCheckboxField, renderInputField } from '../../helpers/form'; </s> add import { CheckboxField, renderInputField } from '../../helpers/form'; </s> remove renderCheckboxField.propTypes = { </s> add CheckboxField.propTypes = {
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/Encryption/Form.js
keep keep keep keep replace keep keep keep keep keep
<mask> <div className="form__group form__group--settings"> <mask> <Field <mask> name="enabled" <mask> type="checkbox" <mask> component={renderCheckboxField} <mask> placeholder={t('encryption_enable')} <mask> onChange={handleChange} <mask> /> <mask> </div> <mask> <div className="form__desc"> </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField}
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/Encryption/Form.js
keep keep keep keep replace keep keep keep keep keep
<mask> <div className="form__group form__group--settings"> <mask> <Field <mask> name="force_https" <mask> type="checkbox" <mask> component={renderCheckboxField} <mask> placeholder={t('encryption_redirect')} <mask> onChange={handleChange} <mask> disabled={!isEnabled} <mask> /> <mask> <div className="form__desc"> </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField}
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/Encryption/Form.js
keep keep keep keep replace keep keep keep keep keep
<mask> import { Field, reduxForm } from 'redux-form'; <mask> import { Trans, withTranslation } from 'react-i18next'; <mask> import flow from 'lodash/flow'; <mask> <mask> import { renderCheckboxField, toNumber } from '../../../helpers/form'; <mask> import { FILTERS_INTERVALS_HOURS, FORM_NAME } from '../../../helpers/constants'; <mask> <mask> const getTitleForInterval = (interval, t) => { <mask> if (interval === 0) { <mask> return t('disabled'); </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove import { renderCheckboxField, renderRadioField, toNumber } from '../../../helpers/form'; </s> add import { CheckboxField, renderRadioField, toNumber } from '../../../helpers/form'; </s> remove import { renderCheckboxField, renderInputField } from '../../helpers/form'; </s> add import { CheckboxField, renderInputField } from '../../helpers/form'; </s> remove renderCheckboxField, </s> add CheckboxField, </s> remove renderCheckboxField, </s> add CheckboxField, </s> remove renderCheckboxField, </s> add CheckboxField, </s> add const renderCheckboxField = ( props, ) => <CheckboxField {...props} input={{ ...props.input, checked: props.disabled || props.input.checked, }} />; renderCheckboxField.propTypes = { // https://redux-form.com/8.3.0/docs/api/field.md/#props input: PropTypes.object.isRequired, disabled: PropTypes.bool.isRequired, };
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/FiltersConfig/Form.js
keep keep keep keep replace keep keep keep keep keep
<mask> <Field <mask> name="enabled" <mask> type="checkbox" <mask> modifier="checkbox--settings" <mask> component={renderCheckboxField} <mask> placeholder={t('block_domain_use_filters_and_hosts')} <mask> subtitle={t('filters_block_toggle_hint')} <mask> onChange={handleChange} <mask> disabled={processing} <mask> /> </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove checked={isSelected} </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/FiltersConfig/Form.js
keep keep keep keep replace keep keep keep keep keep
<mask> import { Field, reduxForm } from 'redux-form'; <mask> import { Trans, withTranslation } from 'react-i18next'; <mask> import flow from 'lodash/flow'; <mask> <mask> import { renderCheckboxField, renderRadioField, toNumber } from '../../../helpers/form'; <mask> import { FORM_NAME, QUERY_LOG_INTERVALS_DAYS } from '../../../helpers/constants'; <mask> <mask> const getIntervalFields = (processing, t, toNumber) => QUERY_LOG_INTERVALS_DAYS.map((interval) => { <mask> const title = interval === 1 ? t('interval_24_hour') : t('interval_days', { count: interval }); <mask> </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove import { renderCheckboxField, toNumber } from '../../../helpers/form'; </s> add import { CheckboxField, toNumber } from '../../../helpers/form'; </s> remove import { renderCheckboxField, renderInputField } from '../../helpers/form'; </s> add import { CheckboxField, renderInputField } from '../../helpers/form'; </s> remove renderCheckboxField, </s> add CheckboxField, </s> remove renderCheckboxField, </s> add CheckboxField, </s> remove renderCheckboxField, </s> add CheckboxField, </s> add const renderCheckboxField = ( props, ) => <CheckboxField {...props} input={{ ...props.input, checked: props.disabled || props.input.checked, }} />; renderCheckboxField.propTypes = { // https://redux-form.com/8.3.0/docs/api/field.md/#props input: PropTypes.object.isRequired, disabled: PropTypes.bool.isRequired, };
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/LogsConfig/Form.js
keep keep keep keep replace keep keep keep keep keep
<mask> <div className="form__group form__group--settings"> <mask> <Field <mask> name="enabled" <mask> type="checkbox" <mask> component={renderCheckboxField} <mask> placeholder={t('query_log_enable')} <mask> disabled={processing} <mask> /> <mask> </div> <mask> <div className="form__group form__group--settings"> </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField}
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/LogsConfig/Form.js
keep keep keep keep replace keep keep keep keep keep
<mask> <div className="form__group form__group--settings"> <mask> <Field <mask> name="anonymize_client_ip" <mask> type="checkbox" <mask> component={renderCheckboxField} <mask> placeholder={t('anonymize_client_ip')} <mask> subtitle={t('anonymize_client_ip_desc')} <mask> disabled={processing} <mask> /> <mask> </div> </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField} </s> remove component={renderCheckboxField} </s> add component={CheckboxField}
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/LogsConfig/Form.js
keep keep keep keep replace keep keep keep keep keep
<mask> error: PropTypes.string, <mask> }).isRequired, <mask> }; <mask> <mask> export const renderCheckboxField = ({ <mask> input, <mask> placeholder, <mask> subtitle, <mask> disabled, <mask> onClick, </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove checked, </s> add </s> add const renderCheckboxField = ( props, ) => <CheckboxField {...props} input={{ ...props.input, checked: props.disabled || props.input.checked, }} />; renderCheckboxField.propTypes = { // https://redux-form.com/8.3.0/docs/api/field.md/#props input: PropTypes.object.isRequired, disabled: PropTypes.bool.isRequired, }; </s> remove renderCheckboxField.propTypes = { </s> add CheckboxField.propTypes = { </s> remove name={`${filter.id}`} </s> add name={filter.id} </s> remove import { renderCheckboxField, renderInputField } from '../../helpers/form'; </s> add import { CheckboxField, renderInputField } from '../../helpers/form'; </s> remove import { renderCheckboxField, renderRadioField, toNumber } from '../../../helpers/form'; </s> add import { CheckboxField, renderRadioField, toNumber } from '../../../helpers/form';
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/helpers/form.js
keep keep replace keep keep keep keep replace replace keep keep keep
<mask> onClick, <mask> modifier = 'checkbox--form', <mask> checked, <mask> meta: { touched, error }, <mask> }) => <> <mask> <label className={`checkbox ${modifier}`} onClick={onClick}> <mask> <span className="checkbox__marker" /> <mask> <input {...input} type="checkbox" className="checkbox__input" disabled={disabled} <mask> checked={input.checked || checked} /> <mask> <span className="checkbox__label"> <mask> <span className="checkbox__label-text checkbox__label-text--long"> <mask> <span className="checkbox__label-title">{placeholder}</span> </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove <span className="checkbox__label-text checkbox__label-text--long"> <span className="checkbox__label-title">{placeholder}</span> {subtitle && <span className="checkbox__label-subtitle" dangerouslySetInnerHTML={{ __html: subtitle }} />} </span> </span> </s> add <span className="checkbox__label-text checkbox__label-text--long"> <span className="checkbox__label-title">{placeholder}</span> {subtitle && <span className="checkbox__label-subtitle">{subtitle}</span>} </span> </span> </s> remove renderCheckboxField.propTypes = { </s> add CheckboxField.propTypes = { </s> add const renderCheckboxField = ( props, ) => <CheckboxField {...props} input={{ ...props.input, checked: props.disabled || props.input.checked, }} />; renderCheckboxField.propTypes = { // https://redux-form.com/8.3.0/docs/api/field.md/#props input: PropTypes.object.isRequired, disabled: PropTypes.bool.isRequired, }; </s> remove export const renderCheckboxField = ({ </s> add export const CheckboxField = ({ </s> remove checked={isSelected} </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/helpers/form.js
keep keep keep keep replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> <span className="checkbox__marker" /> <mask> <input {...input} type="checkbox" className="checkbox__input" disabled={disabled} <mask> checked={input.checked || checked} /> <mask> <span className="checkbox__label"> <mask> <span className="checkbox__label-text checkbox__label-text--long"> <mask> <span className="checkbox__label-title">{placeholder}</span> <mask> {subtitle <mask> && <span <mask> className="checkbox__label-subtitle" <mask> dangerouslySetInnerHTML={{ __html: subtitle }} <mask> <mask> />} <mask> </span> <mask> </span> <mask> </label> <mask> {!disabled <mask> && touched <mask> && error <mask> && <span className="form__message form__message--error"><Trans>{error}</Trans></span>} </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove <input {...input} type="checkbox" className="checkbox__input" disabled={disabled} checked={input.checked || checked} /> </s> add <input {...input} type="checkbox" className="checkbox__input" disabled={disabled} /> </s> remove renderCheckboxField.propTypes = { </s> add CheckboxField.propTypes = { </s> remove checked, </s> add </s> add const renderCheckboxField = ( props, ) => <CheckboxField {...props} input={{ ...props.input, checked: props.disabled || props.input.checked, }} />; renderCheckboxField.propTypes = { // https://redux-form.com/8.3.0/docs/api/field.md/#props input: PropTypes.object.isRequired, disabled: PropTypes.bool.isRequired, }; </s> remove checked={isSelected} </s> add </s> remove component={renderCheckboxField} </s> add component={CheckboxField}
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/helpers/form.js
keep keep keep keep replace keep keep keep keep keep
<mask> && error <mask> && <span className="form__message form__message--error"><Trans>{error}</Trans></span>} <mask> </>; <mask> <mask> renderCheckboxField.propTypes = { <mask> input: PropTypes.object.isRequired, <mask> placeholder: PropTypes.string, <mask> subtitle: PropTypes.string, <mask> disabled: PropTypes.bool, <mask> onClick: PropTypes.func, </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove <span className="checkbox__label-text checkbox__label-text--long"> <span className="checkbox__label-title">{placeholder}</span> {subtitle && <span className="checkbox__label-subtitle" dangerouslySetInnerHTML={{ __html: subtitle }} />} </span> </span> </s> add <span className="checkbox__label-text checkbox__label-text--long"> <span className="checkbox__label-title">{placeholder}</span> {subtitle && <span className="checkbox__label-subtitle">{subtitle}</span>} </span> </span> </s> add const renderCheckboxField = ( props, ) => <CheckboxField {...props} input={{ ...props.input, checked: props.disabled || props.input.checked, }} />; renderCheckboxField.propTypes = { // https://redux-form.com/8.3.0/docs/api/field.md/#props input: PropTypes.object.isRequired, disabled: PropTypes.bool.isRequired, }; </s> remove <input {...input} type="checkbox" className="checkbox__input" disabled={disabled} checked={input.checked || checked} /> </s> add <input {...input} type="checkbox" className="checkbox__input" disabled={disabled} /> </s> remove export const renderCheckboxField = ({ </s> add export const CheckboxField = ({ </s> remove checked, </s> add </s> remove import { renderCheckboxField, renderInputField } from '../../helpers/form'; </s> add import { CheckboxField, renderInputField } from '../../helpers/form';
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/helpers/form.js
keep add keep keep keep keep
<mask> func handleTLSStatus(w http.ResponseWriter, r *http.Request) { <mask> data := config.TLS <mask> err := json.NewEncoder(w).Encode(&data) <mask> if err != nil { <mask> httpError(w, http.StatusInternalServerError, "Failed to marshal json with TLS status: %s", err) <mask> return </s> Don't keep certificates and keys encoded with base64 in yaml config </s> add data.PrivateKey = string(keyPEM) </s> add data.CertificateChain = string(certPEM)
https://github.com/AdguardTeam/AdGuardHome/commit/0aeca6bbf5b08d0f28f969162c0e5475c9ed7469
control.go
keep keep keep add keep keep keep keep
<mask> if err != nil { <mask> httpError(w, http.StatusBadRequest, "Failed to base64-decode certificate chain: %s", err) <mask> return <mask> } <mask> <mask> log.Printf("got certificate: %s", certPEM) <mask> <mask> if data.PrivateKey != "" { </s> Don't keep certificates and keys encoded with base64 in yaml config </s> add data.PrivateKey = string(keyPEM) </s> add if data.CertificateChain != "" { encoded := base64.StdEncoding.EncodeToString([]byte(data.CertificateChain)) data.CertificateChain = string(encoded) } if data.PrivateKey != "" { encoded := base64.StdEncoding.EncodeToString([]byte(data.PrivateKey)) data.PrivateKey = string(encoded) }
https://github.com/AdguardTeam/AdGuardHome/commit/0aeca6bbf5b08d0f28f969162c0e5475c9ed7469
control.go
keep add keep keep keep keep keep keep
<mask> } <mask> <mask> _, err = tls.X509KeyPair(certPEM, keyPEM) <mask> if err != nil { <mask> httpError(w, http.StatusBadRequest, "Invalid certificate or key: %s", err) <mask> return <mask> } <mask> } </s> Don't keep certificates and keys encoded with base64 in yaml config </s> add if data.CertificateChain != "" { encoded := base64.StdEncoding.EncodeToString([]byte(data.CertificateChain)) data.CertificateChain = string(encoded) } if data.PrivateKey != "" { encoded := base64.StdEncoding.EncodeToString([]byte(data.PrivateKey)) data.PrivateKey = string(encoded) } </s> add data.CertificateChain = string(certPEM)
https://github.com/AdguardTeam/AdGuardHome/commit/0aeca6bbf5b08d0f28f969162c0e5475c9ed7469
control.go
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> go 1.17 <mask> <mask> require ( <mask> github.com/AdguardTeam/dnsproxy v0.40.6 <mask> github.com/AdguardTeam/golibs v0.10.4 <mask> github.com/AdguardTeam/urlfilter v0.15.2 <mask> github.com/NYTimes/gziphandler v1.1.1 <mask> github.com/ameshkov/dnscrypt/v2 v2.2.3 <mask> github.com/digineo/go-ipset/v2 v2.2.1 </s> Pull request: 1730 bogus cidr Merge in DNS/adguard-home from 1730-bogus-cidr to master Closes #1730. Squashed commit of the following: commit 0be54259ca4edb8752e9f7e5ea5104a2b51ed440 Author: Eugene Burkov <[email protected]> Date: Tue Jan 25 18:50:01 2022 +0300 all: imp log of changes commit 59fb7a8c469216823ff54621ec40a4d084836132 Author: Eugene Burkov <[email protected]> Date: Tue Jan 25 18:46:34 2022 +0300 all: log changes commit 9206b13dd715fdf1180d1d572d1b80024b9e6592 Author: Eugene Burkov <[email protected]> Date: Tue Jan 25 18:41:26 2022 +0300 all: upd dnsproxy </s> remove github.com/AdguardTeam/dnsproxy v0.40.6 h1:cTyzjiDrTk4vOXixLsWZ4Xjpqy6pqjTY++Tndq3bEf4= github.com/AdguardTeam/dnsproxy v0.40.6/go.mod h1:PZ9l22h3Er+5mxFQB7oHZMTvx+aa9R6LbzA/ikXQlS0= </s> add github.com/AdguardTeam/dnsproxy v0.41.0 h1:DZlzFEzDV/eKJz8b+dYctAYPrQscdsvbtBc/eFU+e9U= github.com/AdguardTeam/dnsproxy v0.41.0/go.mod h1:PZ9l22h3Er+5mxFQB7oHZMTvx+aa9R6LbzA/ikXQlS0= </s> remove ip := proxyutil.GetIPFromDNSRecord(msg.Answer[0]).To16() </s> add ip := proxyutil.IPFromRR(msg.Answer[0]).To16() </s> add proxyConfig.BogusNXDomain = append(proxyConfig.BogusNXDomain, subnet) </s> remove if len(s.conf.BogusNXDomain) > 0 { for _, s := range s.conf.BogusNXDomain { ip := net.ParseIP(s) if ip == nil { log.Error("Invalid bogus IP: %s", s) } else { proxyConfig.BogusNXDomain = append(proxyConfig.BogusNXDomain, ip) } </s> add for i, s := range s.conf.BogusNXDomain { subnet, err := netutil.ParseSubnet(s) if err != nil { log.Error("subnet at index %d: %s", i, err) continue
https://github.com/AdguardTeam/AdGuardHome/commit/0b72bcc5a1f4da47fe0dfc8154e71b94dcbc4896
go.mod
keep keep keep keep replace replace keep keep keep keep keep
<mask> dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= <mask> dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= <mask> dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= <mask> git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= <mask> github.com/AdguardTeam/dnsproxy v0.40.6 h1:cTyzjiDrTk4vOXixLsWZ4Xjpqy6pqjTY++Tndq3bEf4= <mask> github.com/AdguardTeam/dnsproxy v0.40.6/go.mod h1:PZ9l22h3Er+5mxFQB7oHZMTvx+aa9R6LbzA/ikXQlS0= <mask> github.com/AdguardTeam/golibs v0.4.0/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= <mask> github.com/AdguardTeam/golibs v0.4.2/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= <mask> github.com/AdguardTeam/golibs v0.10.3/go.mod h1:rSfQRGHIdgfxriDDNgNJ7HmE5zRoURq8R+VdR81Zuzw= <mask> github.com/AdguardTeam/golibs v0.10.4 h1:TMBkablZC0IZOpRgg9fzAKlxxNhSN2YJq7qbgtuZ7PQ= <mask> github.com/AdguardTeam/golibs v0.10.4/go.mod h1:rSfQRGHIdgfxriDDNgNJ7HmE5zRoURq8R+VdR81Zuzw= </s> Pull request: 1730 bogus cidr Merge in DNS/adguard-home from 1730-bogus-cidr to master Closes #1730. Squashed commit of the following: commit 0be54259ca4edb8752e9f7e5ea5104a2b51ed440 Author: Eugene Burkov <[email protected]> Date: Tue Jan 25 18:50:01 2022 +0300 all: imp log of changes commit 59fb7a8c469216823ff54621ec40a4d084836132 Author: Eugene Burkov <[email protected]> Date: Tue Jan 25 18:46:34 2022 +0300 all: log changes commit 9206b13dd715fdf1180d1d572d1b80024b9e6592 Author: Eugene Burkov <[email protected]> Date: Tue Jan 25 18:41:26 2022 +0300 all: upd dnsproxy </s> remove github.com/AdguardTeam/dnsproxy v0.40.6 </s> add github.com/AdguardTeam/dnsproxy v0.41.0 </s> remove ip := proxyutil.GetIPFromDNSRecord(msg.Answer[0]).To16() </s> add ip := proxyutil.IPFromRR(msg.Answer[0]).To16() </s> add proxyConfig.BogusNXDomain = append(proxyConfig.BogusNXDomain, subnet) </s> remove if len(s.conf.BogusNXDomain) > 0 { for _, s := range s.conf.BogusNXDomain { ip := net.ParseIP(s) if ip == nil { log.Error("Invalid bogus IP: %s", s) } else { proxyConfig.BogusNXDomain = append(proxyConfig.BogusNXDomain, ip) } </s> add for i, s := range s.conf.BogusNXDomain { subnet, err := netutil.ParseSubnet(s) if err != nil { log.Error("subnet at index %d: %s", i, err) continue
https://github.com/AdguardTeam/AdGuardHome/commit/0b72bcc5a1f4da47fe0dfc8154e71b94dcbc4896
go.sum
keep keep keep keep replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> proxyConfig.UpstreamMode = proxy.UModeFastestAddr <mask> proxyConfig.FastestPingTimeout = s.conf.FastestTimeout.Duration <mask> } <mask> <mask> if len(s.conf.BogusNXDomain) > 0 { <mask> for _, s := range s.conf.BogusNXDomain { <mask> ip := net.ParseIP(s) <mask> if ip == nil { <mask> log.Error("Invalid bogus IP: %s", s) <mask> } else { <mask> proxyConfig.BogusNXDomain = append(proxyConfig.BogusNXDomain, ip) <mask> } <mask> } <mask> } <mask> <mask> // TLS settings <mask> err := s.prepareTLS(&proxyConfig) </s> Pull request: 1730 bogus cidr Merge in DNS/adguard-home from 1730-bogus-cidr to master Closes #1730. Squashed commit of the following: commit 0be54259ca4edb8752e9f7e5ea5104a2b51ed440 Author: Eugene Burkov <[email protected]> Date: Tue Jan 25 18:50:01 2022 +0300 all: imp log of changes commit 59fb7a8c469216823ff54621ec40a4d084836132 Author: Eugene Burkov <[email protected]> Date: Tue Jan 25 18:46:34 2022 +0300 all: log changes commit 9206b13dd715fdf1180d1d572d1b80024b9e6592 Author: Eugene Burkov <[email protected]> Date: Tue Jan 25 18:41:26 2022 +0300 all: upd dnsproxy </s> add proxyConfig.BogusNXDomain = append(proxyConfig.BogusNXDomain, subnet) </s> remove ip := proxyutil.GetIPFromDNSRecord(msg.Answer[0]).To16() </s> add ip := proxyutil.IPFromRR(msg.Answer[0]).To16() </s> remove github.com/AdguardTeam/dnsproxy v0.40.6 h1:cTyzjiDrTk4vOXixLsWZ4Xjpqy6pqjTY++Tndq3bEf4= github.com/AdguardTeam/dnsproxy v0.40.6/go.mod h1:PZ9l22h3Er+5mxFQB7oHZMTvx+aa9R6LbzA/ikXQlS0= </s> add github.com/AdguardTeam/dnsproxy v0.41.0 h1:DZlzFEzDV/eKJz8b+dYctAYPrQscdsvbtBc/eFU+e9U= github.com/AdguardTeam/dnsproxy v0.41.0/go.mod h1:PZ9l22h3Er+5mxFQB7oHZMTvx+aa9R6LbzA/ikXQlS0= </s> remove github.com/AdguardTeam/dnsproxy v0.40.6 </s> add github.com/AdguardTeam/dnsproxy v0.41.0
https://github.com/AdguardTeam/AdGuardHome/commit/0b72bcc5a1f4da47fe0dfc8154e71b94dcbc4896
internal/dnsforward/config.go
keep add keep keep keep keep
<mask> continue <mask> } <mask> } <mask> <mask> // TLS settings <mask> err := s.prepareTLS(&proxyConfig) </s> Pull request: 1730 bogus cidr Merge in DNS/adguard-home from 1730-bogus-cidr to master Closes #1730. Squashed commit of the following: commit 0be54259ca4edb8752e9f7e5ea5104a2b51ed440 Author: Eugene Burkov <[email protected]> Date: Tue Jan 25 18:50:01 2022 +0300 all: imp log of changes commit 59fb7a8c469216823ff54621ec40a4d084836132 Author: Eugene Burkov <[email protected]> Date: Tue Jan 25 18:46:34 2022 +0300 all: log changes commit 9206b13dd715fdf1180d1d572d1b80024b9e6592 Author: Eugene Burkov <[email protected]> Date: Tue Jan 25 18:41:26 2022 +0300 all: upd dnsproxy </s> remove if len(s.conf.BogusNXDomain) > 0 { for _, s := range s.conf.BogusNXDomain { ip := net.ParseIP(s) if ip == nil { log.Error("Invalid bogus IP: %s", s) } else { proxyConfig.BogusNXDomain = append(proxyConfig.BogusNXDomain, ip) } </s> add for i, s := range s.conf.BogusNXDomain { subnet, err := netutil.ParseSubnet(s) if err != nil { log.Error("subnet at index %d: %s", i, err) continue </s> remove ip := proxyutil.GetIPFromDNSRecord(msg.Answer[0]).To16() </s> add ip := proxyutil.IPFromRR(msg.Answer[0]).To16() </s> remove github.com/AdguardTeam/dnsproxy v0.40.6 h1:cTyzjiDrTk4vOXixLsWZ4Xjpqy6pqjTY++Tndq3bEf4= github.com/AdguardTeam/dnsproxy v0.40.6/go.mod h1:PZ9l22h3Er+5mxFQB7oHZMTvx+aa9R6LbzA/ikXQlS0= </s> add github.com/AdguardTeam/dnsproxy v0.41.0 h1:DZlzFEzDV/eKJz8b+dYctAYPrQscdsvbtBc/eFU+e9U= github.com/AdguardTeam/dnsproxy v0.41.0/go.mod h1:PZ9l22h3Er+5mxFQB7oHZMTvx+aa9R6LbzA/ikXQlS0= </s> remove github.com/AdguardTeam/dnsproxy v0.40.6 </s> add github.com/AdguardTeam/dnsproxy v0.41.0
https://github.com/AdguardTeam/AdGuardHome/commit/0b72bcc5a1f4da47fe0dfc8154e71b94dcbc4896
internal/dnsforward/config.go
keep keep keep keep replace keep keep keep keep keep
<mask> msg := &dns.Msg{} <mask> require.NoError(t, msg.Unpack(entry.Answer)) <mask> require.Len(t, msg.Answer, 1) <mask> <mask> ip := proxyutil.GetIPFromDNSRecord(msg.Answer[0]).To16() <mask> assert.Equal(t, answer, ip) <mask> } <mask> <mask> func testEntries() (entries []*logEntry) { <mask> rsrc := rand.NewSource(time.Now().UnixNano()) </s> Pull request: 1730 bogus cidr Merge in DNS/adguard-home from 1730-bogus-cidr to master Closes #1730. Squashed commit of the following: commit 0be54259ca4edb8752e9f7e5ea5104a2b51ed440 Author: Eugene Burkov <[email protected]> Date: Tue Jan 25 18:50:01 2022 +0300 all: imp log of changes commit 59fb7a8c469216823ff54621ec40a4d084836132 Author: Eugene Burkov <[email protected]> Date: Tue Jan 25 18:46:34 2022 +0300 all: log changes commit 9206b13dd715fdf1180d1d572d1b80024b9e6592 Author: Eugene Burkov <[email protected]> Date: Tue Jan 25 18:41:26 2022 +0300 all: upd dnsproxy </s> remove if len(s.conf.BogusNXDomain) > 0 { for _, s := range s.conf.BogusNXDomain { ip := net.ParseIP(s) if ip == nil { log.Error("Invalid bogus IP: %s", s) } else { proxyConfig.BogusNXDomain = append(proxyConfig.BogusNXDomain, ip) } </s> add for i, s := range s.conf.BogusNXDomain { subnet, err := netutil.ParseSubnet(s) if err != nil { log.Error("subnet at index %d: %s", i, err) continue </s> add proxyConfig.BogusNXDomain = append(proxyConfig.BogusNXDomain, subnet) </s> remove github.com/AdguardTeam/dnsproxy v0.40.6 h1:cTyzjiDrTk4vOXixLsWZ4Xjpqy6pqjTY++Tndq3bEf4= github.com/AdguardTeam/dnsproxy v0.40.6/go.mod h1:PZ9l22h3Er+5mxFQB7oHZMTvx+aa9R6LbzA/ikXQlS0= </s> add github.com/AdguardTeam/dnsproxy v0.41.0 h1:DZlzFEzDV/eKJz8b+dYctAYPrQscdsvbtBc/eFU+e9U= github.com/AdguardTeam/dnsproxy v0.41.0/go.mod h1:PZ9l22h3Er+5mxFQB7oHZMTvx+aa9R6LbzA/ikXQlS0= </s> remove github.com/AdguardTeam/dnsproxy v0.40.6 </s> add github.com/AdguardTeam/dnsproxy v0.41.0
https://github.com/AdguardTeam/AdGuardHome/commit/0b72bcc5a1f4da47fe0dfc8154e71b94dcbc4896
internal/querylog/qlog_test.go
keep keep add keep keep keep keep keep keep
<mask> time.Sleep(backoff) <mask> } <mask> <mask> switch len(addrs) { <mask> case 0: <mask> // Don't return errors in case the users want to try and enable <mask> // the DHCP server later. <mask> t := time.Duration(n) * backoff <mask> log.Error("dhcpv%d: no ip for iface after %d attempts and %s", ipv, n, t) </s> Pull request: querylog: fix logic Merge in DNS/adguard-home from fix-querylog-logs to master Squashed commit of the following: commit db6edb86f1f024c85efd3bca3ceb6dfc6ce04edd Merge: d1981696 a3968658 Author: Ainar Garipov <[email protected]> Date: Mon Dec 13 13:48:25 2021 +0300 Merge branch 'master' into fix-querylog-logs commit d1981696782ca9adc5213f76cdbe2dc9f859f921 Author: Ainar Garipov <[email protected]> Date: Fri Dec 10 21:14:04 2021 +0300 querylog: fix logic </s> remove _, _, err = q.SeekTS(timestamp) if err == nil { // Search is finished, and the searched element have // been found. Update currentFile only, position is // already set properly in QLogFile. r.currentFile = i return nil } else if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of // this one. continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably // between the end of the previous one and the start of // this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { break </s> add _, _, err = q.seekTS(timestamp) if err != nil { if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of this // one. If there is no next file, it's not found. err = ErrTSNotFound continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably between // the end of the previous one and the start of this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { return err } else { return fmt.Errorf("seekts: file at index %d: %w", i, err) } </s> remove return fmt.Errorf("querylog: %w", err) </s> add if err != nil { return fmt.Errorf("seekts: %w", err) } return nil </s> remove func (q *QLogFile) SeekTS(timestamp int64) (int64, int, error) { </s> add func (q *QLogFile) seekTS(timestamp int64) (int64, int, error) { </s> add // The search is finished, and the searched element has been found. // Update currentFile only, position is already set properly in // QLogFile. r.currentFile = i return nil </s> remove err = r.SeekTS(params.olderThan.UnixNano()) </s> add err = r.seekTS(params.olderThan.UnixNano()) </s> remove // SeekTS performs binary search in the query log file looking for a record </s> add // seekTS performs binary search in the query log file looking for a record
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/aghnet/interfaces.go
keep keep keep keep replace keep keep keep keep keep
<mask> file: f, <mask> }, nil <mask> } <mask> <mask> // SeekTS performs binary search in the query log file looking for a record <mask> // with the specified timestamp. Once the record is found, it sets <mask> // "position" so that the next ReadNext call returned that record. <mask> // <mask> // The algorithm is rather simple: <mask> // 1. It starts with the position in the middle of a file </s> Pull request: querylog: fix logic Merge in DNS/adguard-home from fix-querylog-logs to master Squashed commit of the following: commit db6edb86f1f024c85efd3bca3ceb6dfc6ce04edd Merge: d1981696 a3968658 Author: Ainar Garipov <[email protected]> Date: Mon Dec 13 13:48:25 2021 +0300 Merge branch 'master' into fix-querylog-logs commit d1981696782ca9adc5213f76cdbe2dc9f859f921 Author: Ainar Garipov <[email protected]> Date: Fri Dec 10 21:14:04 2021 +0300 querylog: fix logic </s> remove // SeekTS performs binary search of a query log record with the specified </s> add // seekTS performs binary search of a query log record with the specified </s> remove func (r *QLogReader) SeekTS(timestamp int64) (err error) { </s> add func (r *QLogReader) seekTS(timestamp int64) (err error) { </s> remove return fmt.Errorf("querylog: %w", err) </s> add if err != nil { return fmt.Errorf("seekts: %w", err) } return nil </s> remove func (q *QLogFile) SeekTS(timestamp int64) (int64, int, error) { </s> add func (q *QLogFile) seekTS(timestamp int64) (int64, int, error) { </s> remove _, _, err = q.SeekTS(timestamp) if err == nil { // Search is finished, and the searched element have // been found. Update currentFile only, position is // already set properly in QLogFile. r.currentFile = i return nil } else if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of // this one. continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably // between the end of the previous one and the start of // this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { break </s> add _, _, err = q.seekTS(timestamp) if err != nil { if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of this // one. If there is no next file, it's not found. err = ErrTSNotFound continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably between // the end of the previous one and the start of this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { return err } else { return fmt.Errorf("seekts: file at index %d: %w", i, err) } </s> add // The search is finished, and the searched element has been found. // Update currentFile only, position is already set properly in // QLogFile. r.currentFile = i return nil
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogfile.go
keep keep keep keep replace keep keep keep keep keep
<mask> // * It returns the position of the the line with the timestamp we were looking for <mask> // so that when we call "ReadNext" this line was returned. <mask> // * Depth of the search (how many times we compared timestamps). <mask> // * If we could not find it, it returns one of the errors described above. <mask> func (q *QLogFile) SeekTS(timestamp int64) (int64, int, error) { <mask> q.lock.Lock() <mask> defer q.lock.Unlock() <mask> <mask> // Empty the buffer <mask> q.buffer = nil </s> Pull request: querylog: fix logic Merge in DNS/adguard-home from fix-querylog-logs to master Squashed commit of the following: commit db6edb86f1f024c85efd3bca3ceb6dfc6ce04edd Merge: d1981696 a3968658 Author: Ainar Garipov <[email protected]> Date: Mon Dec 13 13:48:25 2021 +0300 Merge branch 'master' into fix-querylog-logs commit d1981696782ca9adc5213f76cdbe2dc9f859f921 Author: Ainar Garipov <[email protected]> Date: Fri Dec 10 21:14:04 2021 +0300 querylog: fix logic </s> remove // SeekTS performs binary search of a query log record with the specified </s> add // seekTS performs binary search of a query log record with the specified </s> remove // SeekTS performs binary search in the query log file looking for a record </s> add // seekTS performs binary search in the query log file looking for a record </s> remove func (r *QLogReader) SeekTS(timestamp int64) (err error) { </s> add func (r *QLogReader) seekTS(timestamp int64) (err error) { </s> remove err = r.SeekTS(params.olderThan.UnixNano()) </s> add err = r.seekTS(params.olderThan.UnixNano()) </s> remove _, _, err = q.SeekTS(timestamp) if err == nil { // Search is finished, and the searched element have // been found. Update currentFile only, position is // already set properly in QLogFile. r.currentFile = i return nil } else if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of // this one. continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably // between the end of the previous one and the start of // this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { break </s> add _, _, err = q.seekTS(timestamp) if err != nil { if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of this // one. If there is no next file, it's not found. err = ErrTSNotFound continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably between // the end of the previous one and the start of this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { return err } else { return fmt.Errorf("seekts: file at index %d: %w", i, err) } </s> add n--
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogfile.go
keep keep keep keep replace keep keep keep keep keep
<mask> ts := readQLogTimestamp(line) <mask> assert.NotEqualValues(t, 0, ts) <mask> <mask> // Try seeking to that line now. <mask> pos, _, err := q.SeekTS(ts) <mask> require.NoError(t, err) <mask> assert.NotEqualValues(t, 0, pos) <mask> <mask> testLine, err := q.ReadNext() <mask> require.NoError(t, err) </s> Pull request: querylog: fix logic Merge in DNS/adguard-home from fix-querylog-logs to master Squashed commit of the following: commit db6edb86f1f024c85efd3bca3ceb6dfc6ce04edd Merge: d1981696 a3968658 Author: Ainar Garipov <[email protected]> Date: Mon Dec 13 13:48:25 2021 +0300 Merge branch 'master' into fix-querylog-logs commit d1981696782ca9adc5213f76cdbe2dc9f859f921 Author: Ainar Garipov <[email protected]> Date: Fri Dec 10 21:14:04 2021 +0300 querylog: fix logic </s> remove _, depth, err = q.SeekTS(tc.ts) </s> add _, depth, err = q.seekTS(tc.ts) </s> remove err = r.SeekTS(ts.UnixNano()) </s> add err = r.seekTS(ts.UnixNano()) </s> remove err = r.SeekTS(params.olderThan.UnixNano()) </s> add err = r.seekTS(params.olderThan.UnixNano()) </s> remove func (q *QLogFile) SeekTS(timestamp int64) (int64, int, error) { </s> add func (q *QLogFile) seekTS(timestamp int64) (int64, int, error) { </s> remove func (r *QLogReader) SeekTS(timestamp int64) (err error) { </s> add func (r *QLogReader) seekTS(timestamp int64) (err error) { </s> remove _, _, err = q.SeekTS(timestamp) if err == nil { // Search is finished, and the searched element have // been found. Update currentFile only, position is // already set properly in QLogFile. r.currentFile = i return nil } else if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of // this one. continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably // between the end of the previous one and the start of // this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { break </s> add _, _, err = q.seekTS(timestamp) if err != nil { if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of this // one. If there is no next file, it's not found. err = ErrTSNotFound continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably between // the end of the previous one and the start of this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { return err } else { return fmt.Errorf("seekts: file at index %d: %w", i, err) }
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogfile_test.go
keep keep keep keep replace keep keep keep keep keep
<mask> t.Run(tc.name, func(t *testing.T) { <mask> assert.NotEqualValues(t, 0, tc.ts) <mask> <mask> var depth int <mask> _, depth, err = q.SeekTS(tc.ts) <mask> assert.NotEmpty(t, l.num) <mask> require.Error(t, err) <mask> <mask> if tc.leq { <mask> assert.LessOrEqual(t, depth, int(math.Log2(float64(l.num))+3)) </s> Pull request: querylog: fix logic Merge in DNS/adguard-home from fix-querylog-logs to master Squashed commit of the following: commit db6edb86f1f024c85efd3bca3ceb6dfc6ce04edd Merge: d1981696 a3968658 Author: Ainar Garipov <[email protected]> Date: Mon Dec 13 13:48:25 2021 +0300 Merge branch 'master' into fix-querylog-logs commit d1981696782ca9adc5213f76cdbe2dc9f859f921 Author: Ainar Garipov <[email protected]> Date: Fri Dec 10 21:14:04 2021 +0300 querylog: fix logic </s> remove err = r.SeekTS(ts.UnixNano()) </s> add err = r.seekTS(ts.UnixNano()) </s> remove _, depth, err := q.SeekTS(timestamp.Add(time.Second * time.Duration(tc.delta)).UnixNano()) </s> add _, depth, err := q.seekTS(timestamp.Add(time.Second * time.Duration(tc.delta)).UnixNano()) </s> remove pos, _, err := q.SeekTS(ts) </s> add pos, _, err := q.seekTS(ts) </s> remove err = r.SeekTS(params.olderThan.UnixNano()) </s> add err = r.seekTS(params.olderThan.UnixNano()) </s> remove _, _, err = q.SeekTS(timestamp) if err == nil { // Search is finished, and the searched element have // been found. Update currentFile only, position is // already set properly in QLogFile. r.currentFile = i return nil } else if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of // this one. continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably // between the end of the previous one and the start of // this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { break </s> add _, _, err = q.seekTS(timestamp) if err != nil { if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of this // one. If there is no next file, it's not found. err = ErrTSNotFound continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably between // the end of the previous one and the start of this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { return err } else { return fmt.Errorf("seekts: file at index %d: %w", i, err) } </s> remove func (r *QLogReader) SeekTS(timestamp int64) (err error) { </s> add func (r *QLogReader) seekTS(timestamp int64) (err error) {
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogfile_test.go
keep keep keep keep replace keep keep keep keep keep
<mask> ) <mask> <mask> q := NewTestQLogFileData(t, data) <mask> <mask> _, depth, err := q.SeekTS(timestamp.Add(time.Second * time.Duration(tc.delta)).UnixNano()) <mask> require.Truef(t, errors.Is(err, tc.wantErr), "%v", err) <mask> assert.Equal(t, tc.wantDepth, depth) <mask> }) <mask> } <mask> } </s> Pull request: querylog: fix logic Merge in DNS/adguard-home from fix-querylog-logs to master Squashed commit of the following: commit db6edb86f1f024c85efd3bca3ceb6dfc6ce04edd Merge: d1981696 a3968658 Author: Ainar Garipov <[email protected]> Date: Mon Dec 13 13:48:25 2021 +0300 Merge branch 'master' into fix-querylog-logs commit d1981696782ca9adc5213f76cdbe2dc9f859f921 Author: Ainar Garipov <[email protected]> Date: Fri Dec 10 21:14:04 2021 +0300 querylog: fix logic </s> remove _, _, err = q.SeekTS(timestamp) if err == nil { // Search is finished, and the searched element have // been found. Update currentFile only, position is // already set properly in QLogFile. r.currentFile = i return nil } else if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of // this one. continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably // between the end of the previous one and the start of // this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { break </s> add _, _, err = q.seekTS(timestamp) if err != nil { if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of this // one. If there is no next file, it's not found. err = ErrTSNotFound continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably between // the end of the previous one and the start of this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { return err } else { return fmt.Errorf("seekts: file at index %d: %w", i, err) } </s> remove err = r.SeekTS(ts.UnixNano()) </s> add err = r.seekTS(ts.UnixNano()) </s> remove _, depth, err = q.SeekTS(tc.ts) </s> add _, depth, err = q.seekTS(tc.ts) </s> remove err = r.SeekTS(params.olderThan.UnixNano()) </s> add err = r.seekTS(params.olderThan.UnixNano()) </s> add n-- </s> add // The search is finished, and the searched element has been found. // Update currentFile only, position is already set properly in // QLogFile. r.currentFile = i return nil
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogfile_test.go
keep keep keep replace keep keep replace keep keep keep keep
<mask> }, nil <mask> } <mask> <mask> // SeekTS performs binary search of a query log record with the specified <mask> // timestamp. If the record is found, it sets QLogReader's position to point to <mask> // that line, so that the next ReadNext call returned this line. <mask> func (r *QLogReader) SeekTS(timestamp int64) (err error) { <mask> for i := len(r.qFiles) - 1; i >= 0; i-- { <mask> q := r.qFiles[i] <mask> _, _, err = q.SeekTS(timestamp) <mask> if err == nil { </s> Pull request: querylog: fix logic Merge in DNS/adguard-home from fix-querylog-logs to master Squashed commit of the following: commit db6edb86f1f024c85efd3bca3ceb6dfc6ce04edd Merge: d1981696 a3968658 Author: Ainar Garipov <[email protected]> Date: Mon Dec 13 13:48:25 2021 +0300 Merge branch 'master' into fix-querylog-logs commit d1981696782ca9adc5213f76cdbe2dc9f859f921 Author: Ainar Garipov <[email protected]> Date: Fri Dec 10 21:14:04 2021 +0300 querylog: fix logic </s> remove // SeekTS performs binary search in the query log file looking for a record </s> add // seekTS performs binary search in the query log file looking for a record </s> remove _, _, err = q.SeekTS(timestamp) if err == nil { // Search is finished, and the searched element have // been found. Update currentFile only, position is // already set properly in QLogFile. r.currentFile = i return nil } else if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of // this one. continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably // between the end of the previous one and the start of // this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { break </s> add _, _, err = q.seekTS(timestamp) if err != nil { if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of this // one. If there is no next file, it's not found. err = ErrTSNotFound continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably between // the end of the previous one and the start of this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { return err } else { return fmt.Errorf("seekts: file at index %d: %w", i, err) } </s> remove func (q *QLogFile) SeekTS(timestamp int64) (int64, int, error) { </s> add func (q *QLogFile) seekTS(timestamp int64) (int64, int, error) { </s> remove err = r.SeekTS(params.olderThan.UnixNano()) </s> add err = r.seekTS(params.olderThan.UnixNano()) </s> remove return fmt.Errorf("querylog: %w", err) </s> add if err != nil { return fmt.Errorf("seekts: %w", err) } return nil
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogreader.go
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> // that line, so that the next ReadNext call returned this line. <mask> func (r *QLogReader) SeekTS(timestamp int64) (err error) { <mask> for i := len(r.qFiles) - 1; i >= 0; i-- { <mask> q := r.qFiles[i] <mask> _, _, err = q.SeekTS(timestamp) <mask> if err == nil { <mask> // Search is finished, and the searched element have <mask> // been found. Update currentFile only, position is <mask> // already set properly in QLogFile. <mask> r.currentFile = i <mask> <mask> return nil <mask> } else if errors.Is(err, ErrTSTooEarly) { <mask> // Look at the next file, since we've reached the end of <mask> // this one. <mask> continue <mask> } else if errors.Is(err, ErrTSTooLate) { <mask> // Just seek to the start then. timestamp is probably <mask> // between the end of the previous one and the start of <mask> // this one. <mask> return r.SeekStart() <mask> } else if errors.Is(err, ErrTSNotFound) { <mask> break <mask> } <mask> } <mask> <mask> return fmt.Errorf("querylog: %w", err) <mask> } </s> Pull request: querylog: fix logic Merge in DNS/adguard-home from fix-querylog-logs to master Squashed commit of the following: commit db6edb86f1f024c85efd3bca3ceb6dfc6ce04edd Merge: d1981696 a3968658 Author: Ainar Garipov <[email protected]> Date: Mon Dec 13 13:48:25 2021 +0300 Merge branch 'master' into fix-querylog-logs commit d1981696782ca9adc5213f76cdbe2dc9f859f921 Author: Ainar Garipov <[email protected]> Date: Fri Dec 10 21:14:04 2021 +0300 querylog: fix logic </s> remove func (r *QLogReader) SeekTS(timestamp int64) (err error) { </s> add func (r *QLogReader) seekTS(timestamp int64) (err error) { </s> add // The search is finished, and the searched element has been found. // Update currentFile only, position is already set properly in // QLogFile. r.currentFile = i return nil </s> remove // SeekTS performs binary search of a query log record with the specified </s> add // seekTS performs binary search of a query log record with the specified </s> remove return fmt.Errorf("querylog: %w", err) </s> add if err != nil { return fmt.Errorf("seekts: %w", err) } return nil </s> remove err = r.SeekTS(params.olderThan.UnixNano()) </s> add err = r.seekTS(params.olderThan.UnixNano()) </s> remove func (q *QLogFile) SeekTS(timestamp int64) (int64, int, error) { </s> add func (q *QLogFile) seekTS(timestamp int64) (int64, int, error) {
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogreader.go
keep keep add keep keep keep keep keep keep
<mask> return fmt.Errorf("seekts: file at index %d: %w", i, err) <mask> } <mask> } <mask> } <mask> <mask> if err != nil { <mask> return fmt.Errorf("seekts: %w", err) <mask> } <mask> </s> Pull request: querylog: fix logic Merge in DNS/adguard-home from fix-querylog-logs to master Squashed commit of the following: commit db6edb86f1f024c85efd3bca3ceb6dfc6ce04edd Merge: d1981696 a3968658 Author: Ainar Garipov <[email protected]> Date: Mon Dec 13 13:48:25 2021 +0300 Merge branch 'master' into fix-querylog-logs commit d1981696782ca9adc5213f76cdbe2dc9f859f921 Author: Ainar Garipov <[email protected]> Date: Fri Dec 10 21:14:04 2021 +0300 querylog: fix logic </s> remove return fmt.Errorf("querylog: %w", err) </s> add if err != nil { return fmt.Errorf("seekts: %w", err) } return nil </s> remove _, _, err = q.SeekTS(timestamp) if err == nil { // Search is finished, and the searched element have // been found. Update currentFile only, position is // already set properly in QLogFile. r.currentFile = i return nil } else if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of // this one. continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably // between the end of the previous one and the start of // this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { break </s> add _, _, err = q.seekTS(timestamp) if err != nil { if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of this // one. If there is no next file, it's not found. err = ErrTSNotFound continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably between // the end of the previous one and the start of this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { return err } else { return fmt.Errorf("seekts: file at index %d: %w", i, err) } </s> remove err = r.SeekTS(params.olderThan.UnixNano()) </s> add err = r.seekTS(params.olderThan.UnixNano()) </s> remove err = r.SeekTS(ts.UnixNano()) </s> add err = r.seekTS(ts.UnixNano()) </s> add n-- </s> remove _, depth, err := q.SeekTS(timestamp.Add(time.Second * time.Duration(tc.delta)).UnixNano()) </s> add _, depth, err := q.seekTS(timestamp.Add(time.Second * time.Duration(tc.delta)).UnixNano())
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogreader.go
keep keep keep keep replace keep keep keep keep keep
<mask> break <mask> } <mask> } <mask> <mask> return fmt.Errorf("querylog: %w", err) <mask> } <mask> <mask> // SeekStart changes the current position to the end of the newest file <mask> // Please note that we're reading query log in the reverse order <mask> // and that's why log start is actually the end of file </s> Pull request: querylog: fix logic Merge in DNS/adguard-home from fix-querylog-logs to master Squashed commit of the following: commit db6edb86f1f024c85efd3bca3ceb6dfc6ce04edd Merge: d1981696 a3968658 Author: Ainar Garipov <[email protected]> Date: Mon Dec 13 13:48:25 2021 +0300 Merge branch 'master' into fix-querylog-logs commit d1981696782ca9adc5213f76cdbe2dc9f859f921 Author: Ainar Garipov <[email protected]> Date: Fri Dec 10 21:14:04 2021 +0300 querylog: fix logic </s> remove _, _, err = q.SeekTS(timestamp) if err == nil { // Search is finished, and the searched element have // been found. Update currentFile only, position is // already set properly in QLogFile. r.currentFile = i return nil } else if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of // this one. continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably // between the end of the previous one and the start of // this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { break </s> add _, _, err = q.seekTS(timestamp) if err != nil { if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of this // one. If there is no next file, it's not found. err = ErrTSNotFound continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably between // the end of the previous one and the start of this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { return err } else { return fmt.Errorf("seekts: file at index %d: %w", i, err) } </s> remove // SeekTS performs binary search in the query log file looking for a record </s> add // seekTS performs binary search in the query log file looking for a record </s> add // The search is finished, and the searched element has been found. // Update currentFile only, position is already set properly in // QLogFile. r.currentFile = i return nil </s> remove // SeekTS performs binary search of a query log record with the specified </s> add // seekTS performs binary search of a query log record with the specified </s> remove func (r *QLogReader) SeekTS(timestamp int64) (err error) { </s> add func (r *QLogReader) seekTS(timestamp int64) (err error) { </s> add n--
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogreader.go
keep keep keep keep replace keep keep keep keep keep
<mask> want: nil, <mask> }, { <mask> name: "non-existent_long_ago", <mask> time: "2000-02-19T01:23:16.920973+03:00", <mask> want: ErrTSTooEarly, <mask> }, { <mask> name: "non-existent_far_ahead", <mask> time: "2100-02-19T01:23:16.920973+03:00", <mask> want: nil, <mask> }, { </s> Pull request: querylog: fix logic Merge in DNS/adguard-home from fix-querylog-logs to master Squashed commit of the following: commit db6edb86f1f024c85efd3bca3ceb6dfc6ce04edd Merge: d1981696 a3968658 Author: Ainar Garipov <[email protected]> Date: Mon Dec 13 13:48:25 2021 +0300 Merge branch 'master' into fix-querylog-logs commit d1981696782ca9adc5213f76cdbe2dc9f859f921 Author: Ainar Garipov <[email protected]> Date: Fri Dec 10 21:14:04 2021 +0300 querylog: fix logic </s> remove // SeekTS performs binary search of a query log record with the specified </s> add // seekTS performs binary search of a query log record with the specified </s> remove // SeekTS performs binary search in the query log file looking for a record </s> add // seekTS performs binary search in the query log file looking for a record </s> remove err = r.SeekTS(params.olderThan.UnixNano()) </s> add err = r.seekTS(params.olderThan.UnixNano()) </s> remove _, _, err = q.SeekTS(timestamp) if err == nil { // Search is finished, and the searched element have // been found. Update currentFile only, position is // already set properly in QLogFile. r.currentFile = i return nil } else if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of // this one. continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably // between the end of the previous one and the start of // this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { break </s> add _, _, err = q.seekTS(timestamp) if err != nil { if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of this // one. If there is no next file, it's not found. err = ErrTSNotFound continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably between // the end of the previous one and the start of this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { return err } else { return fmt.Errorf("seekts: file at index %d: %w", i, err) } </s> remove _, depth, err = q.SeekTS(tc.ts) </s> add _, depth, err = q.seekTS(tc.ts) </s> remove func (r *QLogReader) SeekTS(timestamp int64) (err error) { </s> add func (r *QLogReader) seekTS(timestamp int64) (err error) {
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogreader_test.go
keep keep keep keep replace keep keep keep keep keep
<mask> t.Run(tc.name, func(t *testing.T) { <mask> ts, err := time.Parse(time.RFC3339Nano, tc.time) <mask> require.NoError(t, err) <mask> <mask> err = r.SeekTS(ts.UnixNano()) <mask> assert.ErrorIs(t, err, tc.want) <mask> }) <mask> } <mask> } <mask> </s> Pull request: querylog: fix logic Merge in DNS/adguard-home from fix-querylog-logs to master Squashed commit of the following: commit db6edb86f1f024c85efd3bca3ceb6dfc6ce04edd Merge: d1981696 a3968658 Author: Ainar Garipov <[email protected]> Date: Mon Dec 13 13:48:25 2021 +0300 Merge branch 'master' into fix-querylog-logs commit d1981696782ca9adc5213f76cdbe2dc9f859f921 Author: Ainar Garipov <[email protected]> Date: Fri Dec 10 21:14:04 2021 +0300 querylog: fix logic </s> remove _, depth, err = q.SeekTS(tc.ts) </s> add _, depth, err = q.seekTS(tc.ts) </s> remove _, depth, err := q.SeekTS(timestamp.Add(time.Second * time.Duration(tc.delta)).UnixNano()) </s> add _, depth, err := q.seekTS(timestamp.Add(time.Second * time.Duration(tc.delta)).UnixNano()) </s> remove pos, _, err := q.SeekTS(ts) </s> add pos, _, err := q.seekTS(ts) </s> remove err = r.SeekTS(params.olderThan.UnixNano()) </s> add err = r.seekTS(params.olderThan.UnixNano()) </s> remove _, _, err = q.SeekTS(timestamp) if err == nil { // Search is finished, and the searched element have // been found. Update currentFile only, position is // already set properly in QLogFile. r.currentFile = i return nil } else if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of // this one. continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably // between the end of the previous one and the start of // this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { break </s> add _, _, err = q.seekTS(timestamp) if err != nil { if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of this // one. If there is no next file, it's not found. err = ErrTSNotFound continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably between // the end of the previous one and the start of this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { return err } else { return fmt.Errorf("seekts: file at index %d: %w", i, err) } </s> add // The search is finished, and the searched element has been found. // Update currentFile only, position is already set properly in // QLogFile. r.currentFile = i return nil
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogreader_test.go
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> if params.olderThan.IsZero() { <mask> err = r.SeekStart() <mask> } else { <mask> err = r.SeekTS(params.olderThan.UnixNano()) <mask> if err == nil { <mask> // Read to the next record, because we only need the one <mask> // that goes after it. <mask> _, err = r.ReadNext() <mask> } </s> Pull request: querylog: fix logic Merge in DNS/adguard-home from fix-querylog-logs to master Squashed commit of the following: commit db6edb86f1f024c85efd3bca3ceb6dfc6ce04edd Merge: d1981696 a3968658 Author: Ainar Garipov <[email protected]> Date: Mon Dec 13 13:48:25 2021 +0300 Merge branch 'master' into fix-querylog-logs commit d1981696782ca9adc5213f76cdbe2dc9f859f921 Author: Ainar Garipov <[email protected]> Date: Fri Dec 10 21:14:04 2021 +0300 querylog: fix logic </s> remove _, _, err = q.SeekTS(timestamp) if err == nil { // Search is finished, and the searched element have // been found. Update currentFile only, position is // already set properly in QLogFile. r.currentFile = i return nil } else if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of // this one. continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably // between the end of the previous one and the start of // this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { break </s> add _, _, err = q.seekTS(timestamp) if err != nil { if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of this // one. If there is no next file, it's not found. err = ErrTSNotFound continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the start then. timestamp is probably between // the end of the previous one and the start of this one. return r.SeekStart() } else if errors.Is(err, ErrTSNotFound) { return err } else { return fmt.Errorf("seekts: file at index %d: %w", i, err) } </s> remove func (r *QLogReader) SeekTS(timestamp int64) (err error) { </s> add func (r *QLogReader) seekTS(timestamp int64) (err error) { </s> remove return fmt.Errorf("querylog: %w", err) </s> add if err != nil { return fmt.Errorf("seekts: %w", err) } return nil </s> remove func (q *QLogFile) SeekTS(timestamp int64) (int64, int, error) { </s> add func (q *QLogFile) seekTS(timestamp int64) (int64, int, error) { </s> add // The search is finished, and the searched element has been found. // Update currentFile only, position is already set properly in // QLogFile. r.currentFile = i return nil </s> add n--
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/search.go
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
<mask> "lint": "eslint -c ./scripts/lint/prod.js --ext .tsx --ext .ts ./", <mask> "go:build": "cd .. && make REBUILD_CLIENT=0 build", <mask> "go:run": "sudo ../AdguardHome" <mask> }, <mask> "husky": { <mask> "hooks": { <mask> "pre-commit": "yarn lint" <mask> } <mask> }, <mask> "license": "ISC", <mask> "dependencies": { <mask> "@sentry/react": "^5.27.0", <mask> "antd": "^4.7.2", <mask> "classnames": "^2.2.6", </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6 9cd9054c Author: Vlad <[email protected]> Date: Wed Feb 3 16:01:17 2021 +0300 Merge branch 'master' into new-client-dashboard commit 113743a60665e40383d367dc17fa709dc54e4e2e Author: Vlad <[email protected]> Date: Wed Feb 3 15:45:16 2021 +0300 Remove unneded modal styles commit 04f9d93a9ac17ee046f0d5bedfb2bf5a5e6c0a48 Author: Vlad <[email protected]> Date: Wed Feb 3 14:19:56 2021 +0300 Consider comments commit 78a96cd8fed8b3e03547e7e45724c23db295f67b Author: Vlad <[email protected]> Date: Mon Feb 1 18:46:52 2021 +0300 Remove old params for MiniCssExtractPlugin commit 40e5a9b2b1e04036deb70af17f2719eadd0c9c02 Author: Vlad <[email protected]> Date: Mon Feb 1 18:27:46 2021 +0300 Fix mobile version commit 509cefc308f945b03cafa62bf48257490a0a4be1 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:56 2021 +0300 Remove unneeded imports commit d192f39cd2503b8ec942f00ba78fca02cac9fa60 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:13 2021 +0300 Finish first version of dashboard commit f82429e53d334874ff7dd0641092ec83c66ab61c Merge: fd91a0a3 3e0238aa Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:59 2021 +0300 Merge branch 'master' into new-client-dashboard commit fd91a0a3d76c2a052a6548232b75d151d6065b88 Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:27 2021 +0300 wip commit 237679965052d38acfcd6a72d24b2444cc5b3896 Author: Vlad <[email protected]> Date: Fri Jan 29 11:18:10 2021 +0300 Finish general settings commit 397a7e10efd34a8d31bb175a5a5a7158338388d4 Author: Vlad <[email protected]> Date: Thu Jan 28 19:24:03 2021 +0300 Add General settings page commit 486aaa6f3f9ad66f3a0dcfcccad9a32659767e90 Author: Vlad <[email protected]> Date: Thu Jan 28 14:05:16 2021 +0300 Remove husky commit b895306c0655019ca56ce161e050d83b4e7f5ff1 Merge: a195f1f4 154c9c1c Author: Vlad <[email protected]> Date: Thu Jan 28 14:03:37 2021 +0300 Merge branch 'master' into new-client-dashboard commit a195f1f4d46043d9c53dea08734733f9817b95a0 Merge: c45c5fe9 362f390f Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:18 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit c45c5fe92e6c5c852bec8f512dc46b4cd513156c Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:01 2021 +0300 wip commit 362f390fd3dcfca75633a8d30a2e54c3c30b4f3d Author: Vladislav Abdulmyanov <[email protected]> Date: Wed Jan 27 15:45:12 2021 +0300 Pull request #949: + client: add setup guide page Merge in DNS/adguard-home from 2554-setup-guide to new-client-dashboard Squashed commit of the following: commit c240d52e9e5d90429f2018fde808f4d04ccec138 Merge: 256f1056 137b88e4 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:13:52 2021 +0300 Merge branch 'new-client-dashboard' into 2554-setup-guide commit 256f1056770c67339e93275ab6dc7aaf2c10da0b Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:10:45 2021 +0300 + client: add DNS addresses to the setup guide commit 0ecf91275a16ecc0dca23cae2ae209836fc622d2 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:00:12 2021 +0300 + client: add setup guide tabs commit 137b88e4253af5be32d542adbe74575ef74805c8 Author: Vlad <[email protected]> Date: Thu Jan 21 19:17:58 2021 +0300 Add clients top commit c3318e6932d87fdff5f22d76bee12b49f099129a Merge: 2776276b 021eb22f Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:57 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit 2776276b2e6dc026e1326b02c388fcf7d48d47ff Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:53 2021 +0300 Add top client info commit 021eb22ff877aec12eb7fab60147a2cc2ddd08b7 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 14:13:54 2021 +0300 Merge: client: add sidebar Squashed commit of the following: commit 6885ba953971e68602889fbb3219221f90265421 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:56:55 2021 +0300 add sidebar mask commit f069bfe8cba2b31355e19a51ca00bf774ee9e560 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:03:47 2021 +0300 fix store commit 77c8791002887ae022da07dc264d9010576e7bab Merge: d0a6eff6 ea6d54d4 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:01:04 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit d0a6eff67fd74533d63f5d56382085e98ddbb702 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:47:32 2021 +0300 client: remove unused file commit 9d2424477de85503fe41fa00cc1294cb0c0e7dfa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:39:13 2021 +0300 client: header commit 9ddea19c136f15b184caa72d7e82738f7d4f3f1f Merge: 797f1248 b694bb05 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:57:24 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit 797f1248df5c1ef8e59c2a9999138f9e05a7adaa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:51:57 2021 +0300 client: sidebar ... and 14 more commits </s> add "@adguard/translate": "^0.2.0", "@ant-design/icons": "^4.4.0", </s> remove options: { esModules: true, } </s> add </s> remove options: { esModules: true, } </s> add </s> remove const data: IWhoisInfo = { }; if (typeof this._key !== 'undefined') { data.key = this._key; } return data; </s> add return Object.entries(this.data).reduce<Record<string, string>>((prev, [key, value]) => { prev[key] = value; return prev; }, {}) </s> remove const data: IClientsFindEntry = { }; return data; </s> add return Object.entries(this.data).reduce<Record<string, IClientFindSubEntry>>((prev, [key, value]) => { prev[key] = value.serialize(); return prev; }, {}) </s> remove const data: IUpstreamsConfigResponse = { }; return data; </s> add return Object.entries(this.data).reduce<Record<string, string>>((prev, [key, value]) => { prev[key] = value; return prev; }, {})
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/package.json
keep add keep keep keep keep
<mask> "license": "ISC", <mask> "dependencies": { <mask> "@sentry/react": "^5.27.0", <mask> "antd": "^4.7.2", <mask> "classnames": "^2.2.6", <mask> "dayjs": "^1.9.3", </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6 9cd9054c Author: Vlad <[email protected]> Date: Wed Feb 3 16:01:17 2021 +0300 Merge branch 'master' into new-client-dashboard commit 113743a60665e40383d367dc17fa709dc54e4e2e Author: Vlad <[email protected]> Date: Wed Feb 3 15:45:16 2021 +0300 Remove unneded modal styles commit 04f9d93a9ac17ee046f0d5bedfb2bf5a5e6c0a48 Author: Vlad <[email protected]> Date: Wed Feb 3 14:19:56 2021 +0300 Consider comments commit 78a96cd8fed8b3e03547e7e45724c23db295f67b Author: Vlad <[email protected]> Date: Mon Feb 1 18:46:52 2021 +0300 Remove old params for MiniCssExtractPlugin commit 40e5a9b2b1e04036deb70af17f2719eadd0c9c02 Author: Vlad <[email protected]> Date: Mon Feb 1 18:27:46 2021 +0300 Fix mobile version commit 509cefc308f945b03cafa62bf48257490a0a4be1 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:56 2021 +0300 Remove unneeded imports commit d192f39cd2503b8ec942f00ba78fca02cac9fa60 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:13 2021 +0300 Finish first version of dashboard commit f82429e53d334874ff7dd0641092ec83c66ab61c Merge: fd91a0a3 3e0238aa Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:59 2021 +0300 Merge branch 'master' into new-client-dashboard commit fd91a0a3d76c2a052a6548232b75d151d6065b88 Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:27 2021 +0300 wip commit 237679965052d38acfcd6a72d24b2444cc5b3896 Author: Vlad <[email protected]> Date: Fri Jan 29 11:18:10 2021 +0300 Finish general settings commit 397a7e10efd34a8d31bb175a5a5a7158338388d4 Author: Vlad <[email protected]> Date: Thu Jan 28 19:24:03 2021 +0300 Add General settings page commit 486aaa6f3f9ad66f3a0dcfcccad9a32659767e90 Author: Vlad <[email protected]> Date: Thu Jan 28 14:05:16 2021 +0300 Remove husky commit b895306c0655019ca56ce161e050d83b4e7f5ff1 Merge: a195f1f4 154c9c1c Author: Vlad <[email protected]> Date: Thu Jan 28 14:03:37 2021 +0300 Merge branch 'master' into new-client-dashboard commit a195f1f4d46043d9c53dea08734733f9817b95a0 Merge: c45c5fe9 362f390f Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:18 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit c45c5fe92e6c5c852bec8f512dc46b4cd513156c Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:01 2021 +0300 wip commit 362f390fd3dcfca75633a8d30a2e54c3c30b4f3d Author: Vladislav Abdulmyanov <[email protected]> Date: Wed Jan 27 15:45:12 2021 +0300 Pull request #949: + client: add setup guide page Merge in DNS/adguard-home from 2554-setup-guide to new-client-dashboard Squashed commit of the following: commit c240d52e9e5d90429f2018fde808f4d04ccec138 Merge: 256f1056 137b88e4 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:13:52 2021 +0300 Merge branch 'new-client-dashboard' into 2554-setup-guide commit 256f1056770c67339e93275ab6dc7aaf2c10da0b Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:10:45 2021 +0300 + client: add DNS addresses to the setup guide commit 0ecf91275a16ecc0dca23cae2ae209836fc622d2 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:00:12 2021 +0300 + client: add setup guide tabs commit 137b88e4253af5be32d542adbe74575ef74805c8 Author: Vlad <[email protected]> Date: Thu Jan 21 19:17:58 2021 +0300 Add clients top commit c3318e6932d87fdff5f22d76bee12b49f099129a Merge: 2776276b 021eb22f Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:57 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit 2776276b2e6dc026e1326b02c388fcf7d48d47ff Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:53 2021 +0300 Add top client info commit 021eb22ff877aec12eb7fab60147a2cc2ddd08b7 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 14:13:54 2021 +0300 Merge: client: add sidebar Squashed commit of the following: commit 6885ba953971e68602889fbb3219221f90265421 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:56:55 2021 +0300 add sidebar mask commit f069bfe8cba2b31355e19a51ca00bf774ee9e560 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:03:47 2021 +0300 fix store commit 77c8791002887ae022da07dc264d9010576e7bab Merge: d0a6eff6 ea6d54d4 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:01:04 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit d0a6eff67fd74533d63f5d56382085e98ddbb702 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:47:32 2021 +0300 client: remove unused file commit 9d2424477de85503fe41fa00cc1294cb0c0e7dfa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:39:13 2021 +0300 client: header commit 9ddea19c136f15b184caa72d7e82738f7d4f3f1f Merge: 797f1248 b694bb05 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:57:24 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit 797f1248df5c1ef8e59c2a9999138f9e05a7adaa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:51:57 2021 +0300 client: sidebar ... and 14 more commits </s> remove "husky": { "hooks": { "pre-commit": "yarn lint" } }, </s> add </s> remove options: { esModules: true, } </s> add </s> remove const data: IClientsFindEntry = { }; return data; </s> add return Object.entries(this.data).reduce<Record<string, IClientFindSubEntry>>((prev, [key, value]) => { prev[key] = value.serialize(); return prev; }, {}) </s> remove const data: IUpstreamsConfigResponse = { }; return data; </s> add return Object.entries(this.data).reduce<Record<string, string>>((prev, [key, value]) => { prev[key] = value; return prev; }, {}) </s> add client_id: client_id, </s> add &.gray { color: var(--gray900); &:hover, &:focus { color: var(--gray700); } &:active { color: var(--gray700); } }
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/package.json
keep keep keep keep replace keep keep keep keep keep
<mask> "mobx-react-lite": "^3.0.1", <mask> "qs": "^6.9.4", <mask> "react": "^17.0.0", <mask> "react-dom": "^17.0.0", <mask> "react-router-dom": "^5.2.0" <mask> }, <mask> "devDependencies": { <mask> "@types/classnames": "^2.2.10", <mask> "@types/qs": "^6.9.5", <mask> "@types/react": "^16.9.53", </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6 9cd9054c Author: Vlad <[email protected]> Date: Wed Feb 3 16:01:17 2021 +0300 Merge branch 'master' into new-client-dashboard commit 113743a60665e40383d367dc17fa709dc54e4e2e Author: Vlad <[email protected]> Date: Wed Feb 3 15:45:16 2021 +0300 Remove unneded modal styles commit 04f9d93a9ac17ee046f0d5bedfb2bf5a5e6c0a48 Author: Vlad <[email protected]> Date: Wed Feb 3 14:19:56 2021 +0300 Consider comments commit 78a96cd8fed8b3e03547e7e45724c23db295f67b Author: Vlad <[email protected]> Date: Mon Feb 1 18:46:52 2021 +0300 Remove old params for MiniCssExtractPlugin commit 40e5a9b2b1e04036deb70af17f2719eadd0c9c02 Author: Vlad <[email protected]> Date: Mon Feb 1 18:27:46 2021 +0300 Fix mobile version commit 509cefc308f945b03cafa62bf48257490a0a4be1 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:56 2021 +0300 Remove unneeded imports commit d192f39cd2503b8ec942f00ba78fca02cac9fa60 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:13 2021 +0300 Finish first version of dashboard commit f82429e53d334874ff7dd0641092ec83c66ab61c Merge: fd91a0a3 3e0238aa Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:59 2021 +0300 Merge branch 'master' into new-client-dashboard commit fd91a0a3d76c2a052a6548232b75d151d6065b88 Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:27 2021 +0300 wip commit 237679965052d38acfcd6a72d24b2444cc5b3896 Author: Vlad <[email protected]> Date: Fri Jan 29 11:18:10 2021 +0300 Finish general settings commit 397a7e10efd34a8d31bb175a5a5a7158338388d4 Author: Vlad <[email protected]> Date: Thu Jan 28 19:24:03 2021 +0300 Add General settings page commit 486aaa6f3f9ad66f3a0dcfcccad9a32659767e90 Author: Vlad <[email protected]> Date: Thu Jan 28 14:05:16 2021 +0300 Remove husky commit b895306c0655019ca56ce161e050d83b4e7f5ff1 Merge: a195f1f4 154c9c1c Author: Vlad <[email protected]> Date: Thu Jan 28 14:03:37 2021 +0300 Merge branch 'master' into new-client-dashboard commit a195f1f4d46043d9c53dea08734733f9817b95a0 Merge: c45c5fe9 362f390f Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:18 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit c45c5fe92e6c5c852bec8f512dc46b4cd513156c Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:01 2021 +0300 wip commit 362f390fd3dcfca75633a8d30a2e54c3c30b4f3d Author: Vladislav Abdulmyanov <[email protected]> Date: Wed Jan 27 15:45:12 2021 +0300 Pull request #949: + client: add setup guide page Merge in DNS/adguard-home from 2554-setup-guide to new-client-dashboard Squashed commit of the following: commit c240d52e9e5d90429f2018fde808f4d04ccec138 Merge: 256f1056 137b88e4 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:13:52 2021 +0300 Merge branch 'new-client-dashboard' into 2554-setup-guide commit 256f1056770c67339e93275ab6dc7aaf2c10da0b Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:10:45 2021 +0300 + client: add DNS addresses to the setup guide commit 0ecf91275a16ecc0dca23cae2ae209836fc622d2 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:00:12 2021 +0300 + client: add setup guide tabs commit 137b88e4253af5be32d542adbe74575ef74805c8 Author: Vlad <[email protected]> Date: Thu Jan 21 19:17:58 2021 +0300 Add clients top commit c3318e6932d87fdff5f22d76bee12b49f099129a Merge: 2776276b 021eb22f Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:57 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit 2776276b2e6dc026e1326b02c388fcf7d48d47ff Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:53 2021 +0300 Add top client info commit 021eb22ff877aec12eb7fab60147a2cc2ddd08b7 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 14:13:54 2021 +0300 Merge: client: add sidebar Squashed commit of the following: commit 6885ba953971e68602889fbb3219221f90265421 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:56:55 2021 +0300 add sidebar mask commit f069bfe8cba2b31355e19a51ca00bf774ee9e560 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:03:47 2021 +0300 fix store commit 77c8791002887ae022da07dc264d9010576e7bab Merge: d0a6eff6 ea6d54d4 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:01:04 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit d0a6eff67fd74533d63f5d56382085e98ddbb702 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:47:32 2021 +0300 client: remove unused file commit 9d2424477de85503fe41fa00cc1294cb0c0e7dfa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:39:13 2021 +0300 client: header commit 9ddea19c136f15b184caa72d7e82738f7d4f3f1f Merge: 797f1248 b694bb05 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:57:24 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit 797f1248df5c1ef8e59c2a9999138f9e05a7adaa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:51:57 2021 +0300 client: sidebar ... and 14 more commits </s> remove options: { esModules: true, } </s> add </s> remove options: { esModules: true, } </s> add </s> remove "husky": { "hooks": { "pre-commit": "yarn lint" } }, </s> add </s> remove const data: IClientsFindEntry = { }; return data; </s> add return Object.entries(this.data).reduce<Record<string, IClientFindSubEntry>>((prev, [key, value]) => { prev[key] = value.serialize(); return prev; }, {}) </s> remove const data: IUpstreamsConfigResponse = { }; return data; </s> add return Object.entries(this.data).reduce<Record<string, string>>((prev, [key, value]) => { prev[key] = value; return prev; }, {}) </s> add readonly data: Record<string, ClientFindSubEntry>;
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/package.json
keep keep keep keep replace keep keep keep keep keep
<mask> "eslint-plugin-react-hooks": "^4.2.0", <mask> "file-loader": "^6.1.1", <mask> "html-webpack-plugin": "^4.5.0", <mask> "http-proxy-middleware": "^1.0.6", <mask> "husky": "^4.3.0", <mask> "less": "^3.12.2", <mask> "less-loader": "^5.0.0", <mask> "mini-css-extract-plugin": "^1.1.1", <mask> "optimize-css-assets-webpack-plugin": "^5.0.4", <mask> "postcss": "^8.1.2", </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6 9cd9054c Author: Vlad <[email protected]> Date: Wed Feb 3 16:01:17 2021 +0300 Merge branch 'master' into new-client-dashboard commit 113743a60665e40383d367dc17fa709dc54e4e2e Author: Vlad <[email protected]> Date: Wed Feb 3 15:45:16 2021 +0300 Remove unneded modal styles commit 04f9d93a9ac17ee046f0d5bedfb2bf5a5e6c0a48 Author: Vlad <[email protected]> Date: Wed Feb 3 14:19:56 2021 +0300 Consider comments commit 78a96cd8fed8b3e03547e7e45724c23db295f67b Author: Vlad <[email protected]> Date: Mon Feb 1 18:46:52 2021 +0300 Remove old params for MiniCssExtractPlugin commit 40e5a9b2b1e04036deb70af17f2719eadd0c9c02 Author: Vlad <[email protected]> Date: Mon Feb 1 18:27:46 2021 +0300 Fix mobile version commit 509cefc308f945b03cafa62bf48257490a0a4be1 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:56 2021 +0300 Remove unneeded imports commit d192f39cd2503b8ec942f00ba78fca02cac9fa60 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:13 2021 +0300 Finish first version of dashboard commit f82429e53d334874ff7dd0641092ec83c66ab61c Merge: fd91a0a3 3e0238aa Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:59 2021 +0300 Merge branch 'master' into new-client-dashboard commit fd91a0a3d76c2a052a6548232b75d151d6065b88 Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:27 2021 +0300 wip commit 237679965052d38acfcd6a72d24b2444cc5b3896 Author: Vlad <[email protected]> Date: Fri Jan 29 11:18:10 2021 +0300 Finish general settings commit 397a7e10efd34a8d31bb175a5a5a7158338388d4 Author: Vlad <[email protected]> Date: Thu Jan 28 19:24:03 2021 +0300 Add General settings page commit 486aaa6f3f9ad66f3a0dcfcccad9a32659767e90 Author: Vlad <[email protected]> Date: Thu Jan 28 14:05:16 2021 +0300 Remove husky commit b895306c0655019ca56ce161e050d83b4e7f5ff1 Merge: a195f1f4 154c9c1c Author: Vlad <[email protected]> Date: Thu Jan 28 14:03:37 2021 +0300 Merge branch 'master' into new-client-dashboard commit a195f1f4d46043d9c53dea08734733f9817b95a0 Merge: c45c5fe9 362f390f Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:18 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit c45c5fe92e6c5c852bec8f512dc46b4cd513156c Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:01 2021 +0300 wip commit 362f390fd3dcfca75633a8d30a2e54c3c30b4f3d Author: Vladislav Abdulmyanov <[email protected]> Date: Wed Jan 27 15:45:12 2021 +0300 Pull request #949: + client: add setup guide page Merge in DNS/adguard-home from 2554-setup-guide to new-client-dashboard Squashed commit of the following: commit c240d52e9e5d90429f2018fde808f4d04ccec138 Merge: 256f1056 137b88e4 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:13:52 2021 +0300 Merge branch 'new-client-dashboard' into 2554-setup-guide commit 256f1056770c67339e93275ab6dc7aaf2c10da0b Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:10:45 2021 +0300 + client: add DNS addresses to the setup guide commit 0ecf91275a16ecc0dca23cae2ae209836fc622d2 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:00:12 2021 +0300 + client: add setup guide tabs commit 137b88e4253af5be32d542adbe74575ef74805c8 Author: Vlad <[email protected]> Date: Thu Jan 21 19:17:58 2021 +0300 Add clients top commit c3318e6932d87fdff5f22d76bee12b49f099129a Merge: 2776276b 021eb22f Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:57 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit 2776276b2e6dc026e1326b02c388fcf7d48d47ff Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:53 2021 +0300 Add top client info commit 021eb22ff877aec12eb7fab60147a2cc2ddd08b7 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 14:13:54 2021 +0300 Merge: client: add sidebar Squashed commit of the following: commit 6885ba953971e68602889fbb3219221f90265421 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:56:55 2021 +0300 add sidebar mask commit f069bfe8cba2b31355e19a51ca00bf774ee9e560 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:03:47 2021 +0300 fix store commit 77c8791002887ae022da07dc264d9010576e7bab Merge: d0a6eff6 ea6d54d4 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:01:04 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit d0a6eff67fd74533d63f5d56382085e98ddbb702 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:47:32 2021 +0300 client: remove unused file commit 9d2424477de85503fe41fa00cc1294cb0c0e7dfa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:39:13 2021 +0300 client: header commit 9ddea19c136f15b184caa72d7e82738f7d4f3f1f Merge: 797f1248 b694bb05 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:57:24 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit 797f1248df5c1ef8e59c2a9999138f9e05a7adaa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:51:57 2021 +0300 client: sidebar ... and 14 more commits </s> remove "husky": { "hooks": { "pre-commit": "yarn lint" } }, </s> add </s> remove this._whois_info = props.whois_info.map((p) => new WhoisInfo(p)); </s> add this._whois_info = new WhoisInfo(props.whois_info); </s> remove const validate = { }; const isError: string[] = []; Object.keys(validate).forEach((key) => { if (!(validate as any)[key]) { isError.push(key); } }); return isError; </s> add return [] </s> remove const data: IClientsFindEntry = { }; return data; </s> add return Object.entries(this.data).reduce<Record<string, IClientFindSubEntry>>((prev, [key, value]) => { prev[key] = value.serialize(); return prev; }, {}) </s> add this.data = Object.entries(props).reduce<Record<string, ClientFindSubEntry>>((prev, [key, value]) => { prev[key] = new ClientFindSubEntry(value!); return prev; }, {}) </s> add readonly data: Record<string, ClientFindSubEntry>;
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/package.json
keep keep keep keep replace keep keep keep keep keep
<mask> // eslint-disable-next-line import/no-extraneous-dependencies <mask> import * as morph from 'ts-morph'; <mask> <mask> import { ENT_DIR } from '../../consts'; <mask> import { TYPES, toCamel, schemaParamParser } from './utils'; <mask> <mask> const { Project, QuoteKind } = morph; <mask> <mask> <mask> const EntDir = path.resolve(ENT_DIR); </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6 9cd9054c Author: Vlad <[email protected]> Date: Wed Feb 3 16:01:17 2021 +0300 Merge branch 'master' into new-client-dashboard commit 113743a60665e40383d367dc17fa709dc54e4e2e Author: Vlad <[email protected]> Date: Wed Feb 3 15:45:16 2021 +0300 Remove unneded modal styles commit 04f9d93a9ac17ee046f0d5bedfb2bf5a5e6c0a48 Author: Vlad <[email protected]> Date: Wed Feb 3 14:19:56 2021 +0300 Consider comments commit 78a96cd8fed8b3e03547e7e45724c23db295f67b Author: Vlad <[email protected]> Date: Mon Feb 1 18:46:52 2021 +0300 Remove old params for MiniCssExtractPlugin commit 40e5a9b2b1e04036deb70af17f2719eadd0c9c02 Author: Vlad <[email protected]> Date: Mon Feb 1 18:27:46 2021 +0300 Fix mobile version commit 509cefc308f945b03cafa62bf48257490a0a4be1 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:56 2021 +0300 Remove unneeded imports commit d192f39cd2503b8ec942f00ba78fca02cac9fa60 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:13 2021 +0300 Finish first version of dashboard commit f82429e53d334874ff7dd0641092ec83c66ab61c Merge: fd91a0a3 3e0238aa Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:59 2021 +0300 Merge branch 'master' into new-client-dashboard commit fd91a0a3d76c2a052a6548232b75d151d6065b88 Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:27 2021 +0300 wip commit 237679965052d38acfcd6a72d24b2444cc5b3896 Author: Vlad <[email protected]> Date: Fri Jan 29 11:18:10 2021 +0300 Finish general settings commit 397a7e10efd34a8d31bb175a5a5a7158338388d4 Author: Vlad <[email protected]> Date: Thu Jan 28 19:24:03 2021 +0300 Add General settings page commit 486aaa6f3f9ad66f3a0dcfcccad9a32659767e90 Author: Vlad <[email protected]> Date: Thu Jan 28 14:05:16 2021 +0300 Remove husky commit b895306c0655019ca56ce161e050d83b4e7f5ff1 Merge: a195f1f4 154c9c1c Author: Vlad <[email protected]> Date: Thu Jan 28 14:03:37 2021 +0300 Merge branch 'master' into new-client-dashboard commit a195f1f4d46043d9c53dea08734733f9817b95a0 Merge: c45c5fe9 362f390f Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:18 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit c45c5fe92e6c5c852bec8f512dc46b4cd513156c Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:01 2021 +0300 wip commit 362f390fd3dcfca75633a8d30a2e54c3c30b4f3d Author: Vladislav Abdulmyanov <[email protected]> Date: Wed Jan 27 15:45:12 2021 +0300 Pull request #949: + client: add setup guide page Merge in DNS/adguard-home from 2554-setup-guide to new-client-dashboard Squashed commit of the following: commit c240d52e9e5d90429f2018fde808f4d04ccec138 Merge: 256f1056 137b88e4 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:13:52 2021 +0300 Merge branch 'new-client-dashboard' into 2554-setup-guide commit 256f1056770c67339e93275ab6dc7aaf2c10da0b Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:10:45 2021 +0300 + client: add DNS addresses to the setup guide commit 0ecf91275a16ecc0dca23cae2ae209836fc622d2 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:00:12 2021 +0300 + client: add setup guide tabs commit 137b88e4253af5be32d542adbe74575ef74805c8 Author: Vlad <[email protected]> Date: Thu Jan 21 19:17:58 2021 +0300 Add clients top commit c3318e6932d87fdff5f22d76bee12b49f099129a Merge: 2776276b 021eb22f Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:57 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit 2776276b2e6dc026e1326b02c388fcf7d48d47ff Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:53 2021 +0300 Add top client info commit 021eb22ff877aec12eb7fab60147a2cc2ddd08b7 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 14:13:54 2021 +0300 Merge: client: add sidebar Squashed commit of the following: commit 6885ba953971e68602889fbb3219221f90265421 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:56:55 2021 +0300 add sidebar mask commit f069bfe8cba2b31355e19a51ca00bf774ee9e560 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:03:47 2021 +0300 fix store commit 77c8791002887ae022da07dc264d9010576e7bab Merge: d0a6eff6 ea6d54d4 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:01:04 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit d0a6eff67fd74533d63f5d56382085e98ddbb702 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:47:32 2021 +0300 client: remove unused file commit 9d2424477de85503fe41fa00cc1294cb0c0e7dfa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:39:13 2021 +0300 client: header commit 9ddea19c136f15b184caa72d7e82738f7d4f3f1f Merge: 797f1248 b694bb05 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:57:24 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit 797f1248df5c1ef8e59c2a9999138f9e05a7adaa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:51:57 2021 +0300 client: sidebar ... and 14 more commits </s> remove import { danger, p } from 'Common/formating'; import { DEFAULT_DNS_PORT, DEFAULT_IP_ADDRESS, DEFAULT_IP_PORT } from 'Consts/install'; </s> add </s> add import { Store as InstallStore } from 'Store/installStore'; </s> add import cn from 'classnames'; </s> add import { DHCP_LINK } from 'Consts/common'; import { danger, externalLink, p } from 'Common/formating'; import { DEFAULT_DNS_PORT, DEFAULT_IP_ADDRESS, DEFAULT_IP_PORT } from 'Consts/install'; </s> add import AccessListResponse, { IAccessListResponse } from 'Entities/AccessListResponse'; import AccessSetRequest, { IAccessSetRequest } from 'Entities/AccessSetRequest'; </s> add import content from './Content.module.pcss'; import { colors } from './colors';
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/generateEntities.ts
keep keep keep keep replace keep keep keep keep keep
<mask> '// All changes will be overwrited on commit.', <mask> '', <mask> ]); <mask> <mask> const { properties: sProps, required } = this.schemas[sName]; <mask> <mask> const importEntities: { type: string, isClass: boolean }[] = []; <mask> const entityInterface = entityFile.addInterface({ <mask> name: `I${sName}`, <mask> isExported: true, </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6 9cd9054c Author: Vlad <[email protected]> Date: Wed Feb 3 16:01:17 2021 +0300 Merge branch 'master' into new-client-dashboard commit 113743a60665e40383d367dc17fa709dc54e4e2e Author: Vlad <[email protected]> Date: Wed Feb 3 15:45:16 2021 +0300 Remove unneded modal styles commit 04f9d93a9ac17ee046f0d5bedfb2bf5a5e6c0a48 Author: Vlad <[email protected]> Date: Wed Feb 3 14:19:56 2021 +0300 Consider comments commit 78a96cd8fed8b3e03547e7e45724c23db295f67b Author: Vlad <[email protected]> Date: Mon Feb 1 18:46:52 2021 +0300 Remove old params for MiniCssExtractPlugin commit 40e5a9b2b1e04036deb70af17f2719eadd0c9c02 Author: Vlad <[email protected]> Date: Mon Feb 1 18:27:46 2021 +0300 Fix mobile version commit 509cefc308f945b03cafa62bf48257490a0a4be1 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:56 2021 +0300 Remove unneeded imports commit d192f39cd2503b8ec942f00ba78fca02cac9fa60 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:13 2021 +0300 Finish first version of dashboard commit f82429e53d334874ff7dd0641092ec83c66ab61c Merge: fd91a0a3 3e0238aa Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:59 2021 +0300 Merge branch 'master' into new-client-dashboard commit fd91a0a3d76c2a052a6548232b75d151d6065b88 Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:27 2021 +0300 wip commit 237679965052d38acfcd6a72d24b2444cc5b3896 Author: Vlad <[email protected]> Date: Fri Jan 29 11:18:10 2021 +0300 Finish general settings commit 397a7e10efd34a8d31bb175a5a5a7158338388d4 Author: Vlad <[email protected]> Date: Thu Jan 28 19:24:03 2021 +0300 Add General settings page commit 486aaa6f3f9ad66f3a0dcfcccad9a32659767e90 Author: Vlad <[email protected]> Date: Thu Jan 28 14:05:16 2021 +0300 Remove husky commit b895306c0655019ca56ce161e050d83b4e7f5ff1 Merge: a195f1f4 154c9c1c Author: Vlad <[email protected]> Date: Thu Jan 28 14:03:37 2021 +0300 Merge branch 'master' into new-client-dashboard commit a195f1f4d46043d9c53dea08734733f9817b95a0 Merge: c45c5fe9 362f390f Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:18 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit c45c5fe92e6c5c852bec8f512dc46b4cd513156c Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:01 2021 +0300 wip commit 362f390fd3dcfca75633a8d30a2e54c3c30b4f3d Author: Vladislav Abdulmyanov <[email protected]> Date: Wed Jan 27 15:45:12 2021 +0300 Pull request #949: + client: add setup guide page Merge in DNS/adguard-home from 2554-setup-guide to new-client-dashboard Squashed commit of the following: commit c240d52e9e5d90429f2018fde808f4d04ccec138 Merge: 256f1056 137b88e4 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:13:52 2021 +0300 Merge branch 'new-client-dashboard' into 2554-setup-guide commit 256f1056770c67339e93275ab6dc7aaf2c10da0b Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:10:45 2021 +0300 + client: add DNS addresses to the setup guide commit 0ecf91275a16ecc0dca23cae2ae209836fc622d2 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:00:12 2021 +0300 + client: add setup guide tabs commit 137b88e4253af5be32d542adbe74575ef74805c8 Author: Vlad <[email protected]> Date: Thu Jan 21 19:17:58 2021 +0300 Add clients top commit c3318e6932d87fdff5f22d76bee12b49f099129a Merge: 2776276b 021eb22f Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:57 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit 2776276b2e6dc026e1326b02c388fcf7d48d47ff Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:53 2021 +0300 Add top client info commit 021eb22ff877aec12eb7fab60147a2cc2ddd08b7 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 14:13:54 2021 +0300 Merge: client: add sidebar Squashed commit of the following: commit 6885ba953971e68602889fbb3219221f90265421 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:56:55 2021 +0300 add sidebar mask commit f069bfe8cba2b31355e19a51ca00bf774ee9e560 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:03:47 2021 +0300 fix store commit 77c8791002887ae022da07dc264d9010576e7bab Merge: d0a6eff6 ea6d54d4 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:01:04 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit d0a6eff67fd74533d63f5d56382085e98ddbb702 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:47:32 2021 +0300 client: remove unused file commit 9d2424477de85503fe41fa00cc1294cb0c0e7dfa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:39:13 2021 +0300 client: header commit 9ddea19c136f15b184caa72d7e82738f7d4f3f1f Merge: 797f1248 b694bb05 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:57:24 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit 797f1248df5c1ef8e59c2a9999138f9e05a7adaa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:51:57 2021 +0300 client: sidebar ... and 14 more commits </s> remove </s> add if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); const type = `Record<string, ${pType}${isArray ? '[]' : ''}>`; entityClass.addProperty({ name: additionalPropsOnly ? 'data' : `${uncapitalize(pType)}Data`, isReadonly: true, type: type, }); } </s> remove static async mobileConfigDoH(host?: string): Promise<number | Error> { </s> add static async mobileConfigDoH(host?: string, client_id?: string): Promise<number | Error> { </s> remove lastUpdated: string; </s> add last_updated: string; </s> add name?: string; </s> remove import NetInterface, { INetInterface } from './NetInterface'; </s> add import NetInterfaces, { INetInterfaces } from './NetInterfaces'; </s> remove export const reactFormater = (data: (JSX.Element | string)[]) => { if (data.every((d) => typeof d === 'string')) { return data.join(''); } return React.Children.toArray(data); }; </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/generateEntities.ts
keep add keep keep keep keep keep
<mask> <mask> const sortedSProps = Object.keys(sProps || {}).sort(); <mask> // add server response interface to entityFile <mask> sortedSProps.forEach((sPropName) => { <mask> const [ <mask> pType, isArray, isClass, isImport, isAdditional <mask> ] = schemaParamParser(sProps[sPropName], this.openapi); </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6 9cd9054c Author: Vlad <[email protected]> Date: Wed Feb 3 16:01:17 2021 +0300 Merge branch 'master' into new-client-dashboard commit 113743a60665e40383d367dc17fa709dc54e4e2e Author: Vlad <[email protected]> Date: Wed Feb 3 15:45:16 2021 +0300 Remove unneded modal styles commit 04f9d93a9ac17ee046f0d5bedfb2bf5a5e6c0a48 Author: Vlad <[email protected]> Date: Wed Feb 3 14:19:56 2021 +0300 Consider comments commit 78a96cd8fed8b3e03547e7e45724c23db295f67b Author: Vlad <[email protected]> Date: Mon Feb 1 18:46:52 2021 +0300 Remove old params for MiniCssExtractPlugin commit 40e5a9b2b1e04036deb70af17f2719eadd0c9c02 Author: Vlad <[email protected]> Date: Mon Feb 1 18:27:46 2021 +0300 Fix mobile version commit 509cefc308f945b03cafa62bf48257490a0a4be1 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:56 2021 +0300 Remove unneeded imports commit d192f39cd2503b8ec942f00ba78fca02cac9fa60 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:13 2021 +0300 Finish first version of dashboard commit f82429e53d334874ff7dd0641092ec83c66ab61c Merge: fd91a0a3 3e0238aa Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:59 2021 +0300 Merge branch 'master' into new-client-dashboard commit fd91a0a3d76c2a052a6548232b75d151d6065b88 Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:27 2021 +0300 wip commit 237679965052d38acfcd6a72d24b2444cc5b3896 Author: Vlad <[email protected]> Date: Fri Jan 29 11:18:10 2021 +0300 Finish general settings commit 397a7e10efd34a8d31bb175a5a5a7158338388d4 Author: Vlad <[email protected]> Date: Thu Jan 28 19:24:03 2021 +0300 Add General settings page commit 486aaa6f3f9ad66f3a0dcfcccad9a32659767e90 Author: Vlad <[email protected]> Date: Thu Jan 28 14:05:16 2021 +0300 Remove husky commit b895306c0655019ca56ce161e050d83b4e7f5ff1 Merge: a195f1f4 154c9c1c Author: Vlad <[email protected]> Date: Thu Jan 28 14:03:37 2021 +0300 Merge branch 'master' into new-client-dashboard commit a195f1f4d46043d9c53dea08734733f9817b95a0 Merge: c45c5fe9 362f390f Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:18 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit c45c5fe92e6c5c852bec8f512dc46b4cd513156c Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:01 2021 +0300 wip commit 362f390fd3dcfca75633a8d30a2e54c3c30b4f3d Author: Vladislav Abdulmyanov <[email protected]> Date: Wed Jan 27 15:45:12 2021 +0300 Pull request #949: + client: add setup guide page Merge in DNS/adguard-home from 2554-setup-guide to new-client-dashboard Squashed commit of the following: commit c240d52e9e5d90429f2018fde808f4d04ccec138 Merge: 256f1056 137b88e4 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:13:52 2021 +0300 Merge branch 'new-client-dashboard' into 2554-setup-guide commit 256f1056770c67339e93275ab6dc7aaf2c10da0b Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:10:45 2021 +0300 + client: add DNS addresses to the setup guide commit 0ecf91275a16ecc0dca23cae2ae209836fc622d2 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:00:12 2021 +0300 + client: add setup guide tabs commit 137b88e4253af5be32d542adbe74575ef74805c8 Author: Vlad <[email protected]> Date: Thu Jan 21 19:17:58 2021 +0300 Add clients top commit c3318e6932d87fdff5f22d76bee12b49f099129a Merge: 2776276b 021eb22f Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:57 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit 2776276b2e6dc026e1326b02c388fcf7d48d47ff Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:53 2021 +0300 Add top client info commit 021eb22ff877aec12eb7fab60147a2cc2ddd08b7 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 14:13:54 2021 +0300 Merge: client: add sidebar Squashed commit of the following: commit 6885ba953971e68602889fbb3219221f90265421 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:56:55 2021 +0300 add sidebar mask commit f069bfe8cba2b31355e19a51ca00bf774ee9e560 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:03:47 2021 +0300 fix store commit 77c8791002887ae022da07dc264d9010576e7bab Merge: d0a6eff6 ea6d54d4 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:01:04 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit d0a6eff67fd74533d63f5d56382085e98ddbb702 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:47:32 2021 +0300 client: remove unused file commit 9d2424477de85503fe41fa00cc1294cb0c0e7dfa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:39:13 2021 +0300 client: header commit 9ddea19c136f15b184caa72d7e82738f7d4f3f1f Merge: 797f1248 b694bb05 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:57:24 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit 797f1248df5c1ef8e59c2a9999138f9e05a7adaa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:51:57 2021 +0300 client: sidebar ... and 14 more commits </s> add if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); w.writeLine(`this.${additionalPropsOnly ? 'data' : `${uncapitalize(pType)}Data`} = Object.entries(props).reduce<Record<string, ${pType}>>((prev, [key, value]) => {`); if (isClass) { w.writeLine(` prev[key] = new ${pType}(value!);`); } else { w.writeLine(' prev[key] = value!;') } w.writeLine(' return prev;'); w.writeLine('}, {})'); return; } </s> add if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); w.writeLine(`return Object.entries(this.${additionalPropsOnly ? 'data' : `${uncapitalize(pType)}Data`}).reduce<Record<string, ${isClass ? 'I' : ''}${pType}>>((prev, [key, value]) => {`); if (isClass) { w.writeLine(` prev[key] = value.serialize();`); } else { w.writeLine(' prev[key] = value;') } w.writeLine(' return prev;'); w.writeLine('}, {})'); return; } </s> remove </s> add if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); const type = `Record<string, ${pType}${isArray ? '[]' : ''}>`; entityClass.addProperty({ name: additionalPropsOnly ? 'data' : `${uncapitalize(pType)}Data`, isReadonly: true, type: type, }); } </s> add if (additionalPropsOnly) { w.writeLine('return []') return; } </s> remove target: `http://${target.host}:${target.port}`, // target host </s> add target: devHost || `http://${target.host}:${target.port}`, // target host </s> add const devHost = process.env.DEV_HOST
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/generateEntities.ts
keep keep keep keep replace keep keep keep keep keep
<mask> }); <mask> } <mask> } <mask> }); <mask> <mask> // add constructor; <mask> const ctor = entityClass.addConstructor({ <mask> parameters: [{ <mask> name: 'props', <mask> type: `I${sName}`, </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6 9cd9054c Author: Vlad <[email protected]> Date: Wed Feb 3 16:01:17 2021 +0300 Merge branch 'master' into new-client-dashboard commit 113743a60665e40383d367dc17fa709dc54e4e2e Author: Vlad <[email protected]> Date: Wed Feb 3 15:45:16 2021 +0300 Remove unneded modal styles commit 04f9d93a9ac17ee046f0d5bedfb2bf5a5e6c0a48 Author: Vlad <[email protected]> Date: Wed Feb 3 14:19:56 2021 +0300 Consider comments commit 78a96cd8fed8b3e03547e7e45724c23db295f67b Author: Vlad <[email protected]> Date: Mon Feb 1 18:46:52 2021 +0300 Remove old params for MiniCssExtractPlugin commit 40e5a9b2b1e04036deb70af17f2719eadd0c9c02 Author: Vlad <[email protected]> Date: Mon Feb 1 18:27:46 2021 +0300 Fix mobile version commit 509cefc308f945b03cafa62bf48257490a0a4be1 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:56 2021 +0300 Remove unneeded imports commit d192f39cd2503b8ec942f00ba78fca02cac9fa60 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:13 2021 +0300 Finish first version of dashboard commit f82429e53d334874ff7dd0641092ec83c66ab61c Merge: fd91a0a3 3e0238aa Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:59 2021 +0300 Merge branch 'master' into new-client-dashboard commit fd91a0a3d76c2a052a6548232b75d151d6065b88 Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:27 2021 +0300 wip commit 237679965052d38acfcd6a72d24b2444cc5b3896 Author: Vlad <[email protected]> Date: Fri Jan 29 11:18:10 2021 +0300 Finish general settings commit 397a7e10efd34a8d31bb175a5a5a7158338388d4 Author: Vlad <[email protected]> Date: Thu Jan 28 19:24:03 2021 +0300 Add General settings page commit 486aaa6f3f9ad66f3a0dcfcccad9a32659767e90 Author: Vlad <[email protected]> Date: Thu Jan 28 14:05:16 2021 +0300 Remove husky commit b895306c0655019ca56ce161e050d83b4e7f5ff1 Merge: a195f1f4 154c9c1c Author: Vlad <[email protected]> Date: Thu Jan 28 14:03:37 2021 +0300 Merge branch 'master' into new-client-dashboard commit a195f1f4d46043d9c53dea08734733f9817b95a0 Merge: c45c5fe9 362f390f Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:18 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit c45c5fe92e6c5c852bec8f512dc46b4cd513156c Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:01 2021 +0300 wip commit 362f390fd3dcfca75633a8d30a2e54c3c30b4f3d Author: Vladislav Abdulmyanov <[email protected]> Date: Wed Jan 27 15:45:12 2021 +0300 Pull request #949: + client: add setup guide page Merge in DNS/adguard-home from 2554-setup-guide to new-client-dashboard Squashed commit of the following: commit c240d52e9e5d90429f2018fde808f4d04ccec138 Merge: 256f1056 137b88e4 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:13:52 2021 +0300 Merge branch 'new-client-dashboard' into 2554-setup-guide commit 256f1056770c67339e93275ab6dc7aaf2c10da0b Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:10:45 2021 +0300 + client: add DNS addresses to the setup guide commit 0ecf91275a16ecc0dca23cae2ae209836fc622d2 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:00:12 2021 +0300 + client: add setup guide tabs commit 137b88e4253af5be32d542adbe74575ef74805c8 Author: Vlad <[email protected]> Date: Thu Jan 21 19:17:58 2021 +0300 Add clients top commit c3318e6932d87fdff5f22d76bee12b49f099129a Merge: 2776276b 021eb22f Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:57 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit 2776276b2e6dc026e1326b02c388fcf7d48d47ff Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:53 2021 +0300 Add top client info commit 021eb22ff877aec12eb7fab60147a2cc2ddd08b7 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 14:13:54 2021 +0300 Merge: client: add sidebar Squashed commit of the following: commit 6885ba953971e68602889fbb3219221f90265421 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:56:55 2021 +0300 add sidebar mask commit f069bfe8cba2b31355e19a51ca00bf774ee9e560 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:03:47 2021 +0300 fix store commit 77c8791002887ae022da07dc264d9010576e7bab Merge: d0a6eff6 ea6d54d4 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:01:04 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit d0a6eff67fd74533d63f5d56382085e98ddbb702 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:47:32 2021 +0300 client: remove unused file commit 9d2424477de85503fe41fa00cc1294cb0c0e7dfa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:39:13 2021 +0300 client: header commit 9ddea19c136f15b184caa72d7e82738f7d4f3f1f Merge: 797f1248 b694bb05 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:57:24 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit 797f1248df5c1ef8e59c2a9999138f9e05a7adaa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:51:57 2021 +0300 client: sidebar ... and 14 more commits </s> remove type: `Partial<I${sName}>`, </s> add type: additionalPropsOnly ? `I${sName}` : `Partial<I${sName}>`, </s> remove const { properties: sProps, required } = this.schemas[sName]; </s> add const { properties: sProps, required, $ref, additionalProperties } = this.schemas[sName]; if ($ref) { const temp = $ref.split('/'); const importSchemaName = `${temp[temp.length - 1]}`; entityFile.addImportDeclaration({ defaultImport: importSchemaName, moduleSpecifier: `./${importSchemaName}`, namedImports: [`I${importSchemaName}`], }); entityFile.addTypeAlias({ name: `I${sName}`, type: `I${importSchemaName}`, isExported: true, }) entityFile.addStatements(`export default ${importSchemaName};`); this.entities.push(entityFile); return; } </s> remove const validate = { }; const isError: string[] = []; Object.keys(validate).forEach((key) => { if (!(validate as any)[key]) { isError.push(key); } }); return isError; </s> add return [] </s> remove const validate = { }; const isError: string[] = []; Object.keys(validate).forEach((key) => { if (!(validate as any)[key]) { isError.push(key); } }); return isError; </s> add return [] </s> remove update(props: Partial<IWhoisInfo>): WhoisInfo { </s> add update(props: IWhoisInfo): WhoisInfo { </s> remove update(props: Partial<IClientsFindEntry>): ClientsFindEntry { </s> add update(props: IClientsFindEntry): ClientsFindEntry {
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/generateEntities.ts
keep add keep keep keep keep keep
<mask> }); <mask> ctor.setBodyText((w) => { <mask> sortedSProps.forEach((sPropName) => { <mask> const [ <mask> pType, isArray, isClass, , isAdditional <mask> ] = schemaParamParser(sProps[sPropName], this.openapi); <mask> const req = (required && required.includes(sPropName)) </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6 9cd9054c Author: Vlad <[email protected]> Date: Wed Feb 3 16:01:17 2021 +0300 Merge branch 'master' into new-client-dashboard commit 113743a60665e40383d367dc17fa709dc54e4e2e Author: Vlad <[email protected]> Date: Wed Feb 3 15:45:16 2021 +0300 Remove unneded modal styles commit 04f9d93a9ac17ee046f0d5bedfb2bf5a5e6c0a48 Author: Vlad <[email protected]> Date: Wed Feb 3 14:19:56 2021 +0300 Consider comments commit 78a96cd8fed8b3e03547e7e45724c23db295f67b Author: Vlad <[email protected]> Date: Mon Feb 1 18:46:52 2021 +0300 Remove old params for MiniCssExtractPlugin commit 40e5a9b2b1e04036deb70af17f2719eadd0c9c02 Author: Vlad <[email protected]> Date: Mon Feb 1 18:27:46 2021 +0300 Fix mobile version commit 509cefc308f945b03cafa62bf48257490a0a4be1 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:56 2021 +0300 Remove unneeded imports commit d192f39cd2503b8ec942f00ba78fca02cac9fa60 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:13 2021 +0300 Finish first version of dashboard commit f82429e53d334874ff7dd0641092ec83c66ab61c Merge: fd91a0a3 3e0238aa Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:59 2021 +0300 Merge branch 'master' into new-client-dashboard commit fd91a0a3d76c2a052a6548232b75d151d6065b88 Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:27 2021 +0300 wip commit 237679965052d38acfcd6a72d24b2444cc5b3896 Author: Vlad <[email protected]> Date: Fri Jan 29 11:18:10 2021 +0300 Finish general settings commit 397a7e10efd34a8d31bb175a5a5a7158338388d4 Author: Vlad <[email protected]> Date: Thu Jan 28 19:24:03 2021 +0300 Add General settings page commit 486aaa6f3f9ad66f3a0dcfcccad9a32659767e90 Author: Vlad <[email protected]> Date: Thu Jan 28 14:05:16 2021 +0300 Remove husky commit b895306c0655019ca56ce161e050d83b4e7f5ff1 Merge: a195f1f4 154c9c1c Author: Vlad <[email protected]> Date: Thu Jan 28 14:03:37 2021 +0300 Merge branch 'master' into new-client-dashboard commit a195f1f4d46043d9c53dea08734733f9817b95a0 Merge: c45c5fe9 362f390f Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:18 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit c45c5fe92e6c5c852bec8f512dc46b4cd513156c Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:01 2021 +0300 wip commit 362f390fd3dcfca75633a8d30a2e54c3c30b4f3d Author: Vladislav Abdulmyanov <[email protected]> Date: Wed Jan 27 15:45:12 2021 +0300 Pull request #949: + client: add setup guide page Merge in DNS/adguard-home from 2554-setup-guide to new-client-dashboard Squashed commit of the following: commit c240d52e9e5d90429f2018fde808f4d04ccec138 Merge: 256f1056 137b88e4 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:13:52 2021 +0300 Merge branch 'new-client-dashboard' into 2554-setup-guide commit 256f1056770c67339e93275ab6dc7aaf2c10da0b Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:10:45 2021 +0300 + client: add DNS addresses to the setup guide commit 0ecf91275a16ecc0dca23cae2ae209836fc622d2 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:00:12 2021 +0300 + client: add setup guide tabs commit 137b88e4253af5be32d542adbe74575ef74805c8 Author: Vlad <[email protected]> Date: Thu Jan 21 19:17:58 2021 +0300 Add clients top commit c3318e6932d87fdff5f22d76bee12b49f099129a Merge: 2776276b 021eb22f Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:57 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit 2776276b2e6dc026e1326b02c388fcf7d48d47ff Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:53 2021 +0300 Add top client info commit 021eb22ff877aec12eb7fab60147a2cc2ddd08b7 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 14:13:54 2021 +0300 Merge: client: add sidebar Squashed commit of the following: commit 6885ba953971e68602889fbb3219221f90265421 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:56:55 2021 +0300 add sidebar mask commit f069bfe8cba2b31355e19a51ca00bf774ee9e560 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:03:47 2021 +0300 fix store commit 77c8791002887ae022da07dc264d9010576e7bab Merge: d0a6eff6 ea6d54d4 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:01:04 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit d0a6eff67fd74533d63f5d56382085e98ddbb702 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:47:32 2021 +0300 client: remove unused file commit 9d2424477de85503fe41fa00cc1294cb0c0e7dfa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:39:13 2021 +0300 client: header commit 9ddea19c136f15b184caa72d7e82738f7d4f3f1f Merge: 797f1248 b694bb05 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:57:24 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit 797f1248df5c1ef8e59c2a9999138f9e05a7adaa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:51:57 2021 +0300 client: sidebar ... and 14 more commits </s> add if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); w.writeLine(`return Object.entries(this.${additionalPropsOnly ? 'data' : `${uncapitalize(pType)}Data`}).reduce<Record<string, ${isClass ? 'I' : ''}${pType}>>((prev, [key, value]) => {`); if (isClass) { w.writeLine(` prev[key] = value.serialize();`); } else { w.writeLine(' prev[key] = value;') } w.writeLine(' return prev;'); w.writeLine('}, {})'); return; } </s> add const additionalPropsOnly = additionalProperties && sortedSProps.length === 0; </s> remove </s> add if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); const type = `Record<string, ${pType}${isArray ? '[]' : ''}>`; entityClass.addProperty({ name: additionalPropsOnly ? 'data' : `${uncapitalize(pType)}Data`, isReadonly: true, type: type, }); } </s> add if (additionalPropsOnly) { w.writeLine('return []') return; } </s> remove export const reactFormater = (data: (JSX.Element | string)[]) => { if (data.every((d) => typeof d === 'string')) { return data.join(''); } return React.Children.toArray(data); }; </s> add </s> remove const validate = { key: !this._key ? true : typeof this._key === 'string' && !this._key ? true : this._key, }; const isError: string[] = []; Object.keys(validate).forEach((key) => { if (!(validate as any)[key]) { isError.push(key); } }); return isError; </s> add return []
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/generateEntities.ts
keep keep add keep keep keep keep keep keep
<mask> returnType: `I${sName}`, <mask> }); <mask> serialize.setBodyText((w) => { <mask> w.writeLine(`const data: I${sName} = {`); <mask> const unReqFields: string[] = []; <mask> sortedSProps.forEach((sPropName) => { <mask> const req = (required && required.includes(sPropName)) <mask> || sProps[sPropName].required; <mask> const [, isArray, isClass, , isAdditional] = schemaParamParser(sProps[sPropName], this.openapi); </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6 9cd9054c Author: Vlad <[email protected]> Date: Wed Feb 3 16:01:17 2021 +0300 Merge branch 'master' into new-client-dashboard commit 113743a60665e40383d367dc17fa709dc54e4e2e Author: Vlad <[email protected]> Date: Wed Feb 3 15:45:16 2021 +0300 Remove unneded modal styles commit 04f9d93a9ac17ee046f0d5bedfb2bf5a5e6c0a48 Author: Vlad <[email protected]> Date: Wed Feb 3 14:19:56 2021 +0300 Consider comments commit 78a96cd8fed8b3e03547e7e45724c23db295f67b Author: Vlad <[email protected]> Date: Mon Feb 1 18:46:52 2021 +0300 Remove old params for MiniCssExtractPlugin commit 40e5a9b2b1e04036deb70af17f2719eadd0c9c02 Author: Vlad <[email protected]> Date: Mon Feb 1 18:27:46 2021 +0300 Fix mobile version commit 509cefc308f945b03cafa62bf48257490a0a4be1 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:56 2021 +0300 Remove unneeded imports commit d192f39cd2503b8ec942f00ba78fca02cac9fa60 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:13 2021 +0300 Finish first version of dashboard commit f82429e53d334874ff7dd0641092ec83c66ab61c Merge: fd91a0a3 3e0238aa Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:59 2021 +0300 Merge branch 'master' into new-client-dashboard commit fd91a0a3d76c2a052a6548232b75d151d6065b88 Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:27 2021 +0300 wip commit 237679965052d38acfcd6a72d24b2444cc5b3896 Author: Vlad <[email protected]> Date: Fri Jan 29 11:18:10 2021 +0300 Finish general settings commit 397a7e10efd34a8d31bb175a5a5a7158338388d4 Author: Vlad <[email protected]> Date: Thu Jan 28 19:24:03 2021 +0300 Add General settings page commit 486aaa6f3f9ad66f3a0dcfcccad9a32659767e90 Author: Vlad <[email protected]> Date: Thu Jan 28 14:05:16 2021 +0300 Remove husky commit b895306c0655019ca56ce161e050d83b4e7f5ff1 Merge: a195f1f4 154c9c1c Author: Vlad <[email protected]> Date: Thu Jan 28 14:03:37 2021 +0300 Merge branch 'master' into new-client-dashboard commit a195f1f4d46043d9c53dea08734733f9817b95a0 Merge: c45c5fe9 362f390f Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:18 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit c45c5fe92e6c5c852bec8f512dc46b4cd513156c Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:01 2021 +0300 wip commit 362f390fd3dcfca75633a8d30a2e54c3c30b4f3d Author: Vladislav Abdulmyanov <[email protected]> Date: Wed Jan 27 15:45:12 2021 +0300 Pull request #949: + client: add setup guide page Merge in DNS/adguard-home from 2554-setup-guide to new-client-dashboard Squashed commit of the following: commit c240d52e9e5d90429f2018fde808f4d04ccec138 Merge: 256f1056 137b88e4 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:13:52 2021 +0300 Merge branch 'new-client-dashboard' into 2554-setup-guide commit 256f1056770c67339e93275ab6dc7aaf2c10da0b Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:10:45 2021 +0300 + client: add DNS addresses to the setup guide commit 0ecf91275a16ecc0dca23cae2ae209836fc622d2 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:00:12 2021 +0300 + client: add setup guide tabs commit 137b88e4253af5be32d542adbe74575ef74805c8 Author: Vlad <[email protected]> Date: Thu Jan 21 19:17:58 2021 +0300 Add clients top commit c3318e6932d87fdff5f22d76bee12b49f099129a Merge: 2776276b 021eb22f Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:57 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit 2776276b2e6dc026e1326b02c388fcf7d48d47ff Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:53 2021 +0300 Add top client info commit 021eb22ff877aec12eb7fab60147a2cc2ddd08b7 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 14:13:54 2021 +0300 Merge: client: add sidebar Squashed commit of the following: commit 6885ba953971e68602889fbb3219221f90265421 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:56:55 2021 +0300 add sidebar mask commit f069bfe8cba2b31355e19a51ca00bf774ee9e560 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:03:47 2021 +0300 fix store commit 77c8791002887ae022da07dc264d9010576e7bab Merge: d0a6eff6 ea6d54d4 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:01:04 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit d0a6eff67fd74533d63f5d56382085e98ddbb702 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:47:32 2021 +0300 client: remove unused file commit 9d2424477de85503fe41fa00cc1294cb0c0e7dfa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:39:13 2021 +0300 client: header commit 9ddea19c136f15b184caa72d7e82738f7d4f3f1f Merge: 797f1248 b694bb05 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:57:24 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit 797f1248df5c1ef8e59c2a9999138f9e05a7adaa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:51:57 2021 +0300 client: sidebar ... and 14 more commits </s> add if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); w.writeLine(`this.${additionalPropsOnly ? 'data' : `${uncapitalize(pType)}Data`} = Object.entries(props).reduce<Record<string, ${pType}>>((prev, [key, value]) => {`); if (isClass) { w.writeLine(` prev[key] = new ${pType}(value!);`); } else { w.writeLine(' prev[key] = value!;') } w.writeLine(' return prev;'); w.writeLine('}, {})'); return; } </s> add if (additionalPropsOnly) { w.writeLine('return []') return; } </s> add const additionalPropsOnly = additionalProperties && sortedSProps.length === 0; </s> remove </s> add if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); const type = `Record<string, ${pType}${isArray ? '[]' : ''}>`; entityClass.addProperty({ name: additionalPropsOnly ? 'data' : `${uncapitalize(pType)}Data`, isReadonly: true, type: type, }); } </s> remove const validate = { }; const isError: string[] = []; Object.keys(validate).forEach((key) => { if (!(validate as any)[key]) { isError.push(key); } }); return isError; </s> add return [] </s> remove const validate = { }; const isError: string[] = []; Object.keys(validate).forEach((key) => { if (!(validate as any)[key]) { isError.push(key); } }); return isError; </s> add return []
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/generateEntities.ts
keep keep keep add keep keep keep keep
<mask> name: 'validate', <mask> returnType: `string[]`, <mask> }) <mask> validate.setBodyText((w) => { <mask> w.writeLine('const validate = {'); <mask> Object.keys(sProps || {}).forEach((sPropName) => { <mask> const [pType, isArray, isClass, , isAdditional] = schemaParamParser(sProps[sPropName], this.openapi); <mask> </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6 9cd9054c Author: Vlad <[email protected]> Date: Wed Feb 3 16:01:17 2021 +0300 Merge branch 'master' into new-client-dashboard commit 113743a60665e40383d367dc17fa709dc54e4e2e Author: Vlad <[email protected]> Date: Wed Feb 3 15:45:16 2021 +0300 Remove unneded modal styles commit 04f9d93a9ac17ee046f0d5bedfb2bf5a5e6c0a48 Author: Vlad <[email protected]> Date: Wed Feb 3 14:19:56 2021 +0300 Consider comments commit 78a96cd8fed8b3e03547e7e45724c23db295f67b Author: Vlad <[email protected]> Date: Mon Feb 1 18:46:52 2021 +0300 Remove old params for MiniCssExtractPlugin commit 40e5a9b2b1e04036deb70af17f2719eadd0c9c02 Author: Vlad <[email protected]> Date: Mon Feb 1 18:27:46 2021 +0300 Fix mobile version commit 509cefc308f945b03cafa62bf48257490a0a4be1 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:56 2021 +0300 Remove unneeded imports commit d192f39cd2503b8ec942f00ba78fca02cac9fa60 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:13 2021 +0300 Finish first version of dashboard commit f82429e53d334874ff7dd0641092ec83c66ab61c Merge: fd91a0a3 3e0238aa Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:59 2021 +0300 Merge branch 'master' into new-client-dashboard commit fd91a0a3d76c2a052a6548232b75d151d6065b88 Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:27 2021 +0300 wip commit 237679965052d38acfcd6a72d24b2444cc5b3896 Author: Vlad <[email protected]> Date: Fri Jan 29 11:18:10 2021 +0300 Finish general settings commit 397a7e10efd34a8d31bb175a5a5a7158338388d4 Author: Vlad <[email protected]> Date: Thu Jan 28 19:24:03 2021 +0300 Add General settings page commit 486aaa6f3f9ad66f3a0dcfcccad9a32659767e90 Author: Vlad <[email protected]> Date: Thu Jan 28 14:05:16 2021 +0300 Remove husky commit b895306c0655019ca56ce161e050d83b4e7f5ff1 Merge: a195f1f4 154c9c1c Author: Vlad <[email protected]> Date: Thu Jan 28 14:03:37 2021 +0300 Merge branch 'master' into new-client-dashboard commit a195f1f4d46043d9c53dea08734733f9817b95a0 Merge: c45c5fe9 362f390f Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:18 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit c45c5fe92e6c5c852bec8f512dc46b4cd513156c Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:01 2021 +0300 wip commit 362f390fd3dcfca75633a8d30a2e54c3c30b4f3d Author: Vladislav Abdulmyanov <[email protected]> Date: Wed Jan 27 15:45:12 2021 +0300 Pull request #949: + client: add setup guide page Merge in DNS/adguard-home from 2554-setup-guide to new-client-dashboard Squashed commit of the following: commit c240d52e9e5d90429f2018fde808f4d04ccec138 Merge: 256f1056 137b88e4 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:13:52 2021 +0300 Merge branch 'new-client-dashboard' into 2554-setup-guide commit 256f1056770c67339e93275ab6dc7aaf2c10da0b Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:10:45 2021 +0300 + client: add DNS addresses to the setup guide commit 0ecf91275a16ecc0dca23cae2ae209836fc622d2 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:00:12 2021 +0300 + client: add setup guide tabs commit 137b88e4253af5be32d542adbe74575ef74805c8 Author: Vlad <[email protected]> Date: Thu Jan 21 19:17:58 2021 +0300 Add clients top commit c3318e6932d87fdff5f22d76bee12b49f099129a Merge: 2776276b 021eb22f Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:57 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit 2776276b2e6dc026e1326b02c388fcf7d48d47ff Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:53 2021 +0300 Add top client info commit 021eb22ff877aec12eb7fab60147a2cc2ddd08b7 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 14:13:54 2021 +0300 Merge: client: add sidebar Squashed commit of the following: commit 6885ba953971e68602889fbb3219221f90265421 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:56:55 2021 +0300 add sidebar mask commit f069bfe8cba2b31355e19a51ca00bf774ee9e560 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:03:47 2021 +0300 fix store commit 77c8791002887ae022da07dc264d9010576e7bab Merge: d0a6eff6 ea6d54d4 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:01:04 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit d0a6eff67fd74533d63f5d56382085e98ddbb702 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:47:32 2021 +0300 client: remove unused file commit 9d2424477de85503fe41fa00cc1294cb0c0e7dfa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:39:13 2021 +0300 client: header commit 9ddea19c136f15b184caa72d7e82738f7d4f3f1f Merge: 797f1248 b694bb05 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:57:24 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit 797f1248df5c1ef8e59c2a9999138f9e05a7adaa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:51:57 2021 +0300 client: sidebar ... and 14 more commits </s> add if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); w.writeLine(`return Object.entries(this.${additionalPropsOnly ? 'data' : `${uncapitalize(pType)}Data`}).reduce<Record<string, ${isClass ? 'I' : ''}${pType}>>((prev, [key, value]) => {`); if (isClass) { w.writeLine(` prev[key] = value.serialize();`); } else { w.writeLine(' prev[key] = value;') } w.writeLine(' return prev;'); w.writeLine('}, {})'); return; } </s> add const additionalPropsOnly = additionalProperties && sortedSProps.length === 0; </s> add if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); w.writeLine(`this.${additionalPropsOnly ? 'data' : `${uncapitalize(pType)}Data`} = Object.entries(props).reduce<Record<string, ${pType}>>((prev, [key, value]) => {`); if (isClass) { w.writeLine(` prev[key] = new ${pType}(value!);`); } else { w.writeLine(' prev[key] = value!;') } w.writeLine(' return prev;'); w.writeLine('}, {})'); return; } </s> remove </s> add if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); const type = `Record<string, ${pType}${isArray ? '[]' : ''}>`; entityClass.addProperty({ name: additionalPropsOnly ? 'data' : `${uncapitalize(pType)}Data`, isReadonly: true, type: type, }); } </s> remove export const reactFormater = (data: (JSX.Element | string)[]) => { if (data.every((d) => typeof d === 'string')) { return data.join(''); } return React.Children.toArray(data); }; </s> add </s> remove const RadioComponent: FC<AdminInterfaceProps> = observer(({ </s> add const RadioComponent: FC<RadioProps> = observer(({
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/generateEntities.ts
keep keep keep keep replace keep keep keep keep keep
<mask> returnType: `${sName}`, <mask> }); <mask> update.addParameter({ <mask> name: 'props', <mask> type: `Partial<I${sName}>`, <mask> }); <mask> update.setBodyText((w) => { w.writeLine(`return new ${sName}({ ...this.serialize(), ...props });`); }); <mask> <mask> this.entities.push(entityFile); <mask> }; </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6 9cd9054c Author: Vlad <[email protected]> Date: Wed Feb 3 16:01:17 2021 +0300 Merge branch 'master' into new-client-dashboard commit 113743a60665e40383d367dc17fa709dc54e4e2e Author: Vlad <[email protected]> Date: Wed Feb 3 15:45:16 2021 +0300 Remove unneded modal styles commit 04f9d93a9ac17ee046f0d5bedfb2bf5a5e6c0a48 Author: Vlad <[email protected]> Date: Wed Feb 3 14:19:56 2021 +0300 Consider comments commit 78a96cd8fed8b3e03547e7e45724c23db295f67b Author: Vlad <[email protected]> Date: Mon Feb 1 18:46:52 2021 +0300 Remove old params for MiniCssExtractPlugin commit 40e5a9b2b1e04036deb70af17f2719eadd0c9c02 Author: Vlad <[email protected]> Date: Mon Feb 1 18:27:46 2021 +0300 Fix mobile version commit 509cefc308f945b03cafa62bf48257490a0a4be1 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:56 2021 +0300 Remove unneeded imports commit d192f39cd2503b8ec942f00ba78fca02cac9fa60 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:13 2021 +0300 Finish first version of dashboard commit f82429e53d334874ff7dd0641092ec83c66ab61c Merge: fd91a0a3 3e0238aa Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:59 2021 +0300 Merge branch 'master' into new-client-dashboard commit fd91a0a3d76c2a052a6548232b75d151d6065b88 Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:27 2021 +0300 wip commit 237679965052d38acfcd6a72d24b2444cc5b3896 Author: Vlad <[email protected]> Date: Fri Jan 29 11:18:10 2021 +0300 Finish general settings commit 397a7e10efd34a8d31bb175a5a5a7158338388d4 Author: Vlad <[email protected]> Date: Thu Jan 28 19:24:03 2021 +0300 Add General settings page commit 486aaa6f3f9ad66f3a0dcfcccad9a32659767e90 Author: Vlad <[email protected]> Date: Thu Jan 28 14:05:16 2021 +0300 Remove husky commit b895306c0655019ca56ce161e050d83b4e7f5ff1 Merge: a195f1f4 154c9c1c Author: Vlad <[email protected]> Date: Thu Jan 28 14:03:37 2021 +0300 Merge branch 'master' into new-client-dashboard commit a195f1f4d46043d9c53dea08734733f9817b95a0 Merge: c45c5fe9 362f390f Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:18 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit c45c5fe92e6c5c852bec8f512dc46b4cd513156c Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:01 2021 +0300 wip commit 362f390fd3dcfca75633a8d30a2e54c3c30b4f3d Author: Vladislav Abdulmyanov <[email protected]> Date: Wed Jan 27 15:45:12 2021 +0300 Pull request #949: + client: add setup guide page Merge in DNS/adguard-home from 2554-setup-guide to new-client-dashboard Squashed commit of the following: commit c240d52e9e5d90429f2018fde808f4d04ccec138 Merge: 256f1056 137b88e4 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:13:52 2021 +0300 Merge branch 'new-client-dashboard' into 2554-setup-guide commit 256f1056770c67339e93275ab6dc7aaf2c10da0b Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:10:45 2021 +0300 + client: add DNS addresses to the setup guide commit 0ecf91275a16ecc0dca23cae2ae209836fc622d2 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:00:12 2021 +0300 + client: add setup guide tabs commit 137b88e4253af5be32d542adbe74575ef74805c8 Author: Vlad <[email protected]> Date: Thu Jan 21 19:17:58 2021 +0300 Add clients top commit c3318e6932d87fdff5f22d76bee12b49f099129a Merge: 2776276b 021eb22f Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:57 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit 2776276b2e6dc026e1326b02c388fcf7d48d47ff Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:53 2021 +0300 Add top client info commit 021eb22ff877aec12eb7fab60147a2cc2ddd08b7 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 14:13:54 2021 +0300 Merge: client: add sidebar Squashed commit of the following: commit 6885ba953971e68602889fbb3219221f90265421 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:56:55 2021 +0300 add sidebar mask commit f069bfe8cba2b31355e19a51ca00bf774ee9e560 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:03:47 2021 +0300 fix store commit 77c8791002887ae022da07dc264d9010576e7bab Merge: d0a6eff6 ea6d54d4 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:01:04 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit d0a6eff67fd74533d63f5d56382085e98ddbb702 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:47:32 2021 +0300 client: remove unused file commit 9d2424477de85503fe41fa00cc1294cb0c0e7dfa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:39:13 2021 +0300 client: header commit 9ddea19c136f15b184caa72d7e82738f7d4f3f1f Merge: 797f1248 b694bb05 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:57:24 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit 797f1248df5c1ef8e59c2a9999138f9e05a7adaa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:51:57 2021 +0300 client: sidebar ... and 14 more commits </s> remove update(props: Partial<IClientsFindEntry>): ClientsFindEntry { </s> add update(props: IClientsFindEntry): ClientsFindEntry { </s> remove update(props: Partial<IUpstreamsConfigResponse>): UpstreamsConfigResponse { </s> add update(props: IUpstreamsConfigResponse): UpstreamsConfigResponse { </s> remove update(props: Partial<IWhoisInfo>): WhoisInfo { </s> add update(props: IWhoisInfo): WhoisInfo { </s> remove </s> add if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); const type = `Record<string, ${pType}${isArray ? '[]' : ''}>`; entityClass.addProperty({ name: additionalPropsOnly ? 'data' : `${uncapitalize(pType)}Data`, isReadonly: true, type: type, }); } </s> remove const validate = { }; const isError: string[] = []; Object.keys(validate).forEach((key) => { if (!(validate as any)[key]) { isError.push(key); } }); return isError; </s> add return [] </s> remove const validate = { }; const isError: string[] = []; Object.keys(validate).forEach((key) => { if (!(validate as any)[key]) { isError.push(key); } }); return isError; </s> add return []
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/generateEntities.ts
keep keep keep add keep keep keep keep keep keep
<mask> }; <mask> const capitalize = (s: string) => { <mask> return s[0].toUpperCase() + s.slice(1); <mask> }; <mask> const TYPES = { <mask> integer: 'number', <mask> float: 'number', <mask> number: 'number', <mask> string: 'string', <mask> boolean: 'boolean', </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6 9cd9054c Author: Vlad <[email protected]> Date: Wed Feb 3 16:01:17 2021 +0300 Merge branch 'master' into new-client-dashboard commit 113743a60665e40383d367dc17fa709dc54e4e2e Author: Vlad <[email protected]> Date: Wed Feb 3 15:45:16 2021 +0300 Remove unneded modal styles commit 04f9d93a9ac17ee046f0d5bedfb2bf5a5e6c0a48 Author: Vlad <[email protected]> Date: Wed Feb 3 14:19:56 2021 +0300 Consider comments commit 78a96cd8fed8b3e03547e7e45724c23db295f67b Author: Vlad <[email protected]> Date: Mon Feb 1 18:46:52 2021 +0300 Remove old params for MiniCssExtractPlugin commit 40e5a9b2b1e04036deb70af17f2719eadd0c9c02 Author: Vlad <[email protected]> Date: Mon Feb 1 18:27:46 2021 +0300 Fix mobile version commit 509cefc308f945b03cafa62bf48257490a0a4be1 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:56 2021 +0300 Remove unneeded imports commit d192f39cd2503b8ec942f00ba78fca02cac9fa60 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:13 2021 +0300 Finish first version of dashboard commit f82429e53d334874ff7dd0641092ec83c66ab61c Merge: fd91a0a3 3e0238aa Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:59 2021 +0300 Merge branch 'master' into new-client-dashboard commit fd91a0a3d76c2a052a6548232b75d151d6065b88 Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:27 2021 +0300 wip commit 237679965052d38acfcd6a72d24b2444cc5b3896 Author: Vlad <[email protected]> Date: Fri Jan 29 11:18:10 2021 +0300 Finish general settings commit 397a7e10efd34a8d31bb175a5a5a7158338388d4 Author: Vlad <[email protected]> Date: Thu Jan 28 19:24:03 2021 +0300 Add General settings page commit 486aaa6f3f9ad66f3a0dcfcccad9a32659767e90 Author: Vlad <[email protected]> Date: Thu Jan 28 14:05:16 2021 +0300 Remove husky commit b895306c0655019ca56ce161e050d83b4e7f5ff1 Merge: a195f1f4 154c9c1c Author: Vlad <[email protected]> Date: Thu Jan 28 14:03:37 2021 +0300 Merge branch 'master' into new-client-dashboard commit a195f1f4d46043d9c53dea08734733f9817b95a0 Merge: c45c5fe9 362f390f Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:18 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit c45c5fe92e6c5c852bec8f512dc46b4cd513156c Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:01 2021 +0300 wip commit 362f390fd3dcfca75633a8d30a2e54c3c30b4f3d Author: Vladislav Abdulmyanov <[email protected]> Date: Wed Jan 27 15:45:12 2021 +0300 Pull request #949: + client: add setup guide page Merge in DNS/adguard-home from 2554-setup-guide to new-client-dashboard Squashed commit of the following: commit c240d52e9e5d90429f2018fde808f4d04ccec138 Merge: 256f1056 137b88e4 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:13:52 2021 +0300 Merge branch 'new-client-dashboard' into 2554-setup-guide commit 256f1056770c67339e93275ab6dc7aaf2c10da0b Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:10:45 2021 +0300 + client: add DNS addresses to the setup guide commit 0ecf91275a16ecc0dca23cae2ae209836fc622d2 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:00:12 2021 +0300 + client: add setup guide tabs commit 137b88e4253af5be32d542adbe74575ef74805c8 Author: Vlad <[email protected]> Date: Thu Jan 21 19:17:58 2021 +0300 Add clients top commit c3318e6932d87fdff5f22d76bee12b49f099129a Merge: 2776276b 021eb22f Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:57 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit 2776276b2e6dc026e1326b02c388fcf7d48d47ff Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:53 2021 +0300 Add top client info commit 021eb22ff877aec12eb7fab60147a2cc2ddd08b7 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 14:13:54 2021 +0300 Merge: client: add sidebar Squashed commit of the following: commit 6885ba953971e68602889fbb3219221f90265421 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:56:55 2021 +0300 add sidebar mask commit f069bfe8cba2b31355e19a51ca00bf774ee9e560 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:03:47 2021 +0300 fix store commit 77c8791002887ae022da07dc264d9010576e7bab Merge: d0a6eff6 ea6d54d4 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:01:04 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit d0a6eff67fd74533d63f5d56382085e98ddbb702 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:47:32 2021 +0300 client: remove unused file commit 9d2424477de85503fe41fa00cc1294cb0c0e7dfa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:39:13 2021 +0300 client: header commit 9ddea19c136f15b184caa72d7e82738f7d4f3f1f Merge: 797f1248 b694bb05 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:57:24 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit 797f1248df5c1ef8e59c2a9999138f9e05a7adaa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:51:57 2021 +0300 client: sidebar ... and 14 more commits </s> add interfaces: this._interfaces.validate().length === 0, </s> remove rulesCount: typeof this._rulesCount === 'number', </s> add rules_count: typeof this._rules_count === 'number', </s> remove const data: ITopArrayEntry = { }; if (typeof this._domain_or_ip !== 'undefined') { data.domain_or_ip = this._domain_or_ip; } return data; </s> add return Object.entries(this.numberData).reduce<Record<string, number>>((prev, [key, value]) => { prev[key] = value; return prev; }, {}) </s> remove lastUpdated: typeof this._lastUpdated === 'string' && !this._lastUpdated ? true : this._lastUpdated, </s> add last_updated: typeof this._last_updated === 'string' && !this._last_updated ? true : this._last_updated, </s> remove const data: IClientsFindEntry = { }; return data; </s> add return Object.entries(this.data).reduce<Record<string, IClientFindSubEntry>>((prev, [key, value]) => { prev[key] = value.serialize(); return prev; }, {}) </s> remove const data: IUpstreamsConfigResponse = { }; return data; </s> add return Object.entries(this.data).reduce<Record<string, string>>((prev, [key, value]) => { prev[key] = value; return prev; }, {})
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/utils.ts
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> <mask> type = `${temp[temp.length - 1]}`; <mask> <mask> const cl = openApi ? openApi.components.schemas[temp[temp.length - 1]] : {}; <mask> <mask> if (cl.type === 'string' && cl.enum) { <mask> isImport = true; <mask> } <mask> </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6 9cd9054c Author: Vlad <[email protected]> Date: Wed Feb 3 16:01:17 2021 +0300 Merge branch 'master' into new-client-dashboard commit 113743a60665e40383d367dc17fa709dc54e4e2e Author: Vlad <[email protected]> Date: Wed Feb 3 15:45:16 2021 +0300 Remove unneded modal styles commit 04f9d93a9ac17ee046f0d5bedfb2bf5a5e6c0a48 Author: Vlad <[email protected]> Date: Wed Feb 3 14:19:56 2021 +0300 Consider comments commit 78a96cd8fed8b3e03547e7e45724c23db295f67b Author: Vlad <[email protected]> Date: Mon Feb 1 18:46:52 2021 +0300 Remove old params for MiniCssExtractPlugin commit 40e5a9b2b1e04036deb70af17f2719eadd0c9c02 Author: Vlad <[email protected]> Date: Mon Feb 1 18:27:46 2021 +0300 Fix mobile version commit 509cefc308f945b03cafa62bf48257490a0a4be1 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:56 2021 +0300 Remove unneeded imports commit d192f39cd2503b8ec942f00ba78fca02cac9fa60 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:13 2021 +0300 Finish first version of dashboard commit f82429e53d334874ff7dd0641092ec83c66ab61c Merge: fd91a0a3 3e0238aa Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:59 2021 +0300 Merge branch 'master' into new-client-dashboard commit fd91a0a3d76c2a052a6548232b75d151d6065b88 Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:27 2021 +0300 wip commit 237679965052d38acfcd6a72d24b2444cc5b3896 Author: Vlad <[email protected]> Date: Fri Jan 29 11:18:10 2021 +0300 Finish general settings commit 397a7e10efd34a8d31bb175a5a5a7158338388d4 Author: Vlad <[email protected]> Date: Thu Jan 28 19:24:03 2021 +0300 Add General settings page commit 486aaa6f3f9ad66f3a0dcfcccad9a32659767e90 Author: Vlad <[email protected]> Date: Thu Jan 28 14:05:16 2021 +0300 Remove husky commit b895306c0655019ca56ce161e050d83b4e7f5ff1 Merge: a195f1f4 154c9c1c Author: Vlad <[email protected]> Date: Thu Jan 28 14:03:37 2021 +0300 Merge branch 'master' into new-client-dashboard commit a195f1f4d46043d9c53dea08734733f9817b95a0 Merge: c45c5fe9 362f390f Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:18 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit c45c5fe92e6c5c852bec8f512dc46b4cd513156c Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:01 2021 +0300 wip commit 362f390fd3dcfca75633a8d30a2e54c3c30b4f3d Author: Vladislav Abdulmyanov <[email protected]> Date: Wed Jan 27 15:45:12 2021 +0300 Pull request #949: + client: add setup guide page Merge in DNS/adguard-home from 2554-setup-guide to new-client-dashboard Squashed commit of the following: commit c240d52e9e5d90429f2018fde808f4d04ccec138 Merge: 256f1056 137b88e4 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:13:52 2021 +0300 Merge branch 'new-client-dashboard' into 2554-setup-guide commit 256f1056770c67339e93275ab6dc7aaf2c10da0b Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:10:45 2021 +0300 + client: add DNS addresses to the setup guide commit 0ecf91275a16ecc0dca23cae2ae209836fc622d2 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:00:12 2021 +0300 + client: add setup guide tabs commit 137b88e4253af5be32d542adbe74575ef74805c8 Author: Vlad <[email protected]> Date: Thu Jan 21 19:17:58 2021 +0300 Add clients top commit c3318e6932d87fdff5f22d76bee12b49f099129a Merge: 2776276b 021eb22f Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:57 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit 2776276b2e6dc026e1326b02c388fcf7d48d47ff Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:53 2021 +0300 Add top client info commit 021eb22ff877aec12eb7fab60147a2cc2ddd08b7 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 14:13:54 2021 +0300 Merge: client: add sidebar Squashed commit of the following: commit 6885ba953971e68602889fbb3219221f90265421 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:56:55 2021 +0300 add sidebar mask commit f069bfe8cba2b31355e19a51ca00bf774ee9e560 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:03:47 2021 +0300 fix store commit 77c8791002887ae022da07dc264d9010576e7bab Merge: d0a6eff6 ea6d54d4 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:01:04 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit d0a6eff67fd74533d63f5d56382085e98ddbb702 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:47:32 2021 +0300 client: remove unused file commit 9d2424477de85503fe41fa00cc1294cb0c0e7dfa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:39:13 2021 +0300 client: header commit 9ddea19c136f15b184caa72d7e82738f7d4f3f1f Merge: 797f1248 b694bb05 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:57:24 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit 797f1248df5c1ef8e59c2a9999138f9e05a7adaa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:51:57 2021 +0300 client: sidebar ... and 14 more commits </s> remove username: !this._username ? true : typeof this._username === 'string' && !this._username ? true : this._username, </s> add name: !this._name ? true : typeof this._name === 'string' && !this._name ? true : this._name, </s> remove const { properties: sProps, required } = this.schemas[sName]; </s> add const { properties: sProps, required, $ref, additionalProperties } = this.schemas[sName]; if ($ref) { const temp = $ref.split('/'); const importSchemaName = `${temp[temp.length - 1]}`; entityFile.addImportDeclaration({ defaultImport: importSchemaName, moduleSpecifier: `./${importSchemaName}`, namedImports: [`I${importSchemaName}`], }); entityFile.addTypeAlias({ name: `I${sName}`, type: `I${importSchemaName}`, isExported: true, }) entityFile.addStatements(`export default ${importSchemaName};`); this.entities.push(entityFile); return; } </s> remove const data: IWhoisInfo = { }; if (typeof this._key !== 'undefined') { data.key = this._key; } return data; </s> add return Object.entries(this.data).reduce<Record<string, string>>((prev, [key, value]) => { prev[key] = value; return prev; }, {}) </s> remove const validate = { key: !this._key ? true : typeof this._key === 'string' && !this._key ? true : this._key, }; const isError: string[] = []; Object.keys(validate).forEach((key) => { if (!(validate as any)[key]) { isError.push(key); } }); return isError; </s> add return [] </s> remove lastUpdated: typeof this._lastUpdated === 'string' && !this._lastUpdated ? true : this._lastUpdated, </s> add last_updated: typeof this._last_updated === 'string' && !this._last_updated ? true : this._last_updated, </s> add disabled: typeof this._disabled === 'boolean',
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/utils.ts
keep keep keep keep replace
<mask> <mask> return [type, isArray, isClass, isImport, isAdditional]; <mask> }; <mask> <mask> export { TYPES, toCamel, capitalize, schemaParamParser }; </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6 9cd9054c Author: Vlad <[email protected]> Date: Wed Feb 3 16:01:17 2021 +0300 Merge branch 'master' into new-client-dashboard commit 113743a60665e40383d367dc17fa709dc54e4e2e Author: Vlad <[email protected]> Date: Wed Feb 3 15:45:16 2021 +0300 Remove unneded modal styles commit 04f9d93a9ac17ee046f0d5bedfb2bf5a5e6c0a48 Author: Vlad <[email protected]> Date: Wed Feb 3 14:19:56 2021 +0300 Consider comments commit 78a96cd8fed8b3e03547e7e45724c23db295f67b Author: Vlad <[email protected]> Date: Mon Feb 1 18:46:52 2021 +0300 Remove old params for MiniCssExtractPlugin commit 40e5a9b2b1e04036deb70af17f2719eadd0c9c02 Author: Vlad <[email protected]> Date: Mon Feb 1 18:27:46 2021 +0300 Fix mobile version commit 509cefc308f945b03cafa62bf48257490a0a4be1 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:56 2021 +0300 Remove unneeded imports commit d192f39cd2503b8ec942f00ba78fca02cac9fa60 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:13 2021 +0300 Finish first version of dashboard commit f82429e53d334874ff7dd0641092ec83c66ab61c Merge: fd91a0a3 3e0238aa Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:59 2021 +0300 Merge branch 'master' into new-client-dashboard commit fd91a0a3d76c2a052a6548232b75d151d6065b88 Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:27 2021 +0300 wip commit 237679965052d38acfcd6a72d24b2444cc5b3896 Author: Vlad <[email protected]> Date: Fri Jan 29 11:18:10 2021 +0300 Finish general settings commit 397a7e10efd34a8d31bb175a5a5a7158338388d4 Author: Vlad <[email protected]> Date: Thu Jan 28 19:24:03 2021 +0300 Add General settings page commit 486aaa6f3f9ad66f3a0dcfcccad9a32659767e90 Author: Vlad <[email protected]> Date: Thu Jan 28 14:05:16 2021 +0300 Remove husky commit b895306c0655019ca56ce161e050d83b4e7f5ff1 Merge: a195f1f4 154c9c1c Author: Vlad <[email protected]> Date: Thu Jan 28 14:03:37 2021 +0300 Merge branch 'master' into new-client-dashboard commit a195f1f4d46043d9c53dea08734733f9817b95a0 Merge: c45c5fe9 362f390f Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:18 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit c45c5fe92e6c5c852bec8f512dc46b4cd513156c Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:01 2021 +0300 wip commit 362f390fd3dcfca75633a8d30a2e54c3c30b4f3d Author: Vladislav Abdulmyanov <[email protected]> Date: Wed Jan 27 15:45:12 2021 +0300 Pull request #949: + client: add setup guide page Merge in DNS/adguard-home from 2554-setup-guide to new-client-dashboard Squashed commit of the following: commit c240d52e9e5d90429f2018fde808f4d04ccec138 Merge: 256f1056 137b88e4 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:13:52 2021 +0300 Merge branch 'new-client-dashboard' into 2554-setup-guide commit 256f1056770c67339e93275ab6dc7aaf2c10da0b Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:10:45 2021 +0300 + client: add DNS addresses to the setup guide commit 0ecf91275a16ecc0dca23cae2ae209836fc622d2 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:00:12 2021 +0300 + client: add setup guide tabs commit 137b88e4253af5be32d542adbe74575ef74805c8 Author: Vlad <[email protected]> Date: Thu Jan 21 19:17:58 2021 +0300 Add clients top commit c3318e6932d87fdff5f22d76bee12b49f099129a Merge: 2776276b 021eb22f Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:57 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit 2776276b2e6dc026e1326b02c388fcf7d48d47ff Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:53 2021 +0300 Add top client info commit 021eb22ff877aec12eb7fab60147a2cc2ddd08b7 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 14:13:54 2021 +0300 Merge: client: add sidebar Squashed commit of the following: commit 6885ba953971e68602889fbb3219221f90265421 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:56:55 2021 +0300 add sidebar mask commit f069bfe8cba2b31355e19a51ca00bf774ee9e560 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:03:47 2021 +0300 fix store commit 77c8791002887ae022da07dc264d9010576e7bab Merge: d0a6eff6 ea6d54d4 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:01:04 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit d0a6eff67fd74533d63f5d56382085e98ddbb702 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:47:32 2021 +0300 client: remove unused file commit 9d2424477de85503fe41fa00cc1294cb0c0e7dfa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:39:13 2021 +0300 client: header commit 9ddea19c136f15b184caa72d7e82738f7d4f3f1f Merge: 797f1248 b694bb05 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:57:24 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit 797f1248df5c1ef8e59c2a9999138f9e05a7adaa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:51:57 2021 +0300 client: sidebar ... and 14 more commits </s> remove import { TYPES, toCamel, schemaParamParser } from './utils'; </s> add import { TYPES, toCamel, schemaParamParser, uncapitalize } from './utils'; </s> add if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); w.writeLine(`this.${additionalPropsOnly ? 'data' : `${uncapitalize(pType)}Data`} = Object.entries(props).reduce<Record<string, ${pType}>>((prev, [key, value]) => {`); if (isClass) { w.writeLine(` prev[key] = new ${pType}(value!);`); } else { w.writeLine(' prev[key] = value!;') } w.writeLine(' return prev;'); w.writeLine('}, {})'); return; } </s> add const additionalPropsOnly = additionalProperties && sortedSProps.length === 0; </s> add if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); w.writeLine(`return Object.entries(this.${additionalPropsOnly ? 'data' : `${uncapitalize(pType)}Data`}).reduce<Record<string, ${isClass ? 'I' : ''}${pType}>>((prev, [key, value]) => {`); if (isClass) { w.writeLine(` prev[key] = value.serialize();`); } else { w.writeLine(' prev[key] = value;') } w.writeLine(' return prev;'); w.writeLine('}, {})'); return; } </s> remove </s> add if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); const type = `Record<string, ${pType}${isArray ? '[]' : ''}>`; entityClass.addProperty({ name: additionalPropsOnly ? 'data' : `${uncapitalize(pType)}Data`, isReadonly: true, type: type, }); } </s> add if (additionalPropsOnly) { w.writeLine('return []') return; }
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/utils.ts
keep keep keep add keep keep keep keep keep keep
<mask> <mask> const { getDevServerConfig } = require('./helpers'); <mask> const baseConfig = require('./webpack.config.base'); <mask> <mask> const target = getDevServerConfig(); <mask> <mask> const options = { <mask> target: devHost || `http://${target.host}:${target.port}`, // target host <mask> changeOrigin: true, // needed for virtual hosted sites <mask> }; </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6 9cd9054c Author: Vlad <[email protected]> Date: Wed Feb 3 16:01:17 2021 +0300 Merge branch 'master' into new-client-dashboard commit 113743a60665e40383d367dc17fa709dc54e4e2e Author: Vlad <[email protected]> Date: Wed Feb 3 15:45:16 2021 +0300 Remove unneded modal styles commit 04f9d93a9ac17ee046f0d5bedfb2bf5a5e6c0a48 Author: Vlad <[email protected]> Date: Wed Feb 3 14:19:56 2021 +0300 Consider comments commit 78a96cd8fed8b3e03547e7e45724c23db295f67b Author: Vlad <[email protected]> Date: Mon Feb 1 18:46:52 2021 +0300 Remove old params for MiniCssExtractPlugin commit 40e5a9b2b1e04036deb70af17f2719eadd0c9c02 Author: Vlad <[email protected]> Date: Mon Feb 1 18:27:46 2021 +0300 Fix mobile version commit 509cefc308f945b03cafa62bf48257490a0a4be1 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:56 2021 +0300 Remove unneeded imports commit d192f39cd2503b8ec942f00ba78fca02cac9fa60 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:13 2021 +0300 Finish first version of dashboard commit f82429e53d334874ff7dd0641092ec83c66ab61c Merge: fd91a0a3 3e0238aa Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:59 2021 +0300 Merge branch 'master' into new-client-dashboard commit fd91a0a3d76c2a052a6548232b75d151d6065b88 Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:27 2021 +0300 wip commit 237679965052d38acfcd6a72d24b2444cc5b3896 Author: Vlad <[email protected]> Date: Fri Jan 29 11:18:10 2021 +0300 Finish general settings commit 397a7e10efd34a8d31bb175a5a5a7158338388d4 Author: Vlad <[email protected]> Date: Thu Jan 28 19:24:03 2021 +0300 Add General settings page commit 486aaa6f3f9ad66f3a0dcfcccad9a32659767e90 Author: Vlad <[email protected]> Date: Thu Jan 28 14:05:16 2021 +0300 Remove husky commit b895306c0655019ca56ce161e050d83b4e7f5ff1 Merge: a195f1f4 154c9c1c Author: Vlad <[email protected]> Date: Thu Jan 28 14:03:37 2021 +0300 Merge branch 'master' into new-client-dashboard commit a195f1f4d46043d9c53dea08734733f9817b95a0 Merge: c45c5fe9 362f390f Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:18 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit c45c5fe92e6c5c852bec8f512dc46b4cd513156c Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:01 2021 +0300 wip commit 362f390fd3dcfca75633a8d30a2e54c3c30b4f3d Author: Vladislav Abdulmyanov <[email protected]> Date: Wed Jan 27 15:45:12 2021 +0300 Pull request #949: + client: add setup guide page Merge in DNS/adguard-home from 2554-setup-guide to new-client-dashboard Squashed commit of the following: commit c240d52e9e5d90429f2018fde808f4d04ccec138 Merge: 256f1056 137b88e4 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:13:52 2021 +0300 Merge branch 'new-client-dashboard' into 2554-setup-guide commit 256f1056770c67339e93275ab6dc7aaf2c10da0b Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:10:45 2021 +0300 + client: add DNS addresses to the setup guide commit 0ecf91275a16ecc0dca23cae2ae209836fc622d2 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:00:12 2021 +0300 + client: add setup guide tabs commit 137b88e4253af5be32d542adbe74575ef74805c8 Author: Vlad <[email protected]> Date: Thu Jan 21 19:17:58 2021 +0300 Add clients top commit c3318e6932d87fdff5f22d76bee12b49f099129a Merge: 2776276b 021eb22f Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:57 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit 2776276b2e6dc026e1326b02c388fcf7d48d47ff Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:53 2021 +0300 Add top client info commit 021eb22ff877aec12eb7fab60147a2cc2ddd08b7 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 14:13:54 2021 +0300 Merge: client: add sidebar Squashed commit of the following: commit 6885ba953971e68602889fbb3219221f90265421 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:56:55 2021 +0300 add sidebar mask commit f069bfe8cba2b31355e19a51ca00bf774ee9e560 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:03:47 2021 +0300 fix store commit 77c8791002887ae022da07dc264d9010576e7bab Merge: d0a6eff6 ea6d54d4 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:01:04 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit d0a6eff67fd74533d63f5d56382085e98ddbb702 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:47:32 2021 +0300 client: remove unused file commit 9d2424477de85503fe41fa00cc1294cb0c0e7dfa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:39:13 2021 +0300 client: header commit 9ddea19c136f15b184caa72d7e82738f7d4f3f1f Merge: 797f1248 b694bb05 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:57:24 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit 797f1248df5c1ef8e59c2a9999138f9e05a7adaa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:51:57 2021 +0300 client: sidebar ... and 14 more commits </s> remove target: `http://${target.host}:${target.port}`, // target host </s> add target: devHost || `http://${target.host}:${target.port}`, // target host </s> add const additionalPropsOnly = additionalProperties && sortedSProps.length === 0; </s> remove </s> add if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); const type = `Record<string, ${pType}${isArray ? '[]' : ''}>`; entityClass.addProperty({ name: additionalPropsOnly ? 'data' : `${uncapitalize(pType)}Data`, isReadonly: true, type: type, }); } </s> remove const { properties: sProps, required } = this.schemas[sName]; </s> add const { properties: sProps, required, $ref, additionalProperties } = this.schemas[sName]; if ($ref) { const temp = $ref.split('/'); const importSchemaName = `${temp[temp.length - 1]}`; entityFile.addImportDeclaration({ defaultImport: importSchemaName, moduleSpecifier: `./${importSchemaName}`, namedImports: [`I${importSchemaName}`], }); entityFile.addTypeAlias({ name: `I${sName}`, type: `I${importSchemaName}`, isExported: true, }) entityFile.addStatements(`export default ${importSchemaName};`); this.entities.push(entityFile); return; } </s> remove import { TYPES, toCamel, schemaParamParser } from './utils'; </s> add import { TYPES, toCamel, schemaParamParser, uncapitalize } from './utils'; </s> add // TODO get languages and default locale from .twosky file
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/webpack/webpack.config.dev.js
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> const target = getDevServerConfig(); <mask> <mask> const options = { <mask> target: `http://${target.host}:${target.port}`, // target host <mask> changeOrigin: true, // needed for virtual hosted sites <mask> }; <mask> const apiProxy = proxy.createProxyMiddleware(options); <mask> <mask> module.exports = merge(baseConfig, { </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6 9cd9054c Author: Vlad <[email protected]> Date: Wed Feb 3 16:01:17 2021 +0300 Merge branch 'master' into new-client-dashboard commit 113743a60665e40383d367dc17fa709dc54e4e2e Author: Vlad <[email protected]> Date: Wed Feb 3 15:45:16 2021 +0300 Remove unneded modal styles commit 04f9d93a9ac17ee046f0d5bedfb2bf5a5e6c0a48 Author: Vlad <[email protected]> Date: Wed Feb 3 14:19:56 2021 +0300 Consider comments commit 78a96cd8fed8b3e03547e7e45724c23db295f67b Author: Vlad <[email protected]> Date: Mon Feb 1 18:46:52 2021 +0300 Remove old params for MiniCssExtractPlugin commit 40e5a9b2b1e04036deb70af17f2719eadd0c9c02 Author: Vlad <[email protected]> Date: Mon Feb 1 18:27:46 2021 +0300 Fix mobile version commit 509cefc308f945b03cafa62bf48257490a0a4be1 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:56 2021 +0300 Remove unneeded imports commit d192f39cd2503b8ec942f00ba78fca02cac9fa60 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:13 2021 +0300 Finish first version of dashboard commit f82429e53d334874ff7dd0641092ec83c66ab61c Merge: fd91a0a3 3e0238aa Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:59 2021 +0300 Merge branch 'master' into new-client-dashboard commit fd91a0a3d76c2a052a6548232b75d151d6065b88 Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:27 2021 +0300 wip commit 237679965052d38acfcd6a72d24b2444cc5b3896 Author: Vlad <[email protected]> Date: Fri Jan 29 11:18:10 2021 +0300 Finish general settings commit 397a7e10efd34a8d31bb175a5a5a7158338388d4 Author: Vlad <[email protected]> Date: Thu Jan 28 19:24:03 2021 +0300 Add General settings page commit 486aaa6f3f9ad66f3a0dcfcccad9a32659767e90 Author: Vlad <[email protected]> Date: Thu Jan 28 14:05:16 2021 +0300 Remove husky commit b895306c0655019ca56ce161e050d83b4e7f5ff1 Merge: a195f1f4 154c9c1c Author: Vlad <[email protected]> Date: Thu Jan 28 14:03:37 2021 +0300 Merge branch 'master' into new-client-dashboard commit a195f1f4d46043d9c53dea08734733f9817b95a0 Merge: c45c5fe9 362f390f Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:18 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit c45c5fe92e6c5c852bec8f512dc46b4cd513156c Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:01 2021 +0300 wip commit 362f390fd3dcfca75633a8d30a2e54c3c30b4f3d Author: Vladislav Abdulmyanov <[email protected]> Date: Wed Jan 27 15:45:12 2021 +0300 Pull request #949: + client: add setup guide page Merge in DNS/adguard-home from 2554-setup-guide to new-client-dashboard Squashed commit of the following: commit c240d52e9e5d90429f2018fde808f4d04ccec138 Merge: 256f1056 137b88e4 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:13:52 2021 +0300 Merge branch 'new-client-dashboard' into 2554-setup-guide commit 256f1056770c67339e93275ab6dc7aaf2c10da0b Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:10:45 2021 +0300 + client: add DNS addresses to the setup guide commit 0ecf91275a16ecc0dca23cae2ae209836fc622d2 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:00:12 2021 +0300 + client: add setup guide tabs commit 137b88e4253af5be32d542adbe74575ef74805c8 Author: Vlad <[email protected]> Date: Thu Jan 21 19:17:58 2021 +0300 Add clients top commit c3318e6932d87fdff5f22d76bee12b49f099129a Merge: 2776276b 021eb22f Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:57 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit 2776276b2e6dc026e1326b02c388fcf7d48d47ff Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:53 2021 +0300 Add top client info commit 021eb22ff877aec12eb7fab60147a2cc2ddd08b7 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 14:13:54 2021 +0300 Merge: client: add sidebar Squashed commit of the following: commit 6885ba953971e68602889fbb3219221f90265421 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:56:55 2021 +0300 add sidebar mask commit f069bfe8cba2b31355e19a51ca00bf774ee9e560 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:03:47 2021 +0300 fix store commit 77c8791002887ae022da07dc264d9010576e7bab Merge: d0a6eff6 ea6d54d4 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:01:04 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit d0a6eff67fd74533d63f5d56382085e98ddbb702 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:47:32 2021 +0300 client: remove unused file commit 9d2424477de85503fe41fa00cc1294cb0c0e7dfa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:39:13 2021 +0300 client: header commit 9ddea19c136f15b184caa72d7e82738f7d4f3f1f Merge: 797f1248 b694bb05 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:57:24 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit 797f1248df5c1ef8e59c2a9999138f9e05a7adaa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:51:57 2021 +0300 client: sidebar ... and 14 more commits </s> add const devHost = process.env.DEV_HOST </s> add // TODO get languages and default locale from .twosky file </s> remove </s> add if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); const type = `Record<string, ${pType}${isArray ? '[]' : ''}>`; entityClass.addProperty({ name: additionalPropsOnly ? 'data' : `${uncapitalize(pType)}Data`, isReadonly: true, type: type, }); } </s> remove const { properties: sProps, required } = this.schemas[sName]; </s> add const { properties: sProps, required, $ref, additionalProperties } = this.schemas[sName]; if ($ref) { const temp = $ref.split('/'); const importSchemaName = `${temp[temp.length - 1]}`; entityFile.addImportDeclaration({ defaultImport: importSchemaName, moduleSpecifier: `./${importSchemaName}`, namedImports: [`I${importSchemaName}`], }); entityFile.addTypeAlias({ name: `I${sName}`, type: `I${importSchemaName}`, isExported: true, }) entityFile.addStatements(`export default ${importSchemaName};`); this.entities.push(entityFile); return; } </s> add const additionalPropsOnly = additionalProperties && sortedSProps.length === 0; </s> remove import { TYPES, toCamel, schemaParamParser } from './utils'; </s> add import { TYPES, toCamel, schemaParamParser, uncapitalize } from './utils';
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/webpack/webpack.config.dev.js
keep keep keep keep replace replace replace keep keep keep keep keep
<mask> ) && !(resource.indexOf('.module.')+1); <mask> }, <mask> use: [{ <mask> loader: MiniCssExtractPlugin.loader, <mask> options: { <mask> esModules: true, <mask> } <mask> }, 'css-loader', 'postcss-loader', { <mask> loader: 'less-loader', <mask> options: { <mask> javascriptEnabled: true, <mask> }, </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6 9cd9054c Author: Vlad <[email protected]> Date: Wed Feb 3 16:01:17 2021 +0300 Merge branch 'master' into new-client-dashboard commit 113743a60665e40383d367dc17fa709dc54e4e2e Author: Vlad <[email protected]> Date: Wed Feb 3 15:45:16 2021 +0300 Remove unneded modal styles commit 04f9d93a9ac17ee046f0d5bedfb2bf5a5e6c0a48 Author: Vlad <[email protected]> Date: Wed Feb 3 14:19:56 2021 +0300 Consider comments commit 78a96cd8fed8b3e03547e7e45724c23db295f67b Author: Vlad <[email protected]> Date: Mon Feb 1 18:46:52 2021 +0300 Remove old params for MiniCssExtractPlugin commit 40e5a9b2b1e04036deb70af17f2719eadd0c9c02 Author: Vlad <[email protected]> Date: Mon Feb 1 18:27:46 2021 +0300 Fix mobile version commit 509cefc308f945b03cafa62bf48257490a0a4be1 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:56 2021 +0300 Remove unneeded imports commit d192f39cd2503b8ec942f00ba78fca02cac9fa60 Author: Vlad <[email protected]> Date: Mon Feb 1 18:20:13 2021 +0300 Finish first version of dashboard commit f82429e53d334874ff7dd0641092ec83c66ab61c Merge: fd91a0a3 3e0238aa Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:59 2021 +0300 Merge branch 'master' into new-client-dashboard commit fd91a0a3d76c2a052a6548232b75d151d6065b88 Author: Vlad <[email protected]> Date: Mon Feb 1 17:12:27 2021 +0300 wip commit 237679965052d38acfcd6a72d24b2444cc5b3896 Author: Vlad <[email protected]> Date: Fri Jan 29 11:18:10 2021 +0300 Finish general settings commit 397a7e10efd34a8d31bb175a5a5a7158338388d4 Author: Vlad <[email protected]> Date: Thu Jan 28 19:24:03 2021 +0300 Add General settings page commit 486aaa6f3f9ad66f3a0dcfcccad9a32659767e90 Author: Vlad <[email protected]> Date: Thu Jan 28 14:05:16 2021 +0300 Remove husky commit b895306c0655019ca56ce161e050d83b4e7f5ff1 Merge: a195f1f4 154c9c1c Author: Vlad <[email protected]> Date: Thu Jan 28 14:03:37 2021 +0300 Merge branch 'master' into new-client-dashboard commit a195f1f4d46043d9c53dea08734733f9817b95a0 Merge: c45c5fe9 362f390f Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:18 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit c45c5fe92e6c5c852bec8f512dc46b4cd513156c Author: Vlad <[email protected]> Date: Wed Jan 27 15:46:01 2021 +0300 wip commit 362f390fd3dcfca75633a8d30a2e54c3c30b4f3d Author: Vladislav Abdulmyanov <[email protected]> Date: Wed Jan 27 15:45:12 2021 +0300 Pull request #949: + client: add setup guide page Merge in DNS/adguard-home from 2554-setup-guide to new-client-dashboard Squashed commit of the following: commit c240d52e9e5d90429f2018fde808f4d04ccec138 Merge: 256f1056 137b88e4 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:13:52 2021 +0300 Merge branch 'new-client-dashboard' into 2554-setup-guide commit 256f1056770c67339e93275ab6dc7aaf2c10da0b Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:10:45 2021 +0300 + client: add DNS addresses to the setup guide commit 0ecf91275a16ecc0dca23cae2ae209836fc622d2 Author: Ildar Kamalov <[email protected]> Date: Wed Jan 27 14:00:12 2021 +0300 + client: add setup guide tabs commit 137b88e4253af5be32d542adbe74575ef74805c8 Author: Vlad <[email protected]> Date: Thu Jan 21 19:17:58 2021 +0300 Add clients top commit c3318e6932d87fdff5f22d76bee12b49f099129a Merge: 2776276b 021eb22f Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:57 2021 +0300 Merge branch 'new-client-dashboard' of ssh://bit.adguard.com:7999/dns/adguard-home into new-client-dashboard commit 2776276b2e6dc026e1326b02c388fcf7d48d47ff Author: Vlad <[email protected]> Date: Thu Jan 21 19:15:53 2021 +0300 Add top client info commit 021eb22ff877aec12eb7fab60147a2cc2ddd08b7 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 14:13:54 2021 +0300 Merge: client: add sidebar Squashed commit of the following: commit 6885ba953971e68602889fbb3219221f90265421 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:56:55 2021 +0300 add sidebar mask commit f069bfe8cba2b31355e19a51ca00bf774ee9e560 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:03:47 2021 +0300 fix store commit 77c8791002887ae022da07dc264d9010576e7bab Merge: d0a6eff6 ea6d54d4 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 13:01:04 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit d0a6eff67fd74533d63f5d56382085e98ddbb702 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:47:32 2021 +0300 client: remove unused file commit 9d2424477de85503fe41fa00cc1294cb0c0e7dfa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 12:39:13 2021 +0300 client: header commit 9ddea19c136f15b184caa72d7e82738f7d4f3f1f Merge: 797f1248 b694bb05 Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:57:24 2021 +0300 Merge branch 'new-client-dashboard' into 2254-sidebar commit 797f1248df5c1ef8e59c2a9999138f9e05a7adaa Author: Ildar Kamalov <[email protected]> Date: Thu Jan 21 10:51:57 2021 +0300 client: sidebar ... and 14 more commits </s> remove options: { esModules: true, } </s> add </s> remove "husky": { "hooks": { "pre-commit": "yarn lint" } }, </s> add </s> remove interface AdminInterfaceProps { </s> add interface RadioProps { </s> add readonly numberData: Record<string, number>; </s> remove const data: IUpstreamsConfigResponse = { }; return data; </s> add return Object.entries(this.data).reduce<Record<string, string>>((prev, [key, value]) => { prev[key] = value; return prev; }, {}) </s> remove const data: IClientsFindEntry = { }; return data; </s> add return Object.entries(this.data).reduce<Record<string, IClientFindSubEntry>>((prev, [key, value]) => { prev[key] = value.serialize(); return prev; }, {})
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/webpack/webpack.config.prod.js