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> ...
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.St...
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...
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.S...
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> <mas...
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, s...
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) <ma...
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 |...
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.JoinHostP...
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() + Serv...
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 interna...
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...
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 config...
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 ...
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) + Serve...
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> ipChan...
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 sta...
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 addr...
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...
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 upstr...
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> } <mas...
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.An...
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 ...
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: * u...
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", ti...
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.StatusInternalServerErr...
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,...
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 #12...
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' ...
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 serve...
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 { ...
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 int...
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 ...
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 * ...
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([]uint...
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 t...
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 == ...
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 *ServerC...
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 u...
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 direc...
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 ...
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 int...
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...
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 categoryF...
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> ...
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 '../...
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> ...
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> + clien...
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(placeh...
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, ...
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> ...
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> ...
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 '../../../help...
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> placehol...
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 } ...
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...
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_clie...
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 ...
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" class...
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="checkbo...
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, <mas...
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 certifi...
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 bas...
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 ...
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...
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-...
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> l...
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:...
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 := r...
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",...
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 algori...
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. <m...
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> ...
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, ...
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> } <m...
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(times...
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, ...
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 com...
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...
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...
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 Me...
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> ...
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> ...
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 maste...
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...
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> ...
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> ...
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 entityInt...
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> ...
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...
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> ...
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 ...
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, ...
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 });`);...
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: N...
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 r...
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 7bbd...
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> ch...
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...
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> ...
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/webpack/webpack.config.prod.js