Require PHP 8.2.
Raise the minimum required version of icinga-php-library to >=0.19.0 and
icinga-php-thirdparty to >=0.15.0. Both are required for PHP 8.5 support.
Additionally, raise Icinga Web to >=2.12.5 for the same.
Remove badges from README as their information is already visible in the
GitHub UI.
Previously, a manually changed service node name was always treated as a
host node, causing validation to fail with "Host not found" when the
input contained a service name, e.g. <serviceName on hostName>.
Replace unnecessary `getNode()` calls with explicit `createHost()` or
`createService()` call.
This PR adds a **General** config tab with an option to set the number of items
shown in the sidebar menu. Previously, this was a fixed number of **five**. That
value is now kept as the default if none is provided.
During drag & drop, nodes are sorted by `display_name asc`, using aliases if
available. Previously, backend states were not applied at save time, so aliases
were unavailable and nodes fell back to sorting by node name. This produced a
different sort order and, in some cases, caused a node to be removed
unexpectedly.
On drag & drop, nodes are sorted by `display_name asc` using aliases if
available. Previously, backend states were not applied at save time, so
aliases were unavailable and nodes fell back to sorting by node name,
producing a different sort order and causing a node to be removed
unexpectedly in some cases.
Add if condition to only call `applyChanges()` if changes exist
This PR fixes an issue where removing sub-nodes using `Delete all occurrences`
unexpectedly decrements the `display` value of root nodes. This caused the root
node with `display: 1` to become an `Unbound node`.
Nodes with `display: 0` are treated as sub-nodes, and those with `display: 1` or
higher as root nodes. When manual ordering is enabled and a sub-node is removed,
the `display` value of all root nodes was incorrectly decremented by 1. Since
sub-nodes always have `display: 0`, this caused the root node with `display: 1`
to become `0`, effectively turning it into an unbound node.
Relicense this module to `GPL-3.0-only`. Replace the old license file
with `LICENSE.md` and update documentation references accordingly.
Add `GPL-3.0-or-later` SPDX license headers to source files, allowing
relicensing under future GPL versions. This ensures compatibility with
third-party dependencies (e.g. `Apache-2.0`) incompatible with
`GPL-2.0-only`.
To ensure compatibility with third-party dependencies under
licenses incompatible with GPL-2.0-only (such as Apache-2.0),
Icinga Web and its module ecosystem are being relicensed to
GPL-3.0-only.
fixes#491
The controllers for `icingadb` and the `monitoring` backend have been
separated to remove the unwanted dependency.
Minor adjustments made to the view scripts so that it can be used by
both backends.
- Host|ServiceController: The extended class `CompatController` has its own tabs. Therefore, set the view script tabs to null
to avoid creating tabs twice.
- View-scripts: Add a condition to create tabs only when the `monitoring` backend (ido[Host|Service]Controller) is used.
PHP 8.3 -> PHP 8.4:
* Function parameters that are null by default must be declared nullable.
* The E_STRICT error level has been deprecated
* The `$escape` parameter of `fputcsv()` must be set explicitly
PHP 8.4 -> PHP 8.5:
* Using null as an array offset is deprecated.
Additionally the `required` attribute of the `uploaded_file` element in
`BpUploadForm` was set to true.
Previously the form could be submitted without a file causing an exception.
A bug was caused by BpConfig::getName returning null,
because the result was used as an array key, which is deprecated since PHP-8.5.
To avoid any further issues the constructor now ensures the name is always set.
Elements passed to ZendForm::addDisplayGroup will be used as array keys,
if they are null that causes a deprecation warning since PHP-8.5.
To avoid this all null values are removed.
Explictly set the required attribute of the uploaded_file element of BpUploadForm to true.
previously the resulting-html element was not required and submitting the form caused null being passed.
This is necessary because this class does not extend the Web\Form,
and the Zend_Form does not mark the elment as required.
Using null as an array key is deprecated in PHP-8.5,
an empty string can be used for identical behavior.
This includes values that are passed to ZendForm::addDisplayGroup as elements,
as they will be used as array keys.
This PR switches to the new PHP workflow, which combines linting, static
analysis, and unit testing. `phpcs.xml` and `phpunit.xml` have been
removed, as the new workflow provides sane defaults for both and the
files did not contain any special configurations anyway. Since the new
workflow uses the latest PHPUnit version by default, deprecated PHPUnit
features have been migrated. In addition, code style corrections were
made to comply with the latest PSR coding standards.
Custom variables used in Detail View Extension can be read from the host
if not present on the service, and can be customized, if desired, in the
config.ini for this module