docstring_tokens stringlengths 0 76.5k | code_tokens stringlengths 75 1.81M | label_window listlengths 4 2.12k | html_url stringlengths 74 116 | file_name stringlengths 3 311 |
|---|---|---|---|---|
wantErrMsg: `normalizing "!!!": no valid parts`, | <mask> want: "device",
<mask> }, {
<mask> name: "error",
<mask> hostname: "!!!",
<mask> wantErrMsg: `normalizing hostname "!!!": no valid parts`,
<mask> want: "",
<mask> }, {
<mask> name: "error_spaces",
<mask> hostname: "! ! !",
<mask> wantErrMsg: `normalizing hostname "! ! !": no valid parts`,
</s> Pull request: dhcpd: imp normalization, validation
Updates #3056.
Squashed commit of the following:
commit 875954fc8d59980a39b03032007cbc15d87801ea
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed May 5 19:54:24 2021 +0300
all: imp err msgs
commit c6ea471038ce28f608084b59d3447ff64124260f
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed May 5 17:55:12 2021 +0300
dhcpd: imp normalization, validation </s> remove wantErrMsg: `normalizing hostname "! ! !": no valid parts`,
</s> add wantErrMsg: `normalizing "! ! !": no valid parts`, </s> remove wantErrMsg: `domain name is empty`,
</s> add wantErrMsg: `validating domain name "": domain name is empty`, </s> remove wantErrMsg: `invalid domain name label at index 0: ` +
`invalid char '!' at index 0 in "!!!"`,
</s> add wantErrMsg: `validating domain name "!!!": invalid domain name label at index 0: ` +
`validating label "!!!": invalid char '!' at index 0`, </s> remove wantErrMsg: `client id check: invalid client id: invalid char '!' ` +
`at index 0 in "!!!"`,
</s> add wantErrMsg: `client id check: invalid client id "!!!": ` +
`invalid char '!' at index 0`, </s> remove wantErrMsg: `local domain: invalid domain name label at index 0: ` +
`invalid char '!' at index 0 in "!!!"`,
</s> add wantErrMsg: `local domain: validating domain name "!!!": ` +
`invalid domain name label at index 0: ` +
`validating label "!!!": invalid char '!' at index 0`, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f717776c640ce31ffbc742144164edffc24c22e6 | internal/dhcpd/v4_test.go |
wantErrMsg: `normalizing "! ! !": no valid parts`, | <mask> want: "",
<mask> }, {
<mask> name: "error_spaces",
<mask> hostname: "! ! !",
<mask> wantErrMsg: `normalizing hostname "! ! !": no valid parts`,
<mask> want: "",
<mask> }}
<mask>
<mask> for _, tc := range testCases {
<mask> t.Run(tc.name, func(t *testing.T) {
</s> Pull request: dhcpd: imp normalization, validation
Updates #3056.
Squashed commit of the following:
commit 875954fc8d59980a39b03032007cbc15d87801ea
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed May 5 19:54:24 2021 +0300
all: imp err msgs
commit c6ea471038ce28f608084b59d3447ff64124260f
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed May 5 17:55:12 2021 +0300
dhcpd: imp normalization, validation </s> remove wantErrMsg: `normalizing hostname "!!!": no valid parts`,
</s> add wantErrMsg: `normalizing "!!!": no valid parts`, </s> remove wantErrMsg: `client id check: invalid client id: invalid char '!' ` +
`at index 0 in "!!!"`,
</s> add wantErrMsg: `client id check: invalid client id "!!!": ` +
`invalid char '!' at index 0`, </s> remove wantErrMsg: `local domain: invalid domain name label at index 0: ` +
`invalid char '!' at index 0 in "!!!"`,
</s> add wantErrMsg: `local domain: validating domain name "!!!": ` +
`invalid domain name label at index 0: ` +
`validating label "!!!": invalid char '!' at index 0`, </s> remove wantErrMsg: `invalid domain name label at index 1:` +
` invalid char '!' at index 1 in "a!!!"`,
</s> add wantErrMsg: `validating domain name "example.a!!!.com": ` +
`invalid domain name label at index 1: ` +
`validating label "a!!!": invalid char '!' at index 1`, </s> remove wantErrMsg: `domain name is empty`,
</s> add wantErrMsg: `validating domain name "": domain name is empty`, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f717776c640ce31ffbc742144164edffc24c22e6 | internal/dhcpd/v4_test.go |
"errors" | <mask>
<mask> import (
<mask> "crypto/tls"
<mask> "fmt"
<mask> "path"
<mask> "strings"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
</s> Pull request: dhcpd: imp normalization, validation
Updates #3056.
Squashed commit of the following:
commit 875954fc8d59980a39b03032007cbc15d87801ea
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed May 5 19:54:24 2021 +0300
all: imp err msgs
commit c6ea471038ce28f608084b59d3447ff64124260f
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed May 5 17:55:12 2021 +0300
dhcpd: imp normalization, validation </s> remove wantErrMsg: `local domain: invalid domain name label at index 0: ` +
`invalid char '!' at index 0 in "!!!"`,
</s> add wantErrMsg: `local domain: validating domain name "!!!": ` +
`invalid domain name label at index 0: ` +
`validating label "!!!": invalid char '!' at index 0`, </s> remove func (s *v4Server) addStaticLease(l *Lease) (err error) {
if sn := s.conf.subnet; !sn.Contains(l.IP) {
return fmt.Errorf("subnet %s does not contain the ip %q", sn, l.IP)
}
s.leases = append(s.leases, l)
</s> add // addLease adds a dynamic or static lease.
func (s *v4Server) addLease(l *Lease) (err error) { </s> remove require.Nil(t, err)
require.Nil(t, s.srv4.AddStaticLease(leases[1]))
</s> add require.NoError(t, err)
err = s.srv4.AddStaticLease(leases[1])
require.NoError(t, err) </s> remove assert.Nil(t, os.Remove(dbFilename))
</s> add assert.NoError(t, os.Remove(dbFilename)) </s> remove // leasesLock protects leases and leasedOffsets.
</s> add // leasesLock protects leases, leaseHosts, and leasedOffsets. | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f717776c640ce31ffbc742144164edffc24c22e6 | internal/dnsforward/clientid.go |
// Replace the domain name label wrapper with our own.
return fmt.Errorf("invalid client id %q: %w", clientID, errors.Unwrap(err)) | <mask> // ValidateClientID returns an error if clientID is not a valid client ID.
<mask> func ValidateClientID(clientID string) (err error) {
<mask> err = aghnet.ValidateDomainNameLabel(clientID)
<mask> if err != nil {
<mask> return fmt.Errorf("invalid client id: %w", err)
<mask> }
<mask>
<mask> return nil
<mask> }
<mask>
</s> Pull request: dhcpd: imp normalization, validation
Updates #3056.
Squashed commit of the following:
commit 875954fc8d59980a39b03032007cbc15d87801ea
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed May 5 19:54:24 2021 +0300
all: imp err msgs
commit c6ea471038ce28f608084b59d3447ff64124260f
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed May 5 17:55:12 2021 +0300
dhcpd: imp normalization, validation </s> remove // normalizeHostname normalizes a hostname sent by the client. If err is not
// nil, norm is an empty string.
func normalizeHostname(name string) (norm string, err error) {
if name == "" {
return "", nil
}
norm = strings.ToLower(name)
parts := strings.FieldsFunc(norm, func(c rune) (ok bool) {
return c != '.' && !aghnet.IsValidHostOuterRune(c)
})
if len(parts) == 0 {
return "", fmt.Errorf("normalizing hostname %q: no valid parts", name)
}
norm = strings.Join(parts, "-")
norm = strings.TrimSuffix(norm, "-")
return norm, nil
}
// validateHostname validates a hostname sent by the client.
func (s *v4Server) validateHostname(name string) (err error) {
defer agherr.Annotate("validating hostname: %s", &err)
if name == "" {
return nil
}
err = aghnet.ValidateDomainName(name)
if err != nil {
return err
}
if s.leaseHosts.Has(name) {
return agherr.Error("hostname exists")
}
return nil
}
// validHostnameForClient accepts the hostname sent by the client and returns
// either a normalized version of that hostname or a new hostname generated from
// the client's IP address.
//
// hostname is always a non-empty valid hostname. If err is not nil, it
// describes the issues encountered when normalizing cliHostname.
func (s *v4Server) validHostnameForClient(
cliHostname string,
ip net.IP,
) (hostname string, err error) {
hostname, err = normalizeHostname(cliHostname)
if err == nil {
err = s.validateHostname(hostname)
if err != nil {
// Go on and assign a hostname made from the IP below,
// returning the error that we've got.
hostname = ""
}
}
if hostname == "" {
hostname = aghnet.GenerateHostname(ip)
}
if hostname != cliHostname {
log.Info("dhcpv4: normalized hostname %q into %q", cliHostname, hostname)
}
return hostname, err
}
// validateLease returns an error if the lease is invalid.
func (s *v4Server) validateLease(l *Lease) (err error) {
defer agherr.Annotate("validating lease: %s", &err)
if l == nil {
return agherr.Error("lease is nil")
}
err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return err
}
err = s.validateHostname(l.Hostname)
</s> add // processDiscover is the handler for the DHCP Request request.
func (s *v4Server) processRequest(req, resp *dhcpv4.DHCPv4) (lease *Lease, needsReply bool) {
mac := req.ClientHWAddr
err := aghnet.ValidateHardwareAddress(mac) </s> remove const invalidCharMsg = "invalid char %q at index %d in %q"
</s> add </s> remove defer agherr.Annotate("dhcpv4: %w", &err)
</s> add defer agherr.Annotate("dhcpv4: adding static lease: %w", &err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f717776c640ce31ffbc742144164edffc24c22e6 | internal/dnsforward/clientid.go |
wantErrMsg: `client id check: invalid client id "!!!": ` +
`invalid char '!' at index 0`, | <mask> proto: proxy.ProtoTLS,
<mask> hostSrvName: "example.com",
<mask> cliSrvName: "!!!.example.com",
<mask> wantClientID: "",
<mask> wantErrMsg: `client id check: invalid client id: invalid char '!' ` +
<mask> `at index 0 in "!!!"`,
<mask> wantRes: resultCodeError,
<mask> strictSNI: true,
<mask> }, {
<mask> name: "tls_client_id_too_long",
<mask> proto: proxy.ProtoTLS,
</s> Pull request: dhcpd: imp normalization, validation
Updates #3056.
Squashed commit of the following:
commit 875954fc8d59980a39b03032007cbc15d87801ea
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed May 5 19:54:24 2021 +0300
all: imp err msgs
commit c6ea471038ce28f608084b59d3447ff64124260f
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed May 5 17:55:12 2021 +0300
dhcpd: imp normalization, validation </s> remove wantErrMsg: `client id check: invalid client id: "abcdefghijklmno` +
`pqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789" ` +
`is too long, max: 63`,
</s> add wantErrMsg: `client id check: invalid client id "abcdefghijklmno` +
`pqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789": ` +
`label is too long, max: 63`, </s> remove wantErrMsg: `client id check: invalid client id: invalid char '!' ` +
`at index 0 in "!!!"`,
</s> add wantErrMsg: `client id check: invalid client id "!!!": ` +
`invalid char '!' at index 0`, </s> remove wantErrMsg: `invalid domain name label at index 0: ` +
`invalid char '!' at index 0 in "!!!"`,
</s> add wantErrMsg: `validating domain name "!!!": invalid domain name label at index 0: ` +
`validating label "!!!": invalid char '!' at index 0`, </s> remove wantErrMsg: `invalid domain name label at index 0:` +
` invalid char '-' at index 7 in "example-"`,
</s> add wantErrMsg: `validating domain name "example-.aa.com": ` +
`invalid domain name label at index 0: ` +
`validating label "example-": invalid char '-' at index 7`, </s> remove wantErrMsg: `local domain: invalid domain name label at index 0: ` +
`invalid char '!' at index 0 in "!!!"`,
</s> add wantErrMsg: `local domain: validating domain name "!!!": ` +
`invalid domain name label at index 0: ` +
`validating label "!!!": invalid char '!' at index 0`, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f717776c640ce31ffbc742144164edffc24c22e6 | internal/dnsforward/clientid_test.go |
wantErrMsg: `client id check: invalid client id "abcdefghijklmno` +
`pqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789": ` +
`label is too long, max: 63`, | <mask> hostSrvName: "example.com",
<mask> cliSrvName: `abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmno` +
<mask> `pqrstuvwxyz0123456789.example.com`,
<mask> wantClientID: "",
<mask> wantErrMsg: `client id check: invalid client id: "abcdefghijklmno` +
<mask> `pqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789" ` +
<mask> `is too long, max: 63`,
<mask> wantRes: resultCodeError,
<mask> strictSNI: true,
<mask> }, {
<mask> name: "quic_client_id",
<mask> proto: proxy.ProtoQUIC,
</s> Pull request: dhcpd: imp normalization, validation
Updates #3056.
Squashed commit of the following:
commit 875954fc8d59980a39b03032007cbc15d87801ea
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed May 5 19:54:24 2021 +0300
all: imp err msgs
commit c6ea471038ce28f608084b59d3447ff64124260f
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed May 5 17:55:12 2021 +0300
dhcpd: imp normalization, validation </s> remove wantErrMsg: `client id check: invalid client id: invalid char '!' ` +
`at index 0 in "!!!"`,
</s> add wantErrMsg: `client id check: invalid client id "!!!": ` +
`invalid char '!' at index 0`, </s> remove wantErrMsg: `client id check: invalid client id: invalid char '!' ` +
`at index 0 in "!!!"`,
</s> add wantErrMsg: `client id check: invalid client id "!!!": ` +
`invalid char '!' at index 0`, </s> remove wantErrMsg: `invalid domain name label at index 0: "` + longLabel +
`" is too long, max: 63`,
</s> add wantErrMsg: `validating domain name "` + longLabelDomainName + `": ` +
`invalid domain name label at index 0: validating label "` + longLabel +
`": label is too long, max: 63`, </s> remove wantErrMsg: `"` + longDomainName + `" is too long, max: 253`,
</s> add wantErrMsg: `validating domain name "` + longDomainName + `": too long, max: 253`, </s> remove name: "bad_label_empty",
in: "example..com",
wantErrMsg: `invalid domain name label at index 1: label is empty`,
</s> add name: "bad_label_empty",
in: "example..com",
wantErrMsg: `validating domain name "example..com": ` +
`invalid domain name label at index 1: ` +
`validating label "": label is empty`, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f717776c640ce31ffbc742144164edffc24c22e6 | internal/dnsforward/clientid_test.go |
wantErrMsg: `client id check: invalid client id "!!!": ` +
`invalid char '!' at index 0`, | <mask> }, {
<mask> name: "invalid_client_id",
<mask> path: "/dns-query/!!!",
<mask> wantClientID: "",
<mask> wantErrMsg: `client id check: invalid client id: invalid char '!' ` +
<mask> `at index 0 in "!!!"`,
<mask> wantRes: resultCodeError,
<mask> }}
<mask>
<mask> for _, tc := range testCases {
<mask> t.Run(tc.name, func(t *testing.T) {
</s> Pull request: dhcpd: imp normalization, validation
Updates #3056.
Squashed commit of the following:
commit 875954fc8d59980a39b03032007cbc15d87801ea
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed May 5 19:54:24 2021 +0300
all: imp err msgs
commit c6ea471038ce28f608084b59d3447ff64124260f
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed May 5 17:55:12 2021 +0300
dhcpd: imp normalization, validation </s> remove wantErrMsg: `client id check: invalid client id: invalid char '!' ` +
`at index 0 in "!!!"`,
</s> add wantErrMsg: `client id check: invalid client id "!!!": ` +
`invalid char '!' at index 0`, </s> remove wantErrMsg: `client id check: invalid client id: "abcdefghijklmno` +
`pqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789" ` +
`is too long, max: 63`,
</s> add wantErrMsg: `client id check: invalid client id "abcdefghijklmno` +
`pqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789": ` +
`label is too long, max: 63`, </s> remove wantErrMsg: `local domain: invalid domain name label at index 0: ` +
`invalid char '!' at index 0 in "!!!"`,
</s> add wantErrMsg: `local domain: validating domain name "!!!": ` +
`invalid domain name label at index 0: ` +
`validating label "!!!": invalid char '!' at index 0`, </s> remove wantErrMsg: `invalid domain name label at index 1:` +
` invalid char '!' at index 1 in "a!!!"`,
</s> add wantErrMsg: `validating domain name "example.a!!!.com": ` +
`invalid domain name label at index 1: ` +
`validating label "a!!!": invalid char '!' at index 1`, </s> remove wantErrMsg: `normalizing hostname "! ! !": no valid parts`,
</s> add wantErrMsg: `normalizing "! ! !": no valid parts`, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f717776c640ce31ffbc742144164edffc24c22e6 | internal/dnsforward/clientid_test.go |
wantErrMsg: `local domain: validating domain name "!!!": ` +
`invalid domain name label at index 0: ` +
`validating label "!!!": invalid char '!' at index 0`, | <mask> name: "bad_local_domain",
<mask> in: DNSCreateParams{
<mask> LocalDomain: "!!!",
<mask> },
<mask> wantErrMsg: `local domain: invalid domain name label at index 0: ` +
<mask> `invalid char '!' at index 0 in "!!!"`,
<mask> }}
<mask>
<mask> for _, tc := range testCases {
<mask> t.Run(tc.name, func(t *testing.T) {
<mask> _, err := NewServer(tc.in)
</s> Pull request: dhcpd: imp normalization, validation
Updates #3056.
Squashed commit of the following:
commit 875954fc8d59980a39b03032007cbc15d87801ea
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed May 5 19:54:24 2021 +0300
all: imp err msgs
commit c6ea471038ce28f608084b59d3447ff64124260f
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed May 5 17:55:12 2021 +0300
dhcpd: imp normalization, validation </s> remove wantErrMsg: `invalid domain name label at index 1:` +
` invalid char '!' at index 1 in "a!!!"`,
</s> add wantErrMsg: `validating domain name "example.a!!!.com": ` +
`invalid domain name label at index 1: ` +
`validating label "a!!!": invalid char '!' at index 1`, </s> remove wantErrMsg: `client id check: invalid client id: invalid char '!' ` +
`at index 0 in "!!!"`,
</s> add wantErrMsg: `client id check: invalid client id "!!!": ` +
`invalid char '!' at index 0`, </s> remove wantErrMsg: `invalid domain name label at index 0: ` +
`invalid char '!' at index 0 in "!!!"`,
</s> add wantErrMsg: `validating domain name "!!!": invalid domain name label at index 0: ` +
`validating label "!!!": invalid char '!' at index 0`, </s> remove wantErrMsg: `invalid domain name label at index 0:` +
` invalid char '-' at index 7 in "example-"`,
</s> add wantErrMsg: `validating domain name "example-.aa.com": ` +
`invalid domain name label at index 0: ` +
`validating label "example-": invalid char '-' at index 7`, </s> remove wantErrMsg: `domain name is empty`,
</s> add wantErrMsg: `validating domain name "": domain name is empty`, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f717776c640ce31ffbc742144164edffc24c22e6 | internal/dnsforward/dnsforward_test.go |
"clear_cache": "Clear cache",
"make_static": "Make static" | <mask> "form_error_password_length": "Password must be at least {{value}} characters long",
<mask> "anonymizer_notification": "<0>Note:</0> IP anonymization is enabled. You can disable it in <1>General settings</1>.",
<mask> "confirm_dns_cache_clear": "Are you sure you want to clear DNS cache?",
<mask> "cache_cleared": "DNS cache successfully cleared",
<mask> "clear_cache": "Clear cache"
<mask> }
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove import { useDispatch } from 'react-redux';
</s> add import { useDispatch, useSelector, shallowEqual } from 'react-redux'; </s> remove import { useDispatch } from 'react-redux';
</s> add import { shallowEqual, useDispatch, useSelector } from 'react-redux'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/__locales/en.json |
import { connect } from 'react-redux'; | <mask> import React, { Component } from 'react';
<mask> import PropTypes from 'prop-types';
<mask> import ReactTable from 'react-table';
<mask> import { Trans, withTranslation } from 'react-i18next';
<mask> import { LEASES_TABLE_DEFAULT_PAGE_SIZE } from '../../../helpers/constants';
<mask> import { sortIp } from '../../../helpers/helpers';
<mask> import { toggleLeaseModal } from '../../../actions';
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove import { useDispatch } from 'react-redux';
</s> add import { shallowEqual, useDispatch, useSelector } from 'react-redux'; </s> remove import { useDispatch } from 'react-redux';
</s> add import { useDispatch, useSelector, shallowEqual } from 'react-redux'; </s> remove [actions.toggleLeaseModal]: (state) => {
</s> add [actions.toggleLeaseModal]: (state, { payload }) => { | [
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/components/Settings/Dhcp/Leases.js |
import { toggleLeaseModal } from '../../../actions'; | <mask> import { LEASES_TABLE_DEFAULT_PAGE_SIZE } from '../../../helpers/constants';
<mask> import { sortIp } from '../../../helpers/helpers';
<mask>
<mask> class Leases extends Component {
<mask> cellWrap = ({ value }) => (
<mask> <div className="logs__row o-hidden">
<mask> <span className="logs__text" title={value}>
<mask> {value}
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove import { useDispatch } from 'react-redux';
</s> add import { shallowEqual, useDispatch, useSelector } from 'react-redux'; </s> remove import { useDispatch } from 'react-redux';
</s> add import { useDispatch, useSelector, shallowEqual } from 'react-redux'; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/components/Settings/Dhcp/Leases.js |
minWidth: 180, | <mask> columns={[
<mask> {
<mask> Header: 'MAC',
<mask> accessor: 'mac',
<mask> minWidth: 160,
<mask> Cell: this.cellWrap,
<mask> }, {
<mask> Header: 'IP',
<mask> accessor: 'ip',
<mask> minWidth: 230,
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove minWidth: 160,
</s> add minWidth: 180, </s> remove minWidth: 130,
</s> add minWidth: 220, </s> remove [actions.toggleLeaseModal]: (state) => {
</s> add [actions.toggleLeaseModal]: (state, { payload }) => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/components/Settings/Dhcp/Leases.js |
minWidth: 220, | <mask> Cell: this.cellWrap,
<mask> }, {
<mask> Header: <Trans>dhcp_table_expires</Trans>,
<mask> accessor: 'expires',
<mask> minWidth: 130,
<mask> Cell: this.cellWrap,
<mask> },
<mask> ]}
<mask> pageSize={LEASES_TABLE_DEFAULT_PAGE_SIZE}
<mask> showPageSizeOptions={false}
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove minWidth: 160,
</s> add minWidth: 180, </s> remove minWidth: 160,
</s> add minWidth: 180, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/components/Settings/Dhcp/Leases.js |
}, {
Header: <Trans>actions_table_header</Trans>,
Cell: this.makeStatic, | <mask> accessor: 'expires',
<mask> minWidth: 220,
<mask> Cell: this.cellWrap,
<mask> },
<mask> ]}
<mask> pageSize={LEASES_TABLE_DEFAULT_PAGE_SIZE}
<mask> showPageSizeOptions={false}
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove minWidth: 130,
</s> add minWidth: 220, </s> remove minWidth: 160,
</s> add minWidth: 180, </s> remove minWidth: 160,
</s> add minWidth: 180, | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/components/Settings/Dhcp/Leases.js |
dispatch: PropTypes.func,
disabledLeasesButton: PropTypes.bool, | <mask> leases: PropTypes.array,
<mask> t: PropTypes.func,
<mask> };
<mask>
<mask> export default withTranslation()(connect(() => ({}), (dispatch) => ({ dispatch }))(Leases));
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove export default withTranslation()(Leases);
</s> add export default withTranslation()(connect(() => ({}), (dispatch) => ({ dispatch }))(Leases)); </s> remove [actions.toggleLeaseModal]: (state) => {
</s> add [actions.toggleLeaseModal]: (state, { payload }) => { | [
"keep",
"add",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/components/Settings/Dhcp/Leases.js |
export default withTranslation()(connect(() => ({}), (dispatch) => ({ dispatch }))(Leases)); | <mask> leases: PropTypes.array,
<mask> t: PropTypes.func,
<mask> };
<mask>
<mask> export default withTranslation()(Leases);
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove [actions.toggleLeaseModal]: (state) => {
</s> add [actions.toggleLeaseModal]: (state, { payload }) => { | [
"keep",
"keep",
"keep",
"keep",
"replace"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/components/Settings/Dhcp/Leases.js |
import { useDispatch, useSelector, shallowEqual } from 'react-redux'; | <mask> import React from 'react';
<mask> import PropTypes from 'prop-types';
<mask> import { Field, reduxForm } from 'redux-form';
<mask> import { Trans, useTranslation } from 'react-i18next';
<mask> import { useDispatch } from 'react-redux';
<mask>
<mask> import { renderInputField, normalizeMac } from '../../../../helpers/form';
<mask> import {
<mask> validateIpv4,
<mask> validateMac,
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove import { useDispatch } from 'react-redux';
</s> add import { shallowEqual, useDispatch, useSelector } from 'react-redux'; </s> remove [actions.toggleLeaseModal]: (state) => {
</s> add [actions.toggleLeaseModal]: (state, { payload }) => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/components/Settings/Dhcp/StaticLeases/Form.js |
const dynamicLease = useSelector((store) => store.dhcp.leaseModalConfig, shallowEqual); | <mask> const { t } = useTranslation();
<mask> const dispatch = useDispatch();
<mask>
<mask> const onClick = () => {
<mask> reset();
<mask> dispatch(toggleLeaseModal());
<mask> };
<mask>
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove [actions.toggleLeaseModal]: (state) => {
</s> add [actions.toggleLeaseModal]: (state, { payload }) => { </s> remove const disabledLeasesButton = dhcp?.syncErrors || interfaces?.syncErrors
|| !isInterfaceIncludesIpv4 || isEmptyConfig || processingConfig || !inputtedIPv4values;
</s> add const disabledLeasesButton = Boolean(dhcp?.syncErrors || interfaces?.syncErrors
|| !isInterfaceIncludesIpv4 || isEmptyConfig || processingConfig || !inputtedIPv4values); </s> remove import { useDispatch } from 'react-redux';
</s> add import { shallowEqual, useDispatch, useSelector } from 'react-redux'; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/components/Settings/Dhcp/StaticLeases/Form.js |
disabled={submitting || processingAdding || (pristine && !dynamicLease)} | <mask> </button>
<mask> <button
<mask> type="submit"
<mask> className="btn btn-success btn-standard"
<mask> disabled={submitting || pristine || processingAdding}
<mask> >
<mask> <Trans>save_btn</Trans>
<mask> </button>
<mask> </div>
<mask> </div>
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove <Leases leases={leases} />
</s> add <Leases leases={leases} disabledLeasesButton={disabledLeasesButton}/> </s> remove mac: '',
ip: '',
hostname: '',
</s> add mac: leaseInitialData.mac ?? '',
ip: leaseInitialData.ip ?? '',
hostname: leaseInitialData.hostname ?? '', </s> remove const disabledLeasesButton = dhcp?.syncErrors || interfaces?.syncErrors
|| !isInterfaceIncludesIpv4 || isEmptyConfig || processingConfig || !inputtedIPv4values;
</s> add const disabledLeasesButton = Boolean(dhcp?.syncErrors || interfaces?.syncErrors
|| !isInterfaceIncludesIpv4 || isEmptyConfig || processingConfig || !inputtedIPv4values); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/components/Settings/Dhcp/StaticLeases/Form.js |
import { shallowEqual, useDispatch, useSelector } from 'react-redux'; | <mask> import React from 'react';
<mask> import PropTypes from 'prop-types';
<mask> import { Trans, withTranslation } from 'react-i18next';
<mask> import ReactModal from 'react-modal';
<mask> import { useDispatch } from 'react-redux';
<mask> import Form from './Form';
<mask> import { toggleLeaseModal } from '../../../../actions';
<mask>
<mask> const Modal = ({
<mask> isModalOpen,
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove import { useDispatch } from 'react-redux';
</s> add import { useDispatch, useSelector, shallowEqual } from 'react-redux'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/components/Settings/Dhcp/StaticLeases/Modal.js |
const leaseInitialData = useSelector(
(state) => state.dhcp.leaseModalConfig, shallowEqual,
) || {}; | <mask> }) => {
<mask> const dispatch = useDispatch();
<mask>
<mask> const toggleModal = () => dispatch(toggleLeaseModal());
<mask>
<mask> return (
<mask> <ReactModal
<mask> className="Modal__Bootstrap modal-dialog modal-dialog-centered modal-dialog--clients"
<mask> closeTimeoutMS={0}
<mask> isOpen={isModalOpen}
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove [actions.toggleLeaseModal]: (state) => {
</s> add [actions.toggleLeaseModal]: (state, { payload }) => { </s> remove const disabledLeasesButton = dhcp?.syncErrors || interfaces?.syncErrors
|| !isInterfaceIncludesIpv4 || isEmptyConfig || processingConfig || !inputtedIPv4values;
</s> add const disabledLeasesButton = Boolean(dhcp?.syncErrors || interfaces?.syncErrors
|| !isInterfaceIncludesIpv4 || isEmptyConfig || processingConfig || !inputtedIPv4values); | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/components/Settings/Dhcp/StaticLeases/Modal.js |
mac: leaseInitialData.mac ?? '',
ip: leaseInitialData.ip ?? '',
hostname: leaseInitialData.hostname ?? '', | <mask> </button>
<mask> </div>
<mask> <Form
<mask> initialValues={{
<mask> mac: '',
<mask> ip: '',
<mask> hostname: '',
<mask> cidr,
<mask> rangeStart,
<mask> rangeEnd,
<mask> gatewayIp,
<mask> }}
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove disabled={submitting || pristine || processingAdding}
</s> add disabled={submitting || processingAdding || (pristine && !dynamicLease)} </s> remove <Leases leases={leases} />
</s> add <Leases leases={leases} disabledLeasesButton={disabledLeasesButton}/> </s> remove export default withTranslation()(Leases);
</s> add export default withTranslation()(connect(() => ({}), (dispatch) => ({ dispatch }))(Leases)); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/components/Settings/Dhcp/StaticLeases/Modal.js |
minWidth: 180, | <mask> columns={[
<mask> {
<mask> Header: 'MAC',
<mask> accessor: 'mac',
<mask> minWidth: 160,
<mask> Cell: cellWrap,
<mask> },
<mask> {
<mask> Header: 'IP',
<mask> accessor: 'ip',
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove minWidth: 160,
</s> add minWidth: 180, </s> remove minWidth: 130,
</s> add minWidth: 220, </s> remove [actions.toggleLeaseModal]: (state) => {
</s> add [actions.toggleLeaseModal]: (state, { payload }) => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/components/Settings/Dhcp/StaticLeases/index.js |
const disabledLeasesButton = Boolean(dhcp?.syncErrors || interfaces?.syncErrors
|| !isInterfaceIncludesIpv4 || isEmptyConfig || processingConfig || !inputtedIPv4values); | <mask> const toggleDhcpButton = getToggleDhcpButton();
<mask>
<mask> const inputtedIPv4values = dhcp?.values?.v4?.gateway_ip && dhcp?.values?.v4?.subnet_mask;
<mask> const isEmptyConfig = !Object.values(dhcp?.values?.v4 ?? {}).some(Boolean);
<mask> const disabledLeasesButton = dhcp?.syncErrors || interfaces?.syncErrors
<mask> || !isInterfaceIncludesIpv4 || isEmptyConfig || processingConfig || !inputtedIPv4values;
<mask> const cidr = inputtedIPv4values ? `${dhcp?.values?.v4?.gateway_ip}/${subnetMaskToBitMask(dhcp?.values?.v4?.subnet_mask)}` : '';
<mask>
<mask> return <>
<mask> <PageTitle title={t('dhcp_settings')} subtitle={t('dhcp_description')} containerClass="page-title--dhcp">
<mask> {toggleDhcpButton}
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove disabled={submitting || pristine || processingAdding}
</s> add disabled={submitting || processingAdding || (pristine && !dynamicLease)} </s> remove [actions.toggleLeaseModal]: (state) => {
</s> add [actions.toggleLeaseModal]: (state, { payload }) => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/components/Settings/Dhcp/index.js |
<Leases leases={leases} disabledLeasesButton={disabledLeasesButton}/> | <mask> bodyType="card-body box-body--settings"
<mask> >
<mask> <div className="row">
<mask> <div className="col">
<mask> <Leases leases={leases} />
<mask> </div>
<mask> </div>
<mask> </Card>}
<mask> <Card
<mask> title={t('dhcp_static_leases')}
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove disabled={submitting || pristine || processingAdding}
</s> add disabled={submitting || processingAdding || (pristine && !dynamicLease)} </s> remove mac: '',
ip: '',
hostname: '',
</s> add mac: leaseInitialData.mac ?? '',
ip: leaseInitialData.ip ?? '',
hostname: leaseInitialData.hostname ?? '', </s> remove export default withTranslation()(Leases);
</s> add export default withTranslation()(connect(() => ({}), (dispatch) => ({ dispatch }))(Leases)); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/components/Settings/Dhcp/index.js |
[actions.toggleLeaseModal]: (state, { payload }) => { | <mask> leases: [],
<mask> staticLeases: [],
<mask> }),
<mask>
<mask> [actions.toggleLeaseModal]: (state) => {
<mask> const newState = {
<mask> ...state,
<mask> isModalOpen: !state.isModalOpen,
<mask> };
<mask> return newState;
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove export default withTranslation()(Leases);
</s> add export default withTranslation()(connect(() => ({}), (dispatch) => ({ dispatch }))(Leases)); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/reducers/dhcp.js |
leaseModalConfig: payload, | <mask> [actions.toggleLeaseModal]: (state, { payload }) => {
<mask> const newState = {
<mask> ...state,
<mask> isModalOpen: !state.isModalOpen,
<mask> };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.addStaticLeaseRequest]: (state) => ({
<mask> ...state,
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove [actions.toggleLeaseModal]: (state) => {
</s> add [actions.toggleLeaseModal]: (state, { payload }) => { </s> remove import { useDispatch } from 'react-redux';
</s> add import { shallowEqual, useDispatch, useSelector } from 'react-redux'; | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/reducers/dhcp.js |
leaseModalConfig: undefined, | <mask> leases: [],
<mask> staticLeases: [],
<mask> isModalOpen: false,
<mask> dhcp_available: false,
<mask> },
<mask> );
<mask>
<mask> export default dhcp;
</s> Pull request 1776: client: add transform dynamic lease to static
Updates #3459.
Squashed commit of the following:
commit 7a660c689da898c125a268f88378e38a58b457da
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Mar 21 10:40:25 2023 +0200
consider issues
commit 066bf77ac44fa8602c66aa0ea220b52fca6d1180
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:37:14 2023 +0200
client: fix icon
commit 356b4c3895436f165697510bb3b3abf95f18894f
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Mon Mar 20 18:32:03 2023 +0200
client: add transform dinamic lease to static </s> remove [actions.toggleLeaseModal]: (state) => {
</s> add [actions.toggleLeaseModal]: (state, { payload }) => { </s> remove export default withTranslation()(Leases);
</s> add export default withTranslation()(connect(() => ({}), (dispatch) => ({ dispatch }))(Leases)); | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f736d85e6e96a3d67cb0ec22e27c0b549f3292e9 | client/src/reducers/dhcp.js |
"dns_addresses": "DNS addresses",
"down": "Down",
"fix": "Fix" | <mask> "form_error_password": "Password mismatched",
<mask> "reset_settings": "Reset settings",
<mask> "update_announcement": "AdGuard Home {{version}} is now available! <0>Click here<\/0> for more info.",
<mask> "setup_guide": "Setup guide",
<mask> "dns_addresses": "DNS addresses"
<mask> } </s> * client: installation wizard additional checks </s> remove warning: '',
</s> add status: '',
can_autofix: false, </s> remove import React from 'react';
</s> add import React, { Fragment } from 'react'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/__locales/en.json |
INSTALL_CHECK_CONFIG = { path: 'install/check_config', method: 'POST' }; | <mask> INSTALL_GET_ADDRESSES = { path: 'install/get_addresses', method: 'GET' };
<mask> INSTALL_CONFIGURE = { path: 'install/configure', method: 'POST' };
<mask>
<mask> getDefaultAddresses() {
<mask> const { path, method } = this.INSTALL_GET_ADDRESSES;
<mask> return this.makeRequest(path, method);
<mask> }
</s> * client: installation wizard additional checks </s> remove const values = payload;
values.web.ip = state.web.ip;
values.dns.ip = state.dns.ip;
const newState = { ...state, ...values, processingDefault: false };
</s> add const { interfaces } = payload;
const web = { ...state.web, ...payload.web };
const dns = { ...state.dns, ...payload.dns };
const newState = {
...state, web, dns, interfaces, processingDefault: false,
}; </s> remove const { name } = option;
</s> add const {
name,
ip_addresses,
flags,
} = option; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/api/Api.js |
checkConfig(config) {
const { path, method } = this.INSTALL_CHECK_CONFIG;
const parameters = {
data: config,
headers: { 'Content-Type': 'application/json' },
};
return this.makeRequest(path, method, parameters);
}
| <mask> }
<mask>
<mask> // DNS-over-HTTPS and DNS-over-TLS
<mask> TLS_STATUS = { path: 'tls/status', method: 'GET' };
<mask> TLS_CONFIG = { path: 'tls/configure', method: 'POST' };
<mask> TLS_VALIDATE = { path: 'tls/validate', method: 'POST' };
<mask>
<mask> getTlsStatus() {
</s> * client: installation wizard additional checks </s> remove const values = payload;
values.web.ip = state.web.ip;
values.dns.ip = state.dns.ip;
const newState = { ...state, ...values, processingDefault: false };
</s> add const { interfaces } = payload;
const web = { ...state.web, ...payload.web };
const dns = { ...state.dns, ...payload.dns };
const newState = {
...state, web, dns, interfaces, processingDefault: false,
}; </s> remove webWarning: PropTypes.string.isRequired,
dnsWarning: PropTypes.string.isRequired,
</s> add </s> remove const { name } = option;
</s> add const {
name,
ip_addresses,
flags,
} = option; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/api/Api.js |
|| install.dns.status
|| install.web.status | <mask> invalid
<mask> || pristine
<mask> || install.processingSubmit
<mask> }
<mask> >
<mask> <Trans>next</Trans>
<mask> </button>
<mask> );
</s> * client: installation wizard additional checks </s> remove webWarning={config.web.warning}
dnsWarning={config.dns.warning}
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/Controls.js |
import React, { Fragment } from 'react'; | <mask> import React from 'react';
<mask> import { connect } from 'react-redux';
<mask> import PropTypes from 'prop-types';
<mask> import { Field, reduxForm, formValueSelector } from 'redux-form';
<mask> import { Trans, withNamespaces } from 'react-i18next';
<mask> import flow from 'lodash/flow';
</s> * client: installation wizard additional checks </s> remove warning: '',
</s> add status: '',
can_autofix: false, | [
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/Settings.js |
const {
name,
ip_addresses,
flags,
} = option; | <mask>
<mask> const renderInterfaces = (interfaces => (
<mask> Object.keys(interfaces).map((item) => {
<mask> const option = interfaces[item];
<mask> const { name } = option;
<mask>
<mask> if (option.ip_addresses && option.ip_addresses.length > 0) {
<mask> const ip = getInterfaceIp(option);
<mask>
<mask> return (
</s> * client: installation wizard additional checks </s> remove if (option.ip_addresses && option.ip_addresses.length > 0) {
</s> add if (option && ip_addresses && ip_addresses.length > 0) { </s> remove const values = payload;
values.web.ip = state.web.ip;
values.dns.ip = state.dns.ip;
const newState = { ...state, ...values, processingDefault: false };
</s> add const { interfaces } = payload;
const web = { ...state.web, ...payload.web };
const dns = { ...state.dns, ...payload.dns };
const newState = {
...state, web, dns, interfaces, processingDefault: false,
}; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/Settings.js |
if (option && ip_addresses && ip_addresses.length > 0) { | <mask> Object.keys(interfaces).map((item) => {
<mask> const option = interfaces[item];
<mask> const { name } = option;
<mask>
<mask> if (option.ip_addresses && option.ip_addresses.length > 0) {
<mask> const ip = getInterfaceIp(option);
<mask>
<mask> return (
<mask> <option value={ip} key={name}>
<mask> {name} - {ip}
</s> * client: installation wizard additional checks </s> remove const { name } = option;
</s> add const {
name,
ip_addresses,
flags,
} = option; </s> remove const values = payload;
values.web.ip = state.web.ip;
values.dns.ip = state.dns.ip;
const newState = { ...state, ...values, processingDefault: false };
</s> add const { interfaces } = payload;
const web = { ...state.web, ...payload.web };
const dns = { ...state.dns, ...payload.dns };
const newState = {
...state, web, dns, interfaces, processingDefault: false,
}; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/Settings.js |
const isDown = flags && flags.includes('down');
if (isDown) {
return (
<option value={ip} key={name} disabled>
<Fragment>
{name} - {ip} (<Trans>down</Trans>)
</Fragment>
</option>
);
} | <mask> if (option && ip_addresses && ip_addresses.length > 0) {
<mask> const ip = getInterfaceIp(option);
<mask>
<mask> return (
<mask> <option value={ip} key={name}>
<mask> {name} - {ip}
</s> * client: installation wizard additional checks </s> remove if (option.ip_addresses && option.ip_addresses.length > 0) {
</s> add if (option && ip_addresses && ip_addresses.length > 0) { </s> remove const { name } = option;
</s> add const {
name,
ip_addresses,
flags,
} = option; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/Settings.js |
handleChange,
handleAutofix, | <mask> const {
<mask> handleSubmit,
<mask> webIp,
<mask> webPort,
<mask> dnsIp,
<mask> dnsPort,
<mask> interfaces,
</s> * client: installation wizard additional checks </s> remove webWarning,
dnsWarning,
</s> add config, </s> remove const values = payload;
values.web.ip = state.web.ip;
values.dns.ip = state.dns.ip;
const newState = { ...state, ...values, processingDefault: false };
</s> add const { interfaces } = payload;
const web = { ...state.web, ...payload.web };
const dns = { ...state.dns, ...payload.dns };
const newState = {
...state, web, dns, interfaces, processingDefault: false,
}; </s> remove const { name } = option;
</s> add const {
name,
ip_addresses,
flags,
} = option; </s> remove if (option.ip_addresses && option.ip_addresses.length > 0) {
</s> add if (option && ip_addresses && ip_addresses.length > 0) { | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/Settings.js |
config, | <mask> dnsIp,
<mask> dnsPort,
<mask> interfaces,
<mask> invalid,
<mask> webWarning,
<mask> dnsWarning,
<mask> } = props;
<mask>
<mask> return (
<mask> <form className="setup__step" onSubmit={handleSubmit}>
<mask> <div className="setup__group">
</s> * client: installation wizard additional checks </s> remove {webWarning &&
<div className="text-danger mt-2">
{webWarning}
</div>
}
</s> add </s> remove const { name } = option;
</s> add const {
name,
ip_addresses,
flags,
} = option; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/Settings.js |
const {
status: webStatus,
can_autofix: isWebFixAvailable,
} = config.web;
const {
status: dnsStatus,
can_autofix: isDnsFixAvailable,
} = config.dns; | <mask> invalid,
<mask> config,
<mask> } = props;
<mask>
<mask> return (
<mask> <form className="setup__step" onSubmit={handleSubmit}>
<mask> <div className="setup__group">
<mask> <div className="setup__subtitle">
<mask> <Trans>install_settings_title</Trans>
</s> * client: installation wizard additional checks </s> remove webWarning,
dnsWarning,
</s> add config, </s> remove {webWarning &&
<div className="text-danger mt-2">
{webWarning}
</div>
}
</s> add </s> remove {dnsWarning &&
<div className="text-danger mt-2">
{dnsWarning}
</div>
}
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/Settings.js |
onChange={handleChange} | <mask> <Field
<mask> name="web.ip"
<mask> component="select"
<mask> className="form-control custom-select"
<mask> >
<mask> <option value={ALL_INTERFACES_IP}>
<mask> <Trans>install_settings_all_interfaces</Trans>
<mask> </option>
<mask> {renderInterfaces(interfaces)}
</s> * client: installation wizard additional checks </s> remove if (option.ip_addresses && option.ip_addresses.length > 0) {
</s> add if (option && ip_addresses && ip_addresses.length > 0) { </s> remove const { name } = option;
</s> add const {
name,
ip_addresses,
flags,
} = option; | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/Settings.js |
onChange={handleChange} | <mask> validate={[port, required]}
<mask> normalize={toNumber}
<mask> />
<mask> </div>
<mask> </div>
<mask> <div className="col-12">
</s> * client: installation wizard additional checks </s> remove {webWarning &&
<div className="text-danger mt-2">
{webWarning}
</div>
}
</s> add </s> remove {dnsWarning &&
<div className="text-danger mt-2">
{dnsWarning}
</div>
}
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/Settings.js |
<mask> address={webIp}
<mask> port={webPort}
<mask> />
<mask> </div>
<mask> {webWarning &&
<mask> <div className="text-danger mt-2">
<mask> {webWarning}
<mask> </div>
<mask> }
<mask> </div>
<mask> </div>
<mask> <div className="setup__group">
<mask> <div className="setup__subtitle">
<mask> <Trans>install_settings_dns</Trans>
</s> * client: installation wizard additional checks </s> remove {dnsWarning &&
<div className="text-danger mt-2">
{dnsWarning}
</div>
}
</s> add </s> remove webWarning,
dnsWarning,
</s> add config, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/Settings.js | |
onChange={handleChange} | <mask> component="select"
<mask> className="form-control custom-select"
<mask> >
<mask> <option value={ALL_INTERFACES_IP}>
<mask> <Trans>install_settings_all_interfaces</Trans>
<mask> </option>
</s> * client: installation wizard additional checks </s> remove if (option.ip_addresses && option.ip_addresses.length > 0) {
</s> add if (option && ip_addresses && ip_addresses.length > 0) { </s> remove const { name } = option;
</s> add const {
name,
ip_addresses,
flags,
} = option; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/Settings.js |
onChange={handleChange} | <mask> placeholder="80"
<mask> validate={[port, required]}
<mask> normalize={toNumber}
<mask> />
<mask> </div>
<mask> </div>
<mask> <div className="col-12">
<mask> {dnsStatus &&
<mask> <div className="setup__error text-danger">
</s> * client: installation wizard additional checks </s> remove {webWarning &&
<div className="text-danger mt-2">
{webWarning}
</div>
}
</s> add </s> remove {dnsWarning &&
<div className="text-danger mt-2">
{dnsWarning}
</div>
}
</s> add </s> remove webWarning,
dnsWarning,
</s> add config, | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/Settings.js |
<mask> port={dnsPort}
<mask> isDns={true}
<mask> />
<mask> </div>
<mask> {dnsWarning &&
<mask> <div className="text-danger mt-2">
<mask> {dnsWarning}
<mask> </div>
<mask> }
<mask> </div>
<mask> </div>
<mask> <Controls invalid={invalid} />
<mask> </form>
<mask> );
</s> * client: installation wizard additional checks </s> remove {webWarning &&
<div className="text-danger mt-2">
{webWarning}
</div>
}
</s> add </s> remove webWarning={config.web.warning}
dnsWarning={config.dns.warning}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/Settings.js | |
handleChange: PropTypes.func,
handleAutofix: PropTypes.func, | <mask> Settings.propTypes = {
<mask> handleSubmit: PropTypes.func.isRequired,
<mask> webIp: PropTypes.string.isRequired,
<mask> dnsIp: PropTypes.string.isRequired,
<mask> config: PropTypes.object.isRequired,
<mask> webPort: PropTypes.oneOfType([
</s> * client: installation wizard additional checks </s> remove webWarning: PropTypes.string.isRequired,
dnsWarning: PropTypes.string.isRequired,
</s> add </s> remove const { name } = option;
</s> add const {
name,
ip_addresses,
flags,
} = option; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/Settings.js |
config: PropTypes.object.isRequired, | <mask> handleAutofix: PropTypes.func,
<mask> webIp: PropTypes.string.isRequired,
<mask> dnsIp: PropTypes.string.isRequired,
<mask> webPort: PropTypes.oneOfType([
<mask> PropTypes.string,
<mask> PropTypes.number,
<mask> ]),
<mask> dnsPort: PropTypes.oneOfType([
</s> * client: installation wizard additional checks </s> remove webWarning: PropTypes.string.isRequired,
dnsWarning: PropTypes.string.isRequired,
</s> add </s> remove warning: '',
</s> add status: '',
can_autofix: false, | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/Settings.js |
<mask> dnsPort: PropTypes.oneOfType([
<mask> PropTypes.string,
<mask> PropTypes.number,
<mask> ]),
<mask> webWarning: PropTypes.string.isRequired,
<mask> dnsWarning: PropTypes.string.isRequired,
<mask> interfaces: PropTypes.object.isRequired,
<mask> invalid: PropTypes.bool.isRequired,
<mask> initialValues: PropTypes.object,
<mask> };
<mask>
</s> * client: installation wizard additional checks </s> remove warning: '',
</s> add status: '',
can_autofix: false, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/Settings.js | |
.setup__error {
margin: -5px 0 5px;
} | <mask> min-width: 120px;
<mask> padding-left: 30px;
<mask> padding-right: 30px;
<mask> }
</s> * client: installation wizard additional checks </s> remove warning: '',
</s> add status: '',
can_autofix: false, | [
"keep",
"keep",
"keep",
"add"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/Setup.css |
import debounce from 'lodash/debounce'; | <mask> import { connect } from 'react-redux';
<mask> import PropTypes from 'prop-types';
<mask>
<mask> import * as actionCreators from '../../actions/install';
<mask> import { getWebAddress } from '../../helpers/helpers';
<mask> import {
</s> * client: installation wizard additional checks </s> remove import React from 'react';
</s> add import React, { Fragment } from 'react'; </s> remove warning: '',
</s> add status: '',
can_autofix: false, | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/index.js |
DEBOUNCE_TIMEOUT, | <mask> INSTALL_FIRST_STEP,
<mask> INSTALL_TOTAL_STEPS,
<mask> ALL_INTERFACES_IP,
<mask> } from '../../helpers/constants';
<mask>
<mask> import Loading from '../../components/ui/Loading';
<mask> import Greeting from './Greeting';
</s> * client: installation wizard additional checks </s> remove import React from 'react';
</s> add import React, { Fragment } from 'react'; </s> remove warning: '',
</s> add status: '',
can_autofix: false, | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/index.js |
config={config} | <mask> return (
<mask> <Settings
<mask> initialValues={config}
<mask> interfaces={interfaces}
<mask> onSubmit={this.nextStep}
<mask> onChange={this.handleFormChange}
<mask> handleAutofix={this.handleAutofix}
<mask> />
</s> * client: installation wizard additional checks </s> remove webWarning={config.web.warning}
dnsWarning={config.dns.warning}
</s> add </s> remove {dnsWarning &&
<div className="text-danger mt-2">
{dnsWarning}
</div>
}
</s> add </s> remove webWarning,
dnsWarning,
</s> add config, | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/index.js |
<mask> return (
<mask> <Settings
<mask> initialValues={config}
<mask> interfaces={interfaces}
<mask> webWarning={config.web.warning}
<mask> dnsWarning={config.dns.warning}
<mask> onSubmit={this.nextStep}
<mask> />
<mask> );
<mask> case 3:
<mask> return (
</s> * client: installation wizard additional checks </s> remove {dnsWarning &&
<div className="text-danger mt-2">
{dnsWarning}
</div>
}
</s> add </s> remove webWarning,
dnsWarning,
</s> add config, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/index.js | |
onChange={this.handleFormChange}
handleAutofix={this.handleAutofix} | <mask> config={config}
<mask> initialValues={config}
<mask> interfaces={interfaces}
<mask> onSubmit={this.nextStep}
<mask> />
<mask> );
<mask> case 3:
<mask> return (
<mask> <Auth onSubmit={this.handleFormSubmit} />
<mask> );
</s> * client: installation wizard additional checks </s> remove webWarning={config.web.warning}
dnsWarning={config.dns.warning}
</s> add </s> remove {dnsWarning &&
<div className="text-danger mt-2">
{dnsWarning}
</div>
}
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/index.js |
checkConfig: PropTypes.func.isRequired, | <mask> getDefaultAddresses: PropTypes.func.isRequired,
<mask> setAllSettings: PropTypes.func.isRequired,
<mask> nextStep: PropTypes.func.isRequired,
<mask> prevStep: PropTypes.func.isRequired,
<mask> install: PropTypes.object.isRequired,
<mask> step: PropTypes.number,
<mask> web: PropTypes.object,
<mask> dns: PropTypes.object,
</s> * client: installation wizard additional checks </s> remove webWarning: PropTypes.string.isRequired,
dnsWarning: PropTypes.string.isRequired,
</s> add </s> remove warning: '',
</s> add status: '',
can_autofix: false, | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/install/Setup/index.js |
const { interfaces } = payload;
const web = { ...state.web, ...payload.web };
const dns = { ...state.dns, ...payload.dns };
const newState = {
...state, web, dns, interfaces, processingDefault: false,
}; | <mask> const install = handleActions({
<mask> [actions.getDefaultAddressesRequest]: state => ({ ...state, processingDefault: true }),
<mask> [actions.getDefaultAddressesFailure]: state => ({ ...state, processingDefault: false }),
<mask> [actions.getDefaultAddressesSuccess]: (state, { payload }) => {
<mask> const values = payload;
<mask> values.web.ip = state.web.ip;
<mask> values.dns.ip = state.dns.ip;
<mask> const newState = { ...state, ...values, processingDefault: false };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.nextStep]: state => ({ ...state, step: state.step + 1 }),
<mask> [actions.prevStep]: state => ({ ...state, step: state.step - 1 }),
</s> * client: installation wizard additional checks </s> remove const { name } = option;
</s> add const {
name,
ip_addresses,
flags,
} = option; </s> remove if (option.ip_addresses && option.ip_addresses.length > 0) {
</s> add if (option && ip_addresses && ip_addresses.length > 0) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/reducers/install.js |
[actions.checkConfigRequest]: state => ({ ...state, processingCheck: true }),
[actions.checkConfigFailure]: state => ({ ...state, processingCheck: false }),
[actions.checkConfigSuccess]: (state, { payload }) => {
const web = { ...state.web, ...payload.web };
const dns = { ...state.dns, ...payload.dns };
const newState = {
...state, web, dns, processingCheck: false,
};
return newState;
}, | <mask> [actions.setAllSettingsRequest]: state => ({ ...state, processingSubmit: true }),
<mask> [actions.setAllSettingsFailure]: state => ({ ...state, processingSubmit: false }),
<mask> [actions.setAllSettingsSuccess]: state => ({ ...state, processingSubmit: false }),
<mask> }, {
<mask> step: INSTALL_FIRST_STEP,
<mask> processingDefault: true,
<mask> processingSubmit: false,
<mask> processingCheck: false,
</s> * client: installation wizard additional checks </s> remove const values = payload;
values.web.ip = state.web.ip;
values.dns.ip = state.dns.ip;
const newState = { ...state, ...values, processingDefault: false };
</s> add const { interfaces } = payload;
const web = { ...state.web, ...payload.web };
const dns = { ...state.dns, ...payload.dns };
const newState = {
...state, web, dns, interfaces, processingDefault: false,
}; </s> remove warning: '',
</s> add status: '',
can_autofix: false, </s> remove const { name } = option;
</s> add const {
name,
ip_addresses,
flags,
} = option; </s> remove warning: '',
</s> add status: '',
can_autofix: false, | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/reducers/install.js |
processingCheck: false, | <mask> processingDefault: true,
<mask> processingSubmit: false,
<mask> web: {
<mask> ip: '0.0.0.0',
<mask> port: 80,
<mask> status: '',
</s> * client: installation wizard additional checks </s> remove warning: '',
</s> add status: '',
can_autofix: false, </s> remove warning: '',
</s> add status: '',
can_autofix: false, </s> remove const values = payload;
values.web.ip = state.web.ip;
values.dns.ip = state.dns.ip;
const newState = { ...state, ...values, processingDefault: false };
</s> add const { interfaces } = payload;
const web = { ...state.web, ...payload.web };
const dns = { ...state.dns, ...payload.dns };
const newState = {
...state, web, dns, interfaces, processingDefault: false,
}; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/reducers/install.js |
status: '',
can_autofix: false, | <mask> processingSubmit: false,
<mask> web: {
<mask> ip: '0.0.0.0',
<mask> port: 80,
<mask> warning: '',
<mask> },
<mask> dns: {
<mask> ip: '0.0.0.0',
<mask> port: 53,
<mask> warning: '',
</s> * client: installation wizard additional checks </s> remove warning: '',
</s> add status: '',
can_autofix: false, </s> remove const values = payload;
values.web.ip = state.web.ip;
values.dns.ip = state.dns.ip;
const newState = { ...state, ...values, processingDefault: false };
</s> add const { interfaces } = payload;
const web = { ...state.web, ...payload.web };
const dns = { ...state.dns, ...payload.dns };
const newState = {
...state, web, dns, interfaces, processingDefault: false,
}; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/reducers/install.js |
status: '',
can_autofix: false, | <mask> },
<mask> dns: {
<mask> ip: '0.0.0.0',
<mask> port: 53,
<mask> warning: '',
<mask> },
<mask> interfaces: {},
<mask> });
<mask>
<mask> export default combineReducers({
</s> * client: installation wizard additional checks </s> remove warning: '',
</s> add status: '',
can_autofix: false, </s> remove webWarning: PropTypes.string.isRequired,
dnsWarning: PropTypes.string.isRequired,
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f76b7c3d941070ba815aa25460612277ae1f1a62 | client/src/reducers/install.js |
pidFileName string // PID file name. Empty if no PID file was created. | <mask> ourWorkingDir string // Location of our directory, used to protect against CWD being somewhere else
<mask> firstRun bool // if set to true, don't run any services except HTTP web inteface, and serve only first-run html
<mask> // runningAsService flag is set to true when options are passed from the service runner
<mask> runningAsService bool
<mask> disableUpdate bool // If set, don't check for updates
<mask> appSignalChannel chan os.Signal
<mask> clients clientsContainer
</s> * move "pidFileName" to "config" </s> remove var pidFileName string // PID file name. Empty if no PID file was created.
</s> add </s> remove pidFileName = args.pidFile
</s> add config.pidFileName = args.pidFile </s> remove if len(pidFileName) != 0 {
os.Remove(pidFileName)
</s> add if len(config.pidFileName) != 0 {
os.Remove(config.pidFileName) | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f79008d9d016f5b172f45bd88f368ee28d7fe087 | home/config.go |
<mask> cond *sync.Cond // reacts to config.TLS.Enabled, PortHTTPS, CertificateChain and PrivateKey
<mask> sync.Mutex // protects config.TLS
<mask> shutdown bool // if TRUE, don't restart the server
<mask> }
<mask> var pidFileName string // PID file name. Empty if no PID file was created.
<mask>
<mask> const (
<mask> // Used in config to indicate that syslog or eventlog (win) should be used for logger output
<mask> configSyslog = "syslog"
<mask> )
</s> * move "pidFileName" to "config" </s> remove pidFileName = args.pidFile
</s> add config.pidFileName = args.pidFile </s> remove if len(pidFileName) != 0 {
os.Remove(pidFileName)
</s> add if len(config.pidFileName) != 0 {
os.Remove(config.pidFileName) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f79008d9d016f5b172f45bd88f368ee28d7fe087 | home/home.go | |
config.pidFileName = args.pidFile | <mask> }
<mask> }
<mask>
<mask> if len(args.pidFile) != 0 && writePIDFile(args.pidFile) {
<mask> pidFileName = args.pidFile
<mask> }
<mask>
<mask> // Update filters we've just loaded right away, don't wait for periodic update timer
<mask> go func() {
<mask> refreshFiltersIfNecessary(false)
</s> * move "pidFileName" to "config" </s> remove if len(pidFileName) != 0 {
os.Remove(pidFileName)
</s> add if len(config.pidFileName) != 0 {
os.Remove(config.pidFileName) </s> remove var pidFileName string // PID file name. Empty if no PID file was created.
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f79008d9d016f5b172f45bd88f368ee28d7fe087 | home/home.go |
if len(config.pidFileName) != 0 {
os.Remove(config.pidFileName) | <mask> }
<mask>
<mask> // This function is called before application exits
<mask> func cleanupAlways() {
<mask> if len(pidFileName) != 0 {
<mask> os.Remove(pidFileName)
<mask> }
<mask> log.Info("Stopped")
<mask> }
<mask>
<mask> // command-line arguments
</s> * move "pidFileName" to "config" </s> remove pidFileName = args.pidFile
</s> add config.pidFileName = args.pidFile </s> remove var pidFileName string // PID file name. Empty if no PID file was created.
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f79008d9d016f5b172f45bd88f368ee28d7fe087 | home/home.go |
"client_identifier_desc": "Clients can be identified by the IP address, CIDR, MAC address. Please note, that using MAC as identifier is possible only if AdGuard Home is also a <0>DHCP server</0>", | <mask> "client_new": "New Client",
<mask> "client_edit": "Edit Client",
<mask> "client_identifier": "Identifier",
<mask> "ip_address": "IP address",
<mask> "client_identifier_desc": "Clients can be identified by the IP address, MAC address, CIDR. Please note, that using MAC as identifier is possible only if AdGuard Home is also a <0>DHCP server</0>",
<mask> "form_enter_ip": "Enter IP",
<mask> "form_enter_mac": "Enter MAC",
<mask> "form_enter_id": "Enter identifier",
<mask> "form_client_name": "Enter client name",
<mask> "client_global_settings": "Use global settings",
</s> + client: handle clients find </s> remove if (name) {
nameContainer = (
<span className="logs__text logs__text--wrap" title={`${name} (${value})`}>
{name} <small>({value})</small>
</span>
);
}
</s> add if (info) {
const { name, whois } = info; </s> remove if (whois) {
whoisContainer = (
<div className="logs__text logs__text--wrap logs__text--whois">
{getFormattedWhois(whois, t)}
</div>
);
</s> add if (name) {
nameContainer = (
<span className="logs__text logs__text--wrap" title={`${name} (${value})`}>
{name} <small>({value})</small>
</span>
);
}
if (whois) {
whoisContainer = (
<div className="logs__text logs__text--wrap logs__text--whois">
{getFormattedWhois(whois, t)}
</div>
);
} </s> remove this.props.getClients();
</s> add </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/__locales/en.json |
"form_add_id": "Add identifier", | <mask> "form_enter_mac": "Enter MAC",
<mask> "form_enter_id": "Enter identifier",
<mask> "form_client_name": "Enter client name",
<mask> "client_global_settings": "Use global settings",
<mask> "client_deleted": "Client \"{{key}}\" successfully deleted",
<mask> "client_added": "Client \"{{key}}\" successfully added",
</s> + client: handle clients find </s> remove "client_identifier_desc": "Clients can be identified by the IP address, MAC address, CIDR. Please note, that using MAC as identifier is possible only if AdGuard Home is also a <0>DHCP server</0>",
</s> add "client_identifier_desc": "Clients can be identified by the IP address, CIDR, MAC address. Please note, that using MAC as identifier is possible only if AdGuard Home is also a <0>DHCP server</0>", </s> remove import { normalizeLogs } from '../helpers/helpers';
</s> add import { normalizeLogs, getParamsForClientsSearch, addClientInfo } from '../helpers/helpers'; </s> remove logs, oldest, older_than, filter, ...values,
</s> add logs: logsWithClientInfo, oldest, older_than, filter, ...values, | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/__locales/en.json |
import { normalizeLogs, getParamsForClientsSearch, addClientInfo } from '../helpers/helpers'; | <mask> import { createAction } from 'redux-actions';
<mask>
<mask> import apiClient from '../api/Api';
<mask> import { addErrorToast, addSuccessToast } from './index';
<mask> import { normalizeLogs } from '../helpers/helpers';
<mask> import { TABLE_DEFAULT_PAGE_SIZE } from '../helpers/constants';
<mask>
<mask> const getLogsWithParams = async (config) => {
<mask> const { older_than, filter, ...values } = config;
<mask> const rawLogs = await apiClient.getQueryLog({ ...filter, older_than });
</s> + client: handle clients find </s> remove import { normalizeTopStats, secondsToMilliseconds } from '../helpers/helpers';
</s> add import { normalizeTopStats, secondsToMilliseconds, getParamsForClientsSearch, addClientInfo } from '../helpers/helpers'; </s> remove import { getClientInfo, getAutoClientInfo, normalizeWhois } from './helpers';
</s> add import { normalizeWhois } from './helpers'; </s> remove const { queryLogs, dashboard, t } = this.props;
const { processingClients } = dashboard;
</s> add const { queryLogs, t } = this.props; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/actions/queryLogs.js |
const clientsParams = getParamsForClientsSearch(logs, 'client');
const clients = await apiClient.findClients(clientsParams);
const logsWithClientInfo = addClientInfo(logs, clients, 'client'); | <mask> const { data, oldest } = rawLogs;
<mask> const logs = normalizeLogs(data);
<mask>
<mask> return {
<mask> logs: logsWithClientInfo, oldest, older_than, filter, ...values,
<mask> };
<mask> };
</s> + client: handle clients find </s> remove logs, oldest, older_than, filter, ...values,
</s> add logs: logsWithClientInfo, oldest, older_than, filter, ...values, </s> remove import { normalizeLogs } from '../helpers/helpers';
</s> add import { normalizeLogs, getParamsForClientsSearch, addClientInfo } from '../helpers/helpers'; </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; </s> remove const { queryLogs, dashboard, t } = this.props;
const { processingClients } = dashboard;
</s> add const { queryLogs, t } = this.props; </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/actions/queryLogs.js |
logs: logsWithClientInfo, oldest, older_than, filter, ...values, | <mask> const { data, oldest } = rawLogs;
<mask> const logs = normalizeLogs(data);
<mask>
<mask> return {
<mask> logs, oldest, older_than, filter, ...values,
<mask> };
<mask> };
<mask>
<mask> export const getAdditionalLogsRequest = createAction('GET_ADDITIONAL_LOGS_REQUEST');
<mask> export const getAdditionalLogsFailure = createAction('GET_ADDITIONAL_LOGS_FAILURE');
</s> + client: handle clients find </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; </s> remove import { normalizeTopStats, secondsToMilliseconds } from '../helpers/helpers';
</s> add import { normalizeTopStats, secondsToMilliseconds, getParamsForClientsSearch, addClientInfo } from '../helpers/helpers'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/actions/queryLogs.js |
import { normalizeTopStats, secondsToMilliseconds, getParamsForClientsSearch, addClientInfo } from '../helpers/helpers'; | <mask> import { createAction } from 'redux-actions';
<mask>
<mask> import apiClient from '../api/Api';
<mask> import { addErrorToast, addSuccessToast } from './index';
<mask> import { normalizeTopStats, secondsToMilliseconds } from '../helpers/helpers';
<mask>
<mask> export const getStatsConfigRequest = createAction('GET_STATS_CONFIG_REQUEST');
<mask> export const getStatsConfigFailure = createAction('GET_STATS_CONFIG_FAILURE');
<mask> export const getStatsConfigSuccess = createAction('GET_STATS_CONFIG_SUCCESS');
<mask>
</s> + client: handle clients find </s> remove import { normalizeLogs } from '../helpers/helpers';
</s> add import { normalizeLogs, getParamsForClientsSearch, addClientInfo } from '../helpers/helpers'; </s> remove import { getClientInfo, getAutoClientInfo, normalizeWhois } from './helpers';
</s> add import { normalizeWhois } from './helpers'; </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; </s> remove logs, oldest, older_than, filter, ...values,
</s> add logs: logsWithClientInfo, oldest, older_than, filter, ...values, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/actions/stats.js |
const normalizedTopClients = normalizeTopStats(stats.top_clients);
const clientsParams = getParamsForClientsSearch(normalizedTopClients, 'name');
const clients = await apiClient.findClients(clientsParams);
const topClientsWithInfo = addClientInfo(normalizedTopClients, clients, 'name'); | <mask> try {
<mask> const stats = await apiClient.getStats();
<mask>
<mask> const normalizedStats = {
<mask> ...stats,
<mask> top_blocked_domains: normalizeTopStats(stats.top_blocked_domains),
<mask> top_clients: topClientsWithInfo,
<mask> top_queried_domains: normalizeTopStats(stats.top_queried_domains),
</s> + client: handle clients find </s> remove top_clients: normalizeTopStats(stats.top_clients),
</s> add top_clients: topClientsWithInfo, </s> remove import { normalizeLogs } from '../helpers/helpers';
</s> add import { normalizeLogs, getParamsForClientsSearch, addClientInfo } from '../helpers/helpers'; </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/actions/stats.js |
top_clients: topClientsWithInfo, | <mask>
<mask> const normalizedStats = {
<mask> ...stats,
<mask> top_blocked_domains: normalizeTopStats(stats.top_blocked_domains),
<mask> top_clients: normalizeTopStats(stats.top_clients),
<mask> top_queried_domains: normalizeTopStats(stats.top_queried_domains),
<mask> avg_processing_time: secondsToMilliseconds(stats.avg_processing_time),
<mask> };
<mask>
<mask> dispatch(getStatsSuccess(normalizedStats));
</s> + client: handle clients find </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; </s> remove const { queryLogs, dashboard, t } = this.props;
const { processingClients } = dashboard;
</s> add const { queryLogs, t } = this.props; </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/actions/stats.js |
const clientCell = t => | <mask>
<mask> return <Cell value={value} percent={percent} color={percentColor} />;
<mask> };
<mask>
<mask> const clientCell = (clients, autoClients, t) =>
<mask> function cell(row) {
<mask> const { value } = row;
<mask>
<mask> return (
<mask> <div className="logs__row logs__row--overflow logs__row--column">
</s> + client: handle clients find </s> remove const { value } = row;
</s> add </s> remove {formatClientCell(value, clients, autoClients, t)}
</s> add {formatClientCell(row, t)} </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; </s> remove {formatClientCell(value, clients, autoClients, t)}
</s> add {formatClientCell(row, t)} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/components/Dashboard/Clients.js |
<mask> };
<mask>
<mask> const clientCell = (clients, autoClients, t) =>
<mask> function cell(row) {
<mask> const { value } = row;
<mask>
<mask> return (
<mask> <div className="logs__row logs__row--overflow logs__row--column">
<mask> {formatClientCell(value, clients, autoClients, t)}
<mask> </div>
<mask> );
</s> + client: handle clients find </s> remove const clientCell = (clients, autoClients, t) =>
</s> add const clientCell = t => </s> remove {formatClientCell(value, clients, autoClients, t)}
</s> add {formatClientCell(row, t)} </s> remove {formatClientCell(value, clients, autoClients, t)}
</s> add {formatClientCell(row, t)} </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/components/Dashboard/Clients.js | |
{formatClientCell(row, t)} | <mask> const { value } = row;
<mask>
<mask> return (
<mask> <div className="logs__row logs__row--overflow logs__row--column">
<mask> {formatClientCell(value, clients, autoClients, t)}
<mask> </div>
<mask> );
<mask> };
<mask>
<mask> const Clients = ({
</s> + client: handle clients find </s> remove const { value } = row;
</s> add </s> remove const clientCell = (clients, autoClients, t) =>
</s> add const clientCell = t => </s> remove {formatClientCell(value, clients, autoClients, t)}
</s> add {formatClientCell(row, t)} </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; </s> remove if (whois) {
whoisContainer = (
<div className="logs__text logs__text--wrap logs__text--whois">
{getFormattedWhois(whois, t)}
</div>
);
</s> add if (name) {
nameContainer = (
<span className="logs__text logs__text--wrap" title={`${name} (${value})`}>
{name} <small>({value})</small>
</span>
);
}
if (whois) {
whoisContainer = (
<div className="logs__text logs__text--wrap logs__text--whois">
{getFormattedWhois(whois, t)}
</div>
);
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/components/Dashboard/Clients.js |
t, refreshButton, topClients, subtitle, dnsQueries, | <mask> );
<mask> };
<mask>
<mask> const Clients = ({
<mask> t, refreshButton, topClients, subtitle, clients, autoClients, dnsQueries,
<mask> }) => (
<mask> <Card
<mask> title={t('top_clients')}
<mask> subtitle={subtitle}
<mask> bodyType="card-table"
</s> + client: handle clients find </s> remove {formatClientCell(value, clients, autoClients, t)}
</s> add {formatClientCell(row, t)} </s> remove data={topClients.map(({ name: ip, count }) => ({
</s> add data={topClients.map(({ name: ip, count, info }) => ({ </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; </s> remove const { value } = row;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/components/Dashboard/Clients.js |
data={topClients.map(({ name: ip, count, info }) => ({ | <mask> bodyType="card-table"
<mask> refresh={refreshButton}
<mask> >
<mask> <ReactTable
<mask> data={topClients.map(({ name: ip, count }) => ({
<mask> ip,
<mask> count,
<mask> }))}
<mask> columns={[
<mask> {
</s> + client: handle clients find </s> remove t, refreshButton, topClients, subtitle, clients, autoClients, dnsQueries,
</s> add t, refreshButton, topClients, subtitle, dnsQueries, </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; </s> remove {formatClientCell(value, clients, autoClients, t)}
</s> add {formatClientCell(row, t)} </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/components/Dashboard/Clients.js |
info, | <mask> ip,
<mask> count,
<mask> }))}
<mask> columns={[
<mask> {
<mask> Header: 'IP',
<mask> accessor: 'ip',
<mask> sortMethod: (a, b) =>
</s> + client: handle clients find </s> remove Cell: clientCell(clients, autoClients, t),
</s> add Cell: clientCell(t), </s> remove data={topClients.map(({ name: ip, count }) => ({
</s> add data={topClients.map(({ name: ip, count, info }) => ({ </s> remove const isLoading = processingGetLogs || processingClients || processingGetConfig;
</s> add const isLoading = processingGetLogs || processingGetConfig; </s> remove this.props.getClients();
</s> add </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/components/Dashboard/Clients.js |
Cell: clientCell(t), | <mask> Header: 'IP',
<mask> accessor: 'ip',
<mask> sortMethod: (a, b) =>
<mask> parseInt(a.replace(/\./g, ''), 10) - parseInt(b.replace(/\./g, ''), 10),
<mask> Cell: clientCell(clients, autoClients, t),
<mask> },
<mask> {
<mask> Header: <Trans>requests_count</Trans>,
<mask> accessor: 'count',
<mask> minWidth: 180,
</s> + client: handle clients find </s> remove const isLoading = processingGetLogs || processingClients || processingGetConfig;
</s> add const isLoading = processingGetLogs || processingGetConfig; </s> remove const { value } = row;
</s> add </s> remove const clientCell = (clients, autoClients, t) =>
</s> add const clientCell = t => | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/components/Dashboard/Clients.js |
<mask>
<mask> getAllStats = () => {
<mask> this.props.getStats();
<mask> this.props.getStatsConfig();
<mask> this.props.getClients();
<mask> };
<mask>
<mask> getToggleFilteringButton = () => {
<mask> const { protectionEnabled, processingProtection } = this.props.dashboard;
<mask> const buttonText = protectionEnabled ? 'disable_protection' : 'enable_protection';
</s> + client: handle clients find </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; </s> remove const { queryLogs, dashboard, t } = this.props;
const { processingClients } = dashboard;
</s> add const { queryLogs, t } = this.props; </s> remove const isLoading = processingGetLogs || processingClients || processingGetConfig;
</s> add const isLoading = processingGetLogs || processingGetConfig; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/components/Dashboard/index.js | |
<mask> render() {
<mask> const { dashboard, stats, t } = this.props;
<mask> const dashboardProcessing =
<mask> dashboard.processing ||
<mask> dashboard.processingClients ||
<mask> stats.processingStats ||
<mask> stats.processingGetConfig;
<mask>
<mask> const subtitle =
<mask> stats.interval === 1
</s> + client: handle clients find </s> remove const { queryLogs, dashboard, t } = this.props;
const { processingClients } = dashboard;
</s> add const { queryLogs, t } = this.props; </s> remove const isLoading = processingGetLogs || processingClients || processingGetConfig;
</s> add const isLoading = processingGetLogs || processingGetConfig; </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/components/Dashboard/index.js | |
<mask> componentDidMount() {
<mask> this.props.setLogsPage(TABLE_FIRST_PAGE);
<mask> this.getLogs(...INITIAL_REQUEST_DATA);
<mask> this.props.getFilteringStatus();
<mask> this.props.getClients();
<mask> this.props.getLogsConfig();
<mask> }
<mask>
<mask> getLogs = (older_than, page) => {
<mask> if (this.props.queryLogs.enabled) {
</s> + client: handle clients find </s> remove this.props.getClients();
</s> add </s> remove if (name) {
nameContainer = (
<span className="logs__text logs__text--wrap" title={`${name} (${value})`}>
{name} <small>({value})</small>
</span>
);
}
</s> add if (info) {
const { name, whois } = info; </s> remove if (whois) {
whoisContainer = (
<div className="logs__text logs__text--wrap logs__text--whois">
{getFormattedWhois(whois, t)}
</div>
);
</s> add if (name) {
nameContainer = (
<span className="logs__text logs__text--wrap" title={`${name} (${value})`}>
{name} <small>({value})</small>
</span>
);
}
if (whois) {
whoisContainer = (
<div className="logs__text logs__text--wrap logs__text--whois">
{getFormattedWhois(whois, t)}
</div>
);
} </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/components/Logs/index.js | |
getClientCell = (row) => {
const { original } = row;
const { t } = this.props; | <mask> </div>
<mask> );
<mask> };
<mask>
<mask> getClientCell = ({ original, value }) => {
<mask> const { dashboard, t } = this.props;
<mask> const { clients, autoClients } = dashboard;
<mask> const { reason, domain } = original;
<mask> const isFiltered = this.checkFiltered(reason);
<mask> const isRewrite = this.checkRewrite(reason);
<mask>
<mask> return (
</s> + client: handle clients find </s> remove const { queryLogs, dashboard, t } = this.props;
const { processingClients } = dashboard;
</s> add const { queryLogs, t } = this.props; </s> remove dashboard.processingClients ||
</s> add </s> remove {formatClientCell(value, clients, autoClients, t)}
</s> add {formatClientCell(row, t)} </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; </s> remove const { value } = row;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/components/Logs/index.js |
{formatClientCell(row, t)} | <mask>
<mask> return (
<mask> <Fragment>
<mask> <div className="logs__row logs__row--overflow logs__row--column">
<mask> {formatClientCell(value, clients, autoClients, t)}
<mask> </div>
<mask> {isRewrite ? (
<mask> <div className="logs__action">
<mask> <Link to="/dns#rewrites" className="btn btn-sm btn-outline-primary">
<mask> <Trans>configure</Trans>
</s> + client: handle clients find </s> remove {formatClientCell(value, clients, autoClients, t)}
</s> add {formatClientCell(row, t)} </s> remove const { value } = row;
</s> add </s> remove const clientCell = (clients, autoClients, t) =>
</s> add const clientCell = t => </s> remove if (whois) {
whoisContainer = (
<div className="logs__text logs__text--wrap logs__text--whois">
{getFormattedWhois(whois, t)}
</div>
);
</s> add if (name) {
nameContainer = (
<span className="logs__text logs__text--wrap" title={`${name} (${value})`}>
{name} <small>({value})</small>
</span>
);
}
if (whois) {
whoisContainer = (
<div className="logs__text logs__text--wrap logs__text--whois">
{getFormattedWhois(whois, t)}
</div>
);
} </s> remove if (name) {
nameContainer = (
<span className="logs__text logs__text--wrap" title={`${name} (${value})`}>
{name} <small>({value})</small>
</span>
);
}
</s> add if (info) {
const { name, whois } = info; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/components/Logs/index.js |
const { queryLogs, t } = this.props; | <mask> this.props.setLogsPagination({ page, pageSize: TABLE_DEFAULT_PAGE_SIZE });
<mask> };
<mask>
<mask> renderLogs() {
<mask> const { queryLogs, dashboard, t } = this.props;
<mask> const { processingClients } = dashboard;
<mask> const {
<mask> processingGetLogs, processingGetConfig, logs, pages, page,
<mask> } = queryLogs;
<mask> const isLoading = processingGetLogs || processingClients || processingGetConfig;
<mask>
</s> + client: handle clients find </s> remove const isLoading = processingGetLogs || processingClients || processingGetConfig;
</s> add const isLoading = processingGetLogs || processingGetConfig; </s> remove dashboard.processingClients ||
</s> add </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; </s> remove import { normalizeLogs } from '../helpers/helpers';
</s> add import { normalizeLogs, getParamsForClientsSearch, addClientInfo } from '../helpers/helpers'; </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/components/Logs/index.js |
const isLoading = processingGetLogs || processingGetConfig; | <mask> const { processingClients } = dashboard;
<mask> const {
<mask> processingGetLogs, processingGetConfig, logs, pages, page,
<mask> } = queryLogs;
<mask> const isLoading = processingGetLogs || processingClients || processingGetConfig;
<mask>
<mask> const columns = [
<mask> {
<mask> Header: t('time_table_header'),
<mask> accessor: 'time',
</s> + client: handle clients find </s> remove const { queryLogs, dashboard, t } = this.props;
const { processingClients } = dashboard;
</s> add const { queryLogs, t } = this.props; </s> remove dashboard.processingClients ||
</s> add </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/components/Logs/index.js |
import { normalizeWhois } from './helpers'; | <mask> import React, { Fragment } from 'react';
<mask> import { getClientInfo, getAutoClientInfo, normalizeWhois } from './helpers';
<mask> import { WHOIS_ICONS } from './constants';
<mask>
<mask> const getFormattedWhois = (whois, t) => {
<mask> const whoisInfo = normalizeWhois(whois);
<mask> return (
</s> + client: handle clients find </s> remove import { normalizeLogs } from '../helpers/helpers';
</s> add import { normalizeLogs, getParamsForClientsSearch, addClientInfo } from '../helpers/helpers'; </s> remove import { normalizeTopStats, secondsToMilliseconds } from '../helpers/helpers';
</s> add import { normalizeTopStats, secondsToMilliseconds, getParamsForClientsSearch, addClientInfo } from '../helpers/helpers'; </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; | [
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/helpers/formatClientCell.js |
export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; | <mask> })
<mask> );
<mask> };
<mask>
<mask> export const formatClientCell = (value, clients, autoClients, t) => {
<mask> const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
<mask> const { name, whois } = clientInfo;
<mask> let whoisContainer = '';
<mask> let nameContainer = value;
<mask>
<mask> if (name) {
<mask> nameContainer = (
</s> + client: handle clients find </s> remove if (name) {
nameContainer = (
<span className="logs__text logs__text--wrap" title={`${name} (${value})`}>
{name} <small>({value})</small>
</span>
);
}
</s> add if (info) {
const { name, whois } = info; </s> remove if (whois) {
whoisContainer = (
<div className="logs__text logs__text--wrap logs__text--whois">
{getFormattedWhois(whois, t)}
</div>
);
</s> add if (name) {
nameContainer = (
<span className="logs__text logs__text--wrap" title={`${name} (${value})`}>
{name} <small>({value})</small>
</span>
);
}
if (whois) {
whoisContainer = (
<div className="logs__text logs__text--wrap logs__text--whois">
{getFormattedWhois(whois, t)}
</div>
);
} </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; </s> remove const { value } = row;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/helpers/formatClientCell.js |
if (info) {
const { name, whois } = info; | <mask> const { name, whois } = clientInfo;
<mask> let whoisContainer = '';
<mask> let nameContainer = value;
<mask>
<mask> if (name) {
<mask> nameContainer = (
<mask> <span className="logs__text logs__text--wrap" title={`${name} (${value})`}>
<mask> {name} <small>({value})</small>
<mask> </span>
<mask> );
<mask> }
<mask>
<mask> if (whois) {
<mask> whoisContainer = (
<mask> <div className="logs__text logs__text--wrap logs__text--whois">
<mask> {getFormattedWhois(whois, t)}
</s> + client: handle clients find </s> remove if (whois) {
whoisContainer = (
<div className="logs__text logs__text--wrap logs__text--whois">
{getFormattedWhois(whois, t)}
</div>
);
</s> add if (name) {
nameContainer = (
<span className="logs__text logs__text--wrap" title={`${name} (${value})`}>
{name} <small>({value})</small>
</span>
);
}
if (whois) {
whoisContainer = (
<div className="logs__text logs__text--wrap logs__text--whois">
{getFormattedWhois(whois, t)}
</div>
);
} </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; </s> remove {formatClientCell(value, clients, autoClients, t)}
</s> add {formatClientCell(row, t)} </s> remove const { value } = row;
</s> add </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/helpers/formatClientCell.js |
if (name) {
nameContainer = (
<span className="logs__text logs__text--wrap" title={`${name} (${value})`}>
{name} <small>({value})</small>
</span>
);
}
if (whois) {
whoisContainer = (
<div className="logs__text logs__text--wrap logs__text--whois">
{getFormattedWhois(whois, t)}
</div>
);
} | <mask> </span>
<mask> );
<mask> }
<mask>
<mask> if (whois) {
<mask> whoisContainer = (
<mask> <div className="logs__text logs__text--wrap logs__text--whois">
<mask> {getFormattedWhois(whois, t)}
<mask> </div>
<mask> );
<mask> }
<mask>
<mask> return (
<mask> <span className="logs__text">
<mask> <Fragment>
</s> + client: handle clients find </s> remove if (name) {
nameContainer = (
<span className="logs__text logs__text--wrap" title={`${name} (${value})`}>
{name} <small>({value})</small>
</span>
);
}
</s> add if (info) {
const { name, whois } = info; </s> remove {formatClientCell(value, clients, autoClients, t)}
</s> add {formatClientCell(row, t)} </s> remove const { value } = row;
</s> add </s> remove {formatClientCell(value, clients, autoClients, t)}
</s> add {formatClientCell(row, t)} </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/helpers/formatClientCell.js |
import uniqBy from 'lodash/uniqBy'; | <mask> import round from 'lodash/round';
<mask> import axios from 'axios';
<mask> import i18n from 'i18next';
<mask> import versionCompare from './versionCompare';
<mask>
<mask> import {
<mask> STANDARD_DNS_PORT,
<mask> STANDARD_WEB_PORT,
<mask> STANDARD_HTTPS_PORT,
</s> + client: handle clients find </s> remove import { normalizeLogs } from '../helpers/helpers';
</s> add import { normalizeLogs, getParamsForClientsSearch, addClientInfo } from '../helpers/helpers'; </s> remove import { normalizeTopStats, secondsToMilliseconds } from '../helpers/helpers';
</s> add import { normalizeTopStats, secondsToMilliseconds, getParamsForClientsSearch, addClientInfo } from '../helpers/helpers'; </s> remove import { getClientInfo, getAutoClientInfo, normalizeWhois } from './helpers';
</s> add import { normalizeWhois } from './helpers'; </s> remove this.props.getClients();
</s> add </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/helpers/helpers.js |
export const addClientInfo = (data, clients, param) => (
data.map((row) => {
const clientIp = row[param];
const info = clients.find(item => item[clientIp]) || '';
return {
...row,
info: (info && info[clientIp]) || '',
};
})
);
| <mask> );
<mask>
<mask> export const normalizeFilteringStatus = (filteringStatus) => {
<mask> const {
<mask> enabled, filters, user_rules: userRules, interval,
<mask> } = filteringStatus;
<mask> const newFilters = filters
<mask> ? filters.map((filter) => {
</s> + client: handle clients find </s> remove export const formatClientCell = (value, clients, autoClients, t) => {
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value);
const { name, whois } = clientInfo;
</s> add export const formatClientCell = (row, t) => {
const { value, original: { info } } = row; </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; </s> remove this.props.getClients();
</s> add </s> remove import { normalizeTopStats, secondsToMilliseconds } from '../helpers/helpers';
</s> add import { normalizeTopStats, secondsToMilliseconds, getParamsForClientsSearch, addClientInfo } from '../helpers/helpers'; </s> remove logs, oldest, older_than, filter, ...values,
</s> add logs: logsWithClientInfo, oldest, older_than, filter, ...values, | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/helpers/helpers.js |
export const getParamsForClientsSearch = (data, param) => {
const uniqueClients = uniqBy(data, param);
return uniqueClients
.reduce((acc, item, idx) => {
const key = `ip${idx}`;
acc[key] = item[param];
return acc;
}, {});
}; | <mask> const searchParams = new URLSearchParams(params);
<mask>
<mask> return `${path}?${searchParams.toString()}`;
<mask> };
</s> + client: handle clients find </s> remove logs, oldest, older_than, filter, ...values,
</s> add logs: logsWithClientInfo, oldest, older_than, filter, ...values, </s> remove const clientCell = (clients, autoClients, t) =>
</s> add const clientCell = t => </s> remove getClientCell = ({ original, value }) => {
const { dashboard, t } = this.props;
const { clients, autoClients } = dashboard;
</s> add getClientCell = (row) => {
const { original } = row;
const { t } = this.props; | [
"keep",
"keep",
"keep",
"add"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f8202a74bd55b97cdd95c33d8f8ed97412ba43b1 | client/src/helpers/helpers.js |
"privacy_policy": "Privacy policy", | <mask> "copyright": "Copyright",
<mask> "homepage": "Homepage",
<mask> "report_an_issue": "Report an issue",
<mask> "enable_protection": "Enable protection",
<mask> "enabled_protection": "Enabled protection",
<mask> "disable_protection": "Disable protection",
<mask> "disabled_protection": "Disabled protection",
</s> + client: privacy policy link
Closes #393 </s> remove import { REPOSITORY, LANGUAGES } from '../../helpers/constants';
</s> add import { REPOSITORY, LANGUAGES, PRIVACY_POLICY_LINK } from '../../helpers/constants'; | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f83d026c330ec56b76dc995afabe67bc45f654c7 | client/src/__locales/en.json |
import { REPOSITORY, LANGUAGES, PRIVACY_POLICY_LINK } from '../../helpers/constants'; | <mask> import React, { Component } from 'react';
<mask> import { Trans, withNamespaces } from 'react-i18next';
<mask> import { REPOSITORY, LANGUAGES } from '../../helpers/constants';
<mask> import i18n from '../../i18n';
<mask>
<mask> import './Footer.css';
<mask> import './Select.css';
<mask>
</s> + client: privacy policy link
Closes #393 | [
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f83d026c330ec56b76dc995afabe67bc45f654c7 | client/src/components/ui/Footer.js |
<a href={PRIVACY_POLICY_LINK} className="footer__link" target="_blank" rel="noopener noreferrer">
<Trans>privacy_policy</Trans>
</a> | <mask> <a href={REPOSITORY.URL} className="footer__link" target="_blank" rel="noopener noreferrer">
<mask> <Trans>homepage</Trans>
<mask> </a>
<mask> <a href={`${REPOSITORY.URL}/issues/new`} className="btn btn-outline-primary btn-sm footer__link footer__link--report" target="_blank" rel="noopener noreferrer">
<mask> <Trans>report_an_issue</Trans>
<mask> </a>
<mask> </div>
</s> + client: privacy policy link
Closes #393 </s> remove import { REPOSITORY, LANGUAGES } from '../../helpers/constants';
</s> add import { REPOSITORY, LANGUAGES, PRIVACY_POLICY_LINK } from '../../helpers/constants'; | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f83d026c330ec56b76dc995afabe67bc45f654c7 | client/src/components/ui/Footer.js |
export const PRIVACY_POLICY_LINK = 'https://adguard.com/privacy/home.html';
| <mask> TRACKERS_DB: 'https://github.com/AdguardTeam/AdGuardHome/tree/master/client/src/helpers/trackers/adguard.json',
<mask> };
<mask>
<mask> export const LANGUAGES = [
<mask> {
<mask> key: 'en',
<mask> name: 'English',
</s> + client: privacy policy link
Closes #393 </s> remove import { REPOSITORY, LANGUAGES } from '../../helpers/constants';
</s> add import { REPOSITORY, LANGUAGES, PRIVACY_POLICY_LINK } from '../../helpers/constants'; | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f83d026c330ec56b76dc995afabe67bc45f654c7 | client/src/helpers/constants.js |
lock sync.RWMutex | <mask>
<mask> // AutoHosts - automatic DNS records
<mask> type AutoHosts struct {
<mask> // lock protects table and tableReverse.
<mask> lock sync.Mutex
<mask> // table is the host-to-IPs map.
<mask> table map[string][]net.IP
<mask> // tableReverse is the IP-to-hosts map.
<mask> //
<mask> // TODO(a.garipov): Make better use of newtypes. Perhaps a custom map.
</s> Use a RWMutex instead of a Mutex for authosts </s> remove a.lock.Lock()
defer a.lock.Unlock()
</s> add a.lock.RLock()
defer a.lock.RUnlock() </s> remove a.lock.Lock()
defer a.lock.Unlock()
</s> add a.lock.RLock()
defer a.lock.RUnlock() </s> remove a.lock.Lock()
</s> add a.lock.RLock() </s> remove a.lock.Unlock()
</s> add a.lock.RUnlock() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f893df7e642b1ee3dd29adddd028c123f8a0f73b | internal/util/autohosts.go |
a.lock.RLock() | <mask> return nil
<mask> }
<mask>
<mask> var ipsCopy []net.IP
<mask> a.lock.Lock()
<mask>
<mask> if ips, ok := a.table[host]; ok {
<mask> ipsCopy = make([]net.IP, len(ips))
<mask> copy(ipsCopy, ips)
<mask> }
</s> Use a RWMutex instead of a Mutex for authosts </s> remove a.lock.Unlock()
</s> add a.lock.RUnlock() </s> remove a.lock.Lock()
defer a.lock.Unlock()
</s> add a.lock.RLock()
defer a.lock.RUnlock() </s> remove a.lock.Lock()
defer a.lock.Unlock()
</s> add a.lock.RLock()
defer a.lock.RUnlock() </s> remove lock sync.Mutex
</s> add lock sync.RWMutex | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f893df7e642b1ee3dd29adddd028c123f8a0f73b | internal/util/autohosts.go |
a.lock.RUnlock() | <mask> ipsCopy = make([]net.IP, len(ips))
<mask> copy(ipsCopy, ips)
<mask> }
<mask>
<mask> a.lock.Unlock()
<mask>
<mask> log.Debug("AutoHosts: answer: %s -> %v", host, ipsCopy)
<mask> return ipsCopy
<mask> }
<mask>
</s> Use a RWMutex instead of a Mutex for authosts </s> remove a.lock.Lock()
</s> add a.lock.RLock() </s> remove a.lock.Lock()
defer a.lock.Unlock()
</s> add a.lock.RLock()
defer a.lock.RUnlock() </s> remove a.lock.Lock()
defer a.lock.Unlock()
</s> add a.lock.RLock()
defer a.lock.RUnlock() </s> remove lock sync.Mutex
</s> add lock sync.RWMutex | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/f893df7e642b1ee3dd29adddd028c123f8a0f73b | internal/util/autohosts.go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.