From 37220e4f2d6e1d8105d448f945997b4dfb1ccd68 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sun, 14 Feb 2021 11:49:07 +0100 Subject: [PATCH] add option to hide SOFT checks --- node.json | 23 +++++++++++++++-------- service | 6 ++++++ 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/node.json b/node.json index beff3d3..7b813eb 100644 --- a/node.json +++ b/node.json @@ -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" diff --git a/service b/service index a9e201a..3f44c2f 100755 --- a/service +++ b/service @@ -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'],