This repository was archived by the owner on Apr 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,13 +49,16 @@ import { netdataCallback, updateLocaleFunctions } from "./main"
4949import { MigrationManager } from "@/src/domains/dashboard/components/migration-manager"
5050import { isDemo } from "./utils/is-demo"
5151import { Box } from "@netdata/netdata-ui"
52+ import { selectIsCloudEnabled } from "domains/global/selectors"
5253
5354const FakeMargin = Box
5455
5556// support legacy code
5657window . Ps = Ps
5758
5859const App : React . FC = ( ) => {
60+ const cloudEnabled = useSelector ( selectIsCloudEnabled )
61+
5962 const store = useStore ( )
6063 useEffect ( ( ) => {
6164 // todo
@@ -139,7 +142,7 @@ const App: React.FC = () => {
139142 </ >
140143 ) }
141144 </ Layout >
142- < FakeMargin height = { 15 } />
145+ { cloudEnabled && < FakeMargin height = { 15 } /> }
143146 </ >
144147 ) }
145148 </ ThemeProvider >
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ import Timezone from "./timezone"
1111import SignIn from "./signIn"
1212import { CloudConnectionStatus } from "./ACLK"
1313import { DiscoverCloud } from "@/src/components/discover-cloud"
14+ import { selectIsCloudEnabled } from "domains/global/selectors"
15+ import { useSelector } from "react-redux"
1416
1517const Wrapper = styled ( Flex ) . attrs ( {
1618 as : "header" ,
@@ -24,25 +26,29 @@ const Wrapper = styled(Flex).attrs({
2426 pointer-events: all;
2527`
2628
27- const Header = ( ) => (
28- < Wrapper >
29- < Flex alignItems = "center" gap = { 3 } >
30- < Node />
31- </ Flex >
32- < Flex justifyContent = "end" alignItems = "center" gap = { 3 } >
33- < CloudConnectionStatus />
34- < Version />
35- < News />
36- < Options />
37- < Timezone />
38- < GlobalControls />
39- < Alarms />
40- < SignIn />
41- </ Flex >
42- < Box sx = { { background : "#272B30" } } position = "absolute" top = "52px" left = "0px" right = "0px" >
43- < DiscoverCloud />
44- </ Box >
45- </ Wrapper >
46- )
29+ const Header = ( ) => {
30+ const cloudEnabled = useSelector ( selectIsCloudEnabled )
31+
32+ return < Wrapper >
33+ < Flex alignItems = "center" gap = { 3 } >
34+ < Node />
35+ </ Flex >
36+ < Flex justifyContent = "end" alignItems = "center" gap = { 3 } >
37+ < CloudConnectionStatus />
38+ < Version />
39+ < News />
40+ < Options />
41+ < Timezone />
42+ < GlobalControls />
43+ < Alarms />
44+ < SignIn />
45+ </ Flex >
46+ { cloudEnabled && < Box sx = { { background : "#272B30" } } position = "absolute" top = "52px" left = "0px" right = "0px" >
47+ < DiscoverCloud />
48+ </ Box > }
49+ </ Wrapper >
50+ }
51+
52+
4753
4854export default Header
You can’t perform that action at this time.
0 commit comments