Просмотр исходного кода

stackdriver: make sure object type queries are also checked for vtemplate variables

Erik Sundell 7 лет назад
Родитель
Сommit
7fc8ed942f
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      public/app/features/templating/variable.ts

+ 2 - 0
public/app/features/templating/variable.ts

@@ -1,3 +1,4 @@
+import _ from 'lodash';
 import { assignModelProperties } from 'app/core/utils/model_utils';
 import { assignModelProperties } from 'app/core/utils/model_utils';
 
 
 /*
 /*
@@ -28,6 +29,7 @@ export { assignModelProperties };
 
 
 export function containsVariable(...args: any[]) {
 export function containsVariable(...args: any[]) {
   const variableName = args[args.length - 1];
   const variableName = args[args.length - 1];
+  args[0] = _.isString(args[0]) ? args[0] : Object['values'](args[0]).join(' ');
   const variableString = args.slice(0, -1).join(' ');
   const variableString = args.slice(0, -1).join(' ');
   const matches = variableString.match(variableRegex);
   const matches = variableString.match(variableRegex);
   const isMatchingVariable =
   const isMatchingVariable =