From 5adcec301837580de5fd05a8b75714661ec24d66 Mon Sep 17 00:00:00 2001 From: Brian Brazil Date: Wed, 18 Feb 2015 22:57:20 +0000 Subject: [PATCH] Proof of concept for federation via console templates. This exposes samples via the console templates in the text exposition format, which the parser will fall back to. This is not a proper federation solution, but should tide us over for now. Extenions could include passing in a query or queries in the url parameters. --- consoles/federation_template_example.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 consoles/federation_template_example.txt diff --git a/consoles/federation_template_example.txt b/consoles/federation_template_example.txt new file mode 100644 index 0000000000..959d81fe7a --- /dev/null +++ b/consoles/federation_template_example.txt @@ -0,0 +1,3 @@ +{{/* Adjust the query below to select the samples to expose. */}} +{{ range query "{__name__=~'^job:.*'}" }} +{{ .Labels.__name__ }}{{ "{" }}{{ range $k, $v := .Labels }}{{ if ne "__name__" $k }}{{ $k }}="{{ $v | reReplaceAll "([\\\\\"])" "\\$1" | reReplaceAll "\n" "\\n"| safeHtml }}",{{ end }}{{ end }}{{ "}" }} {{ print .Value | safeHtml }}{{ end }}