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
config.Lock() defer config.Unlock()
<mask> <mask> func startDNSServer() error { <mask> if isRunning() { <mask> return fmt.Errorf("unable to start forwarding DNS server: Already running") <mask> } <mask> </s> Pull request: all: fix some races Updates #3087. Squashed commit of the following: commit e888ce524f286f3c34e14e0086336b65a95fa020 A...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5acae6e204ab3f5d92449c1231dee754c1db9abb
internal/home/dns.go
func() { config.Lock() defer config.Unlock() config.Language = language }()
<mask> <mask> return <mask> } <mask> <mask> config.Language = language <mask> onConfigModified() <mask> returnOK(w) <mask> } </s> Pull request: all: fix some races Updates #3087. Squashed commit of the following: commit e888ce524f286f3c34e14e0086336b65a95fa020 Author: Ainar Garipov <A.Garipov@AdGuar...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5acae6e204ab3f5d92449c1231dee754c1db9abb
internal/home/i18n.go
renderInputField,
<mask> import { Trans, withNamespaces } from 'react-i18next'; <mask> import flow from 'lodash/flow'; <mask> <mask> import { <mask> renderField, <mask> renderRadioField, <mask> renderSelectField, <mask> required, <mask> ipv4, <mask> ipv6, </s> * client: fix render field for DNS settin...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5ba45b91c9cfde84fc0866e6b3fca679504975e7
client/src/components/Settings/Dns/Config/Form.js
component={renderInputField}
<mask> </div> <mask> <Field <mask> name="ratelimit" <mask> type="number" <mask> component={renderField} <mask> className="form-control" <mask> placeholde...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5ba45b91c9cfde84fc0866e6b3fca679504975e7
client/src/components/Settings/Dns/Config/Form.js
component={renderInputField}
<mask> <Trans>blocking_ipv4_desc</Trans> <mask> </div> <mask> <Field <mask> name="blocking_ipv4" <mask> component={renderField} <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5ba45b91c9cfde84fc0866e6b3fca679504975e7
client/src/components/Settings/Dns/Config/Form.js
component={renderInputField}
<mask> <Trans>blocking_ipv6_desc</Trans> <mask> </div> <mask> <Field <mask> name="blocking_ipv6" <mask> component={renderField} <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5ba45b91c9cfde84fc0866e6b3fca679504975e7
client/src/components/Settings/Dns/Config/Form.js
AllServers: false,
<mask> QueryLogEnabled: true, <mask> Ratelimit: 20, <mask> RefuseAny: true, <mask> BootstrapDNS: "8.8.8.8:53", <mask> }, <mask> UpstreamDNS: defaultDNS, <mask> }, <mask> TLS: tlsConfig{ </s> Fix #596 - Intelligent Optimal DNS Resolution
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5bc6d00aa03baa826ed84b3c134ed80db05e1388
config.go
"all_servers": config.DNS.AllServers,
<mask> "querylog_enabled": config.DNS.QueryLogEnabled, <mask> "running": isRunning(), <mask> "bootstrap_dns": config.DNS.BootstrapDNS, <mask> "upstream_dns": config.DNS.UpstreamDNS, <mask> "version": VersionString, <mask> "language": config.Language, <mask...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5bc6d00aa03baa826ed84b3c134ed80db05e1388
control.go
http.HandleFunc("/control/all_servers/enable", postInstall(optionalAuth(ensurePOST(handleAllServersEnable)))) http.HandleFunc("/control/all_servers/disable", postInstall(optionalAuth(ensurePOST(handleAllServersDisable)))) http.HandleFunc("/control/all_servers/status", postInstall(optionalAuth(ensureGET(handleAllServ...
<mask> http.HandleFunc("/control/querylog_enable", postInstall(optionalAuth(ensurePOST(handleQueryLogEnable)))) <mask> http.HandleFunc("/control/querylog_disable", postInstall(optionalAuth(ensurePOST(handleQueryLogDisable)))) <mask> http.HandleFunc("/control/set_upstream_dns", postInstall(optionalAuth(ensurePOST(...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5bc6d00aa03baa826ed84b3c134ed80db05e1388
control.go
AllServers bool `yaml:"all_servers"`
<mask> Ratelimit int `yaml:"ratelimit"` <mask> RatelimitWhitelist []string `yaml:"ratelimit_whitelist"` <mask> RefuseAny bool `yaml:"refuse_any"` <mask> BootstrapDNS string `yaml:"bootstrap_dns"` <mask> <mask> dnsfilter.Config `yaml:",inline"` <mask> } <mask> <mask> //...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5bc6d00aa03baa826ed84b3c134ed80db05e1388
dnsforward/dnsforward.go
AllServers: s.AllServers,
<mask> Upstreams: s.Upstreams, <mask> Handler: s.handleDNSRequest, <mask> } <mask> <mask> if s.TLSListenAddr != nil && s.CertificateChain != "" && s.PrivateKey != "" { <mask> proxyConfig.TLSListenAddr = s.TLSListenAddr <mask> keypair, err := tls.X509KeyPair([]byte(s.CertificateChai...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5bc6d00aa03baa826ed84b3c134ed80db05e1388
dnsforward/dnsforward.go
<mask> import React from 'react'; <mask> import PropTypes from 'prop-types'; <mask> import { Trans, withNamespaces } from 'react-i18next'; <mask> <mask> import { getDnsAddress } from '../../helpers/helpers'; <mask> <mask> const Version = (props) => { <mask> const { <mask> dnsVersion, dnsAddresses...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c7c9964b86773855a834b31329ab3c7e98e2554
client/src/components/Header/Version.js
dnsVersion, dnsAddresses, processingVersion, t,
<mask> import { getDnsAddress } from '../../helpers/helpers'; <mask> <mask> const Version = (props) => { <mask> const { <mask> dnsVersion, dnsAddresses, dnsPort, processingVersion, t, <mask> } = props; <mask> <mask> return ( <mask> <div className="nav-version"> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c7c9964b86773855a834b31329ab3c7e98e2554
client/src/components/Header/Version.js
{dnsAddresses.map(ip => <li key={ip}>{ip}</li>)}
<mask> <Trans>dns_addresses</Trans> <mask> </div> <mask> <div className="popover__body popover__body--address"> <mask> <div className="popover__list"> <mask> {dnsAddresses.map(ip => ( <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c7c9964b86773855a834b31329ab3c7e98e2554
client/src/components/Header/Version.js
<mask> import React from 'react'; <mask> import PropTypes from 'prop-types'; <mask> import { Trans, withNamespaces } from 'react-i18next'; <mask> <mask> import { getDnsAddress } from '../../helpers/helpers'; <mask> <mask> import Guide from '../ui/Guide'; <mask> import Card from '../ui/Card'; <mask> import Pa...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c7c9964b86773855a834b31329ab3c7e98e2554
client/src/components/SetupGuide/index.js
<mask> const SetupGuide = ({ <mask> t, <mask> dashboard: { <mask> dnsAddresses, <mask> dnsPort, <mask> }, <mask> }) => ( <mask> <div className="guide"> <mask> <PageTitle title={t('setup_guide')} /> <mask> <Card> </s> + client: add DNS privacy tab to setup guide...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c7c9964b86773855a834b31329ab3c7e98e2554
client/src/components/SetupGuide/index.js
{dnsAddresses.map(ip => <li key={ip}>{ip}</li>)}
<mask> <div className="mt-1"> <mask> <Trans>install_devices_address</Trans>: <mask> </div> <mask> <div className="mt-2 font-weight-bold"> <mask> {dnsAddresses <mask> .map(ip => <li key={ip}>{getDnsAddre...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c7c9964b86773855a834b31329ab3c7e98e2554
client/src/components/SetupGuide/index.js
import PropTypes from 'prop-types';
<mask> import React from 'react'; <mask> import { Trans, withNamespaces } from 'react-i18next'; <mask> <mask> import Tabs from '../ui/Tabs'; <mask> import Icons from '../ui/Icons'; </s> + client: add DNS privacy tab to setup guide </s> remove import { getDnsAddress } from '../../helpers/helpers'; </s> add </s...
[ "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c7c9964b86773855a834b31329ab3c7e98e2554
client/src/components/ui/Guide.js
const Guide = props => (
<mask> <mask> import Tabs from '../ui/Tabs'; <mask> import Icons from '../ui/Icons'; <mask> <mask> const Guide = () => ( <mask> <div> <mask> <Icons /> <mask> <Tabs> <mask> <div label="Router"> <mask> <div className="tab__title"> </s> + client: add DNS privacy...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c7c9964b86773855a834b31329ab3c7e98e2554
client/src/components/ui/Guide.js
<symbol id="dns_privacy" viewBox="0 0 30 30" stroke="none" fill="currentColor" strokeLinecap="round" strokeLinejoin="round"> <path d="M15 3C10.57 3 6.701 5.419 4.623 9h2.39a10.063 10.063 0 0 1 4.05-3.19c-.524.89-.961 1.973-1.3 3.19h2.108c.79-2.459 1.998-4 3.129-4s2.339 1.541 3.129 4h2.107c-.338-1.21...
<mask> <symbol id="refresh" viewBox="0 0 24 24" stroke="currentColor" fill="none" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"> <mask> <path d="M23 4v6h-6M1 20v-6h6"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/> <mask> </symbol> <mask> ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c7c9964b86773855a834b31329ab3c7e98e2554
client/src/components/ui/Icons.js
title,
<mask> const { <mask> activeTab, <mask> label, <mask> } = this.props; <mask> <mask> const tabClass = classnames({ <mask> tab__control: true, <mask> 'tab__control--active': activeTab === label, </s> + client: add DNS privacy tab to setup g...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c7c9964b86773855a834b31329ab3c7e98e2554
client/src/components/ui/Tab.js
{title || label}
<mask> > <mask> <svg className="tab__icon"> <mask> <use xlinkHref={`#${label.toLowerCase()}`} /> <mask> </svg> <mask> {label} <mask> </div> <mask> ); <mask> } <mask> } <mask> </s> + client: add DNS privac...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c7c9964b86773855a834b31329ab3c7e98e2554
client/src/components/ui/Tab.js
title: PropTypes.string,
<mask> activeTab: PropTypes.string.isRequired, <mask> label: PropTypes.string.isRequired, <mask> onClick: PropTypes.func.isRequired, <mask> }; <mask> <mask> export default Tab; </s> + client: add DNS privacy tab to setup guide </s> remove const { label } = child.props; </s> ...
[ "keep", "keep", "add", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c7c9964b86773855a834b31329ab3c7e98e2554
client/src/components/ui/Tab.js
const { label, title } = child.props;
<mask> return ( <mask> <div className="tabs"> <mask> <div className="tabs__controls"> <mask> {children.map((child) => { <mask> const { label } = child.props; <mask> <mask> return ( <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c7c9964b86773855a834b31329ab3c7e98e2554
client/src/components/ui/Tabs.js
title={title}
<mask> return ( <mask> <Tab <mask> key={label} <mask> label={label} <mask> activeTab={activeTab} <mask> onClick={this.onClickTabContro...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c7c9964b86773855a834b31329ab3c7e98e2554
client/src/components/ui/Tabs.js
"import/prefer-default-export": "off", "no-alert": "off"
<mask> "no-shadow": "off", <mask> "camelcase": "off", <mask> "no-console": ["warn", { "allow": ["warn", "error"] }], <mask> "import/no-extraneous-dependencies": ["error", { "devDependencies": true }], <mask> "import/prefer-default-export": "off" <mask> } <mask> } </s>...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/.eslintrc
"check_not_found": "Doesn't exist in any filter", "client_confirm_block": "Are you sure you want to block the client \"{{ip}}\"?", "client_confirm_unblock": "Are you sure you want to unblock the client \"{{ip}}\"?", "client_blocked": "Client \"{{ip}}\" successfully blocked", "client_unblocked": "Cli...
<mask> "check_cname": "CNAME: {{cname}}", <mask> "check_reason": "Reason: {{reason}}", <mask> "check_rule": "Rule: {{rule}}", <mask> "check_service": "Service name: {{service}}", <mask> "check_not_found": "Doesn't exist in any filter" <mask> } </s> Merge: + client: handle client block and unb...
[ "keep", "keep", "keep", "keep", "replace", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/__locales/en.json
import { t } from 'i18next';
<mask> import { createAction } from 'redux-actions'; <mask> import apiClient from '../api/Api'; <mask> import { addErrorToast, addSuccessToast } from './index'; <mask> import { getStats, getStatsConfig } from './stats'; <mask> import { normalizeTextarea } from '../helpers/helpers'; </s> Merge: + client: handle cl...
[ "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/actions/access.js
import { getStats, getStatsConfig } from './stats';
<mask> import { t } from 'i18next'; <mask> <mask> import apiClient from '../api/Api'; <mask> import { addErrorToast, addSuccessToast } from './index'; <mask> import { normalizeTextarea } from '../helpers/helpers'; <mask> import { ACTION } from '../helpers/constants'; <mask> <mask> export const getAccessListRe...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/actions/access.js
import { ACTION } from '../helpers/constants';
<mask> import { getStats, getStatsConfig } from './stats'; <mask> import { normalizeTextarea } from '../helpers/helpers'; <mask> <mask> export const getAccessListRequest = createAction('GET_ACCESS_LIST_REQUEST'); <mask> export const getAccessListFailure = createAction('GET_ACCESS_LIST_FAILURE'); <mask> export co...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/actions/access.js
allowed_clients: normalizeTextarea(allowed_clients), disallowed_clients: normalizeTextarea(disallowed_clients), blocked_hosts: normalizeTextarea(blocked_hosts),
<mask> try { <mask> const { allowed_clients, disallowed_clients, blocked_hosts } = config; <mask> <mask> const values = { <mask> allowed_clients: (allowed_clients && normalizeTextarea(allowed_clients)) || [], <mask> disallowed_clients: (disallowed_clients && normalizeT...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/actions/access.js
values.bootstrap_dns = normalizeTextarea(values.bootstrap_dns); values.upstream_dns = normalizeTextarea(values.upstream_dns);
<mask> export const setUpstream = config => async (dispatch) => { <mask> dispatch(setUpstreamRequest()); <mask> try { <mask> const values = { ...config }; <mask> values.bootstrap_dns = ( <mask> values.bootstrap_dns && normalizeTextarea(values.bootstrap_dns) <mask> ) ||...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/actions/index.js
values.bootstrap_dns = normalizeTextarea(values.bootstrap_dns); values.upstream_dns = normalizeTextarea(values.upstream_dns);
<mask> export const testUpstream = config => async (dispatch) => { <mask> dispatch(testUpstreamRequest()); <mask> try { <mask> const values = { ...config }; <mask> values.bootstrap_dns = ( <mask> values.bootstrap_dns && normalizeTextarea(values.bootstrap_dns) <mask> ) ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/actions/index.js
import { normalizeTopStats, secondsToMilliseconds, getParamsForClientsSearch, addClientInfo, addClientStatus } 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 } from '../helpers/helpers'; <mask> <mask> e...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/actions/stats.js
const accessData = await apiClient.getAccessList(); const { disallowed_clients } = accessData;
<mask> const normalizedTopClients = normalizeTopStats(stats.top_clients); <mask> const clientsParams = getParamsForClientsSearch(normalizedTopClients, 'name'); <mask> const clients = await apiClient.findClients(clientsParams); <mask> const topClientsWithInfo = addClientInfo(normalize...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/actions/stats.js
const topClientsWithStatus = addClientStatus(topClientsWithInfo, disallowed_clients, 'name');
<mask> const accessData = await apiClient.getAccessList(); <mask> const { disallowed_clients } = accessData; <mask> const topClientsWithInfo = addClientInfo(normalizedTopClients, clients, 'name'); <mask> <mask> const normalizedStats = { <mask> ...stats, <mask> ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/actions/stats.js
top_clients: topClientsWithStatus,
<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), <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/actions/stats.js
className="-highlight card-table-overflow stats__table"
<mask> showPagination={false} <mask> noDataText={t('no_domains_found')} <mask> minRows={6} <mask> defaultPageSize={100} <mask> className="-striped -highlight card-table-overflow stats__table" <mask> /> <mask> </Ca...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Dashboard/BlockedDomains.js
import React, { Fragment } from 'react';
<mask> import React from 'react'; <mask> import ReactTable from 'react-table'; <mask> import PropTypes from 'prop-types'; <mask> import { Trans, withNamespaces } from 'react-i18next'; <mask> <mask> import Card from '../ui/Card'; </s> Merge: + client: handle client block and unblock from the top clients table C...
[ "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Dashboard/Clients.js
const renderBlockingButton = (blocked, ip, handleClick, processing) => { let buttonProps = { className: 'btn-outline-danger', text: 'block_btn', type: 'block', }; if (blocked) { buttonProps = { className: 'btn-outline-secondary', text: 'unblock_btn', ...
<mask> <mask> return <Cell value={value} percent={percent} color={percentColor} />; <mask> }; <mask> <mask> const clientCell = t => <mask> function cell(row) { <mask> return ( <mask> <div className="logs__row logs__row--overflow logs__row--column"> <mask> {...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Dashboard/Clients.js
const { original, value } = row; const { blocked } = original;
<mask> <mask> const clientCell = (t, toggleClientStatus, processing) => <mask> function cell(row) { <mask> return ( <mask> <Fragment> <mask> <div className="logs__row logs__row--overflow logs__row--column"> <mask> {formatClientCell(row, t)} <mask> ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Dashboard/Clients.js
<Fragment> <div className="logs__row logs__row--overflow logs__row--column"> {formatClientCell(row, t)} </div> {renderBlockingButton(blocked, value, toggleClientStatus, processing)} </Fragment>
<mask> <mask> const clientCell = t => <mask> function cell(row) { <mask> return ( <mask> <div className="logs__row logs__row--overflow logs__row--column"> <mask> {formatClientCell(row, t)} <mask> </div> <mask> ); <mask> }; <mask> <mask> const ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Dashboard/Clients.js
t, refreshButton, topClients, subtitle, dnsQueries, toggleClientStatus, processingAccessSet,
<mask> ); <mask> }; <mask> <mask> const Clients = ({ <mask> t, refreshButton, topClients, subtitle, dnsQueries, <mask> }) => ( <mask> <Card <mask> title={t('top_clients')} <mask> subtitle={subtitle} <mask> bodyType="card-table" </s> Merge: + client: handle client ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Dashboard/Clients.js
data={topClients.map(({ name: ip, count, info, blocked, }) => ({
<mask> bodyType="card-table" <mask> refresh={refreshButton} <mask> > <mask> <ReactTable <mask> data={topClients.map(({ name: ip, count, info }) => ({ <mask> ip, <mask> count, <mask> info, <mask> }))} <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Dashboard/Clients.js
blocked,
<mask> count, <mask> info, <mask> }))} <mask> columns={[ <mask> { <mask> Header: 'IP', </s> Merge: + client: handle client block and unblock from the top clients table Closes #896 Squashed commit of the following: comm...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Dashboard/Clients.js
Cell: clientCell(t, toggleClientStatus, processingAccessSet),
<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), <mask> }, <m...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Dashboard/Clients.js
className="-highlight card-table-overflow clients__table" getTrProps={(_state, rowInfo) => { if (!rowInfo) { return {}; } const { blocked } = rowInfo.original; if (blocked) { return { ...
<mask> showPagination={false} <mask> noDataText={t('no_clients_found')} <mask> minRows={6} <mask> defaultPageSize={100} <mask> className="-striped -highlight card-table-overflow" <mask> /> <mask> </Card> <mask> ); <mask> <mask> Clients.p...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Dashboard/Clients.js
toggleClientStatus: PropTypes.func.isRequired, processingAccessSet: PropTypes.bool.isRequired,
<mask> autoClients: PropTypes.array.isRequired, <mask> subtitle: PropTypes.string.isRequired, <mask> t: PropTypes.func.isRequired, <mask> }; <mask> <mask> export default withNamespaces()(Clients); </s> Merge: + client: handle client block and unblock from the top clients table Closes #896 Squashed...
[ "keep", "keep", "add", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Dashboard/Clients.js
className="-highlight card-table-overflow stats__table"
<mask> showPagination={false} <mask> noDataText={t('no_domains_found')} <mask> minRows={6} <mask> defaultPageSize={100} <mask> className="-striped -highlight card-table-overflow stats__table" <mask> /> <mask> </Card> <mask> ); <mask> <ma...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Dashboard/QueriedDomains.js
import { ACTION } from '../../helpers/constants';
<mask> import BlockedDomains from './BlockedDomains'; <mask> <mask> import PageTitle from '../ui/PageTitle'; <mask> import Loading from '../ui/Loading'; <mask> import './Dashboard.css'; <mask> <mask> class Dashboard extends Component { <mask> componentDidMount() { <mask> this.getAllStats(); </s>...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Dashboard/index.js
toggleClientStatus = (type, ip) => { const confirmMessage = type === ACTION.block ? 'client_confirm_block' : 'client_confirm_unblock'; if (window.confirm(this.props.t(confirmMessage, { ip }))) { this.props.toggleClientBlock(type, ip); } };
<mask> ); <mask> }; <mask> <mask> render() { <mask> const { <mask> dashboard, stats, access, t, <mask> } = this.props; <mask> const statsProcessing = stats.processingStats </s> Merge: + client: handle client block and unblock from the top clients table Clos...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Dashboard/index.js
const { dashboard, stats, access, t, } = this.props; const statsProcessing = stats.processingStats || stats.processingGetConfig;
<mask> ); <mask> }; <mask> <mask> render() { <mask> const { dashboard, stats, t } = this.props; <mask> const statsProcessing = stats.processingStats || stats.processingGetConfig; <mask> <mask> const subtitle = <mask> stats.interval === 1 <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Dashboard/index.js
toggleClientStatus={this.toggleClientStatus} processingAccessSet={access.processingSet}
<mask> clients={dashboard.clients} <mask> autoClients={dashboard.autoClients} <mask> refreshButton={refreshButton} <mask> /> <mask> </div> <mask> ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Dashboard/index.js
access: PropTypes.object.isRequired,
<mask> <mask> Dashboard.propTypes = { <mask> dashboard: PropTypes.object.isRequired, <mask> stats: PropTypes.object.isRequired, <mask> getStats: PropTypes.func.isRequired, <mask> getStatsConfig: PropTypes.func.isRequired, <mask> toggleProtection: PropTypes.func.isRequired, <mask> getCli...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Dashboard/index.js
toggleClientBlock: PropTypes.func.isRequired, getAccessList: PropTypes.func.isRequired,
<mask> getClients: PropTypes.func.isRequired, <mask> t: PropTypes.func.isRequired, <mask> }; <mask> <mask> export default withNamespaces()(Dashboard); </s> Merge: + client: handle client block and unblock from the top clients table Closes #896 Squashed commit of the following: commit 776de2ae0a62823b8...
[ "keep", "add", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Dashboard/index.js
.logs__action, .table__action {
<mask> margin-left: 0; <mask> margin-right: 5px; <mask> } <mask> <mask> .logs__action { <mask> position: absolute; <mask> top: 10px; <mask> right: 15px; <mask> background-color: #fff; <mask> border-radius: 4px; </s> Merge: + client: handle client block and unblock from the top cl...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Logs/Logs.css
top: 11px;
<mask> } <mask> <mask> .logs__action { <mask> position: absolute; <mask> top: 10px; <mask> right: 15px; <mask> background-color: #fff; <mask> border-radius: 4px; <mask> transition: opacity 0.2s ease, visibility 0.2s ease; <mask> visibility: hidden; </s> Merge: + client: handle cl...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Logs/Logs.css
.logs__table .rt-td, .clients__table .rt-td {
<mask> visibility: hidden; <mask> opacity: 0; <mask> } <mask> <mask> .logs__table .rt-td { <mask> position: relative; <mask> } <mask> <mask> .logs__table .rt-tr:hover .logs__action { <mask> visibility: visible; </s> Merge: + client: handle client block and unblock from the top clients table...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Logs/Logs.css
.logs__table .rt-tr:hover .logs__action, .clients__table .rt-tr:hover .table__action {
<mask> .logs__table .rt-td { <mask> position: relative; <mask> } <mask> <mask> .logs__table .rt-tr:hover .logs__action { <mask> visibility: visible; <mask> opacity: 1; <mask> } <mask> <mask> .logs__table .rt-tr-group:first-child .tooltip-custom:before { </s> Merge: + client: handle client block...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/components/Logs/Logs.css
import { toggleClientBlock, getAccessList } from '../actions/access';
<mask> import { toggleProtection, getClients } from '../actions'; <mask> import { getStats, getStatsConfig, setStatsConfig } from '../actions/stats'; <mask> import Dashboard from '../components/Dashboard'; <mask> <mask> const mapStateToProps = (state) => { <mask> const { dashboard, stats, access } = state; ...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/containers/Dashboard.js
const { dashboard, stats, access } = state; const props = { dashboard, stats, access };
<mask> import { getStats, getStatsConfig, setStatsConfig } from '../actions/stats'; <mask> import Dashboard from '../components/Dashboard'; <mask> <mask> const mapStateToProps = (state) => { <mask> const { dashboard, stats } = state; <mask> const props = { dashboard, stats }; <mask> return props; <...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/containers/Dashboard.js
toggleClientBlock, getAccessList,
<mask> getClients, <mask> getStats, <mask> getStatsConfig, <mask> setStatsConfig, <mask> }; <mask> <mask> export default connect( <mask> mapStateToProps, <mask> mapDispatchToProps, </s> Merge: + client: handle client block and unblock from the top clients table Closes #896 Squashed ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/containers/Dashboard.js
export const addClientStatus = (data, disallowedClients, param) => ( data.map((row) => { const clientIp = row[param]; const blocked = !!(disallowedClients && disallowedClients.includes(clientIp)); return { ...row, blocked, }; }) );
<mask> }) <mask> ); <mask> <mask> export const normalizeFilteringStatus = (filteringStatus) => { <mask> const { <mask> enabled, filters, user_rules: userRules, interval, <mask> } = filteringStatus; <mask> const newFilters = filters </s> Merge: + client: handle client block and unblock ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/helpers/helpers.js
export const normalizeTextarea = (text) => { if (!text) { return []; } return text.replace(/[;, ]/g, '\n').split('\n').filter(n => n); };
<mask> window.location.replace(`http://${hostname}:${httpPort}/${hash}`); <mask> } <mask> }; <mask> <mask> export const normalizeTextarea = text => text && text.replace(/[;, ]/g, '\n').split('\n').filter(n => n); <mask> <mask> /** <mask> * Normalizes the topClients array <mask> * <mask> * @pa...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/helpers/helpers.js
[actions.toggleClientBlockRequest]: state => ({ ...state, processingSet: true }), [actions.toggleClientBlockFailure]: state => ({ ...state, processingSet: false }), [actions.toggleClientBlockSuccess]: state => ({ ...state, processingSet: false }),
<mask> }; <mask> return newState; <mask> }, <mask> }, <mask> { <mask> processing: true, <mask> processingSet: false, </s> Merge: + client: handle client block and unblock from the top clients table Closes #896 Squashed commit of the following: commit 77...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5c814b29e186a79678c3c96f7a741f44c3f2cec9
client/src/reducers/access.js
<mask> <mask> import ( <mask> "crypto/tls" <mask> "fmt" <mask> stdlog "log" <mask> "net" <mask> "net/http" <mask> "os" <mask> "os/signal" <mask> "path/filepath" </s> * use new logger - AdguardTeam/golibs/log </s> remove "github.com/hmage/golibs/log" </s> add "github.com/AdguardTeam/golibs/log" </...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
app.go
"github.com/AdguardTeam/golibs/log"
<mask> "sync" <mask> "syscall" <mask> "time" <mask> <mask> "github.com/gobuffalo/packr" <mask> ) <mask> <mask> // VersionString will be set through ldflags, contains current version <mask> var VersionString = "undefined" <mask> var httpServer *http.Server </s> * use new logger - AdguardTeam/golibs/log ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
app.go
<mask> "syscall" <mask> "time" <mask> <mask> "github.com/gobuffalo/packr" <mask> <mask> "github.com/hmage/golibs/log" <mask> ) <mask> <mask> // VersionString will be set through ldflags, contains current version <mask> var VersionString = "undefined" <mask> var httpServer *http.Server </s> * use new ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
app.go
log.Debug("Current working directory is %s", config.ourWorkingDir)
<mask> configureLogger(args) <mask> <mask> // print the first message after logger is configured <mask> log.Printf("AdGuard Home, version %s\n", VersionString) <mask> log.Tracef("Current working directory is %s", config.ourWorkingDir) <mask> if args.runningAsService { <mask> log.Printf("AdGuard Home is r...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
app.go
log.Info("AdGuard Home is running as a service")
<mask> // print the first message after logger is configured <mask> log.Printf("AdGuard Home, version %s\n", VersionString) <mask> log.Tracef("Current working directory is %s", config.ourWorkingDir) <mask> if args.runningAsService { <mask> log.Printf("AdGuard Home is running as a service") <mask> } <mask>...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
app.go
log.Debug("Couldn't load filter %d contents due to %s", filter.ID, err)
<mask> } <mask> err = filter.load() <mask> if err != nil { <mask> // This is okay for the first start, the filter will be loaded later <mask> log.Printf("Couldn't load filter %d contents due to %s", filter.ID, err) <mask> // clear LastUpdated so it gets fetched right away <mask> } <mask> <mas...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
app.go
log.Info("This is the first launch of AdGuard Home, redirecting everything to /install.html ")
<mask> registerControlHandlers() <mask> <mask> // add handlers for /install paths, we only need them when we're not configured yet <mask> if config.firstRun { <mask> log.Printf("This is the first launch of AdGuard Home, redirecting everything to /install.html ") <mask> http.Handle("/install.html", preInst...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
app.go
level := log.INFO if ls.Verbose { level = log.DEBUG } log.SetLevel(level)
<mask> if args.logFile != "" { <mask> ls.LogFile = args.logFile <mask> } <mask> <mask> log.Verbose = ls.Verbose <mask> <mask> if args.runningAsService && ls.LogFile == "" && runtime.GOOS == "windows" { <mask> // When running as a Windows service, use eventlog by default if nothing else is configured ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
app.go
log.SetOutput(file)
<mask> file, err := os.OpenFile(logFilePath, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0755) <mask> if err != nil { <mask> log.Fatalf("cannot create a log file: %s", err) <mask> } <mask> stdlog.SetOutput(file) <mask> } <mask> } <mask> <mask> func cleanup() { <mask> log.Printf("Stopping AdGuard Home")...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
app.go
log.Info("Stopping AdGuard Home")
<mask> } <mask> } <mask> <mask> func cleanup() { <mask> log.Printf("Stopping AdGuard Home") <mask> <mask> err := stopDNSServer() <mask> if err != nil { <mask> log.Printf("Couldn't stop DNS server: %s", err) <mask> } </s> * use new logger - AdguardTeam/golibs/log </s> remove log.Printf("Couldn't st...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
app.go
log.Error("Couldn't stop DNS server: %s", err)
<mask> log.Printf("Stopping AdGuard Home") <mask> <mask> err := stopDNSServer() <mask> if err != nil { <mask> log.Printf("Couldn't stop DNS server: %s", err) <mask> } <mask> err = stopDHCPServer() <mask> if err != nil { <mask> log.Printf("Couldn't stop DHCP server: %s", err) <mask> } </s> * use n...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
app.go
log.Error("Couldn't stop DHCP server: %s", err)
<mask> log.Printf("Couldn't stop DNS server: %s", err) <mask> } <mask> err = stopDHCPServer() <mask> if err != nil { <mask> log.Printf("Couldn't stop DHCP server: %s", err) <mask> } <mask> } <mask> <mask> // command-line arguments <mask> type options struct { </s> * use new logger - AdguardTeam/goli...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
app.go
log.Error("Got %s without argument\n", v)
<mask> for _, opt := range opts { <mask> if v == "--"+opt.longName || (opt.shortName != "" && v == "-"+opt.shortName) { <mask> if opt.callbackWithValue != nil { <mask> if i+1 >= len(os.Args) { <mask> log.Printf("ERROR: Got %s without argument\n", v) <mask> os.Exit(64) <mask> } <ma...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
app.go
log.Error("unknown option %v\n", v)
<mask> break <mask> } <mask> } <mask> if !knownParam { <mask> log.Printf("ERROR: unknown option %v\n", v) <mask> printHelp() <mask> os.Exit(64) <mask> } <mask> } <mask> </s> * use new logger - AdguardTeam/golibs/log </s> remove log.Printf("ERROR: Got %s without argument\n", v) ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
app.go
"github.com/AdguardTeam/golibs/log"
<mask> <mask> "github.com/AdguardTeam/AdGuardHome/dhcpd" <mask> "github.com/AdguardTeam/AdGuardHome/dnsfilter" <mask> "github.com/AdguardTeam/AdGuardHome/dnsforward" <mask> "github.com/hmage/golibs/log" <mask> yaml "gopkg.in/yaml.v2" <mask> ) <mask> <mask> const ( <mask> dataDir = "data" // data ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
config.go
log.Error("Couldn't get logging settings from the configuration: %s", err)
<mask> return l <mask> } <mask> err = yaml.Unmarshal(yamlFile, &l) <mask> if err != nil { <mask> log.Printf("Couldn't get logging settings from the configuration: %s", err) <mask> } <mask> return l <mask> } <mask> <mask> // parseConfig loads configuration from the YAML file </s> * use new logger - ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
config.go
log.Debug("Reading config file: %s", configFile)
<mask> <mask> // parseConfig loads configuration from the YAML file <mask> func parseConfig() error { <mask> configFile := config.getConfigFilename() <mask> log.Printf("Reading config file: %s", configFile) <mask> yamlFile, err := readConfigFile() <mask> if err != nil { <mask> log.Printf("Couldn't read c...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
config.go
log.Error("Couldn't read config file: %s", err)
<mask> configFile := config.getConfigFilename() <mask> log.Printf("Reading config file: %s", configFile) <mask> yamlFile, err := readConfigFile() <mask> if err != nil { <mask> log.Printf("Couldn't read config file: %s", err) <mask> return err <mask> } <mask> if yamlFile == nil { <mask> log.Printf("...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
config.go
log.Error("YAML file doesn't exist, skipping it")
<mask> log.Printf("Couldn't read config file: %s", err) <mask> return err <mask> } <mask> if yamlFile == nil { <mask> log.Printf("YAML file doesn't exist, skipping it") <mask> return nil <mask> } <mask> err = yaml.Unmarshal(yamlFile, &config) <mask> if err != nil { <mask> log.Printf("Couldn't p...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
config.go
log.Error("Couldn't parse config file: %s", err)
<mask> return nil <mask> } <mask> err = yaml.Unmarshal(yamlFile, &config) <mask> if err != nil { <mask> log.Printf("Couldn't parse config file: %s", err) <mask> return err <mask> } <mask> <mask> // Deduplicate filters <mask> deduplicateFilters() </s> * use new logger - AdguardTeam/golibs/log </s...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
config.go
log.Debug("Silently refusing to write config because first run and not configured yet")
<mask> func (c *configuration) write() error { <mask> c.Lock() <mask> defer c.Unlock() <mask> if config.firstRun { <mask> log.Tracef("Silently refusing to write config because first run and not configured yet") <mask> return nil <mask> } <mask> configFile := config.getConfigFilename() <mask> log.Trac...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
config.go
log.Debug("Writing YAML file: %s", configFile)
<mask> log.Tracef("Silently refusing to write config because first run and not configured yet") <mask> return nil <mask> } <mask> configFile := config.getConfigFilename() <mask> log.Tracef("Writing YAML file: %s", configFile) <mask> yamlText, err := yaml.Marshal(&config) <mask> if err != nil { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
config.go
log.Error("Couldn't generate YAML file: %s", err)
<mask> configFile := config.getConfigFilename() <mask> log.Tracef("Writing YAML file: %s", configFile) <mask> yamlText, err := yaml.Marshal(&config) <mask> if err != nil { <mask> log.Printf("Couldn't generate YAML file: %s", err) <mask> return err <mask> } <mask> err = safeWriteFile(configFile, yamlTe...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
config.go
log.Error("Couldn't save YAML config: %s", err)
<mask> return err <mask> } <mask> err = safeWriteFile(configFile, yamlText) <mask> if err != nil { <mask> log.Printf("Couldn't save YAML config: %s", err) <mask> return err <mask> } <mask> <mask> return nil <mask> } </s> * use new logger - AdguardTeam/golibs/log </s> remove log.Printf("Couldn't...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
config.go
log.Error("Couldn't write config: %s", err)
<mask> <mask> func writeAllConfigs() error { <mask> err := config.write() <mask> if err != nil { <mask> log.Printf("Couldn't write config: %s", err) <mask> return err <mask> } <mask> <mask> userFilter := userFilter() <mask> err = userFilter.save() </s> * use new logger - AdguardTeam/golibs/log </s...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
config.go
log.Error("Couldn't save the user filter: %s", err)
<mask> <mask> userFilter := userFilter() <mask> err = userFilter.save() <mask> if err != nil { <mask> log.Printf("Couldn't save the user filter: %s", err) <mask> return err <mask> } <mask> <mask> return nil <mask> } </s> * use new logger - AdguardTeam/golibs/log </s> remove log.Printf("Couldn't ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
config.go
"github.com/AdguardTeam/golibs/log"
<mask> "strings" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/dnsforward" <mask> "github.com/AdguardTeam/dnsproxy/upstream" <mask> "github.com/joomcode/errorx" <mask> "github.com/miekg/dns" <mask> govalidator "gopkg.in/asaskevich/govalidator.v4" </s> * use new logger - AdguardTeam/go...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
control.go
<mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/dnsforward" <mask> "github.com/AdguardTeam/dnsproxy/upstream" <mask> "github.com/hmage/golibs/log" <mask> "github.com/joomcode/errorx" <mask> "github.com/miekg/dns" <mask> govalidator "gopkg.in/asaskevich/govalidator.v4" <mask> ) <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
control.go
log.Error(errorText)
<mask> http.Error(w, errorText, http.StatusInternalServerError) <mask> } <mask> } <mask> <mask> func httpError(w http.ResponseWriter, code int, format string, args ...interface{}) { <mask> text := fmt.Sprintf(format, args...) <mask> log.Println(text) <mask> http.Error(w, text, code) <mask> } <mask> <...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
control.go
log.Info(text)
<mask> } <mask> <mask> func httpError(w http.ResponseWriter, code int, format string, args ...interface{}) { <mask> text := fmt.Sprintf(format, args...) <mask> log.Println(text) <mask> http.Error(w, text, code) <mask> } <mask> <mask> // --------------- <mask> // dns run control </s> * use new logger - A...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
control.go
log.Error("Couldn't write all configs: %s", err)
<mask> return err <mask> } <mask> return reconfigureDNSServer() <mask> } <mask> <mask> func httpUpdateConfigReloadDNSReturnOK(w http.ResponseWriter, r *http.Request) { <mask> err := writeAllConfigsAndReloadDNS() <mask> if err != nil { <mask> errorText := fmt.Sprintf("Couldn't write config file: %s", e...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
control.go
log.Tracef("")
<mask> <mask> func handleStatus(w http.ResponseWriter, r *http.Request) { <mask> data := map[string]interface{}{ <mask> "dns_address": config.DNS.BindHost, <mask> "http_port": config.BindPort, <mask> "dns_port": config.DNS.Port, <mask> "protection_enabled": config.DNS.Protecti...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
control.go
log.Error(errorText)
<mask> <mask> jsonVal, err := json.Marshal(data) <mask> if err != nil { <mask> errorText := fmt.Sprintf("Unable to marshal status json: %s", err) <mask> log.Println(errorText) <mask> http.Error(w, errorText, 500) <mask> return <mask> } <mask> w.Header().Set("Content-Type", "application/json") <ma...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
control.go
log.Error(errorText)
<mask> w.Header().Set("Content-Type", "application/json") <mask> _, err = w.Write(jsonVal) <mask> if err != nil { <mask> errorText := fmt.Sprintf("Unable to write response json: %s", err) <mask> log.Println(errorText) <mask> http.Error(w, errorText, 500) <mask> return <mask> } <mask> } <mask> </...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
control.go
log.Tracef("")
<mask> } <mask> <mask> func handleProtectionEnable(w http.ResponseWriter, r *http.Request) { <mask> config.DNS.ProtectionEnabled = true <mask> httpUpdateConfigReloadDNSReturnOK(w, r) <mask> } <mask> <mask> func handleProtectionDisable(w http.ResponseWriter, r *http.Request) { </s> * use new logger - Adguar...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
control.go