Skip to content

Commit

Permalink
fix: return the telegraf module based on Loadable's interface
Browse files Browse the repository at this point in the history
  • Loading branch information
hoorayimhelping committed Dec 11, 2019
1 parent d2fe751 commit efdc6e5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
1. [16194](https://github.com/influxdata/influxdb/pull/16194): Fixed windowPeriod issue that stemmed from webpack rules
1. [16175](https://github.com/influxdata/influxdb/pull/16175): Added delete functionality to note cells so that they can be deleted
1. [16204](https://github.com/influxdata/influxdb/pull/16204): Fix failure to create labels when creating telegraf configs
1. [16207](https://github.com/influxdata/influxdb/pull/16207): Fix crash when editing a Telegraf config

### UI Improvements

Expand Down
11 changes: 8 additions & 3 deletions ui/cypress/e2e/collectors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ describe('Collectors', () => {
})

// fix for https://github.com/influxdata/influxdb/issues/15730
it('creates a configuration with a unique label', () => {
it('creates a configuration with a unique label and opens it', () => {
cy.contains('Create Configuration').click()

cy.contains('Docker').click()
Expand All @@ -370,14 +370,19 @@ describe('Collectors', () => {
cy.get('[name="endpoint"]').type('http://localhost')

cy.contains('Done').click()
cy.get('input[title="Telegraf Configuration Name"]').type('Label 1')
cy.get('input[title="Telegraf Configuration Name"]').type(
'{selectall}Label 1'
)
cy.get('input[title="Telegraf Configuration Description"]').type(
'Description 1'
)

cy.contains('Create and Verify').click()

cy.contains('Finish').click()
cy.contains('Your configurations have been saved')

cy.contains('Label 1').click()
cy.contains('Telegraf Configuration - Label 1').should('exist')
})

describe('Label creation and searching', () => {
Expand Down
3 changes: 1 addition & 2 deletions ui/src/telegrafs/components/TelegrafConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import {withRouter, WithRouterProps} from 'react-router'
import {ErrorHandling} from 'src/shared/decorators/errors'
const spinner = <div className="time-machine-editor--loading" />
const Editor = Loadable({
loader: () =>
import('react-codemirror2').then(module => ({default: module.Controlled})),
loader: () => import('react-codemirror2').then(module => module.Controlled),
loading() {
return spinner
},
Expand Down

0 comments on commit efdc6e5

Please sign in to comment.