瀏覽代碼

support json format templating

Mitsuhiro Tanda 6 年之前
父節點
當前提交
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)) {