lib/hieracles/formats/json.rb in hieracles-0.2.2 vs lib/hieracles/formats/json.rb in hieracles-0.3.0
- old
+ new
@@ -31,9 +31,16 @@
def allparams(args)
@node.params(false).merge(alerts).to_json
end
+ def build_list(hash, notifications, filter)
+ {
+ 'notifications' => notifications,
+ 'payload' => hash
+ }.to_json
+ end
+
private
def alerts
if @node.notifications.count > 0
{ 'alerts' => @node.notifications.map(&:to_hash) }