InfluxDB: Fix querying retention policies on flux mode (#67722)

Query retention policies only on InfluxQL mode
This commit is contained in:
ismail simsek 2023-05-03 16:01:26 +03:00 committed by GitHub
parent 6cd042ed16
commit 373e4cab9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,7 +169,8 @@ export default class InfluxDatasource extends DataSourceWithBackend<InfluxQuery,
}
async getRetentionPolicies(): Promise<string[]> {
if (this.retentionPolicies.length) {
// Only For InfluxQL Mode
if (this.isFlux || this.retentionPolicies.length) {
return Promise.resolve(this.retentionPolicies);
} else {
return getAllPolicies(this).catch((err) => {