Browse Source

support json format templating

Mitsuhiro Tanda 6 năm trước cách đây
mục cha
commit
4bd94b8aba
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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)) {