fix(monitor): inject ResType (#21625)

This commit is contained in:
Zexi Li
2024-11-19 14:00:15 +08:00
committed by GitHub
parent ce913c10e0
commit 36a616d575
2 changed files with 3 additions and 2 deletions
+3 -1
View File
@@ -561,7 +561,9 @@ func (c *QueryCondition) setResType() {
}
} */
if c.Query.Model.Database == monitor.METRIC_DATABASE_TELE {
c.ResType = resType
if c.ResType == "" {
c.ResType = resType
}
}
}
@@ -97,7 +97,6 @@ func (e *InfluxdbExecutor) Query(ctx context.Context, dsInfo *tsdb.DataSource, t
return nil, errors.Wrap(err, "GetRawQuery")
}
log.Debugf("sql: %s", rawQuery)
db := dsInfo.Database
if db == "" {
db = tsdbQuery.Queries[0].Database