Skip to content

Commit

Permalink
Pull request: ADG-8737 fixed missing version in the footer, unnecessa…
Browse files Browse the repository at this point in the history
…ry validation call on the encryption page

Squashed commit of the following:

commit 1c4a15f
Merge: 399d28e 9d1c45f
Author: Ildar Kamalov <ik@adguard.com>
Date:   Tue Jul 2 13:08:21 2024 +0300

    Merge branch 'master' into ADG-8737

commit 399d28e
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Jul 1 19:37:05 2024 +0300

    fix install

commit 91d5dd2
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Jul 1 17:40:22 2024 +0300

    home: imp logs

commit 06917df
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Jul 1 16:38:38 2024 +0300

    ADG-8737 add missing version, remove validation call
  • Loading branch information
IldarKamalov committed Jul 2, 2024
1 parent 9d1c45f commit fcdebfa
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ NOTE: Add new changes BELOW THIS COMMENT.

### Fixed

- Unnecessary validation call on the encryption page.
- Missing version in the footer.
- Panic caused by missing user-specific blocked services object in configuration
file ([#7069]).
- Tracking `/etc/hosts` file changes causing panics within particular
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Settings/Encryption/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Encryption extends Component<EncryptionProps> {
handleFormChange = debounce((values) => {
const submitValues = this.getSubmitValues(values);

if (submitValues.enabled || submitValues.serve_plain_dns) {
if (submitValues.enabled) {
this.props.validateTlsConfig(submitValues);
}
}, DEBOUNCE_TIMEOUT);
Expand Down
9 changes: 4 additions & 5 deletions client/src/components/ui/Version.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ const Version = () => {
const dashboard = useSelector((state: RootState) => state.dashboard, shallowEqual);
const install = useSelector((state: RootState) => state.install, shallowEqual);

if (!dashboard || !install) {
if (!dashboard && !install) {
return null;
}

const { dnsVersion, processingVersion, checkUpdateFlag } = dashboard;
const version = dnsVersion || install?.dnsVersion;
const version = dashboard?.dnsVersion || install?.dnsVersion;

const onClick = () => {
dispatch(getVersion(true));
Expand All @@ -35,12 +34,12 @@ const Version = () => {
</>
)}

{checkUpdateFlag && (
{dashboard?.checkUpdateFlag && (
<button
type="button"
className="btn btn-icon btn-icon-sm btn-outline-primary btn-sm ml-2"
onClick={onClick}
disabled={processingVersion}
disabled={dashboard?.processingVersion}
title={t('check_updates_now')}>
<svg className="icons icon12">
<use xlinkHref="#refresh" />
Expand Down
9 changes: 8 additions & 1 deletion internal/home/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,14 @@ func webCheckPortAvailable(port uint16) (ok bool) {

addrPort := netip.AddrPortFrom(config.HTTPConfig.Address.Addr(), port)

return aghnet.CheckPort("tcp", addrPort) == nil
err := aghnet.CheckPort("tcp", addrPort)
if err != nil {
log.Info("web: warning: checking https port: %s", err)

return false
}

return true
}

// tlsConfigChanged updates the TLS configuration and restarts the HTTPS server
Expand Down

0 comments on commit fcdebfa

Please sign in to comment.