From 813a06d09a250bfbab2c2ea5c1fa14a4f0d2ac18 Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Tue, 18 Jan 2022 15:05:34 +0300 Subject: [PATCH] Pull request: home: show version in install api Closes #4026. Squashed commit of the following: commit bcd1315a10e819daee3aee323427d90a27860b4a Author: Ainar Garipov Date: Tue Jan 18 14:57:49 2022 +0300 openapi: fix example commit b56e27c5ac1fc7c3f595057d77607479d72ec50a Author: Ildar Kamalov Date: Tue Jan 18 14:55:51 2022 +0300 client: show version on install page commit 95dfbfaa1235deef7b55e51457d11c677f6ef6b5 Author: Ainar Garipov Date: Tue Jan 18 14:29:08 2022 +0300 home: show version in install api --- client/src/components/ui/Version.js | 17 ++++++++++----- client/src/reducers/install.js | 11 ++++++++-- internal/home/controlinstall.go | 33 ++++++++++++++++++++--------- internal/version/version.go | 13 +++--------- openapi/CHANGELOG.md | 11 ++++++++-- openapi/openapi.yaml | 12 +++++++---- 6 files changed, 64 insertions(+), 33 deletions(-) diff --git a/client/src/components/ui/Version.js b/client/src/components/ui/Version.js index 30cec35d..918cd417 100644 --- a/client/src/components/ui/Version.js +++ b/client/src/components/ui/Version.js @@ -13,6 +13,12 @@ const Version = () => { checkUpdateFlag, } = useSelector((state) => state?.dashboard ?? {}, shallowEqual); + const { + dnsVersion: installDnsVersion, + } = useSelector((state) => state?.install ?? {}, shallowEqual); + + const version = dnsVersion || installDnsVersion; + const onClick = () => { dispatch(getVersion(true)); }; @@ -20,11 +26,12 @@ const Version = () => { return (
- {dnsVersion - && <> - version:  - {dnsVersion} - } + {version && ( + <> + version:  + {version} + + )} {checkUpdateFlag &&