搜索Counters空格分割多个关键字
unixgiant opened this issue · comments
搜索使用空格分隔多个关键字时,api执行sql语句有问题,看了源码,不会改。。
falcon-plus/modules/api/app/controller/graph/graph_controller.go:203
下面是同时搜索cpu、load:
SELECT endpoint_id, counter, step, type FROM
endpoint_counter WHERE (endpoint_id IN ('10007')) AND (counter regexp 'cpu') AND (counter regexp 'load') LIMIT 50 OFFSET 0
应该为:
SELECT endpoint_id, counter, step, type FROM
endpoint_counter WHERE (endpoint_id IN ('10007')) AND ( (counter regexp 'cpu') OR (counter regexp 'load') ) LIMIT 50 OFFSET 0