Skip to content

Commit

Permalink
fix(ui): don't show members information in cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
hoorayimhelping committed Nov 12, 2019
1 parent 291f7b3 commit 4584ea3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
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 sure 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
7 changes: 6 additions & 1 deletion ui/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ import NewRuleOverlay from 'src/alerting/components/notifications/NewRuleOverlay
import EditRuleOverlay from 'src/alerting/components/notifications/EditRuleOverlay'
import NewEndpointOverlay from 'src/alerting/components/endpoints/NewEndpointOverlay'
import EditEndpointOverlay from 'src/alerting/components/endpoints/EditEndpointOverlay'
import CloudExclude from 'src/shared/components/cloud/CloudExclude'
import CloudOnly from 'src/shared/components/cloud/CloudOnly'


// Overlays
import OverlayHandler, {
Expand Down Expand Up @@ -349,7 +352,9 @@ class Root extends PureComponent {
</Route>
</Route>
<Route path="settings">
<IndexRoute component={MembersIndex} />
<CloudOnly><IndexRoute component={VariablesIndex} /></CloudOnly>
<CloudExclude><IndexRoute component={MembersIndex} /></CloudExclude>

<Route path="members" component={MembersIndex}>
<Route path="new" component={AddMembersOverlay} />
</Route>
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/members` // Might be different due to React Router. See src/index.tsx
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>
<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

0 comments on commit 4584ea3

Please sign in to comment.