Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
add more graphite functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Fridge committed Jan 9, 2014
1 parent 38b0709 commit 11bf684
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/graphite_graph.rb
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,11 @@ def url(format = nil, url=true)
raise "field #{name} does not have any data associated with it" unless target[:data]

graphite_target = target[:data]

graphite_target = "transformNull(#{graphite_target},#{target[:transform_null]})" if target[:transform_null]
graphite_target = "lowestAverage(#{graphite_target},#{target[:lowest_average]})" if target[:lowest_average]
graphite_target = "highestAverage(#{graphite_target},#{target[:highest_average]})" if target[:highest_average]
graphite_target = "averageAbove(#{graphite_target},#{target[:average_above]})" if target[:average_above]
graphite_target = "averageBelow(#{graphite_target},#{target[:average_below]})" if target[:average_below]
graphite_target = "removeAbovePercentile(#{graphite_target},#{target[:remove_above_percentile]})" if target[:remove_above_percentile]
graphite_target = "removeAboveValue(#{graphite_target},#{target[:remove_above_value]})" if target[:remove_above_value]
graphite_target = "removeBelowPercentile(#{graphite_target},#{target[:remove_below_percentile]})" if target[:remove_below_percentile]
Expand Down

0 comments on commit 11bf684

Please sign in to comment.