Exclude links that don't work in cloud
parent
0b1b566aac
commit
cc2c826be6
|
@ -4,10 +4,6 @@ import {Link} from 'react-router'
|
||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
import {get} from 'lodash'
|
import {get} from 'lodash'
|
||||||
|
|
||||||
// Components
|
|
||||||
import NavMenuSubItem from 'src/pageLayout/components/NavMenuSubItem'
|
|
||||||
import {Select} from 'src/clockface'
|
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
import {IconFont} from 'src/clockface'
|
import {IconFont} from 'src/clockface'
|
||||||
|
|
||||||
|
@ -43,7 +39,7 @@ const NavMenuItem: SFC<Props> = ({
|
||||||
<Link className="nav--item-header" to={link}>
|
<Link className="nav--item-header" to={link}>
|
||||||
{title}
|
{title}
|
||||||
</Link>
|
</Link>
|
||||||
<Select type={NavMenuSubItem}>{children}</Select>
|
{children}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -12,6 +12,7 @@ import {AppState} from 'src/types'
|
||||||
import {IconFont} from 'src/clockface'
|
import {IconFont} from 'src/clockface'
|
||||||
|
|
||||||
import {ErrorHandling} from 'src/shared/decorators/errors'
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
import CloudExclude from 'src/shared/components/cloud/CloudExclude'
|
||||||
|
|
||||||
interface OwnProps {
|
interface OwnProps {
|
||||||
isHidden: boolean
|
isHidden: boolean
|
||||||
|
@ -80,6 +81,7 @@ class SideNav extends PureComponent<Props> {
|
||||||
location={location.pathname}
|
location={location.pathname}
|
||||||
highlightPaths={['configuration']}
|
highlightPaths={['configuration']}
|
||||||
>
|
>
|
||||||
|
<CloudExclude>
|
||||||
<NavMenu.SubItem
|
<NavMenu.SubItem
|
||||||
title="Buckets"
|
title="Buckets"
|
||||||
link="/configuration/buckets_tab"
|
link="/configuration/buckets_tab"
|
||||||
|
@ -104,6 +106,7 @@ class SideNav extends PureComponent<Props> {
|
||||||
location={location.pathname}
|
location={location.pathname}
|
||||||
highlightPaths={['variables_tab']}
|
highlightPaths={['variables_tab']}
|
||||||
/>
|
/>
|
||||||
|
</CloudExclude>
|
||||||
<NavMenu.SubItem
|
<NavMenu.SubItem
|
||||||
title="Profile"
|
title="Profile"
|
||||||
link="/configuration/settings_tab"
|
link="/configuration/settings_tab"
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
import {PureComponent} from 'react'
|
||||||
|
|
||||||
|
export default class extends PureComponent {
|
||||||
|
render() {
|
||||||
|
const {children} = this.props
|
||||||
|
|
||||||
|
if (process.env.CLOUD !== 'true') {
|
||||||
|
return children
|
||||||
|
}
|
||||||
|
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
import {PureComponent} from 'react'
|
||||||
|
|
||||||
|
export default class extends PureComponent {
|
||||||
|
render() {
|
||||||
|
const {children} = this.props
|
||||||
|
|
||||||
|
if (process.env.CLOUD === 'true') {
|
||||||
|
return children
|
||||||
|
}
|
||||||
|
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue