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
func (filter *filter) saveAndBackupOld() error { filterFilePath := filter.Path() _ = os.Rename(filterFilePath, filterFilePath+".old") return filter.save() }
<mask> filter.LastUpdated = filter.LastTimeUpdated() <mask> return err <mask> } <mask> <mask> // loads filter contents from the file in dataDir <mask> func (filter *filter) load() error { <mask> filterFilePath := filter.Path() <mask> log.Tracef("Loading filter %d contents to: %s", filter.ID, filterFilePath...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a59e346d4af2a1ac91ea087a0c465e9a1e593f86
home/filter.go
<mask> package home <mask> <mask> import ( <mask> "bufio" <mask> "bytes" <mask> "context" <mask> "errors" <mask> "fmt" <mask> "io" </s> * dnsfilter: major refactoring * dnsfilter is controlled by package home, not dnsforward * move HTTP handlers to dnsfilter/ * apply filtering settings without DNS ser...
[ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a59e346d4af2a1ac91ea087a0c465e9a1e593f86
home/helpers.go
<mask> "bytes" <mask> "context" <mask> "errors" <mask> "fmt" <mask> "io" <mask> "net" <mask> "net/http" <mask> "net/url" <mask> "os" <mask> "path" </s> * dnsfilter: major refactoring * dnsfilter is controlled by package home, not dnsforward * move HTTP handlers to dnsfilter/ * apply filtering sett...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a59e346d4af2a1ac91ea087a0c465e9a1e593f86
home/helpers.go
<mask> func postInstallHandler(handler http.Handler) http.Handler { <mask> return &postInstallHandlerStruct{handler} <mask> } <mask> <mask> // ------------------------------------------------- <mask> // helper functions for parsing parameters from body <mask> // ------------------------------------------------...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "re...
https://github.com/AdguardTeam/AdGuardHome/commit/a59e346d4af2a1ac91ea087a0c465e9a1e593f86
home/helpers.go
go func() { err = startDNSServer() if err != nil { log.Fatal(err) } }()
<mask> log.Fatal(err) <mask> } <mask> <mask> initDNSServer() <mask> <mask> err = startDNSServer() <mask> if err != nil { <mask> log.Fatal(err) <mask> } <mask> <mask> err = startDHCPServer() <mask> if err != nil { <mask> log.Fatal(err) <mask> } </s> * dnsfilter: major refactori...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a59e346d4af2a1ac91ea087a0c465e9a1e593f86
home/home.go
CacheSize uint32 `json:"cache_size"` CacheMinTTL uint32 `json:"cache_ttl_min"` CacheMaxTTL uint32 `json:"cache_ttl_max"`
<mask> EDNSCSEnabled bool `json:"edns_cs_enabled"` <mask> DNSSECEnabled bool `json:"dnssec_enabled"` <mask> DisableIPv6 bool `json:"disable_ipv6"` <mask> UpstreamMode string `json:"upstream_mode"` <mask> } <mask> <mask> func (s *Server) handleGetConfig(w http.ResponseWriter, r *http...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c0381c46026cdfd5624e38c3fd6bfa045b8895
dnsforward/dnsforward_http.go
resp.CacheSize = s.conf.CacheSize resp.CacheMinTTL = s.conf.CacheMinTTL resp.CacheMaxTTL = s.conf.CacheMaxTTL
<mask> resp.EDNSCSEnabled = s.conf.EnableEDNSClientSubnet <mask> resp.DNSSECEnabled = s.conf.EnableDNSSEC <mask> resp.DisableIPv6 = s.conf.AAAADisabled <mask> if s.conf.FastestAddr { <mask> resp.UpstreamMode = "fastest_addr" <mask> } else if s.conf.AllServers { <mask> resp.UpstreamMode = "parallel" <ma...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c0381c46026cdfd5624e38c3fd6bfa045b8895
dnsforward/dnsforward_http.go
if req.CacheMinTTL > req.CacheMaxTTL { httpError(r, w, http.StatusBadRequest, "cache_ttl_min must be less or equal than cache_ttl_max") return }
<mask> httpError(r, w, http.StatusBadRequest, "upstream_mode: incorrect value") <mask> return <mask> } <mask> <mask> restart := false <mask> s.Lock() <mask> <mask> if js.Exists("upstream_dns") { <mask> s.conf.UpstreamDNS = req.Upstreams </s> + dns: new settings for cache
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c0381c46026cdfd5624e38c3fd6bfa045b8895
dnsforward/dnsforward_http.go
if js.Exists("cache_size") { s.conf.CacheSize = req.CacheSize restart = true } if js.Exists("cache_ttl_min") { s.conf.CacheMinTTL = req.CacheMinTTL restart = true } if js.Exists("cache_ttl_max") { s.conf.CacheMaxTTL = req.CacheMaxTTL restart = true }
<mask> if js.Exists("disable_ipv6") { <mask> s.conf.AAAADisabled = req.DisableIPv6 <mask> } <mask> <mask> if js.Exists("upstream_mode") { <mask> s.conf.FastestAddr = false <mask> s.conf.AllServers = false <mask> switch req.UpstreamMode { <mask> case "": </s> + dns: new settings for cache
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c0381c46026cdfd5624e38c3fd6bfa045b8895
dnsforward/dnsforward_http.go
cache_size: type: integer cache_ttl_min: type: integer cache_ttl_max: type: integer
<mask> dnssec_enabled: <mask> type: boolean <mask> upstream_mode: <mask> enum: <mask> - "" <mask> - parallel </s> + dns: new settings for cache
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c0381c46026cdfd5624e38c3fd6bfa045b8895
openapi/openapi.yaml
"dev": true,
<mask> "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz", <mask> "integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==", <mask> "requires": { <mask> "fast-deep-equal": "^2.0.1", <mask> "fast-json-stable-stringify":...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/package-lock.json
"integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", "dev": true
<mask> }, <mask> "ajv-keywords": { <mask> "version": "3.2.0", <mask> "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", <mask> "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=" <mask> }, <mask> "align-text": { <mask> "version": "0.1.4", <mask>...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/package-lock.json
"integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", "dev": true
<mask> }, <mask> "big.js": { <mask> "version": "3.2.0", <mask> "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", <mask> "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==" <mask> }, <mask> "binary-exten...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/package-lock.json
"integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", "dev": true
<mask> }, <mask> "emojis-list": { <mask> "version": "2.1.0", <mask> "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", <mask> "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" <mask> }, <mask> "encodeurl": { <mask> "version": "1.0.2", <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/package-lock.json
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", "dev": true
<mask> }, <mask> "fast-deep-equal": { <mask> "version": "2.0.1", <mask> "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", <mask> "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" <mask> }, <mask> "fast-glob": { <mask> "version": "2.2.6",...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/package-lock.json
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", "dev": true
<mask> }, <mask> "fast-json-stable-stringify": { <mask> "version": "2.0.0", <mask> "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", <mask> "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" <mask> }, <mask> "fast-levenshte...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/package-lock.json
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true
<mask> }, <mask> "json-schema-traverse": { <mask> "version": "0.4.1", <mask> "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", <mask> "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/package-lock.json
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", "dev": true
<mask> }, <mask> "json5": { <mask> "version": "0.5.1", <mask> "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", <mask> "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" <mask> }, <mask> "jsx-ast-utils": { <mask> "version": "1.4.1", <mask> "resolved":...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/package-lock.json
"dev": true,
<mask> "loader-utils": { <mask> "version": "1.1.0", <mask> "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", <mask> "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", <mask> "requires": { <mask> "big.js": "^3.1.3", <mask> "emojis-list": "^2...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/package-lock.json
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true
<mask> }, <mask> "punycode": { <mask> "version": "2.1.1", <mask> "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", <mask> "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" <mask> }, <mask> "q": { ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/package-lock.json
"dev": true,
<mask> "version": "0.4.7", <mask> "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", <mask> "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", <mask> "requires": { <mask> "ajv": "^6.1.0", <mas...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/package-lock.json
"dev": true,
<mask> "resolved": "https://registry.npmjs.org/svg-url-loader/-/svg-url-loader-2.3.2.tgz", <mask> "integrity": "sha1-3YaybBn+O5FPBOoQ7zlZTq3gRGQ=", <mask> "requires": { <mask> "file-loader": "1.1.11", <mask> "loader-utils": "1.1.0" <mask> }, <mask> "dependencies": { ...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/package-lock.json
"dev": true,
<mask> "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", <mask> "integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==", <mask> "requires": { <mask> "loader-utils": "^1.0.2", <mask> ...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/package-lock.json
"dev": true,
<mask> "uri-js": { <mask> "version": "4.2.2", <mask> "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", <mask> "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", <mask> "requires": { <mask> "punycode"...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/package-lock.json
<mask> "redux": "^4.0.0", <mask> "redux-actions": "^2.4.0", <mask> "redux-form": "^7.4.2", <mask> "redux-thunk": "^2.3.0", <mask> "svg-url-loader": "^2.3.2", <mask> "url-polyfill": "^1.1.7" <mask> }, <mask> "devDependencies": { <mask> "autoprefixer": "^8.6.3", <mask> "babel...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/package.json
"webpack-merge": "^4.1.3", "svg-url-loader": "^2.3.2"
<mask> "uglifyjs-webpack-plugin": "^1.2.7", <mask> "url-loader": "^1.0.1", <mask> "webpack": "3.8.1", <mask> "webpack-dev-server": "^3.1.14", <mask> "webpack-merge": "^4.1.3" <mask> } <mask> } </s> Merge: - client: block/unblock client without requesting stats Closes #896 Squashed commit...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/package.json
<mask> import { t } from 'i18next'; <mask> <mask> import apiClient from '../api/Api'; <mask> import { addErrorToast, addSuccessToast } from './index'; <mask> import { getStats, getStatsConfig } from './stats'; <mask> import { normalizeTextarea } from '../helpers/helpers'; <mask> import { ACTION } from '../helpe...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/actions/access.js
export const toggleClientBlock = (type, ip) => async (dispatch) => {
<mask> export const toggleClientBlockRequest = createAction('TOGGLE_CLIENT_BLOCK_REQUEST'); <mask> export const toggleClientBlockFailure = createAction('TOGGLE_CLIENT_BLOCK_FAILURE'); <mask> export const toggleClientBlockSuccess = createAction('TOGGLE_CLIENT_BLOCK_SUCCESS'); <mask> <mask> export const toggleClien...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/actions/access.js
const { allowed_clients, disallowed_clients, blocked_hosts, } = await apiClient.getAccessList(); let updatedDisallowedClients = disallowed_clients;
<mask> <mask> export const toggleClientBlock = (type, ip) => async (dispatch, getState) => { <mask> dispatch(toggleClientBlockRequest()); <mask> try { <mask> const { allowed_clients, disallowed_clients, blocked_hosts } = getState().access; <mask> let updatedDisallowedClients = normalizeTe...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/actions/access.js
allowed_clients, blocked_hosts,
<mask> updatedDisallowedClients.push(ip); <mask> } <mask> <mask> const values = { <mask> allowed_clients: normalizeTextarea(allowed_clients), <mask> blocked_hosts: normalizeTextarea(blocked_hosts), <mask> disallowed_clients: updatedDisallowedClient...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/actions/access.js
dispatch(toggleClientBlockSuccess(values));
<mask> disallowed_clients: updatedDisallowedClients, <mask> }; <mask> <mask> await apiClient.setAccessList(values); <mask> dispatch(toggleClientBlockSuccess()); <mask> <mask> if (type === ACTION.unblock) { <mask> dispatch(addSuccessToast(t('client_unbloc...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/actions/access.js
<mask> dispatch(addSuccessToast(t('client_unblocked', { ip }))); <mask> } else if (type === ACTION.block) { <mask> dispatch(addSuccessToast(t('client_blocked', { ip }))); <mask> } <mask> <mask> dispatch(getStats()); <mask> dispatch(getStatsConfig()); <mas...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/actions/access.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, getParamsForClientsSearch, addClientInfo, addClientStatus } from '../helpers/helpers'; ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/actions/stats.js
<mask> const stats = await apiClient.getStats(); <mask> const normalizedTopClients = normalizeTopStats(stats.top_clients); <mask> const clientsParams = getParamsForClientsSearch(normalizedTopClients, 'name'); <mask> const clients = await apiClient.findClients(clientsParams); <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/actions/stats.js
<mask> const clients = await apiClient.findClients(clientsParams); <mask> const accessData = await apiClient.getAccessList(); <mask> const { disallowed_clients } = accessData; <mask> const topClientsWithInfo = addClientInfo(normalizedTopClients, clients, 'name'); <mask> cons...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
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: topClientsWithStatus, <mask> top_queried_domains: normalizeTopStats(stats.top_queried_domains), <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/actions/stats.js
const isBlockedClient = (clients, ip) => !!(clients && clients.includes(ip)); const clientCell = (t, toggleClientStatus, processing, disallowedClients) =>
<mask> </div> <mask> ); <mask> }; <mask> <mask> const clientCell = (t, toggleClientStatus, processing) => <mask> function cell(row) { <mask> const { original, value } = row; <mask> const { blocked } = original; <mask> <mask> return ( </s> Merge: - client: block/unblo...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/components/Dashboard/Clients.js
const { value } = row; const blocked = isBlockedClient(disallowedClients, value);
<mask> }; <mask> <mask> const clientCell = (t, toggleClientStatus, processing) => <mask> function cell(row) { <mask> const { original, value } = row; <mask> const { blocked } = original; <mask> <mask> return ( <mask> <Fragment> <mask> <div className="l...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/components/Dashboard/Clients.js
disallowedClients,
<mask> dnsQueries, <mask> toggleClientStatus, <mask> processingAccessSet, <mask> }) => ( <mask> <Card <mask> title={t('top_clients')} <mask> subtitle={subtitle} <mask> bodyType="card-table" </s> Merge: - client: block/unblock client without requesting stats Closes #896 ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/components/Dashboard/Clients.js
Cell: clientCell(t, toggleClientStatus, processingAccessSet, disallowedClients),
<mask> Header: 'IP', <mask> accessor: 'ip', <mask> sortMethod: (a, b) => <mask> parseInt(a.replace(/\./g, ''), 10) - parseInt(b.replace(/\./g, ''), 10), <mask> Cell: clientCell(t, toggleClientStatus, processingA...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/components/Dashboard/Clients.js
const { ip } = rowInfo.original;
<mask> if (!rowInfo) { <mask> return {}; <mask> } <mask> <mask> const { blocked } = rowInfo.original; <mask> <mask> if (blocked) { <mask> return { <mask> className: 'red', <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/components/Dashboard/Clients.js
if (isBlockedClient(disallowedClients, ip)) {
<mask> } <mask> <mask> const { blocked } = rowInfo.original; <mask> <mask> if (blocked) { <mask> return { <mask> className: 'red', <mask> }; <mask> } <mask> </s> Merge: - client:...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/components/Dashboard/Clients.js
disallowedClients: PropTypes.string.isRequired,
<mask> toggleClientStatus: PropTypes.func.isRequired, <mask> processingAccessSet: PropTypes.bool.isRequired, <mask> }; <mask> <mask> export default withNamespaces()(Clients); </s> Merge: - client: block/unblock client without requesting stats Closes #896 Squashed commit of the following: commit 66b781...
[ "keep", "add", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/components/Dashboard/Clients.js
this.props.getAccessList();
<mask> } <mask> <mask> getAllStats = () => { <mask> this.props.getStats(); <mask> this.props.getStatsConfig(); <mask> }; <mask> <mask> getToggleFilteringButton = () => { </s> Merge: - client: block/unblock client without requesting stats Closes #896 Squashed commit of the fo...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/components/Dashboard/index.js
|| stats.processingGetConfig || access.processing;
<mask> const { <mask> dashboard, stats, access, t, <mask> } = this.props; <mask> const statsProcessing = stats.processingStats <mask> || stats.processingGetConfig; <mask> <mask> const subtitle = <mask> stats.interval === 1 <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/components/Dashboard/index.js
disallowedClients={access.disallowed_clients}
<mask> refreshButton={refreshButton} <mask> toggleClientStatus={this.toggleClientStatus} <mask> processingAccessSet={access.processingSet} <mask> /> <mask> </div> <ma...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/components/Dashboard/index.js
<mask> }; <mask> }) <mask> ); <mask> <mask> export const addClientStatus = (data, disallowedClients, param) => ( <mask> data.map((row) => { <mask> const clientIp = row[param]; <mask> const blocked = !!(disallowedClients && disallowedClients.includes(clientIp)); <mask> r...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/helpers/helpers.js
[actions.toggleClientBlockSuccess]: (state, { payload }) => { const { allowed_clients, disallowed_clients, blocked_hosts, } = payload; const newState = { ...state, allowed_clients: (allowed_client...
<mask> }, <mask> <mask> [actions.toggleClientBlockRequest]: state => ({ ...state, processingSet: true }), <mask> [actions.toggleClientBlockFailure]: state => ({ ...state, processingSet: false }), <mask> [actions.toggleClientBlockSuccess]: state => ({ ...state, processingSet: false ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2ad1b2fa52a071beb759d6b673de73a3d4f4d
client/src/reducers/access.js
EnableDNSSEC bool `yaml:"enable_dnssec"` // Set DNSSEC flag in outcoming DNS request
<mask> EnableEDNSClientSubnet bool `yaml:"edns_client_subnet"` // Enable EDNS Client Subnet option <mask> <mask> // Respond with an empty answer to all AAAA requests <mask> AAAADisabled bool `yaml:"aaaa_disabled"` <mask> <mask> AllowedClients []string `yaml:"allowed_clients"` // IP addresses of whitel...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2cdaf380ce1df945d3e2bc0a6533323037f6b
dnsforward/dnsforward.go
origReqDNSSEC bool // DNSSEC flag in the original request from user
<mask> err error // error returned from the module <mask> protectionEnabled bool // filtering is enabled, dnsfilter object is ready <mask> responseFromUpstream bool // response is received from upstream servers <mask> } <mask> <mask> const ( <mask> resultDone = i...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2cdaf380ce1df945d3e2bc0a6533323037f6b
dnsforward/dnsforward.go
if s.conf.EnableDNSSEC { opt := d.Req.IsEdns0() if opt == nil { log.Debug("DNS: Adding OPT record with DNSSEC flag") d.Req.SetEdns0(4096, true) } else if !opt.Do() { opt.SetDo(true) } else { ctx.origReqDNSSEC = true } }
<mask> } <mask> } <mask> <mask> // request was not filtered so let it be processed further <mask> err := s.dnsProxy.Resolve(d) <mask> if err != nil { <mask> ctx.err = err <mask> return resultError <mask> } </s> + dnsforward: add dnssec_enabled option </s> remove if !ctx.responseFromUpstream { r...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2cdaf380ce1df945d3e2bc0a6533323037f6b
dnsforward/dnsforward.go
<mask> d := ctx.proxyCtx <mask> res := ctx.result <mask> var err error <mask> <mask> if !ctx.responseFromUpstream { <mask> return resultDone // don't process response if it's not from upstream servers <mask> } <mask> <mask> if res.Reason == dnsfilter.ReasonRewrite && len(res.CanonName) != 0 { <mask>...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2cdaf380ce1df945d3e2bc0a6533323037f6b
dnsforward/dnsforward.go
processDNSSECAfterResponse,
<mask> mods := []modProcessFunc{ <mask> processInitial, <mask> processFilteringBeforeRequest, <mask> processUpstream, <mask> processFilteringAfterResponse, <mask> processQueryLogsAndStats, <mask> } <mask> for _, process := range mods { </s> + dnsforward: add dnssec_enabled option </s> remove if !...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2cdaf380ce1df945d3e2bc0a6533323037f6b
dnsforward/dnsforward.go
case resultDone: // continue: call the next filter
<mask> r := process(ctx) <mask> switch r { <mask> case resultFinish: <mask> return nil <mask> <mask> case resultError: <mask> return ctx.err </s> + dnsforward: add dnssec_enabled option </s> remove if !ctx.responseFromUpstream { return resultDone // don't process response if it's not from upst...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2cdaf380ce1df945d3e2bc0a6533323037f6b
dnsforward/dnsforward.go
DNSSECEnabled bool `json:"dnssec_enabled"`
<mask> BlockingIPv4 string `json:"blocking_ipv4"` <mask> BlockingIPv6 string `json:"blocking_ipv6"` <mask> EDNSCSEnabled bool `json:"edns_cs_enabled"` <mask> DisableIPv6 bool `json:"disable_ipv6"` <mask> } <mask> <mask> func (s *Server) handleGetConfig(w http.ResponseWriter, r *http....
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2cdaf380ce1df945d3e2bc0a6533323037f6b
dnsforward/dnsforward_http.go
resp.DNSSECEnabled = s.conf.EnableDNSSEC
<mask> resp.RateLimit = s.conf.Ratelimit <mask> resp.EDNSCSEnabled = s.conf.EnableEDNSClientSubnet <mask> resp.DisableIPv6 = s.conf.AAAADisabled <mask> s.RUnlock() <mask> <mask> js, err := json.Marshal(resp) </s> + dnsforward: add dnssec_enabled option </s> remove if !ctx.responseFromUpstream { return r...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2cdaf380ce1df945d3e2bc0a6533323037f6b
dnsforward/dnsforward_http.go
if js.Exists("dnssec_enabled") { s.conf.EnableDNSSEC = req.DNSSECEnabled }
<mask> restart = true <mask> } <mask> <mask> if js.Exists("disable_ipv6") { <mask> s.conf.AAAADisabled = req.DisableIPv6 <mask> } <mask> <mask> s.Unlock() <mask> s.conf.ConfigModified() </s> + dnsforward: add dnssec_enabled option </s> remove if !ctx.responseFromUpstream { return resultDone // d...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2cdaf380ce1df945d3e2bc0a6533323037f6b
dnsforward/dnsforward_http.go
dnssec_enabled: type: "boolean"
<mask> edns_cs_enabled: <mask> type: "boolean" <mask> <mask> UpstreamsConfig: <mask> type: "object" <mask> description: "Upstreams configuration" <mask> required: <mask> - "bootstrap_dns" </s> + dnsforward: add dnssec_enabled option
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2cdaf380ce1df945d3e2bc0a6533323037f6b
openapi/openapi.yaml
answer_dnssec: type: "boolean"
<mask> description: "Answer from upstream server (optional)" <mask> items: <mask> $ref: "#/definitions/DnsAnswer" <mask> client: <mask> type: "string" <mask> example: "192.168.0.1" <mask> elapsedMs: </s> ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2cdaf380ce1df945d3e2bc0a6533323037f6b
openapi/openapi.yaml
opt := msg.IsEdns0() dnssecOk := false if opt != nil { dnssecOk = opt.Do() } jsonEntry["answer_dnssec"] = dnssecOk
<mask> <mask> if msg != nil { <mask> jsonEntry["status"] = dns.RcodeToString[msg.Rcode] <mask> } <mask> <mask> if len(entry.Result.Rule) > 0 { <mask> jsonEntry["rule"] = entry.Result.Rule </s> + dnsforward: add dnssec_enabled option </s> remove if !ctx.responseFromUpstream { return resultDone // don...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a5c2cdaf380ce1df945d3e2bc0a6533323037f6b
querylog/qlog.go
"errors"
<mask> "encoding/binary" <mask> "encoding/gob" <mask> "fmt" <mask> "net" <mask> "os" <mask> "sort" <mask> "sync" </s> Pull request: stats: imp err handling, logs Merge in DNS/adguard-home from 2661-imp-stats-logging to master Updates #2661. Squashed commit of the following: commit 474735a5c6ab6509733...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a623ac694ba5d7acf45464941057bc79975142d8
internal/stats/unit.go
"github.com/AdguardTeam/AdGuardHome/internal/agherr"
<mask> "sort" <mask> "sync" <mask> "time" <mask> <mask> "github.com/AdguardTeam/golibs/log" <mask> bolt "go.etcd.io/bbolt" <mask> ) <mask> <mask> // TODO(a.garipov): Rewrite all of this. Add proper error handling and <mask> // inspection. Improve logging. Decrease complexity. </s> Pull request: sta...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a623ac694ba5d7acf45464941057bc79975142d8
internal/stats/unit.go
// TODO(a.garipov): Rewrite all of this. Add proper error handling and // inspection. Improve logging. Decrease complexity.
<mask> "github.com/AdguardTeam/golibs/log" <mask> bolt "go.etcd.io/bbolt" <mask> ) <mask> <mask> const ( <mask> maxDomains = 100 // max number of top domains to store in file or return via Get() <mask> maxClients = 100 // max number of top clients to store in file or return via Get() <mask> ) <mask> <ma...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a623ac694ba5d7acf45464941057bc79975142d8
internal/stats/unit.go
func createObject(conf Config) (s *statsCtx, err error) { s = &statsCtx{}
<mask> <mask> TimeAvg uint32 // usec <mask> } <mask> <mask> func createObject(conf Config) (*statsCtx, error) { <mask> s := statsCtx{} <mask> if !checkInterval(conf.LimitDays) { <mask> conf.LimitDays = 1 <mask> } <mask> s.conf = &Config{} <mask> *s.conf = conf </s> Pull request: stats: imp err han...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a623ac694ba5d7acf45464941057bc79975142d8
internal/stats/unit.go
// TODO(a.garipov): See if this is actually necessary. Looks // like a rather bizarre solution. errStop := agherr.Error("stop iteration") forEachBkt := func(name []byte, _ *bolt.Bucket) (cberr error) { nameID := uint32(btoi(name)) if nameID < firstID { cberr = tx.DeleteBucket(name) if cberr != ni...
<mask> if tx != nil { <mask> log.Tracef("Deleting old units...") <mask> firstID := id - s.conf.limit - 1 <mask> unitDel := 0 <mask> forEachBkt := func(name []byte, b *bolt.Bucket) error { <mask> id := uint32(btoi(name)) <mask> if id < firstID { <mask> err := tx.DeleteBucket(name) <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a623ac694ba5d7acf45464941057bc79975142d8
internal/stats/unit.go
log.Debug("stats: deleted unit %d", nameID)
<mask> err := tx.DeleteBucket(name) <mask> if err != nil { <mask> log.Debug("tx.DeleteBucket: %s", err) <mask> } <mask> log.Debug("Stats: deleted unit %d", id) <mask> unitDel++ <mask> return nil <mask> } <mask> return fmt.Errorf("") <mask> } </s> Pull request: stats: imp ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a623ac694ba5d7acf45464941057bc79975142d8
internal/stats/unit.go
return errStop } err = tx.ForEach(forEachBkt) if err != nil && !errors.Is(err, errStop) { log.Debug("stats: deleting units: %s", err)
<mask> log.Debug("Stats: deleted unit %d", id) <mask> unitDel++ <mask> return nil <mask> } <mask> return fmt.Errorf("") <mask> } <mask> _ = tx.ForEach(forEachBkt) <mask> <mask> udb = s.loadUnitFromDB(tx, id) <mask> </s> Pull request: stats: imp err handling, logs Merge in DNS/adgua...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a623ac694ba5d7acf45464941057bc79975142d8
internal/stats/unit.go
<mask> return nil <mask> } <mask> return fmt.Errorf("") <mask> } <mask> _ = tx.ForEach(forEachBkt) <mask> <mask> udb = s.loadUnitFromDB(tx, id) <mask> <mask> if unitDel != 0 { <mask> s.commitTxn(tx) </s> Pull request: stats: imp err handling, logs Merge in DNS/adguard-home from 2661-i...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a623ac694ba5d7acf45464941057bc79975142d8
internal/stats/unit.go
err = tx.Rollback() if err != nil { log.Debug("rolling back: %s", err) }
<mask> <mask> if unitDel != 0 { <mask> s.commitTxn(tx) <mask> } else { <mask> _ = tx.Rollback() <mask> } <mask> } <mask> <mask> u := unit{} <mask> s.initUnit(&u, id) </s> Pull request: stats: imp err handling, logs Merge in DNS/adguard-home from 2661-imp-stats-logging to master Updates #26...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a623ac694ba5d7acf45464941057bc79975142d8
internal/stats/unit.go
log.Debug("stats: initialized") return s, nil
<mask> deserialize(&u, udb) <mask> } <mask> s.unit = &u <mask> <mask> log.Debug("Stats: initialized") <mask> return &s, nil <mask> } <mask> <mask> func (s *statsCtx) Start() { <mask> s.initWeb() <mask> go s.periodicFlush() </s> Pull request: stats: imp err handling, logs Merge in DNS/adguard-home...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a623ac694ba5d7acf45464941057bc79975142d8
internal/stats/unit.go
log.Error("stats: open DB: %s: %s", s.conf.Filename, err)
<mask> var err error <mask> log.Tracef("db.Open...") <mask> s.db, err = bolt.Open(s.conf.Filename, 0o644, nil) <mask> if err != nil { <mask> log.Error("Stats: open DB: %s: %s", s.conf.Filename, err) <mask> if err.Error() == "invalid argument" { <mask> log.Error("AdGuard Home cannot be initialized due ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a623ac694ba5d7acf45464941057bc79975142d8
internal/stats/unit.go
log.Tracef("stats: bolt DeleteBucket: %s", err)
<mask> // Delete unit's data from file <mask> func (s *statsCtx) deleteUnit(tx *bolt.Tx, id uint32) bool { <mask> err := tx.DeleteBucket(unitName(id)) <mask> if err != nil { <mask> log.Tracef("bolt DeleteBucket: %s", err) <mask> return false <mask> } <mask> log.Debug("Stats: deleted unit %d", id) <mask...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a623ac694ba5d7acf45464941057bc79975142d8
internal/stats/unit.go
log.Debug("stats: deleted unit %d", id)
<mask> if err != nil { <mask> log.Tracef("bolt DeleteBucket: %s", err) <mask> return false <mask> } <mask> log.Debug("Stats: deleted unit %d", id) <mask> return true <mask> } <mask> <mask> func convertMapToSlice(m map[string]uint64, max int) []countPair { <mask> a := []countPair{} </s> Pull request...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a623ac694ba5d7acf45464941057bc79975142d8
internal/stats/unit.go
log.Debug("stats: set limit: %d", limitDays)
<mask> func (s *statsCtx) setLimit(limitDays int) { <mask> conf := *s.conf <mask> conf.limit = uint32(limitDays) * 24 <mask> s.conf = &conf <mask> log.Debug("Stats: set limit: %d", limitDays) <mask> } <mask> <mask> func (s *statsCtx) WriteDiskConfig(dc *DiskConfig) { <mask> dc.Interval = s.conf.limit / 2...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a623ac694ba5d7acf45464941057bc79975142d8
internal/stats/unit.go
log.Debug("stats: closed")
<mask> _ = s.db.Close() <mask> log.Tracef("db.Close") <mask> } <mask> <mask> log.Debug("Stats: closed") <mask> } <mask> <mask> // Reset counters and clear database <mask> func (s *statsCtx) clear() { <mask> tx := s.beginTxn(true) </s> Pull request: stats: imp err handling, logs Merge in DNS/adguard...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a623ac694ba5d7acf45464941057bc79975142d8
internal/stats/unit.go
log.Debug("stats: cleared")
<mask> } <mask> <mask> _ = s.dbOpen() <mask> <mask> log.Debug("Stats: cleared") <mask> } <mask> <mask> // Get Client IP address <mask> func (s *statsCtx) getClientIP(ip net.IP) (clientIP net.IP) { <mask> if s.conf.AnonymizeClientIP && ip != nil { </s> Pull request: stats: imp err handling, logs Merge...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a623ac694ba5d7acf45464941057bc79975142d8
internal/stats/unit.go
"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> "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 or MAC address. Please note, that using MAC as identifier is possibl...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/__locales/en.json
"form_enter_id": "Enter identifier",
<mask> "form_enter_ip": "Enter IP", <mask> "form_enter_mac": "Enter MAC", <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}}\" s...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/__locales/en.json
<mask> import { createAction } from 'redux-actions'; <mask> import { t } from 'i18next'; <mask> import apiClient from '../api/Api'; <mask> import { addErrorToast, addSuccessToast, getClients } from './index'; <mask> import { CLIENT_ID } from '../helpers/constants'; <mask> <mask> export const toggleClientModal =...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/actions/clients.js
await apiClient.addClient(config);
<mask> <mask> export const addClient = config => async (dispatch) => { <mask> dispatch(addClientRequest()); <mask> try { <mask> let data; <mask> if (config.identifier === CLIENT_ID.MAC) { <mask> const { ip, identifier, ...values } = config; <mask> <mask> data =...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/actions/clients.js
const data = { name, data: { ...config } };
<mask> <mask> export const updateClient = (config, name) => async (dispatch) => { <mask> dispatch(updateClientRequest()); <mask> try { <mask> let data; <mask> if (config.identifier === CLIENT_ID.MAC) { <mask> const { ip, identifier, ...values } = config; <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/actions/clients.js
FIND_CLIENTS = { path: 'clients/find', method: 'GET' };
<mask> // Per-client settings <mask> GET_CLIENTS = { path: 'clients', method: 'GET' }; <mask> ADD_CLIENT = { path: 'clients/add', method: 'POST' }; <mask> DELETE_CLIENT = { path: 'clients/delete', method: 'POST' }; <mask> UPDATE_CLIENT = { path: 'clients/update', method: 'POST' }; <mask> <ma...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/api/Api.js
findClients(params) { const { path, method } = this.FIND_CLIENTS; const url = getPathWithQueryString(path, params); return this.makeRequest(url, method); }
<mask> }; <mask> return this.makeRequest(path, method, parameters); <mask> } <mask> <mask> // DNS access settings <mask> ACCESS_LIST = { path: 'access/list', method: 'GET' }; <mask> ACCESS_SET = { path: 'access/set', method: 'POST' }; <mask> <mask> getAccessList() { <mask...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/api/Api.js
import { MODAL_TYPE } from '../../../helpers/constants';
<mask> import PropTypes from 'prop-types'; <mask> import { Trans, withNamespaces } from 'react-i18next'; <mask> import ReactTable from 'react-table'; <mask> <mask> import { MODAL_TYPE, CLIENT_ID } from '../../../helpers/constants'; <mask> import Card from '../../ui/Card'; <mask> import Modal from './Modal'; <m...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/components/Settings/Clients/ClientsTable.js
<mask> getClient = (name, clients) => { <mask> const client = clients.find(item => name === item.name); <mask> <mask> if (client) { <mask> const identifier = client.mac ? CLIENT_ID.MAC : CLIENT_ID.IP; <mask> <mask> return { <mask> identifier, <mask>...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/components/Settings/Clients/ClientsTable.js
<mask> if (client) { <mask> const identifier = client.mac ? CLIENT_ID.MAC : CLIENT_ID.IP; <mask> <mask> return { <mask> identifier, <mask> use_global_settings: true, <mask> use_global_blocked_services: true, <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/components/Settings/Clients/ClientsTable.js
ids: [''],
<mask> }; <mask> } <mask> <mask> return { <mask> identifier: CLIENT_ID.IP, <mask> use_global_settings: true, <mask> use_global_blocked_services: true, <mask> }; <mask> }; <mask> </s> + client: add multiple fields client form </s> r...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/components/Settings/Clients/ClientsTable.js
accessor: 'ids',
<mask> <mask> columns = [ <mask> { <mask> Header: this.props.t('table_client'), <mask> accessor: 'ip', <mask> minWidth: 150, <mask> Cell: (row) => { <mask> if (row.original && row.original.mac) { <mask> return ( <...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/components/Settings/Clients/ClientsTable.js
const { value } = row;
<mask> Header: this.props.t('table_client'), <mask> accessor: 'ip', <mask> minWidth: 150, <mask> Cell: (row) => { <mask> if (row.original && row.original.mac) { <mask> return ( <mask> <div className="logs_...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/components/Settings/Clients/ClientsTable.js
return ( <div className="logs__row logs__row--overflow"> <span className="logs__text"> {value.map(address => ( <div key={address} title={address}> {address} ...
<mask> </div> <mask> ); <mask> } <mask> <mask> return ''; <mask> }, <mask> }, <mask> { <mask> Header: this.props.t('table_name'), <mask> accessor: 'name', </s> + client: add multip...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/components/Settings/Clients/ClientsTable.js
<div className="logs__text">{title}</div>
<mask> ); <mask> <mask> return ( <mask> <div className="logs__row logs__row--overflow"> <mask> <div className="logs__text" title={title}> <mask> {title} <mask> </div> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/components/Settings/Clients/ClientsTable.js
import { Field, FieldArray, reduxForm, formValueSelector } from 'redux-form';
<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'; <mask> <mask> ...
[ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/components/Settings/Clients/Form.js
import i18n from '../../../i18n';
<mask> import { Field, FieldArray, reduxForm, formValueSelector } from 'redux-form'; <mask> import { Trans, withNamespaces } from 'react-i18next'; <mask> import flow from 'lodash/flow'; <mask> <mask> import Tabs from '../../ui/Tabs'; <mask> import { toggleAllServices } from '../../../helpers/helpers'; <mask> im...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/components/Settings/Clients/Form.js
import { renderField, renderGroupField, renderSelectField, renderServiceField, } from '../../../helpers/form'; import { SERVICES } from '../../../helpers/constants';
<mask> import flow from 'lodash/flow'; <mask> <mask> import Tabs from '../../ui/Tabs'; <mask> import { toggleAllServices } from '../../../helpers/helpers'; <mask> import { renderField, renderRadioField, renderSelectField, renderServiceField, ip, mac, required } from '../../../helpers/form'; <mask> import { CLIEN...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/components/Settings/Clients/Form.js
<mask> reset, <mask> change, <mask> pristine, <mask> submitting, <mask> clientIdentifier, <mask> useGlobalSettings, <mask> useGlobalServices, <mask> toggleClientModal, <mask> processingAdding, <mask> processingUpdating, </s> + cl...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/components/Settings/Clients/Form.js
invalid,
<mask> useGlobalServices, <mask> toggleClientModal, <mask> processingAdding, <mask> processingUpdating, <mask> } = props; <mask> <mask> return ( <mask> <form onSubmit={handleSubmit}> <mask> <div className="modal-body"> <mask> <div cl...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/components/Settings/Clients/Form.js
<div className="form__group mb-0"> <div className="form__group"> <Field id="name" name="name" component={renderField} type="text" ...
<mask> <mask> return ( <mask> <form onSubmit={handleSubmit}> <mask> <div className="modal-body"> <mask> <div className="form__group"> <mask> <div className="form__inline mb-2"> <mask> <strong className="mr-3"> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "re...
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/components/Settings/Clients/Form.js
<div className="form__group"> <div className="form__label"> <strong className="mr-3"> <Trans>client_identifier</Trans> </strong>
<mask> placeholder="MAC" <mask> /> <mask> </div> <mask> </div> <mask> <div className="row"> <mask> <div className="col col-sm-6"> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "re...
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/components/Settings/Clients/Form.js
<div className="form__desc mt-0"> <Trans components={[ <a href="#dhcp" key="0"> link </a>, ]...
<mask> /> <mask> </div> <mask> )} <mask> </div> <mask> <div className="col col-sm-6"> <mask> <Field <mask> id...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/components/Settings/Clients/Form.js
<div className="form__group"> <FieldArray name="ids" component={renderFields(t('form_enter_id'), t('form_add_id'))} />
<mask> validate={[required]} <mask> /> <mask> </div> <mask> </div> <mask> <div className="form__desc"> <mask> <Trans <mask> components={[...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156
client/src/components/Settings/Clients/Form.js