Merge pull request #5954 from influxdata/fix/v2_infludb_admin_unsupported

fix(ui): show unsupported administration against 2.x InfluxDB
pull/5965/head
Pavel Závora 2022-06-23 11:23:39 +02:00 committed by GitHub
commit 57a6acb26a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 10 deletions

View File

@ -139,6 +139,18 @@ export class AdminInfluxDBScopedPage extends PureComponent<Props, State> {
}
public content() {
const {source, children} = this.props
if (!source.version || source.version.startsWith('2')) {
return (
<WrapToPage hideRefresh={true}>
<div className="container-fluid">
These functions are not available for the currently selected
InfluxDB Connection.
</div>
</WrapToPage>
)
}
const {loading, error, errorMessage} = this.state
if (
loading === RemoteDataState.Loading ||
@ -164,16 +176,6 @@ export class AdminInfluxDBScopedPage extends PureComponent<Props, State> {
)
}
if (!source.version || source.version.startsWith('2')) {
return (
<WrapToPage hideRefresh={true}>
<div className="container-fluid">
These functions are not available for the currently selected
InfluxDB Connection.
</div>
</WrapToPage>
)
}
return children
}
}