diff --git a/ui/src/configuration/components/LabelList.tsx b/ui/src/configuration/components/LabelList.tsx index 5de53397348..df064f7ec03 100644 --- a/ui/src/configuration/components/LabelList.tsx +++ b/ui/src/configuration/components/LabelList.tsx @@ -11,7 +11,7 @@ import {validateLabelName} from 'src/configuration/utils/labels' // Types import {LabelType} from 'src/clockface' -import {OverlayState} from 'src/types/v2' +import {OverlayState} from 'src/types' // Decorators import {ErrorHandling} from 'src/shared/decorators/errors' diff --git a/ui/src/organizations/components/BucketList.tsx b/ui/src/organizations/components/BucketList.tsx index 1a88626984a..99838f38fef 100644 --- a/ui/src/organizations/components/BucketList.tsx +++ b/ui/src/organizations/components/BucketList.tsx @@ -14,7 +14,7 @@ import DataLoaderSwitcher from 'src/dataLoaders/components/DataLoaderSwitcher' import {setBucketInfo} from 'src/dataLoaders/actions/steps' // Types -import {OverlayState} from 'src/types/v2' +import {OverlayState} from 'src/types' import {Substep, DataLoaderStep, DataLoaderType} from 'src/types/v2/dataLoaders' import {setDataLoadersType} from 'src/dataLoaders/actions/dataLoaders' import {AppState} from 'src/types/v2' diff --git a/ui/src/organizations/components/Buckets.tsx b/ui/src/organizations/components/Buckets.tsx index a33b765dc95..d9638468e4d 100644 --- a/ui/src/organizations/components/Buckets.tsx +++ b/ui/src/organizations/components/Buckets.tsx @@ -28,7 +28,7 @@ import {ruleToString} from 'src/utils/formatting' import {client} from 'src/utils/api' // Types -import {OverlayState} from 'src/types/v2' +import {OverlayState} from 'src/types' import {Bucket, Organization, BucketRetentionRules} from '@influxdata/influx' diff --git a/ui/src/organizations/components/Collectors.tsx b/ui/src/organizations/components/Collectors.tsx index 7a390d46d73..572058bf8f1 100644 --- a/ui/src/organizations/components/Collectors.tsx +++ b/ui/src/organizations/components/Collectors.tsx @@ -35,7 +35,7 @@ import {ErrorHandling} from 'src/shared/decorators/errors' // Types import {Telegraf, Bucket} from '@influxdata/influx' -import {OverlayState} from 'src/types/v2' +import {OverlayState} from 'src/types' import { setDataLoadersType, setTelegrafConfigID, diff --git a/ui/src/organizations/components/CreateVariableOverlay.scss b/ui/src/organizations/components/CreateVariableOverlay.scss new file mode 100644 index 00000000000..601419b8c63 --- /dev/null +++ b/ui/src/organizations/components/CreateVariableOverlay.scss @@ -0,0 +1,15 @@ +/* + Create Variable Overlay Styles + ----------------------------------------------------------------------------- +*/ + +@import 'src/style/modules'; + +.overlay-flux-editor { + position: relative; + height: 300px; +} + +.overlay-flux-editor--spacing { + margin-bottom: $ix-marg-c; +} diff --git a/ui/src/organizations/components/CreateVariableOverlay.tsx b/ui/src/organizations/components/CreateVariableOverlay.tsx new file mode 100644 index 00000000000..79a00294384 --- /dev/null +++ b/ui/src/organizations/components/CreateVariableOverlay.tsx @@ -0,0 +1,116 @@ +// Libraries +import React, {PureComponent, ChangeEvent} from 'react' + +// Styles +import 'src/organizations/components/CreateVariableOverlay.scss' + +// Components +import { + Form, + OverlayBody, + OverlayHeading, + OverlayContainer, + Input, + Button, + ComponentColor, + ComponentStatus, + ButtonType, + OverlayFooter, +} from 'src/clockface' +import FluxEditor from 'src/shared/components/FluxEditor' + +interface Props { + onCreateVariable: () => void + onCloseModal: () => void +} + +interface State { + name: string + script: string + nameInputStatus: ComponentStatus + errorMessage: string +} + +export default class CreateOrgOverlay extends PureComponent { + constructor(props) { + super(props) + this.state = { + name: '', + script: '', + nameInputStatus: ComponentStatus.Default, + errorMessage: '', + } + } + + public render() { + const {onCloseModal} = this.props + const {nameInputStatus, name, script} = this.state + + return ( + + + +
+ +
+ + + +
+ + +
+ +
+
+ + +