feat: notebook flag (#18087)
parent
6ad1640641
commit
246eeef794
|
|
@ -35,6 +35,7 @@ import CreateVariableOverlay from 'src/variables/components/CreateVariableOverla
|
|||
import DataExplorerPage from 'src/dataExplorer/components/DataExplorerPage'
|
||||
import SaveAsOverlay from 'src/dataExplorer/components/SaveAsOverlay'
|
||||
import {MePage} from 'src/me'
|
||||
import NotebookPage from 'src/notebooks/components/Notebook'
|
||||
import NotFound from 'src/shared/components/NotFound'
|
||||
import GetLinks from 'src/shared/containers/GetLinks'
|
||||
import GetMe from 'src/shared/containers/GetMe'
|
||||
|
|
@ -95,6 +96,9 @@ import NewEndpointOverlay from 'src/notifications/endpoints/components/NewEndpoi
|
|||
import EditEndpointOverlay from 'src/notifications/endpoints/components/EditEndpointOverlay'
|
||||
import NoOrgsPage from 'src/organizations/containers/NoOrgsPage'
|
||||
|
||||
// Utilities
|
||||
import {isFlagEnabled} from 'src/shared/utils/featureFlag'
|
||||
|
||||
// Overlays
|
||||
import OverlayHandler, {
|
||||
RouteOverlay,
|
||||
|
|
@ -278,6 +282,12 @@ class Root extends PureComponent {
|
|||
</Route>
|
||||
</Route>
|
||||
<Route path="me" component={MePage} />
|
||||
{isFlagEnabled('notebooks') && (
|
||||
<Route
|
||||
path="notebooks"
|
||||
component={NotebookPage}
|
||||
/>
|
||||
)}
|
||||
<Route path="load-data">
|
||||
<IndexRoute component={BucketsIndex} />
|
||||
<Route path="tokens" component={TokensIndex}>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
import React, {FC} from 'react'
|
||||
|
||||
import {Page} from '@influxdata/clockface'
|
||||
|
||||
const NotebookPage: FC = () => {
|
||||
return (
|
||||
<Page titleTag="Notebook">
|
||||
<Page.Header fullWidth={false} />
|
||||
<Page.Contents fullWidth={false} scrollable={true} />
|
||||
</Page>
|
||||
)
|
||||
}
|
||||
|
||||
export default NotebookPage
|
||||
|
|
@ -107,6 +107,19 @@ export const generateNavItems = (orgID: string): NavItem[] => {
|
|||
},
|
||||
activeKeywords: ['data-explorer'],
|
||||
},
|
||||
{
|
||||
id: 'notebooks',
|
||||
testID: 'nav-item-notebooks',
|
||||
icon: IconFont.Erlenmeyer,
|
||||
label: 'Notebook',
|
||||
featureFlag: 'notebooks',
|
||||
shortLabel: 'Book',
|
||||
link: {
|
||||
type: 'link',
|
||||
location: `${orgPrefix}/notebooks`,
|
||||
},
|
||||
activeKeywords: ['notebooks'],
|
||||
},
|
||||
{
|
||||
id: 'dashboards',
|
||||
testID: 'nav-item-dashboards',
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ export const OSS_FLAGS = {
|
|||
matchingNotificationRules: false,
|
||||
demodata: false,
|
||||
fluxParser: false,
|
||||
notebooks: false,
|
||||
}
|
||||
|
||||
export const CLOUD_FLAGS = {
|
||||
|
|
@ -22,6 +23,7 @@ export const CLOUD_FLAGS = {
|
|||
matchingNotificationRules: false,
|
||||
demodata: false,
|
||||
fluxParser: false,
|
||||
notebooks: false,
|
||||
}
|
||||
|
||||
export const activeFlags = (state: AppState): FlagMap => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue