Class: Hieracles::Formats::Json
Overview
format intended to be used for an api server
Instance Method Summary
collapse
#initialize, #show_params
Instance Method Details
#allparams(args) ⇒ Object
32
33
34
|
# File 'lib/hieracles/formats/json.rb', line 32
def allparams(args)
@node.params(false).merge(alerts).to_json
end
|
#build_list(hash, notifications, filter) ⇒ Object
36
37
38
39
40
41
|
# File 'lib/hieracles/formats/json.rb', line 36
def build_list(hash, notifications, filter)
{
'notifications' => notifications,
'payload' => hash
}.to_json
end
|
#facts(_) ⇒ Object
12
13
14
|
# File 'lib/hieracles/formats/json.rb', line 12
def facts(_)
@node.facts.merge(alerts).to_json
end
|
#files(_) ⇒ Object
16
17
18
|
# File 'lib/hieracles/formats/json.rb', line 16
def files(_)
{ 'files' => @node.files }.merge(alerts).to_json
end
|
#info(_) ⇒ Object
8
9
10
|
# File 'lib/hieracles/formats/json.rb', line 8
def info(_)
@node.info.merge(alerts).to_json
end
|
#modules(_) ⇒ Object
24
25
26
|
# File 'lib/hieracles/formats/json.rb', line 24
def modules(_)
@node.modules.merge(alerts).to_json
end
|
#params(args) ⇒ Object
28
29
30
|
# File 'lib/hieracles/formats/json.rb', line 28
def params(args)
@node.params(true).merge(alerts).to_json
end
|
#paths(_) ⇒ Object
20
21
22
|
# File 'lib/hieracles/formats/json.rb', line 20
def paths(_)
{ 'paths' => @node.paths }.merge(alerts).to_json
end
|