From cc3f3ce3c6335bb9c79f5e6ec733c4c22268a2ff Mon Sep 17 00:00:00 2001 From: asalem Date: Tue, 24 Mar 2020 13:12:37 -0700 Subject: [PATCH 1/3] fix(ui): updated duplicate check error message --- ui/src/checks/actions/thunks.ts | 7 +++++++ 1 file changed, 7 insertions(+) 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) } From 90336c36b026e424cf3eea6d17250ea92038b4d2 Mon Sep 17 00:00:00 2001 From: asalem Date: Tue, 24 Mar 2020 13:18:09 -0700 Subject: [PATCH 2/3] chore(ui): updated CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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 From a8e6e6d269a67367d7e09d070774f786330fab74 Mon Sep 17 00:00:00 2001 From: asalem Date: Tue, 24 Mar 2020 13:41:38 -0700 Subject: [PATCH 3/3] fix(ui): fixed quick telegraf bug that wasn't copying export INFLUX_TOKEN --- .../components/verifyStep/TelegrafInstructions.tsx | 3 ++- ui/src/shared/components/TokenCodeSnippet.tsx | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) 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}