From fd22158483acc4f1142c7846f05202d9bbc8d09e Mon Sep 17 00:00:00 2001 From: Christine <54949615+christinebr@users.noreply.github.com> Date: Fri, 21 Oct 2022 08:27:03 +0200 Subject: [PATCH 1/2] addTransformation to table.libsonnet in grafonet-7.0 --- grafonnet-7.0/panel/table.libsonnet | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/grafonnet-7.0/panel/table.libsonnet b/grafonnet-7.0/panel/table.libsonnet index 981d1ea2..b5ad7f59 100644 --- a/grafonnet-7.0/panel/table.libsonnet +++ b/grafonnet-7.0/panel/table.libsonnet @@ -130,5 +130,16 @@ target, ] }, + addTransformation( + id=null, + options=null + ):: self {} + + { transformations+: [ + { + [if id != null then 'id']: id, + [if options != null then 'options']: options, + }, + ] }, + }, } From da8b1e11942f10c475b50cae9f3b767160e08f6f Mon Sep 17 00:00:00 2001 From: Christine <54949615+christinebr@users.noreply.github.com> Date: Mon, 24 Oct 2022 17:04:25 +0200 Subject: [PATCH 2/2] fix formatting --- grafonnet-7.0/panel/table.libsonnet | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/grafonnet-7.0/panel/table.libsonnet b/grafonnet-7.0/panel/table.libsonnet index b5ad7f59..640ca18f 100644 --- a/grafonnet-7.0/panel/table.libsonnet +++ b/grafonnet-7.0/panel/table.libsonnet @@ -134,12 +134,12 @@ id=null, options=null ):: self {} - + { transformations+: [ - { - [if id != null then 'id']: id, - [if options != null then 'options']: options, - }, - ] }, + + { transformations+: [ + { + [if id != null then 'id']: id, + [if options != null then 'options']: options, + }, + ] }, }, }