Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): don't show members information in cloud #15866

Merged
merged 1 commit into from
Nov 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
1. [15777](https://github.com/influxdata/influxdb/pull/15777): Fix long startup when running 'influx help'
1. [15713](https://github.com/influxdata/influxdb/pull/15713): Mock missing Flux dependencies when creating tasks
1. [15731](https://github.com/influxdata/influxdb/pull/15731): Ensure array cursor iterator stats accumulate all cursor stats
1. [15866](https://github.com/influxdata/influxdb/pull/15866): Do not show Members section in Cloud environments

### UI Improvements
1. [15809](https://github.com/influxdata/influxdb/pull/15809): Redesign cards and animations on getting started page
Expand Down
19 changes: 15 additions & 4 deletions ui/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {Provider} from 'react-redux'
import {Router, Route, useRouterHistory, IndexRoute} from 'react-router'
import {createHistory, History} from 'history'

import {CLOUD} from 'src/shared/constants'
import configureStore from 'src/store/configureStore'
import {loadLocalStorage} from 'src/localStorage'

Expand Down Expand Up @@ -349,10 +350,20 @@ class Root extends PureComponent {
</Route>
</Route>
<Route path="settings">
<IndexRoute component={MembersIndex} />
<Route path="members" component={MembersIndex}>
<Route path="new" component={AddMembersOverlay} />
</Route>
{CLOUD ? (
<IndexRoute component={VariablesIndex} />
) : (
<>
<IndexRoute component={MembersIndex} />
<Route path="members" component={MembersIndex}>
<Route
path="new"
component={AddMembersOverlay}
/>
</Route>
</>
)}

<Route path="templates" component={TemplatesIndex}>
<Route
path="import"
Expand Down
22 changes: 12 additions & 10 deletions ui/src/pageLayout/containers/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class SideNav extends PureComponent<Props, State> {
const tokensLink = `${orgPrefix}/load-data/tokens`
const clientLibrariesLink = `${orgPrefix}/load-data/client-libraries`
// Settings
const settingsLink = `${orgPrefix}/settings/members`
const settingsLink = `${orgPrefix}/settings`
const membersLink = `${orgPrefix}/settings/members`
const variablesLink = `${orgPrefix}/settings/variables`
const templatesLink = `${orgPrefix}/settings/templates`
Expand Down Expand Up @@ -253,15 +253,17 @@ class SideNav extends PureComponent<Props, State> {
)}
active={getNavItemActivation(['settings'], location.pathname)}
>
<NavMenu.SubItem
titleLink={className => (
<Link to={membersLink} className={className}>
Members
</Link>
)}
active={getNavItemActivation(['members'], location.pathname)}
key="members"
/>
<CloudExclude>
ebb-tide marked this conversation as resolved.
Show resolved Hide resolved
<NavMenu.SubItem
titleLink={className => (
<Link to={membersLink} className={className}>
Members
</Link>
)}
active={getNavItemActivation(['members'], location.pathname)}
key="members"
/>
</CloudExclude>
<NavMenu.SubItem
titleLink={className => (
<Link to={variablesLink} className={className}>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/settings/components/SettingsNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SettingsNavigation extends PureComponent<Props> {
{
text: 'Members',
id: 'members',
cloudExclude: false,
cloudExclude: true,
},
{
text: 'Variables',
Expand Down