diff --git a/CHANGELOG.md b/CHANGELOG.md index ea2579090fb..c6c8006b4f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ 1. [17363](https://github.com/influxdata/influxdb/pull/17363): Fixed telegraf configuration bugs where system buckets were appearing in the buckets dropdown 1. [17391](https://github.com/influxdata/influxdb/pull/17391): Fixed threshold check bug where checks could not be created when a field had a space in the name 1. [17384](https://github.com/influxdata/influxdb/pull/17384): Reuse slices built by iterator to reduce allocations +1. [17404](https://github.com/influxdata/influxdb/pull/17404): Updated duplicate check error message to be more explicit and actionable ### UI Improvements diff --git a/ui/src/checks/actions/thunks.ts b/ui/src/checks/actions/thunks.ts index 937c3deb2b6..1a74cc47c72 100644 --- a/ui/src/checks/actions/thunks.ts +++ b/ui/src/checks/actions/thunks.ts @@ -152,6 +152,13 @@ export const createCheckFromTimeMachine = () => async ( const check = builderToPostCheck(state) const resp = await api.postCheck({data: check}) if (resp.status !== 201) { + if (resp.data.code.includes('conflict')) { + throw new Error( + `A check named ${ + check.name + } already exists. Please rename the check before saving` + ) + } throw new Error(resp.data.message) } diff --git a/ui/src/dataLoaders/components/verifyStep/TelegrafInstructions.tsx b/ui/src/dataLoaders/components/verifyStep/TelegrafInstructions.tsx index c29dccba98b..96692f77dd4 100644 --- a/ui/src/dataLoaders/components/verifyStep/TelegrafInstructions.tsx +++ b/ui/src/dataLoaders/components/verifyStep/TelegrafInstructions.tsx @@ -22,6 +22,7 @@ class TelegrafInstructions extends PureComponent { const configScript = `telegraf --config ${ this.origin }/api/v2/telegrafs/${configID || ''}` + const exportToken = `export INFLUX_TOKEN=${token || ''}` return (
1. Install the Latest Telegraf
@@ -49,7 +50,7 @@ class TelegrafInstructions extends PureComponent { able to see it again! )} - +
3. Start Telegraf

Finally, you can run the following command to start the Telegraf agent diff --git a/ui/src/shared/components/TokenCodeSnippet.tsx b/ui/src/shared/components/TokenCodeSnippet.tsx index 65805c62912..0132ba8b466 100644 --- a/ui/src/shared/components/TokenCodeSnippet.tsx +++ b/ui/src/shared/components/TokenCodeSnippet.tsx @@ -51,9 +51,7 @@ const TokenCodeSnippet: FC = ({ className="code-snippet--scroll" >

-
-            export INFLUX_TOKEN={token || ''}
-          
+
{token}