docstring_tokens
stringlengths
0
76.5k
code_tokens
stringlengths
75
1.81M
label_window
sequencelengths
4
2.12k
html_url
stringlengths
74
116
file_name
stringlengths
3
311
const trackerHint = getIconTooltip({
<mask> const requestDetails = getGrid(requestDetailsObj, 'request_details'); <mask> <mask> const renderContent = hasTracker ? requestDetails.concat(getGrid(knownTrackerDataObj, 'known_tracker', 'pt-4')) : requestDetails; <mask> <mask> const trackerHint = getHintElement({ <mask> className: privacyIconClass, <mask> tooltipClass: 'pt-4 pb-5 px-5 mw-75', <mask> xlinkHref: 'privacy', <mask> contentItemClass: 'key-colon', <mask> renderContent, </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove {getHintElement({ className: classNames('icons mr-4 icon--small cursor--pointer icon--light-gray', { 'my-3': isDetailed }), </s> add {getIconTooltip({ className: classNames('icons mr-4 icon--24 icon--lightgray', { 'my-3': isDetailed }), </s> remove {getHintElement({ </s> add {getIconTooltip({ </s> remove {dnssec_enabled && getHintElement({ </s> add {dnssec_enabled && getIconTooltip({ </s> remove const hintClass = classNames('icons mr-4 icon--small cursor--pointer icon--light-gray', { </s> add const hintClass = classNames('icons mr-4 icon--24 icon--lightgray', { </s> remove const lockIconClass = classNames('icons icon--small d-none d-sm-block cursor--pointer', { 'icon--active': answer_dnssec, </s> add const lockIconClass = classNames('icons icon--24 d-none d-sm-block', { 'icon--green': answer_dnssec,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Cells/getDomainCell.js
{dnssec_enabled && getIconTooltip({
<mask> .join(', '); <mask> <mask> return ( <mask> <div className="logs__row o-hidden"> <mask> {dnssec_enabled && getHintElement({ <mask> className: lockIconClass, <mask> tooltipClass: 'py-4 px-5 pb-45', <mask> canShowTooltip: answer_dnssec, <mask> xlinkHref: 'lock', <mask> columnClass: 'w-100', </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove {getHintElement({ </s> add {getIconTooltip({ </s> remove {getHintElement({ className: classNames('icons mr-4 icon--small cursor--pointer icon--light-gray', { 'my-3': isDetailed }), </s> add {getIconTooltip({ className: classNames('icons mr-4 icon--24 icon--lightgray', { 'my-3': isDetailed }), </s> remove const trackerHint = getHintElement({ </s> add const trackerHint = getIconTooltip({ </s> remove {trackerData && <Popover data={trackerData} />} </s> add {trackerData && <Tooltip content={content} placement="top" className="tooltip-container tooltip-custom--wide"> <svg className="icons icon--24 icon--green ml-1"> <use xlinkHref="#privacy" /> </svg> </Tooltip>}
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Cells/getDomainCell.js
import getIconTooltip from './getIconTooltip';
<mask> import { <mask> FILTERED_STATUS, <mask> FILTERED_STATUS_TO_META_MAP, <mask> } from '../../../helpers/constants'; <mask> import getHintElement from './getHintElement'; <mask> <mask> const getResponseCell = (row, filtering, t, isDetailed, getFilterName) => { <mask> const { <mask> reason, filterId, rule, status, upstream, elapsedMs, response, originalResponse, <mask> } = row.original; </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove import getHintElement from './getHintElement'; </s> add import getIconTooltip from './getIconTooltip'; </s> remove import getHintElement from './getHintElement'; </s> add import getIconTooltip from './getIconTooltip'; </s> remove import IconTooltip from '../../ui/IconTooltip'; </s> add </s> remove import IconTooltip from '../ui/IconTooltip'; </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Cells/getResponseCell.js
{getIconTooltip({ className: classNames('icons mr-4 icon--24 icon--lightgray', { 'my-3': isDetailed }),
<mask> const detailedInfo = isBlocked ? filter : formattedElapsedMs; <mask> <mask> return ( <mask> <div className="logs__row"> <mask> {getHintElement({ <mask> className: classNames('icons mr-4 icon--small cursor--pointer icon--light-gray', { 'my-3': isDetailed }), <mask> columnClass: 'grid grid--limited', <mask> tooltipClass: 'px-5 pb-5 pt-4 mw-75 custom-tooltip__response-details', <mask> contentItemClass: 'text-truncate key-colon o-hidden', <mask> xlinkHref: 'question', <mask> title: 'response_details', </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove {getHintElement({ </s> add {getIconTooltip({ </s> remove const hintClass = classNames('icons mr-4 icon--small cursor--pointer icon--light-gray', { </s> add const hintClass = classNames('icons mr-4 icon--24 icon--lightgray', { </s> remove const trackerHint = getHintElement({ </s> add const trackerHint = getIconTooltip({ </s> remove {dnssec_enabled && getHintElement({ </s> add {dnssec_enabled && getIconTooltip({
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Cells/getResponseCell.js
<mask> FORM_NAME, <mask> RESPONSE_FILTER, <mask> RESPONSE_FILTER_QUERIES, <mask> } from '../../../helpers/constants'; <mask> import IconTooltip from '../../ui/IconTooltip'; <mask> import { setLogsFilter } from '../../../actions/queryLogs'; <mask> import useDebounce from '../../../helpers/useDebounce'; <mask> import { createOnBlurHandler, getLogsUrlParams } from '../../../helpers/helpers'; <mask> <mask> const renderFilterField = ({ </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove import getHintElement from './getHintElement'; </s> add import getIconTooltip from './getIconTooltip'; </s> remove import IconTooltip from '../ui/IconTooltip'; </s> add </s> remove import getHintElement from './getHintElement'; </s> add import getIconTooltip from './getIconTooltip';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Filters/Form.js
import Tooltip from '../../ui/Tooltip';
<mask> import useDebounce from '../../../helpers/useDebounce'; <mask> import { createOnBlurHandler, getLogsUrlParams } from '../../../helpers/helpers'; <mask> <mask> const renderFilterField = ({ <mask> input, <mask> id, </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove import IconTooltip from '../../ui/IconTooltip'; </s> add </s> remove import getHintElement from './getHintElement'; </s> add import getIconTooltip from './getIconTooltip'; </s> remove import IconTooltip from '../ui/IconTooltip'; </s> add </s> remove import { getTrackerData } from '../../helpers/trackers/trackers'; import Popover from '../ui/Popover'; </s> add import { Trans } from 'react-i18next'; import { getSourceData, getTrackerData } from '../../helpers/trackers/trackers'; import Tooltip from '../ui/Tooltip'; import { captitalizeWords } from '../../helpers/helpers'; const renderLabel = (value) => <strong><Trans>{value}</Trans></strong>; const renderLink = ({ url, name }) => <a className="tooltip-custom__content-link" target="_blank" rel="noopener noreferrer" href={url} > <strong>{name}</strong> </a>; const getTrackerInfo = (trackerData) => [{ key: 'name_table_header', value: trackerData, render: renderLink, }, { key: 'category_label', value: captitalizeWords(trackerData.category), render: renderLabel, }, { key: 'source_label', value: getSourceData(trackerData), render: renderLink, }];
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Filters/Form.js
<svg className="icons icon--24 icon--gray">
<mask> const onBlur = (event) => createOnBlurHandler(event, input, normalizeOnBlur); <mask> <mask> return <> <mask> <div className="input-group-search input-group-search__icon--magnifier"> <mask> <svg className="icons icon--small icon--gray"> <mask> <use xlinkHref="#magnifier" /> <mask> </svg> <mask> </div> <mask> <input <mask> {...input} </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove <IconTooltip text={tooltip} type='tooltip-custom--logs' /> </s> add <Tooltip content={tooltip} className="tooltip-container"> <svg className="icons icon--20 icon--gray"> <use xlinkHref="#question" /> </svg> </Tooltip> </s> remove <svg className="icons icon--smallest icon--gray" onClick={onClearInputClick}> </s> add <svg className="icons icon--20 icon--gray" onClick={onClearInputClick}> </s> remove {trackerData && <Popover data={trackerData} />} </s> add {trackerData && <Tooltip content={content} placement="top" className="tooltip-container tooltip-custom--wide"> <svg className="icons icon--24 icon--green ml-1"> <use xlinkHref="#privacy" /> </svg> </Tooltip>} </s> remove <svg className="icons icon--small icon--gray"> </s> add <svg className="icons icon--24 icon--gray">
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Filters/Form.js
<svg className="icons icon--20 icon--gray" onClick={onClearInputClick}>
<mask> onBlur={onBlur} <mask> /> <mask> <div <mask> className={classNames('input-group-search input-group-search__icon--cross', { invisible: input.value.length < 1 })}> <mask> <svg className="icons icon--smallest icon--gray" onClick={onClearInputClick}> <mask> <use xlinkHref="#cross" /> <mask> </svg> <mask> </div> <mask> <span className="input-group-search input-group-search__icon--tooltip"> <mask> <IconTooltip text={tooltip} type='tooltip-custom--logs' /> </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove <IconTooltip text={tooltip} type='tooltip-custom--logs' /> </s> add <Tooltip content={tooltip} className="tooltip-container"> <svg className="icons icon--20 icon--gray"> <use xlinkHref="#question" /> </svg> </Tooltip> </s> remove <svg className="icons icon--small icon--gray"> </s> add <svg className="icons icon--24 icon--gray"> </s> remove {trackerData && <Popover data={trackerData} />} </s> add {trackerData && <Tooltip content={content} placement="top" className="tooltip-container tooltip-custom--wide"> <svg className="icons icon--24 icon--green ml-1"> <use xlinkHref="#privacy" /> </svg> </Tooltip>} </s> remove <IconTooltip text={tooltipTitle} type="tooltip-custom--narrow" /> </s> add <Tooltip content={tooltipTitle} placement="top" className="tooltip-container tooltip-custom--narrow text-center"> <svg className="icons icon--20 icon--lightgray ml-1"> <use xlinkHref="#question" /> </svg> </Tooltip> </s> remove <svg className="icon icon--small"> </s> add <svg className="icon icon--24">
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Filters/Form.js
<Tooltip content={tooltip} className="tooltip-container"> <svg className="icons icon--20 icon--gray"> <use xlinkHref="#question" /> </svg> </Tooltip>
<mask> <use xlinkHref="#cross" /> <mask> </svg> <mask> </div> <mask> <span className="input-group-search input-group-search__icon--tooltip"> <mask> <IconTooltip text={tooltip} type='tooltip-custom--logs' /> <mask> </span> <mask> {!disabled <mask> && touched <mask> && (error && <span className="form__message form__message--error">{error}</span>)} <mask> </>; </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove <svg className="icons icon--smallest icon--gray" onClick={onClearInputClick}> </s> add <svg className="icons icon--20 icon--gray" onClick={onClearInputClick}> </s> remove {trackerData && <Popover data={trackerData} />} </s> add {trackerData && <Tooltip content={content} placement="top" className="tooltip-container tooltip-custom--wide"> <svg className="icons icon--24 icon--green ml-1"> <use xlinkHref="#privacy" /> </svg> </Tooltip>} </s> remove {dnssec_enabled && getHintElement({ </s> add {dnssec_enabled && getIconTooltip({ </s> remove <svg className="icon icon--small"> </s> add <svg className="icon icon--24"> </s> remove const hintClass = classNames('icons mr-4 icon--small cursor--pointer icon--light-gray', { </s> add const hintClass = classNames('icons mr-4 icon--24 icon--lightgray', {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Filters/Form.js
<svg className="icons icon--24">
<mask> type="button" <mask> className="btn btn-icon--green ml-3 bg-transparent" <mask> onClick={refreshLogs} <mask> > <mask> <svg className="icons icon--small"> <mask> <use xlinkHref="#update" /> <mask> </svg> <mask> </button> <mask> </h1> <mask> <Form </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove <svg className="icon icon--small"> </s> add <svg className="icon icon--24"> </s> remove <svg className="icon icon--small"> </s> add <svg className="icon icon--24"> </s> remove className={`icons icon--small icon--active cursor--pointer ${detailedSelected}`} </s> add className={classNames('icons icon--24 icon--green cursor--pointer', { 'icon--selected': isDetailed, })} </s> remove className="icon icon--small icon-cross d-block d-md-none cursor--pointer" </s> add className="icon icon--24 icon-cross d-block d-md-none cursor--pointer" </s> remove <IconTooltip text={tooltip} type='tooltip-custom--logs' /> </s> add <Tooltip content={tooltip} className="tooltip-container"> <svg className="icons icon--20 icon--gray"> <use xlinkHref="#question" /> </svg> </Tooltip>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Filters/index.js
<mask> right: 0; <mask> top: 0.5rem; <mask> } <mask> <mask> .icon--light-gray { <mask> color: var(--gray-8); <mask> } <mask> <mask> .link--green { <mask> color: var(--green79); <mask> } <mask> <mask> .row--detailed { </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove .icon--active { color: #66b574; </s> add .icon--lightgray { color: var(--gray-8); </s> remove color: #66b574; </s> add color: var(--green-74); </s> remove border-color: #66b574; color: #66b574; </s> add border-color: var(--green-74); color: var(--green-74); </s> remove .icon--smallest { width: 1.2rem; height: 1.2rem; </s> add .icon--20 { --size: 1.25rem; width: var(--size); height: var(--size); } .icon--18 { --size: 1.125rem; width: var(--size); height: var(--size);
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Logs.css
Header: function Header() {
<mask> maxHeight: 60, <mask> headerClassName: 'logs__text', <mask> }, <mask> { <mask> Header: () => { <mask> const plainSelected = classNames('cursor--pointer', { <mask> 'icon--selected': !isDetailed, <mask> }); <mask> <mask> const detailedSelected = classNames('cursor--pointer', { <mask> 'icon--selected': isDetailed, <mask> }); <mask> <mask> return <div className="d-flex justify-content-between"> <mask> {t('client_table_header')} <mask> {<span> <mask> <svg <mask> className={`icons icon--small icon--active mr-2 cursor--pointer ${plainSelected}`} </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove className={`icons icon--small icon--active mr-2 cursor--pointer ${plainSelected}`} </s> add className={classNames('icons icon--24 icon--green mr-2 cursor--pointer', { 'icon--selected': !isDetailed, })} </s> remove const hintClass = classNames('icons mr-4 icon--small cursor--pointer icon--light-gray', { </s> add const hintClass = classNames('icons mr-4 icon--24 icon--lightgray', { </s> remove className={`icons icon--small icon--active cursor--pointer ${detailedSelected}`} </s> add className={classNames('icons icon--24 icon--green cursor--pointer', { 'icon--selected': isDetailed, })} </s> remove const privacyIconClass = classNames('icons mx-2 icon--small d-none d-sm-block cursor--pointer', { 'icon--active': hasTracker, </s> add const privacyIconClass = classNames('icons mx-2 icon--24 d-none d-sm-block', { 'icon--green': hasTracker, </s> remove const lockIconClass = classNames('icons icon--small d-none d-sm-block cursor--pointer', { 'icon--active': answer_dnssec, </s> add const lockIconClass = classNames('icons icon--24 d-none d-sm-block', { 'icon--green': answer_dnssec,
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Table.js
className={classNames('icons icon--24 icon--green mr-2 cursor--pointer', { 'icon--selected': !isDetailed, })}
<mask> return <div className="d-flex justify-content-between"> <mask> {t('client_table_header')} <mask> {<span> <mask> <svg <mask> className={`icons icon--small icon--active mr-2 cursor--pointer ${plainSelected}`} <mask> onClick={() => toggleDetailedLogs(false)} <mask> > <mask> <title><Trans>compact</Trans></title> <mask> <use xlinkHref='#list' /> <mask> </svg> </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove Header: () => { const plainSelected = classNames('cursor--pointer', { 'icon--selected': !isDetailed, }); const detailedSelected = classNames('cursor--pointer', { 'icon--selected': isDetailed, }); </s> add Header: function Header() { </s> remove className={`icons icon--small icon--active cursor--pointer ${detailedSelected}`} </s> add className={classNames('icons icon--24 icon--green cursor--pointer', { 'icon--selected': isDetailed, })} </s> remove <svg className="icon icon--small"> </s> add <svg className="icon icon--24"> </s> remove <svg className="icons icon--small icon--gray"> </s> add <svg className="icons icon--24 icon--gray">
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Table.js
className={classNames('icons icon--24 icon--green cursor--pointer', { 'icon--selected': isDetailed, })}
<mask> <title><Trans>compact</Trans></title> <mask> <use xlinkHref='#list' /> <mask> </svg> <mask> <svg <mask> className={`icons icon--small icon--active cursor--pointer ${detailedSelected}`} <mask> onClick={() => toggleDetailedLogs(true)} <mask> > <mask> <title><Trans>default</Trans></title> <mask> <use xlinkHref='#detailed_list' /> <mask> </svg> </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove className={`icons icon--small icon--active mr-2 cursor--pointer ${plainSelected}`} </s> add className={classNames('icons icon--24 icon--green mr-2 cursor--pointer', { 'icon--selected': !isDetailed, })} </s> remove <svg className="icon icon--small"> </s> add <svg className="icon icon--24"> </s> remove Header: () => { const plainSelected = classNames('cursor--pointer', { 'icon--selected': !isDetailed, }); const detailedSelected = classNames('cursor--pointer', { 'icon--selected': isDetailed, }); </s> add Header: function Header() { </s> remove className="icon icon--small icon-cross d-block d-md-none cursor--pointer" </s> add className="icon icon--24 icon-cross d-block d-md-none cursor--pointer" </s> remove <svg className="icons icon--small"> </s> add <svg className="icons icon--24">
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Table.js
<svg className="icons icon--24 icon--gray w-100 h-100 cursor--pointer">
<mask> showPagination={logs.length > 0} <mask> getPaginationProps={() => ({ className: 'custom-pagination custom-pagination--padding' })} <mask> getTbodyProps={() => ({ className: 'd-block' })} <mask> previousText={ <mask> <svg className="icons icon--small icon--gray w-100 h-100 cursor--pointer"> <mask> <title><Trans>previous_btn</Trans></title> <mask> <use xlinkHref="#arrow-left" /> <mask> </svg>} <mask> nextText={ <mask> <svg className="icons icon--small icon--gray w-100 h-100 cursor--pointer"> </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove <svg className="icons icon--small icon--gray w-100 h-100 cursor--pointer"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100 cursor--pointer"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100">
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Table.js
<svg className="icons icon--24 icon--gray w-100 h-100 cursor--pointer">
<mask> <title><Trans>previous_btn</Trans></title> <mask> <use xlinkHref="#arrow-left" /> <mask> </svg>} <mask> nextText={ <mask> <svg className="icons icon--small icon--gray w-100 h-100 cursor--pointer"> <mask> <title><Trans>next_btn</Trans></title> <mask> <use xlinkHref="#arrow-right" /> <mask> </svg>} <mask> renderTotalPagesCount={() => false} <mask> getTrGroupProps={(_state, rowInfo) => { </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove <svg className="icons icon--small icon--gray w-100 h-100 cursor--pointer"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100 cursor--pointer"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100">
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Table.js
className="icon icon--24 icon-cross d-block d-md-none cursor--pointer"
<mask> }, <mask> }} <mask> > <mask> <svg <mask> className="icon icon--small icon-cross d-block d-md-none cursor--pointer" <mask> onClick={closeModal}> <mask> <use xlinkHref="#cross" /> <mask> </svg> <mask> {processContent(detailedDataCurrent, buttonType)} <mask> </Modal> </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove <svg className="icon icon--small"> </s> add <svg className="icon icon--24"> </s> remove <svg className="icon icon--small"> </s> add <svg className="icon icon--24"> </s> remove className={`icons icon--small icon--active cursor--pointer ${detailedSelected}`} </s> add className={classNames('icons icon--24 icon--green cursor--pointer', { 'icon--selected': isDetailed, })} </s> remove <IconTooltip text={tooltip} type='tooltip-custom--logs' /> </s> add <Tooltip content={tooltip} className="tooltip-container"> <svg className="icons icon--20 icon--gray"> <use xlinkHref="#question" /> </svg> </Tooltip> </s> remove <svg className="icons icon--smallest icon--gray" onClick={onClearInputClick}> </s> add <svg className="icons icon--20 icon--gray" onClick={onClearInputClick}>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/index.js
<svg className="icons icon--24 icon--gray w-100 h-100">
<mask> showPageSizeOptions={false} <mask> showPageJump={false} <mask> renderTotalPagesCount={() => false} <mask> previousText={ <mask> <svg className="icons icon--small icon--gray w-100 h-100"> <mask> <use xlinkHref="#arrow-left" /> <mask> </svg>} <mask> nextText={ <mask> <svg className="icons icon--small icon--gray w-100 h-100"> <mask> <use xlinkHref="#arrow-right" /> </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100">
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Settings/Clients/AutoClients.js
<svg className="icons icon--24 icon--gray w-100 h-100">
<mask> <svg className="icons icon--small icon--gray w-100 h-100"> <mask> <use xlinkHref="#arrow-left" /> <mask> </svg>} <mask> nextText={ <mask> <svg className="icons icon--small icon--gray w-100 h-100"> <mask> <use xlinkHref="#arrow-right" /> <mask> </svg>} <mask> loadingText={t('loading_table_status')} <mask> pageText='' <mask> ofText='' </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100">
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Settings/Clients/AutoClients.js
<svg className="icons icon--24 icon--gray w-100 h-100">
<mask> showPageSizeOptions={false} <mask> showPageJump={false} <mask> renderTotalPagesCount={() => false} <mask> previousText={ <mask> <svg className="icons icon--small icon--gray w-100 h-100"> <mask> <use xlinkHref="#arrow-left" /> <mask> </svg>} <mask> nextText={ <mask> <svg className="icons icon--small icon--gray w-100 h-100"> <mask> <use xlinkHref="#arrow-right" /> </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Settings/Clients/ClientsTable.js
<svg className="icons icon--24 icon--gray w-100 h-100">
<mask> <svg className="icons icon--small icon--gray w-100 h-100"> <mask> <use xlinkHref="#arrow-left" /> <mask> </svg>} <mask> nextText={ <mask> <svg className="icons icon--small icon--gray w-100 h-100"> <mask> <use xlinkHref="#arrow-right" /> <mask> </svg>} <mask> loadingText={t('loading_table_status')} <mask> pageText='' <mask> ofText='' </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Settings/Clients/ClientsTable.js
<svg className="icon icon--24">
<mask> className="btn btn-link btn-block btn-sm" <mask> onClick={() => fields.push()} <mask> title={buttonTitle} <mask> > <mask> <svg className="icon icon--small"> <mask> <use xlinkHref="#plus" /> <mask> </svg> <mask> </button> <mask> </div> <mask> ); </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove <svg className="icon icon--small"> </s> add <svg className="icon icon--24"> </s> remove <svg className="icons icon--small"> </s> add <svg className="icons icon--24"> </s> remove className={`icons icon--small icon--active cursor--pointer ${detailedSelected}`} </s> add className={classNames('icons icon--24 icon--green cursor--pointer', { 'icon--selected': isDetailed, })} </s> remove className="icon icon--small icon-cross d-block d-md-none cursor--pointer" </s> add className="icon icon--24 icon-cross d-block d-md-none cursor--pointer" </s> remove {trackerData && <Popover data={trackerData} />} </s> add {trackerData && <Tooltip content={content} placement="top" className="tooltip-container tooltip-custom--wide"> <svg className="icons icon--24 icon--green ml-1"> <use xlinkHref="#privacy" /> </svg> </Tooltip>}
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Settings/Clients/Form.js
background-color: var(--green-74);
<mask> .dropdown-item.active, <mask> .dropdown-item:active { <mask> background-color: #66b574; <mask> } <mask> <mask> .dropdown-menu { <mask> cursor: default; <mask> } </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove color: #66b574; </s> add color: var(--green-74); </s> remove border-bottom-color: #66b574; </s> add border-bottom-color: var(--green-74); </s> remove .icon--active { color: #66b574; </s> add .icon--lightgray { color: var(--gray-8); </s> remove border-color: #66b574; color: #66b574; </s> add border-color: var(--green-74); color: var(--green-74); </s> remove stroke: #66b574; </s> add stroke: var(--green-74);
[ "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/ui/Dropdown.css
.icon--24 { --size: 1.5rem; width: var(--size); height: var(--size);
<mask> vertical-align: middle; <mask> height: 100%; <mask> } <mask> <mask> .icon--small { <mask> width: 1.5rem; <mask> height: 1.5rem; <mask> } <mask> <mask> .icon--smallest { <mask> width: 1.2rem; <mask> height: 1.2rem; </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove .icon--smallest { width: 1.2rem; height: 1.2rem; </s> add .icon--20 { --size: 1.25rem; width: var(--size); height: var(--size); } .icon--18 { --size: 1.125rem; width: var(--size); height: var(--size); </s> remove color: #66b574; </s> add color: var(--green-74); </s> remove .icon--light-gray { color: var(--gray-8); } </s> add </s> remove .icon--active { color: #66b574; </s> add .icon--lightgray { color: var(--gray-8);
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/ui/Icons.css
.icon--20 { --size: 1.25rem; width: var(--size); height: var(--size); } .icon--18 { --size: 1.125rem; width: var(--size); height: var(--size);
<mask> width: 1.5rem; <mask> height: 1.5rem; <mask> } <mask> <mask> .icon--smallest { <mask> width: 1.2rem; <mask> height: 1.2rem; <mask> } <mask> <mask> .icon--gray { <mask> color: var(--gray-a5); <mask> } </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove .icon--small { width: 1.5rem; height: 1.5rem; </s> add .icon--24 { --size: 1.5rem; width: var(--size); height: var(--size); </s> remove color: #66b574; </s> add color: var(--green-74); </s> remove .icon--active { color: #66b574; </s> add .icon--lightgray { color: var(--gray-8); </s> remove .icon--light-gray { color: var(--gray-8); } </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/ui/Icons.css
.icon--green { color: var(--green-74); }
<mask> .icon--gray { <mask> color: var(--gray-a5); <mask> } <mask> <mask> .icon--disabled { <mask> color: var(--gray-d8); <mask> } <mask> <mask> .icon--lightgray { </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove .icon--active { color: #66b574; </s> add .icon--lightgray { color: var(--gray-8); </s> remove .icon--smallest { width: 1.2rem; height: 1.2rem; </s> add .icon--20 { --size: 1.25rem; width: var(--size); height: var(--size); } .icon--18 { --size: 1.125rem; width: var(--size); height: var(--size); </s> remove .icon--light-gray { color: var(--gray-8); } </s> add </s> remove color: #66b574; </s> add color: var(--green-74); </s> remove border-color: #66b574; color: #66b574; </s> add border-color: var(--green-74); color: var(--green-74);
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/ui/Icons.css
.icon--lightgray { color: var(--gray-8);
<mask> .icon--disabled { <mask> color: var(--gray-d8); <mask> } <mask> <mask> .icon--active { <mask> color: #66b574; <mask> } </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove color: #66b574; </s> add color: var(--green-74); </s> remove border-color: #66b574; color: #66b574; </s> add border-color: var(--green-74); color: var(--green-74); </s> remove border-bottom-color: #66b574; </s> add border-bottom-color: var(--green-74); </s> remove .icon--light-gray { color: var(--gray-8); } </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/ui/Icons.css
--green-74: #66b574; --green-86: #66b586;
<mask> --red: #cd201f; <mask> --orange: #fd9644; <mask> --yellow: #f1c40f; <mask> --green: #5eba00; <mask> --teal: #2bcbba; <mask> --cyan: #17a2b8; <mask> --white: #fff; <mask> --gray: #868e96; <mask> --gray-ac: #9aa0ac; </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove color: #66b574; </s> add color: var(--green-74); </s> remove border-bottom-color: #66b574; </s> add border-bottom-color: var(--green-74); </s> remove stroke: #66b574; </s> add stroke: var(--green-74); </s> remove {dnssec_enabled && getHintElement({ </s> add {dnssec_enabled && getIconTooltip({
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/ui/Tabler.css
--gray-ac: #9aa0ac;
<mask> --cyan: #17a2b8; <mask> --white: #fff; <mask> --gray: #868e96; <mask> --gray-dark: #343a40; <mask> --azure: #45aaf2; <mask> --lime: #7bd235; <mask> --primary: #467fcf; </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove color: #66b574; </s> add color: var(--green-74); </s> remove border-bottom-color: #66b574; </s> add border-bottom-color: var(--green-74); </s> remove stroke: #66b574; </s> add stroke: var(--green-74); </s> remove {dnssec_enabled && getHintElement({ </s> add {dnssec_enabled && getIconTooltip({
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/ui/Tabler.css
<svg className="icon icon--24">
<mask> type="button" <mask> className="btn btn-secondary btn-icon btn-icon--green" <mask> onClick={removeField} <mask> > <mask> <svg className="icon icon--small"> <mask> <use xlinkHref="#cross" /> <mask> </svg> <mask> </button> <mask> </span> <mask> } </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove <svg className="icon icon--small"> </s> add <svg className="icon icon--24"> </s> remove <svg className="icons icon--small"> </s> add <svg className="icons icon--24"> </s> remove className="icon icon--small icon-cross d-block d-md-none cursor--pointer" </s> add className="icon icon--24 icon-cross d-block d-md-none cursor--pointer" </s> remove <IconTooltip text={tooltip} type='tooltip-custom--logs' /> </s> add <Tooltip content={tooltip} className="tooltip-container"> <svg className="icons icon--20 icon--gray"> <use xlinkHref="#question" /> </svg> </Tooltip> </s> remove <svg className="icons icon--smallest icon--gray" onClick={onClearInputClick}> </s> add <svg className="icons icon--20 icon--gray" onClick={onClearInputClick}>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/helpers/form.js
<Card title="Top blocked domains" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}>
<mask> <mask> import Card from '../ui/Card'; <mask> <mask> const Clients = props => ( <mask> <Card title="Top blocked domains" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> <mask> <ReactTable <mask> data={map(props.topBlockedDomains, (value, prop) => ( <mask> { ip: prop, domain: value } <mask> ))} <mask> columns={[{ </s> Web UI API -- Give out 24-hour stat instead of last 3 minutes. </s> remove <Card title="Top queried domains" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top queried domains" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove <Card title="Top clients" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top clients" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove <Card title="General statistics" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="General statistics" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove timeWindow := time.Minute * 3 </s> add timeWindow := time.Hour * 24 </s> remove summed["stats_period"] = "3 minutes" </s> add summed["stats_period"] = "24 hours"
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d7360c700b858f8ae8a9763b1199a8ea30078b0
client/src/components/Dashboard/BlockedDomains.js
<Card title="Top clients" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}>
<mask> <mask> import Card from '../ui/Card'; <mask> <mask> const Clients = props => ( <mask> <Card title="Top clients" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> <mask> <ReactTable <mask> data={map(props.topClients, (value, prop) => ( <mask> { ip: prop, count: value } <mask> ))} <mask> columns={[{ </s> Web UI API -- Give out 24-hour stat instead of last 3 minutes. </s> remove <Card title="Top blocked domains" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top blocked domains" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove <Card title="Top queried domains" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top queried domains" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove <Card title="General statistics" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="General statistics" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove summed["stats_period"] = "3 minutes" </s> add summed["stats_period"] = "24 hours" </s> remove <Tooltip text="A number of DNS quieries processed in the last 3 minutes" /> </s> add <Tooltip text="A number of DNS quieries processed in the last 24 hours" />
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d7360c700b858f8ae8a9763b1199a8ea30078b0
client/src/components/Dashboard/Clients.js
<Card title="General statistics" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}>
<mask> import Card from '../ui/Card'; <mask> import Tooltip from '../ui/Tooltip'; <mask> <mask> const Counters = props => ( <mask> <Card title="General statistics" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> <mask> <table className="table card-table"> <mask> <tbody> <mask> <tr> <mask> <td> <mask> DNS Queries </s> Web UI API -- Give out 24-hour stat instead of last 3 minutes. </s> remove <Tooltip text="A number of DNS quieries processed in the last 3 minutes" /> </s> add <Tooltip text="A number of DNS quieries processed in the last 24 hours" /> </s> remove <Card title="Top clients" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top clients" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove <Card title="Top queried domains" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top queried domains" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove <Card title="Top blocked domains" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top blocked domains" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove summed["stats_period"] = "3 minutes" </s> add summed["stats_period"] = "24 hours"
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d7360c700b858f8ae8a9763b1199a8ea30078b0
client/src/components/Dashboard/Counters.js
<Tooltip text="A number of DNS quieries processed in the last 24 hours" />
<mask> <tbody> <mask> <tr> <mask> <td> <mask> DNS Queries <mask> <Tooltip text="A number of DNS quieries processed in the last 3 minutes" /> <mask> </td> <mask> <td className="text-right"> <mask> <span className="text-muted"> <mask> {props.dnsQueries} <mask> </span> </s> Web UI API -- Give out 24-hour stat instead of last 3 minutes. </s> remove <Card title="General statistics" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="General statistics" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove <Card title="Top clients" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top clients" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove <Card title="Top queried domains" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top queried domains" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove <Card title="Top blocked domains" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top blocked domains" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove summed["stats_period"] = "3 minutes" </s> add summed["stats_period"] = "24 hours"
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d7360c700b858f8ae8a9763b1199a8ea30078b0
client/src/components/Dashboard/Counters.js
<Card title="Top queried domains" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}>
<mask> <mask> import Card from '../ui/Card'; <mask> <mask> const QueriedDomains = props => ( <mask> <Card title="Top queried domains" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> <mask> <ReactTable <mask> data={map(props.topQueriedDomains, (value, prop) => ( <mask> { ip: prop, count: value } <mask> ))} <mask> columns={[{ </s> Web UI API -- Give out 24-hour stat instead of last 3 minutes. </s> remove <Card title="Top blocked domains" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top blocked domains" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove <Card title="Top clients" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top clients" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove <Card title="General statistics" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="General statistics" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove summed["stats_period"] = "3 minutes" </s> add summed["stats_period"] = "24 hours" </s> remove <Tooltip text="A number of DNS quieries processed in the last 3 minutes" /> </s> add <Tooltip text="A number of DNS quieries processed in the last 24 hours" />
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d7360c700b858f8ae8a9763b1199a8ea30078b0
client/src/components/Dashboard/QueriedDomains.js
histrical := generateMapFromStats(&statistics.perHour, 0, 24)
<mask> // ----- <mask> // stats <mask> // ----- <mask> func handleStats(w http.ResponseWriter, r *http.Request) { <mask> histrical := generateMapFromStats(&statistics.perMinute, 0, 2) <mask> // sum them up <mask> summed := map[string]interface{}{} <mask> for key, values := range histrical { <mask> summedValue := 0.0 <mask> floats, ok := values.([]float64) </s> Web UI API -- Give out 24-hour stat instead of last 3 minutes. </s> remove timeWindow := time.Minute * 3 </s> add timeWindow := time.Hour * 24 </s> remove summed["stats_period"] = "3 minutes" </s> add summed["stats_period"] = "24 hours" </s> remove gen(&json, "top_clients", clients, false) </s> add gen(&json, "top_clients", clients, true) json.WriteString(" \"stats_period\": \"24 hours\"\n") </s> remove <Card title="Top clients" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top clients" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove <Card title="Top queried domains" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top queried domains" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d7360c700b858f8ae8a9763b1199a8ea30078b0
control.go
summed["stats_period"] = "24 hours"
<mask> summedValue += v <mask> } <mask> summed[key] = summedValue <mask> } <mask> summed["stats_period"] = "3 minutes" <mask> <mask> json, err := json.Marshal(summed) <mask> if err != nil { <mask> errortext := fmt.Sprintf("Unable to marshal status json: %s", err) <mask> log.Println(errortext) </s> Web UI API -- Give out 24-hour stat instead of last 3 minutes. </s> remove gen(&json, "top_clients", clients, false) </s> add gen(&json, "top_clients", clients, true) json.WriteString(" \"stats_period\": \"24 hours\"\n") </s> remove histrical := generateMapFromStats(&statistics.perMinute, 0, 2) </s> add histrical := generateMapFromStats(&statistics.perHour, 0, 24) </s> remove timeWindow := time.Minute * 3 </s> add timeWindow := time.Hour * 24 </s> remove <Card title="Top clients" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top clients" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove <Card title="Top queried domains" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top queried domains" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d7360c700b858f8ae8a9763b1199a8ea30078b0
control.go
timeWindow := time.Hour * 24
<mask> domains := map[string]int{} <mask> blocked := map[string]int{} <mask> clients := map[string]int{} <mask> now := time.Now() <mask> timeWindow := time.Minute * 3 <mask> notBefore := now.Add(timeWindow * -1) <mask> <mask> for _, value := range values { <mask> entry, ok := value.(map[string]interface{}) <mask> if !ok { </s> Web UI API -- Give out 24-hour stat instead of last 3 minutes. </s> remove histrical := generateMapFromStats(&statistics.perMinute, 0, 2) </s> add histrical := generateMapFromStats(&statistics.perHour, 0, 24) </s> remove summed["stats_period"] = "3 minutes" </s> add summed["stats_period"] = "24 hours" </s> remove <Card title="Top blocked domains" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top blocked domains" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove gen(&json, "top_clients", clients, false) </s> add gen(&json, "top_clients", clients, true) json.WriteString(" \"stats_period\": \"24 hours\"\n") </s> remove <Card title="Top clients" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top clients" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d7360c700b858f8ae8a9763b1199a8ea30078b0
control.go
gen(&json, "top_clients", clients, true) json.WriteString(" \"stats_period\": \"24 hours\"\n")
<mask> json.WriteByte('\n') <mask> } <mask> gen(&json, "top_queried_domains", domains, true) <mask> gen(&json, "top_blocked_domains", blocked, true) <mask> gen(&json, "top_clients", clients, false) <mask> json.WriteString("}\n") <mask> <mask> w.Header().Set("Content-Type", "application/json") <mask> _, err = w.Write(json.Bytes()) <mask> if err != nil { </s> Web UI API -- Give out 24-hour stat instead of last 3 minutes. </s> remove summed["stats_period"] = "3 minutes" </s> add summed["stats_period"] = "24 hours" </s> remove timeWindow := time.Minute * 3 </s> add timeWindow := time.Hour * 24 </s> remove <Card title="Top clients" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top clients" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove <Card title="Top queried domains" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top queried domains" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}> </s> remove <Card title="Top blocked domains" subtitle="in the last 3 minutes" bodyType="card-table" refresh={props.refreshButton}> </s> add <Card title="Top blocked domains" subtitle="in the last 24 hours" bodyType="card-table" refresh={props.refreshButton}>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d7360c700b858f8ae8a9763b1199a8ea30078b0
control.go
closeMenu = () => { this.props.closeMenu();
<mask> handleClickOutside = () => { <mask> this.props.closeMenu(); <mask> }; <mask> <mask> toggleMenu = () => { <mask> this.props.toggleMenuOpen(); <mask> }; <mask> <mask> getActiveClassForDropdown = (URLS) => { <mask> const { pathname } = this.props.location; <mask> const isActivePage = Object.values(URLS).some(item => item === pathname); </s> - client: fix closing mobile menu </s> remove toggleMenuOpen: PropTypes.func, </s> add </s> remove onClick={this.toggleMenu} </s> add onClick={this.closeMenu} </s> remove toggleMenuOpen={this.toggleMenuOpen} </s> add </s> remove onClick={this.toggleMenu} </s> add onClick={this.closeMenu}
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e2ef010399c0a308131c14beca1f35eb9e331fd
client/src/components/Header/Menu.js
onClick={this.closeMenu}
<mask> to={route} <mask> key={route} <mask> exact={exact || false} <mask> className={`order-${order} ${className}`} <mask> onClick={this.toggleMenu} <mask> > <mask> {icon && ( <mask> <svg className="nav-icon"> <mask> <use xlinkHref={`#${icon}`} /> <mask> </svg> </s> - client: fix closing mobile menu </s> remove onClick={this.toggleMenu} </s> add onClick={this.closeMenu} </s> remove toggleMenuOpen={this.toggleMenuOpen} </s> add </s> remove toggleMenuOpen: PropTypes.func, </s> add </s> remove toggleMenu = () => { this.props.toggleMenuOpen(); </s> add closeMenu = () => { this.props.closeMenu();
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e2ef010399c0a308131c14beca1f35eb9e331fd
client/src/components/Header/Menu.js
onClick={this.closeMenu}
<mask> {MENU_ITEMS.map(item => ( <mask> <li <mask> className={`nav-item order-${item.order}`} <mask> key={item.text} <mask> onClick={this.toggleMenu} <mask> > <mask> {this.getNavLink({ ...item, className: 'nav-link' })} <mask> </li> <mask> ))} <mask> {this.getDropdown({ </s> - client: fix closing mobile menu </s> remove onClick={this.toggleMenu} </s> add onClick={this.closeMenu} </s> remove toggleMenu = () => { this.props.toggleMenuOpen(); </s> add closeMenu = () => { this.props.closeMenu(); </s> remove toggleMenuOpen={this.toggleMenuOpen} </s> add </s> remove toggleMenuOpen: PropTypes.func, </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e2ef010399c0a308131c14beca1f35eb9e331fd
client/src/components/Header/Menu.js
<mask> <mask> Menu.propTypes = { <mask> isMenuOpen: PropTypes.bool, <mask> closeMenu: PropTypes.func, <mask> toggleMenuOpen: PropTypes.func, <mask> location: PropTypes.object, <mask> t: PropTypes.func, <mask> }; <mask> <mask> export default withNamespaces()(enhanceWithClickOutside(Menu)); </s> - client: fix closing mobile menu </s> remove toggleMenu = () => { this.props.toggleMenuOpen(); </s> add closeMenu = () => { this.props.closeMenu(); </s> remove toggleMenuOpen={this.toggleMenuOpen} </s> add </s> remove onClick={this.toggleMenu} </s> add onClick={this.closeMenu} </s> remove onClick={this.toggleMenu} </s> add onClick={this.closeMenu}
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e2ef010399c0a308131c14beca1f35eb9e331fd
client/src/components/Header/Menu.js
<mask> </div> <mask> <Menu <mask> location={location} <mask> isMenuOpen={isMenuOpen} <mask> toggleMenuOpen={this.toggleMenuOpen} <mask> closeMenu={this.closeMenu} <mask> /> <mask> <div className="header__column"> <mask> <div className="header__right"> <mask> {!dashboard.processingProfile && dashboard.name && </s> - client: fix closing mobile menu </s> remove onClick={this.toggleMenu} </s> add onClick={this.closeMenu} </s> remove toggleMenuOpen: PropTypes.func, </s> add </s> remove onClick={this.toggleMenu} </s> add onClick={this.closeMenu} </s> remove toggleMenu = () => { this.props.toggleMenuOpen(); </s> add closeMenu = () => { this.props.closeMenu();
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e2ef010399c0a308131c14beca1f35eb9e331fd
client/src/components/Header/index.js
// TODO(a.garipov): Replace with a smaller version of // https://github.com/josharian/native.
<mask> return now <= (tokenDate + glTokenTimeoutSeconds) <mask> } <mask> <mask> func archIsLittleEndian() bool { <mask> var i int32 = 0x01020304 <mask> u := unsafe.Pointer(&i) <mask> pb := (*byte)(u) <mask> b := *pb </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove err := binary.Read(buf, binary.LittleEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } } else { err := binary.Read(buf, binary.BigEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } </s> add order = binary.LittleEndian </s> remove // IsOpenWRT returns true if host OS is OpenWRT. func IsOpenWRT() bool { </s> add // IsOpenWrt returns true if host OS is OpenWrt. func IsOpenWrt() bool { </s> remove _ip, ok := c["ip"] </s> add var ipVal interface{} ipVal, ok = c["ip"] </s> remove st, err := os.Stat(filepath.Join(dir, "data", "filters", "1.txt")) if err == nil && st.Size() != 0 { </s> add var fi os.FileInfo fi, err = os.Stat(filepath.Join(dir, "data", "filters", "1.txt")) if err == nil && fi.Size() != 0 {
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/authglinet.go
var order binary.ByteOrder = binary.BigEndian
<mask> buf := bytes.NewBuffer(bs) <mask> <mask> if archIsLittleEndian() { <mask> order = binary.LittleEndian <mask> } <mask> </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove err := binary.Read(buf, binary.LittleEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } } else { err := binary.Read(buf, binary.BigEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } </s> add order = binary.LittleEndian </s> remove dnsEncryption := getDNSEncryption() if dnsEncryption.https != "" { dnsAddresses = append(dnsAddresses, dnsEncryption.https) </s> add de := getDNSEncryption() if de.https != "" { dnsAddresses = append(dnsAddresses, de.https) </s> remove if dnsEncryption.tls != "" { dnsAddresses = append(dnsAddresses, dnsEncryption.tls) </s> add if de.tls != "" { dnsAddresses = append(dnsAddresses, de.tls)
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/authglinet.go
order = binary.LittleEndian
<mask> } <mask> buf := bytes.NewBuffer(bs) <mask> <mask> if archIsLittleEndian() { <mask> err := binary.Read(buf, binary.LittleEndian, &dateToken) <mask> if err != nil { <mask> log.Error("binary.Read: %s", err) <mask> return 0 <mask> } <mask> } else { <mask> err := binary.Read(buf, binary.BigEndian, &dateToken) <mask> if err != nil { <mask> log.Error("binary.Read: %s", err) <mask> return 0 <mask> } <mask> } <mask> return dateToken <mask> } </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove if e != nil { return nil, e </s> add if err != nil { return nil, err </s> remove if err := tmpFile.Close(); err != nil { log.Printf("Couldn't close temporary file: %s", err) </s> add if derr = tmpFile.Close(); derr != nil { log.Printf("Couldn't close temporary file: %s", derr) </s> remove resp, err := Context.client.Get(filter.URL) if resp != nil && resp.Body != nil { defer resp.Body.Close() } </s> add var resp *http.Response resp, err = Context.client.Get(filter.URL) </s> remove if err := os.Remove(tmpFileName); err != nil { log.Printf("Couldn't delete temporary file %s: %s", tmpFileName, err) </s> add if derr = os.Remove(tmpFileName); derr != nil { log.Printf("Couldn't delete temporary file %s: %s", tmpFileName, derr)
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/authglinet.go
err = binary.Read(buf, order, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 }
<mask> if archIsLittleEndian() { <mask> order = binary.LittleEndian <mask> } <mask> return dateToken <mask> } </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove err := binary.Read(buf, binary.LittleEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } } else { err := binary.Read(buf, binary.BigEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } </s> add order = binary.LittleEndian </s> remove if err == nil { err = eff() </s> add if ferr == nil { ferr = eff() </s> remove return err </s> add return ferr </s> remove if dnsEncryption.quic != "" { dnsAddresses = append(dnsAddresses, dnsEncryption.quic) </s> add if de.quic != "" { dnsAddresses = append(dnsAddresses, de.quic)
[ "keep", "keep", "add", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/authglinet.go
// First, check the name index.
<mask> if !ok { <mask> return agherr.Error("client not found") <mask> } <mask> <mask> // check Name index <mask> if prev.Name != c.Name { <mask> _, ok = clients.list[c.Name] <mask> if ok { <mask> return agherr.Error("client already exists") <mask> } </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove // check IP index </s> add // Second, check the IP index. </s> remove c2, ok := clients.idIndex[id] if ok && c2 != prev { return fmt.Errorf("another client uses the same ID (%q): %q", id, c2.Name) </s> add c2, ok2 := clients.idIndex[id] if ok2 && c2 != prev { return fmt.Errorf("another client uses the same id (%q): %q", id, c2.Name) </s> remove mac, ok := _mac.(string) </s> add var mac string mac, ok = macVal.(string) </s> remove log.Fatalf("client.mac is not a string: %v", _mac) </s> add log.Fatalf("client.mac is not a string: %v", macVal) </s> remove log.Fatalf("client.ip is not a string: %v", _ip) </s> add log.Fatalf("client.ip is not a string: %v", ipVal)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/clients.go
// Second, check the IP index.
<mask> return agherr.Error("client already exists") <mask> } <mask> } <mask> <mask> // check IP index <mask> if !equalStringSlices(prev.IDs, c.IDs) { <mask> for _, id := range c.IDs { <mask> c2, ok := clients.idIndex[id] <mask> if ok && c2 != prev { <mask> return fmt.Errorf("another client uses the same ID (%q): %q", id, c2.Name) </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove c2, ok := clients.idIndex[id] if ok && c2 != prev { return fmt.Errorf("another client uses the same ID (%q): %q", id, c2.Name) </s> add c2, ok2 := clients.idIndex[id] if ok2 && c2 != prev { return fmt.Errorf("another client uses the same id (%q): %q", id, c2.Name) </s> remove // check Name index </s> add // First, check the name index. </s> remove if opErr, ok := err.(*net.OpError); ok { if sysErr, ok := opErr.Err.(*os.SyscallError); ok { if errno, ok := sysErr.Err.(syscall.Errno); ok && errno == syscall.EACCES { msg := `Permission check failed. </s> add if errors.Is(err, os.ErrPermission) { msg := `Permission check failed. </s> remove _, ipnet, err := net.ParseCIDR(ipnetStr) </s> add var ipnet *net.IPNet _, ipnet, err = net.ParseCIDR(ipnetStr) </s> remove f := dnsfilter.Filter{ </s> add f = dnsfilter.Filter{
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/clients.go
c2, ok2 := clients.idIndex[id] if ok2 && c2 != prev { return fmt.Errorf("another client uses the same id (%q): %q", id, c2.Name)
<mask> <mask> // check IP index <mask> if !equalStringSlices(prev.IDs, c.IDs) { <mask> for _, id := range c.IDs { <mask> c2, ok := clients.idIndex[id] <mask> if ok && c2 != prev { <mask> return fmt.Errorf("another client uses the same ID (%q): %q", id, c2.Name) <mask> } <mask> } <mask> <mask> // update ID index <mask> for _, id := range prev.IDs { </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove // check IP index </s> add // Second, check the IP index. </s> remove // check Name index </s> add // First, check the name index. </s> remove f := dnsfilter.Filter{ </s> add f = dnsfilter.Filter{ </s> remove f := dnsfilter.Filter{ </s> add f = dnsfilter.Filter{ </s> remove _, ipnet, err := net.ParseCIDR(ipnetStr) </s> add var ipnet *net.IPNet _, ipnet, err = net.ParseCIDR(ipnetStr)
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/clients.go
// Method http.(*Server).Shutdown needs to be called in a separate // goroutine and with its own context, because it waits until all // requests are handled and will be blocked by it's own caller.
<mask> if f, ok := w.(http.Flusher); ok { <mask> f.Flush() <mask> } <mask> <mask> // The Shutdown() method of (*http.Server) needs to be called in a <mask> // separate goroutine, because it waits until all requests are handled <mask> // and will be blocked by it's own caller. <mask> if restartHTTP { <mask> ctx, cancel := context.WithTimeout(context.Background(), shutdownTimeout) <mask> <mask> shut := func(srv *http.Server) { <mask> defer cancel() </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove shut := func(srv *http.Server) { defer cancel() err := srv.Shutdown(ctx) if err != nil { log.Debug("error while shutting down HTTP server: %s", err) } } go shut(web.httpServer) if web.httpServerBeta != nil { go shut(web.httpServerBeta) } </s> add go shutdownSrv(ctx, cancel, web.httpServer) go shutdownSrv(ctx, cancel, web.httpServerBeta) </s> remove shut := func(srv *http.Server) { if srv == nil { return } ctx, cancel := context.WithTimeout(ctx, shutdownTimeout) defer cancel() if err := srv.Shutdown(ctx); err != nil { log.Debug("error while shutting down HTTP server: %s", err) } } </s> add var cancel context.CancelFunc ctx, cancel = context.WithTimeout(ctx, shutdownTimeout) </s> remove ctx, cancel := context.WithTimeout(ctx, shutdownTimeout) err = web.httpsServer.server.Shutdown(ctx) cancel() if err != nil { log.Debug("error while shutting down HTTP server: %s", err) } </s> add var cancel context.CancelFunc ctx, cancel = context.WithTimeout(ctx, shutdownTimeout) shutdownSrv(ctx, cancel, web.httpsServer.server) </s> remove if util.IsOpenWRT() { </s> add if util.IsOpenWrt() { </s> remove log.Info("Stopping HTTP server...") </s> add log.Info("stopping http server...")
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/controlinstall.go
go shutdownSrv(ctx, cancel, web.httpServer) go shutdownSrv(ctx, cancel, web.httpServerBeta)
<mask> // separate goroutine, because it waits until all requests are handled <mask> // and will be blocked by it's own caller. <mask> if restartHTTP { <mask> ctx, cancel := context.WithTimeout(context.Background(), shutdownTimeout) <mask> <mask> shut := func(srv *http.Server) { <mask> defer cancel() <mask> err := srv.Shutdown(ctx) <mask> if err != nil { <mask> log.Debug("error while shutting down HTTP server: %s", err) <mask> } <mask> } <mask> go shut(web.httpServer) <mask> if web.httpServerBeta != nil { <mask> go shut(web.httpServerBeta) <mask> } <mask> } <mask> } <mask> <mask> func (web *Web) registerInstallHandlers() { <mask> Context.mux.HandleFunc("/control/install/get_addresses", preInstall(ensureGET(web.handleInstallGetAddresses))) </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove // The Shutdown() method of (*http.Server) needs to be called in a // separate goroutine, because it waits until all requests are handled // and will be blocked by it's own caller. </s> add // Method http.(*Server).Shutdown needs to be called in a separate // goroutine and with its own context, because it waits until all // requests are handled and will be blocked by it's own caller. </s> remove shut := func(srv *http.Server) { if srv == nil { return } ctx, cancel := context.WithTimeout(ctx, shutdownTimeout) defer cancel() if err := srv.Shutdown(ctx); err != nil { log.Debug("error while shutting down HTTP server: %s", err) } } </s> add var cancel context.CancelFunc ctx, cancel = context.WithTimeout(ctx, shutdownTimeout) </s> remove ctx, cancel := context.WithTimeout(ctx, shutdownTimeout) err = web.httpsServer.server.Shutdown(ctx) cancel() if err != nil { log.Debug("error while shutting down HTTP server: %s", err) } </s> add var cancel context.CancelFunc ctx, cancel = context.WithTimeout(ctx, shutdownTimeout) shutdownSrv(ctx, cancel, web.httpsServer.server) </s> remove shut(web.httpsServer.server) shut(web.httpServer) shut(web.httpServerBeta) </s> add shutdownSrv(ctx, cancel, web.httpsServer.server) shutdownSrv(ctx, cancel, web.httpServer) shutdownSrv(ctx, cancel, web.httpServerBeta) </s> remove log.Info("Stopping HTTP server...") </s> add log.Info("stopping http server...")
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/controlinstall.go
de := getDNSEncryption() if de.https != "" { dnsAddresses = append(dnsAddresses, de.https)
<mask> } else { <mask> addDNSAddress(&dnsAddresses, config.DNS.BindHost) <mask> } <mask> <mask> dnsEncryption := getDNSEncryption() <mask> if dnsEncryption.https != "" { <mask> dnsAddresses = append(dnsAddresses, dnsEncryption.https) <mask> } <mask> if dnsEncryption.tls != "" { <mask> dnsAddresses = append(dnsAddresses, dnsEncryption.tls) <mask> } <mask> if dnsEncryption.quic != "" { </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove if dnsEncryption.tls != "" { dnsAddresses = append(dnsAddresses, dnsEncryption.tls) </s> add if de.tls != "" { dnsAddresses = append(dnsAddresses, de.tls) </s> remove if dnsEncryption.quic != "" { dnsAddresses = append(dnsAddresses, dnsEncryption.quic) </s> add if de.quic != "" { dnsAddresses = append(dnsAddresses, de.quic) </s> remove certPEM, err := base64.StdEncoding.DecodeString(data.CertificateChain) </s> add var cert []byte cert, err = base64.StdEncoding.DecodeString(data.CertificateChain) </s> remove keyPEM, err := base64.StdEncoding.DecodeString(data.PrivateKey) </s> add var key []byte key, err = base64.StdEncoding.DecodeString(data.PrivateKey) </s> remove data.CertificateChain = string(certPEM) </s> add data.CertificateChain = string(cert)
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/dns.go
if de.tls != "" { dnsAddresses = append(dnsAddresses, de.tls)
<mask> dnsEncryption := getDNSEncryption() <mask> if dnsEncryption.https != "" { <mask> dnsAddresses = append(dnsAddresses, dnsEncryption.https) <mask> } <mask> if dnsEncryption.tls != "" { <mask> dnsAddresses = append(dnsAddresses, dnsEncryption.tls) <mask> } <mask> if dnsEncryption.quic != "" { <mask> dnsAddresses = append(dnsAddresses, dnsEncryption.quic) <mask> } <mask> </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove dnsEncryption := getDNSEncryption() if dnsEncryption.https != "" { dnsAddresses = append(dnsAddresses, dnsEncryption.https) </s> add de := getDNSEncryption() if de.https != "" { dnsAddresses = append(dnsAddresses, de.https) </s> remove if dnsEncryption.quic != "" { dnsAddresses = append(dnsAddresses, dnsEncryption.quic) </s> add if de.quic != "" { dnsAddresses = append(dnsAddresses, de.quic) </s> remove certPEM, err := base64.StdEncoding.DecodeString(data.CertificateChain) </s> add var cert []byte cert, err = base64.StdEncoding.DecodeString(data.CertificateChain) </s> remove keyPEM, err := base64.StdEncoding.DecodeString(data.PrivateKey) </s> add var key []byte key, err = base64.StdEncoding.DecodeString(data.PrivateKey) </s> remove data.CertificateChain = string(certPEM) </s> add data.CertificateChain = string(cert)
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/dns.go
if de.quic != "" { dnsAddresses = append(dnsAddresses, de.quic)
<mask> } <mask> if dnsEncryption.tls != "" { <mask> dnsAddresses = append(dnsAddresses, dnsEncryption.tls) <mask> } <mask> if dnsEncryption.quic != "" { <mask> dnsAddresses = append(dnsAddresses, dnsEncryption.quic) <mask> } <mask> <mask> return dnsAddresses <mask> } <mask> </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove if dnsEncryption.tls != "" { dnsAddresses = append(dnsAddresses, dnsEncryption.tls) </s> add if de.tls != "" { dnsAddresses = append(dnsAddresses, de.tls) </s> remove dnsEncryption := getDNSEncryption() if dnsEncryption.https != "" { dnsAddresses = append(dnsAddresses, dnsEncryption.https) </s> add de := getDNSEncryption() if de.https != "" { dnsAddresses = append(dnsAddresses, de.https) </s> remove certPEM, err := base64.StdEncoding.DecodeString(data.CertificateChain) </s> add var cert []byte cert, err = base64.StdEncoding.DecodeString(data.CertificateChain) </s> remove keyPEM, err := base64.StdEncoding.DecodeString(data.PrivateKey) </s> add var key []byte key, err = base64.StdEncoding.DecodeString(data.PrivateKey) </s> remove data.PrivateKey = string(keyPEM) </s> add data.PrivateKey = string(key)
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/dns.go
var derr error
<mask> } <mask> defer func() { <mask> if tmpFile != nil { <mask> if derr = tmpFile.Close(); derr != nil { <mask> log.Printf("Couldn't close temporary file: %s", derr) <mask> } <mask> <mask> tmpFileName := tmpFile.Name() </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove if err := tmpFile.Close(); err != nil { log.Printf("Couldn't close temporary file: %s", err) </s> add if derr = tmpFile.Close(); derr != nil { log.Printf("Couldn't close temporary file: %s", derr) </s> remove if err := os.Remove(tmpFileName); err != nil { log.Printf("Couldn't delete temporary file %s: %s", tmpFileName, err) </s> add if derr = os.Remove(tmpFileName); derr != nil { log.Printf("Couldn't delete temporary file %s: %s", tmpFileName, derr) </s> remove resp, err := Context.client.Get(filter.URL) if resp != nil && resp.Body != nil { defer resp.Body.Close() } </s> add var resp *http.Response resp, err = Context.client.Get(filter.URL) </s> remove f = func() error { var err error </s> add f = func() (ferr error) { </s> remove log.Fatal(err) </s> add log.Fatal(serr)
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/filter.go
if derr = tmpFile.Close(); derr != nil { log.Printf("Couldn't close temporary file: %s", derr)
<mask> return updated, err <mask> } <mask> defer func() { <mask> if tmpFile != nil { <mask> if err := tmpFile.Close(); err != nil { <mask> log.Printf("Couldn't close temporary file: %s", err) <mask> } <mask> tmpFileName := tmpFile.Name() <mask> if err := os.Remove(tmpFileName); err != nil { <mask> log.Printf("Couldn't delete temporary file %s: %s", tmpFileName, err) <mask> } </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove if err := os.Remove(tmpFileName); err != nil { log.Printf("Couldn't delete temporary file %s: %s", tmpFileName, err) </s> add if derr = os.Remove(tmpFileName); derr != nil { log.Printf("Couldn't delete temporary file %s: %s", tmpFileName, derr) </s> remove resp, err := Context.client.Get(filter.URL) if resp != nil && resp.Body != nil { defer resp.Body.Close() } </s> add var resp *http.Response resp, err = Context.client.Get(filter.URL) </s> remove err := binary.Read(buf, binary.LittleEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } } else { err := binary.Read(buf, binary.BigEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } </s> add order = binary.LittleEndian
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/filter.go
if derr = os.Remove(tmpFileName); derr != nil { log.Printf("Couldn't delete temporary file %s: %s", tmpFileName, derr)
<mask> if err := tmpFile.Close(); err != nil { <mask> log.Printf("Couldn't close temporary file: %s", err) <mask> } <mask> tmpFileName := tmpFile.Name() <mask> if err := os.Remove(tmpFileName); err != nil { <mask> log.Printf("Couldn't delete temporary file %s: %s", tmpFileName, err) <mask> } <mask> <mask> } <mask> }() <mask> </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove if err := tmpFile.Close(); err != nil { log.Printf("Couldn't close temporary file: %s", err) </s> add if derr = tmpFile.Close(); derr != nil { log.Printf("Couldn't close temporary file: %s", derr) </s> remove resp, err := Context.client.Get(filter.URL) if resp != nil && resp.Body != nil { defer resp.Body.Close() } </s> add var resp *http.Response resp, err = Context.client.Get(filter.URL) </s> remove err := binary.Read(buf, binary.LittleEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } } else { err := binary.Read(buf, binary.BigEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } </s> add order = binary.LittleEndian </s> remove log.Printf("cannot remove %s", launchdStdoutPath) </s> add log.Printf("removing stdout file: %s", err)
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/filter.go
var f io.ReadCloser f, err = os.Open(filter.URL)
<mask> }() <mask> <mask> var reader io.Reader <mask> if filepath.IsAbs(filter.URL) { <mask> f, err := os.Open(filter.URL) <mask> if err != nil { <mask> return updated, fmt.Errorf("open file: %w", err) <mask> } <mask> defer f.Close() <mask> reader = f </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove resp, err := Context.client.Get(filter.URL) if resp != nil && resp.Body != nil { defer resp.Body.Close() } </s> add var resp *http.Response resp, err = Context.client.Get(filter.URL) </s> remove if err := tmpFile.Close(); err != nil { log.Printf("Couldn't close temporary file: %s", err) </s> add if derr = tmpFile.Close(); derr != nil { log.Printf("Couldn't close temporary file: %s", derr) </s> remove f = func() error { var err error </s> add f = func() (ferr error) { </s> remove certPEM, err := base64.StdEncoding.DecodeString(data.CertificateChain) </s> add var cert []byte cert, err = base64.StdEncoding.DecodeString(data.CertificateChain)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/filter.go
var resp *http.Response resp, err = Context.client.Get(filter.URL)
<mask> } <mask> defer f.Close() <mask> reader = f <mask> } else { <mask> resp, err := Context.client.Get(filter.URL) <mask> if resp != nil && resp.Body != nil { <mask> defer resp.Body.Close() <mask> } <mask> if err != nil { <mask> log.Printf("Couldn't request filter from URL %s, skipping: %s", filter.URL, err) <mask> return updated, err <mask> } <mask> </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove f, err := os.Open(filter.URL) </s> add var f io.ReadCloser f, err = os.Open(filter.URL) </s> remove if err := tmpFile.Close(); err != nil { log.Printf("Couldn't close temporary file: %s", err) </s> add if derr = tmpFile.Close(); derr != nil { log.Printf("Couldn't close temporary file: %s", derr) </s> remove err := binary.Read(buf, binary.LittleEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } } else { err := binary.Read(buf, binary.BigEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } </s> add order = binary.LittleEndian
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/filter.go
defer resp.Body.Close()
<mask> if err != nil { <mask> log.Printf("Couldn't request filter from URL %s, skipping: %s", filter.URL, err) <mask> return updated, err <mask> } <mask> <mask> if resp.StatusCode != http.StatusOK { <mask> log.Printf("Got status code %d from URL %s, skipping", resp.StatusCode, filter.URL) <mask> return updated, fmt.Errorf("got status code != 200: %d", resp.StatusCode) <mask> } </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove resp, err := Context.client.Get(filter.URL) if resp != nil && resp.Body != nil { defer resp.Body.Close() } </s> add var resp *http.Response resp, err = Context.client.Get(filter.URL) </s> remove if err := tmpFile.Close(); err != nil { log.Printf("Couldn't close temporary file: %s", err) </s> add if derr = tmpFile.Close(); derr != nil { log.Printf("Couldn't close temporary file: %s", derr) </s> remove code, err := runInitdCommand("status") if err != nil { return service.StatusStopped, nil } if code != 0 { </s> add var code int code, err = runInitdCommand("status") if err != nil || code != 0 { </s> remove if err := os.Remove(tmpFileName); err != nil { log.Printf("Couldn't delete temporary file %s: %s", tmpFileName, err) </s> add if derr = os.Remove(tmpFileName); derr != nil { log.Printf("Couldn't delete temporary file %s: %s", tmpFileName, derr) </s> remove f, err := os.Open(filter.URL) </s> add var f io.ReadCloser f, err = os.Open(filter.URL)
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/filter.go
f = dnsfilter.Filter{
<mask> for _, filter := range config.Filters { <mask> if !filter.Enabled { <mask> continue <mask> } <mask> f := dnsfilter.Filter{ <mask> ID: filter.ID, <mask> FilePath: filter.Path(), <mask> } <mask> filters = append(filters, f) <mask> } </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove f := dnsfilter.Filter{ </s> add f = dnsfilter.Filter{ </s> remove con, err := dialer.DialContext(ctx, network, addr) </s> add conn, err = dialer.DialContext(ctx, network, addr) </s> remove _, ipnet, err := net.ParseCIDR(ipnetStr) </s> add var ipnet *net.IPNet _, ipnet, err = net.ParseCIDR(ipnetStr) </s> remove c2, ok := clients.idIndex[id] if ok && c2 != prev { return fmt.Errorf("another client uses the same ID (%q): %q", id, c2.Name) </s> add c2, ok2 := clients.idIndex[id] if ok2 && c2 != prev { return fmt.Errorf("another client uses the same id (%q): %q", id, c2.Name) </s> remove resp, err := Context.client.Get(filter.URL) if resp != nil && resp.Body != nil { defer resp.Body.Close() } </s> add var resp *http.Response resp, err = Context.client.Get(filter.URL)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/filter.go
f = dnsfilter.Filter{
<mask> for _, filter := range config.WhitelistFilters { <mask> if !filter.Enabled { <mask> continue <mask> } <mask> f := dnsfilter.Filter{ <mask> ID: filter.ID, <mask> FilePath: filter.Path(), <mask> } <mask> whiteFilters = append(whiteFilters, f) <mask> } </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove f := dnsfilter.Filter{ </s> add f = dnsfilter.Filter{ </s> remove con, err := dialer.DialContext(ctx, network, addr) </s> add conn, err = dialer.DialContext(ctx, network, addr) </s> remove _, ipnet, err := net.ParseCIDR(ipnetStr) </s> add var ipnet *net.IPNet _, ipnet, err = net.ParseCIDR(ipnetStr) </s> remove c2, ok := clients.idIndex[id] if ok && c2 != prev { return fmt.Errorf("another client uses the same ID (%q): %q", id, c2.Name) </s> add c2, ok2 := clients.idIndex[id] if ok2 && c2 != prev { return fmt.Errorf("another client uses the same id (%q): %q", id, c2.Name) </s> remove resp, err := Context.client.Get(filter.URL) if resp != nil && resp.Body != nil { defer resp.Body.Close() } </s> add var resp *http.Response resp, err = Context.client.Get(filter.URL)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/filter.go
lerr := http.ListenAndServe("localhost:6060", mux) log.Error("Error while running the pprof server: %s", lerr)
<mask> mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol) <mask> mux.HandleFunc("/debug/pprof/trace", pprof.Trace) <mask> go func() { <mask> log.Info("pprof: listening on localhost:6060") <mask> err := http.ListenAndServe("localhost:6060", mux) <mask> log.Error("Error while running the pprof server: %s", err) <mask> }() <mask> } <mask> } <mask> <mask> err := os.MkdirAll(Context.getDataDir(), 0o755) </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove shut := func(srv *http.Server) { defer cancel() err := srv.Shutdown(ctx) if err != nil { log.Debug("error while shutting down HTTP server: %s", err) } } go shut(web.httpServer) if web.httpServerBeta != nil { go shut(web.httpServerBeta) } </s> add go shutdownSrv(ctx, cancel, web.httpServer) go shutdownSrv(ctx, cancel, web.httpServerBeta) </s> remove err := startDNSServer() if err != nil { </s> add serr := startDNSServer() if serr != nil { </s> remove log.Fatal(err) </s> add log.Fatal(serr) </s> remove shut := func(srv *http.Server) { if srv == nil { return } ctx, cancel := context.WithTimeout(ctx, shutdownTimeout) defer cancel() if err := srv.Shutdown(ctx); err != nil { log.Debug("error while shutting down HTTP server: %s", err) } } </s> add var cancel context.CancelFunc ctx, cancel = context.WithTimeout(ctx, shutdownTimeout) </s> remove shut(web.httpsServer.server) shut(web.httpServer) shut(web.httpServerBeta) </s> add shutdownSrv(ctx, cancel, web.httpsServer.server) shutdownSrv(ctx, cancel, web.httpServer) shutdownSrv(ctx, cancel, web.httpServerBeta)
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/home.go
err = initDNSServer()
<mask> log.Fatal(err) <mask> } <mask> <mask> if !Context.firstRun { <mask> err := initDNSServer() <mask> if err != nil { <mask> log.Fatalf("%s", err) <mask> } <mask> Context.tls.Start() <mask> Context.autoHosts.Start() </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove err := startDNSServer() if err != nil { </s> add serr := startDNSServer() if serr != nil { </s> remove log.Fatal(err) </s> add log.Fatal(serr) </s> remove err := binary.Read(buf, binary.LittleEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } } else { err := binary.Read(buf, binary.BigEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } </s> add order = binary.LittleEndian </s> remove if util.IsOpenWRT() { </s> add if util.IsOpenWrt() { </s> remove if err := tmpFile.Close(); err != nil { log.Printf("Couldn't close temporary file: %s", err) </s> add if derr = tmpFile.Close(); derr != nil { log.Printf("Couldn't close temporary file: %s", derr)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/home.go
serr := startDNSServer() if serr != nil {
<mask> Context.tls.Start() <mask> Context.autoHosts.Start() <mask> <mask> go func() { <mask> err := startDNSServer() <mask> if err != nil { <mask> closeDNSServer() <mask> log.Fatal(err) <mask> } <mask> }() <mask> </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove log.Fatal(err) </s> add log.Fatal(serr) </s> remove err := initDNSServer() </s> add err = initDNSServer() </s> remove f = func() error { var err error </s> add f = func() (ferr error) { </s> remove shut := func(srv *http.Server) { defer cancel() err := srv.Shutdown(ctx) if err != nil { log.Debug("error while shutting down HTTP server: %s", err) } } go shut(web.httpServer) if web.httpServerBeta != nil { go shut(web.httpServerBeta) } </s> add go shutdownSrv(ctx, cancel, web.httpServer) go shutdownSrv(ctx, cancel, web.httpServerBeta) </s> remove err := http.ListenAndServe("localhost:6060", mux) log.Error("Error while running the pprof server: %s", err) </s> add lerr := http.ListenAndServe("localhost:6060", mux) log.Error("Error while running the pprof server: %s", lerr)
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/home.go
log.Fatal(serr)
<mask> go func() { <mask> err := startDNSServer() <mask> if err != nil { <mask> closeDNSServer() <mask> log.Fatal(err) <mask> } <mask> }() <mask> <mask> if Context.dhcpServer != nil { <mask> _ = Context.dhcpServer.Start() </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove err := startDNSServer() if err != nil { </s> add serr := startDNSServer() if serr != nil { </s> remove f = func() error { var err error </s> add f = func() (ferr error) { </s> remove err := initDNSServer() </s> add err = initDNSServer() </s> remove if err := tmpFile.Close(); err != nil { log.Printf("Couldn't close temporary file: %s", err) </s> add if derr = tmpFile.Close(); derr != nil { log.Printf("Couldn't close temporary file: %s", derr)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/home.go
if errors.Is(err, os.ErrPermission) { msg := `Permission check failed.
<mask> log.Info("AdGuard Home can bind to port 53") <mask> return <mask> } <mask> <mask> if opErr, ok := err.(*net.OpError); ok { <mask> if sysErr, ok := opErr.Err.(*os.SyscallError); ok { <mask> if errno, ok := sysErr.Err.(syscall.Errno); ok && errno == syscall.EACCES { <mask> msg := `Permission check failed. <mask> <mask> AdGuard Home is not allowed to bind to privileged ports (for instance, port 53). <mask> Please note, that this is crucial for a server to be able to use privileged ports. <mask> <mask> You have two options: </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove log.Fatal(msg) } } </s> add log.Fatal(msg) </s> remove log.Fatalf("client.mac is not a string: %v", _mac) </s> add log.Fatalf("client.mac is not a string: %v", macVal) </s> remove mac, ok := _mac.(string) </s> add var mac string mac, ok = macVal.(string) </s> remove log.Fatalf("client.ip is not a string: %v", _ip) </s> add log.Fatalf("client.ip is not a string: %v", ipVal) </s> remove _ip, ok := c["ip"] </s> add var ipVal interface{} ipVal, ok = c["ip"]
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/home.go
log.Fatal(msg)
<mask> 1. Run AdGuard Home with root privileges <mask> 2. On Linux you can grant the CAP_NET_BIND_SERVICE capability: <mask> https://github.com/AdguardTeam/AdGuardHome/internal/wiki/Getting-Started#running-without-superuser` <mask> <mask> log.Fatal(msg) <mask> } <mask> } <mask> } <mask> <mask> msg := fmt.Sprintf(`AdGuard failed to bind to port 53 due to %v <mask> <mask> Please note, that this is crucial for a DNS server to be able to use that port.`, err) </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove if opErr, ok := err.(*net.OpError); ok { if sysErr, ok := opErr.Err.(*os.SyscallError); ok { if errno, ok := sysErr.Err.(syscall.Errno); ok && errno == syscall.EACCES { msg := `Permission check failed. </s> add if errors.Is(err, os.ErrPermission) { msg := `Permission check failed. </s> remove _, err := runInitdCommand("enable") </s> add _, err = runInitdCommand("enable") </s> remove func customDialContext(ctx context.Context, network, addr string) (net.Conn, error) { </s> add func customDialContext(ctx context.Context, network, addr string) (conn net.Conn, err error) { </s> remove dhcpv4["gateway_ip"] = val </s> add dhcpv4 := map[string]interface{}{ "gateway_ip": str, } </s> remove if util.IsOpenWRT() { </s> add if util.IsOpenWrt() {
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/home.go
workDir, err := filepath.EvalSymlinks(Context.workDir) if err != nil { panic(err)
<mask> } else { <mask> Context.workDir = filepath.Dir(execPath) <mask> } <mask> <mask> if workDir, err := filepath.EvalSymlinks(Context.workDir); err == nil { <mask> Context.workDir = workDir <mask> } <mask> } <mask> <mask> // configureLogger configures logger level and output <mask> func configureLogger(args options) { </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove if util.IsOpenWRT() { </s> add if util.IsOpenWrt() { </s> remove if err == nil { err = eff() </s> add if ferr == nil { ferr = eff() </s> remove // Removing log files on cleanup and ignore errors err := os.Remove(launchdStdoutPath) </s> add // Remove log files on cleanup and log errors. err = os.Remove(launchdStdoutPath) </s> remove err := binary.Read(buf, binary.LittleEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } } else { err := binary.Read(buf, binary.BigEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } </s> add order = binary.LittleEndian
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/home.go
Context.workDir = workDir
<mask> panic(err) <mask> } <mask> } <mask> <mask> // configureLogger configures logger level and output <mask> func configureLogger(args options) { <mask> ls := getLogSettings() </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove if workDir, err := filepath.EvalSymlinks(Context.workDir); err == nil { Context.workDir = workDir </s> add workDir, err := filepath.EvalSymlinks(Context.workDir) if err != nil { panic(err) </s> remove shut := func(srv *http.Server) { defer cancel() err := srv.Shutdown(ctx) if err != nil { log.Debug("error while shutting down HTTP server: %s", err) } } go shut(web.httpServer) if web.httpServerBeta != nil { go shut(web.httpServerBeta) } </s> add go shutdownSrv(ctx, cancel, web.httpServer) go shutdownSrv(ctx, cancel, web.httpServerBeta) </s> remove // Removing log files on cleanup and ignore errors err := os.Remove(launchdStdoutPath) </s> add // Remove log files on cleanup and log errors. err = os.Remove(launchdStdoutPath) </s> remove // The Shutdown() method of (*http.Server) needs to be called in a // separate goroutine, because it waits until all requests are handled // and will be blocked by it's own caller. </s> add // Method http.(*Server).Shutdown needs to be called in a separate // goroutine and with its own context, because it waits until all // requests are handled and will be blocked by it's own caller. </s> remove // IsOpenWRT returns true if host OS is OpenWRT. func IsOpenWRT() bool { </s> add // IsOpenWrt returns true if host OS is OpenWrt. func IsOpenWrt() bool {
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/home.go
func customDialContext(ctx context.Context, network, addr string) (conn net.Conn, err error) {
<mask> return errors.Is(err, os.ErrNotExist) <mask> } <mask> <mask> // Connect to a remote server resolving hostname using our own DNS server <mask> func customDialContext(ctx context.Context, network, addr string) (net.Conn, error) { <mask> log.Tracef("network:%v addr:%v", network, addr) <mask> <mask> host, port, err := net.SplitHostPort(addr) <mask> if err != nil { <mask> return nil, err </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove con, err := dialer.DialContext(ctx, network, addr) return con, err </s> add return dialer.DialContext(ctx, network, addr) </s> remove addrs, e := Context.dnsServer.Resolve(host) </s> add addrs, err := Context.dnsServer.Resolve(host) </s> remove con, err := dialer.DialContext(ctx, network, addr) </s> add conn, err = dialer.DialContext(ctx, network, addr) </s> remove if e != nil { return nil, e </s> add if err != nil { return nil, err </s> remove return con, err </s> add return conn, err
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/home.go
return dialer.DialContext(ctx, network, addr)
<mask> Timeout: time.Minute * 5, <mask> } <mask> <mask> if net.ParseIP(host) != nil || config.DNS.Port == 0 { <mask> con, err := dialer.DialContext(ctx, network, addr) <mask> return con, err <mask> } <mask> <mask> addrs, e := Context.dnsServer.Resolve(host) <mask> log.Debug("dnsServer.Resolve: %s: %v", host, addrs) <mask> if e != nil { </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove addrs, e := Context.dnsServer.Resolve(host) </s> add addrs, err := Context.dnsServer.Resolve(host) </s> remove if e != nil { return nil, e </s> add if err != nil { return nil, err </s> remove con, err := dialer.DialContext(ctx, network, addr) </s> add conn, err = dialer.DialContext(ctx, network, addr) </s> remove code, err := runInitdCommand("status") if err != nil { return service.StatusStopped, nil } if code != 0 { </s> add var code int code, err = runInitdCommand("status") if err != nil || code != 0 { </s> remove func customDialContext(ctx context.Context, network, addr string) (net.Conn, error) { </s> add func customDialContext(ctx context.Context, network, addr string) (conn net.Conn, err error) {
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/home.go
addrs, err := Context.dnsServer.Resolve(host)
<mask> con, err := dialer.DialContext(ctx, network, addr) <mask> return con, err <mask> } <mask> <mask> addrs, e := Context.dnsServer.Resolve(host) <mask> log.Debug("dnsServer.Resolve: %s: %v", host, addrs) <mask> if e != nil { <mask> return nil, e <mask> } <mask> </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove con, err := dialer.DialContext(ctx, network, addr) return con, err </s> add return dialer.DialContext(ctx, network, addr) </s> remove if e != nil { return nil, e </s> add if err != nil { return nil, err </s> remove con, err := dialer.DialContext(ctx, network, addr) </s> add conn, err = dialer.DialContext(ctx, network, addr) </s> remove func customDialContext(ctx context.Context, network, addr string) (net.Conn, error) { </s> add func customDialContext(ctx context.Context, network, addr string) (conn net.Conn, err error) { </s> remove return con, err </s> add return conn, err
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/home.go
if err != nil { return nil, err
<mask> } <mask> <mask> addrs, e := Context.dnsServer.Resolve(host) <mask> log.Debug("dnsServer.Resolve: %s: %v", host, addrs) <mask> if e != nil { <mask> return nil, e <mask> } <mask> <mask> if len(addrs) == 0 { <mask> return nil, fmt.Errorf("couldn't lookup host: %s", host) <mask> } </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove addrs, e := Context.dnsServer.Resolve(host) </s> add addrs, err := Context.dnsServer.Resolve(host) </s> remove con, err := dialer.DialContext(ctx, network, addr) return con, err </s> add return dialer.DialContext(ctx, network, addr) </s> remove err := binary.Read(buf, binary.LittleEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } } else { err := binary.Read(buf, binary.BigEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } </s> add order = binary.LittleEndian </s> remove return con, err </s> add return conn, err </s> remove if err := tmpFile.Close(); err != nil { log.Printf("Couldn't close temporary file: %s", err) </s> add if derr = tmpFile.Close(); derr != nil { log.Printf("Couldn't close temporary file: %s", derr)
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/home.go
conn, err = dialer.DialContext(ctx, network, addr)
<mask> <mask> var dialErrs []error <mask> for _, a := range addrs { <mask> addr = net.JoinHostPort(a.String(), port) <mask> con, err := dialer.DialContext(ctx, network, addr) <mask> if err != nil { <mask> dialErrs = append(dialErrs, err) <mask> continue <mask> } <mask> return con, err </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove return con, err </s> add return conn, err </s> remove con, err := dialer.DialContext(ctx, network, addr) return con, err </s> add return dialer.DialContext(ctx, network, addr) </s> remove addrs, e := Context.dnsServer.Resolve(host) </s> add addrs, err := Context.dnsServer.Resolve(host) </s> remove f := dnsfilter.Filter{ </s> add f = dnsfilter.Filter{ </s> remove f := dnsfilter.Filter{ </s> add f = dnsfilter.Filter{
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/home.go
return conn, err
<mask> if err != nil { <mask> dialErrs = append(dialErrs, err) <mask> continue <mask> } <mask> return con, err <mask> } <mask> return nil, agherr.Many(fmt.Sprintf("couldn't dial to %s", addr), dialErrs...) <mask> } <mask> <mask> func getHTTPProxy(_ *http.Request) (*url.URL, error) { </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove con, err := dialer.DialContext(ctx, network, addr) </s> add conn, err = dialer.DialContext(ctx, network, addr) </s> remove if e != nil { return nil, e </s> add if err != nil { return nil, err </s> remove addrs, e := Context.dnsServer.Resolve(host) </s> add addrs, err := Context.dnsServer.Resolve(host) </s> remove err := binary.Read(buf, binary.LittleEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } } else { err := binary.Read(buf, binary.BigEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } </s> add order = binary.LittleEndian
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/home.go
var fi os.FileInfo fi, err = os.Stat(filepath.Join(dir, "data", "filters", "1.txt")) if err == nil && fi.Size() != 0 {
<mask> haveIP = len(addrs) != 0 <mask> assert.True(t, haveIP) <mask> <mask> for i := 1; ; i++ { <mask> st, err := os.Stat(filepath.Join(dir, "data", "filters", "1.txt")) <mask> if err == nil && st.Size() != 0 { <mask> break <mask> } <mask> if i == 5 { <mask> assert.True(t, false) <mask> break </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove if e != nil { return nil, e </s> add if err != nil { return nil, err </s> remove return err </s> add return ferr </s> remove code, err := runInitdCommand("status") if err != nil { return service.StatusStopped, nil } if code != 0 { </s> add var code int code, err = runInitdCommand("status") if err != nil || code != 0 { </s> remove err := binary.Read(buf, binary.LittleEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } } else { err := binary.Read(buf, binary.BigEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } </s> add order = binary.LittleEndian </s> remove con, err := dialer.DialContext(ctx, network, addr) return con, err </s> add return dialer.DialContext(ctx, network, addr)
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/home_test.go
var ipnet *net.IPNet _, ipnet, err = net.ParseCIDR(ipnetStr)
<mask> ipd = &ipDetector{ <mask> nets: make([]*net.IPNet, len(specialNetworks)), <mask> } <mask> for i, ipnetStr := range specialNetworks { <mask> _, ipnet, err := net.ParseCIDR(ipnetStr) <mask> if err != nil { <mask> return nil, err <mask> } <mask> <mask> ipd.nets[i] = ipnet </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove con, err := dialer.DialContext(ctx, network, addr) </s> add conn, err = dialer.DialContext(ctx, network, addr) </s> remove f := dnsfilter.Filter{ </s> add f = dnsfilter.Filter{ </s> remove f := dnsfilter.Filter{ </s> add f = dnsfilter.Filter{ </s> remove c2, ok := clients.idIndex[id] if ok && c2 != prev { return fmt.Errorf("another client uses the same ID (%q): %q", id, c2.Name) </s> add c2, ok2 := clients.idIndex[id] if ok2 && c2 != prev { return fmt.Errorf("another client uses the same id (%q): %q", id, c2.Name) </s> remove if e != nil { return nil, e </s> add if err != nil { return nil, err
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/ipdetector.go
f = func() (ferr error) {
<mask> return <mask> } <mask> if eff != nil { <mask> prevf := f <mask> f = func() error { <mask> var err error <mask> if prevf != nil { <mask> err = prevf() <mask> } <mask> if err == nil { <mask> err = eff() </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove err = prevf() </s> add ferr = prevf() </s> remove if err == nil { err = eff() </s> add if ferr == nil { ferr = eff() </s> remove f, err := os.Open(filter.URL) </s> add var f io.ReadCloser f, err = os.Open(filter.URL) </s> remove resp, err := Context.client.Get(filter.URL) if resp != nil && resp.Body != nil { defer resp.Body.Close() } </s> add var resp *http.Response resp, err = Context.client.Get(filter.URL)
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/options.go
ferr = prevf()
<mask> prevf := f <mask> f = func() error { <mask> var err error <mask> if prevf != nil { <mask> err = prevf() <mask> } <mask> if err == nil { <mask> err = eff() <mask> } <mask> return err </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove f = func() error { var err error </s> add f = func() (ferr error) { </s> remove if err == nil { err = eff() </s> add if ferr == nil { ferr = eff() </s> remove f, err := os.Open(filter.URL) </s> add var f io.ReadCloser f, err = os.Open(filter.URL) </s> remove resp, err := Context.client.Get(filter.URL) if resp != nil && resp.Body != nil { defer resp.Body.Close() } </s> add var resp *http.Response resp, err = Context.client.Get(filter.URL)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/options.go
if ferr == nil { ferr = eff()
<mask> var err error <mask> if prevf != nil { <mask> err = prevf() <mask> } <mask> if err == nil { <mask> err = eff() <mask> } <mask> return err <mask> } <mask> } <mask> } </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove err = prevf() </s> add ferr = prevf() </s> remove f = func() error { var err error </s> add f = func() (ferr error) { </s> remove return err </s> add return ferr
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/options.go
return ferr
<mask> } <mask> if err == nil { <mask> err = eff() <mask> } <mask> return err <mask> } <mask> } <mask> } <mask> knownParam = true <mask> break </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove if err == nil { err = eff() </s> add if ferr == nil { ferr = eff() </s> remove err = prevf() </s> add ferr = prevf() </s> remove f = func() error { var err error </s> add f = func() (ferr error) { </s> remove shut := func(srv *http.Server) { if srv == nil { return } ctx, cancel := context.WithTimeout(ctx, shutdownTimeout) defer cancel() if err := srv.Shutdown(ctx); err != nil { log.Debug("error while shutting down HTTP server: %s", err) } } </s> add var cancel context.CancelFunc ctx, cancel = context.WithTimeout(ctx, shutdownTimeout) </s> remove // IsOpenWRT returns true if host OS is OpenWRT. func IsOpenWRT() bool { </s> add // IsOpenWrt returns true if host OS is OpenWrt. func IsOpenWrt() bool {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/options.go
// svcStatus check the service's status. // // On OpenWrt, the service utility may not exist. We use our service script // directly in this case. func svcStatus(s service.Service) (status service.Status, err error) { status, err = s.Status()
<mask> Context.appSignalChannel <- syscall.SIGINT <mask> return nil <mask> } <mask> <mask> // Check the service's status <mask> // Note: on OpenWrt 'service' utility may not exist - we use our service script directly in this case. <mask> func svcStatus(s service.Service) (service.Status, error) { <mask> status, err := s.Status() <mask> if err != nil && service.Platform() == "unix-systemv" { <mask> code, err := runInitdCommand("status") <mask> if err != nil { <mask> return service.StatusStopped, nil <mask> } </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove code, err := runInitdCommand("status") if err != nil { return service.StatusStopped, nil } if code != 0 { </s> add var code int code, err = runInitdCommand("status") if err != nil || code != 0 { </s> remove // Perform an action on the service // Note: on OpenWrt 'service' utility may not exist - we use our service script directly in this case. func svcAction(s service.Service, action string) error { err := service.Control(s, action) </s> add // svcAction performs the action on the service. // // On OpenWrt, the service utility may not exist. We use our service script // directly in this case. func svcAction(s service.Service, action string) (err error) { err = service.Control(s, action) </s> remove if util.IsOpenWRT() { </s> add if util.IsOpenWrt() { </s> remove if util.IsOpenWRT() { </s> add if util.IsOpenWrt() { </s> remove _, err := runInitdCommand(action) </s> add _, err = runInitdCommand(action)
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/service.go
var code int code, err = runInitdCommand("status") if err != nil || code != 0 {
<mask> // Note: on OpenWrt 'service' utility may not exist - we use our service script directly in this case. <mask> func svcStatus(s service.Service) (service.Status, error) { <mask> status, err := s.Status() <mask> if err != nil && service.Platform() == "unix-systemv" { <mask> code, err := runInitdCommand("status") <mask> if err != nil { <mask> return service.StatusStopped, nil <mask> } <mask> if code != 0 { <mask> return service.StatusStopped, nil <mask> } <mask> return service.StatusRunning, nil <mask> } <mask> return status, err </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove // Check the service's status // Note: on OpenWrt 'service' utility may not exist - we use our service script directly in this case. func svcStatus(s service.Service) (service.Status, error) { status, err := s.Status() </s> add // svcStatus check the service's status. // // On OpenWrt, the service utility may not exist. We use our service script // directly in this case. func svcStatus(s service.Service) (status service.Status, err error) { status, err = s.Status() </s> remove // Perform an action on the service // Note: on OpenWrt 'service' utility may not exist - we use our service script directly in this case. func svcAction(s service.Service, action string) error { err := service.Control(s, action) </s> add // svcAction performs the action on the service. // // On OpenWrt, the service utility may not exist. We use our service script // directly in this case. func svcAction(s service.Service, action string) (err error) { err = service.Control(s, action) </s> remove _, err := runInitdCommand(action) </s> add _, err = runInitdCommand(action) </s> remove if e != nil { return nil, e </s> add if err != nil { return nil, err </s> remove err := binary.Read(buf, binary.LittleEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } } else { err := binary.Read(buf, binary.BigEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } </s> add order = binary.LittleEndian
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/service.go
// svcAction performs the action on the service. // // On OpenWrt, the service utility may not exist. We use our service script // directly in this case. func svcAction(s service.Service, action string) (err error) { err = service.Control(s, action)
<mask> } <mask> return status, err <mask> } <mask> <mask> // Perform an action on the service <mask> // Note: on OpenWrt 'service' utility may not exist - we use our service script directly in this case. <mask> func svcAction(s service.Service, action string) error { <mask> err := service.Control(s, action) <mask> if err != nil && service.Platform() == "unix-systemv" && <mask> (action == "start" || action == "stop" || action == "restart") { <mask> _, err := runInitdCommand(action) <mask> return err <mask> } </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove _, err := runInitdCommand(action) </s> add _, err = runInitdCommand(action) </s> remove // Check the service's status // Note: on OpenWrt 'service' utility may not exist - we use our service script directly in this case. func svcStatus(s service.Service) (service.Status, error) { status, err := s.Status() </s> add // svcStatus check the service's status. // // On OpenWrt, the service utility may not exist. We use our service script // directly in this case. func svcStatus(s service.Service) (status service.Status, err error) { status, err = s.Status() </s> remove code, err := runInitdCommand("status") if err != nil { return service.StatusStopped, nil } if code != 0 { </s> add var code int code, err = runInitdCommand("status") if err != nil || code != 0 { </s> remove _, err := runInitdCommand("enable") </s> add _, err = runInitdCommand("enable") </s> remove if util.IsOpenWRT() { </s> add if util.IsOpenWrt() {
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/service.go
_, err = runInitdCommand(action)
<mask> func svcAction(s service.Service, action string) error { <mask> err := service.Control(s, action) <mask> if err != nil && service.Platform() == "unix-systemv" && <mask> (action == "start" || action == "stop" || action == "restart") { <mask> _, err := runInitdCommand(action) <mask> return err <mask> } <mask> return err <mask> } <mask> </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove // Perform an action on the service // Note: on OpenWrt 'service' utility may not exist - we use our service script directly in this case. func svcAction(s service.Service, action string) error { err := service.Control(s, action) </s> add // svcAction performs the action on the service. // // On OpenWrt, the service utility may not exist. We use our service script // directly in this case. func svcAction(s service.Service, action string) (err error) { err = service.Control(s, action) </s> remove code, err := runInitdCommand("status") if err != nil { return service.StatusStopped, nil } if code != 0 { </s> add var code int code, err = runInitdCommand("status") if err != nil || code != 0 { </s> remove con, err := dialer.DialContext(ctx, network, addr) return con, err </s> add return dialer.DialContext(ctx, network, addr) </s> remove if err == nil { err = eff() </s> add if ferr == nil { ferr = eff() </s> remove st, err := os.Stat(filepath.Join(dir, "data", "filters", "1.txt")) if err == nil && st.Size() != 0 { </s> add var fi os.FileInfo fi, err = os.Stat(filepath.Join(dir, "data", "filters", "1.txt")) if err == nil && fi.Size() != 0 {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/service.go
var code int var psdata string code, psdata, err = util.RunCommand("ps", "-C", serviceName, "-o", "pid=")
<mask> <mask> pidfile := fmt.Sprintf("/var/run/%s.pid", serviceName) <mask> data, err := ioutil.ReadFile(pidfile) <mask> if os.IsNotExist(err) { <mask> code, psdata, err := util.RunCommand("ps", "-C", serviceName, "-o", "pid=") <mask> if err != nil || code != 0 { <mask> log.Error("Can't find AdGuardHome process: %s code:%d", err, code) <mask> return <mask> } <mask> data = []byte(psdata) </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove code, err := runInitdCommand("status") if err != nil { return service.StatusStopped, nil } if code != 0 { </s> add var code int code, err = runInitdCommand("status") if err != nil || code != 0 { </s> remove data.CertificateChain = string(certPEM) </s> add data.CertificateChain = string(cert) </s> remove err := binary.Read(buf, binary.LittleEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } } else { err := binary.Read(buf, binary.BigEndian, &dateToken) if err != nil { log.Error("binary.Read: %s", err) return 0 } </s> add order = binary.LittleEndian </s> remove data.PrivateKey = string(keyPEM) </s> add data.PrivateKey = string(key) </s> remove con, err := dialer.DialContext(ctx, network, addr) return con, err </s> add return dialer.DialContext(ctx, network, addr)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/service.go
if util.IsOpenWrt() {
<mask> if err != nil { <mask> log.Fatal(err) <mask> } <mask> <mask> if util.IsOpenWRT() { <mask> // On OpenWrt it is important to run enable after the service installation <mask> // Otherwise, the service won't start on the system startup <mask> _, err := runInitdCommand("enable") <mask> if err != nil { <mask> log.Fatal(err) </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove _, err := runInitdCommand("enable") </s> add _, err = runInitdCommand("enable") </s> remove if util.IsOpenWRT() { </s> add if util.IsOpenWrt() { </s> remove // Check the service's status // Note: on OpenWrt 'service' utility may not exist - we use our service script directly in this case. func svcStatus(s service.Service) (service.Status, error) { status, err := s.Status() </s> add // svcStatus check the service's status. // // On OpenWrt, the service utility may not exist. We use our service script // directly in this case. func svcStatus(s service.Service) (status service.Status, err error) { status, err = s.Status() </s> remove // Perform an action on the service // Note: on OpenWrt 'service' utility may not exist - we use our service script directly in this case. func svcAction(s service.Service, action string) error { err := service.Control(s, action) </s> add // svcAction performs the action on the service. // // On OpenWrt, the service utility may not exist. We use our service script // directly in this case. func svcAction(s service.Service, action string) (err error) { err = service.Control(s, action) </s> remove // Removing log files on cleanup and ignore errors err := os.Remove(launchdStdoutPath) </s> add // Remove log files on cleanup and log errors. err = os.Remove(launchdStdoutPath)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/service.go
_, err = runInitdCommand("enable")
<mask> <mask> if util.IsOpenWRT() { <mask> // On OpenWrt it is important to run enable after the service installation <mask> // Otherwise, the service won't start on the system startup <mask> _, err := runInitdCommand("enable") <mask> if err != nil { <mask> log.Fatal(err) <mask> } <mask> } <mask> </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove if util.IsOpenWRT() { </s> add if util.IsOpenWrt() { </s> remove if util.IsOpenWRT() { </s> add if util.IsOpenWrt() { </s> remove // Perform an action on the service // Note: on OpenWrt 'service' utility may not exist - we use our service script directly in this case. func svcAction(s service.Service, action string) error { err := service.Control(s, action) </s> add // svcAction performs the action on the service. // // On OpenWrt, the service utility may not exist. We use our service script // directly in this case. func svcAction(s service.Service, action string) (err error) { err = service.Control(s, action) </s> remove // Check the service's status // Note: on OpenWrt 'service' utility may not exist - we use our service script directly in this case. func svcStatus(s service.Service) (service.Status, error) { status, err := s.Status() </s> add // svcStatus check the service's status. // // On OpenWrt, the service utility may not exist. We use our service script // directly in this case. func svcStatus(s service.Service) (status service.Status, err error) { status, err = s.Status() </s> remove log.Printf("cannot remove %s", launchdStderrPath) </s> add log.Printf("removing stderr file: %s", err)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/service.go
if util.IsOpenWrt() {
<mask> } <mask> <mask> // handleServiceStatusCommand handles service "uninstall" command <mask> func handleServiceUninstallCommand(s service.Service) { <mask> if util.IsOpenWRT() { <mask> // On OpenWrt it is important to run disable command first <mask> // as it will remove the symlink <mask> _, err := runInitdCommand("disable") <mask> if err != nil { <mask> log.Fatal(err) </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove if util.IsOpenWRT() { </s> add if util.IsOpenWrt() { </s> remove _, err := runInitdCommand("enable") </s> add _, err = runInitdCommand("enable") </s> remove // Check the service's status // Note: on OpenWrt 'service' utility may not exist - we use our service script directly in this case. func svcStatus(s service.Service) (service.Status, error) { status, err := s.Status() </s> add // svcStatus check the service's status. // // On OpenWrt, the service utility may not exist. We use our service script // directly in this case. func svcStatus(s service.Service) (status service.Status, err error) { status, err = s.Status() </s> remove // Perform an action on the service // Note: on OpenWrt 'service' utility may not exist - we use our service script directly in this case. func svcAction(s service.Service, action string) error { err := service.Control(s, action) </s> add // svcAction performs the action on the service. // // On OpenWrt, the service utility may not exist. We use our service script // directly in this case. func svcAction(s service.Service, action string) (err error) { err = service.Control(s, action) </s> remove shut := func(srv *http.Server) { defer cancel() err := srv.Shutdown(ctx) if err != nil { log.Debug("error while shutting down HTTP server: %s", err) } } go shut(web.httpServer) if web.httpServerBeta != nil { go shut(web.httpServerBeta) } </s> add go shutdownSrv(ctx, cancel, web.httpServer) go shutdownSrv(ctx, cancel, web.httpServerBeta)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/service.go
// Remove log files on cleanup and log errors. err = os.Remove(launchdStdoutPath)
<mask> log.Fatal(err) <mask> } <mask> <mask> if runtime.GOOS == "darwin" { <mask> // Removing log files on cleanup and ignore errors <mask> err := os.Remove(launchdStdoutPath) <mask> if err != nil && !os.IsNotExist(err) { <mask> log.Printf("cannot remove %s", launchdStdoutPath) <mask> } <mask> err = os.Remove(launchdStderrPath) <mask> if err != nil && !os.IsNotExist(err) { </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove log.Printf("cannot remove %s", launchdStdoutPath) </s> add log.Printf("removing stdout file: %s", err) </s> remove log.Printf("cannot remove %s", launchdStderrPath) </s> add log.Printf("removing stderr file: %s", err) </s> remove code, err := runInitdCommand("status") if err != nil { return service.StatusStopped, nil } if code != 0 { </s> add var code int code, err = runInitdCommand("status") if err != nil || code != 0 { </s> remove st, err := os.Stat(filepath.Join(dir, "data", "filters", "1.txt")) if err == nil && st.Size() != 0 { </s> add var fi os.FileInfo fi, err = os.Stat(filepath.Join(dir, "data", "filters", "1.txt")) if err == nil && fi.Size() != 0 { </s> remove if util.IsOpenWRT() { </s> add if util.IsOpenWrt() {
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/service.go
log.Printf("removing stdout file: %s", err)
<mask> if runtime.GOOS == "darwin" { <mask> // Removing log files on cleanup and ignore errors <mask> err := os.Remove(launchdStdoutPath) <mask> if err != nil && !os.IsNotExist(err) { <mask> log.Printf("cannot remove %s", launchdStdoutPath) <mask> } <mask> err = os.Remove(launchdStderrPath) <mask> if err != nil && !os.IsNotExist(err) { <mask> log.Printf("cannot remove %s", launchdStderrPath) <mask> } </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove // Removing log files on cleanup and ignore errors err := os.Remove(launchdStdoutPath) </s> add // Remove log files on cleanup and log errors. err = os.Remove(launchdStdoutPath) </s> remove log.Printf("cannot remove %s", launchdStderrPath) </s> add log.Printf("removing stderr file: %s", err) </s> remove resp, err := Context.client.Get(filter.URL) if resp != nil && resp.Body != nil { defer resp.Body.Close() } </s> add var resp *http.Response resp, err = Context.client.Get(filter.URL) </s> remove code, err := runInitdCommand("status") if err != nil { return service.StatusStopped, nil } if code != 0 { </s> add var code int code, err = runInitdCommand("status") if err != nil || code != 0 { </s> remove if err := tmpFile.Close(); err != nil { log.Printf("Couldn't close temporary file: %s", err) </s> add if derr = tmpFile.Close(); derr != nil { log.Printf("Couldn't close temporary file: %s", derr)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/service.go
log.Printf("removing stderr file: %s", err)
<mask> log.Printf("cannot remove %s", launchdStdoutPath) <mask> } <mask> err = os.Remove(launchdStderrPath) <mask> if err != nil && !os.IsNotExist(err) { <mask> log.Printf("cannot remove %s", launchdStderrPath) <mask> } <mask> } <mask> } <mask> <mask> // configureService defines additional settings of the service </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove log.Printf("cannot remove %s", launchdStdoutPath) </s> add log.Printf("removing stdout file: %s", err) </s> remove // Removing log files on cleanup and ignore errors err := os.Remove(launchdStdoutPath) </s> add // Remove log files on cleanup and log errors. err = os.Remove(launchdStdoutPath) </s> remove if util.IsOpenWRT() { </s> add if util.IsOpenWrt() { </s> remove _, err := runInitdCommand("enable") </s> add _, err = runInitdCommand("enable") </s> remove resp, err := Context.client.Get(filter.URL) if resp != nil && resp.Body != nil { defer resp.Body.Close() } </s> add var resp *http.Response resp, err = Context.client.Get(filter.URL)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/service.go
if util.IsOpenWrt() {
<mask> c.Option["SystemdScript"] = systemdScript <mask> c.Option["SysvScript"] = sysvScript <mask> <mask> // On OpenWrt we're using a different type of sysvScript. <mask> if util.IsOpenWRT() { <mask> c.Option["SysvScript"] = openWrtScript <mask> } else if runtime.GOOS == "freebsd" { <mask> c.Option["SysvScript"] = freeBSDScript <mask> } <mask> } </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove _, err := runInitdCommand("enable") </s> add _, err = runInitdCommand("enable") </s> remove if workDir, err := filepath.EvalSymlinks(Context.workDir); err == nil { Context.workDir = workDir </s> add workDir, err := filepath.EvalSymlinks(Context.workDir) if err != nil { panic(err) </s> remove if err == nil { err = eff() </s> add if ferr == nil { ferr = eff() </s> remove dnsEncryption := getDNSEncryption() if dnsEncryption.https != "" { dnsAddresses = append(dnsAddresses, dnsEncryption.https) </s> add de := getDNSEncryption() if de.https != "" { dnsAddresses = append(dnsAddresses, de.https) </s> remove // Removing log files on cleanup and ignore errors err := os.Remove(launchdStdoutPath) </s> add // Remove log files on cleanup and log errors. err = os.Remove(launchdStdoutPath)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/service.go
var cert []byte cert, err = base64.StdEncoding.DecodeString(data.CertificateChain)
<mask> return data, fmt.Errorf("failed to parse new TLS config json: %w", err) <mask> } <mask> <mask> if data.CertificateChain != "" { <mask> certPEM, err := base64.StdEncoding.DecodeString(data.CertificateChain) <mask> if err != nil { <mask> return data, fmt.Errorf("failed to base64-decode certificate chain: %w", err) <mask> } <mask> data.CertificateChain = string(certPEM) <mask> if data.CertificatePath != "" { </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove data.CertificateChain = string(certPEM) </s> add data.CertificateChain = string(cert) </s> remove data.PrivateKey = string(keyPEM) </s> add data.PrivateKey = string(key) </s> remove keyPEM, err := base64.StdEncoding.DecodeString(data.PrivateKey) </s> add var key []byte key, err = base64.StdEncoding.DecodeString(data.PrivateKey) </s> remove if dnsEncryption.quic != "" { dnsAddresses = append(dnsAddresses, dnsEncryption.quic) </s> add if de.quic != "" { dnsAddresses = append(dnsAddresses, de.quic) </s> remove dnsEncryption := getDNSEncryption() if dnsEncryption.https != "" { dnsAddresses = append(dnsAddresses, dnsEncryption.https) </s> add de := getDNSEncryption() if de.https != "" { dnsAddresses = append(dnsAddresses, de.https)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/tls.go
data.CertificateChain = string(cert)
<mask> certPEM, err := base64.StdEncoding.DecodeString(data.CertificateChain) <mask> if err != nil { <mask> return data, fmt.Errorf("failed to base64-decode certificate chain: %w", err) <mask> } <mask> data.CertificateChain = string(certPEM) <mask> if data.CertificatePath != "" { <mask> return data, fmt.Errorf("certificate data and file can't be set together") <mask> } <mask> } <mask> </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove certPEM, err := base64.StdEncoding.DecodeString(data.CertificateChain) </s> add var cert []byte cert, err = base64.StdEncoding.DecodeString(data.CertificateChain) </s> remove data.PrivateKey = string(keyPEM) </s> add data.PrivateKey = string(key) </s> remove keyPEM, err := base64.StdEncoding.DecodeString(data.PrivateKey) </s> add var key []byte key, err = base64.StdEncoding.DecodeString(data.PrivateKey) </s> remove if dnsEncryption.quic != "" { dnsAddresses = append(dnsAddresses, dnsEncryption.quic) </s> add if de.quic != "" { dnsAddresses = append(dnsAddresses, de.quic) </s> remove if err := tmpFile.Close(); err != nil { log.Printf("Couldn't close temporary file: %s", err) </s> add if derr = tmpFile.Close(); derr != nil { log.Printf("Couldn't close temporary file: %s", derr)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/tls.go
var key []byte key, err = base64.StdEncoding.DecodeString(data.PrivateKey)
<mask> } <mask> } <mask> <mask> if data.PrivateKey != "" { <mask> keyPEM, err := base64.StdEncoding.DecodeString(data.PrivateKey) <mask> if err != nil { <mask> return data, fmt.Errorf("failed to base64-decode private key: %w", err) <mask> } <mask> <mask> data.PrivateKey = string(keyPEM) </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove data.PrivateKey = string(keyPEM) </s> add data.PrivateKey = string(key) </s> remove certPEM, err := base64.StdEncoding.DecodeString(data.CertificateChain) </s> add var cert []byte cert, err = base64.StdEncoding.DecodeString(data.CertificateChain) </s> remove data.CertificateChain = string(certPEM) </s> add data.CertificateChain = string(cert) </s> remove dnsEncryption := getDNSEncryption() if dnsEncryption.https != "" { dnsAddresses = append(dnsAddresses, dnsEncryption.https) </s> add de := getDNSEncryption() if de.https != "" { dnsAddresses = append(dnsAddresses, de.https) </s> remove if dnsEncryption.quic != "" { dnsAddresses = append(dnsAddresses, dnsEncryption.quic) </s> add if de.quic != "" { dnsAddresses = append(dnsAddresses, de.quic)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/tls.go
data.PrivateKey = string(key)
<mask> if err != nil { <mask> return data, fmt.Errorf("failed to base64-decode private key: %w", err) <mask> } <mask> <mask> data.PrivateKey = string(keyPEM) <mask> if data.PrivateKeyPath != "" { <mask> return data, fmt.Errorf("private key data and file can't be set together") <mask> } <mask> } <mask> </s> Pull request: home: rm var shadowing, vol. 4 Closes #2803. Squashed commit of the following: commit cb36cc8811160bb39a32fb8eddf962d0ebe9035a Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 14:21:46 2021 +0300 home: imp more commit 9ea7ccec8bb293881cf724d7ad57e6744243d8b9 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:58:10 2021 +0300 all: imp naming, refactor http srv shutdown commit f29221007c16fd3e7230bf2c1ac37b365f3e29aa Merge: 2247c05b bfbf73f3 Author: Ainar Garipov <[email protected]> Date: Fri Mar 12 13:35:17 2021 +0300 Merge branch 'master' into 2803-shadow-4 commit 2247c05b5521346aaf362d81ccdd64fee31f1e6d Author: Ainar Garipov <[email protected]> Date: Fri Jan 29 20:53:21 2021 +0300 home: rm var shadowing, vol. 4 </s> remove data.CertificateChain = string(certPEM) </s> add data.CertificateChain = string(cert) </s> remove keyPEM, err := base64.StdEncoding.DecodeString(data.PrivateKey) </s> add var key []byte key, err = base64.StdEncoding.DecodeString(data.PrivateKey) </s> remove certPEM, err := base64.StdEncoding.DecodeString(data.CertificateChain) </s> add var cert []byte cert, err = base64.StdEncoding.DecodeString(data.CertificateChain) </s> remove if dnsEncryption.quic != "" { dnsAddresses = append(dnsAddresses, dnsEncryption.quic) </s> add if de.quic != "" { dnsAddresses = append(dnsAddresses, de.quic) </s> remove if err := tmpFile.Close(); err != nil { log.Printf("Couldn't close temporary file: %s", err) </s> add if derr = tmpFile.Close(); derr != nil { log.Printf("Couldn't close temporary file: %s", derr)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7e64205d449f7783716f989f0fb635dc80840ee4
internal/home/tls.go