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

Add template variable subpage UI #11810

Merged
merged 1 commit into from
Feb 12, 2019
Merged

Add template variable subpage UI #11810

merged 1 commit into from
Feb 12, 2019

Conversation

AlirieGray
Copy link
Contributor

@AlirieGray AlirieGray commented Feb 12, 2019

Closes: https://github.com/influxdata/applications-team-issues/issues/284

This PR adds a subpage to the /organizations page for template variables. The page includes a button that opens an overlay to create a new template variable. However, this UI is not currently connected to the backend.

In addition, some types are moved out of the /v2 folder to the /types folder.

  • Rebased/mergeable
  • Tests pass

Copy link
Contributor

@OfTheDelmer OfTheDelmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good just had a few nits

}

private handleChangeInput = (e: ChangeEvent<HTMLInputElement>) => {
const value = e.target.value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const value = e.target.value
const {value, name} = e.target
this.setState({[name]: value})

}

private handleCreateVariable = () => {
const {onCloseModal} = this.props
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const {onCloseModal} = this.props
this.props.onCloseModal()

script={script}
onChangeScript={this.handleChangeScript}
visibility="visible"
status={{text: '', type: ''}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe there could be some kind default status prop in the FluxEditor so we don't have to specify this when we're not updating it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea 👍

<OverlayContainer maxWidth={1000}>
<OverlayHeading
title="Create Variable"
onDismiss={this.props.onCloseModal}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
onDismiss={this.props.onCloseModal}
onDismiss={onCloseModal}

overlayState: OverlayState
}

export default class Buckets extends PureComponent<Props, State> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export default class Buckets extends PureComponent<Props, State> {
export default class Variables extends PureComponent<Props, State> {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😱 oops


export {
TemplateType,
TemplateValue,
TemplateValueType,
Template,
OverlayState,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@AlirieGray AlirieGray force-pushed the feat/temp-vars-tab branch 3 times, most recently from e854c0e to 31b3ab5 Compare February 12, 2019 20:00
@AlirieGray AlirieGray changed the title Add UI for creating a template variable Add template variable subpage UI Feb 12, 2019
@AlirieGray AlirieGray force-pushed the feat/temp-vars-tab branch 4 times, most recently from 99781fe to 08a88de Compare February 12, 2019 20:47
@AlirieGray AlirieGray merged commit 6d16250 into master Feb 12, 2019
@AlirieGray AlirieGray deleted the feat/temp-vars-tab branch February 12, 2019 21:15
mgattozzi added a commit that referenced this pull request Sep 5, 2024
This syncs OSS to pro and fixes the cargo-deny errors in CI. This uses the exact
same config as IOx from #11810.

influxdata/influxdb_iox#11810
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants