add option to hide SOFT checks

This commit is contained in:
Franzi 2021-02-14 11:49:07 +01:00
parent 2afef02b2c
commit 37220e4f2d
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 21 additions and 8 deletions

View file

@ -65,24 +65,31 @@
]
}, {
"title": "Background color",
"ui_width": 3,
"ui_width": 4,
"name": "background_color",
"type": "color",
"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",
"ui_width": 2,
"ui_width": 3,
"name": "show_ack",
"type": "boolean",
"default": true,
"hint": "Show acknowledged problems (adds a note, too)"
}, {
"title": "instance name",
"ui_width": 7,
"name": "instance_name",
"type": "string",
"default": "icinga2",
"hint": "Something to describe the displayed output, will be shown next to the update datum"
"title": "Show SOFT",
"ui_width": 3,
"name": "show_soft",
"type": "boolean",
"default": true,
"hint": "Show SOFT checks on bottom of the list"
}, {
"title": "Connection to icinga2",
"type": "section"

View file

@ -61,6 +61,9 @@ def regenerate():
else:
ack = ''
if not CONFIG['show_soft'] and int(host['attrs']['state_type']) == 0:
continue
services['services'].append({
'host': host['attrs']['display_name'],
'service': '-- HOST --',
@ -89,6 +92,9 @@ def regenerate():
else:
ack = ''
if not CONFIG['show_soft'] and int(svc['attrs']['state_type']) == 0:
continue
services['services'].append({
'host': svc['attrs']['host_name'],
'service': svc['attrs']['display_name'],