Sven Klemm 7 лет назад
Родитель
Сommit
5e9a66de5f
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      public/app/plugins/datasource/postgres/postgres_query.ts

+ 5 - 1
public/app/plugins/datasource/postgres/postgres_query.ts

@@ -137,7 +137,11 @@ export default class PostgresQuery {
       value = this.templateSrv.replace(value, this.scopedVars);
       value = this.templateSrv.replace(value, this.scopedVars);
     }
     }
 
 
-    return str + constraint.key + ' ' + operator + ' ' + value;
+    if (operator === "IN") {
+      return str + constraint.key + ' ' + operator + ' (' + value + ')';
+    } else {
+      return str + constraint.key + ' ' + operator + ' ' + value;
+    }
   }
   }
 
 
   interpolateQueryStr(value, variable, defaultFormatFn) {
   interpolateQueryStr(value, variable, defaultFormatFn) {