Skip to content

Commit

Permalink
fix: add a timestamp to the telegraf label creation to insure uniqueness
Browse files Browse the repository at this point in the history
  • Loading branch information
hoorayimhelping committed Dec 11, 2019
1 parent 24e4fe4 commit d2fe751
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
1. [16172](https://github.com/influxdata/influxdb/pull/16172): Fixed table ui threshold colorization issue where setting thresholds would not change table UI
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

### UI Improvements

Expand Down
24 changes: 24 additions & 0 deletions ui/cypress/e2e/collectors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,30 @@ describe('Collectors', () => {
})
})
})

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

cy.contains('Docker').click()

cy.contains('Continue').click()

cy.contains('docker').click()

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 Description"]').type(
'Description 1'
)

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

cy.contains('Your configurations have been saved')
})

describe('Label creation and searching', () => {
beforeEach(() => {
const description = 'Config Description'
Expand Down
2 changes: 1 addition & 1 deletion ui/src/dataLoaders/actions/dataLoaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ const createTelegraf = async (dispatch, getState, plugins) => {

const createdLabel = await client.labels.create({
orgID: org.id,
name: '@influxdata.token',
name: `@influxdata.token-${new Date().getTime()}`, // fix for https://github.com/influxdata/influxdb/issues/15730
properties,
})

Expand Down

0 comments on commit d2fe751

Please sign in to comment.