Icinga/icingaweb2-module-businessprocess

Undefined index: EMPTY

moreamazingnick opened this issue · 3 comments

Describe the bug

ErrorException in /usr/share/icingaweb2/modules/businessprocess/library/Businessprocess/BpNode.php:88 with message: Undefined index: EMPTY

To Reproduce

Create a Business Process Dummy without Nodes

Fix

    protected static $emptyStateSummary = array(
     ...
        'EMPTY'               => 0,
     ...
    );
  • Icinga Web 2 version and modules (System - About): 2.10
  • Web browser used:. Chrome
  • Icinga 2 version used (icinga2 --version): 2.13.1
  • PHP version used (php --version): 7.4
  • Server operating system and version: Ubuntu 20.04
  • business process 2.4.0

Additional context

Add any other context about the problem here.

Works fine for me without your change. Please give more detailed steps to reproduce this, or even an example configuration.

Screenshot from 2022-04-05 17-01-03 Screenshot from 2022-04-05 17-01-11 Screenshot from 2022-04-05 17-01-19

i hope that helps:
we have this config /etc/icingaweb2/modules/businessprocess/processes/Security.conf

### Business Process Config File ###
#
# Title           : Security
# Description     :
# Owner           : admin
# AddToMenu       : yes
# Backend         :
# Statetype       : soft
#
###################################

Customers =
display 0;Customers;Customers

Employees =
display 0;Employees;Employees

IT-Administration =
display 0;IT-Administration;IT-Administration

Authentication = Customers & Employees & IT-Administration
display 1;Authentication;Authentication

With the last module there was the message:
There are 4 missing nodes: Customers, Businessprocesses-Master;Hoststatus, Employees, IT-Administration

but now without the patch we get:
[Error]
Undefined index: EMPTY

Successfully reproduced it, thanks.