From 4bd94b8aba0dafc8f4b264b486ad9fc35aeb5a24 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Thu, 7 Feb 2019 14:07:41 +0900 Subject: [PATCH] support json format templating --- public/app/features/templating/template_srv.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/app/features/templating/template_srv.ts b/public/app/features/templating/template_srv.ts index de5efabcf23..11e90cbb5f7 100644 --- a/public/app/features/templating/template_srv.ts +++ b/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)) {