Explorar o código

support json format templating

Mitsuhiro Tanda %!s(int64=6) %!d(string=hai) anos
pai
achega
4bd94b8aba
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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)) {