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
import { CheckboxField, renderInputField } from '../../helpers/form';
<mask> import { withTranslation } from 'react-i18next'; <mask> import flow from 'lodash/flow'; <mask> import classNames from 'classnames'; <mask> import { validatePath, validateRequiredValue } from '../../helpers/validators'; <mask> import { renderCheckboxField, renderInputField } from '../../helpers/form'; <mask...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Filters/Form.js
const renderCheckboxField = ( props, ) => <CheckboxField {...props} input={{ ...props.input, checked: props.disabled || props.input.checked, }} />; renderCheckboxField.propTypes = { // https://redux-form.com/8.3.0/docs/api/field.md/#props input: PropTypes.obj...
<mask> <use xlinkHref={`#${iconName}`} /> <mask> </svg> <mask> </a>); <mask> <mask> const renderFilters = ({ categories, filters }, selectedSources, t) => Object.keys(categories) <mask> .map((categoryId) => { <mask> const category = categories[categoryId]; <mask> const categoryF...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Filters/Form.js
name={filter.id}
<mask> const iconsData = getIconsData(homepage, source); <mask> <mask> return <div key={name} className="d-flex align-items-center pb-1"> <mask> <Field <mask> name={`${filter.id}`} <mask> type="checkbox" <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Filters/Form.js
<mask> type="checkbox" <mask> component={renderCheckboxField} <mask> placeholder={t(name)} <mask> disabled={isSelected} <mask> checked={isSelected} <mask> /> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Filters/Form.js
CheckboxField,
<mask> import { toggleAllServices } from '../../../helpers/helpers'; <mask> import { <mask> renderInputField, <mask> renderGroupField, <mask> renderCheckboxField, <mask> renderServiceField, <mask> } from '../../../helpers/form'; <mask> import { validateClientId, validateRequiredValue } from '../...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/Clients/Form.js
component={CheckboxField}
<mask> <div className="form__group" key={setting.name}> <mask> <Field <mask> name={setting.name} <mask> type="checkbox" <mask> component={renderCheckboxField} <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/Clients/Form.js
CheckboxField,
<mask> import { Trans, useTranslation } from 'react-i18next'; <mask> import { <mask> renderInputField, <mask> renderRadioField, <mask> renderCheckboxField, <mask> toNumber, <mask> } from '../../../../helpers/form'; <mask> import { <mask> validateIpv4, <mask> validateIpv6, </s> + clien...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/Dns/Config/Form.js
component={CheckboxField}
<mask> <div className="form__group form__group--settings"> <mask> <Field <mask> name={name} <mask> type="checkbox" <mask> component={renderCheckboxField} <mask> placeholder={t(placeh...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/Dns/Config/Form.js
CheckboxField,
<mask> import flow from 'lodash/flow'; <mask> <mask> import { <mask> renderInputField, <mask> renderCheckboxField, <mask> renderRadioField, <mask> toNumber, <mask> } from '../../../helpers/form'; <mask> import { <mask> validateIsSafePort, validatePort, validatePortQuic, validatePortTLS, ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/Encryption/Form.js
component={CheckboxField}
<mask> <div className="form__group form__group--settings"> <mask> <Field <mask> name="enabled" <mask> type="checkbox" <mask> component={renderCheckboxField} <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/Encryption/Form.js
component={CheckboxField}
<mask> <div className="form__group form__group--settings"> <mask> <Field <mask> name="force_https" <mask> type="checkbox" <mask> component={renderCheckboxField} <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/Encryption/Form.js
import { CheckboxField, toNumber } from '../../../helpers/form';
<mask> import { Field, reduxForm } from 'redux-form'; <mask> import { Trans, withTranslation } from 'react-i18next'; <mask> import flow from 'lodash/flow'; <mask> <mask> import { renderCheckboxField, toNumber } from '../../../helpers/form'; <mask> import { FILTERS_INTERVALS_HOURS, FORM_NAME } from '../../../help...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/FiltersConfig/Form.js
component={CheckboxField}
<mask> <Field <mask> name="enabled" <mask> type="checkbox" <mask> modifier="checkbox--settings" <mask> component={renderCheckboxField} <mask> placehol...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/FiltersConfig/Form.js
import { CheckboxField, renderRadioField, toNumber } from '../../../helpers/form';
<mask> import { Field, reduxForm } from 'redux-form'; <mask> import { Trans, withTranslation } from 'react-i18next'; <mask> import flow from 'lodash/flow'; <mask> <mask> import { renderCheckboxField, renderRadioField, toNumber } from '../../../helpers/form'; <mask> import { FORM_NAME, QUERY_LOG_INTERVALS_DAYS } ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/LogsConfig/Form.js
component={CheckboxField}
<mask> <div className="form__group form__group--settings"> <mask> <Field <mask> name="enabled" <mask> type="checkbox" <mask> component={renderCheckboxField} <mask> placeholder={t('query_log_enable')} <mask...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/LogsConfig/Form.js
component={CheckboxField}
<mask> <div className="form__group form__group--settings"> <mask> <Field <mask> name="anonymize_client_ip" <mask> type="checkbox" <mask> component={renderCheckboxField} <mask> placeholder={t('anonymize_clie...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/components/Settings/LogsConfig/Form.js
export const CheckboxField = ({
<mask> error: PropTypes.string, <mask> }).isRequired, <mask> }; <mask> <mask> export const renderCheckboxField = ({ <mask> input, <mask> placeholder, <mask> subtitle, <mask> disabled, <mask> onClick, </s> + client: 2154 Make renderCheckboxField a controlled input </s> remove ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/helpers/form.js
<mask> subtitle, <mask> disabled, <mask> onClick, <mask> modifier = 'checkbox--form', <mask> checked, <mask> meta: { touched, error }, <mask> }) => <> <mask> <label className={`checkbox ${modifier}`} onClick={onClick}> <mask> <span className="checkbox__marker" /> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/helpers/form.js
<input {...input} type="checkbox" className="checkbox__input" disabled={disabled} />
<mask> meta: { touched, error }, <mask> }) => <> <mask> <label className={`checkbox ${modifier}`} onClick={onClick}> <mask> <span className="checkbox__marker" /> <mask> <input {...input} type="checkbox" className="checkbox__input" disabled={disabled} <mask> checked={input.ch...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/helpers/form.js
<span className="checkbox__label-text checkbox__label-text--long"> <span className="checkbox__label-title">{placeholder}</span> {subtitle && <span className="checkbox__label-subtitle">{subtitle}</span>} </span> </span>
<mask> <span className="checkbox__marker" /> <mask> <input {...input} type="checkbox" className="checkbox__input" disabled={disabled} <mask> checked={input.checked || checked} /> <mask> <span className="checkbox__label"> <mask> <span className="checkbo...
[ "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/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/helpers/form.js
CheckboxField.propTypes = {
<mask> && error <mask> && <span className="form__message form__message--error"><Trans>{error}</Trans></span>} <mask> </>; <mask> <mask> renderCheckboxField.propTypes = { <mask> input: PropTypes.object.isRequired, <mask> placeholder: PropTypes.string, <mask> subtitle: PropTypes.string, <mas...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0ae00932e94429d25995114e2ba9a82f71377d79
client/src/helpers/form.js
if data.CertificateChain != "" { encoded := base64.StdEncoding.EncodeToString([]byte(data.CertificateChain)) data.CertificateChain = string(encoded) } if data.PrivateKey != "" { encoded := base64.StdEncoding.EncodeToString([]byte(data.PrivateKey)) data.PrivateKey = string(encoded) }
<mask> func handleTLSStatus(w http.ResponseWriter, r *http.Request) { <mask> data := config.TLS <mask> err := json.NewEncoder(w).Encode(&data) <mask> if err != nil { <mask> httpError(w, http.StatusInternalServerError, "Failed to marshal json with TLS status: %s", err) <mask> return </s> Don't keep certifi...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0aeca6bbf5b08d0f28f969162c0e5475c9ed7469
control.go
data.CertificateChain = string(certPEM)
<mask> if err != nil { <mask> httpError(w, http.StatusBadRequest, "Failed to base64-decode certificate chain: %s", err) <mask> return <mask> } <mask> <mask> log.Printf("got certificate: %s", certPEM) <mask> <mask> if data.PrivateKey != "" { </s> Don't keep certificates and keys encoded with bas...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0aeca6bbf5b08d0f28f969162c0e5475c9ed7469
control.go
data.PrivateKey = string(keyPEM)
<mask> } <mask> <mask> _, err = tls.X509KeyPair(certPEM, keyPEM) <mask> if err != nil { <mask> httpError(w, http.StatusBadRequest, "Invalid certificate or key: %s", err) <mask> return <mask> } <mask> } </s> Don't keep certificates and keys encoded with base64 in yaml config
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0aeca6bbf5b08d0f28f969162c0e5475c9ed7469
control.go
github.com/AdguardTeam/dnsproxy v0.41.0
<mask> <mask> go 1.17 <mask> <mask> require ( <mask> github.com/AdguardTeam/dnsproxy v0.40.6 <mask> github.com/AdguardTeam/golibs v0.10.4 <mask> github.com/AdguardTeam/urlfilter v0.15.2 <mask> github.com/NYTimes/gziphandler v1.1.1 <mask> github.com/ameshkov/dnscrypt/v2 v2.2.3 <mask> github.com/digineo...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0b72bcc5a1f4da47fe0dfc8154e71b94dcbc4896
go.mod
github.com/AdguardTeam/dnsproxy v0.41.0 h1:DZlzFEzDV/eKJz8b+dYctAYPrQscdsvbtBc/eFU+e9U= github.com/AdguardTeam/dnsproxy v0.41.0/go.mod h1:PZ9l22h3Er+5mxFQB7oHZMTvx+aa9R6LbzA/ikXQlS0=
<mask> dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= <mask> dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= <mask> dmitri.shuralyov.com/state v0.0.0-20180228185332-...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0b72bcc5a1f4da47fe0dfc8154e71b94dcbc4896
go.sum
for i, s := range s.conf.BogusNXDomain { subnet, err := netutil.ParseSubnet(s) if err != nil { log.Error("subnet at index %d: %s", i, err) continue
<mask> proxyConfig.UpstreamMode = proxy.UModeFastestAddr <mask> proxyConfig.FastestPingTimeout = s.conf.FastestTimeout.Duration <mask> } <mask> <mask> if len(s.conf.BogusNXDomain) > 0 { <mask> for _, s := range s.conf.BogusNXDomain { <mask> ip := net.ParseIP(s) <mask> if ip == nil { <mask> l...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0b72bcc5a1f4da47fe0dfc8154e71b94dcbc4896
internal/dnsforward/config.go
proxyConfig.BogusNXDomain = append(proxyConfig.BogusNXDomain, subnet)
<mask> continue <mask> } <mask> } <mask> <mask> // TLS settings <mask> err := s.prepareTLS(&proxyConfig) </s> Pull request: 1730 bogus cidr Merge in DNS/adguard-home from 1730-bogus-cidr to master Closes #1730. Squashed commit of the following: commit 0be54259ca4edb8752e9f7e5ea5104a2b51ed440 Author:...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0b72bcc5a1f4da47fe0dfc8154e71b94dcbc4896
internal/dnsforward/config.go
ip := proxyutil.IPFromRR(msg.Answer[0]).To16()
<mask> msg := &dns.Msg{} <mask> require.NoError(t, msg.Unpack(entry.Answer)) <mask> require.Len(t, msg.Answer, 1) <mask> <mask> ip := proxyutil.GetIPFromDNSRecord(msg.Answer[0]).To16() <mask> assert.Equal(t, answer, ip) <mask> } <mask> <mask> func testEntries() (entries []*logEntry) { <mask> rsrc := r...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0b72bcc5a1f4da47fe0dfc8154e71b94dcbc4896
internal/querylog/qlog_test.go
n--
<mask> time.Sleep(backoff) <mask> } <mask> <mask> switch len(addrs) { <mask> case 0: <mask> // Don't return errors in case the users want to try and enable <mask> // the DHCP server later. <mask> t := time.Duration(n) * backoff <mask> log.Error("dhcpv%d: no ip for iface after %d attempts and %s",...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/aghnet/interfaces.go
// seekTS performs binary search in the query log file looking for a record
<mask> file: f, <mask> }, nil <mask> } <mask> <mask> // SeekTS performs binary search in the query log file looking for a record <mask> // with the specified timestamp. Once the record is found, it sets <mask> // "position" so that the next ReadNext call returned that record. <mask> // <mask> // The algori...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogfile.go
func (q *QLogFile) seekTS(timestamp int64) (int64, int, error) {
<mask> // * It returns the position of the the line with the timestamp we were looking for <mask> // so that when we call "ReadNext" this line was returned. <mask> // * Depth of the search (how many times we compared timestamps). <mask> // * If we could not find it, it returns one of the errors described above. <m...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogfile.go
pos, _, err := q.seekTS(ts)
<mask> ts := readQLogTimestamp(line) <mask> assert.NotEqualValues(t, 0, ts) <mask> <mask> // Try seeking to that line now. <mask> pos, _, err := q.SeekTS(ts) <mask> require.NoError(t, err) <mask> assert.NotEqualValues(t, 0, pos) <mask> <mask> testLine, err := q.ReadNext() <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogfile_test.go
_, depth, err = q.seekTS(tc.ts)
<mask> t.Run(tc.name, func(t *testing.T) { <mask> assert.NotEqualValues(t, 0, tc.ts) <mask> <mask> var depth int <mask> _, depth, err = q.SeekTS(tc.ts) <mask> assert.NotEmpty(t, l.num) <mask> require.Error(t, err) <mask> <mask> if tc.leq { <mask> assert.LessOrEqual(t, depth, ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogfile_test.go
_, depth, err := q.seekTS(timestamp.Add(time.Second * time.Duration(tc.delta)).UnixNano())
<mask> ) <mask> <mask> q := NewTestQLogFileData(t, data) <mask> <mask> _, depth, err := q.SeekTS(timestamp.Add(time.Second * time.Duration(tc.delta)).UnixNano()) <mask> require.Truef(t, errors.Is(err, tc.wantErr), "%v", err) <mask> assert.Equal(t, tc.wantDepth, depth) <mask> }) <mask> } <m...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogfile_test.go
// seekTS performs binary search of a query log record with the specified
<mask> currentFile: (len(qFiles) - 1), <mask> }, nil <mask> } <mask> <mask> // SeekTS performs binary search of a query log record with the specified <mask> // timestamp. If the record is found, it sets QLogReader's position to point to <mask> // that line, so that the next ReadNext call returned this line....
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogreader.go
func (r *QLogReader) seekTS(timestamp int64) (err error) {
<mask> <mask> // SeekTS performs binary search of a query log record with the specified <mask> // timestamp. If the record is found, it sets QLogReader's position to point to <mask> // that line, so that the next ReadNext call returned this line. <mask> func (r *QLogReader) SeekTS(timestamp int64) (err error) { ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogreader.go
_, _, err = q.seekTS(timestamp) if err != nil { if errors.Is(err, ErrTSTooEarly) { // Look at the next file, since we've reached the end of this // one. If there is no next file, it's not found. err = ErrTSNotFound continue } else if errors.Is(err, ErrTSTooLate) { // Just seek to the sta...
<mask> // that line, so that the next ReadNext call returned this line. <mask> func (r *QLogReader) SeekTS(timestamp int64) (err error) { <mask> for i := len(r.qFiles) - 1; i >= 0; i-- { <mask> q := r.qFiles[i] <mask> _, _, err = q.SeekTS(timestamp) <mask> if err == nil { <mask> // Search is finished, ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", ...
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogreader.go
// The search is finished, and the searched element has been found. // Update currentFile only, position is already set properly in // QLogFile. r.currentFile = i return nil
<mask> return fmt.Errorf("seekts: file at index %d: %w", i, err) <mask> } <mask> } <mask> } <mask> <mask> if err != nil { <mask> return fmt.Errorf("seekts: %w", err) <mask> } <mask> </s> Pull request: querylog: fix logic Merge in DNS/adguard-home from fix-querylog-logs to master Squashed com...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogreader.go
if err != nil { return fmt.Errorf("seekts: %w", err) } return nil
<mask> break <mask> } <mask> } <mask> <mask> return fmt.Errorf("querylog: %w", err) <mask> } <mask> <mask> // SeekStart changes the current position to the end of the newest file <mask> // Please note that we're reading query log in the reverse order <mask> // and that's why log start is actually the...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogreader.go
want: ErrTSNotFound,
<mask> want: nil, <mask> }, { <mask> name: "non-existent_long_ago", <mask> time: "2000-02-19T01:23:16.920973+03:00", <mask> want: ErrTSTooEarly, <mask> }, { <mask> name: "non-existent_far_ahead", <mask> time: "2100-02-19T01:23:16.920973+03:00", <mask> want: nil, <mask> }, { </s> Pull request...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogreader_test.go
err = r.seekTS(ts.UnixNano())
<mask> t.Run(tc.name, func(t *testing.T) { <mask> ts, err := time.Parse(time.RFC3339Nano, tc.time) <mask> require.NoError(t, err) <mask> <mask> err = r.SeekTS(ts.UnixNano()) <mask> assert.ErrorIs(t, err, tc.want) <mask> }) <mask> } <mask> } <mask> </s> Pull request: querylog: fix logic Me...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/qlogreader_test.go
err = r.seekTS(params.olderThan.UnixNano())
<mask> <mask> if params.olderThan.IsZero() { <mask> err = r.SeekStart() <mask> } else { <mask> err = r.SeekTS(params.olderThan.UnixNano()) <mask> if err == nil { <mask> // Read to the next record, because we only need the one <mask> // that goes after it. <mask> _, err = r.ReadNext() <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0bd436f4b0f1196c49d788804310b8ef79970ca5
internal/querylog/search.go
<mask> "lint": "eslint -c ./scripts/lint/prod.js --ext .tsx --ext .ts ./", <mask> "go:build": "cd .. && make REBUILD_CLIENT=0 build", <mask> "go:run": "sudo ../AdguardHome" <mask> }, <mask> "husky": { <mask> "hooks": { <mask> "pre-commit": "yarn lint" <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/package.json
"@adguard/translate": "^0.2.0", "@ant-design/icons": "^4.4.0",
<mask> "license": "ISC", <mask> "dependencies": { <mask> "@sentry/react": "^5.27.0", <mask> "antd": "^4.7.2", <mask> "classnames": "^2.2.6", <mask> "dayjs": "^1.9.3", </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to maste...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/package.json
"react-router-dom": "^5.2.0", "recharts": "^2.0.3"
<mask> "mobx-react-lite": "^3.0.1", <mask> "qs": "^6.9.4", <mask> "react": "^17.0.0", <mask> "react-dom": "^17.0.0", <mask> "react-router-dom": "^5.2.0" <mask> }, <mask> "devDependencies": { <mask> "@types/classnames": "^2.2.10", <mask> "@types/qs...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/package.json
<mask> "eslint-plugin-react-hooks": "^4.2.0", <mask> "file-loader": "^6.1.1", <mask> "html-webpack-plugin": "^4.5.0", <mask> "http-proxy-middleware": "^1.0.6", <mask> "husky": "^4.3.0", <mask> "less": "^3.12.2", <mask> "less-loader": "^5.0.0", <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/package.json
import { TYPES, toCamel, schemaParamParser, uncapitalize } from './utils';
<mask> // eslint-disable-next-line import/no-extraneous-dependencies <mask> import * as morph from 'ts-morph'; <mask> <mask> import { ENT_DIR } from '../../consts'; <mask> import { TYPES, toCamel, schemaParamParser } from './utils'; <mask> <mask> const { Project, QuoteKind } = morph; <mask> <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/generateEntities.ts
const { properties: sProps, required, $ref, additionalProperties } = this.schemas[sName]; if ($ref) { const temp = $ref.split('/'); const importSchemaName = `${temp[temp.length - 1]}`; entityFile.addImportDeclaration({ defaultImport: importSchemaName, ...
<mask> '// All changes will be overwrited on commit.', <mask> '', <mask> ]); <mask> <mask> const { properties: sProps, required } = this.schemas[sName]; <mask> <mask> const importEntities: { type: string, isClass: boolean }[] = []; <mask> const entityInt...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/generateEntities.ts
const additionalPropsOnly = additionalProperties && sortedSProps.length === 0;
<mask> <mask> const sortedSProps = Object.keys(sProps || {}).sort(); <mask> // add server response interface to entityFile <mask> sortedSProps.forEach((sPropName) => { <mask> const [ <mask> pType, isArray, isClass, isImport, isAdditional <mask> ...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/generateEntities.ts
if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); const type = `Record<string, ${pType}${isArray ? '[]' : ''}>`; entityClass.addProperty({...
<mask> }); <mask> } <mask> } <mask> }); <mask> <mask> // add constructor; <mask> const ctor = entityClass.addConstructor({ <mask> parameters: [{ <mask> name: 'props', <mask> type: `I${sName...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/generateEntities.ts
if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); w.writeLine(`this.${additionalPropsOnly ? 'data' : `${uncapitalize(pType)}Data`} = Object.entries...
<mask> }); <mask> ctor.setBodyText((w) => { <mask> sortedSProps.forEach((sPropName) => { <mask> const [ <mask> pType, isArray, isClass, , isAdditional <mask> ] = schemaParamParser(sProps[sPropName], this.openapi); <mask> ...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/generateEntities.ts
if (additionalProperties) { const [ pType, isArray, isClass, isImport, isAdditional ] = schemaParamParser(additionalProperties, this.openapi); w.writeLine(`return Object.entries(this.${additionalPropsOnly ? 'data' : `${uncapitalize(pType)}D...
<mask> returnType: `I${sName}`, <mask> }); <mask> serialize.setBodyText((w) => { <mask> w.writeLine(`const data: I${sName} = {`); <mask> const unReqFields: string[] = []; <mask> sortedSProps.forEach((sPropName) => { <mask> const req ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/generateEntities.ts
if (additionalPropsOnly) { w.writeLine('return []') return; }
<mask> name: 'validate', <mask> returnType: `string[]`, <mask> }) <mask> validate.setBodyText((w) => { <mask> w.writeLine('const validate = {'); <mask> Object.keys(sProps || {}).forEach((sPropName) => { <mask> const [pType, isArray, ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/generateEntities.ts
type: additionalPropsOnly ? `I${sName}` : `Partial<I${sName}>`,
<mask> returnType: `${sName}`, <mask> }); <mask> update.addParameter({ <mask> name: 'props', <mask> type: `Partial<I${sName}>`, <mask> }); <mask> update.setBodyText((w) => { w.writeLine(`return new ${sName}({ ...this.serialize(), ...props });`);...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/generateEntities.ts
const uncapitalize = (s: string) => { return s[0].toLowerCase() + s.slice(1); };
<mask> }; <mask> const capitalize = (s: string) => { <mask> return s[0].toUpperCase() + s.slice(1); <mask> }; <mask> const TYPES = { <mask> integer: 'number', <mask> float: 'number', <mask> number: 'number', <mask> string: 'string', <mask> boolean: 'boolean', </s> Pull request #961: N...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/utils.ts
const cl = openApi ? openApi.components.schemas[type] : {}; if (cl.$ref) { const link = schemaParamParser(cl, openApi); link.shift(); return [type, ...link] as any; }
<mask> } <mask> <mask> type = `${temp[temp.length - 1]}`; <mask> <mask> const cl = openApi ? openApi.components.schemas[temp[temp.length - 1]] : {}; <mask> <mask> if (cl.type === 'string' && cl.enum) { <mask> isImport = true; <mask> } <mask> </s> Pull r...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/utils.ts
export { TYPES, toCamel, capitalize, uncapitalize, schemaParamParser };
<mask> <mask> return [type, isArray, isClass, isImport, isAdditional]; <mask> }; <mask> <mask> export { TYPES, toCamel, capitalize, schemaParamParser }; </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd...
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/generator/src/utils.ts
const devHost = process.env.DEV_HOST
<mask> <mask> const { getDevServerConfig } = require('./helpers'); <mask> const baseConfig = require('./webpack.config.base'); <mask> <mask> const target = getDevServerConfig(); <mask> <mask> const options = { <mask> target: devHost || `http://${target.host}:${target.port}`, // target host <mask> ch...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/webpack/webpack.config.dev.js
target: devHost || `http://${target.host}:${target.port}`, // target host
<mask> <mask> const target = getDevServerConfig(); <mask> <mask> const options = { <mask> target: `http://${target.host}:${target.port}`, // target host <mask> changeOrigin: true, // needed for virtual hosted sites <mask> }; <mask> const apiProxy = proxy.createProxyMiddleware(options); <mask> <mask...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/webpack/webpack.config.dev.js
<mask> ) && !(resource.indexOf('.module.')+1); <mask> }, <mask> use: [{ <mask> loader: MiniCssExtractPlugin.loader, <mask> options: { <mask> esModules: true, <mask> } <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/webpack/webpack.config.prod.js
<mask> test: /\.module\.p?css$/, <mask> use: [ <mask> { <mask> loader: MiniCssExtractPlugin.loader, <mask> options: { <mask> esModules: true, <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/scripts/webpack/webpack.config.prod.js
import cn from 'classnames';
<mask> import React, { FC } from 'react'; <mask> import { Layout } from 'antd'; <mask> import { Formik, FormikHelpers } from 'formik'; <mask> import { observer } from 'mobx-react-lite'; <mask> <mask> import { IInitialConfigurationBeta } from 'Entities/InitialConfigurationBeta'; <mask> import Icons from 'Common/...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/components/Install/Install.tsx
import Icons from 'Common/ui/Icons';
<mask> import { Formik, FormikHelpers } from 'formik'; <mask> import { observer } from 'mobx-react-lite'; <mask> <mask> import { IInitialConfigurationBeta } from 'Entities/InitialConfigurationBeta'; <mask> import Icons from 'Lib/theme/Icons'; <mask> import { <mask> DEFAULT_DNS_ADDRESS, <mask> DEFAULT_D...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/components/Install/Install.tsx
<Layout className={cn(theme.content.content, theme.content.content_auth)}> <Content className={cn(theme.content.container, theme.content.container_auth)}>
<mask> }); <mask> <mask> const Install: FC = () => { <mask> return ( <mask> <Layout className={theme.install.layout}> <mask> <Content className={theme.install.container}> <mask> <InstallForm /> <mask> </Content> <mask> <Icons/> <mask> </...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/components/Install/Install.tsx
import { DHCP_LINK } from 'Consts/common'; import { danger, externalLink, p } from 'Common/formating'; import { DEFAULT_DNS_PORT, DEFAULT_IP_ADDRESS, DEFAULT_IP_PORT } from 'Consts/install';
<mask> import { Tabs, Grid } from 'antd'; <mask> import cn from 'classnames'; <mask> import { FormikHelpers } from 'formik'; <mask> <mask> import Store from 'Store/installStore'; <mask> import theme from 'Lib/theme'; <mask> <mask> import { FormValues } from '../../Install'; <mask> import StepButtons from '.....
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/components/Install/components/ConfigureDevices/ConfigureDevices.tsx
<mask> import { FormikHelpers } from 'formik'; <mask> <mask> import Store from 'Store/installStore'; <mask> import theme from 'Lib/theme'; <mask> import { danger, p } from 'Common/formating'; <mask> import { DEFAULT_DNS_PORT, DEFAULT_IP_ADDRESS, DEFAULT_IP_PORT } from 'Consts/install'; <mask> <mask> import { ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/components/Install/components/ConfigureDevices/ConfigureDevices.tsx
<mask> const { ui: { intl }, install: { addresses } } = useContext(Store); <mask> const screens = useBreakpoint(); <mask> const tabsPosition = screens.md ? 'left' : 'top'; <mask> <mask> const dhcp = (e: string) => ( <mask> <a <mask> href="https://github.com/AdguardTeam/AdGuar...
[ "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/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/components/Install/components/ConfigureDevices/ConfigureDevices.tsx
{intl.getMessage('install_configure_dhcp', { dhcp: externalLink(DHCP_LINK) })}
<mask> ))} <mask> </div> <mask> </div> <mask> <div className={cn(theme.install.text, theme.install.text_base)}> <mask> {intl.getMessage('install_configure_dhcp', { dhcp })} <mask> </div> <mask> <StepButtons <mask...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/components/Install/components/ConfigureDevices/ConfigureDevices.tsx
interface RadioProps {
<mask> import s from './Radio.module.pcss'; <mask> <mask> const { Group } = Radio; <mask> <mask> interface AdminInterfaceProps { <mask> options: { <mask> label: string; <mask> desc?: string; <mask> value: string | number; <mask> }[]; </s> Pull request #961: New client dashbo...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/components/common/controls/Radio/Radio.tsx
const RadioComponent: FC<RadioProps> = observer(({
<mask> onSelect: (value: string | number) => void; <mask> value: string | number; <mask> } <mask> <mask> const RadioComponent: FC<AdminInterfaceProps> = observer(({ <mask> options, onSelect, value, <mask> }) => { <mask> if (options.length === 0) { <mask> return null; <mask> } </s...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/components/common/controls/Radio/Radio.tsx
import { IconType } from 'Common/ui/Icons';
<mask> import React, { FC } from 'react'; <mask> import cn from 'classnames'; <mask> import { IconType } from 'Lib/theme/Icons'; <mask> <mask> import s from './Icon.module.pcss'; <mask> <mask> interface IconProps { <mask> icon: IconType; </s> Pull request #961: New client dashboard Merge in DNS/adguard-...
[ "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/components/common/ui/Icon/Icon.tsx
export { IconType } from 'Common/ui/Icons';
<mask> ); <mask> }; <mask> <mask> export default Icon; <mask> export { IconType } from 'Lib/theme/Icons'; </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 1137...
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/components/common/ui/Icon/Icon.tsx
@text-selection-bg: #e7efff; @layout-body-background: #f3f3f3; @layout-header-background: #131313; @menu-dark-submenu-bg: #131313;
<mask> @text-color: #000; <mask> @link-hover-color: #4d995f; <mask> @link-active-color: #4d995f; <mask> <mask> @font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif; <mask> @font-size-base: 14px; </s> Pull request #961: New client dashboard Merge in DNS/adguard-home f...
[ "keep", "keep", "add", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/ant/ant-overrides.less
import './Sidebar.pcss'; import './Tabs.pcss'; import './Modal.pcss';
<mask> import './Radio.pcss'; <mask> <mask> const insertStyles = true; <mask> export default insertStyles; </s> Pull request #961: New client dashboard Merge in DNS/adguard-home from new-client-dashboard to master Squashed commit of the following: commit 7bbd67c1e3d2af62b96bf41bb356cd6b784e473e Merge: 113743a6...
[ "add", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/ant/index.ts
import AccessListResponse, { IAccessListResponse } from 'Entities/AccessListResponse'; import AccessSetRequest, { IAccessSetRequest } from 'Entities/AccessSetRequest';
<mask> import qs from 'qs'; <mask> import Client, { IClient } from 'Entities/Client'; <mask> import ClientDelete, { IClientDelete } from 'Entities/ClientDelete'; <mask> import ClientUpdate, { IClientUpdate } from 'Entities/ClientUpdate'; <mask> import Clients, { IClients } from 'Entities/Clients'; </s> Pull reque...
[ "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/apis/clients.ts
import NetInterfaces, { INetInterfaces } from 'Entities/NetInterfaces';
<mask> import DhcpConfig, { IDhcpConfig } from 'Entities/DhcpConfig'; <mask> import DhcpSearchResult, { IDhcpSearchResult } from 'Entities/DhcpSearchResult'; <mask> import DhcpStaticLease, { IDhcpStaticLease } from 'Entities/DhcpStaticLease'; <mask> import DhcpStatus, { IDhcpStatus } from 'Entities/DhcpStatus'; <m...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/apis/dhcp.ts
static async dhcpInterfaces(): Promise<INetInterfaces | Error> { return await fetch(`/control/dhcp/interfaces`, { method: 'GET', }).then(async (res) => { if (res.status === 200) { return res.json(); } else { return new Error(String(...
<mask> } <mask> <mask> static async dhcpRemoveStaticLease(dhcpstaticlease: IDhcpStaticLease): Promise<number | string[] | Error> { <mask> const haveError: string[] = []; <mask> const dhcpstaticleaseValid = new DhcpStaticLease(dhcpstaticlease); <mask> haveError.push(...dhcpstaticle...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/apis/dhcp.ts
static async mobileConfigDoH(host?: string, client_id?: string): Promise<number | Error> {
<mask> <mask> // This file was autogenerated. Please do not change. <mask> // All changes will be overwrited on commit. <mask> export default class MobileconfigApi { <mask> static async mobileConfigDoH(host?: string): Promise<number | Error> { <mask> const queryParams = { <mask> host: ho...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/apis/mobileconfig.ts
client_id: client_id,
<mask> const queryParams = { <mask> host: host, <mask> } <mask> return await fetch(`/control/apple/doh.mobileconfig?${qs.stringify(queryParams, { arrayFormat: 'comma' })}`, { <mask> method: 'GET', <mask> }).then(async (res) => { <mask> if (res.s...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/apis/mobileconfig.ts
static async mobileConfigDoT(host?: string, client_id?: string): Promise<number | Error> {
<mask> } <mask> }) <mask> } <mask> <mask> static async mobileConfigDoT(host?: string): Promise<number | Error> { <mask> const queryParams = { <mask> host: host, <mask> } <mask> return await fetch(`/control/apple/dot.mobileconfig?${qs.stringify(qu...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/apis/mobileconfig.ts
client_id: client_id,
<mask> <mask> static async mobileConfigDoT(host?: string, client_id?: string): Promise<number | Error> { <mask> const queryParams = { <mask> host: host, <mask> } <mask> return await fetch(`/control/apple/dot.mobileconfig?${qs.stringify(queryParams, { arrayFormat: 'comma' }...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/apis/mobileconfig.ts
import NetInterfaces, { INetInterfaces } from './NetInterfaces';
<mask> import NetInterface, { INetInterface } from './NetInterface'; <mask> <mask> // This file was autogenerated. Please do not change. <mask> // All changes will be overwrited on commit. <mask> export interface IAddressesInfo { <mask> dns_port: number; </s> Pull request #961: New client dashboard Merge i...
[ "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/entities/AddressesInfo.ts
interfaces: INetInterfaces;
<mask> // This file was autogenerated. Please do not change. <mask> // All changes will be overwrited on commit. <mask> export interface IAddressesInfo { <mask> dns_port: number; <mask> interfaces: { [key: string]: INetInterface }; <mask> web_port: number; <mask> } <mask> <mask> export default cla...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/entities/AddressesInfo.ts
readonly _interfaces: NetInterfaces;
<mask> static dnsPortValidate(dnsPort: number): boolean { <mask> return typeof dnsPort === 'number'; <mask> } <mask> <mask> readonly _interfaces: { [key: string]: NetInterface }; <mask> <mask> /** */ <mask> get interfaces(): { [key: string]: NetInterface } { <mask> return ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/entities/AddressesInfo.ts
get interfaces(): NetInterfaces {
<mask> } <mask> <mask> readonly _interfaces: { [key: string]: NetInterface }; <mask> <mask> /** */ <mask> get interfaces(): { [key: string]: NetInterface } { <mask> return this._interfaces; <mask> } <mask> <mask> readonly _web_port: number; <mask> </s> Pull request #961: ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/entities/AddressesInfo.ts
this._interfaces = new NetInterfaces(props.interfaces);
<mask> } <mask> <mask> constructor(props: IAddressesInfo) { <mask> this._dns_port = props.dns_port; <mask> this._interfaces = Object.keys(props.interfaces).reduce((prev, key) => { <mask> return { ...prev, [key]: new NetInterface(props.interfaces[key])};...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/entities/AddressesInfo.ts
interfaces: this._interfaces.serialize(),
<mask> <mask> serialize(): IAddressesInfo { <mask> const data: IAddressesInfo = { <mask> dns_port: this._dns_port, <mask> interfaces: Object.keys(this._interfaces).reduce<Record<string, any>>((prev, key) => ({ ...prev, [key]: this._interfaces[key].serialize() }), {}), <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/entities/AddressesInfo.ts
interfaces: this._interfaces.validate().length === 0,
<mask> const validate = { <mask> dns_port: typeof this._dns_port === 'number', <mask> web_port: typeof this._web_port === 'number', <mask> }; <mask> const isError: string[] = []; <mask> Object.keys(validate).forEach((key) => { <mask> if (!(valid...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/entities/AddressesInfo.ts
whois_info?: IWhoisInfo;
<mask> safesearch_enabled?: boolean; <mask> upstreams?: string[]; <mask> use_global_blocked_services?: boolean; <mask> use_global_settings?: boolean; <mask> whois_info?: IWhoisInfo[]; <mask> } <mask> <mask> export default class ClientFindSubEntry { <mask> readonly _blocked_services: st...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/entities/ClientFindSubEntry.ts
readonly _whois_info: WhoisInfo | undefined;
<mask> get useGlobalSettings(): boolean | undefined { <mask> return this._use_global_settings; <mask> } <mask> <mask> readonly _whois_info: WhoisInfo[] | undefined; <mask> <mask> get whoisInfo(): WhoisInfo[] | undefined { <mask> return this._whois_info; <mask> } <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/entities/ClientFindSubEntry.ts
get whoisInfo(): WhoisInfo | undefined {
<mask> } <mask> <mask> readonly _whois_info: WhoisInfo[] | undefined; <mask> <mask> get whoisInfo(): WhoisInfo[] | undefined { <mask> return this._whois_info; <mask> } <mask> <mask> constructor(props: IClientFindSubEntry) { <mask> if (props.blocked_services) { </s> Pull...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/entities/ClientFindSubEntry.ts
this._whois_info = new WhoisInfo(props.whois_info);
<mask> if (typeof props.use_global_settings === 'boolean') { <mask> this._use_global_settings = props.use_global_settings; <mask> } <mask> if (props.whois_info) { <mask> this._whois_info = props.whois_info.map((p) => new WhoisInfo(p)); <mask> } <mask> }...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/entities/ClientFindSubEntry.ts
data.whois_info = this._whois_info.serialize();
<mask> if (typeof this._use_global_settings !== 'undefined') { <mask> data.use_global_settings = this._use_global_settings; <mask> } <mask> if (typeof this._whois_info !== 'undefined') { <mask> data.whois_info = this._whois_info.map((p) => p.serialize()); <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/entities/ClientFindSubEntry.ts
whois_info: !this._whois_info ? true : this._whois_info.validate().length === 0,
<mask> safesearch_enabled: !this._safesearch_enabled ? true : typeof this._safesearch_enabled === 'boolean', <mask> use_global_blocked_services: !this._use_global_blocked_services ? true : typeof this._use_global_blocked_services === 'boolean', <mask> blocked_services: !this._bloc...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/entities/ClientFindSubEntry.ts
[key: string]: IClientFindSubEntry;
<mask> // This file was autogenerated. Please do not change. <mask> // All changes will be overwrited on commit. <mask> export interface IClientsFindEntry { <mask> } <mask> <mask> export default class ClientsFindEntry { <mask> readonly data: Record<string, ClientFindSubEntry>; </s> Pull request #961: New c...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/entities/ClientsFindEntry.ts
readonly data: Record<string, ClientFindSubEntry>;
<mask> } <mask> <mask> export default class ClientsFindEntry { <mask> constructor(props: IClientsFindEntry) { <mask> this.data = Object.entries(props).reduce<Record<string, ClientFindSubEntry>>((prev, [key, value]) => { <mask> prev[key] = new ClientFindSubEntry(value!); <mask> ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/entities/ClientsFindEntry.ts
this.data = Object.entries(props).reduce<Record<string, ClientFindSubEntry>>((prev, [key, value]) => { prev[key] = new ClientFindSubEntry(value!); return prev; }, {})
<mask> <mask> constructor(props: IClientsFindEntry) { <mask> } <mask> <mask> serialize(): IClientsFindEntry { <mask> return Object.entries(this.data).reduce<Record<string, IClientFindSubEntry>>((prev, [key, value]) => { <mask> prev[key] = value.serialize(); </s> Pull request #9...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/entities/ClientsFindEntry.ts
return Object.entries(this.data).reduce<Record<string, IClientFindSubEntry>>((prev, [key, value]) => { prev[key] = value.serialize(); return prev; }, {})
<mask> constructor(props: IClientsFindEntry) { <mask> } <mask> <mask> serialize(): IClientsFindEntry { <mask> const data: IClientsFindEntry = { <mask> }; <mask> return data; <mask> } <mask> <mask> validate(): string[] { <mask> const validate = { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/entities/ClientsFindEntry.ts
return []
<mask> return data; <mask> } <mask> <mask> validate(): string[] { <mask> const validate = { <mask> }; <mask> const isError: string[] = []; <mask> Object.keys(validate).forEach((key) => { <mask> if (!(validate as any)[key]) { <mask> i...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/0c127039cfa55d4cadfce20bcfa2c542840bd7ed
client2/src/lib/entities/ClientsFindEntry.ts