Commit graph

1197 commits

Author SHA1 Message Date
Sukhwinder Dhillon
d35a35ae2a SuggestionsController: Specify db instance manually
In these methods, we know exactly which database instance we need.
2026-04-13 10:08:12 +02:00
Sukhwinder Dhillon
53b30c1ef6 MonitoringState: Initialize backend directly
Previously, `$config->getBackend()` returned the `Icingadb` backend
when `icingadb` module was enabled, which caused a stack trace error.
2026-04-13 09:27:32 +02:00
Eric Lippmann
4ea2ba9903
Release version 2.6.0 (#497)
Some checks failed
L10n Update / update (push) Has been cancelled
CI / PHP (push) Has been cancelled
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.
2026-03-26 15:18:50 +01:00
Sukhwinder Dhillon
9c356e93e9
PHPStan: Clean up baseline (#498)
As the minimum supported PHP version is now 8.2, the PHPStan support
smaller versions and the PHP 7 baseline is removed.
2026-03-26 15:02:34 +01:00
Sukhwinder Dhillon
33b7348b23
Fix handling of manually changed service node name (#495)
Some checks are pending
L10n Update / update (push) Waiting to run
CI / PHP (push) Waiting to run
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.
2026-03-25 12:55:44 +01:00
jrauh01
c552b1db7b
Allow to configure number of shown menu items (#484)
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.
2026-03-25 12:38:18 +01:00
Eric Lippmann
81018899d1
Ensure backend states are applied before saving changes to the config (#480)
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.
2026-03-25 12:35:36 +01:00
Sukhwinder Dhillon
e99bb0d26c BpConfig: Add method applyDbStates() to clean-up redundant code 2026-03-25 12:24:02 +01:00
Sukhwinder Dhillon
be8119f964 ProcessChanges::ApplyChanges(): Apply db states before applying changes
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
2026-03-25 12:24:02 +01:00
Sukhwinder Dhillon
96137e0df1
Only root node removal can decrement display of root nodes (#479)
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.
2026-03-25 12:21:59 +01:00
Sukhwinder Dhillon
ec9baa8050
Add EmptyStateBar notice for empty nodes (#400) 2026-03-25 12:16:01 +01:00
Eric Lippmann
21aec09ebd
Relicense to GPL-3.0-only and add SPDX license headers (#493)
Some checks failed
L10n Update / update (push) Has been cancelled
CI / PHP (push) Has been cancelled
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`.
2026-03-11 20:47:15 +01:00
Eric Lippmann
0ce3381488 License source files as GPL-3.0-or-later
Add SPDX license headers and mark source files as GPL-3.0-or-later to
preserve the option to relicense under later GPL versions.
2026-03-11 20:44:42 +01:00
Eric Lippmann
a96dfbda9f Upgrade license to GPL-3.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.
2026-02-23 22:57:03 +01:00
Johannes Meyer
3ebfcea4bf
Remove monitoring module dependency (#492)
Some checks failed
L10n Update / update (push) Has been cancelled
CI / PHP (push) Has been cancelled
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.
2026-01-21 17:02:06 +01:00
Sukhwinder Dhillon
86b5557c1e Controllers: Add an else case to improve readability 2026-01-13 10:08:38 +01:00
Sukhwinder Dhillon
d17c4501b2 Use same view script in monitoring and icingadb for Access Denied message
- 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.
2026-01-13 08:52:01 +01:00
Sukhwinder Dhillon
9a91854d4c Remove monitoring module dependency
By separating `monitoring` module controllers.

- Adjust view-script paths accordingly
2026-01-13 08:52:01 +01:00
Eric Lippmann
b756147764
Support PHP 8.5 (#489)
Some checks failed
L10n Update / update (push) Has been cancelled
CI / PHP (push) Has been cancelled
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.
2026-01-09 13:06:55 +01:00
Bastian Lederer
b153a51cb6 Set BpConifg::name by a constructor argument with default
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.
2026-01-09 08:35:49 +01:00
Bastian Lederer
5bba8ba0ec Only add display groups for defined buttons
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.
2026-01-09 08:23:54 +01:00
Bastian Lederer
71f0ea3878 Mark uploaded_file element as required
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.
2026-01-08 08:24:01 +01:00
Bastian Lederer
400ad69497 Replace null as array key with an empty string
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.
2026-01-08 08:21:08 +01:00
Bastian Lederer
0e11994349 Explicitly set the escape parameter of fputcsv()
Relying on the default value is deprecated since PHP-8.4
2026-01-08 08:13:54 +01:00
Bastian Lederer
615d0afd10 Declare parameters that are null by default as nullable
Implicitly nullable parameters are deprecated since PHP-8.4
2026-01-08 08:07:59 +01:00
Eric Lippmann
b4b41f7c6b
GitHub Actions: Use new PHP workflows (#487)
Some checks failed
L10n Update / update (push) Has been cancelled
CI / PHP (push) Has been cancelled
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.
2025-12-15 09:29:04 +01:00
Eric Lippmann
c85b9d98fe Align coding style to comply with latest PSR 2025-12-12 12:44:49 +01:00
Eric Lippmann
079654b59c Remove phpcs.xml
Use defaults from new workflow.
2025-12-12 12:13:14 +01:00
Eric Lippmann
a2a1e4f034 Remove unnecessary method call 2025-12-12 12:13:14 +01:00
Eric Lippmann
4c430f6424 Remove phpunit.xml
Use defaults from new workflows.
2025-12-12 12:13:14 +01:00
Eric Lippmann
e7f0b449bb Migrate deprecated @codingStandards syntax 2025-12-12 12:13:14 +01:00
Eric Lippmann
96a8f00609 GitHub Actions: Use new PHP workflows 2025-12-12 12:13:14 +01:00
mdetrano
2111103957
Implement feature requests #455 and #477. Custom var enhancement (#478)
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
2025-08-05 10:25:39 +02:00
Johannes Meyer
ba7043d14b
Release v2.5.2 (#476) 2025-07-02 10:46:59 +02:00
Johannes Meyer
52c4a6832a module.info: Raise version to 2.5.2 2025-07-01 16:59:29 +02:00
Johannes Meyer
7e5ff4a43f README.md: Drop PHP support badge 2025-07-01 16:59:11 +02:00
Johannes Meyer
cda66ca82e menu: Only count the worst states in badges
fixes #365
2025-07-01 16:53:18 +02:00
Johannes Meyer
a6033491f4 Do not break sidebar if processes cannot be loaded
fixes #466
2025-07-01 14:24:58 +02:00
Johannes Meyer
ccf2ba4c66 IcingaDbState: Correctly determine ack and downtime flags
fixes #469
2025-06-30 17:08:47 +02:00
Johannes Meyer
d88a7dd752 Node: Rename in_acknowledged to is_acknowledged
refs #461
2025-06-30 12:11:15 +02:00
Johannes Meyer
4d0dc0c91f process/show: Hide sort control in fullscreen or compact view
fixes #462
2025-06-30 10:58:49 +02:00
Johannes Meyer
726cab5851 process/show: Only show cleanup links in edit mode
fixes #464
2025-06-30 10:58:29 +02:00
Johannes Meyer
fd7fd71bb7 Correctly determine node states in sidebar
fixes #467
2025-06-30 10:58:06 +02:00
Jáchym Holeček
f12b2d744a
Add is_acknowledged property to Node class (#461)
This pull request introduces an `is_acknowledged` property to the `Node`
class in the Business Process library to enhance JSON output.
2025-06-30 10:47:56 +02:00
Johannes Meyer
575fb964d0 php: Run on support branches 2025-06-30 09:22:37 +02:00
Johannes Meyer
fe8c0d4b34 php: Don't run on legacy PHP versions 2025-06-30 09:20:30 +02:00
Johannes Meyer
9f91b911bb L10n-udpate: Use template from github-actions 2025-06-03 16:14:28 +02:00
Navid Sassan
35218f72fc Add showFullscreen and showCompact for dashboard 2025-05-07 10:28:54 +02:00
Johannes Meyer
71e957dc5e Ensure compatiblity with https://github.com/Icinga/ipl-web/pull/258 2025-04-01 11:34:25 +02:00
Sukhwinder Dhillon
3403b605e4 module.info: Raise version to 2.5.1 2024-04-23 15:46:44 +02:00