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
|
---|---|---|---|---|
mvdan.cc/unparam v0.0.0-20230125043941-70a0ce6e7b95 h1:n/xhncJPSt0YzfOhnyn41XxUdrWQNgmLBG72FE27Fqw=
mvdan.cc/unparam v0.0.0-20230125043941-70a0ce6e7b95/go.mod h1:2vU506e8nGWodqcci641NLi4im2twWSq4Lod756epHQ= | <mask> honnef.co/go/tools v0.3.3 h1:oDx7VAwstgpYpb3wv0oxiZlxY+foCpRAwY7Vk6XpAgA=
<mask> honnef.co/go/tools v0.3.3/go.mod h1:jzwdWgg7Jdq75wlfblQxO4neNaFFSvgc1tD5Wv8U0Yw=
<mask> mvdan.cc/gofumpt v0.4.0 h1:JVf4NN1mIpHogBj7ABpgOyZc65/UUOkKQFkoURsz4MM=
<mask> mvdan.cc/gofumpt v0.4.0/go.mod h1:PljLOHDeZqgS8opHRKLzp2It2VBuSdteAgqUfzMTxlQ=
<mask> mvdan.cc/unparam v0.0.0-20220926085101-66de63301820 h1:fggBTMFbBz7CMny3mWZphe0B/6D8ILBunvvB1cNNHi8=
<mask> mvdan.cc/unparam v0.0.0-20220926085101-66de63301820/go.mod h1:7fKhD/gH+APJ9Y27S2PYO7+oVWtb3XPrw9W5ayxVq2A=
</s> Pull request: upd-all
Merge in DNS/adguard-home from upd-all to master
Squashed commit of the following:
commit 1c71e4586daa7502f5dadd5ba4dc58a12a01f3b8
Author: Ainar Garipov <[email protected]>
Date: Wed Feb 1 13:37:50 2023 +0300
all: imp chlog; upd deps, i18n, services, trackers </s> remove mvdan.cc/unparam v0.0.0-20220926085101-66de63301820
</s> add mvdan.cc/unparam v0.0.0-20230125043941-70a0ce6e7b95 </s> remove golang.org/x/tools v0.2.0
golang.org/x/vuln v0.0.0-20221103225512-4f561ca73b59
</s> add golang.org/x/tools v0.5.1-0.20230117180257-8aba49bb5ea2
golang.org/x/vuln v0.0.0-20230130175424-dd534eeddf33 </s> remove github.com/gordonklaus/ineffassign v0.0.0-20220928193011-d2c82e48359b
github.com/kisielk/errcheck v1.6.2
github.com/kyoh86/looppointer v0.1.9
</s> add github.com/gordonklaus/ineffassign v0.0.0-20230107090616-13ace0543b28
github.com/kisielk/errcheck v1.6.3
github.com/kyoh86/looppointer v0.2.1 </s> remove golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
</s> add golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= </s> remove golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
</s> add golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace"
] | https://github.com/AdguardTeam/AdGuardHome/commit/04f49933854f315857abd572c0dc45473c2fae0d | internal/tools/go.sum |
jsonEntry["upstream"] = entry.Upstream
| <mask> log.Debug("Querylog: msg.Unpack(entry.OrigAnswer): %s: %s", err, string(entry.OrigAnswer))
<mask> }
<mask> }
<mask>
<mask> return jsonEntry
<mask> }
<mask>
<mask> func answerToMap(a *dns.Msg) []map[string]interface{} {
<mask> if a == nil || len(a.Answer) == 0 {
</s> + new query logs API
+ "upstream"
+ filteringStatusProcessed
+ ctDomainOrClient
remove ctQuestionType, ctDomain, ctClient </s> remove if ct == ctClient && l.conf.AnonymizeClientIP {
c.value = l.getClientIP(c.value)
}
</s> add </s> remove "filter_domain": ctDomain,
"filter_client": ctClient,
"filter_question_type": ctQuestionType,
"filter_response_status": ctFilteringStatus,
</s> add "search": ctDomainOrClient,
"response_status": ctFilteringStatus, </s> remove case ctDomain:
return c.quickMatchJSONValue(line, "QH")
case ctClient:
return c.quickMatchJSONValue(line, "IP")
case ctQuestionType:
return c.quickMatchJSONValue(line, "QT")
</s> add case ctDomainOrClient:
return c.quickMatchJSONValue(line, "QH") ||
c.quickMatchJSONValue(line, "IP") </s> remove return false
case ctClient:
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0500aa9591d1fb52f24182734859c398203d6962 | querylog/json.go |
<mask> if getDoubleQuotesEnclosedValue(&c.value) {
<mask> c.strict = true
<mask> }
<mask>
<mask> if ct == ctClient && l.conf.AnonymizeClientIP {
<mask> c.value = l.getClientIP(c.value)
<mask> }
<mask>
<mask> if ct == ctFilteringStatus && !util.ContainsString(filteringStatusValues, c.value) {
<mask> return false, c, fmt.Errorf("invalid value %s", c.value)
<mask> }
<mask>
<mask> return true, c, nil
</s> + new query logs API
+ "upstream"
+ filteringStatusProcessed
+ ctDomainOrClient
remove ctQuestionType, ctDomain, ctClient </s> remove return false
case ctClient:
</s> add </s> remove case ctQuestionType:
if c.strict && entry.QType == c.value {
return true
}
if !c.strict && strings.Contains(entry.QType, c.value) {
return true
}
</s> add </s> remove case ctDomain:
</s> add case ctDomainOrClient: </s> remove "filter_domain": ctDomain,
"filter_client": ctClient,
"filter_question_type": ctQuestionType,
"filter_response_status": ctFilteringStatus,
</s> add "search": ctDomainOrClient,
"response_status": ctFilteringStatus, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0500aa9591d1fb52f24182734859c398203d6962 | querylog/qlog_http.go |
|
"search": ctDomainOrClient,
"response_status": ctFilteringStatus, | <mask> p.maxFileScanEntries = 0
<mask> }
<mask>
<mask> paramNames := map[string]criteriaType{
<mask> "filter_domain": ctDomain,
<mask> "filter_client": ctClient,
<mask> "filter_question_type": ctQuestionType,
<mask> "filter_response_status": ctFilteringStatus,
<mask> }
<mask>
<mask> for k, v := range paramNames {
<mask> ok, c, err := l.parseSearchCriteria(q, k, v)
<mask> if err != nil {
</s> + new query logs API
+ "upstream"
+ filteringStatusProcessed
+ ctDomainOrClient
remove ctQuestionType, ctDomain, ctClient </s> remove case ctQuestionType:
if c.strict && entry.QType == c.value {
return true
}
if !c.strict && strings.Contains(entry.QType, c.value) {
return true
}
</s> add </s> remove if ct == ctClient && l.conf.AnonymizeClientIP {
c.value = l.getClientIP(c.value)
}
</s> add </s> remove return false
case ctClient:
</s> add </s> remove case ctDomain:
return c.quickMatchJSONValue(line, "QH")
case ctClient:
return c.quickMatchJSONValue(line, "IP")
case ctQuestionType:
return c.quickMatchJSONValue(line, "QT")
</s> add case ctDomainOrClient:
return c.quickMatchJSONValue(line, "QH") ||
c.quickMatchJSONValue(line, "IP") | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0500aa9591d1fb52f24182734859c398203d6962 | querylog/qlog_http.go |
criteriaType: ctDomainOrClient, | <mask>
<mask> // search by domain (strict)
<mask> params = newSearchParams()
<mask> params.searchCriteria = append(params.searchCriteria, searchCriteria{
<mask> criteriaType: ctDomain,
<mask> strict: true,
<mask> value: "test.example.org",
<mask> })
<mask> entries, _ = l.search(params)
<mask> assert.Equal(t, 1, len(entries))
</s> + new query logs API
+ "upstream"
+ filteringStatusProcessed
+ ctDomainOrClient
remove ctQuestionType, ctDomain, ctClient </s> remove criteriaType: ctClient,
</s> add criteriaType: ctDomainOrClient, </s> remove criteriaType: ctDomain,
</s> add criteriaType: ctDomainOrClient, </s> remove criteriaType: ctClient,
</s> add criteriaType: ctDomainOrClient, </s> remove ctDomain criteriaType = iota // domain name
ctClient // client IP address
ctQuestionType // question type
</s> add ctDomainOrClient criteriaType = iota // domain name or client IP address | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0500aa9591d1fb52f24182734859c398203d6962 | querylog/qlog_test.go |
criteriaType: ctDomainOrClient, | <mask>
<mask> // search by domain (not strict)
<mask> params = newSearchParams()
<mask> params.searchCriteria = append(params.searchCriteria, searchCriteria{
<mask> criteriaType: ctDomain,
<mask> strict: false,
<mask> value: "example.org",
<mask> })
<mask> entries, _ = l.search(params)
<mask> assert.Equal(t, 3, len(entries))
</s> + new query logs API
+ "upstream"
+ filteringStatusProcessed
+ ctDomainOrClient
remove ctQuestionType, ctDomain, ctClient </s> remove criteriaType: ctDomain,
</s> add criteriaType: ctDomainOrClient, </s> remove criteriaType: ctClient,
</s> add criteriaType: ctDomainOrClient, </s> remove criteriaType: ctClient,
</s> add criteriaType: ctDomainOrClient, </s> remove ctDomain criteriaType = iota // domain name
ctClient // client IP address
ctQuestionType // question type
</s> add ctDomainOrClient criteriaType = iota // domain name or client IP address | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0500aa9591d1fb52f24182734859c398203d6962 | querylog/qlog_test.go |
criteriaType: ctDomainOrClient, | <mask>
<mask> // search by client IP (strict)
<mask> params = newSearchParams()
<mask> params.searchCriteria = append(params.searchCriteria, searchCriteria{
<mask> criteriaType: ctClient,
<mask> strict: true,
<mask> value: "2.2.2.2",
<mask> })
<mask> entries, _ = l.search(params)
<mask> assert.Equal(t, 1, len(entries))
</s> + new query logs API
+ "upstream"
+ filteringStatusProcessed
+ ctDomainOrClient
remove ctQuestionType, ctDomain, ctClient </s> remove criteriaType: ctDomain,
</s> add criteriaType: ctDomainOrClient, </s> remove criteriaType: ctClient,
</s> add criteriaType: ctDomainOrClient, </s> remove criteriaType: ctDomain,
</s> add criteriaType: ctDomainOrClient, </s> remove ctDomain criteriaType = iota // domain name
ctClient // client IP address
ctQuestionType // question type
</s> add ctDomainOrClient criteriaType = iota // domain name or client IP address | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0500aa9591d1fb52f24182734859c398203d6962 | querylog/qlog_test.go |
criteriaType: ctDomainOrClient, | <mask>
<mask> // search by client IP (part of)
<mask> params = newSearchParams()
<mask> params.searchCriteria = append(params.searchCriteria, searchCriteria{
<mask> criteriaType: ctClient,
<mask> strict: false,
<mask> value: "2.2.2",
<mask> })
<mask> entries, _ = l.search(params)
<mask> assert.Equal(t, 4, len(entries))
</s> + new query logs API
+ "upstream"
+ filteringStatusProcessed
+ ctDomainOrClient
remove ctQuestionType, ctDomain, ctClient </s> remove criteriaType: ctClient,
</s> add criteriaType: ctDomainOrClient, </s> remove criteriaType: ctDomain,
</s> add criteriaType: ctDomainOrClient, </s> remove criteriaType: ctDomain,
</s> add criteriaType: ctDomainOrClient, </s> remove ctDomain criteriaType = iota // domain name
ctClient // client IP address
ctQuestionType // question type
</s> add ctDomainOrClient criteriaType = iota // domain name or client IP address | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0500aa9591d1fb52f24182734859c398203d6962 | querylog/qlog_test.go |
ctDomainOrClient criteriaType = iota // domain name or client IP address | <mask>
<mask> type criteriaType int
<mask>
<mask> const (
<mask> ctDomain criteriaType = iota // domain name
<mask> ctClient // client IP address
<mask> ctQuestionType // question type
<mask> ctFilteringStatus // filtering status
<mask> )
<mask>
<mask> const (
<mask> filteringStatusAll = "all"
</s> + new query logs API
+ "upstream"
+ filteringStatusProcessed
+ ctDomainOrClient
remove ctQuestionType, ctDomain, ctClient </s> remove criteriaType: ctClient,
</s> add criteriaType: ctDomainOrClient, </s> remove criteriaType: ctClient,
</s> add criteriaType: ctDomainOrClient, </s> remove criteriaType: ctDomain,
</s> add criteriaType: ctDomainOrClient, </s> remove criteriaType: ctDomain,
</s> add criteriaType: ctDomainOrClient, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0500aa9591d1fb52f24182734859c398203d6962 | querylog/search_criteria.go |
filteringStatusProcessed = "processed" // not blocked, not white-listed entries | <mask> filteringStatusBlockedParental = "blocked_parental" // blocked by parental control
<mask> filteringStatusWhitelisted = "whitelisted" // whitelisted
<mask> filteringStatusRewritten = "rewritten" // all kinds of rewrites
<mask> filteringStatusSafeSearch = "safe_search" // enforced safe search
<mask> )
<mask>
<mask> // filteringStatusValues -- array with all possible filteringStatus values
<mask> var filteringStatusValues = []string{
<mask> filteringStatusAll, filteringStatusFiltered, filteringStatusBlocked,
</s> + new query logs API
+ "upstream"
+ filteringStatusProcessed
+ ctDomainOrClient
remove ctQuestionType, ctDomain, ctClient </s> remove ctDomain criteriaType = iota // domain name
ctClient // client IP address
ctQuestionType // question type
</s> add ctDomainOrClient criteriaType = iota // domain name or client IP address </s> remove criteriaType: ctDomain,
</s> add criteriaType: ctDomainOrClient, </s> remove criteriaType: ctClient,
</s> add criteriaType: ctDomainOrClient, </s> remove criteriaType: ctDomain,
</s> add criteriaType: ctDomainOrClient, </s> remove criteriaType: ctClient,
</s> add criteriaType: ctDomainOrClient, | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0500aa9591d1fb52f24182734859c398203d6962 | querylog/search_criteria.go |
filteringStatusProcessed, | <mask> filteringStatusBlockedSafebrowsing, filteringStatusBlockedParental,
<mask> filteringStatusWhitelisted, filteringStatusRewritten, filteringStatusSafeSearch,
<mask> }
<mask>
<mask> // searchCriteria - every search request may contain a list of different search criteria
<mask> // we use each of them to match the query
</s> + new query logs API
+ "upstream"
+ filteringStatusProcessed
+ ctDomainOrClient
remove ctQuestionType, ctDomain, ctClient </s> remove case ctDomain:
</s> add case ctDomainOrClient: </s> remove case ctDomain:
return c.quickMatchJSONValue(line, "QH")
case ctClient:
return c.quickMatchJSONValue(line, "IP")
case ctQuestionType:
return c.quickMatchJSONValue(line, "QT")
</s> add case ctDomainOrClient:
return c.quickMatchJSONValue(line, "QH") ||
c.quickMatchJSONValue(line, "IP") </s> remove ctDomain criteriaType = iota // domain name
ctClient // client IP address
ctQuestionType // question type
</s> add ctDomainOrClient criteriaType = iota // domain name or client IP address | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0500aa9591d1fb52f24182734859c398203d6962 | querylog/search_criteria.go |
case ctDomainOrClient:
return c.quickMatchJSONValue(line, "QH") ||
c.quickMatchJSONValue(line, "IP") | <mask> func (c *searchCriteria) quickMatch(line string) bool {
<mask> // note that we do this only for a limited set of criteria
<mask>
<mask> switch c.criteriaType {
<mask> case ctDomain:
<mask> return c.quickMatchJSONValue(line, "QH")
<mask> case ctClient:
<mask> return c.quickMatchJSONValue(line, "IP")
<mask> case ctQuestionType:
<mask> return c.quickMatchJSONValue(line, "QT")
<mask> default:
<mask> return true
<mask> }
<mask> }
<mask>
</s> + new query logs API
+ "upstream"
+ filteringStatusProcessed
+ ctDomainOrClient
remove ctQuestionType, ctDomain, ctClient </s> remove case ctDomain:
</s> add case ctDomainOrClient: </s> remove case ctQuestionType:
if c.strict && entry.QType == c.value {
return true
}
if !c.strict && strings.Contains(entry.QType, c.value) {
return true
}
</s> add </s> remove return false
case ctClient:
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0500aa9591d1fb52f24182734859c398203d6962 | querylog/search_criteria.go |
case ctDomainOrClient: | <mask> // match - checks if the log entry matches this search criteria
<mask> // nolint (gocyclo)
<mask> func (c *searchCriteria) match(entry *logEntry) bool {
<mask> switch c.criteriaType {
<mask> case ctDomain:
<mask> if c.strict && entry.QHost == c.value {
<mask> return true
<mask> }
<mask> if !c.strict && strings.Contains(entry.QHost, c.value) {
<mask> return true
</s> + new query logs API
+ "upstream"
+ filteringStatusProcessed
+ ctDomainOrClient
remove ctQuestionType, ctDomain, ctClient </s> remove return false
case ctClient:
</s> add </s> remove case ctDomain:
return c.quickMatchJSONValue(line, "QH")
case ctClient:
return c.quickMatchJSONValue(line, "IP")
case ctQuestionType:
return c.quickMatchJSONValue(line, "QT")
</s> add case ctDomainOrClient:
return c.quickMatchJSONValue(line, "QH") ||
c.quickMatchJSONValue(line, "IP") </s> remove case ctQuestionType:
if c.strict && entry.QType == c.value {
return true
}
if !c.strict && strings.Contains(entry.QType, c.value) {
return true
}
</s> add </s> remove if ct == ctClient && l.conf.AnonymizeClientIP {
c.value = l.getClientIP(c.value)
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0500aa9591d1fb52f24182734859c398203d6962 | querylog/search_criteria.go |
<mask> }
<mask> if !c.strict && strings.Contains(entry.QHost, c.value) {
<mask> return true
<mask> }
<mask> return false
<mask> case ctClient:
<mask> if c.strict && entry.IP == c.value {
<mask> return true
<mask> }
<mask> if !c.strict && strings.Contains(entry.IP, c.value) {
<mask> return true
</s> + new query logs API
+ "upstream"
+ filteringStatusProcessed
+ ctDomainOrClient
remove ctQuestionType, ctDomain, ctClient </s> remove case ctQuestionType:
if c.strict && entry.QType == c.value {
return true
}
if !c.strict && strings.Contains(entry.QType, c.value) {
return true
}
</s> add </s> remove case ctDomain:
</s> add case ctDomainOrClient: </s> remove if ct == ctClient && l.conf.AnonymizeClientIP {
c.value = l.getClientIP(c.value)
}
</s> add </s> remove case ctDomain:
return c.quickMatchJSONValue(line, "QH")
case ctClient:
return c.quickMatchJSONValue(line, "IP")
case ctQuestionType:
return c.quickMatchJSONValue(line, "QT")
</s> add case ctDomainOrClient:
return c.quickMatchJSONValue(line, "QH") ||
c.quickMatchJSONValue(line, "IP") </s> remove
default:
return false
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0500aa9591d1fb52f24182734859c398203d6962 | querylog/search_criteria.go |
|
<mask> if !c.strict && strings.Contains(entry.IP, c.value) {
<mask> return true
<mask> }
<mask> return false
<mask> case ctQuestionType:
<mask> if c.strict && entry.QType == c.value {
<mask> return true
<mask> }
<mask> if !c.strict && strings.Contains(entry.QType, c.value) {
<mask> return true
<mask> }
<mask> case ctFilteringStatus:
<mask> res := entry.Result
<mask>
<mask> switch c.value {
<mask> case filteringStatusAll:
</s> + new query logs API
+ "upstream"
+ filteringStatusProcessed
+ ctDomainOrClient
remove ctQuestionType, ctDomain, ctClient </s> remove return false
case ctClient:
</s> add </s> remove case ctDomain:
</s> add case ctDomainOrClient: </s> remove if ct == ctClient && l.conf.AnonymizeClientIP {
c.value = l.getClientIP(c.value)
}
</s> add </s> remove case ctDomain:
return c.quickMatchJSONValue(line, "QH")
case ctClient:
return c.quickMatchJSONValue(line, "IP")
case ctQuestionType:
return c.quickMatchJSONValue(line, "QT")
</s> add case ctDomainOrClient:
return c.quickMatchJSONValue(line, "QH") ||
c.quickMatchJSONValue(line, "IP") | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0500aa9591d1fb52f24182734859c398203d6962 | querylog/search_criteria.go |
|
case filteringStatusProcessed:
return !(res.Reason == dnsfilter.FilteredBlackList ||
res.Reason == dnsfilter.FilteredBlockedService ||
res.Reason == dnsfilter.NotFilteredWhiteList)
| <mask> case filteringStatusSafeSearch:
<mask> return res.IsFiltered && res.Reason == dnsfilter.FilteredSafeSearch
<mask> default:
<mask> return false
<mask> }
<mask> }
<mask>
<mask> return false
</s> + new query logs API
+ "upstream"
+ filteringStatusProcessed
+ ctDomainOrClient
remove ctQuestionType, ctDomain, ctClient </s> remove
default:
return false
</s> add </s> remove return false
case ctClient:
</s> add </s> remove case ctQuestionType:
if c.strict && entry.QType == c.value {
return true
}
if !c.strict && strings.Contains(entry.QType, c.value) {
return true
}
</s> add </s> remove case ctDomain:
return c.quickMatchJSONValue(line, "QH")
case ctClient:
return c.quickMatchJSONValue(line, "IP")
case ctQuestionType:
return c.quickMatchJSONValue(line, "QT")
</s> add case ctDomainOrClient:
return c.quickMatchJSONValue(line, "QH") ||
c.quickMatchJSONValue(line, "IP") </s> remove case ctDomain:
</s> add case ctDomainOrClient: | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0500aa9591d1fb52f24182734859c398203d6962 | querylog/search_criteria.go |
<mask> return res.IsFiltered && res.Reason == dnsfilter.FilteredSafeSearch
<mask> default:
<mask> return false
<mask> }
<mask>
<mask> default:
<mask> return false
<mask> }
<mask>
<mask> return false
<mask> }
</s> + new query logs API
+ "upstream"
+ filteringStatusProcessed
+ ctDomainOrClient
remove ctQuestionType, ctDomain, ctClient </s> remove return false
case ctClient:
</s> add </s> remove case ctQuestionType:
if c.strict && entry.QType == c.value {
return true
}
if !c.strict && strings.Contains(entry.QType, c.value) {
return true
}
</s> add </s> remove case ctDomain:
return c.quickMatchJSONValue(line, "QH")
case ctClient:
return c.quickMatchJSONValue(line, "IP")
case ctQuestionType:
return c.quickMatchJSONValue(line, "QT")
</s> add case ctDomainOrClient:
return c.quickMatchJSONValue(line, "QH") ||
c.quickMatchJSONValue(line, "IP") </s> remove if ct == ctClient && l.conf.AnonymizeClientIP {
c.value = l.getClientIP(c.value)
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0500aa9591d1fb52f24182734859c398203d6962 | querylog/search_criteria.go |
|
const blockButton = (
<>
<div className="title--border" />
<button
type="button"
className={
classNames(
'button-action--arrow-option',
{ 'bg--danger': !isBlocked },
{ 'bg--green': isFiltered },
)}
onClick={onToggleBlock}
>
{t(buttonType)}
</button>
</>
); | <mask> setModalOpened(false);
<mask> }
<mask> };
<mask>
<mask> const blockButton = <button
<mask> className={classNames('title--border text-center button-action--arrow-option', { 'bg--danger': !isBlocked })}
<mask> onClick={onToggleBlock}>
<mask> {t(buttonType)}
<mask> </button>;
<mask>
<mask> const blockForClientButton = <button
<mask> className='text-center font-weight-bold py-2 button-action--arrow-option'
<mask> onClick={onBlockingForClientClick}>
<mask> {t(blockingForClientKey)}
</s> Pull request: 4775 fix query log issue on tablet devices
Updates #4775
Squashed commit of the following:
commit 9ad85d2306b68227e11c7b1dd792e3fe6389939d
Merge: 95aa29d6 41f081d8
Author: Ildar Kamalov <[email protected]>
Date: Tue Aug 2 11:44:04 2022 +0300
Merge branch 'master' into 4775-popup
commit 95aa29d68bdf5e9c4e7aa59f42d04328b1872115
Author: Ildar Kamalov <[email protected]>
Date: Mon Aug 1 16:21:23 2022 +0300
client: fix query log issue on tablet devices </s> remove export const MEDIUM_SCREEN_SIZE = 1023;
</s> add export const MEDIUM_SCREEN_SIZE = 1024; </s> remove const mediaQuery = window.matchMedia(`(max-width: ${SMALL_SCREEN_SIZE}px)`);
</s> add const mediaQuery = window.matchMedia(`(max-width: ${MEDIUM_SCREEN_SIZE}px)`); </s> remove const [isSmallScreen, setIsSmallScreen] = useState(window.innerWidth < SMALL_SCREEN_SIZE);
</s> add const [isSmallScreen, setIsSmallScreen] = useState(window.innerWidth <= MEDIUM_SCREEN_SIZE); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/053bb72a004df5f0eaaef827ee08c78af312fbf8 | client/src/components/Logs/Cells/index.js |
<mask> .custom-select--logs {
<mask> padding: 0.5rem 0.75rem 0.5rem 2rem !important;
<mask> }
<mask>
<mask> .bg--danger {
<mask> color: var(--danger) !important;
<mask> }
<mask>
<mask> .form-control--search {
<mask> box-shadow: 0 1px 0 #ddd;
<mask> padding: 0 2.5rem;
<mask> height: 2.25rem;
<mask> flex-grow: 1;
</s> Pull request: 4775 fix query log issue on tablet devices
Updates #4775
Squashed commit of the following:
commit 9ad85d2306b68227e11c7b1dd792e3fe6389939d
Merge: 95aa29d6 41f081d8
Author: Ildar Kamalov <[email protected]>
Date: Tue Aug 2 11:44:04 2022 +0300
Merge branch 'master' into 4775-popup
commit 95aa29d68bdf5e9c4e7aa59f42d04328b1872115
Author: Ildar Kamalov <[email protected]>
Date: Mon Aug 1 16:21:23 2022 +0300
client: fix query log issue on tablet devices </s> remove cursor: pointer;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/053bb72a004df5f0eaaef827ee08c78af312fbf8 | client/src/components/Logs/Logs.css |
|
@media screen and (max-width: 1024px) {
.button-action__container {
display: none;
}
}
| <mask> height: 1.6rem;
<mask> }
<mask>
<mask> .button-action__container--detailed {
<mask> bottom: 1.3rem;
<mask> }
<mask>
<mask> .button-action {
<mask> outline: 0 !important;
</s> Pull request: 4775 fix query log issue on tablet devices
Updates #4775
Squashed commit of the following:
commit 9ad85d2306b68227e11c7b1dd792e3fe6389939d
Merge: 95aa29d6 41f081d8
Author: Ildar Kamalov <[email protected]>
Date: Tue Aug 2 11:44:04 2022 +0300
Merge branch 'master' into 4775-popup
commit 95aa29d68bdf5e9c4e7aa59f42d04328b1872115
Author: Ildar Kamalov <[email protected]>
Date: Mon Aug 1 16:21:23 2022 +0300
client: fix query log issue on tablet devices </s> remove .bg--danger {
color: var(--danger) !important;
}
</s> add </s> remove cursor: pointer;
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/053bb72a004df5f0eaaef827ee08c78af312fbf8 | client/src/components/Logs/Logs.css |
padding-top: 0.5rem;
padding-bottom: 0.5rem;
text-align: center;
font-weight: 700; | <mask> background: transparent;
<mask> border: 0;
<mask> display: block;
<mask> width: 100%;
<mask> text-align: left;
<mask> color: inherit;
<mask> }
<mask>
<mask> .button-action--arrow-option:disabled {
<mask> display: none;
</s> Pull request: 4775 fix query log issue on tablet devices
Updates #4775
Squashed commit of the following:
commit 9ad85d2306b68227e11c7b1dd792e3fe6389939d
Merge: 95aa29d6 41f081d8
Author: Ildar Kamalov <[email protected]>
Date: Tue Aug 2 11:44:04 2022 +0300
Merge branch 'master' into 4775-popup
commit 95aa29d68bdf5e9c4e7aa59f42d04328b1872115
Author: Ildar Kamalov <[email protected]>
Date: Mon Aug 1 16:21:23 2022 +0300
client: fix query log issue on tablet devices </s> remove cursor: pointer;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/053bb72a004df5f0eaaef827ee08c78af312fbf8 | client/src/components/Logs/Logs.css |
cursor: pointer;
}
.button-action--arrow-option:hover,
.button-action--arrow-option:focus {
outline: none;
}
.button-action--arrow-option:focus-visible {
outline: 2px solid #295a9f; | <mask> padding-bottom: 0.5rem;
<mask> text-align: center;
<mask> font-weight: 700;
<mask> color: inherit;
<mask> }
<mask>
<mask> .button-action--arrow-option:disabled {
<mask> display: none;
</s> Pull request: 4775 fix query log issue on tablet devices
Updates #4775
Squashed commit of the following:
commit 9ad85d2306b68227e11c7b1dd792e3fe6389939d
Merge: 95aa29d6 41f081d8
Author: Ildar Kamalov <[email protected]>
Date: Tue Aug 2 11:44:04 2022 +0300
Merge branch 'master' into 4775-popup
commit 95aa29d68bdf5e9c4e7aa59f42d04328b1872115
Author: Ildar Kamalov <[email protected]>
Date: Mon Aug 1 16:21:23 2022 +0300
client: fix query log issue on tablet devices </s> remove text-align: left;
</s> add padding-top: 0.5rem;
padding-bottom: 0.5rem;
text-align: center;
font-weight: 700; </s> remove cursor: pointer;
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/053bb72a004df5f0eaaef827ee08c78af312fbf8 | client/src/components/Logs/Logs.css |
.tooltip-custom__container .button-action--arrow-option {
padding-bottom: 0;
text-align: left;
font-weight: 400;
}
| <mask> display: none;
<mask> }
<mask>
<mask> .tooltip-custom__container .button-action--arrow-option:not(:disabled):hover {
<mask> background: var(--gray-f3);
<mask> overflow: hidden;
<mask> }
<mask>
</s> Pull request: 4775 fix query log issue on tablet devices
Updates #4775
Squashed commit of the following:
commit 9ad85d2306b68227e11c7b1dd792e3fe6389939d
Merge: 95aa29d6 41f081d8
Author: Ildar Kamalov <[email protected]>
Date: Tue Aug 2 11:44:04 2022 +0300
Merge branch 'master' into 4775-popup
commit 95aa29d68bdf5e9c4e7aa59f42d04328b1872115
Author: Ildar Kamalov <[email protected]>
Date: Mon Aug 1 16:21:23 2022 +0300
client: fix query log issue on tablet devices </s> remove cursor: pointer;
</s> add </s> remove text-align: left;
</s> add padding-top: 0.5rem;
padding-bottom: 0.5rem;
text-align: center;
font-weight: 700; | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/053bb72a004df5f0eaaef827ee08c78af312fbf8 | client/src/components/Logs/Logs.css |
<mask> display: none;
<mask> }
<mask>
<mask> .tooltip-custom__container .button-action--arrow-option:not(:disabled):hover {
<mask> cursor: pointer;
<mask> background: var(--gray-f3);
<mask> overflow: hidden;
<mask> }
<mask>
<mask> .button-action--arrow-option-container {
</s> Pull request: 4775 fix query log issue on tablet devices
Updates #4775
Squashed commit of the following:
commit 9ad85d2306b68227e11c7b1dd792e3fe6389939d
Merge: 95aa29d6 41f081d8
Author: Ildar Kamalov <[email protected]>
Date: Tue Aug 2 11:44:04 2022 +0300
Merge branch 'master' into 4775-popup
commit 95aa29d68bdf5e9c4e7aa59f42d04328b1872115
Author: Ildar Kamalov <[email protected]>
Date: Mon Aug 1 16:21:23 2022 +0300
client: fix query log issue on tablet devices </s> remove text-align: left;
</s> add padding-top: 0.5rem;
padding-bottom: 0.5rem;
text-align: center;
font-weight: 700; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/053bb72a004df5f0eaaef827ee08c78af312fbf8 | client/src/components/Logs/Logs.css |
|
.bg--danger {
color: var(--danger);
}
.bg--green {
color: var(--green79);
} | <mask> font-style: italic;
<mask> font-weight: normal;
<mask> margin-bottom: 1rem;
<mask> }
</s> Pull request: 4775 fix query log issue on tablet devices
Updates #4775
Squashed commit of the following:
commit 9ad85d2306b68227e11c7b1dd792e3fe6389939d
Merge: 95aa29d6 41f081d8
Author: Ildar Kamalov <[email protected]>
Date: Tue Aug 2 11:44:04 2022 +0300
Merge branch 'master' into 4775-popup
commit 95aa29d68bdf5e9c4e7aa59f42d04328b1872115
Author: Ildar Kamalov <[email protected]>
Date: Mon Aug 1 16:21:23 2022 +0300
client: fix query log issue on tablet devices </s> remove text-align: left;
</s> add padding-top: 0.5rem;
padding-bottom: 0.5rem;
text-align: center;
font-weight: 700; </s> remove cursor: pointer;
</s> add | [
"keep",
"keep",
"keep",
"add"
] | https://github.com/AdguardTeam/AdGuardHome/commit/053bb72a004df5f0eaaef827ee08c78af312fbf8 | client/src/components/Logs/Logs.css |
MEDIUM_SCREEN_SIZE, | <mask> import queryString from 'query-string';
<mask> import classNames from 'classnames';
<mask> import {
<mask> BLOCK_ACTIONS,
<mask> SMALL_SCREEN_SIZE,
<mask> } from '../../helpers/constants';
<mask> import Loading from '../ui/Loading';
<mask> import Filters from './Filters';
<mask> import Disabled from './Disabled';
<mask> import { getFilteringStatus } from '../../actions/filtering';
</s> Pull request: 4775 fix query log issue on tablet devices
Updates #4775
Squashed commit of the following:
commit 9ad85d2306b68227e11c7b1dd792e3fe6389939d
Merge: 95aa29d6 41f081d8
Author: Ildar Kamalov <[email protected]>
Date: Tue Aug 2 11:44:04 2022 +0300
Merge branch 'master' into 4775-popup
commit 95aa29d68bdf5e9c4e7aa59f42d04328b1872115
Author: Ildar Kamalov <[email protected]>
Date: Mon Aug 1 16:21:23 2022 +0300
client: fix query log issue on tablet devices </s> remove cursor: pointer;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/053bb72a004df5f0eaaef827ee08c78af312fbf8 | client/src/components/Logs/index.js |
const [isSmallScreen, setIsSmallScreen] = useState(window.innerWidth <= MEDIUM_SCREEN_SIZE); | <mask>
<mask> const search = search_url_param || filter?.search || '';
<mask> const response_status = response_status_url_param || filter?.response_status || '';
<mask>
<mask> const [isSmallScreen, setIsSmallScreen] = useState(window.innerWidth < SMALL_SCREEN_SIZE);
<mask> const [detailedDataCurrent, setDetailedDataCurrent] = useState({});
<mask> const [buttonType, setButtonType] = useState(BLOCK_ACTIONS.BLOCK);
<mask> const [isModalOpened, setModalOpened] = useState(false);
<mask> const [isLoading, setIsLoading] = useState(false);
<mask>
</s> Pull request: 4775 fix query log issue on tablet devices
Updates #4775
Squashed commit of the following:
commit 9ad85d2306b68227e11c7b1dd792e3fe6389939d
Merge: 95aa29d6 41f081d8
Author: Ildar Kamalov <[email protected]>
Date: Tue Aug 2 11:44:04 2022 +0300
Merge branch 'master' into 4775-popup
commit 95aa29d68bdf5e9c4e7aa59f42d04328b1872115
Author: Ildar Kamalov <[email protected]>
Date: Mon Aug 1 16:21:23 2022 +0300
client: fix query log issue on tablet devices </s> remove export const MEDIUM_SCREEN_SIZE = 1023;
</s> add export const MEDIUM_SCREEN_SIZE = 1024; </s> remove const mediaQuery = window.matchMedia(`(max-width: ${SMALL_SCREEN_SIZE}px)`);
</s> add const mediaQuery = window.matchMedia(`(max-width: ${MEDIUM_SCREEN_SIZE}px)`); </s> remove const blockButton = <button
className={classNames('title--border text-center button-action--arrow-option', { 'bg--danger': !isBlocked })}
onClick={onToggleBlock}>
{t(buttonType)}
</button>;
</s> add const blockButton = (
<>
<div className="title--border" />
<button
type="button"
className={
classNames(
'button-action--arrow-option',
{ 'bg--danger': !isBlocked },
{ 'bg--green': isFiltered },
)}
onClick={onToggleBlock}
>
{t(buttonType)}
</button>
</>
); </s> remove SMALL_SCREEN_SIZE,
</s> add MEDIUM_SCREEN_SIZE, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/053bb72a004df5f0eaaef827ee08c78af312fbf8 | client/src/components/Logs/index.js |
const mediaQuery = window.matchMedia(`(max-width: ${MEDIUM_SCREEN_SIZE}px)`); | <mask> setIsLoading(false);
<mask> })();
<mask> }, [response_status, search]);
<mask>
<mask> const mediaQuery = window.matchMedia(`(max-width: ${SMALL_SCREEN_SIZE}px)`);
<mask> const mediaQueryHandler = (e) => {
<mask> setIsSmallScreen(e.matches);
<mask> if (e.matches) {
<mask> dispatch(toggleDetailedLogs(false));
<mask> }
</s> Pull request: 4775 fix query log issue on tablet devices
Updates #4775
Squashed commit of the following:
commit 9ad85d2306b68227e11c7b1dd792e3fe6389939d
Merge: 95aa29d6 41f081d8
Author: Ildar Kamalov <[email protected]>
Date: Tue Aug 2 11:44:04 2022 +0300
Merge branch 'master' into 4775-popup
commit 95aa29d68bdf5e9c4e7aa59f42d04328b1872115
Author: Ildar Kamalov <[email protected]>
Date: Mon Aug 1 16:21:23 2022 +0300
client: fix query log issue on tablet devices </s> remove const blockButton = <button
className={classNames('title--border text-center button-action--arrow-option', { 'bg--danger': !isBlocked })}
onClick={onToggleBlock}>
{t(buttonType)}
</button>;
</s> add const blockButton = (
<>
<div className="title--border" />
<button
type="button"
className={
classNames(
'button-action--arrow-option',
{ 'bg--danger': !isBlocked },
{ 'bg--green': isFiltered },
)}
onClick={onToggleBlock}
>
{t(buttonType)}
</button>
</>
); </s> remove export const MEDIUM_SCREEN_SIZE = 1023;
</s> add export const MEDIUM_SCREEN_SIZE = 1024; </s> remove const [isSmallScreen, setIsSmallScreen] = useState(window.innerWidth < SMALL_SCREEN_SIZE);
</s> add const [isSmallScreen, setIsSmallScreen] = useState(window.innerWidth <= MEDIUM_SCREEN_SIZE); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/053bb72a004df5f0eaaef827ee08c78af312fbf8 | client/src/components/Logs/index.js |
export const MEDIUM_SCREEN_SIZE = 1024; | <mask> ...DHCP_FORM_NAMES,
<mask> };
<mask>
<mask> export const SMALL_SCREEN_SIZE = 767;
<mask> export const MEDIUM_SCREEN_SIZE = 1023;
<mask>
<mask> export const SECONDS_IN_DAY = 60 * 60 * 24;
<mask>
<mask> export const UINT32_RANGE = {
<mask> MIN: 0,
</s> Pull request: 4775 fix query log issue on tablet devices
Updates #4775
Squashed commit of the following:
commit 9ad85d2306b68227e11c7b1dd792e3fe6389939d
Merge: 95aa29d6 41f081d8
Author: Ildar Kamalov <[email protected]>
Date: Tue Aug 2 11:44:04 2022 +0300
Merge branch 'master' into 4775-popup
commit 95aa29d68bdf5e9c4e7aa59f42d04328b1872115
Author: Ildar Kamalov <[email protected]>
Date: Mon Aug 1 16:21:23 2022 +0300
client: fix query log issue on tablet devices </s> remove const [isSmallScreen, setIsSmallScreen] = useState(window.innerWidth < SMALL_SCREEN_SIZE);
</s> add const [isSmallScreen, setIsSmallScreen] = useState(window.innerWidth <= MEDIUM_SCREEN_SIZE); </s> remove const mediaQuery = window.matchMedia(`(max-width: ${SMALL_SCREEN_SIZE}px)`);
</s> add const mediaQuery = window.matchMedia(`(max-width: ${MEDIUM_SCREEN_SIZE}px)`); </s> remove const blockButton = <button
className={classNames('title--border text-center button-action--arrow-option', { 'bg--danger': !isBlocked })}
onClick={onToggleBlock}>
{t(buttonType)}
</button>;
</s> add const blockButton = (
<>
<div className="title--border" />
<button
type="button"
className={
classNames(
'button-action--arrow-option',
{ 'bg--danger': !isBlocked },
{ 'bg--green': isFiltered },
)}
onClick={onToggleBlock}
>
{t(buttonType)}
</button>
</>
); </s> remove cursor: pointer;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/053bb72a004df5f0eaaef827ee08c78af312fbf8 | client/src/helpers/constants.js |
<svg className="icons icon12"> | <mask> className="btn btn-icon btn-outline-primary btn-sm"
<mask> title={t('refresh_btn')}
<mask> onClick={() => getAllStats()}
<mask> >
<mask> <svg className="icons">
<mask> <use xlinkHref="#refresh" />
<mask> </svg>
<mask> </button>;
<mask>
<mask> const statsProcessing = stats.processingStats
</s> 5505 fix icons
Updates #5505
Squashed commit of the following:
commit 3d66b82808b9c3904bad8bb32f3927172bfdcda6
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:45:42 2023 +0300
fix icons
commit 5030b45751e1717e5030eed0b46634f800d357d2
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:24:32 2023 +0300
client: fix chevron icon </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/057804a459c2631494a87133f08e4f8da7d73798 | client/src/components/Dashboard/index.js |
<svg className="icons icon12"> | <mask> url,
<mask> })
<mask> }
<mask> >
<mask> <svg className="icons">
<mask> <use xlinkHref="#edit" />
<mask> </svg>
<mask> </button>
<mask> <button
<mask> type="button"
</s> 5505 fix icons
Updates #5505
Squashed commit of the following:
commit 3d66b82808b9c3904bad8bb32f3927172bfdcda6
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:45:42 2023 +0300
fix icons
commit 5030b45751e1717e5030eed0b46634f800d357d2
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:24:32 2023 +0300
client: fix chevron icon </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/057804a459c2631494a87133f08e4f8da7d73798 | client/src/components/Filters/Table.js |
<svg className="icons icon12"> | <mask> className="btn btn-icon btn-outline-secondary btn-sm"
<mask> onClick={() => handleDelete(url)}
<mask> title={t('delete_table_action')}
<mask> >
<mask> <svg className="icons">
<mask> <use xlinkHref="#delete" />
<mask> </svg>
<mask> </button>
<mask> </div>
<mask> );
</s> 5505 fix icons
Updates #5505
Squashed commit of the following:
commit 3d66b82808b9c3904bad8bb32f3927172bfdcda6
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:45:42 2023 +0300
fix icons
commit 5030b45751e1717e5030eed0b46634f800d357d2
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:24:32 2023 +0300
client: fix chevron icon </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/057804a459c2631494a87133f08e4f8da7d73798 | client/src/components/Filters/Table.js |
className="icon24" | <mask> </button>
<mask> {content && (
<mask> <button className={buttonArrowClass} disabled={processingRules}>
<mask> <IconTooltip
<mask> className="h-100"
<mask> tooltipClass="button-action--arrow-option-container"
<mask> xlinkHref="chevron-down"
<mask> triggerClass="button-action--icon"
<mask> content={content}
<mask> placement="bottom-end"
</s> 5505 fix icons
Updates #5505
Squashed commit of the following:
commit 3d66b82808b9c3904bad8bb32f3927172bfdcda6
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:45:42 2023 +0300
fix icons
commit 5030b45751e1717e5030eed0b46634f800d357d2
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:24:32 2023 +0300
client: fix chevron icon </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/057804a459c2631494a87133f08e4f8da7d73798 | client/src/components/Logs/Cells/ClientCell.js |
.icon24 {
width: 24px;
height: 24px;
}
.icon12 {
width: 12px;
height: 12px;
}
| <mask> max-height: 100% !important;
<mask> }
<mask>
<mask> .cursor--pointer {
<mask> cursor: pointer;
<mask> }
<mask>
<mask> .custom-select__arrow--left {
</s> 5505 fix icons
Updates #5505
Squashed commit of the following:
commit 3d66b82808b9c3904bad8bb32f3927172bfdcda6
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:45:42 2023 +0300
fix icons
commit 5030b45751e1717e5030eed0b46634f800d357d2
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:24:32 2023 +0300
client: fix chevron icon </s> remove align-items: center;
</s> add </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <symbol id="chevron-down" viewBox="0 0 24 24">
</s> add <symbol id="chevron-down" width="24" height="24" viewBox="0 0 24 24"> | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/057804a459c2631494a87133f08e4f8da7d73798 | client/src/components/Logs/Logs.css |
<mask> width: 100%;
<mask> height: 100%;
<mask> display: flex;
<mask> justify-content: center;
<mask> align-items: center;
<mask> }
<mask>
<mask> .button-action:active {
<mask> background: var(--btn-block-active);
<mask> }
</s> 5505 fix icons
Updates #5505
Squashed commit of the following:
commit 3d66b82808b9c3904bad8bb32f3927172bfdcda6
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:45:42 2023 +0300
fix icons
commit 5030b45751e1717e5030eed0b46634f800d357d2
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:24:32 2023 +0300
client: fix chevron icon </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <symbol id="chevron-down" viewBox="0 0 24 24">
</s> add <symbol id="chevron-down" width="24" height="24" viewBox="0 0 24 24"> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/057804a459c2631494a87133f08e4f8da7d73798 | client/src/components/Logs/Logs.css |
|
<svg className="icons icon12"> | <mask> }
<mask> disabled={processingUpdating}
<mask> title={t('edit_table_action')}
<mask> >
<mask> <svg className="icons">
<mask> <use xlinkHref="#edit" />
<mask> </svg>
<mask> </button>
<mask> <button
<mask> type="button"
</s> 5505 fix icons
Updates #5505
Squashed commit of the following:
commit 3d66b82808b9c3904bad8bb32f3927172bfdcda6
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:45:42 2023 +0300
fix icons
commit 5030b45751e1717e5030eed0b46634f800d357d2
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:24:32 2023 +0300
client: fix chevron icon </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/057804a459c2631494a87133f08e4f8da7d73798 | client/src/components/Settings/Clients/ClientsTable/ClientsTable.js |
<svg className="icons icon12"> | <mask> onClick={() => handleDelete({ name: clientName })}
<mask> disabled={processingDeleting}
<mask> title={t('delete_table_action')}
<mask> >
<mask> <svg className="icons">
<mask> <use xlinkHref="#delete" />
<mask> </svg>
<mask> </button>
<mask> </div>
<mask> );
</s> 5505 fix icons
Updates #5505
Squashed commit of the following:
commit 3d66b82808b9c3904bad8bb32f3927172bfdcda6
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:45:42 2023 +0300
fix icons
commit 5030b45751e1717e5030eed0b46634f800d357d2
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:24:32 2023 +0300
client: fix chevron icon </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/057804a459c2631494a87133f08e4f8da7d73798 | client/src/components/Settings/Clients/ClientsTable/ClientsTable.js |
<symbol id="refresh" viewBox="0 0 24 24" stroke="currentColor" fill="none" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2">
<polyline points="23 4 23 10 17 10"></polyline>
<polyline points="1 20 1 14 7 14"></polyline>
<path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path> | <mask> <path
<mask> d="m19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1 -2.83 0l-.06-.06a1.65 1.65 0 0 0 -1.82-.33 1.65 1.65 0 0 0 -1 1.51v.17a2 2 0 0 1 -2 2 2 2 0 0 1 -2-2v-.09a1.65 1.65 0 0 0 -1.08-1.51 1.65 1.65 0 0 0 -1.82.33l-.06.06a2 2 0 0 1 -2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0 -1.51-1h-.17a2 2 0 0 1 -2-2 2 2 0 0 1 2-2h.09a1.65 1.65 0 0 0 1.51-1.08 1.65 1.65 0 0 0 -.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33h.08a1.65 1.65 0 0 0 1-1.51v-.17a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0 -.33 1.82v.08a1.65 1.65 0 0 0 1.51 1h.17a2 2 0 0 1 2 2 2 2 0 0 1 -2 2h-.09a1.65 1.65 0 0 0 -1.51 1z" />
<mask> </symbol>
<mask>
<mask> <symbol id="refresh" viewBox="0 0 24 24" stroke="currentColor" fill="none"
<mask> strokeLinecap="round" strokeLinejoin="round" strokeWidth="2">
<mask> <path d="M23 4v6h-6M1 20v-6h6" />
<mask> <path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" />
<mask> </symbol>
<mask>
<mask> <symbol id="dns_privacy" viewBox="0 0 30 30" stroke="none" fill="currentColor"
<mask> strokeLinecap="round" strokeLinejoin="round">
<mask> <path
</s> 5505 fix icons
Updates #5505
Squashed commit of the following:
commit 3d66b82808b9c3904bad8bb32f3927172bfdcda6
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:45:42 2023 +0300
fix icons
commit 5030b45751e1717e5030eed0b46634f800d357d2
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:24:32 2023 +0300
client: fix chevron icon </s> remove <symbol id="chevron-down" viewBox="0 0 24 24">
</s> add <symbol id="chevron-down" width="24" height="24" viewBox="0 0 24 24"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/057804a459c2631494a87133f08e4f8da7d73798 | client/src/components/ui/Icons.js |
<symbol id="chevron-down" width="24" height="24" viewBox="0 0 24 24"> | <mask> <path d="M60 54.5h8v40h-8zM60 35.5h8v8h-8z" />
<mask> </svg>
<mask> </symbol>
<mask>
<mask> <symbol id="chevron-down" viewBox="0 0 24 24">
<mask> <g fill="none" fillRule="evenodd">
<mask> <path d="M0 0h24v24H0z" fill="#878787" fillOpacity=".01" />
<mask> <path stroke="currentColor" strokeWidth="1.5" strokeLinecap="round"
<mask> d="M8.036 10.93l3.93 4.07 4.068-3.93" />
<mask> </g>
</s> 5505 fix icons
Updates #5505
Squashed commit of the following:
commit 3d66b82808b9c3904bad8bb32f3927172bfdcda6
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:45:42 2023 +0300
fix icons
commit 5030b45751e1717e5030eed0b46634f800d357d2
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:24:32 2023 +0300
client: fix chevron icon </s> remove <symbol id="refresh" viewBox="0 0 24 24" stroke="currentColor" fill="none"
strokeLinecap="round" strokeLinejoin="round" strokeWidth="2">
<path d="M23 4v6h-6M1 20v-6h6" />
<path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" />
</s> add <symbol id="refresh" viewBox="0 0 24 24" stroke="currentColor" fill="none" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2">
<polyline points="23 4 23 10 17 10"></polyline>
<polyline points="1 20 1 14 7 14"></polyline>
<path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/057804a459c2631494a87133f08e4f8da7d73798 | client/src/components/ui/Icons.js |
<svg className="icons icon12"> | <mask> onClick={onClick}
<mask> disabled={processingVersion}
<mask> title={t('check_updates_now')}
<mask> >
<mask> <svg className="icons">
<mask> <use xlinkHref="#refresh" />
<mask> </svg>
<mask> </button>}
<mask> </div>
<mask> </div>
</s> 5505 fix icons
Updates #5505
Squashed commit of the following:
commit 3d66b82808b9c3904bad8bb32f3927172bfdcda6
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:45:42 2023 +0300
fix icons
commit 5030b45751e1717e5030eed0b46634f800d357d2
Author: Ildar Kamalov <[email protected]>
Date: Mon Mar 6 12:24:32 2023 +0300
client: fix chevron icon </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> </s> remove <svg className="icons">
</s> add <svg className="icons icon12"> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/057804a459c2631494a87133f08e4f8da7d73798 | client/src/components/ui/Version.js |
"encryption_https_desc": "If HTTPS port is configured, AdGuard Home admin interface will be accessible via HTTPS, and it will also provide DNS-over-HTTPS on '\/dns-query' location.", | <mask> "encryption_server_desc": "In order to use HTTPS, you need yo enter the server name that matches your SSL certificate.",
<mask> "encryption_redirect": "Redirect to HTTPS automatically",
<mask> "encryption_redirect_desc": "If checked, AdGuard Home will automatically redirect you from HTTP to HTTPS addresses.",
<mask> "encryption_https": "HTTPS port",
<mask> "encryption_https_desc": "If HTTPS port is configured, AdGuard Home admin interface will be accessible via HTTPS, and it will also provide DNS-over-HTTPS on '\\dns-query' location.",
<mask> "encryption_dot": "DNS-over-TLS port",
<mask> "encryption_dot_desc": "If this port is configured, AdGuard Home will run a DNS-over-TLS server on this port.",
<mask> "encryption_certificates": "Certificates",
<mask> "encryption_certificates_desc": "In order to use encryption, you need to provide a valid SSL certificates chain for your domain. You can get a free certificate on <0>{{link}}</0> or you can buy it from one of the trusted Certificate Authorities.",
<mask> "encryption_certificates_input": "Copy/paste your PEM-encoded cerificates here.",
</s> Added validation on change and enable encryption checkbox </s> remove "encryption_certificates_for": "Certificates for {{domains}}",
"encryption_expire": "Expire on {{date}}",
</s> add "encryption_expire": "Expires", </s> remove {statusKey &&
</s> add {privateKey && | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/__locales/en.json |
"encryption_expire": "Expires", | <mask> "encryption_certificates": "Certificates",
<mask> "encryption_certificates_desc": "In order to use encryption, you need to provide a valid SSL certificates chain for your domain. You can get a free certificate on <0>{{link}}</0> or you can buy it from one of the trusted Certificate Authorities.",
<mask> "encryption_certificates_input": "Copy/paste your PEM-encoded cerificates here.",
<mask> "encryption_status": "Status",
<mask> "encryption_certificates_for": "Certificates for {{domains}}",
<mask> "encryption_expire": "Expire on {{date}}",
<mask> "encryption_key": "Private key",
<mask> "encryption_key_input": "Copy/paste your PEM-encoded private key for your cerficate here.",
<mask> "topline_expiring_certificate": "Your SSL certificate is about to expire. Update <0>Encryption settings</0>.",
<mask> "form_error_port_range": "Enter port value in the range of 80-65535",
<mask> "form_error_equal": "Shouldn't be equal",
</s> Added validation on change and enable encryption checkbox </s> remove "encryption_https_desc": "If HTTPS port is configured, AdGuard Home admin interface will be accessible via HTTPS, and it will also provide DNS-over-HTTPS on '\\dns-query' location.",
</s> add "encryption_https_desc": "If HTTPS port is configured, AdGuard Home admin interface will be accessible via HTTPS, and it will also provide DNS-over-HTTPS on '\/dns-query' location.", </s> remove {statusKey &&
</s> add {privateKey && | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/__locales/en.json |
"encryption_enable": "Enable Encryption (HTTPS, DNS-over-HTTPS, and DNS-over-TLS)",
"encryption_enable_desc": "If encryption is enabled, AdGuard Home admin interface will work over HTTPS, and the DNS server will listen for requests over DNS-over-HTTPS and DNS-over-TLS.",
"encryption_chain_valid": "Certificate chain is valid",
"encryption_chain_invalid": "Certificate chain is invalid",
"encryption_key_valid": "This is a valid {{type}} private key",
"encryption_key_invalid": "This is an invalid {{type}} private key",
"encryption_subject": "Subject",
"encryption_issuer": "Issuer",
"encryption_hostnames": "Hostnames", | <mask> "encryption_status": "Status",
<mask> "encryption_expire": "Expires",
<mask> "encryption_key": "Private key",
<mask> "encryption_key_input": "Copy/paste your PEM-encoded private key for your cerficate here.",
<mask> "topline_expiring_certificate": "Your SSL certificate is about to expire. Update <0>Encryption settings</0>.",
<mask> "topline_expired_certificate": "Your SSL certificate is expired. Update <0>Encryption settings</0>.",
<mask> "form_error_port_range": "Enter port value in the range of 80-65535",
<mask> "form_error_equal": "Shouldn't be equal",
<mask> "form_error_password": "Password mismatched",
<mask> "reset_settings": "Reset settings"
</s> Added validation on change and enable encryption checkbox </s> remove "encryption_certificates_for": "Certificates for {{domains}}",
"encryption_expire": "Expire on {{date}}",
</s> add "encryption_expire": "Expires", </s> remove "encryption_https_desc": "If HTTPS port is configured, AdGuard Home admin interface will be accessible via HTTPS, and it will also provide DNS-over-HTTPS on '\\dns-query' location.",
</s> add "encryption_https_desc": "If HTTPS port is configured, AdGuard Home admin interface will be accessible via HTTPS, and it will also provide DNS-over-HTTPS on '\/dns-query' location.", </s> remove {statusKey &&
</s> add {privateKey && | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/__locales/en.json |
"topline_expired_certificate": "Your SSL certificate is expired. Update <0>Encryption settings</0>.", | <mask> "encryption_subject": "Subject",
<mask> "encryption_issuer": "Issuer",
<mask> "encryption_hostnames": "Hostnames",
<mask> "topline_expiring_certificate": "Your SSL certificate is about to expire. Update <0>Encryption settings</0>.",
<mask> "form_error_port_range": "Enter port value in the range of 80-65535",
<mask> "form_error_equal": "Shouldn't be equal",
<mask> "form_error_password": "Password mismatched",
<mask> "reset_settings": "Reset settings"
</s> Added validation on change and enable encryption checkbox </s> remove "encryption_certificates_for": "Certificates for {{domains}}",
"encryption_expire": "Expire on {{date}}",
</s> add "encryption_expire": "Expires", </s> remove "encryption_https_desc": "If HTTPS port is configured, AdGuard Home admin interface will be accessible via HTTPS, and it will also provide DNS-over-HTTPS on '\\dns-query' location.",
</s> add "encryption_https_desc": "If HTTPS port is configured, AdGuard Home admin interface will be accessible via HTTPS, and it will also provide DNS-over-HTTPS on '\/dns-query' location.", | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/__locales/en.json |
<mask> dispatch(findActiveDhcpFailure());
<mask> }
<mask> }
<mask> };
<mask>
<mask> export const getTlsStatusRequest = createAction('GET_TLS_STATUS_REQUEST');
<mask> export const getTlsStatusFailure = createAction('GET_TLS_STATUS_FAILURE');
<mask> export const getTlsStatusSuccess = createAction('GET_TLS_STATUS_SUCCESS');
<mask>
<mask> export const getTlsStatus = () => async (dispatch) => {
<mask> dispatch(getTlsStatusRequest());
<mask> try {
<mask> const status = await apiClient.getTlsStatus();
<mask> status.certificate_chain = atob(status.certificate_chain);
<mask> status.private_key = atob(status.private_key);
<mask>
<mask> dispatch(getTlsStatusSuccess(status));
<mask> } catch (error) {
<mask> dispatch(addErrorToast({ error }));
<mask> dispatch(getTlsStatusFailure());
<mask> }
<mask> };
<mask>
<mask> export const setTlsConfigRequest = createAction('SET_TLS_CONFIG_REQUEST');
<mask> export const setTlsConfigFailure = createAction('SET_TLS_CONFIG_FAILURE');
<mask> export const setTlsConfigSuccess = createAction('SET_TLS_CONFIG_SUCCESS');
<mask>
<mask> export const setTlsConfig = config => async (dispatch) => {
<mask> dispatch(setTlsConfigRequest());
<mask> try {
<mask> const values = { ...config };
<mask> values.certificate_chain = btoa(values.certificate_chain);
<mask> values.private_key = btoa(values.private_key);
<mask> values.port_https = values.port_https || 0;
<mask> values.port_dns_over_tls = values.port_dns_over_tls || 0;
<mask>
<mask> await apiClient.setTlsConfig(values);
<mask> dispatch(setTlsConfigSuccess(config));
<mask> dispatch(addSuccessToast('encryption_config_saved'));
<mask> dispatch(getTlsStatus());
<mask> } catch (error) {
<mask> dispatch(addErrorToast({ error }));
<mask> dispatch(setTlsConfigFailure());
<mask> }
<mask> };
</s> Added validation on change and enable encryption checkbox </s> remove const Form = (props) => {
</s> add let Form = (props) => { </s> remove isDropdownOpen: false,
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/actions/index.js |
|
TLS_VALIDATE = { path: 'tls/validate', method: 'POST' }; | <mask> // DNS-over-HTTPS and DNS-over-TLS
<mask> TLS_STATUS = { path: 'tls/status', method: 'GET' };
<mask> TLS_CONFIG = { path: 'tls/configure', method: 'POST' };
<mask>
<mask> getTlsStatus() {
<mask> const { path, method } = this.TLS_STATUS;
<mask> return this.makeRequest(path, method);
<mask> }
</s> Added validation on change and enable encryption checkbox </s> remove const Form = (props) => {
</s> add let Form = (props) => { </s> remove
export const getTlsStatusRequest = createAction('GET_TLS_STATUS_REQUEST');
export const getTlsStatusFailure = createAction('GET_TLS_STATUS_FAILURE');
export const getTlsStatusSuccess = createAction('GET_TLS_STATUS_SUCCESS');
export const getTlsStatus = () => async (dispatch) => {
dispatch(getTlsStatusRequest());
try {
const status = await apiClient.getTlsStatus();
status.certificate_chain = atob(status.certificate_chain);
status.private_key = atob(status.private_key);
dispatch(getTlsStatusSuccess(status));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(getTlsStatusFailure());
}
};
export const setTlsConfigRequest = createAction('SET_TLS_CONFIG_REQUEST');
export const setTlsConfigFailure = createAction('SET_TLS_CONFIG_FAILURE');
export const setTlsConfigSuccess = createAction('SET_TLS_CONFIG_SUCCESS');
export const setTlsConfig = config => async (dispatch) => {
dispatch(setTlsConfigRequest());
try {
const values = { ...config };
values.certificate_chain = btoa(values.certificate_chain);
values.private_key = btoa(values.private_key);
values.port_https = values.port_https || 0;
values.port_dns_over_tls = values.port_dns_over_tls || 0;
await apiClient.setTlsConfig(values);
dispatch(setTlsConfigSuccess(config));
dispatch(addSuccessToast('encryption_config_saved'));
dispatch(getTlsStatus());
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(setTlsConfigFailure());
}
};
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/api/Api.js |
validateTlsConfig(config) {
const { path, method } = this.TLS_VALIDATE;
const parameters = {
data: config,
headers: { 'Content-Type': 'application/json' },
};
return this.makeRequest(path, method, parameters);
} | <mask> headers: { 'Content-Type': 'application/json' },
<mask> };
<mask> return this.makeRequest(path, method, parameters);
<mask> }
<mask> }
</s> Added validation on change and enable encryption checkbox </s> remove const encryption = handleActions({
[actions.getTlsStatusRequest]: state => ({ ...state, processing: true }),
[actions.getTlsStatusFailure]: state => ({ ...state, processing: false }),
[actions.getTlsStatusSuccess]: (state, { payload }) => {
const newState = {
...state,
...payload,
processing: false,
};
return newState;
},
[actions.setTlsConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setTlsConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setTlsConfigSuccess]: (state, { payload }) => {
const newState = {
...state,
...payload,
processingConfig: false,
};
return newState;
},
}, {
processing: true,
processingConfig: false,
status_cert: '',
status_key: '',
certificate_chain: '',
private_key: '',
server_name: '',
});
</s> add </s> remove const Form = (props) => {
</s> add let Form = (props) => { | [
"keep",
"keep",
"keep",
"add",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/api/Api.js |
import { withNamespaces } from 'react-i18next'; | <mask> import React, { Component, Fragment } from 'react';
<mask> import { HashRouter, Route } from 'react-router-dom';
<mask> import PropTypes from 'prop-types';
<mask> import { Trans, withNamespaces } from 'react-i18next';
<mask> import LoadingBar from 'react-redux-loading-bar';
<mask>
<mask> import 'react-table/react-table.css';
<mask> import '../ui/Tabler.css';
<mask> import '../ui/ReactTable.css';
</s> Added validation on change and enable encryption checkbox </s> remove import { Field, reduxForm } from 'redux-form';
</s> add import { Field, reduxForm, formValueSelector } from 'redux-form'; | [
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/App/index.js |
import EncryptionTopline from '../ui/EncryptionTopline'; | <mask> import Status from '../ui/Status';
<mask> import Topline from '../ui/Topline';
<mask> import i18n from '../../i18n';
<mask>
<mask> class App extends Component {
<mask> componentDidMount() {
<mask> this.props.getDnsStatus();
</s> Added validation on change and enable encryption checkbox </s> remove import { Field, reduxForm } from 'redux-form';
</s> add import { Field, reduxForm, formValueSelector } from 'redux-form'; </s> remove import { Trans, withNamespaces } from 'react-i18next';
</s> add import { withNamespaces } from 'react-i18next'; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/App/index.js |
<mask> const updateAvailable =
<mask> !dashboard.processingVersions &&
<mask> dashboard.isCoreRunning &&
<mask> dashboard.isUpdateAvailable;
<mask> const isExpiringCertificate = !encryption.processing && encryption.warning;
<mask>
<mask> return (
<mask> <HashRouter hashType='noslash'>
<mask> <Fragment>
<mask> {updateAvailable &&
</s> Added validation on change and enable encryption checkbox </s> remove processing,
processingConfig,
status_cert: statusCert,
status_key: statusKey,
...values
</s> add enabled,
server_name,
force_https,
port_https,
port_dns_over_tls,
certificate_chain,
private_key, </s> remove {statusCert &&
</s> add {certificateChain && </s> remove {statusKey &&
</s> add {privateKey && </s> remove <div>
{statusCert}
</div>
</s> add <ul>
<li className={valid_chain ? 'text-success' : 'text-danger'}>
{valid_chain ?
<Trans>encryption_chain_valid</Trans>
: <Trans>encryption_chain_invalid</Trans>
}
</li>
{subject &&
<li><Trans>encryption_subject</Trans>: {subject}</li>
}
{issuer &&
<li><Trans>encryption_issuer</Trans>: {issuer}</li>
}
{not_after && not_after !== EMPTY_DATE &&
<li>
<Trans>encryption_expire</Trans>:
{format(not_after, 'YYYY-MM-DD HH:mm:ss')}
</li>
}
{dns_names &&
<li>
<Trans>encryption_hostnames</Trans>: {dns_names}
</li>
}
</ul> </s> remove {isExpiringCertificate &&
<Topline type="warning">
<Trans components={[<a href="#settings" key="0">link</a>]}>
topline_expiring_certificate
</Trans>
</Topline>
</s> add {!encryption.processing &&
<EncryptionTopline notAfter={encryption.not_after} /> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/App/index.js |
|
{!encryption.processing &&
<EncryptionTopline notAfter={encryption.not_after} /> | <mask> <Topline type="info">
<mask> {dashboard.announcement} <a href={dashboard.announcementUrl} target="_blank" rel="noopener noreferrer">Click here</a> for more info.
<mask> </Topline>
<mask> }
<mask> {isExpiringCertificate &&
<mask> <Topline type="warning">
<mask> <Trans components={[<a href="#settings" key="0">link</a>]}>
<mask> topline_expiring_certificate
<mask> </Trans>
<mask> </Topline>
<mask> }
<mask> <LoadingBar className="loading-bar" updateTime={1000} />
<mask> <Route component={Header} />
<mask> <div className="container container--wrap">
<mask> {!dashboard.processing && !dashboard.isCoreRunning &&
</s> Added validation on change and enable encryption checkbox </s> remove {statusKey &&
</s> add {privateKey && </s> remove {statusCert &&
</s> add {certificateChain && </s> remove <div>
{statusCert}
</div>
</s> add <ul>
<li className={valid_chain ? 'text-success' : 'text-danger'}>
{valid_chain ?
<Trans>encryption_chain_valid</Trans>
: <Trans>encryption_chain_invalid</Trans>
}
</li>
{subject &&
<li><Trans>encryption_subject</Trans>: {subject}</li>
}
{issuer &&
<li><Trans>encryption_issuer</Trans>: {issuer}</li>
}
{not_after && not_after !== EMPTY_DATE &&
<li>
<Trans>encryption_expire</Trans>:
{format(not_after, 'YYYY-MM-DD HH:mm:ss')}
</li>
}
{dns_names &&
<li>
<Trans>encryption_hostnames</Trans>: {dns_names}
</li>
}
</ul> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/App/index.js |
<mask>
<mask> class Header extends Component {
<mask> state = {
<mask> isMenuOpen: false,
<mask> isDropdownOpen: false,
<mask> };
<mask>
<mask> toggleMenuOpen = () => {
<mask> this.setState(prevState => ({ isMenuOpen: !prevState.isMenuOpen }));
<mask> };
</s> Added validation on change and enable encryption checkbox </s> remove const encryption = handleActions({
[actions.getTlsStatusRequest]: state => ({ ...state, processing: true }),
[actions.getTlsStatusFailure]: state => ({ ...state, processing: false }),
[actions.getTlsStatusSuccess]: (state, { payload }) => {
const newState = {
...state,
...payload,
processing: false,
};
return newState;
},
[actions.setTlsConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setTlsConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setTlsConfigSuccess]: (state, { payload }) => {
const newState = {
...state,
...payload,
processingConfig: false,
};
return newState;
},
}, {
processing: true,
processingConfig: false,
status_cert: '',
status_key: '',
certificate_chain: '',
private_key: '',
server_name: '',
});
</s> add </s> remove
export const getTlsStatusRequest = createAction('GET_TLS_STATUS_REQUEST');
export const getTlsStatusFailure = createAction('GET_TLS_STATUS_FAILURE');
export const getTlsStatusSuccess = createAction('GET_TLS_STATUS_SUCCESS');
export const getTlsStatus = () => async (dispatch) => {
dispatch(getTlsStatusRequest());
try {
const status = await apiClient.getTlsStatus();
status.certificate_chain = atob(status.certificate_chain);
status.private_key = atob(status.private_key);
dispatch(getTlsStatusSuccess(status));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(getTlsStatusFailure());
}
};
export const setTlsConfigRequest = createAction('SET_TLS_CONFIG_REQUEST');
export const setTlsConfigFailure = createAction('SET_TLS_CONFIG_FAILURE');
export const setTlsConfigSuccess = createAction('SET_TLS_CONFIG_SUCCESS');
export const setTlsConfig = config => async (dispatch) => {
dispatch(setTlsConfigRequest());
try {
const values = { ...config };
values.certificate_chain = btoa(values.certificate_chain);
values.private_key = btoa(values.private_key);
values.port_https = values.port_https || 0;
values.port_dns_over_tls = values.port_dns_over_tls || 0;
await apiClient.setTlsConfig(values);
dispatch(setTlsConfigSuccess(config));
dispatch(addSuccessToast('encryption_config_saved'));
dispatch(getTlsStatus());
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(setTlsConfigFailure());
}
};
</s> add </s> remove const Form = (props) => {
</s> add let Form = (props) => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Header/index.js |
|
const { isMenuOpen } = this.state; | <mask> render() {
<mask> const { dashboard } = this.props;
<mask> const badgeClass = classnames({
<mask> 'badge dns-status': true,
<mask> 'badge-success': dashboard.protectionEnabled,
<mask> 'badge-danger': !dashboard.protectionEnabled,
<mask> });
</s> Added validation on change and enable encryption checkbox </s> remove processing,
processingConfig,
status_cert: statusCert,
status_key: statusKey,
...values
</s> add enabled,
server_name,
force_https,
port_https,
port_dns_over_tls,
certificate_chain,
private_key, </s> remove const encryption = handleActions({
[actions.getTlsStatusRequest]: state => ({ ...state, processing: true }),
[actions.getTlsStatusFailure]: state => ({ ...state, processing: false }),
[actions.getTlsStatusSuccess]: (state, { payload }) => {
const newState = {
...state,
...payload,
processing: false,
};
return newState;
},
[actions.setTlsConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setTlsConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setTlsConfigSuccess]: (state, { payload }) => {
const newState = {
...state,
...payload,
processingConfig: false,
};
return newState;
},
}, {
processing: true,
processingConfig: false,
status_cert: '',
status_key: '',
certificate_chain: '',
private_key: '',
server_name: '',
});
</s> add </s> remove
export const getTlsStatusRequest = createAction('GET_TLS_STATUS_REQUEST');
export const getTlsStatusFailure = createAction('GET_TLS_STATUS_FAILURE');
export const getTlsStatusSuccess = createAction('GET_TLS_STATUS_SUCCESS');
export const getTlsStatus = () => async (dispatch) => {
dispatch(getTlsStatusRequest());
try {
const status = await apiClient.getTlsStatus();
status.certificate_chain = atob(status.certificate_chain);
status.private_key = atob(status.private_key);
dispatch(getTlsStatusSuccess(status));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(getTlsStatusFailure());
}
};
export const setTlsConfigRequest = createAction('SET_TLS_CONFIG_REQUEST');
export const setTlsConfigFailure = createAction('SET_TLS_CONFIG_FAILURE');
export const setTlsConfigSuccess = createAction('SET_TLS_CONFIG_SUCCESS');
export const setTlsConfig = config => async (dispatch) => {
dispatch(setTlsConfigRequest());
try {
const values = { ...config };
values.certificate_chain = btoa(values.certificate_chain);
values.private_key = btoa(values.private_key);
values.port_https = values.port_https || 0;
values.port_dns_over_tls = values.port_dns_over_tls || 0;
await apiClient.setTlsConfig(values);
dispatch(setTlsConfigSuccess(config));
dispatch(addSuccessToast('encryption_config_saved'));
dispatch(getTlsStatus());
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(setTlsConfigFailure());
}
};
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Header/index.js |
isMenuOpen={isMenuOpen} | <mask> </div>
<mask> </div>
<mask> <Menu
<mask> location={this.props.location}
<mask> isMenuOpen={this.state.isMenuOpen}
<mask> toggleMenuOpen={this.toggleMenuOpen}
<mask> closeMenu={this.closeMenu}
<mask> />
<mask> <div className="col col-sm-6 col-lg-3">
<mask> <Version
</s> Added validation on change and enable encryption checkbox | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Header/index.js |
import { connect } from 'react-redux'; | <mask> import React, { Fragment } from 'react';
<mask> import PropTypes from 'prop-types';
<mask> import { Field, reduxForm, formValueSelector } from 'redux-form';
<mask> import { Trans, withNamespaces } from 'react-i18next';
<mask> import flow from 'lodash/flow';
<mask> import format from 'date-fns/format';
</s> Added validation on change and enable encryption checkbox </s> remove import { Field, reduxForm } from 'redux-form';
</s> add import { Field, reduxForm, formValueSelector } from 'redux-form'; </s> remove import { Trans, withNamespaces } from 'react-i18next';
</s> add import { withNamespaces } from 'react-i18next'; | [
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
import { Field, reduxForm, formValueSelector } from 'redux-form'; | <mask> import React, { Fragment } from 'react';
<mask> import PropTypes from 'prop-types';
<mask> import { Field, reduxForm } from 'redux-form';
<mask> import { Trans, withNamespaces } from 'react-i18next';
<mask> import flow from 'lodash/flow';
<mask>
<mask> import { renderField, renderSelectField, toNumber, port } from '../../../helpers/form';
<mask> import i18n from '../../../i18n';
</s> Added validation on change and enable encryption checkbox </s> remove import { Trans, withNamespaces } from 'react-i18next';
</s> add import { withNamespaces } from 'react-i18next'; | [
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
import format from 'date-fns/format'; | <mask> import { Field, reduxForm, formValueSelector } from 'redux-form';
<mask> import { Trans, withNamespaces } from 'react-i18next';
<mask> import flow from 'lodash/flow';
<mask>
<mask> import { renderField, renderSelectField, toNumber, port } from '../../../helpers/form';
<mask> import { EMPTY_DATE } from '../../../helpers/constants';
<mask> import i18n from '../../../i18n';
<mask>
<mask> const validate = (values) => {
</s> Added validation on change and enable encryption checkbox </s> remove import { Field, reduxForm } from 'redux-form';
</s> add import { Field, reduxForm, formValueSelector } from 'redux-form'; </s> remove import { Trans, withNamespaces } from 'react-i18next';
</s> add import { withNamespaces } from 'react-i18next'; | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
import { EMPTY_DATE } from '../../../helpers/constants'; | <mask> import format from 'date-fns/format';
<mask>
<mask> import { renderField, renderSelectField, toNumber, port } from '../../../helpers/form';
<mask> import i18n from '../../../i18n';
<mask>
<mask> const validate = (values) => {
<mask> const errors = {};
</s> Added validation on change and enable encryption checkbox </s> remove import { Field, reduxForm } from 'redux-form';
</s> add import { Field, reduxForm, formValueSelector } from 'redux-form'; </s> remove } from '../actions';
</s> add validateTlsConfig,
} from '../actions/encryption'; | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
let Form = (props) => { | <mask>
<mask> return errors;
<mask> };
<mask>
<mask> const Form = (props) => {
<mask> const {
<mask> t,
<mask> handleSubmit,
<mask> reset,
<mask> invalid,
</s> Added validation on change and enable encryption checkbox </s> remove statusCert,
statusKey,
</s> add not_after,
valid_chain,
valid_key,
dns_names,
key_type,
issuer,
subject,
warning_validation, </s> remove
export const getTlsStatusRequest = createAction('GET_TLS_STATUS_REQUEST');
export const getTlsStatusFailure = createAction('GET_TLS_STATUS_FAILURE');
export const getTlsStatusSuccess = createAction('GET_TLS_STATUS_SUCCESS');
export const getTlsStatus = () => async (dispatch) => {
dispatch(getTlsStatusRequest());
try {
const status = await apiClient.getTlsStatus();
status.certificate_chain = atob(status.certificate_chain);
status.private_key = atob(status.private_key);
dispatch(getTlsStatusSuccess(status));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(getTlsStatusFailure());
}
};
export const setTlsConfigRequest = createAction('SET_TLS_CONFIG_REQUEST');
export const setTlsConfigFailure = createAction('SET_TLS_CONFIG_FAILURE');
export const setTlsConfigSuccess = createAction('SET_TLS_CONFIG_SUCCESS');
export const setTlsConfig = config => async (dispatch) => {
dispatch(setTlsConfigRequest());
try {
const values = { ...config };
values.certificate_chain = btoa(values.certificate_chain);
values.private_key = btoa(values.private_key);
values.port_https = values.port_https || 0;
values.port_dns_over_tls = values.port_dns_over_tls || 0;
await apiClient.setTlsConfig(values);
dispatch(setTlsConfigSuccess(config));
dispatch(addSuccessToast('encryption_config_saved'));
dispatch(getTlsStatus());
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(setTlsConfigFailure());
}
};
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
handleChange,
isEnabled,
certificateChain,
privateKey, | <mask> let Form = (props) => {
<mask> const {
<mask> t,
<mask> handleSubmit,
<mask> reset,
<mask> invalid,
<mask> submitting,
<mask> processing,
</s> Added validation on change and enable encryption checkbox </s> remove const Form = (props) => {
</s> add let Form = (props) => { </s> remove statusCert,
statusKey,
</s> add not_after,
valid_chain,
valid_key,
dns_names,
key_type,
issuer,
subject,
warning_validation, </s> remove processing,
processingConfig,
status_cert: statusCert,
status_key: statusKey,
...values
</s> add enabled,
server_name,
force_https,
port_https,
port_dns_over_tls,
certificate_chain,
private_key, </s> remove
export const getTlsStatusRequest = createAction('GET_TLS_STATUS_REQUEST');
export const getTlsStatusFailure = createAction('GET_TLS_STATUS_FAILURE');
export const getTlsStatusSuccess = createAction('GET_TLS_STATUS_SUCCESS');
export const getTlsStatus = () => async (dispatch) => {
dispatch(getTlsStatusRequest());
try {
const status = await apiClient.getTlsStatus();
status.certificate_chain = atob(status.certificate_chain);
status.private_key = atob(status.private_key);
dispatch(getTlsStatusSuccess(status));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(getTlsStatusFailure());
}
};
export const setTlsConfigRequest = createAction('SET_TLS_CONFIG_REQUEST');
export const setTlsConfigFailure = createAction('SET_TLS_CONFIG_FAILURE');
export const setTlsConfigSuccess = createAction('SET_TLS_CONFIG_SUCCESS');
export const setTlsConfig = config => async (dispatch) => {
dispatch(setTlsConfigRequest());
try {
const values = { ...config };
values.certificate_chain = btoa(values.certificate_chain);
values.private_key = btoa(values.private_key);
values.port_https = values.port_https || 0;
values.port_dns_over_tls = values.port_dns_over_tls || 0;
await apiClient.setTlsConfig(values);
dispatch(setTlsConfigSuccess(config));
dispatch(addSuccessToast('encryption_config_saved'));
dispatch(getTlsStatus());
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(setTlsConfigFailure());
}
};
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
not_after,
valid_chain,
valid_key,
dns_names,
key_type,
issuer,
subject,
warning_validation, | <mask> reset,
<mask> invalid,
<mask> submitting,
<mask> processing,
<mask> statusCert,
<mask> statusKey,
<mask> } = props;
<mask>
<mask> return (
<mask> <form onSubmit={handleSubmit}>
<mask> <div className="row">
</s> Added validation on change and enable encryption checkbox </s> remove processing,
processingConfig,
status_cert: statusCert,
status_key: statusKey,
...values
</s> add enabled,
server_name,
force_https,
port_https,
port_dns_over_tls,
certificate_chain,
private_key, </s> remove const Form = (props) => {
</s> add let Form = (props) => { </s> remove const isExpiringCertificate = !encryption.processing && encryption.warning;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
<div className="col-12">
<div className="form__group form__group--settings">
<Field
name="enabled"
type="checkbox"
component={renderSelectField}
placeholder={t('encryption_enable')}
onChange={handleChange}
/>
</div>
<div className="form__desc">
<Trans>encryption_enable_desc</Trans>
</div>
<hr/>
</div> | <mask> return (
<mask> <form onSubmit={handleSubmit}>
<mask> <div className="row">
<mask> <div className="col-12">
<mask> <label className="form__label" htmlFor="server_name">
<mask> <Trans>encryption_server</Trans>
<mask> </label>
<mask> </div>
</s> Added validation on change and enable encryption checkbox </s> remove statusCert,
statusKey,
</s> add not_after,
valid_chain,
valid_key,
dns_names,
key_type,
issuer,
subject,
warning_validation, </s> remove {/* <div>
<Trans values={{ domains: '*.example.org, example.org' }}>
encryption_certificates_for
</Trans>
</div>
<div>
<Trans values={{ date: '2022-01-01' }}>
encryption_expire
</Trans>
</div> */}
</s> add </s> remove processing,
processingConfig,
status_cert: statusCert,
status_key: statusKey,
...values
</s> add enabled,
server_name,
force_https,
port_https,
port_dns_over_tls,
certificate_chain,
private_key, </s> remove const isExpiringCertificate = !encryption.processing && encryption.warning;
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
onChange={handleChange}
disabled={!isEnabled} | <mask> className="form-control"
<mask> placeholder={t('encryption_server_enter')}
<mask> />
<mask> <div className="form__desc">
<mask> <Trans>encryption_server_desc</Trans>
<mask> </div>
</s> Added validation on change and enable encryption checkbox </s> remove isMenuOpen={this.state.isMenuOpen}
</s> add isMenuOpen={isMenuOpen} | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
onChange={handleChange}
disabled={!isEnabled} | <mask> component={renderSelectField}
<mask> placeholder={t('encryption_redirect')}
<mask> />
<mask> <div className="form__desc">
<mask> <Trans>encryption_redirect_desc</Trans>
<mask> </div>
<mask> </div>
</s> Added validation on change and enable encryption checkbox </s> remove isMenuOpen={this.state.isMenuOpen}
</s> add isMenuOpen={isMenuOpen} | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
onChange={handleChange}
disabled={!isEnabled} | <mask> className="form-control"
<mask> placeholder={t('encryption_https')}
<mask> validate={[port]}
<mask> normalize={toNumber}
<mask> />
<mask> <div className="form__desc">
<mask> <Trans>encryption_https_desc</Trans>
<mask> </div>
</s> Added validation on change and enable encryption checkbox </s> remove isMenuOpen={this.state.isMenuOpen}
</s> add isMenuOpen={isMenuOpen} | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
onChange={handleChange}
disabled={!isEnabled} | <mask> validate={[port]}
<mask> normalize={toNumber}
<mask> />
<mask> <div className="form__desc">
<mask> <Trans>encryption_dot_desc</Trans>
<mask> </div>
</s> Added validation on change and enable encryption checkbox </s> remove isMenuOpen={this.state.isMenuOpen}
</s> add isMenuOpen={isMenuOpen} | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
onChange={handleChange}
disabled={!isEnabled} | <mask> type="text"
<mask> className="form-control form-control--textarea"
<mask> placeholder={t('encryption_certificates_input')}
<mask> />
<mask> <div className="form__status">
<mask> {certificateChain &&
<mask> <Fragment>
<mask> <div className="form__label form__label--bold">
<mask> <Trans>encryption_status</Trans>:
</s> Added validation on change and enable encryption checkbox </s> remove {statusCert &&
</s> add {certificateChain && </s> remove {statusKey &&
</s> add {privateKey && </s> remove <div>
{statusCert}
</div>
</s> add <ul>
<li className={valid_chain ? 'text-success' : 'text-danger'}>
{valid_chain ?
<Trans>encryption_chain_valid</Trans>
: <Trans>encryption_chain_invalid</Trans>
}
</li>
{subject &&
<li><Trans>encryption_subject</Trans>: {subject}</li>
}
{issuer &&
<li><Trans>encryption_issuer</Trans>: {issuer}</li>
}
{not_after && not_after !== EMPTY_DATE &&
<li>
<Trans>encryption_expire</Trans>:
{format(not_after, 'YYYY-MM-DD HH:mm:ss')}
</li>
}
{dns_names &&
<li>
<Trans>encryption_hostnames</Trans>: {dns_names}
</li>
}
</ul> </s> remove <div>
{statusKey}
</div>
</s> add <p className={valid_key ? 'text-success' : 'text-danger'}>
{valid_key ?
<Trans values={{ type: key_type }}>
encryption_key_valid
</Trans>
: <Trans values={{ type: key_type }}>
encryption_key_invalid
</Trans>
}
</p> | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
{certificateChain && | <mask> className="form-control form-control--textarea"
<mask> placeholder={t('encryption_certificates_input')}
<mask> />
<mask> <div className="form__status">
<mask> {statusCert &&
<mask> <Fragment>
<mask> <div className="form__label form__label--bold">
<mask> <Trans>encryption_status</Trans>:
<mask> </div>
<mask> <div>
</s> Added validation on change and enable encryption checkbox </s> remove {statusKey &&
</s> add {privateKey && </s> remove <div>
{statusCert}
</div>
</s> add <ul>
<li className={valid_chain ? 'text-success' : 'text-danger'}>
{valid_chain ?
<Trans>encryption_chain_valid</Trans>
: <Trans>encryption_chain_invalid</Trans>
}
</li>
{subject &&
<li><Trans>encryption_subject</Trans>: {subject}</li>
}
{issuer &&
<li><Trans>encryption_issuer</Trans>: {issuer}</li>
}
{not_after && not_after !== EMPTY_DATE &&
<li>
<Trans>encryption_expire</Trans>:
{format(not_after, 'YYYY-MM-DD HH:mm:ss')}
</li>
}
{dns_names &&
<li>
<Trans>encryption_hostnames</Trans>: {dns_names}
</li>
}
</ul> </s> remove <div>
{statusKey}
</div>
</s> add <p className={valid_key ? 'text-success' : 'text-danger'}>
{valid_key ?
<Trans values={{ type: key_type }}>
encryption_key_valid
</Trans>
: <Trans values={{ type: key_type }}>
encryption_key_invalid
</Trans>
}
</p> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
<ul>
<li className={valid_chain ? 'text-success' : 'text-danger'}>
{valid_chain ?
<Trans>encryption_chain_valid</Trans>
: <Trans>encryption_chain_invalid</Trans>
}
</li>
{subject &&
<li><Trans>encryption_subject</Trans>: {subject}</li>
}
{issuer &&
<li><Trans>encryption_issuer</Trans>: {issuer}</li>
}
{not_after && not_after !== EMPTY_DATE &&
<li>
<Trans>encryption_expire</Trans>:
{format(not_after, 'YYYY-MM-DD HH:mm:ss')}
</li>
}
{dns_names &&
<li>
<Trans>encryption_hostnames</Trans>: {dns_names}
</li>
}
</ul> | <mask> <Fragment>
<mask> <div className="form__label form__label--bold">
<mask> <Trans>encryption_status</Trans>:
<mask> </div>
<mask> <div>
<mask> {statusCert}
<mask> </div>
<mask> </Fragment>
<mask> }
<mask> {/* <div>
<mask> <Trans values={{ domains: '*.example.org, example.org' }}>
<mask> encryption_certificates_for
</s> Added validation on change and enable encryption checkbox </s> remove {/* <div>
<Trans values={{ domains: '*.example.org, example.org' }}>
encryption_certificates_for
</Trans>
</div>
<div>
<Trans values={{ date: '2022-01-01' }}>
encryption_expire
</Trans>
</div> */}
</s> add </s> remove <div>
{statusKey}
</div>
</s> add <p className={valid_key ? 'text-success' : 'text-danger'}>
{valid_key ?
<Trans values={{ type: key_type }}>
encryption_key_valid
</Trans>
: <Trans values={{ type: key_type }}>
encryption_key_invalid
</Trans>
}
</p> </s> remove {statusCert &&
</s> add {certificateChain && </s> remove {statusKey &&
</s> add {privateKey && | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
<mask> {statusCert}
<mask> </div>
<mask> </Fragment>
<mask> }
<mask> {/* <div>
<mask> <Trans values={{ domains: '*.example.org, example.org' }}>
<mask> encryption_certificates_for
<mask> </Trans>
<mask> </div>
<mask> <div>
<mask> <Trans values={{ date: '2022-01-01' }}>
<mask> encryption_expire
<mask> </Trans>
<mask> </div> */}
<mask> </div>
<mask> </div>
<mask> </div>
<mask> </div>
<mask> <div className="row">
</s> Added validation on change and enable encryption checkbox </s> remove <div>
{statusKey}
</div>
</s> add <p className={valid_key ? 'text-success' : 'text-danger'}>
{valid_key ?
<Trans values={{ type: key_type }}>
encryption_key_valid
</Trans>
: <Trans values={{ type: key_type }}>
encryption_key_invalid
</Trans>
}
</p> </s> remove <div>
{statusCert}
</div>
</s> add <ul>
<li className={valid_chain ? 'text-success' : 'text-danger'}>
{valid_chain ?
<Trans>encryption_chain_valid</Trans>
: <Trans>encryption_chain_invalid</Trans>
}
</li>
{subject &&
<li><Trans>encryption_subject</Trans>: {subject}</li>
}
{issuer &&
<li><Trans>encryption_issuer</Trans>: {issuer}</li>
}
{not_after && not_after !== EMPTY_DATE &&
<li>
<Trans>encryption_expire</Trans>:
{format(not_after, 'YYYY-MM-DD HH:mm:ss')}
</li>
}
{dns_names &&
<li>
<Trans>encryption_hostnames</Trans>: {dns_names}
</li>
}
</ul> </s> remove {statusCert &&
</s> add {certificateChain && | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
|
onChange={handleChange}
disabled={!isEnabled} | <mask> type="text"
<mask> className="form-control form-control--textarea"
<mask> placeholder="Copy/paste your PEM-encoded private key for your cerficate here."
<mask> />
<mask> <div className="form__status">
<mask> {privateKey &&
<mask> <Fragment>
</s> Added validation on change and enable encryption checkbox </s> remove {statusKey &&
</s> add {privateKey && </s> remove {statusCert &&
</s> add {certificateChain && </s> remove "encryption_certificates_for": "Certificates for {{domains}}",
"encryption_expire": "Expire on {{date}}",
</s> add "encryption_expire": "Expires", | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
{privateKey && | <mask> className="form-control form-control--textarea"
<mask> placeholder="Copy/paste your PEM-encoded private key for your cerficate here."
<mask> />
<mask> <div className="form__status">
<mask> {statusKey &&
<mask> <Fragment>
<mask> <div className="form__label form__label--bold">
<mask> <Trans>encryption_status</Trans>:
<mask> </div>
<mask> <div>
</s> Added validation on change and enable encryption checkbox </s> remove {statusCert &&
</s> add {certificateChain && </s> remove "encryption_certificates_for": "Certificates for {{domains}}",
"encryption_expire": "Expire on {{date}}",
</s> add "encryption_expire": "Expires", </s> remove <div>
{statusCert}
</div>
</s> add <ul>
<li className={valid_chain ? 'text-success' : 'text-danger'}>
{valid_chain ?
<Trans>encryption_chain_valid</Trans>
: <Trans>encryption_chain_invalid</Trans>
}
</li>
{subject &&
<li><Trans>encryption_subject</Trans>: {subject}</li>
}
{issuer &&
<li><Trans>encryption_issuer</Trans>: {issuer}</li>
}
{not_after && not_after !== EMPTY_DATE &&
<li>
<Trans>encryption_expire</Trans>:
{format(not_after, 'YYYY-MM-DD HH:mm:ss')}
</li>
}
{dns_names &&
<li>
<Trans>encryption_hostnames</Trans>: {dns_names}
</li>
}
</ul> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
<p className={valid_key ? 'text-success' : 'text-danger'}>
{valid_key ?
<Trans values={{ type: key_type }}>
encryption_key_valid
</Trans>
: <Trans values={{ type: key_type }}>
encryption_key_invalid
</Trans>
}
</p> | <mask> <Fragment>
<mask> <div className="form__label form__label--bold">
<mask> <Trans>encryption_status</Trans>:
<mask> </div>
<mask> <div>
<mask> {statusKey}
<mask> </div>
<mask> </Fragment>
<mask> }
<mask> </div>
<mask> </div>
<mask> </div>
</s> Added validation on change and enable encryption checkbox </s> remove {statusCert &&
</s> add {certificateChain && </s> remove {statusKey &&
</s> add {privateKey && </s> remove {/* <div>
<Trans values={{ domains: '*.example.org, example.org' }}>
encryption_certificates_for
</Trans>
</div>
<div>
<Trans values={{ date: '2022-01-01' }}>
encryption_expire
</Trans>
</div> */}
</s> add </s> remove <div>
{statusCert}
</div>
</s> add <ul>
<li className={valid_chain ? 'text-success' : 'text-danger'}>
{valid_chain ?
<Trans>encryption_chain_valid</Trans>
: <Trans>encryption_chain_invalid</Trans>
}
</li>
{subject &&
<li><Trans>encryption_subject</Trans>: {subject}</li>
}
{issuer &&
<li><Trans>encryption_issuer</Trans>: {issuer}</li>
}
{not_after && not_after !== EMPTY_DATE &&
<li>
<Trans>encryption_expire</Trans>:
{format(not_after, 'YYYY-MM-DD HH:mm:ss')}
</li>
}
{dns_names &&
<li>
<Trans>encryption_hostnames</Trans>: {dns_names}
</li>
}
</ul> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
<div className="col-12">
<p className="text-danger">
{warning_validation && warning_validation}
</p>
</div> | <mask> </div>
<mask> </div>
<mask> </div>
<mask> </div>
<mask>
<mask> <div className="btn-list mt-2">
<mask> <button
</s> Added validation on change and enable encryption checkbox </s> remove <div className="btn-list">
</s> add <div className="btn-list mt-2"> </s> remove {/* <div>
<Trans values={{ domains: '*.example.org, example.org' }}>
encryption_certificates_for
</Trans>
</div>
<div>
<Trans values={{ date: '2022-01-01' }}>
encryption_expire
</Trans>
</div> */}
</s> add </s> remove <div>
{statusKey}
</div>
</s> add <p className={valid_key ? 'text-success' : 'text-danger'}>
{valid_key ?
<Trans values={{ type: key_type }}>
encryption_key_valid
</Trans>
: <Trans values={{ type: key_type }}>
encryption_key_invalid
</Trans>
}
</p> | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
<div className="btn-list mt-2"> | <mask> </div>
<mask> </div>
<mask> </div>
<mask>
<mask> <div className="btn-list">
<mask> <button
<mask> type="submit"
<mask> className="btn btn-success btn-standart"
<mask> disabled={invalid || submitting || processing}
<mask> >
</s> Added validation on change and enable encryption checkbox </s> remove disabled={invalid || submitting || processing}
</s> add disabled={
invalid
|| submitting
|| processing
|| !valid_chain
|| !valid_key
|| warning_validation
} </s> remove type="submit"
</s> add type="button" </s> remove statusCert={statusCert}
statusKey={statusKey}
</s> add </s> remove {/* <div>
<Trans values={{ domains: '*.example.org, example.org' }}>
encryption_certificates_for
</Trans>
</div>
<div>
<Trans values={{ date: '2022-01-01' }}>
encryption_expire
</Trans>
</div> */}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
disabled={
invalid
|| submitting
|| processing
|| !valid_chain
|| !valid_key
|| warning_validation
} | <mask> <div className="btn-list">
<mask> <button
<mask> type="submit"
<mask> className="btn btn-success btn-standart"
<mask> disabled={invalid || submitting || processing}
<mask> >
<mask> <Trans>save_config</Trans>
<mask> </button>
<mask> <button
<mask> type="submit"
</s> Added validation on change and enable encryption checkbox </s> remove <div className="btn-list">
</s> add <div className="btn-list mt-2"> </s> remove type="submit"
</s> add type="button" </s> remove
export const getTlsStatusRequest = createAction('GET_TLS_STATUS_REQUEST');
export const getTlsStatusFailure = createAction('GET_TLS_STATUS_FAILURE');
export const getTlsStatusSuccess = createAction('GET_TLS_STATUS_SUCCESS');
export const getTlsStatus = () => async (dispatch) => {
dispatch(getTlsStatusRequest());
try {
const status = await apiClient.getTlsStatus();
status.certificate_chain = atob(status.certificate_chain);
status.private_key = atob(status.private_key);
dispatch(getTlsStatusSuccess(status));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(getTlsStatusFailure());
}
};
export const setTlsConfigRequest = createAction('SET_TLS_CONFIG_REQUEST');
export const setTlsConfigFailure = createAction('SET_TLS_CONFIG_FAILURE');
export const setTlsConfigSuccess = createAction('SET_TLS_CONFIG_SUCCESS');
export const setTlsConfig = config => async (dispatch) => {
dispatch(setTlsConfigRequest());
try {
const values = { ...config };
values.certificate_chain = btoa(values.certificate_chain);
values.private_key = btoa(values.private_key);
values.port_https = values.port_https || 0;
values.port_dns_over_tls = values.port_dns_over_tls || 0;
await apiClient.setTlsConfig(values);
dispatch(setTlsConfigSuccess(config));
dispatch(addSuccessToast('encryption_config_saved'));
dispatch(getTlsStatus());
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(setTlsConfigFailure());
}
};
</s> add </s> remove statusCert={statusCert}
statusKey={statusKey}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
type="button" | <mask> >
<mask> <Trans>save_config</Trans>
<mask> </button>
<mask> <button
<mask> type="submit"
<mask> className="btn btn-secondary btn-standart"
<mask> disabled={submitting || processing}
<mask> onClick={reset}
<mask> >
<mask> <Trans>reset_settings</Trans>
</s> Added validation on change and enable encryption checkbox </s> remove disabled={invalid || submitting || processing}
</s> add disabled={
invalid
|| submitting
|| processing
|| !valid_chain
|| !valid_key
|| warning_validation
} </s> remove <div className="btn-list">
</s> add <div className="btn-list mt-2"> </s> remove statusCert={statusCert}
statusKey={statusKey}
</s> add </s> remove initialValues={{ ...values }}
</s> add initialValues={{
enabled,
server_name,
force_https,
port_https,
port_dns_over_tls,
certificate_chain,
private_key,
}} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
handleChange: PropTypes.func,
isEnabled: PropTypes.bool.isRequired,
certificateChain: PropTypes.string.isRequired,
privateKey: PropTypes.string.isRequired, | <mask> Form.propTypes = {
<mask> handleSubmit: PropTypes.func.isRequired,
<mask> reset: PropTypes.func.isRequired,
<mask> submitting: PropTypes.bool.isRequired,
<mask> invalid: PropTypes.bool.isRequired,
<mask> initialValues: PropTypes.object.isRequired,
<mask> processing: PropTypes.bool.isRequired,
</s> Added validation on change and enable encryption checkbox </s> remove statusCert: PropTypes.string,
statusKey: PropTypes.string,
</s> add status_key: PropTypes.string,
not_after: PropTypes.string,
warning_validation: PropTypes.string,
valid_chain: PropTypes.bool,
valid_key: PropTypes.bool,
dns_names: PropTypes.string,
key_type: PropTypes.string,
issuer: PropTypes.string,
subject: PropTypes.string, </s> remove const encryption = handleActions({
[actions.getTlsStatusRequest]: state => ({ ...state, processing: true }),
[actions.getTlsStatusFailure]: state => ({ ...state, processing: false }),
[actions.getTlsStatusSuccess]: (state, { payload }) => {
const newState = {
...state,
...payload,
processing: false,
};
return newState;
},
[actions.setTlsConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setTlsConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setTlsConfigSuccess]: (state, { payload }) => {
const newState = {
...state,
...payload,
processingConfig: false,
};
return newState;
},
}, {
processing: true,
processingConfig: false,
status_cert: '',
status_key: '',
certificate_chain: '',
private_key: '',
server_name: '',
});
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
status_key: PropTypes.string,
not_after: PropTypes.string,
warning_validation: PropTypes.string,
valid_chain: PropTypes.bool,
valid_key: PropTypes.bool,
dns_names: PropTypes.string,
key_type: PropTypes.string,
issuer: PropTypes.string,
subject: PropTypes.string, | <mask> submitting: PropTypes.bool.isRequired,
<mask> invalid: PropTypes.bool.isRequired,
<mask> initialValues: PropTypes.object.isRequired,
<mask> processing: PropTypes.bool.isRequired,
<mask> statusCert: PropTypes.string,
<mask> statusKey: PropTypes.string,
<mask> t: PropTypes.func.isRequired,
<mask> };
<mask>
<mask> export default flow([
<mask> withNamespaces(),
</s> Added validation on change and enable encryption checkbox </s> remove const encryption = handleActions({
[actions.getTlsStatusRequest]: state => ({ ...state, processing: true }),
[actions.getTlsStatusFailure]: state => ({ ...state, processing: false }),
[actions.getTlsStatusSuccess]: (state, { payload }) => {
const newState = {
...state,
...payload,
processing: false,
};
return newState;
},
[actions.setTlsConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setTlsConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setTlsConfigSuccess]: (state, { payload }) => {
const newState = {
...state,
...payload,
processingConfig: false,
};
return newState;
},
}, {
processing: true,
processingConfig: false,
status_cert: '',
status_key: '',
certificate_chain: '',
private_key: '',
server_name: '',
});
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
const selector = formValueSelector('encryptionForm');
Form = connect((state) => {
const isEnabled = selector(state, 'enabled');
const certificateChain = selector(state, 'certificate_chain');
const privateKey = selector(state, 'private_key');
return {
isEnabled,
certificateChain,
privateKey,
};
})(Form);
| <mask> subject: PropTypes.string,
<mask> t: PropTypes.func.isRequired,
<mask> };
<mask>
<mask> export default flow([
<mask> withNamespaces(),
<mask> reduxForm({
<mask> form: 'encryptionForm',
</s> Added validation on change and enable encryption checkbox </s> remove statusCert: PropTypes.string,
statusKey: PropTypes.string,
</s> add status_key: PropTypes.string,
not_after: PropTypes.string,
warning_validation: PropTypes.string,
valid_chain: PropTypes.bool,
valid_key: PropTypes.bool,
dns_names: PropTypes.string,
key_type: PropTypes.string,
issuer: PropTypes.string,
subject: PropTypes.string, </s> remove
export const getTlsStatusRequest = createAction('GET_TLS_STATUS_REQUEST');
export const getTlsStatusFailure = createAction('GET_TLS_STATUS_FAILURE');
export const getTlsStatusSuccess = createAction('GET_TLS_STATUS_SUCCESS');
export const getTlsStatus = () => async (dispatch) => {
dispatch(getTlsStatusRequest());
try {
const status = await apiClient.getTlsStatus();
status.certificate_chain = atob(status.certificate_chain);
status.private_key = atob(status.private_key);
dispatch(getTlsStatusSuccess(status));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(getTlsStatusFailure());
}
};
export const setTlsConfigRequest = createAction('SET_TLS_CONFIG_REQUEST');
export const setTlsConfigFailure = createAction('SET_TLS_CONFIG_FAILURE');
export const setTlsConfigSuccess = createAction('SET_TLS_CONFIG_SUCCESS');
export const setTlsConfig = config => async (dispatch) => {
dispatch(setTlsConfigRequest());
try {
const values = { ...config };
values.certificate_chain = btoa(values.certificate_chain);
values.private_key = btoa(values.private_key);
values.port_https = values.port_https || 0;
values.port_dns_over_tls = values.port_dns_over_tls || 0;
await apiClient.setTlsConfig(values);
dispatch(setTlsConfigSuccess(config));
dispatch(addSuccessToast('encryption_config_saved'));
dispatch(getTlsStatus());
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(setTlsConfigFailure());
}
};
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/Form.js |
import debounce from 'lodash/debounce'; | <mask> import React, { Component } from 'react';
<mask> import PropTypes from 'prop-types';
<mask> import { withNamespaces } from 'react-i18next';
<mask>
<mask> import Form from './Form';
<mask> import Card from '../../ui/Card';
<mask>
</s> Added validation on change and enable encryption checkbox </s> remove import { Trans, withNamespaces } from 'react-i18next';
</s> add import { withNamespaces } from 'react-i18next'; </s> remove import { Field, reduxForm } from 'redux-form';
</s> add import { Field, reduxForm, formValueSelector } from 'redux-form'; | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/index.js |
handleFormChange = debounce((values) => {
this.props.validateTlsConfig(values);
}, 300);
| <mask> };
<mask>
<mask> render() {
<mask> const { encryption, t } = this.props;
<mask> const {
<mask> enabled,
</s> Added validation on change and enable encryption checkbox </s> remove processing,
processingConfig,
status_cert: statusCert,
status_key: statusKey,
...values
</s> add enabled,
server_name,
force_https,
port_https,
port_dns_over_tls,
certificate_chain,
private_key, </s> remove
export const getTlsStatusRequest = createAction('GET_TLS_STATUS_REQUEST');
export const getTlsStatusFailure = createAction('GET_TLS_STATUS_FAILURE');
export const getTlsStatusSuccess = createAction('GET_TLS_STATUS_SUCCESS');
export const getTlsStatus = () => async (dispatch) => {
dispatch(getTlsStatusRequest());
try {
const status = await apiClient.getTlsStatus();
status.certificate_chain = atob(status.certificate_chain);
status.private_key = atob(status.private_key);
dispatch(getTlsStatusSuccess(status));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(getTlsStatusFailure());
}
};
export const setTlsConfigRequest = createAction('SET_TLS_CONFIG_REQUEST');
export const setTlsConfigFailure = createAction('SET_TLS_CONFIG_FAILURE');
export const setTlsConfigSuccess = createAction('SET_TLS_CONFIG_SUCCESS');
export const setTlsConfig = config => async (dispatch) => {
dispatch(setTlsConfigRequest());
try {
const values = { ...config };
values.certificate_chain = btoa(values.certificate_chain);
values.private_key = btoa(values.private_key);
values.port_https = values.port_https || 0;
values.port_dns_over_tls = values.port_dns_over_tls || 0;
await apiClient.setTlsConfig(values);
dispatch(setTlsConfigSuccess(config));
dispatch(addSuccessToast('encryption_config_saved'));
dispatch(getTlsStatus());
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(setTlsConfigFailure());
}
};
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/index.js |
enabled,
server_name,
force_https,
port_https,
port_dns_over_tls,
certificate_chain,
private_key, | <mask>
<mask> render() {
<mask> const { encryption, t } = this.props;
<mask> const {
<mask> processing,
<mask> processingConfig,
<mask> status_cert: statusCert,
<mask> status_key: statusKey,
<mask> ...values
<mask> } = encryption;
<mask>
<mask> return (
<mask> <div className="encryption">
<mask> {encryption &&
</s> Added validation on change and enable encryption checkbox </s> remove statusCert,
statusKey,
</s> add not_after,
valid_chain,
valid_key,
dns_names,
key_type,
issuer,
subject,
warning_validation, </s> remove const isExpiringCertificate = !encryption.processing && encryption.warning;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/index.js |
initialValues={{
enabled,
server_name,
force_https,
port_https,
port_dns_over_tls,
certificate_chain,
private_key,
}} | <mask> subtitle={t('encryption_desc')}
<mask> bodyType="card-body box-body--settings"
<mask> >
<mask> <Form
<mask> initialValues={{ ...values }}
<mask> processing={encryption.processingConfig}
<mask> statusCert={statusCert}
<mask> statusKey={statusKey}
<mask> onSubmit={this.handleFormSubmit}
<mask> />
</s> Added validation on change and enable encryption checkbox </s> remove statusCert={statusCert}
statusKey={statusKey}
</s> add </s> remove type="submit"
</s> add type="button" </s> remove <div className="btn-list">
</s> add <div className="btn-list mt-2"> </s> remove processing,
processingConfig,
status_cert: statusCert,
status_key: statusKey,
...values
</s> add enabled,
server_name,
force_https,
port_https,
port_dns_over_tls,
certificate_chain,
private_key, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/index.js |
<mask> >
<mask> <Form
<mask> initialValues={{ ...values }}
<mask> processing={encryption.processingConfig}
<mask> statusCert={statusCert}
<mask> statusKey={statusKey}
<mask> onSubmit={this.handleFormSubmit}
<mask> />
<mask> </Card>
<mask> }
<mask> </div>
</s> Added validation on change and enable encryption checkbox </s> remove initialValues={{ ...values }}
</s> add initialValues={{
enabled,
server_name,
force_https,
port_https,
port_dns_over_tls,
certificate_chain,
private_key,
}} </s> remove <div className="btn-list">
</s> add <div className="btn-list mt-2"> </s> remove type="submit"
</s> add type="button" </s> remove processing,
processingConfig,
status_cert: statusCert,
status_key: statusKey,
...values
</s> add enabled,
server_name,
force_https,
port_https,
port_dns_over_tls,
certificate_chain,
private_key, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/index.js |
|
onChange={this.handleFormChange}
{...this.props.encryption} | <mask> processing={encryption.processingConfig}
<mask> onSubmit={this.handleFormSubmit}
<mask> />
<mask> </Card>
<mask> }
<mask> </div>
</s> Added validation on change and enable encryption checkbox </s> remove statusCert={statusCert}
statusKey={statusKey}
</s> add </s> remove initialValues={{ ...values }}
</s> add initialValues={{
enabled,
server_name,
force_https,
port_https,
port_dns_over_tls,
certificate_chain,
private_key,
}} </s> remove isMenuOpen={this.state.isMenuOpen}
</s> add isMenuOpen={isMenuOpen} | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/index.js |
validateTlsConfig: PropTypes.func.isRequired, | <mask> Encryption.propTypes = {
<mask> setTlsConfig: PropTypes.func.isRequired,
<mask> encryption: PropTypes.object.isRequired,
<mask> t: PropTypes.func.isRequired,
<mask> };
<mask>
<mask> export default withNamespaces()(Encryption);
</s> Added validation on change and enable encryption checkbox </s> remove statusCert: PropTypes.string,
statusKey: PropTypes.string,
</s> add status_key: PropTypes.string,
not_after: PropTypes.string,
warning_validation: PropTypes.string,
valid_chain: PropTypes.bool,
valid_key: PropTypes.bool,
dns_names: PropTypes.string,
key_type: PropTypes.string,
issuer: PropTypes.string,
subject: PropTypes.string, | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/Encryption/index.js |
validateTlsConfig={this.props.validateTlsConfig} | <mask> encryption={this.props.encryption}
<mask> setTlsConfig={this.props.setTlsConfig}
<mask> />
<mask> <Dhcp
<mask> dhcp={this.props.dhcp}
<mask> toggleDhcp={this.props.toggleDhcp}
<mask> getDhcpStatus={this.props.getDhcpStatus}
<mask> findActiveDhcp={this.props.findActiveDhcp}
</s> Added validation on change and enable encryption checkbox </s> remove {isExpiringCertificate &&
<Topline type="warning">
<Trans components={[<a href="#settings" key="0">link</a>]}>
topline_expiring_certificate
</Trans>
</Topline>
</s> add {!encryption.processing &&
<EncryptionTopline notAfter={encryption.not_after} /> | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/components/Settings/index.js |
} from '../actions';
import { | <mask> getDhcpInterfaces,
<mask> setDhcpConfig,
<mask> findActiveDhcp,
<mask> getTlsStatus,
<mask> setTlsConfig,
<mask> validateTlsConfig,
<mask> } from '../actions/encryption';
</s> Added validation on change and enable encryption checkbox </s> remove } from '../actions';
</s> add validateTlsConfig,
} from '../actions/encryption'; </s> remove import { Field, reduxForm } from 'redux-form';
</s> add import { Field, reduxForm, formValueSelector } from 'redux-form'; | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/containers/Settings.js |
validateTlsConfig,
} from '../actions/encryption'; | <mask> setDhcpConfig,
<mask> findActiveDhcp,
<mask> getTlsStatus,
<mask> setTlsConfig,
<mask> } from '../actions';
<mask> import Settings from '../components/Settings';
<mask>
<mask> const mapStateToProps = (state) => {
<mask> const {
<mask> settings,
</s> Added validation on change and enable encryption checkbox | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/containers/Settings.js |
validateTlsConfig, | <mask> setDhcpConfig,
<mask> findActiveDhcp,
<mask> getTlsStatus,
<mask> setTlsConfig,
<mask> };
<mask>
<mask> export default connect(
<mask> mapStateToProps,
<mask> mapDispatchToProps,
</s> Added validation on change and enable encryption checkbox </s> remove } from '../actions';
</s> add validateTlsConfig,
} from '../actions/encryption'; | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/containers/Settings.js |
export const EMPTY_DATE = '0001-01-01T00:00:00Z'; | <mask> };
<mask>
<mask> export const STANDARD_DNS_PORT = 53;
<mask> export const STANDARD_WEB_PORT = 80;
</s> Added validation on change and enable encryption checkbox </s> remove
export const getTlsStatusRequest = createAction('GET_TLS_STATUS_REQUEST');
export const getTlsStatusFailure = createAction('GET_TLS_STATUS_FAILURE');
export const getTlsStatusSuccess = createAction('GET_TLS_STATUS_SUCCESS');
export const getTlsStatus = () => async (dispatch) => {
dispatch(getTlsStatusRequest());
try {
const status = await apiClient.getTlsStatus();
status.certificate_chain = atob(status.certificate_chain);
status.private_key = atob(status.private_key);
dispatch(getTlsStatusSuccess(status));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(getTlsStatusFailure());
}
};
export const setTlsConfigRequest = createAction('SET_TLS_CONFIG_REQUEST');
export const setTlsConfigFailure = createAction('SET_TLS_CONFIG_FAILURE');
export const setTlsConfigSuccess = createAction('SET_TLS_CONFIG_SUCCESS');
export const setTlsConfig = config => async (dispatch) => {
dispatch(setTlsConfigRequest());
try {
const values = { ...config };
values.certificate_chain = btoa(values.certificate_chain);
values.private_key = btoa(values.private_key);
values.port_https = values.port_https || 0;
values.port_dns_over_tls = values.port_dns_over_tls || 0;
await apiClient.setTlsConfig(values);
dispatch(setTlsConfigSuccess(config));
dispatch(addSuccessToast('encryption_config_saved'));
dispatch(getTlsStatus());
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(setTlsConfigFailure());
}
};
</s> add </s> remove const encryption = handleActions({
[actions.getTlsStatusRequest]: state => ({ ...state, processing: true }),
[actions.getTlsStatusFailure]: state => ({ ...state, processing: false }),
[actions.getTlsStatusSuccess]: (state, { payload }) => {
const newState = {
...state,
...payload,
processing: false,
};
return newState;
},
[actions.setTlsConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setTlsConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setTlsConfigSuccess]: (state, { payload }) => {
const newState = {
...state,
...payload,
processingConfig: false,
};
return newState;
},
}, {
processing: true,
processingConfig: false,
status_cert: '',
status_key: '',
certificate_chain: '',
private_key: '',
server_name: '',
});
</s> add | [
"keep",
"keep",
"keep",
"add"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/helpers/constants.js |
import encryption from './encryption'; | <mask> import * as actions from '../actions';
<mask> import toasts from './toasts';
<mask>
<mask> const settings = handleActions({
<mask> [actions.initSettingsRequest]: state => ({ ...state, processing: true }),
<mask> [actions.initSettingsFailure]: state => ({ ...state, processing: false }),
<mask> [actions.initSettingsSuccess]: (state, { payload }) => {
</s> Added validation on change and enable encryption checkbox </s> remove const encryption = handleActions({
[actions.getTlsStatusRequest]: state => ({ ...state, processing: true }),
[actions.getTlsStatusFailure]: state => ({ ...state, processing: false }),
[actions.getTlsStatusSuccess]: (state, { payload }) => {
const newState = {
...state,
...payload,
processing: false,
};
return newState;
},
[actions.setTlsConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setTlsConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setTlsConfigSuccess]: (state, { payload }) => {
const newState = {
...state,
...payload,
processingConfig: false,
};
return newState;
},
}, {
processing: true,
processingConfig: false,
status_cert: '',
status_key: '',
certificate_chain: '',
private_key: '',
server_name: '',
});
</s> add </s> remove isDropdownOpen: false,
</s> add </s> remove } from '../actions';
</s> add validateTlsConfig,
} from '../actions/encryption'; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/reducers/index.js |
<mask> active: null,
<mask> leases: [],
<mask> });
<mask>
<mask> const encryption = handleActions({
<mask> [actions.getTlsStatusRequest]: state => ({ ...state, processing: true }),
<mask> [actions.getTlsStatusFailure]: state => ({ ...state, processing: false }),
<mask> [actions.getTlsStatusSuccess]: (state, { payload }) => {
<mask> const newState = {
<mask> ...state,
<mask> ...payload,
<mask> processing: false,
<mask> };
<mask> return newState;
<mask> },
<mask>
<mask> [actions.setTlsConfigRequest]: state => ({ ...state, processingConfig: true }),
<mask> [actions.setTlsConfigFailure]: state => ({ ...state, processingConfig: false }),
<mask> [actions.setTlsConfigSuccess]: (state, { payload }) => {
<mask> const newState = {
<mask> ...state,
<mask> ...payload,
<mask> processingConfig: false,
<mask> };
<mask> return newState;
<mask> },
<mask> }, {
<mask> processing: true,
<mask> processingConfig: false,
<mask> status_cert: '',
<mask> status_key: '',
<mask> certificate_chain: '',
<mask> private_key: '',
<mask> server_name: '',
<mask> });
<mask>
<mask> export default combineReducers({
<mask> settings,
<mask> dashboard,
<mask> queryLogs,
<mask> filtering,
</s> Added validation on change and enable encryption checkbox </s> remove isDropdownOpen: false,
</s> add </s> remove const Form = (props) => {
</s> add let Form = (props) => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | client/src/reducers/index.js |
|
Enabled bool `yaml:"enabled" json:"enabled"` | <mask>
<mask> var defaultDNS = []string{"tls://1.1.1.1", "tls://1.0.0.1"}
<mask>
<mask> type tlsConfigSettings struct {
<mask> Enabled bool `yaml:"enaled" json:"enabled"`
<mask> ServerName string `yaml:"server_name" json:"server_name,omitempty"`
<mask> ForceHTTPS bool `yaml:"force_https" json:"force_https,omitempty"`
<mask> PortHTTPS int `yaml:"port_https" json:"port_https,omitempty"`
<mask> PortDNSOverTLS int `yaml:"port_dns_over_tls" json:"port_dns_over_tls,omitempty"`
<mask>
</s> Added validation on change and enable encryption checkbox </s> remove
export const getTlsStatusRequest = createAction('GET_TLS_STATUS_REQUEST');
export const getTlsStatusFailure = createAction('GET_TLS_STATUS_FAILURE');
export const getTlsStatusSuccess = createAction('GET_TLS_STATUS_SUCCESS');
export const getTlsStatus = () => async (dispatch) => {
dispatch(getTlsStatusRequest());
try {
const status = await apiClient.getTlsStatus();
status.certificate_chain = atob(status.certificate_chain);
status.private_key = atob(status.private_key);
dispatch(getTlsStatusSuccess(status));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(getTlsStatusFailure());
}
};
export const setTlsConfigRequest = createAction('SET_TLS_CONFIG_REQUEST');
export const setTlsConfigFailure = createAction('SET_TLS_CONFIG_FAILURE');
export const setTlsConfigSuccess = createAction('SET_TLS_CONFIG_SUCCESS');
export const setTlsConfig = config => async (dispatch) => {
dispatch(setTlsConfigRequest());
try {
const values = { ...config };
values.certificate_chain = btoa(values.certificate_chain);
values.private_key = btoa(values.private_key);
values.port_https = values.port_https || 0;
values.port_dns_over_tls = values.port_dns_over_tls || 0;
await apiClient.setTlsConfig(values);
dispatch(setTlsConfigSuccess(config));
dispatch(addSuccessToast('encryption_config_saved'));
dispatch(getTlsStatus());
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(setTlsConfigFailure());
}
};
</s> add </s> remove const Form = (props) => {
</s> add let Form = (props) => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/05cce8b1073dd4c005157177bdc129cba813a12c | config.go |
//
// Algorithm:
// . Get the list of filters to be updated
// . For each filter run the download and checksum check operation
// . If filter data hasn't changed, set new update time
// . If filter data has changed, parse it, save it on disk, set new update time
// . Apply changes to the current configuration
// . Restart server | <mask> // Checks filters updates if necessary
<mask> // If force is true, it ignores the filter.LastUpdated field value
<mask> func refreshFiltersIfNecessary(force bool) int {
<mask> var updateFilters []filter
<mask>
<mask> config.RLock()
<mask> for i := range config.Filters {
<mask> f := &config.Filters[i] // otherwise we will be operating on a copy
</s> * filters: rework update mechanism so that UI doesn't get locked while update is in progress </s> remove config.Lock()
</s> add var updateFilters []filter </s> remove // fetch URLs
updateCount := 0
</s> add config.RLock() </s> remove filter := &config.Filters[i] // otherwise we will be operating on a copy
</s> add f := &config.Filters[i] // otherwise we will be operating on a copy </s> remove if !filter.Enabled {
</s> add if !f.Enabled { </s> remove updated, err := filter.update()
</s> add var uf filter
uf.ID = f.ID
uf.URL = f.URL
uf.checksum = f.checksum
updateFilters = append(updateFilters, uf)
}
config.RUnlock()
updateCount := 0
for i := range updateFilters {
uf := &updateFilters[i]
updated, err := uf.update() | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0647f3fe8666a38cbdc7a747279513338e49568a | filter.go |
var updateFilters []filter | <mask>
<mask> // Checks filters updates if necessary
<mask> // If force is true, it ignores the filter.LastUpdated field value
<mask> func refreshFiltersIfNecessary(force bool) int {
<mask> config.Lock()
<mask>
<mask> // fetch URLs
<mask> updateCount := 0
<mask> for i := range config.Filters {
<mask> filter := &config.Filters[i] // otherwise we will be operating on a copy
</s> * filters: rework update mechanism so that UI doesn't get locked while update is in progress </s> remove // fetch URLs
updateCount := 0
</s> add config.RLock() </s> remove filter := &config.Filters[i] // otherwise we will be operating on a copy
</s> add f := &config.Filters[i] // otherwise we will be operating on a copy </s> remove if !filter.Enabled {
</s> add if !f.Enabled { </s> remove log.Printf("Failed to update filter %s: %s\n", filter.URL, err)
</s> add log.Printf("Failed to update filter %s: %s\n", uf.URL, err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0647f3fe8666a38cbdc7a747279513338e49568a | filter.go |
config.RLock() | <mask> // If force is true, it ignores the filter.LastUpdated field value
<mask> func refreshFiltersIfNecessary(force bool) int {
<mask> config.Lock()
<mask>
<mask> // fetch URLs
<mask> updateCount := 0
<mask> for i := range config.Filters {
<mask> filter := &config.Filters[i] // otherwise we will be operating on a copy
<mask>
<mask> if !filter.Enabled {
<mask> continue
</s> * filters: rework update mechanism so that UI doesn't get locked while update is in progress </s> remove config.Lock()
</s> add var updateFilters []filter </s> remove filter := &config.Filters[i] // otherwise we will be operating on a copy
</s> add f := &config.Filters[i] // otherwise we will be operating on a copy </s> remove if !filter.Enabled {
</s> add if !f.Enabled { </s> remove os.Chtimes(filter.Path(), mtime, mtime)
filter.LastUpdated = mtime
</s> add e := os.Chtimes(uf.Path(), mtime, mtime)
if e != nil {
log.Error("os.Chtimes(): %v", e)
}
uf.LastUpdated = mtime
}
config.Lock()
for k := range config.Filters {
f := &config.Filters[k]
if f.ID != uf.ID || f.URL != uf.URL {
continue
}
f.LastUpdated = uf.LastUpdated
if !updated {
continue
}
log.Info("Updated filter #%d. Rules: %d -> %d",
f.ID, f.RulesCount, uf.RulesCount)
f.Name = uf.Name
f.Rules = uf.Rules
f.RulesCount = uf.RulesCount
f.checksum = uf.checksum
updateCount++ | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0647f3fe8666a38cbdc7a747279513338e49568a | filter.go |
f := &config.Filters[i] // otherwise we will be operating on a copy | <mask>
<mask> // fetch URLs
<mask> updateCount := 0
<mask> for i := range config.Filters {
<mask> filter := &config.Filters[i] // otherwise we will be operating on a copy
<mask>
<mask> if !filter.Enabled {
<mask> continue
<mask> }
<mask>
</s> * filters: rework update mechanism so that UI doesn't get locked while update is in progress </s> remove // fetch URLs
updateCount := 0
</s> add config.RLock() </s> remove if !filter.Enabled {
</s> add if !f.Enabled { </s> remove config.Lock()
</s> add var updateFilters []filter </s> remove updated, err := filter.update()
</s> add var uf filter
uf.ID = f.ID
uf.URL = f.URL
uf.checksum = f.checksum
updateFilters = append(updateFilters, uf)
}
config.RUnlock()
updateCount := 0
for i := range updateFilters {
uf := &updateFilters[i]
updated, err := uf.update() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0647f3fe8666a38cbdc7a747279513338e49568a | filter.go |
if !f.Enabled { | <mask> updateCount := 0
<mask> for i := range config.Filters {
<mask> filter := &config.Filters[i] // otherwise we will be operating on a copy
<mask>
<mask> if !filter.Enabled {
<mask> continue
<mask> }
<mask>
<mask> if !force && time.Since(filter.LastUpdated) <= updatePeriod {
<mask> continue
</s> * filters: rework update mechanism so that UI doesn't get locked while update is in progress </s> remove filter := &config.Filters[i] // otherwise we will be operating on a copy
</s> add f := &config.Filters[i] // otherwise we will be operating on a copy </s> remove if !force && time.Since(filter.LastUpdated) <= updatePeriod {
</s> add if !force && time.Since(f.LastUpdated) <= updatePeriod { </s> remove // fetch URLs
updateCount := 0
</s> add config.RLock() </s> remove updated, err := filter.update()
</s> add var uf filter
uf.ID = f.ID
uf.URL = f.URL
uf.checksum = f.checksum
updateFilters = append(updateFilters, uf)
}
config.RUnlock()
updateCount := 0
for i := range updateFilters {
uf := &updateFilters[i]
updated, err := uf.update() </s> remove config.Lock()
</s> add var updateFilters []filter | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0647f3fe8666a38cbdc7a747279513338e49568a | filter.go |