-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12611 from influxdata/feat/add-variables-config-page
Add variables to configuration page and navigation for config tabs
- Loading branch information
Showing
7 changed files
with
310 additions
and
16 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Libraries | ||
import React, {PureComponent} from 'react' | ||
|
||
// Styles | ||
import 'src/organizations/components/CreateVariableOverlay.scss' | ||
|
||
// Components | ||
import {Overlay} from 'src/clockface' | ||
import VariableForm from 'src/organizations/components/VariableForm' | ||
|
||
// Types | ||
import {Variable, Organization} from '@influxdata/influx' | ||
|
||
interface Props { | ||
onCreateVariable: (variable: Variable) => void | ||
onHideOverlay: () => void | ||
orgs: Organization[] | ||
visible: boolean | ||
initialScript?: string | ||
} | ||
|
||
export default class CreateVariableOverlay extends PureComponent<Props> { | ||
public render() { | ||
const { | ||
onHideOverlay, | ||
onCreateVariable, | ||
initialScript, | ||
orgs, | ||
visible, | ||
} = this.props | ||
|
||
return ( | ||
<Overlay visible={visible}> | ||
<Overlay.Container maxWidth={1000}> | ||
<Overlay.Heading title="Create Variable" onDismiss={onHideOverlay} /> | ||
<Overlay.Body> | ||
<VariableForm | ||
onCreateVariable={onCreateVariable} | ||
onHideOverlay={onHideOverlay} | ||
orgID={orgs[0].id} //TODO: display a list of orgs and have the user pick one | ||
initialScript={initialScript} | ||
/> | ||
</Overlay.Body> | ||
</Overlay.Container> | ||
</Overlay> | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.