From 7ebaf385064ff95e53507508f700f7a814092f3f Mon Sep 17 00:00:00 2001 From: Pavel Zavora Date: Thu, 23 Jun 2022 06:53:16 +0200 Subject: [PATCH] fix(ui): show unsupported administration against 2.x InfluxDB --- .../influxdb/AdminInfluxDBScopedPage.tsx | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/ui/src/admin/containers/influxdb/AdminInfluxDBScopedPage.tsx b/ui/src/admin/containers/influxdb/AdminInfluxDBScopedPage.tsx index d50ba3b66..c9e5660e3 100644 --- a/ui/src/admin/containers/influxdb/AdminInfluxDBScopedPage.tsx +++ b/ui/src/admin/containers/influxdb/AdminInfluxDBScopedPage.tsx @@ -139,6 +139,18 @@ export class AdminInfluxDBScopedPage extends PureComponent { } public content() { const {source, children} = this.props + + if (!source.version || source.version.startsWith('2')) { + return ( + +
+ These functions are not available for the currently selected + InfluxDB Connection. +
+
+ ) + } + const {loading, error, errorMessage} = this.state if ( loading === RemoteDataState.Loading || @@ -164,16 +176,6 @@ export class AdminInfluxDBScopedPage extends PureComponent { ) } - if (!source.version || source.version.startsWith('2')) { - return ( - -
- These functions are not available for the currently selected - InfluxDB Connection. -
-
- ) - } return children } }