Added support for %{var} like placholders in graph url (titles, data etc...) #9

wants to merge 1 commit into


None yet
3 participants

tanelj commented Feb 16, 2012


I have added support for %{var} like placeholders that allows user to use them anywhere in graph url.

Example usage in config file:

placeholders :host => 'myhost', :country => 'uk'
title 'Data for %{host} (%{country})'

field :first,
  :alias => '%{country} max',
  :data  => '%{host}.countries.%{country}.max'

field :second,
  :alias => '%{country} avg',
  :data  => '%{host}.countries.%{country}.avg'

I have plan to implement and use this functionality in GDash to allow system/dashboard wide placeholders. (Eg country based dashboard that accepts country code as url parameter).


tanelj commented Feb 21, 2012

Hi! Here is also a implemented example in GDash using this feature:


ripienaar commented Mar 23, 2012

rebased and pushed this commit, thanks and sorry for the delay


ripienaar commented Mar 27, 2012

I ported this in while doing some other backports from gdash, closing

@ripienaar ripienaar closed this Mar 27, 2012

@keymon keymon referenced this pull request in ripienaar/gdash Feb 12, 2013


Placeholders graph properties #74

keymon commented Feb 14, 2013

In ripienaar/gdash#74 we discuss that this functionality can be implemented just using normal ruby interpolation #{}. Should we keep this other format?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment