summaryrefslogtreecommitdiff
path: root/elastic/generate-config.py
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2017-04-13 17:02:59 +0200
committervarac <varacanero@zeromail.org>2017-04-13 17:02:59 +0200
commit8d1e4e9c07a79e6601acc24f090b2bb534114550 (patch)
tree5f79b90087a03afc4994d8786de8ddc62d7f1c85 /elastic/generate-config.py
parent618647ca01ded6c1e92618ac71d4c4e1cff7b76b (diff)
Finish dashboard
Diffstat (limited to 'elastic/generate-config.py')
-rwxr-xr-xelastic/generate-config.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/elastic/generate-config.py b/elastic/generate-config.py
index 49a6209..31c8e3a 100755
--- a/elastic/generate-config.py
+++ b/elastic/generate-config.py
@@ -59,7 +59,18 @@ def generate_dashboards():
out_file = dir + 'soledad-benchmarks.json'
print('Generating ' + out_file)
- rendered = pystache.render(template, tests)
+ panels = '['
+ count = 0
+ for test in tests['tests']:
+ test_name = test['name']
+ count += 1
+ panels += '{\\"id\\":\\"' + test_name + '\\",\\"panelIndex\\":' + str(count) + ',\\"col\\":1,\\"row\\":' + str(count) + ',\\"size_x\\":6,\\"size_y\\":3,\\"type\\":\\"visualization\\"}, '
+ panels = panels[:-2]
+ panels += ']'
+
+ print(panels)
+ panels_json = { 'panels_json': panels }
+ rendered = pystache.render(template, panels_json)
#print(rendered)
out = open(out_file, 'w')