From 09632a23d6e633704823800ebfc3817117349044 Mon Sep 17 00:00:00 2001 From: Iris Scholten Date: Wed, 6 Feb 2019 15:55:10 -0800 Subject: [PATCH] Add a button to view the telegraf config toml --- CHANGELOG.md | 2 + .../components/CollectorList.tsx | 3 + .../organizations/components/CollectorRow.tsx | 18 ++++- .../organizations/components/Collectors.tsx | 43 +++++++++- .../components/FetchTelegrafConfig.tsx | 65 +++++++++++++++ .../components/TelegrafConfig.tsx | 79 +++++++++++++++++++ .../components/TelegrafConfigOverlay.tsx | 52 ++++++++++++ 7 files changed, 260 insertions(+), 2 deletions(-) create mode 100644 ui/src/organizations/components/FetchTelegrafConfig.tsx create mode 100644 ui/src/organizations/components/TelegrafConfig.tsx create mode 100644 ui/src/organizations/components/TelegrafConfigOverlay.tsx diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c2d0519112..94eb6227ad7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ 1. [11677](https://github.com/influxdata/influxdb/pull/11677): Add instructions button to view `$INFLUX_TOKEN` setup for telegraf configs 1. [11693](https://github.com/influxdata/influxdb/pull/11693): Save the $INFLUX_TOKEN environmental variable in telegraf configs 1. [11700](https://github.com/influxdata/influxdb/pull/11700): Update Tasks tab on Org page to look like Tasks Page +1. [11740](https://github.com/influxdata/influxdb/pull/11740): Add view button to view the telegraf config toml +1. [11522](https://github.com/influxdata/influxdb/pull/11522): Add plugin information step to allow for config naming and configure one plugin at a time ## Bug Fixes 1. [11678](https://github.com/influxdata/influxdb/pull/11678): Update the System Telegraf Plugin bundle to include the swap plugin diff --git a/ui/src/organizations/components/CollectorList.tsx b/ui/src/organizations/components/CollectorList.tsx index 9f6618e71d3..016a0f36ab9 100644 --- a/ui/src/organizations/components/CollectorList.tsx +++ b/ui/src/organizations/components/CollectorList.tsx @@ -17,6 +17,7 @@ interface Props { onDelete: (telegrafID: string) => void onUpdate: (telegraf: Telegraf) => void onOpenInstructions: (telegrafID: string) => void + onOpenTelegrafConfig: (telegrafID: string, telegrafName: string) => void } export default class CollectorList extends PureComponent { @@ -45,6 +46,7 @@ export default class CollectorList extends PureComponent { onDelete, onUpdate, onOpenInstructions, + onOpenTelegrafConfig, } = this.props if (collectors !== undefined) { @@ -57,6 +59,7 @@ export default class CollectorList extends PureComponent { onDelete={onDelete} onUpdate={onUpdate} onOpenInstructions={onOpenInstructions} + onOpenTelegrafConfig={onOpenTelegrafConfig} /> )) } diff --git a/ui/src/organizations/components/CollectorRow.tsx b/ui/src/organizations/components/CollectorRow.tsx index 98fba46bc00..489ecc7d871 100644 --- a/ui/src/organizations/components/CollectorRow.tsx +++ b/ui/src/organizations/components/CollectorRow.tsx @@ -21,6 +21,7 @@ interface Props { onDelete: (telegrafID: string) => void onUpdate: (telegraf: Telegraf) => void onOpenInstructions: (telegrafID: string) => void + onOpenTelegrafConfig: (telegrafID: string, telegrafName: string) => void } export default class CollectorRow extends PureComponent { @@ -47,7 +48,13 @@ export default class CollectorRow extends PureComponent {