add option to hide SOFT checks
This commit is contained in:
parent
2afef02b2c
commit
37220e4f2d
2 changed files with 21 additions and 8 deletions
23
node.json
23
node.json
|
@ -65,24 +65,31 @@
|
||||||
]
|
]
|
||||||
}, {
|
}, {
|
||||||
"title": "Background color",
|
"title": "Background color",
|
||||||
"ui_width": 3,
|
"ui_width": 4,
|
||||||
"name": "background_color",
|
"name": "background_color",
|
||||||
"type": "color",
|
"type": "color",
|
||||||
"default": [0,0,0,1]
|
"default": [0,0,0,1]
|
||||||
|
}, {
|
||||||
|
"title": "instance name",
|
||||||
|
"ui_width": 8,
|
||||||
|
"name": "instance_name",
|
||||||
|
"type": "string",
|
||||||
|
"default": "icinga2",
|
||||||
|
"hint": "Something to describe the displayed output, will be shown next to the update datum"
|
||||||
}, {
|
}, {
|
||||||
"title": "Show ACK",
|
"title": "Show ACK",
|
||||||
"ui_width": 2,
|
"ui_width": 3,
|
||||||
"name": "show_ack",
|
"name": "show_ack",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true,
|
"default": true,
|
||||||
"hint": "Show acknowledged problems (adds a note, too)"
|
"hint": "Show acknowledged problems (adds a note, too)"
|
||||||
}, {
|
}, {
|
||||||
"title": "instance name",
|
"title": "Show SOFT",
|
||||||
"ui_width": 7,
|
"ui_width": 3,
|
||||||
"name": "instance_name",
|
"name": "show_soft",
|
||||||
"type": "string",
|
"type": "boolean",
|
||||||
"default": "icinga2",
|
"default": true,
|
||||||
"hint": "Something to describe the displayed output, will be shown next to the update datum"
|
"hint": "Show SOFT checks on bottom of the list"
|
||||||
}, {
|
}, {
|
||||||
"title": "Connection to icinga2",
|
"title": "Connection to icinga2",
|
||||||
"type": "section"
|
"type": "section"
|
||||||
|
|
6
service
6
service
|
@ -61,6 +61,9 @@ def regenerate():
|
||||||
else:
|
else:
|
||||||
ack = ''
|
ack = ''
|
||||||
|
|
||||||
|
if not CONFIG['show_soft'] and int(host['attrs']['state_type']) == 0:
|
||||||
|
continue
|
||||||
|
|
||||||
services['services'].append({
|
services['services'].append({
|
||||||
'host': host['attrs']['display_name'],
|
'host': host['attrs']['display_name'],
|
||||||
'service': '-- HOST --',
|
'service': '-- HOST --',
|
||||||
|
@ -89,6 +92,9 @@ def regenerate():
|
||||||
else:
|
else:
|
||||||
ack = ''
|
ack = ''
|
||||||
|
|
||||||
|
if not CONFIG['show_soft'] and int(svc['attrs']['state_type']) == 0:
|
||||||
|
continue
|
||||||
|
|
||||||
services['services'].append({
|
services['services'].append({
|
||||||
'host': svc['attrs']['host_name'],
|
'host': svc['attrs']['host_name'],
|
||||||
'service': svc['attrs']['display_name'],
|
'service': svc['attrs']['display_name'],
|
||||||
|
|
Loading…
Reference in a new issue