소스 검색

support json format templating

Mitsuhiro Tanda 7 년 전
부모
커밋
4bd94b8aba
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      public/app/features/templating/template_srv.ts

+ 3 - 0
public/app/features/templating/template_srv.ts

@@ -156,6 +156,9 @@ export class TemplateSrv {
         }
         return value;
       }
+      case 'json': {
+        return JSON.stringify(value);
+      }
       case 'percentencode': {
         // like glob, but url escaped
         if (_.isArray(value)) {