未验证 提交 89fa7144 编写于 作者: S slguan 提交者: GitHub

Merge pull request #1362 from taosdata/feature/tliu

github issue number #1361
......@@ -136,8 +136,10 @@ var GenericDatasource = exports.GenericDatasource = function () {
if (options != null && options.range != null && options.range.to != null) {
queryEnd = options.range.to.toISOString();
}
var intervalMs = options.intervalMs || "20000";
var intervalMs = Math.max(options.intervalMs,15000);
if (isNaN(intervalMs)) {
intervalMs = 15000;
}
intervalMs += "a";
sql = sql.replace(/^\s+|\s+$/gm, '');
sql = sql.replace("$from", "'" + queryStart + "'");
......
......@@ -110,8 +110,10 @@ export class GenericDatasource {
if (options != null && options.range != null && options.range.to != null){
queryEnd = options.range.to.toISOString();
}
var intervalMs = options.intervalMs || "20000";
var intervalMs = Math.max(options.intervalMs,15000);
if (isNaN(intervalMs)) {
intervalMs = 15000;
}
intervalMs += "a";
sql = sql.replace(/^\s+|\s+$/gm, '');
sql = sql.replace("$from", "'" + queryStart + "'");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册