From a52b0dbd8b9f73a4f0721a47dbcca1b206e2bd68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Kut=C3=BD?= <6du1ro.n@gmail.com> Date: Mon, 3 Mar 2014 19:54:05 +0100 Subject: [PATCH] fixes --- conf/config.js | 6 +++--- server.sls | 12 +++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) mode change 100644 => 100755 server.sls diff --git a/conf/config.js b/conf/config.js index 9eed6f0..504dfb6 100755 --- a/conf/config.js +++ b/conf/config.js @@ -22,11 +22,11 @@ function (Settings) { * in nginx or apache for cross origin domain sharing to work (CORS). * Check install documentation on github */ - {% if data in pillar.grafana.server.data.count == 1 %} + {% if (pillar.grafana.server.data|length) == 1 %} {% for data in pillar.grafana.server.data %} {%- if data.type == "graphite" %} - graphiteUrl: "http://"+{{ data.host }}+":{{ data.port }}", + graphiteUrl: "http://{{ data.host }}:{{ data.port }}", {%- endif %} {% endfor %} @@ -38,7 +38,7 @@ function (Settings) { * Multiple graphite servers? Comment out graphiteUrl and replace with * * datasources: { - + * data_center_us: { type: 'graphite', url: 'http://', default: true }, * data_center_eu: { type: 'graphite', url: 'http://' } * } diff --git a/server.sls b/server.sls old mode 100644 new mode 100755 index 5ac819c..50dfa40 --- a/server.sls +++ b/server.sls @@ -26,12 +26,22 @@ grafana_install: - names: - npm install - npm install -g grunt-cli - - grunt build - cwd: /srv/grafana/site - unless: test -e /srv/grafana/site/node_modules - require: - git: grafana_repository + +grafana_grun_build: + cmd.run: + - names: + - grunt build --force + - cwd: /srv/grafana/site + - unless: test -e /srv/grafana/site/dist + - require: + - git: grafana_repository + + {% endif %} /srv/grafana/site/src/config.js: